]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20130511
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.565 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --without-manpages      suppress install of manpages
710   --without-progs         suppress build with programs (e.g., tic)
711   --without-tests         suppress build with test-programs
712   --without-curses-h      install curses.h as ncurses.h only
713   --with-pkg-config{=path} enable/disable use of pkg-config
714   --with-pkg-config-libdir=XXX use given directory for installing pc-files
715   --enable-pc-files       generate and install .pc files for pkg-config
716   --enable-mixed-case     tic should assume mixed-case filenames
717   --with-install-prefix   prefixes actual install-location ($DESTDIR)
718 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
719   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
720   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
721   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
722   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
723   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
724   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
725 Options to Specify the Libraries Built/Used:
726   --disable-libtool-version  enable to use libtool's incompatible naming scheme
727   --with-libtool          generate libraries with libtool
728   --with-shared           generate shared-libraries
729   --with-normal           generate normal-libraries (default)
730   --with-debug            generate debug-libraries (default)
731   --with-profile          generate profile-libraries
732   --with-cxx-shared       generate C++ shared-libraries
733   --with-lib-prefix       override library-prefix
734   --with-termlib          generate separate terminfo library
735   --with-ticlib           generate separate tic library
736   --with-gpm              use Alessandro Rubini's GPM library
737   --without-dlsym         do not use dlsym() to load GPM dynamically
738   --with-sysmouse         use sysmouse (FreeBSD console)
739   --enable-rpath          use rpath option when generating shared libraries
740   --disable-relink        relink shared libraries during install
741   --with-shlib-version=X  Specify rel or abi version for shared libs
742   --disable-rpath-hack    don't add rpath options for additional libraries
743 Fine-Tuning Your Configuration:
744   --disable-overwrite     leave out the link to -lcurses
745   --disable-database      do not use terminfo, only fallbacks/termcap
746   --with-database=XXX     specify terminfo source to install
747   --with-hashed-db        specify hashed-database library
748   --with-fallbacks=XXX    specify list of fallback terminal descriptions
749   --without-xterm-new     specify if xterm terminfo should be old version
750   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
751   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
752   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
753   --disable-big-core      assume machine has little memory
754   --disable-big-strings   assume compiler has only standard-size strings
755   --enable-termcap        compile in termcap fallback support
756   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
757   --enable-getcap         fast termcap load, no xrefs to terminfo
758   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
759   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
760   --disable-root-environ  restrict environment when running as root
761   --enable-symlinks       make tic use symbolic links not hard links
762   --enable-broken_linker  compile with broken-linker support code
763   --enable-bsdpad         recognize BSD-style prefix padding
764   --enable-widec          compile with wide-char/UTF-8 code
765   --disable-lp64          allow chtype to be long (ignore _LP64)
766   --disable-largefile     omit support for large files
767   --disable-tparm-varargs compile tparm() without varargs interface
768   --disable-tic-depends   link tic library without explicit dependency on ncurses library
769   --with-bool=TYPE        override fallback type of bool variable
770   --with-caps=alt         compile with alternate Caps file
771   --with-chtype=TYPE      override type of chtype
772   --with-ospeed=TYPE      override type of ospeed variable
773   --with-mmask-t=TYPE     override type of mmask_t
774   --with-ccharw-max=XXX   override size CCHARW_MAX
775   --with-tparm-arg=TYPE   override parameter type of tparm
776   --with-rcs-ids          compile-in RCS identifiers
777 Options to Specify How Manpages are Installed:
778   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
779                           optionally formatted/catonly, e.g., gzip,formatted
780   --with-manpage-renames  specify manpage-renaming
781   --with-manpage-aliases  specify manpage-aliases using .so
782   --with-manpage-symlinks specify manpage-aliases using symlinks
783   --with-manpage-tbl      specify manpage processing with tbl
784 Extensions:
785   --disable-ext-funcs     disable function-extensions
786   --enable-sp-funcs       enable experimental SCREEN-extensions
787   --enable-term-driver    enable experimental terminal-driver
788   --enable-const          compile with extra/non-standard const
789   --enable-ext-colors     compile for 256-color support
790   --enable-ext-mouse      compile for extended mouse-encoding
791   --enable-no-padding     compile with $NCURSES_NO_PADDING code
792   --enable-signed-char    compile using signed Boolean's in term.h
793   --enable-sigwinch       compile with SIGWINCH handler
794   --enable-tcap-names     compile with user-definable terminal capabilities
795 Development Code:
796   --without-develop       disable development options
797   --enable-hard-tabs      compile with hard-tabs code
798   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
799 Experimental Code:
800   --disable-assumed-color do not assume anything about default-colors
801   --disable-hashmap       compile without hashmap scrolling-optimization
802   --enable-colorfgbg      compile-in experimental $COLORFGBG code
803   --enable-interop        compile-in experimental interop bindings
804   --with-pthread          use POSIX thread library
805   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
806   --enable-weak-symbols   enable weak-symbols for pthreads
807   --enable-reentrant      compile with experimental reentrant code
808   --with-wrap-prefix=XXX  override prefix used for public variables
809   --enable-safe-sprintf   compile with experimental safe-sprintf code
810   --disable-scroll-hints  compile without scroll-hints code
811   --enable-wgetch-events  compile with experimental wgetch-events code
812 Testing/development Options:
813   --disable-echo          do not display "compiling" commands
814   --enable-warnings       build: turn on GCC compiler warnings
815   --enable-string-hacks   work around bogus compiler/loader warnings
816   --enable-assertions     test: turn on generation of assertion code
817   --with-dmalloc          test: use Gray Watson's dmalloc library
818   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
819   --with-valgrind         test: use valgrind
820   --disable-leaks         test: free permanent memory, analyze leaks
821   --enable-expanded       test: generate functions for certain macros
822   --disable-macros        test: use functions rather than macros
823   --with-trace            test: add trace() function to all models of ncurses
824 Ada95 Binding Options:
825   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
826   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
827   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
828   --with-ada-sharedlib=XX build Ada95 shared-library
829
830 Some influential environment variables:
831   CC          C compiler command
832   CFLAGS      C compiler flags
833   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
834               nonstandard directory <lib dir>
835   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
836               headers in a nonstandard directory <include dir>
837   CPP         C preprocessor
838   CXX         C++ compiler command
839   CXXFLAGS    C++ compiler flags
840   CXXCPP      C++ preprocessor
841
842 Use these variables to override the choices made by `configure' or to help
843 it to find libraries and programs with nonstandard names/locations.
844
845 EOF
846 fi
847
848 if test "$ac_init_help" = "recursive"; then
849   # If there are subdirs, report their specific --help.
850   ac_popdir=`pwd`
851   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
852     cd $ac_subdir
853     # A "../" for each directory in /$ac_subdir.
854     ac_dots=`echo $ac_subdir |
855              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
856
857     case $srcdir in
858     .) # No --srcdir option.  We are building in place.
859       ac_sub_srcdir=$srcdir ;;
860     [\\/]* | ?:[\\/]* ) # Absolute path.
861       ac_sub_srcdir=$srcdir/$ac_subdir ;;
862     *) # Relative path.
863       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
864     esac
865
866     # Check for guested configure; otherwise get Cygnus style configure.
867     if test -f $ac_sub_srcdir/configure.gnu; then
868       echo
869       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
870     elif test -f $ac_sub_srcdir/configure; then
871       echo
872       $SHELL $ac_sub_srcdir/configure  --help=recursive
873     elif test -f $ac_sub_srcdir/configure.ac ||
874            test -f $ac_sub_srcdir/configure.in; then
875       echo
876       $ac_configure --help
877     else
878       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
879     fi
880     cd $ac_popdir
881   done
882 fi
883
884 test -n "$ac_init_help" && exit 0
885 if $ac_init_version; then
886   cat <<\EOF
887
888 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
889 Free Software Foundation, Inc.
890 This configure script is free software; the Free Software Foundation
891 gives unlimited permission to copy, distribute and modify it.
892 EOF
893   exit 0
894 fi
895 exec 5>config.log
896 cat >&5 <<EOF
897 This file contains any messages produced by compilers while
898 running configure, to aid debugging if configure makes a mistake.
899
900 It was created by $as_me, which was
901 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
902
903   $ $0 $@
904
905 EOF
906 {
907 cat <<_ASUNAME
908 ## ---------- ##
909 ## Platform.  ##
910 ## ---------- ##
911
912 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
913 uname -m = `(uname -m) 2>/dev/null || echo unknown`
914 uname -r = `(uname -r) 2>/dev/null || echo unknown`
915 uname -s = `(uname -s) 2>/dev/null || echo unknown`
916 uname -v = `(uname -v) 2>/dev/null || echo unknown`
917
918 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
919 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
920
921 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
922 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
923 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
924 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
925 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
926 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
927 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
928
929 PATH = $PATH
930
931 _ASUNAME
932 } >&5
933
934 cat >&5 <<EOF
935 ## ------------ ##
936 ## Core tests.  ##
937 ## ------------ ##
938
939 EOF
940
941 # Keep a trace of the command line.
942 # Strip out --no-create and --no-recursion so they do not pile up.
943 # Also quote any args containing shell meta-characters.
944 ac_configure_args=
945 ac_sep=
946 for ac_arg
947 do
948   case $ac_arg in
949   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
950   | --no-cr | --no-c) ;;
951   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
952   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
953   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
955     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
956     ac_sep=" " ;;
957   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
958      ac_sep=" " ;;
959   esac
960   # Get rid of the leading space.
961 done
962
963 # When interrupted or exit'd, cleanup temporary files, and complete
964 # config.log.  We remove comments because anyway the quotes in there
965 # would cause problems or look ugly.
966 trap 'exit_status=$?
967   # Save into config.log some information that might help in debugging.
968   echo >&5
969   echo "## ----------------- ##" >&5
970   echo "## Cache variables.  ##" >&5
971   echo "## ----------------- ##" >&5
972   echo >&5
973   # The following way of writing the cache mishandles newlines in values,
974 {
975   (set) 2>&1 |
976     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
977     *ac_space=\ *)
978       sed -n \
979         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
980           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
981       ;;
982     *)
983       sed -n \
984         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
985       ;;
986     esac;
987 } >&5
988   sed "/^$/d" confdefs.h >conftest.log
989   if test -s conftest.log; then
990     echo >&5
991     echo "## ------------ ##" >&5
992     echo "## confdefs.h.  ##" >&5
993     echo "## ------------ ##" >&5
994     echo >&5
995     cat conftest.log >&5
996   fi
997   (echo; echo) >&5
998   test "$ac_signal" != 0 &&
999     echo "$as_me: caught signal $ac_signal" >&5
1000   echo "$as_me: exit $exit_status" >&5
1001   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1002     exit $exit_status
1003      ' 0
1004 for ac_signal in 1 2 13 15; do
1005   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1006 done
1007 ac_signal=0
1008
1009 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1010 rm -rf conftest* confdefs.h
1011 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1012 echo >confdefs.h
1013
1014 # Let the site file select an alternate cache file if it wants to.
1015 # Prefer explicitly selected file to automatically selected ones.
1016 if test -z "$CONFIG_SITE"; then
1017   if test "x$prefix" != xNONE; then
1018     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1019   else
1020     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1021   fi
1022 fi
1023 for ac_site_file in $CONFIG_SITE; do
1024   if test -r "$ac_site_file"; then
1025     { echo "$as_me:1025: loading site script $ac_site_file" >&5
1026 echo "$as_me: loading site script $ac_site_file" >&6;}
1027     cat "$ac_site_file" >&5
1028     . "$ac_site_file"
1029   fi
1030 done
1031
1032 if test -r "$cache_file"; then
1033   # Some versions of bash will fail to source /dev/null (special
1034   # files actually), so we avoid doing that.
1035   if test -f "$cache_file"; then
1036     { echo "$as_me:1036: loading cache $cache_file" >&5
1037 echo "$as_me: loading cache $cache_file" >&6;}
1038     case $cache_file in
1039       [\\/]* | ?:[\\/]* ) . $cache_file;;
1040       *)                      . ./$cache_file;;
1041     esac
1042   fi
1043 else
1044   { echo "$as_me:1044: creating cache $cache_file" >&5
1045 echo "$as_me: creating cache $cache_file" >&6;}
1046   >$cache_file
1047 fi
1048
1049 # Check that the precious variables saved in the cache have kept the same
1050 # value.
1051 ac_cache_corrupted=false
1052 for ac_var in `(set) 2>&1 |
1053                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1054   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1055   eval ac_new_set=\$ac_env_${ac_var}_set
1056   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1057   eval ac_new_val="\$ac_env_${ac_var}_value"
1058   case $ac_old_set,$ac_new_set in
1059     set,)
1060       { echo "$as_me:1060: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1061 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1062       ac_cache_corrupted=: ;;
1063     ,set)
1064       { echo "$as_me:1064: error: \`$ac_var' was not set in the previous run" >&5
1065 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1066       ac_cache_corrupted=: ;;
1067     ,);;
1068     *)
1069       if test "x$ac_old_val" != "x$ac_new_val"; then
1070         { echo "$as_me:1070: error: \`$ac_var' has changed since the previous run:" >&5
1071 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1072         { echo "$as_me:1072:   former value:  $ac_old_val" >&5
1073 echo "$as_me:   former value:  $ac_old_val" >&2;}
1074         { echo "$as_me:1074:   current value: $ac_new_val" >&5
1075 echo "$as_me:   current value: $ac_new_val" >&2;}
1076         ac_cache_corrupted=:
1077       fi;;
1078   esac
1079   # Pass precious variables to config.status.  It doesn't matter if
1080   # we pass some twice (in addition to the command line arguments).
1081   if test "$ac_new_set" = set; then
1082     case $ac_new_val in
1083     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1084       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1085       ac_configure_args="$ac_configure_args '$ac_arg'"
1086       ;;
1087     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1088        ;;
1089     esac
1090   fi
1091 done
1092 if $ac_cache_corrupted; then
1093   { echo "$as_me:1093: error: changes in the environment can compromise the build" >&5
1094 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1095   { { echo "$as_me:1095: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1096 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1097    { (exit 1); exit 1; }; }
1098 fi
1099
1100 ac_ext=c
1101 ac_cpp='$CPP $CPPFLAGS'
1102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1105 ac_main_return=return
1106
1107 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1108   *c*,-n*) ECHO_N= ECHO_C='
1109 ' ECHO_T='      ' ;;
1110   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1111   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1112 esac
1113 echo "#! $SHELL" >conftest.sh
1114 echo  "exit 0"   >>conftest.sh
1115 chmod +x conftest.sh
1116 if { (echo "$as_me:1116: PATH=\".;.\"; conftest.sh") >&5
1117   (PATH=".;."; conftest.sh) 2>&5
1118   ac_status=$?
1119   echo "$as_me:1119: \$? = $ac_status" >&5
1120   (exit $ac_status); }; then
1121   ac_path_separator=';'
1122 else
1123   ac_path_separator=:
1124 fi
1125 PATH_SEPARATOR="$ac_path_separator"
1126 rm -f conftest.sh
1127
1128 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1129
1130 top_builddir=`pwd`
1131
1132 echo "$as_me:1132: checking for egrep" >&5
1133 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1134 if test "${ac_cv_prog_egrep+set}" = set; then
1135   echo $ECHO_N "(cached) $ECHO_C" >&6
1136 else
1137   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1138     then ac_cv_prog_egrep='grep -E'
1139     else ac_cv_prog_egrep='egrep'
1140     fi
1141 fi
1142 echo "$as_me:1142: result: $ac_cv_prog_egrep" >&5
1143 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1144  EGREP=$ac_cv_prog_egrep
1145
1146 test -z "$EGREP" && { { echo "$as_me:1146: error: No egrep program found" >&5
1147 echo "$as_me: error: No egrep program found" >&2;}
1148    { (exit 1); exit 1; }; }
1149
1150 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1151 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1153 cf_cv_abi_version=${NCURSES_MAJOR}
1154 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1155 cf_cv_timestamp=`date`
1156 echo "$as_me:1156: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1157 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1158
1159 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1160
1161 # Check whether --with-rel-version or --without-rel-version was given.
1162 if test "${with_rel_version+set}" = set; then
1163   withval="$with_rel_version"
1164   { echo "$as_me:1164: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1165 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1166  cf_cv_rel_version=$withval
1167 fi;
1168
1169  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1170  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1171
1172 if test -n "$NCURSES_MAJOR" ; then
1173   case $NCURSES_MAJOR in #(vi
1174   [0-9]*) #(vi
1175         ;;
1176   *)
1177         { { echo "$as_me:1177: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1178 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1179    { (exit 1); exit 1; }; }
1180         ;;
1181   esac
1182 else
1183   { { echo "$as_me:1183: error: Release major-version value is empty" >&5
1184 echo "$as_me: error: Release major-version value is empty" >&2;}
1185    { (exit 1); exit 1; }; }
1186 fi
1187
1188 if test -n "$NCURSES_MINOR" ; then
1189   case $NCURSES_MINOR in #(vi
1190   [0-9]*) #(vi
1191         ;;
1192   *)
1193         { { echo "$as_me:1193: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1194 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1195    { (exit 1); exit 1; }; }
1196         ;;
1197   esac
1198 else
1199   { { echo "$as_me:1199: error: Release minor-version value is empty" >&5
1200 echo "$as_me: error: Release minor-version value is empty" >&2;}
1201    { (exit 1); exit 1; }; }
1202 fi
1203
1204 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1205
1206 # Check whether --with-abi-version or --without-abi-version was given.
1207 if test "${with_abi_version+set}" = set; then
1208   withval="$with_abi_version"
1209   { echo "$as_me:1209: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1210 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1211  cf_cv_abi_version=$withval
1212 fi;
1213
1214 if test -n "$cf_cv_abi_version" ; then
1215   case $cf_cv_abi_version in #(vi
1216   [0-9]*) #(vi
1217         ;;
1218   *)
1219         { { echo "$as_me:1219: error: ABI version is not a number: $cf_cv_abi_version" >&5
1220 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1221    { (exit 1); exit 1; }; }
1222         ;;
1223   esac
1224 else
1225   { { echo "$as_me:1225: error: ABI version value is empty" >&5
1226 echo "$as_me: error: ABI version value is empty" >&2;}
1227    { (exit 1); exit 1; }; }
1228 fi
1229
1230 ac_aux_dir=
1231 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1232   if test -f $ac_dir/install-sh; then
1233     ac_aux_dir=$ac_dir
1234     ac_install_sh="$ac_aux_dir/install-sh -c"
1235     break
1236   elif test -f $ac_dir/install.sh; then
1237     ac_aux_dir=$ac_dir
1238     ac_install_sh="$ac_aux_dir/install.sh -c"
1239     break
1240   elif test -f $ac_dir/shtool; then
1241     ac_aux_dir=$ac_dir
1242     ac_install_sh="$ac_aux_dir/shtool install -c"
1243     break
1244   fi
1245 done
1246 if test -z "$ac_aux_dir"; then
1247   { { echo "$as_me:1247: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1248 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1249    { (exit 1); exit 1; }; }
1250 fi
1251 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1252 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1253 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1254
1255 # Make sure we can run config.sub.
1256 $ac_config_sub sun4 >/dev/null 2>&1 ||
1257   { { echo "$as_me:1257: error: cannot run $ac_config_sub" >&5
1258 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1259    { (exit 1); exit 1; }; }
1260
1261 echo "$as_me:1261: checking build system type" >&5
1262 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1263 if test "${ac_cv_build+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   ac_cv_build_alias=$build_alias
1267 test -z "$ac_cv_build_alias" &&
1268   ac_cv_build_alias=`$ac_config_guess`
1269 test -z "$ac_cv_build_alias" &&
1270   { { echo "$as_me:1270: error: cannot guess build type; you must specify one" >&5
1271 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1272    { (exit 1); exit 1; }; }
1273 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1274   { { echo "$as_me:1274: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1275 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1276    { (exit 1); exit 1; }; }
1277
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_build" >&5
1280 echo "${ECHO_T}$ac_cv_build" >&6
1281 build=$ac_cv_build
1282 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1283 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1284 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1285
1286 echo "$as_me:1286: checking host system type" >&5
1287 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1288 if test "${ac_cv_host+set}" = set; then
1289   echo $ECHO_N "(cached) $ECHO_C" >&6
1290 else
1291   ac_cv_host_alias=$host_alias
1292 test -z "$ac_cv_host_alias" &&
1293   ac_cv_host_alias=$ac_cv_build_alias
1294 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1295   { { echo "$as_me:1295: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1296 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1297    { (exit 1); exit 1; }; }
1298
1299 fi
1300 echo "$as_me:1300: result: $ac_cv_host" >&5
1301 echo "${ECHO_T}$ac_cv_host" >&6
1302 host=$ac_cv_host
1303 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1304 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1305 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1306
1307 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1308         echo "$as_me:1308: checking target system type" >&5
1309 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1310 if test "${ac_cv_target+set}" = set; then
1311   echo $ECHO_N "(cached) $ECHO_C" >&6
1312 else
1313   ac_cv_target_alias=$target_alias
1314 test "x$ac_cv_target_alias" = "x" &&
1315   ac_cv_target_alias=$ac_cv_host_alias
1316 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1317   { { echo "$as_me:1317: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1318 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1319    { (exit 1); exit 1; }; }
1320
1321 fi
1322 echo "$as_me:1322: result: $ac_cv_target" >&5
1323 echo "${ECHO_T}$ac_cv_target" >&6
1324 target=$ac_cv_target
1325 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1326 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1327 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1328
1329 # The aliases save the names the user supplied, while $host etc.
1330 # will get canonicalized.
1331 test -n "$target_alias" &&
1332   test "$program_prefix$program_suffix$program_transform_name" = \
1333     NONENONEs,x,x, &&
1334   program_prefix=${target_alias}-
1335         system_name="$host_os"
1336 else
1337         system_name="`(uname -s -r) 2>/dev/null`"
1338         if test -z "$system_name" ; then
1339                 system_name="`(hostname) 2>/dev/null`"
1340         fi
1341 fi
1342 test -n "$system_name" &&
1343 cat >>confdefs.h <<EOF
1344 #define SYSTEM_NAME "$system_name"
1345 EOF
1346
1347 if test "${cf_cv_system_name+set}" = set; then
1348   echo $ECHO_N "(cached) $ECHO_C" >&6
1349 else
1350   cf_cv_system_name="$system_name"
1351 fi
1352
1353 test -z "$system_name" && system_name="$cf_cv_system_name"
1354 test -n "$cf_cv_system_name" && echo "$as_me:1354: result: Configuring for $cf_cv_system_name" >&5
1355 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1356
1357 if test ".$system_name" != ".$cf_cv_system_name" ; then
1358         echo "$as_me:1358: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1359 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1360         { { echo "$as_me:1360: error: \"Please remove config.cache and try again.\"" >&5
1361 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1362    { (exit 1); exit 1; }; }
1363 fi
1364
1365 # Check whether --with-system-type or --without-system-type was given.
1366 if test "${with_system_type+set}" = set; then
1367   withval="$with_system_type"
1368   { echo "$as_me:1368: WARNING: overriding system type to $withval" >&5
1369 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1370         cf_cv_system_name=$withval
1371         host_os=$withval
1372
1373 fi;
1374
1375 ###     Save the given $CFLAGS to allow user-override.
1376 cf_user_CFLAGS="$CFLAGS"
1377
1378 ###     Default install-location
1379
1380 echo "$as_me:1380: checking for prefix" >&5
1381 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1382 if test "x$prefix" = "xNONE" ; then
1383         case "$cf_cv_system_name" in
1384                 # non-vendor systems don't have a conflict
1385         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu|mingw*)
1386                 prefix=/usr
1387                 ;;
1388         *)      prefix=$ac_default_prefix
1389                 ;;
1390         esac
1391 fi
1392 echo "$as_me:1392: result: $prefix" >&5
1393 echo "${ECHO_T}$prefix" >&6
1394
1395 if test "x$prefix" = "xNONE" ; then
1396 echo "$as_me:1396: checking for default include-directory" >&5
1397 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1398 test -n "$verbose" && echo 1>&6
1399 for cf_symbol in \
1400         $includedir \
1401         $includedir/ncurses \
1402         $prefix/include \
1403         $prefix/include/ncurses \
1404         /usr/local/include \
1405         /usr/local/include/ncurses \
1406         /usr/include \
1407         /usr/include/ncurses
1408 do
1409         cf_dir=`eval echo $cf_symbol`
1410         if test -f $cf_dir/curses.h ; then
1411         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1412                 includedir="$cf_symbol"
1413                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1414                 break
1415         fi
1416         fi
1417         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1418 done
1419 echo "$as_me:1419: result: $includedir" >&5
1420 echo "${ECHO_T}$includedir" >&6
1421 fi
1422
1423 ###     Checks for programs.
1424
1425 # Check whether --with-ada or --without-ada was given.
1426 if test "${with_ada+set}" = set; then
1427   withval="$with_ada"
1428   cf_with_ada=$withval
1429 else
1430   cf_with_ada=yes
1431 fi;
1432 if test "x$cf_with_ada" = xyes
1433 then
1434         cf_PROG_CC="gnatgcc gcc cc"
1435 else
1436         cf_PROG_CC="gcc cc"
1437 fi
1438
1439 ac_ext=c
1440 ac_cpp='$CPP $CPPFLAGS'
1441 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1442 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1444 ac_main_return=return
1445 if test -n "$ac_tool_prefix"; then
1446   for ac_prog in $cf_PROG_CC
1447   do
1448     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1449 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$CC"; then
1456   ac_cv_prog_CC="$CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 CC=$ac_cv_prog_CC
1472 if test -n "$CC"; then
1473   echo "$as_me:1473: result: $CC" >&5
1474 echo "${ECHO_T}$CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480     test -n "$CC" && break
1481   done
1482 fi
1483 if test -z "$CC"; then
1484   ac_ct_CC=$CC
1485   for ac_prog in $cf_PROG_CC
1486 do
1487   # Extract the first word of "$ac_prog", so it can be a program name with args.
1488 set dummy $ac_prog; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$ac_ct_CC"; then
1495   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_ac_ct_CC="$ac_prog"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1511 if test -n "$ac_ct_CC"; then
1512   echo "$as_me:1512: result: $ac_ct_CC" >&5
1513 echo "${ECHO_T}$ac_ct_CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519   test -n "$ac_ct_CC" && break
1520 done
1521
1522   CC=$ac_ct_CC
1523 fi
1524
1525 test -z "$CC" && { { echo "$as_me:1525: error: no acceptable cc found in \$PATH" >&5
1526 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1527    { (exit 1); exit 1; }; }
1528
1529 # Provide some information about the compiler.
1530 echo "$as_me:1530:" \
1531      "checking for C compiler version" >&5
1532 ac_compiler=`set X $ac_compile; echo $2`
1533 { (eval echo "$as_me:1533: \"$ac_compiler --version </dev/null >&5\"") >&5
1534   (eval $ac_compiler --version </dev/null >&5) 2>&5
1535   ac_status=$?
1536   echo "$as_me:1536: \$? = $ac_status" >&5
1537   (exit $ac_status); }
1538 { (eval echo "$as_me:1538: \"$ac_compiler -v </dev/null >&5\"") >&5
1539   (eval $ac_compiler -v </dev/null >&5) 2>&5
1540   ac_status=$?
1541   echo "$as_me:1541: \$? = $ac_status" >&5
1542   (exit $ac_status); }
1543 { (eval echo "$as_me:1543: \"$ac_compiler -V </dev/null >&5\"") >&5
1544   (eval $ac_compiler -V </dev/null >&5) 2>&5
1545   ac_status=$?
1546   echo "$as_me:1546: \$? = $ac_status" >&5
1547   (exit $ac_status); }
1548
1549 cat >conftest.$ac_ext <<_ACEOF
1550 #line 1550 "configure"
1551 #include "confdefs.h"
1552
1553 int
1554 main ()
1555 {
1556
1557   ;
1558   return 0;
1559 }
1560 _ACEOF
1561 ac_clean_files_save=$ac_clean_files
1562 ac_clean_files="$ac_clean_files a.out a.exe"
1563 # Try to create an executable without -o first, disregard a.out.
1564 # It will help us diagnose broken compilers, and finding out an intuition
1565 # of exeext.
1566 echo "$as_me:1566: checking for C compiler default output" >&5
1567 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1568 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1569 if { (eval echo "$as_me:1569: \"$ac_link_default\"") >&5
1570   (eval $ac_link_default) 2>&5
1571   ac_status=$?
1572   echo "$as_me:1572: \$? = $ac_status" >&5
1573   (exit $ac_status); }; then
1574   # Find the output, starting from the most likely.  This scheme is
1575 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1576 # resort.
1577 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1578                 ls a.out conftest 2>/dev/null;
1579                 ls a.* conftest.* 2>/dev/null`; do
1580   case $ac_file in
1581     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1582     a.out ) # We found the default executable, but exeext='' is most
1583             # certainly right.
1584             break;;
1585     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1586           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1587           export ac_cv_exeext
1588           break;;
1589     * ) break;;
1590   esac
1591 done
1592 else
1593   echo "$as_me: failed program was:" >&5
1594 cat conftest.$ac_ext >&5
1595 { { echo "$as_me:1595: error: C compiler cannot create executables" >&5
1596 echo "$as_me: error: C compiler cannot create executables" >&2;}
1597    { (exit 77); exit 77; }; }
1598 fi
1599
1600 ac_exeext=$ac_cv_exeext
1601 echo "$as_me:1601: result: $ac_file" >&5
1602 echo "${ECHO_T}$ac_file" >&6
1603
1604 # Check the compiler produces executables we can run.  If not, either
1605 # the compiler is broken, or we cross compile.
1606 echo "$as_me:1606: checking whether the C compiler works" >&5
1607 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1608 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1609 # If not cross compiling, check that we can run a simple program.
1610 if test "$cross_compiling" != yes; then
1611   if { ac_try='./$ac_file'
1612   { (eval echo "$as_me:1612: \"$ac_try\"") >&5
1613   (eval $ac_try) 2>&5
1614   ac_status=$?
1615   echo "$as_me:1615: \$? = $ac_status" >&5
1616   (exit $ac_status); }; }; then
1617     cross_compiling=no
1618   else
1619     if test "$cross_compiling" = maybe; then
1620         cross_compiling=yes
1621     else
1622         { { echo "$as_me:1622: error: cannot run C compiled programs.
1623 If you meant to cross compile, use \`--host'." >&5
1624 echo "$as_me: error: cannot run C compiled programs.
1625 If you meant to cross compile, use \`--host'." >&2;}
1626    { (exit 1); exit 1; }; }
1627     fi
1628   fi
1629 fi
1630 echo "$as_me:1630: result: yes" >&5
1631 echo "${ECHO_T}yes" >&6
1632
1633 rm -f a.out a.exe conftest$ac_cv_exeext
1634 ac_clean_files=$ac_clean_files_save
1635 # Check the compiler produces executables we can run.  If not, either
1636 # the compiler is broken, or we cross compile.
1637 echo "$as_me:1637: checking whether we are cross compiling" >&5
1638 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1639 echo "$as_me:1639: result: $cross_compiling" >&5
1640 echo "${ECHO_T}$cross_compiling" >&6
1641
1642 echo "$as_me:1642: checking for executable suffix" >&5
1643 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1644 if { (eval echo "$as_me:1644: \"$ac_link\"") >&5
1645   (eval $ac_link) 2>&5
1646   ac_status=$?
1647   echo "$as_me:1647: \$? = $ac_status" >&5
1648   (exit $ac_status); }; then
1649   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1650 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1651 # work properly (i.e., refer to `conftest.exe'), while it won't with
1652 # `rm'.
1653 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1654   case $ac_file in
1655     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1656     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1657           export ac_cv_exeext
1658           break;;
1659     * ) break;;
1660   esac
1661 done
1662 else
1663   { { echo "$as_me:1663: error: cannot compute EXEEXT: cannot compile and link" >&5
1664 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1665    { (exit 1); exit 1; }; }
1666 fi
1667
1668 rm -f conftest$ac_cv_exeext
1669 echo "$as_me:1669: result: $ac_cv_exeext" >&5
1670 echo "${ECHO_T}$ac_cv_exeext" >&6
1671
1672 rm -f conftest.$ac_ext
1673 EXEEXT=$ac_cv_exeext
1674 ac_exeext=$EXEEXT
1675 echo "$as_me:1675: checking for object suffix" >&5
1676 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1677 if test "${ac_cv_objext+set}" = set; then
1678   echo $ECHO_N "(cached) $ECHO_C" >&6
1679 else
1680   cat >conftest.$ac_ext <<_ACEOF
1681 #line 1681 "configure"
1682 #include "confdefs.h"
1683
1684 int
1685 main ()
1686 {
1687
1688   ;
1689   return 0;
1690 }
1691 _ACEOF
1692 rm -f conftest.o conftest.obj
1693 if { (eval echo "$as_me:1693: \"$ac_compile\"") >&5
1694   (eval $ac_compile) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; then
1698   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1699   case $ac_file in
1700     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1701     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1702        break;;
1703   esac
1704 done
1705 else
1706   echo "$as_me: failed program was:" >&5
1707 cat conftest.$ac_ext >&5
1708 { { echo "$as_me:1708: error: cannot compute OBJEXT: cannot compile" >&5
1709 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1710    { (exit 1); exit 1; }; }
1711 fi
1712
1713 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1714 fi
1715 echo "$as_me:1715: result: $ac_cv_objext" >&5
1716 echo "${ECHO_T}$ac_cv_objext" >&6
1717 OBJEXT=$ac_cv_objext
1718 ac_objext=$OBJEXT
1719 echo "$as_me:1719: checking whether we are using the GNU C compiler" >&5
1720 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1721 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1722   echo $ECHO_N "(cached) $ECHO_C" >&6
1723 else
1724   cat >conftest.$ac_ext <<_ACEOF
1725 #line 1725 "configure"
1726 #include "confdefs.h"
1727
1728 int
1729 main ()
1730 {
1731 #ifndef __GNUC__
1732        choke me
1733 #endif
1734
1735   ;
1736   return 0;
1737 }
1738 _ACEOF
1739 rm -f conftest.$ac_objext
1740 if { (eval echo "$as_me:1740: \"$ac_compile\"") >&5
1741   (eval $ac_compile) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); } &&
1745          { ac_try='test -s conftest.$ac_objext'
1746   { (eval echo "$as_me:1746: \"$ac_try\"") >&5
1747   (eval $ac_try) 2>&5
1748   ac_status=$?
1749   echo "$as_me:1749: \$? = $ac_status" >&5
1750   (exit $ac_status); }; }; then
1751   ac_compiler_gnu=yes
1752 else
1753   echo "$as_me: failed program was:" >&5
1754 cat conftest.$ac_ext >&5
1755 ac_compiler_gnu=no
1756 fi
1757 rm -f conftest.$ac_objext conftest.$ac_ext
1758 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1759
1760 fi
1761 echo "$as_me:1761: result: $ac_cv_c_compiler_gnu" >&5
1762 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1763 GCC=`test $ac_compiler_gnu = yes && echo yes`
1764 ac_test_CFLAGS=${CFLAGS+set}
1765 ac_save_CFLAGS=$CFLAGS
1766 CFLAGS="-g"
1767 echo "$as_me:1767: checking whether $CC accepts -g" >&5
1768 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1769 if test "${ac_cv_prog_cc_g+set}" = set; then
1770   echo $ECHO_N "(cached) $ECHO_C" >&6
1771 else
1772   cat >conftest.$ac_ext <<_ACEOF
1773 #line 1773 "configure"
1774 #include "confdefs.h"
1775
1776 int
1777 main ()
1778 {
1779
1780   ;
1781   return 0;
1782 }
1783 _ACEOF
1784 rm -f conftest.$ac_objext
1785 if { (eval echo "$as_me:1785: \"$ac_compile\"") >&5
1786   (eval $ac_compile) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); } &&
1790          { ac_try='test -s conftest.$ac_objext'
1791   { (eval echo "$as_me:1791: \"$ac_try\"") >&5
1792   (eval $ac_try) 2>&5
1793   ac_status=$?
1794   echo "$as_me:1794: \$? = $ac_status" >&5
1795   (exit $ac_status); }; }; then
1796   ac_cv_prog_cc_g=yes
1797 else
1798   echo "$as_me: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1800 ac_cv_prog_cc_g=no
1801 fi
1802 rm -f conftest.$ac_objext conftest.$ac_ext
1803 fi
1804 echo "$as_me:1804: result: $ac_cv_prog_cc_g" >&5
1805 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1806 if test "$ac_test_CFLAGS" = set; then
1807   CFLAGS=$ac_save_CFLAGS
1808 elif test $ac_cv_prog_cc_g = yes; then
1809   if test "$GCC" = yes; then
1810     CFLAGS="-g -O2"
1811   else
1812     CFLAGS="-g"
1813   fi
1814 else
1815   if test "$GCC" = yes; then
1816     CFLAGS="-O2"
1817   else
1818     CFLAGS=
1819   fi
1820 fi
1821 # Some people use a C++ compiler to compile C.  Since we use `exit',
1822 # in C++ we need to declare it.  In case someone uses the same compiler
1823 # for both compiling C and C++ we need to have the C++ compiler decide
1824 # the declaration of exit, since it's the most demanding environment.
1825 cat >conftest.$ac_ext <<_ACEOF
1826 #ifndef __cplusplus
1827   choke me
1828 #endif
1829 _ACEOF
1830 rm -f conftest.$ac_objext
1831 if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
1832   (eval $ac_compile) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -s conftest.$ac_objext'
1837   { (eval echo "$as_me:1837: \"$ac_try\"") >&5
1838   (eval $ac_try) 2>&5
1839   ac_status=$?
1840   echo "$as_me:1840: \$? = $ac_status" >&5
1841   (exit $ac_status); }; }; then
1842   for ac_declaration in \
1843    ''\
1844    '#include <stdlib.h>' \
1845    'extern "C" void std::exit (int) throw (); using std::exit;' \
1846    'extern "C" void std::exit (int); using std::exit;' \
1847    'extern "C" void exit (int) throw ();' \
1848    'extern "C" void exit (int);' \
1849    'void exit (int);'
1850 do
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854 #include <stdlib.h>
1855 $ac_declaration
1856 int
1857 main ()
1858 {
1859 exit (42);
1860   ;
1861   return 0;
1862 }
1863 _ACEOF
1864 rm -f conftest.$ac_objext
1865 if { (eval echo "$as_me:1865: \"$ac_compile\"") >&5
1866   (eval $ac_compile) 2>&5
1867   ac_status=$?
1868   echo "$as_me:1868: \$? = $ac_status" >&5
1869   (exit $ac_status); } &&
1870          { ac_try='test -s conftest.$ac_objext'
1871   { (eval echo "$as_me:1871: \"$ac_try\"") >&5
1872   (eval $ac_try) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit $ac_status); }; }; then
1876   :
1877 else
1878   echo "$as_me: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1880 continue
1881 fi
1882 rm -f conftest.$ac_objext conftest.$ac_ext
1883   cat >conftest.$ac_ext <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1886 $ac_declaration
1887 int
1888 main ()
1889 {
1890 exit (42);
1891   ;
1892   return 0;
1893 }
1894 _ACEOF
1895 rm -f conftest.$ac_objext
1896 if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
1897   (eval $ac_compile) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); } &&
1901          { ac_try='test -s conftest.$ac_objext'
1902   { (eval echo "$as_me:1902: \"$ac_try\"") >&5
1903   (eval $ac_try) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); }; }; then
1907   break
1908 else
1909   echo "$as_me: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 done
1914 rm -rf conftest*
1915 if test -n "$ac_declaration"; then
1916   echo '#ifdef __cplusplus' >>confdefs.h
1917   echo $ac_declaration      >>confdefs.h
1918   echo '#endif'             >>confdefs.h
1919 fi
1920
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1924 fi
1925 rm -f conftest.$ac_objext conftest.$ac_ext
1926 ac_ext=c
1927 ac_cpp='$CPP $CPPFLAGS'
1928 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1929 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1931 ac_main_return=return
1932
1933 GCC_VERSION=none
1934 if test "$GCC" = yes ; then
1935         echo "$as_me:1935: checking version of $CC" >&5
1936 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1937         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1938         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1939         echo "$as_me:1939: result: $GCC_VERSION" >&5
1940 echo "${ECHO_T}$GCC_VERSION" >&6
1941 fi
1942
1943 echo "$as_me:1943: checking for $CC option to accept ANSI C" >&5
1944 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1945 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1946   echo $ECHO_N "(cached) $ECHO_C" >&6
1947 else
1948   ac_cv_prog_cc_stdc=no
1949 ac_save_CC=$CC
1950 cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953 #include <stdarg.h>
1954 #include <stdio.h>
1955 #include <sys/types.h>
1956 #include <sys/stat.h>
1957 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1958 struct buf { int x; };
1959 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1960 static char *e (p, i)
1961      char **p;
1962      int i;
1963 {
1964   return p[i];
1965 }
1966 static char *f (char * (*g) (char **, int), char **p, ...)
1967 {
1968   char *s;
1969   va_list v;
1970   va_start (v,p);
1971   s = g (p, va_arg (v,int));
1972   va_end (v);
1973   return s;
1974 }
1975 int test (int i, double x);
1976 struct s1 {int (*f) (int a);};
1977 struct s2 {int (*f) (double a);};
1978 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1979 int argc;
1980 char **argv;
1981 int
1982 main ()
1983 {
1984 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1985   ;
1986   return 0;
1987 }
1988 _ACEOF
1989 # Don't try gcc -ansi; that turns off useful extensions and
1990 # breaks some systems' header files.
1991 # AIX                   -qlanglvl=ansi
1992 # Ultrix and OSF/1      -std1
1993 # HP-UX 10.20 and later -Ae
1994 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1995 # SVR4                  -Xc -D__EXTENSIONS__
1996 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1997 do
1998   CC="$ac_save_CC $ac_arg"
1999   rm -f conftest.$ac_objext
2000 if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5
2001   (eval $ac_compile) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit $ac_status); } &&
2005          { ac_try='test -s conftest.$ac_objext'
2006   { (eval echo "$as_me:2006: \"$ac_try\"") >&5
2007   (eval $ac_try) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); }; }; then
2011   ac_cv_prog_cc_stdc=$ac_arg
2012 break
2013 else
2014   echo "$as_me: failed program was:" >&5
2015 cat conftest.$ac_ext >&5
2016 fi
2017 rm -f conftest.$ac_objext
2018 done
2019 rm -f conftest.$ac_ext conftest.$ac_objext
2020 CC=$ac_save_CC
2021
2022 fi
2023
2024 case "x$ac_cv_prog_cc_stdc" in
2025   x|xno)
2026     echo "$as_me:2026: result: none needed" >&5
2027 echo "${ECHO_T}none needed" >&6 ;;
2028   *)
2029     echo "$as_me:2029: result: $ac_cv_prog_cc_stdc" >&5
2030 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2031     CC="$CC $ac_cv_prog_cc_stdc" ;;
2032 esac
2033
2034 # This should have been defined by AC_PROG_CC
2035 : ${CC:=cc}
2036
2037 echo "$as_me:2037: checking \$CC variable" >&5
2038 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2039 case "$CC" in #(vi
2040 *[\ \   ]-[IUD]*)
2041         echo "$as_me:2041: result: broken" >&5
2042 echo "${ECHO_T}broken" >&6
2043         { echo "$as_me:2043: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2044 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2045         # humor him...
2046         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2047         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2048
2049 cf_fix_cppflags=no
2050 cf_new_cflags=
2051 cf_new_cppflags=
2052 cf_new_extra_cppflags=
2053
2054 for cf_add_cflags in $cf_flags
2055 do
2056 case $cf_fix_cppflags in
2057 no)
2058         case $cf_add_cflags in #(vi
2059         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2060                 case $cf_add_cflags in
2061                 -D*)
2062                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2063
2064                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2065                                 && test -z "${cf_tst_cflags}" \
2066                                 && cf_fix_cppflags=yes
2067
2068                         if test $cf_fix_cppflags = yes ; then
2069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2070                                 continue
2071                         elif test "${cf_tst_cflags}" = "\"'" ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         fi
2075                         ;;
2076                 esac
2077                 case "$CPPFLAGS" in
2078                 *$cf_add_cflags) #(vi
2079                         ;;
2080                 *) #(vi
2081                         case $cf_add_cflags in #(vi
2082                         -D*)
2083                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2084
2085 CPPFLAGS=`echo "$CPPFLAGS" | \
2086         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2087                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2088
2089                                 ;;
2090                         esac
2091                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2092                         ;;
2093                 esac
2094                 ;;
2095         *)
2096                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2097                 ;;
2098         esac
2099         ;;
2100 yes)
2101         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2102
2103         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2104
2105         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2106                 && test -z "${cf_tst_cflags}" \
2107                 && cf_fix_cppflags=no
2108         ;;
2109 esac
2110 done
2111
2112 if test -n "$cf_new_cflags" ; then
2113
2114         CFLAGS="$CFLAGS $cf_new_cflags"
2115 fi
2116
2117 if test -n "$cf_new_cppflags" ; then
2118
2119         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2120 fi
2121
2122 if test -n "$cf_new_extra_cppflags" ; then
2123
2124         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2125 fi
2126
2127         ;;
2128 *)
2129         echo "$as_me:2129: result: ok" >&5
2130 echo "${ECHO_T}ok" >&6
2131         ;;
2132 esac
2133
2134 ac_ext=c
2135 ac_cpp='$CPP $CPPFLAGS'
2136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2139 ac_main_return=return
2140 echo "$as_me:2140: checking how to run the C preprocessor" >&5
2141 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2142 # On Suns, sometimes $CPP names a directory.
2143 if test -n "$CPP" && test -d "$CPP"; then
2144   CPP=
2145 fi
2146 if test -z "$CPP"; then
2147   if test "${ac_cv_prog_CPP+set}" = set; then
2148   echo $ECHO_N "(cached) $ECHO_C" >&6
2149 else
2150       # Double quotes because CPP needs to be expanded
2151     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2152     do
2153       ac_preproc_ok=false
2154 for ac_c_preproc_warn_flag in '' yes
2155 do
2156   # Use a header file that comes with gcc, so configuring glibc
2157   # with a fresh cross-compiler works.
2158   # On the NeXT, cc -E runs the code through the compiler's parser,
2159   # not just through cpp. "Syntax error" is here to catch this case.
2160   cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2163 #include <assert.h>
2164                      Syntax error
2165 _ACEOF
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2168   ac_status=$?
2169   egrep -v '^ *\+' conftest.er1 >conftest.err
2170   rm -f conftest.er1
2171   cat conftest.err >&5
2172   echo "$as_me:2172: \$? = $ac_status" >&5
2173   (exit $ac_status); } >/dev/null; then
2174   if test -s conftest.err; then
2175     ac_cpp_err=$ac_c_preproc_warn_flag
2176   else
2177     ac_cpp_err=
2178   fi
2179 else
2180   ac_cpp_err=yes
2181 fi
2182 if test -z "$ac_cpp_err"; then
2183   :
2184 else
2185   echo "$as_me: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   # Broken: fails on valid input.
2188 continue
2189 fi
2190 rm -f conftest.err conftest.$ac_ext
2191
2192   # OK, works on sane cases.  Now check whether non-existent headers
2193   # can be detected and how.
2194   cat >conftest.$ac_ext <<_ACEOF
2195 #line 2195 "configure"
2196 #include "confdefs.h"
2197 #include <ac_nonexistent.h>
2198 _ACEOF
2199 if { (eval echo "$as_me:2199: \"$ac_cpp conftest.$ac_ext\"") >&5
2200   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2201   ac_status=$?
2202   egrep -v '^ *\+' conftest.er1 >conftest.err
2203   rm -f conftest.er1
2204   cat conftest.err >&5
2205   echo "$as_me:2205: \$? = $ac_status" >&5
2206   (exit $ac_status); } >/dev/null; then
2207   if test -s conftest.err; then
2208     ac_cpp_err=$ac_c_preproc_warn_flag
2209   else
2210     ac_cpp_err=
2211   fi
2212 else
2213   ac_cpp_err=yes
2214 fi
2215 if test -z "$ac_cpp_err"; then
2216   # Broken: success on invalid input.
2217 continue
2218 else
2219   echo "$as_me: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   # Passes both tests.
2222 ac_preproc_ok=:
2223 break
2224 fi
2225 rm -f conftest.err conftest.$ac_ext
2226
2227 done
2228 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2229 rm -f conftest.err conftest.$ac_ext
2230 if $ac_preproc_ok; then
2231   break
2232 fi
2233
2234     done
2235     ac_cv_prog_CPP=$CPP
2236
2237 fi
2238   CPP=$ac_cv_prog_CPP
2239 else
2240   ac_cv_prog_CPP=$CPP
2241 fi
2242 echo "$as_me:2242: result: $CPP" >&5
2243 echo "${ECHO_T}$CPP" >&6
2244 ac_preproc_ok=false
2245 for ac_c_preproc_warn_flag in '' yes
2246 do
2247   # Use a header file that comes with gcc, so configuring glibc
2248   # with a fresh cross-compiler works.
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp. "Syntax error" is here to catch this case.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255                      Syntax error
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   :
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Broken: fails on valid input.
2279 continue
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283   # OK, works on sane cases.  Now check whether non-existent headers
2284   # can be detected and how.
2285   cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2289 _ACEOF
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2292   ac_status=$?
2293   egrep -v '^ *\+' conftest.er1 >conftest.err
2294   rm -f conftest.er1
2295   cat conftest.err >&5
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); } >/dev/null; then
2298   if test -s conftest.err; then
2299     ac_cpp_err=$ac_c_preproc_warn_flag
2300   else
2301     ac_cpp_err=
2302   fi
2303 else
2304   ac_cpp_err=yes
2305 fi
2306 if test -z "$ac_cpp_err"; then
2307   # Broken: success on invalid input.
2308 continue
2309 else
2310   echo "$as_me: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   # Passes both tests.
2313 ac_preproc_ok=:
2314 break
2315 fi
2316 rm -f conftest.err conftest.$ac_ext
2317
2318 done
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2322   :
2323 else
2324   { { echo "$as_me:2324: error: C preprocessor \"$CPP\" fails sanity check" >&5
2325 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2326    { (exit 1); exit 1; }; }
2327 fi
2328
2329 ac_ext=c
2330 ac_cpp='$CPP $CPPFLAGS'
2331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334 ac_main_return=return
2335
2336 if test $ac_cv_c_compiler_gnu = yes; then
2337     echo "$as_me:2337: checking whether $CC needs -traditional" >&5
2338 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2339 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2340   echo $ECHO_N "(cached) $ECHO_C" >&6
2341 else
2342     ac_pattern="Autoconf.*'x'"
2343   cat >conftest.$ac_ext <<_ACEOF
2344 #line 2344 "configure"
2345 #include "confdefs.h"
2346 #include <sgtty.h>
2347 int Autoconf = TIOCGETP;
2348 _ACEOF
2349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2350   egrep "$ac_pattern" >/dev/null 2>&1; then
2351   ac_cv_prog_gcc_traditional=yes
2352 else
2353   ac_cv_prog_gcc_traditional=no
2354 fi
2355 rm -rf conftest*
2356
2357   if test $ac_cv_prog_gcc_traditional = no; then
2358     cat >conftest.$ac_ext <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2361 #include <termio.h>
2362 int Autoconf = TCGETA;
2363 _ACEOF
2364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2365   egrep "$ac_pattern" >/dev/null 2>&1; then
2366   ac_cv_prog_gcc_traditional=yes
2367 fi
2368 rm -rf conftest*
2369
2370   fi
2371 fi
2372 echo "$as_me:2372: result: $ac_cv_prog_gcc_traditional" >&5
2373 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2374   if test $ac_cv_prog_gcc_traditional = yes; then
2375     CC="$CC -traditional"
2376   fi
2377 fi
2378
2379 echo "$as_me:2379: checking whether $CC understands -c and -o together" >&5
2380 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2381 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2382   echo $ECHO_N "(cached) $ECHO_C" >&6
2383 else
2384
2385 cat > conftest.$ac_ext <<CF_EOF
2386 #include <stdio.h>
2387 int main()
2388 {
2389         ${cf_cv_main_return:-return}(0);
2390 }
2391 CF_EOF
2392 # We do the test twice because some compilers refuse to overwrite an
2393 # existing .o file with -o, though they will create one.
2394 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2395 if { (eval echo "$as_me:2395: \"$ac_try\"") >&5
2396   (eval $ac_try) 2>&5
2397   ac_status=$?
2398   echo "$as_me:2398: \$? = $ac_status" >&5
2399   (exit $ac_status); } &&
2400   test -f conftest2.$ac_objext && { (eval echo "$as_me:2400: \"$ac_try\"") >&5
2401   (eval $ac_try) 2>&5
2402   ac_status=$?
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); };
2405 then
2406   eval cf_cv_prog_CC_c_o=yes
2407 else
2408   eval cf_cv_prog_CC_c_o=no
2409 fi
2410 rm -rf conftest*
2411
2412 fi
2413 if test $cf_cv_prog_CC_c_o = yes; then
2414   echo "$as_me:2414: result: yes" >&5
2415 echo "${ECHO_T}yes" >&6
2416 else
2417   echo "$as_me:2417: result: no" >&5
2418 echo "${ECHO_T}no" >&6
2419 fi
2420
2421 if test "$cross_compiling" = yes ; then
2422   LDCONFIG=:
2423 else
2424 case "$cf_cv_system_name" in #(vi
2425 dragonfly*|mirbsd*|freebsd*) #(vi
2426   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2427   ;;
2428 *) LDPATH=$PATH:/sbin:/usr/sbin
2429   # Extract the first word of "ldconfig", so it can be a program name with args.
2430 set dummy ldconfig; ac_word=$2
2431 echo "$as_me:2431: checking for $ac_word" >&5
2432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2433 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2434   echo $ECHO_N "(cached) $ECHO_C" >&6
2435 else
2436   case $LDCONFIG in
2437   [\\/]* | ?:[\\/]*)
2438   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2439   ;;
2440   *)
2441   ac_save_IFS=$IFS; IFS=$ac_path_separator
2442 ac_dummy="$LDPATH"
2443 for ac_dir in $ac_dummy; do
2444   IFS=$ac_save_IFS
2445   test -z "$ac_dir" && ac_dir=.
2446   if $as_executable_p "$ac_dir/$ac_word"; then
2447    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2448    echo "$as_me:2448: found $ac_dir/$ac_word" >&5
2449    break
2450 fi
2451 done
2452
2453   ;;
2454 esac
2455 fi
2456 LDCONFIG=$ac_cv_path_LDCONFIG
2457
2458 if test -n "$LDCONFIG"; then
2459   echo "$as_me:2459: result: $LDCONFIG" >&5
2460 echo "${ECHO_T}$LDCONFIG" >&6
2461 else
2462   echo "$as_me:2462: result: no" >&5
2463 echo "${ECHO_T}no" >&6
2464 fi
2465
2466   ;;
2467 esac
2468 fi
2469
2470 echo "$as_me:2470: checking if you want to ensure bool is consistent with C++" >&5
2471 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2472
2473 # Check whether --with-cxx or --without-cxx was given.
2474 if test "${with_cxx+set}" = set; then
2475   withval="$with_cxx"
2476   cf_with_cxx=$withval
2477 else
2478   cf_with_cxx=yes
2479 fi;
2480 echo "$as_me:2480: result: $cf_with_cxx" >&5
2481 echo "${ECHO_T}$cf_with_cxx" >&6
2482 if test "X$cf_with_cxx" = Xno ; then
2483         CXX=""
2484         GXX=""
2485 else
2486         # with autoconf 2.13, we can change the error to a warning:
2487                 ac_ext=cc
2488 ac_cpp='$CXXCPP $CPPFLAGS'
2489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2492 ac_main_return=return
2493 if test -n "$ac_tool_prefix"; then
2494   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2495   do
2496     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2497 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2498 echo "$as_me:2498: checking for $ac_word" >&5
2499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2500 if test "${ac_cv_prog_CXX+set}" = set; then
2501   echo $ECHO_N "(cached) $ECHO_C" >&6
2502 else
2503   if test -n "$CXX"; then
2504   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2505 else
2506   ac_save_IFS=$IFS; IFS=$ac_path_separator
2507 ac_dummy="$PATH"
2508 for ac_dir in $ac_dummy; do
2509   IFS=$ac_save_IFS
2510   test -z "$ac_dir" && ac_dir=.
2511   $as_executable_p "$ac_dir/$ac_word" || continue
2512 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2513 echo "$as_me:2513: found $ac_dir/$ac_word" >&5
2514 break
2515 done
2516
2517 fi
2518 fi
2519 CXX=$ac_cv_prog_CXX
2520 if test -n "$CXX"; then
2521   echo "$as_me:2521: result: $CXX" >&5
2522 echo "${ECHO_T}$CXX" >&6
2523 else
2524   echo "$as_me:2524: result: no" >&5
2525 echo "${ECHO_T}no" >&6
2526 fi
2527
2528     test -n "$CXX" && break
2529   done
2530 fi
2531 if test -z "$CXX"; then
2532   ac_ct_CXX=$CXX
2533   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2534 do
2535   # Extract the first word of "$ac_prog", so it can be a program name with args.
2536 set dummy $ac_prog; ac_word=$2
2537 echo "$as_me:2537: checking for $ac_word" >&5
2538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2539 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2540   echo $ECHO_N "(cached) $ECHO_C" >&6
2541 else
2542   if test -n "$ac_ct_CXX"; then
2543   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2544 else
2545   ac_save_IFS=$IFS; IFS=$ac_path_separator
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548   IFS=$ac_save_IFS
2549   test -z "$ac_dir" && ac_dir=.
2550   $as_executable_p "$ac_dir/$ac_word" || continue
2551 ac_cv_prog_ac_ct_CXX="$ac_prog"
2552 echo "$as_me:2552: found $ac_dir/$ac_word" >&5
2553 break
2554 done
2555
2556 fi
2557 fi
2558 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2559 if test -n "$ac_ct_CXX"; then
2560   echo "$as_me:2560: result: $ac_ct_CXX" >&5
2561 echo "${ECHO_T}$ac_ct_CXX" >&6
2562 else
2563   echo "$as_me:2563: result: no" >&5
2564 echo "${ECHO_T}no" >&6
2565 fi
2566
2567   test -n "$ac_ct_CXX" && break
2568 done
2569 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2570
2571   CXX=$ac_ct_CXX
2572 fi
2573
2574 # Provide some information about the compiler.
2575 echo "$as_me:2575:" \
2576      "checking for C++ compiler version" >&5
2577 ac_compiler=`set X $ac_compile; echo $2`
2578 { (eval echo "$as_me:2578: \"$ac_compiler --version </dev/null >&5\"") >&5
2579   (eval $ac_compiler --version </dev/null >&5) 2>&5
2580   ac_status=$?
2581   echo "$as_me:2581: \$? = $ac_status" >&5
2582   (exit $ac_status); }
2583 { (eval echo "$as_me:2583: \"$ac_compiler -v </dev/null >&5\"") >&5
2584   (eval $ac_compiler -v </dev/null >&5) 2>&5
2585   ac_status=$?
2586   echo "$as_me:2586: \$? = $ac_status" >&5
2587   (exit $ac_status); }
2588 { (eval echo "$as_me:2588: \"$ac_compiler -V </dev/null >&5\"") >&5
2589   (eval $ac_compiler -V </dev/null >&5) 2>&5
2590   ac_status=$?
2591   echo "$as_me:2591: \$? = $ac_status" >&5
2592   (exit $ac_status); }
2593
2594 echo "$as_me:2594: checking whether we are using the GNU C++ compiler" >&5
2595 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2596 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2597   echo $ECHO_N "(cached) $ECHO_C" >&6
2598 else
2599   cat >conftest.$ac_ext <<_ACEOF
2600 #line 2600 "configure"
2601 #include "confdefs.h"
2602
2603 int
2604 main ()
2605 {
2606 #ifndef __GNUC__
2607        choke me
2608 #endif
2609
2610   ;
2611   return 0;
2612 }
2613 _ACEOF
2614 rm -f conftest.$ac_objext
2615 if { (eval echo "$as_me:2615: \"$ac_compile\"") >&5
2616   (eval $ac_compile) 2>&5
2617   ac_status=$?
2618   echo "$as_me:2618: \$? = $ac_status" >&5
2619   (exit $ac_status); } &&
2620          { ac_try='test -s conftest.$ac_objext'
2621   { (eval echo "$as_me:2621: \"$ac_try\"") >&5
2622   (eval $ac_try) 2>&5
2623   ac_status=$?
2624   echo "$as_me:2624: \$? = $ac_status" >&5
2625   (exit $ac_status); }; }; then
2626   ac_compiler_gnu=yes
2627 else
2628   echo "$as_me: failed program was:" >&5
2629 cat conftest.$ac_ext >&5
2630 ac_compiler_gnu=no
2631 fi
2632 rm -f conftest.$ac_objext conftest.$ac_ext
2633 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2634
2635 fi
2636 echo "$as_me:2636: result: $ac_cv_cxx_compiler_gnu" >&5
2637 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2638 GXX=`test $ac_compiler_gnu = yes && echo yes`
2639 ac_test_CXXFLAGS=${CXXFLAGS+set}
2640 ac_save_CXXFLAGS=$CXXFLAGS
2641 CXXFLAGS="-g"
2642 echo "$as_me:2642: checking whether $CXX accepts -g" >&5
2643 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2644 if test "${ac_cv_prog_cxx_g+set}" = set; then
2645   echo $ECHO_N "(cached) $ECHO_C" >&6
2646 else
2647   cat >conftest.$ac_ext <<_ACEOF
2648 #line 2648 "configure"
2649 #include "confdefs.h"
2650
2651 int
2652 main ()
2653 {
2654
2655   ;
2656   return 0;
2657 }
2658 _ACEOF
2659 rm -f conftest.$ac_objext
2660 if { (eval echo "$as_me:2660: \"$ac_compile\"") >&5
2661   (eval $ac_compile) 2>&5
2662   ac_status=$?
2663   echo "$as_me:2663: \$? = $ac_status" >&5
2664   (exit $ac_status); } &&
2665          { ac_try='test -s conftest.$ac_objext'
2666   { (eval echo "$as_me:2666: \"$ac_try\"") >&5
2667   (eval $ac_try) 2>&5
2668   ac_status=$?
2669   echo "$as_me:2669: \$? = $ac_status" >&5
2670   (exit $ac_status); }; }; then
2671   ac_cv_prog_cxx_g=yes
2672 else
2673   echo "$as_me: failed program was:" >&5
2674 cat conftest.$ac_ext >&5
2675 ac_cv_prog_cxx_g=no
2676 fi
2677 rm -f conftest.$ac_objext conftest.$ac_ext
2678 fi
2679 echo "$as_me:2679: result: $ac_cv_prog_cxx_g" >&5
2680 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2681 if test "$ac_test_CXXFLAGS" = set; then
2682   CXXFLAGS=$ac_save_CXXFLAGS
2683 elif test $ac_cv_prog_cxx_g = yes; then
2684   if test "$GXX" = yes; then
2685     CXXFLAGS="-g -O2"
2686   else
2687     CXXFLAGS="-g"
2688   fi
2689 else
2690   if test "$GXX" = yes; then
2691     CXXFLAGS="-O2"
2692   else
2693     CXXFLAGS=
2694   fi
2695 fi
2696 for ac_declaration in \
2697    ''\
2698    '#include <stdlib.h>' \
2699    'extern "C" void std::exit (int) throw (); using std::exit;' \
2700    'extern "C" void std::exit (int); using std::exit;' \
2701    'extern "C" void exit (int) throw ();' \
2702    'extern "C" void exit (int);' \
2703    'void exit (int);'
2704 do
2705   cat >conftest.$ac_ext <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2708 #include <stdlib.h>
2709 $ac_declaration
2710 int
2711 main ()
2712 {
2713 exit (42);
2714   ;
2715   return 0;
2716 }
2717 _ACEOF
2718 rm -f conftest.$ac_objext
2719 if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5
2720   (eval $ac_compile) 2>&5
2721   ac_status=$?
2722   echo "$as_me:2722: \$? = $ac_status" >&5
2723   (exit $ac_status); } &&
2724          { ac_try='test -s conftest.$ac_objext'
2725   { (eval echo "$as_me:2725: \"$ac_try\"") >&5
2726   (eval $ac_try) 2>&5
2727   ac_status=$?
2728   echo "$as_me:2728: \$? = $ac_status" >&5
2729   (exit $ac_status); }; }; then
2730   :
2731 else
2732   echo "$as_me: failed program was:" >&5
2733 cat conftest.$ac_ext >&5
2734 continue
2735 fi
2736 rm -f conftest.$ac_objext conftest.$ac_ext
2737   cat >conftest.$ac_ext <<_ACEOF
2738 #line 2738 "configure"
2739 #include "confdefs.h"
2740 $ac_declaration
2741 int
2742 main ()
2743 {
2744 exit (42);
2745   ;
2746   return 0;
2747 }
2748 _ACEOF
2749 rm -f conftest.$ac_objext
2750 if { (eval echo "$as_me:2750: \"$ac_compile\"") >&5
2751   (eval $ac_compile) 2>&5
2752   ac_status=$?
2753   echo "$as_me:2753: \$? = $ac_status" >&5
2754   (exit $ac_status); } &&
2755          { ac_try='test -s conftest.$ac_objext'
2756   { (eval echo "$as_me:2756: \"$ac_try\"") >&5
2757   (eval $ac_try) 2>&5
2758   ac_status=$?
2759   echo "$as_me:2759: \$? = $ac_status" >&5
2760   (exit $ac_status); }; }; then
2761   break
2762 else
2763   echo "$as_me: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 fi
2766 rm -f conftest.$ac_objext conftest.$ac_ext
2767 done
2768 rm -rf conftest*
2769 if test -n "$ac_declaration"; then
2770   echo '#ifdef __cplusplus' >>confdefs.h
2771   echo $ac_declaration      >>confdefs.h
2772   echo '#endif'             >>confdefs.h
2773 fi
2774
2775 ac_ext=c
2776 ac_cpp='$CPP $CPPFLAGS'
2777 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2780 ac_main_return=return
2781
2782                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2783         if test "$CXX" = "g++" ; then
2784                 # Extract the first word of "g++", so it can be a program name with args.
2785 set dummy g++; ac_word=$2
2786 echo "$as_me:2786: checking for $ac_word" >&5
2787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2788 if test "${ac_cv_path_CXX+set}" = set; then
2789   echo $ECHO_N "(cached) $ECHO_C" >&6
2790 else
2791   case $CXX in
2792   [\\/]* | ?:[\\/]*)
2793   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2794   ;;
2795   *)
2796   ac_save_IFS=$IFS; IFS=$ac_path_separator
2797 ac_dummy="$PATH"
2798 for ac_dir in $ac_dummy; do
2799   IFS=$ac_save_IFS
2800   test -z "$ac_dir" && ac_dir=.
2801   if $as_executable_p "$ac_dir/$ac_word"; then
2802    ac_cv_path_CXX="$ac_dir/$ac_word"
2803    echo "$as_me:2803: found $ac_dir/$ac_word" >&5
2804    break
2805 fi
2806 done
2807
2808   ;;
2809 esac
2810 fi
2811 CXX=$ac_cv_path_CXX
2812
2813 if test -n "$CXX"; then
2814   echo "$as_me:2814: result: $CXX" >&5
2815 echo "${ECHO_T}$CXX" >&6
2816 else
2817   echo "$as_me:2817: result: no" >&5
2818 echo "${ECHO_T}no" >&6
2819 fi
2820
2821         fi
2822         case "x$CXX" in #(vi
2823         x|xg++)
2824                 { echo "$as_me:2824: WARNING: You don't have any C++ compiler, too bad" >&5
2825 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2826                 cf_with_cxx=no; CXX=""; GXX="";
2827                 ;;
2828         esac
2829 fi
2830
2831 GXX_VERSION=none
2832 if test "$GXX" = yes; then
2833         echo "$as_me:2833: checking version of ${CXX:-g++}" >&5
2834 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2835         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2836         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2837         echo "$as_me:2837: result: $GXX_VERSION" >&5
2838 echo "${ECHO_T}$GXX_VERSION" >&6
2839 fi
2840
2841 case $GXX_VERSION in
2842 1*|2.[0-6]*)
2843         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2844         # cf_cxx_library=no
2845         { echo "$as_me:2845: WARNING: templates do not work" >&5
2846 echo "$as_me: WARNING: templates do not work" >&2;}
2847         ;;
2848 esac
2849
2850 echo "$as_me:2850: checking if you want to build C++ binding and demo" >&5
2851 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2852
2853 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2854 if test "${with_cxx_binding+set}" = set; then
2855   withval="$with_cxx_binding"
2856   cf_with_cxx_binding=$withval
2857 else
2858   cf_with_cxx_binding=$cf_with_cxx
2859 fi;
2860 echo "$as_me:2860: result: $cf_with_cxx_binding" >&5
2861 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2862
2863 echo "$as_me:2863: checking if you want to build with Ada95" >&5
2864 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2865 echo "$as_me:2865: result: $cf_with_ada" >&5
2866 echo "${ECHO_T}$cf_with_ada" >&6
2867
2868 echo "$as_me:2868: checking if you want to install manpages" >&5
2869 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2870
2871 # Check whether --with-manpages or --without-manpages was given.
2872 if test "${with_manpages+set}" = set; then
2873   withval="$with_manpages"
2874   cf_with_manpages=$withval
2875 else
2876   cf_with_manpages=yes
2877 fi;
2878 echo "$as_me:2878: result: $cf_with_manpages" >&5
2879 echo "${ECHO_T}$cf_with_manpages" >&6
2880
2881 echo "$as_me:2881: checking if you want to build programs such as tic" >&5
2882 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2883
2884 # Check whether --with-progs or --without-progs was given.
2885 if test "${with_progs+set}" = set; then
2886   withval="$with_progs"
2887   cf_with_progs=$withval
2888 else
2889   cf_with_progs=yes
2890 fi;
2891 echo "$as_me:2891: result: $cf_with_progs" >&5
2892 echo "${ECHO_T}$cf_with_progs" >&6
2893
2894 echo "$as_me:2894: checking if you want to build test-programs" >&5
2895 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2896
2897 # Check whether --with-tests or --without-tests was given.
2898 if test "${with_tests+set}" = set; then
2899   withval="$with_tests"
2900   cf_with_tests=$withval
2901 else
2902   cf_with_tests=yes
2903 fi;
2904 echo "$as_me:2904: result: $cf_with_tests" >&5
2905 echo "${ECHO_T}$cf_with_tests" >&6
2906
2907 echo "$as_me:2907: checking if you wish to install curses.h" >&5
2908 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2909
2910 # Check whether --with-curses-h or --without-curses-h was given.
2911 if test "${with_curses_h+set}" = set; then
2912   withval="$with_curses_h"
2913   with_curses_h=$withval
2914 else
2915   with_curses_h=yes
2916 fi;
2917 echo "$as_me:2917: result: $with_curses_h" >&5
2918 echo "${ECHO_T}$with_curses_h" >&6
2919
2920 modules_to_build="ncurses"
2921 if test "X$cf_with_progs" != Xno ; then
2922 modules_to_build="$modules_to_build progs tack"
2923 fi
2924 modules_to_build="$modules_to_build panel menu form"
2925
2926 test "$program_prefix" != NONE &&
2927   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2928 # Use a double $ so make ignores it.
2929 test "$program_suffix" != NONE &&
2930   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2931 # Double any \ or $.  echo might interpret backslashes.
2932 # By default was `s,x,x', remove it if useless.
2933 cat <<\_ACEOF >conftest.sed
2934 s/[\\$]/&&/g;s/;s,x,x,$//
2935 _ACEOF
2936 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2937 rm conftest.sed
2938
2939 for ac_prog in mawk gawk nawk awk
2940 do
2941   # Extract the first word of "$ac_prog", so it can be a program name with args.
2942 set dummy $ac_prog; ac_word=$2
2943 echo "$as_me:2943: checking for $ac_word" >&5
2944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2945 if test "${ac_cv_prog_AWK+set}" = set; then
2946   echo $ECHO_N "(cached) $ECHO_C" >&6
2947 else
2948   if test -n "$AWK"; then
2949   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2950 else
2951   ac_save_IFS=$IFS; IFS=$ac_path_separator
2952 ac_dummy="$PATH"
2953 for ac_dir in $ac_dummy; do
2954   IFS=$ac_save_IFS
2955   test -z "$ac_dir" && ac_dir=.
2956   $as_executable_p "$ac_dir/$ac_word" || continue
2957 ac_cv_prog_AWK="$ac_prog"
2958 echo "$as_me:2958: found $ac_dir/$ac_word" >&5
2959 break
2960 done
2961
2962 fi
2963 fi
2964 AWK=$ac_cv_prog_AWK
2965 if test -n "$AWK"; then
2966   echo "$as_me:2966: result: $AWK" >&5
2967 echo "${ECHO_T}$AWK" >&6
2968 else
2969   echo "$as_me:2969: result: no" >&5
2970 echo "${ECHO_T}no" >&6
2971 fi
2972
2973   test -n "$AWK" && break
2974 done
2975
2976 test -z "$AWK" && { { echo "$as_me:2976: error: No awk program found" >&5
2977 echo "$as_me: error: No awk program found" >&2;}
2978    { (exit 1); exit 1; }; }
2979
2980 echo "$as_me:2980: checking for egrep" >&5
2981 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2982 if test "${ac_cv_prog_egrep+set}" = set; then
2983   echo $ECHO_N "(cached) $ECHO_C" >&6
2984 else
2985   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2986     then ac_cv_prog_egrep='grep -E'
2987     else ac_cv_prog_egrep='egrep'
2988     fi
2989 fi
2990 echo "$as_me:2990: result: $ac_cv_prog_egrep" >&5
2991 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2992  EGREP=$ac_cv_prog_egrep
2993
2994 test -z "$EGREP" && { { echo "$as_me:2994: error: No egrep program found" >&5
2995 echo "$as_me: error: No egrep program found" >&2;}
2996    { (exit 1); exit 1; }; }
2997
2998 # Find a good install program.  We prefer a C program (faster),
2999 # so one script is as good as another.  But avoid the broken or
3000 # incompatible versions:
3001 # SysV /etc/install, /usr/sbin/install
3002 # SunOS /usr/etc/install
3003 # IRIX /sbin/install
3004 # AIX /bin/install
3005 # AmigaOS /C/install, which installs bootblocks on floppy discs
3006 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3007 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3008 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3009 # ./install, which can be erroneously created by make from ./install.sh.
3010 echo "$as_me:3010: checking for a BSD compatible install" >&5
3011 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3012 if test -z "$INSTALL"; then
3013 if test "${ac_cv_path_install+set}" = set; then
3014   echo $ECHO_N "(cached) $ECHO_C" >&6
3015 else
3016     ac_save_IFS=$IFS; IFS=$ac_path_separator
3017   for ac_dir in $PATH; do
3018     IFS=$ac_save_IFS
3019     # Account for people who put trailing slashes in PATH elements.
3020     case $ac_dir/ in
3021     / | ./ | .// | /cC/* \
3022     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3023     | /usr/ucb/* ) ;;
3024     *)
3025       # OSF1 and SCO ODT 3.0 have their own names for install.
3026       # Don't use installbsd from OSF since it installs stuff as root
3027       # by default.
3028       for ac_prog in ginstall scoinst install; do
3029         if $as_executable_p "$ac_dir/$ac_prog"; then
3030           if test $ac_prog = install &&
3031             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3032             # AIX install.  It has an incompatible calling convention.
3033             :
3034           elif test $ac_prog = install &&
3035             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3036             # program-specific install script used by HP pwplus--don't use.
3037             :
3038           else
3039             ac_cv_path_install="$ac_dir/$ac_prog -c"
3040             break 2
3041           fi
3042         fi
3043       done
3044       ;;
3045     esac
3046   done
3047
3048 fi
3049   if test "${ac_cv_path_install+set}" = set; then
3050     INSTALL=$ac_cv_path_install
3051   else
3052     # As a last resort, use the slow shell script.  We don't cache a
3053     # path for INSTALL within a source directory, because that will
3054     # break other packages using the cache if that directory is
3055     # removed, or if the path is relative.
3056     INSTALL=$ac_install_sh
3057   fi
3058 fi
3059 echo "$as_me:3059: result: $INSTALL" >&5
3060 echo "${ECHO_T}$INSTALL" >&6
3061
3062 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3063 # It thinks the first close brace ends the variable substitution.
3064 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3065
3066 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3067
3068 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3069
3070 case $INSTALL in
3071 /*)
3072   ;;
3073 *)
3074   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3075   test -z "$cf_dir" && cf_dir=.
3076   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3077   ;;
3078 esac
3079
3080 for ac_prog in tdlint lint alint splint lclint
3081 do
3082   # Extract the first word of "$ac_prog", so it can be a program name with args.
3083 set dummy $ac_prog; ac_word=$2
3084 echo "$as_me:3084: checking for $ac_word" >&5
3085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3086 if test "${ac_cv_prog_LINT+set}" = set; then
3087   echo $ECHO_N "(cached) $ECHO_C" >&6
3088 else
3089   if test -n "$LINT"; then
3090   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3091 else
3092   ac_save_IFS=$IFS; IFS=$ac_path_separator
3093 ac_dummy="$PATH"
3094 for ac_dir in $ac_dummy; do
3095   IFS=$ac_save_IFS
3096   test -z "$ac_dir" && ac_dir=.
3097   $as_executable_p "$ac_dir/$ac_word" || continue
3098 ac_cv_prog_LINT="$ac_prog"
3099 echo "$as_me:3099: found $ac_dir/$ac_word" >&5
3100 break
3101 done
3102
3103 fi
3104 fi
3105 LINT=$ac_cv_prog_LINT
3106 if test -n "$LINT"; then
3107   echo "$as_me:3107: result: $LINT" >&5
3108 echo "${ECHO_T}$LINT" >&6
3109 else
3110   echo "$as_me:3110: result: no" >&5
3111 echo "${ECHO_T}no" >&6
3112 fi
3113
3114   test -n "$LINT" && break
3115 done
3116
3117 echo "$as_me:3117: checking whether ln -s works" >&5
3118 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3119 LN_S=$as_ln_s
3120 if test "$LN_S" = "ln -s"; then
3121   echo "$as_me:3121: result: yes" >&5
3122 echo "${ECHO_T}yes" >&6
3123 else
3124   echo "$as_me:3124: result: no, using $LN_S" >&5
3125 echo "${ECHO_T}no, using $LN_S" >&6
3126 fi
3127
3128 echo "$as_me:3128: checking if $LN_S -f options work" >&5
3129 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3130
3131 rm -f conf$$.src conf$$dst
3132 echo >conf$$.dst
3133 echo first >conf$$.src
3134 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3135         cf_prog_ln_sf=yes
3136 else
3137         cf_prog_ln_sf=no
3138 fi
3139 rm -f conf$$.dst conf$$src
3140 echo "$as_me:3140: result: $cf_prog_ln_sf" >&5
3141 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3142
3143 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3144
3145 echo "$as_me:3145: checking for long file names" >&5
3146 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3147 if test "${ac_cv_sys_long_file_names+set}" = set; then
3148   echo $ECHO_N "(cached) $ECHO_C" >&6
3149 else
3150   ac_cv_sys_long_file_names=yes
3151 # Test for long file names in all the places we know might matter:
3152 #      .                the current directory, where building will happen
3153 #      $prefix/lib      where we will be installing things
3154 #      $exec_prefix/lib likewise
3155 # eval it to expand exec_prefix.
3156 #      $TMPDIR          if set, where it might want to write temporary files
3157 # if $TMPDIR is not set:
3158 #      /tmp             where it might want to write temporary files
3159 #      /var/tmp         likewise
3160 #      /usr/tmp         likewise
3161 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3162   ac_tmpdirs=$TMPDIR
3163 else
3164   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3165 fi
3166 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3167   test -d $ac_dir || continue
3168   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3169   ac_xdir=$ac_dir/cf$$
3170   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3171   ac_tf1=$ac_xdir/conftest9012345
3172   ac_tf2=$ac_xdir/conftest9012346
3173   (echo 1 >$ac_tf1) 2>/dev/null
3174   (echo 2 >$ac_tf2) 2>/dev/null
3175   ac_val=`cat $ac_tf1 2>/dev/null`
3176   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3177     ac_cv_sys_long_file_names=no
3178     rm -rf $ac_xdir 2>/dev/null
3179     break
3180   fi
3181   rm -rf $ac_xdir 2>/dev/null
3182 done
3183 fi
3184 echo "$as_me:3184: result: $ac_cv_sys_long_file_names" >&5
3185 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3186 if test $ac_cv_sys_long_file_names = yes; then
3187
3188 cat >>confdefs.h <<\EOF
3189 #define HAVE_LONG_FILE_NAMES 1
3190 EOF
3191
3192 fi
3193
3194 # if we find pkg-config, check if we should install the ".pc" files.
3195
3196 echo "$as_me:3196: checking if you want to use pkg-config" >&5
3197 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3198
3199 # Check whether --with-pkg-config or --without-pkg-config was given.
3200 if test "${with_pkg_config+set}" = set; then
3201   withval="$with_pkg_config"
3202   cf_pkg_config=$withval
3203 else
3204   cf_pkg_config=yes
3205 fi;
3206 echo "$as_me:3206: result: $cf_pkg_config" >&5
3207 echo "${ECHO_T}$cf_pkg_config" >&6
3208
3209 case $cf_pkg_config in #(vi
3210 no) #(vi
3211         PKG_CONFIG=none
3212         ;;
3213 yes) #(vi
3214
3215 if test -n "$ac_tool_prefix"; then
3216   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3217 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3218 echo "$as_me:3218: checking for $ac_word" >&5
3219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3220 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223   case $PKG_CONFIG in
3224   [\\/]* | ?:[\\/]*)
3225   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3226   ;;
3227   *)
3228   ac_save_IFS=$IFS; IFS=$ac_path_separator
3229 ac_dummy="$PATH"
3230 for ac_dir in $ac_dummy; do
3231   IFS=$ac_save_IFS
3232   test -z "$ac_dir" && ac_dir=.
3233   if $as_executable_p "$ac_dir/$ac_word"; then
3234    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3235    echo "$as_me:3235: found $ac_dir/$ac_word" >&5
3236    break
3237 fi
3238 done
3239
3240   ;;
3241 esac
3242 fi
3243 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3244
3245 if test -n "$PKG_CONFIG"; then
3246   echo "$as_me:3246: result: $PKG_CONFIG" >&5
3247 echo "${ECHO_T}$PKG_CONFIG" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253 fi
3254 if test -z "$ac_cv_path_PKG_CONFIG"; then
3255   ac_pt_PKG_CONFIG=$PKG_CONFIG
3256   # Extract the first word of "pkg-config", so it can be a program name with args.
3257 set dummy pkg-config; ac_word=$2
3258 echo "$as_me:3258: checking for $ac_word" >&5
3259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3260 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3261   echo $ECHO_N "(cached) $ECHO_C" >&6
3262 else
3263   case $ac_pt_PKG_CONFIG in
3264   [\\/]* | ?:[\\/]*)
3265   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3266   ;;
3267   *)
3268   ac_save_IFS=$IFS; IFS=$ac_path_separator
3269 ac_dummy="$PATH"
3270 for ac_dir in $ac_dummy; do
3271   IFS=$ac_save_IFS
3272   test -z "$ac_dir" && ac_dir=.
3273   if $as_executable_p "$ac_dir/$ac_word"; then
3274    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3275    echo "$as_me:3275: found $ac_dir/$ac_word" >&5
3276    break
3277 fi
3278 done
3279
3280   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3281   ;;
3282 esac
3283 fi
3284 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3285
3286 if test -n "$ac_pt_PKG_CONFIG"; then
3287   echo "$as_me:3287: result: $ac_pt_PKG_CONFIG" >&5
3288 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3289 else
3290   echo "$as_me:3290: result: no" >&5
3291 echo "${ECHO_T}no" >&6
3292 fi
3293
3294   PKG_CONFIG=$ac_pt_PKG_CONFIG
3295 else
3296   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3297 fi
3298
3299         ;;
3300 *)
3301         PKG_CONFIG=$withval
3302         ;;
3303 esac
3304
3305 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3306 if test "$PKG_CONFIG" != none ; then
3307
3308 if test "x$prefix" != xNONE; then
3309   cf_path_syntax="$prefix"
3310 else
3311   cf_path_syntax="$ac_default_prefix"
3312 fi
3313
3314 case ".$PKG_CONFIG" in #(vi
3315 .\$\(*\)*|.\'*\'*) #(vi
3316   ;;
3317 ..|./*|.\\*) #(vi
3318   ;;
3319 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3320   ;;
3321 .\${*prefix}*|.\${*dir}*) #(vi
3322   eval PKG_CONFIG="$PKG_CONFIG"
3323   case ".$PKG_CONFIG" in #(vi
3324   .NONE/*)
3325     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3326     ;;
3327   esac
3328   ;; #(vi
3329 .no|.NONE/*)
3330   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3331   ;;
3332 *)
3333   { { echo "$as_me:3333: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3334 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3335    { (exit 1); exit 1; }; }
3336   ;;
3337 esac
3338
3339 fi
3340
3341 if test "$PKG_CONFIG" != none ; then
3342         echo "$as_me:3342: checking for $PKG_CONFIG library directory" >&5
3343 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3344
3345 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3346 if test "${with_pkg_config_libdir+set}" = set; then
3347   withval="$with_pkg_config_libdir"
3348   PKG_CONFIG_LIBDIR=$withval
3349 else
3350   PKG_CONFIG_LIBDIR=yes
3351 fi;
3352
3353         case x$PKG_CONFIG_LIBDIR in #(vi
3354         x/*) #(vi
3355                 ;;
3356         xyes) #(vi
3357                 # look for the library directory using the same prefix as the executable
3358                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3359                 case x`(arch) 2>/dev/null` in #(vi
3360                 *64) #(vi
3361                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3362                         do
3363                                 if test -d $cf_config/pkgconfig
3364                                 then
3365                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3366                                         break
3367                                 fi
3368                         done
3369                         ;;
3370                 *)
3371                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3372                         ;;
3373                 esac
3374                 ;;
3375         *)
3376                 ;;
3377         esac
3378
3379         echo "$as_me:3379: result: $PKG_CONFIG_LIBDIR" >&5
3380 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3381 fi
3382
3383 if test "$PKG_CONFIG" != none ; then
3384         echo "$as_me:3384: checking if we should install .pc files for $PKG_CONFIG" >&5
3385 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3386
3387 # Check whether --enable-pc-files or --disable-pc-files was given.
3388 if test "${enable_pc_files+set}" = set; then
3389   enableval="$enable_pc_files"
3390   enable_pc_files=$enableval
3391 else
3392   enable_pc_files=no
3393 fi;
3394         echo "$as_me:3394: result: $enable_pc_files" >&5
3395 echo "${ECHO_T}$enable_pc_files" >&6
3396         if test "$enable_pc_files" != no
3397         then
3398
3399 if test "x$prefix" != xNONE; then
3400   cf_path_syntax="$prefix"
3401 else
3402   cf_path_syntax="$ac_default_prefix"
3403 fi
3404
3405 case ".$PKG_CONFIG_LIBDIR" in #(vi
3406 .\$\(*\)*|.\'*\'*) #(vi
3407   ;;
3408 ..|./*|.\\*) #(vi
3409   ;;
3410 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3411   ;;
3412 .\${*prefix}*|.\${*dir}*) #(vi
3413   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3414   case ".$PKG_CONFIG_LIBDIR" in #(vi
3415   .NONE/*)
3416     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3417     ;;
3418   esac
3419   ;; #(vi
3420 .no|.NONE/*)
3421   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3422   ;;
3423 *)
3424   { { echo "$as_me:3424: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3425 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3426    { (exit 1); exit 1; }; }
3427   ;;
3428 esac
3429
3430         fi
3431 else
3432         enable_pc_files=no
3433 fi
3434
3435 echo "$as_me:3435: checking if we should assume mixed-case filenames" >&5
3436 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3437
3438 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3439 if test "${enable_mixed_case+set}" = set; then
3440   enableval="$enable_mixed_case"
3441   enable_mixedcase=$enableval
3442 else
3443   enable_mixedcase=auto
3444 fi;
3445 echo "$as_me:3445: result: $enable_mixedcase" >&5
3446 echo "${ECHO_T}$enable_mixedcase" >&6
3447 if test "$enable_mixedcase" = "auto" ; then
3448
3449 echo "$as_me:3449: checking if filesystem supports mixed-case filenames" >&5
3450 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3451 if test "${cf_cv_mixedcase+set}" = set; then
3452   echo $ECHO_N "(cached) $ECHO_C" >&6
3453 else
3454
3455 if test "$cross_compiling" = yes ; then
3456         case $target_alias in #(vi
3457         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3458                 cf_cv_mixedcase=no
3459                 ;;
3460         *)
3461                 cf_cv_mixedcase=yes
3462                 ;;
3463         esac
3464 else
3465         rm -f conftest CONFTEST
3466         echo test >conftest
3467         if test -f CONFTEST ; then
3468                 cf_cv_mixedcase=no
3469         else
3470                 cf_cv_mixedcase=yes
3471         fi
3472         rm -f conftest CONFTEST
3473 fi
3474
3475 fi
3476 echo "$as_me:3476: result: $cf_cv_mixedcase" >&5
3477 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3478 test "$cf_cv_mixedcase" = yes &&
3479 cat >>confdefs.h <<\EOF
3480 #define MIXEDCASE_FILENAMES 1
3481 EOF
3482
3483 else
3484     cf_cv_mixedcase=$enable_mixedcase
3485     if test "x$enable_mixedcase" = "xyes" ; then
3486
3487 cat >>confdefs.h <<\EOF
3488 #define MIXEDCASE_FILENAMES 1
3489 EOF
3490
3491     fi
3492 fi
3493
3494 # do this after mixed-case option (tags/TAGS is not as important as tic).
3495 echo "$as_me:3495: checking whether ${MAKE-make} sets \${MAKE}" >&5
3496 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3497 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3498 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   cat >conftest.make <<\EOF
3502 all:
3503         @echo 'ac_maketemp="${MAKE}"'
3504 EOF
3505 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3506 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3507 if test -n "$ac_maketemp"; then
3508   eval ac_cv_prog_make_${ac_make}_set=yes
3509 else
3510   eval ac_cv_prog_make_${ac_make}_set=no
3511 fi
3512 rm -f conftest.make
3513 fi
3514 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3515   echo "$as_me:3515: result: yes" >&5
3516 echo "${ECHO_T}yes" >&6
3517   SET_MAKE=
3518 else
3519   echo "$as_me:3519: result: no" >&5
3520 echo "${ECHO_T}no" >&6
3521   SET_MAKE="MAKE=${MAKE-make}"
3522 fi
3523
3524 for ac_prog in exctags ctags
3525 do
3526   # Extract the first word of "$ac_prog", so it can be a program name with args.
3527 set dummy $ac_prog; ac_word=$2
3528 echo "$as_me:3528: checking for $ac_word" >&5
3529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3530 if test "${ac_cv_prog_CTAGS+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   if test -n "$CTAGS"; then
3534   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3535 else
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   $as_executable_p "$ac_dir/$ac_word" || continue
3542 ac_cv_prog_CTAGS="$ac_prog"
3543 echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544 break
3545 done
3546
3547 fi
3548 fi
3549 CTAGS=$ac_cv_prog_CTAGS
3550 if test -n "$CTAGS"; then
3551   echo "$as_me:3551: result: $CTAGS" >&5
3552 echo "${ECHO_T}$CTAGS" >&6
3553 else
3554   echo "$as_me:3554: result: no" >&5
3555 echo "${ECHO_T}no" >&6
3556 fi
3557
3558   test -n "$CTAGS" && break
3559 done
3560
3561 for ac_prog in exetags etags
3562 do
3563   # Extract the first word of "$ac_prog", so it can be a program name with args.
3564 set dummy $ac_prog; ac_word=$2
3565 echo "$as_me:3565: checking for $ac_word" >&5
3566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3567 if test "${ac_cv_prog_ETAGS+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570   if test -n "$ETAGS"; then
3571   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3572 else
3573   ac_save_IFS=$IFS; IFS=$ac_path_separator
3574 ac_dummy="$PATH"
3575 for ac_dir in $ac_dummy; do
3576   IFS=$ac_save_IFS
3577   test -z "$ac_dir" && ac_dir=.
3578   $as_executable_p "$ac_dir/$ac_word" || continue
3579 ac_cv_prog_ETAGS="$ac_prog"
3580 echo "$as_me:3580: found $ac_dir/$ac_word" >&5
3581 break
3582 done
3583
3584 fi
3585 fi
3586 ETAGS=$ac_cv_prog_ETAGS
3587 if test -n "$ETAGS"; then
3588   echo "$as_me:3588: result: $ETAGS" >&5
3589 echo "${ECHO_T}$ETAGS" >&6
3590 else
3591   echo "$as_me:3591: result: no" >&5
3592 echo "${ECHO_T}no" >&6
3593 fi
3594
3595   test -n "$ETAGS" && break
3596 done
3597
3598 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3599 set dummy ${CTAGS:-ctags}; ac_word=$2
3600 echo "$as_me:3600: checking for $ac_word" >&5
3601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3602 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3603   echo $ECHO_N "(cached) $ECHO_C" >&6
3604 else
3605   if test -n "$MAKE_LOWER_TAGS"; then
3606   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3607 else
3608   ac_save_IFS=$IFS; IFS=$ac_path_separator
3609 ac_dummy="$PATH"
3610 for ac_dir in $ac_dummy; do
3611   IFS=$ac_save_IFS
3612   test -z "$ac_dir" && ac_dir=.
3613   $as_executable_p "$ac_dir/$ac_word" || continue
3614 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3615 echo "$as_me:3615: found $ac_dir/$ac_word" >&5
3616 break
3617 done
3618
3619   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3620 fi
3621 fi
3622 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3623 if test -n "$MAKE_LOWER_TAGS"; then
3624   echo "$as_me:3624: result: $MAKE_LOWER_TAGS" >&5
3625 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3626 else
3627   echo "$as_me:3627: result: no" >&5
3628 echo "${ECHO_T}no" >&6
3629 fi
3630
3631 if test "$cf_cv_mixedcase" = yes ; then
3632         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3633 set dummy ${ETAGS:-etags}; ac_word=$2
3634 echo "$as_me:3634: checking for $ac_word" >&5
3635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3636 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3637   echo $ECHO_N "(cached) $ECHO_C" >&6
3638 else
3639   if test -n "$MAKE_UPPER_TAGS"; then
3640   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3641 else
3642   ac_save_IFS=$IFS; IFS=$ac_path_separator
3643 ac_dummy="$PATH"
3644 for ac_dir in $ac_dummy; do
3645   IFS=$ac_save_IFS
3646   test -z "$ac_dir" && ac_dir=.
3647   $as_executable_p "$ac_dir/$ac_word" || continue
3648 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3649 echo "$as_me:3649: found $ac_dir/$ac_word" >&5
3650 break
3651 done
3652
3653   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3654 fi
3655 fi
3656 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3657 if test -n "$MAKE_UPPER_TAGS"; then
3658   echo "$as_me:3658: result: $MAKE_UPPER_TAGS" >&5
3659 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3660 else
3661   echo "$as_me:3661: result: no" >&5
3662 echo "${ECHO_T}no" >&6
3663 fi
3664
3665 else
3666         MAKE_UPPER_TAGS=no
3667 fi
3668
3669 if test "$MAKE_UPPER_TAGS" = yes ; then
3670         MAKE_UPPER_TAGS=
3671 else
3672         MAKE_UPPER_TAGS="#"
3673 fi
3674
3675 if test "$MAKE_LOWER_TAGS" = yes ; then
3676         MAKE_LOWER_TAGS=
3677 else
3678         MAKE_LOWER_TAGS="#"
3679 fi
3680
3681 echo "$as_me:3681: checking for makeflags variable" >&5
3682 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3683 if test "${cf_cv_makeflags+set}" = set; then
3684   echo $ECHO_N "(cached) $ECHO_C" >&6
3685 else
3686
3687         cf_cv_makeflags=''
3688         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3689         do
3690                 cat >cf_makeflags.tmp <<CF_EOF
3691 SHELL = /bin/sh
3692 all :
3693         @ echo '.$cf_option'
3694 CF_EOF
3695                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3696                 case "$cf_result" in
3697                 .*k)
3698                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3699                         case "$cf_result" in
3700                         .*CC=*) cf_cv_makeflags=
3701                                 ;;
3702                         *)      cf_cv_makeflags=$cf_option
3703                                 ;;
3704                         esac
3705                         break
3706                         ;;
3707                 .-)     ;;
3708                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3709                         ;;
3710                 esac
3711         done
3712         rm -f cf_makeflags.tmp
3713
3714 fi
3715 echo "$as_me:3715: result: $cf_cv_makeflags" >&5
3716 echo "${ECHO_T}$cf_cv_makeflags" >&6
3717
3718 if test -n "$ac_tool_prefix"; then
3719   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3720 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3721 echo "$as_me:3721: checking for $ac_word" >&5
3722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3723 if test "${ac_cv_prog_RANLIB+set}" = set; then
3724   echo $ECHO_N "(cached) $ECHO_C" >&6
3725 else
3726   if test -n "$RANLIB"; then
3727   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3728 else
3729   ac_save_IFS=$IFS; IFS=$ac_path_separator
3730 ac_dummy="$PATH"
3731 for ac_dir in $ac_dummy; do
3732   IFS=$ac_save_IFS
3733   test -z "$ac_dir" && ac_dir=.
3734   $as_executable_p "$ac_dir/$ac_word" || continue
3735 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3736 echo "$as_me:3736: found $ac_dir/$ac_word" >&5
3737 break
3738 done
3739
3740 fi
3741 fi
3742 RANLIB=$ac_cv_prog_RANLIB
3743 if test -n "$RANLIB"; then
3744   echo "$as_me:3744: result: $RANLIB" >&5
3745 echo "${ECHO_T}$RANLIB" >&6
3746 else
3747   echo "$as_me:3747: result: no" >&5
3748 echo "${ECHO_T}no" >&6
3749 fi
3750
3751 fi
3752 if test -z "$ac_cv_prog_RANLIB"; then
3753   ac_ct_RANLIB=$RANLIB
3754   # Extract the first word of "ranlib", so it can be a program name with args.
3755 set dummy ranlib; ac_word=$2
3756 echo "$as_me:3756: checking for $ac_word" >&5
3757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$ac_ct_RANLIB"; then
3762   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3763 else
3764   ac_save_IFS=$IFS; IFS=$ac_path_separator
3765 ac_dummy="$PATH"
3766 for ac_dir in $ac_dummy; do
3767   IFS=$ac_save_IFS
3768   test -z "$ac_dir" && ac_dir=.
3769   $as_executable_p "$ac_dir/$ac_word" || continue
3770 ac_cv_prog_ac_ct_RANLIB="ranlib"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3776 fi
3777 fi
3778 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3779 if test -n "$ac_ct_RANLIB"; then
3780   echo "$as_me:3780: result: $ac_ct_RANLIB" >&5
3781 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3782 else
3783   echo "$as_me:3783: result: no" >&5
3784 echo "${ECHO_T}no" >&6
3785 fi
3786
3787   RANLIB=$ac_ct_RANLIB
3788 else
3789   RANLIB="$ac_cv_prog_RANLIB"
3790 fi
3791
3792 if test -n "$ac_tool_prefix"; then
3793   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3794 set dummy ${ac_tool_prefix}ld; ac_word=$2
3795 echo "$as_me:3795: checking for $ac_word" >&5
3796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797 if test "${ac_cv_prog_LD+set}" = set; then
3798   echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800   if test -n "$LD"; then
3801   ac_cv_prog_LD="$LD" # Let the user override the test.
3802 else
3803   ac_save_IFS=$IFS; IFS=$ac_path_separator
3804 ac_dummy="$PATH"
3805 for ac_dir in $ac_dummy; do
3806   IFS=$ac_save_IFS
3807   test -z "$ac_dir" && ac_dir=.
3808   $as_executable_p "$ac_dir/$ac_word" || continue
3809 ac_cv_prog_LD="${ac_tool_prefix}ld"
3810 echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811 break
3812 done
3813
3814 fi
3815 fi
3816 LD=$ac_cv_prog_LD
3817 if test -n "$LD"; then
3818   echo "$as_me:3818: result: $LD" >&5
3819 echo "${ECHO_T}$LD" >&6
3820 else
3821   echo "$as_me:3821: result: no" >&5
3822 echo "${ECHO_T}no" >&6
3823 fi
3824
3825 fi
3826 if test -z "$ac_cv_prog_LD"; then
3827   ac_ct_LD=$LD
3828   # Extract the first word of "ld", so it can be a program name with args.
3829 set dummy ld; ac_word=$2
3830 echo "$as_me:3830: checking for $ac_word" >&5
3831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3832 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3833   echo $ECHO_N "(cached) $ECHO_C" >&6
3834 else
3835   if test -n "$ac_ct_LD"; then
3836   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3837 else
3838   ac_save_IFS=$IFS; IFS=$ac_path_separator
3839 ac_dummy="$PATH"
3840 for ac_dir in $ac_dummy; do
3841   IFS=$ac_save_IFS
3842   test -z "$ac_dir" && ac_dir=.
3843   $as_executable_p "$ac_dir/$ac_word" || continue
3844 ac_cv_prog_ac_ct_LD="ld"
3845 echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846 break
3847 done
3848
3849   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3850 fi
3851 fi
3852 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3853 if test -n "$ac_ct_LD"; then
3854   echo "$as_me:3854: result: $ac_ct_LD" >&5
3855 echo "${ECHO_T}$ac_ct_LD" >&6
3856 else
3857   echo "$as_me:3857: result: no" >&5
3858 echo "${ECHO_T}no" >&6
3859 fi
3860
3861   LD=$ac_ct_LD
3862 else
3863   LD="$ac_cv_prog_LD"
3864 fi
3865
3866 if test -n "$ac_tool_prefix"; then
3867   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3868 set dummy ${ac_tool_prefix}ar; ac_word=$2
3869 echo "$as_me:3869: checking for $ac_word" >&5
3870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3871 if test "${ac_cv_prog_AR+set}" = set; then
3872   echo $ECHO_N "(cached) $ECHO_C" >&6
3873 else
3874   if test -n "$AR"; then
3875   ac_cv_prog_AR="$AR" # Let the user override the test.
3876 else
3877   ac_save_IFS=$IFS; IFS=$ac_path_separator
3878 ac_dummy="$PATH"
3879 for ac_dir in $ac_dummy; do
3880   IFS=$ac_save_IFS
3881   test -z "$ac_dir" && ac_dir=.
3882   $as_executable_p "$ac_dir/$ac_word" || continue
3883 ac_cv_prog_AR="${ac_tool_prefix}ar"
3884 echo "$as_me:3884: found $ac_dir/$ac_word" >&5
3885 break
3886 done
3887
3888 fi
3889 fi
3890 AR=$ac_cv_prog_AR
3891 if test -n "$AR"; then
3892   echo "$as_me:3892: result: $AR" >&5
3893 echo "${ECHO_T}$AR" >&6
3894 else
3895   echo "$as_me:3895: result: no" >&5
3896 echo "${ECHO_T}no" >&6
3897 fi
3898
3899 fi
3900 if test -z "$ac_cv_prog_AR"; then
3901   ac_ct_AR=$AR
3902   # Extract the first word of "ar", so it can be a program name with args.
3903 set dummy ar; ac_word=$2
3904 echo "$as_me:3904: checking for $ac_word" >&5
3905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3906 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3907   echo $ECHO_N "(cached) $ECHO_C" >&6
3908 else
3909   if test -n "$ac_ct_AR"; then
3910   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3911 else
3912   ac_save_IFS=$IFS; IFS=$ac_path_separator
3913 ac_dummy="$PATH"
3914 for ac_dir in $ac_dummy; do
3915   IFS=$ac_save_IFS
3916   test -z "$ac_dir" && ac_dir=.
3917   $as_executable_p "$ac_dir/$ac_word" || continue
3918 ac_cv_prog_ac_ct_AR="ar"
3919 echo "$as_me:3919: found $ac_dir/$ac_word" >&5
3920 break
3921 done
3922
3923   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3924 fi
3925 fi
3926 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3927 if test -n "$ac_ct_AR"; then
3928   echo "$as_me:3928: result: $ac_ct_AR" >&5
3929 echo "${ECHO_T}$ac_ct_AR" >&6
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933 fi
3934
3935   AR=$ac_ct_AR
3936 else
3937   AR="$ac_cv_prog_AR"
3938 fi
3939
3940 if test -n "$ac_tool_prefix"; then
3941   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3942 set dummy ${ac_tool_prefix}ar; ac_word=$2
3943 echo "$as_me:3943: checking for $ac_word" >&5
3944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3945 if test "${ac_cv_prog_AR+set}" = set; then
3946   echo $ECHO_N "(cached) $ECHO_C" >&6
3947 else
3948   if test -n "$AR"; then
3949   ac_cv_prog_AR="$AR" # Let the user override the test.
3950 else
3951   ac_save_IFS=$IFS; IFS=$ac_path_separator
3952 ac_dummy="$PATH"
3953 for ac_dir in $ac_dummy; do
3954   IFS=$ac_save_IFS
3955   test -z "$ac_dir" && ac_dir=.
3956   $as_executable_p "$ac_dir/$ac_word" || continue
3957 ac_cv_prog_AR="${ac_tool_prefix}ar"
3958 echo "$as_me:3958: found $ac_dir/$ac_word" >&5
3959 break
3960 done
3961
3962 fi
3963 fi
3964 AR=$ac_cv_prog_AR
3965 if test -n "$AR"; then
3966   echo "$as_me:3966: result: $AR" >&5
3967 echo "${ECHO_T}$AR" >&6
3968 else
3969   echo "$as_me:3969: result: no" >&5
3970 echo "${ECHO_T}no" >&6
3971 fi
3972
3973 fi
3974 if test -z "$ac_cv_prog_AR"; then
3975   ac_ct_AR=$AR
3976   # Extract the first word of "ar", so it can be a program name with args.
3977 set dummy ar; ac_word=$2
3978 echo "$as_me:3978: checking for $ac_word" >&5
3979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3980 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3981   echo $ECHO_N "(cached) $ECHO_C" >&6
3982 else
3983   if test -n "$ac_ct_AR"; then
3984   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3985 else
3986   ac_save_IFS=$IFS; IFS=$ac_path_separator
3987 ac_dummy="$PATH"
3988 for ac_dir in $ac_dummy; do
3989   IFS=$ac_save_IFS
3990   test -z "$ac_dir" && ac_dir=.
3991   $as_executable_p "$ac_dir/$ac_word" || continue
3992 ac_cv_prog_ac_ct_AR="ar"
3993 echo "$as_me:3993: found $ac_dir/$ac_word" >&5
3994 break
3995 done
3996
3997   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3998 fi
3999 fi
4000 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4001 if test -n "$ac_ct_AR"; then
4002   echo "$as_me:4002: result: $ac_ct_AR" >&5
4003 echo "${ECHO_T}$ac_ct_AR" >&6
4004 else
4005   echo "$as_me:4005: result: no" >&5
4006 echo "${ECHO_T}no" >&6
4007 fi
4008
4009   AR=$ac_ct_AR
4010 else
4011   AR="$ac_cv_prog_AR"
4012 fi
4013
4014 echo "$as_me:4014: checking for options to update archives" >&5
4015 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4016 if test "${cf_cv_ar_flags+set}" = set; then
4017   echo $ECHO_N "(cached) $ECHO_C" >&6
4018 else
4019
4020         cf_cv_ar_flags=unknown
4021         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4022         do
4023
4024                 # check if $ARFLAGS already contains this choice
4025                 if test "x$ARFLAGS" != "x" ; then
4026                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4027                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4028                                 cf_cv_ar_flags=
4029                                 break
4030                         fi
4031                 fi
4032
4033                 rm -f conftest.$ac_cv_objext
4034                 rm -f conftest.a
4035
4036                 cat >conftest.$ac_ext <<EOF
4037 #line 4037 "configure"
4038 int     testdata[3] = { 123, 456, 789 };
4039 EOF
4040                 if { (eval echo "$as_me:4040: \"$ac_compile\"") >&5
4041   (eval $ac_compile) 2>&5
4042   ac_status=$?
4043   echo "$as_me:4043: \$? = $ac_status" >&5
4044   (exit $ac_status); } ; then
4045                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4046                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4047                         if test -f conftest.a ; then
4048                                 cf_cv_ar_flags=$cf_ar_flags
4049                                 break
4050                         fi
4051                 else
4052                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4053
4054 echo "${as_me:-configure}:4054: testing cannot compile test-program ..." 1>&5
4055
4056                         break
4057                 fi
4058         done
4059         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4060
4061 fi
4062 echo "$as_me:4062: result: $cf_cv_ar_flags" >&5
4063 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4064
4065 if test -n "$ARFLAGS" ; then
4066         if test -n "$cf_cv_ar_flags" ; then
4067                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4068         fi
4069 else
4070         ARFLAGS=$cf_cv_ar_flags
4071 fi
4072
4073 echo "$as_me:4073: checking if you have specified an install-prefix" >&5
4074 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4075
4076 # Check whether --with-install-prefix or --without-install-prefix was given.
4077 if test "${with_install_prefix+set}" = set; then
4078   withval="$with_install_prefix"
4079   case "x$withval" in #(vi
4080         xyes|xno) #(vi
4081                 ;;
4082         *)      DESTDIR="$withval"
4083                 ;;
4084         esac
4085 fi;
4086 echo "$as_me:4086: result: $DESTDIR" >&5
4087 echo "${ECHO_T}$DESTDIR" >&6
4088
4089 ###############################################################################
4090
4091 # If we're cross-compiling, allow the user to override the tools and their
4092 # options.  The configure script is oriented toward identifying the host
4093 # compiler, etc., but we need a build compiler to generate parts of the source.
4094
4095 if test "$cross_compiling" = yes ; then
4096
4097         # defaults that we might want to override
4098         : ${BUILD_CFLAGS:=''}
4099         : ${BUILD_CPPFLAGS:=''}
4100         : ${BUILD_LDFLAGS:=''}
4101         : ${BUILD_LIBS:=''}
4102         : ${BUILD_EXEEXT:='$x'}
4103         : ${BUILD_OBJEXT:='o'}
4104
4105 # Check whether --with-build-cc or --without-build-cc was given.
4106 if test "${with_build_cc+set}" = set; then
4107   withval="$with_build_cc"
4108   BUILD_CC="$withval"
4109 else
4110   for ac_prog in gcc cc cl
4111 do
4112   # Extract the first word of "$ac_prog", so it can be a program name with args.
4113 set dummy $ac_prog; ac_word=$2
4114 echo "$as_me:4114: checking for $ac_word" >&5
4115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4116 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4117   echo $ECHO_N "(cached) $ECHO_C" >&6
4118 else
4119   if test -n "$BUILD_CC"; then
4120   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4121 else
4122   ac_save_IFS=$IFS; IFS=$ac_path_separator
4123 ac_dummy="$PATH"
4124 for ac_dir in $ac_dummy; do
4125   IFS=$ac_save_IFS
4126   test -z "$ac_dir" && ac_dir=.
4127   $as_executable_p "$ac_dir/$ac_word" || continue
4128 ac_cv_prog_BUILD_CC="$ac_prog"
4129 echo "$as_me:4129: found $ac_dir/$ac_word" >&5
4130 break
4131 done
4132
4133 fi
4134 fi
4135 BUILD_CC=$ac_cv_prog_BUILD_CC
4136 if test -n "$BUILD_CC"; then
4137   echo "$as_me:4137: result: $BUILD_CC" >&5
4138 echo "${ECHO_T}$BUILD_CC" >&6
4139 else
4140   echo "$as_me:4140: result: no" >&5
4141 echo "${ECHO_T}no" >&6
4142 fi
4143
4144   test -n "$BUILD_CC" && break
4145 done
4146
4147 fi;
4148         echo "$as_me:4148: checking for native build C compiler" >&5
4149 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4150         echo "$as_me:4150: result: $BUILD_CC" >&5
4151 echo "${ECHO_T}$BUILD_CC" >&6
4152
4153         echo "$as_me:4153: checking for native build C preprocessor" >&5
4154 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4155
4156 # Check whether --with-build-cpp or --without-build-cpp was given.
4157 if test "${with_build_cpp+set}" = set; then
4158   withval="$with_build_cpp"
4159   BUILD_CPP="$withval"
4160 else
4161   BUILD_CPP='${BUILD_CC} -E'
4162 fi;
4163         echo "$as_me:4163: result: $BUILD_CPP" >&5
4164 echo "${ECHO_T}$BUILD_CPP" >&6
4165
4166         echo "$as_me:4166: checking for native build C flags" >&5
4167 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4168
4169 # Check whether --with-build-cflags or --without-build-cflags was given.
4170 if test "${with_build_cflags+set}" = set; then
4171   withval="$with_build_cflags"
4172   BUILD_CFLAGS="$withval"
4173 fi;
4174         echo "$as_me:4174: result: $BUILD_CFLAGS" >&5
4175 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4176
4177         echo "$as_me:4177: checking for native build C preprocessor-flags" >&5
4178 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4179
4180 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4181 if test "${with_build_cppflags+set}" = set; then
4182   withval="$with_build_cppflags"
4183   BUILD_CPPFLAGS="$withval"
4184 fi;
4185         echo "$as_me:4185: result: $BUILD_CPPFLAGS" >&5
4186 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4187
4188         echo "$as_me:4188: checking for native build linker-flags" >&5
4189 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4190
4191 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4192 if test "${with_build_ldflags+set}" = set; then
4193   withval="$with_build_ldflags"
4194   BUILD_LDFLAGS="$withval"
4195 fi;
4196         echo "$as_me:4196: result: $BUILD_LDFLAGS" >&5
4197 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4198
4199         echo "$as_me:4199: checking for native build linker-libraries" >&5
4200 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-build-libs or --without-build-libs was given.
4203 if test "${with_build_libs+set}" = set; then
4204   withval="$with_build_libs"
4205   BUILD_LIBS="$withval"
4206 fi;
4207         echo "$as_me:4207: result: $BUILD_LIBS" >&5
4208 echo "${ECHO_T}$BUILD_LIBS" >&6
4209
4210         # this assumes we're on Unix.
4211         BUILD_EXEEXT=
4212         BUILD_OBJEXT=o
4213
4214         : ${BUILD_CC:='${CC}'}
4215
4216         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4217                 { { echo "$as_me:4217: error: Cross-build requires two compilers.
4218 Use --with-build-cc to specify the native compiler." >&5
4219 echo "$as_me: error: Cross-build requires two compilers.
4220 Use --with-build-cc to specify the native compiler." >&2;}
4221    { (exit 1); exit 1; }; }
4222         fi
4223
4224 else
4225         : ${BUILD_CC:='${CC}'}
4226         : ${BUILD_CPP:='${CPP}'}
4227         : ${BUILD_CFLAGS:='${CFLAGS}'}
4228         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4229         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4230         : ${BUILD_LIBS:='${LIBS}'}
4231         : ${BUILD_EXEEXT:='$x'}
4232         : ${BUILD_OBJEXT:='o'}
4233 fi
4234
4235 ###############################################################################
4236
4237 ### Options to allow the user to specify the set of libraries which are used.
4238 ### Use "--without-normal --with-shared" to allow the default model to be
4239 ### shared, for example.
4240 cf_list_models=""
4241
4242 echo "$as_me:4242: checking if libtool -version-number should be used" >&5
4243 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4244
4245 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4246 if test "${enable_libtool_version+set}" = set; then
4247   enableval="$enable_libtool_version"
4248   test "$enableval" != no && enableval=yes
4249   if test "$enableval" != "yes" ; then
4250     cf_libtool_version=no
4251   else
4252     cf_libtool_version=yes
4253   fi
4254 else
4255   enableval=yes
4256   cf_libtool_version=yes
4257
4258 fi;
4259 echo "$as_me:4259: result: $cf_libtool_version" >&5
4260 echo "${ECHO_T}$cf_libtool_version" >&6
4261
4262 if test "$cf_libtool_version" = yes ; then
4263         LIBTOOL_VERSION="-version-number"
4264 else
4265         LIBTOOL_VERSION="-version-info"
4266 fi
4267
4268 LIBTOOL=
4269
4270 # common library maintenance symbols that are convenient for libtool scripts:
4271 LIB_CREATE='${AR} -cr'
4272 LIB_OBJECT='${OBJECTS}'
4273 LIB_SUFFIX=.a
4274 LIB_PREP="$RANLIB"
4275
4276 # symbols used to prop libtool up to enable it to determine what it should be
4277 # doing:
4278 LIB_CLEAN=
4279 LIB_COMPILE=
4280 LIB_LINK='${CC}'
4281 LIB_INSTALL=
4282 LIB_UNINSTALL=
4283
4284 echo "$as_me:4284: checking if you want to build libraries with libtool" >&5
4285 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4286
4287 # Check whether --with-libtool or --without-libtool was given.
4288 if test "${with_libtool+set}" = set; then
4289   withval="$with_libtool"
4290   with_libtool=$withval
4291 else
4292   with_libtool=no
4293 fi;
4294 echo "$as_me:4294: result: $with_libtool" >&5
4295 echo "${ECHO_T}$with_libtool" >&6
4296 if test "$with_libtool" != "no"; then
4297
4298         if test "$with_libtool" != "yes" ; then
4299
4300 if test "x$prefix" != xNONE; then
4301   cf_path_syntax="$prefix"
4302 else
4303   cf_path_syntax="$ac_default_prefix"
4304 fi
4305
4306 case ".$with_libtool" in #(vi
4307 .\$\(*\)*|.\'*\'*) #(vi
4308   ;;
4309 ..|./*|.\\*) #(vi
4310   ;;
4311 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4312   ;;
4313 .\${*prefix}*|.\${*dir}*) #(vi
4314   eval with_libtool="$with_libtool"
4315   case ".$with_libtool" in #(vi
4316   .NONE/*)
4317     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4318     ;;
4319   esac
4320   ;; #(vi
4321 .no|.NONE/*)
4322   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4323   ;;
4324 *)
4325   { { echo "$as_me:4325: error: expected a pathname, not \"$with_libtool\"" >&5
4326 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4327    { (exit 1); exit 1; }; }
4328   ;;
4329 esac
4330
4331                 LIBTOOL=$with_libtool
4332         else
4333                 if test -n "$ac_tool_prefix"; then
4334   for ac_prog in libtool glibtool
4335   do
4336     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4337 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4338 echo "$as_me:4338: checking for $ac_word" >&5
4339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4340 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343   if test -n "$LIBTOOL"; then
4344   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4345 else
4346   ac_save_IFS=$IFS; IFS=$ac_path_separator
4347 ac_dummy="$PATH"
4348 for ac_dir in $ac_dummy; do
4349   IFS=$ac_save_IFS
4350   test -z "$ac_dir" && ac_dir=.
4351   $as_executable_p "$ac_dir/$ac_word" || continue
4352 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4353 echo "$as_me:4353: found $ac_dir/$ac_word" >&5
4354 break
4355 done
4356
4357 fi
4358 fi
4359 LIBTOOL=$ac_cv_prog_LIBTOOL
4360 if test -n "$LIBTOOL"; then
4361   echo "$as_me:4361: result: $LIBTOOL" >&5
4362 echo "${ECHO_T}$LIBTOOL" >&6
4363 else
4364   echo "$as_me:4364: result: no" >&5
4365 echo "${ECHO_T}no" >&6
4366 fi
4367
4368     test -n "$LIBTOOL" && break
4369   done
4370 fi
4371 if test -z "$LIBTOOL"; then
4372   ac_ct_LIBTOOL=$LIBTOOL
4373   for ac_prog in libtool glibtool
4374 do
4375   # Extract the first word of "$ac_prog", so it can be a program name with args.
4376 set dummy $ac_prog; ac_word=$2
4377 echo "$as_me:4377: checking for $ac_word" >&5
4378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4379 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4380   echo $ECHO_N "(cached) $ECHO_C" >&6
4381 else
4382   if test -n "$ac_ct_LIBTOOL"; then
4383   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4384 else
4385   ac_save_IFS=$IFS; IFS=$ac_path_separator
4386 ac_dummy="$PATH"
4387 for ac_dir in $ac_dummy; do
4388   IFS=$ac_save_IFS
4389   test -z "$ac_dir" && ac_dir=.
4390   $as_executable_p "$ac_dir/$ac_word" || continue
4391 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4392 echo "$as_me:4392: found $ac_dir/$ac_word" >&5
4393 break
4394 done
4395
4396 fi
4397 fi
4398 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4399 if test -n "$ac_ct_LIBTOOL"; then
4400   echo "$as_me:4400: result: $ac_ct_LIBTOOL" >&5
4401 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4402 else
4403   echo "$as_me:4403: result: no" >&5
4404 echo "${ECHO_T}no" >&6
4405 fi
4406
4407   test -n "$ac_ct_LIBTOOL" && break
4408 done
4409 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4410
4411   LIBTOOL=$ac_ct_LIBTOOL
4412 fi
4413
4414 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4415 then
4416         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4417 else
4418         cf_cv_libtool_version=
4419 fi
4420 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4421
4422                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4423                 then
4424
4425 unset ac_cv_prog_ac_ct_LIBTOOL
4426 unset ac_ct_LIBTOOL
4427 unset LIBTOOL
4428
4429                         if test -n "$ac_tool_prefix"; then
4430   for ac_prog in glibtool
4431   do
4432     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4433 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4434 echo "$as_me:4434: checking for $ac_word" >&5
4435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4436 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   if test -n "$LIBTOOL"; then
4440   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4441 else
4442   ac_save_IFS=$IFS; IFS=$ac_path_separator
4443 ac_dummy="$PATH"
4444 for ac_dir in $ac_dummy; do
4445   IFS=$ac_save_IFS
4446   test -z "$ac_dir" && ac_dir=.
4447   $as_executable_p "$ac_dir/$ac_word" || continue
4448 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4449 echo "$as_me:4449: found $ac_dir/$ac_word" >&5
4450 break
4451 done
4452
4453 fi
4454 fi
4455 LIBTOOL=$ac_cv_prog_LIBTOOL
4456 if test -n "$LIBTOOL"; then
4457   echo "$as_me:4457: result: $LIBTOOL" >&5
4458 echo "${ECHO_T}$LIBTOOL" >&6
4459 else
4460   echo "$as_me:4460: result: no" >&5
4461 echo "${ECHO_T}no" >&6
4462 fi
4463
4464     test -n "$LIBTOOL" && break
4465   done
4466 fi
4467 if test -z "$LIBTOOL"; then
4468   ac_ct_LIBTOOL=$LIBTOOL
4469   for ac_prog in glibtool
4470 do
4471   # Extract the first word of "$ac_prog", so it can be a program name with args.
4472 set dummy $ac_prog; ac_word=$2
4473 echo "$as_me:4473: checking for $ac_word" >&5
4474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4475 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4476   echo $ECHO_N "(cached) $ECHO_C" >&6
4477 else
4478   if test -n "$ac_ct_LIBTOOL"; then
4479   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4480 else
4481   ac_save_IFS=$IFS; IFS=$ac_path_separator
4482 ac_dummy="$PATH"
4483 for ac_dir in $ac_dummy; do
4484   IFS=$ac_save_IFS
4485   test -z "$ac_dir" && ac_dir=.
4486   $as_executable_p "$ac_dir/$ac_word" || continue
4487 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4488 echo "$as_me:4488: found $ac_dir/$ac_word" >&5
4489 break
4490 done
4491
4492 fi
4493 fi
4494 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4495 if test -n "$ac_ct_LIBTOOL"; then
4496   echo "$as_me:4496: result: $ac_ct_LIBTOOL" >&5
4497 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4498 else
4499   echo "$as_me:4499: result: no" >&5
4500 echo "${ECHO_T}no" >&6
4501 fi
4502
4503   test -n "$ac_ct_LIBTOOL" && break
4504 done
4505 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4506
4507   LIBTOOL=$ac_ct_LIBTOOL
4508 fi
4509
4510 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4511 then
4512         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4513 else
4514         cf_cv_libtool_version=
4515 fi
4516 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4517
4518                 fi
4519         fi
4520         if test -z "$LIBTOOL" ; then
4521                 { { echo "$as_me:4521: error: Cannot find libtool" >&5
4522 echo "$as_me: error: Cannot find libtool" >&2;}
4523    { (exit 1); exit 1; }; }
4524         fi
4525         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4526         LIB_OBJECT='${OBJECTS:.o=.lo}'
4527         LIB_SUFFIX=.la
4528         LIB_CLEAN='${LIBTOOL} --mode=clean'
4529         LIB_COMPILE='${LIBTOOL} --mode=compile'
4530         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4531         LIB_INSTALL='${LIBTOOL} --mode=install'
4532         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4533         LIB_PREP=:
4534
4535 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4536 then
4537         echo "$as_me:4537: checking version of $LIBTOOL" >&5
4538 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4539
4540 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4541 then
4542         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4543 else
4544         cf_cv_libtool_version=
4545 fi
4546 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4547
4548         echo "$as_me:4548: result: $cf_cv_libtool_version" >&5
4549 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4550         if test -z "$cf_cv_libtool_version" ; then
4551                 { { echo "$as_me:4551: error: This is not GNU libtool" >&5
4552 echo "$as_me: error: This is not GNU libtool" >&2;}
4553    { (exit 1); exit 1; }; }
4554         fi
4555 else
4556         { { echo "$as_me:4556: error: GNU libtool has not been found" >&5
4557 echo "$as_me: error: GNU libtool has not been found" >&2;}
4558    { (exit 1); exit 1; }; }
4559 fi
4560
4561         # special hack to add -no-undefined (which libtool should do for itself)
4562         LT_UNDEF=
4563         case "$cf_cv_system_name" in #(vi
4564         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4565                 LT_UNDEF=-no-undefined
4566                 ;;
4567         esac
4568
4569         # special hack to add --tag option for C++ compiler
4570         case $cf_cv_libtool_version in #(vi
4571         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4572                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4573                 LIBTOOL="$LIBTOOL --tag=CC"
4574                 ;;
4575         *)
4576                 LIBTOOL_CXX="$LIBTOOL"
4577                 ;;
4578         esac
4579 else
4580         LIBTOOL=""
4581         LIBTOOL_CXX=""
4582 fi
4583
4584 test -z "$LIBTOOL" && ECHO_LT=
4585
4586 if test "$with_libtool" != "no" ; then
4587
4588 cf_list_models="$cf_list_models libtool"
4589
4590 else
4591
4592 echo "$as_me:4592: checking if you want to build shared libraries" >&5
4593 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4594
4595 # Check whether --with-shared or --without-shared was given.
4596 if test "${with_shared+set}" = set; then
4597   withval="$with_shared"
4598   with_shared=$withval
4599 else
4600   with_shared=no
4601 fi;
4602 echo "$as_me:4602: result: $with_shared" >&5
4603 echo "${ECHO_T}$with_shared" >&6
4604 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4605
4606 echo "$as_me:4606: checking if you want to build static libraries" >&5
4607 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4608
4609 # Check whether --with-normal or --without-normal was given.
4610 if test "${with_normal+set}" = set; then
4611   withval="$with_normal"
4612   with_normal=$withval
4613 else
4614   with_normal=yes
4615 fi;
4616 echo "$as_me:4616: result: $with_normal" >&5
4617 echo "${ECHO_T}$with_normal" >&6
4618 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4619
4620 echo "$as_me:4620: checking if you want to build debug libraries" >&5
4621 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4622
4623 # Check whether --with-debug or --without-debug was given.
4624 if test "${with_debug+set}" = set; then
4625   withval="$with_debug"
4626   with_debug=$withval
4627 else
4628   with_debug=yes
4629 fi;
4630 echo "$as_me:4630: result: $with_debug" >&5
4631 echo "${ECHO_T}$with_debug" >&6
4632 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4633
4634 echo "$as_me:4634: checking if you want to build profiling libraries" >&5
4635 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4636
4637 # Check whether --with-profile or --without-profile was given.
4638 if test "${with_profile+set}" = set; then
4639   withval="$with_profile"
4640   with_profile=$withval
4641 else
4642   with_profile=no
4643 fi;
4644 echo "$as_me:4644: result: $with_profile" >&5
4645 echo "${ECHO_T}$with_profile" >&6
4646 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4647
4648 fi
4649
4650 if test "X$cf_with_cxx_binding" != Xno; then
4651 if test "x$with_shared" = "xyes"; then
4652 echo "$as_me:4652: checking if you want to build C++ shared libraries" >&5
4653 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4654
4655 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4656 if test "${with_cxx_shared+set}" = set; then
4657   withval="$with_cxx_shared"
4658   with_shared_cxx=$withval
4659 else
4660   with_shared_cxx=no
4661 fi;
4662 echo "$as_me:4662: result: $with_shared_cxx" >&5
4663 echo "${ECHO_T}$with_shared_cxx" >&6
4664 fi
4665 fi
4666
4667 ###############################################################################
4668
4669 echo "$as_me:4669: checking for specified models" >&5
4670 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4671 test -z "$cf_list_models" && cf_list_models=normal
4672 test "$with_libtool" != "no" && cf_list_models=libtool
4673 echo "$as_me:4673: result: $cf_list_models" >&5
4674 echo "${ECHO_T}$cf_list_models" >&6
4675
4676 ### Use the first model as the default, and save its suffix for use in building
4677 ### up test-applications.
4678 echo "$as_me:4678: checking for default model" >&5
4679 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4680 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4681 echo "$as_me:4681: result: $DFT_LWR_MODEL" >&5
4682 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4683
4684 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4685
4686 TICS_NAME=tic
4687
4688 TINFO_NAME=tinfo
4689
4690 LIB_NAME=ncurses
4691
4692 LIB_DIR=../lib
4693 LIB_2ND=../../lib
4694
4695 echo "$as_me:4695: checking if you want to have a library-prefix" >&5
4696 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4697
4698 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4699 if test "${with_lib_prefix+set}" = set; then
4700   withval="$with_lib_prefix"
4701   with_lib_prefix=$withval
4702 else
4703   with_lib_prefix=auto
4704 fi;
4705 echo "$as_me:4705: result: $with_lib_prefix" >&5
4706 echo "${ECHO_T}$with_lib_prefix" >&6
4707
4708 if test $with_lib_prefix = auto
4709 then
4710
4711         case $cf_cv_system_name in #(vi
4712         OS/2*|os2*) #(vi
4713         LIB_PREFIX=''
4714         ;;
4715         *)      LIB_PREFIX='lib'
4716         ;;
4717         esac
4718 cf_prefix=$LIB_PREFIX
4719
4720 elif test $with_lib_prefix = no
4721 then
4722         LIB_PREFIX=
4723 else
4724         LIB_PREFIX=$with_lib_prefix
4725 fi
4726
4727 LIB_SUFFIX=
4728
4729         echo "$as_me:4729: checking for PATH separator" >&5
4730 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4731         case $cf_cv_system_name in
4732         os2*)   PATH_SEPARATOR=';'  ;;
4733         *)      ${PATH_SEPARATOR:=':'}  ;;
4734         esac
4735
4736         echo "$as_me:4736: result: $PATH_SEPARATOR" >&5
4737 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4738
4739 ###############################################################################
4740
4741 echo "$as_me:4741: checking if you want to build a separate terminfo library" >&5
4742 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4743
4744 # Check whether --with-termlib or --without-termlib was given.
4745 if test "${with_termlib+set}" = set; then
4746   withval="$with_termlib"
4747   with_termlib=$withval
4748 else
4749   with_termlib=no
4750 fi;
4751 echo "$as_me:4751: result: $with_termlib" >&5
4752 echo "${ECHO_T}$with_termlib" >&6
4753
4754 echo "$as_me:4754: checking if you want to build a separate tic library" >&5
4755 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4756
4757 # Check whether --with-ticlib or --without-ticlib was given.
4758 if test "${with_ticlib+set}" = set; then
4759   withval="$with_ticlib"
4760   with_ticlib=$withval
4761 else
4762   with_ticlib=no
4763 fi;
4764 echo "$as_me:4764: result: $with_ticlib" >&5
4765 echo "${ECHO_T}$with_ticlib" >&6
4766
4767 ### Checks for special libraries, must be done up-front.
4768 SHLIB_LIST=""
4769
4770 echo "$as_me:4770: checking if you want to link with the GPM mouse library" >&5
4771 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4772
4773 # Check whether --with-gpm or --without-gpm was given.
4774 if test "${with_gpm+set}" = set; then
4775   withval="$with_gpm"
4776   with_gpm=$withval
4777 else
4778   with_gpm=maybe
4779 fi;
4780 echo "$as_me:4780: result: $with_gpm" >&5
4781 echo "${ECHO_T}$with_gpm" >&6
4782
4783 if test "$with_gpm" != no ; then
4784         echo "$as_me:4784: checking for gpm.h" >&5
4785 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4786 if test "${ac_cv_header_gpm_h+set}" = set; then
4787   echo $ECHO_N "(cached) $ECHO_C" >&6
4788 else
4789   cat >conftest.$ac_ext <<_ACEOF
4790 #line 4790 "configure"
4791 #include "confdefs.h"
4792 #include <gpm.h>
4793 _ACEOF
4794 if { (eval echo "$as_me:4794: \"$ac_cpp conftest.$ac_ext\"") >&5
4795   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4796   ac_status=$?
4797   egrep -v '^ *\+' conftest.er1 >conftest.err
4798   rm -f conftest.er1
4799   cat conftest.err >&5
4800   echo "$as_me:4800: \$? = $ac_status" >&5
4801   (exit $ac_status); } >/dev/null; then
4802   if test -s conftest.err; then
4803     ac_cpp_err=$ac_c_preproc_warn_flag
4804   else
4805     ac_cpp_err=
4806   fi
4807 else
4808   ac_cpp_err=yes
4809 fi
4810 if test -z "$ac_cpp_err"; then
4811   ac_cv_header_gpm_h=yes
4812 else
4813   echo "$as_me: failed program was:" >&5
4814   cat conftest.$ac_ext >&5
4815   ac_cv_header_gpm_h=no
4816 fi
4817 rm -f conftest.err conftest.$ac_ext
4818 fi
4819 echo "$as_me:4819: result: $ac_cv_header_gpm_h" >&5
4820 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4821 if test $ac_cv_header_gpm_h = yes; then
4822
4823 cat >>confdefs.h <<\EOF
4824 #define HAVE_GPM_H 1
4825 EOF
4826
4827                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4828                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4829
4830 echo "${as_me:-configure}:4830: testing assuming we really have GPM library ..." 1>&5
4831
4832 cat >>confdefs.h <<\EOF
4833 #define HAVE_LIBGPM 1
4834 EOF
4835
4836                 else
4837                         echo "$as_me:4837: checking for Gpm_Open in -lgpm" >&5
4838 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4839 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4840   echo $ECHO_N "(cached) $ECHO_C" >&6
4841 else
4842   ac_check_lib_save_LIBS=$LIBS
4843 LIBS="-lgpm  $LIBS"
4844 cat >conftest.$ac_ext <<_ACEOF
4845 #line 4845 "configure"
4846 #include "confdefs.h"
4847
4848 /* Override any gcc2 internal prototype to avoid an error.  */
4849 #ifdef __cplusplus
4850 extern "C"
4851 #endif
4852 /* We use char because int might match the return type of a gcc2
4853    builtin and then its argument prototype would still apply.  */
4854 char Gpm_Open ();
4855 int
4856 main ()
4857 {
4858 Gpm_Open ();
4859   ;
4860   return 0;
4861 }
4862 _ACEOF
4863 rm -f conftest.$ac_objext conftest$ac_exeext
4864 if { (eval echo "$as_me:4864: \"$ac_link\"") >&5
4865   (eval $ac_link) 2>&5
4866   ac_status=$?
4867   echo "$as_me:4867: \$? = $ac_status" >&5
4868   (exit $ac_status); } &&
4869          { ac_try='test -s conftest$ac_exeext'
4870   { (eval echo "$as_me:4870: \"$ac_try\"") >&5
4871   (eval $ac_try) 2>&5
4872   ac_status=$?
4873   echo "$as_me:4873: \$? = $ac_status" >&5
4874   (exit $ac_status); }; }; then
4875   ac_cv_lib_gpm_Gpm_Open=yes
4876 else
4877   echo "$as_me: failed program was:" >&5
4878 cat conftest.$ac_ext >&5
4879 ac_cv_lib_gpm_Gpm_Open=no
4880 fi
4881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4882 LIBS=$ac_check_lib_save_LIBS
4883 fi
4884 echo "$as_me:4884: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4885 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4886 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4887   :
4888 else
4889
4890                                 { { echo "$as_me:4890: error: Cannot link with GPM library" >&5
4891 echo "$as_me: error: Cannot link with GPM library" >&2;}
4892    { (exit 1); exit 1; }; }
4893                 fi
4894                 with_gpm=yes
4895
4896 fi
4897
4898 else
4899
4900                 test "$with_gpm" != maybe && { echo "$as_me:4900: WARNING: Cannot find GPM header" >&5
4901 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4902                 with_gpm=no
4903
4904 fi
4905
4906 fi
4907
4908 if test "$with_gpm" != no ; then
4909         echo "$as_me:4909: checking if you want to load GPM dynamically" >&5
4910 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4911
4912 # Check whether --with-dlsym or --without-dlsym was given.
4913 if test "${with_dlsym+set}" = set; then
4914   withval="$with_dlsym"
4915   with_dlsym=$withval
4916 else
4917   with_dlsym=yes
4918 fi;
4919         echo "$as_me:4919: result: $with_dlsym" >&5
4920 echo "${ECHO_T}$with_dlsym" >&6
4921         if test "x$with_dlsym" = xyes ; then
4922
4923 cf_have_dlsym=no
4924 echo "$as_me:4924: checking for dlsym" >&5
4925 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4926 if test "${ac_cv_func_dlsym+set}" = set; then
4927   echo $ECHO_N "(cached) $ECHO_C" >&6
4928 else
4929   cat >conftest.$ac_ext <<_ACEOF
4930 #line 4930 "configure"
4931 #include "confdefs.h"
4932 /* System header to define __stub macros and hopefully few prototypes,
4933     which can conflict with char dlsym (); below.  */
4934 #include <assert.h>
4935 /* Override any gcc2 internal prototype to avoid an error.  */
4936 #ifdef __cplusplus
4937 extern "C"
4938 #endif
4939 /* We use char because int might match the return type of a gcc2
4940    builtin and then its argument prototype would still apply.  */
4941 char dlsym ();
4942 char (*f) ();
4943
4944 int
4945 main ()
4946 {
4947 /* The GNU C library defines this for functions which it implements
4948     to always fail with ENOSYS.  Some functions are actually named
4949     something starting with __ and the normal name is an alias.  */
4950 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4951 choke me
4952 #else
4953 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4954 #endif
4955
4956   ;
4957   return 0;
4958 }
4959 _ACEOF
4960 rm -f conftest.$ac_objext conftest$ac_exeext
4961 if { (eval echo "$as_me:4961: \"$ac_link\"") >&5
4962   (eval $ac_link) 2>&5
4963   ac_status=$?
4964   echo "$as_me:4964: \$? = $ac_status" >&5
4965   (exit $ac_status); } &&
4966          { ac_try='test -s conftest$ac_exeext'
4967   { (eval echo "$as_me:4967: \"$ac_try\"") >&5
4968   (eval $ac_try) 2>&5
4969   ac_status=$?
4970   echo "$as_me:4970: \$? = $ac_status" >&5
4971   (exit $ac_status); }; }; then
4972   ac_cv_func_dlsym=yes
4973 else
4974   echo "$as_me: failed program was:" >&5
4975 cat conftest.$ac_ext >&5
4976 ac_cv_func_dlsym=no
4977 fi
4978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4979 fi
4980 echo "$as_me:4980: result: $ac_cv_func_dlsym" >&5
4981 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4982 if test $ac_cv_func_dlsym = yes; then
4983   cf_have_dlsym=yes
4984 else
4985
4986 cf_have_libdl=no
4987 echo "$as_me:4987: checking for dlsym in -ldl" >&5
4988 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4989 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4990   echo $ECHO_N "(cached) $ECHO_C" >&6
4991 else
4992   ac_check_lib_save_LIBS=$LIBS
4993 LIBS="-ldl  $LIBS"
4994 cat >conftest.$ac_ext <<_ACEOF
4995 #line 4995 "configure"
4996 #include "confdefs.h"
4997
4998 /* Override any gcc2 internal prototype to avoid an error.  */
4999 #ifdef __cplusplus
5000 extern "C"
5001 #endif
5002 /* We use char because int might match the return type of a gcc2
5003    builtin and then its argument prototype would still apply.  */
5004 char dlsym ();
5005 int
5006 main ()
5007 {
5008 dlsym ();
5009   ;
5010   return 0;
5011 }
5012 _ACEOF
5013 rm -f conftest.$ac_objext conftest$ac_exeext
5014 if { (eval echo "$as_me:5014: \"$ac_link\"") >&5
5015   (eval $ac_link) 2>&5
5016   ac_status=$?
5017   echo "$as_me:5017: \$? = $ac_status" >&5
5018   (exit $ac_status); } &&
5019          { ac_try='test -s conftest$ac_exeext'
5020   { (eval echo "$as_me:5020: \"$ac_try\"") >&5
5021   (eval $ac_try) 2>&5
5022   ac_status=$?
5023   echo "$as_me:5023: \$? = $ac_status" >&5
5024   (exit $ac_status); }; }; then
5025   ac_cv_lib_dl_dlsym=yes
5026 else
5027   echo "$as_me: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5029 ac_cv_lib_dl_dlsym=no
5030 fi
5031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5032 LIBS=$ac_check_lib_save_LIBS
5033 fi
5034 echo "$as_me:5034: result: $ac_cv_lib_dl_dlsym" >&5
5035 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5036 if test $ac_cv_lib_dl_dlsym = yes; then
5037
5038         cf_have_dlsym=yes
5039         cf_have_libdl=yes
5040 fi
5041
5042 fi
5043
5044 if test "$cf_have_dlsym" = yes ; then
5045         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5046
5047         echo "$as_me:5047: checking whether able to link to dl*() functions" >&5
5048 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5049         cat >conftest.$ac_ext <<_ACEOF
5050 #line 5050 "configure"
5051 #include "confdefs.h"
5052 #include <dlfcn.h>
5053 int
5054 main ()
5055 {
5056
5057                 void *obj;
5058                 if ((obj = dlopen("filename", 0)) != 0) {
5059                         if (dlsym(obj, "symbolname") == 0) {
5060                         dlclose(obj);
5061                         }
5062                 }
5063   ;
5064   return 0;
5065 }
5066 _ACEOF
5067 rm -f conftest.$ac_objext conftest$ac_exeext
5068 if { (eval echo "$as_me:5068: \"$ac_link\"") >&5
5069   (eval $ac_link) 2>&5
5070   ac_status=$?
5071   echo "$as_me:5071: \$? = $ac_status" >&5
5072   (exit $ac_status); } &&
5073          { ac_try='test -s conftest$ac_exeext'
5074   { (eval echo "$as_me:5074: \"$ac_try\"") >&5
5075   (eval $ac_try) 2>&5
5076   ac_status=$?
5077   echo "$as_me:5077: \$? = $ac_status" >&5
5078   (exit $ac_status); }; }; then
5079
5080 cat >>confdefs.h <<\EOF
5081 #define HAVE_LIBDL 1
5082 EOF
5083
5084 else
5085   echo "$as_me: failed program was:" >&5
5086 cat conftest.$ac_ext >&5
5087
5088                 { { echo "$as_me:5088: error: Cannot link test program for libdl" >&5
5089 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5090    { (exit 1); exit 1; }; }
5091 fi
5092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5093         echo "$as_me:5093: result: ok" >&5
5094 echo "${ECHO_T}ok" >&6
5095 else
5096         { { echo "$as_me:5096: error: Cannot find dlsym function" >&5
5097 echo "$as_me: error: Cannot find dlsym function" >&2;}
5098    { (exit 1); exit 1; }; }
5099 fi
5100
5101                 if test "x$with_gpm" != xyes ; then
5102                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5103
5104 echo "${as_me:-configure}:5104: testing assuming soname for gpm is $with_gpm ..." 1>&5
5105
5106                         cf_cv_gpm_soname="$with_gpm"
5107                 else
5108
5109 echo "$as_me:5109: checking for soname of gpm library" >&5
5110 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5111 if test "${cf_cv_gpm_soname+set}" = set; then
5112   echo $ECHO_N "(cached) $ECHO_C" >&6
5113 else
5114
5115 cf_cv_gpm_soname=unknown
5116 if test "$cross_compiling" != yes ; then
5117 cat >conftest.$ac_ext <<CF_EOF
5118 #include <gpm.h>
5119 int main()
5120 {
5121 if (Gpm_Open(0,0)) Gpm_Close();
5122         ${cf_cv_main_return:-return}(0);
5123 }
5124 CF_EOF
5125 cf_save_LIBS="$LIBS"
5126         LIBS="-lgpm $LIBS"
5127         if { (eval echo "$as_me:5127: \"$ac_compile\"") >&5
5128   (eval $ac_compile) 2>&5
5129   ac_status=$?
5130   echo "$as_me:5130: \$? = $ac_status" >&5
5131   (exit $ac_status); } ; then
5132                 if { (eval echo "$as_me:5132: \"$ac_link\"") >&5
5133   (eval $ac_link) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } ; then
5137                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5138                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5139                 fi
5140         fi
5141 rm -rf conftest*
5142 LIBS="$cf_save_LIBS"
5143 fi
5144
5145 fi
5146 echo "$as_me:5146: result: $cf_cv_gpm_soname" >&5
5147 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5148
5149                 fi
5150                 test "$cf_cv_gpm_soname" != "unknown" &&
5151 cat >>confdefs.h <<EOF
5152 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5153 EOF
5154
5155                 SHLIB_LIST="-ldl $SHLIB_LIST"
5156         else
5157                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5158                 TEST_LIBS="-lgpm $TEST_LIBS"
5159         fi
5160
5161 cat >>confdefs.h <<\EOF
5162 #define HAVE_LIBGPM 1
5163 EOF
5164
5165 echo "$as_me:5165: checking for Gpm_Wgetch in -lgpm" >&5
5166 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5167 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170   ac_check_lib_save_LIBS=$LIBS
5171 LIBS="-lgpm  $LIBS"
5172 cat >conftest.$ac_ext <<_ACEOF
5173 #line 5173 "configure"
5174 #include "confdefs.h"
5175
5176 /* Override any gcc2 internal prototype to avoid an error.  */
5177 #ifdef __cplusplus
5178 extern "C"
5179 #endif
5180 /* We use char because int might match the return type of a gcc2
5181    builtin and then its argument prototype would still apply.  */
5182 char Gpm_Wgetch ();
5183 int
5184 main ()
5185 {
5186 Gpm_Wgetch ();
5187   ;
5188   return 0;
5189 }
5190 _ACEOF
5191 rm -f conftest.$ac_objext conftest$ac_exeext
5192 if { (eval echo "$as_me:5192: \"$ac_link\"") >&5
5193   (eval $ac_link) 2>&5
5194   ac_status=$?
5195   echo "$as_me:5195: \$? = $ac_status" >&5
5196   (exit $ac_status); } &&
5197          { ac_try='test -s conftest$ac_exeext'
5198   { (eval echo "$as_me:5198: \"$ac_try\"") >&5
5199   (eval $ac_try) 2>&5
5200   ac_status=$?
5201   echo "$as_me:5201: \$? = $ac_status" >&5
5202   (exit $ac_status); }; }; then
5203   ac_cv_lib_gpm_Gpm_Wgetch=yes
5204 else
5205   echo "$as_me: failed program was:" >&5
5206 cat conftest.$ac_ext >&5
5207 ac_cv_lib_gpm_Gpm_Wgetch=no
5208 fi
5209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5210 LIBS=$ac_check_lib_save_LIBS
5211 fi
5212 echo "$as_me:5212: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5213 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5214 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5215
5216 echo "$as_me:5216: checking if GPM is weakly bound to curses library" >&5
5217 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5218 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5219   echo $ECHO_N "(cached) $ECHO_C" >&6
5220 else
5221
5222 cf_cv_check_gpm_wgetch=unknown
5223 if test "$cross_compiling" != yes ; then
5224
5225 cat >conftest.$ac_ext <<CF_EOF
5226 #include <gpm.h>
5227 int main()
5228 {
5229         Gpm_Wgetch();
5230         ${cf_cv_main_return:-return}(0);
5231 }
5232 CF_EOF
5233
5234         cf_save_LIBS="$LIBS"
5235         # This only works if we can look at the symbol table.  If a shared
5236         # library is stripped for install, we cannot use that.  So we're forced
5237         # to rely on the static library, noting that some packagers may not
5238         # include it.
5239         LIBS="-static -lgpm -dynamic $LIBS"
5240         if { (eval echo "$as_me:5240: \"$ac_compile\"") >&5
5241   (eval $ac_compile) 2>&5
5242   ac_status=$?
5243   echo "$as_me:5243: \$? = $ac_status" >&5
5244   (exit $ac_status); } ; then
5245                 if { (eval echo "$as_me:5245: \"$ac_link\"") >&5
5246   (eval $ac_link) 2>&5
5247   ac_status=$?
5248   echo "$as_me:5248: \$? = $ac_status" >&5
5249   (exit $ac_status); } ; then
5250                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5251                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5252                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5253                 fi
5254         fi
5255         rm -rf conftest*
5256         LIBS="$cf_save_LIBS"
5257 fi
5258
5259 fi
5260 echo "$as_me:5260: result: $cf_cv_check_gpm_wgetch" >&5
5261 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5262
5263 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5264         { echo "$as_me:5264: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5265 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5266 fi
5267
5268 fi
5269
5270 fi
5271
5272 # not everyone has "test -c"
5273 if test -c /dev/sysmouse 2>/dev/null ; then
5274 echo "$as_me:5274: checking if you want to use sysmouse" >&5
5275 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5276
5277 # Check whether --with-sysmouse or --without-sysmouse was given.
5278 if test "${with_sysmouse+set}" = set; then
5279   withval="$with_sysmouse"
5280   cf_with_sysmouse=$withval
5281 else
5282   cf_with_sysmouse=maybe
5283 fi;
5284         if test "$cf_with_sysmouse" != no ; then
5285         cat >conftest.$ac_ext <<_ACEOF
5286 #line 5286 "configure"
5287 #include "confdefs.h"
5288
5289 #include <osreldate.h>
5290 #if (__FreeBSD_version >= 400017)
5291 #include <sys/consio.h>
5292 #include <sys/fbio.h>
5293 #else
5294 #include <machine/console.h>
5295 #endif
5296
5297 int
5298 main ()
5299 {
5300
5301         struct mouse_info the_mouse;
5302         ioctl(0, CONS_MOUSECTL, &the_mouse);
5303
5304   ;
5305   return 0;
5306 }
5307 _ACEOF
5308 rm -f conftest.$ac_objext
5309 if { (eval echo "$as_me:5309: \"$ac_compile\"") >&5
5310   (eval $ac_compile) 2>&5
5311   ac_status=$?
5312   echo "$as_me:5312: \$? = $ac_status" >&5
5313   (exit $ac_status); } &&
5314          { ac_try='test -s conftest.$ac_objext'
5315   { (eval echo "$as_me:5315: \"$ac_try\"") >&5
5316   (eval $ac_try) 2>&5
5317   ac_status=$?
5318   echo "$as_me:5318: \$? = $ac_status" >&5
5319   (exit $ac_status); }; }; then
5320   cf_with_sysmouse=yes
5321 else
5322   echo "$as_me: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 cf_with_sysmouse=no
5325 fi
5326 rm -f conftest.$ac_objext conftest.$ac_ext
5327         fi
5328 echo "$as_me:5328: result: $cf_with_sysmouse" >&5
5329 echo "${ECHO_T}$cf_with_sysmouse" >&6
5330 test "$cf_with_sysmouse" = yes &&
5331 cat >>confdefs.h <<\EOF
5332 #define USE_SYSMOUSE 1
5333 EOF
5334
5335 fi
5336
5337 if test X"$CC_G_OPT" = X"" ; then
5338         CC_G_OPT='-g'
5339         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5340 fi
5341
5342 if test X"$CXX_G_OPT" = X"" ; then
5343         CXX_G_OPT='-g'
5344         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5345 fi
5346
5347 echo "$as_me:5347: checking for default loader flags" >&5
5348 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5349 case $DFT_LWR_MODEL in
5350 libtool) LD_MODEL=''   ;;
5351 normal)  LD_MODEL=''   ;;
5352 debug)   LD_MODEL=$CC_G_OPT ;;
5353 profile) LD_MODEL='-pg';;
5354 shared)  LD_MODEL=''   ;;
5355 esac
5356 echo "$as_me:5356: result: $LD_MODEL" >&5
5357 echo "${ECHO_T}$LD_MODEL" >&6
5358
5359 case $DFT_LWR_MODEL in
5360 shared)
5361
5362 echo "$as_me:5362: checking if rpath option should be used" >&5
5363 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5364
5365 # Check whether --enable-rpath or --disable-rpath was given.
5366 if test "${enable_rpath+set}" = set; then
5367   enableval="$enable_rpath"
5368   cf_cv_enable_rpath=$enableval
5369 else
5370   cf_cv_enable_rpath=no
5371 fi;
5372 echo "$as_me:5372: result: $cf_cv_enable_rpath" >&5
5373 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5374
5375 echo "$as_me:5375: checking if shared libraries should be relinked during install" >&5
5376 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5377
5378 # Check whether --enable-relink or --disable-relink was given.
5379 if test "${enable_relink+set}" = set; then
5380   enableval="$enable_relink"
5381   cf_cv_do_relink=$enableval
5382 else
5383   cf_cv_do_relink=yes
5384 fi;
5385 echo "$as_me:5385: result: $cf_cv_do_relink" >&5
5386 echo "${ECHO_T}$cf_cv_do_relink" >&6
5387         ;;
5388 esac
5389
5390 LD_RPATH_OPT=
5391 echo "$as_me:5391: checking for an rpath option" >&5
5392 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5393 case $cf_cv_system_name in #(vi
5394 irix*) #(vi
5395         if test "$GCC" = yes; then
5396                 LD_RPATH_OPT="-Wl,-rpath,"
5397         else
5398                 LD_RPATH_OPT="-rpath "
5399         fi
5400         ;;
5401 linux*|gnu*|k*bsd*-gnu) #(vi
5402         LD_RPATH_OPT="-Wl,-rpath,"
5403         ;;
5404 openbsd[2-9].*|mirbsd*) #(vi
5405         LD_RPATH_OPT="-Wl,-rpath,"
5406         ;;
5407 dragonfly*|freebsd*) #(vi
5408         LD_RPATH_OPT="-rpath "
5409         ;;
5410 netbsd*) #(vi
5411         LD_RPATH_OPT="-Wl,-rpath,"
5412         ;;
5413 osf*|mls+*) #(vi
5414         LD_RPATH_OPT="-rpath "
5415         ;;
5416 solaris2*) #(vi
5417         LD_RPATH_OPT="-R"
5418         ;;
5419 *)
5420         ;;
5421 esac
5422 echo "$as_me:5422: result: $LD_RPATH_OPT" >&5
5423 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5424
5425 case "x$LD_RPATH_OPT" in #(vi
5426 x-R*)
5427         echo "$as_me:5427: checking if we need a space after rpath option" >&5
5428 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5429         cf_save_LIBS="$LIBS"
5430         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5431         cat >conftest.$ac_ext <<_ACEOF
5432 #line 5432 "configure"
5433 #include "confdefs.h"
5434
5435 int
5436 main ()
5437 {
5438
5439   ;
5440   return 0;
5441 }
5442 _ACEOF
5443 rm -f conftest.$ac_objext conftest$ac_exeext
5444 if { (eval echo "$as_me:5444: \"$ac_link\"") >&5
5445   (eval $ac_link) 2>&5
5446   ac_status=$?
5447   echo "$as_me:5447: \$? = $ac_status" >&5
5448   (exit $ac_status); } &&
5449          { ac_try='test -s conftest$ac_exeext'
5450   { (eval echo "$as_me:5450: \"$ac_try\"") >&5
5451   (eval $ac_try) 2>&5
5452   ac_status=$?
5453   echo "$as_me:5453: \$? = $ac_status" >&5
5454   (exit $ac_status); }; }; then
5455   cf_rpath_space=no
5456 else
5457   echo "$as_me: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 cf_rpath_space=yes
5460 fi
5461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5462         LIBS="$cf_save_LIBS"
5463         echo "$as_me:5463: result: $cf_rpath_space" >&5
5464 echo "${ECHO_T}$cf_rpath_space" >&6
5465         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5466         ;;
5467 esac
5468
5469         LOCAL_LDFLAGS=
5470         LOCAL_LDFLAGS2=
5471         LD_SHARED_OPTS=
5472         INSTALL_LIB="-m 644"
5473
5474         cf_cv_do_symlinks=no
5475         cf_ld_rpath_opt=
5476         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5477
5478         echo "$as_me:5478: checking if release/abi version should be used for shared libs" >&5
5479 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5480
5481 # Check whether --with-shlib-version or --without-shlib-version was given.
5482 if test "${with_shlib_version+set}" = set; then
5483   withval="$with_shlib_version"
5484   test -z "$withval" && withval=auto
5485         case $withval in #(vi
5486         yes) #(vi
5487                 cf_cv_shlib_version=auto
5488                 ;;
5489         rel|abi|auto|no) #(vi
5490                 cf_cv_shlib_version=$withval
5491                 ;;
5492         *)
5493                 { { echo "$as_me:5493: error: option value must be one of: rel, abi, auto or no" >&5
5494 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5495    { (exit 1); exit 1; }; }
5496                 ;;
5497         esac
5498
5499 else
5500   cf_cv_shlib_version=auto
5501 fi;
5502         echo "$as_me:5502: result: $cf_cv_shlib_version" >&5
5503 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5504
5505         cf_cv_rm_so_locs=no
5506         cf_try_cflags=
5507
5508         # Some less-capable ports of gcc support only -fpic
5509         CC_SHARED_OPTS=
5510         if test "$GCC" = yes
5511         then
5512                 echo "$as_me:5512: checking which $CC option to use" >&5
5513 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5514                 cf_save_CFLAGS="$CFLAGS"
5515                 for CC_SHARED_OPTS in -fPIC -fpic ''
5516                 do
5517                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5518                         cat >conftest.$ac_ext <<_ACEOF
5519 #line 5519 "configure"
5520 #include "confdefs.h"
5521 #include <stdio.h>
5522 int
5523 main ()
5524 {
5525 int x = 1
5526   ;
5527   return 0;
5528 }
5529 _ACEOF
5530 rm -f conftest.$ac_objext
5531 if { (eval echo "$as_me:5531: \"$ac_compile\"") >&5
5532   (eval $ac_compile) 2>&5
5533   ac_status=$?
5534   echo "$as_me:5534: \$? = $ac_status" >&5
5535   (exit $ac_status); } &&
5536          { ac_try='test -s conftest.$ac_objext'
5537   { (eval echo "$as_me:5537: \"$ac_try\"") >&5
5538   (eval $ac_try) 2>&5
5539   ac_status=$?
5540   echo "$as_me:5540: \$? = $ac_status" >&5
5541   (exit $ac_status); }; }; then
5542   break
5543 else
5544   echo "$as_me: failed program was:" >&5
5545 cat conftest.$ac_ext >&5
5546 fi
5547 rm -f conftest.$ac_objext conftest.$ac_ext
5548                 done
5549                 echo "$as_me:5549: result: $CC_SHARED_OPTS" >&5
5550 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5551                 CFLAGS="$cf_save_CFLAGS"
5552         fi
5553
5554         cf_cv_shlib_version_infix=no
5555
5556         case $cf_cv_system_name in #(vi
5557         aix4.3-9*|aix[5-7]*) #(vi
5558                 if test "$GCC" = yes; then
5559                         CC_SHARED_OPTS=
5560                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5561                 else
5562                         # CC_SHARED_OPTS='-qpic=large -G'
5563                         # perhaps "-bM:SRE -bnoentry -bexpall"
5564                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5565                 fi
5566                 ;;
5567         beos*) #(vi
5568                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5569                 ;;
5570         cygwin*) #(vi
5571                 CC_SHARED_OPTS=
5572                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5573                 cf_cv_shlib_version=cygdll
5574                 cf_cv_shlib_version_infix=cygdll
5575                 cat >mk_shared_lib.sh <<-CF_EOF
5576                 #!/bin/sh
5577                 SHARED_LIB=\$1
5578                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5579                 shift
5580                 cat <<-EOF
5581                 Linking shared library
5582                 ** SHARED_LIB \$SHARED_LIB
5583                 ** IMPORT_LIB \$IMPORT_LIB
5584 EOF
5585                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5586 CF_EOF
5587                 chmod +x mk_shared_lib.sh
5588                 ;;
5589         darwin*) #(vi
5590                 cf_try_cflags="no-cpp-precomp"
5591                 CC_SHARED_OPTS="-dynamic"
5592                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5593                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5594                 cf_cv_shlib_version_infix=yes
5595                 echo "$as_me:5595: checking if ld -search_paths_first works" >&5
5596 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5597 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5598   echo $ECHO_N "(cached) $ECHO_C" >&6
5599 else
5600
5601                         cf_save_LDFLAGS=$LDFLAGS
5602                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5603                         cat >conftest.$ac_ext <<_ACEOF
5604 #line 5604 "configure"
5605 #include "confdefs.h"
5606
5607 int
5608 main ()
5609 {
5610 int i;
5611   ;
5612   return 0;
5613 }
5614 _ACEOF
5615 rm -f conftest.$ac_objext conftest$ac_exeext
5616 if { (eval echo "$as_me:5616: \"$ac_link\"") >&5
5617   (eval $ac_link) 2>&5
5618   ac_status=$?
5619   echo "$as_me:5619: \$? = $ac_status" >&5
5620   (exit $ac_status); } &&
5621          { ac_try='test -s conftest$ac_exeext'
5622   { (eval echo "$as_me:5622: \"$ac_try\"") >&5
5623   (eval $ac_try) 2>&5
5624   ac_status=$?
5625   echo "$as_me:5625: \$? = $ac_status" >&5
5626   (exit $ac_status); }; }; then
5627   cf_cv_ldflags_search_paths_first=yes
5628 else
5629   echo "$as_me: failed program was:" >&5
5630 cat conftest.$ac_ext >&5
5631 cf_cv_ldflags_search_paths_first=no
5632 fi
5633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5634                                 LDFLAGS=$cf_save_LDFLAGS
5635 fi
5636 echo "$as_me:5636: result: $cf_cv_ldflags_search_paths_first" >&5
5637 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5638                 if test $cf_cv_ldflags_search_paths_first = yes; then
5639                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5640                 fi
5641                 ;;
5642         hpux[7-8]*) #(vi
5643                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5644                 if test "$GCC" != yes; then
5645                         CC_SHARED_OPTS='+Z'
5646                 fi
5647                 MK_SHARED_LIB='${LD} -b -o $@'
5648                 INSTALL_LIB="-m 555"
5649                 ;;
5650         hpux*) #(vi
5651                 # (tested with gcc 2.7.2 -- I don't have c89)
5652                 if test "$GCC" = yes; then
5653                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5654                 else
5655                         CC_SHARED_OPTS='+Z'
5656                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5657                 fi
5658                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5659                 # HP-UX shared libraries must be executable, and should be
5660                 # readonly to exploit a quirk in the memory manager.
5661                 INSTALL_LIB="-m 555"
5662                 ;;
5663         interix*)
5664                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5665                 if test "$cf_cv_shlib_version" = rel; then
5666                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5667                 else
5668                         cf_shared_soname='`basename `'
5669                 fi
5670                 CC_SHARED_OPTS=
5671                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5672                 ;;
5673         irix*) #(vi
5674                 if test "$cf_cv_enable_rpath" = yes ; then
5675                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5676                 fi
5677                 # tested with IRIX 5.2 and 'cc'.
5678                 if test "$GCC" != yes; then
5679                         CC_SHARED_OPTS='-KPIC'
5680                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5681                 else
5682                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5683                 fi
5684                 cf_cv_rm_so_locs=yes
5685                 ;;
5686         linux*|gnu*|k*bsd*-gnu) #(vi
5687                 if test "$DFT_LWR_MODEL" = "shared" ; then
5688                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5689                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5690                 fi
5691                 if test "$cf_cv_enable_rpath" = yes ; then
5692                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5693                 fi
5694
5695         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5696         if test "$cf_cv_shlib_version" = rel; then
5697                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5698         else
5699                 cf_cv_shared_soname='`basename $@`'
5700         fi
5701
5702                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5703                 ;;
5704         mingw*) #(vi
5705                 cf_cv_shlib_version=mingw
5706                 cf_cv_shlib_version_infix=mingw
5707                 CC_SHARED_OPTS=
5708                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5709                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5710                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5711                 cat >mk_shared_lib.sh <<-CF_EOF
5712                 #!/bin/sh
5713                 SHARED_LIB=\$1
5714                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5715                 shift
5716                 cat <<-EOF
5717                 Linking shared library
5718                 ** SHARED_LIB \$SHARED_LIB
5719                 ** IMPORT_LIB \$IMPORT_LIB
5720 EOF
5721                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5722 CF_EOF
5723                 chmod +x mk_shared_lib.sh
5724                 ;;
5725         openbsd[2-9].*|mirbsd*) #(vi
5726                 if test "$DFT_LWR_MODEL" = "shared" ; then
5727                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5728                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5729                 fi
5730                 if test "$cf_cv_enable_rpath" = yes ; then
5731                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5732                 fi
5733                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5734
5735         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5736         if test "$cf_cv_shlib_version" = rel; then
5737                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5738         else
5739                 cf_cv_shared_soname='`basename $@`'
5740         fi
5741
5742                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5743                 ;;
5744         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5745                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5746                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5747                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5748                 ;;
5749         dragonfly*|freebsd*) #(vi
5750                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5751                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5752                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5753                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5754                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5755                 fi
5756
5757         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5758         if test "$cf_cv_shlib_version" = rel; then
5759                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5760         else
5761                 cf_cv_shared_soname='`basename $@`'
5762         fi
5763
5764                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5765                 ;;
5766         netbsd*) #(vi
5767                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5768                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5769                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5770                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5771                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5772                         if test "$cf_cv_shlib_version" = auto; then
5773                         if test -f /usr/libexec/ld.elf_so; then
5774                                 cf_cv_shlib_version=abi
5775                         else
5776                                 cf_cv_shlib_version=rel
5777                         fi
5778                         fi
5779
5780         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5781         if test "$cf_cv_shlib_version" = rel; then
5782                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5783         else
5784                 cf_cv_shared_soname='`basename $@`'
5785         fi
5786
5787                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5788                 else
5789                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5790                 fi
5791                 ;;
5792         osf*|mls+*) #(vi
5793                 # tested with OSF/1 V3.2 and 'cc'
5794                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5795                 # link with shared libs).
5796                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5797                 case $host_os in #(vi
5798                 osf4*)
5799                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5800                         ;;
5801                 esac
5802                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5803                 if test "$DFT_LWR_MODEL" = "shared" ; then
5804                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5805                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5806                 fi
5807                 cf_cv_rm_so_locs=yes
5808                 ;;
5809         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5810                 # tested with osr5.0.5
5811                 if test "$GCC" != yes; then
5812                         CC_SHARED_OPTS='-belf -KPIC'
5813                 fi
5814                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5815                 if test "$cf_cv_enable_rpath" = yes ; then
5816                         # only way is to set LD_RUN_PATH but no switch for it
5817                         RUN_PATH=$libdir
5818                 fi
5819                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5820                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5821                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5822                 ;;
5823         sunos4*) #(vi
5824                 # tested with SunOS 4.1.1 and gcc 2.7.0
5825                 if test "$GCC" != yes; then
5826                         CC_SHARED_OPTS='-KPIC'
5827                 fi
5828                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5829                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5830                 ;;
5831         solaris2*) #(vi
5832                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5833                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5834                 if test "$DFT_LWR_MODEL" = "shared" ; then
5835                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5836                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5837                 fi
5838                 if test "$cf_cv_enable_rpath" = yes ; then
5839                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5840                 fi
5841
5842         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5843         if test "$cf_cv_shlib_version" = rel; then
5844                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5845         else
5846                 cf_cv_shared_soname='`basename $@`'
5847         fi
5848
5849                 if test "$GCC" != yes; then
5850                         cf_save_CFLAGS="$CFLAGS"
5851                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5852                         do
5853                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5854                                 cat >conftest.$ac_ext <<_ACEOF
5855 #line 5855 "configure"
5856 #include "confdefs.h"
5857 #include <stdio.h>
5858 int
5859 main ()
5860 {
5861 printf("Hello\n");
5862   ;
5863   return 0;
5864 }
5865 _ACEOF
5866 rm -f conftest.$ac_objext
5867 if { (eval echo "$as_me:5867: \"$ac_compile\"") >&5
5868   (eval $ac_compile) 2>&5
5869   ac_status=$?
5870   echo "$as_me:5870: \$? = $ac_status" >&5
5871   (exit $ac_status); } &&
5872          { ac_try='test -s conftest.$ac_objext'
5873   { (eval echo "$as_me:5873: \"$ac_try\"") >&5
5874   (eval $ac_try) 2>&5
5875   ac_status=$?
5876   echo "$as_me:5876: \$? = $ac_status" >&5
5877   (exit $ac_status); }; }; then
5878   break
5879 else
5880   echo "$as_me: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5882 fi
5883 rm -f conftest.$ac_objext conftest.$ac_ext
5884                         done
5885                         CFLAGS="$cf_save_CFLAGS"
5886                         CC_SHARED_OPTS=$cf_shared_opts
5887                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5888                 else
5889                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5890                 fi
5891                 ;;
5892         sysv5uw7*|unix_sv*) #(vi
5893                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5894                 if test "$GCC" != yes; then
5895                         CC_SHARED_OPTS='-KPIC'
5896                 fi
5897                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5898                 ;;
5899         *)
5900                 CC_SHARED_OPTS='unknown'
5901                 MK_SHARED_LIB='echo unknown'
5902                 ;;
5903         esac
5904
5905         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5906         case "$cf_cv_shlib_version" in #(vi
5907         rel|abi)
5908                 case "$MK_SHARED_LIB" in #(vi
5909                 *'-o $@') #(vi
5910                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5911                         ;;
5912                 *)
5913                         { echo "$as_me:5913: WARNING: ignored --with-shlib-version" >&5
5914 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5915                         ;;
5916                 esac
5917                 ;;
5918         esac
5919
5920         if test -n "$cf_try_cflags"
5921         then
5922 cat > conftest.$ac_ext <<EOF
5923 #line 5923 "${as_me:-configure}"
5924 #include <stdio.h>
5925 int main(int argc, char *argv[])
5926 {
5927         printf("hello\n");
5928         return (argv[argc-1] == 0) ;
5929 }
5930 EOF
5931                 cf_save_CFLAGS="$CFLAGS"
5932                 for cf_opt in $cf_try_cflags
5933                 do
5934                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5935                         echo "$as_me:5935: checking if CFLAGS option -$cf_opt works" >&5
5936 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5937                         if { (eval echo "$as_me:5937: \"$ac_compile\"") >&5
5938   (eval $ac_compile) 2>&5
5939   ac_status=$?
5940   echo "$as_me:5940: \$? = $ac_status" >&5
5941   (exit $ac_status); }; then
5942                                 echo "$as_me:5942: result: yes" >&5
5943 echo "${ECHO_T}yes" >&6
5944                                 cf_save_CFLAGS="$CFLAGS"
5945                         else
5946                                 echo "$as_me:5946: result: no" >&5
5947 echo "${ECHO_T}no" >&6
5948                         fi
5949                 done
5950                 CFLAGS="$cf_save_CFLAGS"
5951         fi
5952
5953         # RPATH_LIST is a colon-separated list of directories
5954         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5955         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5956
5957         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5958
5959 echo "${as_me:-configure}:5959: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5960
5961         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5962
5963 echo "${as_me:-configure}:5963: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5964
5965 if test "$CC_SHARED_OPTS" = "unknown"; then
5966         for model in $cf_list_models; do
5967                 if test "$model" = "shared"; then
5968                         { { echo "$as_me:5968: error: Shared libraries are not supported in this version" >&5
5969 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5970    { (exit 1); exit 1; }; }
5971                 fi
5972         done
5973 fi
5974
5975 ### If we're building with rpath, try to link non-standard libs that way too.
5976 if test "$DFT_LWR_MODEL" = "shared"; then
5977
5978 echo "$as_me:5978: checking if rpath-hack should be disabled" >&5
5979 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5980
5981 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5982 if test "${enable_rpath_hack+set}" = set; then
5983   enableval="$enable_rpath_hack"
5984   test "$enableval" != no && enableval=yes
5985   if test "$enableval" != "yes" ; then
5986     cf_disable_rpath_hack=yes
5987   else
5988     cf_disable_rpath_hack=no
5989   fi
5990 else
5991   enableval=yes
5992   cf_disable_rpath_hack=no
5993
5994 fi;
5995 echo "$as_me:5995: result: $cf_disable_rpath_hack" >&5
5996 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5997 if test "$cf_disable_rpath_hack" = no ; then
5998
5999 echo "$as_me:5999: checking for updated LDFLAGS" >&5
6000 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6001 if test -n "$LD_RPATH_OPT" ; then
6002         echo "$as_me:6002: result: maybe" >&5
6003 echo "${ECHO_T}maybe" >&6
6004
6005         for ac_prog in ldd
6006 do
6007   # Extract the first word of "$ac_prog", so it can be a program name with args.
6008 set dummy $ac_prog; ac_word=$2
6009 echo "$as_me:6009: checking for $ac_word" >&5
6010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6011 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6012   echo $ECHO_N "(cached) $ECHO_C" >&6
6013 else
6014   if test -n "$cf_ldd_prog"; then
6015   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6016 else
6017   ac_save_IFS=$IFS; IFS=$ac_path_separator
6018 ac_dummy="$PATH"
6019 for ac_dir in $ac_dummy; do
6020   IFS=$ac_save_IFS
6021   test -z "$ac_dir" && ac_dir=.
6022   $as_executable_p "$ac_dir/$ac_word" || continue
6023 ac_cv_prog_cf_ldd_prog="$ac_prog"
6024 echo "$as_me:6024: found $ac_dir/$ac_word" >&5
6025 break
6026 done
6027
6028 fi
6029 fi
6030 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6031 if test -n "$cf_ldd_prog"; then
6032   echo "$as_me:6032: result: $cf_ldd_prog" >&5
6033 echo "${ECHO_T}$cf_ldd_prog" >&6
6034 else
6035   echo "$as_me:6035: result: no" >&5
6036 echo "${ECHO_T}no" >&6
6037 fi
6038
6039   test -n "$cf_ldd_prog" && break
6040 done
6041 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6042
6043         cf_rpath_list="/usr/lib /lib"
6044         if test "$cf_ldd_prog" != no
6045         then
6046                 cf_rpath_oops=
6047
6048 cat >conftest.$ac_ext <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6051 #include <stdio.h>
6052 int
6053 main ()
6054 {
6055 printf("Hello");
6056   ;
6057   return 0;
6058 }
6059 _ACEOF
6060 rm -f conftest.$ac_objext conftest$ac_exeext
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062   (eval $ac_link) 2>&5
6063   ac_status=$?
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit $ac_status); } &&
6066          { ac_try='test -s conftest$ac_exeext'
6067   { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit $ac_status); }; }; then
6072   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6073                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6074 else
6075   echo "$as_me: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 fi
6078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6079
6080                 # If we passed the link-test, but get a "not found" on a given library,
6081                 # this could be due to inept reconfiguration of gcc to make it only
6082                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6083                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6084                 # /usr/local libraries.
6085                 if test -n "$cf_rpath_oops"
6086                 then
6087                         for cf_rpath_src in $cf_rpath_oops
6088                         do
6089                                 for cf_rpath_dir in \
6090                                         /usr/local \
6091                                         /usr/pkg \
6092                                         /opt/sfw
6093                                 do
6094                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6095                                         then
6096                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6097
6098 echo "${as_me:-configure}:6098: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6099
6100                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6101                                                 break
6102                                         fi
6103                                 done
6104                         done
6105                 fi
6106         fi
6107
6108         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6109
6110 echo "${as_me:-configure}:6110: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6111
6112 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6113
6114 echo "${as_me:-configure}:6114: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6115
6116 cf_rpath_dst=
6117 for cf_rpath_src in $LDFLAGS
6118 do
6119         case $cf_rpath_src in #(vi
6120         -L*) #(vi
6121
6122                 # check if this refers to a directory which we will ignore
6123                 cf_rpath_skip=no
6124                 if test -n "$cf_rpath_list"
6125                 then
6126                         for cf_rpath_item in $cf_rpath_list
6127                         do
6128                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6129                                 then
6130                                         cf_rpath_skip=yes
6131                                         break
6132                                 fi
6133                         done
6134                 fi
6135
6136                 if test "$cf_rpath_skip" = no
6137                 then
6138                         # transform the option
6139                         if test "$LD_RPATH_OPT" = "-R " ; then
6140                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6141                         else
6142                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6143                         fi
6144
6145                         # if we have not already added this, add it now
6146                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6147                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6148                         then
6149                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6150
6151 echo "${as_me:-configure}:6151: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6152
6153                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6154                         fi
6155                 fi
6156                 ;;
6157         esac
6158         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6159 done
6160 LDFLAGS=$cf_rpath_dst
6161
6162 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6163
6164 echo "${as_me:-configure}:6164: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6165
6166 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6167
6168 echo "${as_me:-configure}:6168: testing ...checking LIBS $LIBS ..." 1>&5
6169
6170 cf_rpath_dst=
6171 for cf_rpath_src in $LIBS
6172 do
6173         case $cf_rpath_src in #(vi
6174         -L*) #(vi
6175
6176                 # check if this refers to a directory which we will ignore
6177                 cf_rpath_skip=no
6178                 if test -n "$cf_rpath_list"
6179                 then
6180                         for cf_rpath_item in $cf_rpath_list
6181                         do
6182                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6183                                 then
6184                                         cf_rpath_skip=yes
6185                                         break
6186                                 fi
6187                         done
6188                 fi
6189
6190                 if test "$cf_rpath_skip" = no
6191                 then
6192                         # transform the option
6193                         if test "$LD_RPATH_OPT" = "-R " ; then
6194                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6195                         else
6196                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6197                         fi
6198
6199                         # if we have not already added this, add it now
6200                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6201                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6202                         then
6203                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6204
6205 echo "${as_me:-configure}:6205: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6206
6207                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6208                         fi
6209                 fi
6210                 ;;
6211         esac
6212         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6213 done
6214 LIBS=$cf_rpath_dst
6215
6216 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6217
6218 echo "${as_me:-configure}:6218: testing ...checked LIBS $LIBS ..." 1>&5
6219
6220         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6221
6222 echo "${as_me:-configure}:6222: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6223
6224 fi
6225
6226 fi
6227
6228 fi
6229
6230 ###############################################################################
6231
6232 ###     use option --disable-overwrite to leave out the link to -lcurses
6233 echo "$as_me:6233: checking if you wish to install ncurses overwriting curses" >&5
6234 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6235
6236 # Check whether --enable-overwrite or --disable-overwrite was given.
6237 if test "${enable_overwrite+set}" = set; then
6238   enableval="$enable_overwrite"
6239   with_overwrite=$enableval
6240 else
6241   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6242 fi;
6243 echo "$as_me:6243: result: $with_overwrite" >&5
6244 echo "${ECHO_T}$with_overwrite" >&6
6245
6246 echo "$as_me:6246: checking if external terminfo-database is used" >&5
6247 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6248
6249 # Check whether --enable-database or --disable-database was given.
6250 if test "${enable_database+set}" = set; then
6251   enableval="$enable_database"
6252   use_database=$enableval
6253 else
6254   use_database=yes
6255 fi;
6256 echo "$as_me:6256: result: $use_database" >&5
6257 echo "${ECHO_T}$use_database" >&6
6258
6259 case $host_os in #(vi
6260 os2*) #(vi
6261         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6262         ;;
6263 *) #(vi
6264         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6265         ;;
6266 esac
6267
6268 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 for intptr_t" >&5
16456 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16457 if test "${ac_cv_type_intptr_t+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 $ac_includes_default
16464 int
16465 main ()
16466 {
16467 if ((intptr_t *) 0)
16468   return 0;
16469 if (sizeof (intptr_t))
16470   return 0;
16471   ;
16472   return 0;
16473 }
16474 _ACEOF
16475 rm -f conftest.$ac_objext
16476 if { (eval echo "$as_me:16476: \"$ac_compile\"") >&5
16477   (eval $ac_compile) 2>&5
16478   ac_status=$?
16479   echo "$as_me:16479: \$? = $ac_status" >&5
16480   (exit $ac_status); } &&
16481          { ac_try='test -s conftest.$ac_objext'
16482   { (eval echo "$as_me:16482: \"$ac_try\"") >&5
16483   (eval $ac_try) 2>&5
16484   ac_status=$?
16485   echo "$as_me:16485: \$? = $ac_status" >&5
16486   (exit $ac_status); }; }; then
16487   ac_cv_type_intptr_t=yes
16488 else
16489   echo "$as_me: failed program was:" >&5
16490 cat conftest.$ac_ext >&5
16491 ac_cv_type_intptr_t=no
16492 fi
16493 rm -f conftest.$ac_objext conftest.$ac_ext
16494 fi
16495 echo "$as_me:16495: result: $ac_cv_type_intptr_t" >&5
16496 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16497 if test $ac_cv_type_intptr_t = yes; then
16498   :
16499 else
16500
16501 cat >>confdefs.h <<EOF
16502 #define intptr_t long
16503 EOF
16504
16505 fi
16506
16507 echo "$as_me:16507: checking for type sigaction_t" >&5
16508 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16509 if test "${cf_cv_type_sigaction+set}" = set; then
16510   echo $ECHO_N "(cached) $ECHO_C" >&6
16511 else
16512
16513         cat >conftest.$ac_ext <<_ACEOF
16514 #line 16514 "configure"
16515 #include "confdefs.h"
16516
16517 #include <signal.h>
16518 int
16519 main ()
16520 {
16521 sigaction_t x
16522   ;
16523   return 0;
16524 }
16525 _ACEOF
16526 rm -f conftest.$ac_objext
16527 if { (eval echo "$as_me:16527: \"$ac_compile\"") >&5
16528   (eval $ac_compile) 2>&5
16529   ac_status=$?
16530   echo "$as_me:16530: \$? = $ac_status" >&5
16531   (exit $ac_status); } &&
16532          { ac_try='test -s conftest.$ac_objext'
16533   { (eval echo "$as_me:16533: \"$ac_try\"") >&5
16534   (eval $ac_try) 2>&5
16535   ac_status=$?
16536   echo "$as_me:16536: \$? = $ac_status" >&5
16537   (exit $ac_status); }; }; then
16538   cf_cv_type_sigaction=yes
16539 else
16540   echo "$as_me: failed program was:" >&5
16541 cat conftest.$ac_ext >&5
16542 cf_cv_type_sigaction=no
16543 fi
16544 rm -f conftest.$ac_objext conftest.$ac_ext
16545 fi
16546
16547 echo "$as_me:16547: result: $cf_cv_type_sigaction" >&5
16548 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16549 test "$cf_cv_type_sigaction" = yes &&
16550 cat >>confdefs.h <<\EOF
16551 #define HAVE_TYPE_SIGACTION 1
16552 EOF
16553
16554 echo "$as_me:16554: checking declaration of size-change" >&5
16555 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16556 if test "${cf_cv_sizechange+set}" = set; then
16557   echo $ECHO_N "(cached) $ECHO_C" >&6
16558 else
16559
16560     cf_cv_sizechange=unknown
16561     cf_save_CPPFLAGS="$CPPFLAGS"
16562
16563 for cf_opts in "" "NEED_PTEM_H"
16564 do
16565
16566     CPPFLAGS="$cf_save_CPPFLAGS"
16567     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16568     cat >conftest.$ac_ext <<_ACEOF
16569 #line 16569 "configure"
16570 #include "confdefs.h"
16571 #include <sys/types.h>
16572 #ifdef HAVE_TERMIOS_H
16573 #include <termios.h>
16574 #else
16575 #ifdef HAVE_TERMIO_H
16576 #include <termio.h>
16577 #endif
16578 #endif
16579 #ifdef NEED_PTEM_H
16580 /* This is a workaround for SCO:  they neglected to define struct winsize in
16581  * termios.h -- it's only in termio.h and ptem.h
16582  */
16583 #include        <sys/stream.h>
16584 #include        <sys/ptem.h>
16585 #endif
16586 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16587 #include <sys/ioctl.h>
16588 #endif
16589
16590 int
16591 main ()
16592 {
16593
16594 #ifdef TIOCGSIZE
16595         struct ttysize win;     /* FIXME: what system is this? */
16596         int y = win.ts_lines;
16597         int x = win.ts_cols;
16598 #else
16599 #ifdef TIOCGWINSZ
16600         struct winsize win;
16601         int y = win.ws_row;
16602         int x = win.ws_col;
16603 #else
16604         no TIOCGSIZE or TIOCGWINSZ
16605 #endif /* TIOCGWINSZ */
16606 #endif /* TIOCGSIZE */
16607
16608   ;
16609   return 0;
16610 }
16611 _ACEOF
16612 rm -f conftest.$ac_objext
16613 if { (eval echo "$as_me:16613: \"$ac_compile\"") >&5
16614   (eval $ac_compile) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit $ac_status); } &&
16618          { ac_try='test -s conftest.$ac_objext'
16619   { (eval echo "$as_me:16619: \"$ac_try\"") >&5
16620   (eval $ac_try) 2>&5
16621   ac_status=$?
16622   echo "$as_me:16622: \$? = $ac_status" >&5
16623   (exit $ac_status); }; }; then
16624   cf_cv_sizechange=yes
16625 else
16626   echo "$as_me: failed program was:" >&5
16627 cat conftest.$ac_ext >&5
16628 cf_cv_sizechange=no
16629 fi
16630 rm -f conftest.$ac_objext conftest.$ac_ext
16631
16632         CPPFLAGS="$cf_save_CPPFLAGS"
16633         if test "$cf_cv_sizechange" = yes ; then
16634                 echo "size-change succeeded ($cf_opts)" >&5
16635                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16636                 break
16637         fi
16638 done
16639
16640 fi
16641 echo "$as_me:16641: result: $cf_cv_sizechange" >&5
16642 echo "${ECHO_T}$cf_cv_sizechange" >&6
16643 if test "$cf_cv_sizechange" != no ; then
16644
16645 cat >>confdefs.h <<\EOF
16646 #define HAVE_SIZECHANGE 1
16647 EOF
16648
16649         case $cf_cv_sizechange in #(vi
16650         NEED*)
16651                 cat >>confdefs.h <<EOF
16652 #define $cf_cv_sizechange  1
16653 EOF
16654
16655                 ;;
16656         esac
16657 fi
16658
16659 echo "$as_me:16659: checking for memmove" >&5
16660 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16661 if test "${ac_cv_func_memmove+set}" = set; then
16662   echo $ECHO_N "(cached) $ECHO_C" >&6
16663 else
16664   cat >conftest.$ac_ext <<_ACEOF
16665 #line 16665 "configure"
16666 #include "confdefs.h"
16667 /* System header to define __stub macros and hopefully few prototypes,
16668     which can conflict with char memmove (); below.  */
16669 #include <assert.h>
16670 /* Override any gcc2 internal prototype to avoid an error.  */
16671 #ifdef __cplusplus
16672 extern "C"
16673 #endif
16674 /* We use char because int might match the return type of a gcc2
16675    builtin and then its argument prototype would still apply.  */
16676 char memmove ();
16677 char (*f) ();
16678
16679 int
16680 main ()
16681 {
16682 /* The GNU C library defines this for functions which it implements
16683     to always fail with ENOSYS.  Some functions are actually named
16684     something starting with __ and the normal name is an alias.  */
16685 #if defined (__stub_memmove) || defined (__stub___memmove)
16686 choke me
16687 #else
16688 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16689 #endif
16690
16691   ;
16692   return 0;
16693 }
16694 _ACEOF
16695 rm -f conftest.$ac_objext conftest$ac_exeext
16696 if { (eval echo "$as_me:16696: \"$ac_link\"") >&5
16697   (eval $ac_link) 2>&5
16698   ac_status=$?
16699   echo "$as_me:16699: \$? = $ac_status" >&5
16700   (exit $ac_status); } &&
16701          { ac_try='test -s conftest$ac_exeext'
16702   { (eval echo "$as_me:16702: \"$ac_try\"") >&5
16703   (eval $ac_try) 2>&5
16704   ac_status=$?
16705   echo "$as_me:16705: \$? = $ac_status" >&5
16706   (exit $ac_status); }; }; then
16707   ac_cv_func_memmove=yes
16708 else
16709   echo "$as_me: failed program was:" >&5
16710 cat conftest.$ac_ext >&5
16711 ac_cv_func_memmove=no
16712 fi
16713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16714 fi
16715 echo "$as_me:16715: result: $ac_cv_func_memmove" >&5
16716 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16717 if test $ac_cv_func_memmove = yes; then
16718   :
16719 else
16720
16721 echo "$as_me:16721: checking for bcopy" >&5
16722 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16723 if test "${ac_cv_func_bcopy+set}" = set; then
16724   echo $ECHO_N "(cached) $ECHO_C" >&6
16725 else
16726   cat >conftest.$ac_ext <<_ACEOF
16727 #line 16727 "configure"
16728 #include "confdefs.h"
16729 /* System header to define __stub macros and hopefully few prototypes,
16730     which can conflict with char bcopy (); below.  */
16731 #include <assert.h>
16732 /* Override any gcc2 internal prototype to avoid an error.  */
16733 #ifdef __cplusplus
16734 extern "C"
16735 #endif
16736 /* We use char because int might match the return type of a gcc2
16737    builtin and then its argument prototype would still apply.  */
16738 char bcopy ();
16739 char (*f) ();
16740
16741 int
16742 main ()
16743 {
16744 /* The GNU C library defines this for functions which it implements
16745     to always fail with ENOSYS.  Some functions are actually named
16746     something starting with __ and the normal name is an alias.  */
16747 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16748 choke me
16749 #else
16750 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16751 #endif
16752
16753   ;
16754   return 0;
16755 }
16756 _ACEOF
16757 rm -f conftest.$ac_objext conftest$ac_exeext
16758 if { (eval echo "$as_me:16758: \"$ac_link\"") >&5
16759   (eval $ac_link) 2>&5
16760   ac_status=$?
16761   echo "$as_me:16761: \$? = $ac_status" >&5
16762   (exit $ac_status); } &&
16763          { ac_try='test -s conftest$ac_exeext'
16764   { (eval echo "$as_me:16764: \"$ac_try\"") >&5
16765   (eval $ac_try) 2>&5
16766   ac_status=$?
16767   echo "$as_me:16767: \$? = $ac_status" >&5
16768   (exit $ac_status); }; }; then
16769   ac_cv_func_bcopy=yes
16770 else
16771   echo "$as_me: failed program was:" >&5
16772 cat conftest.$ac_ext >&5
16773 ac_cv_func_bcopy=no
16774 fi
16775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16776 fi
16777 echo "$as_me:16777: result: $ac_cv_func_bcopy" >&5
16778 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16779 if test $ac_cv_func_bcopy = yes; then
16780
16781         echo "$as_me:16781: checking if bcopy does overlapping moves" >&5
16782 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16783 if test "${cf_cv_good_bcopy+set}" = set; then
16784   echo $ECHO_N "(cached) $ECHO_C" >&6
16785 else
16786
16787                 if test "$cross_compiling" = yes; then
16788   cf_cv_good_bcopy=unknown
16789 else
16790   cat >conftest.$ac_ext <<_ACEOF
16791 #line 16791 "configure"
16792 #include "confdefs.h"
16793
16794 int main() {
16795         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16796         char temp[40];
16797         bcopy(data, temp, sizeof(data));
16798         bcopy(temp+10, temp, 15);
16799         bcopy(temp+5, temp+15, 10);
16800         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16801 }
16802
16803 _ACEOF
16804 rm -f conftest$ac_exeext
16805 if { (eval echo "$as_me:16805: \"$ac_link\"") >&5
16806   (eval $ac_link) 2>&5
16807   ac_status=$?
16808   echo "$as_me:16808: \$? = $ac_status" >&5
16809   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16810   { (eval echo "$as_me:16810: \"$ac_try\"") >&5
16811   (eval $ac_try) 2>&5
16812   ac_status=$?
16813   echo "$as_me:16813: \$? = $ac_status" >&5
16814   (exit $ac_status); }; }; then
16815   cf_cv_good_bcopy=yes
16816 else
16817   echo "$as_me: program exited with status $ac_status" >&5
16818 echo "$as_me: failed program was:" >&5
16819 cat conftest.$ac_ext >&5
16820 cf_cv_good_bcopy=no
16821 fi
16822 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16823 fi
16824
16825 fi
16826 echo "$as_me:16826: result: $cf_cv_good_bcopy" >&5
16827 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16828
16829 else
16830   cf_cv_good_bcopy=no
16831 fi
16832
16833         if test "$cf_cv_good_bcopy" = yes ; then
16834
16835 cat >>confdefs.h <<\EOF
16836 #define USE_OK_BCOPY 1
16837 EOF
16838
16839         else
16840
16841 cat >>confdefs.h <<\EOF
16842 #define USE_MY_MEMMOVE 1
16843 EOF
16844
16845         fi
16846
16847 fi
16848
16849 echo "$as_me:16849: checking if poll really works" >&5
16850 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16851 if test "${cf_cv_working_poll+set}" = set; then
16852   echo $ECHO_N "(cached) $ECHO_C" >&6
16853 else
16854
16855 if test "$cross_compiling" = yes; then
16856   cf_cv_working_poll=unknown
16857 else
16858   cat >conftest.$ac_ext <<_ACEOF
16859 #line 16859 "configure"
16860 #include "confdefs.h"
16861
16862 #include <stdlib.h>
16863 #include <stdio.h>
16864 #include <unistd.h>
16865 #include <fcntl.h>
16866 #ifdef HAVE_POLL_H
16867 #include <poll.h>
16868 #else
16869 #include <sys/poll.h>
16870 #endif
16871 int main() {
16872         struct pollfd myfds;
16873         int ret;
16874
16875         /* check for Darwin bug with respect to "devices" */
16876         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16877         if (myfds.fd < 0)
16878                 myfds.fd = 0;
16879         myfds.events = POLLIN;
16880         myfds.revents = 0;
16881
16882         ret = poll(&myfds, 1, 100);
16883
16884         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16885                 ret = -1;
16886         } else {
16887                 int fd = 0;
16888                 if (!isatty(fd)) {
16889                         fd = open("/dev/tty", 2);       /* O_RDWR */
16890                 }
16891
16892                 if (fd >= 0) {
16893                         /* also check with standard input */
16894                         myfds.fd = fd;
16895                         myfds.events = POLLIN;
16896                         myfds.revents = 0;
16897                         ret = poll(&myfds, 1, 100);
16898                 } else {
16899                         ret = -1;
16900                 }
16901         }
16902         ${cf_cv_main_return:-return}(ret < 0);
16903 }
16904 _ACEOF
16905 rm -f conftest$ac_exeext
16906 if { (eval echo "$as_me:16906: \"$ac_link\"") >&5
16907   (eval $ac_link) 2>&5
16908   ac_status=$?
16909   echo "$as_me:16909: \$? = $ac_status" >&5
16910   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16911   { (eval echo "$as_me:16911: \"$ac_try\"") >&5
16912   (eval $ac_try) 2>&5
16913   ac_status=$?
16914   echo "$as_me:16914: \$? = $ac_status" >&5
16915   (exit $ac_status); }; }; then
16916   cf_cv_working_poll=yes
16917 else
16918   echo "$as_me: program exited with status $ac_status" >&5
16919 echo "$as_me: failed program was:" >&5
16920 cat conftest.$ac_ext >&5
16921 cf_cv_working_poll=no
16922 fi
16923 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16924 fi
16925 fi
16926 echo "$as_me:16926: result: $cf_cv_working_poll" >&5
16927 echo "${ECHO_T}$cf_cv_working_poll" >&6
16928 test "$cf_cv_working_poll" = "yes" &&
16929 cat >>confdefs.h <<\EOF
16930 #define HAVE_WORKING_POLL 1
16931 EOF
16932
16933 echo "$as_me:16933: checking for va_copy" >&5
16934 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16935 if test "${cf_cv_have_va_copy+set}" = set; then
16936   echo $ECHO_N "(cached) $ECHO_C" >&6
16937 else
16938
16939 cat >conftest.$ac_ext <<_ACEOF
16940 #line 16940 "configure"
16941 #include "confdefs.h"
16942
16943 #include <stdarg.h>
16944
16945 int
16946 main ()
16947 {
16948
16949         static va_list dst;
16950         static va_list src;
16951         va_copy(dst, src)
16952   ;
16953   return 0;
16954 }
16955 _ACEOF
16956 rm -f conftest.$ac_objext conftest$ac_exeext
16957 if { (eval echo "$as_me:16957: \"$ac_link\"") >&5
16958   (eval $ac_link) 2>&5
16959   ac_status=$?
16960   echo "$as_me:16960: \$? = $ac_status" >&5
16961   (exit $ac_status); } &&
16962          { ac_try='test -s conftest$ac_exeext'
16963   { (eval echo "$as_me:16963: \"$ac_try\"") >&5
16964   (eval $ac_try) 2>&5
16965   ac_status=$?
16966   echo "$as_me:16966: \$? = $ac_status" >&5
16967   (exit $ac_status); }; }; then
16968   cf_cv_have_va_copy=yes
16969 else
16970   echo "$as_me: failed program was:" >&5
16971 cat conftest.$ac_ext >&5
16972 cf_cv_have_va_copy=no
16973 fi
16974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16975 fi
16976 echo "$as_me:16976: result: $cf_cv_have_va_copy" >&5
16977 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16978
16979 test "$cf_cv_have_va_copy" = yes &&
16980 cat >>confdefs.h <<\EOF
16981 #define HAVE_VA_COPY 1
16982 EOF
16983
16984 echo "$as_me:16984: checking for __va_copy" >&5
16985 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16986 if test "${cf_cv_have___va_copy+set}" = set; then
16987   echo $ECHO_N "(cached) $ECHO_C" >&6
16988 else
16989
16990 cat >conftest.$ac_ext <<_ACEOF
16991 #line 16991 "configure"
16992 #include "confdefs.h"
16993
16994 #include <stdarg.h>
16995
16996 int
16997 main ()
16998 {
16999
17000         static va_list dst;
17001         static va_list src;
17002         __va_copy(dst, src)
17003   ;
17004   return 0;
17005 }
17006 _ACEOF
17007 rm -f conftest.$ac_objext conftest$ac_exeext
17008 if { (eval echo "$as_me:17008: \"$ac_link\"") >&5
17009   (eval $ac_link) 2>&5
17010   ac_status=$?
17011   echo "$as_me:17011: \$? = $ac_status" >&5
17012   (exit $ac_status); } &&
17013          { ac_try='test -s conftest$ac_exeext'
17014   { (eval echo "$as_me:17014: \"$ac_try\"") >&5
17015   (eval $ac_try) 2>&5
17016   ac_status=$?
17017   echo "$as_me:17017: \$? = $ac_status" >&5
17018   (exit $ac_status); }; }; then
17019   cf_cv_have___va_copy=yes
17020 else
17021   echo "$as_me: failed program was:" >&5
17022 cat conftest.$ac_ext >&5
17023 cf_cv_have___va_copy=no
17024 fi
17025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17026 fi
17027 echo "$as_me:17027: result: $cf_cv_have___va_copy" >&5
17028 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17029
17030 test "$cf_cv_have___va_copy" = yes &&
17031 cat >>confdefs.h <<\EOF
17032 #define HAVE___VA_COPY 1
17033 EOF
17034
17035 echo "$as_me:17035: checking for pid_t" >&5
17036 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17037 if test "${ac_cv_type_pid_t+set}" = set; then
17038   echo $ECHO_N "(cached) $ECHO_C" >&6
17039 else
17040   cat >conftest.$ac_ext <<_ACEOF
17041 #line 17041 "configure"
17042 #include "confdefs.h"
17043 $ac_includes_default
17044 int
17045 main ()
17046 {
17047 if ((pid_t *) 0)
17048   return 0;
17049 if (sizeof (pid_t))
17050   return 0;
17051   ;
17052   return 0;
17053 }
17054 _ACEOF
17055 rm -f conftest.$ac_objext
17056 if { (eval echo "$as_me:17056: \"$ac_compile\"") >&5
17057   (eval $ac_compile) 2>&5
17058   ac_status=$?
17059   echo "$as_me:17059: \$? = $ac_status" >&5
17060   (exit $ac_status); } &&
17061          { ac_try='test -s conftest.$ac_objext'
17062   { (eval echo "$as_me:17062: \"$ac_try\"") >&5
17063   (eval $ac_try) 2>&5
17064   ac_status=$?
17065   echo "$as_me:17065: \$? = $ac_status" >&5
17066   (exit $ac_status); }; }; then
17067   ac_cv_type_pid_t=yes
17068 else
17069   echo "$as_me: failed program was:" >&5
17070 cat conftest.$ac_ext >&5
17071 ac_cv_type_pid_t=no
17072 fi
17073 rm -f conftest.$ac_objext conftest.$ac_ext
17074 fi
17075 echo "$as_me:17075: result: $ac_cv_type_pid_t" >&5
17076 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17077 if test $ac_cv_type_pid_t = yes; then
17078   :
17079 else
17080
17081 cat >>confdefs.h <<EOF
17082 #define pid_t int
17083 EOF
17084
17085 fi
17086
17087 for ac_header in unistd.h vfork.h
17088 do
17089 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17090 echo "$as_me:17090: checking for $ac_header" >&5
17091 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17092 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17093   echo $ECHO_N "(cached) $ECHO_C" >&6
17094 else
17095   cat >conftest.$ac_ext <<_ACEOF
17096 #line 17096 "configure"
17097 #include "confdefs.h"
17098 #include <$ac_header>
17099 _ACEOF
17100 if { (eval echo "$as_me:17100: \"$ac_cpp conftest.$ac_ext\"") >&5
17101   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17102   ac_status=$?
17103   egrep -v '^ *\+' conftest.er1 >conftest.err
17104   rm -f conftest.er1
17105   cat conftest.err >&5
17106   echo "$as_me:17106: \$? = $ac_status" >&5
17107   (exit $ac_status); } >/dev/null; then
17108   if test -s conftest.err; then
17109     ac_cpp_err=$ac_c_preproc_warn_flag
17110   else
17111     ac_cpp_err=
17112   fi
17113 else
17114   ac_cpp_err=yes
17115 fi
17116 if test -z "$ac_cpp_err"; then
17117   eval "$as_ac_Header=yes"
17118 else
17119   echo "$as_me: failed program was:" >&5
17120   cat conftest.$ac_ext >&5
17121   eval "$as_ac_Header=no"
17122 fi
17123 rm -f conftest.err conftest.$ac_ext
17124 fi
17125 echo "$as_me:17125: result: `eval echo '${'$as_ac_Header'}'`" >&5
17126 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17127 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17128   cat >>confdefs.h <<EOF
17129 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17130 EOF
17131
17132 fi
17133 done
17134
17135 for ac_func in fork vfork
17136 do
17137 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17138 echo "$as_me:17138: checking for $ac_func" >&5
17139 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17140 if eval "test \"\${$as_ac_var+set}\" = set"; then
17141   echo $ECHO_N "(cached) $ECHO_C" >&6
17142 else
17143   cat >conftest.$ac_ext <<_ACEOF
17144 #line 17144 "configure"
17145 #include "confdefs.h"
17146 /* System header to define __stub macros and hopefully few prototypes,
17147     which can conflict with char $ac_func (); below.  */
17148 #include <assert.h>
17149 /* Override any gcc2 internal prototype to avoid an error.  */
17150 #ifdef __cplusplus
17151 extern "C"
17152 #endif
17153 /* We use char because int might match the return type of a gcc2
17154    builtin and then its argument prototype would still apply.  */
17155 char $ac_func ();
17156 char (*f) ();
17157
17158 int
17159 main ()
17160 {
17161 /* The GNU C library defines this for functions which it implements
17162     to always fail with ENOSYS.  Some functions are actually named
17163     something starting with __ and the normal name is an alias.  */
17164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17165 choke me
17166 #else
17167 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17168 #endif
17169
17170   ;
17171   return 0;
17172 }
17173 _ACEOF
17174 rm -f conftest.$ac_objext conftest$ac_exeext
17175 if { (eval echo "$as_me:17175: \"$ac_link\"") >&5
17176   (eval $ac_link) 2>&5
17177   ac_status=$?
17178   echo "$as_me:17178: \$? = $ac_status" >&5
17179   (exit $ac_status); } &&
17180          { ac_try='test -s conftest$ac_exeext'
17181   { (eval echo "$as_me:17181: \"$ac_try\"") >&5
17182   (eval $ac_try) 2>&5
17183   ac_status=$?
17184   echo "$as_me:17184: \$? = $ac_status" >&5
17185   (exit $ac_status); }; }; then
17186   eval "$as_ac_var=yes"
17187 else
17188   echo "$as_me: failed program was:" >&5
17189 cat conftest.$ac_ext >&5
17190 eval "$as_ac_var=no"
17191 fi
17192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17193 fi
17194 echo "$as_me:17194: result: `eval echo '${'$as_ac_var'}'`" >&5
17195 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17196 if test `eval echo '${'$as_ac_var'}'` = yes; then
17197   cat >>confdefs.h <<EOF
17198 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17199 EOF
17200
17201 fi
17202 done
17203
17204 ac_cv_func_fork_works=$ac_cv_func_fork
17205 if test "x$ac_cv_func_fork" = xyes; then
17206   echo "$as_me:17206: checking for working fork" >&5
17207 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17208 if test "${ac_cv_func_fork_works+set}" = set; then
17209   echo $ECHO_N "(cached) $ECHO_C" >&6
17210 else
17211   if test "$cross_compiling" = yes; then
17212   ac_cv_func_fork_works=cross
17213 else
17214   cat >conftest.$ac_ext <<_ACEOF
17215 /* By Rüdiger Kuhlmann. */
17216       #include <sys/types.h>
17217       #if HAVE_UNISTD_H
17218       # include <unistd.h>
17219       #endif
17220       /* Some systems only have a dummy stub for fork() */
17221       int main ()
17222       {
17223         if (fork() < 0)
17224           $ac_main_return (1);
17225         $ac_main_return (0);
17226       }
17227 _ACEOF
17228 rm -f 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); } && { ac_try='./conftest$ac_exeext'
17234   { (eval echo "$as_me:17234: \"$ac_try\"") >&5
17235   (eval $ac_try) 2>&5
17236   ac_status=$?
17237   echo "$as_me:17237: \$? = $ac_status" >&5
17238   (exit $ac_status); }; }; then
17239   ac_cv_func_fork_works=yes
17240 else
17241   echo "$as_me: program exited with status $ac_status" >&5
17242 echo "$as_me: failed program was:" >&5
17243 cat conftest.$ac_ext >&5
17244 ac_cv_func_fork_works=no
17245 fi
17246 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17247 fi
17248 fi
17249 echo "$as_me:17249: result: $ac_cv_func_fork_works" >&5
17250 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17251
17252 fi
17253 if test "x$ac_cv_func_fork_works" = xcross; then
17254   case $host in
17255     *-*-amigaos* | *-*-msdosdjgpp*)
17256       # Override, as these systems have only a dummy fork() stub
17257       ac_cv_func_fork_works=no
17258       ;;
17259     *)
17260       ac_cv_func_fork_works=yes
17261       ;;
17262   esac
17263   { echo "$as_me:17263: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17264 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17265 fi
17266 ac_cv_func_vfork_works=$ac_cv_func_vfork
17267 if test "x$ac_cv_func_vfork" = xyes; then
17268   echo "$as_me:17268: checking for working vfork" >&5
17269 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17270 if test "${ac_cv_func_vfork_works+set}" = set; then
17271   echo $ECHO_N "(cached) $ECHO_C" >&6
17272 else
17273   if test "$cross_compiling" = yes; then
17274   ac_cv_func_vfork_works=cross
17275 else
17276   cat >conftest.$ac_ext <<_ACEOF
17277 #line 17277 "configure"
17278 #include "confdefs.h"
17279 /* Thanks to Paul Eggert for this test.  */
17280 #include <stdio.h>
17281 #include <sys/types.h>
17282 #include <sys/stat.h>
17283 #if HAVE_UNISTD_H
17284 # include <unistd.h>
17285 #endif
17286 #if HAVE_VFORK_H
17287 # include <vfork.h>
17288 #endif
17289 /* On some sparc systems, changes by the child to local and incoming
17290    argument registers are propagated back to the parent.  The compiler
17291    is told about this with #include <vfork.h>, but some compilers
17292    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17293    static variable whose address is put into a register that is
17294    clobbered by the vfork.  */
17295 static
17296 #ifdef __cplusplus
17297 sparc_address_test (int arg)
17298 # else
17299 sparc_address_test (arg) int arg;
17300 #endif
17301 {
17302   static pid_t child;
17303   if (!child) {
17304     child = vfork ();
17305     if (child < 0) {
17306       perror ("vfork");
17307       _exit(2);
17308     }
17309     if (!child) {
17310       arg = getpid();
17311       write(-1, "", 0);
17312       _exit (arg);
17313     }
17314   }
17315 }
17316
17317 int
17318 main ()
17319 {
17320   pid_t parent = getpid ();
17321   pid_t child;
17322
17323   sparc_address_test ();
17324
17325   child = vfork ();
17326
17327   if (child == 0) {
17328     /* Here is another test for sparc vfork register problems.  This
17329        test uses lots of local variables, at least as many local
17330        variables as main has allocated so far including compiler
17331        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17332        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17333        reuse the register of parent for one of the local variables,
17334        since it will think that parent can't possibly be used any more
17335        in this routine.  Assigning to the local variable will thus
17336        munge parent in the parent process.  */
17337     pid_t
17338       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17339       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17340     /* Convince the compiler that p..p7 are live; otherwise, it might
17341        use the same hardware register for all 8 local variables.  */
17342     if (p != p1 || p != p2 || p != p3 || p != p4
17343         || p != p5 || p != p6 || p != p7)
17344       _exit(1);
17345
17346     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17347        from child file descriptors.  If the child closes a descriptor
17348        before it execs or exits, this munges the parent's descriptor
17349        as well.  Test for this by closing stdout in the child.  */
17350     _exit(close(fileno(stdout)) != 0);
17351   } else {
17352     int status;
17353     struct stat st;
17354
17355     while (wait(&status) != child)
17356       ;
17357     $ac_main_return(
17358          /* Was there some problem with vforking?  */
17359          child < 0
17360
17361          /* Did the child fail?  (This shouldn't happen.)  */
17362          || status
17363
17364          /* Did the vfork/compiler bug occur?  */
17365          || parent != getpid()
17366
17367          /* Did the file descriptor bug occur?  */
17368          || fstat(fileno(stdout), &st) != 0
17369          );
17370   }
17371 }
17372 _ACEOF
17373 rm -f conftest$ac_exeext
17374 if { (eval echo "$as_me:17374: \"$ac_link\"") >&5
17375   (eval $ac_link) 2>&5
17376   ac_status=$?
17377   echo "$as_me:17377: \$? = $ac_status" >&5
17378   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17379   { (eval echo "$as_me:17379: \"$ac_try\"") >&5
17380   (eval $ac_try) 2>&5
17381   ac_status=$?
17382   echo "$as_me:17382: \$? = $ac_status" >&5
17383   (exit $ac_status); }; }; then
17384   ac_cv_func_vfork_works=yes
17385 else
17386   echo "$as_me: program exited with status $ac_status" >&5
17387 echo "$as_me: failed program was:" >&5
17388 cat conftest.$ac_ext >&5
17389 ac_cv_func_vfork_works=no
17390 fi
17391 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17392 fi
17393 fi
17394 echo "$as_me:17394: result: $ac_cv_func_vfork_works" >&5
17395 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17396
17397 fi;
17398 if test "x$ac_cv_func_fork_works" = xcross; then
17399   ac_cv_func_vfork_works=ac_cv_func_vfork
17400   { echo "$as_me:17400: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17401 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17402 fi
17403
17404 if test "x$ac_cv_func_vfork_works" = xyes; then
17405
17406 cat >>confdefs.h <<\EOF
17407 #define HAVE_WORKING_VFORK 1
17408 EOF
17409
17410 else
17411
17412 cat >>confdefs.h <<\EOF
17413 #define vfork fork
17414 EOF
17415
17416 fi
17417 if test "x$ac_cv_func_fork_works" = xyes; then
17418
17419 cat >>confdefs.h <<\EOF
17420 #define HAVE_WORKING_FORK 1
17421 EOF
17422
17423 fi
17424
17425 # special check for test/ditto.c
17426
17427 echo "$as_me:17427: checking for openpty in -lutil" >&5
17428 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17429 if test "${ac_cv_lib_util_openpty+set}" = set; then
17430   echo $ECHO_N "(cached) $ECHO_C" >&6
17431 else
17432   ac_check_lib_save_LIBS=$LIBS
17433 LIBS="-lutil  $LIBS"
17434 cat >conftest.$ac_ext <<_ACEOF
17435 #line 17435 "configure"
17436 #include "confdefs.h"
17437
17438 /* Override any gcc2 internal prototype to avoid an error.  */
17439 #ifdef __cplusplus
17440 extern "C"
17441 #endif
17442 /* We use char because int might match the return type of a gcc2
17443    builtin and then its argument prototype would still apply.  */
17444 char openpty ();
17445 int
17446 main ()
17447 {
17448 openpty ();
17449   ;
17450   return 0;
17451 }
17452 _ACEOF
17453 rm -f conftest.$ac_objext conftest$ac_exeext
17454 if { (eval echo "$as_me:17454: \"$ac_link\"") >&5
17455   (eval $ac_link) 2>&5
17456   ac_status=$?
17457   echo "$as_me:17457: \$? = $ac_status" >&5
17458   (exit $ac_status); } &&
17459          { ac_try='test -s conftest$ac_exeext'
17460   { (eval echo "$as_me:17460: \"$ac_try\"") >&5
17461   (eval $ac_try) 2>&5
17462   ac_status=$?
17463   echo "$as_me:17463: \$? = $ac_status" >&5
17464   (exit $ac_status); }; }; then
17465   ac_cv_lib_util_openpty=yes
17466 else
17467   echo "$as_me: failed program was:" >&5
17468 cat conftest.$ac_ext >&5
17469 ac_cv_lib_util_openpty=no
17470 fi
17471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17472 LIBS=$ac_check_lib_save_LIBS
17473 fi
17474 echo "$as_me:17474: result: $ac_cv_lib_util_openpty" >&5
17475 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17476 if test $ac_cv_lib_util_openpty = yes; then
17477   cf_cv_lib_util=yes
17478 else
17479   cf_cv_lib_util=no
17480 fi
17481
17482 echo "$as_me:17482: checking for openpty header" >&5
17483 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17484 if test "${cf_cv_func_openpty+set}" = set; then
17485   echo $ECHO_N "(cached) $ECHO_C" >&6
17486 else
17487
17488     cf_save_LIBS="$LIBS"
17489     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17490     for cf_header in pty.h libutil.h util.h
17491     do
17492     cat >conftest.$ac_ext <<_ACEOF
17493 #line 17493 "configure"
17494 #include "confdefs.h"
17495
17496 #include <$cf_header>
17497
17498 int
17499 main ()
17500 {
17501
17502     int x = openpty((int *)0, (int *)0, (char *)0,
17503                    (struct termios *)0, (struct winsize *)0);
17504
17505   ;
17506   return 0;
17507 }
17508 _ACEOF
17509 rm -f conftest.$ac_objext conftest$ac_exeext
17510 if { (eval echo "$as_me:17510: \"$ac_link\"") >&5
17511   (eval $ac_link) 2>&5
17512   ac_status=$?
17513   echo "$as_me:17513: \$? = $ac_status" >&5
17514   (exit $ac_status); } &&
17515          { ac_try='test -s conftest$ac_exeext'
17516   { (eval echo "$as_me:17516: \"$ac_try\"") >&5
17517   (eval $ac_try) 2>&5
17518   ac_status=$?
17519   echo "$as_me:17519: \$? = $ac_status" >&5
17520   (exit $ac_status); }; }; then
17521
17522         cf_cv_func_openpty=$cf_header
17523         break
17524
17525 else
17526   echo "$as_me: failed program was:" >&5
17527 cat conftest.$ac_ext >&5
17528
17529         cf_cv_func_openpty=no
17530
17531 fi
17532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17533     done
17534     LIBS="$cf_save_LIBS"
17535
17536 fi
17537 echo "$as_me:17537: result: $cf_cv_func_openpty" >&5
17538 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17539
17540 if test "$cf_cv_func_openpty" != no ; then
17541
17542 cat >>confdefs.h <<EOF
17543 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17544 EOF
17545
17546 cat >>confdefs.h <<\EOF
17547 #define USE_XTERM_PTY 1
17548 EOF
17549
17550     if test "x$cf_cv_lib_util" = xyes ; then
17551         TEST_LIBS="-lutil $TEST_LIBS"
17552     fi
17553 fi
17554
17555 if test "$with_hashed_db" != no ; then
17556
17557 cat >>confdefs.h <<\EOF
17558 #define USE_HASHED_DB 1
17559 EOF
17560
17561 case $with_hashed_db in #(vi
17562 yes|*able*) #(vi
17563     ;;
17564 *)
17565     if test -d "$with_hashed_db" ; then
17566
17567 if test -n "$with_hashed_db/include" ; then
17568   for cf_add_incdir in $with_hashed_db/include
17569   do
17570         while test $cf_add_incdir != /usr/include
17571         do
17572           if test -d $cf_add_incdir
17573           then
17574                 cf_have_incdir=no
17575                 if test -n "$CFLAGS$CPPFLAGS" ; then
17576                   # a loop is needed to ensure we can add subdirs of existing dirs
17577                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17578                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17579                           cf_have_incdir=yes; break
17580                         fi
17581                   done
17582                 fi
17583
17584                 if test "$cf_have_incdir" = no ; then
17585                   if test "$cf_add_incdir" = /usr/local/include ; then
17586                         if test "$GCC" = yes
17587                         then
17588                           cf_save_CPPFLAGS=$CPPFLAGS
17589                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17590                           cat >conftest.$ac_ext <<_ACEOF
17591 #line 17591 "configure"
17592 #include "confdefs.h"
17593 #include <stdio.h>
17594 int
17595 main ()
17596 {
17597 printf("Hello")
17598   ;
17599   return 0;
17600 }
17601 _ACEOF
17602 rm -f conftest.$ac_objext
17603 if { (eval echo "$as_me:17603: \"$ac_compile\"") >&5
17604   (eval $ac_compile) 2>&5
17605   ac_status=$?
17606   echo "$as_me:17606: \$? = $ac_status" >&5
17607   (exit $ac_status); } &&
17608          { ac_try='test -s conftest.$ac_objext'
17609   { (eval echo "$as_me:17609: \"$ac_try\"") >&5
17610   (eval $ac_try) 2>&5
17611   ac_status=$?
17612   echo "$as_me:17612: \$? = $ac_status" >&5
17613   (exit $ac_status); }; }; then
17614   :
17615 else
17616   echo "$as_me: failed program was:" >&5
17617 cat conftest.$ac_ext >&5
17618 cf_have_incdir=yes
17619 fi
17620 rm -f conftest.$ac_objext conftest.$ac_ext
17621                           CPPFLAGS=$cf_save_CPPFLAGS
17622                         fi
17623                   fi
17624                 fi
17625
17626                 if test "$cf_have_incdir" = no ; then
17627                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17628
17629 echo "${as_me:-configure}:17629: testing adding $cf_add_incdir to include-path ..." 1>&5
17630
17631                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17632
17633                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17634                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17635                   cf_add_incdir="$cf_top_incdir"
17636                 else
17637                   break
17638                 fi
17639           fi
17640         done
17641   done
17642 fi
17643
17644 if test -n "$with_hashed_db/lib" ; then
17645   for cf_add_libdir in $with_hashed_db/lib
17646   do
17647     if test $cf_add_libdir = /usr/lib ; then
17648       :
17649     elif test -d $cf_add_libdir
17650     then
17651       cf_have_libdir=no
17652       if test -n "$LDFLAGS$LIBS" ; then
17653         # a loop is needed to ensure we can add subdirs of existing dirs
17654         for cf_test_libdir in $LDFLAGS $LIBS ; do
17655           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17656             cf_have_libdir=yes; break
17657           fi
17658         done
17659       fi
17660       if test "$cf_have_libdir" = no ; then
17661         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17662
17663 echo "${as_me:-configure}:17663: testing adding $cf_add_libdir to library-path ..." 1>&5
17664
17665         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17666       fi
17667     fi
17668   done
17669 fi
17670
17671     fi
17672 esac
17673
17674 echo "$as_me:17674: checking for db.h" >&5
17675 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17676 if test "${ac_cv_header_db_h+set}" = set; then
17677   echo $ECHO_N "(cached) $ECHO_C" >&6
17678 else
17679   cat >conftest.$ac_ext <<_ACEOF
17680 #line 17680 "configure"
17681 #include "confdefs.h"
17682 #include <db.h>
17683 _ACEOF
17684 if { (eval echo "$as_me:17684: \"$ac_cpp conftest.$ac_ext\"") >&5
17685   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17686   ac_status=$?
17687   egrep -v '^ *\+' conftest.er1 >conftest.err
17688   rm -f conftest.er1
17689   cat conftest.err >&5
17690   echo "$as_me:17690: \$? = $ac_status" >&5
17691   (exit $ac_status); } >/dev/null; then
17692   if test -s conftest.err; then
17693     ac_cpp_err=$ac_c_preproc_warn_flag
17694   else
17695     ac_cpp_err=
17696   fi
17697 else
17698   ac_cpp_err=yes
17699 fi
17700 if test -z "$ac_cpp_err"; then
17701   ac_cv_header_db_h=yes
17702 else
17703   echo "$as_me: failed program was:" >&5
17704   cat conftest.$ac_ext >&5
17705   ac_cv_header_db_h=no
17706 fi
17707 rm -f conftest.err conftest.$ac_ext
17708 fi
17709 echo "$as_me:17709: result: $ac_cv_header_db_h" >&5
17710 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17711 if test $ac_cv_header_db_h = yes; then
17712
17713 echo "$as_me:17713: checking for version of db" >&5
17714 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17715 if test "${cf_cv_hashed_db_version+set}" = set; then
17716   echo $ECHO_N "(cached) $ECHO_C" >&6
17717 else
17718
17719 cf_cv_hashed_db_version=unknown
17720
17721 for cf_db_version in 1 2 3 4 5
17722 do
17723
17724 echo "${as_me:-configure}:17724: testing checking for db version $cf_db_version ..." 1>&5
17725
17726         cat >conftest.$ac_ext <<_ACEOF
17727 #line 17727 "configure"
17728 #include "confdefs.h"
17729
17730 $ac_includes_default
17731 #include <db.h>
17732
17733 #ifdef DB_VERSION_MAJOR
17734         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17735 #if $cf_db_version == DB_VERSION_MAJOR
17736         /* ok */
17737 #else
17738         make an error
17739 #endif
17740 #else
17741 #if $cf_db_version == 1
17742         /* ok: assuming this is DB 1.8.5 */
17743 #else
17744         make an error
17745 #endif
17746 #endif
17747
17748 int
17749 main ()
17750 {
17751 DBT *foo = 0
17752   ;
17753   return 0;
17754 }
17755 _ACEOF
17756 rm -f conftest.$ac_objext
17757 if { (eval echo "$as_me:17757: \"$ac_compile\"") >&5
17758   (eval $ac_compile) 2>&5
17759   ac_status=$?
17760   echo "$as_me:17760: \$? = $ac_status" >&5
17761   (exit $ac_status); } &&
17762          { ac_try='test -s conftest.$ac_objext'
17763   { (eval echo "$as_me:17763: \"$ac_try\"") >&5
17764   (eval $ac_try) 2>&5
17765   ac_status=$?
17766   echo "$as_me:17766: \$? = $ac_status" >&5
17767   (exit $ac_status); }; }; then
17768
17769         cf_cv_hashed_db_version=$cf_db_version
17770         break
17771
17772 else
17773   echo "$as_me: failed program was:" >&5
17774 cat conftest.$ac_ext >&5
17775 fi
17776 rm -f conftest.$ac_objext conftest.$ac_ext
17777 done
17778
17779 fi
17780 echo "$as_me:17780: result: $cf_cv_hashed_db_version" >&5
17781 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17782
17783 if test "$cf_cv_hashed_db_version" = unknown ; then
17784         { { echo "$as_me:17784: error: Cannot determine version of db" >&5
17785 echo "$as_me: error: Cannot determine version of db" >&2;}
17786    { (exit 1); exit 1; }; }
17787 else
17788
17789 echo "$as_me:17789: checking for db libraries" >&5
17790 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17791 if test "${cf_cv_hashed_db_libs+set}" = set; then
17792   echo $ECHO_N "(cached) $ECHO_C" >&6
17793 else
17794
17795 cf_cv_hashed_db_libs=unknown
17796 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17797 do
17798         cf_save_libs="$LIBS"
17799         if test -n "$cf_db_libs"; then
17800                 LIBS="-l$cf_db_libs $LIBS"
17801         fi
17802
17803 echo "${as_me:-configure}:17803: testing checking for library "$cf_db_libs" ..." 1>&5
17804
17805         cat >conftest.$ac_ext <<_ACEOF
17806 #line 17806 "configure"
17807 #include "confdefs.h"
17808
17809 $ac_includes_default
17810 #include <db.h>
17811
17812 int
17813 main ()
17814 {
17815
17816         char *path = "/tmp/foo";
17817 #ifdef DB_VERSION_MAJOR
17818 #if DB_VERSION_MAJOR >= 4
17819         DB *result = 0;
17820         db_create(&result, NULL, 0);
17821         result->open(result,
17822                 NULL,
17823                 path,
17824                 path,
17825                 DB_HASH,
17826                 DB_CREATE,
17827                 0644);
17828 #elif DB_VERSION_MAJOR >= 3
17829         DB *result = 0;
17830         db_create(&result, NULL, 0);
17831         result->open(result,
17832                 path,
17833                 path,
17834                 DB_HASH,
17835                 DB_CREATE,
17836                 0644);
17837 #elif DB_VERSION_MAJOR >= 2
17838         DB *result = 0;
17839         db_open(path,
17840                 DB_HASH,
17841                 DB_CREATE,
17842                 0644,
17843                 (DB_ENV *) 0,
17844                 (DB_INFO *) 0,
17845                 &result);
17846 #endif /* DB_VERSION_MAJOR */
17847 #else
17848         DB *result = dbopen(path,
17849                      2,
17850                      0644,
17851                      DB_HASH,
17852                      0);
17853 #endif
17854         ${cf_cv_main_return:-return}(result != 0)
17855
17856   ;
17857   return 0;
17858 }
17859 _ACEOF
17860 rm -f conftest.$ac_objext conftest$ac_exeext
17861 if { (eval echo "$as_me:17861: \"$ac_link\"") >&5
17862   (eval $ac_link) 2>&5
17863   ac_status=$?
17864   echo "$as_me:17864: \$? = $ac_status" >&5
17865   (exit $ac_status); } &&
17866          { ac_try='test -s conftest$ac_exeext'
17867   { (eval echo "$as_me:17867: \"$ac_try\"") >&5
17868   (eval $ac_try) 2>&5
17869   ac_status=$?
17870   echo "$as_me:17870: \$? = $ac_status" >&5
17871   (exit $ac_status); }; }; then
17872
17873         if test -n "$cf_db_libs" ; then
17874                 cf_cv_hashed_db_libs=$cf_db_libs
17875         else
17876                 cf_cv_hashed_db_libs=default
17877         fi
17878         LIBS="$cf_save_libs"
17879         break
17880
17881 else
17882   echo "$as_me: failed program was:" >&5
17883 cat conftest.$ac_ext >&5
17884 fi
17885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17886         LIBS="$cf_save_libs"
17887 done
17888
17889 fi
17890 echo "$as_me:17890: result: $cf_cv_hashed_db_libs" >&5
17891 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17892
17893         if test "$cf_cv_hashed_db_libs" = unknown ; then
17894                 { { echo "$as_me:17894: error: Cannot determine library for db" >&5
17895 echo "$as_me: error: Cannot determine library for db" >&2;}
17896    { (exit 1); exit 1; }; }
17897         elif test "$cf_cv_hashed_db_libs" != default ; then
17898                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17899         fi
17900 fi
17901
17902 else
17903
17904         { { echo "$as_me:17904: error: Cannot find db.h" >&5
17905 echo "$as_me: error: Cannot find db.h" >&2;}
17906    { (exit 1); exit 1; }; }
17907
17908 fi
17909
17910 fi
17911
17912 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17913         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17914         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17915 fi
17916
17917 # Just in case, check if the C compiler has a bool type.
17918
17919 echo "$as_me:17919: checking if we should include stdbool.h" >&5
17920 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17921
17922 if test "${cf_cv_header_stdbool_h+set}" = set; then
17923   echo $ECHO_N "(cached) $ECHO_C" >&6
17924 else
17925
17926         cat >conftest.$ac_ext <<_ACEOF
17927 #line 17927 "configure"
17928 #include "confdefs.h"
17929
17930 int
17931 main ()
17932 {
17933 bool foo = false
17934   ;
17935   return 0;
17936 }
17937 _ACEOF
17938 rm -f conftest.$ac_objext
17939 if { (eval echo "$as_me:17939: \"$ac_compile\"") >&5
17940   (eval $ac_compile) 2>&5
17941   ac_status=$?
17942   echo "$as_me:17942: \$? = $ac_status" >&5
17943   (exit $ac_status); } &&
17944          { ac_try='test -s conftest.$ac_objext'
17945   { (eval echo "$as_me:17945: \"$ac_try\"") >&5
17946   (eval $ac_try) 2>&5
17947   ac_status=$?
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit $ac_status); }; }; then
17950   cf_cv_header_stdbool_h=0
17951 else
17952   echo "$as_me: failed program was:" >&5
17953 cat conftest.$ac_ext >&5
17954 cat >conftest.$ac_ext <<_ACEOF
17955 #line 17955 "configure"
17956 #include "confdefs.h"
17957
17958 #ifndef __BEOS__
17959 #include <stdbool.h>
17960 #endif
17961
17962 int
17963 main ()
17964 {
17965 bool foo = false
17966   ;
17967   return 0;
17968 }
17969 _ACEOF
17970 rm -f conftest.$ac_objext
17971 if { (eval echo "$as_me:17971: \"$ac_compile\"") >&5
17972   (eval $ac_compile) 2>&5
17973   ac_status=$?
17974   echo "$as_me:17974: \$? = $ac_status" >&5
17975   (exit $ac_status); } &&
17976          { ac_try='test -s conftest.$ac_objext'
17977   { (eval echo "$as_me:17977: \"$ac_try\"") >&5
17978   (eval $ac_try) 2>&5
17979   ac_status=$?
17980   echo "$as_me:17980: \$? = $ac_status" >&5
17981   (exit $ac_status); }; }; then
17982   cf_cv_header_stdbool_h=1
17983 else
17984   echo "$as_me: failed program was:" >&5
17985 cat conftest.$ac_ext >&5
17986 cf_cv_header_stdbool_h=0
17987 fi
17988 rm -f conftest.$ac_objext conftest.$ac_ext
17989 fi
17990 rm -f conftest.$ac_objext conftest.$ac_ext
17991 fi
17992
17993 if test "$cf_cv_header_stdbool_h" = 1
17994 then    echo "$as_me:17994: result: yes" >&5
17995 echo "${ECHO_T}yes" >&6
17996 else    echo "$as_me:17996: result: no" >&5
17997 echo "${ECHO_T}no" >&6
17998 fi
17999
18000 echo "$as_me:18000: checking for builtin bool type" >&5
18001 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18002
18003 if test "${cf_cv_cc_bool_type+set}" = set; then
18004   echo $ECHO_N "(cached) $ECHO_C" >&6
18005 else
18006
18007         cat >conftest.$ac_ext <<_ACEOF
18008 #line 18008 "configure"
18009 #include "confdefs.h"
18010
18011 #include <stdio.h>
18012 #include <sys/types.h>
18013
18014 int
18015 main ()
18016 {
18017 bool x = false
18018   ;
18019   return 0;
18020 }
18021 _ACEOF
18022 rm -f conftest.$ac_objext
18023 if { (eval echo "$as_me:18023: \"$ac_compile\"") >&5
18024   (eval $ac_compile) 2>&5
18025   ac_status=$?
18026   echo "$as_me:18026: \$? = $ac_status" >&5
18027   (exit $ac_status); } &&
18028          { ac_try='test -s conftest.$ac_objext'
18029   { (eval echo "$as_me:18029: \"$ac_try\"") >&5
18030   (eval $ac_try) 2>&5
18031   ac_status=$?
18032   echo "$as_me:18032: \$? = $ac_status" >&5
18033   (exit $ac_status); }; }; then
18034   cf_cv_cc_bool_type=1
18035 else
18036   echo "$as_me: failed program was:" >&5
18037 cat conftest.$ac_ext >&5
18038 cf_cv_cc_bool_type=0
18039 fi
18040 rm -f conftest.$ac_objext conftest.$ac_ext
18041
18042 fi
18043
18044 if test "$cf_cv_cc_bool_type" = 1
18045 then    echo "$as_me:18045: result: yes" >&5
18046 echo "${ECHO_T}yes" >&6
18047 else    echo "$as_me:18047: result: no" >&5
18048 echo "${ECHO_T}no" >&6
18049 fi
18050
18051 # Check for C++ compiler characteristics (and ensure that it's there!)
18052 if test -n "$CXX" ; then
18053         ac_ext=cc
18054 ac_cpp='$CXXCPP $CPPFLAGS'
18055 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18056 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18057 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18058 ac_main_return=return
18059
18060 if test -n "$GXX" ; then
18061 case $cf_cv_system_name in #(vi
18062 os2*) #(vi
18063         cf_stdcpp_libname=stdcpp
18064         ;;
18065 *)
18066         cf_stdcpp_libname=stdc++
18067         ;;
18068 esac
18069 echo "$as_me:18069: checking for library $cf_stdcpp_libname" >&5
18070 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18071 if test "${cf_cv_libstdcpp+set}" = set; then
18072   echo $ECHO_N "(cached) $ECHO_C" >&6
18073 else
18074
18075         cf_save="$LIBS"
18076         LIBS="-l$cf_stdcpp_libname $LIBS"
18077 cat >conftest.$ac_ext <<_ACEOF
18078 #line 18078 "configure"
18079 #include "confdefs.h"
18080
18081 #include <strstream.h>
18082 int
18083 main ()
18084 {
18085
18086 char buf[80];
18087 strstreambuf foo(buf, sizeof(buf))
18088
18089   ;
18090   return 0;
18091 }
18092 _ACEOF
18093 rm -f conftest.$ac_objext conftest$ac_exeext
18094 if { (eval echo "$as_me:18094: \"$ac_link\"") >&5
18095   (eval $ac_link) 2>&5
18096   ac_status=$?
18097   echo "$as_me:18097: \$? = $ac_status" >&5
18098   (exit $ac_status); } &&
18099          { ac_try='test -s conftest$ac_exeext'
18100   { (eval echo "$as_me:18100: \"$ac_try\"") >&5
18101   (eval $ac_try) 2>&5
18102   ac_status=$?
18103   echo "$as_me:18103: \$? = $ac_status" >&5
18104   (exit $ac_status); }; }; then
18105   cf_cv_libstdcpp=yes
18106 else
18107   echo "$as_me: failed program was:" >&5
18108 cat conftest.$ac_ext >&5
18109 cf_cv_libstdcpp=no
18110 fi
18111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18112         LIBS="$cf_save"
18113
18114 fi
18115 echo "$as_me:18115: result: $cf_cv_libstdcpp" >&5
18116 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18117 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18118 fi
18119
18120         echo "$as_me:18120: checking whether $CXX understands -c and -o together" >&5
18121 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18122 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18123   echo $ECHO_N "(cached) $ECHO_C" >&6
18124 else
18125
18126 cat > conftest.$ac_ext <<CF_EOF
18127 #include <stdio.h>
18128 int main()
18129 {
18130         ${cf_cv_main_return:-return}(0);
18131 }
18132 CF_EOF
18133 # We do the test twice because some compilers refuse to overwrite an
18134 # existing .o file with -o, though they will create one.
18135 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18136 if { (eval echo "$as_me:18136: \"$ac_try\"") >&5
18137   (eval $ac_try) 2>&5
18138   ac_status=$?
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit $ac_status); } &&
18141   test -f conftest2.$ac_objext && { (eval echo "$as_me:18141: \"$ac_try\"") >&5
18142   (eval $ac_try) 2>&5
18143   ac_status=$?
18144   echo "$as_me:18144: \$? = $ac_status" >&5
18145   (exit $ac_status); };
18146 then
18147   eval cf_cv_prog_CXX_c_o=yes
18148 else
18149   eval cf_cv_prog_CXX_c_o=no
18150 fi
18151 rm -rf conftest*
18152
18153 fi
18154 if test $cf_cv_prog_CXX_c_o = yes; then
18155   echo "$as_me:18155: result: yes" >&5
18156 echo "${ECHO_T}yes" >&6
18157 else
18158   echo "$as_me:18158: result: no" >&5
18159 echo "${ECHO_T}no" >&6
18160 fi
18161
18162         case $GXX_VERSION in
18163         1*|2.0-6*)
18164                 cf_cxx_library=yes
18165                 ;;
18166         *-2.7*|2.7*)
18167
18168 cf_cxx_library=unknown
18169 case $cf_cv_system_name in #(vi
18170 os2*) #(vi
18171         cf_gpp_libname=gpp
18172         ;;
18173 *)
18174         cf_gpp_libname=g++
18175         ;;
18176 esac
18177 if test "$GXX" = yes; then
18178         echo "$as_me:18178: checking for lib$cf_gpp_libname" >&5
18179 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18180         cf_save="$LIBS"
18181         LIBS="-l$cf_gpp_libname $LIBS"
18182         cat >conftest.$ac_ext <<_ACEOF
18183 #line 18183 "configure"
18184 #include "confdefs.h"
18185
18186 #include <$cf_gpp_libname/builtin.h>
18187
18188 int
18189 main ()
18190 {
18191 two_arg_error_handler_t foo2 = lib_error_handler
18192   ;
18193   return 0;
18194 }
18195 _ACEOF
18196 rm -f conftest.$ac_objext conftest$ac_exeext
18197 if { (eval echo "$as_me:18197: \"$ac_link\"") >&5
18198   (eval $ac_link) 2>&5
18199   ac_status=$?
18200   echo "$as_me:18200: \$? = $ac_status" >&5
18201   (exit $ac_status); } &&
18202          { ac_try='test -s conftest$ac_exeext'
18203   { (eval echo "$as_me:18203: \"$ac_try\"") >&5
18204   (eval $ac_try) 2>&5
18205   ac_status=$?
18206   echo "$as_me:18206: \$? = $ac_status" >&5
18207   (exit $ac_status); }; }; then
18208   cf_cxx_library=yes
18209          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18210          if test "$cf_gpp_libname" = cpp ; then
18211
18212 cat >>confdefs.h <<\EOF
18213 #define HAVE_GPP_BUILTIN_H 1
18214 EOF
18215
18216          else
18217
18218 cat >>confdefs.h <<\EOF
18219 #define HAVE_GXX_BUILTIN_H 1
18220 EOF
18221
18222          fi
18223 else
18224   echo "$as_me: failed program was:" >&5
18225 cat conftest.$ac_ext >&5
18226 cat >conftest.$ac_ext <<_ACEOF
18227 #line 18227 "configure"
18228 #include "confdefs.h"
18229
18230 #include <builtin.h>
18231
18232 int
18233 main ()
18234 {
18235 two_arg_error_handler_t foo2 = lib_error_handler
18236   ;
18237   return 0;
18238 }
18239 _ACEOF
18240 rm -f conftest.$ac_objext conftest$ac_exeext
18241 if { (eval echo "$as_me:18241: \"$ac_link\"") >&5
18242   (eval $ac_link) 2>&5
18243   ac_status=$?
18244   echo "$as_me:18244: \$? = $ac_status" >&5
18245   (exit $ac_status); } &&
18246          { ac_try='test -s conftest$ac_exeext'
18247   { (eval echo "$as_me:18247: \"$ac_try\"") >&5
18248   (eval $ac_try) 2>&5
18249   ac_status=$?
18250   echo "$as_me:18250: \$? = $ac_status" >&5
18251   (exit $ac_status); }; }; then
18252   cf_cxx_library=yes
18253          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18254
18255 cat >>confdefs.h <<\EOF
18256 #define HAVE_BUILTIN_H 1
18257 EOF
18258
18259 else
18260   echo "$as_me: failed program was:" >&5
18261 cat conftest.$ac_ext >&5
18262 cf_cxx_library=no
18263 fi
18264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18265 fi
18266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18267         LIBS="$cf_save"
18268         echo "$as_me:18268: result: $cf_cxx_library" >&5
18269 echo "${ECHO_T}$cf_cxx_library" >&6
18270 fi
18271
18272                 ;;
18273         *)
18274                 cf_cxx_library=no
18275                 ;;
18276         esac
18277
18278         ac_ext=cc
18279 ac_cpp='$CXXCPP $CPPFLAGS'
18280 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18281 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18282 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18283 ac_main_return=return
18284 echo "$as_me:18284: checking how to run the C++ preprocessor" >&5
18285 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18286 if test -z "$CXXCPP"; then
18287   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18288   echo $ECHO_N "(cached) $ECHO_C" >&6
18289 else
18290       # Double quotes because CXXCPP needs to be expanded
18291     for CXXCPP in "$CXX -E" "/lib/cpp"
18292     do
18293       ac_preproc_ok=false
18294 for ac_cxx_preproc_warn_flag in '' yes
18295 do
18296   # Use a header file that comes with gcc, so configuring glibc
18297   # with a fresh cross-compiler works.
18298   # On the NeXT, cc -E runs the code through the compiler's parser,
18299   # not just through cpp. "Syntax error" is here to catch this case.
18300   cat >conftest.$ac_ext <<_ACEOF
18301 #line 18301 "configure"
18302 #include "confdefs.h"
18303 #include <assert.h>
18304                      Syntax error
18305 _ACEOF
18306 if { (eval echo "$as_me:18306: \"$ac_cpp conftest.$ac_ext\"") >&5
18307   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18308   ac_status=$?
18309   egrep -v '^ *\+' conftest.er1 >conftest.err
18310   rm -f conftest.er1
18311   cat conftest.err >&5
18312   echo "$as_me:18312: \$? = $ac_status" >&5
18313   (exit $ac_status); } >/dev/null; then
18314   if test -s conftest.err; then
18315     ac_cpp_err=$ac_cxx_preproc_warn_flag
18316   else
18317     ac_cpp_err=
18318   fi
18319 else
18320   ac_cpp_err=yes
18321 fi
18322 if test -z "$ac_cpp_err"; then
18323   :
18324 else
18325   echo "$as_me: failed program was:" >&5
18326   cat conftest.$ac_ext >&5
18327   # Broken: fails on valid input.
18328 continue
18329 fi
18330 rm -f conftest.err conftest.$ac_ext
18331
18332   # OK, works on sane cases.  Now check whether non-existent headers
18333   # can be detected and how.
18334   cat >conftest.$ac_ext <<_ACEOF
18335 #line 18335 "configure"
18336 #include "confdefs.h"
18337 #include <ac_nonexistent.h>
18338 _ACEOF
18339 if { (eval echo "$as_me:18339: \"$ac_cpp conftest.$ac_ext\"") >&5
18340   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18341   ac_status=$?
18342   egrep -v '^ *\+' conftest.er1 >conftest.err
18343   rm -f conftest.er1
18344   cat conftest.err >&5
18345   echo "$as_me:18345: \$? = $ac_status" >&5
18346   (exit $ac_status); } >/dev/null; then
18347   if test -s conftest.err; then
18348     ac_cpp_err=$ac_cxx_preproc_warn_flag
18349   else
18350     ac_cpp_err=
18351   fi
18352 else
18353   ac_cpp_err=yes
18354 fi
18355 if test -z "$ac_cpp_err"; then
18356   # Broken: success on invalid input.
18357 continue
18358 else
18359   echo "$as_me: failed program was:" >&5
18360   cat conftest.$ac_ext >&5
18361   # Passes both tests.
18362 ac_preproc_ok=:
18363 break
18364 fi
18365 rm -f conftest.err conftest.$ac_ext
18366
18367 done
18368 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18369 rm -f conftest.err conftest.$ac_ext
18370 if $ac_preproc_ok; then
18371   break
18372 fi
18373
18374     done
18375     ac_cv_prog_CXXCPP=$CXXCPP
18376
18377 fi
18378   CXXCPP=$ac_cv_prog_CXXCPP
18379 else
18380   ac_cv_prog_CXXCPP=$CXXCPP
18381 fi
18382 echo "$as_me:18382: result: $CXXCPP" >&5
18383 echo "${ECHO_T}$CXXCPP" >&6
18384 ac_preproc_ok=false
18385 for ac_cxx_preproc_warn_flag in '' yes
18386 do
18387   # Use a header file that comes with gcc, so configuring glibc
18388   # with a fresh cross-compiler works.
18389   # On the NeXT, cc -E runs the code through the compiler's parser,
18390   # not just through cpp. "Syntax error" is here to catch this case.
18391   cat >conftest.$ac_ext <<_ACEOF
18392 #line 18392 "configure"
18393 #include "confdefs.h"
18394 #include <assert.h>
18395                      Syntax error
18396 _ACEOF
18397 if { (eval echo "$as_me:18397: \"$ac_cpp conftest.$ac_ext\"") >&5
18398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18399   ac_status=$?
18400   egrep -v '^ *\+' conftest.er1 >conftest.err
18401   rm -f conftest.er1
18402   cat conftest.err >&5
18403   echo "$as_me:18403: \$? = $ac_status" >&5
18404   (exit $ac_status); } >/dev/null; then
18405   if test -s conftest.err; then
18406     ac_cpp_err=$ac_cxx_preproc_warn_flag
18407   else
18408     ac_cpp_err=
18409   fi
18410 else
18411   ac_cpp_err=yes
18412 fi
18413 if test -z "$ac_cpp_err"; then
18414   :
18415 else
18416   echo "$as_me: failed program was:" >&5
18417   cat conftest.$ac_ext >&5
18418   # Broken: fails on valid input.
18419 continue
18420 fi
18421 rm -f conftest.err conftest.$ac_ext
18422
18423   # OK, works on sane cases.  Now check whether non-existent headers
18424   # can be detected and how.
18425   cat >conftest.$ac_ext <<_ACEOF
18426 #line 18426 "configure"
18427 #include "confdefs.h"
18428 #include <ac_nonexistent.h>
18429 _ACEOF
18430 if { (eval echo "$as_me:18430: \"$ac_cpp conftest.$ac_ext\"") >&5
18431   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18432   ac_status=$?
18433   egrep -v '^ *\+' conftest.er1 >conftest.err
18434   rm -f conftest.er1
18435   cat conftest.err >&5
18436   echo "$as_me:18436: \$? = $ac_status" >&5
18437   (exit $ac_status); } >/dev/null; then
18438   if test -s conftest.err; then
18439     ac_cpp_err=$ac_cxx_preproc_warn_flag
18440   else
18441     ac_cpp_err=
18442   fi
18443 else
18444   ac_cpp_err=yes
18445 fi
18446 if test -z "$ac_cpp_err"; then
18447   # Broken: success on invalid input.
18448 continue
18449 else
18450   echo "$as_me: failed program was:" >&5
18451   cat conftest.$ac_ext >&5
18452   # Passes both tests.
18453 ac_preproc_ok=:
18454 break
18455 fi
18456 rm -f conftest.err conftest.$ac_ext
18457
18458 done
18459 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18460 rm -f conftest.err conftest.$ac_ext
18461 if $ac_preproc_ok; then
18462   :
18463 else
18464   { { echo "$as_me:18464: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18465 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18466    { (exit 1); exit 1; }; }
18467 fi
18468
18469 ac_ext=cc
18470 ac_cpp='$CXXCPP $CPPFLAGS'
18471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18474 ac_main_return=return
18475
18476 for ac_header in typeinfo
18477 do
18478 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18479 echo "$as_me:18479: checking for $ac_header" >&5
18480 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18481 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18482   echo $ECHO_N "(cached) $ECHO_C" >&6
18483 else
18484   cat >conftest.$ac_ext <<_ACEOF
18485 #line 18485 "configure"
18486 #include "confdefs.h"
18487 #include <$ac_header>
18488 _ACEOF
18489 if { (eval echo "$as_me:18489: \"$ac_cpp conftest.$ac_ext\"") >&5
18490   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18491   ac_status=$?
18492   egrep -v '^ *\+' conftest.er1 >conftest.err
18493   rm -f conftest.er1
18494   cat conftest.err >&5
18495   echo "$as_me:18495: \$? = $ac_status" >&5
18496   (exit $ac_status); } >/dev/null; then
18497   if test -s conftest.err; then
18498     ac_cpp_err=$ac_cxx_preproc_warn_flag
18499   else
18500     ac_cpp_err=
18501   fi
18502 else
18503   ac_cpp_err=yes
18504 fi
18505 if test -z "$ac_cpp_err"; then
18506   eval "$as_ac_Header=yes"
18507 else
18508   echo "$as_me: failed program was:" >&5
18509   cat conftest.$ac_ext >&5
18510   eval "$as_ac_Header=no"
18511 fi
18512 rm -f conftest.err conftest.$ac_ext
18513 fi
18514 echo "$as_me:18514: result: `eval echo '${'$as_ac_Header'}'`" >&5
18515 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18516 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18517   cat >>confdefs.h <<EOF
18518 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18519 EOF
18520
18521 fi
18522 done
18523
18524 for ac_header in iostream
18525 do
18526 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18527 echo "$as_me:18527: checking for $ac_header" >&5
18528 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18529 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18530   echo $ECHO_N "(cached) $ECHO_C" >&6
18531 else
18532   cat >conftest.$ac_ext <<_ACEOF
18533 #line 18533 "configure"
18534 #include "confdefs.h"
18535 #include <$ac_header>
18536 _ACEOF
18537 if { (eval echo "$as_me:18537: \"$ac_cpp conftest.$ac_ext\"") >&5
18538   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18539   ac_status=$?
18540   egrep -v '^ *\+' conftest.er1 >conftest.err
18541   rm -f conftest.er1
18542   cat conftest.err >&5
18543   echo "$as_me:18543: \$? = $ac_status" >&5
18544   (exit $ac_status); } >/dev/null; then
18545   if test -s conftest.err; then
18546     ac_cpp_err=$ac_cxx_preproc_warn_flag
18547   else
18548     ac_cpp_err=
18549   fi
18550 else
18551   ac_cpp_err=yes
18552 fi
18553 if test -z "$ac_cpp_err"; then
18554   eval "$as_ac_Header=yes"
18555 else
18556   echo "$as_me: failed program was:" >&5
18557   cat conftest.$ac_ext >&5
18558   eval "$as_ac_Header=no"
18559 fi
18560 rm -f conftest.err conftest.$ac_ext
18561 fi
18562 echo "$as_me:18562: result: `eval echo '${'$as_ac_Header'}'`" >&5
18563 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18564 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18565   cat >>confdefs.h <<EOF
18566 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18567 EOF
18568
18569 fi
18570 done
18571
18572 if test x"$ac_cv_header_iostream" = xyes ; then
18573         echo "$as_me:18573: checking if iostream uses std-namespace" >&5
18574 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18575         cat >conftest.$ac_ext <<_ACEOF
18576 #line 18576 "configure"
18577 #include "confdefs.h"
18578
18579 #include <iostream>
18580 using std::endl;
18581 using std::cerr;
18582 int
18583 main ()
18584 {
18585
18586 cerr << "testing" << endl;
18587
18588   ;
18589   return 0;
18590 }
18591 _ACEOF
18592 rm -f conftest.$ac_objext
18593 if { (eval echo "$as_me:18593: \"$ac_compile\"") >&5
18594   (eval $ac_compile) 2>&5
18595   ac_status=$?
18596   echo "$as_me:18596: \$? = $ac_status" >&5
18597   (exit $ac_status); } &&
18598          { ac_try='test -s conftest.$ac_objext'
18599   { (eval echo "$as_me:18599: \"$ac_try\"") >&5
18600   (eval $ac_try) 2>&5
18601   ac_status=$?
18602   echo "$as_me:18602: \$? = $ac_status" >&5
18603   (exit $ac_status); }; }; then
18604   cf_iostream_namespace=yes
18605 else
18606   echo "$as_me: failed program was:" >&5
18607 cat conftest.$ac_ext >&5
18608 cf_iostream_namespace=no
18609 fi
18610 rm -f conftest.$ac_objext conftest.$ac_ext
18611         echo "$as_me:18611: result: $cf_iostream_namespace" >&5
18612 echo "${ECHO_T}$cf_iostream_namespace" >&6
18613         if test "$cf_iostream_namespace" = yes ; then
18614
18615 cat >>confdefs.h <<\EOF
18616 #define IOSTREAM_NAMESPACE 1
18617 EOF
18618
18619         fi
18620 fi
18621
18622 echo "$as_me:18622: checking if we should include stdbool.h" >&5
18623 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18624
18625 if test "${cf_cv_header_stdbool_h+set}" = set; then
18626   echo $ECHO_N "(cached) $ECHO_C" >&6
18627 else
18628
18629         cat >conftest.$ac_ext <<_ACEOF
18630 #line 18630 "configure"
18631 #include "confdefs.h"
18632
18633 int
18634 main ()
18635 {
18636 bool foo = false
18637   ;
18638   return 0;
18639 }
18640 _ACEOF
18641 rm -f conftest.$ac_objext
18642 if { (eval echo "$as_me:18642: \"$ac_compile\"") >&5
18643   (eval $ac_compile) 2>&5
18644   ac_status=$?
18645   echo "$as_me:18645: \$? = $ac_status" >&5
18646   (exit $ac_status); } &&
18647          { ac_try='test -s conftest.$ac_objext'
18648   { (eval echo "$as_me:18648: \"$ac_try\"") >&5
18649   (eval $ac_try) 2>&5
18650   ac_status=$?
18651   echo "$as_me:18651: \$? = $ac_status" >&5
18652   (exit $ac_status); }; }; then
18653   cf_cv_header_stdbool_h=0
18654 else
18655   echo "$as_me: failed program was:" >&5
18656 cat conftest.$ac_ext >&5
18657 cat >conftest.$ac_ext <<_ACEOF
18658 #line 18658 "configure"
18659 #include "confdefs.h"
18660
18661 #ifndef __BEOS__
18662 #include <stdbool.h>
18663 #endif
18664
18665 int
18666 main ()
18667 {
18668 bool foo = false
18669   ;
18670   return 0;
18671 }
18672 _ACEOF
18673 rm -f conftest.$ac_objext
18674 if { (eval echo "$as_me:18674: \"$ac_compile\"") >&5
18675   (eval $ac_compile) 2>&5
18676   ac_status=$?
18677   echo "$as_me:18677: \$? = $ac_status" >&5
18678   (exit $ac_status); } &&
18679          { ac_try='test -s conftest.$ac_objext'
18680   { (eval echo "$as_me:18680: \"$ac_try\"") >&5
18681   (eval $ac_try) 2>&5
18682   ac_status=$?
18683   echo "$as_me:18683: \$? = $ac_status" >&5
18684   (exit $ac_status); }; }; then
18685   cf_cv_header_stdbool_h=1
18686 else
18687   echo "$as_me: failed program was:" >&5
18688 cat conftest.$ac_ext >&5
18689 cf_cv_header_stdbool_h=0
18690 fi
18691 rm -f conftest.$ac_objext conftest.$ac_ext
18692 fi
18693 rm -f conftest.$ac_objext conftest.$ac_ext
18694 fi
18695
18696 if test "$cf_cv_header_stdbool_h" = 1
18697 then    echo "$as_me:18697: result: yes" >&5
18698 echo "${ECHO_T}yes" >&6
18699 else    echo "$as_me:18699: result: no" >&5
18700 echo "${ECHO_T}no" >&6
18701 fi
18702
18703 echo "$as_me:18703: checking for builtin bool type" >&5
18704 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18705
18706 if test "${cf_cv_builtin_bool+set}" = set; then
18707   echo $ECHO_N "(cached) $ECHO_C" >&6
18708 else
18709
18710         cat >conftest.$ac_ext <<_ACEOF
18711 #line 18711 "configure"
18712 #include "confdefs.h"
18713
18714 #include <stdio.h>
18715 #include <sys/types.h>
18716
18717 int
18718 main ()
18719 {
18720 bool x = false
18721   ;
18722   return 0;
18723 }
18724 _ACEOF
18725 rm -f conftest.$ac_objext
18726 if { (eval echo "$as_me:18726: \"$ac_compile\"") >&5
18727   (eval $ac_compile) 2>&5
18728   ac_status=$?
18729   echo "$as_me:18729: \$? = $ac_status" >&5
18730   (exit $ac_status); } &&
18731          { ac_try='test -s conftest.$ac_objext'
18732   { (eval echo "$as_me:18732: \"$ac_try\"") >&5
18733   (eval $ac_try) 2>&5
18734   ac_status=$?
18735   echo "$as_me:18735: \$? = $ac_status" >&5
18736   (exit $ac_status); }; }; then
18737   cf_cv_builtin_bool=1
18738 else
18739   echo "$as_me: failed program was:" >&5
18740 cat conftest.$ac_ext >&5
18741 cf_cv_builtin_bool=0
18742 fi
18743 rm -f conftest.$ac_objext conftest.$ac_ext
18744
18745 fi
18746
18747 if test "$cf_cv_builtin_bool" = 1
18748 then    echo "$as_me:18748: result: yes" >&5
18749 echo "${ECHO_T}yes" >&6
18750 else    echo "$as_me:18750: result: no" >&5
18751 echo "${ECHO_T}no" >&6
18752 fi
18753
18754 echo "$as_me:18754: checking for size of bool" >&5
18755 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18756 if test "${cf_cv_type_of_bool+set}" = set; then
18757   echo $ECHO_N "(cached) $ECHO_C" >&6
18758 else
18759
18760         rm -f cf_test.out
18761         if test "$cross_compiling" = yes; then
18762   cf_cv_type_of_bool=unknown
18763 else
18764   cat >conftest.$ac_ext <<_ACEOF
18765 #line 18765 "configure"
18766 #include "confdefs.h"
18767
18768 #include <stdlib.h>
18769 #include <stdio.h>
18770
18771 #if defined(__cplusplus)
18772
18773 #ifdef HAVE_GXX_BUILTIN_H
18774 #include <g++/builtin.h>
18775 #elif HAVE_GPP_BUILTIN_H
18776 #include <gpp/builtin.h>
18777 #elif HAVE_BUILTIN_H
18778 #include <builtin.h>
18779 #endif
18780
18781 #else
18782
18783 #if $cf_cv_header_stdbool_h
18784 #include <stdbool.h>
18785 #endif
18786
18787 #endif
18788
18789 int main()
18790 {
18791         FILE *fp = fopen("cf_test.out", "w");
18792         if (fp != 0) {
18793                 bool x = true;
18794                 if ((bool)(-x) >= 0)
18795                         fputs("unsigned ", fp);
18796                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18797                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18798                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18799                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18800                 fclose(fp);
18801         }
18802         ${cf_cv_main_return:-return}(0);
18803 }
18804
18805 _ACEOF
18806 rm -f conftest$ac_exeext
18807 if { (eval echo "$as_me:18807: \"$ac_link\"") >&5
18808   (eval $ac_link) 2>&5
18809   ac_status=$?
18810   echo "$as_me:18810: \$? = $ac_status" >&5
18811   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18812   { (eval echo "$as_me:18812: \"$ac_try\"") >&5
18813   (eval $ac_try) 2>&5
18814   ac_status=$?
18815   echo "$as_me:18815: \$? = $ac_status" >&5
18816   (exit $ac_status); }; }; then
18817   cf_cv_type_of_bool=`cat cf_test.out`
18818                  if test -z "$cf_cv_type_of_bool"; then
18819                    cf_cv_type_of_bool=unknown
18820                  fi
18821 else
18822   echo "$as_me: program exited with status $ac_status" >&5
18823 echo "$as_me: failed program was:" >&5
18824 cat conftest.$ac_ext >&5
18825 cf_cv_type_of_bool=unknown
18826 fi
18827 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18828 fi
18829
18830 fi
18831
18832         rm -f cf_test.out
18833 echo "$as_me:18833: result: $cf_cv_type_of_bool" >&5
18834 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18835 if test "$cf_cv_type_of_bool" = unknown ; then
18836         case .$NCURSES_BOOL in #(vi
18837         .auto|.) NCURSES_BOOL=unsigned;;
18838         esac
18839         { echo "$as_me:18839: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18840 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18841         cf_cv_type_of_bool=$NCURSES_BOOL
18842 fi
18843
18844 echo "$as_me:18844: checking for special defines needed for etip.h" >&5
18845 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18846 cf_save_CXXFLAGS="$CXXFLAGS"
18847 cf_result="none"
18848
18849 # etip.h includes ncurses.h which includes ncurses_dll.h
18850 # But ncurses_dll.h is generated - fix here.
18851 test -d include || mkdir include
18852 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
18853
18854 for cf_math in "" MATH_H
18855 do
18856 for cf_excp in "" MATH_EXCEPTION
18857 do
18858         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18859         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18860         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18861 cat >conftest.$ac_ext <<_ACEOF
18862 #line 18862 "configure"
18863 #include "confdefs.h"
18864
18865 #include <etip.h.in>
18866
18867 int
18868 main ()
18869 {
18870
18871   ;
18872   return 0;
18873 }
18874 _ACEOF
18875 rm -f conftest.$ac_objext
18876 if { (eval echo "$as_me:18876: \"$ac_compile\"") >&5
18877   (eval $ac_compile) 2>&5
18878   ac_status=$?
18879   echo "$as_me:18879: \$? = $ac_status" >&5
18880   (exit $ac_status); } &&
18881          { ac_try='test -s conftest.$ac_objext'
18882   { (eval echo "$as_me:18882: \"$ac_try\"") >&5
18883   (eval $ac_try) 2>&5
18884   ac_status=$?
18885   echo "$as_me:18885: \$? = $ac_status" >&5
18886   (exit $ac_status); }; }; then
18887
18888         test -n "$cf_math" && cat >>confdefs.h <<EOF
18889 #define ETIP_NEEDS_${cf_math} 1
18890 EOF
18891
18892         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18893 #define ETIP_NEEDS_${cf_excp} 1
18894 EOF
18895
18896         cf_result="$cf_math $cf_excp"
18897         break 2
18898
18899 else
18900   echo "$as_me: failed program was:" >&5
18901 cat conftest.$ac_ext >&5
18902 fi
18903 rm -f conftest.$ac_objext conftest.$ac_ext
18904 done
18905 done
18906 echo "$as_me:18906: result: $cf_result" >&5
18907 echo "${ECHO_T}$cf_result" >&6
18908 CXXFLAGS="$cf_save_CXXFLAGS"
18909
18910 if test -n "$CXX"; then
18911 echo "$as_me:18911: checking if $CXX accepts parameter initialization" >&5
18912 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18913 if test "${cf_cv_cpp_param_init+set}" = set; then
18914   echo $ECHO_N "(cached) $ECHO_C" >&6
18915 else
18916
18917         ac_ext=cc
18918 ac_cpp='$CXXCPP $CPPFLAGS'
18919 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18920 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18921 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18922 ac_main_return=return
18923
18924         if test "$cross_compiling" = yes; then
18925   cf_cv_cpp_param_init=unknown
18926 else
18927   cat >conftest.$ac_ext <<_ACEOF
18928 #line 18928 "configure"
18929 #include "confdefs.h"
18930
18931 class TEST {
18932 private:
18933         int value;
18934 public:
18935         TEST(int x = 1);
18936         ~TEST();
18937 };
18938
18939 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18940 {
18941         value = x;
18942 }
18943 int main() { }
18944
18945 _ACEOF
18946 rm -f conftest$ac_exeext
18947 if { (eval echo "$as_me:18947: \"$ac_link\"") >&5
18948   (eval $ac_link) 2>&5
18949   ac_status=$?
18950   echo "$as_me:18950: \$? = $ac_status" >&5
18951   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18952   { (eval echo "$as_me:18952: \"$ac_try\"") >&5
18953   (eval $ac_try) 2>&5
18954   ac_status=$?
18955   echo "$as_me:18955: \$? = $ac_status" >&5
18956   (exit $ac_status); }; }; then
18957   cf_cv_cpp_param_init=yes
18958 else
18959   echo "$as_me: program exited with status $ac_status" >&5
18960 echo "$as_me: failed program was:" >&5
18961 cat conftest.$ac_ext >&5
18962 cf_cv_cpp_param_init=no
18963 fi
18964 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18965 fi
18966         ac_ext=cc
18967 ac_cpp='$CXXCPP $CPPFLAGS'
18968 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18969 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18970 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18971 ac_main_return=return
18972
18973 fi
18974 echo "$as_me:18974: result: $cf_cv_cpp_param_init" >&5
18975 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18976 fi
18977 test "$cf_cv_cpp_param_init" = yes &&
18978 cat >>confdefs.h <<\EOF
18979 #define CPP_HAS_PARAM_INIT 1
18980 EOF
18981
18982 if test -n "$CXX"; then
18983
18984 echo "$as_me:18984: checking if $CXX accepts static_cast" >&5
18985 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18986 if test "${cf_cv_cpp_static_cast+set}" = set; then
18987   echo $ECHO_N "(cached) $ECHO_C" >&6
18988 else
18989
18990         ac_ext=cc
18991 ac_cpp='$CXXCPP $CPPFLAGS'
18992 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18993 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18994 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18995 ac_main_return=return
18996
18997         cat >conftest.$ac_ext <<_ACEOF
18998 #line 18998 "configure"
18999 #include "confdefs.h"
19000
19001 class NCursesPanel
19002 {
19003 public:
19004   NCursesPanel(int nlines,
19005                int ncols,
19006                int begin_y = 0,
19007                int begin_x = 0)
19008   {
19009   }
19010   NCursesPanel();
19011   ~NCursesPanel();
19012 };
19013
19014 template<class T> class NCursesUserPanel : public NCursesPanel
19015 {
19016 public:
19017   NCursesUserPanel (int nlines,
19018                     int ncols,
19019                     int begin_y = 0,
19020                     int begin_x = 0,
19021                     const T* p_UserData = static_cast<T*>(0))
19022     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19023   {
19024   };
19025   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19026   {
19027   };
19028
19029   virtual ~NCursesUserPanel() {};
19030 };
19031
19032 int
19033 main ()
19034 {
19035
19036         const char* p_UserData = static_cast<char*>(0)
19037   ;
19038   return 0;
19039 }
19040 _ACEOF
19041 rm -f conftest.$ac_objext
19042 if { (eval echo "$as_me:19042: \"$ac_compile\"") >&5
19043   (eval $ac_compile) 2>&5
19044   ac_status=$?
19045   echo "$as_me:19045: \$? = $ac_status" >&5
19046   (exit $ac_status); } &&
19047          { ac_try='test -s conftest.$ac_objext'
19048   { (eval echo "$as_me:19048: \"$ac_try\"") >&5
19049   (eval $ac_try) 2>&5
19050   ac_status=$?
19051   echo "$as_me:19051: \$? = $ac_status" >&5
19052   (exit $ac_status); }; }; then
19053   cf_cv_cpp_static_cast=yes
19054 else
19055   echo "$as_me: failed program was:" >&5
19056 cat conftest.$ac_ext >&5
19057 cf_cv_cpp_static_cast=no
19058 fi
19059 rm -f conftest.$ac_objext conftest.$ac_ext
19060
19061         ac_ext=cc
19062 ac_cpp='$CXXCPP $CPPFLAGS'
19063 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19064 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19065 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19066 ac_main_return=return
19067
19068 fi
19069 echo "$as_me:19069: result: $cf_cv_cpp_static_cast" >&5
19070 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19071
19072 fi
19073
19074 test "$cf_cv_cpp_static_cast" = yes &&
19075 cat >>confdefs.h <<\EOF
19076 #define CPP_HAS_STATIC_CAST 1
19077 EOF
19078
19079         CXX_AR='$(AR)'
19080         CXX_ARFLAGS='$(ARFLAGS)'
19081         case $cf_cv_system_name in #(vi
19082         irix*) #(vi
19083             if test "$GXX" != yes ; then
19084                 CXX_AR='$(CXX)'
19085                 CXX_ARFLAGS='-ar -o'
19086             fi
19087             ;;
19088         sco3.2v5*) #(vi
19089             CXXLDFLAGS="-u main"
19090             ;;
19091         solaris2*)
19092             if test "$GXX" != yes ; then
19093                 CXX_AR='$(CXX)'
19094                 CXX_ARFLAGS='-xar -o'
19095             fi
19096             ;;
19097         esac
19098
19099 else
19100         cf_cxx_library=no
19101         cf_cv_builtin_bool=1
19102
19103         # Just because we are not configuring against C++ right now does not
19104         # mean that a user will not want to use C++.  Some distributors disable
19105         # the C++ portion of this configuration as a shortcut (or just to avoid
19106         # compiling the demo in the c++ directory).  So we need a reasonable
19107         # default for the 'bool' type.
19108         #
19109         # Caveat: since the storage of the bool type is not standardized, it
19110         # may change.
19111
19112         if test "$NCURSES_BOOL" != auto ; then
19113                 cf_cv_type_of_bool=$NCURSES_BOOL
19114                 cf_cv_header_stdbool_h=0
19115         else
19116                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19117
19118 echo "$as_me:19118: checking for size of bool" >&5
19119 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19120 if test "${cf_cv_type_of_bool+set}" = set; then
19121   echo $ECHO_N "(cached) $ECHO_C" >&6
19122 else
19123
19124         rm -f cf_test.out
19125         if test "$cross_compiling" = yes; then
19126   cf_cv_type_of_bool=unknown
19127 else
19128   cat >conftest.$ac_ext <<_ACEOF
19129 #line 19129 "configure"
19130 #include "confdefs.h"
19131
19132 #include <stdlib.h>
19133 #include <stdio.h>
19134
19135 #if defined(__cplusplus)
19136
19137 #ifdef HAVE_GXX_BUILTIN_H
19138 #include <g++/builtin.h>
19139 #elif HAVE_GPP_BUILTIN_H
19140 #include <gpp/builtin.h>
19141 #elif HAVE_BUILTIN_H
19142 #include <builtin.h>
19143 #endif
19144
19145 #else
19146
19147 #if $cf_cv_header_stdbool_h
19148 #include <stdbool.h>
19149 #endif
19150
19151 #endif
19152
19153 int main()
19154 {
19155         FILE *fp = fopen("cf_test.out", "w");
19156         if (fp != 0) {
19157                 bool x = true;
19158                 if ((bool)(-x) >= 0)
19159                         fputs("unsigned ", fp);
19160                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19161                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19162                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19163                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19164                 fclose(fp);
19165         }
19166         ${cf_cv_main_return:-return}(0);
19167 }
19168
19169 _ACEOF
19170 rm -f conftest$ac_exeext
19171 if { (eval echo "$as_me:19171: \"$ac_link\"") >&5
19172   (eval $ac_link) 2>&5
19173   ac_status=$?
19174   echo "$as_me:19174: \$? = $ac_status" >&5
19175   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19176   { (eval echo "$as_me:19176: \"$ac_try\"") >&5
19177   (eval $ac_try) 2>&5
19178   ac_status=$?
19179   echo "$as_me:19179: \$? = $ac_status" >&5
19180   (exit $ac_status); }; }; then
19181   cf_cv_type_of_bool=`cat cf_test.out`
19182                  if test -z "$cf_cv_type_of_bool"; then
19183                    cf_cv_type_of_bool=unknown
19184                  fi
19185 else
19186   echo "$as_me: program exited with status $ac_status" >&5
19187 echo "$as_me: failed program was:" >&5
19188 cat conftest.$ac_ext >&5
19189 cf_cv_type_of_bool=unknown
19190 fi
19191 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19192 fi
19193
19194 fi
19195
19196         rm -f cf_test.out
19197 echo "$as_me:19197: result: $cf_cv_type_of_bool" >&5
19198 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19199 if test "$cf_cv_type_of_bool" = unknown ; then
19200         case .$NCURSES_BOOL in #(vi
19201         .auto|.) NCURSES_BOOL=unsigned;;
19202         esac
19203         { echo "$as_me:19203: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19204 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19205         cf_cv_type_of_bool=$NCURSES_BOOL
19206 fi
19207
19208                 else
19209                         echo "$as_me:19209: checking for fallback type of bool" >&5
19210 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19211                         case "$host_cpu" in #(vi
19212                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19213                         *)      cf_cv_type_of_bool=int  ;;
19214                         esac
19215                         echo "$as_me:19215: result: $cf_cv_type_of_bool" >&5
19216 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19217                 fi
19218         fi
19219 fi
19220
19221 # If the C compiler did not declare bool, and we did not determine that the C++
19222 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19223 # ncurses library use the same type as C++ bool.  Note that this allows one to
19224 # specify the type of bool in a configure-script option and postpone
19225 # integration with the C++ compiler provided that the types are compatible.
19226 USE_CXX_BOOL=1
19227 if test $cf_cv_cc_bool_type = 1
19228 then
19229         # oops: C has a bool.  Unlikely, but C++ could differ.
19230         USE_CXX_BOOL=0
19231 elif test $cf_cv_builtin_bool = 0
19232 then
19233         # C++ has no bool
19234         USE_CXX_BOOL=0
19235 else
19236         # this is the normal case
19237         USE_CXX_BOOL='defined(__cplusplus)'
19238 fi
19239
19240 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19241
19242         if test "$cf_with_ada" != "no" ; then
19243                 if test "$with_libtool" != "no"; then
19244                         { echo "$as_me:19244: WARNING: libtool does not support Ada - disabling feature" >&5
19245 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19246                         cf_with_ada=no
19247                 fi
19248         fi
19249
19250         if test "$cf_with_ada" != "no" ; then
19251
19252 cf_ada_make=gnatmake
19253 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19254 set dummy $cf_ada_make; ac_word=$2
19255 echo "$as_me:19255: checking for $ac_word" >&5
19256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19257 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19258   echo $ECHO_N "(cached) $ECHO_C" >&6
19259 else
19260   if test -n "$gnat_exists"; then
19261   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19262 else
19263   ac_save_IFS=$IFS; IFS=$ac_path_separator
19264 ac_dummy="$PATH"
19265 for ac_dir in $ac_dummy; do
19266   IFS=$ac_save_IFS
19267   test -z "$ac_dir" && ac_dir=.
19268   $as_executable_p "$ac_dir/$ac_word" || continue
19269 ac_cv_prog_gnat_exists="yes"
19270 echo "$as_me:19270: found $ac_dir/$ac_word" >&5
19271 break
19272 done
19273
19274   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19275 fi
19276 fi
19277 gnat_exists=$ac_cv_prog_gnat_exists
19278 if test -n "$gnat_exists"; then
19279   echo "$as_me:19279: result: $gnat_exists" >&5
19280 echo "${ECHO_T}$gnat_exists" >&6
19281 else
19282   echo "$as_me:19282: result: no" >&5
19283 echo "${ECHO_T}no" >&6
19284 fi
19285
19286 if test "$ac_cv_prog_gnat_exists" = no; then
19287    cf_ada_make=
19288    cf_cv_prog_gnat_correct=no
19289 else
19290
19291 echo "$as_me:19291: checking for gnat version" >&5
19292 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19293 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19294         grep '[0-9].[0-9][0-9]*' |\
19295     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19296 echo "$as_me:19296: result: $cf_gnat_version" >&5
19297 echo "${ECHO_T}$cf_gnat_version" >&6
19298
19299 case $cf_gnat_version in #(vi
19300 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19301         cf_cv_prog_gnat_correct=yes
19302         ;;
19303 *)
19304         { echo "$as_me:19304: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19305 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19306         cf_cv_prog_gnat_correct=no
19307         ;;
19308 esac
19309
19310    # Extract the first word of "m4", so it can be a program name with args.
19311 set dummy m4; ac_word=$2
19312 echo "$as_me:19312: checking for $ac_word" >&5
19313 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19314 if test "${ac_cv_prog_M4_exists+set}" = set; then
19315   echo $ECHO_N "(cached) $ECHO_C" >&6
19316 else
19317   if test -n "$M4_exists"; then
19318   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19319 else
19320   ac_save_IFS=$IFS; IFS=$ac_path_separator
19321 ac_dummy="$PATH"
19322 for ac_dir in $ac_dummy; do
19323   IFS=$ac_save_IFS
19324   test -z "$ac_dir" && ac_dir=.
19325   $as_executable_p "$ac_dir/$ac_word" || continue
19326 ac_cv_prog_M4_exists="yes"
19327 echo "$as_me:19327: found $ac_dir/$ac_word" >&5
19328 break
19329 done
19330
19331   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19332 fi
19333 fi
19334 M4_exists=$ac_cv_prog_M4_exists
19335 if test -n "$M4_exists"; then
19336   echo "$as_me:19336: result: $M4_exists" >&5
19337 echo "${ECHO_T}$M4_exists" >&6
19338 else
19339   echo "$as_me:19339: result: no" >&5
19340 echo "${ECHO_T}no" >&6
19341 fi
19342
19343    if test "$ac_cv_prog_M4_exists" = no; then
19344       cf_cv_prog_gnat_correct=no
19345       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19346    fi
19347    if test "$cf_cv_prog_gnat_correct" = yes; then
19348       echo "$as_me:19348: checking if GNAT works" >&5
19349 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19350
19351 rm -rf conftest* *~conftest*
19352 cat >>conftest.ads <<CF_EOF
19353 procedure conftest;
19354 CF_EOF
19355 cat >>conftest.adb <<CF_EOF
19356 with Text_IO;
19357 with GNAT.OS_Lib;
19358 procedure conftest is
19359 begin
19360    Text_IO.Put ("Hello World");
19361    Text_IO.New_Line;
19362    GNAT.OS_Lib.OS_Exit (0);
19363 end conftest;
19364 CF_EOF
19365 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19366    if ( ./conftest 1>&5 2>&1 ) ; then
19367       cf_cv_prog_gnat_correct=yes
19368    else
19369       cf_cv_prog_gnat_correct=no
19370    fi
19371 else
19372    cf_cv_prog_gnat_correct=no
19373 fi
19374 rm -rf conftest* *~conftest*
19375
19376       echo "$as_me:19376: result: $cf_cv_prog_gnat_correct" >&5
19377 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19378    fi
19379 fi
19380
19381                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19382
19383         ADAFLAGS="$ADAFLAGS -gnatpn"
19384
19385         echo "$as_me:19385: checking optimization options for ADAFLAGS" >&5
19386 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19387         case "$CFLAGS" in
19388         *-g*)
19389
19390         ADAFLAGS="$ADAFLAGS -g"
19391
19392                 ;;
19393         esac
19394         case "$CFLAGS" in
19395         *-O*)
19396                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19397
19398         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19399
19400                 ;;
19401         esac
19402         echo "$as_me:19402: result: $ADAFLAGS" >&5
19403 echo "${ECHO_T}$ADAFLAGS" >&6
19404
19405 echo "$as_me:19405: checking if GNAT supports generics" >&5
19406 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19407 case $cf_gnat_version in #(vi
19408 3.[1-9]*|[4-9].*) #(vi
19409         cf_gnat_generics=yes
19410         ;;
19411 *)
19412         cf_gnat_generics=no
19413         ;;
19414 esac
19415 echo "$as_me:19415: result: $cf_gnat_generics" >&5
19416 echo "${ECHO_T}$cf_gnat_generics" >&6
19417
19418 if test "$cf_gnat_generics" = yes
19419 then
19420         cf_compile_generics=generics
19421         cf_generic_objects="\${GENOBJS}"
19422 else
19423         cf_compile_generics=
19424         cf_generic_objects=
19425 fi
19426
19427 echo "$as_me:19427: checking if GNAT supports SIGINT" >&5
19428 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19429 if test "${cf_cv_gnat_sigint+set}" = set; then
19430   echo $ECHO_N "(cached) $ECHO_C" >&6
19431 else
19432
19433 rm -rf conftest* *~conftest*
19434 cat >>conftest.ads <<CF_EOF
19435 with Ada.Interrupts.Names;
19436
19437 package ConfTest is
19438
19439    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19440    pragma Unreserve_All_Interrupts;
19441    pragma Warnings (On);
19442
19443    protected Process is
19444       procedure Stop;
19445       function Continue return Boolean;
19446       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19447    private
19448       Done : Boolean := False;
19449    end Process;
19450
19451 end ConfTest;
19452 CF_EOF
19453 cat >>conftest.adb <<CF_EOF
19454 package body ConfTest is
19455    protected body Process is
19456       procedure Stop is
19457       begin
19458          Done := True;
19459       end Stop;
19460       function Continue return Boolean is
19461       begin
19462          return not Done;
19463       end Continue;
19464    end Process;
19465 end ConfTest;
19466 CF_EOF
19467 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19468       cf_cv_gnat_sigint=yes
19469 else
19470    cf_cv_gnat_sigint=no
19471 fi
19472 rm -rf conftest* *~conftest*
19473
19474 fi
19475 echo "$as_me:19475: result: $cf_cv_gnat_sigint" >&5
19476 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19477
19478 if test $cf_cv_gnat_sigint = yes ; then
19479         USE_GNAT_SIGINT=""
19480 else
19481         USE_GNAT_SIGINT="#"
19482 fi
19483
19484 echo "$as_me:19484: checking if GNAT pragma Unreferenced works" >&5
19485 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19486 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19487   echo $ECHO_N "(cached) $ECHO_C" >&6
19488 else
19489
19490 rm -rf conftest* *~conftest*
19491 cat >>conftest.ads <<CF_EOF
19492 procedure conftest;
19493 CF_EOF
19494 cat >>conftest.adb <<CF_EOF
19495 with Text_IO;
19496 with GNAT.OS_Lib;
19497 procedure conftest is
19498    test : Integer;
19499    pragma Unreferenced (test);
19500 begin
19501    test := 1;
19502    Text_IO.Put ("Hello World");
19503    Text_IO.New_Line;
19504    GNAT.OS_Lib.OS_Exit (0);
19505 end conftest;
19506 CF_EOF
19507 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19508       cf_cv_pragma_unreferenced=yes
19509 else
19510    cf_cv_pragma_unreferenced=no
19511 fi
19512 rm -rf conftest* *~conftest*
19513
19514 fi
19515 echo "$as_me:19515: result: $cf_cv_pragma_unreferenced" >&5
19516 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19517
19518 # if the pragma is supported, use it (needed in the Trace code).
19519 if test $cf_cv_pragma_unreferenced = yes ; then
19520         PRAGMA_UNREF=TRUE
19521 else
19522         PRAGMA_UNREF=FALSE
19523 fi
19524
19525 cf_gnat_libraries=no
19526 cf_gnat_projects=no
19527
19528 echo "$as_me:19528: checking if GNAT supports project files" >&5
19529 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19530 case $cf_gnat_version in #(vi
19531 3.[0-9]*) #(vi
19532         ;;
19533 *)
19534         case $cf_cv_system_name in #(vi
19535         cygwin*) #(vi
19536                 ;;
19537         *)
19538                 mkdir conftest.src conftest.bin conftest.lib
19539                 cd conftest.src
19540                 rm -rf conftest* *~conftest*
19541                 cat >>library.gpr <<CF_EOF
19542 project Library is
19543   Kind := External ("LIB_KIND");
19544   for Library_Name use "ConfTest";
19545   for Object_Dir use ".";
19546   for Library_ALI_Dir use External("LIBRARY_DIR");
19547   for Library_Version use External ("SONAME");
19548   for Library_Kind use Kind;
19549   for Library_Dir use External("BUILD_DIR");
19550   Source_Dir := External ("SOURCE_DIR");
19551   for Source_Dirs use (Source_Dir);
19552   package Compiler is
19553      for Default_Switches ("Ada") use
19554        ("-g",
19555         "-O2",
19556         "-gnatafno",
19557         "-gnatVa",   -- All validity checks
19558         "-gnatwa");  -- Activate all optional errors
19559   end Compiler;
19560 end Library;
19561 CF_EOF
19562                 cat >>confpackage.ads <<CF_EOF
19563 package ConfPackage is
19564    procedure conftest;
19565 end ConfPackage;
19566 CF_EOF
19567                 cat >>confpackage.adb <<CF_EOF
19568 with Text_IO;
19569 package body ConfPackage is
19570    procedure conftest is
19571    begin
19572       Text_IO.Put ("Hello World");
19573       Text_IO.New_Line;
19574    end conftest;
19575 end ConfPackage;
19576 CF_EOF
19577                 if ( $cf_ada_make $ADAFLAGS \
19578                                 -Plibrary.gpr \
19579                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19580                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19581                                 -XSOURCE_DIR=`pwd` \
19582                                 -XSONAME=libConfTest.so.1 \
19583                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19584                         cf_gnat_projects=yes
19585                 fi
19586                 cd ..
19587                 if test -f conftest.lib/confpackage.ali
19588                 then
19589                         cf_gnat_libraries=yes
19590                 fi
19591                 rm -rf conftest* *~conftest*
19592                 ;;
19593         esac
19594         ;;
19595 esac
19596 echo "$as_me:19596: result: $cf_gnat_projects" >&5
19597 echo "${ECHO_T}$cf_gnat_projects" >&6
19598
19599 if test $cf_gnat_projects = yes
19600 then
19601         echo "$as_me:19601: checking if GNAT supports libraries" >&5
19602 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19603         echo "$as_me:19603: result: $cf_gnat_libraries" >&5
19604 echo "${ECHO_T}$cf_gnat_libraries" >&6
19605 fi
19606
19607 if test "$cf_gnat_projects" = yes
19608 then
19609         USE_OLD_MAKERULES="#"
19610         USE_GNAT_PROJECTS=""
19611 else
19612         USE_OLD_MAKERULES=""
19613         USE_GNAT_PROJECTS="#"
19614 fi
19615
19616 if test "$cf_gnat_libraries" = yes
19617 then
19618         USE_GNAT_LIBRARIES=""
19619 else
19620         USE_GNAT_LIBRARIES="#"
19621 fi
19622
19623 echo "$as_me:19623: checking for ada-compiler" >&5
19624 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19625
19626 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19627 if test "${with_ada_compiler+set}" = set; then
19628   withval="$with_ada_compiler"
19629   cf_ada_compiler=$withval
19630 else
19631   cf_ada_compiler=gnatmake
19632 fi;
19633
19634 echo "$as_me:19634: result: $cf_ada_compiler" >&5
19635 echo "${ECHO_T}$cf_ada_compiler" >&6
19636
19637                         cf_ada_package=terminal_interface
19638
19639 echo "$as_me:19639: checking for ada-include" >&5
19640 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19641
19642 # Check whether --with-ada-include or --without-ada-include was given.
19643 if test "${with_ada_include+set}" = set; then
19644   withval="$with_ada_include"
19645
19646 else
19647   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19648 fi; if test -n "$prefix/share/ada/adainclude" ; then
19649
19650 if test "x$prefix" != xNONE; then
19651   cf_path_syntax="$prefix"
19652 else
19653   cf_path_syntax="$ac_default_prefix"
19654 fi
19655
19656 case ".$withval" in #(vi
19657 .\$\(*\)*|.\'*\'*) #(vi
19658   ;;
19659 ..|./*|.\\*) #(vi
19660   ;;
19661 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19662   ;;
19663 .\${*prefix}*|.\${*dir}*) #(vi
19664   eval withval="$withval"
19665   case ".$withval" in #(vi
19666   .NONE/*)
19667     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19668     ;;
19669   esac
19670   ;; #(vi
19671 .no|.NONE/*)
19672   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19673   ;;
19674 *)
19675   { { echo "$as_me:19675: error: expected a pathname, not \"$withval\"" >&5
19676 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19677    { (exit 1); exit 1; }; }
19678   ;;
19679 esac
19680
19681 fi
19682 eval ADA_INCLUDE="$withval"
19683
19684 echo "$as_me:19684: result: $ADA_INCLUDE" >&5
19685 echo "${ECHO_T}$ADA_INCLUDE" >&6
19686
19687 echo "$as_me:19687: checking for ada-objects" >&5
19688 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19689
19690 # Check whether --with-ada-objects or --without-ada-objects was given.
19691 if test "${with_ada_objects+set}" = set; then
19692   withval="$with_ada_objects"
19693
19694 else
19695   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19696 fi; if test -n "$prefix/lib/ada/adalib" ; then
19697
19698 if test "x$prefix" != xNONE; then
19699   cf_path_syntax="$prefix"
19700 else
19701   cf_path_syntax="$ac_default_prefix"
19702 fi
19703
19704 case ".$withval" in #(vi
19705 .\$\(*\)*|.\'*\'*) #(vi
19706   ;;
19707 ..|./*|.\\*) #(vi
19708   ;;
19709 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19710   ;;
19711 .\${*prefix}*|.\${*dir}*) #(vi
19712   eval withval="$withval"
19713   case ".$withval" in #(vi
19714   .NONE/*)
19715     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19716     ;;
19717   esac
19718   ;; #(vi
19719 .no|.NONE/*)
19720   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19721   ;;
19722 *)
19723   { { echo "$as_me:19723: error: expected a pathname, not \"$withval\"" >&5
19724 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19725    { (exit 1); exit 1; }; }
19726   ;;
19727 esac
19728
19729 fi
19730 eval ADA_OBJECTS="$withval"
19731
19732 echo "$as_me:19732: result: $ADA_OBJECTS" >&5
19733 echo "${ECHO_T}$ADA_OBJECTS" >&6
19734
19735 echo "$as_me:19735: checking if an Ada95 shared-library should be built" >&5
19736 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19737
19738 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19739 if test "${with_ada_sharedlib+set}" = set; then
19740   withval="$with_ada_sharedlib"
19741   with_ada_sharedlib=$withval
19742 else
19743   with_ada_sharedlib=no
19744 fi;
19745 echo "$as_me:19745: result: $with_ada_sharedlib" >&5
19746 echo "${ECHO_T}$with_ada_sharedlib" >&6
19747
19748 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19749 MAKE_ADA_SHAREDLIB="#"
19750
19751 if test "x$with_ada_sharedlib" != xno
19752 then
19753         MAKE_ADA_SHAREDLIB=
19754         if test "x$with_ada_sharedlib" != xyes
19755         then
19756                 ADA_SHAREDLIB="$with_ada_sharedlib"
19757         fi
19758 fi
19759
19760                 fi
19761         fi
19762 else
19763         cf_with_ada=no
19764 fi
19765
19766 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19767 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19768 ###
19769 ### ticlib modules may be a separate library, otherwise contained in termlib.
19770 ### termlib modules may be a separate library, otherwise contained in ncurses.
19771 ###
19772 ### The of "+" or " " between the tokens controls the way the script
19773 ### chooses to split module lists into libraries.
19774 ###
19775 ### (see CF_LIB_RULES).
19776 echo "$as_me:19776: checking for library subsets" >&5
19777 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19778 LIB_SUBSETS=
19779
19780 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19781         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19782         if test "$with_ticlib" != no ; then
19783                 LIB_SUBSETS="${LIB_SUBSETS} "
19784         else
19785                 LIB_SUBSETS="${LIB_SUBSETS}+"
19786         fi
19787 fi
19788
19789 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19790 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19791
19792 if test "$with_termlib" != no ; then
19793         LIB_SUBSETS="${LIB_SUBSETS} "
19794 else
19795         LIB_SUBSETS="${LIB_SUBSETS}+"
19796 fi
19797
19798 LIB_SUBSETS="${LIB_SUBSETS}base"
19799
19800 # Most term-driver calls are to tinfo, but some like init_pair are to the
19801 # base library (so it resides in base).
19802 if test "$with_term_driver" != no ; then
19803         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19804         case $cf_cv_system_name in #(vi
19805         *mingw32*) #(vi
19806                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19807                 ;;
19808         *) #(vi
19809                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19810                 ;;
19811         esac
19812 fi
19813
19814 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19815 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19816
19817 echo "$as_me:19817: result: $LIB_SUBSETS" >&5
19818 echo "${ECHO_T}$LIB_SUBSETS" >&6
19819
19820 ### Construct the list of include-directories to be generated
19821
19822 if test "$GCC" != yes; then
19823         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19824 elif test "$includedir" != "/usr/include"; then
19825         if test "$includedir" = '${prefix}/include' ; then
19826                 if test $prefix != /usr ; then
19827                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19828                 fi
19829         else
19830                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
19831         fi
19832 fi
19833 if test "$srcdir" != "."; then
19834         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19835 fi
19836 CPPFLAGS="-I. -I../include $CPPFLAGS"
19837
19838 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19839 if test "$srcdir" != "."; then
19840         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19841 fi
19842 if test "$GCC" != yes; then
19843         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19844 elif test "$includedir" != "/usr/include"; then
19845         if test "$includedir" = '${prefix}/include' ; then
19846                 if test $prefix != /usr ; then
19847                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19848                 fi
19849         else
19850                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19851         fi
19852 fi
19853
19854 ### Build up pieces for makefile rules
19855 echo "$as_me:19855: checking default library suffix" >&5
19856 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19857
19858         case $DFT_LWR_MODEL in
19859         libtool) DFT_ARG_SUFFIX=''   ;;
19860         normal)  DFT_ARG_SUFFIX=''   ;;
19861         debug)   DFT_ARG_SUFFIX='_g' ;;
19862         profile) DFT_ARG_SUFFIX='_p' ;;
19863         shared)  DFT_ARG_SUFFIX=''   ;;
19864         esac
19865         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19866 echo "$as_me:19866: result: $DFT_ARG_SUFFIX" >&5
19867 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19868
19869 echo "$as_me:19869: checking default library-dependency suffix" >&5
19870 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19871
19872         case $DFT_LWR_MODEL in #(vi
19873         libtool) #(vi
19874                 DFT_LIB_SUFFIX='.la'
19875                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19876                 ;;
19877         normal) #(vi
19878                 DFT_LIB_SUFFIX='.a'
19879                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19880                 ;;
19881         debug) #(vi
19882                 DFT_LIB_SUFFIX='_g.a'
19883                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19884                 ;;
19885         profile) #(vi
19886                 DFT_LIB_SUFFIX='_p.a'
19887                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19888                 ;;
19889         shared) #(vi
19890                 case $cf_cv_system_name in
19891                 aix[5-7]*) #(vi
19892                         DFT_LIB_SUFFIX='.a'
19893                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19894                         ;;
19895                 cygwin*|mingw*) #(vi
19896                         DFT_LIB_SUFFIX='.dll'
19897                         DFT_DEP_SUFFIX='.dll.a'
19898                         ;;
19899                 darwin*) #(vi
19900                         DFT_LIB_SUFFIX='.dylib'
19901                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19902                         ;;
19903                 hpux*) #(vi
19904                         case $target in
19905                         ia64*) #(vi
19906                                 DFT_LIB_SUFFIX='.so'
19907                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19908                                 ;;
19909                         *) #(vi
19910                                 DFT_LIB_SUFFIX='.sl'
19911                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19912                                 ;;
19913                         esac
19914                         ;;
19915                 *)      DFT_LIB_SUFFIX='.so'
19916                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19917                         ;;
19918                 esac
19919         esac
19920         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19921         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19922 echo "$as_me:19922: result: $DFT_DEP_SUFFIX" >&5
19923 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19924
19925 echo "$as_me:19925: checking default object directory" >&5
19926 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19927
19928         case $DFT_LWR_MODEL in
19929         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19930         normal)  DFT_OBJ_SUBDIR='objects' ;;
19931         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19932         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19933         shared)
19934                 case $cf_cv_system_name in #(vi
19935                 cygwin) #(vi
19936                         DFT_OBJ_SUBDIR='objects' ;;
19937                 *)
19938                         DFT_OBJ_SUBDIR='obj_s' ;;
19939                 esac
19940         esac
19941 echo "$as_me:19941: result: $DFT_OBJ_SUBDIR" >&5
19942 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19943
19944 if test "x$cf_with_cxx" = xyes ; then
19945 echo "$as_me:19945: checking c++ library-dependency suffix" >&5
19946 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19947 if test "$with_libtool" != "no"; then
19948         # libtool thinks it can make c++ shared libraries (perhaps only g++)
19949         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19950 elif test "$with_shared_cxx" != "no"; then
19951         # also for g++ users...
19952         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19953 else
19954         # we normally make a static library because C/C++ library rules differ
19955
19956         case normal in #(vi
19957         libtool) #(vi
19958                 CXX_LIB_SUFFIX='.la'
19959                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19960                 ;;
19961         normal) #(vi
19962                 CXX_LIB_SUFFIX='.a'
19963                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19964                 ;;
19965         debug) #(vi
19966                 CXX_LIB_SUFFIX='_g.a'
19967                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19968                 ;;
19969         profile) #(vi
19970                 CXX_LIB_SUFFIX='_p.a'
19971                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19972                 ;;
19973         shared) #(vi
19974                 case $cf_cv_system_name in
19975                 aix[5-7]*) #(vi
19976                         CXX_LIB_SUFFIX='.a'
19977                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19978                         ;;
19979                 cygwin*|mingw*) #(vi
19980                         CXX_LIB_SUFFIX='.dll'
19981                         CXX_DEP_SUFFIX='.dll.a'
19982                         ;;
19983                 darwin*) #(vi
19984                         CXX_LIB_SUFFIX='.dylib'
19985                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19986                         ;;
19987                 hpux*) #(vi
19988                         case $target in
19989                         ia64*) #(vi
19990                                 CXX_LIB_SUFFIX='.so'
19991                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19992                                 ;;
19993                         *) #(vi
19994                                 CXX_LIB_SUFFIX='.sl'
19995                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19996                                 ;;
19997                         esac
19998                         ;;
19999                 *)      CXX_LIB_SUFFIX='.so'
20000                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20001                         ;;
20002                 esac
20003         esac
20004         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20005         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20006
20007 fi
20008 echo "$as_me:20008: result: $CXX_LIB_SUFFIX" >&5
20009 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20010
20011 fi
20012
20013 # do not want -ldl in build except as needed for -lncurses dependency
20014 if test "x$with_dlsym" = xyes ; then
20015 if test $DFT_LWR_MODEL = shared || \
20016    test $DFT_LWR_MODEL = libtool ; then
20017
20018 # remove dl library from $LIBS
20019 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20020
20021 fi
20022 fi
20023 ### Set up low-level terminfo dependencies for makefiles.
20024
20025 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20026 # do not need libdl
20027 TICS_LIST=
20028 if test "x$with_dlsym" = xyes ; then
20029
20030 # remove dl library from $SHLIB_LIST
20031 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20032
20033 fi
20034
20035 if test "$with_ticlib" != no ; then
20036
20037         if test "x$with_ticlib" != xyes ; then
20038                 TICS_NAME=$with_ticlib
20039                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20040                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20041                 TICS_LIB_SUFFIX="${with_ticlib}"
20042         else
20043                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20044                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20045                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20046         fi
20047         TICS_LDFLAGS="-L${LIB_DIR}"
20048         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20049 else
20050         TICS_LDFLAGS="-L${LIB_DIR}"
20051         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20052 fi
20053
20054 if test "$with_termlib" != no ; then
20055
20056         if test "x$with_termlib" != xyes ; then
20057                 TINFO_NAME=$with_termlib
20058                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20059                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20060                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20061                 TINFO_LIB_SUFFIX="${with_termlib}"
20062         else
20063                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20064                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20065                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20066                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20067         fi
20068
20069         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20070         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20071         if test "$DFT_LWR_MODEL" = "libtool"; then
20072                 TEST_ARGS="${TEST_DEPS}"
20073                 TEST_ARG2="${TEST_DEP2}"
20074                 TINFO_LDFLAGS="-L${LIB_DIR}"
20075                 TINFO_LIBS="$TEST_ARGS"
20076                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20077                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20078         else
20079                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20080                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20081                 if test "x$with_term_driver" != xno ; then
20082                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20083                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20084                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20085                 else
20086                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20087                         TINFO_LIBS="$TEST_ARGS"
20088                 fi
20089                 TINFO_LDFLAGS="-L${LIB_DIR}"
20090                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20091         fi
20092 else
20093         # the next lines are needed for linking libtic over libncurses
20094         TINFO_NAME=${LIB_NAME}
20095         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20096         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20097         if test "x$with_tic_depends" = xyes ; then
20098                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20099         else
20100                 TICS_LIST="$SHLIB_LIST"
20101         fi
20102
20103         TINFO_LDFLAGS="-L${LIB_DIR}"
20104         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20105 fi
20106
20107 if test "$DFT_LWR_MODEL" = shared ; then
20108         case $cf_cv_system_name in #(vi
20109         cygwin*)
20110                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20111                 TINFO_SUFFIX=.dll
20112                 ;;
20113         esac
20114 fi
20115
20116 if test "x$with_dlsym" = xyes ; then
20117
20118 # remove dl library from $TICS_LIST
20119 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20120
20121 fi
20122
20123 if test "$DFT_LWR_MODEL" = "libtool"; then
20124     OBJEXT=lo
20125 fi
20126
20127 # needed for Ada95
20128 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20129
20130 case $DFT_LWR_MODEL in
20131 normal|debug|profile)
20132
20133 if test "$GCC" = yes ; then
20134         case $cf_cv_system_name in #(
20135         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20136                 LDFLAGS_STATIC=
20137                 LDFLAGS_SHARED=
20138                 ;;
20139     *)  #( normally, except when broken
20140         LDFLAGS_STATIC=-static
20141         LDFLAGS_SHARED=-dynamic
20142         ;;
20143     esac
20144 else
20145         case $cf_cv_system_name in #(
20146         aix[4-7]*)      #( from ld manpage
20147                 LDFLAGS_STATIC=-bstatic
20148                 LDFLAGS_SHARED=-bdynamic
20149                 ;;
20150         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20151                 # We could also use just "archive" and "shared".
20152                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20153                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20154                 ;;
20155         irix*)          #( from ld manpage IRIX64
20156                 LDFLAGS_STATIC=-Bstatic
20157                 LDFLAGS_SHARED=-Bdynamic
20158                 ;;
20159         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20160                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20161                 LDFLAGS_STATIC=-noso
20162                 LDFLAGS_SHARED=-so_archive
20163                 ;;
20164         solaris2*)
20165                 LDFLAGS_STATIC=-Bstatic
20166                 LDFLAGS_SHARED=-Bdynamic
20167                 ;;
20168         esac
20169 fi
20170
20171 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20172 then
20173         echo "$as_me:20173: checking if linker supports switching between static/dynamic" >&5
20174 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20175
20176         rm -f libconftest.a
20177         cat >conftest.$ac_ext <<EOF
20178 #line 20178 "configure"
20179 #include <stdio.h>
20180 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20181 EOF
20182         if { (eval echo "$as_me:20182: \"$ac_compile\"") >&5
20183   (eval $ac_compile) 2>&5
20184   ac_status=$?
20185   echo "$as_me:20185: \$? = $ac_status" >&5
20186   (exit $ac_status); } ; then
20187                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20188                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20189         fi
20190         rm -f conftest.*
20191
20192         cf_save_LIBS="$LIBS"
20193
20194         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20195         cat >conftest.$ac_ext <<_ACEOF
20196 #line 20196 "configure"
20197 #include "confdefs.h"
20198
20199 #line 20199 "configure"
20200 #include <stdio.h>
20201 int cf_ldflags_static(FILE *fp);
20202
20203 int
20204 main ()
20205 {
20206
20207         return cf_ldflags_static(stdin);
20208
20209   ;
20210   return 0;
20211 }
20212 _ACEOF
20213 rm -f conftest.$ac_objext conftest$ac_exeext
20214 if { (eval echo "$as_me:20214: \"$ac_link\"") >&5
20215   (eval $ac_link) 2>&5
20216   ac_status=$?
20217   echo "$as_me:20217: \$? = $ac_status" >&5
20218   (exit $ac_status); } &&
20219          { ac_try='test -s conftest$ac_exeext'
20220   { (eval echo "$as_me:20220: \"$ac_try\"") >&5
20221   (eval $ac_try) 2>&5
20222   ac_status=$?
20223   echo "$as_me:20223: \$? = $ac_status" >&5
20224   (exit $ac_status); }; }; then
20225
20226         # some linkers simply ignore the -dynamic
20227         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20228         *static*) # (vi
20229                 cf_ldflags_static=no
20230                 ;;
20231         *)
20232                 cf_ldflags_static=yes
20233                 ;;
20234         esac
20235
20236 else
20237   echo "$as_me: failed program was:" >&5
20238 cat conftest.$ac_ext >&5
20239 cf_ldflags_static=no
20240 fi
20241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20242
20243         rm -f libconftest.*
20244         LIBS="$cf_save_LIBS"
20245
20246         echo "$as_me:20246: result: $cf_ldflags_static" >&5
20247 echo "${ECHO_T}$cf_ldflags_static" >&6
20248
20249         if test $cf_ldflags_static != yes
20250         then
20251                 LDFLAGS_STATIC=
20252                 LDFLAGS_SHARED=
20253         fi
20254 else
20255         LDFLAGS_STATIC=
20256         LDFLAGS_SHARED=
20257 fi
20258
20259         ;;
20260 esac
20261
20262 echo "$as_me:20262: checking where we will install curses.h" >&5
20263 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20264 test "$with_overwrite" = no && \
20265 test "x$includedir" = 'x${prefix}/include' && \
20266         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20267 echo "$as_me:20267: result: $includedir" >&5
20268 echo "${ECHO_T}$includedir" >&6
20269
20270 ### Resolve a conflict between normal and wide-curses by forcing applications
20271 ### that will need libutf8 to add it to their configure script.
20272 if test "$with_overwrite" != no ; then
20273 if test "$NCURSES_LIBUTF8" = 1 ; then
20274         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20275         { echo "$as_me:20275: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20276 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20277 fi
20278 fi
20279 WITH_OVERWRITE=$with_overwrite
20280
20281 # used to separate tack out of the tree
20282 NCURSES_TREE=
20283
20284 ### predefined stuff for the test programs
20285
20286 cat >>confdefs.h <<\EOF
20287 #define HAVE_SLK_COLOR 1
20288 EOF
20289
20290 ### Construct the list of subdirectories for which we'll customize makefiles
20291 ### with the appropriate compile-rules.
20292
20293 echo "$as_me:20293: checking for src modules" >&5
20294 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20295
20296 # dependencies and linker-arguments for test-programs
20297 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20298 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20299 if test "$DFT_LWR_MODEL" = "libtool"; then
20300         TEST_ARGS="${TEST_DEPS}"
20301         TEST_ARG2="${TEST_DEP2}"
20302 else
20303         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20304         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20305 fi
20306
20307 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20308 cf_cv_src_modules=
20309 for cf_dir in $modules_to_build
20310 do
20311         if test -f $srcdir/$cf_dir/modules; then
20312
20313                 # We may/may not have tack in the distribution, though the
20314                 # makefile is.
20315                 if test $cf_dir = tack ; then
20316                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20317                                 continue
20318                         fi
20319                 fi
20320
20321                 if test -z "$cf_cv_src_modules"; then
20322                         cf_cv_src_modules=$cf_dir
20323                 else
20324                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20325                 fi
20326
20327                 # Make the ncurses_cfg.h file record the library interface files as
20328                 # well.  These are header files that are the same name as their
20329                 # directory.  Ncurses is the only library that does not follow
20330                 # that pattern.
20331                 if test $cf_dir = tack ; then
20332                         continue
20333                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20334
20335 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20336
20337                         cat >>confdefs.h <<EOF
20338 #define HAVE_${cf_have_include}_H 1
20339 EOF
20340
20341                         cat >>confdefs.h <<EOF
20342 #define HAVE_LIB${cf_have_include} 1
20343 EOF
20344
20345                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20346                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20347                         if test "$DFT_LWR_MODEL" = "libtool"; then
20348                                 TEST_ARGS="${TEST_DEPS}"
20349                                 TEST_ARG2="${TEST_DEP2}"
20350                         else
20351                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20352                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20353                         fi
20354                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20355                 fi
20356         fi
20357 done
20358 echo "$as_me:20358: result: $cf_cv_src_modules" >&5
20359 echo "${ECHO_T}$cf_cv_src_modules" >&6
20360
20361 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20362 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20363
20364 SRC_SUBDIRS=
20365 if test "x$cf_with_manpages" != xno ; then
20366         SRC_SUBDIRS="$SRC_SUBDIRS man"
20367 fi
20368 SRC_SUBDIRS="$SRC_SUBDIRS include"
20369 for cf_dir in $cf_cv_src_modules
20370 do
20371         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20372 done
20373 if test "x$cf_with_tests" != "xno" ; then
20374         SRC_SUBDIRS="$SRC_SUBDIRS test"
20375 fi
20376 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20377 if test "$cf_with_cxx_binding" != no; then
20378         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20379         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20380 fi
20381
20382 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20383 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20384
20385 ADA_SUBDIRS=
20386 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20387         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20388         ADA_SUBDIRS="gen src"
20389         if test "x$cf_with_tests" != "xno" ; then
20390                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20391         fi
20392 fi
20393
20394 SUB_MAKEFILES=
20395 for cf_dir in $SRC_SUBDIRS
20396 do
20397         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20398 done
20399
20400 if test -n "$ADA_SUBDIRS"; then
20401         for cf_dir in $ADA_SUBDIRS
20402         do
20403                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20404         done
20405
20406 fi
20407
20408 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20409    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20410    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20411 fi
20412
20413 DIRS_TO_MAKE="lib"
20414 for cf_item in $cf_list_models
20415 do
20416
20417         case $cf_item in
20418         libtool) cf_subdir='obj_lo'  ;;
20419         normal)  cf_subdir='objects' ;;
20420         debug)   cf_subdir='obj_g' ;;
20421         profile) cf_subdir='obj_p' ;;
20422         shared)
20423                 case $cf_cv_system_name in #(vi
20424                 cygwin) #(vi
20425                         cf_subdir='objects' ;;
20426                 *)
20427                         cf_subdir='obj_s' ;;
20428                 esac
20429         esac
20430
20431         for cf_item2 in $DIRS_TO_MAKE
20432         do
20433                 test $cf_item2 = $cf_subdir && break
20434         done
20435         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20436 done
20437 for cf_dir in $DIRS_TO_MAKE
20438 do
20439         test ! -d $cf_dir && mkdir $cf_dir
20440 done
20441
20442 # symbols that differ when compiling Ada95 by itself.
20443 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20444
20445 # values to use as strings
20446
20447 cat >>confdefs.h <<EOF
20448 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20449 EOF
20450
20451 cat >>confdefs.h <<EOF
20452 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20453 EOF
20454
20455 ### Now that we're done running tests, add the compiler-warnings, if any
20456
20457 cf_fix_cppflags=no
20458 cf_new_cflags=
20459 cf_new_cppflags=
20460 cf_new_extra_cppflags=
20461
20462 for cf_add_cflags in $EXTRA_CFLAGS
20463 do
20464 case $cf_fix_cppflags in
20465 no)
20466         case $cf_add_cflags in #(vi
20467         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20468                 case $cf_add_cflags in
20469                 -D*)
20470                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20471
20472                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20473                                 && test -z "${cf_tst_cflags}" \
20474                                 && cf_fix_cppflags=yes
20475
20476                         if test $cf_fix_cppflags = yes ; then
20477                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20478                                 continue
20479                         elif test "${cf_tst_cflags}" = "\"'" ; then
20480                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20481                                 continue
20482                         fi
20483                         ;;
20484                 esac
20485                 case "$CPPFLAGS" in
20486                 *$cf_add_cflags) #(vi
20487                         ;;
20488                 *) #(vi
20489                         case $cf_add_cflags in #(vi
20490                         -D*)
20491                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20492
20493 CPPFLAGS=`echo "$CPPFLAGS" | \
20494         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20495                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20496
20497                                 ;;
20498                         esac
20499                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20500                         ;;
20501                 esac
20502                 ;;
20503         *)
20504                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20505                 ;;
20506         esac
20507         ;;
20508 yes)
20509         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20510
20511         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20512
20513         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20514                 && test -z "${cf_tst_cflags}" \
20515                 && cf_fix_cppflags=no
20516         ;;
20517 esac
20518 done
20519
20520 if test -n "$cf_new_cflags" ; then
20521
20522         CFLAGS="$CFLAGS $cf_new_cflags"
20523 fi
20524
20525 if test -n "$cf_new_cppflags" ; then
20526
20527         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20528 fi
20529
20530 if test -n "$cf_new_extra_cppflags" ; then
20531
20532         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20533 fi
20534
20535 ### Define substitutions for header files to avoid name-pollution
20536
20537 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20538         HAVE_TCGETATTR=1
20539 else
20540         HAVE_TCGETATTR=0
20541 fi
20542
20543 if test "x$ac_cv_header_termio_h" = xyes ; then
20544         HAVE_TERMIO_H=1
20545 else
20546         HAVE_TERMIO_H=0
20547 fi
20548
20549 if test "x$ac_cv_header_termios_h" = xyes ; then
20550         HAVE_TERMIOS_H=1
20551 else
20552         HAVE_TERMIOS_H=0
20553 fi
20554
20555 ################################################################################
20556 test "x$use_database" = xyes && \
20557 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20558
20559 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20560 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20561
20562 if test "x$enable_pc_files" = xyes ; then \
20563 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20564 MAKE_PC_FILES=
20565 else
20566 MAKE_PC_FILES="#"
20567 fi
20568
20569 # Extract the first word of "tic", so it can be a program name with args.
20570 set dummy tic; ac_word=$2
20571 echo "$as_me:20571: checking for $ac_word" >&5
20572 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20573 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20574   echo $ECHO_N "(cached) $ECHO_C" >&6
20575 else
20576   case $TIC_PATH in
20577   [\\/]* | ?:[\\/]*)
20578   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20579   ;;
20580   *)
20581   ac_save_IFS=$IFS; IFS=$ac_path_separator
20582 ac_dummy="$PATH:/usr/local/ncurses/bin"
20583 for ac_dir in $ac_dummy; do
20584   IFS=$ac_save_IFS
20585   test -z "$ac_dir" && ac_dir=.
20586   if $as_executable_p "$ac_dir/$ac_word"; then
20587    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20588    echo "$as_me:20588: found $ac_dir/$ac_word" >&5
20589    break
20590 fi
20591 done
20592
20593   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20594   ;;
20595 esac
20596 fi
20597 TIC_PATH=$ac_cv_path_TIC_PATH
20598
20599 if test -n "$TIC_PATH"; then
20600   echo "$as_me:20600: result: $TIC_PATH" >&5
20601 echo "${ECHO_T}$TIC_PATH" >&6
20602 else
20603   echo "$as_me:20603: result: no" >&5
20604 echo "${ECHO_T}no" >&6
20605 fi
20606
20607 if test -n "$FALLBACK_LIST"
20608 then
20609         if test "$TIC_PATH" = unknown
20610         then
20611                 { echo "$as_me:20611: WARNING: no tic program found for fallbacks" >&5
20612 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20613         fi
20614 fi
20615
20616 if test "x$cf_with_tests" != xno ; then
20617         MAKE_TESTS=
20618 else
20619         MAKE_TESTS="#"
20620 fi
20621
20622 ADAHTML_DIR=../../doc/html/ada
20623
20624 # these could be configurable, but are not currently
20625 PANEL_NAME=panel
20626 MENU_NAME=menu
20627 FORM_NAME=form
20628 CXX_NAME=ncurses++
20629
20630 SUB_SCRIPTS=
20631
20632 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"
20633 ac_config_commands="$ac_config_commands default"
20634 cat >confcache <<\_ACEOF
20635 # This file is a shell script that caches the results of configure
20636 # tests run on this system so they can be shared between configure
20637 # scripts and configure runs, see configure's option --config-cache.
20638 # It is not useful on other systems.  If it contains results you don't
20639 # want to keep, you may remove or edit it.
20640 #
20641 # config.status only pays attention to the cache file if you give it
20642 # the --recheck option to rerun configure.
20643 #
20644 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20645 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20646 # following values.
20647
20648 _ACEOF
20649
20650 # The following way of writing the cache mishandles newlines in values,
20651 # but we know of no workaround that is simple, portable, and efficient.
20652 # So, don't put newlines in cache variables' values.
20653 # Ultrix sh set writes to stderr and can't be redirected directly,
20654 # and sets the high bit in the cache file unless we assign to the vars.
20655 {
20656   (set) 2>&1 |
20657     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20658     *ac_space=\ *)
20659       # `set' does not quote correctly, so add quotes (double-quote
20660       # substitution turns \\\\ into \\, and sed turns \\ into \).
20661       sed -n \
20662         "s/'/'\\\\''/g;
20663           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20664       ;;
20665     *)
20666       # `set' quotes correctly as required by POSIX, so do not add quotes.
20667       sed -n \
20668         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20669       ;;
20670     esac;
20671 } |
20672   sed '
20673      t clear
20674      : clear
20675      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20676      t end
20677      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20678      : end' >>confcache
20679 if cmp -s $cache_file confcache; then :; else
20680   if test -w $cache_file; then
20681     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20682     cat confcache >$cache_file
20683   else
20684     echo "not updating unwritable cache $cache_file"
20685   fi
20686 fi
20687 rm -f confcache
20688
20689 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20690 # Let make expand exec_prefix.
20691 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20692
20693 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20694 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20695 # trailing colons and then remove the whole line if VPATH becomes empty
20696 # (actually we leave an empty line to preserve line numbers).
20697 if test "x$srcdir" = x.; then
20698   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20699 s/:*\$(srcdir):*/:/;
20700 s/:*\${srcdir}:*/:/;
20701 s/:*@srcdir@:*/:/;
20702 s/^\([^=]*=[    ]*\):*/\1/;
20703 s/:*$//;
20704 s/^[^=]*=[      ]*$//;
20705 }'
20706 fi
20707
20708 DEFS=-DHAVE_CONFIG_H
20709
20710 : ${CONFIG_STATUS=./config.status}
20711 ac_clean_files_save=$ac_clean_files
20712 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20713 { echo "$as_me:20713: creating $CONFIG_STATUS" >&5
20714 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20715 cat >$CONFIG_STATUS <<_ACEOF
20716 #! $SHELL
20717 # Generated automatically by configure.
20718 # Run this file to recreate the current configuration.
20719 # Compiler output produced by configure, useful for debugging
20720 # configure, is in config.log if it exists.
20721
20722 debug=false
20723 SHELL=\${CONFIG_SHELL-$SHELL}
20724 ac_cs_invocation="\$0 \$@"
20725
20726 _ACEOF
20727
20728 cat >>$CONFIG_STATUS <<\_ACEOF
20729 # Be Bourne compatible
20730 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20731   emulate sh
20732   NULLCMD=:
20733 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20734   set -o posix
20735 fi
20736
20737 # Name of the executable.
20738 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20739
20740 if expr a : '\(a\)' >/dev/null 2>&1; then
20741   as_expr=expr
20742 else
20743   as_expr=false
20744 fi
20745
20746 rm -f conf$$ conf$$.exe conf$$.file
20747 echo >conf$$.file
20748 if ln -s conf$$.file conf$$ 2>/dev/null; then
20749   # We could just check for DJGPP; but this test a) works b) is more generic
20750   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20751   if test -f conf$$.exe; then
20752     # Don't use ln at all; we don't have any links
20753     as_ln_s='cp -p'
20754   else
20755     as_ln_s='ln -s'
20756   fi
20757 elif ln conf$$.file conf$$ 2>/dev/null; then
20758   as_ln_s=ln
20759 else
20760   as_ln_s='cp -p'
20761 fi
20762 rm -f conf$$ conf$$.exe conf$$.file
20763
20764 as_executable_p="test -f"
20765
20766 # Support unset when possible.
20767 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20768   as_unset=unset
20769 else
20770   as_unset=false
20771 fi
20772
20773 # NLS nuisances.
20774 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20775 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20776 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20777 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20778 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20779 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20780 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20781 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20782
20783 # IFS
20784 # We need space, tab and new line, in precisely that order.
20785 as_nl='
20786 '
20787 IFS="   $as_nl"
20788
20789 # CDPATH.
20790 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20791
20792 exec 6>&1
20793
20794 _ACEOF
20795
20796 # Files that config.status was made for.
20797 if test -n "$ac_config_files"; then
20798   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20799 fi
20800
20801 if test -n "$ac_config_headers"; then
20802   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20803 fi
20804
20805 if test -n "$ac_config_links"; then
20806   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20807 fi
20808
20809 if test -n "$ac_config_commands"; then
20810   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20811 fi
20812
20813 cat >>$CONFIG_STATUS <<\EOF
20814
20815 ac_cs_usage="\
20816 \`$as_me' instantiates files from templates according to the
20817 current configuration.
20818
20819 Usage: $0 [OPTIONS] [FILE]...
20820
20821   -h, --help       print this help, then exit
20822   -V, --version    print version number, then exit
20823   -d, --debug      don't remove temporary files
20824       --recheck    update $as_me by reconfiguring in the same conditions
20825   --file=FILE[:TEMPLATE]
20826                    instantiate the configuration file FILE
20827   --header=FILE[:TEMPLATE]
20828                    instantiate the configuration header FILE
20829
20830 Configuration files:
20831 $config_files
20832
20833 Configuration headers:
20834 $config_headers
20835
20836 Configuration commands:
20837 $config_commands
20838
20839 Report bugs to <dickey@invisible-island.net>."
20840 EOF
20841
20842 cat >>$CONFIG_STATUS <<EOF
20843 ac_cs_version="\\
20844 config.status
20845 configured by $0, generated by GNU Autoconf 2.52.20121002,
20846   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20847
20848 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20849 Free Software Foundation, Inc.
20850 This config.status script is free software; the Free Software Foundation
20851 gives unlimited permission to copy, distribute and modify it."
20852 srcdir=$srcdir
20853 INSTALL="$INSTALL"
20854 EOF
20855
20856 cat >>$CONFIG_STATUS <<\EOF
20857 # If no file are specified by the user, then we need to provide default
20858 # value.  By we need to know if files were specified by the user.
20859 ac_need_defaults=:
20860 while test $# != 0
20861 do
20862   case $1 in
20863   --*=*)
20864     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20865     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20866     shift
20867     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20868     shift
20869     ;;
20870   -*);;
20871   *) # This is not an option, so the user has probably given explicit
20872      # arguments.
20873      ac_need_defaults=false;;
20874   esac
20875
20876   case $1 in
20877   # Handling of the options.
20878 EOF
20879 cat >>$CONFIG_STATUS <<EOF
20880   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20881     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20882     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20883 EOF
20884 cat >>$CONFIG_STATUS <<\EOF
20885   --version | --vers* | -V )
20886     echo "$ac_cs_version"; exit 0 ;;
20887   --he | --h)
20888     # Conflict between --help and --header
20889     { { echo "$as_me:20889: error: ambiguous option: $1
20890 Try \`$0 --help' for more information." >&5
20891 echo "$as_me: error: ambiguous option: $1
20892 Try \`$0 --help' for more information." >&2;}
20893    { (exit 1); exit 1; }; };;
20894   --help | --hel | -h )
20895     echo "$ac_cs_usage"; exit 0 ;;
20896   --debug | --d* | -d )
20897     debug=: ;;
20898   --file | --fil | --fi | --f )
20899     shift
20900     CONFIG_FILES="$CONFIG_FILES $1"
20901     ac_need_defaults=false;;
20902   --header | --heade | --head | --hea )
20903     shift
20904     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20905     ac_need_defaults=false;;
20906
20907   # This is an error.
20908   -*) { { echo "$as_me:20908: error: unrecognized option: $1
20909 Try \`$0 --help' for more information." >&5
20910 echo "$as_me: error: unrecognized option: $1
20911 Try \`$0 --help' for more information." >&2;}
20912    { (exit 1); exit 1; }; } ;;
20913
20914   *) ac_config_targets="$ac_config_targets $1" ;;
20915
20916   esac
20917   shift
20918 done
20919
20920 exec 5>>config.log
20921 cat >&5 << _ACEOF
20922
20923 ## ----------------------- ##
20924 ## Running config.status.  ##
20925 ## ----------------------- ##
20926
20927 This file was extended by $as_me 2.52.20121002, executed with
20928   CONFIG_FILES    = $CONFIG_FILES
20929   CONFIG_HEADERS  = $CONFIG_HEADERS
20930   CONFIG_LINKS    = $CONFIG_LINKS
20931   CONFIG_COMMANDS = $CONFIG_COMMANDS
20932   > $ac_cs_invocation
20933 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20934
20935 _ACEOF
20936 EOF
20937
20938 cat >>$CONFIG_STATUS <<EOF
20939 #
20940 # INIT-COMMANDS section.
20941 #
20942
20943 ### Special initialization commands, used to pass information from the
20944 ### configuration-run into config.status
20945
20946 AWK="$AWK"
20947 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20948 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20949 ECHO_LD="$ECHO_LD"
20950 LDCONFIG="$LDCONFIG"
20951 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20952 LIB_NAME="$LIB_NAME"
20953 LIB_PREFIX="$LIB_PREFIX"
20954 LIB_SUBSETS="$LIB_SUBSETS"
20955 LIB_SUFFIX="$LIB_SUFFIX"
20956 LIB_TRACING="$LIB_TRACING"
20957 LN_S="$LN_S"
20958 MAKE_TERMINFO="$MAKE_TERMINFO"
20959 NCURSES_MAJOR="$NCURSES_MAJOR"
20960 NCURSES_MINOR="$NCURSES_MINOR"
20961 NCURSES_OSPEED="$NCURSES_OSPEED"
20962 NCURSES_PATCH="$NCURSES_PATCH"
20963 SRC_SUBDIRS="$SRC_SUBDIRS"
20964 TERMINFO="$TERMINFO"
20965 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20966 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20967 TICS_NAME="$TICS_NAME"
20968 TIC_PATH="$TIC_PATH"
20969 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20970 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20971 TINFO_NAME="$TINFO_NAME"
20972 TINFO_SUFFIX="$TINFO_SUFFIX"
20973 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20974 WITH_CURSES_H="$with_curses_h"
20975 WITH_ECHO="${enable_echo:=yes}"
20976 WITH_OVERWRITE="$with_overwrite"
20977 cf_LIST_MODELS="$cf_list_models"
20978 cf_cv_abi_version="$cf_cv_abi_version"
20979 cf_cv_do_relink="$cf_cv_do_relink"
20980 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20981 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20982 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20983 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20984 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20985 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20986 cf_cv_rel_version="$cf_cv_rel_version"
20987 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20988 cf_cv_shared_soname='$cf_cv_shared_soname'
20989 cf_cv_shlib_version="$cf_cv_shlib_version"
20990 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20991 cf_cv_system_name="$cf_cv_system_name"
20992 cf_cv_term_driver="$with_term_driver"
20993 cf_with_ada="$cf_with_ada"
20994 cf_with_cxx_binding="$cf_with_cxx_binding"
20995 cf_with_manpages="$cf_with_manpages"
20996 cf_with_tests="$cf_with_tests"
20997 with_shared_cxx="$with_shared_cxx"
20998 host="$host"
20999 target="$target"
21000
21001 EOF
21002
21003 cat >>$CONFIG_STATUS <<\EOF
21004 for ac_config_target in $ac_config_targets
21005 do
21006   case "$ac_config_target" in
21007   # Handling of arguments.
21008   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21009   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21010   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21011   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21012   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21013   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21014   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21015   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21016   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21017   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21018   *) { { echo "$as_me:21018: error: invalid argument: $ac_config_target" >&5
21019 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21020    { (exit 1); exit 1; }; };;
21021   esac
21022 done
21023
21024 # If the user did not use the arguments to specify the items to instantiate,
21025 # then the envvar interface is used.  Set only those that are not.
21026 # We use the long form for the default assignment because of an extremely
21027 # bizarre bug on SunOS 4.1.3.
21028 if $ac_need_defaults; then
21029   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21030   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21031   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21032 fi
21033
21034 # Create a temporary directory, and hook for its removal unless debugging.
21035 $debug ||
21036 {
21037   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21038   trap '{ (exit 1); exit 1; }' 1 2 13 15
21039 }
21040
21041 # Create a (secure) tmp directory for tmp files.
21042 : ${TMPDIR=/tmp}
21043 {
21044   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21045   test -n "$tmp" && test -d "$tmp"
21046 }  ||
21047 {
21048   tmp=$TMPDIR/cs$$-$RANDOM
21049   (umask 077 && mkdir $tmp)
21050 } ||
21051 {
21052    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21053    { (exit 1); exit 1; }
21054 }
21055
21056 EOF
21057
21058 cat >>$CONFIG_STATUS <<EOF
21059
21060 #
21061 # CONFIG_FILES section.
21062 #
21063
21064 # No need to generate the scripts if there are no CONFIG_FILES.
21065 # This happens for instance when ./config.status config.h
21066 if test -n "\$CONFIG_FILES"; then
21067   # Protect against being on the right side of a sed subst in config.status.
21068   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21069    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21070 s,@SHELL@,$SHELL,;t t
21071 s,@exec_prefix@,$exec_prefix,;t t
21072 s,@prefix@,$prefix,;t t
21073 s,@program_transform_name@,$program_transform_name,;t t
21074 s,@bindir@,$bindir,;t t
21075 s,@sbindir@,$sbindir,;t t
21076 s,@libexecdir@,$libexecdir,;t t
21077 s,@datarootdir@,$datarootdir,;t t
21078 s,@datadir@,$datadir,;t t
21079 s,@sysconfdir@,$sysconfdir,;t t
21080 s,@sharedstatedir@,$sharedstatedir,;t t
21081 s,@localstatedir@,$localstatedir,;t t
21082 s,@libdir@,$libdir,;t t
21083 s,@includedir@,$includedir,;t t
21084 s,@oldincludedir@,$oldincludedir,;t t
21085 s,@infodir@,$infodir,;t t
21086 s,@mandir@,$mandir,;t t
21087 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21088 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21089 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21090 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21091 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21092 s,@build_alias@,$build_alias,;t t
21093 s,@host_alias@,$host_alias,;t t
21094 s,@target_alias@,$target_alias,;t t
21095 s,@ECHO_C@,$ECHO_C,;t t
21096 s,@ECHO_N@,$ECHO_N,;t t
21097 s,@ECHO_T@,$ECHO_T,;t t
21098 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21099 s,@DEFS@,$DEFS,;t t
21100 s,@LIBS@,$LIBS,;t t
21101 s,@top_builddir@,$top_builddir,;t t
21102 s,@EGREP@,$EGREP,;t t
21103 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21104 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21105 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21106 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21107 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21108 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21109 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21110 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21111 s,@build@,$build,;t t
21112 s,@build_cpu@,$build_cpu,;t t
21113 s,@build_vendor@,$build_vendor,;t t
21114 s,@build_os@,$build_os,;t t
21115 s,@host@,$host,;t t
21116 s,@host_cpu@,$host_cpu,;t t
21117 s,@host_vendor@,$host_vendor,;t t
21118 s,@host_os@,$host_os,;t t
21119 s,@target@,$target,;t t
21120 s,@target_cpu@,$target_cpu,;t t
21121 s,@target_vendor@,$target_vendor,;t t
21122 s,@target_os@,$target_os,;t t
21123 s,@CC@,$CC,;t t
21124 s,@CFLAGS@,$CFLAGS,;t t
21125 s,@LDFLAGS@,$LDFLAGS,;t t
21126 s,@CPPFLAGS@,$CPPFLAGS,;t t
21127 s,@ac_ct_CC@,$ac_ct_CC,;t t
21128 s,@EXEEXT@,$EXEEXT,;t t
21129 s,@OBJEXT@,$OBJEXT,;t t
21130 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21131 s,@CPP@,$CPP,;t t
21132 s,@LDCONFIG@,$LDCONFIG,;t t
21133 s,@CXX@,$CXX,;t t
21134 s,@CXXFLAGS@,$CXXFLAGS,;t t
21135 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21136 s,@AWK@,$AWK,;t t
21137 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21138 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21139 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21140 s,@LINT@,$LINT,;t t
21141 s,@LINT_OPTS@,$LINT_OPTS,;t t
21142 s,@LN_S@,$LN_S,;t t
21143 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21144 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21145 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21146 s,@SET_MAKE@,$SET_MAKE,;t t
21147 s,@CTAGS@,$CTAGS,;t t
21148 s,@ETAGS@,$ETAGS,;t t
21149 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21150 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21151 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21152 s,@RANLIB@,$RANLIB,;t t
21153 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21154 s,@LD@,$LD,;t t
21155 s,@ac_ct_LD@,$ac_ct_LD,;t t
21156 s,@AR@,$AR,;t t
21157 s,@ac_ct_AR@,$ac_ct_AR,;t t
21158 s,@ARFLAGS@,$ARFLAGS,;t t
21159 s,@DESTDIR@,$DESTDIR,;t t
21160 s,@BUILD_CC@,$BUILD_CC,;t t
21161 s,@BUILD_CPP@,$BUILD_CPP,;t t
21162 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21163 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21164 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21165 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21166 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21167 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21168 s,@cf_list_models@,$cf_list_models,;t t
21169 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21170 s,@LIBTOOL@,$LIBTOOL,;t t
21171 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21172 s,@LT_UNDEF@,$LT_UNDEF,;t t
21173 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21174 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21175 s,@LIB_CREATE@,$LIB_CREATE,;t t
21176 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21177 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21178 s,@LIB_PREP@,$LIB_PREP,;t t
21179 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21180 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21181 s,@LIB_LINK@,$LIB_LINK,;t t
21182 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21183 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21184 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21185 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21186 s,@TICS_NAME@,$TICS_NAME,;t t
21187 s,@TINFO_NAME@,$TINFO_NAME,;t t
21188 s,@LIB_NAME@,$LIB_NAME,;t t
21189 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21190 s,@CC_G_OPT@,$CC_G_OPT,;t t
21191 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21192 s,@LD_MODEL@,$LD_MODEL,;t t
21193 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21194 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21195 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21196 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21197 s,@LINK_PROGS@,$LINK_PROGS,;t t
21198 s,@LINK_TESTS@,$LINK_TESTS,;t t
21199 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21200 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21201 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21202 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21203 s,@RPATH_LIST@,$RPATH_LIST,;t t
21204 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21205 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21206 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21207 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21208 s,@XTERM_KBS@,$XTERM_KBS,;t t
21209 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21210 s,@TERMINFO@,$TERMINFO,;t t
21211 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21212 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21213 s,@TERMPATH@,$TERMPATH,;t t
21214 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21215 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21216 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21217 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21218 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21219 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21220 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21221 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21222 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21223 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21224 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21225 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21226 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21227 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21228 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21229 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21230 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21231 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21232 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21233 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21234 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21235 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21236 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21237 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21238 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21239 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21240 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21241 s,@PTHREAD@,$PTHREAD,;t t
21242 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21243 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21244 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21245 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21246 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21247 s,@ECHO_LT@,$ECHO_LT,;t t
21248 s,@ECHO_LD@,$ECHO_LD,;t t
21249 s,@RULE_CC@,$RULE_CC,;t t
21250 s,@SHOW_CC@,$SHOW_CC,;t t
21251 s,@ECHO_CC@,$ECHO_CC,;t t
21252 s,@ECHO_LINK@,$ECHO_LINK,;t t
21253 s,@ADAFLAGS@,$ADAFLAGS,;t t
21254 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21255 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21256 s,@ADA_TRACE@,$ADA_TRACE,;t t
21257 s,@MATH_LIB@,$MATH_LIB,;t t
21258 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21259 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21260 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21261 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21262 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21263 s,@TEST_LIBS@,$TEST_LIBS,;t t
21264 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21265 s,@CXXCPP@,$CXXCPP,;t t
21266 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21267 s,@CXX_AR@,$CXX_AR,;t t
21268 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21269 s,@CXXLIBS@,$CXXLIBS,;t t
21270 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21271 s,@gnat_exists@,$gnat_exists,;t t
21272 s,@M4_exists@,$M4_exists,;t t
21273 s,@cf_ada_make@,$cf_ada_make,;t t
21274 s,@cf_compile_generics@,$cf_compile_generics,;t t
21275 s,@cf_generic_objects@,$cf_generic_objects,;t t
21276 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21277 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21278 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21279 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21280 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21281 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21282 s,@cf_ada_package@,$cf_ada_package,;t t
21283 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21284 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21285 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21286 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21287 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21288 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21289 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21290 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21291 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21292 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21293 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21294 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21295 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21296 s,@TICS_LIBS@,$TICS_LIBS,;t t
21297 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21298 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21299 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21300 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21301 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21302 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21303 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21304 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21305 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21306 s,@TICS_LIST@,$TICS_LIST,;t t
21307 s,@TINFO_LIST@,$TINFO_LIST,;t t
21308 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21309 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21310 s,@TEST_ARGS@,$TEST_ARGS,;t t
21311 s,@TEST_DEPS@,$TEST_DEPS,;t t
21312 s,@TEST_ARG2@,$TEST_ARG2,;t t
21313 s,@TEST_DEP2@,$TEST_DEP2,;t t
21314 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21315 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21316 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21317 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21318 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21319 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21320 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21321 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21322 s,@cross_compiling@,$cross_compiling,;t t
21323 s,@TIC_PATH@,$TIC_PATH,;t t
21324 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21325 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21326 s,@PANEL_NAME@,$PANEL_NAME,;t t
21327 s,@MENU_NAME@,$MENU_NAME,;t t
21328 s,@FORM_NAME@,$FORM_NAME,;t t
21329 s,@CXX_NAME@,$CXX_NAME,;t t
21330 CEOF
21331
21332 EOF
21333
21334   cat >>$CONFIG_STATUS <<\EOF
21335   # Split the substitutions into bite-sized pieces for seds with
21336   # small command number limits, like on Digital OSF/1 and HP-UX.
21337   ac_max_sed_lines=48
21338   ac_sed_frag=1 # Number of current file.
21339   ac_beg=1 # First line for current file.
21340   ac_end=$ac_max_sed_lines # Line after last line for current file.
21341   ac_more_lines=:
21342   ac_sed_cmds=
21343   while $ac_more_lines; do
21344     if test $ac_beg -gt 1; then
21345       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21346     else
21347       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21348     fi
21349     if test ! -s $tmp/subs.frag; then
21350       ac_more_lines=false
21351     else
21352       # The purpose of the label and of the branching condition is to
21353       # speed up the sed processing (if there are no `@' at all, there
21354       # is no need to browse any of the substitutions).
21355       # These are the two extra sed commands mentioned above.
21356       (echo ':t
21357   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21358       if test -z "$ac_sed_cmds"; then
21359         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21360       else
21361         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21362       fi
21363       ac_sed_frag=`expr $ac_sed_frag + 1`
21364       ac_beg=$ac_end
21365       ac_end=`expr $ac_end + $ac_max_sed_lines`
21366     fi
21367   done
21368   if test -z "$ac_sed_cmds"; then
21369     ac_sed_cmds=cat
21370   fi
21371 fi # test -n "$CONFIG_FILES"
21372
21373 EOF
21374 cat >>$CONFIG_STATUS <<\EOF
21375 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21376   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21377   case $ac_file in
21378   - | *:- | *:-:* ) # input from stdin
21379         cat >$tmp/stdin
21380         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21381         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21382   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21383         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21384   * )   ac_file_in=$ac_file.in ;;
21385   esac
21386
21387   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21388   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21389          X"$ac_file" : 'X\(//\)[^/]' \| \
21390          X"$ac_file" : 'X\(//\)$' \| \
21391          X"$ac_file" : 'X\(/\)' \| \
21392          .     : '\(.\)' 2>/dev/null ||
21393 echo X"$ac_file" |
21394     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21395           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21396           /^X\(\/\/\)$/{ s//\1/; q; }
21397           /^X\(\/\).*/{ s//\1/; q; }
21398           s/.*/./; q'`
21399   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21400     { case "$ac_dir" in
21401   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21402   *)                      as_incr_dir=.;;
21403 esac
21404 as_dummy="$ac_dir"
21405 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21406   case $as_mkdir_dir in
21407     # Skip DOS drivespec
21408     ?:) as_incr_dir=$as_mkdir_dir ;;
21409     *)
21410       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21411       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21412     ;;
21413   esac
21414 done; }
21415
21416     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21417     # A "../" for each directory in $ac_dir_suffix.
21418     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21419   else
21420     ac_dir_suffix= ac_dots=
21421   fi
21422
21423   case $srcdir in
21424   .)  ac_srcdir=.
21425       if test -z "$ac_dots"; then
21426          ac_top_srcdir=.
21427       else
21428          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21429       fi ;;
21430   [\\/]* | ?:[\\/]* )
21431       ac_srcdir=$srcdir$ac_dir_suffix;
21432       ac_top_srcdir=$srcdir ;;
21433   *) # Relative path.
21434     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21435     ac_top_srcdir=$ac_dots$srcdir ;;
21436   esac
21437
21438   case $INSTALL in
21439   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21440   *) ac_INSTALL=$ac_dots$INSTALL ;;
21441   esac
21442
21443   if test x"$ac_file" != x-; then
21444     { echo "$as_me:21444: creating $ac_file" >&5
21445 echo "$as_me: creating $ac_file" >&6;}
21446     rm -f "$ac_file"
21447   fi
21448   # Let's still pretend it is `configure' which instantiates (i.e., don't
21449   # use $as_me), people would be surprised to read:
21450   #    /* config.h.  Generated automatically by config.status.  */
21451   configure_input="Generated automatically from `echo $ac_file_in |
21452                                                  sed 's,.*/,,'` by configure."
21453
21454   # First look for the input files in the build tree, otherwise in the
21455   # src tree.
21456   ac_file_inputs=`IFS=:
21457     for f in $ac_file_in; do
21458       case $f in
21459       -) echo $tmp/stdin ;;
21460       [\\/$]*)
21461          # Absolute (can't be DOS-style, as IFS=:)
21462          test -f "$f" || { { echo "$as_me:21462: error: cannot find input file: $f" >&5
21463 echo "$as_me: error: cannot find input file: $f" >&2;}
21464    { (exit 1); exit 1; }; }
21465          echo $f;;
21466       *) # Relative
21467          if test -f "$f"; then
21468            # Build tree
21469            echo $f
21470          elif test -f "$srcdir/$f"; then
21471            # Source tree
21472            echo $srcdir/$f
21473          else
21474            # /dev/null tree
21475            { { echo "$as_me:21475: error: cannot find input file: $f" >&5
21476 echo "$as_me: error: cannot find input file: $f" >&2;}
21477    { (exit 1); exit 1; }; }
21478          fi;;
21479       esac
21480     done` || { (exit 1); exit 1; }
21481 EOF
21482 cat >>$CONFIG_STATUS <<\EOF
21483   ac_warn_datarootdir=no
21484   if test x"$ac_file" != x-; then
21485     for ac_item in $ac_file_inputs
21486     do
21487       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21488       if test -n "$ac_seen"; then
21489         ac_used=`grep '@datarootdir@' $ac_item`
21490         if test -z "$ac_used"; then
21491           { echo "$as_me:21491: WARNING: datarootdir was used implicitly but not set:
21492 $ac_seen" >&5
21493 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21494 $ac_seen" >&2;}
21495           ac_warn_datarootdir=yes
21496         fi
21497       fi
21498       ac_seen=`grep '${datarootdir}' $ac_item`
21499       if test -n "$ac_seen"; then
21500         { echo "$as_me:21500: WARNING: datarootdir was used explicitly but not set:
21501 $ac_seen" >&5
21502 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21503 $ac_seen" >&2;}
21504         ac_warn_datarootdir=yes
21505       fi
21506     done
21507   fi
21508
21509 if test "x$ac_warn_datarootdir" = xyes; then
21510   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21511 fi
21512
21513 EOF
21514 cat >>$CONFIG_STATUS <<EOF
21515   sed "$ac_vpsub
21516 $extrasub
21517 EOF
21518 cat >>$CONFIG_STATUS <<\EOF
21519 :t
21520 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21521 s,@configure_input@,$configure_input,;t t
21522 s,@srcdir@,$ac_srcdir,;t t
21523 s,@top_srcdir@,$ac_top_srcdir,;t t
21524 s,@INSTALL@,$ac_INSTALL,;t t
21525 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21526   rm -f $tmp/stdin
21527   if test x"$ac_file" != x-; then
21528     cp $tmp/out $ac_file
21529
21530     for ac_name in prefix exec_prefix datarootdir
21531     do
21532         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21533         if test -n "$ac_seen"; then
21534             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21535             if test -z "$ac_init"; then
21536               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21537               { echo "$as_me:21537: WARNING: Variable $ac_name is used but was not set:
21538 $ac_seen" >&5
21539 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21540 $ac_seen" >&2;}
21541             fi
21542         fi
21543     done
21544     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21545     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21546     if test -s $tmp/out; then
21547       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21548       { echo "$as_me:21548: WARNING: Some variables may not be substituted:
21549 $ac_seen" >&5
21550 echo "$as_me: WARNING: Some variables may not be substituted:
21551 $ac_seen" >&2;}
21552     fi
21553   else
21554     cat $tmp/out
21555   fi
21556   rm -f $tmp/out
21557
21558 done
21559 EOF
21560 cat >>$CONFIG_STATUS <<\EOF
21561
21562 #
21563 # CONFIG_HEADER section.
21564 #
21565
21566 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21567 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21568 #
21569 # ac_d sets the value in "#define NAME VALUE" lines.
21570 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21571 ac_dB='[        ].*$,\1#\2'
21572 ac_dC=' '
21573 ac_dD=',;t'
21574 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21575 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21576 ac_iB='\([      ]\),\1#\2define\3'
21577 ac_iC=' '
21578 ac_iD='\4,;t'
21579 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21580 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21581 ac_uB='$,\1#\2define\3'
21582 ac_uC=' '
21583 ac_uD=',;t'
21584
21585 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21586   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21587   case $ac_file in
21588   - | *:- | *:-:* ) # input from stdin
21589         cat >$tmp/stdin
21590         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21591         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21592   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21593         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21594   * )   ac_file_in=$ac_file.in ;;
21595   esac
21596
21597   test x"$ac_file" != x- && { echo "$as_me:21597: creating $ac_file" >&5
21598 echo "$as_me: creating $ac_file" >&6;}
21599
21600   # First look for the input files in the build tree, otherwise in the
21601   # src tree.
21602   ac_file_inputs=`IFS=:
21603     for f in $ac_file_in; do
21604       case $f in
21605       -) echo $tmp/stdin ;;
21606       [\\/$]*)
21607          # Absolute (can't be DOS-style, as IFS=:)
21608          test -f "$f" || { { echo "$as_me:21608: error: cannot find input file: $f" >&5
21609 echo "$as_me: error: cannot find input file: $f" >&2;}
21610    { (exit 1); exit 1; }; }
21611          echo $f;;
21612       *) # Relative
21613          if test -f "$f"; then
21614            # Build tree
21615            echo $f
21616          elif test -f "$srcdir/$f"; then
21617            # Source tree
21618            echo $srcdir/$f
21619          else
21620            # /dev/null tree
21621            { { echo "$as_me:21621: error: cannot find input file: $f" >&5
21622 echo "$as_me: error: cannot find input file: $f" >&2;}
21623    { (exit 1); exit 1; }; }
21624          fi;;
21625       esac
21626     done` || { (exit 1); exit 1; }
21627   # Remove the trailing spaces.
21628   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21629
21630 EOF
21631
21632 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21633 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21634 # be either 'cat' or 'sort'.
21635 cat confdefs.h | uniq >conftest.vals
21636
21637 # Break up conftest.vals because some shells have a limit on
21638 # the size of here documents, and old seds have small limits too.
21639
21640 rm -f conftest.tail
21641 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21642 while grep . conftest.vals >/dev/null
21643 do
21644   # Write chunks of a limited-size here document to conftest.frag.
21645   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21646   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21647   echo 'CEOF' >> $CONFIG_STATUS
21648   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21649   rm -f conftest.vals
21650   mv conftest.tail conftest.vals
21651 done
21652 rm -f conftest.vals
21653
21654 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21655 # marker @DEFS@.
21656 echo '  cat >> conftest.edit <<CEOF
21657 /@DEFS@/r conftest.frag
21658 /@DEFS@/d
21659 CEOF
21660 sed -f conftest.edit $tmp/in > $tmp/out
21661 rm -f $tmp/in
21662 mv $tmp/out $tmp/in
21663 rm -f conftest.edit conftest.frag
21664 ' >> $CONFIG_STATUS
21665
21666 cat >>$CONFIG_STATUS <<\EOF
21667   # Let's still pretend it is `configure' which instantiates (i.e., don't
21668   # use $as_me), people would be surprised to read:
21669   #    /* config.h.  Generated automatically by config.status.  */
21670   if test x"$ac_file" = x-; then
21671     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21672   else
21673     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21674   fi
21675   cat $tmp/in >>$tmp/config.h
21676   rm -f $tmp/in
21677   if test x"$ac_file" != x-; then
21678     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21679       { echo "$as_me:21679: $ac_file is unchanged" >&5
21680 echo "$as_me: $ac_file is unchanged" >&6;}
21681     else
21682       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21683          X"$ac_file" : 'X\(//\)[^/]' \| \
21684          X"$ac_file" : 'X\(//\)$' \| \
21685          X"$ac_file" : 'X\(/\)' \| \
21686          .     : '\(.\)' 2>/dev/null ||
21687 echo X"$ac_file" |
21688     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21689           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21690           /^X\(\/\/\)$/{ s//\1/; q; }
21691           /^X\(\/\).*/{ s//\1/; q; }
21692           s/.*/./; q'`
21693       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21694         { case "$ac_dir" in
21695   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21696   *)                      as_incr_dir=.;;
21697 esac
21698 as_dummy="$ac_dir"
21699 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21700   case $as_mkdir_dir in
21701     # Skip DOS drivespec
21702     ?:) as_incr_dir=$as_mkdir_dir ;;
21703     *)
21704       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21705       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21706     ;;
21707   esac
21708 done; }
21709
21710       fi
21711       rm -f $ac_file
21712       mv $tmp/config.h $ac_file
21713     fi
21714   else
21715     cat $tmp/config.h
21716     rm -f $tmp/config.h
21717   fi
21718 done
21719 EOF
21720 cat >>$CONFIG_STATUS <<\EOF
21721 #
21722 # CONFIG_COMMANDS section.
21723 #
21724 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21725   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21726   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21727
21728   case $ac_dest in
21729     default )
21730 if test "x$cf_with_tests" != xno ; then
21731
21732 for cf_dir in test
21733 do
21734         if test ! -d $srcdir/$cf_dir; then
21735                 continue
21736         elif test -f $srcdir/$cf_dir/programs; then
21737                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21738         fi
21739 done
21740
21741 fi
21742
21743 cf_prefix=$LIB_PREFIX
21744
21745 case $cf_cv_shlib_version in #(vi
21746 cygdll|mingw)
21747         TINFO_NAME=$TINFO_ARG_SUFFIX
21748         TINFO_SUFFIX=.dll
21749         ;;
21750 esac
21751
21752 if test -n "$TINFO_SUFFIX" ; then
21753         case $TINFO_SUFFIX in
21754         tw*)
21755                 TINFO_NAME="${TINFO_NAME}tw"
21756                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21757                 ;;
21758         t*)
21759                 TINFO_NAME="${TINFO_NAME}t"
21760                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21761                 ;;
21762         w*)
21763                 TINFO_NAME="${TINFO_NAME}w"
21764                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21765                 ;;
21766         esac
21767 fi
21768
21769 for cf_dir in $SRC_SUBDIRS
21770 do
21771         if test ! -d $srcdir/$cf_dir ; then
21772                 continue
21773         elif test -f $srcdir/$cf_dir/modules; then
21774
21775                 SHARED_LIB=
21776                 Libs_To_Make=
21777                 for cf_item in $cf_LIST_MODELS
21778                 do
21779
21780         case $cf_item in #(vi
21781         libtool) #(vi
21782                 cf_suffix='.la'
21783                 cf_depsuf=$cf_suffix
21784                 ;;
21785         normal) #(vi
21786                 cf_suffix='.a'
21787                 cf_depsuf=$cf_suffix
21788                 ;;
21789         debug) #(vi
21790                 cf_suffix='_g.a'
21791                 cf_depsuf=$cf_suffix
21792                 ;;
21793         profile) #(vi
21794                 cf_suffix='_p.a'
21795                 cf_depsuf=$cf_suffix
21796                 ;;
21797         shared) #(vi
21798                 case $cf_cv_system_name in
21799                 aix[5-7]*) #(vi
21800                         cf_suffix='.a'
21801                         cf_depsuf=$cf_suffix
21802                         ;;
21803                 cygwin*|mingw*) #(vi
21804                         cf_suffix='.dll'
21805                         cf_depsuf='.dll.a'
21806                         ;;
21807                 darwin*) #(vi
21808                         cf_suffix='.dylib'
21809                         cf_depsuf=$cf_suffix
21810                         ;;
21811                 hpux*) #(vi
21812                         case $target in
21813                         ia64*) #(vi
21814                                 cf_suffix='.so'
21815                                 cf_depsuf=$cf_suffix
21816                                 ;;
21817                         *) #(vi
21818                                 cf_suffix='.sl'
21819                                 cf_depsuf=$cf_suffix
21820                                 ;;
21821                         esac
21822                         ;;
21823                 *)      cf_suffix='.so'
21824                         cf_depsuf=$cf_suffix
21825                         ;;
21826                 esac
21827         esac
21828         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21829         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21830
21831                         cf_libname=$cf_dir
21832                         test "$cf_dir" = c++ && cf_libname=ncurses++
21833                         if test $cf_item = shared ; then
21834                                 if test -n "${LIB_SUFFIX}"
21835                                 then
21836                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
21837                                 else
21838                                         cf_shared_suffix="$cf_suffix"
21839                                 fi
21840                                 if test "$cf_cv_do_symlinks" = yes ; then
21841                                         cf_version_name=
21842
21843                                         case "$cf_cv_shlib_version" in #(vi
21844                                         rel) #(vi
21845                                                 cf_version_name=REL_VERSION
21846                                                 ;;
21847                                         abi)
21848                                                 cf_version_name=ABI_VERSION
21849                                                 ;;
21850                                         esac
21851
21852                                         if test -n "$cf_version_name"
21853                                         then
21854                                                 case "$cf_cv_system_name" in #(vi
21855                                                 darwin*)
21856                                                         # "w", etc?
21857                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
21858                                                         ;; #(vi
21859                                                 *)
21860                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
21861                                                         ;;
21862                                                 esac
21863                                         fi
21864                                         if test -n "${LIB_SUFFIX}"
21865                                         then
21866                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
21867                                         else
21868                                                 cf_shared_suffix="$cf_suffix"
21869                                         fi
21870                                 fi
21871                                 # cygwin needs import library, and has unique naming convention
21872                                 # use autodetected ${cf_prefix} for import lib and static lib, but
21873                                 # use 'cyg' prefix for shared lib.
21874                                 case $cf_cv_shlib_version in #(vi
21875                                 cygdll) #(vi
21876                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21877                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
21878                                         continue
21879                                         ;;
21880                                 mingw)
21881                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21882                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
21883                                         continue
21884                                         ;;
21885                                 esac
21886                         fi
21887                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
21888                 done
21889
21890                 if test $cf_dir = ncurses ; then
21891                         cf_subsets="$LIB_SUBSETS"
21892                         cf_r_parts="$cf_subsets"
21893                         cf_liblist="$Libs_To_Make"
21894
21895                         while test -n "$cf_r_parts"
21896                         do
21897                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21898                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21899                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21900                                         cf_item=
21901                                         case $cf_l_parts in #(vi
21902                                         *termlib*) #(vi
21903                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21904                                                 ;;
21905                                         *ticlib*)
21906                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21907                                                 ;;
21908                                         *)
21909                                                 break
21910                                                 ;;
21911                                         esac
21912                                         if test -n "$cf_item"; then
21913                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21914                                         fi
21915                                 else
21916                                         break
21917                                 fi
21918                         done
21919                 else
21920                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21921                 fi
21922
21923                 if test $cf_dir = c++; then
21924                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
21925                                 cf_list=
21926                                 for cf_item in $Libs_To_Make
21927                                 do
21928                                         case $cf_item in
21929                                         *.a)
21930                                                 ;;
21931                                         *)
21932                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
21933                                                 ;;
21934                                         esac
21935                                         for cf_test in $cf_list
21936                                         do
21937                                                 if test "$cf_test" = "$cf_item"
21938                                                 then
21939                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
21940                                                         cf_item=
21941                                                         break
21942                                                 fi
21943                                         done
21944                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
21945                                 done
21946                                 Libs_To_Make="$cf_list"
21947                         fi
21948                 fi
21949
21950                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21951                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21952                         $cf_dir/Makefile >$cf_dir/Makefile.out
21953                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21954
21955                 $AWK -f $srcdir/mk-0th.awk \
21956                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21957                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21958
21959                 for cf_subset in $cf_subsets
21960                 do
21961                         cf_subdirs=
21962                         for cf_item in $cf_LIST_MODELS
21963                         do
21964
21965                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21966
21967 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21968
21969                         CXX_MODEL=$cf_ITEM
21970                         if test "$CXX_MODEL" = SHARED; then
21971                                 case $cf_cv_shlib_version in #(vi
21972                                 cygdll|mingw) #(vi
21973                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
21974
21975 echo "${as_me:-configure}:21975: testing overriding CXX_MODEL to SHARED ..." 1>&5
21976
21977                                         with_shared_cxx=yes
21978                                         ;;
21979                                 *)
21980                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
21981                                         ;;
21982                                 esac
21983                         fi
21984
21985         case $cf_item in #(vi
21986         libtool) #(vi
21987                 cf_suffix='.la'
21988                 cf_depsuf=$cf_suffix
21989                 ;;
21990         normal) #(vi
21991                 cf_suffix='.a'
21992                 cf_depsuf=$cf_suffix
21993                 ;;
21994         debug) #(vi
21995                 cf_suffix='_g.a'
21996                 cf_depsuf=$cf_suffix
21997                 ;;
21998         profile) #(vi
21999                 cf_suffix='_p.a'
22000                 cf_depsuf=$cf_suffix
22001                 ;;
22002         shared) #(vi
22003                 case $cf_cv_system_name in
22004                 aix[5-7]*) #(vi
22005                         cf_suffix='.a'
22006                         cf_depsuf=$cf_suffix
22007                         ;;
22008                 cygwin*|mingw*) #(vi
22009                         cf_suffix='.dll'
22010                         cf_depsuf='.dll.a'
22011                         ;;
22012                 darwin*) #(vi
22013                         cf_suffix='.dylib'
22014                         cf_depsuf=$cf_suffix
22015                         ;;
22016                 hpux*) #(vi
22017                         case $target in
22018                         ia64*) #(vi
22019                                 cf_suffix='.so'
22020                                 cf_depsuf=$cf_suffix
22021                                 ;;
22022                         *) #(vi
22023                                 cf_suffix='.sl'
22024                                 cf_depsuf=$cf_suffix
22025                                 ;;
22026                         esac
22027                         ;;
22028                 *)      cf_suffix='.so'
22029                         cf_depsuf=$cf_suffix
22030                         ;;
22031                 esac
22032         esac
22033         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22034         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22035
22036         case $cf_item in
22037         libtool) cf_subdir='obj_lo'  ;;
22038         normal)  cf_subdir='objects' ;;
22039         debug)   cf_subdir='obj_g' ;;
22040         profile) cf_subdir='obj_p' ;;
22041         shared)
22042                 case $cf_cv_system_name in #(vi
22043                 cygwin) #(vi
22044                         cf_subdir='objects' ;;
22045                 *)
22046                         cf_subdir='obj_s' ;;
22047                 esac
22048         esac
22049
22050                         # Test for case where we build libtinfo with a different name.
22051                         cf_libname=$cf_dir
22052                         if test $cf_dir = ncurses ; then
22053                                 case $cf_subset in
22054                                 *base*)
22055                                         cf_libname=${cf_libname}$LIB_SUFFIX
22056                                         ;;
22057                                 *termlib*)
22058                                         cf_libname=$TINFO_LIB_SUFFIX
22059                                         ;;
22060                                 ticlib*)
22061                                         cf_libname=$TICS_LIB_SUFFIX
22062                                         ;;
22063                                 esac
22064                         elif test $cf_dir = c++ ; then
22065                                 cf_libname=ncurses++$LIB_SUFFIX
22066                         else
22067                                 cf_libname=${cf_libname}$LIB_SUFFIX
22068                         fi
22069                         if test -n "${DFT_ARG_SUFFIX}" ; then
22070                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22071                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22072                         fi
22073
22074                         # These dependencies really are for development, not
22075                         # builds, but they are useful in porting, too.
22076                         cf_depend="../include/ncurses_cfg.h"
22077                         if test "$srcdir" = "."; then
22078                                 cf_reldir="."
22079                         else
22080                                 cf_reldir="\${srcdir}"
22081                         fi
22082
22083                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22084                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22085                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22086                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22087                         fi
22088
22089                         cf_dir_suffix=
22090                         old_cf_suffix="$cf_suffix"
22091                         if test "$cf_cv_shlib_version_infix" = yes ; then
22092                         if test -n "$LIB_SUFFIX" ; then
22093                                 case $LIB_SUFFIX in
22094                                 tw*)
22095                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22096                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22097                                         cf_dir_suffix=tw
22098                                         ;;
22099                                 t*)
22100                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22101                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22102                                         cf_dir_suffix=t
22103                                         ;;
22104                                 w*)
22105                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22106                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22107                                         cf_dir_suffix=w
22108                                         ;;
22109                                 esac
22110                         fi
22111                         fi
22112
22113                         $AWK -f $srcdir/mk-1st.awk \
22114                                 name=${cf_libname}${cf_dir_suffix} \
22115                                 traces=$LIB_TRACING \
22116                                 MODEL=$cf_ITEM \
22117                                 CXX_MODEL=$CXX_MODEL \
22118                                 model=$cf_subdir \
22119                                 prefix=$cf_prefix \
22120                                 suffix=$cf_suffix \
22121                                 subset=$cf_subset \
22122                                 driver=$cf_cv_term_driver \
22123                                 SymLink="$LN_S" \
22124                                 TermlibRoot=$TINFO_NAME \
22125                                 TermlibSuffix=$TINFO_SUFFIX \
22126                                 ShlibVer=$cf_cv_shlib_version \
22127                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22128                                 ReLink=${cf_cv_do_relink:-no} \
22129                                 DoLinks=$cf_cv_do_symlinks \
22130                                 rmSoLocs=$cf_cv_rm_so_locs \
22131                                 ldconfig="$LDCONFIG" \
22132                                 overwrite=$WITH_OVERWRITE \
22133                                 depend="$cf_depend" \
22134                                 host="$host" \
22135                                 libtool_version="$LIBTOOL_VERSION" \
22136                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22137
22138                         cf_suffix="$old_cf_suffix"
22139
22140                         for cf_subdir2 in $cf_subdirs lib
22141                         do
22142                                 test $cf_subdir = $cf_subdir2 && break
22143                         done
22144                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22145                         $AWK -f $srcdir/mk-2nd.awk \
22146                                 name=$cf_dir \
22147                                 traces=$LIB_TRACING \
22148                                 MODEL=$cf_ITEM \
22149                                 model=$cf_subdir \
22150                                 subset=$cf_subset \
22151                                 srcdir=$srcdir \
22152                                 echo=$WITH_ECHO \
22153                                 crenames=$cf_cv_prog_CC_c_o \
22154                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22155                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22156                         cf_subdirs="$cf_subdirs $cf_subdir"
22157                         done
22158                 done
22159         fi
22160
22161         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22162 done
22163
22164 for cf_dir in $SRC_SUBDIRS
22165 do
22166         if test ! -d $srcdir/$cf_dir ; then
22167                 continue
22168         fi
22169
22170         if test -f $cf_dir/Makefile ; then
22171                 case "$cf_dir" in
22172                 Ada95) #(vi
22173                         echo 'libs \' >> Makefile
22174                         echo 'install.libs \' >> Makefile
22175                         echo 'uninstall.libs ::' >> Makefile
22176                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22177                         ;;
22178                 esac
22179         fi
22180
22181         if test -f $srcdir/$cf_dir/modules; then
22182                 echo >> Makefile
22183                 if test -f $srcdir/$cf_dir/headers; then
22184 cat >> Makefile <<CF_EOF
22185 install.includes \\
22186 uninstall.includes \\
22187 CF_EOF
22188                 fi
22189 if test "$cf_dir" != "c++" ; then
22190 echo 'lint \' >> Makefile
22191 fi
22192 cat >> Makefile <<CF_EOF
22193 libs \\
22194 lintlib \\
22195 install.libs \\
22196 uninstall.libs \\
22197 install.$cf_dir \\
22198 uninstall.$cf_dir ::
22199         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22200 CF_EOF
22201         elif test -f $srcdir/$cf_dir/headers; then
22202 cat >> Makefile <<CF_EOF
22203
22204 libs \\
22205 install.libs \\
22206 uninstall.libs \\
22207 install.includes \\
22208 uninstall.includes ::
22209         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22210 CF_EOF
22211 fi
22212 done
22213
22214 cat >> Makefile <<CF_EOF
22215
22216 install.libs uninstall.libs \\
22217 install.data uninstall.data ::
22218 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22219 CF_EOF
22220
22221 if test "x$cf_with_manpages" = xyes; then
22222 cat >> Makefile <<CF_EOF
22223
22224 install.man \\
22225 uninstall.man ::
22226         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22227 CF_EOF
22228 fi
22229
22230 cat >> Makefile <<CF_EOF
22231
22232 distclean ::
22233         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22234         rm -f headers.sh headers.sed mk_shared_lib.sh
22235         rm -f edit_man.* man_alias.*
22236         rm -rf \${DIRS_TO_MAKE}
22237 CF_EOF
22238
22239 # Special case: tack's manpage lives in its own directory.
22240 if test "x$cf_with_manpages" = xyes; then
22241 if test -d tack ; then
22242 if test -f $srcdir/$tack.h; then
22243 cat >> Makefile <<CF_EOF
22244
22245 install.man \\
22246 uninstall.man ::
22247         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22248 CF_EOF
22249 fi
22250 fi
22251 fi
22252
22253 rm -f headers.sed headers.sh
22254
22255 echo creating headers.sh
22256 cat >headers.sh <<CF_EOF
22257 #! /bin/sh
22258 # This shell script is generated by the 'configure' script.  It is invoked in a
22259 # subdirectory of the build tree.  It generates a sed-script in the parent
22260 # directory that is used to adjust includes for header files that reside in a
22261 # subdirectory of /usr/include, etc.
22262 PRG=""
22263 while test \$# != 3
22264 do
22265 PRG="\$PRG \$1"; shift
22266 done
22267 DST=\$1
22268 REF=\$2
22269 SRC=\$3
22270 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22271 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22272 echo installing \$SRC in \$DST
22273 CF_EOF
22274
22275 if test $WITH_CURSES_H = yes; then
22276         cat >>headers.sh <<CF_EOF
22277 case \$DST in
22278 /*/include/*)
22279         END=\`basename \$DST\`
22280         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22281         do
22282                 NAME=\`basename \$i\`
22283                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22284         done
22285         ;;
22286 *)
22287         echo "" >> \$TMPSED
22288         ;;
22289 esac
22290 CF_EOF
22291
22292 else
22293         cat >>headers.sh <<CF_EOF
22294 case \$DST in
22295 /*/include/*)
22296         END=\`basename \$DST\`
22297         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22298         do
22299                 NAME=\`basename \$i\`
22300                 if test "\$NAME" = "curses.h"
22301                 then
22302                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22303                         NAME=ncurses.h
22304                 fi
22305                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22306         done
22307         ;;
22308 *)
22309         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22310         ;;
22311 esac
22312 CF_EOF
22313 fi
22314 cat >>headers.sh <<CF_EOF
22315 rm -f \$TMPSRC
22316 sed -f \$TMPSED \$SRC > \$TMPSRC
22317 NAME=\`basename \$SRC\`
22318 CF_EOF
22319 if test $WITH_CURSES_H != yes; then
22320         cat >>headers.sh <<CF_EOF
22321 test "\$NAME" = "curses.h" && NAME=ncurses.h
22322 CF_EOF
22323 fi
22324 cat >>headers.sh <<CF_EOF
22325 # Just in case someone gzip'd manpages, remove the conflicting copy.
22326 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22327
22328 eval \$PRG \$TMPSRC \$DST/\$NAME
22329 rm -f \$TMPSRC \$TMPSED
22330 CF_EOF
22331
22332 chmod 0755 headers.sh
22333
22334 for cf_dir in $SRC_SUBDIRS
22335 do
22336         if test ! -d $srcdir/$cf_dir ; then
22337                 continue
22338         fi
22339
22340         if test -f $srcdir/$cf_dir/headers; then
22341                 $AWK -f $srcdir/mk-hdr.awk \
22342                         subset="$LIB_SUBSETS" \
22343                         compat="$WITH_CURSES_H" \
22344                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22345         fi
22346
22347         if test -f $srcdir/$cf_dir/modules; then
22348                 if test "$cf_dir" != "c++" ; then
22349                         cat >>$cf_dir/Makefile <<"CF_EOF"
22350 depend : ${AUTO_SRC}
22351         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22352
22353 # DO NOT DELETE THIS LINE -- make depend depends on it.
22354 CF_EOF
22355                 fi
22356         fi
22357 done
22358
22359 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22360 if test -z "$USE_OLD_MAKERULES" ; then
22361         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22362 fi
22363 fi
22364  ;;
22365   esac
22366 done
22367 EOF
22368
22369 cat >>$CONFIG_STATUS <<\EOF
22370
22371 { (exit 0); exit 0; }
22372 EOF
22373 chmod +x $CONFIG_STATUS
22374 ac_clean_files=$ac_clean_files_save
22375
22376 # configure is writing to config.log, and then calls config.status.
22377 # config.status does its own redirection, appending to config.log.
22378 # Unfortunately, on DOS this fails, as config.log is still kept open
22379 # by configure, so config.status won't be able to write to it; its
22380 # output is simply discarded.  So we exec the FD to /dev/null,
22381 # effectively closing config.log, so it can be properly (re)opened and
22382 # appended to by config.status.  When coming back to configure, we
22383 # need to make the FD available again.
22384 if test "$no_create" != yes; then
22385   ac_cs_success=:
22386   exec 5>/dev/null
22387   $SHELL $CONFIG_STATUS || ac_cs_success=false
22388   exec 5>>config.log
22389   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22390   # would make configure fail if this is the last instruction.
22391   $ac_cs_success || { (exit 1); exit 1; }
22392 fi
22393 ${MAKE:-make} preinstall