]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
4363727c8c4cc8e5855914ca4377313ad5aff8b6
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.552 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20120811.
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-lib-prefix       override library-prefix
733   --with-termlib          generate separate terminfo library
734   --with-ticlib           generate separate tic library
735   --with-gpm              use Alessandro Rubini's GPM library
736   --without-dlsym         do not use dlsym() to load GPM dynamically
737   --with-sysmouse         use sysmouse (FreeBSD console)
738   --enable-rpath          use rpath option when generating shared libraries
739   --disable-relink        relink shared libraries during install
740   --with-shlib-version=X  Specify rel or abi version for shared libs
741   --disable-rpath-hack    don't add rpath options for additional libraries
742 Fine-Tuning Your Configuration:
743   --disable-overwrite     leave out the link to -lcurses
744   --disable-database      do not use terminfo, only fallbacks/termcap
745   --with-database=XXX     specify terminfo source to install
746   --with-hashed-db        specify hashed-database library
747   --with-fallbacks=XXX    specify list of fallback terminal descriptions
748   --without-xterm-new     specify if xterm terminfo should be old version
749   --with-xterm-kbs=XXX     specify if xterm backspace sends BS or DEL
750   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
751   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
752   --disable-big-core      assume machine has little memory
753   --disable-big-strings   assume compiler has only standard-size strings
754   --enable-termcap        compile in termcap fallback support
755   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
756   --enable-getcap         fast termcap load, no xrefs to terminfo
757   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
758   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
759   --disable-root-environ  restrict environment when running as root
760   --enable-symlinks       make tic use symbolic links not hard links
761   --enable-broken_linker  compile with broken-linker support code
762   --enable-bsdpad         recognize BSD-style prefix padding
763   --enable-widec          compile with wide-char/UTF-8 code
764   --disable-lp64          allow chtype to be long (ignore _LP64)
765   --disable-largefile     omit support for large files
766   --disable-tparm-varargs compile tparm() without varargs interface
767   --disable-tic-depends   link tic library without explicit dependency on ncurses library
768   --with-bool=TYPE        override fallback type of bool variable
769   --with-caps=alt         compile with alternate Caps file
770   --with-chtype=TYPE      override type of chtype
771   --with-ospeed=TYPE      override type of ospeed variable
772   --with-mmask-t=TYPE     override type of mmask_t
773   --with-ccharw-max=XXX   override size CCHARW_MAX
774   --with-tparm-arg=TYPE   override parameter type of tparm
775   --with-rcs-ids          compile-in RCS identifiers
776 Options to Specify How Manpages are Installed:
777   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
778                           optionally formatted/catonly, e.g., gzip,formatted
779   --with-manpage-renames  specify manpage-renaming
780   --with-manpage-aliases  specify manpage-aliases using .so
781   --with-manpage-symlinks specify manpage-aliases using symlinks
782   --with-manpage-tbl      specify manpage processing with tbl
783 Extensions:
784   --disable-ext-funcs     disable function-extensions
785   --enable-sp-funcs       enable experimental SCREEN-extensions
786   --enable-term-driver    enable experimental terminal-driver
787   --enable-const          compile with extra/non-standard const
788   --enable-ext-colors     compile for 256-color support
789   --enable-ext-mouse      compile for extended mouse-encoding
790   --enable-no-padding     compile with $NCURSES_NO_PADDING code
791   --enable-signed-char    compile using signed Boolean's in term.h
792   --enable-sigwinch       compile with SIGWINCH handler
793   --enable-tcap-names     compile with user-definable terminal capabilities
794 Development Code:
795   --without-develop       disable development options
796   --enable-hard-tabs      compile with hard-tabs code
797   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
798 Experimental Code:
799   --disable-assumed-color do not assume anything about default-colors
800   --disable-hashmap       compile without hashmap scrolling-optimization
801   --enable-colorfgbg      compile-in experimental $COLORFGBG code
802   --enable-interop        compile-in experimental interop bindings
803   --with-pthread          use POSIX thread library
804   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
805   --enable-weak-symbols   enable weak-symbols for pthreads
806   --enable-reentrant      compile with experimental reentrant code
807   --with-wrap-prefix=XXX  override prefix used for public variables
808   --enable-safe-sprintf   compile with experimental safe-sprintf code
809   --disable-scroll-hints  compile without scroll-hints code
810   --enable-wgetch-events  compile with experimental wgetch-events code
811 Testing/development Options:
812   --disable-echo          display "compiling" commands
813   --enable-warnings       build: turn on GCC compiler warnings
814   --enable-string-hacks  work around bogus compiler/loader warnings
815   --enable-assertions     test: turn on generation of assertion code
816   --with-dmalloc          test: use Gray Watson's dmalloc library
817   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
818   --with-valgrind         test: use valgrind
819   --disable-leaks         test: free permanent memory, analyze leaks
820   --enable-expanded       test: generate functions for certain macros
821   --disable-macros        test: use functions rather than macros
822   --with-trace            test: add trace() function to all models of ncurses
823 Ada95 Binding Options:
824   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
825   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
826   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
827   --with-ada-sharedlib=XX build Ada95 shared-library
828
829 Some influential environment variables:
830   CC          C compiler command
831   CFLAGS      C compiler flags
832   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
833               nonstandard directory <lib dir>
834   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
835               headers in a nonstandard directory <include dir>
836   CPP         C preprocessor
837   CXX         C++ compiler command
838   CXXFLAGS    C++ compiler flags
839   CXXCPP      C++ preprocessor
840
841 Use these variables to override the choices made by `configure' or to help
842 it to find libraries and programs with nonstandard names/locations.
843
844 EOF
845 fi
846
847 if test "$ac_init_help" = "recursive"; then
848   # If there are subdirs, report their specific --help.
849   ac_popdir=`pwd`
850   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
851     cd $ac_subdir
852     # A "../" for each directory in /$ac_subdir.
853     ac_dots=`echo $ac_subdir |
854              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
855
856     case $srcdir in
857     .) # No --srcdir option.  We are building in place.
858       ac_sub_srcdir=$srcdir ;;
859     [\\/]* | ?:[\\/]* ) # Absolute path.
860       ac_sub_srcdir=$srcdir/$ac_subdir ;;
861     *) # Relative path.
862       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
863     esac
864
865     # Check for guested configure; otherwise get Cygnus style configure.
866     if test -f $ac_sub_srcdir/configure.gnu; then
867       echo
868       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
869     elif test -f $ac_sub_srcdir/configure; then
870       echo
871       $SHELL $ac_sub_srcdir/configure  --help=recursive
872     elif test -f $ac_sub_srcdir/configure.ac ||
873            test -f $ac_sub_srcdir/configure.in; then
874       echo
875       $ac_configure --help
876     else
877       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
878     fi
879     cd $ac_popdir
880   done
881 fi
882
883 test -n "$ac_init_help" && exit 0
884 if $ac_init_version; then
885   cat <<\EOF
886
887 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
888 Free Software Foundation, Inc.
889 This configure script is free software; the Free Software Foundation
890 gives unlimited permission to copy, distribute and modify it.
891 EOF
892   exit 0
893 fi
894 exec 5>config.log
895 cat >&5 <<EOF
896 This file contains any messages produced by compilers while
897 running configure, to aid debugging if configure makes a mistake.
898
899 It was created by $as_me, which was
900 generated by GNU Autoconf 2.52.20120811.  Invocation command line was
901
902   $ $0 $@
903
904 EOF
905 {
906 cat <<_ASUNAME
907 ## ---------- ##
908 ## Platform.  ##
909 ## ---------- ##
910
911 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
912 uname -m = `(uname -m) 2>/dev/null || echo unknown`
913 uname -r = `(uname -r) 2>/dev/null || echo unknown`
914 uname -s = `(uname -s) 2>/dev/null || echo unknown`
915 uname -v = `(uname -v) 2>/dev/null || echo unknown`
916
917 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
918 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
919
920 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
921 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
922 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
923 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
924 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
925 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
926 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
927
928 PATH = $PATH
929
930 _ASUNAME
931 } >&5
932
933 cat >&5 <<EOF
934 ## ------------ ##
935 ## Core tests.  ##
936 ## ------------ ##
937
938 EOF
939
940 # Keep a trace of the command line.
941 # Strip out --no-create and --no-recursion so they do not pile up.
942 # Also quote any args containing shell meta-characters.
943 ac_configure_args=
944 ac_sep=
945 for ac_arg
946 do
947   case $ac_arg in
948   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
949   | --no-cr | --no-c) ;;
950   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
951   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
952   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
953     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
954     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
955     ac_sep=" " ;;
956   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
957      ac_sep=" " ;;
958   esac
959   # Get rid of the leading space.
960 done
961
962 # When interrupted or exit'd, cleanup temporary files, and complete
963 # config.log.  We remove comments because anyway the quotes in there
964 # would cause problems or look ugly.
965 trap 'exit_status=$?
966   # Save into config.log some information that might help in debugging.
967   echo >&5
968   echo "## ----------------- ##" >&5
969   echo "## Cache variables.  ##" >&5
970   echo "## ----------------- ##" >&5
971   echo >&5
972   # The following way of writing the cache mishandles newlines in values,
973 {
974   (set) 2>&1 |
975     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
976     *ac_space=\ *)
977       sed -n \
978         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
979           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
980       ;;
981     *)
982       sed -n \
983         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
984       ;;
985     esac;
986 } >&5
987   sed "/^$/d" confdefs.h >conftest.log
988   if test -s conftest.log; then
989     echo >&5
990     echo "## ------------ ##" >&5
991     echo "## confdefs.h.  ##" >&5
992     echo "## ------------ ##" >&5
993     echo >&5
994     cat conftest.log >&5
995   fi
996   (echo; echo) >&5
997   test "$ac_signal" != 0 &&
998     echo "$as_me: caught signal $ac_signal" >&5
999   echo "$as_me: exit $exit_status" >&5
1000   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1001     exit $exit_status
1002      ' 0
1003 for ac_signal in 1 2 13 15; do
1004   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1005 done
1006 ac_signal=0
1007
1008 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1009 rm -rf conftest* confdefs.h
1010 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1011 echo >confdefs.h
1012
1013 # Let the site file select an alternate cache file if it wants to.
1014 # Prefer explicitly selected file to automatically selected ones.
1015 if test -z "$CONFIG_SITE"; then
1016   if test "x$prefix" != xNONE; then
1017     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1018   else
1019     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1020   fi
1021 fi
1022 for ac_site_file in $CONFIG_SITE; do
1023   if test -r "$ac_site_file"; then
1024     { echo "$as_me:1024: loading site script $ac_site_file" >&5
1025 echo "$as_me: loading site script $ac_site_file" >&6;}
1026     cat "$ac_site_file" >&5
1027     . "$ac_site_file"
1028   fi
1029 done
1030
1031 if test -r "$cache_file"; then
1032   # Some versions of bash will fail to source /dev/null (special
1033   # files actually), so we avoid doing that.
1034   if test -f "$cache_file"; then
1035     { echo "$as_me:1035: loading cache $cache_file" >&5
1036 echo "$as_me: loading cache $cache_file" >&6;}
1037     case $cache_file in
1038       [\\/]* | ?:[\\/]* ) . $cache_file;;
1039       *)                      . ./$cache_file;;
1040     esac
1041   fi
1042 else
1043   { echo "$as_me:1043: creating cache $cache_file" >&5
1044 echo "$as_me: creating cache $cache_file" >&6;}
1045   >$cache_file
1046 fi
1047
1048 # Check that the precious variables saved in the cache have kept the same
1049 # value.
1050 ac_cache_corrupted=false
1051 for ac_var in `(set) 2>&1 |
1052                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1053   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1054   eval ac_new_set=\$ac_env_${ac_var}_set
1055   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1056   eval ac_new_val="\$ac_env_${ac_var}_value"
1057   case $ac_old_set,$ac_new_set in
1058     set,)
1059       { echo "$as_me:1059: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1060 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1061       ac_cache_corrupted=: ;;
1062     ,set)
1063       { echo "$as_me:1063: error: \`$ac_var' was not set in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,);;
1067     *)
1068       if test "x$ac_old_val" != "x$ac_new_val"; then
1069         { echo "$as_me:1069: error: \`$ac_var' has changed since the previous run:" >&5
1070 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1071         { echo "$as_me:1071:   former value:  $ac_old_val" >&5
1072 echo "$as_me:   former value:  $ac_old_val" >&2;}
1073         { echo "$as_me:1073:   current value: $ac_new_val" >&5
1074 echo "$as_me:   current value: $ac_new_val" >&2;}
1075         ac_cache_corrupted=:
1076       fi;;
1077   esac
1078   # Pass precious variables to config.status.  It doesn't matter if
1079   # we pass some twice (in addition to the command line arguments).
1080   if test "$ac_new_set" = set; then
1081     case $ac_new_val in
1082     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1083       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1084       ac_configure_args="$ac_configure_args '$ac_arg'"
1085       ;;
1086     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1087        ;;
1088     esac
1089   fi
1090 done
1091 if $ac_cache_corrupted; then
1092   { echo "$as_me:1092: error: changes in the environment can compromise the build" >&5
1093 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1094   { { echo "$as_me:1094: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1095 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1096    { (exit 1); exit 1; }; }
1097 fi
1098
1099 ac_ext=c
1100 ac_cpp='$CPP $CPPFLAGS'
1101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1104 ac_main_return=return
1105
1106 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1107   *c*,-n*) ECHO_N= ECHO_C='
1108 ' ECHO_T='      ' ;;
1109   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1110   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1111 esac
1112 echo "#! $SHELL" >conftest.sh
1113 echo  "exit 0"   >>conftest.sh
1114 chmod +x conftest.sh
1115 if { (echo "$as_me:1115: PATH=\".;.\"; conftest.sh") >&5
1116   (PATH=".;."; conftest.sh) 2>&5
1117   ac_status=$?
1118   echo "$as_me:1118: \$? = $ac_status" >&5
1119   (exit $ac_status); }; then
1120   ac_path_separator=';'
1121 else
1122   ac_path_separator=:
1123 fi
1124 PATH_SEPARATOR="$ac_path_separator"
1125 rm -f conftest.sh
1126
1127 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1128
1129 top_builddir=`pwd`
1130
1131 echo "$as_me:1131: checking for egrep" >&5
1132 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1133 if test "${ac_cv_prog_egrep+set}" = set; then
1134   echo $ECHO_N "(cached) $ECHO_C" >&6
1135 else
1136   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1137     then ac_cv_prog_egrep='grep -E'
1138     else ac_cv_prog_egrep='egrep'
1139     fi
1140 fi
1141 echo "$as_me:1141: result: $ac_cv_prog_egrep" >&5
1142 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1143  EGREP=$ac_cv_prog_egrep
1144
1145 test -z "$EGREP" && { { echo "$as_me:1145: error: No egrep program found" >&5
1146 echo "$as_me: error: No egrep program found" >&2;}
1147    { (exit 1); exit 1; }; }
1148
1149 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1150 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1151 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 cf_cv_abi_version=${NCURSES_MAJOR}
1153 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1154 cf_cv_timestamp=`date`
1155 echo "$as_me:1155: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1156 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1157
1158 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1159
1160 # Check whether --with-rel-version or --without-rel-version was given.
1161 if test "${with_rel_version+set}" = set; then
1162   withval="$with_rel_version"
1163   { echo "$as_me:1163: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1164 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1165  cf_cv_rel_version=$withval
1166 fi;
1167
1168  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1169  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1170
1171 if test -n "$NCURSES_MAJOR" ; then
1172   case $NCURSES_MAJOR in #(vi
1173   [0-9]*) #(vi
1174         ;;
1175   *)
1176         { { echo "$as_me:1176: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1177 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1178    { (exit 1); exit 1; }; }
1179         ;;
1180   esac
1181 else
1182   { { echo "$as_me:1182: error: Release major-version value is empty" >&5
1183 echo "$as_me: error: Release major-version value is empty" >&2;}
1184    { (exit 1); exit 1; }; }
1185 fi
1186
1187 if test -n "$NCURSES_MINOR" ; then
1188   case $NCURSES_MINOR in #(vi
1189   [0-9]*) #(vi
1190         ;;
1191   *)
1192         { { echo "$as_me:1192: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1193 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1194    { (exit 1); exit 1; }; }
1195         ;;
1196   esac
1197 else
1198   { { echo "$as_me:1198: error: Release minor-version value is empty" >&5
1199 echo "$as_me: error: Release minor-version value is empty" >&2;}
1200    { (exit 1); exit 1; }; }
1201 fi
1202
1203 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1204
1205 # Check whether --with-abi-version or --without-abi-version was given.
1206 if test "${with_abi_version+set}" = set; then
1207   withval="$with_abi_version"
1208   { echo "$as_me:1208: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1209 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1210  cf_cv_abi_version=$withval
1211 fi;
1212
1213 if test -n "$cf_cv_abi_version" ; then
1214   case $cf_cv_abi_version in #(vi
1215   [0-9]*) #(vi
1216         ;;
1217   *)
1218         { { echo "$as_me:1218: error: ABI version is not a number: $cf_cv_abi_version" >&5
1219 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1220    { (exit 1); exit 1; }; }
1221         ;;
1222   esac
1223 else
1224   { { echo "$as_me:1224: error: ABI version value is empty" >&5
1225 echo "$as_me: error: ABI version value is empty" >&2;}
1226    { (exit 1); exit 1; }; }
1227 fi
1228
1229 ac_aux_dir=
1230 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1231   if test -f $ac_dir/install-sh; then
1232     ac_aux_dir=$ac_dir
1233     ac_install_sh="$ac_aux_dir/install-sh -c"
1234     break
1235   elif test -f $ac_dir/install.sh; then
1236     ac_aux_dir=$ac_dir
1237     ac_install_sh="$ac_aux_dir/install.sh -c"
1238     break
1239   elif test -f $ac_dir/shtool; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/shtool install -c"
1242     break
1243   fi
1244 done
1245 if test -z "$ac_aux_dir"; then
1246   { { echo "$as_me:1246: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1247 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1248    { (exit 1); exit 1; }; }
1249 fi
1250 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1251 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1252 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1253
1254 # Make sure we can run config.sub.
1255 $ac_config_sub sun4 >/dev/null 2>&1 ||
1256   { { echo "$as_me:1256: error: cannot run $ac_config_sub" >&5
1257 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1258    { (exit 1); exit 1; }; }
1259
1260 echo "$as_me:1260: checking build system type" >&5
1261 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1262 if test "${ac_cv_build+set}" = set; then
1263   echo $ECHO_N "(cached) $ECHO_C" >&6
1264 else
1265   ac_cv_build_alias=$build_alias
1266 test -z "$ac_cv_build_alias" &&
1267   ac_cv_build_alias=`$ac_config_guess`
1268 test -z "$ac_cv_build_alias" &&
1269   { { echo "$as_me:1269: error: cannot guess build type; you must specify one" >&5
1270 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1271    { (exit 1); exit 1; }; }
1272 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1273   { { echo "$as_me:1273: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1274 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1275    { (exit 1); exit 1; }; }
1276
1277 fi
1278 echo "$as_me:1278: result: $ac_cv_build" >&5
1279 echo "${ECHO_T}$ac_cv_build" >&6
1280 build=$ac_cv_build
1281 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1282 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1283 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1284
1285 echo "$as_me:1285: checking host system type" >&5
1286 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1287 if test "${ac_cv_host+set}" = set; then
1288   echo $ECHO_N "(cached) $ECHO_C" >&6
1289 else
1290   ac_cv_host_alias=$host_alias
1291 test -z "$ac_cv_host_alias" &&
1292   ac_cv_host_alias=$ac_cv_build_alias
1293 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1294   { { echo "$as_me:1294: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1295 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1296    { (exit 1); exit 1; }; }
1297
1298 fi
1299 echo "$as_me:1299: result: $ac_cv_host" >&5
1300 echo "${ECHO_T}$ac_cv_host" >&6
1301 host=$ac_cv_host
1302 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1303 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1304 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1305
1306 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1307         echo "$as_me:1307: checking target system type" >&5
1308 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1309 if test "${ac_cv_target+set}" = set; then
1310   echo $ECHO_N "(cached) $ECHO_C" >&6
1311 else
1312   ac_cv_target_alias=$target_alias
1313 test "x$ac_cv_target_alias" = "x" &&
1314   ac_cv_target_alias=$ac_cv_host_alias
1315 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1316   { { echo "$as_me:1316: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1317 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1318    { (exit 1); exit 1; }; }
1319
1320 fi
1321 echo "$as_me:1321: result: $ac_cv_target" >&5
1322 echo "${ECHO_T}$ac_cv_target" >&6
1323 target=$ac_cv_target
1324 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1325 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1326 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1327
1328 # The aliases save the names the user supplied, while $host etc.
1329 # will get canonicalized.
1330 test -n "$target_alias" &&
1331   test "$program_prefix$program_suffix$program_transform_name" = \
1332     NONENONEs,x,x, &&
1333   program_prefix=${target_alias}-
1334         system_name="$host_os"
1335 else
1336         system_name="`(uname -s -r) 2>/dev/null`"
1337         if test -z "$system_name" ; then
1338                 system_name="`(hostname) 2>/dev/null`"
1339         fi
1340 fi
1341 test -n "$system_name" && cat >>confdefs.h <<EOF
1342 #define SYSTEM_NAME "$system_name"
1343 EOF
1344
1345 if test "${cf_cv_system_name+set}" = set; then
1346   echo $ECHO_N "(cached) $ECHO_C" >&6
1347 else
1348   cf_cv_system_name="$system_name"
1349 fi
1350
1351 test -z "$system_name" && system_name="$cf_cv_system_name"
1352 test -n "$cf_cv_system_name" && echo "$as_me:1352: result: Configuring for $cf_cv_system_name" >&5
1353 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1354
1355 if test ".$system_name" != ".$cf_cv_system_name" ; then
1356         echo "$as_me:1356: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1357 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1358         { { echo "$as_me:1358: error: \"Please remove config.cache and try again.\"" >&5
1359 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1360    { (exit 1); exit 1; }; }
1361 fi
1362
1363 # Check whether --with-system-type or --without-system-type was given.
1364 if test "${with_system_type+set}" = set; then
1365   withval="$with_system_type"
1366   { echo "$as_me:1366: WARNING: overriding system type to $withval" >&5
1367 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1368  cf_cv_system_name=$withval
1369 fi;
1370
1371 ###     Save the given $CFLAGS to allow user-override.
1372 cf_user_CFLAGS="$CFLAGS"
1373
1374 ###     Default install-location
1375
1376 echo "$as_me:1376: checking for prefix" >&5
1377 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1378 if test "x$prefix" = "xNONE" ; then
1379         case "$cf_cv_system_name" in
1380                 # non-vendor systems don't have a conflict
1381         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1382                 prefix=/usr
1383                 ;;
1384         *)      prefix=$ac_default_prefix
1385                 ;;
1386         esac
1387 fi
1388 echo "$as_me:1388: result: $prefix" >&5
1389 echo "${ECHO_T}$prefix" >&6
1390
1391 if test "x$prefix" = "xNONE" ; then
1392 echo "$as_me:1392: checking for default include-directory" >&5
1393 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1394 test -n "$verbose" && echo 1>&6
1395 for cf_symbol in \
1396         $includedir \
1397         $includedir/ncurses \
1398         $prefix/include \
1399         $prefix/include/ncurses \
1400         /usr/local/include \
1401         /usr/local/include/ncurses \
1402         /usr/include \
1403         /usr/include/ncurses
1404 do
1405         cf_dir=`eval echo $cf_symbol`
1406         if test -f $cf_dir/curses.h ; then
1407         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1408                 includedir="$cf_symbol"
1409                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1410                 break
1411         fi
1412         fi
1413         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1414 done
1415 echo "$as_me:1415: result: $includedir" >&5
1416 echo "${ECHO_T}$includedir" >&6
1417 fi
1418
1419 ###     Checks for programs.
1420
1421 # Check whether --with-ada or --without-ada was given.
1422 if test "${with_ada+set}" = set; then
1423   withval="$with_ada"
1424   cf_with_ada=$withval
1425 else
1426   cf_with_ada=yes
1427 fi;
1428 if test x"$cf_with_ada" = xyes
1429 then
1430         cf_PROG_CC="gnatgcc gcc cc"
1431 else
1432         cf_PROG_CC="gcc cc"
1433 fi
1434
1435 ac_ext=c
1436 ac_cpp='$CPP $CPPFLAGS'
1437 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1438 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1439 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1440 ac_main_return=return
1441 if test -n "$ac_tool_prefix"; then
1442   for ac_prog in $cf_PROG_CC
1443   do
1444     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1445 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1446 echo "$as_me:1446: checking for $ac_word" >&5
1447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1448 if test "${ac_cv_prog_CC+set}" = set; then
1449   echo $ECHO_N "(cached) $ECHO_C" >&6
1450 else
1451   if test -n "$CC"; then
1452   ac_cv_prog_CC="$CC" # Let the user override the test.
1453 else
1454   ac_save_IFS=$IFS; IFS=$ac_path_separator
1455 ac_dummy="$PATH"
1456 for ac_dir in $ac_dummy; do
1457   IFS=$ac_save_IFS
1458   test -z "$ac_dir" && ac_dir=.
1459   $as_executable_p "$ac_dir/$ac_word" || continue
1460 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1461 echo "$as_me:1461: found $ac_dir/$ac_word" >&5
1462 break
1463 done
1464
1465 fi
1466 fi
1467 CC=$ac_cv_prog_CC
1468 if test -n "$CC"; then
1469   echo "$as_me:1469: result: $CC" >&5
1470 echo "${ECHO_T}$CC" >&6
1471 else
1472   echo "$as_me:1472: result: no" >&5
1473 echo "${ECHO_T}no" >&6
1474 fi
1475
1476     test -n "$CC" && break
1477   done
1478 fi
1479 if test -z "$CC"; then
1480   ac_ct_CC=$CC
1481   for ac_prog in $cf_PROG_CC
1482 do
1483   # Extract the first word of "$ac_prog", so it can be a program name with args.
1484 set dummy $ac_prog; ac_word=$2
1485 echo "$as_me:1485: checking for $ac_word" >&5
1486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1487 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1488   echo $ECHO_N "(cached) $ECHO_C" >&6
1489 else
1490   if test -n "$ac_ct_CC"; then
1491   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1492 else
1493   ac_save_IFS=$IFS; IFS=$ac_path_separator
1494 ac_dummy="$PATH"
1495 for ac_dir in $ac_dummy; do
1496   IFS=$ac_save_IFS
1497   test -z "$ac_dir" && ac_dir=.
1498   $as_executable_p "$ac_dir/$ac_word" || continue
1499 ac_cv_prog_ac_ct_CC="$ac_prog"
1500 echo "$as_me:1500: found $ac_dir/$ac_word" >&5
1501 break
1502 done
1503
1504 fi
1505 fi
1506 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1507 if test -n "$ac_ct_CC"; then
1508   echo "$as_me:1508: result: $ac_ct_CC" >&5
1509 echo "${ECHO_T}$ac_ct_CC" >&6
1510 else
1511   echo "$as_me:1511: result: no" >&5
1512 echo "${ECHO_T}no" >&6
1513 fi
1514
1515   test -n "$ac_ct_CC" && break
1516 done
1517
1518   CC=$ac_ct_CC
1519 fi
1520
1521 test -z "$CC" && { { echo "$as_me:1521: error: no acceptable cc found in \$PATH" >&5
1522 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1523    { (exit 1); exit 1; }; }
1524
1525 # Provide some information about the compiler.
1526 echo "$as_me:1526:" \
1527      "checking for C compiler version" >&5
1528 ac_compiler=`set X $ac_compile; echo $2`
1529 { (eval echo "$as_me:1529: \"$ac_compiler --version </dev/null >&5\"") >&5
1530   (eval $ac_compiler --version </dev/null >&5) 2>&5
1531   ac_status=$?
1532   echo "$as_me:1532: \$? = $ac_status" >&5
1533   (exit $ac_status); }
1534 { (eval echo "$as_me:1534: \"$ac_compiler -v </dev/null >&5\"") >&5
1535   (eval $ac_compiler -v </dev/null >&5) 2>&5
1536   ac_status=$?
1537   echo "$as_me:1537: \$? = $ac_status" >&5
1538   (exit $ac_status); }
1539 { (eval echo "$as_me:1539: \"$ac_compiler -V </dev/null >&5\"") >&5
1540   (eval $ac_compiler -V </dev/null >&5) 2>&5
1541   ac_status=$?
1542   echo "$as_me:1542: \$? = $ac_status" >&5
1543   (exit $ac_status); }
1544
1545 cat >conftest.$ac_ext <<_ACEOF
1546 #line 1546 "configure"
1547 #include "confdefs.h"
1548
1549 int
1550 main ()
1551 {
1552
1553   ;
1554   return 0;
1555 }
1556 _ACEOF
1557 ac_clean_files_save=$ac_clean_files
1558 ac_clean_files="$ac_clean_files a.out a.exe"
1559 # Try to create an executable without -o first, disregard a.out.
1560 # It will help us diagnose broken compilers, and finding out an intuition
1561 # of exeext.
1562 echo "$as_me:1562: checking for C compiler default output" >&5
1563 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1564 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1565 if { (eval echo "$as_me:1565: \"$ac_link_default\"") >&5
1566   (eval $ac_link_default) 2>&5
1567   ac_status=$?
1568   echo "$as_me:1568: \$? = $ac_status" >&5
1569   (exit $ac_status); }; then
1570   # Find the output, starting from the most likely.  This scheme is
1571 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1572 # resort.
1573 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1574                 ls a.out conftest 2>/dev/null;
1575                 ls a.* conftest.* 2>/dev/null`; do
1576   case $ac_file in
1577     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1578     a.out ) # We found the default executable, but exeext='' is most
1579             # certainly right.
1580             break;;
1581     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1583           export ac_cv_exeext
1584           break;;
1585     * ) break;;
1586   esac
1587 done
1588 else
1589   echo "$as_me: failed program was:" >&5
1590 cat conftest.$ac_ext >&5
1591 { { echo "$as_me:1591: error: C compiler cannot create executables" >&5
1592 echo "$as_me: error: C compiler cannot create executables" >&2;}
1593    { (exit 77); exit 77; }; }
1594 fi
1595
1596 ac_exeext=$ac_cv_exeext
1597 echo "$as_me:1597: result: $ac_file" >&5
1598 echo "${ECHO_T}$ac_file" >&6
1599
1600 # Check the compiler produces executables we can run.  If not, either
1601 # the compiler is broken, or we cross compile.
1602 echo "$as_me:1602: checking whether the C compiler works" >&5
1603 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1604 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1605 # If not cross compiling, check that we can run a simple program.
1606 if test "$cross_compiling" != yes; then
1607   if { ac_try='./$ac_file'
1608   { (eval echo "$as_me:1608: \"$ac_try\"") >&5
1609   (eval $ac_try) 2>&5
1610   ac_status=$?
1611   echo "$as_me:1611: \$? = $ac_status" >&5
1612   (exit $ac_status); }; }; then
1613     cross_compiling=no
1614   else
1615     if test "$cross_compiling" = maybe; then
1616         cross_compiling=yes
1617     else
1618         { { echo "$as_me:1618: error: cannot run C compiled programs.
1619 If you meant to cross compile, use \`--host'." >&5
1620 echo "$as_me: error: cannot run C compiled programs.
1621 If you meant to cross compile, use \`--host'." >&2;}
1622    { (exit 1); exit 1; }; }
1623     fi
1624   fi
1625 fi
1626 echo "$as_me:1626: result: yes" >&5
1627 echo "${ECHO_T}yes" >&6
1628
1629 rm -f a.out a.exe conftest$ac_cv_exeext
1630 ac_clean_files=$ac_clean_files_save
1631 # Check the compiler produces executables we can run.  If not, either
1632 # the compiler is broken, or we cross compile.
1633 echo "$as_me:1633: checking whether we are cross compiling" >&5
1634 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1635 echo "$as_me:1635: result: $cross_compiling" >&5
1636 echo "${ECHO_T}$cross_compiling" >&6
1637
1638 echo "$as_me:1638: checking for executable suffix" >&5
1639 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1640 if { (eval echo "$as_me:1640: \"$ac_link\"") >&5
1641   (eval $ac_link) 2>&5
1642   ac_status=$?
1643   echo "$as_me:1643: \$? = $ac_status" >&5
1644   (exit $ac_status); }; then
1645   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1646 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1647 # work properly (i.e., refer to `conftest.exe'), while it won't with
1648 # `rm'.
1649 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1650   case $ac_file in
1651     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1652     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1653           export ac_cv_exeext
1654           break;;
1655     * ) break;;
1656   esac
1657 done
1658 else
1659   { { echo "$as_me:1659: error: cannot compute EXEEXT: cannot compile and link" >&5
1660 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1661    { (exit 1); exit 1; }; }
1662 fi
1663
1664 rm -f conftest$ac_cv_exeext
1665 echo "$as_me:1665: result: $ac_cv_exeext" >&5
1666 echo "${ECHO_T}$ac_cv_exeext" >&6
1667
1668 rm -f conftest.$ac_ext
1669 EXEEXT=$ac_cv_exeext
1670 ac_exeext=$EXEEXT
1671 echo "$as_me:1671: checking for object suffix" >&5
1672 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1673 if test "${ac_cv_objext+set}" = set; then
1674   echo $ECHO_N "(cached) $ECHO_C" >&6
1675 else
1676   cat >conftest.$ac_ext <<_ACEOF
1677 #line 1677 "configure"
1678 #include "confdefs.h"
1679
1680 int
1681 main ()
1682 {
1683
1684   ;
1685   return 0;
1686 }
1687 _ACEOF
1688 rm -f conftest.o conftest.obj
1689 if { (eval echo "$as_me:1689: \"$ac_compile\"") >&5
1690   (eval $ac_compile) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }; then
1694   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1695   case $ac_file in
1696     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1697     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1698        break;;
1699   esac
1700 done
1701 else
1702   echo "$as_me: failed program was:" >&5
1703 cat conftest.$ac_ext >&5
1704 { { echo "$as_me:1704: error: cannot compute OBJEXT: cannot compile" >&5
1705 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1706    { (exit 1); exit 1; }; }
1707 fi
1708
1709 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1710 fi
1711 echo "$as_me:1711: result: $ac_cv_objext" >&5
1712 echo "${ECHO_T}$ac_cv_objext" >&6
1713 OBJEXT=$ac_cv_objext
1714 ac_objext=$OBJEXT
1715 echo "$as_me:1715: checking whether we are using the GNU C compiler" >&5
1716 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1717 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1718   echo $ECHO_N "(cached) $ECHO_C" >&6
1719 else
1720   cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main ()
1726 {
1727 #ifndef __GNUC__
1728        choke me
1729 #endif
1730
1731   ;
1732   return 0;
1733 }
1734 _ACEOF
1735 rm -f conftest.$ac_objext
1736 if { (eval echo "$as_me:1736: \"$ac_compile\"") >&5
1737   (eval $ac_compile) 2>&5
1738   ac_status=$?
1739   echo "$as_me:1739: \$? = $ac_status" >&5
1740   (exit $ac_status); } &&
1741          { ac_try='test -s conftest.$ac_objext'
1742   { (eval echo "$as_me:1742: \"$ac_try\"") >&5
1743   (eval $ac_try) 2>&5
1744   ac_status=$?
1745   echo "$as_me:1745: \$? = $ac_status" >&5
1746   (exit $ac_status); }; }; then
1747   ac_compiler_gnu=yes
1748 else
1749   echo "$as_me: failed program was:" >&5
1750 cat conftest.$ac_ext >&5
1751 ac_compiler_gnu=no
1752 fi
1753 rm -f conftest.$ac_objext conftest.$ac_ext
1754 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1755
1756 fi
1757 echo "$as_me:1757: result: $ac_cv_c_compiler_gnu" >&5
1758 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1759 GCC=`test $ac_compiler_gnu = yes && echo yes`
1760 ac_test_CFLAGS=${CFLAGS+set}
1761 ac_save_CFLAGS=$CFLAGS
1762 CFLAGS="-g"
1763 echo "$as_me:1763: checking whether $CC accepts -g" >&5
1764 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1765 if test "${ac_cv_prog_cc_g+set}" = set; then
1766   echo $ECHO_N "(cached) $ECHO_C" >&6
1767 else
1768   cat >conftest.$ac_ext <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1771
1772 int
1773 main ()
1774 {
1775
1776   ;
1777   return 0;
1778 }
1779 _ACEOF
1780 rm -f conftest.$ac_objext
1781 if { (eval echo "$as_me:1781: \"$ac_compile\"") >&5
1782   (eval $ac_compile) 2>&5
1783   ac_status=$?
1784   echo "$as_me:1784: \$? = $ac_status" >&5
1785   (exit $ac_status); } &&
1786          { ac_try='test -s conftest.$ac_objext'
1787   { (eval echo "$as_me:1787: \"$ac_try\"") >&5
1788   (eval $ac_try) 2>&5
1789   ac_status=$?
1790   echo "$as_me:1790: \$? = $ac_status" >&5
1791   (exit $ac_status); }; }; then
1792   ac_cv_prog_cc_g=yes
1793 else
1794   echo "$as_me: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 ac_cv_prog_cc_g=no
1797 fi
1798 rm -f conftest.$ac_objext conftest.$ac_ext
1799 fi
1800 echo "$as_me:1800: result: $ac_cv_prog_cc_g" >&5
1801 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1802 if test "$ac_test_CFLAGS" = set; then
1803   CFLAGS=$ac_save_CFLAGS
1804 elif test $ac_cv_prog_cc_g = yes; then
1805   if test "$GCC" = yes; then
1806     CFLAGS="-g -O2"
1807   else
1808     CFLAGS="-g"
1809   fi
1810 else
1811   if test "$GCC" = yes; then
1812     CFLAGS="-O2"
1813   else
1814     CFLAGS=
1815   fi
1816 fi
1817 # Some people use a C++ compiler to compile C.  Since we use `exit',
1818 # in C++ we need to declare it.  In case someone uses the same compiler
1819 # for both compiling C and C++ we need to have the C++ compiler decide
1820 # the declaration of exit, since it's the most demanding environment.
1821 cat >conftest.$ac_ext <<_ACEOF
1822 #ifndef __cplusplus
1823   choke me
1824 #endif
1825 _ACEOF
1826 rm -f conftest.$ac_objext
1827 if { (eval echo "$as_me:1827: \"$ac_compile\"") >&5
1828   (eval $ac_compile) 2>&5
1829   ac_status=$?
1830   echo "$as_me:1830: \$? = $ac_status" >&5
1831   (exit $ac_status); } &&
1832          { ac_try='test -s conftest.$ac_objext'
1833   { (eval echo "$as_me:1833: \"$ac_try\"") >&5
1834   (eval $ac_try) 2>&5
1835   ac_status=$?
1836   echo "$as_me:1836: \$? = $ac_status" >&5
1837   (exit $ac_status); }; }; then
1838   for ac_declaration in \
1839    ''\
1840    '#include <stdlib.h>' \
1841    'extern "C" void std::exit (int) throw (); using std::exit;' \
1842    'extern "C" void std::exit (int); using std::exit;' \
1843    'extern "C" void exit (int) throw ();' \
1844    'extern "C" void exit (int);' \
1845    'void exit (int);'
1846 do
1847   cat >conftest.$ac_ext <<_ACEOF
1848 #line 1848 "configure"
1849 #include "confdefs.h"
1850 #include <stdlib.h>
1851 $ac_declaration
1852 int
1853 main ()
1854 {
1855 exit (42);
1856   ;
1857   return 0;
1858 }
1859 _ACEOF
1860 rm -f conftest.$ac_objext
1861 if { (eval echo "$as_me:1861: \"$ac_compile\"") >&5
1862   (eval $ac_compile) 2>&5
1863   ac_status=$?
1864   echo "$as_me:1864: \$? = $ac_status" >&5
1865   (exit $ac_status); } &&
1866          { ac_try='test -s conftest.$ac_objext'
1867   { (eval echo "$as_me:1867: \"$ac_try\"") >&5
1868   (eval $ac_try) 2>&5
1869   ac_status=$?
1870   echo "$as_me:1870: \$? = $ac_status" >&5
1871   (exit $ac_status); }; }; then
1872   :
1873 else
1874   echo "$as_me: failed program was:" >&5
1875 cat conftest.$ac_ext >&5
1876 continue
1877 fi
1878 rm -f conftest.$ac_objext conftest.$ac_ext
1879   cat >conftest.$ac_ext <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882 $ac_declaration
1883 int
1884 main ()
1885 {
1886 exit (42);
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 rm -f conftest.$ac_objext
1892 if { (eval echo "$as_me:1892: \"$ac_compile\"") >&5
1893   (eval $ac_compile) 2>&5
1894   ac_status=$?
1895   echo "$as_me:1895: \$? = $ac_status" >&5
1896   (exit $ac_status); } &&
1897          { ac_try='test -s conftest.$ac_objext'
1898   { (eval echo "$as_me:1898: \"$ac_try\"") >&5
1899   (eval $ac_try) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit $ac_status); }; }; then
1903   break
1904 else
1905   echo "$as_me: failed program was:" >&5
1906 cat conftest.$ac_ext >&5
1907 fi
1908 rm -f conftest.$ac_objext conftest.$ac_ext
1909 done
1910 rm -rf conftest*
1911 if test -n "$ac_declaration"; then
1912   echo '#ifdef __cplusplus' >>confdefs.h
1913   echo $ac_declaration      >>confdefs.h
1914   echo '#endif'             >>confdefs.h
1915 fi
1916
1917 else
1918   echo "$as_me: failed program was:" >&5
1919 cat conftest.$ac_ext >&5
1920 fi
1921 rm -f conftest.$ac_objext conftest.$ac_ext
1922 ac_ext=c
1923 ac_cpp='$CPP $CPPFLAGS'
1924 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1925 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1926 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1927 ac_main_return=return
1928
1929 GCC_VERSION=none
1930 if test "$GCC" = yes ; then
1931         echo "$as_me:1931: checking version of $CC" >&5
1932 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1933         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1934         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1935         echo "$as_me:1935: result: $GCC_VERSION" >&5
1936 echo "${ECHO_T}$GCC_VERSION" >&6
1937 fi
1938
1939 ac_ext=c
1940 ac_cpp='$CPP $CPPFLAGS'
1941 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1942 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1943 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1944 ac_main_return=return
1945 echo "$as_me:1945: checking how to run the C preprocessor" >&5
1946 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1947 # On Suns, sometimes $CPP names a directory.
1948 if test -n "$CPP" && test -d "$CPP"; then
1949   CPP=
1950 fi
1951 if test -z "$CPP"; then
1952   if test "${ac_cv_prog_CPP+set}" = set; then
1953   echo $ECHO_N "(cached) $ECHO_C" >&6
1954 else
1955       # Double quotes because CPP needs to be expanded
1956     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1957     do
1958       ac_preproc_ok=false
1959 for ac_c_preproc_warn_flag in '' yes
1960 do
1961   # Use a header file that comes with gcc, so configuring glibc
1962   # with a fresh cross-compiler works.
1963   # On the NeXT, cc -E runs the code through the compiler's parser,
1964   # not just through cpp. "Syntax error" is here to catch this case.
1965   cat >conftest.$ac_ext <<_ACEOF
1966 #line 1966 "configure"
1967 #include "confdefs.h"
1968 #include <assert.h>
1969                      Syntax error
1970 _ACEOF
1971 if { (eval echo "$as_me:1971: \"$ac_cpp conftest.$ac_ext\"") >&5
1972   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1973   ac_status=$?
1974   egrep -v '^ *\+' conftest.er1 >conftest.err
1975   rm -f conftest.er1
1976   cat conftest.err >&5
1977   echo "$as_me:1977: \$? = $ac_status" >&5
1978   (exit $ac_status); } >/dev/null; then
1979   if test -s conftest.err; then
1980     ac_cpp_err=$ac_c_preproc_warn_flag
1981   else
1982     ac_cpp_err=
1983   fi
1984 else
1985   ac_cpp_err=yes
1986 fi
1987 if test -z "$ac_cpp_err"; then
1988   :
1989 else
1990   echo "$as_me: failed program was:" >&5
1991   cat conftest.$ac_ext >&5
1992   # Broken: fails on valid input.
1993 continue
1994 fi
1995 rm -f conftest.err conftest.$ac_ext
1996
1997   # OK, works on sane cases.  Now check whether non-existent headers
1998   # can be detected and how.
1999   cat >conftest.$ac_ext <<_ACEOF
2000 #line 2000 "configure"
2001 #include "confdefs.h"
2002 #include <ac_nonexistent.h>
2003 _ACEOF
2004 if { (eval echo "$as_me:2004: \"$ac_cpp conftest.$ac_ext\"") >&5
2005   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2006   ac_status=$?
2007   egrep -v '^ *\+' conftest.er1 >conftest.err
2008   rm -f conftest.er1
2009   cat conftest.err >&5
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); } >/dev/null; then
2012   if test -s conftest.err; then
2013     ac_cpp_err=$ac_c_preproc_warn_flag
2014   else
2015     ac_cpp_err=
2016   fi
2017 else
2018   ac_cpp_err=yes
2019 fi
2020 if test -z "$ac_cpp_err"; then
2021   # Broken: success on invalid input.
2022 continue
2023 else
2024   echo "$as_me: failed program was:" >&5
2025   cat conftest.$ac_ext >&5
2026   # Passes both tests.
2027 ac_preproc_ok=:
2028 break
2029 fi
2030 rm -f conftest.err conftest.$ac_ext
2031
2032 done
2033 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2034 rm -f conftest.err conftest.$ac_ext
2035 if $ac_preproc_ok; then
2036   break
2037 fi
2038
2039     done
2040     ac_cv_prog_CPP=$CPP
2041
2042 fi
2043   CPP=$ac_cv_prog_CPP
2044 else
2045   ac_cv_prog_CPP=$CPP
2046 fi
2047 echo "$as_me:2047: result: $CPP" >&5
2048 echo "${ECHO_T}$CPP" >&6
2049 ac_preproc_ok=false
2050 for ac_c_preproc_warn_flag in '' yes
2051 do
2052   # Use a header file that comes with gcc, so configuring glibc
2053   # with a fresh cross-compiler works.
2054   # On the NeXT, cc -E runs the code through the compiler's parser,
2055   # not just through cpp. "Syntax error" is here to catch this case.
2056   cat >conftest.$ac_ext <<_ACEOF
2057 #line 2057 "configure"
2058 #include "confdefs.h"
2059 #include <assert.h>
2060                      Syntax error
2061 _ACEOF
2062 if { (eval echo "$as_me:2062: \"$ac_cpp conftest.$ac_ext\"") >&5
2063   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2064   ac_status=$?
2065   egrep -v '^ *\+' conftest.er1 >conftest.err
2066   rm -f conftest.er1
2067   cat conftest.err >&5
2068   echo "$as_me:2068: \$? = $ac_status" >&5
2069   (exit $ac_status); } >/dev/null; then
2070   if test -s conftest.err; then
2071     ac_cpp_err=$ac_c_preproc_warn_flag
2072   else
2073     ac_cpp_err=
2074   fi
2075 else
2076   ac_cpp_err=yes
2077 fi
2078 if test -z "$ac_cpp_err"; then
2079   :
2080 else
2081   echo "$as_me: failed program was:" >&5
2082   cat conftest.$ac_ext >&5
2083   # Broken: fails on valid input.
2084 continue
2085 fi
2086 rm -f conftest.err conftest.$ac_ext
2087
2088   # OK, works on sane cases.  Now check whether non-existent headers
2089   # can be detected and how.
2090   cat >conftest.$ac_ext <<_ACEOF
2091 #line 2091 "configure"
2092 #include "confdefs.h"
2093 #include <ac_nonexistent.h>
2094 _ACEOF
2095 if { (eval echo "$as_me:2095: \"$ac_cpp conftest.$ac_ext\"") >&5
2096   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2097   ac_status=$?
2098   egrep -v '^ *\+' conftest.er1 >conftest.err
2099   rm -f conftest.er1
2100   cat conftest.err >&5
2101   echo "$as_me:2101: \$? = $ac_status" >&5
2102   (exit $ac_status); } >/dev/null; then
2103   if test -s conftest.err; then
2104     ac_cpp_err=$ac_c_preproc_warn_flag
2105   else
2106     ac_cpp_err=
2107   fi
2108 else
2109   ac_cpp_err=yes
2110 fi
2111 if test -z "$ac_cpp_err"; then
2112   # Broken: success on invalid input.
2113 continue
2114 else
2115   echo "$as_me: failed program was:" >&5
2116   cat conftest.$ac_ext >&5
2117   # Passes both tests.
2118 ac_preproc_ok=:
2119 break
2120 fi
2121 rm -f conftest.err conftest.$ac_ext
2122
2123 done
2124 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2125 rm -f conftest.err conftest.$ac_ext
2126 if $ac_preproc_ok; then
2127   :
2128 else
2129   { { echo "$as_me:2129: error: C preprocessor \"$CPP\" fails sanity check" >&5
2130 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2131    { (exit 1); exit 1; }; }
2132 fi
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
2141 if test $ac_cv_c_compiler_gnu = yes; then
2142     echo "$as_me:2142: checking whether $CC needs -traditional" >&5
2143 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2144 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2145   echo $ECHO_N "(cached) $ECHO_C" >&6
2146 else
2147     ac_pattern="Autoconf.*'x'"
2148   cat >conftest.$ac_ext <<_ACEOF
2149 #line 2149 "configure"
2150 #include "confdefs.h"
2151 #include <sgtty.h>
2152 int Autoconf = TIOCGETP;
2153 _ACEOF
2154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2155   egrep "$ac_pattern" >/dev/null 2>&1; then
2156   ac_cv_prog_gcc_traditional=yes
2157 else
2158   ac_cv_prog_gcc_traditional=no
2159 fi
2160 rm -rf conftest*
2161
2162   if test $ac_cv_prog_gcc_traditional = no; then
2163     cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <termio.h>
2167 int Autoconf = TCGETA;
2168 _ACEOF
2169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2170   egrep "$ac_pattern" >/dev/null 2>&1; then
2171   ac_cv_prog_gcc_traditional=yes
2172 fi
2173 rm -rf conftest*
2174
2175   fi
2176 fi
2177 echo "$as_me:2177: result: $ac_cv_prog_gcc_traditional" >&5
2178 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2179   if test $ac_cv_prog_gcc_traditional = yes; then
2180     CC="$CC -traditional"
2181   fi
2182 fi
2183
2184 echo "$as_me:2184: checking whether $CC understands -c and -o together" >&5
2185 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2186 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2187   echo $ECHO_N "(cached) $ECHO_C" >&6
2188 else
2189
2190 cat > conftest.$ac_ext <<CF_EOF
2191 #include <stdio.h>
2192 int main()
2193 {
2194         ${cf_cv_main_return:-return}(0);
2195 }
2196 CF_EOF
2197 # We do the test twice because some compilers refuse to overwrite an
2198 # existing .o file with -o, though they will create one.
2199 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2200 if { (eval echo "$as_me:2200: \"$ac_try\"") >&5
2201   (eval $ac_try) 2>&5
2202   ac_status=$?
2203   echo "$as_me:2203: \$? = $ac_status" >&5
2204   (exit $ac_status); } &&
2205   test -f conftest2.$ac_objext && { (eval echo "$as_me:2205: \"$ac_try\"") >&5
2206   (eval $ac_try) 2>&5
2207   ac_status=$?
2208   echo "$as_me:2208: \$? = $ac_status" >&5
2209   (exit $ac_status); };
2210 then
2211   eval cf_cv_prog_CC_c_o=yes
2212 else
2213   eval cf_cv_prog_CC_c_o=no
2214 fi
2215 rm -rf conftest*
2216
2217 fi
2218 if test $cf_cv_prog_CC_c_o = yes; then
2219   echo "$as_me:2219: result: yes" >&5
2220 echo "${ECHO_T}yes" >&6
2221 else
2222   echo "$as_me:2222: result: no" >&5
2223 echo "${ECHO_T}no" >&6
2224 fi
2225
2226 echo "$as_me:2226: checking for POSIXized ISC" >&5
2227 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2228 if test -d /etc/conf/kconfig.d &&
2229    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2230 then
2231   echo "$as_me:2231: result: yes" >&5
2232 echo "${ECHO_T}yes" >&6
2233   ISC=yes # If later tests want to check for ISC.
2234
2235 cat >>confdefs.h <<\EOF
2236 #define _POSIX_SOURCE 1
2237 EOF
2238
2239   if test "$GCC" = yes; then
2240     CC="$CC -posix"
2241   else
2242     CC="$CC -Xp"
2243   fi
2244 else
2245   echo "$as_me:2245: result: no" >&5
2246 echo "${ECHO_T}no" >&6
2247   ISC=
2248 fi
2249
2250 # This should have been defined by AC_PROG_CC
2251 : ${CC:=cc}
2252
2253 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2254 # into CC.  This will not help with broken scripts that wrap the compiler with
2255 # options, but eliminates a more common category of user confusion.
2256 echo "$as_me:2256: checking \$CC variable" >&5
2257 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2258 case "$CC" in #(vi
2259 *[\ \   ]-[IUD]*)
2260         echo "$as_me:2260: result: broken" >&5
2261 echo "${ECHO_T}broken" >&6
2262         { echo "$as_me:2262: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2263 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2264         # humor him...
2265         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2266         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2267
2268 cf_fix_cppflags=no
2269 cf_new_cflags=
2270 cf_new_cppflags=
2271 cf_new_extra_cppflags=
2272
2273 for cf_add_cflags in $cf_flags
2274 do
2275 case $cf_fix_cppflags in
2276 no)
2277         case $cf_add_cflags in #(vi
2278         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2279                 case $cf_add_cflags in
2280                 -D*)
2281                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282
2283                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2284                                 && test -z "${cf_tst_cflags}" \
2285                                 && cf_fix_cppflags=yes
2286
2287                         if test $cf_fix_cppflags = yes ; then
2288                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2289                                 continue
2290                         elif test "${cf_tst_cflags}" = "\"'" ; then
2291                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2292                                 continue
2293                         fi
2294                         ;;
2295                 esac
2296                 case "$CPPFLAGS" in
2297                 *$cf_add_cflags) #(vi
2298                         ;;
2299                 *) #(vi
2300                         case $cf_add_cflags in #(vi
2301                         -D*)
2302                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2303
2304 CPPFLAGS=`echo "$CPPFLAGS" | \
2305         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2306                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2307
2308                                 ;;
2309                         esac
2310                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2311                         ;;
2312                 esac
2313                 ;;
2314         *)
2315                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2316                 ;;
2317         esac
2318         ;;
2319 yes)
2320         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2321
2322         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2323
2324         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2325                 && test -z "${cf_tst_cflags}" \
2326                 && cf_fix_cppflags=no
2327         ;;
2328 esac
2329 done
2330
2331 if test -n "$cf_new_cflags" ; then
2332
2333         CFLAGS="$CFLAGS $cf_new_cflags"
2334 fi
2335
2336 if test -n "$cf_new_cppflags" ; then
2337
2338         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2339 fi
2340
2341 if test -n "$cf_new_extra_cppflags" ; then
2342
2343         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2344 fi
2345
2346         ;;
2347 *)
2348         echo "$as_me:2348: result: ok" >&5
2349 echo "${ECHO_T}ok" >&6
2350         ;;
2351 esac
2352
2353 echo "$as_me:2353: checking for ${CC:-cc} option to accept ANSI C" >&5
2354 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2355 if test "${cf_cv_ansi_cc+set}" = set; then
2356   echo $ECHO_N "(cached) $ECHO_C" >&6
2357 else
2358
2359 cf_cv_ansi_cc=no
2360 cf_save_CFLAGS="$CFLAGS"
2361 cf_save_CPPFLAGS="$CPPFLAGS"
2362 # Don't try gcc -ansi; that turns off useful extensions and
2363 # breaks some systems' header files.
2364 # AIX                   -qlanglvl=ansi
2365 # Ultrix and OSF/1      -std1
2366 # HP-UX                 -Aa -D_HPUX_SOURCE
2367 # SVR4                  -Xc
2368 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2369 for cf_arg in "-DCC_HAS_PROTOS" \
2370         "" \
2371         -qlanglvl=ansi \
2372         -std1 \
2373         -Ae \
2374         "-Aa -D_HPUX_SOURCE" \
2375         -Xc
2376 do
2377
2378 cf_fix_cppflags=no
2379 cf_new_cflags=
2380 cf_new_cppflags=
2381 cf_new_extra_cppflags=
2382
2383 for cf_add_cflags in $cf_arg
2384 do
2385 case $cf_fix_cppflags in
2386 no)
2387         case $cf_add_cflags in #(vi
2388         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2389                 case $cf_add_cflags in
2390                 -D*)
2391                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2392
2393                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2394                                 && test -z "${cf_tst_cflags}" \
2395                                 && cf_fix_cppflags=yes
2396
2397                         if test $cf_fix_cppflags = yes ; then
2398                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2399                                 continue
2400                         elif test "${cf_tst_cflags}" = "\"'" ; then
2401                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2402                                 continue
2403                         fi
2404                         ;;
2405                 esac
2406                 case "$CPPFLAGS" in
2407                 *$cf_add_cflags) #(vi
2408                         ;;
2409                 *) #(vi
2410                         case $cf_add_cflags in #(vi
2411                         -D*)
2412                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2413
2414 CPPFLAGS=`echo "$CPPFLAGS" | \
2415         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2416                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2417
2418                                 ;;
2419                         esac
2420                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2421                         ;;
2422                 esac
2423                 ;;
2424         *)
2425                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2426                 ;;
2427         esac
2428         ;;
2429 yes)
2430         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2431
2432         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2433
2434         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2435                 && test -z "${cf_tst_cflags}" \
2436                 && cf_fix_cppflags=no
2437         ;;
2438 esac
2439 done
2440
2441 if test -n "$cf_new_cflags" ; then
2442
2443         CFLAGS="$CFLAGS $cf_new_cflags"
2444 fi
2445
2446 if test -n "$cf_new_cppflags" ; then
2447
2448         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2449 fi
2450
2451 if test -n "$cf_new_extra_cppflags" ; then
2452
2453         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2454 fi
2455
2456         cat >conftest.$ac_ext <<_ACEOF
2457 #line 2457 "configure"
2458 #include "confdefs.h"
2459
2460 #ifndef CC_HAS_PROTOS
2461 #if !defined(__STDC__) || (__STDC__ != 1)
2462 choke me
2463 #endif
2464 #endif
2465
2466 int
2467 main ()
2468 {
2469
2470         int test (int i, double x);
2471         struct s1 {int (*f) (int a);};
2472         struct s2 {int (*f) (double a);};
2473   ;
2474   return 0;
2475 }
2476 _ACEOF
2477 rm -f conftest.$ac_objext
2478 if { (eval echo "$as_me:2478: \"$ac_compile\"") >&5
2479   (eval $ac_compile) 2>&5
2480   ac_status=$?
2481   echo "$as_me:2481: \$? = $ac_status" >&5
2482   (exit $ac_status); } &&
2483          { ac_try='test -s conftest.$ac_objext'
2484   { (eval echo "$as_me:2484: \"$ac_try\"") >&5
2485   (eval $ac_try) 2>&5
2486   ac_status=$?
2487   echo "$as_me:2487: \$? = $ac_status" >&5
2488   (exit $ac_status); }; }; then
2489   cf_cv_ansi_cc="$cf_arg"; break
2490 else
2491   echo "$as_me: failed program was:" >&5
2492 cat conftest.$ac_ext >&5
2493 fi
2494 rm -f conftest.$ac_objext conftest.$ac_ext
2495 done
2496 CFLAGS="$cf_save_CFLAGS"
2497 CPPFLAGS="$cf_save_CPPFLAGS"
2498
2499 fi
2500 echo "$as_me:2500: result: $cf_cv_ansi_cc" >&5
2501 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2502
2503 if test "$cf_cv_ansi_cc" != "no"; then
2504 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2505
2506 cf_fix_cppflags=no
2507 cf_new_cflags=
2508 cf_new_cppflags=
2509 cf_new_extra_cppflags=
2510
2511 for cf_add_cflags in $cf_cv_ansi_cc
2512 do
2513 case $cf_fix_cppflags in
2514 no)
2515         case $cf_add_cflags in #(vi
2516         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2517                 case $cf_add_cflags in
2518                 -D*)
2519                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2520
2521                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2522                                 && test -z "${cf_tst_cflags}" \
2523                                 && cf_fix_cppflags=yes
2524
2525                         if test $cf_fix_cppflags = yes ; then
2526                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2527                                 continue
2528                         elif test "${cf_tst_cflags}" = "\"'" ; then
2529                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2530                                 continue
2531                         fi
2532                         ;;
2533                 esac
2534                 case "$CPPFLAGS" in
2535                 *$cf_add_cflags) #(vi
2536                         ;;
2537                 *) #(vi
2538                         case $cf_add_cflags in #(vi
2539                         -D*)
2540                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2541
2542 CPPFLAGS=`echo "$CPPFLAGS" | \
2543         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2544                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2545
2546                                 ;;
2547                         esac
2548                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2549                         ;;
2550                 esac
2551                 ;;
2552         *)
2553                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2554                 ;;
2555         esac
2556         ;;
2557 yes)
2558         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2559
2560         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2561
2562         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2563                 && test -z "${cf_tst_cflags}" \
2564                 && cf_fix_cppflags=no
2565         ;;
2566 esac
2567 done
2568
2569 if test -n "$cf_new_cflags" ; then
2570
2571         CFLAGS="$CFLAGS $cf_new_cflags"
2572 fi
2573
2574 if test -n "$cf_new_cppflags" ; then
2575
2576         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2577 fi
2578
2579 if test -n "$cf_new_extra_cppflags" ; then
2580
2581         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2582 fi
2583
2584 else
2585         cat >>confdefs.h <<\EOF
2586 #define CC_HAS_PROTOS 1
2587 EOF
2588
2589 fi
2590 fi
2591
2592 if test "$cf_cv_ansi_cc" = "no"; then
2593         { { echo "$as_me:2593: error: Your compiler does not appear to recognize prototypes.
2594 You have the following choices:
2595         a. adjust your compiler options
2596         b. get an up-to-date compiler
2597         c. use a wrapper such as unproto" >&5
2598 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2599 You have the following choices:
2600         a. adjust your compiler options
2601         b. get an up-to-date compiler
2602         c. use a wrapper such as unproto" >&2;}
2603    { (exit 1); exit 1; }; }
2604 fi
2605
2606 case $cf_cv_system_name in
2607 os2*)
2608     CFLAGS="$CFLAGS -Zmt"
2609     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2610     CXXFLAGS="$CXXFLAGS -Zmt"
2611     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2612     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2613     ac_cv_exeext=.exe
2614     ;;
2615 esac
2616
2617 PROG_EXT="$EXEEXT"
2618
2619 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2620 #define PROG_EXT "$PROG_EXT"
2621 EOF
2622
2623 if test "$cross_compiling" = yes ; then
2624   LDCONFIG=:
2625 else
2626 case "$cf_cv_system_name" in #(vi
2627 dragonfly*|mirbsd*|freebsd*) #(vi
2628   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2629   ;;
2630 *) LDPATH=$PATH:/sbin:/usr/sbin
2631   # Extract the first word of "ldconfig", so it can be a program name with args.
2632 set dummy ldconfig; ac_word=$2
2633 echo "$as_me:2633: checking for $ac_word" >&5
2634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2635 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2636   echo $ECHO_N "(cached) $ECHO_C" >&6
2637 else
2638   case $LDCONFIG in
2639   [\\/]* | ?:[\\/]*)
2640   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2641   ;;
2642   *)
2643   ac_save_IFS=$IFS; IFS=$ac_path_separator
2644 ac_dummy="$LDPATH"
2645 for ac_dir in $ac_dummy; do
2646   IFS=$ac_save_IFS
2647   test -z "$ac_dir" && ac_dir=.
2648   if $as_executable_p "$ac_dir/$ac_word"; then
2649    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2650    echo "$as_me:2650: found $ac_dir/$ac_word" >&5
2651    break
2652 fi
2653 done
2654
2655   ;;
2656 esac
2657 fi
2658 LDCONFIG=$ac_cv_path_LDCONFIG
2659
2660 if test -n "$LDCONFIG"; then
2661   echo "$as_me:2661: result: $LDCONFIG" >&5
2662 echo "${ECHO_T}$LDCONFIG" >&6
2663 else
2664   echo "$as_me:2664: result: no" >&5
2665 echo "${ECHO_T}no" >&6
2666 fi
2667
2668   ;;
2669 esac
2670 fi
2671
2672 echo "$as_me:2672: checking if you want to ensure bool is consistent with C++" >&5
2673 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2674
2675 # Check whether --with-cxx or --without-cxx was given.
2676 if test "${with_cxx+set}" = set; then
2677   withval="$with_cxx"
2678   cf_with_cxx=$withval
2679 else
2680   cf_with_cxx=yes
2681 fi;
2682 echo "$as_me:2682: result: $cf_with_cxx" >&5
2683 echo "${ECHO_T}$cf_with_cxx" >&6
2684 if test "X$cf_with_cxx" = Xno ; then
2685         CXX=""
2686         GXX=""
2687 else
2688         # with autoconf 2.13, we can change the error to a warning:
2689                 ac_ext=cc
2690 ac_cpp='$CXXCPP $CPPFLAGS'
2691 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2692 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2693 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2694 ac_main_return=return
2695 if test -n "$ac_tool_prefix"; then
2696   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2697   do
2698     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2699 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2700 echo "$as_me:2700: checking for $ac_word" >&5
2701 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2702 if test "${ac_cv_prog_CXX+set}" = set; then
2703   echo $ECHO_N "(cached) $ECHO_C" >&6
2704 else
2705   if test -n "$CXX"; then
2706   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2707 else
2708   ac_save_IFS=$IFS; IFS=$ac_path_separator
2709 ac_dummy="$PATH"
2710 for ac_dir in $ac_dummy; do
2711   IFS=$ac_save_IFS
2712   test -z "$ac_dir" && ac_dir=.
2713   $as_executable_p "$ac_dir/$ac_word" || continue
2714 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2715 echo "$as_me:2715: found $ac_dir/$ac_word" >&5
2716 break
2717 done
2718
2719 fi
2720 fi
2721 CXX=$ac_cv_prog_CXX
2722 if test -n "$CXX"; then
2723   echo "$as_me:2723: result: $CXX" >&5
2724 echo "${ECHO_T}$CXX" >&6
2725 else
2726   echo "$as_me:2726: result: no" >&5
2727 echo "${ECHO_T}no" >&6
2728 fi
2729
2730     test -n "$CXX" && break
2731   done
2732 fi
2733 if test -z "$CXX"; then
2734   ac_ct_CXX=$CXX
2735   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2736 do
2737   # Extract the first word of "$ac_prog", so it can be a program name with args.
2738 set dummy $ac_prog; ac_word=$2
2739 echo "$as_me:2739: checking for $ac_word" >&5
2740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2741 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2742   echo $ECHO_N "(cached) $ECHO_C" >&6
2743 else
2744   if test -n "$ac_ct_CXX"; then
2745   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2746 else
2747   ac_save_IFS=$IFS; IFS=$ac_path_separator
2748 ac_dummy="$PATH"
2749 for ac_dir in $ac_dummy; do
2750   IFS=$ac_save_IFS
2751   test -z "$ac_dir" && ac_dir=.
2752   $as_executable_p "$ac_dir/$ac_word" || continue
2753 ac_cv_prog_ac_ct_CXX="$ac_prog"
2754 echo "$as_me:2754: found $ac_dir/$ac_word" >&5
2755 break
2756 done
2757
2758 fi
2759 fi
2760 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2761 if test -n "$ac_ct_CXX"; then
2762   echo "$as_me:2762: result: $ac_ct_CXX" >&5
2763 echo "${ECHO_T}$ac_ct_CXX" >&6
2764 else
2765   echo "$as_me:2765: result: no" >&5
2766 echo "${ECHO_T}no" >&6
2767 fi
2768
2769   test -n "$ac_ct_CXX" && break
2770 done
2771 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2772
2773   CXX=$ac_ct_CXX
2774 fi
2775
2776 # Provide some information about the compiler.
2777 echo "$as_me:2777:" \
2778      "checking for C++ compiler version" >&5
2779 ac_compiler=`set X $ac_compile; echo $2`
2780 { (eval echo "$as_me:2780: \"$ac_compiler --version </dev/null >&5\"") >&5
2781   (eval $ac_compiler --version </dev/null >&5) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); }
2785 { (eval echo "$as_me:2785: \"$ac_compiler -v </dev/null >&5\"") >&5
2786   (eval $ac_compiler -v </dev/null >&5) 2>&5
2787   ac_status=$?
2788   echo "$as_me:2788: \$? = $ac_status" >&5
2789   (exit $ac_status); }
2790 { (eval echo "$as_me:2790: \"$ac_compiler -V </dev/null >&5\"") >&5
2791   (eval $ac_compiler -V </dev/null >&5) 2>&5
2792   ac_status=$?
2793   echo "$as_me:2793: \$? = $ac_status" >&5
2794   (exit $ac_status); }
2795
2796 echo "$as_me:2796: checking whether we are using the GNU C++ compiler" >&5
2797 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2798 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2799   echo $ECHO_N "(cached) $ECHO_C" >&6
2800 else
2801   cat >conftest.$ac_ext <<_ACEOF
2802 #line 2802 "configure"
2803 #include "confdefs.h"
2804
2805 int
2806 main ()
2807 {
2808 #ifndef __GNUC__
2809        choke me
2810 #endif
2811
2812   ;
2813   return 0;
2814 }
2815 _ACEOF
2816 rm -f conftest.$ac_objext
2817 if { (eval echo "$as_me:2817: \"$ac_compile\"") >&5
2818   (eval $ac_compile) 2>&5
2819   ac_status=$?
2820   echo "$as_me:2820: \$? = $ac_status" >&5
2821   (exit $ac_status); } &&
2822          { ac_try='test -s conftest.$ac_objext'
2823   { (eval echo "$as_me:2823: \"$ac_try\"") >&5
2824   (eval $ac_try) 2>&5
2825   ac_status=$?
2826   echo "$as_me:2826: \$? = $ac_status" >&5
2827   (exit $ac_status); }; }; then
2828   ac_compiler_gnu=yes
2829 else
2830   echo "$as_me: failed program was:" >&5
2831 cat conftest.$ac_ext >&5
2832 ac_compiler_gnu=no
2833 fi
2834 rm -f conftest.$ac_objext conftest.$ac_ext
2835 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2836
2837 fi
2838 echo "$as_me:2838: result: $ac_cv_cxx_compiler_gnu" >&5
2839 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2840 GXX=`test $ac_compiler_gnu = yes && echo yes`
2841 ac_test_CXXFLAGS=${CXXFLAGS+set}
2842 ac_save_CXXFLAGS=$CXXFLAGS
2843 CXXFLAGS="-g"
2844 echo "$as_me:2844: checking whether $CXX accepts -g" >&5
2845 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2846 if test "${ac_cv_prog_cxx_g+set}" = set; then
2847   echo $ECHO_N "(cached) $ECHO_C" >&6
2848 else
2849   cat >conftest.$ac_ext <<_ACEOF
2850 #line 2850 "configure"
2851 #include "confdefs.h"
2852
2853 int
2854 main ()
2855 {
2856
2857   ;
2858   return 0;
2859 }
2860 _ACEOF
2861 rm -f conftest.$ac_objext
2862 if { (eval echo "$as_me:2862: \"$ac_compile\"") >&5
2863   (eval $ac_compile) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); } &&
2867          { ac_try='test -s conftest.$ac_objext'
2868   { (eval echo "$as_me:2868: \"$ac_try\"") >&5
2869   (eval $ac_try) 2>&5
2870   ac_status=$?
2871   echo "$as_me:2871: \$? = $ac_status" >&5
2872   (exit $ac_status); }; }; then
2873   ac_cv_prog_cxx_g=yes
2874 else
2875   echo "$as_me: failed program was:" >&5
2876 cat conftest.$ac_ext >&5
2877 ac_cv_prog_cxx_g=no
2878 fi
2879 rm -f conftest.$ac_objext conftest.$ac_ext
2880 fi
2881 echo "$as_me:2881: result: $ac_cv_prog_cxx_g" >&5
2882 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2883 if test "$ac_test_CXXFLAGS" = set; then
2884   CXXFLAGS=$ac_save_CXXFLAGS
2885 elif test $ac_cv_prog_cxx_g = yes; then
2886   if test "$GXX" = yes; then
2887     CXXFLAGS="-g -O2"
2888   else
2889     CXXFLAGS="-g"
2890   fi
2891 else
2892   if test "$GXX" = yes; then
2893     CXXFLAGS="-O2"
2894   else
2895     CXXFLAGS=
2896   fi
2897 fi
2898 for ac_declaration in \
2899    ''\
2900    '#include <stdlib.h>' \
2901    'extern "C" void std::exit (int) throw (); using std::exit;' \
2902    'extern "C" void std::exit (int); using std::exit;' \
2903    'extern "C" void exit (int) throw ();' \
2904    'extern "C" void exit (int);' \
2905    'void exit (int);'
2906 do
2907   cat >conftest.$ac_ext <<_ACEOF
2908 #line 2908 "configure"
2909 #include "confdefs.h"
2910 #include <stdlib.h>
2911 $ac_declaration
2912 int
2913 main ()
2914 {
2915 exit (42);
2916   ;
2917   return 0;
2918 }
2919 _ACEOF
2920 rm -f conftest.$ac_objext
2921 if { (eval echo "$as_me:2921: \"$ac_compile\"") >&5
2922   (eval $ac_compile) 2>&5
2923   ac_status=$?
2924   echo "$as_me:2924: \$? = $ac_status" >&5
2925   (exit $ac_status); } &&
2926          { ac_try='test -s conftest.$ac_objext'
2927   { (eval echo "$as_me:2927: \"$ac_try\"") >&5
2928   (eval $ac_try) 2>&5
2929   ac_status=$?
2930   echo "$as_me:2930: \$? = $ac_status" >&5
2931   (exit $ac_status); }; }; then
2932   :
2933 else
2934   echo "$as_me: failed program was:" >&5
2935 cat conftest.$ac_ext >&5
2936 continue
2937 fi
2938 rm -f conftest.$ac_objext conftest.$ac_ext
2939   cat >conftest.$ac_ext <<_ACEOF
2940 #line 2940 "configure"
2941 #include "confdefs.h"
2942 $ac_declaration
2943 int
2944 main ()
2945 {
2946 exit (42);
2947   ;
2948   return 0;
2949 }
2950 _ACEOF
2951 rm -f conftest.$ac_objext
2952 if { (eval echo "$as_me:2952: \"$ac_compile\"") >&5
2953   (eval $ac_compile) 2>&5
2954   ac_status=$?
2955   echo "$as_me:2955: \$? = $ac_status" >&5
2956   (exit $ac_status); } &&
2957          { ac_try='test -s conftest.$ac_objext'
2958   { (eval echo "$as_me:2958: \"$ac_try\"") >&5
2959   (eval $ac_try) 2>&5
2960   ac_status=$?
2961   echo "$as_me:2961: \$? = $ac_status" >&5
2962   (exit $ac_status); }; }; then
2963   break
2964 else
2965   echo "$as_me: failed program was:" >&5
2966 cat conftest.$ac_ext >&5
2967 fi
2968 rm -f conftest.$ac_objext conftest.$ac_ext
2969 done
2970 rm -rf conftest*
2971 if test -n "$ac_declaration"; then
2972   echo '#ifdef __cplusplus' >>confdefs.h
2973   echo $ac_declaration      >>confdefs.h
2974   echo '#endif'             >>confdefs.h
2975 fi
2976
2977 ac_ext=c
2978 ac_cpp='$CPP $CPPFLAGS'
2979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2982 ac_main_return=return
2983
2984                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2985         if test "$CXX" = "g++" ; then
2986                 # Extract the first word of "g++", so it can be a program name with args.
2987 set dummy g++; ac_word=$2
2988 echo "$as_me:2988: checking for $ac_word" >&5
2989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2990 if test "${ac_cv_path_CXX+set}" = set; then
2991   echo $ECHO_N "(cached) $ECHO_C" >&6
2992 else
2993   case $CXX in
2994   [\\/]* | ?:[\\/]*)
2995   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2996   ;;
2997   *)
2998   ac_save_IFS=$IFS; IFS=$ac_path_separator
2999 ac_dummy="$PATH"
3000 for ac_dir in $ac_dummy; do
3001   IFS=$ac_save_IFS
3002   test -z "$ac_dir" && ac_dir=.
3003   if $as_executable_p "$ac_dir/$ac_word"; then
3004    ac_cv_path_CXX="$ac_dir/$ac_word"
3005    echo "$as_me:3005: found $ac_dir/$ac_word" >&5
3006    break
3007 fi
3008 done
3009
3010   ;;
3011 esac
3012 fi
3013 CXX=$ac_cv_path_CXX
3014
3015 if test -n "$CXX"; then
3016   echo "$as_me:3016: result: $CXX" >&5
3017 echo "${ECHO_T}$CXX" >&6
3018 else
3019   echo "$as_me:3019: result: no" >&5
3020 echo "${ECHO_T}no" >&6
3021 fi
3022
3023         fi
3024         case "x$CXX" in #(vi
3025         x|xg++)
3026                 { echo "$as_me:3026: WARNING: You don't have any C++ compiler, too bad" >&5
3027 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3028                 cf_with_cxx=no; CXX=""; GXX="";
3029                 ;;
3030         esac
3031 fi
3032
3033 GXX_VERSION=none
3034 if test "$GXX" = yes; then
3035         echo "$as_me:3035: checking version of ${CXX:-g++}" >&5
3036 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3037         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3038         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3039         echo "$as_me:3039: result: $GXX_VERSION" >&5
3040 echo "${ECHO_T}$GXX_VERSION" >&6
3041 fi
3042
3043 case $GXX_VERSION in
3044 1*|2.[0-6]*)
3045         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3046         # cf_cxx_library=no
3047         { echo "$as_me:3047: WARNING: templates do not work" >&5
3048 echo "$as_me: WARNING: templates do not work" >&2;}
3049         ;;
3050 esac
3051
3052 echo "$as_me:3052: checking if you want to build C++ binding and demo" >&5
3053 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3054
3055 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3056 if test "${with_cxx_binding+set}" = set; then
3057   withval="$with_cxx_binding"
3058   cf_with_cxx_binding=$withval
3059 else
3060   cf_with_cxx_binding=$cf_with_cxx
3061 fi;
3062 echo "$as_me:3062: result: $cf_with_cxx_binding" >&5
3063 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3064
3065 echo "$as_me:3065: checking if you want to build with Ada95" >&5
3066 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3067 echo "$as_me:3067: result: $cf_with_ada" >&5
3068 echo "${ECHO_T}$cf_with_ada" >&6
3069
3070 echo "$as_me:3070: checking if you want to install manpages" >&5
3071 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3072
3073 # Check whether --with-manpages or --without-manpages was given.
3074 if test "${with_manpages+set}" = set; then
3075   withval="$with_manpages"
3076   cf_with_manpages=$withval
3077 else
3078   cf_with_manpages=yes
3079 fi;
3080 echo "$as_me:3080: result: $cf_with_manpages" >&5
3081 echo "${ECHO_T}$cf_with_manpages" >&6
3082
3083 echo "$as_me:3083: checking if you want to build programs such as tic" >&5
3084 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3085
3086 # Check whether --with-progs or --without-progs was given.
3087 if test "${with_progs+set}" = set; then
3088   withval="$with_progs"
3089   cf_with_progs=$withval
3090 else
3091   cf_with_progs=yes
3092 fi;
3093 echo "$as_me:3093: result: $cf_with_progs" >&5
3094 echo "${ECHO_T}$cf_with_progs" >&6
3095
3096 echo "$as_me:3096: checking if you want to build test-programs" >&5
3097 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3098
3099 # Check whether --with-tests or --without-tests was given.
3100 if test "${with_tests+set}" = set; then
3101   withval="$with_tests"
3102   cf_with_tests=$withval
3103 else
3104   cf_with_tests=yes
3105 fi;
3106 echo "$as_me:3106: result: $cf_with_tests" >&5
3107 echo "${ECHO_T}$cf_with_tests" >&6
3108
3109 echo "$as_me:3109: checking if you wish to install curses.h" >&5
3110 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3111
3112 # Check whether --with-curses-h or --without-curses-h was given.
3113 if test "${with_curses_h+set}" = set; then
3114   withval="$with_curses_h"
3115   with_curses_h=$withval
3116 else
3117   with_curses_h=yes
3118 fi;
3119 echo "$as_me:3119: result: $with_curses_h" >&5
3120 echo "${ECHO_T}$with_curses_h" >&6
3121
3122 modules_to_build="ncurses"
3123 if test "X$cf_with_progs" != Xno ; then
3124 modules_to_build="$modules_to_build progs tack"
3125 fi
3126 modules_to_build="$modules_to_build panel menu form"
3127
3128 test "$program_prefix" != NONE &&
3129   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3130 # Use a double $ so make ignores it.
3131 test "$program_suffix" != NONE &&
3132   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3133 # Double any \ or $.  echo might interpret backslashes.
3134 # By default was `s,x,x', remove it if useless.
3135 cat <<\_ACEOF >conftest.sed
3136 s/[\\$]/&&/g;s/;s,x,x,$//
3137 _ACEOF
3138 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3139 rm conftest.sed
3140
3141 for ac_prog in mawk gawk nawk awk
3142 do
3143   # Extract the first word of "$ac_prog", so it can be a program name with args.
3144 set dummy $ac_prog; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_prog_AWK+set}" = set; then
3148   echo $ECHO_N "(cached) $ECHO_C" >&6
3149 else
3150   if test -n "$AWK"; then
3151   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3152 else
3153   ac_save_IFS=$IFS; IFS=$ac_path_separator
3154 ac_dummy="$PATH"
3155 for ac_dir in $ac_dummy; do
3156   IFS=$ac_save_IFS
3157   test -z "$ac_dir" && ac_dir=.
3158   $as_executable_p "$ac_dir/$ac_word" || continue
3159 ac_cv_prog_AWK="$ac_prog"
3160 echo "$as_me:3160: found $ac_dir/$ac_word" >&5
3161 break
3162 done
3163
3164 fi
3165 fi
3166 AWK=$ac_cv_prog_AWK
3167 if test -n "$AWK"; then
3168   echo "$as_me:3168: result: $AWK" >&5
3169 echo "${ECHO_T}$AWK" >&6
3170 else
3171   echo "$as_me:3171: result: no" >&5
3172 echo "${ECHO_T}no" >&6
3173 fi
3174
3175   test -n "$AWK" && break
3176 done
3177
3178 test -z "$AWK" && { { echo "$as_me:3178: error: No awk program found" >&5
3179 echo "$as_me: error: No awk program found" >&2;}
3180    { (exit 1); exit 1; }; }
3181
3182 echo "$as_me:3182: checking for egrep" >&5
3183 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3184 if test "${ac_cv_prog_egrep+set}" = set; then
3185   echo $ECHO_N "(cached) $ECHO_C" >&6
3186 else
3187   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3188     then ac_cv_prog_egrep='grep -E'
3189     else ac_cv_prog_egrep='egrep'
3190     fi
3191 fi
3192 echo "$as_me:3192: result: $ac_cv_prog_egrep" >&5
3193 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3194  EGREP=$ac_cv_prog_egrep
3195
3196 test -z "$EGREP" && { { echo "$as_me:3196: error: No egrep program found" >&5
3197 echo "$as_me: error: No egrep program found" >&2;}
3198    { (exit 1); exit 1; }; }
3199
3200 # Find a good install program.  We prefer a C program (faster),
3201 # so one script is as good as another.  But avoid the broken or
3202 # incompatible versions:
3203 # SysV /etc/install, /usr/sbin/install
3204 # SunOS /usr/etc/install
3205 # IRIX /sbin/install
3206 # AIX /bin/install
3207 # AmigaOS /C/install, which installs bootblocks on floppy discs
3208 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3209 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3210 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3211 # ./install, which can be erroneously created by make from ./install.sh.
3212 echo "$as_me:3212: checking for a BSD compatible install" >&5
3213 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3214 if test -z "$INSTALL"; then
3215 if test "${ac_cv_path_install+set}" = set; then
3216   echo $ECHO_N "(cached) $ECHO_C" >&6
3217 else
3218     ac_save_IFS=$IFS; IFS=$ac_path_separator
3219   for ac_dir in $PATH; do
3220     IFS=$ac_save_IFS
3221     # Account for people who put trailing slashes in PATH elements.
3222     case $ac_dir/ in
3223     / | ./ | .// | /cC/* \
3224     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3225     | /usr/ucb/* ) ;;
3226     *)
3227       # OSF1 and SCO ODT 3.0 have their own names for install.
3228       # Don't use installbsd from OSF since it installs stuff as root
3229       # by default.
3230       for ac_prog in ginstall scoinst install; do
3231         if $as_executable_p "$ac_dir/$ac_prog"; then
3232           if test $ac_prog = install &&
3233             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3234             # AIX install.  It has an incompatible calling convention.
3235             :
3236           elif test $ac_prog = install &&
3237             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3238             # program-specific install script used by HP pwplus--don't use.
3239             :
3240           else
3241             ac_cv_path_install="$ac_dir/$ac_prog -c"
3242             break 2
3243           fi
3244         fi
3245       done
3246       ;;
3247     esac
3248   done
3249
3250 fi
3251   if test "${ac_cv_path_install+set}" = set; then
3252     INSTALL=$ac_cv_path_install
3253   else
3254     # As a last resort, use the slow shell script.  We don't cache a
3255     # path for INSTALL within a source directory, because that will
3256     # break other packages using the cache if that directory is
3257     # removed, or if the path is relative.
3258     INSTALL=$ac_install_sh
3259   fi
3260 fi
3261 echo "$as_me:3261: result: $INSTALL" >&5
3262 echo "${ECHO_T}$INSTALL" >&6
3263
3264 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3265 # It thinks the first close brace ends the variable substitution.
3266 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3267
3268 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3269
3270 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3271
3272 case $INSTALL in
3273 /*)
3274   ;;
3275 *)
3276   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3277   test -z "$cf_dir" && cf_dir=.
3278   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3279   ;;
3280 esac
3281
3282 for ac_prog in tdlint lint alint splint lclint
3283 do
3284   # Extract the first word of "$ac_prog", so it can be a program name with args.
3285 set dummy $ac_prog; ac_word=$2
3286 echo "$as_me:3286: checking for $ac_word" >&5
3287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3288 if test "${ac_cv_prog_LINT+set}" = set; then
3289   echo $ECHO_N "(cached) $ECHO_C" >&6
3290 else
3291   if test -n "$LINT"; then
3292   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3293 else
3294   ac_save_IFS=$IFS; IFS=$ac_path_separator
3295 ac_dummy="$PATH"
3296 for ac_dir in $ac_dummy; do
3297   IFS=$ac_save_IFS
3298   test -z "$ac_dir" && ac_dir=.
3299   $as_executable_p "$ac_dir/$ac_word" || continue
3300 ac_cv_prog_LINT="$ac_prog"
3301 echo "$as_me:3301: found $ac_dir/$ac_word" >&5
3302 break
3303 done
3304
3305 fi
3306 fi
3307 LINT=$ac_cv_prog_LINT
3308 if test -n "$LINT"; then
3309   echo "$as_me:3309: result: $LINT" >&5
3310 echo "${ECHO_T}$LINT" >&6
3311 else
3312   echo "$as_me:3312: result: no" >&5
3313 echo "${ECHO_T}no" >&6
3314 fi
3315
3316   test -n "$LINT" && break
3317 done
3318
3319 echo "$as_me:3319: checking whether ln -s works" >&5
3320 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3321 LN_S=$as_ln_s
3322 if test "$LN_S" = "ln -s"; then
3323   echo "$as_me:3323: result: yes" >&5
3324 echo "${ECHO_T}yes" >&6
3325 else
3326   echo "$as_me:3326: result: no, using $LN_S" >&5
3327 echo "${ECHO_T}no, using $LN_S" >&6
3328 fi
3329
3330 echo "$as_me:3330: checking if $LN_S -f options work" >&5
3331 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3332
3333 rm -f conf$$.src conf$$dst
3334 echo >conf$$.dst
3335 echo first >conf$$.src
3336 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3337         cf_prog_ln_sf=yes
3338 else
3339         cf_prog_ln_sf=no
3340 fi
3341 rm -f conf$$.dst conf$$src
3342 echo "$as_me:3342: result: $cf_prog_ln_sf" >&5
3343 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3344
3345 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3346
3347 echo "$as_me:3347: checking for long file names" >&5
3348 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3349 if test "${ac_cv_sys_long_file_names+set}" = set; then
3350   echo $ECHO_N "(cached) $ECHO_C" >&6
3351 else
3352   ac_cv_sys_long_file_names=yes
3353 # Test for long file names in all the places we know might matter:
3354 #      .                the current directory, where building will happen
3355 #      $prefix/lib      where we will be installing things
3356 #      $exec_prefix/lib likewise
3357 # eval it to expand exec_prefix.
3358 #      $TMPDIR          if set, where it might want to write temporary files
3359 # if $TMPDIR is not set:
3360 #      /tmp             where it might want to write temporary files
3361 #      /var/tmp         likewise
3362 #      /usr/tmp         likewise
3363 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3364   ac_tmpdirs=$TMPDIR
3365 else
3366   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3367 fi
3368 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3369   test -d $ac_dir || continue
3370   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3371   ac_xdir=$ac_dir/cf$$
3372   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3373   ac_tf1=$ac_xdir/conftest9012345
3374   ac_tf2=$ac_xdir/conftest9012346
3375   (echo 1 >$ac_tf1) 2>/dev/null
3376   (echo 2 >$ac_tf2) 2>/dev/null
3377   ac_val=`cat $ac_tf1 2>/dev/null`
3378   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3379     ac_cv_sys_long_file_names=no
3380     rm -rf $ac_xdir 2>/dev/null
3381     break
3382   fi
3383   rm -rf $ac_xdir 2>/dev/null
3384 done
3385 fi
3386 echo "$as_me:3386: result: $ac_cv_sys_long_file_names" >&5
3387 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3388 if test $ac_cv_sys_long_file_names = yes; then
3389
3390 cat >>confdefs.h <<\EOF
3391 #define HAVE_LONG_FILE_NAMES 1
3392 EOF
3393
3394 fi
3395
3396 # if we find pkg-config, check if we should install the ".pc" files.
3397
3398 echo "$as_me:3398: checking if you want to use pkg-config" >&5
3399 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3400
3401 # Check whether --with-pkg-config or --without-pkg-config was given.
3402 if test "${with_pkg_config+set}" = set; then
3403   withval="$with_pkg_config"
3404   cf_pkg_config=$withval
3405 else
3406   cf_pkg_config=yes
3407 fi;
3408 echo "$as_me:3408: result: $cf_pkg_config" >&5
3409 echo "${ECHO_T}$cf_pkg_config" >&6
3410
3411 case $cf_pkg_config in #(vi
3412 no) #(vi
3413         PKG_CONFIG=none
3414         ;;
3415 yes) #(vi
3416
3417 if test -n "$ac_tool_prefix"; then
3418   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3419 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3420 echo "$as_me:3420: checking for $ac_word" >&5
3421 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3422 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3423   echo $ECHO_N "(cached) $ECHO_C" >&6
3424 else
3425   case $PKG_CONFIG in
3426   [\\/]* | ?:[\\/]*)
3427   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3428   ;;
3429   *)
3430   ac_save_IFS=$IFS; IFS=$ac_path_separator
3431 ac_dummy="$PATH"
3432 for ac_dir in $ac_dummy; do
3433   IFS=$ac_save_IFS
3434   test -z "$ac_dir" && ac_dir=.
3435   if $as_executable_p "$ac_dir/$ac_word"; then
3436    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3437    echo "$as_me:3437: found $ac_dir/$ac_word" >&5
3438    break
3439 fi
3440 done
3441
3442   ;;
3443 esac
3444 fi
3445 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3446
3447 if test -n "$PKG_CONFIG"; then
3448   echo "$as_me:3448: result: $PKG_CONFIG" >&5
3449 echo "${ECHO_T}$PKG_CONFIG" >&6
3450 else
3451   echo "$as_me:3451: result: no" >&5
3452 echo "${ECHO_T}no" >&6
3453 fi
3454
3455 fi
3456 if test -z "$ac_cv_path_PKG_CONFIG"; then
3457   ac_pt_PKG_CONFIG=$PKG_CONFIG
3458   # Extract the first word of "pkg-config", so it can be a program name with args.
3459 set dummy pkg-config; ac_word=$2
3460 echo "$as_me:3460: checking for $ac_word" >&5
3461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3462 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3463   echo $ECHO_N "(cached) $ECHO_C" >&6
3464 else
3465   case $ac_pt_PKG_CONFIG in
3466   [\\/]* | ?:[\\/]*)
3467   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3468   ;;
3469   *)
3470   ac_save_IFS=$IFS; IFS=$ac_path_separator
3471 ac_dummy="$PATH"
3472 for ac_dir in $ac_dummy; do
3473   IFS=$ac_save_IFS
3474   test -z "$ac_dir" && ac_dir=.
3475   if $as_executable_p "$ac_dir/$ac_word"; then
3476    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3477    echo "$as_me:3477: found $ac_dir/$ac_word" >&5
3478    break
3479 fi
3480 done
3481
3482   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3483   ;;
3484 esac
3485 fi
3486 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3487
3488 if test -n "$ac_pt_PKG_CONFIG"; then
3489   echo "$as_me:3489: result: $ac_pt_PKG_CONFIG" >&5
3490 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3491 else
3492   echo "$as_me:3492: result: no" >&5
3493 echo "${ECHO_T}no" >&6
3494 fi
3495
3496   PKG_CONFIG=$ac_pt_PKG_CONFIG
3497 else
3498   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3499 fi
3500
3501         ;;
3502 *)
3503         PKG_CONFIG=$withval
3504         ;;
3505 esac
3506
3507 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3508 if test "$PKG_CONFIG" != none ; then
3509
3510 if test "x$prefix" != xNONE; then
3511   cf_path_syntax="$prefix"
3512 else
3513   cf_path_syntax="$ac_default_prefix"
3514 fi
3515
3516 case ".$PKG_CONFIG" in #(vi
3517 .\$\(*\)*|.\'*\'*) #(vi
3518   ;;
3519 ..|./*|.\\*) #(vi
3520   ;;
3521 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3522   ;;
3523 .\${*prefix}*|.\${*dir}*) #(vi
3524   eval PKG_CONFIG="$PKG_CONFIG"
3525   case ".$PKG_CONFIG" in #(vi
3526   .NONE/*)
3527     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3528     ;;
3529   esac
3530   ;; #(vi
3531 .no|.NONE/*)
3532   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3533   ;;
3534 *)
3535   { { echo "$as_me:3535: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3536 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3537    { (exit 1); exit 1; }; }
3538   ;;
3539 esac
3540
3541 fi
3542
3543 if test "$PKG_CONFIG" != none ; then
3544         echo "$as_me:3544: checking for $PKG_CONFIG library directory" >&5
3545 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3546
3547 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3548 if test "${with_pkg_config_libdir+set}" = set; then
3549   withval="$with_pkg_config_libdir"
3550   PKG_CONFIG_LIBDIR=$withval
3551 else
3552   PKG_CONFIG_LIBDIR=yes
3553 fi;
3554
3555         case x$PKG_CONFIG_LIBDIR in #(vi
3556         x/*) #(vi
3557                 ;;
3558         xyes) #(vi
3559                 # look for the library directory using the same prefix as the executable
3560                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3561                 case x`(arch) 2>/dev/null` in #(vi
3562                 *64) #(vi
3563                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3564                         do
3565                                 if test -d $cf_config/pkgconfig
3566                                 then
3567                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3568                                         break
3569                                 fi
3570                         done
3571                         ;;
3572                 *)
3573                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3574                         ;;
3575                 esac
3576                 ;;
3577         *)
3578                 ;;
3579         esac
3580
3581         echo "$as_me:3581: result: $PKG_CONFIG_LIBDIR" >&5
3582 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3583 fi
3584
3585 if test "$PKG_CONFIG" != none ; then
3586         echo "$as_me:3586: checking if we should install .pc files for $PKG_CONFIG" >&5
3587 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3588
3589 # Check whether --enable-pc-files or --disable-pc-files was given.
3590 if test "${enable_pc_files+set}" = set; then
3591   enableval="$enable_pc_files"
3592   enable_pc_files=$enableval
3593 else
3594   enable_pc_files=no
3595 fi;
3596         echo "$as_me:3596: result: $enable_pc_files" >&5
3597 echo "${ECHO_T}$enable_pc_files" >&6
3598         if test "$enable_pc_files" != no
3599         then
3600
3601 if test "x$prefix" != xNONE; then
3602   cf_path_syntax="$prefix"
3603 else
3604   cf_path_syntax="$ac_default_prefix"
3605 fi
3606
3607 case ".$PKG_CONFIG_LIBDIR" in #(vi
3608 .\$\(*\)*|.\'*\'*) #(vi
3609   ;;
3610 ..|./*|.\\*) #(vi
3611   ;;
3612 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3613   ;;
3614 .\${*prefix}*|.\${*dir}*) #(vi
3615   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3616   case ".$PKG_CONFIG_LIBDIR" in #(vi
3617   .NONE/*)
3618     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3619     ;;
3620   esac
3621   ;; #(vi
3622 .no|.NONE/*)
3623   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3624   ;;
3625 *)
3626   { { echo "$as_me:3626: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3627 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3628    { (exit 1); exit 1; }; }
3629   ;;
3630 esac
3631
3632         fi
3633 else
3634         enable_pc_files=no
3635 fi
3636
3637 echo "$as_me:3637: checking if we should assume mixed-case filenames" >&5
3638 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3639
3640 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3641 if test "${enable_mixed_case+set}" = set; then
3642   enableval="$enable_mixed_case"
3643   enable_mixedcase=$enableval
3644 else
3645   enable_mixedcase=auto
3646 fi;
3647 echo "$as_me:3647: result: $enable_mixedcase" >&5
3648 echo "${ECHO_T}$enable_mixedcase" >&6
3649 if test "$enable_mixedcase" = "auto" ; then
3650
3651 echo "$as_me:3651: checking if filesystem supports mixed-case filenames" >&5
3652 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3653 if test "${cf_cv_mixedcase+set}" = set; then
3654   echo $ECHO_N "(cached) $ECHO_C" >&6
3655 else
3656
3657 if test "$cross_compiling" = yes ; then
3658         case $target_alias in #(vi
3659         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3660                 cf_cv_mixedcase=no
3661                 ;;
3662         *)
3663                 cf_cv_mixedcase=yes
3664                 ;;
3665         esac
3666 else
3667         rm -f conftest CONFTEST
3668         echo test >conftest
3669         if test -f CONFTEST ; then
3670                 cf_cv_mixedcase=no
3671         else
3672                 cf_cv_mixedcase=yes
3673         fi
3674         rm -f conftest CONFTEST
3675 fi
3676
3677 fi
3678 echo "$as_me:3678: result: $cf_cv_mixedcase" >&5
3679 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3680 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3681 #define MIXEDCASE_FILENAMES 1
3682 EOF
3683
3684 else
3685     cf_cv_mixedcase=$enable_mixedcase
3686     if test "$enable_mixedcase" = "yes" ; then
3687         cat >>confdefs.h <<\EOF
3688 #define MIXEDCASE_FILENAMES 1
3689 EOF
3690
3691     fi
3692 fi
3693
3694 # do this after mixed-case option (tags/TAGS is not as important as tic).
3695 echo "$as_me:3695: checking whether ${MAKE-make} sets \${MAKE}" >&5
3696 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3697 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3698 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3699   echo $ECHO_N "(cached) $ECHO_C" >&6
3700 else
3701   cat >conftest.make <<\EOF
3702 all:
3703         @echo 'ac_maketemp="${MAKE}"'
3704 EOF
3705 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3706 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3707 if test -n "$ac_maketemp"; then
3708   eval ac_cv_prog_make_${ac_make}_set=yes
3709 else
3710   eval ac_cv_prog_make_${ac_make}_set=no
3711 fi
3712 rm -f conftest.make
3713 fi
3714 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3715   echo "$as_me:3715: result: yes" >&5
3716 echo "${ECHO_T}yes" >&6
3717   SET_MAKE=
3718 else
3719   echo "$as_me:3719: result: no" >&5
3720 echo "${ECHO_T}no" >&6
3721   SET_MAKE="MAKE=${MAKE-make}"
3722 fi
3723
3724 for ac_prog in exctags ctags
3725 do
3726   # Extract the first word of "$ac_prog", so it can be a program name with args.
3727 set dummy $ac_prog; ac_word=$2
3728 echo "$as_me:3728: checking for $ac_word" >&5
3729 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3730 if test "${ac_cv_prog_CTAGS+set}" = set; then
3731   echo $ECHO_N "(cached) $ECHO_C" >&6
3732 else
3733   if test -n "$CTAGS"; then
3734   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3735 else
3736   ac_save_IFS=$IFS; IFS=$ac_path_separator
3737 ac_dummy="$PATH"
3738 for ac_dir in $ac_dummy; do
3739   IFS=$ac_save_IFS
3740   test -z "$ac_dir" && ac_dir=.
3741   $as_executable_p "$ac_dir/$ac_word" || continue
3742 ac_cv_prog_CTAGS="$ac_prog"
3743 echo "$as_me:3743: found $ac_dir/$ac_word" >&5
3744 break
3745 done
3746
3747 fi
3748 fi
3749 CTAGS=$ac_cv_prog_CTAGS
3750 if test -n "$CTAGS"; then
3751   echo "$as_me:3751: result: $CTAGS" >&5
3752 echo "${ECHO_T}$CTAGS" >&6
3753 else
3754   echo "$as_me:3754: result: no" >&5
3755 echo "${ECHO_T}no" >&6
3756 fi
3757
3758   test -n "$CTAGS" && break
3759 done
3760
3761 for ac_prog in exetags etags
3762 do
3763   # Extract the first word of "$ac_prog", so it can be a program name with args.
3764 set dummy $ac_prog; ac_word=$2
3765 echo "$as_me:3765: checking for $ac_word" >&5
3766 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3767 if test "${ac_cv_prog_ETAGS+set}" = set; then
3768   echo $ECHO_N "(cached) $ECHO_C" >&6
3769 else
3770   if test -n "$ETAGS"; then
3771   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3772 else
3773   ac_save_IFS=$IFS; IFS=$ac_path_separator
3774 ac_dummy="$PATH"
3775 for ac_dir in $ac_dummy; do
3776   IFS=$ac_save_IFS
3777   test -z "$ac_dir" && ac_dir=.
3778   $as_executable_p "$ac_dir/$ac_word" || continue
3779 ac_cv_prog_ETAGS="$ac_prog"
3780 echo "$as_me:3780: found $ac_dir/$ac_word" >&5
3781 break
3782 done
3783
3784 fi
3785 fi
3786 ETAGS=$ac_cv_prog_ETAGS
3787 if test -n "$ETAGS"; then
3788   echo "$as_me:3788: result: $ETAGS" >&5
3789 echo "${ECHO_T}$ETAGS" >&6
3790 else
3791   echo "$as_me:3791: result: no" >&5
3792 echo "${ECHO_T}no" >&6
3793 fi
3794
3795   test -n "$ETAGS" && break
3796 done
3797
3798 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3799 set dummy ${CTAGS:-ctags}; ac_word=$2
3800 echo "$as_me:3800: checking for $ac_word" >&5
3801 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3802 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3803   echo $ECHO_N "(cached) $ECHO_C" >&6
3804 else
3805   if test -n "$MAKE_LOWER_TAGS"; then
3806   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3807 else
3808   ac_save_IFS=$IFS; IFS=$ac_path_separator
3809 ac_dummy="$PATH"
3810 for ac_dir in $ac_dummy; do
3811   IFS=$ac_save_IFS
3812   test -z "$ac_dir" && ac_dir=.
3813   $as_executable_p "$ac_dir/$ac_word" || continue
3814 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3815 echo "$as_me:3815: found $ac_dir/$ac_word" >&5
3816 break
3817 done
3818
3819   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3820 fi
3821 fi
3822 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3823 if test -n "$MAKE_LOWER_TAGS"; then
3824   echo "$as_me:3824: result: $MAKE_LOWER_TAGS" >&5
3825 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3826 else
3827   echo "$as_me:3827: result: no" >&5
3828 echo "${ECHO_T}no" >&6
3829 fi
3830
3831 if test "$cf_cv_mixedcase" = yes ; then
3832         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3833 set dummy ${ETAGS:-etags}; ac_word=$2
3834 echo "$as_me:3834: checking for $ac_word" >&5
3835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3836 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3837   echo $ECHO_N "(cached) $ECHO_C" >&6
3838 else
3839   if test -n "$MAKE_UPPER_TAGS"; then
3840   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3841 else
3842   ac_save_IFS=$IFS; IFS=$ac_path_separator
3843 ac_dummy="$PATH"
3844 for ac_dir in $ac_dummy; do
3845   IFS=$ac_save_IFS
3846   test -z "$ac_dir" && ac_dir=.
3847   $as_executable_p "$ac_dir/$ac_word" || continue
3848 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3849 echo "$as_me:3849: found $ac_dir/$ac_word" >&5
3850 break
3851 done
3852
3853   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3854 fi
3855 fi
3856 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3857 if test -n "$MAKE_UPPER_TAGS"; then
3858   echo "$as_me:3858: result: $MAKE_UPPER_TAGS" >&5
3859 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3860 else
3861   echo "$as_me:3861: result: no" >&5
3862 echo "${ECHO_T}no" >&6
3863 fi
3864
3865 else
3866         MAKE_UPPER_TAGS=no
3867 fi
3868
3869 if test "$MAKE_UPPER_TAGS" = yes ; then
3870         MAKE_UPPER_TAGS=
3871 else
3872         MAKE_UPPER_TAGS="#"
3873 fi
3874
3875 if test "$MAKE_LOWER_TAGS" = yes ; then
3876         MAKE_LOWER_TAGS=
3877 else
3878         MAKE_LOWER_TAGS="#"
3879 fi
3880
3881 echo "$as_me:3881: checking for makeflags variable" >&5
3882 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3883 if test "${cf_cv_makeflags+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886
3887         cf_cv_makeflags=''
3888         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3889         do
3890                 cat >cf_makeflags.tmp <<CF_EOF
3891 SHELL = /bin/sh
3892 all :
3893         @ echo '.$cf_option'
3894 CF_EOF
3895                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3896                 case "$cf_result" in
3897                 .*k)
3898                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3899                         case "$cf_result" in
3900                         .*CC=*) cf_cv_makeflags=
3901                                 ;;
3902                         *)      cf_cv_makeflags=$cf_option
3903                                 ;;
3904                         esac
3905                         break
3906                         ;;
3907                 .-)     ;;
3908                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3909                         ;;
3910                 esac
3911         done
3912         rm -f cf_makeflags.tmp
3913
3914 fi
3915 echo "$as_me:3915: result: $cf_cv_makeflags" >&5
3916 echo "${ECHO_T}$cf_cv_makeflags" >&6
3917
3918 if test -n "$ac_tool_prefix"; then
3919   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3920 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3921 echo "$as_me:3921: checking for $ac_word" >&5
3922 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3923 if test "${ac_cv_prog_RANLIB+set}" = set; then
3924   echo $ECHO_N "(cached) $ECHO_C" >&6
3925 else
3926   if test -n "$RANLIB"; then
3927   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3928 else
3929   ac_save_IFS=$IFS; IFS=$ac_path_separator
3930 ac_dummy="$PATH"
3931 for ac_dir in $ac_dummy; do
3932   IFS=$ac_save_IFS
3933   test -z "$ac_dir" && ac_dir=.
3934   $as_executable_p "$ac_dir/$ac_word" || continue
3935 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3936 echo "$as_me:3936: found $ac_dir/$ac_word" >&5
3937 break
3938 done
3939
3940 fi
3941 fi
3942 RANLIB=$ac_cv_prog_RANLIB
3943 if test -n "$RANLIB"; then
3944   echo "$as_me:3944: result: $RANLIB" >&5
3945 echo "${ECHO_T}$RANLIB" >&6
3946 else
3947   echo "$as_me:3947: result: no" >&5
3948 echo "${ECHO_T}no" >&6
3949 fi
3950
3951 fi
3952 if test -z "$ac_cv_prog_RANLIB"; then
3953   ac_ct_RANLIB=$RANLIB
3954   # Extract the first word of "ranlib", so it can be a program name with args.
3955 set dummy ranlib; ac_word=$2
3956 echo "$as_me:3956: checking for $ac_word" >&5
3957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3958 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3959   echo $ECHO_N "(cached) $ECHO_C" >&6
3960 else
3961   if test -n "$ac_ct_RANLIB"; then
3962   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3963 else
3964   ac_save_IFS=$IFS; IFS=$ac_path_separator
3965 ac_dummy="$PATH"
3966 for ac_dir in $ac_dummy; do
3967   IFS=$ac_save_IFS
3968   test -z "$ac_dir" && ac_dir=.
3969   $as_executable_p "$ac_dir/$ac_word" || continue
3970 ac_cv_prog_ac_ct_RANLIB="ranlib"
3971 echo "$as_me:3971: found $ac_dir/$ac_word" >&5
3972 break
3973 done
3974
3975   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3976 fi
3977 fi
3978 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3979 if test -n "$ac_ct_RANLIB"; then
3980   echo "$as_me:3980: result: $ac_ct_RANLIB" >&5
3981 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3982 else
3983   echo "$as_me:3983: result: no" >&5
3984 echo "${ECHO_T}no" >&6
3985 fi
3986
3987   RANLIB=$ac_ct_RANLIB
3988 else
3989   RANLIB="$ac_cv_prog_RANLIB"
3990 fi
3991
3992 if test -n "$ac_tool_prefix"; then
3993   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3994 set dummy ${ac_tool_prefix}ld; ac_word=$2
3995 echo "$as_me:3995: checking for $ac_word" >&5
3996 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3997 if test "${ac_cv_prog_LD+set}" = set; then
3998   echo $ECHO_N "(cached) $ECHO_C" >&6
3999 else
4000   if test -n "$LD"; then
4001   ac_cv_prog_LD="$LD" # Let the user override the test.
4002 else
4003   ac_save_IFS=$IFS; IFS=$ac_path_separator
4004 ac_dummy="$PATH"
4005 for ac_dir in $ac_dummy; do
4006   IFS=$ac_save_IFS
4007   test -z "$ac_dir" && ac_dir=.
4008   $as_executable_p "$ac_dir/$ac_word" || continue
4009 ac_cv_prog_LD="${ac_tool_prefix}ld"
4010 echo "$as_me:4010: found $ac_dir/$ac_word" >&5
4011 break
4012 done
4013
4014 fi
4015 fi
4016 LD=$ac_cv_prog_LD
4017 if test -n "$LD"; then
4018   echo "$as_me:4018: result: $LD" >&5
4019 echo "${ECHO_T}$LD" >&6
4020 else
4021   echo "$as_me:4021: result: no" >&5
4022 echo "${ECHO_T}no" >&6
4023 fi
4024
4025 fi
4026 if test -z "$ac_cv_prog_LD"; then
4027   ac_ct_LD=$LD
4028   # Extract the first word of "ld", so it can be a program name with args.
4029 set dummy ld; ac_word=$2
4030 echo "$as_me:4030: checking for $ac_word" >&5
4031 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4032 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4033   echo $ECHO_N "(cached) $ECHO_C" >&6
4034 else
4035   if test -n "$ac_ct_LD"; then
4036   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4037 else
4038   ac_save_IFS=$IFS; IFS=$ac_path_separator
4039 ac_dummy="$PATH"
4040 for ac_dir in $ac_dummy; do
4041   IFS=$ac_save_IFS
4042   test -z "$ac_dir" && ac_dir=.
4043   $as_executable_p "$ac_dir/$ac_word" || continue
4044 ac_cv_prog_ac_ct_LD="ld"
4045 echo "$as_me:4045: found $ac_dir/$ac_word" >&5
4046 break
4047 done
4048
4049   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4050 fi
4051 fi
4052 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4053 if test -n "$ac_ct_LD"; then
4054   echo "$as_me:4054: result: $ac_ct_LD" >&5
4055 echo "${ECHO_T}$ac_ct_LD" >&6
4056 else
4057   echo "$as_me:4057: result: no" >&5
4058 echo "${ECHO_T}no" >&6
4059 fi
4060
4061   LD=$ac_ct_LD
4062 else
4063   LD="$ac_cv_prog_LD"
4064 fi
4065
4066 if test -n "$ac_tool_prefix"; then
4067   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4068 set dummy ${ac_tool_prefix}ar; ac_word=$2
4069 echo "$as_me:4069: checking for $ac_word" >&5
4070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4071 if test "${ac_cv_prog_AR+set}" = set; then
4072   echo $ECHO_N "(cached) $ECHO_C" >&6
4073 else
4074   if test -n "$AR"; then
4075   ac_cv_prog_AR="$AR" # Let the user override the test.
4076 else
4077   ac_save_IFS=$IFS; IFS=$ac_path_separator
4078 ac_dummy="$PATH"
4079 for ac_dir in $ac_dummy; do
4080   IFS=$ac_save_IFS
4081   test -z "$ac_dir" && ac_dir=.
4082   $as_executable_p "$ac_dir/$ac_word" || continue
4083 ac_cv_prog_AR="${ac_tool_prefix}ar"
4084 echo "$as_me:4084: found $ac_dir/$ac_word" >&5
4085 break
4086 done
4087
4088 fi
4089 fi
4090 AR=$ac_cv_prog_AR
4091 if test -n "$AR"; then
4092   echo "$as_me:4092: result: $AR" >&5
4093 echo "${ECHO_T}$AR" >&6
4094 else
4095   echo "$as_me:4095: result: no" >&5
4096 echo "${ECHO_T}no" >&6
4097 fi
4098
4099 fi
4100 if test -z "$ac_cv_prog_AR"; then
4101   ac_ct_AR=$AR
4102   # Extract the first word of "ar", so it can be a program name with args.
4103 set dummy ar; ac_word=$2
4104 echo "$as_me:4104: checking for $ac_word" >&5
4105 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4106 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4107   echo $ECHO_N "(cached) $ECHO_C" >&6
4108 else
4109   if test -n "$ac_ct_AR"; then
4110   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4111 else
4112   ac_save_IFS=$IFS; IFS=$ac_path_separator
4113 ac_dummy="$PATH"
4114 for ac_dir in $ac_dummy; do
4115   IFS=$ac_save_IFS
4116   test -z "$ac_dir" && ac_dir=.
4117   $as_executable_p "$ac_dir/$ac_word" || continue
4118 ac_cv_prog_ac_ct_AR="ar"
4119 echo "$as_me:4119: found $ac_dir/$ac_word" >&5
4120 break
4121 done
4122
4123   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4124 fi
4125 fi
4126 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4127 if test -n "$ac_ct_AR"; then
4128   echo "$as_me:4128: result: $ac_ct_AR" >&5
4129 echo "${ECHO_T}$ac_ct_AR" >&6
4130 else
4131   echo "$as_me:4131: result: no" >&5
4132 echo "${ECHO_T}no" >&6
4133 fi
4134
4135   AR=$ac_ct_AR
4136 else
4137   AR="$ac_cv_prog_AR"
4138 fi
4139
4140 if test -n "$ac_tool_prefix"; then
4141   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4142 set dummy ${ac_tool_prefix}ar; ac_word=$2
4143 echo "$as_me:4143: checking for $ac_word" >&5
4144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4145 if test "${ac_cv_prog_AR+set}" = set; then
4146   echo $ECHO_N "(cached) $ECHO_C" >&6
4147 else
4148   if test -n "$AR"; then
4149   ac_cv_prog_AR="$AR" # Let the user override the test.
4150 else
4151   ac_save_IFS=$IFS; IFS=$ac_path_separator
4152 ac_dummy="$PATH"
4153 for ac_dir in $ac_dummy; do
4154   IFS=$ac_save_IFS
4155   test -z "$ac_dir" && ac_dir=.
4156   $as_executable_p "$ac_dir/$ac_word" || continue
4157 ac_cv_prog_AR="${ac_tool_prefix}ar"
4158 echo "$as_me:4158: found $ac_dir/$ac_word" >&5
4159 break
4160 done
4161
4162 fi
4163 fi
4164 AR=$ac_cv_prog_AR
4165 if test -n "$AR"; then
4166   echo "$as_me:4166: result: $AR" >&5
4167 echo "${ECHO_T}$AR" >&6
4168 else
4169   echo "$as_me:4169: result: no" >&5
4170 echo "${ECHO_T}no" >&6
4171 fi
4172
4173 fi
4174 if test -z "$ac_cv_prog_AR"; then
4175   ac_ct_AR=$AR
4176   # Extract the first word of "ar", so it can be a program name with args.
4177 set dummy ar; ac_word=$2
4178 echo "$as_me:4178: checking for $ac_word" >&5
4179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4180 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4181   echo $ECHO_N "(cached) $ECHO_C" >&6
4182 else
4183   if test -n "$ac_ct_AR"; then
4184   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4185 else
4186   ac_save_IFS=$IFS; IFS=$ac_path_separator
4187 ac_dummy="$PATH"
4188 for ac_dir in $ac_dummy; do
4189   IFS=$ac_save_IFS
4190   test -z "$ac_dir" && ac_dir=.
4191   $as_executable_p "$ac_dir/$ac_word" || continue
4192 ac_cv_prog_ac_ct_AR="ar"
4193 echo "$as_me:4193: found $ac_dir/$ac_word" >&5
4194 break
4195 done
4196
4197   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4198 fi
4199 fi
4200 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4201 if test -n "$ac_ct_AR"; then
4202   echo "$as_me:4202: result: $ac_ct_AR" >&5
4203 echo "${ECHO_T}$ac_ct_AR" >&6
4204 else
4205   echo "$as_me:4205: result: no" >&5
4206 echo "${ECHO_T}no" >&6
4207 fi
4208
4209   AR=$ac_ct_AR
4210 else
4211   AR="$ac_cv_prog_AR"
4212 fi
4213
4214 echo "$as_me:4214: checking for options to update archives" >&5
4215 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4216 if test "${cf_cv_ar_flags+set}" = set; then
4217   echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219
4220         cf_cv_ar_flags=unknown
4221         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4222         do
4223
4224                 # check if $ARFLAGS already contains this choice
4225                 if test "x$ARFLAGS" != "x" ; then
4226                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4227                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4228                                 cf_cv_ar_flags=
4229                                 break
4230                         fi
4231                 fi
4232
4233                 rm -f conftest.$ac_cv_objext
4234                 rm -f conftest.a
4235
4236                 cat >conftest.$ac_ext <<EOF
4237 #line 4237 "configure"
4238 int     testdata[3] = { 123, 456, 789 };
4239 EOF
4240                 if { (eval echo "$as_me:4240: \"$ac_compile\"") >&5
4241   (eval $ac_compile) 2>&5
4242   ac_status=$?
4243   echo "$as_me:4243: \$? = $ac_status" >&5
4244   (exit $ac_status); } ; then
4245                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4246                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4247                         if test -f conftest.a ; then
4248                                 cf_cv_ar_flags=$cf_ar_flags
4249                                 break
4250                         fi
4251                 else
4252                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4253
4254 echo "${as_me:-configure}:4254: testing cannot compile test-program ..." 1>&5
4255
4256                         break
4257                 fi
4258         done
4259         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4260
4261 fi
4262 echo "$as_me:4262: result: $cf_cv_ar_flags" >&5
4263 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4264
4265 if test -n "$ARFLAGS" ; then
4266         if test -n "$cf_cv_ar_flags" ; then
4267                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4268         fi
4269 else
4270         ARFLAGS=$cf_cv_ar_flags
4271 fi
4272
4273 echo "$as_me:4273: checking if you have specified an install-prefix" >&5
4274 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4275
4276 # Check whether --with-install-prefix or --without-install-prefix was given.
4277 if test "${with_install_prefix+set}" = set; then
4278   withval="$with_install_prefix"
4279   case "$withval" in #(vi
4280         yes|no) #(vi
4281                 ;;
4282         *)      DESTDIR="$withval"
4283                 ;;
4284         esac
4285 fi;
4286 echo "$as_me:4286: result: $DESTDIR" >&5
4287 echo "${ECHO_T}$DESTDIR" >&6
4288
4289 ###############################################################################
4290
4291 # If we're cross-compiling, allow the user to override the tools and their
4292 # options.  The configure script is oriented toward identifying the host
4293 # compiler, etc., but we need a build compiler to generate parts of the source.
4294
4295 if test "$cross_compiling" = yes ; then
4296
4297         # defaults that we might want to override
4298         : ${BUILD_CFLAGS:=''}
4299         : ${BUILD_CPPFLAGS:=''}
4300         : ${BUILD_LDFLAGS:=''}
4301         : ${BUILD_LIBS:=''}
4302         : ${BUILD_EXEEXT:='$x'}
4303         : ${BUILD_OBJEXT:='o'}
4304
4305 # Check whether --with-build-cc or --without-build-cc was given.
4306 if test "${with_build_cc+set}" = set; then
4307   withval="$with_build_cc"
4308   BUILD_CC="$withval"
4309 else
4310   for ac_prog in gcc cc cl
4311 do
4312   # Extract the first word of "$ac_prog", so it can be a program name with args.
4313 set dummy $ac_prog; ac_word=$2
4314 echo "$as_me:4314: checking for $ac_word" >&5
4315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4316 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4317   echo $ECHO_N "(cached) $ECHO_C" >&6
4318 else
4319   if test -n "$BUILD_CC"; then
4320   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4321 else
4322   ac_save_IFS=$IFS; IFS=$ac_path_separator
4323 ac_dummy="$PATH"
4324 for ac_dir in $ac_dummy; do
4325   IFS=$ac_save_IFS
4326   test -z "$ac_dir" && ac_dir=.
4327   $as_executable_p "$ac_dir/$ac_word" || continue
4328 ac_cv_prog_BUILD_CC="$ac_prog"
4329 echo "$as_me:4329: found $ac_dir/$ac_word" >&5
4330 break
4331 done
4332
4333 fi
4334 fi
4335 BUILD_CC=$ac_cv_prog_BUILD_CC
4336 if test -n "$BUILD_CC"; then
4337   echo "$as_me:4337: result: $BUILD_CC" >&5
4338 echo "${ECHO_T}$BUILD_CC" >&6
4339 else
4340   echo "$as_me:4340: result: no" >&5
4341 echo "${ECHO_T}no" >&6
4342 fi
4343
4344   test -n "$BUILD_CC" && break
4345 done
4346
4347 fi;
4348         echo "$as_me:4348: checking for native build C compiler" >&5
4349 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4350         echo "$as_me:4350: result: $BUILD_CC" >&5
4351 echo "${ECHO_T}$BUILD_CC" >&6
4352
4353         echo "$as_me:4353: checking for native build C preprocessor" >&5
4354 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4355
4356 # Check whether --with-build-cpp or --without-build-cpp was given.
4357 if test "${with_build_cpp+set}" = set; then
4358   withval="$with_build_cpp"
4359   BUILD_CPP="$withval"
4360 else
4361   BUILD_CPP='${BUILD_CC} -E'
4362 fi;
4363         echo "$as_me:4363: result: $BUILD_CPP" >&5
4364 echo "${ECHO_T}$BUILD_CPP" >&6
4365
4366         echo "$as_me:4366: checking for native build C flags" >&5
4367 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4368
4369 # Check whether --with-build-cflags or --without-build-cflags was given.
4370 if test "${with_build_cflags+set}" = set; then
4371   withval="$with_build_cflags"
4372   BUILD_CFLAGS="$withval"
4373 fi;
4374         echo "$as_me:4374: result: $BUILD_CFLAGS" >&5
4375 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4376
4377         echo "$as_me:4377: checking for native build C preprocessor-flags" >&5
4378 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4379
4380 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4381 if test "${with_build_cppflags+set}" = set; then
4382   withval="$with_build_cppflags"
4383   BUILD_CPPFLAGS="$withval"
4384 fi;
4385         echo "$as_me:4385: result: $BUILD_CPPFLAGS" >&5
4386 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4387
4388         echo "$as_me:4388: checking for native build linker-flags" >&5
4389 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4390
4391 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4392 if test "${with_build_ldflags+set}" = set; then
4393   withval="$with_build_ldflags"
4394   BUILD_LDFLAGS="$withval"
4395 fi;
4396         echo "$as_me:4396: result: $BUILD_LDFLAGS" >&5
4397 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4398
4399         echo "$as_me:4399: checking for native build linker-libraries" >&5
4400 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4401
4402 # Check whether --with-build-libs or --without-build-libs was given.
4403 if test "${with_build_libs+set}" = set; then
4404   withval="$with_build_libs"
4405   BUILD_LIBS="$withval"
4406 fi;
4407         echo "$as_me:4407: result: $BUILD_LIBS" >&5
4408 echo "${ECHO_T}$BUILD_LIBS" >&6
4409
4410         # this assumes we're on Unix.
4411         BUILD_EXEEXT=
4412         BUILD_OBJEXT=o
4413
4414         : ${BUILD_CC:='${CC}'}
4415
4416         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4417                 { { echo "$as_me:4417: error: Cross-build requires two compilers.
4418 Use --with-build-cc to specify the native compiler." >&5
4419 echo "$as_me: error: Cross-build requires two compilers.
4420 Use --with-build-cc to specify the native compiler." >&2;}
4421    { (exit 1); exit 1; }; }
4422         fi
4423
4424 else
4425         : ${BUILD_CC:='${CC}'}
4426         : ${BUILD_CPP:='${CPP}'}
4427         : ${BUILD_CFLAGS:='${CFLAGS}'}
4428         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4429         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4430         : ${BUILD_LIBS:='${LIBS}'}
4431         : ${BUILD_EXEEXT:='$x'}
4432         : ${BUILD_OBJEXT:='o'}
4433 fi
4434
4435 ###############################################################################
4436
4437 ### Options to allow the user to specify the set of libraries which are used.
4438 ### Use "--without-normal --with-shared" to allow the default model to be
4439 ### shared, for example.
4440 cf_list_models=""
4441
4442 echo "$as_me:4442: checking if libtool -version-number should be used" >&5
4443 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4444
4445 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4446 if test "${enable_libtool_version+set}" = set; then
4447   enableval="$enable_libtool_version"
4448   test "$enableval" != no && enableval=yes
4449   if test "$enableval" != "yes" ; then
4450     cf_libtool_version=no
4451   else
4452     cf_libtool_version=yes
4453   fi
4454 else
4455   enableval=yes
4456   cf_libtool_version=yes
4457
4458 fi;
4459 echo "$as_me:4459: result: $cf_libtool_version" >&5
4460 echo "${ECHO_T}$cf_libtool_version" >&6
4461
4462 if test "$cf_libtool_version" = yes ; then
4463         LIBTOOL_VERSION="-version-number"
4464 else
4465         LIBTOOL_VERSION="-version-info"
4466 fi
4467
4468 LIBTOOL=
4469
4470 # common library maintenance symbols that are convenient for libtool scripts:
4471 LIB_CREATE='${AR} -cr'
4472 LIB_OBJECT='${OBJECTS}'
4473 LIB_SUFFIX=.a
4474 LIB_PREP="$RANLIB"
4475
4476 # symbols used to prop libtool up to enable it to determine what it should be
4477 # doing:
4478 LIB_CLEAN=
4479 LIB_COMPILE=
4480 LIB_LINK='${CC}'
4481 LIB_INSTALL=
4482 LIB_UNINSTALL=
4483
4484 echo "$as_me:4484: checking if you want to build libraries with libtool" >&5
4485 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4486
4487 # Check whether --with-libtool or --without-libtool was given.
4488 if test "${with_libtool+set}" = set; then
4489   withval="$with_libtool"
4490   with_libtool=$withval
4491 else
4492   with_libtool=no
4493 fi;
4494 echo "$as_me:4494: result: $with_libtool" >&5
4495 echo "${ECHO_T}$with_libtool" >&6
4496 if test "$with_libtool" != "no"; then
4497
4498         if test "$with_libtool" != "yes" ; then
4499
4500 if test "x$prefix" != xNONE; then
4501   cf_path_syntax="$prefix"
4502 else
4503   cf_path_syntax="$ac_default_prefix"
4504 fi
4505
4506 case ".$with_libtool" in #(vi
4507 .\$\(*\)*|.\'*\'*) #(vi
4508   ;;
4509 ..|./*|.\\*) #(vi
4510   ;;
4511 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4512   ;;
4513 .\${*prefix}*|.\${*dir}*) #(vi
4514   eval with_libtool="$with_libtool"
4515   case ".$with_libtool" in #(vi
4516   .NONE/*)
4517     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4518     ;;
4519   esac
4520   ;; #(vi
4521 .no|.NONE/*)
4522   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4523   ;;
4524 *)
4525   { { echo "$as_me:4525: error: expected a pathname, not \"$with_libtool\"" >&5
4526 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4527    { (exit 1); exit 1; }; }
4528   ;;
4529 esac
4530
4531                 LIBTOOL=$with_libtool
4532         else
4533                 # Extract the first word of "libtool", so it can be a program name with args.
4534 set dummy libtool; ac_word=$2
4535 echo "$as_me:4535: checking for $ac_word" >&5
4536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4537 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4538   echo $ECHO_N "(cached) $ECHO_C" >&6
4539 else
4540   case $LIBTOOL in
4541   [\\/]* | ?:[\\/]*)
4542   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4543   ;;
4544   *)
4545   ac_save_IFS=$IFS; IFS=$ac_path_separator
4546 ac_dummy="$PATH"
4547 for ac_dir in $ac_dummy; do
4548   IFS=$ac_save_IFS
4549   test -z "$ac_dir" && ac_dir=.
4550   if $as_executable_p "$ac_dir/$ac_word"; then
4551    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4552    echo "$as_me:4552: found $ac_dir/$ac_word" >&5
4553    break
4554 fi
4555 done
4556
4557   ;;
4558 esac
4559 fi
4560 LIBTOOL=$ac_cv_path_LIBTOOL
4561
4562 if test -n "$LIBTOOL"; then
4563   echo "$as_me:4563: result: $LIBTOOL" >&5
4564 echo "${ECHO_T}$LIBTOOL" >&6
4565 else
4566   echo "$as_me:4566: result: no" >&5
4567 echo "${ECHO_T}no" >&6
4568 fi
4569
4570         fi
4571         if test -z "$LIBTOOL" ; then
4572                 { { echo "$as_me:4572: error: Cannot find libtool" >&5
4573 echo "$as_me: error: Cannot find libtool" >&2;}
4574    { (exit 1); exit 1; }; }
4575         fi
4576         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4577         LIB_OBJECT='${OBJECTS:.o=.lo}'
4578         LIB_SUFFIX=.la
4579         LIB_CLEAN='${LIBTOOL} --mode=clean'
4580         LIB_COMPILE='${LIBTOOL} --mode=compile'
4581         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4582         LIB_INSTALL='${LIBTOOL} --mode=install'
4583         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4584         LIB_PREP=:
4585
4586         # Show the version of libtool
4587         echo "$as_me:4587: checking version of libtool" >&5
4588 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4589
4590         # Save the version in a cache variable - this is not entirely a good
4591         # thing, but the version string from libtool is very ugly, and for
4592         # bug reports it might be useful to have the original string. "("
4593         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.].*//'`
4594         echo "$as_me:4594: result: $cf_cv_libtool_version" >&5
4595 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4596         if test -z "$cf_cv_libtool_version" ; then
4597                 { { echo "$as_me:4597: error: This is not GNU libtool" >&5
4598 echo "$as_me: error: This is not GNU libtool" >&2;}
4599    { (exit 1); exit 1; }; }
4600         fi
4601
4602         # special hack to add -no-undefined (which libtool should do for itself)
4603         LT_UNDEF=
4604         case "$cf_cv_system_name" in #(vi
4605         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4606                 LT_UNDEF=-no-undefined
4607                 ;;
4608         esac
4609
4610         # special hack to add --tag option for C++ compiler
4611         case $cf_cv_libtool_version in #(vi
4612         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4613                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4614                 LIBTOOL="$LIBTOOL --tag=CC"
4615                 ;;
4616         *)
4617                 LIBTOOL_CXX="$LIBTOOL"
4618                 ;;
4619         esac
4620 else
4621         LIBTOOL=""
4622         LIBTOOL_CXX=""
4623 fi
4624
4625 test -z "$LIBTOOL" && ECHO_LT=
4626
4627 if test "$with_libtool" != "no" ; then
4628
4629 cf_list_models="$cf_list_models libtool"
4630
4631 else
4632
4633 echo "$as_me:4633: checking if you want to build shared libraries" >&5
4634 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4635
4636 # Check whether --with-shared or --without-shared was given.
4637 if test "${with_shared+set}" = set; then
4638   withval="$with_shared"
4639   with_shared=$withval
4640 else
4641   with_shared=no
4642 fi;
4643 echo "$as_me:4643: result: $with_shared" >&5
4644 echo "${ECHO_T}$with_shared" >&6
4645 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4646
4647 echo "$as_me:4647: checking if you want to build static libraries" >&5
4648 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4649
4650 # Check whether --with-normal or --without-normal was given.
4651 if test "${with_normal+set}" = set; then
4652   withval="$with_normal"
4653   with_normal=$withval
4654 else
4655   with_normal=yes
4656 fi;
4657 echo "$as_me:4657: result: $with_normal" >&5
4658 echo "${ECHO_T}$with_normal" >&6
4659 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4660
4661 echo "$as_me:4661: checking if you want to build debug libraries" >&5
4662 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4663
4664 # Check whether --with-debug or --without-debug was given.
4665 if test "${with_debug+set}" = set; then
4666   withval="$with_debug"
4667   with_debug=$withval
4668 else
4669   with_debug=yes
4670 fi;
4671 echo "$as_me:4671: result: $with_debug" >&5
4672 echo "${ECHO_T}$with_debug" >&6
4673 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4674
4675 echo "$as_me:4675: checking if you want to build profiling libraries" >&5
4676 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4677
4678 # Check whether --with-profile or --without-profile was given.
4679 if test "${with_profile+set}" = set; then
4680   withval="$with_profile"
4681   with_profile=$withval
4682 else
4683   with_profile=no
4684 fi;
4685 echo "$as_me:4685: result: $with_profile" >&5
4686 echo "${ECHO_T}$with_profile" >&6
4687 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4688
4689 fi
4690
4691 ###############################################################################
4692
4693 echo "$as_me:4693: checking for specified models" >&5
4694 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4695 test -z "$cf_list_models" && cf_list_models=normal
4696 test "$with_libtool" != "no" && cf_list_models=libtool
4697 echo "$as_me:4697: result: $cf_list_models" >&5
4698 echo "${ECHO_T}$cf_list_models" >&6
4699
4700 ### Use the first model as the default, and save its suffix for use in building
4701 ### up test-applications.
4702 echo "$as_me:4702: checking for default model" >&5
4703 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4704 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4705 echo "$as_me:4705: result: $DFT_LWR_MODEL" >&5
4706 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4707
4708 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4709
4710 TICS_NAME=tic
4711
4712 TINFO_NAME=tinfo
4713
4714 LIB_NAME=ncurses
4715
4716 LIB_DIR=../lib
4717 LIB_2ND=../../lib
4718
4719 echo "$as_me:4719: checking if you want to have a library-prefix" >&5
4720 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4721
4722 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4723 if test "${with_lib_prefix+set}" = set; then
4724   withval="$with_lib_prefix"
4725   with_lib_prefix=$withval
4726 else
4727   with_lib_prefix=auto
4728 fi;
4729 echo "$as_me:4729: result: $with_lib_prefix" >&5
4730 echo "${ECHO_T}$with_lib_prefix" >&6
4731
4732 if test $with_lib_prefix = auto
4733 then
4734
4735         case $cf_cv_system_name in #(vi
4736         OS/2*|os2*) #(vi
4737         LIB_PREFIX=''
4738         ;;
4739         *)      LIB_PREFIX='lib'
4740         ;;
4741         esac
4742 cf_prefix=$LIB_PREFIX
4743
4744 elif test $with_lib_prefix = no
4745 then
4746         LIB_PREFIX=
4747 else
4748         LIB_PREFIX=$with_lib_prefix
4749 fi
4750
4751 LIB_SUFFIX=
4752
4753 ###############################################################################
4754
4755 echo "$as_me:4755: checking if you want to build a separate terminfo library" >&5
4756 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4757
4758 # Check whether --with-termlib or --without-termlib was given.
4759 if test "${with_termlib+set}" = set; then
4760   withval="$with_termlib"
4761   with_termlib=$withval
4762 else
4763   with_termlib=no
4764 fi;
4765 echo "$as_me:4765: result: $with_termlib" >&5
4766 echo "${ECHO_T}$with_termlib" >&6
4767
4768 echo "$as_me:4768: checking if you want to build a separate tic library" >&5
4769 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4770
4771 # Check whether --with-ticlib or --without-ticlib was given.
4772 if test "${with_ticlib+set}" = set; then
4773   withval="$with_ticlib"
4774   with_ticlib=$withval
4775 else
4776   with_ticlib=no
4777 fi;
4778 echo "$as_me:4778: result: $with_ticlib" >&5
4779 echo "${ECHO_T}$with_ticlib" >&6
4780
4781 ### Checks for special libraries, must be done up-front.
4782 SHLIB_LIST=""
4783
4784 echo "$as_me:4784: checking if you want to link with the GPM mouse library" >&5
4785 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4786
4787 # Check whether --with-gpm or --without-gpm was given.
4788 if test "${with_gpm+set}" = set; then
4789   withval="$with_gpm"
4790   with_gpm=$withval
4791 else
4792   with_gpm=maybe
4793 fi;
4794 echo "$as_me:4794: result: $with_gpm" >&5
4795 echo "${ECHO_T}$with_gpm" >&6
4796
4797 if test "$with_gpm" != no ; then
4798         echo "$as_me:4798: checking for gpm.h" >&5
4799 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4800 if test "${ac_cv_header_gpm_h+set}" = set; then
4801   echo $ECHO_N "(cached) $ECHO_C" >&6
4802 else
4803   cat >conftest.$ac_ext <<_ACEOF
4804 #line 4804 "configure"
4805 #include "confdefs.h"
4806 #include <gpm.h>
4807 _ACEOF
4808 if { (eval echo "$as_me:4808: \"$ac_cpp conftest.$ac_ext\"") >&5
4809   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4810   ac_status=$?
4811   egrep -v '^ *\+' conftest.er1 >conftest.err
4812   rm -f conftest.er1
4813   cat conftest.err >&5
4814   echo "$as_me:4814: \$? = $ac_status" >&5
4815   (exit $ac_status); } >/dev/null; then
4816   if test -s conftest.err; then
4817     ac_cpp_err=$ac_c_preproc_warn_flag
4818   else
4819     ac_cpp_err=
4820   fi
4821 else
4822   ac_cpp_err=yes
4823 fi
4824 if test -z "$ac_cpp_err"; then
4825   ac_cv_header_gpm_h=yes
4826 else
4827   echo "$as_me: failed program was:" >&5
4828   cat conftest.$ac_ext >&5
4829   ac_cv_header_gpm_h=no
4830 fi
4831 rm -f conftest.err conftest.$ac_ext
4832 fi
4833 echo "$as_me:4833: result: $ac_cv_header_gpm_h" >&5
4834 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4835 if test $ac_cv_header_gpm_h = yes; then
4836
4837                 cat >>confdefs.h <<\EOF
4838 #define HAVE_GPM_H 1
4839 EOF
4840
4841                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4842                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4843
4844 echo "${as_me:-configure}:4844: testing assuming we really have GPM library ..." 1>&5
4845
4846                         cat >>confdefs.h <<\EOF
4847 #define HAVE_LIBGPM 1
4848 EOF
4849
4850                 else
4851                         echo "$as_me:4851: checking for Gpm_Open in -lgpm" >&5
4852 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4853 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4854   echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856   ac_check_lib_save_LIBS=$LIBS
4857 LIBS="-lgpm  $LIBS"
4858 cat >conftest.$ac_ext <<_ACEOF
4859 #line 4859 "configure"
4860 #include "confdefs.h"
4861
4862 /* Override any gcc2 internal prototype to avoid an error.  */
4863 #ifdef __cplusplus
4864 extern "C"
4865 #endif
4866 /* We use char because int might match the return type of a gcc2
4867    builtin and then its argument prototype would still apply.  */
4868 char Gpm_Open ();
4869 int
4870 main ()
4871 {
4872 Gpm_Open ();
4873   ;
4874   return 0;
4875 }
4876 _ACEOF
4877 rm -f conftest.$ac_objext conftest$ac_exeext
4878 if { (eval echo "$as_me:4878: \"$ac_link\"") >&5
4879   (eval $ac_link) 2>&5
4880   ac_status=$?
4881   echo "$as_me:4881: \$? = $ac_status" >&5
4882   (exit $ac_status); } &&
4883          { ac_try='test -s conftest$ac_exeext'
4884   { (eval echo "$as_me:4884: \"$ac_try\"") >&5
4885   (eval $ac_try) 2>&5
4886   ac_status=$?
4887   echo "$as_me:4887: \$? = $ac_status" >&5
4888   (exit $ac_status); }; }; then
4889   ac_cv_lib_gpm_Gpm_Open=yes
4890 else
4891   echo "$as_me: failed program was:" >&5
4892 cat conftest.$ac_ext >&5
4893 ac_cv_lib_gpm_Gpm_Open=no
4894 fi
4895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4896 LIBS=$ac_check_lib_save_LIBS
4897 fi
4898 echo "$as_me:4898: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4899 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4900 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4901   :
4902 else
4903
4904                                 { { echo "$as_me:4904: error: Cannot link with GPM library" >&5
4905 echo "$as_me: error: Cannot link with GPM library" >&2;}
4906    { (exit 1); exit 1; }; }
4907                 fi
4908                 with_gpm=yes
4909
4910 fi
4911
4912 else
4913
4914                 test "$with_gpm" != maybe && { echo "$as_me:4914: WARNING: Cannot find GPM header" >&5
4915 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4916                 with_gpm=no
4917
4918 fi
4919
4920 fi
4921
4922 if test "$with_gpm" != no ; then
4923         echo "$as_me:4923: checking if you want to load GPM dynamically" >&5
4924 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4925
4926 # Check whether --with-dlsym or --without-dlsym was given.
4927 if test "${with_dlsym+set}" = set; then
4928   withval="$with_dlsym"
4929   with_dlsym=$withval
4930 else
4931   with_dlsym=yes
4932 fi;
4933         echo "$as_me:4933: result: $with_dlsym" >&5
4934 echo "${ECHO_T}$with_dlsym" >&6
4935         if test "$with_dlsym" = yes ; then
4936
4937 cf_have_dlsym=no
4938 echo "$as_me:4938: checking for dlsym" >&5
4939 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4940 if test "${ac_cv_func_dlsym+set}" = set; then
4941   echo $ECHO_N "(cached) $ECHO_C" >&6
4942 else
4943   cat >conftest.$ac_ext <<_ACEOF
4944 #line 4944 "configure"
4945 #include "confdefs.h"
4946 /* System header to define __stub macros and hopefully few prototypes,
4947     which can conflict with char dlsym (); below.  */
4948 #include <assert.h>
4949 /* Override any gcc2 internal prototype to avoid an error.  */
4950 #ifdef __cplusplus
4951 extern "C"
4952 #endif
4953 /* We use char because int might match the return type of a gcc2
4954    builtin and then its argument prototype would still apply.  */
4955 char dlsym ();
4956 char (*f) ();
4957
4958 int
4959 main ()
4960 {
4961 /* The GNU C library defines this for functions which it implements
4962     to always fail with ENOSYS.  Some functions are actually named
4963     something starting with __ and the normal name is an alias.  */
4964 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4965 choke me
4966 #else
4967 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4968 #endif
4969
4970   ;
4971   return 0;
4972 }
4973 _ACEOF
4974 rm -f conftest.$ac_objext conftest$ac_exeext
4975 if { (eval echo "$as_me:4975: \"$ac_link\"") >&5
4976   (eval $ac_link) 2>&5
4977   ac_status=$?
4978   echo "$as_me:4978: \$? = $ac_status" >&5
4979   (exit $ac_status); } &&
4980          { ac_try='test -s conftest$ac_exeext'
4981   { (eval echo "$as_me:4981: \"$ac_try\"") >&5
4982   (eval $ac_try) 2>&5
4983   ac_status=$?
4984   echo "$as_me:4984: \$? = $ac_status" >&5
4985   (exit $ac_status); }; }; then
4986   ac_cv_func_dlsym=yes
4987 else
4988   echo "$as_me: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4990 ac_cv_func_dlsym=no
4991 fi
4992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4993 fi
4994 echo "$as_me:4994: result: $ac_cv_func_dlsym" >&5
4995 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4996 if test $ac_cv_func_dlsym = yes; then
4997   cf_have_dlsym=yes
4998 else
4999
5000 cf_have_libdl=no
5001 echo "$as_me:5001: checking for dlsym in -ldl" >&5
5002 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5003 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5004   echo $ECHO_N "(cached) $ECHO_C" >&6
5005 else
5006   ac_check_lib_save_LIBS=$LIBS
5007 LIBS="-ldl  $LIBS"
5008 cat >conftest.$ac_ext <<_ACEOF
5009 #line 5009 "configure"
5010 #include "confdefs.h"
5011
5012 /* Override any gcc2 internal prototype to avoid an error.  */
5013 #ifdef __cplusplus
5014 extern "C"
5015 #endif
5016 /* We use char because int might match the return type of a gcc2
5017    builtin and then its argument prototype would still apply.  */
5018 char dlsym ();
5019 int
5020 main ()
5021 {
5022 dlsym ();
5023   ;
5024   return 0;
5025 }
5026 _ACEOF
5027 rm -f conftest.$ac_objext conftest$ac_exeext
5028 if { (eval echo "$as_me:5028: \"$ac_link\"") >&5
5029   (eval $ac_link) 2>&5
5030   ac_status=$?
5031   echo "$as_me:5031: \$? = $ac_status" >&5
5032   (exit $ac_status); } &&
5033          { ac_try='test -s conftest$ac_exeext'
5034   { (eval echo "$as_me:5034: \"$ac_try\"") >&5
5035   (eval $ac_try) 2>&5
5036   ac_status=$?
5037   echo "$as_me:5037: \$? = $ac_status" >&5
5038   (exit $ac_status); }; }; then
5039   ac_cv_lib_dl_dlsym=yes
5040 else
5041   echo "$as_me: failed program was:" >&5
5042 cat conftest.$ac_ext >&5
5043 ac_cv_lib_dl_dlsym=no
5044 fi
5045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5046 LIBS=$ac_check_lib_save_LIBS
5047 fi
5048 echo "$as_me:5048: result: $ac_cv_lib_dl_dlsym" >&5
5049 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5050 if test $ac_cv_lib_dl_dlsym = yes; then
5051
5052         cf_have_dlsym=yes
5053         cf_have_libdl=yes
5054 fi
5055
5056 fi
5057
5058 if test "$cf_have_dlsym" = yes ; then
5059         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5060
5061         echo "$as_me:5061: checking whether able to link to dl*() functions" >&5
5062 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5063         cat >conftest.$ac_ext <<_ACEOF
5064 #line 5064 "configure"
5065 #include "confdefs.h"
5066 #include <dlfcn.h>
5067 int
5068 main ()
5069 {
5070
5071                 void *obj;
5072                 if ((obj = dlopen("filename", 0)) != 0) {
5073                         if (dlsym(obj, "symbolname") == 0) {
5074                         dlclose(obj);
5075                         }
5076                 }
5077   ;
5078   return 0;
5079 }
5080 _ACEOF
5081 rm -f conftest.$ac_objext conftest$ac_exeext
5082 if { (eval echo "$as_me:5082: \"$ac_link\"") >&5
5083   (eval $ac_link) 2>&5
5084   ac_status=$?
5085   echo "$as_me:5085: \$? = $ac_status" >&5
5086   (exit $ac_status); } &&
5087          { ac_try='test -s conftest$ac_exeext'
5088   { (eval echo "$as_me:5088: \"$ac_try\"") >&5
5089   (eval $ac_try) 2>&5
5090   ac_status=$?
5091   echo "$as_me:5091: \$? = $ac_status" >&5
5092   (exit $ac_status); }; }; then
5093
5094                 cat >>confdefs.h <<\EOF
5095 #define HAVE_LIBDL 1
5096 EOF
5097
5098 else
5099   echo "$as_me: failed program was:" >&5
5100 cat conftest.$ac_ext >&5
5101
5102                 { { echo "$as_me:5102: error: Cannot link test program for libdl" >&5
5103 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5104    { (exit 1); exit 1; }; }
5105 fi
5106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5107         echo "$as_me:5107: result: ok" >&5
5108 echo "${ECHO_T}ok" >&6
5109 else
5110         { { echo "$as_me:5110: error: Cannot find dlsym function" >&5
5111 echo "$as_me: error: Cannot find dlsym function" >&2;}
5112    { (exit 1); exit 1; }; }
5113 fi
5114
5115                 if test "$with_gpm" != yes ; then
5116                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5117
5118 echo "${as_me:-configure}:5118: testing assuming soname for gpm is $with_gpm ..." 1>&5
5119
5120                         cf_cv_gpm_soname="$with_gpm"
5121                 else
5122
5123 echo "$as_me:5123: checking for soname of gpm library" >&5
5124 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5125 if test "${cf_cv_gpm_soname+set}" = set; then
5126   echo $ECHO_N "(cached) $ECHO_C" >&6
5127 else
5128
5129 cf_cv_gpm_soname=unknown
5130 if test "$cross_compiling" != yes ; then
5131 cat >conftest.$ac_ext <<CF_EOF
5132 #include <gpm.h>
5133 int main()
5134 {
5135 if (Gpm_Open(0,0)) Gpm_Close();
5136         ${cf_cv_main_return:-return}(0);
5137 }
5138 CF_EOF
5139 cf_save_LIBS="$LIBS"
5140         LIBS="-lgpm $LIBS"
5141         if { (eval echo "$as_me:5141: \"$ac_compile\"") >&5
5142   (eval $ac_compile) 2>&5
5143   ac_status=$?
5144   echo "$as_me:5144: \$? = $ac_status" >&5
5145   (exit $ac_status); } ; then
5146                 if { (eval echo "$as_me:5146: \"$ac_link\"") >&5
5147   (eval $ac_link) 2>&5
5148   ac_status=$?
5149   echo "$as_me:5149: \$? = $ac_status" >&5
5150   (exit $ac_status); } ; then
5151                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5152                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5153                 fi
5154         fi
5155 rm -rf conftest*
5156 LIBS="$cf_save_LIBS"
5157 fi
5158
5159 fi
5160 echo "$as_me:5160: result: $cf_cv_gpm_soname" >&5
5161 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5162
5163                 fi
5164                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5165 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5166 EOF
5167
5168                 SHLIB_LIST="-ldl $SHLIB_LIST"
5169         else
5170                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5171                 TEST_LIBS="-lgpm $TEST_LIBS"
5172         fi
5173         cat >>confdefs.h <<\EOF
5174 #define HAVE_LIBGPM 1
5175 EOF
5176
5177 echo "$as_me:5177: checking for Gpm_Wgetch in -lgpm" >&5
5178 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5179 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5180   echo $ECHO_N "(cached) $ECHO_C" >&6
5181 else
5182   ac_check_lib_save_LIBS=$LIBS
5183 LIBS="-lgpm  $LIBS"
5184 cat >conftest.$ac_ext <<_ACEOF
5185 #line 5185 "configure"
5186 #include "confdefs.h"
5187
5188 /* Override any gcc2 internal prototype to avoid an error.  */
5189 #ifdef __cplusplus
5190 extern "C"
5191 #endif
5192 /* We use char because int might match the return type of a gcc2
5193    builtin and then its argument prototype would still apply.  */
5194 char Gpm_Wgetch ();
5195 int
5196 main ()
5197 {
5198 Gpm_Wgetch ();
5199   ;
5200   return 0;
5201 }
5202 _ACEOF
5203 rm -f conftest.$ac_objext conftest$ac_exeext
5204 if { (eval echo "$as_me:5204: \"$ac_link\"") >&5
5205   (eval $ac_link) 2>&5
5206   ac_status=$?
5207   echo "$as_me:5207: \$? = $ac_status" >&5
5208   (exit $ac_status); } &&
5209          { ac_try='test -s conftest$ac_exeext'
5210   { (eval echo "$as_me:5210: \"$ac_try\"") >&5
5211   (eval $ac_try) 2>&5
5212   ac_status=$?
5213   echo "$as_me:5213: \$? = $ac_status" >&5
5214   (exit $ac_status); }; }; then
5215   ac_cv_lib_gpm_Gpm_Wgetch=yes
5216 else
5217   echo "$as_me: failed program was:" >&5
5218 cat conftest.$ac_ext >&5
5219 ac_cv_lib_gpm_Gpm_Wgetch=no
5220 fi
5221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5222 LIBS=$ac_check_lib_save_LIBS
5223 fi
5224 echo "$as_me:5224: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5225 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5226 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5227
5228 echo "$as_me:5228: checking if GPM is weakly bound to curses library" >&5
5229 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5230 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5231   echo $ECHO_N "(cached) $ECHO_C" >&6
5232 else
5233
5234 cf_cv_check_gpm_wgetch=unknown
5235 if test "$cross_compiling" != yes ; then
5236
5237 cat >conftest.$ac_ext <<CF_EOF
5238 #include <gpm.h>
5239 int main()
5240 {
5241         Gpm_Wgetch();
5242         ${cf_cv_main_return:-return}(0);
5243 }
5244 CF_EOF
5245
5246         cf_save_LIBS="$LIBS"
5247         # This only works if we can look at the symbol table.  If a shared
5248         # library is stripped for install, we cannot use that.  So we're forced
5249         # to rely on the static library, noting that some packagers may not
5250         # include it.
5251         LIBS="-static -lgpm -dynamic $LIBS"
5252         if { (eval echo "$as_me:5252: \"$ac_compile\"") >&5
5253   (eval $ac_compile) 2>&5
5254   ac_status=$?
5255   echo "$as_me:5255: \$? = $ac_status" >&5
5256   (exit $ac_status); } ; then
5257                 if { (eval echo "$as_me:5257: \"$ac_link\"") >&5
5258   (eval $ac_link) 2>&5
5259   ac_status=$?
5260   echo "$as_me:5260: \$? = $ac_status" >&5
5261   (exit $ac_status); } ; then
5262                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5263                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5264                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5265                 fi
5266         fi
5267         rm -rf conftest*
5268         LIBS="$cf_save_LIBS"
5269 fi
5270
5271 fi
5272 echo "$as_me:5272: result: $cf_cv_check_gpm_wgetch" >&5
5273 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5274
5275 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5276         { echo "$as_me:5276: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5277 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5278 fi
5279
5280 fi
5281
5282 fi
5283
5284 # not everyone has "test -c"
5285 if test -c /dev/sysmouse 2>/dev/null ; then
5286 echo "$as_me:5286: checking if you want to use sysmouse" >&5
5287 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5288
5289 # Check whether --with-sysmouse or --without-sysmouse was given.
5290 if test "${with_sysmouse+set}" = set; then
5291   withval="$with_sysmouse"
5292   cf_with_sysmouse=$withval
5293 else
5294   cf_with_sysmouse=maybe
5295 fi;
5296         if test "$cf_with_sysmouse" != no ; then
5297         cat >conftest.$ac_ext <<_ACEOF
5298 #line 5298 "configure"
5299 #include "confdefs.h"
5300
5301 #include <osreldate.h>
5302 #if (__FreeBSD_version >= 400017)
5303 #include <sys/consio.h>
5304 #include <sys/fbio.h>
5305 #else
5306 #include <machine/console.h>
5307 #endif
5308
5309 int
5310 main ()
5311 {
5312
5313         struct mouse_info the_mouse;
5314         ioctl(0, CONS_MOUSECTL, &the_mouse);
5315
5316   ;
5317   return 0;
5318 }
5319 _ACEOF
5320 rm -f conftest.$ac_objext
5321 if { (eval echo "$as_me:5321: \"$ac_compile\"") >&5
5322   (eval $ac_compile) 2>&5
5323   ac_status=$?
5324   echo "$as_me:5324: \$? = $ac_status" >&5
5325   (exit $ac_status); } &&
5326          { ac_try='test -s conftest.$ac_objext'
5327   { (eval echo "$as_me:5327: \"$ac_try\"") >&5
5328   (eval $ac_try) 2>&5
5329   ac_status=$?
5330   echo "$as_me:5330: \$? = $ac_status" >&5
5331   (exit $ac_status); }; }; then
5332   cf_with_sysmouse=yes
5333 else
5334   echo "$as_me: failed program was:" >&5
5335 cat conftest.$ac_ext >&5
5336 cf_with_sysmouse=no
5337 fi
5338 rm -f conftest.$ac_objext conftest.$ac_ext
5339         fi
5340 echo "$as_me:5340: result: $cf_with_sysmouse" >&5
5341 echo "${ECHO_T}$cf_with_sysmouse" >&6
5342 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5343 #define USE_SYSMOUSE 1
5344 EOF
5345
5346 fi
5347
5348 if test X"$CC_G_OPT" = X"" ; then
5349         CC_G_OPT='-g'
5350         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5351 fi
5352
5353 if test X"$CXX_G_OPT" = X"" ; then
5354         CXX_G_OPT='-g'
5355         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5356 fi
5357
5358 echo "$as_me:5358: checking for default loader flags" >&5
5359 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5360 case $DFT_LWR_MODEL in
5361 libtool) LD_MODEL=''   ;;
5362 normal)  LD_MODEL=''   ;;
5363 debug)   LD_MODEL=$CC_G_OPT ;;
5364 profile) LD_MODEL='-pg';;
5365 shared)  LD_MODEL=''   ;;
5366 esac
5367 echo "$as_me:5367: result: $LD_MODEL" >&5
5368 echo "${ECHO_T}$LD_MODEL" >&6
5369
5370 case $DFT_LWR_MODEL in
5371 shared)
5372
5373 echo "$as_me:5373: checking if rpath option should be used" >&5
5374 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5375
5376 # Check whether --enable-rpath or --disable-rpath was given.
5377 if test "${enable_rpath+set}" = set; then
5378   enableval="$enable_rpath"
5379   cf_cv_enable_rpath=$enableval
5380 else
5381   cf_cv_enable_rpath=no
5382 fi;
5383 echo "$as_me:5383: result: $cf_cv_enable_rpath" >&5
5384 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5385
5386 echo "$as_me:5386: checking if shared libraries should be relinked during install" >&5
5387 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5388
5389 # Check whether --enable-relink or --disable-relink was given.
5390 if test "${enable_relink+set}" = set; then
5391   enableval="$enable_relink"
5392   cf_cv_do_relink=$enableval
5393 else
5394   cf_cv_do_relink=yes
5395 fi;
5396 echo "$as_me:5396: result: $cf_cv_do_relink" >&5
5397 echo "${ECHO_T}$cf_cv_do_relink" >&6
5398         ;;
5399 esac
5400
5401 LD_RPATH_OPT=
5402 echo "$as_me:5402: checking for an rpath option" >&5
5403 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5404 case $cf_cv_system_name in #(vi
5405 irix*) #(vi
5406         if test "$GCC" = yes; then
5407                 LD_RPATH_OPT="-Wl,-rpath,"
5408         else
5409                 LD_RPATH_OPT="-rpath "
5410         fi
5411         ;;
5412 linux*|gnu*|k*bsd*-gnu) #(vi
5413         LD_RPATH_OPT="-Wl,-rpath,"
5414         ;;
5415 openbsd[2-9].*|mirbsd*) #(vi
5416         LD_RPATH_OPT="-Wl,-rpath,"
5417         ;;
5418 dragonfly*|freebsd*) #(vi
5419         LD_RPATH_OPT="-rpath "
5420         ;;
5421 netbsd*) #(vi
5422         LD_RPATH_OPT="-Wl,-rpath,"
5423         ;;
5424 osf*|mls+*) #(vi
5425         LD_RPATH_OPT="-rpath "
5426         ;;
5427 solaris2*) #(vi
5428         LD_RPATH_OPT="-R"
5429         ;;
5430 *)
5431         ;;
5432 esac
5433 echo "$as_me:5433: result: $LD_RPATH_OPT" >&5
5434 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5435
5436 case "x$LD_RPATH_OPT" in #(vi
5437 x-R*)
5438         echo "$as_me:5438: checking if we need a space after rpath option" >&5
5439 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5440         cf_save_LIBS="$LIBS"
5441         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5442         cat >conftest.$ac_ext <<_ACEOF
5443 #line 5443 "configure"
5444 #include "confdefs.h"
5445
5446 int
5447 main ()
5448 {
5449
5450   ;
5451   return 0;
5452 }
5453 _ACEOF
5454 rm -f conftest.$ac_objext conftest$ac_exeext
5455 if { (eval echo "$as_me:5455: \"$ac_link\"") >&5
5456   (eval $ac_link) 2>&5
5457   ac_status=$?
5458   echo "$as_me:5458: \$? = $ac_status" >&5
5459   (exit $ac_status); } &&
5460          { ac_try='test -s conftest$ac_exeext'
5461   { (eval echo "$as_me:5461: \"$ac_try\"") >&5
5462   (eval $ac_try) 2>&5
5463   ac_status=$?
5464   echo "$as_me:5464: \$? = $ac_status" >&5
5465   (exit $ac_status); }; }; then
5466   cf_rpath_space=no
5467 else
5468   echo "$as_me: failed program was:" >&5
5469 cat conftest.$ac_ext >&5
5470 cf_rpath_space=yes
5471 fi
5472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5473         LIBS="$cf_save_LIBS"
5474         echo "$as_me:5474: result: $cf_rpath_space" >&5
5475 echo "${ECHO_T}$cf_rpath_space" >&6
5476         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5477         ;;
5478 esac
5479
5480         LOCAL_LDFLAGS=
5481         LOCAL_LDFLAGS2=
5482         LD_SHARED_OPTS=
5483         INSTALL_LIB="-m 644"
5484
5485         cf_cv_do_symlinks=no
5486         cf_ld_rpath_opt=
5487         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5488
5489         echo "$as_me:5489: checking if release/abi version should be used for shared libs" >&5
5490 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5491
5492 # Check whether --with-shlib-version or --without-shlib-version was given.
5493 if test "${with_shlib_version+set}" = set; then
5494   withval="$with_shlib_version"
5495   test -z "$withval" && withval=auto
5496         case $withval in #(vi
5497         yes) #(vi
5498                 cf_cv_shlib_version=auto
5499                 ;;
5500         rel|abi|auto|no) #(vi
5501                 cf_cv_shlib_version=$withval
5502                 ;;
5503         *)
5504                 { { echo "$as_me:5504: error: option value must be one of: rel, abi, auto or no" >&5
5505 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5506    { (exit 1); exit 1; }; }
5507                 ;;
5508         esac
5509
5510 else
5511   cf_cv_shlib_version=auto
5512 fi;
5513         echo "$as_me:5513: result: $cf_cv_shlib_version" >&5
5514 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5515
5516         cf_cv_rm_so_locs=no
5517
5518         # Some less-capable ports of gcc support only -fpic
5519         CC_SHARED_OPTS=
5520         if test "$GCC" = yes
5521         then
5522                 echo "$as_me:5522: checking which $CC option to use" >&5
5523 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5524                 cf_save_CFLAGS="$CFLAGS"
5525                 for CC_SHARED_OPTS in -fPIC -fpic ''
5526                 do
5527                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5528                         cat >conftest.$ac_ext <<_ACEOF
5529 #line 5529 "configure"
5530 #include "confdefs.h"
5531 #include <stdio.h>
5532 int
5533 main ()
5534 {
5535 int x = 1
5536   ;
5537   return 0;
5538 }
5539 _ACEOF
5540 rm -f conftest.$ac_objext
5541 if { (eval echo "$as_me:5541: \"$ac_compile\"") >&5
5542   (eval $ac_compile) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); } &&
5546          { ac_try='test -s conftest.$ac_objext'
5547   { (eval echo "$as_me:5547: \"$ac_try\"") >&5
5548   (eval $ac_try) 2>&5
5549   ac_status=$?
5550   echo "$as_me:5550: \$? = $ac_status" >&5
5551   (exit $ac_status); }; }; then
5552   break
5553 else
5554   echo "$as_me: failed program was:" >&5
5555 cat conftest.$ac_ext >&5
5556 fi
5557 rm -f conftest.$ac_objext conftest.$ac_ext
5558                 done
5559                 echo "$as_me:5559: result: $CC_SHARED_OPTS" >&5
5560 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5561                 CFLAGS="$cf_save_CFLAGS"
5562         fi
5563
5564         cf_cv_shlib_version_infix=no
5565
5566         case $cf_cv_system_name in #(vi
5567         aix4.3-9*|aix[5-7]*) #(vi
5568                 if test "$GCC" = yes; then
5569                         CC_SHARED_OPTS=
5570                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5571                 else
5572                         # CC_SHARED_OPTS='-qpic=large -G'
5573                         # perhaps "-bM:SRE -bnoentry -bexpall"
5574                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5575                 fi
5576                 ;;
5577         beos*) #(vi
5578                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5579                 ;;
5580         cygwin*) #(vi
5581                 CC_SHARED_OPTS=
5582                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5583                 cf_cv_shlib_version=cygdll
5584                 cf_cv_shlib_version_infix=cygdll
5585                 cat >mk_shared_lib.sh <<-CF_EOF
5586                 #!/bin/sh
5587                 SHARED_LIB=\$1
5588                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5589                 shift
5590                 cat <<-EOF
5591                 Linking shared library
5592                 ** SHARED_LIB \$SHARED_LIB
5593                 ** IMPORT_LIB \$IMPORT_LIB
5594 EOF
5595                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5596 CF_EOF
5597                 chmod +x mk_shared_lib.sh
5598                 ;;
5599         darwin*) #(vi
5600                 EXTRA_CFLAGS="-no-cpp-precomp"
5601                 CC_SHARED_OPTS="-dynamic"
5602                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5603                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5604                 cf_cv_shlib_version_infix=yes
5605                 echo "$as_me:5605: checking if ld -search_paths_first works" >&5
5606 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5607 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5608   echo $ECHO_N "(cached) $ECHO_C" >&6
5609 else
5610
5611                         cf_save_LDFLAGS=$LDFLAGS
5612                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5613                         cat >conftest.$ac_ext <<_ACEOF
5614 #line 5614 "configure"
5615 #include "confdefs.h"
5616
5617 int
5618 main ()
5619 {
5620 int i;
5621   ;
5622   return 0;
5623 }
5624 _ACEOF
5625 rm -f conftest.$ac_objext conftest$ac_exeext
5626 if { (eval echo "$as_me:5626: \"$ac_link\"") >&5
5627   (eval $ac_link) 2>&5
5628   ac_status=$?
5629   echo "$as_me:5629: \$? = $ac_status" >&5
5630   (exit $ac_status); } &&
5631          { ac_try='test -s conftest$ac_exeext'
5632   { (eval echo "$as_me:5632: \"$ac_try\"") >&5
5633   (eval $ac_try) 2>&5
5634   ac_status=$?
5635   echo "$as_me:5635: \$? = $ac_status" >&5
5636   (exit $ac_status); }; }; then
5637   cf_cv_ldflags_search_paths_first=yes
5638 else
5639   echo "$as_me: failed program was:" >&5
5640 cat conftest.$ac_ext >&5
5641 cf_cv_ldflags_search_paths_first=no
5642 fi
5643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5644                                 LDFLAGS=$cf_save_LDFLAGS
5645 fi
5646 echo "$as_me:5646: result: $cf_cv_ldflags_search_paths_first" >&5
5647 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5648                 if test $cf_cv_ldflags_search_paths_first = yes; then
5649                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5650                 fi
5651                 ;;
5652         hpux*) #(vi
5653                 # (tested with gcc 2.7.2 -- I don't have c89)
5654                 if test "$GCC" = yes; then
5655                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5656                 else
5657                         CC_SHARED_OPTS='+Z'
5658                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5659                 fi
5660                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5661                 # HP-UX shared libraries must be executable, and should be
5662                 # readonly to exploit a quirk in the memory manager.
5663                 INSTALL_LIB="-m 555"
5664                 ;;
5665         interix*)
5666                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5667                 if test "$cf_cv_shlib_version" = rel; then
5668                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5669                 else
5670                         cf_shared_soname='`basename `'
5671                 fi
5672                 CC_SHARED_OPTS=
5673                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5674                 ;;
5675         irix*) #(vi
5676                 if test "$cf_cv_enable_rpath" = yes ; then
5677                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5678                 fi
5679                 # tested with IRIX 5.2 and 'cc'.
5680                 if test "$GCC" != yes; then
5681                         CC_SHARED_OPTS='-KPIC'
5682                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5683                 else
5684                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5685                 fi
5686                 cf_cv_rm_so_locs=yes
5687                 ;;
5688         linux*|gnu*|k*bsd*-gnu) #(vi
5689                 if test "$DFT_LWR_MODEL" = "shared" ; then
5690                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5691                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5692                 fi
5693                 if test "$cf_cv_enable_rpath" = yes ; then
5694                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5695                 fi
5696
5697         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5698         if test "$cf_cv_shlib_version" = rel; then
5699                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5700         else
5701                 cf_cv_shared_soname='`basename $@`'
5702         fi
5703
5704                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5705                 ;;
5706         mingw*) #(vi
5707                 cf_cv_shlib_version=mingw
5708                 cf_cv_shlib_version_infix=mingw
5709                 CC_SHARED_OPTS=
5710                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5711                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5712                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5713                 cat >mk_shared_lib.sh <<-CF_EOF
5714                 #!/bin/sh
5715                 SHARED_LIB=\$1
5716                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5717                 shift
5718                 cat <<-EOF
5719                 Linking shared library
5720                 ** SHARED_LIB \$SHARED_LIB
5721                 ** IMPORT_LIB \$IMPORT_LIB
5722 EOF
5723                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5724 CF_EOF
5725                 chmod +x mk_shared_lib.sh
5726                 ;;
5727         openbsd[2-9].*|mirbsd*) #(vi
5728                 if test "$DFT_LWR_MODEL" = "shared" ; then
5729                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5730                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5731                 fi
5732                 if test "$cf_cv_enable_rpath" = yes ; then
5733                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5734                 fi
5735                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5736
5737         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5738         if test "$cf_cv_shlib_version" = rel; then
5739                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5740         else
5741                 cf_cv_shared_soname='`basename $@`'
5742         fi
5743
5744                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5745                 ;;
5746         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5747                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5748                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5749                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5750                 ;;
5751         dragonfly*|freebsd*) #(vi
5752                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5753                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5754                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5755                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5756                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5757                 fi
5758
5759         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5760         if test "$cf_cv_shlib_version" = rel; then
5761                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5762         else
5763                 cf_cv_shared_soname='`basename $@`'
5764         fi
5765
5766                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5767                 ;;
5768         netbsd*) #(vi
5769                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5770                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5771                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5772                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5773                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5774                         if test "$cf_cv_shlib_version" = auto; then
5775                         if test -f /usr/libexec/ld.elf_so; then
5776                                 cf_cv_shlib_version=abi
5777                         else
5778                                 cf_cv_shlib_version=rel
5779                         fi
5780                         fi
5781
5782         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5783         if test "$cf_cv_shlib_version" = rel; then
5784                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5785         else
5786                 cf_cv_shared_soname='`basename $@`'
5787         fi
5788
5789                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5790                 else
5791                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5792                 fi
5793                 ;;
5794         osf*|mls+*) #(vi
5795                 # tested with OSF/1 V3.2 and 'cc'
5796                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5797                 # link with shared libs).
5798                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5799                 case $host_os in #(vi
5800                 osf4*)
5801                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5802                         ;;
5803                 esac
5804                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5805                 if test "$DFT_LWR_MODEL" = "shared" ; then
5806                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5807                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5808                 fi
5809                 cf_cv_rm_so_locs=yes
5810                 ;;
5811         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5812                 # tested with osr5.0.5
5813                 if test "$GCC" != yes; then
5814                         CC_SHARED_OPTS='-belf -KPIC'
5815                 fi
5816                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5817                 if test "$cf_cv_enable_rpath" = yes ; then
5818                         # only way is to set LD_RUN_PATH but no switch for it
5819                         RUN_PATH=$libdir
5820                 fi
5821                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5822                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5823                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5824                 ;;
5825         sunos4*) #(vi
5826                 # tested with SunOS 4.1.1 and gcc 2.7.0
5827                 if test "$GCC" != yes; then
5828                         CC_SHARED_OPTS='-KPIC'
5829                 fi
5830                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5831                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5832                 ;;
5833         solaris2*) #(vi
5834                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5835                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5836                 if test "$DFT_LWR_MODEL" = "shared" ; then
5837                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5838                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5839                 fi
5840                 if test "$cf_cv_enable_rpath" = yes ; then
5841                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5842                 fi
5843
5844         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5845         if test "$cf_cv_shlib_version" = rel; then
5846                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5847         else
5848                 cf_cv_shared_soname='`basename $@`'
5849         fi
5850
5851                 if test "$GCC" != yes; then
5852                         cf_save_CFLAGS="$CFLAGS"
5853                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5854                         do
5855                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5856                                 cat >conftest.$ac_ext <<_ACEOF
5857 #line 5857 "configure"
5858 #include "confdefs.h"
5859 #include <stdio.h>
5860 int
5861 main ()
5862 {
5863 printf("Hello\n");
5864   ;
5865   return 0;
5866 }
5867 _ACEOF
5868 rm -f conftest.$ac_objext
5869 if { (eval echo "$as_me:5869: \"$ac_compile\"") >&5
5870   (eval $ac_compile) 2>&5
5871   ac_status=$?
5872   echo "$as_me:5872: \$? = $ac_status" >&5
5873   (exit $ac_status); } &&
5874          { ac_try='test -s conftest.$ac_objext'
5875   { (eval echo "$as_me:5875: \"$ac_try\"") >&5
5876   (eval $ac_try) 2>&5
5877   ac_status=$?
5878   echo "$as_me:5878: \$? = $ac_status" >&5
5879   (exit $ac_status); }; }; then
5880   break
5881 else
5882   echo "$as_me: failed program was:" >&5
5883 cat conftest.$ac_ext >&5
5884 fi
5885 rm -f conftest.$ac_objext conftest.$ac_ext
5886                         done
5887                         CFLAGS="$cf_save_CFLAGS"
5888                         CC_SHARED_OPTS=$cf_shared_opts
5889                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5890                 else
5891                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5892                 fi
5893                 ;;
5894         sysv5uw7*|unix_sv*) #(vi
5895                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5896                 if test "$GCC" != yes; then
5897                         CC_SHARED_OPTS='-KPIC'
5898                 fi
5899                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5900                 ;;
5901         *)
5902                 CC_SHARED_OPTS='unknown'
5903                 MK_SHARED_LIB='echo unknown'
5904                 ;;
5905         esac
5906
5907         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5908         case "$cf_cv_shlib_version" in #(vi
5909         rel|abi)
5910                 case "$MK_SHARED_LIB" in #(vi
5911                 *'-o $@') #(vi
5912                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5913                         ;;
5914                 *)
5915                         { echo "$as_me:5915: WARNING: ignored --with-shlib-version" >&5
5916 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5917                         ;;
5918                 esac
5919                 ;;
5920         esac
5921
5922         # RPATH_LIST is a colon-separated list of directories
5923         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5924         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5925
5926         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5927
5928 echo "${as_me:-configure}:5928: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5929
5930         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5931
5932 echo "${as_me:-configure}:5932: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5933
5934 if test "$CC_SHARED_OPTS" = "unknown"; then
5935         for model in $cf_list_models; do
5936                 if test "$model" = "shared"; then
5937                         { { echo "$as_me:5937: error: Shared libraries are not supported in this version" >&5
5938 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5939    { (exit 1); exit 1; }; }
5940                 fi
5941         done
5942 fi
5943
5944 ### If we're building with rpath, try to link non-standard libs that way too.
5945 if test "$DFT_LWR_MODEL" = "shared"; then
5946
5947 echo "$as_me:5947: checking if rpath-hack should be disabled" >&5
5948 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5949
5950 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5951 if test "${enable_rpath_hack+set}" = set; then
5952   enableval="$enable_rpath_hack"
5953   test "$enableval" != no && enableval=yes
5954   if test "$enableval" != "yes" ; then
5955     cf_disable_rpath_hack=yes
5956   else
5957     cf_disable_rpath_hack=no
5958   fi
5959 else
5960   enableval=yes
5961   cf_disable_rpath_hack=no
5962
5963 fi;
5964 echo "$as_me:5964: result: $cf_disable_rpath_hack" >&5
5965 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5966 if test "$cf_disable_rpath_hack" = no ; then
5967
5968 echo "$as_me:5968: checking for updated LDFLAGS" >&5
5969 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5970 if test -n "$LD_RPATH_OPT" ; then
5971         echo "$as_me:5971: result: maybe" >&5
5972 echo "${ECHO_T}maybe" >&6
5973
5974         for ac_prog in ldd
5975 do
5976   # Extract the first word of "$ac_prog", so it can be a program name with args.
5977 set dummy $ac_prog; ac_word=$2
5978 echo "$as_me:5978: checking for $ac_word" >&5
5979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5980 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5981   echo $ECHO_N "(cached) $ECHO_C" >&6
5982 else
5983   if test -n "$cf_ldd_prog"; then
5984   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5985 else
5986   ac_save_IFS=$IFS; IFS=$ac_path_separator
5987 ac_dummy="$PATH"
5988 for ac_dir in $ac_dummy; do
5989   IFS=$ac_save_IFS
5990   test -z "$ac_dir" && ac_dir=.
5991   $as_executable_p "$ac_dir/$ac_word" || continue
5992 ac_cv_prog_cf_ldd_prog="$ac_prog"
5993 echo "$as_me:5993: found $ac_dir/$ac_word" >&5
5994 break
5995 done
5996
5997 fi
5998 fi
5999 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6000 if test -n "$cf_ldd_prog"; then
6001   echo "$as_me:6001: result: $cf_ldd_prog" >&5
6002 echo "${ECHO_T}$cf_ldd_prog" >&6
6003 else
6004   echo "$as_me:6004: result: no" >&5
6005 echo "${ECHO_T}no" >&6
6006 fi
6007
6008   test -n "$cf_ldd_prog" && break
6009 done
6010 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6011
6012         cf_rpath_list="/usr/lib /lib"
6013         if test "$cf_ldd_prog" != no
6014         then
6015                 cf_rpath_oops=
6016
6017 cat >conftest.$ac_ext <<_ACEOF
6018 #line 6018 "configure"
6019 #include "confdefs.h"
6020 #include <stdio.h>
6021 int
6022 main ()
6023 {
6024 printf("Hello");
6025   ;
6026   return 0;
6027 }
6028 _ACEOF
6029 rm -f conftest.$ac_objext conftest$ac_exeext
6030 if { (eval echo "$as_me:6030: \"$ac_link\"") >&5
6031   (eval $ac_link) 2>&5
6032   ac_status=$?
6033   echo "$as_me:6033: \$? = $ac_status" >&5
6034   (exit $ac_status); } &&
6035          { ac_try='test -s conftest$ac_exeext'
6036   { (eval echo "$as_me:6036: \"$ac_try\"") >&5
6037   (eval $ac_try) 2>&5
6038   ac_status=$?
6039   echo "$as_me:6039: \$? = $ac_status" >&5
6040   (exit $ac_status); }; }; then
6041   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6042                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6043 else
6044   echo "$as_me: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6046 fi
6047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6048
6049                 # If we passed the link-test, but get a "not found" on a given library,
6050                 # this could be due to inept reconfiguration of gcc to make it only
6051                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6052                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6053                 # /usr/local libraries.
6054                 if test -n "$cf_rpath_oops"
6055                 then
6056                         for cf_rpath_src in $cf_rpath_oops
6057                         do
6058                                 for cf_rpath_dir in \
6059                                         /usr/local \
6060                                         /usr/pkg \
6061                                         /opt/sfw
6062                                 do
6063                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6064                                         then
6065                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6066
6067 echo "${as_me:-configure}:6067: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6068
6069                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6070                                                 break
6071                                         fi
6072                                 done
6073                         done
6074                 fi
6075         fi
6076
6077         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6078
6079 echo "${as_me:-configure}:6079: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6080
6081 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6082
6083 echo "${as_me:-configure}:6083: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6084
6085 cf_rpath_dst=
6086 for cf_rpath_src in $LDFLAGS
6087 do
6088         case $cf_rpath_src in #(vi
6089         -L*) #(vi
6090
6091                 # check if this refers to a directory which we will ignore
6092                 cf_rpath_skip=no
6093                 if test -n "$cf_rpath_list"
6094                 then
6095                         for cf_rpath_item in $cf_rpath_list
6096                         do
6097                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6098                                 then
6099                                         cf_rpath_skip=yes
6100                                         break
6101                                 fi
6102                         done
6103                 fi
6104
6105                 if test "$cf_rpath_skip" = no
6106                 then
6107                         # transform the option
6108                         if test "$LD_RPATH_OPT" = "-R " ; then
6109                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6110                         else
6111                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6112                         fi
6113
6114                         # if we have not already added this, add it now
6115                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6116                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6117                         then
6118                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6119
6120 echo "${as_me:-configure}:6120: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6121
6122                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6123                         fi
6124                 fi
6125                 ;;
6126         esac
6127         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6128 done
6129 LDFLAGS=$cf_rpath_dst
6130
6131 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6132
6133 echo "${as_me:-configure}:6133: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6134
6135 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6136
6137 echo "${as_me:-configure}:6137: testing ...checking LIBS $LIBS ..." 1>&5
6138
6139 cf_rpath_dst=
6140 for cf_rpath_src in $LIBS
6141 do
6142         case $cf_rpath_src in #(vi
6143         -L*) #(vi
6144
6145                 # check if this refers to a directory which we will ignore
6146                 cf_rpath_skip=no
6147                 if test -n "$cf_rpath_list"
6148                 then
6149                         for cf_rpath_item in $cf_rpath_list
6150                         do
6151                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6152                                 then
6153                                         cf_rpath_skip=yes
6154                                         break
6155                                 fi
6156                         done
6157                 fi
6158
6159                 if test "$cf_rpath_skip" = no
6160                 then
6161                         # transform the option
6162                         if test "$LD_RPATH_OPT" = "-R " ; then
6163                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6164                         else
6165                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6166                         fi
6167
6168                         # if we have not already added this, add it now
6169                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6170                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6171                         then
6172                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6173
6174 echo "${as_me:-configure}:6174: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6175
6176                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6177                         fi
6178                 fi
6179                 ;;
6180         esac
6181         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6182 done
6183 LIBS=$cf_rpath_dst
6184
6185 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6186
6187 echo "${as_me:-configure}:6187: testing ...checked LIBS $LIBS ..." 1>&5
6188
6189         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6190
6191 echo "${as_me:-configure}:6191: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6192
6193 fi
6194
6195 fi
6196
6197 fi
6198
6199 ###############################################################################
6200
6201 ###     use option --disable-overwrite to leave out the link to -lcurses
6202 echo "$as_me:6202: checking if you wish to install ncurses overwriting curses" >&5
6203 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6204
6205 # Check whether --enable-overwrite or --disable-overwrite was given.
6206 if test "${enable_overwrite+set}" = set; then
6207   enableval="$enable_overwrite"
6208   with_overwrite=$enableval
6209 else
6210   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6211 fi;
6212 echo "$as_me:6212: result: $with_overwrite" >&5
6213 echo "${ECHO_T}$with_overwrite" >&6
6214
6215 echo "$as_me:6215: checking if external terminfo-database is used" >&5
6216 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6217
6218 # Check whether --enable-database or --disable-database was given.
6219 if test "${enable_database+set}" = set; then
6220   enableval="$enable_database"
6221   use_database=$enableval
6222 else
6223   use_database=yes
6224 fi;
6225 echo "$as_me:6225: result: $use_database" >&5
6226 echo "${ECHO_T}$use_database" >&6
6227
6228 case $host_os in #(vi
6229 os2*) #(vi
6230         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6231         ;;
6232 *) #(vi
6233         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6234         ;;
6235 esac
6236
6237 if test "$use_database" != no ; then
6238         cat >>confdefs.h <<\EOF
6239 #define USE_DATABASE 1
6240 EOF
6241
6242         echo "$as_me:6242: checking which terminfo source-file will be installed" >&5
6243 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6244
6245 # Check whether --with-database or --without-database was given.
6246 if test "${with_database+set}" = set; then
6247   withval="$with_database"
6248   TERMINFO_SRC=$withval
6249 fi;
6250         echo "$as_me:6250: result: $TERMINFO_SRC" >&5
6251 echo "${ECHO_T}$TERMINFO_SRC" >&6
6252
6253         echo "$as_me:6253: checking whether to use hashed database instead of directory/tree" >&5
6254 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6255
6256 # Check whether --with-hashed-db or --without-hashed-db was given.
6257 if test "${with_hashed_db+set}" = set; then
6258   withval="$with_hashed_db"
6259
6260 else
6261   with_hashed_db=no
6262 fi;
6263         echo "$as_me:6263: result: $with_hashed_db" >&5
6264 echo "${ECHO_T}$with_hashed_db" >&6
6265 else
6266         with_hashed_db=no
6267 fi
6268
6269 echo "$as_me:6269: checking for list of fallback descriptions" >&5
6270 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6271
6272 # Check whether --with-fallbacks or --without-fallbacks was given.
6273 if test "${with_fallbacks+set}" = set; then
6274   withval="$with_fallbacks"
6275   with_fallback=$withval
6276 else
6277   with_fallback=
6278 fi;
6279 echo "$as_me:6279: result: $with_fallback" >&5
6280 echo "${ECHO_T}$with_fallback" >&6
6281 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6282
6283 echo "$as_me:6283: checking if you want modern xterm or antique" >&5
6284 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6285
6286 # Check whether --with-xterm-new or --without-xterm-new was given.
6287 if test "${with_xterm_new+set}" = set; then
6288   withval="$with_xterm_new"
6289   with_xterm_new=$withval
6290 else
6291   with_xterm_new=yes
6292 fi;
6293 case $with_xterm_new in
6294 no)     with_xterm_new=xterm-old;;
6295 *)      with_xterm_new=xterm-new;;
6296 esac
6297 echo "$as_me:6297: result: $with_xterm_new" >&5
6298 echo "${ECHO_T}$with_xterm_new" >&6
6299 WHICH_XTERM=$with_xterm_new
6300
6301 echo "$as_me:6301: checking if xterm backspace sends BS or DEL" >&5
6302 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6303
6304 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6305 if test "${with_xterm_kbs+set}" = set; then
6306   withval="$with_xterm_kbs"
6307   with_xterm_kbs=$withval
6308 else
6309   with_xterm_kbs=BS
6310 fi;
6311 case x$with_xterm_kbs in
6312 xyes|xno|xBS|xbs|x8)
6313         with_xterm_kbs=BS
6314         ;;
6315 xDEL|xdel|x127)
6316         with_xterm_kbs=DEL
6317         ;;
6318 *)
6319         with_xterm_kbs=$withval
6320         ;;
6321 esac
6322 echo "$as_me:6322: result: $with_xterm_kbs" >&5
6323 echo "${ECHO_T}$with_xterm_kbs" >&6
6324 XTERM_KBS=$with_xterm_kbs
6325
6326 MAKE_TERMINFO=
6327 if test "$use_database" = no ; then
6328         TERMINFO="${datadir}/terminfo"
6329         MAKE_TERMINFO="#"
6330 else
6331
6332 echo "$as_me:6332: checking for list of terminfo directories" >&5
6333 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6334
6335         case $cf_cv_system_name in
6336         os2*)   PATH_SEPARATOR=';'  ;;
6337         *)      PATH_SEPARATOR=':'  ;;
6338         esac
6339
6340 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6341 if test "${with_terminfo_dirs+set}" = set; then
6342   withval="$with_terminfo_dirs"
6343
6344 else
6345   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6346 fi;
6347 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6348 cf_dst_path=
6349 for cf_src_path in $withval
6350 do
6351
6352 if test "x$prefix" != xNONE; then
6353   cf_path_syntax="$prefix"
6354 else
6355   cf_path_syntax="$ac_default_prefix"
6356 fi
6357
6358 case ".$cf_src_path" in #(vi
6359 .\$\(*\)*|.\'*\'*) #(vi
6360   ;;
6361 ..|./*|.\\*) #(vi
6362   ;;
6363 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6364   ;;
6365 .\${*prefix}*|.\${*dir}*) #(vi
6366   eval cf_src_path="$cf_src_path"
6367   case ".$cf_src_path" in #(vi
6368   .NONE/*)
6369     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6370     ;;
6371   esac
6372   ;; #(vi
6373 .no|.NONE/*)
6374   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6375   ;;
6376 *)
6377   { { echo "$as_me:6377: error: expected a pathname, not \"$cf_src_path\"" >&5
6378 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6379    { (exit 1); exit 1; }; }
6380   ;;
6381 esac
6382
6383   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6384   cf_dst_path="${cf_dst_path}${cf_src_path}"
6385 done
6386 IFS="$ac_save_ifs"
6387
6388 eval TERMINFO_DIRS="$cf_dst_path"
6389
6390 echo "$as_me:6390: result: $TERMINFO_DIRS" >&5
6391 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6392 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6393 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6394 EOF
6395
6396 echo "$as_me:6396: checking for default terminfo directory" >&5
6397 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6398
6399 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6400 if test "${with_default_terminfo_dir+set}" = set; then
6401   withval="$with_default_terminfo_dir"
6402
6403 else
6404   withval="${TERMINFO:-${datadir}/terminfo}"
6405 fi; if test -n "${datadir}/terminfo" ; then
6406
6407 if test "x$prefix" != xNONE; then
6408   cf_path_syntax="$prefix"
6409 else
6410   cf_path_syntax="$ac_default_prefix"
6411 fi
6412
6413 case ".$withval" in #(vi
6414 .\$\(*\)*|.\'*\'*) #(vi
6415   ;;
6416 ..|./*|.\\*) #(vi
6417   ;;
6418 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6419   ;;
6420 .\${*prefix}*|.\${*dir}*) #(vi
6421   eval withval="$withval"
6422   case ".$withval" in #(vi
6423   .NONE/*)
6424     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6425     ;;
6426   esac
6427   ;; #(vi
6428 .no|.NONE/*)
6429   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6430   ;;
6431 *)
6432   { { echo "$as_me:6432: error: expected a pathname, not \"$withval\"" >&5
6433 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6434    { (exit 1); exit 1; }; }
6435   ;;
6436 esac
6437
6438 fi
6439 eval TERMINFO="$withval"
6440
6441 echo "$as_me:6441: result: $TERMINFO" >&5
6442 echo "${ECHO_T}$TERMINFO" >&6
6443 cat >>confdefs.h <<EOF
6444 #define TERMINFO "$TERMINFO"
6445 EOF
6446
6447 fi
6448
6449 ###     use option --disable-big-core to make tic run on small machines
6450 ###     We need 4Mb, check if we can allocate 50% more than that.
6451 echo "$as_me:6451: checking if big-core option selected" >&5
6452 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6453
6454 # Check whether --enable-big-core or --disable-big-core was given.
6455 if test "${enable_big_core+set}" = set; then
6456   enableval="$enable_big_core"
6457   with_big_core=$enableval
6458 else
6459   if test "$cross_compiling" = yes; then
6460   with_big_core=no
6461 else
6462   cat >conftest.$ac_ext <<_ACEOF
6463 #line 6463 "configure"
6464 #include "confdefs.h"
6465
6466 #include <stdlib.h>
6467 #include <string.h>
6468 int main() {
6469         unsigned long n = 6000000L;
6470         char *s = malloc(n);
6471         if (s != 0)
6472                 s[0] = s[n-1] = 0;
6473         ${cf_cv_main_return:-return}(s == 0);
6474 }
6475 _ACEOF
6476 rm -f conftest$ac_exeext
6477 if { (eval echo "$as_me:6477: \"$ac_link\"") >&5
6478   (eval $ac_link) 2>&5
6479   ac_status=$?
6480   echo "$as_me:6480: \$? = $ac_status" >&5
6481   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6482   { (eval echo "$as_me:6482: \"$ac_try\"") >&5
6483   (eval $ac_try) 2>&5
6484   ac_status=$?
6485   echo "$as_me:6485: \$? = $ac_status" >&5
6486   (exit $ac_status); }; }; then
6487   with_big_core=yes
6488 else
6489   echo "$as_me: program exited with status $ac_status" >&5
6490 echo "$as_me: failed program was:" >&5
6491 cat conftest.$ac_ext >&5
6492 with_big_core=no
6493 fi
6494 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6495 fi
6496 fi;
6497 echo "$as_me:6497: result: $with_big_core" >&5
6498 echo "${ECHO_T}$with_big_core" >&6
6499 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6500 #define HAVE_BIG_CORE 1
6501 EOF
6502
6503 ### ISO C only guarantees 512-char strings, we have tables which load faster
6504 ### when constructed using "big" strings.  More than the C compiler, the awk
6505 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6506 echo "$as_me:6506: checking if big-strings option selected" >&5
6507 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6508
6509 # Check whether --enable-big-strings or --disable-big-strings was given.
6510 if test "${enable_big_strings+set}" = set; then
6511   enableval="$enable_big_strings"
6512   with_big_strings=$enableval
6513 else
6514
6515         case x$AWK in #(vi
6516         x)
6517                 eval with_big_strings=no
6518                 ;;
6519         *) #(vi
6520                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6521                         | $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
6522                         eval with_big_strings=yes
6523                 else
6524                         eval with_big_strings=no
6525                 fi
6526                 ;;
6527         esac
6528
6529 fi;
6530 echo "$as_me:6530: result: $with_big_strings" >&5
6531 echo "${ECHO_T}$with_big_strings" >&6
6532
6533 USE_BIG_STRINGS=0
6534 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6535
6536 ###     use option --enable-termcap to compile in the termcap fallback support
6537 echo "$as_me:6537: checking if you want termcap-fallback support" >&5
6538 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6539
6540 # Check whether --enable-termcap or --disable-termcap was given.
6541 if test "${enable_termcap+set}" = set; then
6542   enableval="$enable_termcap"
6543   with_termcap=$enableval
6544 else
6545   with_termcap=no
6546 fi;
6547 echo "$as_me:6547: result: $with_termcap" >&5
6548 echo "${ECHO_T}$with_termcap" >&6
6549
6550 if test "$with_termcap" != "yes" ; then
6551         if test "$use_database" = no ; then
6552                 if test -z "$with_fallback" ; then
6553                         { { echo "$as_me:6553: error: You have disabled the database w/o specifying fallbacks" >&5
6554 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6555    { (exit 1); exit 1; }; }
6556                 fi
6557         fi
6558         cat >>confdefs.h <<\EOF
6559 #define PURE_TERMINFO 1
6560 EOF
6561
6562 else
6563
6564 if test "$with_ticlib" != no ; then
6565         { { echo "$as_me:6565: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6566 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6567    { (exit 1); exit 1; }; }
6568 fi
6569
6570 cat >>confdefs.h <<\EOF
6571 #define USE_TERMCAP 1
6572 EOF
6573
6574 echo "$as_me:6574: checking for list of termcap files" >&5
6575 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6576
6577 # Check whether --with-termpath or --without-termpath was given.
6578 if test "${with_termpath+set}" = set; then
6579   withval="$with_termpath"
6580
6581 else
6582   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6583 fi;
6584 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6585 cf_dst_path=
6586 for cf_src_path in $withval
6587 do
6588
6589 if test "x$prefix" != xNONE; then
6590   cf_path_syntax="$prefix"
6591 else
6592   cf_path_syntax="$ac_default_prefix"
6593 fi
6594
6595 case ".$cf_src_path" in #(vi
6596 .\$\(*\)*|.\'*\'*) #(vi
6597   ;;
6598 ..|./*|.\\*) #(vi
6599   ;;
6600 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6601   ;;
6602 .\${*prefix}*|.\${*dir}*) #(vi
6603   eval cf_src_path="$cf_src_path"
6604   case ".$cf_src_path" in #(vi
6605   .NONE/*)
6606     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6607     ;;
6608   esac
6609   ;; #(vi
6610 .no|.NONE/*)
6611   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6612   ;;
6613 *)
6614   { { echo "$as_me:6614: error: expected a pathname, not \"$cf_src_path\"" >&5
6615 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6616    { (exit 1); exit 1; }; }
6617   ;;
6618 esac
6619
6620   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6621   cf_dst_path="${cf_dst_path}${cf_src_path}"
6622 done
6623 IFS="$ac_save_ifs"
6624
6625 eval TERMPATH="$cf_dst_path"
6626
6627 echo "$as_me:6627: result: $TERMPATH" >&5
6628 echo "${ECHO_T}$TERMPATH" >&6
6629 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6630 #define TERMPATH "$TERMPATH"
6631 EOF
6632
6633 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6634 echo "$as_me:6634: checking if fast termcap-loader is needed" >&5
6635 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6636
6637 # Check whether --enable-getcap or --disable-getcap was given.
6638 if test "${enable_getcap+set}" = set; then
6639   enableval="$enable_getcap"
6640   with_getcap=$enableval
6641 else
6642   with_getcap=no
6643 fi;
6644 echo "$as_me:6644: result: $with_getcap" >&5
6645 echo "${ECHO_T}$with_getcap" >&6
6646 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6647 #define USE_GETCAP 1
6648 EOF
6649
6650 echo "$as_me:6650: checking if translated termcaps will be cached in ~/.terminfo" >&5
6651 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6652
6653 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6654 if test "${enable_getcap_cache+set}" = set; then
6655   enableval="$enable_getcap_cache"
6656   with_getcap_cache=$enableval
6657 else
6658   with_getcap_cache=no
6659 fi;
6660 echo "$as_me:6660: result: $with_getcap_cache" >&5
6661 echo "${ECHO_T}$with_getcap_cache" >&6
6662 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6663 #define USE_GETCAP_CACHE 1
6664 EOF
6665
6666 fi
6667
6668 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6669 echo "$as_me:6669: checking if ~/.terminfo is wanted" >&5
6670 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6671
6672 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6673 if test "${enable_home_terminfo+set}" = set; then
6674   enableval="$enable_home_terminfo"
6675   with_home_terminfo=$enableval
6676 else
6677   with_home_terminfo=yes
6678 fi;
6679 echo "$as_me:6679: result: $with_home_terminfo" >&5
6680 echo "${ECHO_T}$with_home_terminfo" >&6
6681 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6682 #define USE_HOME_TERMINFO 1
6683 EOF
6684
6685 echo "$as_me:6685: checking if you want to use restricted environment when running as root" >&5
6686 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6687
6688 # Check whether --enable-root-environ or --disable-root-environ was given.
6689 if test "${enable_root_environ+set}" = set; then
6690   enableval="$enable_root_environ"
6691   with_root_environ=$enableval
6692 else
6693   with_root_environ=yes
6694 fi;
6695 echo "$as_me:6695: result: $with_root_environ" >&5
6696 echo "${ECHO_T}$with_root_environ" >&6
6697 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6698 #define USE_ROOT_ENVIRON 1
6699 EOF
6700
6701 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6702 ###   to reduce storage requirements for the terminfo database.
6703
6704 for ac_func in \
6705         remove \
6706         unlink
6707 do
6708 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6709 echo "$as_me:6709: checking for $ac_func" >&5
6710 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6711 if eval "test \"\${$as_ac_var+set}\" = set"; then
6712   echo $ECHO_N "(cached) $ECHO_C" >&6
6713 else
6714   cat >conftest.$ac_ext <<_ACEOF
6715 #line 6715 "configure"
6716 #include "confdefs.h"
6717 /* System header to define __stub macros and hopefully few prototypes,
6718     which can conflict with char $ac_func (); below.  */
6719 #include <assert.h>
6720 /* Override any gcc2 internal prototype to avoid an error.  */
6721 #ifdef __cplusplus
6722 extern "C"
6723 #endif
6724 /* We use char because int might match the return type of a gcc2
6725    builtin and then its argument prototype would still apply.  */
6726 char $ac_func ();
6727 char (*f) ();
6728
6729 int
6730 main ()
6731 {
6732 /* The GNU C library defines this for functions which it implements
6733     to always fail with ENOSYS.  Some functions are actually named
6734     something starting with __ and the normal name is an alias.  */
6735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6736 choke me
6737 #else
6738 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6739 #endif
6740
6741   ;
6742   return 0;
6743 }
6744 _ACEOF
6745 rm -f conftest.$ac_objext conftest$ac_exeext
6746 if { (eval echo "$as_me:6746: \"$ac_link\"") >&5
6747   (eval $ac_link) 2>&5
6748   ac_status=$?
6749   echo "$as_me:6749: \$? = $ac_status" >&5
6750   (exit $ac_status); } &&
6751          { ac_try='test -s conftest$ac_exeext'
6752   { (eval echo "$as_me:6752: \"$ac_try\"") >&5
6753   (eval $ac_try) 2>&5
6754   ac_status=$?
6755   echo "$as_me:6755: \$? = $ac_status" >&5
6756   (exit $ac_status); }; }; then
6757   eval "$as_ac_var=yes"
6758 else
6759   echo "$as_me: failed program was:" >&5
6760 cat conftest.$ac_ext >&5
6761 eval "$as_ac_var=no"
6762 fi
6763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6764 fi
6765 echo "$as_me:6765: result: `eval echo '${'$as_ac_var'}'`" >&5
6766 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6767 if test `eval echo '${'$as_ac_var'}'` = yes; then
6768   cat >>confdefs.h <<EOF
6769 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6770 EOF
6771
6772 fi
6773 done
6774
6775 if test "$cross_compiling" = yes ; then
6776
6777 for ac_func in \
6778                 link \
6779                 symlink
6780 do
6781 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6782 echo "$as_me:6782: checking for $ac_func" >&5
6783 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6784 if eval "test \"\${$as_ac_var+set}\" = set"; then
6785   echo $ECHO_N "(cached) $ECHO_C" >&6
6786 else
6787   cat >conftest.$ac_ext <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6790 /* System header to define __stub macros and hopefully few prototypes,
6791     which can conflict with char $ac_func (); below.  */
6792 #include <assert.h>
6793 /* Override any gcc2 internal prototype to avoid an error.  */
6794 #ifdef __cplusplus
6795 extern "C"
6796 #endif
6797 /* We use char because int might match the return type of a gcc2
6798    builtin and then its argument prototype would still apply.  */
6799 char $ac_func ();
6800 char (*f) ();
6801
6802 int
6803 main ()
6804 {
6805 /* The GNU C library defines this for functions which it implements
6806     to always fail with ENOSYS.  Some functions are actually named
6807     something starting with __ and the normal name is an alias.  */
6808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6809 choke me
6810 #else
6811 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6812 #endif
6813
6814   ;
6815   return 0;
6816 }
6817 _ACEOF
6818 rm -f conftest.$ac_objext conftest$ac_exeext
6819 if { (eval echo "$as_me:6819: \"$ac_link\"") >&5
6820   (eval $ac_link) 2>&5
6821   ac_status=$?
6822   echo "$as_me:6822: \$? = $ac_status" >&5
6823   (exit $ac_status); } &&
6824          { ac_try='test -s conftest$ac_exeext'
6825   { (eval echo "$as_me:6825: \"$ac_try\"") >&5
6826   (eval $ac_try) 2>&5
6827   ac_status=$?
6828   echo "$as_me:6828: \$? = $ac_status" >&5
6829   (exit $ac_status); }; }; then
6830   eval "$as_ac_var=yes"
6831 else
6832   echo "$as_me: failed program was:" >&5
6833 cat conftest.$ac_ext >&5
6834 eval "$as_ac_var=no"
6835 fi
6836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6837 fi
6838 echo "$as_me:6838: result: `eval echo '${'$as_ac_var'}'`" >&5
6839 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6840 if test `eval echo '${'$as_ac_var'}'` = yes; then
6841   cat >>confdefs.h <<EOF
6842 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6843 EOF
6844
6845 fi
6846 done
6847
6848 else
6849         echo "$as_me:6849: checking if link/symlink functions work" >&5
6850 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6851 if test "${cf_cv_link_funcs+set}" = set; then
6852   echo $ECHO_N "(cached) $ECHO_C" >&6
6853 else
6854
6855                 cf_cv_link_funcs=
6856                 for cf_func in link symlink ; do
6857                         if test "$cross_compiling" = yes; then
6858
6859                         eval 'ac_cv_func_'$cf_func'=error'
6860 else
6861   cat >conftest.$ac_ext <<_ACEOF
6862 #line 6862 "configure"
6863 #include "confdefs.h"
6864
6865 #include <sys/types.h>
6866 #include <sys/stat.h>
6867 #ifdef HAVE_UNISTD_H
6868 #include <unistd.h>
6869 #endif
6870 int main()
6871 {
6872         int fail = 0;
6873         char *src = "config.log";
6874         char *dst = "conftest.chk";
6875         struct stat src_sb;
6876         struct stat dst_sb;
6877
6878         stat(src, &src_sb);
6879         fail = ($cf_func("config.log", "conftest.chk") < 0)
6880             || (stat(dst, &dst_sb) < 0)
6881             || (dst_sb.st_mtime != src_sb.st_mtime);
6882 #ifdef HAVE_UNLINK
6883         unlink(dst);
6884 #else
6885         remove(dst);
6886 #endif
6887         ${cf_cv_main_return:-return} (fail);
6888 }
6889
6890 _ACEOF
6891 rm -f conftest$ac_exeext
6892 if { (eval echo "$as_me:6892: \"$ac_link\"") >&5
6893   (eval $ac_link) 2>&5
6894   ac_status=$?
6895   echo "$as_me:6895: \$? = $ac_status" >&5
6896   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6897   { (eval echo "$as_me:6897: \"$ac_try\"") >&5
6898   (eval $ac_try) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit $ac_status); }; }; then
6902
6903                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6904                         eval 'ac_cv_func_'$cf_func'=yes'
6905 else
6906   echo "$as_me: program exited with status $ac_status" >&5
6907 echo "$as_me: failed program was:" >&5
6908 cat conftest.$ac_ext >&5
6909
6910                         eval 'ac_cv_func_'$cf_func'=no'
6911 fi
6912 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6913 fi
6914                 done
6915                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6916
6917 fi
6918 echo "$as_me:6918: result: $cf_cv_link_funcs" >&5
6919 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6920         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6921 #define HAVE_LINK 1
6922 EOF
6923
6924         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6925 #define HAVE_SYMLINK 1
6926 EOF
6927
6928 fi
6929
6930 with_links=no
6931 with_symlinks=no
6932
6933 # soft links (symbolic links) are useful for some systems where hard links do
6934 # not work, or to make it simpler to copy terminfo trees around.
6935 if test "$ac_cv_func_symlink" = yes ; then
6936     echo "$as_me:6936: checking if tic should use symbolic links" >&5
6937 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6938
6939 # Check whether --enable-symlinks or --disable-symlinks was given.
6940 if test "${enable_symlinks+set}" = set; then
6941   enableval="$enable_symlinks"
6942   with_symlinks=$enableval
6943 else
6944   with_symlinks=no
6945 fi;
6946     echo "$as_me:6946: result: $with_symlinks" >&5
6947 echo "${ECHO_T}$with_symlinks" >&6
6948 fi
6949
6950 # If we have hard links and did not choose to use soft links instead, there is
6951 # no reason to make this choice optional - use the hard links.
6952 if test "$with_symlinks" = no ; then
6953     echo "$as_me:6953: checking if tic should use hard links" >&5
6954 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6955     if test "$ac_cv_func_link" = yes ; then
6956         with_links=yes
6957     else
6958         with_links=no
6959     fi
6960     echo "$as_me:6960: result: $with_links" >&5
6961 echo "${ECHO_T}$with_links" >&6
6962 fi
6963
6964 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6965 #define USE_LINKS 1
6966 EOF
6967
6968 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6969 #define USE_SYMLINKS 1
6970 EOF
6971
6972 ###   use option --enable-broken-linker to force on use of broken-linker support
6973 echo "$as_me:6973: checking if you want broken-linker support code" >&5
6974 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6975
6976 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6977 if test "${enable_broken_linker+set}" = set; then
6978   enableval="$enable_broken_linker"
6979   with_broken_linker=$enableval
6980 else
6981   with_broken_linker=${BROKEN_LINKER:-no}
6982 fi;
6983 echo "$as_me:6983: result: $with_broken_linker" >&5
6984 echo "${ECHO_T}$with_broken_linker" >&6
6985
6986 BROKEN_LINKER=0
6987 if test "$with_broken_linker" = yes ; then
6988         cat >>confdefs.h <<\EOF
6989 #define BROKEN_LINKER 1
6990 EOF
6991
6992         BROKEN_LINKER=1
6993 elif test "$DFT_LWR_MODEL" = shared ; then
6994         case $cf_cv_system_name in #(vi
6995         cygwin*)
6996                 cat >>confdefs.h <<\EOF
6997 #define BROKEN_LINKER 1
6998 EOF
6999
7000                 BROKEN_LINKER=1
7001                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7002
7003 echo "${as_me:-configure}:7003: testing cygwin linker is broken anyway ..." 1>&5
7004
7005                 ;;
7006         esac
7007 fi
7008
7009 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7010 echo "$as_me:7010: checking if tputs should process BSD-style prefix padding" >&5
7011 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7012
7013 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7014 if test "${enable_bsdpad+set}" = set; then
7015   enableval="$enable_bsdpad"
7016   with_bsdpad=$enableval
7017 else
7018   with_bsdpad=no
7019 fi;
7020 echo "$as_me:7020: result: $with_bsdpad" >&5
7021 echo "${ECHO_T}$with_bsdpad" >&6
7022 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7023 #define BSD_TPUTS 1
7024 EOF
7025
7026 ###   use option --enable-widec to turn on use of wide-character support
7027 NCURSES_CH_T=chtype
7028 NCURSES_LIBUTF8=0
7029
7030 NEED_WCHAR_H=0
7031 NCURSES_MBSTATE_T=0
7032 NCURSES_WCHAR_T=0
7033 NCURSES_WINT_T=0
7034
7035 # Check to define _XOPEN_SOURCE "automatically"
7036
7037 cf_XOPEN_SOURCE=500
7038 cf_POSIX_C_SOURCE=199506L
7039 cf_xopen_source=
7040
7041 case $host_os in #(vi
7042 aix[4-7]*) #(vi
7043         cf_xopen_source="-D_ALL_SOURCE"
7044         ;;
7045 cygwin) #(vi
7046         cf_XOPEN_SOURCE=600
7047         ;;
7048 darwin[0-8].*) #(vi
7049         cf_xopen_source="-D_APPLE_C_SOURCE"
7050         ;;
7051 darwin*) #(vi
7052         cf_xopen_source="-D_DARWIN_C_SOURCE"
7053         cf_XOPEN_SOURCE=
7054         ;;
7055 freebsd*|dragonfly*) #(vi
7056         # 5.x headers associate
7057         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7058         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7059         cf_POSIX_C_SOURCE=200112L
7060         cf_XOPEN_SOURCE=600
7061         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7062         ;;
7063 hpux11*) #(vi
7064         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7065         ;;
7066 hpux*) #(vi
7067         cf_xopen_source="-D_HPUX_SOURCE"
7068         ;;
7069 irix[56].*) #(vi
7070         cf_xopen_source="-D_SGI_SOURCE"
7071         cf_XOPEN_SOURCE=
7072         ;;
7073 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7074
7075 echo "$as_me:7075: checking if we must define _GNU_SOURCE" >&5
7076 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7077 if test "${cf_cv_gnu_source+set}" = set; then
7078   echo $ECHO_N "(cached) $ECHO_C" >&6
7079 else
7080
7081 cat >conftest.$ac_ext <<_ACEOF
7082 #line 7082 "configure"
7083 #include "confdefs.h"
7084 #include <sys/types.h>
7085 int
7086 main ()
7087 {
7088
7089 #ifndef _XOPEN_SOURCE
7090 make an error
7091 #endif
7092   ;
7093   return 0;
7094 }
7095 _ACEOF
7096 rm -f conftest.$ac_objext
7097 if { (eval echo "$as_me:7097: \"$ac_compile\"") >&5
7098   (eval $ac_compile) 2>&5
7099   ac_status=$?
7100   echo "$as_me:7100: \$? = $ac_status" >&5
7101   (exit $ac_status); } &&
7102          { ac_try='test -s conftest.$ac_objext'
7103   { (eval echo "$as_me:7103: \"$ac_try\"") >&5
7104   (eval $ac_try) 2>&5
7105   ac_status=$?
7106   echo "$as_me:7106: \$? = $ac_status" >&5
7107   (exit $ac_status); }; }; then
7108   cf_cv_gnu_source=no
7109 else
7110   echo "$as_me: failed program was:" >&5
7111 cat conftest.$ac_ext >&5
7112 cf_save="$CPPFLAGS"
7113          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7114          cat >conftest.$ac_ext <<_ACEOF
7115 #line 7115 "configure"
7116 #include "confdefs.h"
7117 #include <sys/types.h>
7118 int
7119 main ()
7120 {
7121
7122 #ifdef _XOPEN_SOURCE
7123 make an error
7124 #endif
7125   ;
7126   return 0;
7127 }
7128 _ACEOF
7129 rm -f conftest.$ac_objext
7130 if { (eval echo "$as_me:7130: \"$ac_compile\"") >&5
7131   (eval $ac_compile) 2>&5
7132   ac_status=$?
7133   echo "$as_me:7133: \$? = $ac_status" >&5
7134   (exit $ac_status); } &&
7135          { ac_try='test -s conftest.$ac_objext'
7136   { (eval echo "$as_me:7136: \"$ac_try\"") >&5
7137   (eval $ac_try) 2>&5
7138   ac_status=$?
7139   echo "$as_me:7139: \$? = $ac_status" >&5
7140   (exit $ac_status); }; }; then
7141   cf_cv_gnu_source=no
7142 else
7143   echo "$as_me: failed program was:" >&5
7144 cat conftest.$ac_ext >&5
7145 cf_cv_gnu_source=yes
7146 fi
7147 rm -f conftest.$ac_objext conftest.$ac_ext
7148         CPPFLAGS="$cf_save"
7149
7150 fi
7151 rm -f conftest.$ac_objext conftest.$ac_ext
7152
7153 fi
7154 echo "$as_me:7154: result: $cf_cv_gnu_source" >&5
7155 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7156 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7157
7158         ;;
7159 mirbsd*) #(vi
7160         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7161         cf_XOPEN_SOURCE=
7162
7163 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7164
7165 cf_save_CFLAGS="$CFLAGS"
7166 cf_save_CPPFLAGS="$CPPFLAGS"
7167
7168 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7169         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7170                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7171
7172 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7173         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7174                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7175
7176 echo "$as_me:7176: checking if we should define _POSIX_C_SOURCE" >&5
7177 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7178 if test "${cf_cv_posix_c_source+set}" = set; then
7179   echo $ECHO_N "(cached) $ECHO_C" >&6
7180 else
7181
7182 echo "${as_me:-configure}:7182: testing if the symbol is already defined go no further ..." 1>&5
7183
7184         cat >conftest.$ac_ext <<_ACEOF
7185 #line 7185 "configure"
7186 #include "confdefs.h"
7187 #include <sys/types.h>
7188 int
7189 main ()
7190 {
7191
7192 #ifndef _POSIX_C_SOURCE
7193 make an error
7194 #endif
7195   ;
7196   return 0;
7197 }
7198 _ACEOF
7199 rm -f conftest.$ac_objext
7200 if { (eval echo "$as_me:7200: \"$ac_compile\"") >&5
7201   (eval $ac_compile) 2>&5
7202   ac_status=$?
7203   echo "$as_me:7203: \$? = $ac_status" >&5
7204   (exit $ac_status); } &&
7205          { ac_try='test -s conftest.$ac_objext'
7206   { (eval echo "$as_me:7206: \"$ac_try\"") >&5
7207   (eval $ac_try) 2>&5
7208   ac_status=$?
7209   echo "$as_me:7209: \$? = $ac_status" >&5
7210   (exit $ac_status); }; }; then
7211   cf_cv_posix_c_source=no
7212 else
7213   echo "$as_me: failed program was:" >&5
7214 cat conftest.$ac_ext >&5
7215 cf_want_posix_source=no
7216          case .$cf_POSIX_C_SOURCE in #(vi
7217          .[12]??*) #(vi
7218                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7219                 ;;
7220          .2) #(vi
7221                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7222                 cf_want_posix_source=yes
7223                 ;;
7224          .*)
7225                 cf_want_posix_source=yes
7226                 ;;
7227          esac
7228          if test "$cf_want_posix_source" = yes ; then
7229                 cat >conftest.$ac_ext <<_ACEOF
7230 #line 7230 "configure"
7231 #include "confdefs.h"
7232 #include <sys/types.h>
7233 int
7234 main ()
7235 {
7236
7237 #ifdef _POSIX_SOURCE
7238 make an error
7239 #endif
7240   ;
7241   return 0;
7242 }
7243 _ACEOF
7244 rm -f conftest.$ac_objext
7245 if { (eval echo "$as_me:7245: \"$ac_compile\"") >&5
7246   (eval $ac_compile) 2>&5
7247   ac_status=$?
7248   echo "$as_me:7248: \$? = $ac_status" >&5
7249   (exit $ac_status); } &&
7250          { ac_try='test -s conftest.$ac_objext'
7251   { (eval echo "$as_me:7251: \"$ac_try\"") >&5
7252   (eval $ac_try) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit $ac_status); }; }; then
7256   :
7257 else
7258   echo "$as_me: failed program was:" >&5
7259 cat conftest.$ac_ext >&5
7260 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7261 fi
7262 rm -f conftest.$ac_objext conftest.$ac_ext
7263          fi
7264
7265 echo "${as_me:-configure}:7265: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7266
7267          CFLAGS="$cf_trim_CFLAGS"
7268          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7269
7270 echo "${as_me:-configure}:7270: testing if the second compile does not leave our definition intact error ..." 1>&5
7271
7272          cat >conftest.$ac_ext <<_ACEOF
7273 #line 7273 "configure"
7274 #include "confdefs.h"
7275 #include <sys/types.h>
7276 int
7277 main ()
7278 {
7279
7280 #ifndef _POSIX_C_SOURCE
7281 make an error
7282 #endif
7283   ;
7284   return 0;
7285 }
7286 _ACEOF
7287 rm -f conftest.$ac_objext
7288 if { (eval echo "$as_me:7288: \"$ac_compile\"") >&5
7289   (eval $ac_compile) 2>&5
7290   ac_status=$?
7291   echo "$as_me:7291: \$? = $ac_status" >&5
7292   (exit $ac_status); } &&
7293          { ac_try='test -s conftest.$ac_objext'
7294   { (eval echo "$as_me:7294: \"$ac_try\"") >&5
7295   (eval $ac_try) 2>&5
7296   ac_status=$?
7297   echo "$as_me:7297: \$? = $ac_status" >&5
7298   (exit $ac_status); }; }; then
7299   :
7300 else
7301   echo "$as_me: failed program was:" >&5
7302 cat conftest.$ac_ext >&5
7303 cf_cv_posix_c_source=no
7304 fi
7305 rm -f conftest.$ac_objext conftest.$ac_ext
7306          CFLAGS="$cf_save_CFLAGS"
7307          CPPFLAGS="$cf_save_CPPFLAGS"
7308
7309 fi
7310 rm -f conftest.$ac_objext conftest.$ac_ext
7311
7312 fi
7313 echo "$as_me:7313: result: $cf_cv_posix_c_source" >&5
7314 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7315
7316 if test "$cf_cv_posix_c_source" != no ; then
7317         CFLAGS="$cf_trim_CFLAGS"
7318         CPPFLAGS="$cf_trim_CPPFLAGS"
7319
7320 cf_fix_cppflags=no
7321 cf_new_cflags=
7322 cf_new_cppflags=
7323 cf_new_extra_cppflags=
7324
7325 for cf_add_cflags in $cf_cv_posix_c_source
7326 do
7327 case $cf_fix_cppflags in
7328 no)
7329         case $cf_add_cflags in #(vi
7330         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7331                 case $cf_add_cflags in
7332                 -D*)
7333                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7334
7335                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7336                                 && test -z "${cf_tst_cflags}" \
7337                                 && cf_fix_cppflags=yes
7338
7339                         if test $cf_fix_cppflags = yes ; then
7340                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7341                                 continue
7342                         elif test "${cf_tst_cflags}" = "\"'" ; then
7343                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7344                                 continue
7345                         fi
7346                         ;;
7347                 esac
7348                 case "$CPPFLAGS" in
7349                 *$cf_add_cflags) #(vi
7350                         ;;
7351                 *) #(vi
7352                         case $cf_add_cflags in #(vi
7353                         -D*)
7354                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7355
7356 CPPFLAGS=`echo "$CPPFLAGS" | \
7357         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7358                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7359
7360                                 ;;
7361                         esac
7362                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7363                         ;;
7364                 esac
7365                 ;;
7366         *)
7367                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7368                 ;;
7369         esac
7370         ;;
7371 yes)
7372         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7373
7374         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7375
7376         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7377                 && test -z "${cf_tst_cflags}" \
7378                 && cf_fix_cppflags=no
7379         ;;
7380 esac
7381 done
7382
7383 if test -n "$cf_new_cflags" ; then
7384
7385         CFLAGS="$CFLAGS $cf_new_cflags"
7386 fi
7387
7388 if test -n "$cf_new_cppflags" ; then
7389
7390         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7391 fi
7392
7393 if test -n "$cf_new_extra_cppflags" ; then
7394
7395         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7396 fi
7397
7398 fi
7399
7400         ;;
7401 netbsd*) #(vi
7402         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7403         ;;
7404 openbsd[4-9]*) #(vi
7405         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7406         cf_xopen_source="-D_BSD_SOURCE"
7407         cf_XOPEN_SOURCE=600
7408         ;;
7409 openbsd*) #(vi
7410         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7411         ;;
7412 osf[45]*) #(vi
7413         cf_xopen_source="-D_OSF_SOURCE"
7414         ;;
7415 nto-qnx*) #(vi
7416         cf_xopen_source="-D_QNX_SOURCE"
7417         ;;
7418 sco*) #(vi
7419         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7420         ;;
7421 solaris2.*) #(vi
7422         cf_xopen_source="-D__EXTENSIONS__"
7423         ;;
7424 *)
7425
7426 echo "$as_me:7426: checking if we should define _XOPEN_SOURCE" >&5
7427 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7428 if test "${cf_cv_xopen_source+set}" = set; then
7429   echo $ECHO_N "(cached) $ECHO_C" >&6
7430 else
7431
7432         cat >conftest.$ac_ext <<_ACEOF
7433 #line 7433 "configure"
7434 #include "confdefs.h"
7435
7436 #include <stdlib.h>
7437 #include <string.h>
7438 #include <sys/types.h>
7439
7440 int
7441 main ()
7442 {
7443
7444 #ifndef _XOPEN_SOURCE
7445 make an error
7446 #endif
7447   ;
7448   return 0;
7449 }
7450 _ACEOF
7451 rm -f conftest.$ac_objext
7452 if { (eval echo "$as_me:7452: \"$ac_compile\"") >&5
7453   (eval $ac_compile) 2>&5
7454   ac_status=$?
7455   echo "$as_me:7455: \$? = $ac_status" >&5
7456   (exit $ac_status); } &&
7457          { ac_try='test -s conftest.$ac_objext'
7458   { (eval echo "$as_me:7458: \"$ac_try\"") >&5
7459   (eval $ac_try) 2>&5
7460   ac_status=$?
7461   echo "$as_me:7461: \$? = $ac_status" >&5
7462   (exit $ac_status); }; }; then
7463   cf_cv_xopen_source=no
7464 else
7465   echo "$as_me: failed program was:" >&5
7466 cat conftest.$ac_ext >&5
7467 cf_save="$CPPFLAGS"
7468          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7469          cat >conftest.$ac_ext <<_ACEOF
7470 #line 7470 "configure"
7471 #include "confdefs.h"
7472
7473 #include <stdlib.h>
7474 #include <string.h>
7475 #include <sys/types.h>
7476
7477 int
7478 main ()
7479 {
7480
7481 #ifdef _XOPEN_SOURCE
7482 make an error
7483 #endif
7484   ;
7485   return 0;
7486 }
7487 _ACEOF
7488 rm -f conftest.$ac_objext
7489 if { (eval echo "$as_me:7489: \"$ac_compile\"") >&5
7490   (eval $ac_compile) 2>&5
7491   ac_status=$?
7492   echo "$as_me:7492: \$? = $ac_status" >&5
7493   (exit $ac_status); } &&
7494          { ac_try='test -s conftest.$ac_objext'
7495   { (eval echo "$as_me:7495: \"$ac_try\"") >&5
7496   (eval $ac_try) 2>&5
7497   ac_status=$?
7498   echo "$as_me:7498: \$? = $ac_status" >&5
7499   (exit $ac_status); }; }; then
7500   cf_cv_xopen_source=no
7501 else
7502   echo "$as_me: failed program was:" >&5
7503 cat conftest.$ac_ext >&5
7504 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7505 fi
7506 rm -f conftest.$ac_objext conftest.$ac_ext
7507         CPPFLAGS="$cf_save"
7508
7509 fi
7510 rm -f conftest.$ac_objext conftest.$ac_ext
7511
7512 fi
7513 echo "$as_me:7513: result: $cf_cv_xopen_source" >&5
7514 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7515
7516 if test "$cf_cv_xopen_source" != no ; then
7517
7518 CFLAGS=`echo "$CFLAGS" | \
7519         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7520                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7521
7522 CPPFLAGS=`echo "$CPPFLAGS" | \
7523         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7524                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7525
7526         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7527
7528 cf_fix_cppflags=no
7529 cf_new_cflags=
7530 cf_new_cppflags=
7531 cf_new_extra_cppflags=
7532
7533 for cf_add_cflags in $cf_temp_xopen_source
7534 do
7535 case $cf_fix_cppflags in
7536 no)
7537         case $cf_add_cflags in #(vi
7538         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7539                 case $cf_add_cflags in
7540                 -D*)
7541                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7542
7543                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7544                                 && test -z "${cf_tst_cflags}" \
7545                                 && cf_fix_cppflags=yes
7546
7547                         if test $cf_fix_cppflags = yes ; then
7548                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7549                                 continue
7550                         elif test "${cf_tst_cflags}" = "\"'" ; then
7551                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7552                                 continue
7553                         fi
7554                         ;;
7555                 esac
7556                 case "$CPPFLAGS" in
7557                 *$cf_add_cflags) #(vi
7558                         ;;
7559                 *) #(vi
7560                         case $cf_add_cflags in #(vi
7561                         -D*)
7562                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7563
7564 CPPFLAGS=`echo "$CPPFLAGS" | \
7565         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7566                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7567
7568                                 ;;
7569                         esac
7570                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7571                         ;;
7572                 esac
7573                 ;;
7574         *)
7575                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7576                 ;;
7577         esac
7578         ;;
7579 yes)
7580         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7581
7582         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7583
7584         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7585                 && test -z "${cf_tst_cflags}" \
7586                 && cf_fix_cppflags=no
7587         ;;
7588 esac
7589 done
7590
7591 if test -n "$cf_new_cflags" ; then
7592
7593         CFLAGS="$CFLAGS $cf_new_cflags"
7594 fi
7595
7596 if test -n "$cf_new_cppflags" ; then
7597
7598         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7599 fi
7600
7601 if test -n "$cf_new_extra_cppflags" ; then
7602
7603         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7604 fi
7605
7606 fi
7607
7608 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7609
7610 cf_save_CFLAGS="$CFLAGS"
7611 cf_save_CPPFLAGS="$CPPFLAGS"
7612
7613 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7614         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7615                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7616
7617 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7618         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7619                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7620
7621 echo "$as_me:7621: checking if we should define _POSIX_C_SOURCE" >&5
7622 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7623 if test "${cf_cv_posix_c_source+set}" = set; then
7624   echo $ECHO_N "(cached) $ECHO_C" >&6
7625 else
7626
7627 echo "${as_me:-configure}:7627: testing if the symbol is already defined go no further ..." 1>&5
7628
7629         cat >conftest.$ac_ext <<_ACEOF
7630 #line 7630 "configure"
7631 #include "confdefs.h"
7632 #include <sys/types.h>
7633 int
7634 main ()
7635 {
7636
7637 #ifndef _POSIX_C_SOURCE
7638 make an error
7639 #endif
7640   ;
7641   return 0;
7642 }
7643 _ACEOF
7644 rm -f conftest.$ac_objext
7645 if { (eval echo "$as_me:7645: \"$ac_compile\"") >&5
7646   (eval $ac_compile) 2>&5
7647   ac_status=$?
7648   echo "$as_me:7648: \$? = $ac_status" >&5
7649   (exit $ac_status); } &&
7650          { ac_try='test -s conftest.$ac_objext'
7651   { (eval echo "$as_me:7651: \"$ac_try\"") >&5
7652   (eval $ac_try) 2>&5
7653   ac_status=$?
7654   echo "$as_me:7654: \$? = $ac_status" >&5
7655   (exit $ac_status); }; }; then
7656   cf_cv_posix_c_source=no
7657 else
7658   echo "$as_me: failed program was:" >&5
7659 cat conftest.$ac_ext >&5
7660 cf_want_posix_source=no
7661          case .$cf_POSIX_C_SOURCE in #(vi
7662          .[12]??*) #(vi
7663                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7664                 ;;
7665          .2) #(vi
7666                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7667                 cf_want_posix_source=yes
7668                 ;;
7669          .*)
7670                 cf_want_posix_source=yes
7671                 ;;
7672          esac
7673          if test "$cf_want_posix_source" = yes ; then
7674                 cat >conftest.$ac_ext <<_ACEOF
7675 #line 7675 "configure"
7676 #include "confdefs.h"
7677 #include <sys/types.h>
7678 int
7679 main ()
7680 {
7681
7682 #ifdef _POSIX_SOURCE
7683 make an error
7684 #endif
7685   ;
7686   return 0;
7687 }
7688 _ACEOF
7689 rm -f conftest.$ac_objext
7690 if { (eval echo "$as_me:7690: \"$ac_compile\"") >&5
7691   (eval $ac_compile) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); } &&
7695          { ac_try='test -s conftest.$ac_objext'
7696   { (eval echo "$as_me:7696: \"$ac_try\"") >&5
7697   (eval $ac_try) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit $ac_status); }; }; then
7701   :
7702 else
7703   echo "$as_me: failed program was:" >&5
7704 cat conftest.$ac_ext >&5
7705 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7706 fi
7707 rm -f conftest.$ac_objext conftest.$ac_ext
7708          fi
7709
7710 echo "${as_me:-configure}:7710: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7711
7712          CFLAGS="$cf_trim_CFLAGS"
7713          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7714
7715 echo "${as_me:-configure}:7715: testing if the second compile does not leave our definition intact error ..." 1>&5
7716
7717          cat >conftest.$ac_ext <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7720 #include <sys/types.h>
7721 int
7722 main ()
7723 {
7724
7725 #ifndef _POSIX_C_SOURCE
7726 make an error
7727 #endif
7728   ;
7729   return 0;
7730 }
7731 _ACEOF
7732 rm -f conftest.$ac_objext
7733 if { (eval echo "$as_me:7733: \"$ac_compile\"") >&5
7734   (eval $ac_compile) 2>&5
7735   ac_status=$?
7736   echo "$as_me:7736: \$? = $ac_status" >&5
7737   (exit $ac_status); } &&
7738          { ac_try='test -s conftest.$ac_objext'
7739   { (eval echo "$as_me:7739: \"$ac_try\"") >&5
7740   (eval $ac_try) 2>&5
7741   ac_status=$?
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); }; }; then
7744   :
7745 else
7746   echo "$as_me: failed program was:" >&5
7747 cat conftest.$ac_ext >&5
7748 cf_cv_posix_c_source=no
7749 fi
7750 rm -f conftest.$ac_objext conftest.$ac_ext
7751          CFLAGS="$cf_save_CFLAGS"
7752          CPPFLAGS="$cf_save_CPPFLAGS"
7753
7754 fi
7755 rm -f conftest.$ac_objext conftest.$ac_ext
7756
7757 fi
7758 echo "$as_me:7758: result: $cf_cv_posix_c_source" >&5
7759 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7760
7761 if test "$cf_cv_posix_c_source" != no ; then
7762         CFLAGS="$cf_trim_CFLAGS"
7763         CPPFLAGS="$cf_trim_CPPFLAGS"
7764
7765 cf_fix_cppflags=no
7766 cf_new_cflags=
7767 cf_new_cppflags=
7768 cf_new_extra_cppflags=
7769
7770 for cf_add_cflags in $cf_cv_posix_c_source
7771 do
7772 case $cf_fix_cppflags in
7773 no)
7774         case $cf_add_cflags in #(vi
7775         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7776                 case $cf_add_cflags in
7777                 -D*)
7778                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7779
7780                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7781                                 && test -z "${cf_tst_cflags}" \
7782                                 && cf_fix_cppflags=yes
7783
7784                         if test $cf_fix_cppflags = yes ; then
7785                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7786                                 continue
7787                         elif test "${cf_tst_cflags}" = "\"'" ; then
7788                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7789                                 continue
7790                         fi
7791                         ;;
7792                 esac
7793                 case "$CPPFLAGS" in
7794                 *$cf_add_cflags) #(vi
7795                         ;;
7796                 *) #(vi
7797                         case $cf_add_cflags in #(vi
7798                         -D*)
7799                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7800
7801 CPPFLAGS=`echo "$CPPFLAGS" | \
7802         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7803                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7804
7805                                 ;;
7806                         esac
7807                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7808                         ;;
7809                 esac
7810                 ;;
7811         *)
7812                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7813                 ;;
7814         esac
7815         ;;
7816 yes)
7817         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7818
7819         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7820
7821         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7822                 && test -z "${cf_tst_cflags}" \
7823                 && cf_fix_cppflags=no
7824         ;;
7825 esac
7826 done
7827
7828 if test -n "$cf_new_cflags" ; then
7829
7830         CFLAGS="$CFLAGS $cf_new_cflags"
7831 fi
7832
7833 if test -n "$cf_new_cppflags" ; then
7834
7835         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7836 fi
7837
7838 if test -n "$cf_new_extra_cppflags" ; then
7839
7840         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7841 fi
7842
7843 fi
7844
7845         ;;
7846 esac
7847
7848 if test -n "$cf_xopen_source" ; then
7849
7850 cf_fix_cppflags=no
7851 cf_new_cflags=
7852 cf_new_cppflags=
7853 cf_new_extra_cppflags=
7854
7855 for cf_add_cflags in $cf_xopen_source
7856 do
7857 case $cf_fix_cppflags in
7858 no)
7859         case $cf_add_cflags in #(vi
7860         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7861                 case $cf_add_cflags in
7862                 -D*)
7863                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7864
7865                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7866                                 && test -z "${cf_tst_cflags}" \
7867                                 && cf_fix_cppflags=yes
7868
7869                         if test $cf_fix_cppflags = yes ; then
7870                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7871                                 continue
7872                         elif test "${cf_tst_cflags}" = "\"'" ; then
7873                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7874                                 continue
7875                         fi
7876                         ;;
7877                 esac
7878                 case "$CPPFLAGS" in
7879                 *$cf_add_cflags) #(vi
7880                         ;;
7881                 *) #(vi
7882                         case $cf_add_cflags in #(vi
7883                         -D*)
7884                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7885
7886 CPPFLAGS=`echo "$CPPFLAGS" | \
7887         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7888                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7889
7890                                 ;;
7891                         esac
7892                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7893                         ;;
7894                 esac
7895                 ;;
7896         *)
7897                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7898                 ;;
7899         esac
7900         ;;
7901 yes)
7902         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7903
7904         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7905
7906         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7907                 && test -z "${cf_tst_cflags}" \
7908                 && cf_fix_cppflags=no
7909         ;;
7910 esac
7911 done
7912
7913 if test -n "$cf_new_cflags" ; then
7914
7915         CFLAGS="$CFLAGS $cf_new_cflags"
7916 fi
7917
7918 if test -n "$cf_new_cppflags" ; then
7919
7920         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7921 fi
7922
7923 if test -n "$cf_new_extra_cppflags" ; then
7924
7925         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7926 fi
7927
7928 fi
7929
7930 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7931         echo "$as_me:7931: checking if _XOPEN_SOURCE really is set" >&5
7932 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7933         cat >conftest.$ac_ext <<_ACEOF
7934 #line 7934 "configure"
7935 #include "confdefs.h"
7936 #include <stdlib.h>
7937 int
7938 main ()
7939 {
7940
7941 #ifndef _XOPEN_SOURCE
7942 make an error
7943 #endif
7944   ;
7945   return 0;
7946 }
7947 _ACEOF
7948 rm -f conftest.$ac_objext
7949 if { (eval echo "$as_me:7949: \"$ac_compile\"") >&5
7950   (eval $ac_compile) 2>&5
7951   ac_status=$?
7952   echo "$as_me:7952: \$? = $ac_status" >&5
7953   (exit $ac_status); } &&
7954          { ac_try='test -s conftest.$ac_objext'
7955   { (eval echo "$as_me:7955: \"$ac_try\"") >&5
7956   (eval $ac_try) 2>&5
7957   ac_status=$?
7958   echo "$as_me:7958: \$? = $ac_status" >&5
7959   (exit $ac_status); }; }; then
7960   cf_XOPEN_SOURCE_set=yes
7961 else
7962   echo "$as_me: failed program was:" >&5
7963 cat conftest.$ac_ext >&5
7964 cf_XOPEN_SOURCE_set=no
7965 fi
7966 rm -f conftest.$ac_objext conftest.$ac_ext
7967         echo "$as_me:7967: result: $cf_XOPEN_SOURCE_set" >&5
7968 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7969         if test $cf_XOPEN_SOURCE_set = yes
7970         then
7971                 cat >conftest.$ac_ext <<_ACEOF
7972 #line 7972 "configure"
7973 #include "confdefs.h"
7974 #include <stdlib.h>
7975 int
7976 main ()
7977 {
7978
7979 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7980 make an error
7981 #endif
7982   ;
7983   return 0;
7984 }
7985 _ACEOF
7986 rm -f conftest.$ac_objext
7987 if { (eval echo "$as_me:7987: \"$ac_compile\"") >&5
7988   (eval $ac_compile) 2>&5
7989   ac_status=$?
7990   echo "$as_me:7990: \$? = $ac_status" >&5
7991   (exit $ac_status); } &&
7992          { ac_try='test -s conftest.$ac_objext'
7993   { (eval echo "$as_me:7993: \"$ac_try\"") >&5
7994   (eval $ac_try) 2>&5
7995   ac_status=$?
7996   echo "$as_me:7996: \$? = $ac_status" >&5
7997   (exit $ac_status); }; }; then
7998   cf_XOPEN_SOURCE_set_ok=yes
7999 else
8000   echo "$as_me: failed program was:" >&5
8001 cat conftest.$ac_ext >&5
8002 cf_XOPEN_SOURCE_set_ok=no
8003 fi
8004 rm -f conftest.$ac_objext conftest.$ac_ext
8005                 if test $cf_XOPEN_SOURCE_set_ok = no
8006                 then
8007                         { echo "$as_me:8007: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8008 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8009                 fi
8010         else
8011
8012 echo "$as_me:8012: checking if we should define _XOPEN_SOURCE" >&5
8013 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8014 if test "${cf_cv_xopen_source+set}" = set; then
8015   echo $ECHO_N "(cached) $ECHO_C" >&6
8016 else
8017
8018         cat >conftest.$ac_ext <<_ACEOF
8019 #line 8019 "configure"
8020 #include "confdefs.h"
8021
8022 #include <stdlib.h>
8023 #include <string.h>
8024 #include <sys/types.h>
8025
8026 int
8027 main ()
8028 {
8029
8030 #ifndef _XOPEN_SOURCE
8031 make an error
8032 #endif
8033   ;
8034   return 0;
8035 }
8036 _ACEOF
8037 rm -f conftest.$ac_objext
8038 if { (eval echo "$as_me:8038: \"$ac_compile\"") >&5
8039   (eval $ac_compile) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit $ac_status); } &&
8043          { ac_try='test -s conftest.$ac_objext'
8044   { (eval echo "$as_me:8044: \"$ac_try\"") >&5
8045   (eval $ac_try) 2>&5
8046   ac_status=$?
8047   echo "$as_me:8047: \$? = $ac_status" >&5
8048   (exit $ac_status); }; }; then
8049   cf_cv_xopen_source=no
8050 else
8051   echo "$as_me: failed program was:" >&5
8052 cat conftest.$ac_ext >&5
8053 cf_save="$CPPFLAGS"
8054          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8055          cat >conftest.$ac_ext <<_ACEOF
8056 #line 8056 "configure"
8057 #include "confdefs.h"
8058
8059 #include <stdlib.h>
8060 #include <string.h>
8061 #include <sys/types.h>
8062
8063 int
8064 main ()
8065 {
8066
8067 #ifdef _XOPEN_SOURCE
8068 make an error
8069 #endif
8070   ;
8071   return 0;
8072 }
8073 _ACEOF
8074 rm -f conftest.$ac_objext
8075 if { (eval echo "$as_me:8075: \"$ac_compile\"") >&5
8076   (eval $ac_compile) 2>&5
8077   ac_status=$?
8078   echo "$as_me:8078: \$? = $ac_status" >&5
8079   (exit $ac_status); } &&
8080          { ac_try='test -s conftest.$ac_objext'
8081   { (eval echo "$as_me:8081: \"$ac_try\"") >&5
8082   (eval $ac_try) 2>&5
8083   ac_status=$?
8084   echo "$as_me:8084: \$? = $ac_status" >&5
8085   (exit $ac_status); }; }; then
8086   cf_cv_xopen_source=no
8087 else
8088   echo "$as_me: failed program was:" >&5
8089 cat conftest.$ac_ext >&5
8090 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8091 fi
8092 rm -f conftest.$ac_objext conftest.$ac_ext
8093         CPPFLAGS="$cf_save"
8094
8095 fi
8096 rm -f conftest.$ac_objext conftest.$ac_ext
8097
8098 fi
8099 echo "$as_me:8099: result: $cf_cv_xopen_source" >&5
8100 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8101
8102 if test "$cf_cv_xopen_source" != no ; then
8103
8104 CFLAGS=`echo "$CFLAGS" | \
8105         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8106                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8107
8108 CPPFLAGS=`echo "$CPPFLAGS" | \
8109         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8110                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8111
8112         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8113
8114 cf_fix_cppflags=no
8115 cf_new_cflags=
8116 cf_new_cppflags=
8117 cf_new_extra_cppflags=
8118
8119 for cf_add_cflags in $cf_temp_xopen_source
8120 do
8121 case $cf_fix_cppflags in
8122 no)
8123         case $cf_add_cflags in #(vi
8124         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8125                 case $cf_add_cflags in
8126                 -D*)
8127                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8128
8129                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8130                                 && test -z "${cf_tst_cflags}" \
8131                                 && cf_fix_cppflags=yes
8132
8133                         if test $cf_fix_cppflags = yes ; then
8134                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8135                                 continue
8136                         elif test "${cf_tst_cflags}" = "\"'" ; then
8137                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8138                                 continue
8139                         fi
8140                         ;;
8141                 esac
8142                 case "$CPPFLAGS" in
8143                 *$cf_add_cflags) #(vi
8144                         ;;
8145                 *) #(vi
8146                         case $cf_add_cflags in #(vi
8147                         -D*)
8148                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8149
8150 CPPFLAGS=`echo "$CPPFLAGS" | \
8151         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8152                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8153
8154                                 ;;
8155                         esac
8156                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8157                         ;;
8158                 esac
8159                 ;;
8160         *)
8161                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8162                 ;;
8163         esac
8164         ;;
8165 yes)
8166         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8167
8168         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8169
8170         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8171                 && test -z "${cf_tst_cflags}" \
8172                 && cf_fix_cppflags=no
8173         ;;
8174 esac
8175 done
8176
8177 if test -n "$cf_new_cflags" ; then
8178
8179         CFLAGS="$CFLAGS $cf_new_cflags"
8180 fi
8181
8182 if test -n "$cf_new_cppflags" ; then
8183
8184         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8185 fi
8186
8187 if test -n "$cf_new_extra_cppflags" ; then
8188
8189         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8190 fi
8191
8192 fi
8193
8194         fi
8195 fi
8196
8197 # Work around breakage on OS X
8198
8199 echo "$as_me:8199: checking if SIGWINCH is defined" >&5
8200 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8201 if test "${cf_cv_define_sigwinch+set}" = set; then
8202   echo $ECHO_N "(cached) $ECHO_C" >&6
8203 else
8204
8205         cat >conftest.$ac_ext <<_ACEOF
8206 #line 8206 "configure"
8207 #include "confdefs.h"
8208
8209 #include <sys/types.h>
8210 #include <sys/signal.h>
8211
8212 int
8213 main ()
8214 {
8215 int x = SIGWINCH
8216   ;
8217   return 0;
8218 }
8219 _ACEOF
8220 rm -f conftest.$ac_objext
8221 if { (eval echo "$as_me:8221: \"$ac_compile\"") >&5
8222   (eval $ac_compile) 2>&5
8223   ac_status=$?
8224   echo "$as_me:8224: \$? = $ac_status" >&5
8225   (exit $ac_status); } &&
8226          { ac_try='test -s conftest.$ac_objext'
8227   { (eval echo "$as_me:8227: \"$ac_try\"") >&5
8228   (eval $ac_try) 2>&5
8229   ac_status=$?
8230   echo "$as_me:8230: \$? = $ac_status" >&5
8231   (exit $ac_status); }; }; then
8232   cf_cv_define_sigwinch=yes
8233 else
8234   echo "$as_me: failed program was:" >&5
8235 cat conftest.$ac_ext >&5
8236 cat >conftest.$ac_ext <<_ACEOF
8237 #line 8237 "configure"
8238 #include "confdefs.h"
8239
8240 #undef _XOPEN_SOURCE
8241 #undef _POSIX_SOURCE
8242 #undef _POSIX_C_SOURCE
8243 #include <sys/types.h>
8244 #include <sys/signal.h>
8245
8246 int
8247 main ()
8248 {
8249 int x = SIGWINCH
8250   ;
8251   return 0;
8252 }
8253 _ACEOF
8254 rm -f conftest.$ac_objext
8255 if { (eval echo "$as_me:8255: \"$ac_compile\"") >&5
8256   (eval $ac_compile) 2>&5
8257   ac_status=$?
8258   echo "$as_me:8258: \$? = $ac_status" >&5
8259   (exit $ac_status); } &&
8260          { ac_try='test -s conftest.$ac_objext'
8261   { (eval echo "$as_me:8261: \"$ac_try\"") >&5
8262   (eval $ac_try) 2>&5
8263   ac_status=$?
8264   echo "$as_me:8264: \$? = $ac_status" >&5
8265   (exit $ac_status); }; }; then
8266   cf_cv_define_sigwinch=maybe
8267 else
8268   echo "$as_me: failed program was:" >&5
8269 cat conftest.$ac_ext >&5
8270 cf_cv_define_sigwinch=no
8271 fi
8272 rm -f conftest.$ac_objext conftest.$ac_ext
8273
8274 fi
8275 rm -f conftest.$ac_objext conftest.$ac_ext
8276
8277 fi
8278 echo "$as_me:8278: result: $cf_cv_define_sigwinch" >&5
8279 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8280
8281 if test "$cf_cv_define_sigwinch" = maybe ; then
8282 echo "$as_me:8282: checking for actual SIGWINCH definition" >&5
8283 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8284 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8285   echo $ECHO_N "(cached) $ECHO_C" >&6
8286 else
8287
8288 cf_cv_fixup_sigwinch=unknown
8289 cf_sigwinch=32
8290 while test $cf_sigwinch != 1
8291 do
8292         cat >conftest.$ac_ext <<_ACEOF
8293 #line 8293 "configure"
8294 #include "confdefs.h"
8295
8296 #undef _XOPEN_SOURCE
8297 #undef _POSIX_SOURCE
8298 #undef _POSIX_C_SOURCE
8299 #include <sys/types.h>
8300 #include <sys/signal.h>
8301
8302 int
8303 main ()
8304 {
8305
8306 #if SIGWINCH != $cf_sigwinch
8307 make an error
8308 #endif
8309 int x = SIGWINCH
8310   ;
8311   return 0;
8312 }
8313 _ACEOF
8314 rm -f conftest.$ac_objext
8315 if { (eval echo "$as_me:8315: \"$ac_compile\"") >&5
8316   (eval $ac_compile) 2>&5
8317   ac_status=$?
8318   echo "$as_me:8318: \$? = $ac_status" >&5
8319   (exit $ac_status); } &&
8320          { ac_try='test -s conftest.$ac_objext'
8321   { (eval echo "$as_me:8321: \"$ac_try\"") >&5
8322   (eval $ac_try) 2>&5
8323   ac_status=$?
8324   echo "$as_me:8324: \$? = $ac_status" >&5
8325   (exit $ac_status); }; }; then
8326   cf_cv_fixup_sigwinch=$cf_sigwinch
8327          break
8328 else
8329   echo "$as_me: failed program was:" >&5
8330 cat conftest.$ac_ext >&5
8331 fi
8332 rm -f conftest.$ac_objext conftest.$ac_ext
8333
8334 cf_sigwinch=`expr $cf_sigwinch - 1`
8335 done
8336
8337 fi
8338 echo "$as_me:8338: result: $cf_cv_fixup_sigwinch" >&5
8339 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8340
8341         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8342                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8343         fi
8344 fi
8345
8346 # Checks for CODESET support.
8347
8348   echo "$as_me:8348: checking for nl_langinfo and CODESET" >&5
8349 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8350 if test "${am_cv_langinfo_codeset+set}" = set; then
8351   echo $ECHO_N "(cached) $ECHO_C" >&6
8352 else
8353   cat >conftest.$ac_ext <<_ACEOF
8354 #line 8354 "configure"
8355 #include "confdefs.h"
8356 #include <langinfo.h>
8357 int
8358 main ()
8359 {
8360 char* cs = nl_langinfo(CODESET);
8361   ;
8362   return 0;
8363 }
8364 _ACEOF
8365 rm -f conftest.$ac_objext conftest$ac_exeext
8366 if { (eval echo "$as_me:8366: \"$ac_link\"") >&5
8367   (eval $ac_link) 2>&5
8368   ac_status=$?
8369   echo "$as_me:8369: \$? = $ac_status" >&5
8370   (exit $ac_status); } &&
8371          { ac_try='test -s conftest$ac_exeext'
8372   { (eval echo "$as_me:8372: \"$ac_try\"") >&5
8373   (eval $ac_try) 2>&5
8374   ac_status=$?
8375   echo "$as_me:8375: \$? = $ac_status" >&5
8376   (exit $ac_status); }; }; then
8377   am_cv_langinfo_codeset=yes
8378 else
8379   echo "$as_me: failed program was:" >&5
8380 cat conftest.$ac_ext >&5
8381 am_cv_langinfo_codeset=no
8382 fi
8383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8384
8385 fi
8386 echo "$as_me:8386: result: $am_cv_langinfo_codeset" >&5
8387 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8388   if test $am_cv_langinfo_codeset = yes; then
8389
8390 cat >>confdefs.h <<\EOF
8391 #define HAVE_LANGINFO_CODESET 1
8392 EOF
8393
8394   fi
8395
8396 # use these variables to work around a defect in gcc's fixincludes.
8397 NCURSES_OK_WCHAR_T=
8398 NCURSES_OK_WINT_T=
8399
8400 echo "$as_me:8400: checking if you want wide-character code" >&5
8401 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8402
8403 # Check whether --enable-widec or --disable-widec was given.
8404 if test "${enable_widec+set}" = set; then
8405   enableval="$enable_widec"
8406   with_widec=$enableval
8407 else
8408   with_widec=no
8409 fi;
8410 echo "$as_me:8410: result: $with_widec" >&5
8411 echo "${ECHO_T}$with_widec" >&6
8412 if test "$with_widec" = yes ; then
8413         LIB_SUFFIX="w${LIB_SUFFIX}"
8414         cat >>confdefs.h <<\EOF
8415 #define USE_WIDEC_SUPPORT 1
8416 EOF
8417
8418         cat >>confdefs.h <<\EOF
8419 #define NCURSES_WIDECHAR 1
8420 EOF
8421
8422 echo "$as_me:8422: checking if wchar.h can be used as is" >&5
8423 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8424 if test "${cf_cv_wchar_h_okay+set}" = set; then
8425   echo $ECHO_N "(cached) $ECHO_C" >&6
8426 else
8427
8428 cat >conftest.$ac_ext <<_ACEOF
8429 #line 8429 "configure"
8430 #include "confdefs.h"
8431
8432 #include <stdlib.h>
8433 #include <wchar.h>
8434
8435 int
8436 main ()
8437 {
8438
8439         wint_t foo = 0;
8440         int bar = iswpunct(foo)
8441   ;
8442   return 0;
8443 }
8444 _ACEOF
8445 rm -f conftest.$ac_objext
8446 if { (eval echo "$as_me:8446: \"$ac_compile\"") >&5
8447   (eval $ac_compile) 2>&5
8448   ac_status=$?
8449   echo "$as_me:8449: \$? = $ac_status" >&5
8450   (exit $ac_status); } &&
8451          { ac_try='test -s conftest.$ac_objext'
8452   { (eval echo "$as_me:8452: \"$ac_try\"") >&5
8453   (eval $ac_try) 2>&5
8454   ac_status=$?
8455   echo "$as_me:8455: \$? = $ac_status" >&5
8456   (exit $ac_status); }; }; then
8457   cf_cv_wchar_h_okay=yes
8458 else
8459   echo "$as_me: failed program was:" >&5
8460 cat conftest.$ac_ext >&5
8461 cf_cv_wchar_h_okay=no
8462 fi
8463 rm -f conftest.$ac_objext conftest.$ac_ext
8464 fi
8465 echo "$as_me:8465: result: $cf_cv_wchar_h_okay" >&5
8466 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8467
8468 if test $cf_cv_wchar_h_okay = no
8469 then
8470
8471 echo "$as_me:8471: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8472 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8473 cat >conftest.$ac_ext <<_ACEOF
8474 #line 8474 "configure"
8475 #include "confdefs.h"
8476 #include <sys/types.h>
8477
8478 int
8479 main ()
8480 {
8481
8482 #ifndef _XOPEN_SOURCE_EXTENDED
8483 make an error
8484 #endif
8485   ;
8486   return 0;
8487 }
8488 _ACEOF
8489 rm -f conftest.$ac_objext
8490 if { (eval echo "$as_me:8490: \"$ac_compile\"") >&5
8491   (eval $ac_compile) 2>&5
8492   ac_status=$?
8493   echo "$as_me:8493: \$? = $ac_status" >&5
8494   (exit $ac_status); } &&
8495          { ac_try='test -s conftest.$ac_objext'
8496   { (eval echo "$as_me:8496: \"$ac_try\"") >&5
8497   (eval $ac_try) 2>&5
8498   ac_status=$?
8499   echo "$as_me:8499: \$? = $ac_status" >&5
8500   (exit $ac_status); }; }; then
8501   cf_result=no
8502 else
8503   echo "$as_me: failed program was:" >&5
8504 cat conftest.$ac_ext >&5
8505 cf_result=yes
8506 fi
8507 rm -f conftest.$ac_objext conftest.$ac_ext
8508 echo "$as_me:8508: result: $cf_result" >&5
8509 echo "${ECHO_T}$cf_result" >&6
8510
8511 if test "$cf_result" = yes ; then
8512         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8513 elif test "x" != "x" ; then
8514         echo "$as_me:8514: checking checking for compatible value versus " >&5
8515 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8516         cat >conftest.$ac_ext <<_ACEOF
8517 #line 8517 "configure"
8518 #include "confdefs.h"
8519 #include <sys/types.h>
8520
8521 int
8522 main ()
8523 {
8524
8525 #if _XOPEN_SOURCE_EXTENDED- < 0
8526 make an error
8527 #endif
8528   ;
8529   return 0;
8530 }
8531 _ACEOF
8532 rm -f conftest.$ac_objext
8533 if { (eval echo "$as_me:8533: \"$ac_compile\"") >&5
8534   (eval $ac_compile) 2>&5
8535   ac_status=$?
8536   echo "$as_me:8536: \$? = $ac_status" >&5
8537   (exit $ac_status); } &&
8538          { ac_try='test -s conftest.$ac_objext'
8539   { (eval echo "$as_me:8539: \"$ac_try\"") >&5
8540   (eval $ac_try) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); }; }; then
8544   cf_result=yes
8545 else
8546   echo "$as_me: failed program was:" >&5
8547 cat conftest.$ac_ext >&5
8548 cf_result=no
8549 fi
8550 rm -f conftest.$ac_objext conftest.$ac_ext
8551         echo "$as_me:8551: result: $cf_result" >&5
8552 echo "${ECHO_T}$cf_result" >&6
8553         if test "$cf_result" = no ; then
8554                 # perhaps we can override it - try...
8555                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8556         fi
8557 fi
8558
8559 fi
8560
8561         # with_overwrite=no
8562         NCURSES_CH_T=cchar_t
8563
8564 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8565 do
8566 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8567 echo "$as_me:8567: checking for $ac_func" >&5
8568 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8569 if eval "test \"\${$as_ac_var+set}\" = set"; then
8570   echo $ECHO_N "(cached) $ECHO_C" >&6
8571 else
8572   cat >conftest.$ac_ext <<_ACEOF
8573 #line 8573 "configure"
8574 #include "confdefs.h"
8575 /* System header to define __stub macros and hopefully few prototypes,
8576     which can conflict with char $ac_func (); below.  */
8577 #include <assert.h>
8578 /* Override any gcc2 internal prototype to avoid an error.  */
8579 #ifdef __cplusplus
8580 extern "C"
8581 #endif
8582 /* We use char because int might match the return type of a gcc2
8583    builtin and then its argument prototype would still apply.  */
8584 char $ac_func ();
8585 char (*f) ();
8586
8587 int
8588 main ()
8589 {
8590 /* The GNU C library defines this for functions which it implements
8591     to always fail with ENOSYS.  Some functions are actually named
8592     something starting with __ and the normal name is an alias.  */
8593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8594 choke me
8595 #else
8596 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8597 #endif
8598
8599   ;
8600   return 0;
8601 }
8602 _ACEOF
8603 rm -f conftest.$ac_objext conftest$ac_exeext
8604 if { (eval echo "$as_me:8604: \"$ac_link\"") >&5
8605   (eval $ac_link) 2>&5
8606   ac_status=$?
8607   echo "$as_me:8607: \$? = $ac_status" >&5
8608   (exit $ac_status); } &&
8609          { ac_try='test -s conftest$ac_exeext'
8610   { (eval echo "$as_me:8610: \"$ac_try\"") >&5
8611   (eval $ac_try) 2>&5
8612   ac_status=$?
8613   echo "$as_me:8613: \$? = $ac_status" >&5
8614   (exit $ac_status); }; }; then
8615   eval "$as_ac_var=yes"
8616 else
8617   echo "$as_me: failed program was:" >&5
8618 cat conftest.$ac_ext >&5
8619 eval "$as_ac_var=no"
8620 fi
8621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8622 fi
8623 echo "$as_me:8623: result: `eval echo '${'$as_ac_var'}'`" >&5
8624 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8625 if test `eval echo '${'$as_ac_var'}'` = yes; then
8626   cat >>confdefs.h <<EOF
8627 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8628 EOF
8629
8630 fi
8631 done
8632
8633         if test "$ac_cv_func_putwc" != yes ; then
8634
8635 echo "$as_me:8635: checking for multibyte character support" >&5
8636 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8637 if test "${cf_cv_utf8_lib+set}" = set; then
8638   echo $ECHO_N "(cached) $ECHO_C" >&6
8639 else
8640
8641         cf_save_LIBS="$LIBS"
8642         cat >conftest.$ac_ext <<_ACEOF
8643 #line 8643 "configure"
8644 #include "confdefs.h"
8645
8646 #include <stdlib.h>
8647 int
8648 main ()
8649 {
8650 putwc(0,0);
8651   ;
8652   return 0;
8653 }
8654 _ACEOF
8655 rm -f conftest.$ac_objext conftest$ac_exeext
8656 if { (eval echo "$as_me:8656: \"$ac_link\"") >&5
8657   (eval $ac_link) 2>&5
8658   ac_status=$?
8659   echo "$as_me:8659: \$? = $ac_status" >&5
8660   (exit $ac_status); } &&
8661          { ac_try='test -s conftest$ac_exeext'
8662   { (eval echo "$as_me:8662: \"$ac_try\"") >&5
8663   (eval $ac_try) 2>&5
8664   ac_status=$?
8665   echo "$as_me:8665: \$? = $ac_status" >&5
8666   (exit $ac_status); }; }; then
8667   cf_cv_utf8_lib=yes
8668 else
8669   echo "$as_me: failed program was:" >&5
8670 cat conftest.$ac_ext >&5
8671
8672 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8673 # will be set on completion of the AC_TRY_LINK below.
8674 cf_cv_header_path_utf8=
8675 cf_cv_library_path_utf8=
8676
8677 echo "${as_me:-configure}:8677: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8678
8679 cf_save_LIBS="$LIBS"
8680
8681 cat >conftest.$ac_ext <<_ACEOF
8682 #line 8682 "configure"
8683 #include "confdefs.h"
8684
8685 #include <libutf8.h>
8686 int
8687 main ()
8688 {
8689 putwc(0,0);
8690   ;
8691   return 0;
8692 }
8693 _ACEOF
8694 rm -f conftest.$ac_objext conftest$ac_exeext
8695 if { (eval echo "$as_me:8695: \"$ac_link\"") >&5
8696   (eval $ac_link) 2>&5
8697   ac_status=$?
8698   echo "$as_me:8698: \$? = $ac_status" >&5
8699   (exit $ac_status); } &&
8700          { ac_try='test -s conftest$ac_exeext'
8701   { (eval echo "$as_me:8701: \"$ac_try\"") >&5
8702   (eval $ac_try) 2>&5
8703   ac_status=$?
8704   echo "$as_me:8704: \$? = $ac_status" >&5
8705   (exit $ac_status); }; }; then
8706
8707         cf_cv_find_linkage_utf8=yes
8708         cf_cv_header_path_utf8=/usr/include
8709         cf_cv_library_path_utf8=/usr/lib
8710
8711 else
8712   echo "$as_me: failed program was:" >&5
8713 cat conftest.$ac_ext >&5
8714
8715 LIBS="-lutf8  $cf_save_LIBS"
8716
8717 cat >conftest.$ac_ext <<_ACEOF
8718 #line 8718 "configure"
8719 #include "confdefs.h"
8720
8721 #include <libutf8.h>
8722 int
8723 main ()
8724 {
8725 putwc(0,0);
8726   ;
8727   return 0;
8728 }
8729 _ACEOF
8730 rm -f conftest.$ac_objext conftest$ac_exeext
8731 if { (eval echo "$as_me:8731: \"$ac_link\"") >&5
8732   (eval $ac_link) 2>&5
8733   ac_status=$?
8734   echo "$as_me:8734: \$? = $ac_status" >&5
8735   (exit $ac_status); } &&
8736          { ac_try='test -s conftest$ac_exeext'
8737   { (eval echo "$as_me:8737: \"$ac_try\"") >&5
8738   (eval $ac_try) 2>&5
8739   ac_status=$?
8740   echo "$as_me:8740: \$? = $ac_status" >&5
8741   (exit $ac_status); }; }; then
8742
8743         cf_cv_find_linkage_utf8=yes
8744         cf_cv_header_path_utf8=/usr/include
8745         cf_cv_library_path_utf8=/usr/lib
8746         cf_cv_library_file_utf8="-lutf8"
8747
8748 else
8749   echo "$as_me: failed program was:" >&5
8750 cat conftest.$ac_ext >&5
8751
8752         cf_cv_find_linkage_utf8=no
8753         LIBS="$cf_save_LIBS"
8754
8755     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8756
8757 echo "${as_me:-configure}:8757: testing find linkage for utf8 library ..." 1>&5
8758
8759 echo "${as_me:-configure}:8759: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8760
8761     cf_save_CPPFLAGS="$CPPFLAGS"
8762     cf_test_CPPFLAGS="$CPPFLAGS"
8763
8764 cf_search=
8765
8766 # collect the current set of include-directories from compiler flags
8767 cf_header_path_list=""
8768 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8769         for cf_header_path in $CPPFLAGS $CFLAGS
8770         do
8771                 case $cf_header_path in #(vi
8772                 -I*)
8773                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8774
8775 test "$cf_header_path" != "NONE" && \
8776 test -d "$cf_header_path" && \
8777  {
8778         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8779         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8780         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8781         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8782         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8783         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8784 }
8785
8786                         cf_header_path_list="$cf_header_path_list $cf_search"
8787                         ;;
8788                 esac
8789         done
8790 fi
8791
8792 # add the variations for the package we are looking for
8793
8794 cf_search=
8795
8796 test "/usr" != "$prefix" && \
8797 test -d "/usr" && \
8798 (test $prefix = NONE || test "/usr" != "$prefix") && {
8799         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8800         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8801         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8802         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8803         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8804         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8805 }
8806
8807 test "$prefix" != "NONE" && \
8808 test -d "$prefix" && \
8809  {
8810         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8811         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8812         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8813         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8814         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8815         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8816 }
8817
8818 test "/usr/local" != "$prefix" && \
8819 test -d "/usr/local" && \
8820 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8821         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8822         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8823         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8824         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8825         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8826         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8827 }
8828
8829 test "/opt" != "$prefix" && \
8830 test -d "/opt" && \
8831 (test $prefix = NONE || test "/opt" != "$prefix") && {
8832         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8833         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8834         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8835         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8836         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8837         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8838 }
8839
8840 test "$HOME" != "$prefix" && \
8841 test -d "$HOME" && \
8842 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8843         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8844         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8845         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8846         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8847         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8848         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8849 }
8850
8851 test "$includedir" != NONE && \
8852 test "$includedir" != "/usr/include" && \
8853 test -d "$includedir" && {
8854         test -d $includedir &&    cf_search="$cf_search $includedir"
8855         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8856 }
8857
8858 test "$oldincludedir" != NONE && \
8859 test "$oldincludedir" != "/usr/include" && \
8860 test -d "$oldincludedir" && {
8861         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8862         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8863 }
8864
8865 cf_search="$cf_search $cf_header_path_list"
8866
8867     for cf_cv_header_path_utf8 in $cf_search
8868     do
8869       if test -d $cf_cv_header_path_utf8 ; then
8870         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8871
8872 echo "${as_me:-configure}:8872: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8873
8874         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8875         cat >conftest.$ac_ext <<_ACEOF
8876 #line 8876 "configure"
8877 #include "confdefs.h"
8878
8879 #include <libutf8.h>
8880 int
8881 main ()
8882 {
8883 putwc(0,0);
8884   ;
8885   return 0;
8886 }
8887 _ACEOF
8888 rm -f conftest.$ac_objext
8889 if { (eval echo "$as_me:8889: \"$ac_compile\"") >&5
8890   (eval $ac_compile) 2>&5
8891   ac_status=$?
8892   echo "$as_me:8892: \$? = $ac_status" >&5
8893   (exit $ac_status); } &&
8894          { ac_try='test -s conftest.$ac_objext'
8895   { (eval echo "$as_me:8895: \"$ac_try\"") >&5
8896   (eval $ac_try) 2>&5
8897   ac_status=$?
8898   echo "$as_me:8898: \$? = $ac_status" >&5
8899   (exit $ac_status); }; }; then
8900
8901             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8902
8903 echo "${as_me:-configure}:8903: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8904
8905             cf_cv_find_linkage_utf8=maybe
8906             cf_test_CPPFLAGS="$CPPFLAGS"
8907             break
8908 else
8909   echo "$as_me: failed program was:" >&5
8910 cat conftest.$ac_ext >&5
8911
8912             CPPFLAGS="$cf_save_CPPFLAGS"
8913
8914 fi
8915 rm -f conftest.$ac_objext conftest.$ac_ext
8916       fi
8917     done
8918
8919     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8920
8921 echo "${as_me:-configure}:8921: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8922
8923       cf_save_LIBS="$LIBS"
8924       cf_save_LDFLAGS="$LDFLAGS"
8925
8926       if test "$cf_cv_find_linkage_utf8" != yes ; then
8927
8928 cf_search=
8929 cf_library_path_list=""
8930 if test -n "${LDFLAGS}${LIBS}" ; then
8931         for cf_library_path in $LDFLAGS $LIBS
8932         do
8933                 case $cf_library_path in #(vi
8934                 -L*)
8935                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8936
8937 test "$cf_library_path" != "NONE" && \
8938 test -d "$cf_library_path" && \
8939  {
8940         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8941         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8942         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8943         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8944         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8945         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8946 }
8947
8948                         cf_library_path_list="$cf_library_path_list $cf_search"
8949                         ;;
8950                 esac
8951         done
8952 fi
8953
8954 cf_search=
8955
8956 test "/usr" != "$prefix" && \
8957 test -d "/usr" && \
8958 (test $prefix = NONE || test "/usr" != "$prefix") && {
8959         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8960         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8961         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8962         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8963         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8964         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8965 }
8966
8967 test "$prefix" != "NONE" && \
8968 test -d "$prefix" && \
8969  {
8970         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8971         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8972         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8973         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8974         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8975         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8976 }
8977
8978 test "/usr/local" != "$prefix" && \
8979 test -d "/usr/local" && \
8980 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8981         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8982         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8983         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8984         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8985         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8986         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8987 }
8988
8989 test "/opt" != "$prefix" && \
8990 test -d "/opt" && \
8991 (test $prefix = NONE || test "/opt" != "$prefix") && {
8992         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8993         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8994         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8995         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8996         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8997         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8998 }
8999
9000 test "$HOME" != "$prefix" && \
9001 test -d "$HOME" && \
9002 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9003         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9004         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9005         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9006         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9007         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9008         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9009 }
9010
9011 cf_search="$cf_library_path_list $cf_search"
9012
9013         for cf_cv_library_path_utf8 in $cf_search
9014         do
9015           if test -d $cf_cv_library_path_utf8 ; then
9016             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9017
9018 echo "${as_me:-configure}:9018: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9019
9020             CPPFLAGS="$cf_test_CPPFLAGS"
9021             LIBS="-lutf8  $cf_save_LIBS"
9022             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9023             cat >conftest.$ac_ext <<_ACEOF
9024 #line 9024 "configure"
9025 #include "confdefs.h"
9026
9027 #include <libutf8.h>
9028 int
9029 main ()
9030 {
9031 putwc(0,0);
9032   ;
9033   return 0;
9034 }
9035 _ACEOF
9036 rm -f conftest.$ac_objext conftest$ac_exeext
9037 if { (eval echo "$as_me:9037: \"$ac_link\"") >&5
9038   (eval $ac_link) 2>&5
9039   ac_status=$?
9040   echo "$as_me:9040: \$? = $ac_status" >&5
9041   (exit $ac_status); } &&
9042          { ac_try='test -s conftest$ac_exeext'
9043   { (eval echo "$as_me:9043: \"$ac_try\"") >&5
9044   (eval $ac_try) 2>&5
9045   ac_status=$?
9046   echo "$as_me:9046: \$? = $ac_status" >&5
9047   (exit $ac_status); }; }; then
9048
9049                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9050
9051 echo "${as_me:-configure}:9051: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9052
9053                 cf_cv_find_linkage_utf8=yes
9054                 cf_cv_library_file_utf8="-lutf8"
9055                 break
9056 else
9057   echo "$as_me: failed program was:" >&5
9058 cat conftest.$ac_ext >&5
9059
9060                 CPPFLAGS="$cf_save_CPPFLAGS"
9061                 LIBS="$cf_save_LIBS"
9062                 LDFLAGS="$cf_save_LDFLAGS"
9063
9064 fi
9065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9066           fi
9067         done
9068         CPPFLAGS="$cf_save_CPPFLAGS"
9069         LDFLAGS="$cf_save_LDFLAGS"
9070       fi
9071
9072     else
9073       cf_cv_find_linkage_utf8=no
9074     fi
9075
9076 fi
9077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9078
9079 fi
9080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9081
9082 LIBS="$cf_save_LIBS"
9083
9084 if test "$cf_cv_find_linkage_utf8" = yes ; then
9085 cf_cv_utf8_lib=add-on
9086 else
9087 cf_cv_utf8_lib=no
9088 fi
9089
9090 fi
9091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9092 fi
9093 echo "$as_me:9093: result: $cf_cv_utf8_lib" >&5
9094 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9095
9096 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9097 # ncurses/ncursesw:
9098 if test "$cf_cv_utf8_lib" = "add-on" ; then
9099         cat >>confdefs.h <<\EOF
9100 #define HAVE_LIBUTF8_H 1
9101 EOF
9102
9103 if test -n "$cf_cv_header_path_utf8" ; then
9104   for cf_add_incdir in $cf_cv_header_path_utf8
9105   do
9106         while test $cf_add_incdir != /usr/include
9107         do
9108           if test -d $cf_add_incdir
9109           then
9110                 cf_have_incdir=no
9111                 if test -n "$CFLAGS$CPPFLAGS" ; then
9112                   # a loop is needed to ensure we can add subdirs of existing dirs
9113                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9114                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9115                           cf_have_incdir=yes; break
9116                         fi
9117                   done
9118                 fi
9119
9120                 if test "$cf_have_incdir" = no ; then
9121                   if test "$cf_add_incdir" = /usr/local/include ; then
9122                         if test "$GCC" = yes
9123                         then
9124                           cf_save_CPPFLAGS=$CPPFLAGS
9125                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9126                           cat >conftest.$ac_ext <<_ACEOF
9127 #line 9127 "configure"
9128 #include "confdefs.h"
9129 #include <stdio.h>
9130 int
9131 main ()
9132 {
9133 printf("Hello")
9134   ;
9135   return 0;
9136 }
9137 _ACEOF
9138 rm -f conftest.$ac_objext
9139 if { (eval echo "$as_me:9139: \"$ac_compile\"") >&5
9140   (eval $ac_compile) 2>&5
9141   ac_status=$?
9142   echo "$as_me:9142: \$? = $ac_status" >&5
9143   (exit $ac_status); } &&
9144          { ac_try='test -s conftest.$ac_objext'
9145   { (eval echo "$as_me:9145: \"$ac_try\"") >&5
9146   (eval $ac_try) 2>&5
9147   ac_status=$?
9148   echo "$as_me:9148: \$? = $ac_status" >&5
9149   (exit $ac_status); }; }; then
9150   :
9151 else
9152   echo "$as_me: failed program was:" >&5
9153 cat conftest.$ac_ext >&5
9154 cf_have_incdir=yes
9155 fi
9156 rm -f conftest.$ac_objext conftest.$ac_ext
9157                           CPPFLAGS=$cf_save_CPPFLAGS
9158                         fi
9159                   fi
9160                 fi
9161
9162                 if test "$cf_have_incdir" = no ; then
9163                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9164
9165 echo "${as_me:-configure}:9165: testing adding $cf_add_incdir to include-path ..." 1>&5
9166
9167                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9168
9169                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9170                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9171                   cf_add_incdir="$cf_top_incdir"
9172                 else
9173                   break
9174                 fi
9175           fi
9176         done
9177   done
9178 fi
9179
9180 if test -n "$cf_cv_library_path_utf8" ; then
9181   for cf_add_libdir in $cf_cv_library_path_utf8
9182   do
9183     if test $cf_add_libdir = /usr/lib ; then
9184       :
9185     elif test -d $cf_add_libdir
9186     then
9187       cf_have_libdir=no
9188       if test -n "$LDFLAGS$LIBS" ; then
9189         # a loop is needed to ensure we can add subdirs of existing dirs
9190         for cf_test_libdir in $LDFLAGS $LIBS ; do
9191           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9192             cf_have_libdir=yes; break
9193           fi
9194         done
9195       fi
9196       if test "$cf_have_libdir" = no ; then
9197         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9198
9199 echo "${as_me:-configure}:9199: testing adding $cf_add_libdir to library-path ..." 1>&5
9200
9201         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9202       fi
9203     fi
9204   done
9205 fi
9206
9207         LIBS="$cf_cv_library_file_utf8 $LIBS"
9208 fi
9209
9210                 if test "$cf_cv_utf8_lib" != no ; then
9211                         NCURSES_LIBUTF8=1
9212                 fi
9213         fi
9214
9215 # This is needed on Tru64 5.0 to declare mbstate_t
9216 echo "$as_me:9216: checking if we must include wchar.h to declare mbstate_t" >&5
9217 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9218 if test "${cf_cv_mbstate_t+set}" = set; then
9219   echo $ECHO_N "(cached) $ECHO_C" >&6
9220 else
9221
9222 cat >conftest.$ac_ext <<_ACEOF
9223 #line 9223 "configure"
9224 #include "confdefs.h"
9225
9226 #include <stdlib.h>
9227 #include <stdarg.h>
9228 #include <stdio.h>
9229 #ifdef HAVE_LIBUTF8_H
9230 #include <libutf8.h>
9231 #endif
9232 int
9233 main ()
9234 {
9235 mbstate_t state
9236   ;
9237   return 0;
9238 }
9239 _ACEOF
9240 rm -f conftest.$ac_objext
9241 if { (eval echo "$as_me:9241: \"$ac_compile\"") >&5
9242   (eval $ac_compile) 2>&5
9243   ac_status=$?
9244   echo "$as_me:9244: \$? = $ac_status" >&5
9245   (exit $ac_status); } &&
9246          { ac_try='test -s conftest.$ac_objext'
9247   { (eval echo "$as_me:9247: \"$ac_try\"") >&5
9248   (eval $ac_try) 2>&5
9249   ac_status=$?
9250   echo "$as_me:9250: \$? = $ac_status" >&5
9251   (exit $ac_status); }; }; then
9252   cf_cv_mbstate_t=no
9253 else
9254   echo "$as_me: failed program was:" >&5
9255 cat conftest.$ac_ext >&5
9256 cat >conftest.$ac_ext <<_ACEOF
9257 #line 9257 "configure"
9258 #include "confdefs.h"
9259
9260 #include <stdlib.h>
9261 #include <stdarg.h>
9262 #include <stdio.h>
9263 #include <wchar.h>
9264 #ifdef HAVE_LIBUTF8_H
9265 #include <libutf8.h>
9266 #endif
9267 int
9268 main ()
9269 {
9270 mbstate_t value
9271   ;
9272   return 0;
9273 }
9274 _ACEOF
9275 rm -f conftest.$ac_objext
9276 if { (eval echo "$as_me:9276: \"$ac_compile\"") >&5
9277   (eval $ac_compile) 2>&5
9278   ac_status=$?
9279   echo "$as_me:9279: \$? = $ac_status" >&5
9280   (exit $ac_status); } &&
9281          { ac_try='test -s conftest.$ac_objext'
9282   { (eval echo "$as_me:9282: \"$ac_try\"") >&5
9283   (eval $ac_try) 2>&5
9284   ac_status=$?
9285   echo "$as_me:9285: \$? = $ac_status" >&5
9286   (exit $ac_status); }; }; then
9287   cf_cv_mbstate_t=yes
9288 else
9289   echo "$as_me: failed program was:" >&5
9290 cat conftest.$ac_ext >&5
9291 cf_cv_mbstate_t=unknown
9292 fi
9293 rm -f conftest.$ac_objext conftest.$ac_ext
9294 fi
9295 rm -f conftest.$ac_objext conftest.$ac_ext
9296 fi
9297 echo "$as_me:9297: result: $cf_cv_mbstate_t" >&5
9298 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9299
9300 if test "$cf_cv_mbstate_t" = yes ; then
9301         cat >>confdefs.h <<\EOF
9302 #define NEED_WCHAR_H 1
9303 EOF
9304
9305         NEED_WCHAR_H=1
9306 fi
9307
9308 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9309 if test "$cf_cv_mbstate_t" = unknown ; then
9310         NCURSES_MBSTATE_T=1
9311 fi
9312
9313 # This is needed on Tru64 5.0 to declare wchar_t
9314 echo "$as_me:9314: checking if we must include wchar.h to declare wchar_t" >&5
9315 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9316 if test "${cf_cv_wchar_t+set}" = set; then
9317   echo $ECHO_N "(cached) $ECHO_C" >&6
9318 else
9319
9320 cat >conftest.$ac_ext <<_ACEOF
9321 #line 9321 "configure"
9322 #include "confdefs.h"
9323
9324 #include <stdlib.h>
9325 #include <stdarg.h>
9326 #include <stdio.h>
9327 #ifdef HAVE_LIBUTF8_H
9328 #include <libutf8.h>
9329 #endif
9330 int
9331 main ()
9332 {
9333 wchar_t state
9334   ;
9335   return 0;
9336 }
9337 _ACEOF
9338 rm -f conftest.$ac_objext
9339 if { (eval echo "$as_me:9339: \"$ac_compile\"") >&5
9340   (eval $ac_compile) 2>&5
9341   ac_status=$?
9342   echo "$as_me:9342: \$? = $ac_status" >&5
9343   (exit $ac_status); } &&
9344          { ac_try='test -s conftest.$ac_objext'
9345   { (eval echo "$as_me:9345: \"$ac_try\"") >&5
9346   (eval $ac_try) 2>&5
9347   ac_status=$?
9348   echo "$as_me:9348: \$? = $ac_status" >&5
9349   (exit $ac_status); }; }; then
9350   cf_cv_wchar_t=no
9351 else
9352   echo "$as_me: failed program was:" >&5
9353 cat conftest.$ac_ext >&5
9354 cat >conftest.$ac_ext <<_ACEOF
9355 #line 9355 "configure"
9356 #include "confdefs.h"
9357
9358 #include <stdlib.h>
9359 #include <stdarg.h>
9360 #include <stdio.h>
9361 #include <wchar.h>
9362 #ifdef HAVE_LIBUTF8_H
9363 #include <libutf8.h>
9364 #endif
9365 int
9366 main ()
9367 {
9368 wchar_t value
9369   ;
9370   return 0;
9371 }
9372 _ACEOF
9373 rm -f conftest.$ac_objext
9374 if { (eval echo "$as_me:9374: \"$ac_compile\"") >&5
9375   (eval $ac_compile) 2>&5
9376   ac_status=$?
9377   echo "$as_me:9377: \$? = $ac_status" >&5
9378   (exit $ac_status); } &&
9379          { ac_try='test -s conftest.$ac_objext'
9380   { (eval echo "$as_me:9380: \"$ac_try\"") >&5
9381   (eval $ac_try) 2>&5
9382   ac_status=$?
9383   echo "$as_me:9383: \$? = $ac_status" >&5
9384   (exit $ac_status); }; }; then
9385   cf_cv_wchar_t=yes
9386 else
9387   echo "$as_me: failed program was:" >&5
9388 cat conftest.$ac_ext >&5
9389 cf_cv_wchar_t=unknown
9390 fi
9391 rm -f conftest.$ac_objext conftest.$ac_ext
9392 fi
9393 rm -f conftest.$ac_objext conftest.$ac_ext
9394 fi
9395 echo "$as_me:9395: result: $cf_cv_wchar_t" >&5
9396 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9397
9398 if test "$cf_cv_wchar_t" = yes ; then
9399         cat >>confdefs.h <<\EOF
9400 #define NEED_WCHAR_H 1
9401 EOF
9402
9403         NEED_WCHAR_H=1
9404 fi
9405
9406 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9407 if test "$cf_cv_wchar_t" = unknown ; then
9408         NCURSES_WCHAR_T=1
9409 fi
9410
9411 # if we find wchar_t in either place, use substitution to provide a fallback.
9412 if test "$cf_cv_wchar_t" != unknown ; then
9413         NCURSES_OK_WCHAR_T=1
9414 fi
9415
9416 # This is needed on Tru64 5.0 to declare wint_t
9417 echo "$as_me:9417: checking if we must include wchar.h to declare wint_t" >&5
9418 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9419 if test "${cf_cv_wint_t+set}" = set; then
9420   echo $ECHO_N "(cached) $ECHO_C" >&6
9421 else
9422
9423 cat >conftest.$ac_ext <<_ACEOF
9424 #line 9424 "configure"
9425 #include "confdefs.h"
9426
9427 #include <stdlib.h>
9428 #include <stdarg.h>
9429 #include <stdio.h>
9430 #ifdef HAVE_LIBUTF8_H
9431 #include <libutf8.h>
9432 #endif
9433 int
9434 main ()
9435 {
9436 wint_t state
9437   ;
9438   return 0;
9439 }
9440 _ACEOF
9441 rm -f conftest.$ac_objext
9442 if { (eval echo "$as_me:9442: \"$ac_compile\"") >&5
9443   (eval $ac_compile) 2>&5
9444   ac_status=$?
9445   echo "$as_me:9445: \$? = $ac_status" >&5
9446   (exit $ac_status); } &&
9447          { ac_try='test -s conftest.$ac_objext'
9448   { (eval echo "$as_me:9448: \"$ac_try\"") >&5
9449   (eval $ac_try) 2>&5
9450   ac_status=$?
9451   echo "$as_me:9451: \$? = $ac_status" >&5
9452   (exit $ac_status); }; }; then
9453   cf_cv_wint_t=no
9454 else
9455   echo "$as_me: failed program was:" >&5
9456 cat conftest.$ac_ext >&5
9457 cat >conftest.$ac_ext <<_ACEOF
9458 #line 9458 "configure"
9459 #include "confdefs.h"
9460
9461 #include <stdlib.h>
9462 #include <stdarg.h>
9463 #include <stdio.h>
9464 #include <wchar.h>
9465 #ifdef HAVE_LIBUTF8_H
9466 #include <libutf8.h>
9467 #endif
9468 int
9469 main ()
9470 {
9471 wint_t value
9472   ;
9473   return 0;
9474 }
9475 _ACEOF
9476 rm -f conftest.$ac_objext
9477 if { (eval echo "$as_me:9477: \"$ac_compile\"") >&5
9478   (eval $ac_compile) 2>&5
9479   ac_status=$?
9480   echo "$as_me:9480: \$? = $ac_status" >&5
9481   (exit $ac_status); } &&
9482          { ac_try='test -s conftest.$ac_objext'
9483   { (eval echo "$as_me:9483: \"$ac_try\"") >&5
9484   (eval $ac_try) 2>&5
9485   ac_status=$?
9486   echo "$as_me:9486: \$? = $ac_status" >&5
9487   (exit $ac_status); }; }; then
9488   cf_cv_wint_t=yes
9489 else
9490   echo "$as_me: failed program was:" >&5
9491 cat conftest.$ac_ext >&5
9492 cf_cv_wint_t=unknown
9493 fi
9494 rm -f conftest.$ac_objext conftest.$ac_ext
9495 fi
9496 rm -f conftest.$ac_objext conftest.$ac_ext
9497 fi
9498 echo "$as_me:9498: result: $cf_cv_wint_t" >&5
9499 echo "${ECHO_T}$cf_cv_wint_t" >&6
9500
9501 if test "$cf_cv_wint_t" = yes ; then
9502         cat >>confdefs.h <<\EOF
9503 #define NEED_WCHAR_H 1
9504 EOF
9505
9506         NEED_WCHAR_H=1
9507 fi
9508
9509 # if we do not find wint_t in either place, use substitution to provide a fallback.
9510 if test "$cf_cv_wint_t" = unknown ; then
9511         NCURSES_WINT_T=1
9512 fi
9513
9514 # if we find wint_t in either place, use substitution to provide a fallback.
9515 if test "$cf_cv_wint_t" != unknown ; then
9516         NCURSES_OK_WINT_T=1
9517 fi
9518
9519         if test "$NCURSES_MBSTATE_T" != 0; then
9520                 cat >>confdefs.h <<\EOF
9521 #define NEED_MBSTATE_T_DEF 1
9522 EOF
9523
9524         fi
9525 fi
9526
9527 ###   use option --disable-lp64 to allow long chtype
9528 case $cf_cv_abi_version in
9529 [345]*)
9530         default_with_lp64=no
9531         ;;
9532 *)
9533         default_with_lp64=yes
9534         ;;
9535 esac
9536
9537 echo "$as_me:9537: checking whether to enable _LP64 definition in curses.h" >&5
9538 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9539
9540 # Check whether --enable-lp64 or --disable-lp64 was given.
9541 if test "${enable_lp64+set}" = set; then
9542   enableval="$enable_lp64"
9543   with_lp64=$enableval
9544 else
9545   with_lp64=$default_with_lp64
9546 fi;
9547 echo "$as_me:9547: result: $with_lp64" >&5
9548 echo "${ECHO_T}$with_lp64" >&6
9549
9550 if test "$with_lp64" = yes ; then
9551         cf_cv_enable_lp64=1
9552 else
9553         cf_cv_enable_lp64=0
9554 fi
9555
9556 # Check whether --enable-largefile or --disable-largefile was given.
9557 if test "${enable_largefile+set}" = set; then
9558   enableval="$enable_largefile"
9559
9560 fi;
9561 if test "$enable_largefile" != no; then
9562
9563   echo "$as_me:9563: checking for special C compiler options needed for large files" >&5
9564 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9565 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9566   echo $ECHO_N "(cached) $ECHO_C" >&6
9567 else
9568   ac_cv_sys_largefile_CC=no
9569      if test "$GCC" != yes; then
9570        ac_save_CC=$CC
9571        while :; do
9572          # IRIX 6.2 and later do not support large files by default,
9573          # so use the C compiler's -n32 option if that helps.
9574          cat >conftest.$ac_ext <<_ACEOF
9575 #line 9575 "configure"
9576 #include "confdefs.h"
9577 #include <sys/types.h>
9578  /* Check that off_t can represent 2**63 - 1 correctly.
9579     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9580     since some C++ compilers masquerading as C compilers
9581     incorrectly reject 9223372036854775807.  */
9582 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9583   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9584                        && LARGE_OFF_T % 2147483647 == 1)
9585                       ? 1 : -1];
9586 int
9587 main ()
9588 {
9589
9590   ;
9591   return 0;
9592 }
9593 _ACEOF
9594          rm -f conftest.$ac_objext
9595 if { (eval echo "$as_me:9595: \"$ac_compile\"") >&5
9596   (eval $ac_compile) 2>&5
9597   ac_status=$?
9598   echo "$as_me:9598: \$? = $ac_status" >&5
9599   (exit $ac_status); } &&
9600          { ac_try='test -s conftest.$ac_objext'
9601   { (eval echo "$as_me:9601: \"$ac_try\"") >&5
9602   (eval $ac_try) 2>&5
9603   ac_status=$?
9604   echo "$as_me:9604: \$? = $ac_status" >&5
9605   (exit $ac_status); }; }; then
9606   break
9607 else
9608   echo "$as_me: failed program was:" >&5
9609 cat conftest.$ac_ext >&5
9610 fi
9611 rm -f conftest.$ac_objext
9612          CC="$CC -n32"
9613          rm -f conftest.$ac_objext
9614 if { (eval echo "$as_me:9614: \"$ac_compile\"") >&5
9615   (eval $ac_compile) 2>&5
9616   ac_status=$?
9617   echo "$as_me:9617: \$? = $ac_status" >&5
9618   (exit $ac_status); } &&
9619          { ac_try='test -s conftest.$ac_objext'
9620   { (eval echo "$as_me:9620: \"$ac_try\"") >&5
9621   (eval $ac_try) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit $ac_status); }; }; then
9625   ac_cv_sys_largefile_CC=' -n32'; break
9626 else
9627   echo "$as_me: failed program was:" >&5
9628 cat conftest.$ac_ext >&5
9629 fi
9630 rm -f conftest.$ac_objext
9631          break
9632        done
9633        CC=$ac_save_CC
9634        rm -f conftest.$ac_ext
9635     fi
9636 fi
9637 echo "$as_me:9637: result: $ac_cv_sys_largefile_CC" >&5
9638 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9639   if test "$ac_cv_sys_largefile_CC" != no; then
9640     CC=$CC$ac_cv_sys_largefile_CC
9641   fi
9642
9643   echo "$as_me:9643: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9644 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9645 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9646   echo $ECHO_N "(cached) $ECHO_C" >&6
9647 else
9648   while :; do
9649   ac_cv_sys_file_offset_bits=no
9650   cat >conftest.$ac_ext <<_ACEOF
9651 #line 9651 "configure"
9652 #include "confdefs.h"
9653 #include <sys/types.h>
9654  /* Check that off_t can represent 2**63 - 1 correctly.
9655     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9656     since some C++ compilers masquerading as C compilers
9657     incorrectly reject 9223372036854775807.  */
9658 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9659   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9660                        && LARGE_OFF_T % 2147483647 == 1)
9661                       ? 1 : -1];
9662 int
9663 main ()
9664 {
9665
9666   ;
9667   return 0;
9668 }
9669 _ACEOF
9670 rm -f conftest.$ac_objext
9671 if { (eval echo "$as_me:9671: \"$ac_compile\"") >&5
9672   (eval $ac_compile) 2>&5
9673   ac_status=$?
9674   echo "$as_me:9674: \$? = $ac_status" >&5
9675   (exit $ac_status); } &&
9676          { ac_try='test -s conftest.$ac_objext'
9677   { (eval echo "$as_me:9677: \"$ac_try\"") >&5
9678   (eval $ac_try) 2>&5
9679   ac_status=$?
9680   echo "$as_me:9680: \$? = $ac_status" >&5
9681   (exit $ac_status); }; }; then
9682   break
9683 else
9684   echo "$as_me: failed program was:" >&5
9685 cat conftest.$ac_ext >&5
9686 fi
9687 rm -f conftest.$ac_objext conftest.$ac_ext
9688   cat >conftest.$ac_ext <<_ACEOF
9689 #line 9689 "configure"
9690 #include "confdefs.h"
9691 #define _FILE_OFFSET_BITS 64
9692 #include <sys/types.h>
9693  /* Check that off_t can represent 2**63 - 1 correctly.
9694     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9695     since some C++ compilers masquerading as C compilers
9696     incorrectly reject 9223372036854775807.  */
9697 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9698   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9699                        && LARGE_OFF_T % 2147483647 == 1)
9700                       ? 1 : -1];
9701 int
9702 main ()
9703 {
9704
9705   ;
9706   return 0;
9707 }
9708 _ACEOF
9709 rm -f conftest.$ac_objext
9710 if { (eval echo "$as_me:9710: \"$ac_compile\"") >&5
9711   (eval $ac_compile) 2>&5
9712   ac_status=$?
9713   echo "$as_me:9713: \$? = $ac_status" >&5
9714   (exit $ac_status); } &&
9715          { ac_try='test -s conftest.$ac_objext'
9716   { (eval echo "$as_me:9716: \"$ac_try\"") >&5
9717   (eval $ac_try) 2>&5
9718   ac_status=$?
9719   echo "$as_me:9719: \$? = $ac_status" >&5
9720   (exit $ac_status); }; }; then
9721   ac_cv_sys_file_offset_bits=64; break
9722 else
9723   echo "$as_me: failed program was:" >&5
9724 cat conftest.$ac_ext >&5
9725 fi
9726 rm -f conftest.$ac_objext conftest.$ac_ext
9727   break
9728 done
9729 fi
9730 echo "$as_me:9730: result: $ac_cv_sys_file_offset_bits" >&5
9731 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9732 if test "$ac_cv_sys_file_offset_bits" != no; then
9733
9734 cat >>confdefs.h <<EOF
9735 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9736 EOF
9737
9738 fi
9739 rm -rf conftest*
9740   echo "$as_me:9740: checking for _LARGE_FILES value needed for large files" >&5
9741 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9742 if test "${ac_cv_sys_large_files+set}" = set; then
9743   echo $ECHO_N "(cached) $ECHO_C" >&6
9744 else
9745   while :; do
9746   ac_cv_sys_large_files=no
9747   cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 #include <sys/types.h>
9751  /* Check that off_t can represent 2**63 - 1 correctly.
9752     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9753     since some C++ compilers masquerading as C compilers
9754     incorrectly reject 9223372036854775807.  */
9755 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9756   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9757                        && LARGE_OFF_T % 2147483647 == 1)
9758                       ? 1 : -1];
9759 int
9760 main ()
9761 {
9762
9763   ;
9764   return 0;
9765 }
9766 _ACEOF
9767 rm -f conftest.$ac_objext
9768 if { (eval echo "$as_me:9768: \"$ac_compile\"") >&5
9769   (eval $ac_compile) 2>&5
9770   ac_status=$?
9771   echo "$as_me:9771: \$? = $ac_status" >&5
9772   (exit $ac_status); } &&
9773          { ac_try='test -s conftest.$ac_objext'
9774   { (eval echo "$as_me:9774: \"$ac_try\"") >&5
9775   (eval $ac_try) 2>&5
9776   ac_status=$?
9777   echo "$as_me:9777: \$? = $ac_status" >&5
9778   (exit $ac_status); }; }; then
9779   break
9780 else
9781   echo "$as_me: failed program was:" >&5
9782 cat conftest.$ac_ext >&5
9783 fi
9784 rm -f conftest.$ac_objext conftest.$ac_ext
9785   cat >conftest.$ac_ext <<_ACEOF
9786 #line 9786 "configure"
9787 #include "confdefs.h"
9788 #define _LARGE_FILES 1
9789 #include <sys/types.h>
9790  /* Check that off_t can represent 2**63 - 1 correctly.
9791     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9792     since some C++ compilers masquerading as C compilers
9793     incorrectly reject 9223372036854775807.  */
9794 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9795   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9796                        && LARGE_OFF_T % 2147483647 == 1)
9797                       ? 1 : -1];
9798 int
9799 main ()
9800 {
9801
9802   ;
9803   return 0;
9804 }
9805 _ACEOF
9806 rm -f conftest.$ac_objext
9807 if { (eval echo "$as_me:9807: \"$ac_compile\"") >&5
9808   (eval $ac_compile) 2>&5
9809   ac_status=$?
9810   echo "$as_me:9810: \$? = $ac_status" >&5
9811   (exit $ac_status); } &&
9812          { ac_try='test -s conftest.$ac_objext'
9813   { (eval echo "$as_me:9813: \"$ac_try\"") >&5
9814   (eval $ac_try) 2>&5
9815   ac_status=$?
9816   echo "$as_me:9816: \$? = $ac_status" >&5
9817   (exit $ac_status); }; }; then
9818   ac_cv_sys_large_files=1; break
9819 else
9820   echo "$as_me: failed program was:" >&5
9821 cat conftest.$ac_ext >&5
9822 fi
9823 rm -f conftest.$ac_objext conftest.$ac_ext
9824   break
9825 done
9826 fi
9827 echo "$as_me:9827: result: $ac_cv_sys_large_files" >&5
9828 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9829 if test "$ac_cv_sys_large_files" != no; then
9830
9831 cat >>confdefs.h <<EOF
9832 #define _LARGE_FILES $ac_cv_sys_large_files
9833 EOF
9834
9835 fi
9836 rm -rf conftest*
9837 fi
9838
9839     if test "$enable_largefile" != no ; then
9840         echo "$as_me:9840: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9841 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9842 if test "${ac_cv_sys_largefile_source+set}" = set; then
9843   echo $ECHO_N "(cached) $ECHO_C" >&6
9844 else
9845   while :; do
9846   ac_cv_sys_largefile_source=no
9847   cat >conftest.$ac_ext <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #include <stdio.h>
9851 int
9852 main ()
9853 {
9854 return !fseeko;
9855   ;
9856   return 0;
9857 }
9858 _ACEOF
9859 rm -f conftest.$ac_objext
9860 if { (eval echo "$as_me:9860: \"$ac_compile\"") >&5
9861   (eval $ac_compile) 2>&5
9862   ac_status=$?
9863   echo "$as_me:9863: \$? = $ac_status" >&5
9864   (exit $ac_status); } &&
9865          { ac_try='test -s conftest.$ac_objext'
9866   { (eval echo "$as_me:9866: \"$ac_try\"") >&5
9867   (eval $ac_try) 2>&5
9868   ac_status=$?
9869   echo "$as_me:9869: \$? = $ac_status" >&5
9870   (exit $ac_status); }; }; then
9871   break
9872 else
9873   echo "$as_me: failed program was:" >&5
9874 cat conftest.$ac_ext >&5
9875 fi
9876 rm -f conftest.$ac_objext conftest.$ac_ext
9877   cat >conftest.$ac_ext <<_ACEOF
9878 #line 9878 "configure"
9879 #include "confdefs.h"
9880 #define _LARGEFILE_SOURCE 1
9881 #include <stdio.h>
9882 int
9883 main ()
9884 {
9885 return !fseeko;
9886   ;
9887   return 0;
9888 }
9889 _ACEOF
9890 rm -f conftest.$ac_objext
9891 if { (eval echo "$as_me:9891: \"$ac_compile\"") >&5
9892   (eval $ac_compile) 2>&5
9893   ac_status=$?
9894   echo "$as_me:9894: \$? = $ac_status" >&5
9895   (exit $ac_status); } &&
9896          { ac_try='test -s conftest.$ac_objext'
9897   { (eval echo "$as_me:9897: \"$ac_try\"") >&5
9898   (eval $ac_try) 2>&5
9899   ac_status=$?
9900   echo "$as_me:9900: \$? = $ac_status" >&5
9901   (exit $ac_status); }; }; then
9902   ac_cv_sys_largefile_source=1; break
9903 else
9904   echo "$as_me: failed program was:" >&5
9905 cat conftest.$ac_ext >&5
9906 fi
9907 rm -f conftest.$ac_objext conftest.$ac_ext
9908   break
9909 done
9910 fi
9911 echo "$as_me:9911: result: $ac_cv_sys_largefile_source" >&5
9912 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9913 if test "$ac_cv_sys_largefile_source" != no; then
9914
9915 cat >>confdefs.h <<EOF
9916 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9917 EOF
9918
9919 fi
9920 rm -rf conftest*
9921
9922 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9923 # in glibc 2.1.3, but that breaks too many other things.
9924 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9925 echo "$as_me:9925: checking for fseeko" >&5
9926 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9927 if test "${ac_cv_func_fseeko+set}" = set; then
9928   echo $ECHO_N "(cached) $ECHO_C" >&6
9929 else
9930   cat >conftest.$ac_ext <<_ACEOF
9931 #line 9931 "configure"
9932 #include "confdefs.h"
9933 #include <stdio.h>
9934 int
9935 main ()
9936 {
9937 return fseeko && fseeko (stdin, 0, 0);
9938   ;
9939   return 0;
9940 }
9941 _ACEOF
9942 rm -f conftest.$ac_objext conftest$ac_exeext
9943 if { (eval echo "$as_me:9943: \"$ac_link\"") >&5
9944   (eval $ac_link) 2>&5
9945   ac_status=$?
9946   echo "$as_me:9946: \$? = $ac_status" >&5
9947   (exit $ac_status); } &&
9948          { ac_try='test -s conftest$ac_exeext'
9949   { (eval echo "$as_me:9949: \"$ac_try\"") >&5
9950   (eval $ac_try) 2>&5
9951   ac_status=$?
9952   echo "$as_me:9952: \$? = $ac_status" >&5
9953   (exit $ac_status); }; }; then
9954   ac_cv_func_fseeko=yes
9955 else
9956   echo "$as_me: failed program was:" >&5
9957 cat conftest.$ac_ext >&5
9958 ac_cv_func_fseeko=no
9959 fi
9960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9961 fi
9962 echo "$as_me:9962: result: $ac_cv_func_fseeko" >&5
9963 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9964 if test $ac_cv_func_fseeko = yes; then
9965
9966 cat >>confdefs.h <<\EOF
9967 #define HAVE_FSEEKO 1
9968 EOF
9969
9970 fi
9971
9972         # Normally we would collect these definitions in the config.h,
9973         # but (like _XOPEN_SOURCE), some environments rely on having these
9974         # defined before any of the system headers are included.  Another
9975         # case comes up with C++, e.g., on AIX the compiler compiles the
9976         # header files by themselves before looking at the body files it is
9977         # told to compile.  For ncurses, those header files do not include
9978         # the config.h
9979         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9980         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9981         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9982
9983         echo "$as_me:9983: checking whether to use struct dirent64" >&5
9984 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9985 if test "${cf_cv_struct_dirent64+set}" = set; then
9986   echo $ECHO_N "(cached) $ECHO_C" >&6
9987 else
9988
9989                 cat >conftest.$ac_ext <<_ACEOF
9990 #line 9990 "configure"
9991 #include "confdefs.h"
9992
9993 #include <sys/types.h>
9994 #include <dirent.h>
9995
9996 int
9997 main ()
9998 {
9999
10000                 /* if transitional largefile support is setup, this is true */
10001                 extern struct dirent64 * readdir(DIR *);
10002                 struct dirent64 *x = readdir((DIR *)0);
10003                 struct dirent *y = readdir((DIR *)0);
10004                 int z = x - y;
10005
10006   ;
10007   return 0;
10008 }
10009 _ACEOF
10010 rm -f conftest.$ac_objext
10011 if { (eval echo "$as_me:10011: \"$ac_compile\"") >&5
10012   (eval $ac_compile) 2>&5
10013   ac_status=$?
10014   echo "$as_me:10014: \$? = $ac_status" >&5
10015   (exit $ac_status); } &&
10016          { ac_try='test -s conftest.$ac_objext'
10017   { (eval echo "$as_me:10017: \"$ac_try\"") >&5
10018   (eval $ac_try) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); }; }; then
10022   cf_cv_struct_dirent64=yes
10023 else
10024   echo "$as_me: failed program was:" >&5
10025 cat conftest.$ac_ext >&5
10026 cf_cv_struct_dirent64=no
10027 fi
10028 rm -f conftest.$ac_objext conftest.$ac_ext
10029
10030 fi
10031 echo "$as_me:10031: result: $cf_cv_struct_dirent64" >&5
10032 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10033         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10034 #define HAVE_STRUCT_DIRENT64 1
10035 EOF
10036
10037     fi
10038
10039 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10040 echo "$as_me:10040: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10041 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10042
10043 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10044 if test "${enable_tparm_varargs+set}" = set; then
10045   enableval="$enable_tparm_varargs"
10046   with_tparm_varargs=$enableval
10047 else
10048   with_tparm_varargs=yes
10049 fi;
10050 echo "$as_me:10050: result: $with_tparm_varargs" >&5
10051 echo "${ECHO_T}$with_tparm_varargs" >&6
10052 NCURSES_TPARM_VARARGS=0
10053 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10054
10055 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10056 if test "$with_ticlib" != no ; then
10057 echo "$as_me:10057: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10058 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10059
10060 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10061 if test "${enable_tic_depends+set}" = set; then
10062   enableval="$enable_tic_depends"
10063   with_tic_depends=$enableval
10064 else
10065   with_tic_depends=yes
10066 fi;
10067 echo "$as_me:10067: result: $with_tic_depends" >&5
10068 echo "${ECHO_T}$with_tic_depends" >&6
10069 else
10070         with_tic_depends=no
10071 fi
10072
10073 ###   use option --with-bool to override bool's type
10074 echo "$as_me:10074: checking for type of bool" >&5
10075 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10076
10077 # Check whether --with-bool or --without-bool was given.
10078 if test "${with_bool+set}" = set; then
10079   withval="$with_bool"
10080   NCURSES_BOOL="$withval"
10081 else
10082   NCURSES_BOOL=auto
10083 fi;
10084 echo "$as_me:10084: result: $NCURSES_BOOL" >&5
10085 echo "${ECHO_T}$NCURSES_BOOL" >&6
10086
10087 echo "$as_me:10087: checking for alternate terminal capabilities file" >&5
10088 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10089
10090 # Check whether --with-caps or --without-caps was given.
10091 if test "${with_caps+set}" = set; then
10092   withval="$with_caps"
10093   TERMINFO_CAPS=Caps.$withval
10094 else
10095   TERMINFO_CAPS=Caps
10096 fi;
10097 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10098 echo "$as_me:10098: result: $TERMINFO_CAPS" >&5
10099 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10100
10101 ###   use option --with-chtype to override chtype's type
10102 echo "$as_me:10102: checking for type of chtype" >&5
10103 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10104
10105 # Check whether --with-chtype or --without-chtype was given.
10106 if test "${with_chtype+set}" = set; then
10107   withval="$with_chtype"
10108   NCURSES_CHTYPE="$withval"
10109 else
10110   NCURSES_CHTYPE=auto
10111 fi;
10112 echo "$as_me:10112: result: $NCURSES_CHTYPE" >&5
10113 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10114
10115 ###   use option --with-ospeed to override ospeed's type
10116 echo "$as_me:10116: checking for type of ospeed" >&5
10117 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10118
10119 # Check whether --with-ospeed or --without-ospeed was given.
10120 if test "${with_ospeed+set}" = set; then
10121   withval="$with_ospeed"
10122   NCURSES_OSPEED="$withval"
10123 else
10124   NCURSES_OSPEED=short
10125 fi;
10126 echo "$as_me:10126: result: $NCURSES_OSPEED" >&5
10127 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10128
10129 ###   use option --with-mmask-t to override mmask_t's type
10130 echo "$as_me:10130: checking for type of mmask_t" >&5
10131 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10132
10133 # Check whether --with-mmask-t or --without-mmask-t was given.
10134 if test "${with_mmask_t+set}" = set; then
10135   withval="$with_mmask_t"
10136   NCURSES_MMASK_T="$withval"
10137 else
10138   NCURSES_MMASK_T=auto
10139 fi;
10140 echo "$as_me:10140: result: $NCURSES_MMASK_T" >&5
10141 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10142
10143 ###   use option --with-ccharw-max to override CCHARW_MAX size
10144 echo "$as_me:10144: checking for size CCHARW_MAX" >&5
10145 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10146
10147 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10148 if test "${with_ccharw_max+set}" = set; then
10149   withval="$with_ccharw_max"
10150   NCURSES_CCHARW_MAX="$withval"
10151 else
10152   NCURSES_CCHARW_MAX=5
10153 fi;
10154 echo "$as_me:10154: result: $NCURSES_CCHARW_MAX" >&5
10155 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10156
10157 ###   use option --with-tparm-arg to override tparm's argument type
10158 echo "$as_me:10158: checking for type of tparm args" >&5
10159 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10160
10161 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10162 if test "${with_tparm_arg+set}" = set; then
10163   withval="$with_tparm_arg"
10164   NCURSES_TPARM_ARG="$withval"
10165 else
10166   NCURSES_TPARM_ARG=long
10167 fi;
10168 echo "$as_me:10168: result: $NCURSES_TPARM_ARG" >&5
10169 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10170
10171 ### Enable compiling-in rcs id's
10172 echo "$as_me:10172: checking if RCS identifiers should be compiled-in" >&5
10173 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10174
10175 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10176 if test "${with_rcs_ids+set}" = set; then
10177   withval="$with_rcs_ids"
10178   with_rcs_ids=$withval
10179 else
10180   with_rcs_ids=no
10181 fi;
10182 echo "$as_me:10182: result: $with_rcs_ids" >&5
10183 echo "${ECHO_T}$with_rcs_ids" >&6
10184 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10185 #define USE_RCS_IDS 1
10186 EOF
10187
10188 ###############################################################################
10189
10190 echo "$as_me:10190: checking format of man-pages" >&5
10191 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10192
10193 # Check whether --with-manpage-format or --without-manpage-format was given.
10194 if test "${with_manpage_format+set}" = set; then
10195   withval="$with_manpage_format"
10196   MANPAGE_FORMAT=$withval
10197 else
10198   MANPAGE_FORMAT=unknown
10199 fi;
10200
10201 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10202 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10203
10204 cf_unknown=
10205
10206 case $MANPAGE_FORMAT in
10207 unknown)
10208   if test -z "$MANPATH" ; then
10209     MANPATH="/usr/man:/usr/share/man"
10210   fi
10211
10212   # look for the 'date' man-page (it's most likely to be installed!)
10213   MANPAGE_FORMAT=
10214   cf_preform=no
10215   cf_catonly=yes
10216   cf_example=date
10217
10218   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10219   for cf_dir in $MANPATH; do
10220     test -z "$cf_dir" && cf_dir=/usr/man
10221     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
10222     do
10223       cf_test=`echo $cf_name | sed -e 's/*//'`
10224       if test "x$cf_test" = "x$cf_name" ; then
10225
10226         case "$cf_name" in
10227         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10228         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10229         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10230         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10231         esac
10232
10233         case "$cf_name" in
10234         $cf_dir/man*)
10235           cf_catonly=no
10236           ;;
10237         $cf_dir/cat*)
10238           cf_preform=yes
10239           ;;
10240         esac
10241         break
10242       fi
10243
10244       # if we found a match in either man* or cat*, stop looking
10245       if test -n "$MANPAGE_FORMAT" ; then
10246         cf_found=no
10247         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10248         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10249         case "$cf_name" in
10250         $cf_dir/cat*)
10251           cf_found=yes
10252           ;;
10253         esac
10254         test $cf_found=yes && break
10255       fi
10256     done
10257     # only check the first directory in $MANPATH where we find manpages
10258     if test -n "$MANPAGE_FORMAT" ; then
10259        break
10260     fi
10261   done
10262   # if we did not find the example, just assume it is normal
10263   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10264   IFS="$ac_save_ifs"
10265   ;;
10266 *)
10267   for cf_option in $MANPAGE_FORMAT; do
10268      case $cf_option in #(vi
10269      gzip|compress|BSDI|normal|formatted|catonly)
10270        ;;
10271      *)
10272        cf_unknown="$cf_unknown $cf_option"
10273        ;;
10274      esac
10275   done
10276   ;;
10277 esac
10278
10279 echo "$as_me:10279: result: $MANPAGE_FORMAT" >&5
10280 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10281 if test -n "$cf_unknown" ; then
10282   { echo "$as_me:10282: WARNING: Unexpected manpage-format $cf_unknown" >&5
10283 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10284 fi
10285
10286 echo "$as_me:10286: checking for manpage renaming" >&5
10287 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10288
10289 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10290 if test "${with_manpage_renames+set}" = set; then
10291   withval="$with_manpage_renames"
10292   MANPAGE_RENAMES=$withval
10293 else
10294   MANPAGE_RENAMES=yes
10295 fi;
10296
10297 case ".$MANPAGE_RENAMES" in #(vi
10298 .no) #(vi
10299   ;;
10300 .|.yes)
10301   # Debian 'man' program?
10302   if test -f /etc/debian_version ; then
10303     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10304   else
10305     MANPAGE_RENAMES=no
10306   fi
10307   ;;
10308 esac
10309
10310 if test "$MANPAGE_RENAMES" != no ; then
10311   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10312     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10313   elif test ! -f $MANPAGE_RENAMES ; then
10314     { { echo "$as_me:10314: error: not a filename: $MANPAGE_RENAMES" >&5
10315 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10316    { (exit 1); exit 1; }; }
10317   fi
10318
10319   test ! -d man && mkdir man
10320
10321   # Construct a sed-script to perform renaming within man-pages
10322   if test -n "$MANPAGE_RENAMES" ; then
10323     test ! -d man && mkdir man
10324     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10325   fi
10326 fi
10327
10328 echo "$as_me:10328: result: $MANPAGE_RENAMES" >&5
10329 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10330
10331 echo "$as_me:10331: checking if manpage aliases will be installed" >&5
10332 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10333
10334 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10335 if test "${with_manpage_aliases+set}" = set; then
10336   withval="$with_manpage_aliases"
10337   MANPAGE_ALIASES=$withval
10338 else
10339   MANPAGE_ALIASES=yes
10340 fi;
10341
10342 echo "$as_me:10342: result: $MANPAGE_ALIASES" >&5
10343 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10344
10345 case "x$LN_S" in #(vi
10346 xln*) #(vi
10347         cf_use_symlinks=yes
10348         ;;
10349 *)
10350         cf_use_symlinks=no
10351         ;;
10352 esac
10353
10354 MANPAGE_SYMLINKS=no
10355 if test "$MANPAGE_ALIASES" = yes ; then
10356 echo "$as_me:10356: checking if manpage symlinks should be used" >&5
10357 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10358
10359 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10360 if test "${with_manpage_symlinks+set}" = set; then
10361   withval="$with_manpage_symlinks"
10362   MANPAGE_SYMLINKS=$withval
10363 else
10364   MANPAGE_SYMLINKS=$cf_use_symlinks
10365 fi;
10366
10367 if test "$$cf_use_symlinks" = no; then
10368 if test "$MANPAGE_SYMLINKS" = yes ; then
10369         { echo "$as_me:10369: WARNING: cannot make symlinks" >&5
10370 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10371         MANPAGE_SYMLINKS=no
10372 fi
10373 fi
10374
10375 echo "$as_me:10375: result: $MANPAGE_SYMLINKS" >&5
10376 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10377 fi
10378
10379 echo "$as_me:10379: checking for manpage tbl" >&5
10380 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10381
10382 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10383 if test "${with_manpage_tbl+set}" = set; then
10384   withval="$with_manpage_tbl"
10385   MANPAGE_TBL=$withval
10386 else
10387   MANPAGE_TBL=no
10388 fi;
10389
10390 echo "$as_me:10390: result: $MANPAGE_TBL" >&5
10391 echo "${ECHO_T}$MANPAGE_TBL" >&6
10392
10393   if test "$prefix" = "NONE" ; then
10394      cf_prefix="$ac_default_prefix"
10395   else
10396      cf_prefix="$prefix"
10397   fi
10398
10399   case "$MANPAGE_FORMAT" in # (vi
10400   *catonly*) # (vi
10401     cf_format=yes
10402     cf_inboth=no
10403     ;;
10404   *formatted*) # (vi
10405     cf_format=yes
10406     cf_inboth=yes
10407     ;;
10408   *)
10409     cf_format=no
10410     cf_inboth=no
10411     ;;
10412   esac
10413
10414 test ! -d man && mkdir man
10415
10416 cf_so_strip=
10417 cf_compress=
10418 case "$MANPAGE_FORMAT" in #(vi
10419 *compress*) #(vi
10420         cf_so_strip="Z"
10421         cf_compress=compress
10422   ;;
10423 *gzip*)
10424         cf_so_strip="gz"
10425         cf_compress=gzip
10426   ;;
10427 esac
10428
10429 cf_edit_man=./edit_man.sh
10430 cf_man_alias=`pwd`/man_alias.sed
10431
10432 cat >$cf_edit_man <<CF_EOF
10433 #! /bin/sh
10434 # this script is generated by the configure-script CF_MAN_PAGES macro.
10435
10436 prefix="$cf_prefix"
10437 datarootdir="$datarootdir"
10438 datadir="$datadir"
10439
10440 NCURSES_MAJOR="$NCURSES_MAJOR"
10441 NCURSES_MINOR="$NCURSES_MINOR"
10442 NCURSES_PATCH="$NCURSES_PATCH"
10443
10444 NCURSES_OSPEED="$NCURSES_OSPEED"
10445 TERMINFO="$TERMINFO"
10446
10447 INSTALL="$INSTALL"
10448 INSTALL_DATA="$INSTALL_DATA"
10449
10450 transform="$program_transform_name"
10451
10452 TMP=\${TMPDIR:=/tmp}/man\$\$
10453 trap "rm -f \$TMP" 0 1 2 5 15
10454
10455 form=\$1
10456 shift || exit 1
10457
10458 verb=\$1
10459 shift || exit 1
10460
10461 mandir=\$1
10462 shift || exit 1
10463
10464 srcdir=\$1
10465 top_srcdir=\$srcdir/..
10466 shift || exit 1
10467
10468 if test "\$form" = normal ; then
10469         if test "$cf_format" = yes ; then
10470         if test "$cf_inboth" = no ; then
10471                 sh \$0 format \$verb \$mandir \$srcdir \$*
10472                 exit $?
10473         fi
10474         fi
10475         cf_subdir=\$mandir/man
10476         cf_tables=$MANPAGE_TBL
10477 else
10478         cf_subdir=\$mandir/cat
10479         cf_tables=yes
10480 fi
10481
10482 # process the list of source-files
10483 for i in \$* ; do
10484 case \$i in #(vi
10485 *.orig|*.rej) ;; #(vi
10486 *.[0-9]*)
10487         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10488         if test \$verb = installing ; then
10489         if test ! -d \$cf_subdir\${section} ; then
10490                 mkdir -p \$cf_subdir\$section
10491         fi
10492         fi
10493
10494         # replace variables in man page
10495         if test ! -f $cf_man_alias ; then
10496 cat >>$cf_man_alias <<-CF_EOF2
10497                 s,@DATADIR@,\$datadir,g
10498                 s,@TERMINFO@,\$TERMINFO,g
10499                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10500                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10501                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10502                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10503 CF_EOF
10504
10505         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10506         do
10507                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10508                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10509 cat >>$cf_edit_man <<-CF_EOF
10510                 s,@$cf_NAME@,$cf_name,g
10511 CF_EOF
10512         done
10513
10514 cat >>$cf_edit_man <<CF_EOF
10515 CF_EOF2
10516                 echo "...made $cf_man_alias"
10517         fi
10518
10519         aliases=
10520         cf_source=\`basename \$i\`
10521         inalias=\$cf_source
10522         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10523         if test ! -f \$inalias ; then
10524                 echo .. skipped \$cf_source
10525                 continue
10526         fi
10527 CF_EOF
10528
10529 if test "$MANPAGE_ALIASES" != no ; then
10530 cat >>$cf_edit_man <<CF_EOF
10531         nCurses=ignore.3x
10532         test $with_curses_h = yes && nCurses=ncurses.3x
10533         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10534 CF_EOF
10535 fi
10536
10537 if test "$MANPAGE_RENAMES" = no ; then
10538 cat >>$cf_edit_man <<CF_EOF
10539         # perform program transformations for section 1 man pages
10540         if test \$section = 1 ; then
10541                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10542         else
10543                 cf_target=\$cf_subdir\${section}/\$cf_source
10544         fi
10545 CF_EOF
10546 else
10547 cat >>$cf_edit_man <<CF_EOF
10548         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10549         if test -z "\$cf_target" ; then
10550                 echo '? missing rename for '\$cf_source
10551                 cf_target="\$cf_source"
10552         fi
10553         cf_target="\$cf_subdir\${section}/\${cf_target}"
10554
10555 CF_EOF
10556 fi
10557
10558 cat >>$cf_edit_man <<CF_EOF
10559         sed     -f $cf_man_alias \\
10560 CF_EOF
10561
10562 if test -f $MANPAGE_RENAMES ; then
10563 cat >>$cf_edit_man <<CF_EOF
10564                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10565 CF_EOF
10566 else
10567 cat >>$cf_edit_man <<CF_EOF
10568                 < \$i >\$TMP
10569 CF_EOF
10570 fi
10571
10572 cat >>$cf_edit_man <<CF_EOF
10573 if test \$cf_tables = yes ; then
10574         tbl \$TMP >\$TMP.out
10575         mv \$TMP.out \$TMP
10576 fi
10577 CF_EOF
10578
10579 if test $with_overwrite != yes ; then
10580 cat >>$cf_edit_man <<CF_EOF
10581         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10582         mv \$TMP.out \$TMP
10583 CF_EOF
10584 fi
10585
10586 if test $with_curses_h != yes ; then
10587 cat >>$cf_edit_man <<CF_EOF
10588         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10589         mv \$TMP.out \$TMP
10590 CF_EOF
10591 fi
10592
10593 cat >>$cf_edit_man <<CF_EOF
10594         if test \$form = format ; then
10595                 nroff -man \$TMP >\$TMP.out
10596                 mv \$TMP.out \$TMP
10597         fi
10598 CF_EOF
10599
10600 if test -n "$cf_compress" ; then
10601 cat >>$cf_edit_man <<CF_EOF
10602         if test \$verb = installing ; then
10603         if ( $cf_compress -f \$TMP )
10604         then
10605                 mv \$TMP.$cf_so_strip \$TMP
10606         fi
10607         fi
10608         cf_target="\$cf_target.$cf_so_strip"
10609 CF_EOF
10610 fi
10611
10612 case "$MANPAGE_FORMAT" in #(vi
10613 *BSDI*)
10614 cat >>$cf_edit_man <<CF_EOF
10615         if test \$form = format ; then
10616                 # BSDI installs only .0 suffixes in the cat directories
10617                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10618         fi
10619 CF_EOF
10620   ;;
10621 esac
10622
10623 cat >>$cf_edit_man <<CF_EOF
10624         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10625         if test \$verb = installing ; then
10626                 echo \$verb \$cf_target
10627                 \$INSTALL_DATA \$TMP \$cf_target
10628                 test -d \$cf_subdir\${section} &&
10629                 test -n "\$aliases" && (
10630                         cd \$cf_subdir\${section} && (
10631                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10632                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10633                                 cf_target=\`basename \$cf_target\`
10634                                 for cf_alias in \$aliases
10635                                 do
10636                                         if test \$section = 1 ; then
10637                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10638                                         fi
10639
10640                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10641                                                 if test -f \$cf_alias\${suffix} ; then
10642                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10643                                                         then
10644                                                                 continue
10645                                                         fi
10646                                                 fi
10647                                                 echo .. \$verb alias \$cf_alias\${suffix}
10648 CF_EOF
10649 case "x$LN_S" in #(vi
10650 *-f) #(vi
10651 cat >>$cf_edit_man <<CF_EOF
10652                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10653 CF_EOF
10654         ;;
10655 *)
10656 cat >>$cf_edit_man <<CF_EOF
10657                                                 rm -f \$cf_alias\${suffix}
10658                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10659 CF_EOF
10660         ;;
10661 esac
10662 cat >>$cf_edit_man <<CF_EOF
10663                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10664                                                 echo ".so \$cf_source" >\$TMP
10665 CF_EOF
10666 if test -n "$cf_compress" ; then
10667 cat >>$cf_edit_man <<CF_EOF
10668                                                 if test -n "$cf_so_strip" ; then
10669                                                         $cf_compress -f \$TMP
10670                                                         mv \$TMP.$cf_so_strip \$TMP
10671                                                 fi
10672 CF_EOF
10673 fi
10674 cat >>$cf_edit_man <<CF_EOF
10675                                                 echo .. \$verb alias \$cf_alias\${suffix}
10676                                                 rm -f \$cf_alias\${suffix}
10677                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10678                                         fi
10679                                 done
10680                         )
10681                 )
10682         elif test \$verb = removing ; then
10683                 test -f \$cf_target && (
10684                         echo \$verb \$cf_target
10685                         rm -f \$cf_target
10686                 )
10687                 test -d \$cf_subdir\${section} &&
10688                 test -n "\$aliases" && (
10689                         cd \$cf_subdir\${section} && (
10690                                 for cf_alias in \$aliases
10691                                 do
10692                                         if test \$section = 1 ; then
10693                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10694                                         fi
10695
10696                                         echo .. \$verb alias \$cf_alias\${suffix}
10697                                         rm -f \$cf_alias\${suffix}
10698                                 done
10699                         )
10700                 )
10701         else
10702 #               echo ".hy 0"
10703                 cat \$TMP
10704         fi
10705         ;;
10706 esac
10707 done
10708
10709 if test $cf_inboth = yes ; then
10710 if test \$form != format ; then
10711         sh \$0 format \$verb \$mandir \$srcdir \$*
10712 fi
10713 fi
10714
10715 exit 0
10716 CF_EOF
10717 chmod 755 $cf_edit_man
10718
10719 ###############################################################################
10720
10721 ### Note that some functions (such as const) are normally disabled anyway.
10722 echo "$as_me:10722: checking if you want to build with function extensions" >&5
10723 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10724
10725 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10726 if test "${enable_ext_funcs+set}" = set; then
10727   enableval="$enable_ext_funcs"
10728   with_ext_funcs=$enableval
10729 else
10730   with_ext_funcs=yes
10731 fi;
10732 echo "$as_me:10732: result: $with_ext_funcs" >&5
10733 echo "${ECHO_T}$with_ext_funcs" >&6
10734 if test "$with_ext_funcs" = yes ; then
10735         NCURSES_EXT_FUNCS=1
10736         cat >>confdefs.h <<\EOF
10737 #define HAVE_ASSUME_DEFAULT_COLORS 1
10738 EOF
10739
10740         cat >>confdefs.h <<\EOF
10741 #define HAVE_CURSES_VERSION 1
10742 EOF
10743
10744         cat >>confdefs.h <<\EOF
10745 #define HAVE_HAS_KEY 1
10746 EOF
10747
10748         cat >>confdefs.h <<\EOF
10749 #define HAVE_RESIZETERM 1
10750 EOF
10751
10752         cat >>confdefs.h <<\EOF
10753 #define HAVE_RESIZE_TERM 1
10754 EOF
10755
10756         cat >>confdefs.h <<\EOF
10757 #define HAVE_TERM_ENTRY_H 1
10758 EOF
10759
10760         cat >>confdefs.h <<\EOF
10761 #define HAVE_USE_DEFAULT_COLORS 1
10762 EOF
10763
10764         cat >>confdefs.h <<\EOF
10765 #define HAVE_USE_SCREEN 1
10766 EOF
10767
10768         cat >>confdefs.h <<\EOF
10769 #define HAVE_USE_WINDOW 1
10770 EOF
10771
10772         cat >>confdefs.h <<\EOF
10773 #define HAVE_WRESIZE 1
10774 EOF
10775
10776         cat >>confdefs.h <<\EOF
10777 #define NCURSES_EXT_FUNCS 1
10778 EOF
10779
10780         GENERATED_EXT_FUNCS=generated
10781 else
10782         NCURSES_EXT_FUNCS=0
10783         GENERATED_EXT_FUNCS=
10784 fi
10785
10786 echo "$as_me:10786: checking if you want to build with experimental SCREEN extensions" >&5
10787 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10788
10789 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10790 if test "${enable_sp_funcs+set}" = set; then
10791   enableval="$enable_sp_funcs"
10792   with_sp_funcs=$enableval
10793 else
10794   with_sp_funcs=no
10795 fi;
10796 echo "$as_me:10796: result: $with_sp_funcs" >&5
10797 echo "${ECHO_T}$with_sp_funcs" >&6
10798 if test "$with_sp_funcs" = yes ; then
10799         NCURSES_SP_FUNCS=1
10800         cat >>confdefs.h <<\EOF
10801 #define NCURSES_SP_FUNCS 1
10802 EOF
10803
10804         GENERATED_SP_FUNCS=generated
10805 else
10806         NCURSES_SP_FUNCS=0
10807         GENERATED_SP_FUNCS=
10808 fi
10809
10810 echo "$as_me:10810: checking if you want to build with experimental terminal-driver" >&5
10811 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10812
10813 # Check whether --enable-term-driver or --disable-term-driver was given.
10814 if test "${enable_term_driver+set}" = set; then
10815   enableval="$enable_term_driver"
10816   with_term_driver=$enableval
10817 else
10818   with_term_driver=no
10819 fi;
10820 echo "$as_me:10820: result: $with_term_driver" >&5
10821 echo "${ECHO_T}$with_term_driver" >&6
10822 if test "$with_term_driver" = yes ; then
10823         cat >>confdefs.h <<\EOF
10824 #define USE_TERM_DRIVER 1
10825 EOF
10826
10827         if test "$with_sp_funcs" != yes ; then
10828                 { { echo "$as_me:10828: error: The term-driver option relies upon sp-funcs" >&5
10829 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10830    { (exit 1); exit 1; }; }
10831         fi
10832 fi
10833
10834 ###   use option --enable-const to turn on use of const beyond that in XSI.
10835 echo "$as_me:10835: checking for extended use of const keyword" >&5
10836 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10837
10838 # Check whether --enable-const or --disable-const was given.
10839 if test "${enable_const+set}" = set; then
10840   enableval="$enable_const"
10841   with_ext_const=$enableval
10842 else
10843   with_ext_const=no
10844 fi;
10845 echo "$as_me:10845: result: $with_ext_const" >&5
10846 echo "${ECHO_T}$with_ext_const" >&6
10847 NCURSES_CONST='/*nothing*/'
10848 if test "$with_ext_const" = yes ; then
10849         NCURSES_CONST=const
10850 fi
10851
10852 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10853 echo "$as_me:10853: checking if you want to use extended colors" >&5
10854 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10855
10856 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10857 if test "${enable_ext_colors+set}" = set; then
10858   enableval="$enable_ext_colors"
10859   with_ext_colors=$enableval
10860 else
10861   with_ext_colors=no
10862 fi;
10863 echo "$as_me:10863: result: $with_ext_colors" >&5
10864 echo "${ECHO_T}$with_ext_colors" >&6
10865 NCURSES_EXT_COLORS=0
10866 if test "$with_ext_colors" = yes ; then
10867         if test "$with_widec" != yes ; then
10868                 { { echo "$as_me:10868: error: This option applies only to wide-character library" >&5
10869 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10870    { (exit 1); exit 1; }; }
10871         else
10872                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10873
10874 if test "${with_abi_version+set}" != set; then
10875         case $cf_cv_rel_version in
10876         5.*)
10877                 cf_cv_rel_version=6.0
10878                 cf_cv_abi_version=6
10879                 { echo "$as_me:10879: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10880 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10881                 ;;
10882         esac
10883 fi
10884
10885         fi
10886         NCURSES_EXT_COLORS=1
10887         cat >>confdefs.h <<\EOF
10888 #define NCURSES_EXT_COLORS 1
10889 EOF
10890
10891 fi
10892
10893 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10894 echo "$as_me:10894: checking if you want to use extended mouse encoding" >&5
10895 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10896
10897 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10898 if test "${enable_ext_mouse+set}" = set; then
10899   enableval="$enable_ext_mouse"
10900   with_ext_mouse=$enableval
10901 else
10902   with_ext_mouse=no
10903 fi;
10904 echo "$as_me:10904: result: $with_ext_mouse" >&5
10905 echo "${ECHO_T}$with_ext_mouse" >&6
10906 NCURSES_MOUSE_VERSION=1
10907 if test "$with_ext_mouse" = yes ; then
10908         NCURSES_MOUSE_VERSION=2
10909
10910 if test "${with_abi_version+set}" != set; then
10911         case $cf_cv_rel_version in
10912         5.*)
10913                 cf_cv_rel_version=6.0
10914                 cf_cv_abi_version=6
10915                 { echo "$as_me:10915: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10916 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10917                 ;;
10918         esac
10919 fi
10920
10921 fi
10922
10923 echo "$as_me:10923: checking if you want \$NCURSES_NO_PADDING code" >&5
10924 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10925
10926 # Check whether --enable-no-padding or --disable-no-padding was given.
10927 if test "${enable_no_padding+set}" = set; then
10928   enableval="$enable_no_padding"
10929   with_no_padding=$enableval
10930 else
10931   with_no_padding=$with_ext_funcs
10932 fi;
10933 echo "$as_me:10933: result: $with_no_padding" >&5
10934 echo "${ECHO_T}$with_no_padding" >&6
10935 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10936 #define NCURSES_NO_PADDING 1
10937 EOF
10938
10939 echo "$as_me:10939: checking for ANSI C header files" >&5
10940 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10941 if test "${ac_cv_header_stdc+set}" = set; then
10942   echo $ECHO_N "(cached) $ECHO_C" >&6
10943 else
10944   cat >conftest.$ac_ext <<_ACEOF
10945 #line 10945 "configure"
10946 #include "confdefs.h"
10947 #include <stdlib.h>
10948 #include <stdarg.h>
10949 #include <string.h>
10950 #include <float.h>
10951
10952 _ACEOF
10953 if { (eval echo "$as_me:10953: \"$ac_cpp conftest.$ac_ext\"") >&5
10954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10955   ac_status=$?
10956   egrep -v '^ *\+' conftest.er1 >conftest.err
10957   rm -f conftest.er1
10958   cat conftest.err >&5
10959   echo "$as_me:10959: \$? = $ac_status" >&5
10960   (exit $ac_status); } >/dev/null; then
10961   if test -s conftest.err; then
10962     ac_cpp_err=$ac_c_preproc_warn_flag
10963   else
10964     ac_cpp_err=
10965   fi
10966 else
10967   ac_cpp_err=yes
10968 fi
10969 if test -z "$ac_cpp_err"; then
10970   ac_cv_header_stdc=yes
10971 else
10972   echo "$as_me: failed program was:" >&5
10973   cat conftest.$ac_ext >&5
10974   ac_cv_header_stdc=no
10975 fi
10976 rm -f conftest.err conftest.$ac_ext
10977
10978 if test $ac_cv_header_stdc = yes; then
10979   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10980   cat >conftest.$ac_ext <<_ACEOF
10981 #line 10981 "configure"
10982 #include "confdefs.h"
10983 #include <string.h>
10984
10985 _ACEOF
10986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10987   egrep "memchr" >/dev/null 2>&1; then
10988   :
10989 else
10990   ac_cv_header_stdc=no
10991 fi
10992 rm -rf conftest*
10993
10994 fi
10995
10996 if test $ac_cv_header_stdc = yes; then
10997   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10998   cat >conftest.$ac_ext <<_ACEOF
10999 #line 10999 "configure"
11000 #include "confdefs.h"
11001 #include <stdlib.h>
11002
11003 _ACEOF
11004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11005   egrep "free" >/dev/null 2>&1; then
11006   :
11007 else
11008   ac_cv_header_stdc=no
11009 fi
11010 rm -rf conftest*
11011
11012 fi
11013
11014 if test $ac_cv_header_stdc = yes; then
11015   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11016   if test "$cross_compiling" = yes; then
11017   :
11018 else
11019   cat >conftest.$ac_ext <<_ACEOF
11020 #line 11020 "configure"
11021 #include "confdefs.h"
11022 #include <ctype.h>
11023 #if ((' ' & 0x0FF) == 0x020)
11024 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11025 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11026 #else
11027 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11028                      || ('j' <= (c) && (c) <= 'r') \
11029                      || ('s' <= (c) && (c) <= 'z'))
11030 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11031 #endif
11032
11033 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11034 int
11035 main ()
11036 {
11037   int i;
11038   for (i = 0; i < 256; i++)
11039     if (XOR (islower (i), ISLOWER (i))
11040         || toupper (i) != TOUPPER (i))
11041       $ac_main_return(2);
11042   $ac_main_return (0);
11043 }
11044 _ACEOF
11045 rm -f conftest$ac_exeext
11046 if { (eval echo "$as_me:11046: \"$ac_link\"") >&5
11047   (eval $ac_link) 2>&5
11048   ac_status=$?
11049   echo "$as_me:11049: \$? = $ac_status" >&5
11050   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11051   { (eval echo "$as_me:11051: \"$ac_try\"") >&5
11052   (eval $ac_try) 2>&5
11053   ac_status=$?
11054   echo "$as_me:11054: \$? = $ac_status" >&5
11055   (exit $ac_status); }; }; then
11056   :
11057 else
11058   echo "$as_me: program exited with status $ac_status" >&5
11059 echo "$as_me: failed program was:" >&5
11060 cat conftest.$ac_ext >&5
11061 ac_cv_header_stdc=no
11062 fi
11063 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11064 fi
11065 fi
11066 fi
11067 echo "$as_me:11067: result: $ac_cv_header_stdc" >&5
11068 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11069 if test $ac_cv_header_stdc = yes; then
11070
11071 cat >>confdefs.h <<\EOF
11072 #define STDC_HEADERS 1
11073 EOF
11074
11075 fi
11076
11077 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11078
11079 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11080                   inttypes.h stdint.h unistd.h
11081 do
11082 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11083 echo "$as_me:11083: checking for $ac_header" >&5
11084 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11085 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11086   echo $ECHO_N "(cached) $ECHO_C" >&6
11087 else
11088   cat >conftest.$ac_ext <<_ACEOF
11089 #line 11089 "configure"
11090 #include "confdefs.h"
11091 $ac_includes_default
11092 #include <$ac_header>
11093 _ACEOF
11094 rm -f conftest.$ac_objext
11095 if { (eval echo "$as_me:11095: \"$ac_compile\"") >&5
11096   (eval $ac_compile) 2>&5
11097   ac_status=$?
11098   echo "$as_me:11098: \$? = $ac_status" >&5
11099   (exit $ac_status); } &&
11100          { ac_try='test -s conftest.$ac_objext'
11101   { (eval echo "$as_me:11101: \"$ac_try\"") >&5
11102   (eval $ac_try) 2>&5
11103   ac_status=$?
11104   echo "$as_me:11104: \$? = $ac_status" >&5
11105   (exit $ac_status); }; }; then
11106   eval "$as_ac_Header=yes"
11107 else
11108   echo "$as_me: failed program was:" >&5
11109 cat conftest.$ac_ext >&5
11110 eval "$as_ac_Header=no"
11111 fi
11112 rm -f conftest.$ac_objext conftest.$ac_ext
11113 fi
11114 echo "$as_me:11114: result: `eval echo '${'$as_ac_Header'}'`" >&5
11115 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11116 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11117   cat >>confdefs.h <<EOF
11118 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11119 EOF
11120
11121 fi
11122 done
11123
11124 echo "$as_me:11124: checking for signed char" >&5
11125 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11126 if test "${ac_cv_type_signed_char+set}" = set; then
11127   echo $ECHO_N "(cached) $ECHO_C" >&6
11128 else
11129   cat >conftest.$ac_ext <<_ACEOF
11130 #line 11130 "configure"
11131 #include "confdefs.h"
11132 $ac_includes_default
11133 int
11134 main ()
11135 {
11136 if ((signed char *) 0)
11137   return 0;
11138 if (sizeof (signed char))
11139   return 0;
11140   ;
11141   return 0;
11142 }
11143 _ACEOF
11144 rm -f conftest.$ac_objext
11145 if { (eval echo "$as_me:11145: \"$ac_compile\"") >&5
11146   (eval $ac_compile) 2>&5
11147   ac_status=$?
11148   echo "$as_me:11148: \$? = $ac_status" >&5
11149   (exit $ac_status); } &&
11150          { ac_try='test -s conftest.$ac_objext'
11151   { (eval echo "$as_me:11151: \"$ac_try\"") >&5
11152   (eval $ac_try) 2>&5
11153   ac_status=$?
11154   echo "$as_me:11154: \$? = $ac_status" >&5
11155   (exit $ac_status); }; }; then
11156   ac_cv_type_signed_char=yes
11157 else
11158   echo "$as_me: failed program was:" >&5
11159 cat conftest.$ac_ext >&5
11160 ac_cv_type_signed_char=no
11161 fi
11162 rm -f conftest.$ac_objext conftest.$ac_ext
11163 fi
11164 echo "$as_me:11164: result: $ac_cv_type_signed_char" >&5
11165 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11166
11167 echo "$as_me:11167: checking size of signed char" >&5
11168 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11169 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11170   echo $ECHO_N "(cached) $ECHO_C" >&6
11171 else
11172   if test "$ac_cv_type_signed_char" = yes; then
11173   if test "$cross_compiling" = yes; then
11174   # Depending upon the size, compute the lo and hi bounds.
11175 cat >conftest.$ac_ext <<_ACEOF
11176 #line 11176 "configure"
11177 #include "confdefs.h"
11178 $ac_includes_default
11179 int
11180 main ()
11181 {
11182 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11183   ;
11184   return 0;
11185 }
11186 _ACEOF
11187 rm -f conftest.$ac_objext
11188 if { (eval echo "$as_me:11188: \"$ac_compile\"") >&5
11189   (eval $ac_compile) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit $ac_status); } &&
11193          { ac_try='test -s conftest.$ac_objext'
11194   { (eval echo "$as_me:11194: \"$ac_try\"") >&5
11195   (eval $ac_try) 2>&5
11196   ac_status=$?
11197   echo "$as_me:11197: \$? = $ac_status" >&5
11198   (exit $ac_status); }; }; then
11199   ac_lo=0 ac_mid=0
11200   while :; do
11201     cat >conftest.$ac_ext <<_ACEOF
11202 #line 11202 "configure"
11203 #include "confdefs.h"
11204 $ac_includes_default
11205 int
11206 main ()
11207 {
11208 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11209   ;
11210   return 0;
11211 }
11212 _ACEOF
11213 rm -f conftest.$ac_objext
11214 if { (eval echo "$as_me:11214: \"$ac_compile\"") >&5
11215   (eval $ac_compile) 2>&5
11216   ac_status=$?
11217   echo "$as_me:11217: \$? = $ac_status" >&5
11218   (exit $ac_status); } &&
11219          { ac_try='test -s conftest.$ac_objext'
11220   { (eval echo "$as_me:11220: \"$ac_try\"") >&5
11221   (eval $ac_try) 2>&5
11222   ac_status=$?
11223   echo "$as_me:11223: \$? = $ac_status" >&5
11224   (exit $ac_status); }; }; then
11225   ac_hi=$ac_mid; break
11226 else
11227   echo "$as_me: failed program was:" >&5
11228 cat conftest.$ac_ext >&5
11229 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11230 fi
11231 rm -f conftest.$ac_objext conftest.$ac_ext
11232   done
11233 else
11234   echo "$as_me: failed program was:" >&5
11235 cat conftest.$ac_ext >&5
11236 ac_hi=-1 ac_mid=-1
11237   while :; do
11238     cat >conftest.$ac_ext <<_ACEOF
11239 #line 11239 "configure"
11240 #include "confdefs.h"
11241 $ac_includes_default
11242 int
11243 main ()
11244 {
11245 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11246   ;
11247   return 0;
11248 }
11249 _ACEOF
11250 rm -f conftest.$ac_objext
11251 if { (eval echo "$as_me:11251: \"$ac_compile\"") >&5
11252   (eval $ac_compile) 2>&5
11253   ac_status=$?
11254   echo "$as_me:11254: \$? = $ac_status" >&5
11255   (exit $ac_status); } &&
11256          { ac_try='test -s conftest.$ac_objext'
11257   { (eval echo "$as_me:11257: \"$ac_try\"") >&5
11258   (eval $ac_try) 2>&5
11259   ac_status=$?
11260   echo "$as_me:11260: \$? = $ac_status" >&5
11261   (exit $ac_status); }; }; then
11262   ac_lo=$ac_mid; break
11263 else
11264   echo "$as_me: failed program was:" >&5
11265 cat conftest.$ac_ext >&5
11266 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11267 fi
11268 rm -f conftest.$ac_objext conftest.$ac_ext
11269   done
11270 fi
11271 rm -f conftest.$ac_objext conftest.$ac_ext
11272 # Binary search between lo and hi bounds.
11273 while test "x$ac_lo" != "x$ac_hi"; do
11274   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11275   cat >conftest.$ac_ext <<_ACEOF
11276 #line 11276 "configure"
11277 #include "confdefs.h"
11278 $ac_includes_default
11279 int
11280 main ()
11281 {
11282 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11283   ;
11284   return 0;
11285 }
11286 _ACEOF
11287 rm -f conftest.$ac_objext
11288 if { (eval echo "$as_me:11288: \"$ac_compile\"") >&5
11289   (eval $ac_compile) 2>&5
11290   ac_status=$?
11291   echo "$as_me:11291: \$? = $ac_status" >&5
11292   (exit $ac_status); } &&
11293          { ac_try='test -s conftest.$ac_objext'
11294   { (eval echo "$as_me:11294: \"$ac_try\"") >&5
11295   (eval $ac_try) 2>&5
11296   ac_status=$?
11297   echo "$as_me:11297: \$? = $ac_status" >&5
11298   (exit $ac_status); }; }; then
11299   ac_hi=$ac_mid
11300 else
11301   echo "$as_me: failed program was:" >&5
11302 cat conftest.$ac_ext >&5
11303 ac_lo=`expr $ac_mid + 1`
11304 fi
11305 rm -f conftest.$ac_objext conftest.$ac_ext
11306 done
11307 ac_cv_sizeof_signed_char=$ac_lo
11308 else
11309   if test "$cross_compiling" = yes; then
11310   { { echo "$as_me:11310: error: cannot run test program while cross compiling" >&5
11311 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11312    { (exit 1); exit 1; }; }
11313 else
11314   cat >conftest.$ac_ext <<_ACEOF
11315 #line 11315 "configure"
11316 #include "confdefs.h"
11317 $ac_includes_default
11318 int
11319 main ()
11320 {
11321 FILE *f = fopen ("conftest.val", "w");
11322 if (!f)
11323   $ac_main_return (1);
11324 fprintf (f, "%d", (sizeof (signed char)));
11325 fclose (f);
11326   ;
11327   return 0;
11328 }
11329 _ACEOF
11330 rm -f conftest$ac_exeext
11331 if { (eval echo "$as_me:11331: \"$ac_link\"") >&5
11332   (eval $ac_link) 2>&5
11333   ac_status=$?
11334   echo "$as_me:11334: \$? = $ac_status" >&5
11335   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11336   { (eval echo "$as_me:11336: \"$ac_try\"") >&5
11337   (eval $ac_try) 2>&5
11338   ac_status=$?
11339   echo "$as_me:11339: \$? = $ac_status" >&5
11340   (exit $ac_status); }; }; then
11341   ac_cv_sizeof_signed_char=`cat conftest.val`
11342 else
11343   echo "$as_me: program exited with status $ac_status" >&5
11344 echo "$as_me: failed program was:" >&5
11345 cat conftest.$ac_ext >&5
11346 fi
11347 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11348 fi
11349 fi
11350 rm -f conftest.val
11351 else
11352   ac_cv_sizeof_signed_char=0
11353 fi
11354 fi
11355 echo "$as_me:11355: result: $ac_cv_sizeof_signed_char" >&5
11356 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11357 cat >>confdefs.h <<EOF
11358 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11359 EOF
11360
11361 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11362         NCURSES_SBOOL="signed char"
11363 else
11364         NCURSES_SBOOL="char"
11365 fi
11366 echo "$as_me:11366: checking if you want to use signed Boolean array in term.h" >&5
11367 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11368
11369 # Check whether --enable-signed-char or --disable-signed-char was given.
11370 if test "${enable_signed_char+set}" = set; then
11371   enableval="$enable_signed_char"
11372   with_signed_char=$enableval
11373 else
11374   with_signed_char=no
11375 fi;
11376 echo "$as_me:11376: result: $with_signed_char" >&5
11377 echo "${ECHO_T}$with_signed_char" >&6
11378 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11379
11380 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11381 echo "$as_me:11381: checking if you want SIGWINCH handler" >&5
11382 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11383
11384 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11385 if test "${enable_sigwinch+set}" = set; then
11386   enableval="$enable_sigwinch"
11387   with_sigwinch=$enableval
11388 else
11389   with_sigwinch=$with_ext_funcs
11390 fi;
11391 echo "$as_me:11391: result: $with_sigwinch" >&5
11392 echo "${ECHO_T}$with_sigwinch" >&6
11393 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11394 #define USE_SIGWINCH 1
11395 EOF
11396
11397 ###   use option --enable-tcap-names to allow user to define new capabilities
11398 echo "$as_me:11398: checking if you want user-definable terminal capabilities like termcap" >&5
11399 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11400
11401 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11402 if test "${enable_tcap_names+set}" = set; then
11403   enableval="$enable_tcap_names"
11404   with_tcap_names=$enableval
11405 else
11406   with_tcap_names=$with_ext_funcs
11407 fi;
11408 echo "$as_me:11408: result: $with_tcap_names" >&5
11409 echo "${ECHO_T}$with_tcap_names" >&6
11410 NCURSES_XNAMES=0
11411 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11412
11413 ###############################################################################
11414 # These options are relatively safe to experiment with.
11415
11416 echo "$as_me:11416: checking if you want all development code" >&5
11417 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11418
11419 # Check whether --with-develop or --without-develop was given.
11420 if test "${with_develop+set}" = set; then
11421   withval="$with_develop"
11422   with_develop=$withval
11423 else
11424   with_develop=no
11425 fi;
11426 echo "$as_me:11426: result: $with_develop" >&5
11427 echo "${ECHO_T}$with_develop" >&6
11428
11429 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11430 echo "$as_me:11430: checking if you want hard-tabs code" >&5
11431 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11432
11433 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11434 if test "${enable_hard_tabs+set}" = set; then
11435   enableval="$enable_hard_tabs"
11436
11437 else
11438   enable_hard_tabs=$with_develop
11439 fi;
11440 echo "$as_me:11440: result: $enable_hard_tabs" >&5
11441 echo "${ECHO_T}$enable_hard_tabs" >&6
11442 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11443 #define USE_HARD_TABS 1
11444 EOF
11445
11446 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11447 echo "$as_me:11447: checking if you want limited support for xmc" >&5
11448 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11449
11450 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11451 if test "${enable_xmc_glitch+set}" = set; then
11452   enableval="$enable_xmc_glitch"
11453
11454 else
11455   enable_xmc_glitch=$with_develop
11456 fi;
11457 echo "$as_me:11457: result: $enable_xmc_glitch" >&5
11458 echo "${ECHO_T}$enable_xmc_glitch" >&6
11459 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11460 #define USE_XMC_SUPPORT 1
11461 EOF
11462
11463 ###############################################################################
11464 # These are just experimental, probably should not be in a package:
11465
11466 echo "$as_me:11466: checking if you do not want to assume colors are white-on-black" >&5
11467 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11468
11469 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11470 if test "${enable_assumed_color+set}" = set; then
11471   enableval="$enable_assumed_color"
11472   with_assumed_color=$enableval
11473 else
11474   with_assumed_color=yes
11475 fi;
11476 echo "$as_me:11476: result: $with_assumed_color" >&5
11477 echo "${ECHO_T}$with_assumed_color" >&6
11478 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11479 #define USE_ASSUMED_COLOR 1
11480 EOF
11481
11482 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11483 echo "$as_me:11483: checking if you want hashmap scrolling-optimization code" >&5
11484 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11485
11486 # Check whether --enable-hashmap or --disable-hashmap was given.
11487 if test "${enable_hashmap+set}" = set; then
11488   enableval="$enable_hashmap"
11489   with_hashmap=$enableval
11490 else
11491   with_hashmap=yes
11492 fi;
11493 echo "$as_me:11493: result: $with_hashmap" >&5
11494 echo "${ECHO_T}$with_hashmap" >&6
11495 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11496 #define USE_HASHMAP 1
11497 EOF
11498
11499 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11500 echo "$as_me:11500: checking if you want colorfgbg code" >&5
11501 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11502
11503 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11504 if test "${enable_colorfgbg+set}" = set; then
11505   enableval="$enable_colorfgbg"
11506   with_colorfgbg=$enableval
11507 else
11508   with_colorfgbg=no
11509 fi;
11510 echo "$as_me:11510: result: $with_colorfgbg" >&5
11511 echo "${ECHO_T}$with_colorfgbg" >&6
11512 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11513 #define USE_COLORFGBG 1
11514 EOF
11515
11516 ###   use option --enable-interop to turn on use of bindings used for interop
11517 echo "$as_me:11517: checking if you want interop bindings" >&5
11518 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11519
11520 # Check whether --enable-interop or --disable-interop was given.
11521 if test "${enable_interop+set}" = set; then
11522   enableval="$enable_interop"
11523   with_exp_interop=$enableval
11524 else
11525   with_exp_interop=no
11526 fi;
11527 echo "$as_me:11527: result: $with_exp_interop" >&5
11528 echo "${ECHO_T}$with_exp_interop" >&6
11529
11530 NCURSES_INTEROP_FUNCS=0
11531 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11532
11533 # This is still experimental (20080329), but should ultimately be moved to
11534 # the script-block --with-normal, etc.
11535
11536 echo "$as_me:11536: checking if you want to link with the pthread library" >&5
11537 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11538
11539 # Check whether --with-pthread or --without-pthread was given.
11540 if test "${with_pthread+set}" = set; then
11541   withval="$with_pthread"
11542   with_pthread=$withval
11543 else
11544   with_pthread=no
11545 fi;
11546 echo "$as_me:11546: result: $with_pthread" >&5
11547 echo "${ECHO_T}$with_pthread" >&6
11548
11549 if test "$with_pthread" != no ; then
11550     echo "$as_me:11550: checking for pthread.h" >&5
11551 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11552 if test "${ac_cv_header_pthread_h+set}" = set; then
11553   echo $ECHO_N "(cached) $ECHO_C" >&6
11554 else
11555   cat >conftest.$ac_ext <<_ACEOF
11556 #line 11556 "configure"
11557 #include "confdefs.h"
11558 #include <pthread.h>
11559 _ACEOF
11560 if { (eval echo "$as_me:11560: \"$ac_cpp conftest.$ac_ext\"") >&5
11561   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11562   ac_status=$?
11563   egrep -v '^ *\+' conftest.er1 >conftest.err
11564   rm -f conftest.er1
11565   cat conftest.err >&5
11566   echo "$as_me:11566: \$? = $ac_status" >&5
11567   (exit $ac_status); } >/dev/null; then
11568   if test -s conftest.err; then
11569     ac_cpp_err=$ac_c_preproc_warn_flag
11570   else
11571     ac_cpp_err=
11572   fi
11573 else
11574   ac_cpp_err=yes
11575 fi
11576 if test -z "$ac_cpp_err"; then
11577   ac_cv_header_pthread_h=yes
11578 else
11579   echo "$as_me: failed program was:" >&5
11580   cat conftest.$ac_ext >&5
11581   ac_cv_header_pthread_h=no
11582 fi
11583 rm -f conftest.err conftest.$ac_ext
11584 fi
11585 echo "$as_me:11585: result: $ac_cv_header_pthread_h" >&5
11586 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11587 if test $ac_cv_header_pthread_h = yes; then
11588
11589         cat >>confdefs.h <<\EOF
11590 #define HAVE_PTHREADS_H 1
11591 EOF
11592
11593         for cf_lib_pthread in pthread c_r
11594         do
11595             echo "$as_me:11595: checking if we can link with the $cf_lib_pthread library" >&5
11596 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11597             cf_save_LIBS="$LIBS"
11598             LIBS="-l$cf_lib_pthread $LIBS"
11599             cat >conftest.$ac_ext <<_ACEOF
11600 #line 11600 "configure"
11601 #include "confdefs.h"
11602
11603 #include <pthread.h>
11604
11605 int
11606 main ()
11607 {
11608
11609                 int rc = pthread_create(0,0,0,0);
11610                 int r2 = pthread_mutexattr_settype(0, 0);
11611
11612   ;
11613   return 0;
11614 }
11615 _ACEOF
11616 rm -f conftest.$ac_objext conftest$ac_exeext
11617 if { (eval echo "$as_me:11617: \"$ac_link\"") >&5
11618   (eval $ac_link) 2>&5
11619   ac_status=$?
11620   echo "$as_me:11620: \$? = $ac_status" >&5
11621   (exit $ac_status); } &&
11622          { ac_try='test -s conftest$ac_exeext'
11623   { (eval echo "$as_me:11623: \"$ac_try\"") >&5
11624   (eval $ac_try) 2>&5
11625   ac_status=$?
11626   echo "$as_me:11626: \$? = $ac_status" >&5
11627   (exit $ac_status); }; }; then
11628   with_pthread=yes
11629 else
11630   echo "$as_me: failed program was:" >&5
11631 cat conftest.$ac_ext >&5
11632 with_pthread=no
11633 fi
11634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11635             LIBS="$cf_save_LIBS"
11636             echo "$as_me:11636: result: $with_pthread" >&5
11637 echo "${ECHO_T}$with_pthread" >&6
11638             test "$with_pthread" = yes && break
11639         done
11640
11641         if test "$with_pthread" = yes ; then
11642             LIBS="-l$cf_lib_pthread $LIBS"
11643             cat >>confdefs.h <<\EOF
11644 #define HAVE_LIBPTHREADS 1
11645 EOF
11646
11647         else
11648             { { echo "$as_me:11648: error: Cannot link with pthread library" >&5
11649 echo "$as_me: error: Cannot link with pthread library" >&2;}
11650    { (exit 1); exit 1; }; }
11651         fi
11652
11653 fi
11654
11655 fi
11656
11657 if test "x$with_pthread" != xno; then
11658         echo "$as_me:11658: checking for pthread_kill" >&5
11659 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11660 if test "${ac_cv_func_pthread_kill+set}" = set; then
11661   echo $ECHO_N "(cached) $ECHO_C" >&6
11662 else
11663   cat >conftest.$ac_ext <<_ACEOF
11664 #line 11664 "configure"
11665 #include "confdefs.h"
11666 /* System header to define __stub macros and hopefully few prototypes,
11667     which can conflict with char pthread_kill (); below.  */
11668 #include <assert.h>
11669 /* Override any gcc2 internal prototype to avoid an error.  */
11670 #ifdef __cplusplus
11671 extern "C"
11672 #endif
11673 /* We use char because int might match the return type of a gcc2
11674    builtin and then its argument prototype would still apply.  */
11675 char pthread_kill ();
11676 char (*f) ();
11677
11678 int
11679 main ()
11680 {
11681 /* The GNU C library defines this for functions which it implements
11682     to always fail with ENOSYS.  Some functions are actually named
11683     something starting with __ and the normal name is an alias.  */
11684 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11685 choke me
11686 #else
11687 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11688 #endif
11689
11690   ;
11691   return 0;
11692 }
11693 _ACEOF
11694 rm -f conftest.$ac_objext conftest$ac_exeext
11695 if { (eval echo "$as_me:11695: \"$ac_link\"") >&5
11696   (eval $ac_link) 2>&5
11697   ac_status=$?
11698   echo "$as_me:11698: \$? = $ac_status" >&5
11699   (exit $ac_status); } &&
11700          { ac_try='test -s conftest$ac_exeext'
11701   { (eval echo "$as_me:11701: \"$ac_try\"") >&5
11702   (eval $ac_try) 2>&5
11703   ac_status=$?
11704   echo "$as_me:11704: \$? = $ac_status" >&5
11705   (exit $ac_status); }; }; then
11706   ac_cv_func_pthread_kill=yes
11707 else
11708   echo "$as_me: failed program was:" >&5
11709 cat conftest.$ac_ext >&5
11710 ac_cv_func_pthread_kill=no
11711 fi
11712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11713 fi
11714 echo "$as_me:11714: result: $ac_cv_func_pthread_kill" >&5
11715 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11716 if test $ac_cv_func_pthread_kill = yes; then
11717
11718                 echo "$as_me:11718: checking if you want to allow EINTR in wgetch with pthreads" >&5
11719 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11720
11721 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11722 if test "${enable_pthreads_eintr+set}" = set; then
11723   enableval="$enable_pthreads_eintr"
11724   use_pthreads_eintr=$enableval
11725 else
11726   use_pthreads_eintr=no
11727 fi;
11728                 echo "$as_me:11728: result: $use_pthreads_eintr" >&5
11729 echo "${ECHO_T}$use_pthreads_eintr" >&6
11730                 if test $use_pthreads_eintr = yes ; then
11731                         cat >>confdefs.h <<\EOF
11732 #define USE_PTHREADS_EINTR 1
11733 EOF
11734
11735                 fi
11736 fi
11737
11738         echo "$as_me:11738: checking if you want to use weak-symbols for pthreads" >&5
11739 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11740
11741 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11742 if test "${enable_weak_symbols+set}" = set; then
11743   enableval="$enable_weak_symbols"
11744   use_weak_symbols=$enableval
11745 else
11746   use_weak_symbols=no
11747 fi;
11748         echo "$as_me:11748: result: $use_weak_symbols" >&5
11749 echo "${ECHO_T}$use_weak_symbols" >&6
11750         if test "$use_weak_symbols" = yes ; then
11751
11752 echo "$as_me:11752: checking if $CC supports weak symbols" >&5
11753 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11754 if test "${cf_cv_weak_symbols+set}" = set; then
11755   echo $ECHO_N "(cached) $ECHO_C" >&6
11756 else
11757
11758 cat >conftest.$ac_ext <<_ACEOF
11759 #line 11759 "configure"
11760 #include "confdefs.h"
11761
11762 #include <stdio.h>
11763 int
11764 main ()
11765 {
11766
11767 #if defined(__GNUC__)
11768 #  if defined __USE_ISOC99
11769 #    define _cat_pragma(exp)    _Pragma(#exp)
11770 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11771 #  else
11772 #    define _weak_pragma(exp)
11773 #  endif
11774 #  define _declare(name)        __extension__ extern __typeof__(name) name
11775 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11776 #endif
11777
11778 weak_symbol(fopen);
11779
11780   ;
11781   return 0;
11782 }
11783 _ACEOF
11784 rm -f conftest.$ac_objext
11785 if { (eval echo "$as_me:11785: \"$ac_compile\"") >&5
11786   (eval $ac_compile) 2>&5
11787   ac_status=$?
11788   echo "$as_me:11788: \$? = $ac_status" >&5
11789   (exit $ac_status); } &&
11790          { ac_try='test -s conftest.$ac_objext'
11791   { (eval echo "$as_me:11791: \"$ac_try\"") >&5
11792   (eval $ac_try) 2>&5
11793   ac_status=$?
11794   echo "$as_me:11794: \$? = $ac_status" >&5
11795   (exit $ac_status); }; }; then
11796   cf_cv_weak_symbols=yes
11797 else
11798   echo "$as_me: failed program was:" >&5
11799 cat conftest.$ac_ext >&5
11800 cf_cv_weak_symbols=no
11801 fi
11802 rm -f conftest.$ac_objext conftest.$ac_ext
11803
11804 fi
11805 echo "$as_me:11805: result: $cf_cv_weak_symbols" >&5
11806 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11807
11808         else
11809                 cf_cv_weak_symbols=no
11810         fi
11811
11812         if test $cf_cv_weak_symbols = yes ; then
11813                 cat >>confdefs.h <<\EOF
11814 #define USE_WEAK_SYMBOLS 1
11815 EOF
11816
11817         fi
11818 fi
11819
11820 PTHREAD=
11821 if test "$with_pthread" = "yes" ; then
11822     cat >>confdefs.h <<\EOF
11823 #define USE_PTHREADS 1
11824 EOF
11825
11826     enable_reentrant=yes
11827     if test $cf_cv_weak_symbols = yes ; then
11828         PTHREAD=-lpthread
11829     fi
11830 fi
11831
11832 # Reentrant code has to be opaque; there's little advantage to making ncurses
11833 # opaque outside of that, so there is no --enable-opaque option.  We can use
11834 # this option without --with-pthreads, but this will be always set for
11835 # pthreads.
11836 echo "$as_me:11836: checking if you want experimental reentrant code" >&5
11837 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11838
11839 # Check whether --enable-reentrant or --disable-reentrant was given.
11840 if test "${enable_reentrant+set}" = set; then
11841   enableval="$enable_reentrant"
11842   with_reentrant=$enableval
11843 else
11844   with_reentrant=no
11845 fi;
11846 echo "$as_me:11846: result: $with_reentrant" >&5
11847 echo "${ECHO_T}$with_reentrant" >&6
11848 if test "$with_reentrant" = yes ; then
11849         cf_cv_enable_reentrant=1
11850         cf_cv_enable_opaque="NCURSES_INTERNALS"
11851         NCURSES_OPAQUE=1
11852         NCURSES_SIZE_T=int
11853         if test $cf_cv_weak_symbols = yes ; then
11854
11855 # remove pthread library from $LIBS
11856 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11857
11858                 TEST_LIBS="-lpthread $TEST_LIBS"
11859                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11860         else
11861                 LIB_SUFFIX="t${LIB_SUFFIX}"
11862         fi
11863         cat >>confdefs.h <<\EOF
11864 #define USE_REENTRANT 1
11865 EOF
11866
11867 if test "${with_abi_version+set}" != set; then
11868         case $cf_cv_rel_version in
11869         5.*)
11870                 cf_cv_rel_version=6.0
11871                 cf_cv_abi_version=6
11872                 { echo "$as_me:11872: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11873 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11874                 ;;
11875         esac
11876 fi
11877
11878 else
11879         cf_cv_enable_reentrant=0
11880         cf_cv_enable_opaque="NCURSES_OPAQUE"
11881         NCURSES_OPAQUE=0
11882         NCURSES_SIZE_T=short
11883 fi
11884
11885 ### Allow using a different wrap-prefix
11886 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11887         echo "$as_me:11887: checking for prefix used to wrap public variables" >&5
11888 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11889
11890 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11891 if test "${with_wrap_prefix+set}" = set; then
11892   withval="$with_wrap_prefix"
11893   NCURSES_WRAP_PREFIX=$withval
11894 else
11895   NCURSES_WRAP_PREFIX=_nc_
11896 fi;
11897         echo "$as_me:11897: result: $NCURSES_WRAP_PREFIX" >&5
11898 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11899 else
11900         NCURSES_WRAP_PREFIX=_nc_
11901 fi
11902
11903 cat >>confdefs.h <<EOF
11904 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11905 EOF
11906
11907 echo "$as_me:11907: checking if you want experimental safe-sprintf code" >&5
11908 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11909
11910 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11911 if test "${enable_safe_sprintf+set}" = set; then
11912   enableval="$enable_safe_sprintf"
11913   with_safe_sprintf=$enableval
11914 else
11915   with_safe_sprintf=no
11916 fi;
11917 echo "$as_me:11917: result: $with_safe_sprintf" >&5
11918 echo "${ECHO_T}$with_safe_sprintf" >&6
11919 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11920 #define USE_SAFE_SPRINTF 1
11921 EOF
11922
11923 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11924 # when hashmap is used scroll hints are useless
11925 if test "$with_hashmap" = no ; then
11926 echo "$as_me:11926: checking if you want to experiment without scrolling-hints code" >&5
11927 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11928
11929 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11930 if test "${enable_scroll_hints+set}" = set; then
11931   enableval="$enable_scroll_hints"
11932   with_scroll_hints=$enableval
11933 else
11934   with_scroll_hints=yes
11935 fi;
11936 echo "$as_me:11936: result: $with_scroll_hints" >&5
11937 echo "${ECHO_T}$with_scroll_hints" >&6
11938 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11939 #define USE_SCROLL_HINTS 1
11940 EOF
11941
11942 fi
11943
11944 echo "$as_me:11944: checking if you want experimental wgetch-events code" >&5
11945 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11946
11947 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11948 if test "${enable_wgetch_events+set}" = set; then
11949   enableval="$enable_wgetch_events"
11950   with_wgetch_events=$enableval
11951 else
11952   with_wgetch_events=no
11953 fi;
11954 echo "$as_me:11954: result: $with_wgetch_events" >&5
11955 echo "${ECHO_T}$with_wgetch_events" >&6
11956 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11957 #define NCURSES_WGETCH_EVENTS 1
11958 EOF
11959
11960 ###############################################################################
11961
11962 ###     use option --disable-echo to suppress full display compiling commands
11963
11964 echo "$as_me:11964: checking if you want to see long compiling messages" >&5
11965 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11966
11967 # Check whether --enable-echo or --disable-echo was given.
11968 if test "${enable_echo+set}" = set; then
11969   enableval="$enable_echo"
11970   test "$enableval" != no && enableval=yes
11971   if test "$enableval" != "yes" ; then
11972
11973     ECHO_LT='--silent'
11974     ECHO_LD='@echo linking $@;'
11975     RULE_CC='@echo compiling $<'
11976     SHOW_CC='@echo compiling $@'
11977     ECHO_CC='@'
11978
11979   else
11980
11981     ECHO_LT=''
11982     ECHO_LD=''
11983     RULE_CC=''
11984     SHOW_CC=''
11985     ECHO_CC=''
11986
11987   fi
11988 else
11989   enableval=yes
11990
11991     ECHO_LT=''
11992     ECHO_LD=''
11993     RULE_CC=''
11994     SHOW_CC=''
11995     ECHO_CC=''
11996
11997 fi;
11998 echo "$as_me:11998: result: $enableval" >&5
11999 echo "${ECHO_T}$enableval" >&6
12000
12001 if test "$enable_echo" = yes; then
12002         ECHO_LINK=
12003 else
12004         ECHO_LINK='@ echo linking $@ ... ;'
12005         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12006         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12007 fi
12008
12009 ###     use option --enable-warnings to turn on all gcc warnings
12010 echo "$as_me:12010: checking if you want to see compiler warnings" >&5
12011 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12012
12013 # Check whether --enable-warnings or --disable-warnings was given.
12014 if test "${enable_warnings+set}" = set; then
12015   enableval="$enable_warnings"
12016   with_warnings=$enableval
12017 fi;
12018 echo "$as_me:12018: result: $with_warnings" >&5
12019 echo "${ECHO_T}$with_warnings" >&6
12020
12021 if test "x$with_warnings" = "xyes"; then
12022
12023         ADAFLAGS="$ADAFLAGS -gnatg"
12024
12025 INTEL_COMPILER=no
12026
12027 if test "$GCC" = yes ; then
12028         case $host_os in
12029         linux*|gnu*)
12030                 echo "$as_me:12030: checking if this is really Intel C compiler" >&5
12031 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12032                 cf_save_CFLAGS="$CFLAGS"
12033                 CFLAGS="$CFLAGS -no-gcc"
12034                 cat >conftest.$ac_ext <<_ACEOF
12035 #line 12035 "configure"
12036 #include "confdefs.h"
12037
12038 int
12039 main ()
12040 {
12041
12042 #ifdef __INTEL_COMPILER
12043 #else
12044 make an error
12045 #endif
12046
12047   ;
12048   return 0;
12049 }
12050 _ACEOF
12051 rm -f conftest.$ac_objext
12052 if { (eval echo "$as_me:12052: \"$ac_compile\"") >&5
12053   (eval $ac_compile) 2>&5
12054   ac_status=$?
12055   echo "$as_me:12055: \$? = $ac_status" >&5
12056   (exit $ac_status); } &&
12057          { ac_try='test -s conftest.$ac_objext'
12058   { (eval echo "$as_me:12058: \"$ac_try\"") >&5
12059   (eval $ac_try) 2>&5
12060   ac_status=$?
12061   echo "$as_me:12061: \$? = $ac_status" >&5
12062   (exit $ac_status); }; }; then
12063   INTEL_COMPILER=yes
12064 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12065
12066 else
12067   echo "$as_me: failed program was:" >&5
12068 cat conftest.$ac_ext >&5
12069 fi
12070 rm -f conftest.$ac_objext conftest.$ac_ext
12071                 CFLAGS="$cf_save_CFLAGS"
12072                 echo "$as_me:12072: result: $INTEL_COMPILER" >&5
12073 echo "${ECHO_T}$INTEL_COMPILER" >&6
12074                 ;;
12075         esac
12076 fi
12077
12078 CLANG_COMPILER=no
12079
12080 if test "$GCC" = yes ; then
12081         echo "$as_me:12081: checking if this is really Clang C compiler" >&5
12082 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12083         cf_save_CFLAGS="$CFLAGS"
12084         CFLAGS="$CFLAGS -Qunused-arguments"
12085         cat >conftest.$ac_ext <<_ACEOF
12086 #line 12086 "configure"
12087 #include "confdefs.h"
12088
12089 int
12090 main ()
12091 {
12092
12093 #ifdef __clang__
12094 #else
12095 make an error
12096 #endif
12097
12098   ;
12099   return 0;
12100 }
12101 _ACEOF
12102 rm -f conftest.$ac_objext
12103 if { (eval echo "$as_me:12103: \"$ac_compile\"") >&5
12104   (eval $ac_compile) 2>&5
12105   ac_status=$?
12106   echo "$as_me:12106: \$? = $ac_status" >&5
12107   (exit $ac_status); } &&
12108          { ac_try='test -s conftest.$ac_objext'
12109   { (eval echo "$as_me:12109: \"$ac_try\"") >&5
12110   (eval $ac_try) 2>&5
12111   ac_status=$?
12112   echo "$as_me:12112: \$? = $ac_status" >&5
12113   (exit $ac_status); }; }; then
12114   CLANG_COMPILER=yes
12115 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12116
12117 else
12118   echo "$as_me: failed program was:" >&5
12119 cat conftest.$ac_ext >&5
12120 fi
12121 rm -f conftest.$ac_objext conftest.$ac_ext
12122         CFLAGS="$cf_save_CFLAGS"
12123         echo "$as_me:12123: result: $CLANG_COMPILER" >&5
12124 echo "${ECHO_T}$CLANG_COMPILER" >&6
12125 fi
12126
12127 cat > conftest.$ac_ext <<EOF
12128 #line 12128 "${as_me:-configure}"
12129 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12130 EOF
12131
12132 if test "$INTEL_COMPILER" = yes
12133 then
12134 # The "-wdXXX" options suppress warnings:
12135 # remark #1419: external declaration in primary source file
12136 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12137 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12138 # remark #193: zero used for undefined preprocessing identifier
12139 # remark #593: variable "curs_sb_left_arrow" was set but never used
12140 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12141 # remark #869: parameter "tw" was never referenced
12142 # remark #981: operands are evaluated in unspecified order
12143 # warning #279: controlling expression is constant
12144
12145         { echo "$as_me:12145: checking for $CC warning options..." >&5
12146 echo "$as_me: checking for $CC warning options..." >&6;}
12147         cf_save_CFLAGS="$CFLAGS"
12148         EXTRA_CFLAGS="-Wall"
12149         for cf_opt in \
12150                 wd1419 \
12151                 wd1683 \
12152                 wd1684 \
12153                 wd193 \
12154                 wd593 \
12155                 wd279 \
12156                 wd810 \
12157                 wd869 \
12158                 wd981
12159         do
12160                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12161                 if { (eval echo "$as_me:12161: \"$ac_compile\"") >&5
12162   (eval $ac_compile) 2>&5
12163   ac_status=$?
12164   echo "$as_me:12164: \$? = $ac_status" >&5
12165   (exit $ac_status); }; then
12166                         test -n "$verbose" && echo "$as_me:12166: result: ... -$cf_opt" >&5
12167 echo "${ECHO_T}... -$cf_opt" >&6
12168                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12169                 fi
12170         done
12171         CFLAGS="$cf_save_CFLAGS"
12172
12173 elif test "$GCC" = yes
12174 then
12175         { echo "$as_me:12175: checking for $CC warning options..." >&5
12176 echo "$as_me: checking for $CC warning options..." >&6;}
12177         cf_save_CFLAGS="$CFLAGS"
12178         EXTRA_CFLAGS=
12179         cf_warn_CONST=""
12180         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12181         for cf_opt in W Wall \
12182                 Wbad-function-cast \
12183                 Wcast-align \
12184                 Wcast-qual \
12185                 Winline \
12186                 Wmissing-declarations \
12187                 Wmissing-prototypes \
12188                 Wnested-externs \
12189                 Wpointer-arith \
12190                 Wshadow \
12191                 Wstrict-prototypes \
12192                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12193         do
12194                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12195                 if { (eval echo "$as_me:12195: \"$ac_compile\"") >&5
12196   (eval $ac_compile) 2>&5
12197   ac_status=$?
12198   echo "$as_me:12198: \$? = $ac_status" >&5
12199   (exit $ac_status); }; then
12200                         test -n "$verbose" && echo "$as_me:12200: result: ... -$cf_opt" >&5
12201 echo "${ECHO_T}... -$cf_opt" >&6
12202                         case $cf_opt in #(vi
12203                         Wcast-qual) #(vi
12204                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12205                                 ;;
12206                         Winline) #(vi
12207                                 case $GCC_VERSION in
12208                                 [34].*)
12209                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12210
12211 echo "${as_me:-configure}:12211: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12212
12213                                         continue;;
12214                                 esac
12215                                 ;;
12216                         Wpointer-arith) #(vi
12217                                 case $GCC_VERSION in
12218                                 [12].*)
12219                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12220
12221 echo "${as_me:-configure}:12221: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12222
12223                                         continue;;
12224                                 esac
12225                                 ;;
12226                         esac
12227                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12228                 fi
12229         done
12230         CFLAGS="$cf_save_CFLAGS"
12231 fi
12232 rm -rf conftest*
12233
12234         if test "$cf_with_cxx" = yes ; then
12235
12236 INTEL_CPLUSPLUS=no
12237
12238 if test "$GCC" = yes ; then
12239         case $host_os in
12240         linux*|gnu*)
12241                 echo "$as_me:12241: checking if this is really Intel C++ compiler" >&5
12242 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12243                 cf_save_CFLAGS="$CXXFLAGS"
12244                 CXXFLAGS="$CXXFLAGS -no-gcc"
12245                 cat >conftest.$ac_ext <<_ACEOF
12246 #line 12246 "configure"
12247 #include "confdefs.h"
12248
12249 int
12250 main ()
12251 {
12252
12253 #ifdef __INTEL_COMPILER
12254 #else
12255 make an error
12256 #endif
12257
12258   ;
12259   return 0;
12260 }
12261 _ACEOF
12262 rm -f conftest.$ac_objext
12263 if { (eval echo "$as_me:12263: \"$ac_compile\"") >&5
12264   (eval $ac_compile) 2>&5
12265   ac_status=$?
12266   echo "$as_me:12266: \$? = $ac_status" >&5
12267   (exit $ac_status); } &&
12268          { ac_try='test -s conftest.$ac_objext'
12269   { (eval echo "$as_me:12269: \"$ac_try\"") >&5
12270   (eval $ac_try) 2>&5
12271   ac_status=$?
12272   echo "$as_me:12272: \$? = $ac_status" >&5
12273   (exit $ac_status); }; }; then
12274   INTEL_CPLUSPLUS=yes
12275 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12276
12277 else
12278   echo "$as_me: failed program was:" >&5
12279 cat conftest.$ac_ext >&5
12280 fi
12281 rm -f conftest.$ac_objext conftest.$ac_ext
12282                 CXXFLAGS="$cf_save_CFLAGS"
12283                 echo "$as_me:12283: result: $INTEL_CPLUSPLUS" >&5
12284 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12285                 ;;
12286         esac
12287 fi
12288
12289 CLANG_CPLUSPLUS=no
12290
12291 if test "$GCC" = yes ; then
12292         echo "$as_me:12292: checking if this is really Clang C++ compiler" >&5
12293 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12294         cf_save_CFLAGS="$CXXFLAGS"
12295         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12296         cat >conftest.$ac_ext <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12299
12300 int
12301 main ()
12302 {
12303
12304 #ifdef __clang__
12305 #else
12306 make an error
12307 #endif
12308
12309   ;
12310   return 0;
12311 }
12312 _ACEOF
12313 rm -f conftest.$ac_objext
12314 if { (eval echo "$as_me:12314: \"$ac_compile\"") >&5
12315   (eval $ac_compile) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit $ac_status); } &&
12319          { ac_try='test -s conftest.$ac_objext'
12320   { (eval echo "$as_me:12320: \"$ac_try\"") >&5
12321   (eval $ac_try) 2>&5
12322   ac_status=$?
12323   echo "$as_me:12323: \$? = $ac_status" >&5
12324   (exit $ac_status); }; }; then
12325   CLANG_CPLUSPLUS=yes
12326 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12327
12328 else
12329   echo "$as_me: failed program was:" >&5
12330 cat conftest.$ac_ext >&5
12331 fi
12332 rm -f conftest.$ac_objext conftest.$ac_ext
12333         CXXFLAGS="$cf_save_CFLAGS"
12334         echo "$as_me:12334: result: $CLANG_CPLUSPLUS" >&5
12335 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12336 fi
12337
12338 ac_ext=cc
12339 ac_cpp='$CXXCPP $CPPFLAGS'
12340 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12341 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12342 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12343 ac_main_return=return
12344
12345 cat > conftest.$ac_ext <<EOF
12346 #line 12346 "configure"
12347 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12348 EOF
12349
12350 if test "$INTEL_CPLUSPLUS" = yes
12351 then
12352 # The "-wdXXX" options suppress warnings:
12353 # remark #1419: external declaration in primary source file
12354 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12355 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12356 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12357 # remark #193: zero used for undefined preprocessing identifier
12358 # remark #593: variable "curs_sb_left_arrow" was set but never used
12359 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12360 # remark #869: parameter "tw" was never referenced
12361 # remark #981: operands are evaluated in unspecified order
12362 # warning #269: invalid format string conversion
12363
12364         { echo "$as_me:12364: checking for $CC warning options..." >&5
12365 echo "$as_me: checking for $CC warning options..." >&6;}
12366         cf_save_CXXFLAGS="$CXXFLAGS"
12367         EXTRA_CXXFLAGS="-Wall"
12368         for cf_opt in \
12369                 wd1419 \
12370                 wd1682 \
12371                 wd1683 \
12372                 wd1684 \
12373                 wd193 \
12374                 wd279 \
12375                 wd593 \
12376                 wd810 \
12377                 wd869 \
12378                 wd981
12379         do
12380                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12381                 if { (eval echo "$as_me:12381: \"$ac_compile\"") >&5
12382   (eval $ac_compile) 2>&5
12383   ac_status=$?
12384   echo "$as_me:12384: \$? = $ac_status" >&5
12385   (exit $ac_status); }; then
12386                         test -n "$verbose" && echo "$as_me:12386: result: ... -$cf_opt" >&5
12387 echo "${ECHO_T}... -$cf_opt" >&6
12388                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12389                 fi
12390         done
12391         CXXFLAGS="$cf_save_CXXFLAGS"
12392
12393 elif test "$GXX" = yes
12394 then
12395         { echo "$as_me:12395: checking for $CXX warning options..." >&5
12396 echo "$as_me: checking for $CXX warning options..." >&6;}
12397         cf_save_CXXFLAGS="$CXXFLAGS"
12398         EXTRA_CXXFLAGS="-W -Wall"
12399         cf_gxx_extra_warnings=""
12400         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12401         case "$GCC_VERSION" in
12402         [1-2].*)
12403                 ;;
12404         *)
12405                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12406                 ;;
12407         esac
12408         for cf_opt in \
12409                 Wabi \
12410                 fabi-version=0 \
12411                 Woverloaded-virtual \
12412                 Wsign-promo \
12413                 Wsynth \
12414                 Wold-style-cast \
12415                 Wcast-align \
12416                 Wcast-qual \
12417                 Wmissing-prototypes \
12418                 Wpointer-arith \
12419                 Wshadow \
12420                 Wstrict-prototypes \
12421                 Wundef $cf_gxx_extra_warnings Wno-unused
12422         do
12423                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12424                 if { (eval echo "$as_me:12424: \"$ac_compile\"") >&5
12425   (eval $ac_compile) 2>&5
12426   ac_status=$?
12427   echo "$as_me:12427: \$? = $ac_status" >&5
12428   (exit $ac_status); }; then
12429                         test -n "$verbose" && echo "$as_me:12429: result: ... -$cf_opt" >&5
12430 echo "${ECHO_T}... -$cf_opt" >&6
12431                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12432                 else
12433                         test -n "$verbose" && echo "$as_me:12433: result: ... no -$cf_opt" >&5
12434 echo "${ECHO_T}... no -$cf_opt" >&6
12435                 fi
12436         done
12437         CXXFLAGS="$cf_save_CXXFLAGS"
12438 fi
12439
12440 rm -rf conftest*
12441 ac_ext=c
12442 ac_cpp='$CPP $CPPFLAGS'
12443 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12444 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12445 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12446 ac_main_return=return
12447
12448         fi
12449 fi
12450
12451 if test "$GCC" = yes
12452 then
12453 cat > conftest.i <<EOF
12454 #ifndef GCC_PRINTF
12455 #define GCC_PRINTF 0
12456 #endif
12457 #ifndef GCC_SCANF
12458 #define GCC_SCANF 0
12459 #endif
12460 #ifndef GCC_NORETURN
12461 #define GCC_NORETURN /* nothing */
12462 #endif
12463 #ifndef GCC_UNUSED
12464 #define GCC_UNUSED /* nothing */
12465 #endif
12466 EOF
12467 if test "$GCC" = yes
12468 then
12469         { echo "$as_me:12469: checking for $CC __attribute__ directives..." >&5
12470 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12471 cat > conftest.$ac_ext <<EOF
12472 #line 12472 "${as_me:-configure}"
12473 #include "confdefs.h"
12474 #include "conftest.h"
12475 #include "conftest.i"
12476 #if     GCC_PRINTF
12477 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12478 #else
12479 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12480 #endif
12481 #if     GCC_SCANF
12482 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12483 #else
12484 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12485 #endif
12486 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12487 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12488 extern void foo(void) GCC_NORETURN;
12489 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12490 EOF
12491         cf_printf_attribute=no
12492         cf_scanf_attribute=no
12493         for cf_attribute in scanf printf unused noreturn
12494         do
12495
12496 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12497
12498                 cf_directive="__attribute__(($cf_attribute))"
12499                 echo "checking for $CC $cf_directive" 1>&5
12500
12501                 case $cf_attribute in #(vi
12502                 printf) #(vi
12503                         cf_printf_attribute=yes
12504                         cat >conftest.h <<EOF
12505 #define GCC_$cf_ATTRIBUTE 1
12506 EOF
12507                         ;;
12508                 scanf) #(vi
12509                         cf_scanf_attribute=yes
12510                         cat >conftest.h <<EOF
12511 #define GCC_$cf_ATTRIBUTE 1
12512 EOF
12513                         ;;
12514                 *) #(vi
12515                         cat >conftest.h <<EOF
12516 #define GCC_$cf_ATTRIBUTE $cf_directive
12517 EOF
12518                         ;;
12519                 esac
12520
12521                 if { (eval echo "$as_me:12521: \"$ac_compile\"") >&5
12522   (eval $ac_compile) 2>&5
12523   ac_status=$?
12524   echo "$as_me:12524: \$? = $ac_status" >&5
12525   (exit $ac_status); }; then
12526                         test -n "$verbose" && echo "$as_me:12526: result: ... $cf_attribute" >&5
12527 echo "${ECHO_T}... $cf_attribute" >&6
12528                         cat conftest.h >>confdefs.h
12529                         case $cf_attribute in #(vi
12530                         printf) #(vi
12531                                 if test "$cf_printf_attribute" = no ; then
12532                                         cat >>confdefs.h <<EOF
12533 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12534 EOF
12535                                 else
12536                                         cat >>confdefs.h <<EOF
12537 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12538 EOF
12539                                 fi
12540                                 ;;
12541                         scanf) #(vi
12542                                 if test "$cf_scanf_attribute" = no ; then
12543                                         cat >>confdefs.h <<EOF
12544 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12545 EOF
12546                                 else
12547                                         cat >>confdefs.h <<EOF
12548 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12549 EOF
12550                                 fi
12551                                 ;;
12552                         esac
12553                 fi
12554         done
12555 else
12556         fgrep define conftest.i >>confdefs.h
12557 fi
12558 rm -rf conftest*
12559 fi
12560
12561 echo "$as_me:12561: checking if you want to work around bogus compiler/loader warnings" >&5
12562 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12563
12564 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12565 if test "${enable_string_hacks+set}" = set; then
12566   enableval="$enable_string_hacks"
12567   with_string_hacks=$enableval
12568 else
12569   with_string_hacks=no
12570 fi;
12571 echo "$as_me:12571: result: $with_string_hacks" >&5
12572 echo "${ECHO_T}$with_string_hacks" >&6
12573
12574 if test "x$with_string_hacks" = "xyes"; then
12575         cat >>confdefs.h <<\EOF
12576 #define USE_STRING_HACKS 1
12577 EOF
12578
12579         { echo "$as_me:12579: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12580 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12581
12582 for ac_func in strlcat strlcpy snprintf
12583 do
12584 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12585 echo "$as_me:12585: checking for $ac_func" >&5
12586 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12587 if eval "test \"\${$as_ac_var+set}\" = set"; then
12588   echo $ECHO_N "(cached) $ECHO_C" >&6
12589 else
12590   cat >conftest.$ac_ext <<_ACEOF
12591 #line 12591 "configure"
12592 #include "confdefs.h"
12593 /* System header to define __stub macros and hopefully few prototypes,
12594     which can conflict with char $ac_func (); below.  */
12595 #include <assert.h>
12596 /* Override any gcc2 internal prototype to avoid an error.  */
12597 #ifdef __cplusplus
12598 extern "C"
12599 #endif
12600 /* We use char because int might match the return type of a gcc2
12601    builtin and then its argument prototype would still apply.  */
12602 char $ac_func ();
12603 char (*f) ();
12604
12605 int
12606 main ()
12607 {
12608 /* The GNU C library defines this for functions which it implements
12609     to always fail with ENOSYS.  Some functions are actually named
12610     something starting with __ and the normal name is an alias.  */
12611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12612 choke me
12613 #else
12614 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12615 #endif
12616
12617   ;
12618   return 0;
12619 }
12620 _ACEOF
12621 rm -f conftest.$ac_objext conftest$ac_exeext
12622 if { (eval echo "$as_me:12622: \"$ac_link\"") >&5
12623   (eval $ac_link) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit $ac_status); } &&
12627          { ac_try='test -s conftest$ac_exeext'
12628   { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629   (eval $ac_try) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit $ac_status); }; }; then
12633   eval "$as_ac_var=yes"
12634 else
12635   echo "$as_me: failed program was:" >&5
12636 cat conftest.$ac_ext >&5
12637 eval "$as_ac_var=no"
12638 fi
12639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12640 fi
12641 echo "$as_me:12641: result: `eval echo '${'$as_ac_var'}'`" >&5
12642 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12643 if test `eval echo '${'$as_ac_var'}'` = yes; then
12644   cat >>confdefs.h <<EOF
12645 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12646 EOF
12647
12648 fi
12649 done
12650
12651 fi
12652
12653 ###     use option --enable-assertions to turn on generation of assertion code
12654 echo "$as_me:12654: checking if you want to enable runtime assertions" >&5
12655 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12656
12657 # Check whether --enable-assertions or --disable-assertions was given.
12658 if test "${enable_assertions+set}" = set; then
12659   enableval="$enable_assertions"
12660   with_assertions=$enableval
12661 else
12662   with_assertions=no
12663 fi;
12664 echo "$as_me:12664: result: $with_assertions" >&5
12665 echo "${ECHO_T}$with_assertions" >&6
12666 if test -n "$GCC"
12667 then
12668         if test "$with_assertions" = no
12669         then
12670                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12671         else
12672
12673         ADAFLAGS="$ADAFLAGS -gnata"
12674
12675         fi
12676 fi
12677
12678 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12679
12680 echo "$as_me:12680: checking if you want to use dmalloc for testing" >&5
12681 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12682
12683 # Check whether --with-dmalloc or --without-dmalloc was given.
12684 if test "${with_dmalloc+set}" = set; then
12685   withval="$with_dmalloc"
12686   cat >>confdefs.h <<\EOF
12687 #define USE_DMALLOC 1
12688 EOF
12689
12690         : ${with_cflags:=-g}
12691         : ${with_no_leaks:=yes}
12692          with_dmalloc=yes
12693 else
12694   with_dmalloc=
12695 fi;
12696 echo "$as_me:12696: result: ${with_dmalloc:-no}" >&5
12697 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12698
12699 case .$with_cflags in #(vi
12700 .*-g*)
12701         case .$CFLAGS in #(vi
12702         .*-g*) #(vi
12703                 ;;
12704         *)
12705
12706 cf_fix_cppflags=no
12707 cf_new_cflags=
12708 cf_new_cppflags=
12709 cf_new_extra_cppflags=
12710
12711 for cf_add_cflags in -g
12712 do
12713 case $cf_fix_cppflags in
12714 no)
12715         case $cf_add_cflags in #(vi
12716         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12717                 case $cf_add_cflags in
12718                 -D*)
12719                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12720
12721                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12722                                 && test -z "${cf_tst_cflags}" \
12723                                 && cf_fix_cppflags=yes
12724
12725                         if test $cf_fix_cppflags = yes ; then
12726                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12727                                 continue
12728                         elif test "${cf_tst_cflags}" = "\"'" ; then
12729                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12730                                 continue
12731                         fi
12732                         ;;
12733                 esac
12734                 case "$CPPFLAGS" in
12735                 *$cf_add_cflags) #(vi
12736                         ;;
12737                 *) #(vi
12738                         case $cf_add_cflags in #(vi
12739                         -D*)
12740                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12741
12742 CPPFLAGS=`echo "$CPPFLAGS" | \
12743         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12744                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12745
12746                                 ;;
12747                         esac
12748                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12749                         ;;
12750                 esac
12751                 ;;
12752         *)
12753                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12754                 ;;
12755         esac
12756         ;;
12757 yes)
12758         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12759
12760         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12761
12762         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12763                 && test -z "${cf_tst_cflags}" \
12764                 && cf_fix_cppflags=no
12765         ;;
12766 esac
12767 done
12768
12769 if test -n "$cf_new_cflags" ; then
12770
12771         CFLAGS="$CFLAGS $cf_new_cflags"
12772 fi
12773
12774 if test -n "$cf_new_cppflags" ; then
12775
12776         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12777 fi
12778
12779 if test -n "$cf_new_extra_cppflags" ; then
12780
12781         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12782 fi
12783
12784                 ;;
12785         esac
12786         ;;
12787 esac
12788
12789 if test "$with_dmalloc" = yes ; then
12790         echo "$as_me:12790: checking for dmalloc.h" >&5
12791 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12792 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12793   echo $ECHO_N "(cached) $ECHO_C" >&6
12794 else
12795   cat >conftest.$ac_ext <<_ACEOF
12796 #line 12796 "configure"
12797 #include "confdefs.h"
12798 #include <dmalloc.h>
12799 _ACEOF
12800 if { (eval echo "$as_me:12800: \"$ac_cpp conftest.$ac_ext\"") >&5
12801   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12802   ac_status=$?
12803   egrep -v '^ *\+' conftest.er1 >conftest.err
12804   rm -f conftest.er1
12805   cat conftest.err >&5
12806   echo "$as_me:12806: \$? = $ac_status" >&5
12807   (exit $ac_status); } >/dev/null; then
12808   if test -s conftest.err; then
12809     ac_cpp_err=$ac_c_preproc_warn_flag
12810   else
12811     ac_cpp_err=
12812   fi
12813 else
12814   ac_cpp_err=yes
12815 fi
12816 if test -z "$ac_cpp_err"; then
12817   ac_cv_header_dmalloc_h=yes
12818 else
12819   echo "$as_me: failed program was:" >&5
12820   cat conftest.$ac_ext >&5
12821   ac_cv_header_dmalloc_h=no
12822 fi
12823 rm -f conftest.err conftest.$ac_ext
12824 fi
12825 echo "$as_me:12825: result: $ac_cv_header_dmalloc_h" >&5
12826 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12827 if test $ac_cv_header_dmalloc_h = yes; then
12828
12829 echo "$as_me:12829: checking for dmalloc_debug in -ldmalloc" >&5
12830 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12831 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12832   echo $ECHO_N "(cached) $ECHO_C" >&6
12833 else
12834   ac_check_lib_save_LIBS=$LIBS
12835 LIBS="-ldmalloc  $LIBS"
12836 cat >conftest.$ac_ext <<_ACEOF
12837 #line 12837 "configure"
12838 #include "confdefs.h"
12839
12840 /* Override any gcc2 internal prototype to avoid an error.  */
12841 #ifdef __cplusplus
12842 extern "C"
12843 #endif
12844 /* We use char because int might match the return type of a gcc2
12845    builtin and then its argument prototype would still apply.  */
12846 char dmalloc_debug ();
12847 int
12848 main ()
12849 {
12850 dmalloc_debug ();
12851   ;
12852   return 0;
12853 }
12854 _ACEOF
12855 rm -f conftest.$ac_objext conftest$ac_exeext
12856 if { (eval echo "$as_me:12856: \"$ac_link\"") >&5
12857   (eval $ac_link) 2>&5
12858   ac_status=$?
12859   echo "$as_me:12859: \$? = $ac_status" >&5
12860   (exit $ac_status); } &&
12861          { ac_try='test -s conftest$ac_exeext'
12862   { (eval echo "$as_me:12862: \"$ac_try\"") >&5
12863   (eval $ac_try) 2>&5
12864   ac_status=$?
12865   echo "$as_me:12865: \$? = $ac_status" >&5
12866   (exit $ac_status); }; }; then
12867   ac_cv_lib_dmalloc_dmalloc_debug=yes
12868 else
12869   echo "$as_me: failed program was:" >&5
12870 cat conftest.$ac_ext >&5
12871 ac_cv_lib_dmalloc_dmalloc_debug=no
12872 fi
12873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12874 LIBS=$ac_check_lib_save_LIBS
12875 fi
12876 echo "$as_me:12876: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12877 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12878 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12879   cat >>confdefs.h <<EOF
12880 #define HAVE_LIBDMALLOC 1
12881 EOF
12882
12883   LIBS="-ldmalloc $LIBS"
12884
12885 fi
12886
12887 fi
12888
12889 fi
12890
12891 echo "$as_me:12891: checking if you want to use dbmalloc for testing" >&5
12892 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12893
12894 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12895 if test "${with_dbmalloc+set}" = set; then
12896   withval="$with_dbmalloc"
12897   cat >>confdefs.h <<\EOF
12898 #define USE_DBMALLOC 1
12899 EOF
12900
12901         : ${with_cflags:=-g}
12902         : ${with_no_leaks:=yes}
12903          with_dbmalloc=yes
12904 else
12905   with_dbmalloc=
12906 fi;
12907 echo "$as_me:12907: result: ${with_dbmalloc:-no}" >&5
12908 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12909
12910 case .$with_cflags in #(vi
12911 .*-g*)
12912         case .$CFLAGS in #(vi
12913         .*-g*) #(vi
12914                 ;;
12915         *)
12916
12917 cf_fix_cppflags=no
12918 cf_new_cflags=
12919 cf_new_cppflags=
12920 cf_new_extra_cppflags=
12921
12922 for cf_add_cflags in -g
12923 do
12924 case $cf_fix_cppflags in
12925 no)
12926         case $cf_add_cflags in #(vi
12927         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12928                 case $cf_add_cflags in
12929                 -D*)
12930                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12931
12932                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12933                                 && test -z "${cf_tst_cflags}" \
12934                                 && cf_fix_cppflags=yes
12935
12936                         if test $cf_fix_cppflags = yes ; then
12937                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12938                                 continue
12939                         elif test "${cf_tst_cflags}" = "\"'" ; then
12940                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12941                                 continue
12942                         fi
12943                         ;;
12944                 esac
12945                 case "$CPPFLAGS" in
12946                 *$cf_add_cflags) #(vi
12947                         ;;
12948                 *) #(vi
12949                         case $cf_add_cflags in #(vi
12950                         -D*)
12951                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12952
12953 CPPFLAGS=`echo "$CPPFLAGS" | \
12954         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12955                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12956
12957                                 ;;
12958                         esac
12959                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12960                         ;;
12961                 esac
12962                 ;;
12963         *)
12964                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12965                 ;;
12966         esac
12967         ;;
12968 yes)
12969         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12970
12971         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12972
12973         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12974                 && test -z "${cf_tst_cflags}" \
12975                 && cf_fix_cppflags=no
12976         ;;
12977 esac
12978 done
12979
12980 if test -n "$cf_new_cflags" ; then
12981
12982         CFLAGS="$CFLAGS $cf_new_cflags"
12983 fi
12984
12985 if test -n "$cf_new_cppflags" ; then
12986
12987         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12988 fi
12989
12990 if test -n "$cf_new_extra_cppflags" ; then
12991
12992         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12993 fi
12994
12995                 ;;
12996         esac
12997         ;;
12998 esac
12999
13000 if test "$with_dbmalloc" = yes ; then
13001         echo "$as_me:13001: checking for dbmalloc.h" >&5
13002 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13003 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13004   echo $ECHO_N "(cached) $ECHO_C" >&6
13005 else
13006   cat >conftest.$ac_ext <<_ACEOF
13007 #line 13007 "configure"
13008 #include "confdefs.h"
13009 #include <dbmalloc.h>
13010 _ACEOF
13011 if { (eval echo "$as_me:13011: \"$ac_cpp conftest.$ac_ext\"") >&5
13012   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13013   ac_status=$?
13014   egrep -v '^ *\+' conftest.er1 >conftest.err
13015   rm -f conftest.er1
13016   cat conftest.err >&5
13017   echo "$as_me:13017: \$? = $ac_status" >&5
13018   (exit $ac_status); } >/dev/null; then
13019   if test -s conftest.err; then
13020     ac_cpp_err=$ac_c_preproc_warn_flag
13021   else
13022     ac_cpp_err=
13023   fi
13024 else
13025   ac_cpp_err=yes
13026 fi
13027 if test -z "$ac_cpp_err"; then
13028   ac_cv_header_dbmalloc_h=yes
13029 else
13030   echo "$as_me: failed program was:" >&5
13031   cat conftest.$ac_ext >&5
13032   ac_cv_header_dbmalloc_h=no
13033 fi
13034 rm -f conftest.err conftest.$ac_ext
13035 fi
13036 echo "$as_me:13036: result: $ac_cv_header_dbmalloc_h" >&5
13037 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13038 if test $ac_cv_header_dbmalloc_h = yes; then
13039
13040 echo "$as_me:13040: checking for debug_malloc in -ldbmalloc" >&5
13041 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13042 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13043   echo $ECHO_N "(cached) $ECHO_C" >&6
13044 else
13045   ac_check_lib_save_LIBS=$LIBS
13046 LIBS="-ldbmalloc  $LIBS"
13047 cat >conftest.$ac_ext <<_ACEOF
13048 #line 13048 "configure"
13049 #include "confdefs.h"
13050
13051 /* Override any gcc2 internal prototype to avoid an error.  */
13052 #ifdef __cplusplus
13053 extern "C"
13054 #endif
13055 /* We use char because int might match the return type of a gcc2
13056    builtin and then its argument prototype would still apply.  */
13057 char debug_malloc ();
13058 int
13059 main ()
13060 {
13061 debug_malloc ();
13062   ;
13063   return 0;
13064 }
13065 _ACEOF
13066 rm -f conftest.$ac_objext conftest$ac_exeext
13067 if { (eval echo "$as_me:13067: \"$ac_link\"") >&5
13068   (eval $ac_link) 2>&5
13069   ac_status=$?
13070   echo "$as_me:13070: \$? = $ac_status" >&5
13071   (exit $ac_status); } &&
13072          { ac_try='test -s conftest$ac_exeext'
13073   { (eval echo "$as_me:13073: \"$ac_try\"") >&5
13074   (eval $ac_try) 2>&5
13075   ac_status=$?
13076   echo "$as_me:13076: \$? = $ac_status" >&5
13077   (exit $ac_status); }; }; then
13078   ac_cv_lib_dbmalloc_debug_malloc=yes
13079 else
13080   echo "$as_me: failed program was:" >&5
13081 cat conftest.$ac_ext >&5
13082 ac_cv_lib_dbmalloc_debug_malloc=no
13083 fi
13084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13085 LIBS=$ac_check_lib_save_LIBS
13086 fi
13087 echo "$as_me:13087: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13088 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13089 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13090   cat >>confdefs.h <<EOF
13091 #define HAVE_LIBDBMALLOC 1
13092 EOF
13093
13094   LIBS="-ldbmalloc $LIBS"
13095
13096 fi
13097
13098 fi
13099
13100 fi
13101
13102 echo "$as_me:13102: checking if you want to use valgrind for testing" >&5
13103 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13104
13105 # Check whether --with-valgrind or --without-valgrind was given.
13106 if test "${with_valgrind+set}" = set; then
13107   withval="$with_valgrind"
13108   cat >>confdefs.h <<\EOF
13109 #define USE_VALGRIND 1
13110 EOF
13111
13112         : ${with_cflags:=-g}
13113         : ${with_no_leaks:=yes}
13114          with_valgrind=yes
13115 else
13116   with_valgrind=
13117 fi;
13118 echo "$as_me:13118: result: ${with_valgrind:-no}" >&5
13119 echo "${ECHO_T}${with_valgrind:-no}" >&6
13120
13121 case .$with_cflags in #(vi
13122 .*-g*)
13123         case .$CFLAGS in #(vi
13124         .*-g*) #(vi
13125                 ;;
13126         *)
13127
13128 cf_fix_cppflags=no
13129 cf_new_cflags=
13130 cf_new_cppflags=
13131 cf_new_extra_cppflags=
13132
13133 for cf_add_cflags in -g
13134 do
13135 case $cf_fix_cppflags in
13136 no)
13137         case $cf_add_cflags in #(vi
13138         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13139                 case $cf_add_cflags in
13140                 -D*)
13141                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13142
13143                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13144                                 && test -z "${cf_tst_cflags}" \
13145                                 && cf_fix_cppflags=yes
13146
13147                         if test $cf_fix_cppflags = yes ; then
13148                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13149                                 continue
13150                         elif test "${cf_tst_cflags}" = "\"'" ; then
13151                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13152                                 continue
13153                         fi
13154                         ;;
13155                 esac
13156                 case "$CPPFLAGS" in
13157                 *$cf_add_cflags) #(vi
13158                         ;;
13159                 *) #(vi
13160                         case $cf_add_cflags in #(vi
13161                         -D*)
13162                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13163
13164 CPPFLAGS=`echo "$CPPFLAGS" | \
13165         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13166                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13167
13168                                 ;;
13169                         esac
13170                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13171                         ;;
13172                 esac
13173                 ;;
13174         *)
13175                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13176                 ;;
13177         esac
13178         ;;
13179 yes)
13180         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13181
13182         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13183
13184         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13185                 && test -z "${cf_tst_cflags}" \
13186                 && cf_fix_cppflags=no
13187         ;;
13188 esac
13189 done
13190
13191 if test -n "$cf_new_cflags" ; then
13192
13193         CFLAGS="$CFLAGS $cf_new_cflags"
13194 fi
13195
13196 if test -n "$cf_new_cppflags" ; then
13197
13198         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13199 fi
13200
13201 if test -n "$cf_new_extra_cppflags" ; then
13202
13203         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13204 fi
13205
13206                 ;;
13207         esac
13208         ;;
13209 esac
13210
13211 echo "$as_me:13211: checking if you want to perform memory-leak testing" >&5
13212 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13213
13214 # Check whether --enable-leaks or --disable-leaks was given.
13215 if test "${enable_leaks+set}" = set; then
13216   enableval="$enable_leaks"
13217   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13218 else
13219   : ${with_no_leaks:=no}
13220 fi;
13221 echo "$as_me:13221: result: $with_no_leaks" >&5
13222 echo "${ECHO_T}$with_no_leaks" >&6
13223
13224 if test "$with_no_leaks" = yes ; then
13225         cat >>confdefs.h <<\EOF
13226 #define NO_LEAKS 1
13227 EOF
13228
13229         cat >>confdefs.h <<\EOF
13230 #define YY_NO_LEAKS 1
13231 EOF
13232
13233 fi
13234
13235 cat >>confdefs.h <<\EOF
13236 #define HAVE_NC_ALLOC_H 1
13237 EOF
13238
13239 ###     use option --enable-expanded to generate certain macros as functions
13240
13241 # Check whether --enable-expanded or --disable-expanded was given.
13242 if test "${enable_expanded+set}" = set; then
13243   enableval="$enable_expanded"
13244   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13245 #define NCURSES_EXPANDED 1
13246 EOF
13247
13248 fi;
13249
13250 ###     use option --disable-macros to suppress macros in favor of functions
13251
13252 # Check whether --enable-macros or --disable-macros was given.
13253 if test "${enable_macros+set}" = set; then
13254   enableval="$enable_macros"
13255   test "$enableval" = no && cat >>confdefs.h <<\EOF
13256 #define NCURSES_NOMACROS 1
13257 EOF
13258
13259 fi;
13260
13261 # Normally we only add trace() to the debug-library.  Allow this to be
13262 # extended to all models of the ncurses library:
13263 cf_all_traces=no
13264 case "$CFLAGS $CPPFLAGS" in
13265 *-DTRACE*)
13266         cf_all_traces=yes
13267         ;;
13268 esac
13269
13270 echo "$as_me:13270: checking whether to add trace feature to all models" >&5
13271 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13272
13273 # Check whether --with-trace or --without-trace was given.
13274 if test "${with_trace+set}" = set; then
13275   withval="$with_trace"
13276   cf_with_trace=$withval
13277 else
13278   cf_with_trace=$cf_all_traces
13279 fi;
13280 echo "$as_me:13280: result: $cf_with_trace" >&5
13281 echo "${ECHO_T}$cf_with_trace" >&6
13282
13283 if test "$cf_with_trace" = yes ; then
13284         LIB_TRACING=all
13285         ADA_TRACE=TRUE
13286
13287 cf_fix_cppflags=no
13288 cf_new_cflags=
13289 cf_new_cppflags=
13290 cf_new_extra_cppflags=
13291
13292 for cf_add_cflags in -DTRACE
13293 do
13294 case $cf_fix_cppflags in
13295 no)
13296         case $cf_add_cflags in #(vi
13297         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13298                 case $cf_add_cflags in
13299                 -D*)
13300                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13301
13302                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13303                                 && test -z "${cf_tst_cflags}" \
13304                                 && cf_fix_cppflags=yes
13305
13306                         if test $cf_fix_cppflags = yes ; then
13307                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13308                                 continue
13309                         elif test "${cf_tst_cflags}" = "\"'" ; then
13310                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13311                                 continue
13312                         fi
13313                         ;;
13314                 esac
13315                 case "$CPPFLAGS" in
13316                 *$cf_add_cflags) #(vi
13317                         ;;
13318                 *) #(vi
13319                         case $cf_add_cflags in #(vi
13320                         -D*)
13321                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13322
13323 CPPFLAGS=`echo "$CPPFLAGS" | \
13324         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13325                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13326
13327                                 ;;
13328                         esac
13329                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13330                         ;;
13331                 esac
13332                 ;;
13333         *)
13334                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13335                 ;;
13336         esac
13337         ;;
13338 yes)
13339         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13340
13341         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13342
13343         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13344                 && test -z "${cf_tst_cflags}" \
13345                 && cf_fix_cppflags=no
13346         ;;
13347 esac
13348 done
13349
13350 if test -n "$cf_new_cflags" ; then
13351
13352         CFLAGS="$CFLAGS $cf_new_cflags"
13353 fi
13354
13355 if test -n "$cf_new_cppflags" ; then
13356
13357         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13358 fi
13359
13360 if test -n "$cf_new_extra_cppflags" ; then
13361
13362         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13363 fi
13364
13365 else
13366         LIB_TRACING=DEBUG
13367         ADA_TRACE=FALSE
13368 fi
13369
13370 ###     Checks for libraries.
13371 case $cf_cv_system_name in #(vi
13372 *mingw32*) #(vi
13373         ;;
13374 *)
13375 echo "$as_me:13375: checking for gettimeofday" >&5
13376 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13377 if test "${ac_cv_func_gettimeofday+set}" = set; then
13378   echo $ECHO_N "(cached) $ECHO_C" >&6
13379 else
13380   cat >conftest.$ac_ext <<_ACEOF
13381 #line 13381 "configure"
13382 #include "confdefs.h"
13383 /* System header to define __stub macros and hopefully few prototypes,
13384     which can conflict with char gettimeofday (); below.  */
13385 #include <assert.h>
13386 /* Override any gcc2 internal prototype to avoid an error.  */
13387 #ifdef __cplusplus
13388 extern "C"
13389 #endif
13390 /* We use char because int might match the return type of a gcc2
13391    builtin and then its argument prototype would still apply.  */
13392 char gettimeofday ();
13393 char (*f) ();
13394
13395 int
13396 main ()
13397 {
13398 /* The GNU C library defines this for functions which it implements
13399     to always fail with ENOSYS.  Some functions are actually named
13400     something starting with __ and the normal name is an alias.  */
13401 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13402 choke me
13403 #else
13404 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13405 #endif
13406
13407   ;
13408   return 0;
13409 }
13410 _ACEOF
13411 rm -f conftest.$ac_objext conftest$ac_exeext
13412 if { (eval echo "$as_me:13412: \"$ac_link\"") >&5
13413   (eval $ac_link) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); } &&
13417          { ac_try='test -s conftest$ac_exeext'
13418   { (eval echo "$as_me:13418: \"$ac_try\"") >&5
13419   (eval $ac_try) 2>&5
13420   ac_status=$?
13421   echo "$as_me:13421: \$? = $ac_status" >&5
13422   (exit $ac_status); }; }; then
13423   ac_cv_func_gettimeofday=yes
13424 else
13425   echo "$as_me: failed program was:" >&5
13426 cat conftest.$ac_ext >&5
13427 ac_cv_func_gettimeofday=no
13428 fi
13429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13430 fi
13431 echo "$as_me:13431: result: $ac_cv_func_gettimeofday" >&5
13432 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13433 if test $ac_cv_func_gettimeofday = yes; then
13434   cat >>confdefs.h <<\EOF
13435 #define HAVE_GETTIMEOFDAY 1
13436 EOF
13437
13438 else
13439
13440 echo "$as_me:13440: checking for gettimeofday in -lbsd" >&5
13441 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13442 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13443   echo $ECHO_N "(cached) $ECHO_C" >&6
13444 else
13445   ac_check_lib_save_LIBS=$LIBS
13446 LIBS="-lbsd  $LIBS"
13447 cat >conftest.$ac_ext <<_ACEOF
13448 #line 13448 "configure"
13449 #include "confdefs.h"
13450
13451 /* Override any gcc2 internal prototype to avoid an error.  */
13452 #ifdef __cplusplus
13453 extern "C"
13454 #endif
13455 /* We use char because int might match the return type of a gcc2
13456    builtin and then its argument prototype would still apply.  */
13457 char gettimeofday ();
13458 int
13459 main ()
13460 {
13461 gettimeofday ();
13462   ;
13463   return 0;
13464 }
13465 _ACEOF
13466 rm -f conftest.$ac_objext conftest$ac_exeext
13467 if { (eval echo "$as_me:13467: \"$ac_link\"") >&5
13468   (eval $ac_link) 2>&5
13469   ac_status=$?
13470   echo "$as_me:13470: \$? = $ac_status" >&5
13471   (exit $ac_status); } &&
13472          { ac_try='test -s conftest$ac_exeext'
13473   { (eval echo "$as_me:13473: \"$ac_try\"") >&5
13474   (eval $ac_try) 2>&5
13475   ac_status=$?
13476   echo "$as_me:13476: \$? = $ac_status" >&5
13477   (exit $ac_status); }; }; then
13478   ac_cv_lib_bsd_gettimeofday=yes
13479 else
13480   echo "$as_me: failed program was:" >&5
13481 cat conftest.$ac_ext >&5
13482 ac_cv_lib_bsd_gettimeofday=no
13483 fi
13484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13485 LIBS=$ac_check_lib_save_LIBS
13486 fi
13487 echo "$as_me:13487: result: $ac_cv_lib_bsd_gettimeofday" >&5
13488 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13489 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13490   cat >>confdefs.h <<\EOF
13491 #define HAVE_GETTIMEOFDAY 1
13492 EOF
13493
13494         LIBS="-lbsd $LIBS"
13495 fi
13496
13497 fi
13498         ;;
13499 esac
13500
13501 echo "$as_me:13501: checking if -lm needed for math functions" >&5
13502 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13503 if test "${cf_cv_need_libm+set}" = set; then
13504   echo $ECHO_N "(cached) $ECHO_C" >&6
13505 else
13506
13507         cat >conftest.$ac_ext <<_ACEOF
13508 #line 13508 "configure"
13509 #include "confdefs.h"
13510
13511         #include <stdio.h>
13512         #include <math.h>
13513
13514 int
13515 main ()
13516 {
13517 double x = rand(); printf("result = %g\n", sin(x))
13518   ;
13519   return 0;
13520 }
13521 _ACEOF
13522 rm -f conftest.$ac_objext conftest$ac_exeext
13523 if { (eval echo "$as_me:13523: \"$ac_link\"") >&5
13524   (eval $ac_link) 2>&5
13525   ac_status=$?
13526   echo "$as_me:13526: \$? = $ac_status" >&5
13527   (exit $ac_status); } &&
13528          { ac_try='test -s conftest$ac_exeext'
13529   { (eval echo "$as_me:13529: \"$ac_try\"") >&5
13530   (eval $ac_try) 2>&5
13531   ac_status=$?
13532   echo "$as_me:13532: \$? = $ac_status" >&5
13533   (exit $ac_status); }; }; then
13534   cf_cv_need_libm=no
13535 else
13536   echo "$as_me: failed program was:" >&5
13537 cat conftest.$ac_ext >&5
13538 cf_cv_need_libm=yes
13539 fi
13540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13541 fi
13542 echo "$as_me:13542: result: $cf_cv_need_libm" >&5
13543 echo "${ECHO_T}$cf_cv_need_libm" >&6
13544 if test "$cf_cv_need_libm" = yes
13545 then
13546 MATH_LIB=-lm
13547 fi
13548
13549 ###     Checks for header files.
13550 echo "$as_me:13550: checking for ANSI C header files" >&5
13551 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13552 if test "${ac_cv_header_stdc+set}" = set; then
13553   echo $ECHO_N "(cached) $ECHO_C" >&6
13554 else
13555   cat >conftest.$ac_ext <<_ACEOF
13556 #line 13556 "configure"
13557 #include "confdefs.h"
13558 #include <stdlib.h>
13559 #include <stdarg.h>
13560 #include <string.h>
13561 #include <float.h>
13562
13563 _ACEOF
13564 if { (eval echo "$as_me:13564: \"$ac_cpp conftest.$ac_ext\"") >&5
13565   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13566   ac_status=$?
13567   egrep -v '^ *\+' conftest.er1 >conftest.err
13568   rm -f conftest.er1
13569   cat conftest.err >&5
13570   echo "$as_me:13570: \$? = $ac_status" >&5
13571   (exit $ac_status); } >/dev/null; then
13572   if test -s conftest.err; then
13573     ac_cpp_err=$ac_c_preproc_warn_flag
13574   else
13575     ac_cpp_err=
13576   fi
13577 else
13578   ac_cpp_err=yes
13579 fi
13580 if test -z "$ac_cpp_err"; then
13581   ac_cv_header_stdc=yes
13582 else
13583   echo "$as_me: failed program was:" >&5
13584   cat conftest.$ac_ext >&5
13585   ac_cv_header_stdc=no
13586 fi
13587 rm -f conftest.err conftest.$ac_ext
13588
13589 if test $ac_cv_header_stdc = yes; then
13590   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13591   cat >conftest.$ac_ext <<_ACEOF
13592 #line 13592 "configure"
13593 #include "confdefs.h"
13594 #include <string.h>
13595
13596 _ACEOF
13597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13598   egrep "memchr" >/dev/null 2>&1; then
13599   :
13600 else
13601   ac_cv_header_stdc=no
13602 fi
13603 rm -rf conftest*
13604
13605 fi
13606
13607 if test $ac_cv_header_stdc = yes; then
13608   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13609   cat >conftest.$ac_ext <<_ACEOF
13610 #line 13610 "configure"
13611 #include "confdefs.h"
13612 #include <stdlib.h>
13613
13614 _ACEOF
13615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13616   egrep "free" >/dev/null 2>&1; then
13617   :
13618 else
13619   ac_cv_header_stdc=no
13620 fi
13621 rm -rf conftest*
13622
13623 fi
13624
13625 if test $ac_cv_header_stdc = yes; then
13626   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13627   if test "$cross_compiling" = yes; then
13628   :
13629 else
13630   cat >conftest.$ac_ext <<_ACEOF
13631 #line 13631 "configure"
13632 #include "confdefs.h"
13633 #include <ctype.h>
13634 #if ((' ' & 0x0FF) == 0x020)
13635 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13636 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13637 #else
13638 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13639                      || ('j' <= (c) && (c) <= 'r') \
13640                      || ('s' <= (c) && (c) <= 'z'))
13641 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13642 #endif
13643
13644 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13645 int
13646 main ()
13647 {
13648   int i;
13649   for (i = 0; i < 256; i++)
13650     if (XOR (islower (i), ISLOWER (i))
13651         || toupper (i) != TOUPPER (i))
13652       $ac_main_return(2);
13653   $ac_main_return (0);
13654 }
13655 _ACEOF
13656 rm -f conftest$ac_exeext
13657 if { (eval echo "$as_me:13657: \"$ac_link\"") >&5
13658   (eval $ac_link) 2>&5
13659   ac_status=$?
13660   echo "$as_me:13660: \$? = $ac_status" >&5
13661   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13662   { (eval echo "$as_me:13662: \"$ac_try\"") >&5
13663   (eval $ac_try) 2>&5
13664   ac_status=$?
13665   echo "$as_me:13665: \$? = $ac_status" >&5
13666   (exit $ac_status); }; }; then
13667   :
13668 else
13669   echo "$as_me: program exited with status $ac_status" >&5
13670 echo "$as_me: failed program was:" >&5
13671 cat conftest.$ac_ext >&5
13672 ac_cv_header_stdc=no
13673 fi
13674 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13675 fi
13676 fi
13677 fi
13678 echo "$as_me:13678: result: $ac_cv_header_stdc" >&5
13679 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13680 if test $ac_cv_header_stdc = yes; then
13681
13682 cat >>confdefs.h <<\EOF
13683 #define STDC_HEADERS 1
13684 EOF
13685
13686 fi
13687
13688 ac_header_dirent=no
13689 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13690   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13691 echo "$as_me:13691: checking for $ac_hdr that defines DIR" >&5
13692 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13693 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13694   echo $ECHO_N "(cached) $ECHO_C" >&6
13695 else
13696   cat >conftest.$ac_ext <<_ACEOF
13697 #line 13697 "configure"
13698 #include "confdefs.h"
13699 #include <sys/types.h>
13700 #include <$ac_hdr>
13701
13702 int
13703 main ()
13704 {
13705 if ((DIR *) 0)
13706 return 0;
13707   ;
13708   return 0;
13709 }
13710 _ACEOF
13711 rm -f conftest.$ac_objext
13712 if { (eval echo "$as_me:13712: \"$ac_compile\"") >&5
13713   (eval $ac_compile) 2>&5
13714   ac_status=$?
13715   echo "$as_me:13715: \$? = $ac_status" >&5
13716   (exit $ac_status); } &&
13717          { ac_try='test -s conftest.$ac_objext'
13718   { (eval echo "$as_me:13718: \"$ac_try\"") >&5
13719   (eval $ac_try) 2>&5
13720   ac_status=$?
13721   echo "$as_me:13721: \$? = $ac_status" >&5
13722   (exit $ac_status); }; }; then
13723   eval "$as_ac_Header=yes"
13724 else
13725   echo "$as_me: failed program was:" >&5
13726 cat conftest.$ac_ext >&5
13727 eval "$as_ac_Header=no"
13728 fi
13729 rm -f conftest.$ac_objext conftest.$ac_ext
13730 fi
13731 echo "$as_me:13731: result: `eval echo '${'$as_ac_Header'}'`" >&5
13732 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13733 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13734   cat >>confdefs.h <<EOF
13735 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13736 EOF
13737
13738 ac_header_dirent=$ac_hdr; break
13739 fi
13740
13741 done
13742 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13743 if test $ac_header_dirent = dirent.h; then
13744   echo "$as_me:13744: checking for opendir in -ldir" >&5
13745 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13746 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13747   echo $ECHO_N "(cached) $ECHO_C" >&6
13748 else
13749   ac_check_lib_save_LIBS=$LIBS
13750 LIBS="-ldir  $LIBS"
13751 cat >conftest.$ac_ext <<_ACEOF
13752 #line 13752 "configure"
13753 #include "confdefs.h"
13754
13755 /* Override any gcc2 internal prototype to avoid an error.  */
13756 #ifdef __cplusplus
13757 extern "C"
13758 #endif
13759 /* We use char because int might match the return type of a gcc2
13760    builtin and then its argument prototype would still apply.  */
13761 char opendir ();
13762 int
13763 main ()
13764 {
13765 opendir ();
13766   ;
13767   return 0;
13768 }
13769 _ACEOF
13770 rm -f conftest.$ac_objext conftest$ac_exeext
13771 if { (eval echo "$as_me:13771: \"$ac_link\"") >&5
13772   (eval $ac_link) 2>&5
13773   ac_status=$?
13774   echo "$as_me:13774: \$? = $ac_status" >&5
13775   (exit $ac_status); } &&
13776          { ac_try='test -s conftest$ac_exeext'
13777   { (eval echo "$as_me:13777: \"$ac_try\"") >&5
13778   (eval $ac_try) 2>&5
13779   ac_status=$?
13780   echo "$as_me:13780: \$? = $ac_status" >&5
13781   (exit $ac_status); }; }; then
13782   ac_cv_lib_dir_opendir=yes
13783 else
13784   echo "$as_me: failed program was:" >&5
13785 cat conftest.$ac_ext >&5
13786 ac_cv_lib_dir_opendir=no
13787 fi
13788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13789 LIBS=$ac_check_lib_save_LIBS
13790 fi
13791 echo "$as_me:13791: result: $ac_cv_lib_dir_opendir" >&5
13792 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13793 if test $ac_cv_lib_dir_opendir = yes; then
13794   LIBS="$LIBS -ldir"
13795 fi
13796
13797 else
13798   echo "$as_me:13798: checking for opendir in -lx" >&5
13799 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13800 if test "${ac_cv_lib_x_opendir+set}" = set; then
13801   echo $ECHO_N "(cached) $ECHO_C" >&6
13802 else
13803   ac_check_lib_save_LIBS=$LIBS
13804 LIBS="-lx  $LIBS"
13805 cat >conftest.$ac_ext <<_ACEOF
13806 #line 13806 "configure"
13807 #include "confdefs.h"
13808
13809 /* Override any gcc2 internal prototype to avoid an error.  */
13810 #ifdef __cplusplus
13811 extern "C"
13812 #endif
13813 /* We use char because int might match the return type of a gcc2
13814    builtin and then its argument prototype would still apply.  */
13815 char opendir ();
13816 int
13817 main ()
13818 {
13819 opendir ();
13820   ;
13821   return 0;
13822 }
13823 _ACEOF
13824 rm -f conftest.$ac_objext conftest$ac_exeext
13825 if { (eval echo "$as_me:13825: \"$ac_link\"") >&5
13826   (eval $ac_link) 2>&5
13827   ac_status=$?
13828   echo "$as_me:13828: \$? = $ac_status" >&5
13829   (exit $ac_status); } &&
13830          { ac_try='test -s conftest$ac_exeext'
13831   { (eval echo "$as_me:13831: \"$ac_try\"") >&5
13832   (eval $ac_try) 2>&5
13833   ac_status=$?
13834   echo "$as_me:13834: \$? = $ac_status" >&5
13835   (exit $ac_status); }; }; then
13836   ac_cv_lib_x_opendir=yes
13837 else
13838   echo "$as_me: failed program was:" >&5
13839 cat conftest.$ac_ext >&5
13840 ac_cv_lib_x_opendir=no
13841 fi
13842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13843 LIBS=$ac_check_lib_save_LIBS
13844 fi
13845 echo "$as_me:13845: result: $ac_cv_lib_x_opendir" >&5
13846 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13847 if test $ac_cv_lib_x_opendir = yes; then
13848   LIBS="$LIBS -lx"
13849 fi
13850
13851 fi
13852
13853 echo "$as_me:13853: checking whether time.h and sys/time.h may both be included" >&5
13854 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13855 if test "${ac_cv_header_time+set}" = set; then
13856   echo $ECHO_N "(cached) $ECHO_C" >&6
13857 else
13858   cat >conftest.$ac_ext <<_ACEOF
13859 #line 13859 "configure"
13860 #include "confdefs.h"
13861 #include <sys/types.h>
13862 #include <sys/time.h>
13863 #include <time.h>
13864
13865 int
13866 main ()
13867 {
13868 if ((struct tm *) 0)
13869 return 0;
13870   ;
13871   return 0;
13872 }
13873 _ACEOF
13874 rm -f conftest.$ac_objext
13875 if { (eval echo "$as_me:13875: \"$ac_compile\"") >&5
13876   (eval $ac_compile) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit $ac_status); } &&
13880          { ac_try='test -s conftest.$ac_objext'
13881   { (eval echo "$as_me:13881: \"$ac_try\"") >&5
13882   (eval $ac_try) 2>&5
13883   ac_status=$?
13884   echo "$as_me:13884: \$? = $ac_status" >&5
13885   (exit $ac_status); }; }; then
13886   ac_cv_header_time=yes
13887 else
13888   echo "$as_me: failed program was:" >&5
13889 cat conftest.$ac_ext >&5
13890 ac_cv_header_time=no
13891 fi
13892 rm -f conftest.$ac_objext conftest.$ac_ext
13893 fi
13894 echo "$as_me:13894: result: $ac_cv_header_time" >&5
13895 echo "${ECHO_T}$ac_cv_header_time" >&6
13896 if test $ac_cv_header_time = yes; then
13897
13898 cat >>confdefs.h <<\EOF
13899 #define TIME_WITH_SYS_TIME 1
13900 EOF
13901
13902 fi
13903
13904 cf_regex_func=no
13905
13906 cf_regex_libs="regex re"
13907 case $host_os in #(vi
13908 mingw*)
13909         cf_regex_libs="gnurx $cf_regex_libs"
13910         ;;
13911 esac
13912
13913 echo "$as_me:13913: checking for regcomp" >&5
13914 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13915 if test "${ac_cv_func_regcomp+set}" = set; then
13916   echo $ECHO_N "(cached) $ECHO_C" >&6
13917 else
13918   cat >conftest.$ac_ext <<_ACEOF
13919 #line 13919 "configure"
13920 #include "confdefs.h"
13921 /* System header to define __stub macros and hopefully few prototypes,
13922     which can conflict with char regcomp (); below.  */
13923 #include <assert.h>
13924 /* Override any gcc2 internal prototype to avoid an error.  */
13925 #ifdef __cplusplus
13926 extern "C"
13927 #endif
13928 /* We use char because int might match the return type of a gcc2
13929    builtin and then its argument prototype would still apply.  */
13930 char regcomp ();
13931 char (*f) ();
13932
13933 int
13934 main ()
13935 {
13936 /* The GNU C library defines this for functions which it implements
13937     to always fail with ENOSYS.  Some functions are actually named
13938     something starting with __ and the normal name is an alias.  */
13939 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13940 choke me
13941 #else
13942 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13943 #endif
13944
13945   ;
13946   return 0;
13947 }
13948 _ACEOF
13949 rm -f conftest.$ac_objext conftest$ac_exeext
13950 if { (eval echo "$as_me:13950: \"$ac_link\"") >&5
13951   (eval $ac_link) 2>&5
13952   ac_status=$?
13953   echo "$as_me:13953: \$? = $ac_status" >&5
13954   (exit $ac_status); } &&
13955          { ac_try='test -s conftest$ac_exeext'
13956   { (eval echo "$as_me:13956: \"$ac_try\"") >&5
13957   (eval $ac_try) 2>&5
13958   ac_status=$?
13959   echo "$as_me:13959: \$? = $ac_status" >&5
13960   (exit $ac_status); }; }; then
13961   ac_cv_func_regcomp=yes
13962 else
13963   echo "$as_me: failed program was:" >&5
13964 cat conftest.$ac_ext >&5
13965 ac_cv_func_regcomp=no
13966 fi
13967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13968 fi
13969 echo "$as_me:13969: result: $ac_cv_func_regcomp" >&5
13970 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13971 if test $ac_cv_func_regcomp = yes; then
13972   cf_regex_func=regcomp
13973 else
13974
13975         for cf_regex_lib in $cf_regex_libs
13976         do
13977                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13978 echo "$as_me:13978: checking for regcomp in -l$cf_regex_lib" >&5
13979 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13980 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13981   echo $ECHO_N "(cached) $ECHO_C" >&6
13982 else
13983   ac_check_lib_save_LIBS=$LIBS
13984 LIBS="-l$cf_regex_lib  $LIBS"
13985 cat >conftest.$ac_ext <<_ACEOF
13986 #line 13986 "configure"
13987 #include "confdefs.h"
13988
13989 /* Override any gcc2 internal prototype to avoid an error.  */
13990 #ifdef __cplusplus
13991 extern "C"
13992 #endif
13993 /* We use char because int might match the return type of a gcc2
13994    builtin and then its argument prototype would still apply.  */
13995 char regcomp ();
13996 int
13997 main ()
13998 {
13999 regcomp ();
14000   ;
14001   return 0;
14002 }
14003 _ACEOF
14004 rm -f conftest.$ac_objext conftest$ac_exeext
14005 if { (eval echo "$as_me:14005: \"$ac_link\"") >&5
14006   (eval $ac_link) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); } &&
14010          { ac_try='test -s conftest$ac_exeext'
14011   { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012   (eval $ac_try) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit $ac_status); }; }; then
14016   eval "$as_ac_Lib=yes"
14017 else
14018   echo "$as_me: failed program was:" >&5
14019 cat conftest.$ac_ext >&5
14020 eval "$as_ac_Lib=no"
14021 fi
14022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14023 LIBS=$ac_check_lib_save_LIBS
14024 fi
14025 echo "$as_me:14025: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14026 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14027 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14028
14029                                 LIBS="-l$cf_regex_lib $LIBS"
14030                                 cf_regex_func=regcomp
14031                                 break
14032 fi
14033
14034         done
14035
14036 fi
14037
14038 if test "$cf_regex_func" = no ; then
14039         echo "$as_me:14039: checking for compile" >&5
14040 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14041 if test "${ac_cv_func_compile+set}" = set; then
14042   echo $ECHO_N "(cached) $ECHO_C" >&6
14043 else
14044   cat >conftest.$ac_ext <<_ACEOF
14045 #line 14045 "configure"
14046 #include "confdefs.h"
14047 /* System header to define __stub macros and hopefully few prototypes,
14048     which can conflict with char compile (); below.  */
14049 #include <assert.h>
14050 /* Override any gcc2 internal prototype to avoid an error.  */
14051 #ifdef __cplusplus
14052 extern "C"
14053 #endif
14054 /* We use char because int might match the return type of a gcc2
14055    builtin and then its argument prototype would still apply.  */
14056 char compile ();
14057 char (*f) ();
14058
14059 int
14060 main ()
14061 {
14062 /* The GNU C library defines this for functions which it implements
14063     to always fail with ENOSYS.  Some functions are actually named
14064     something starting with __ and the normal name is an alias.  */
14065 #if defined (__stub_compile) || defined (__stub___compile)
14066 choke me
14067 #else
14068 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14069 #endif
14070
14071   ;
14072   return 0;
14073 }
14074 _ACEOF
14075 rm -f conftest.$ac_objext conftest$ac_exeext
14076 if { (eval echo "$as_me:14076: \"$ac_link\"") >&5
14077   (eval $ac_link) 2>&5
14078   ac_status=$?
14079   echo "$as_me:14079: \$? = $ac_status" >&5
14080   (exit $ac_status); } &&
14081          { ac_try='test -s conftest$ac_exeext'
14082   { (eval echo "$as_me:14082: \"$ac_try\"") >&5
14083   (eval $ac_try) 2>&5
14084   ac_status=$?
14085   echo "$as_me:14085: \$? = $ac_status" >&5
14086   (exit $ac_status); }; }; then
14087   ac_cv_func_compile=yes
14088 else
14089   echo "$as_me: failed program was:" >&5
14090 cat conftest.$ac_ext >&5
14091 ac_cv_func_compile=no
14092 fi
14093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14094 fi
14095 echo "$as_me:14095: result: $ac_cv_func_compile" >&5
14096 echo "${ECHO_T}$ac_cv_func_compile" >&6
14097 if test $ac_cv_func_compile = yes; then
14098   cf_regex_func=compile
14099 else
14100
14101                 echo "$as_me:14101: checking for compile in -lgen" >&5
14102 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14103 if test "${ac_cv_lib_gen_compile+set}" = set; then
14104   echo $ECHO_N "(cached) $ECHO_C" >&6
14105 else
14106   ac_check_lib_save_LIBS=$LIBS
14107 LIBS="-lgen  $LIBS"
14108 cat >conftest.$ac_ext <<_ACEOF
14109 #line 14109 "configure"
14110 #include "confdefs.h"
14111
14112 /* Override any gcc2 internal prototype to avoid an error.  */
14113 #ifdef __cplusplus
14114 extern "C"
14115 #endif
14116 /* We use char because int might match the return type of a gcc2
14117    builtin and then its argument prototype would still apply.  */
14118 char compile ();
14119 int
14120 main ()
14121 {
14122 compile ();
14123   ;
14124   return 0;
14125 }
14126 _ACEOF
14127 rm -f conftest.$ac_objext conftest$ac_exeext
14128 if { (eval echo "$as_me:14128: \"$ac_link\"") >&5
14129   (eval $ac_link) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit $ac_status); } &&
14133          { ac_try='test -s conftest$ac_exeext'
14134   { (eval echo "$as_me:14134: \"$ac_try\"") >&5
14135   (eval $ac_try) 2>&5
14136   ac_status=$?
14137   echo "$as_me:14137: \$? = $ac_status" >&5
14138   (exit $ac_status); }; }; then
14139   ac_cv_lib_gen_compile=yes
14140 else
14141   echo "$as_me: failed program was:" >&5
14142 cat conftest.$ac_ext >&5
14143 ac_cv_lib_gen_compile=no
14144 fi
14145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14146 LIBS=$ac_check_lib_save_LIBS
14147 fi
14148 echo "$as_me:14148: result: $ac_cv_lib_gen_compile" >&5
14149 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14150 if test $ac_cv_lib_gen_compile = yes; then
14151
14152                                 LIBS="-lgen $LIBS"
14153                                 cf_regex_func=compile
14154 fi
14155
14156 fi
14157
14158 fi
14159
14160 if test "$cf_regex_func" = no ; then
14161         { echo "$as_me:14161: WARNING: cannot find regular expression library" >&5
14162 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14163 fi
14164
14165 echo "$as_me:14165: checking for regular-expression headers" >&5
14166 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14167 if test "${cf_cv_regex_hdrs+set}" = set; then
14168   echo $ECHO_N "(cached) $ECHO_C" >&6
14169 else
14170
14171 cf_cv_regex_hdrs=no
14172 case $cf_regex_func in #(vi
14173 compile) #(vi
14174         for cf_regex_hdr in regexp.h regexpr.h
14175         do
14176                 cat >conftest.$ac_ext <<_ACEOF
14177 #line 14177 "configure"
14178 #include "confdefs.h"
14179 #include <$cf_regex_hdr>
14180 int
14181 main ()
14182 {
14183
14184                         char *p = compile("", "", "", 0);
14185                         int x = step("", "");
14186
14187   ;
14188   return 0;
14189 }
14190 _ACEOF
14191 rm -f conftest.$ac_objext conftest$ac_exeext
14192 if { (eval echo "$as_me:14192: \"$ac_link\"") >&5
14193   (eval $ac_link) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit $ac_status); } &&
14197          { ac_try='test -s conftest$ac_exeext'
14198   { (eval echo "$as_me:14198: \"$ac_try\"") >&5
14199   (eval $ac_try) 2>&5
14200   ac_status=$?
14201   echo "$as_me:14201: \$? = $ac_status" >&5
14202   (exit $ac_status); }; }; then
14203
14204                         cf_cv_regex_hdrs=$cf_regex_hdr
14205                         break
14206
14207 else
14208   echo "$as_me: failed program was:" >&5
14209 cat conftest.$ac_ext >&5
14210 fi
14211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14212         done
14213         ;;
14214 *)
14215         for cf_regex_hdr in regex.h
14216         do
14217                 cat >conftest.$ac_ext <<_ACEOF
14218 #line 14218 "configure"
14219 #include "confdefs.h"
14220 #include <sys/types.h>
14221 #include <$cf_regex_hdr>
14222 int
14223 main ()
14224 {
14225
14226                         regex_t *p;
14227                         int x = regcomp(p, "", 0);
14228                         int y = regexec(p, "", 0, 0, 0);
14229                         regfree(p);
14230
14231   ;
14232   return 0;
14233 }
14234 _ACEOF
14235 rm -f conftest.$ac_objext conftest$ac_exeext
14236 if { (eval echo "$as_me:14236: \"$ac_link\"") >&5
14237   (eval $ac_link) 2>&5
14238   ac_status=$?
14239   echo "$as_me:14239: \$? = $ac_status" >&5
14240   (exit $ac_status); } &&
14241          { ac_try='test -s conftest$ac_exeext'
14242   { (eval echo "$as_me:14242: \"$ac_try\"") >&5
14243   (eval $ac_try) 2>&5
14244   ac_status=$?
14245   echo "$as_me:14245: \$? = $ac_status" >&5
14246   (exit $ac_status); }; }; then
14247
14248                         cf_cv_regex_hdrs=$cf_regex_hdr
14249                         break
14250
14251 else
14252   echo "$as_me: failed program was:" >&5
14253 cat conftest.$ac_ext >&5
14254 fi
14255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14256         done
14257         ;;
14258 esac
14259
14260 fi
14261 echo "$as_me:14261: result: $cf_cv_regex_hdrs" >&5
14262 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14263
14264 case $cf_cv_regex_hdrs in #(vi
14265     no)        { echo "$as_me:14265: WARNING: no regular expression header found" >&5
14266 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14267     regex.h)   cat >>confdefs.h <<\EOF
14268 #define HAVE_REGEX_H_FUNCS 1
14269 EOF
14270  ;; #(vi
14271     regexp.h)  cat >>confdefs.h <<\EOF
14272 #define HAVE_REGEXP_H_FUNCS 1
14273 EOF
14274  ;; #(vi
14275     regexpr.h) cat >>confdefs.h <<\EOF
14276 #define HAVE_REGEXPR_H_FUNCS 1
14277 EOF
14278  ;;
14279 esac
14280
14281 for ac_header in \
14282 fcntl.h \
14283 getopt.h \
14284 limits.h \
14285 locale.h \
14286 math.h \
14287 poll.h \
14288 sys/bsdtypes.h \
14289 sys/ioctl.h \
14290 sys/param.h \
14291 sys/poll.h \
14292 sys/select.h \
14293 sys/time.h \
14294 sys/times.h \
14295 ttyent.h \
14296 unistd.h \
14297 wctype.h \
14298
14299 do
14300 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14301 echo "$as_me:14301: checking for $ac_header" >&5
14302 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14303 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14304   echo $ECHO_N "(cached) $ECHO_C" >&6
14305 else
14306   cat >conftest.$ac_ext <<_ACEOF
14307 #line 14307 "configure"
14308 #include "confdefs.h"
14309 #include <$ac_header>
14310 _ACEOF
14311 if { (eval echo "$as_me:14311: \"$ac_cpp conftest.$ac_ext\"") >&5
14312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14313   ac_status=$?
14314   egrep -v '^ *\+' conftest.er1 >conftest.err
14315   rm -f conftest.er1
14316   cat conftest.err >&5
14317   echo "$as_me:14317: \$? = $ac_status" >&5
14318   (exit $ac_status); } >/dev/null; then
14319   if test -s conftest.err; then
14320     ac_cpp_err=$ac_c_preproc_warn_flag
14321   else
14322     ac_cpp_err=
14323   fi
14324 else
14325   ac_cpp_err=yes
14326 fi
14327 if test -z "$ac_cpp_err"; then
14328   eval "$as_ac_Header=yes"
14329 else
14330   echo "$as_me: failed program was:" >&5
14331   cat conftest.$ac_ext >&5
14332   eval "$as_ac_Header=no"
14333 fi
14334 rm -f conftest.err conftest.$ac_ext
14335 fi
14336 echo "$as_me:14336: result: `eval echo '${'$as_ac_Header'}'`" >&5
14337 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14338 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14339   cat >>confdefs.h <<EOF
14340 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14341 EOF
14342
14343 fi
14344 done
14345
14346 for ac_header in unistd.h getopt.h
14347 do
14348 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14349 echo "$as_me:14349: checking for $ac_header" >&5
14350 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14351 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14352   echo $ECHO_N "(cached) $ECHO_C" >&6
14353 else
14354   cat >conftest.$ac_ext <<_ACEOF
14355 #line 14355 "configure"
14356 #include "confdefs.h"
14357 #include <$ac_header>
14358 _ACEOF
14359 if { (eval echo "$as_me:14359: \"$ac_cpp conftest.$ac_ext\"") >&5
14360   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14361   ac_status=$?
14362   egrep -v '^ *\+' conftest.er1 >conftest.err
14363   rm -f conftest.er1
14364   cat conftest.err >&5
14365   echo "$as_me:14365: \$? = $ac_status" >&5
14366   (exit $ac_status); } >/dev/null; then
14367   if test -s conftest.err; then
14368     ac_cpp_err=$ac_c_preproc_warn_flag
14369   else
14370     ac_cpp_err=
14371   fi
14372 else
14373   ac_cpp_err=yes
14374 fi
14375 if test -z "$ac_cpp_err"; then
14376   eval "$as_ac_Header=yes"
14377 else
14378   echo "$as_me: failed program was:" >&5
14379   cat conftest.$ac_ext >&5
14380   eval "$as_ac_Header=no"
14381 fi
14382 rm -f conftest.err conftest.$ac_ext
14383 fi
14384 echo "$as_me:14384: result: `eval echo '${'$as_ac_Header'}'`" >&5
14385 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14386 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14387   cat >>confdefs.h <<EOF
14388 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14389 EOF
14390
14391 fi
14392 done
14393
14394 echo "$as_me:14394: checking for header declaring getopt variables" >&5
14395 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14396 if test "${cf_cv_getopt_header+set}" = set; then
14397   echo $ECHO_N "(cached) $ECHO_C" >&6
14398 else
14399
14400 cf_cv_getopt_header=none
14401 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14402 do
14403 cat >conftest.$ac_ext <<_ACEOF
14404 #line 14404 "configure"
14405 #include "confdefs.h"
14406
14407 #include <$cf_header>
14408 int
14409 main ()
14410 {
14411 int x = optind; char *y = optarg
14412   ;
14413   return 0;
14414 }
14415 _ACEOF
14416 rm -f conftest.$ac_objext
14417 if { (eval echo "$as_me:14417: \"$ac_compile\"") >&5
14418   (eval $ac_compile) 2>&5
14419   ac_status=$?
14420   echo "$as_me:14420: \$? = $ac_status" >&5
14421   (exit $ac_status); } &&
14422          { ac_try='test -s conftest.$ac_objext'
14423   { (eval echo "$as_me:14423: \"$ac_try\"") >&5
14424   (eval $ac_try) 2>&5
14425   ac_status=$?
14426   echo "$as_me:14426: \$? = $ac_status" >&5
14427   (exit $ac_status); }; }; then
14428   cf_cv_getopt_header=$cf_header
14429  break
14430 else
14431   echo "$as_me: failed program was:" >&5
14432 cat conftest.$ac_ext >&5
14433 fi
14434 rm -f conftest.$ac_objext conftest.$ac_ext
14435 done
14436
14437 fi
14438 echo "$as_me:14438: result: $cf_cv_getopt_header" >&5
14439 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14440 if test $cf_cv_getopt_header != none ; then
14441         cat >>confdefs.h <<\EOF
14442 #define HAVE_GETOPT_HEADER 1
14443 EOF
14444
14445 fi
14446
14447 # check for ISC (this may also define _POSIX_SOURCE)
14448 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14449 if test "$ISC" = yes ; then
14450
14451 echo "$as_me:14451: checking for main in -lcposix" >&5
14452 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14453 if test "${ac_cv_lib_cposix_main+set}" = set; then
14454   echo $ECHO_N "(cached) $ECHO_C" >&6
14455 else
14456   ac_check_lib_save_LIBS=$LIBS
14457 LIBS="-lcposix  $LIBS"
14458 cat >conftest.$ac_ext <<_ACEOF
14459 #line 14459 "configure"
14460 #include "confdefs.h"
14461
14462 int
14463 main ()
14464 {
14465 main ();
14466   ;
14467   return 0;
14468 }
14469 _ACEOF
14470 rm -f conftest.$ac_objext conftest$ac_exeext
14471 if { (eval echo "$as_me:14471: \"$ac_link\"") >&5
14472   (eval $ac_link) 2>&5
14473   ac_status=$?
14474   echo "$as_me:14474: \$? = $ac_status" >&5
14475   (exit $ac_status); } &&
14476          { ac_try='test -s conftest$ac_exeext'
14477   { (eval echo "$as_me:14477: \"$ac_try\"") >&5
14478   (eval $ac_try) 2>&5
14479   ac_status=$?
14480   echo "$as_me:14480: \$? = $ac_status" >&5
14481   (exit $ac_status); }; }; then
14482   ac_cv_lib_cposix_main=yes
14483 else
14484   echo "$as_me: failed program was:" >&5
14485 cat conftest.$ac_ext >&5
14486 ac_cv_lib_cposix_main=no
14487 fi
14488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14489 LIBS=$ac_check_lib_save_LIBS
14490 fi
14491 echo "$as_me:14491: result: $ac_cv_lib_cposix_main" >&5
14492 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14493 if test $ac_cv_lib_cposix_main = yes; then
14494   cat >>confdefs.h <<EOF
14495 #define HAVE_LIBCPOSIX 1
14496 EOF
14497
14498   LIBS="-lcposix $LIBS"
14499
14500 fi
14501
14502         echo "$as_me:14502: checking for bzero in -linet" >&5
14503 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14504 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14505   echo $ECHO_N "(cached) $ECHO_C" >&6
14506 else
14507   ac_check_lib_save_LIBS=$LIBS
14508 LIBS="-linet  $LIBS"
14509 cat >conftest.$ac_ext <<_ACEOF
14510 #line 14510 "configure"
14511 #include "confdefs.h"
14512
14513 /* Override any gcc2 internal prototype to avoid an error.  */
14514 #ifdef __cplusplus
14515 extern "C"
14516 #endif
14517 /* We use char because int might match the return type of a gcc2
14518    builtin and then its argument prototype would still apply.  */
14519 char bzero ();
14520 int
14521 main ()
14522 {
14523 bzero ();
14524   ;
14525   return 0;
14526 }
14527 _ACEOF
14528 rm -f conftest.$ac_objext conftest$ac_exeext
14529 if { (eval echo "$as_me:14529: \"$ac_link\"") >&5
14530   (eval $ac_link) 2>&5
14531   ac_status=$?
14532   echo "$as_me:14532: \$? = $ac_status" >&5
14533   (exit $ac_status); } &&
14534          { ac_try='test -s conftest$ac_exeext'
14535   { (eval echo "$as_me:14535: \"$ac_try\"") >&5
14536   (eval $ac_try) 2>&5
14537   ac_status=$?
14538   echo "$as_me:14538: \$? = $ac_status" >&5
14539   (exit $ac_status); }; }; then
14540   ac_cv_lib_inet_bzero=yes
14541 else
14542   echo "$as_me: failed program was:" >&5
14543 cat conftest.$ac_ext >&5
14544 ac_cv_lib_inet_bzero=no
14545 fi
14546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14547 LIBS=$ac_check_lib_save_LIBS
14548 fi
14549 echo "$as_me:14549: result: $ac_cv_lib_inet_bzero" >&5
14550 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14551 if test $ac_cv_lib_inet_bzero = yes; then
14552   LIBS="-linet $LIBS"
14553 fi
14554 fi
14555
14556 echo "$as_me:14556: checking if sys/time.h works with sys/select.h" >&5
14557 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14558 if test "${cf_cv_sys_time_select+set}" = set; then
14559   echo $ECHO_N "(cached) $ECHO_C" >&6
14560 else
14561
14562 cat >conftest.$ac_ext <<_ACEOF
14563 #line 14563 "configure"
14564 #include "confdefs.h"
14565
14566 #include <sys/types.h>
14567 #ifdef HAVE_SYS_TIME_H
14568 #include <sys/time.h>
14569 #endif
14570 #ifdef HAVE_SYS_SELECT_H
14571 #include <sys/select.h>
14572 #endif
14573
14574 int
14575 main ()
14576 {
14577
14578   ;
14579   return 0;
14580 }
14581 _ACEOF
14582 rm -f conftest.$ac_objext
14583 if { (eval echo "$as_me:14583: \"$ac_compile\"") >&5
14584   (eval $ac_compile) 2>&5
14585   ac_status=$?
14586   echo "$as_me:14586: \$? = $ac_status" >&5
14587   (exit $ac_status); } &&
14588          { ac_try='test -s conftest.$ac_objext'
14589   { (eval echo "$as_me:14589: \"$ac_try\"") >&5
14590   (eval $ac_try) 2>&5
14591   ac_status=$?
14592   echo "$as_me:14592: \$? = $ac_status" >&5
14593   (exit $ac_status); }; }; then
14594   cf_cv_sys_time_select=yes
14595 else
14596   echo "$as_me: failed program was:" >&5
14597 cat conftest.$ac_ext >&5
14598 cf_cv_sys_time_select=no
14599 fi
14600 rm -f conftest.$ac_objext conftest.$ac_ext
14601
14602 fi
14603
14604 echo "$as_me:14604: result: $cf_cv_sys_time_select" >&5
14605 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14606 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14607 #define HAVE_SYS_TIME_SELECT 1
14608 EOF
14609
14610 ###     checks for compiler characteristics
14611 ac_ext=c
14612 ac_cpp='$CPP $CPPFLAGS'
14613 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14614 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14615 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14616 ac_main_return=return
14617
14618 echo "$as_me:14618: checking for $CC option to accept ANSI C" >&5
14619 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14620 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14621   echo $ECHO_N "(cached) $ECHO_C" >&6
14622 else
14623   ac_cv_prog_cc_stdc=no
14624 ac_save_CC=$CC
14625 cat >conftest.$ac_ext <<_ACEOF
14626 #line 14626 "configure"
14627 #include "confdefs.h"
14628 #include <stdarg.h>
14629 #include <stdio.h>
14630 #include <sys/types.h>
14631 #include <sys/stat.h>
14632 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14633 struct buf { int x; };
14634 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14635 static char *e (p, i)
14636      char **p;
14637      int i;
14638 {
14639   return p[i];
14640 }
14641 static char *f (char * (*g) (char **, int), char **p, ...)
14642 {
14643   char *s;
14644   va_list v;
14645   va_start (v,p);
14646   s = g (p, va_arg (v,int));
14647   va_end (v);
14648   return s;
14649 }
14650 int test (int i, double x);
14651 struct s1 {int (*f) (int a);};
14652 struct s2 {int (*f) (double a);};
14653 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14654 int argc;
14655 char **argv;
14656 int
14657 main ()
14658 {
14659 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14660   ;
14661   return 0;
14662 }
14663 _ACEOF
14664 # Don't try gcc -ansi; that turns off useful extensions and
14665 # breaks some systems' header files.
14666 # AIX                   -qlanglvl=ansi
14667 # Ultrix and OSF/1      -std1
14668 # HP-UX 10.20 and later -Ae
14669 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14670 # SVR4                  -Xc -D__EXTENSIONS__
14671 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14672 do
14673   CC="$ac_save_CC $ac_arg"
14674   rm -f conftest.$ac_objext
14675 if { (eval echo "$as_me:14675: \"$ac_compile\"") >&5
14676   (eval $ac_compile) 2>&5
14677   ac_status=$?
14678   echo "$as_me:14678: \$? = $ac_status" >&5
14679   (exit $ac_status); } &&
14680          { ac_try='test -s conftest.$ac_objext'
14681   { (eval echo "$as_me:14681: \"$ac_try\"") >&5
14682   (eval $ac_try) 2>&5
14683   ac_status=$?
14684   echo "$as_me:14684: \$? = $ac_status" >&5
14685   (exit $ac_status); }; }; then
14686   ac_cv_prog_cc_stdc=$ac_arg
14687 break
14688 else
14689   echo "$as_me: failed program was:" >&5
14690 cat conftest.$ac_ext >&5
14691 fi
14692 rm -f conftest.$ac_objext
14693 done
14694 rm -f conftest.$ac_ext conftest.$ac_objext
14695 CC=$ac_save_CC
14696
14697 fi
14698
14699 case "x$ac_cv_prog_cc_stdc" in
14700   x|xno)
14701     echo "$as_me:14701: result: none needed" >&5
14702 echo "${ECHO_T}none needed" >&6 ;;
14703   *)
14704     echo "$as_me:14704: result: $ac_cv_prog_cc_stdc" >&5
14705 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14706     CC="$CC $ac_cv_prog_cc_stdc" ;;
14707 esac
14708
14709 echo "$as_me:14709: checking for an ANSI C-conforming const" >&5
14710 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14711 if test "${ac_cv_c_const+set}" = set; then
14712   echo $ECHO_N "(cached) $ECHO_C" >&6
14713 else
14714   cat >conftest.$ac_ext <<_ACEOF
14715 #line 14715 "configure"
14716 #include "confdefs.h"
14717
14718 int
14719 main ()
14720 {
14721 /* FIXME: Include the comments suggested by Paul. */
14722 #ifndef __cplusplus
14723   /* Ultrix mips cc rejects this.  */
14724   typedef int charset[2];
14725   const charset x;
14726   /* SunOS 4.1.1 cc rejects this.  */
14727   char const *const *ccp;
14728   char **p;
14729   /* NEC SVR4.0.2 mips cc rejects this.  */
14730   struct point {int x, y;};
14731   static struct point const zero = {0,0};
14732   /* AIX XL C 1.02.0.0 rejects this.
14733      It does not let you subtract one const X* pointer from another in
14734      an arm of an if-expression whose if-part is not a constant
14735      expression */
14736   const char *g = "string";
14737   ccp = &g + (g ? g-g : 0);
14738   /* HPUX 7.0 cc rejects these. */
14739   ++ccp;
14740   p = (char**) ccp;
14741   ccp = (char const *const *) p;
14742   { /* SCO 3.2v4 cc rejects this.  */
14743     char *t;
14744     char const *s = 0 ? (char *) 0 : (char const *) 0;
14745
14746     *t++ = 0;
14747   }
14748   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14749     int x[] = {25, 17};
14750     const int *foo = &x[0];
14751     ++foo;
14752   }
14753   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14754     typedef const int *iptr;
14755     iptr p = 0;
14756     ++p;
14757   }
14758   { /* AIX XL C 1.02.0.0 rejects this saying
14759        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14760     struct s { int j; const int *ap[3]; };
14761     struct s *b; b->j = 5;
14762   }
14763   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14764     const int foo = 10;
14765   }
14766 #endif
14767
14768   ;
14769   return 0;
14770 }
14771 _ACEOF
14772 rm -f conftest.$ac_objext
14773 if { (eval echo "$as_me:14773: \"$ac_compile\"") >&5
14774   (eval $ac_compile) 2>&5
14775   ac_status=$?
14776   echo "$as_me:14776: \$? = $ac_status" >&5
14777   (exit $ac_status); } &&
14778          { ac_try='test -s conftest.$ac_objext'
14779   { (eval echo "$as_me:14779: \"$ac_try\"") >&5
14780   (eval $ac_try) 2>&5
14781   ac_status=$?
14782   echo "$as_me:14782: \$? = $ac_status" >&5
14783   (exit $ac_status); }; }; then
14784   ac_cv_c_const=yes
14785 else
14786   echo "$as_me: failed program was:" >&5
14787 cat conftest.$ac_ext >&5
14788 ac_cv_c_const=no
14789 fi
14790 rm -f conftest.$ac_objext conftest.$ac_ext
14791 fi
14792 echo "$as_me:14792: result: $ac_cv_c_const" >&5
14793 echo "${ECHO_T}$ac_cv_c_const" >&6
14794 if test $ac_cv_c_const = no; then
14795
14796 cat >>confdefs.h <<\EOF
14797 #define const
14798 EOF
14799
14800 fi
14801
14802 echo "$as_me:14802: checking for inline" >&5
14803 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14804 if test "${ac_cv_c_inline+set}" = set; then
14805   echo $ECHO_N "(cached) $ECHO_C" >&6
14806 else
14807   ac_cv_c_inline=no
14808 for ac_kw in inline __inline__ __inline; do
14809   cat >conftest.$ac_ext <<_ACEOF
14810 #line 14810 "configure"
14811 #include "confdefs.h"
14812 #ifndef __cplusplus
14813 static $ac_kw int static_foo () {return 0; }
14814 $ac_kw int foo () {return 0; }
14815 #endif
14816
14817 _ACEOF
14818 rm -f conftest.$ac_objext
14819 if { (eval echo "$as_me:14819: \"$ac_compile\"") >&5
14820   (eval $ac_compile) 2>&5
14821   ac_status=$?
14822   echo "$as_me:14822: \$? = $ac_status" >&5
14823   (exit $ac_status); } &&
14824          { ac_try='test -s conftest.$ac_objext'
14825   { (eval echo "$as_me:14825: \"$ac_try\"") >&5
14826   (eval $ac_try) 2>&5
14827   ac_status=$?
14828   echo "$as_me:14828: \$? = $ac_status" >&5
14829   (exit $ac_status); }; }; then
14830   ac_cv_c_inline=$ac_kw; break
14831 else
14832   echo "$as_me: failed program was:" >&5
14833 cat conftest.$ac_ext >&5
14834 fi
14835 rm -f conftest.$ac_objext conftest.$ac_ext
14836 done
14837
14838 fi
14839 echo "$as_me:14839: result: $ac_cv_c_inline" >&5
14840 echo "${ECHO_T}$ac_cv_c_inline" >&6
14841 case $ac_cv_c_inline in
14842   inline | yes) ;;
14843   no)
14844 cat >>confdefs.h <<\EOF
14845 #define inline
14846 EOF
14847  ;;
14848   *)  cat >>confdefs.h <<EOF
14849 #define inline $ac_cv_c_inline
14850 EOF
14851  ;;
14852 esac
14853
14854 NCURSES_INLINE=
14855 if test "$ac_cv_c_inline" != no ; then
14856   NCURSES_INLINE=inline
14857   if test "$INTEL_COMPILER" = yes
14858   then
14859     :
14860   elif test "$CLANG_COMPILER" = yes
14861   then
14862     :
14863   elif test "$GCC" = yes
14864   then
14865     echo "$as_me:14865: checking if $CC supports options to tune inlining" >&5
14866 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14867 if test "${cf_cv_gcc_inline+set}" = set; then
14868   echo $ECHO_N "(cached) $ECHO_C" >&6
14869 else
14870
14871       cf_save_CFLAGS=$CFLAGS
14872       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14873       cat >conftest.$ac_ext <<_ACEOF
14874 #line 14874 "configure"
14875 #include "confdefs.h"
14876 inline int foo(void) { return 1; }
14877 int
14878 main ()
14879 {
14880 ${cf_cv_main_return:-return} foo()
14881   ;
14882   return 0;
14883 }
14884 _ACEOF
14885 rm -f conftest.$ac_objext
14886 if { (eval echo "$as_me:14886: \"$ac_compile\"") >&5
14887   (eval $ac_compile) 2>&5
14888   ac_status=$?
14889   echo "$as_me:14889: \$? = $ac_status" >&5
14890   (exit $ac_status); } &&
14891          { ac_try='test -s conftest.$ac_objext'
14892   { (eval echo "$as_me:14892: \"$ac_try\"") >&5
14893   (eval $ac_try) 2>&5
14894   ac_status=$?
14895   echo "$as_me:14895: \$? = $ac_status" >&5
14896   (exit $ac_status); }; }; then
14897   cf_cv_gcc_inline=yes
14898 else
14899   echo "$as_me: failed program was:" >&5
14900 cat conftest.$ac_ext >&5
14901 cf_cv_gcc_inline=no
14902 fi
14903 rm -f conftest.$ac_objext conftest.$ac_ext
14904       CFLAGS=$cf_save_CFLAGS
14905
14906 fi
14907 echo "$as_me:14907: result: $cf_cv_gcc_inline" >&5
14908 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14909     if test "$cf_cv_gcc_inline" = yes ; then
14910
14911 cf_fix_cppflags=no
14912 cf_new_cflags=
14913 cf_new_cppflags=
14914 cf_new_extra_cppflags=
14915
14916 for cf_add_cflags in --param max-inline-insns-single=1200
14917 do
14918 case $cf_fix_cppflags in
14919 no)
14920         case $cf_add_cflags in #(vi
14921         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14922                 case $cf_add_cflags in
14923                 -D*)
14924                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14925
14926                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14927                                 && test -z "${cf_tst_cflags}" \
14928                                 && cf_fix_cppflags=yes
14929
14930                         if test $cf_fix_cppflags = yes ; then
14931                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14932                                 continue
14933                         elif test "${cf_tst_cflags}" = "\"'" ; then
14934                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14935                                 continue
14936                         fi
14937                         ;;
14938                 esac
14939                 case "$CPPFLAGS" in
14940                 *$cf_add_cflags) #(vi
14941                         ;;
14942                 *) #(vi
14943                         case $cf_add_cflags in #(vi
14944                         -D*)
14945                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14946
14947 CPPFLAGS=`echo "$CPPFLAGS" | \
14948         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14949                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14950
14951                                 ;;
14952                         esac
14953                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14954                         ;;
14955                 esac
14956                 ;;
14957         *)
14958                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14959                 ;;
14960         esac
14961         ;;
14962 yes)
14963         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14964
14965         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14966
14967         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14968                 && test -z "${cf_tst_cflags}" \
14969                 && cf_fix_cppflags=no
14970         ;;
14971 esac
14972 done
14973
14974 if test -n "$cf_new_cflags" ; then
14975
14976         CFLAGS="$CFLAGS $cf_new_cflags"
14977 fi
14978
14979 if test -n "$cf_new_cppflags" ; then
14980
14981         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14982 fi
14983
14984 if test -n "$cf_new_extra_cppflags" ; then
14985
14986         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14987 fi
14988
14989     fi
14990   fi
14991 fi
14992
14993 echo "$as_me:14993: checking for signal global datatype" >&5
14994 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14995 if test "${cf_cv_sig_atomic_t+set}" = set; then
14996   echo $ECHO_N "(cached) $ECHO_C" >&6
14997 else
14998
14999         for cf_type in \
15000                 "volatile sig_atomic_t" \
15001                 "sig_atomic_t" \
15002                 "int"
15003         do
15004         cat >conftest.$ac_ext <<_ACEOF
15005 #line 15005 "configure"
15006 #include "confdefs.h"
15007
15008 #include <sys/types.h>
15009 #include <signal.h>
15010 #include <stdio.h>
15011
15012 extern $cf_type x;
15013 $cf_type x;
15014 static void handler(int sig)
15015 {
15016         x = 5;
15017 }
15018 int
15019 main ()
15020 {
15021 signal(SIGINT, handler);
15022                  x = 1
15023   ;
15024   return 0;
15025 }
15026 _ACEOF
15027 rm -f conftest.$ac_objext
15028 if { (eval echo "$as_me:15028: \"$ac_compile\"") >&5
15029   (eval $ac_compile) 2>&5
15030   ac_status=$?
15031   echo "$as_me:15031: \$? = $ac_status" >&5
15032   (exit $ac_status); } &&
15033          { ac_try='test -s conftest.$ac_objext'
15034   { (eval echo "$as_me:15034: \"$ac_try\"") >&5
15035   (eval $ac_try) 2>&5
15036   ac_status=$?
15037   echo "$as_me:15037: \$? = $ac_status" >&5
15038   (exit $ac_status); }; }; then
15039   cf_cv_sig_atomic_t=$cf_type
15040 else
15041   echo "$as_me: failed program was:" >&5
15042 cat conftest.$ac_ext >&5
15043 cf_cv_sig_atomic_t=no
15044 fi
15045 rm -f conftest.$ac_objext conftest.$ac_ext
15046                 test "$cf_cv_sig_atomic_t" != no && break
15047         done
15048
15049 fi
15050
15051 echo "$as_me:15051: result: $cf_cv_sig_atomic_t" >&5
15052 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15053 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
15054 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15055 EOF
15056
15057 if test $NCURSES_CHTYPE = auto ; then
15058
15059 echo "$as_me:15059: checking for type of chtype" >&5
15060 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15061 if test "${cf_cv_typeof_chtype+set}" = set; then
15062   echo $ECHO_N "(cached) $ECHO_C" >&6
15063 else
15064
15065                 if test "$cross_compiling" = yes; then
15066   cf_cv_typeof_chtype=long
15067 else
15068   cat >conftest.$ac_ext <<_ACEOF
15069 #line 15069 "configure"
15070 #include "confdefs.h"
15071
15072 #define WANT_BITS 31
15073 #include <stdio.h>
15074 int main()
15075 {
15076         FILE *fp = fopen("cf_test.out", "w");
15077         if (fp != 0) {
15078                 char *result = "long";
15079                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15080                         int n;
15081                         unsigned int x, y;
15082                         for (n = 0; n < WANT_BITS; n++) {
15083                                 x = (1 << n);
15084                                 y = (x >> n);
15085                                 if (y != 1 || x == 0) {
15086                                         x = 0;
15087                                         break;
15088                                 }
15089                         }
15090                         /*
15091                          * If x is nonzero, an int is big enough for the bits
15092                          * that we want.
15093                          */
15094                         result = (x != 0) ? "int" : "long";
15095                 }
15096                 fputs(result, fp);
15097                 fclose(fp);
15098         }
15099         ${cf_cv_main_return:-return}(0);
15100 }
15101
15102 _ACEOF
15103 rm -f conftest$ac_exeext
15104 if { (eval echo "$as_me:15104: \"$ac_link\"") >&5
15105   (eval $ac_link) 2>&5
15106   ac_status=$?
15107   echo "$as_me:15107: \$? = $ac_status" >&5
15108   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15109   { (eval echo "$as_me:15109: \"$ac_try\"") >&5
15110   (eval $ac_try) 2>&5
15111   ac_status=$?
15112   echo "$as_me:15112: \$? = $ac_status" >&5
15113   (exit $ac_status); }; }; then
15114   cf_cv_typeof_chtype=`cat cf_test.out`
15115 else
15116   echo "$as_me: program exited with status $ac_status" >&5
15117 echo "$as_me: failed program was:" >&5
15118 cat conftest.$ac_ext >&5
15119 cf_cv_typeof_chtype=long
15120 fi
15121 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15122 fi
15123                 rm -f cf_test.out
15124
15125 fi
15126
15127 echo "$as_me:15127: result: $cf_cv_typeof_chtype" >&5
15128 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15129
15130 cat >>confdefs.h <<EOF
15131 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15132 EOF
15133
15134 else
15135         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15136 fi
15137 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15138
15139 echo "$as_me:15139: checking if unsigned literals are legal" >&5
15140 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15141 if test "${cf_cv_unsigned_literals+set}" = set; then
15142   echo $ECHO_N "(cached) $ECHO_C" >&6
15143 else
15144
15145         cat >conftest.$ac_ext <<_ACEOF
15146 #line 15146 "configure"
15147 #include "confdefs.h"
15148
15149 int
15150 main ()
15151 {
15152 long x = 1L + 1UL + 1U + 1
15153   ;
15154   return 0;
15155 }
15156 _ACEOF
15157 rm -f conftest.$ac_objext
15158 if { (eval echo "$as_me:15158: \"$ac_compile\"") >&5
15159   (eval $ac_compile) 2>&5
15160   ac_status=$?
15161   echo "$as_me:15161: \$? = $ac_status" >&5
15162   (exit $ac_status); } &&
15163          { ac_try='test -s conftest.$ac_objext'
15164   { (eval echo "$as_me:15164: \"$ac_try\"") >&5
15165   (eval $ac_try) 2>&5
15166   ac_status=$?
15167   echo "$as_me:15167: \$? = $ac_status" >&5
15168   (exit $ac_status); }; }; then
15169   cf_cv_unsigned_literals=yes
15170 else
15171   echo "$as_me: failed program was:" >&5
15172 cat conftest.$ac_ext >&5
15173 cf_cv_unsigned_literals=no
15174 fi
15175 rm -f conftest.$ac_objext conftest.$ac_ext
15176
15177 fi
15178
15179 echo "$as_me:15179: result: $cf_cv_unsigned_literals" >&5
15180 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15181
15182 cf_cv_1UL="1"
15183 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15184 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15185
15186 if test $NCURSES_MMASK_T = auto ; then
15187         cf_cv_typeof_mmask_t=long
15188 else
15189         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15190 fi
15191 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15192
15193 ###     Checks for external-data
15194
15195 echo "$as_me:15195: checking if external errno is declared" >&5
15196 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15197 if test "${cf_cv_dcl_errno+set}" = set; then
15198   echo $ECHO_N "(cached) $ECHO_C" >&6
15199 else
15200
15201     cat >conftest.$ac_ext <<_ACEOF
15202 #line 15202 "configure"
15203 #include "confdefs.h"
15204
15205 #ifdef HAVE_STDLIB_H
15206 #include <stdlib.h>
15207 #endif
15208 #include <stdio.h>
15209 #include <sys/types.h>
15210 #include <errno.h>
15211 int
15212 main ()
15213 {
15214 int x = (int) errno
15215   ;
15216   return 0;
15217 }
15218 _ACEOF
15219 rm -f conftest.$ac_objext
15220 if { (eval echo "$as_me:15220: \"$ac_compile\"") >&5
15221   (eval $ac_compile) 2>&5
15222   ac_status=$?
15223   echo "$as_me:15223: \$? = $ac_status" >&5
15224   (exit $ac_status); } &&
15225          { ac_try='test -s conftest.$ac_objext'
15226   { (eval echo "$as_me:15226: \"$ac_try\"") >&5
15227   (eval $ac_try) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); }; }; then
15231   cf_cv_dcl_errno=yes
15232 else
15233   echo "$as_me: failed program was:" >&5
15234 cat conftest.$ac_ext >&5
15235 cf_cv_dcl_errno=no
15236 fi
15237 rm -f conftest.$ac_objext conftest.$ac_ext
15238
15239 fi
15240 echo "$as_me:15240: result: $cf_cv_dcl_errno" >&5
15241 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15242
15243 if test "$cf_cv_dcl_errno" = no ; then
15244
15245 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15246
15247     cat >>confdefs.h <<EOF
15248 #define $cf_result 1
15249 EOF
15250
15251 fi
15252
15253 # It's possible (for near-UNIX clones) that the data doesn't exist
15254
15255 echo "$as_me:15255: checking if external errno exists" >&5
15256 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15257 if test "${cf_cv_have_errno+set}" = set; then
15258   echo $ECHO_N "(cached) $ECHO_C" >&6
15259 else
15260
15261     cat >conftest.$ac_ext <<_ACEOF
15262 #line 15262 "configure"
15263 #include "confdefs.h"
15264
15265 #undef errno
15266 extern int errno;
15267
15268 int
15269 main ()
15270 {
15271 errno = 2
15272   ;
15273   return 0;
15274 }
15275 _ACEOF
15276 rm -f conftest.$ac_objext conftest$ac_exeext
15277 if { (eval echo "$as_me:15277: \"$ac_link\"") >&5
15278   (eval $ac_link) 2>&5
15279   ac_status=$?
15280   echo "$as_me:15280: \$? = $ac_status" >&5
15281   (exit $ac_status); } &&
15282          { ac_try='test -s conftest$ac_exeext'
15283   { (eval echo "$as_me:15283: \"$ac_try\"") >&5
15284   (eval $ac_try) 2>&5
15285   ac_status=$?
15286   echo "$as_me:15286: \$? = $ac_status" >&5
15287   (exit $ac_status); }; }; then
15288   cf_cv_have_errno=yes
15289 else
15290   echo "$as_me: failed program was:" >&5
15291 cat conftest.$ac_ext >&5
15292 cf_cv_have_errno=no
15293 fi
15294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15295
15296 fi
15297 echo "$as_me:15297: result: $cf_cv_have_errno" >&5
15298 echo "${ECHO_T}$cf_cv_have_errno" >&6
15299
15300 if test "$cf_cv_have_errno" = yes ; then
15301
15302 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15303
15304     cat >>confdefs.h <<EOF
15305 #define $cf_result 1
15306 EOF
15307
15308 fi
15309
15310 echo "$as_me:15310: checking if data-only library module links" >&5
15311 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15312 if test "${cf_cv_link_dataonly+set}" = set; then
15313   echo $ECHO_N "(cached) $ECHO_C" >&6
15314 else
15315
15316         rm -f conftest.a
15317         cat >conftest.$ac_ext <<EOF
15318 #line 15318 "configure"
15319 int     testdata[3] = { 123, 456, 789 };
15320 EOF
15321         if { (eval echo "$as_me:15321: \"$ac_compile\"") >&5
15322   (eval $ac_compile) 2>&5
15323   ac_status=$?
15324   echo "$as_me:15324: \$? = $ac_status" >&5
15325   (exit $ac_status); } ; then
15326                 mv conftest.o data.o && \
15327                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15328         fi
15329         rm -f conftest.$ac_ext data.o
15330         cat >conftest.$ac_ext <<EOF
15331 #line 15331 "configure"
15332 int     testfunc()
15333 {
15334 #if defined(NeXT)
15335         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15336 #else
15337         extern int testdata[3];
15338         return testdata[0] == 123
15339            &&  testdata[1] == 456
15340            &&  testdata[2] == 789;
15341 #endif
15342 }
15343 EOF
15344         if { (eval echo "$as_me:15344: \"$ac_compile\"") >&5
15345   (eval $ac_compile) 2>&5
15346   ac_status=$?
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); }; then
15349                 mv conftest.o func.o && \
15350                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15351         fi
15352         rm -f conftest.$ac_ext func.o
15353         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15354         cf_saveLIBS="$LIBS"
15355         LIBS="conftest.a $LIBS"
15356         if test "$cross_compiling" = yes; then
15357   cf_cv_link_dataonly=unknown
15358 else
15359   cat >conftest.$ac_ext <<_ACEOF
15360 #line 15360 "configure"
15361 #include "confdefs.h"
15362
15363         int main()
15364         {
15365                 extern int testfunc();
15366                 ${cf_cv_main_return:-return} (!testfunc());
15367         }
15368
15369 _ACEOF
15370 rm -f conftest$ac_exeext
15371 if { (eval echo "$as_me:15371: \"$ac_link\"") >&5
15372   (eval $ac_link) 2>&5
15373   ac_status=$?
15374   echo "$as_me:15374: \$? = $ac_status" >&5
15375   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15376   { (eval echo "$as_me:15376: \"$ac_try\"") >&5
15377   (eval $ac_try) 2>&5
15378   ac_status=$?
15379   echo "$as_me:15379: \$? = $ac_status" >&5
15380   (exit $ac_status); }; }; then
15381   cf_cv_link_dataonly=yes
15382 else
15383   echo "$as_me: program exited with status $ac_status" >&5
15384 echo "$as_me: failed program was:" >&5
15385 cat conftest.$ac_ext >&5
15386 cf_cv_link_dataonly=no
15387 fi
15388 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15389 fi
15390         LIBS="$cf_saveLIBS"
15391
15392 fi
15393
15394 echo "$as_me:15394: result: $cf_cv_link_dataonly" >&5
15395 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15396
15397 if test "$cf_cv_link_dataonly" = no ; then
15398         cat >>confdefs.h <<\EOF
15399 #define BROKEN_LINKER 1
15400 EOF
15401
15402         BROKEN_LINKER=1
15403 fi
15404
15405 ###     Checks for library functions.
15406
15407 for ac_func in \
15408 getcwd \
15409 getegid \
15410 geteuid \
15411 getttynam \
15412 issetugid \
15413 poll \
15414 putenv \
15415 remove \
15416 select \
15417 setbuf \
15418 setbuffer \
15419 setenv \
15420 setvbuf \
15421 sigaction \
15422 sigvec \
15423 strdup \
15424 strstr \
15425 tcgetpgrp \
15426 times \
15427 vsnprintf \
15428
15429 do
15430 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15431 echo "$as_me:15431: checking for $ac_func" >&5
15432 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15433 if eval "test \"\${$as_ac_var+set}\" = set"; then
15434   echo $ECHO_N "(cached) $ECHO_C" >&6
15435 else
15436   cat >conftest.$ac_ext <<_ACEOF
15437 #line 15437 "configure"
15438 #include "confdefs.h"
15439 /* System header to define __stub macros and hopefully few prototypes,
15440     which can conflict with char $ac_func (); below.  */
15441 #include <assert.h>
15442 /* Override any gcc2 internal prototype to avoid an error.  */
15443 #ifdef __cplusplus
15444 extern "C"
15445 #endif
15446 /* We use char because int might match the return type of a gcc2
15447    builtin and then its argument prototype would still apply.  */
15448 char $ac_func ();
15449 char (*f) ();
15450
15451 int
15452 main ()
15453 {
15454 /* The GNU C library defines this for functions which it implements
15455     to always fail with ENOSYS.  Some functions are actually named
15456     something starting with __ and the normal name is an alias.  */
15457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15458 choke me
15459 #else
15460 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15461 #endif
15462
15463   ;
15464   return 0;
15465 }
15466 _ACEOF
15467 rm -f conftest.$ac_objext conftest$ac_exeext
15468 if { (eval echo "$as_me:15468: \"$ac_link\"") >&5
15469   (eval $ac_link) 2>&5
15470   ac_status=$?
15471   echo "$as_me:15471: \$? = $ac_status" >&5
15472   (exit $ac_status); } &&
15473          { ac_try='test -s conftest$ac_exeext'
15474   { (eval echo "$as_me:15474: \"$ac_try\"") >&5
15475   (eval $ac_try) 2>&5
15476   ac_status=$?
15477   echo "$as_me:15477: \$? = $ac_status" >&5
15478   (exit $ac_status); }; }; then
15479   eval "$as_ac_var=yes"
15480 else
15481   echo "$as_me: failed program was:" >&5
15482 cat conftest.$ac_ext >&5
15483 eval "$as_ac_var=no"
15484 fi
15485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15486 fi
15487 echo "$as_me:15487: result: `eval echo '${'$as_ac_var'}'`" >&5
15488 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15489 if test `eval echo '${'$as_ac_var'}'` = yes; then
15490   cat >>confdefs.h <<EOF
15491 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15492 EOF
15493
15494 fi
15495 done
15496
15497 if test "$with_getcap" = "yes" ; then
15498
15499 echo "$as_me:15499: checking for terminal-capability database functions" >&5
15500 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15501 if test "${cf_cv_cgetent+set}" = set; then
15502   echo $ECHO_N "(cached) $ECHO_C" >&6
15503 else
15504
15505 cat >conftest.$ac_ext <<_ACEOF
15506 #line 15506 "configure"
15507 #include "confdefs.h"
15508
15509 #include <stdlib.h>
15510 int
15511 main ()
15512 {
15513
15514         char temp[128];
15515         char *buf = temp;
15516         char *db_array = temp;
15517         cgetent(&buf, &db_array, "vt100");
15518         cgetcap(buf, "tc", '=');
15519         cgetmatch(buf, "tc");
15520
15521   ;
15522   return 0;
15523 }
15524 _ACEOF
15525 rm -f conftest.$ac_objext conftest$ac_exeext
15526 if { (eval echo "$as_me:15526: \"$ac_link\"") >&5
15527   (eval $ac_link) 2>&5
15528   ac_status=$?
15529   echo "$as_me:15529: \$? = $ac_status" >&5
15530   (exit $ac_status); } &&
15531          { ac_try='test -s conftest$ac_exeext'
15532   { (eval echo "$as_me:15532: \"$ac_try\"") >&5
15533   (eval $ac_try) 2>&5
15534   ac_status=$?
15535   echo "$as_me:15535: \$? = $ac_status" >&5
15536   (exit $ac_status); }; }; then
15537   cf_cv_cgetent=yes
15538 else
15539   echo "$as_me: failed program was:" >&5
15540 cat conftest.$ac_ext >&5
15541 cf_cv_cgetent=no
15542 fi
15543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15544
15545 fi
15546 echo "$as_me:15546: result: $cf_cv_cgetent" >&5
15547 echo "${ECHO_T}$cf_cv_cgetent" >&6
15548
15549 if test "$cf_cv_cgetent" = yes
15550 then
15551         cat >>confdefs.h <<\EOF
15552 #define HAVE_BSD_CGETENT 1
15553 EOF
15554
15555 echo "$as_me:15555: checking if cgetent uses const parameter" >&5
15556 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15557 if test "${cf_cv_cgetent_const+set}" = set; then
15558   echo $ECHO_N "(cached) $ECHO_C" >&6
15559 else
15560
15561 cat >conftest.$ac_ext <<_ACEOF
15562 #line 15562 "configure"
15563 #include "confdefs.h"
15564
15565 #include <stdlib.h>
15566 int
15567 main ()
15568 {
15569
15570         char temp[128];
15571         char *buf = temp;
15572 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15573         const char *db_array = temp;
15574         cgetent(&buf, &db_array, "vt100");
15575 #endif
15576         cgetcap(buf, "tc", '=');
15577         cgetmatch(buf, "tc");
15578
15579   ;
15580   return 0;
15581 }
15582 _ACEOF
15583 rm -f conftest.$ac_objext conftest$ac_exeext
15584 if { (eval echo "$as_me:15584: \"$ac_link\"") >&5
15585   (eval $ac_link) 2>&5
15586   ac_status=$?
15587   echo "$as_me:15587: \$? = $ac_status" >&5
15588   (exit $ac_status); } &&
15589          { ac_try='test -s conftest$ac_exeext'
15590   { (eval echo "$as_me:15590: \"$ac_try\"") >&5
15591   (eval $ac_try) 2>&5
15592   ac_status=$?
15593   echo "$as_me:15593: \$? = $ac_status" >&5
15594   (exit $ac_status); }; }; then
15595   cf_cv_cgetent_const=yes
15596 else
15597   echo "$as_me: failed program was:" >&5
15598 cat conftest.$ac_ext >&5
15599 cf_cv_cgetent_const=no
15600 fi
15601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15602
15603 fi
15604 echo "$as_me:15604: result: $cf_cv_cgetent_const" >&5
15605 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15606         if test "$cf_cv_cgetent_const" = yes
15607         then
15608                 cat >>confdefs.h <<EOF
15609 #define CGETENT_CONST const
15610 EOF
15611
15612         fi
15613 fi
15614
15615 fi
15616
15617 echo "$as_me:15617: checking for isascii" >&5
15618 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15619 if test "${cf_cv_have_isascii+set}" = set; then
15620   echo $ECHO_N "(cached) $ECHO_C" >&6
15621 else
15622
15623         cat >conftest.$ac_ext <<_ACEOF
15624 #line 15624 "configure"
15625 #include "confdefs.h"
15626 #include <ctype.h>
15627 int
15628 main ()
15629 {
15630 int x = isascii(' ')
15631   ;
15632   return 0;
15633 }
15634 _ACEOF
15635 rm -f conftest.$ac_objext conftest$ac_exeext
15636 if { (eval echo "$as_me:15636: \"$ac_link\"") >&5
15637   (eval $ac_link) 2>&5
15638   ac_status=$?
15639   echo "$as_me:15639: \$? = $ac_status" >&5
15640   (exit $ac_status); } &&
15641          { ac_try='test -s conftest$ac_exeext'
15642   { (eval echo "$as_me:15642: \"$ac_try\"") >&5
15643   (eval $ac_try) 2>&5
15644   ac_status=$?
15645   echo "$as_me:15645: \$? = $ac_status" >&5
15646   (exit $ac_status); }; }; then
15647   cf_cv_have_isascii=yes
15648 else
15649   echo "$as_me: failed program was:" >&5
15650 cat conftest.$ac_ext >&5
15651 cf_cv_have_isascii=no
15652 fi
15653 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15654
15655 fi
15656 echo "$as_me:15656: result: $cf_cv_have_isascii" >&5
15657 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15658 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15659 #define HAVE_ISASCII 1
15660 EOF
15661
15662 if test "$ac_cv_func_sigaction" = yes; then
15663 echo "$as_me:15663: checking whether sigaction needs _POSIX_SOURCE" >&5
15664 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15665 cat >conftest.$ac_ext <<_ACEOF
15666 #line 15666 "configure"
15667 #include "confdefs.h"
15668
15669 #include <sys/types.h>
15670 #include <signal.h>
15671 int
15672 main ()
15673 {
15674 struct sigaction act
15675   ;
15676   return 0;
15677 }
15678 _ACEOF
15679 rm -f conftest.$ac_objext
15680 if { (eval echo "$as_me:15680: \"$ac_compile\"") >&5
15681   (eval $ac_compile) 2>&5
15682   ac_status=$?
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit $ac_status); } &&
15685          { ac_try='test -s conftest.$ac_objext'
15686   { (eval echo "$as_me:15686: \"$ac_try\"") >&5
15687   (eval $ac_try) 2>&5
15688   ac_status=$?
15689   echo "$as_me:15689: \$? = $ac_status" >&5
15690   (exit $ac_status); }; }; then
15691   sigact_bad=no
15692 else
15693   echo "$as_me: failed program was:" >&5
15694 cat conftest.$ac_ext >&5
15695
15696 cat >conftest.$ac_ext <<_ACEOF
15697 #line 15697 "configure"
15698 #include "confdefs.h"
15699
15700 #define _POSIX_SOURCE
15701 #include <sys/types.h>
15702 #include <signal.h>
15703 int
15704 main ()
15705 {
15706 struct sigaction act
15707   ;
15708   return 0;
15709 }
15710 _ACEOF
15711 rm -f conftest.$ac_objext
15712 if { (eval echo "$as_me:15712: \"$ac_compile\"") >&5
15713   (eval $ac_compile) 2>&5
15714   ac_status=$?
15715   echo "$as_me:15715: \$? = $ac_status" >&5
15716   (exit $ac_status); } &&
15717          { ac_try='test -s conftest.$ac_objext'
15718   { (eval echo "$as_me:15718: \"$ac_try\"") >&5
15719   (eval $ac_try) 2>&5
15720   ac_status=$?
15721   echo "$as_me:15721: \$? = $ac_status" >&5
15722   (exit $ac_status); }; }; then
15723   sigact_bad=yes
15724          cat >>confdefs.h <<\EOF
15725 #define _POSIX_SOURCE 1
15726 EOF
15727
15728 else
15729   echo "$as_me: failed program was:" >&5
15730 cat conftest.$ac_ext >&5
15731 sigact_bad=unknown
15732 fi
15733 rm -f conftest.$ac_objext conftest.$ac_ext
15734 fi
15735 rm -f conftest.$ac_objext conftest.$ac_ext
15736 echo "$as_me:15736: result: $sigact_bad" >&5
15737 echo "${ECHO_T}$sigact_bad" >&6
15738 fi
15739
15740 echo "$as_me:15740: checking if nanosleep really works" >&5
15741 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15742 if test "${cf_cv_func_nanosleep+set}" = set; then
15743   echo $ECHO_N "(cached) $ECHO_C" >&6
15744 else
15745
15746 if test "$cross_compiling" = yes; then
15747   cf_cv_func_nanosleep=unknown
15748 else
15749   cat >conftest.$ac_ext <<_ACEOF
15750 #line 15750 "configure"
15751 #include "confdefs.h"
15752
15753 #include <stdio.h>
15754 #include <errno.h>
15755 #include <time.h>
15756
15757 #ifdef HAVE_SYS_TIME_H
15758 #include <sys/time.h>
15759 #endif
15760
15761 int main() {
15762         struct timespec ts1, ts2;
15763         int code;
15764         ts1.tv_sec  = 0;
15765         ts1.tv_nsec = 750000000;
15766         ts2.tv_sec  = 0;
15767         ts2.tv_nsec = 0;
15768         errno = 0;
15769         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15770         ${cf_cv_main_return:-return}(code != 0);
15771 }
15772
15773 _ACEOF
15774 rm -f conftest$ac_exeext
15775 if { (eval echo "$as_me:15775: \"$ac_link\"") >&5
15776   (eval $ac_link) 2>&5
15777   ac_status=$?
15778   echo "$as_me:15778: \$? = $ac_status" >&5
15779   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15780   { (eval echo "$as_me:15780: \"$ac_try\"") >&5
15781   (eval $ac_try) 2>&5
15782   ac_status=$?
15783   echo "$as_me:15783: \$? = $ac_status" >&5
15784   (exit $ac_status); }; }; then
15785   cf_cv_func_nanosleep=yes
15786 else
15787   echo "$as_me: program exited with status $ac_status" >&5
15788 echo "$as_me: failed program was:" >&5
15789 cat conftest.$ac_ext >&5
15790 cf_cv_func_nanosleep=no
15791 fi
15792 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15793 fi
15794 fi
15795 echo "$as_me:15795: result: $cf_cv_func_nanosleep" >&5
15796 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15797
15798 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15799 #define HAVE_NANOSLEEP 1
15800 EOF
15801
15802 for ac_header in \
15803 termio.h \
15804 termios.h \
15805 unistd.h \
15806
15807 do
15808 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15809 echo "$as_me:15809: checking for $ac_header" >&5
15810 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15811 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15812   echo $ECHO_N "(cached) $ECHO_C" >&6
15813 else
15814   cat >conftest.$ac_ext <<_ACEOF
15815 #line 15815 "configure"
15816 #include "confdefs.h"
15817 #include <$ac_header>
15818 _ACEOF
15819 if { (eval echo "$as_me:15819: \"$ac_cpp conftest.$ac_ext\"") >&5
15820   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15821   ac_status=$?
15822   egrep -v '^ *\+' conftest.er1 >conftest.err
15823   rm -f conftest.er1
15824   cat conftest.err >&5
15825   echo "$as_me:15825: \$? = $ac_status" >&5
15826   (exit $ac_status); } >/dev/null; then
15827   if test -s conftest.err; then
15828     ac_cpp_err=$ac_c_preproc_warn_flag
15829   else
15830     ac_cpp_err=
15831   fi
15832 else
15833   ac_cpp_err=yes
15834 fi
15835 if test -z "$ac_cpp_err"; then
15836   eval "$as_ac_Header=yes"
15837 else
15838   echo "$as_me: failed program was:" >&5
15839   cat conftest.$ac_ext >&5
15840   eval "$as_ac_Header=no"
15841 fi
15842 rm -f conftest.err conftest.$ac_ext
15843 fi
15844 echo "$as_me:15844: result: `eval echo '${'$as_ac_Header'}'`" >&5
15845 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15846 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15847   cat >>confdefs.h <<EOF
15848 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15849 EOF
15850
15851 fi
15852 done
15853
15854 if test "$ISC" = yes ; then
15855
15856 for ac_header in sys/termio.h
15857 do
15858 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15859 echo "$as_me:15859: checking for $ac_header" >&5
15860 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15861 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15862   echo $ECHO_N "(cached) $ECHO_C" >&6
15863 else
15864   cat >conftest.$ac_ext <<_ACEOF
15865 #line 15865 "configure"
15866 #include "confdefs.h"
15867 #include <$ac_header>
15868 _ACEOF
15869 if { (eval echo "$as_me:15869: \"$ac_cpp conftest.$ac_ext\"") >&5
15870   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15871   ac_status=$?
15872   egrep -v '^ *\+' conftest.er1 >conftest.err
15873   rm -f conftest.er1
15874   cat conftest.err >&5
15875   echo "$as_me:15875: \$? = $ac_status" >&5
15876   (exit $ac_status); } >/dev/null; then
15877   if test -s conftest.err; then
15878     ac_cpp_err=$ac_c_preproc_warn_flag
15879   else
15880     ac_cpp_err=
15881   fi
15882 else
15883   ac_cpp_err=yes
15884 fi
15885 if test -z "$ac_cpp_err"; then
15886   eval "$as_ac_Header=yes"
15887 else
15888   echo "$as_me: failed program was:" >&5
15889   cat conftest.$ac_ext >&5
15890   eval "$as_ac_Header=no"
15891 fi
15892 rm -f conftest.err conftest.$ac_ext
15893 fi
15894 echo "$as_me:15894: result: `eval echo '${'$as_ac_Header'}'`" >&5
15895 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15896 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15897   cat >>confdefs.h <<EOF
15898 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15899 EOF
15900
15901 fi
15902 done
15903
15904 fi
15905 if test "$ac_cv_header_termios_h" = yes ; then
15906         case "$CFLAGS $CPPFLAGS" in
15907         *-D_POSIX_SOURCE*)
15908                 termios_bad=dunno ;;
15909         *)      termios_bad=maybe ;;
15910         esac
15911         if test "$termios_bad" = maybe ; then
15912         echo "$as_me:15912: checking whether termios.h needs _POSIX_SOURCE" >&5
15913 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15914         cat >conftest.$ac_ext <<_ACEOF
15915 #line 15915 "configure"
15916 #include "confdefs.h"
15917 #include <termios.h>
15918 int
15919 main ()
15920 {
15921 struct termios foo; int x = foo.c_iflag
15922   ;
15923   return 0;
15924 }
15925 _ACEOF
15926 rm -f conftest.$ac_objext
15927 if { (eval echo "$as_me:15927: \"$ac_compile\"") >&5
15928   (eval $ac_compile) 2>&5
15929   ac_status=$?
15930   echo "$as_me:15930: \$? = $ac_status" >&5
15931   (exit $ac_status); } &&
15932          { ac_try='test -s conftest.$ac_objext'
15933   { (eval echo "$as_me:15933: \"$ac_try\"") >&5
15934   (eval $ac_try) 2>&5
15935   ac_status=$?
15936   echo "$as_me:15936: \$? = $ac_status" >&5
15937   (exit $ac_status); }; }; then
15938   termios_bad=no
15939 else
15940   echo "$as_me: failed program was:" >&5
15941 cat conftest.$ac_ext >&5
15942
15943                 cat >conftest.$ac_ext <<_ACEOF
15944 #line 15944 "configure"
15945 #include "confdefs.h"
15946
15947 #define _POSIX_SOURCE
15948 #include <termios.h>
15949 int
15950 main ()
15951 {
15952 struct termios foo; int x = foo.c_iflag
15953   ;
15954   return 0;
15955 }
15956 _ACEOF
15957 rm -f conftest.$ac_objext
15958 if { (eval echo "$as_me:15958: \"$ac_compile\"") >&5
15959   (eval $ac_compile) 2>&5
15960   ac_status=$?
15961   echo "$as_me:15961: \$? = $ac_status" >&5
15962   (exit $ac_status); } &&
15963          { ac_try='test -s conftest.$ac_objext'
15964   { (eval echo "$as_me:15964: \"$ac_try\"") >&5
15965   (eval $ac_try) 2>&5
15966   ac_status=$?
15967   echo "$as_me:15967: \$? = $ac_status" >&5
15968   (exit $ac_status); }; }; then
15969   termios_bad=unknown
15970 else
15971   echo "$as_me: failed program was:" >&5
15972 cat conftest.$ac_ext >&5
15973 termios_bad=yes cat >>confdefs.h <<\EOF
15974 #define _POSIX_SOURCE 1
15975 EOF
15976
15977 fi
15978 rm -f conftest.$ac_objext conftest.$ac_ext
15979
15980 fi
15981 rm -f conftest.$ac_objext conftest.$ac_ext
15982         echo "$as_me:15982: result: $termios_bad" >&5
15983 echo "${ECHO_T}$termios_bad" >&6
15984         fi
15985 fi
15986
15987 echo "$as_me:15987: checking for tcgetattr" >&5
15988 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15989 if test "${cf_cv_have_tcgetattr+set}" = set; then
15990   echo $ECHO_N "(cached) $ECHO_C" >&6
15991 else
15992
15993 cat >conftest.$ac_ext <<_ACEOF
15994 #line 15994 "configure"
15995 #include "confdefs.h"
15996
15997 #include <sys/types.h>
15998 #ifdef HAVE_UNISTD_H
15999 #include <unistd.h>
16000 #endif
16001 #ifdef HAVE_TERMIOS_H
16002 #include <termios.h>
16003 #define TTY struct termios
16004 #else
16005 #ifdef HAVE_TERMIO_H
16006 #include <termio.h>
16007 #define TTY struct termio
16008 #endif
16009 #endif
16010
16011 int
16012 main ()
16013 {
16014
16015 TTY foo;
16016 tcgetattr(1, &foo);
16017   ;
16018   return 0;
16019 }
16020 _ACEOF
16021 rm -f conftest.$ac_objext conftest$ac_exeext
16022 if { (eval echo "$as_me:16022: \"$ac_link\"") >&5
16023   (eval $ac_link) 2>&5
16024   ac_status=$?
16025   echo "$as_me:16025: \$? = $ac_status" >&5
16026   (exit $ac_status); } &&
16027          { ac_try='test -s conftest$ac_exeext'
16028   { (eval echo "$as_me:16028: \"$ac_try\"") >&5
16029   (eval $ac_try) 2>&5
16030   ac_status=$?
16031   echo "$as_me:16031: \$? = $ac_status" >&5
16032   (exit $ac_status); }; }; then
16033   cf_cv_have_tcgetattr=yes
16034 else
16035   echo "$as_me: failed program was:" >&5
16036 cat conftest.$ac_ext >&5
16037 cf_cv_have_tcgetattr=no
16038 fi
16039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16040 fi
16041 echo "$as_me:16041: result: $cf_cv_have_tcgetattr" >&5
16042 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16043 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
16044 #define HAVE_TCGETATTR 1
16045 EOF
16046
16047 echo "$as_me:16047: checking for vsscanf function or workaround" >&5
16048 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16049 if test "${cf_cv_func_vsscanf+set}" = set; then
16050   echo $ECHO_N "(cached) $ECHO_C" >&6
16051 else
16052
16053 cat >conftest.$ac_ext <<_ACEOF
16054 #line 16054 "configure"
16055 #include "confdefs.h"
16056
16057 #include <stdarg.h>
16058 #include <stdio.h>
16059 int
16060 main ()
16061 {
16062
16063         va_list ap;
16064         vsscanf("from", "%d", ap)
16065   ;
16066   return 0;
16067 }
16068 _ACEOF
16069 rm -f conftest.$ac_objext conftest$ac_exeext
16070 if { (eval echo "$as_me:16070: \"$ac_link\"") >&5
16071   (eval $ac_link) 2>&5
16072   ac_status=$?
16073   echo "$as_me:16073: \$? = $ac_status" >&5
16074   (exit $ac_status); } &&
16075          { ac_try='test -s conftest$ac_exeext'
16076   { (eval echo "$as_me:16076: \"$ac_try\"") >&5
16077   (eval $ac_try) 2>&5
16078   ac_status=$?
16079   echo "$as_me:16079: \$? = $ac_status" >&5
16080   (exit $ac_status); }; }; then
16081   cf_cv_func_vsscanf=vsscanf
16082 else
16083   echo "$as_me: failed program was:" >&5
16084 cat conftest.$ac_ext >&5
16085
16086 cat >conftest.$ac_ext <<_ACEOF
16087 #line 16087 "configure"
16088 #include "confdefs.h"
16089
16090 #include <stdarg.h>
16091 #include <stdio.h>
16092 int
16093 main ()
16094 {
16095
16096     FILE strbuf;
16097     char *str = "from";
16098
16099     strbuf._flag = _IOREAD;
16100     strbuf._ptr = strbuf._base = (unsigned char *) str;
16101     strbuf._cnt = strlen(str);
16102     strbuf._file = _NFILE;
16103     return (vfscanf(&strbuf, "%d", ap))
16104   ;
16105   return 0;
16106 }
16107 _ACEOF
16108 rm -f conftest.$ac_objext conftest$ac_exeext
16109 if { (eval echo "$as_me:16109: \"$ac_link\"") >&5
16110   (eval $ac_link) 2>&5
16111   ac_status=$?
16112   echo "$as_me:16112: \$? = $ac_status" >&5
16113   (exit $ac_status); } &&
16114          { ac_try='test -s conftest$ac_exeext'
16115   { (eval echo "$as_me:16115: \"$ac_try\"") >&5
16116   (eval $ac_try) 2>&5
16117   ac_status=$?
16118   echo "$as_me:16118: \$? = $ac_status" >&5
16119   (exit $ac_status); }; }; then
16120   cf_cv_func_vsscanf=vfscanf
16121 else
16122   echo "$as_me: failed program was:" >&5
16123 cat conftest.$ac_ext >&5
16124
16125 cat >conftest.$ac_ext <<_ACEOF
16126 #line 16126 "configure"
16127 #include "confdefs.h"
16128
16129 #include <stdarg.h>
16130 #include <stdio.h>
16131 int
16132 main ()
16133 {
16134
16135     FILE strbuf;
16136     char *str = "from";
16137
16138     strbuf._flag = _IOREAD;
16139     strbuf._ptr = strbuf._base = (unsigned char *) str;
16140     strbuf._cnt = strlen(str);
16141     strbuf._file = _NFILE;
16142     return (_doscan(&strbuf, "%d", ap))
16143   ;
16144   return 0;
16145 }
16146 _ACEOF
16147 rm -f conftest.$ac_objext conftest$ac_exeext
16148 if { (eval echo "$as_me:16148: \"$ac_link\"") >&5
16149   (eval $ac_link) 2>&5
16150   ac_status=$?
16151   echo "$as_me:16151: \$? = $ac_status" >&5
16152   (exit $ac_status); } &&
16153          { ac_try='test -s conftest$ac_exeext'
16154   { (eval echo "$as_me:16154: \"$ac_try\"") >&5
16155   (eval $ac_try) 2>&5
16156   ac_status=$?
16157   echo "$as_me:16157: \$? = $ac_status" >&5
16158   (exit $ac_status); }; }; then
16159   cf_cv_func_vsscanf=_doscan
16160 else
16161   echo "$as_me: failed program was:" >&5
16162 cat conftest.$ac_ext >&5
16163
16164 cf_cv_func_vsscanf=no
16165 fi
16166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16167 fi
16168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16169 fi
16170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16171 fi
16172 echo "$as_me:16172: result: $cf_cv_func_vsscanf" >&5
16173 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16174
16175 case $cf_cv_func_vsscanf in #(vi
16176 vsscanf) cat >>confdefs.h <<\EOF
16177 #define HAVE_VSSCANF 1
16178 EOF
16179 ;; #(vi
16180 vfscanf) cat >>confdefs.h <<\EOF
16181 #define HAVE_VFSCANF 1
16182 EOF
16183 ;; #(vi
16184 _doscan) cat >>confdefs.h <<\EOF
16185 #define HAVE__DOSCAN 1
16186 EOF
16187 ;;
16188 esac
16189
16190 echo "$as_me:16190: checking for working mkstemp" >&5
16191 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16192 if test "${cf_cv_func_mkstemp+set}" = set; then
16193   echo $ECHO_N "(cached) $ECHO_C" >&6
16194 else
16195
16196 rm -rf conftest*
16197 if test "$cross_compiling" = yes; then
16198   cf_cv_func_mkstemp=maybe
16199 else
16200   cat >conftest.$ac_ext <<_ACEOF
16201 #line 16201 "configure"
16202 #include "confdefs.h"
16203
16204 #include <sys/types.h>
16205 #include <stdlib.h>
16206 #include <stdio.h>
16207 #include <string.h>
16208 #include <sys/stat.h>
16209 int main()
16210 {
16211         char *tmpl = "conftestXXXXXX";
16212         char name[2][80];
16213         int n;
16214         int result = 0;
16215         int fd;
16216         struct stat sb;
16217
16218         umask(077);
16219         for (n = 0; n < 2; ++n) {
16220                 strcpy(name[n], tmpl);
16221                 if ((fd = mkstemp(name[n])) >= 0) {
16222                         if (!strcmp(name[n], tmpl)
16223                          || stat(name[n], &sb) != 0
16224                          || (sb.st_mode & S_IFMT) != S_IFREG
16225                          || (sb.st_mode & 077) != 0) {
16226                                 result = 1;
16227                         }
16228                         close(fd);
16229                 }
16230         }
16231         if (result == 0
16232          && !strcmp(name[0], name[1]))
16233                 result = 1;
16234         ${cf_cv_main_return:-return}(result);
16235 }
16236
16237 _ACEOF
16238 rm -f conftest$ac_exeext
16239 if { (eval echo "$as_me:16239: \"$ac_link\"") >&5
16240   (eval $ac_link) 2>&5
16241   ac_status=$?
16242   echo "$as_me:16242: \$? = $ac_status" >&5
16243   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16244   { (eval echo "$as_me:16244: \"$ac_try\"") >&5
16245   (eval $ac_try) 2>&5
16246   ac_status=$?
16247   echo "$as_me:16247: \$? = $ac_status" >&5
16248   (exit $ac_status); }; }; then
16249   cf_cv_func_mkstemp=yes
16250
16251 else
16252   echo "$as_me: program exited with status $ac_status" >&5
16253 echo "$as_me: failed program was:" >&5
16254 cat conftest.$ac_ext >&5
16255 cf_cv_func_mkstemp=no
16256
16257 fi
16258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16259 fi
16260
16261 fi
16262 echo "$as_me:16262: result: $cf_cv_func_mkstemp" >&5
16263 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16264 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16265         echo "$as_me:16265: checking for mkstemp" >&5
16266 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16267 if test "${ac_cv_func_mkstemp+set}" = set; then
16268   echo $ECHO_N "(cached) $ECHO_C" >&6
16269 else
16270   cat >conftest.$ac_ext <<_ACEOF
16271 #line 16271 "configure"
16272 #include "confdefs.h"
16273 /* System header to define __stub macros and hopefully few prototypes,
16274     which can conflict with char mkstemp (); below.  */
16275 #include <assert.h>
16276 /* Override any gcc2 internal prototype to avoid an error.  */
16277 #ifdef __cplusplus
16278 extern "C"
16279 #endif
16280 /* We use char because int might match the return type of a gcc2
16281    builtin and then its argument prototype would still apply.  */
16282 char mkstemp ();
16283 char (*f) ();
16284
16285 int
16286 main ()
16287 {
16288 /* The GNU C library defines this for functions which it implements
16289     to always fail with ENOSYS.  Some functions are actually named
16290     something starting with __ and the normal name is an alias.  */
16291 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16292 choke me
16293 #else
16294 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16295 #endif
16296
16297   ;
16298   return 0;
16299 }
16300 _ACEOF
16301 rm -f conftest.$ac_objext conftest$ac_exeext
16302 if { (eval echo "$as_me:16302: \"$ac_link\"") >&5
16303   (eval $ac_link) 2>&5
16304   ac_status=$?
16305   echo "$as_me:16305: \$? = $ac_status" >&5
16306   (exit $ac_status); } &&
16307          { ac_try='test -s conftest$ac_exeext'
16308   { (eval echo "$as_me:16308: \"$ac_try\"") >&5
16309   (eval $ac_try) 2>&5
16310   ac_status=$?
16311   echo "$as_me:16311: \$? = $ac_status" >&5
16312   (exit $ac_status); }; }; then
16313   ac_cv_func_mkstemp=yes
16314 else
16315   echo "$as_me: failed program was:" >&5
16316 cat conftest.$ac_ext >&5
16317 ac_cv_func_mkstemp=no
16318 fi
16319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16320 fi
16321 echo "$as_me:16321: result: $ac_cv_func_mkstemp" >&5
16322 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16323
16324 fi
16325 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16326         cat >>confdefs.h <<\EOF
16327 #define HAVE_MKSTEMP 1
16328 EOF
16329
16330 fi
16331
16332 # setup for prototype of fallback for vsscanf()
16333
16334 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16335         HAVE_VSSCANF=1
16336 else
16337         HAVE_VSSCANF=0
16338 fi
16339
16340 if test "$cross_compiling" = yes ; then
16341         { echo "$as_me:16341: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16342 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16343 else
16344         echo "$as_me:16344: checking whether setvbuf arguments are reversed" >&5
16345 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16346 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16347   echo $ECHO_N "(cached) $ECHO_C" >&6
16348 else
16349   if test "$cross_compiling" = yes; then
16350   { { echo "$as_me:16350: error: cannot run test program while cross compiling" >&5
16351 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16352    { (exit 1); exit 1; }; }
16353 else
16354   cat >conftest.$ac_ext <<_ACEOF
16355 #line 16355 "configure"
16356 #include "confdefs.h"
16357 #include <stdio.h>
16358 /* If setvbuf has the reversed format, exit 0. */
16359 int
16360 main ()
16361 {
16362   /* This call has the arguments reversed.
16363      A reversed system may check and see that the address of main
16364      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16365   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16366     $ac_main_return(1);
16367   putc('\r', stdout);
16368   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16369 }
16370 _ACEOF
16371 rm -f conftest$ac_exeext
16372 if { (eval echo "$as_me:16372: \"$ac_link\"") >&5
16373   (eval $ac_link) 2>&5
16374   ac_status=$?
16375   echo "$as_me:16375: \$? = $ac_status" >&5
16376   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16377   { (eval echo "$as_me:16377: \"$ac_try\"") >&5
16378   (eval $ac_try) 2>&5
16379   ac_status=$?
16380   echo "$as_me:16380: \$? = $ac_status" >&5
16381   (exit $ac_status); }; }; then
16382   ac_cv_func_setvbuf_reversed=yes
16383 else
16384   echo "$as_me: program exited with status $ac_status" >&5
16385 echo "$as_me: failed program was:" >&5
16386 cat conftest.$ac_ext >&5
16387 ac_cv_func_setvbuf_reversed=no
16388 fi
16389 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16390 fi
16391 rm -f core core.* *.core
16392 fi
16393 echo "$as_me:16393: result: $ac_cv_func_setvbuf_reversed" >&5
16394 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16395 if test $ac_cv_func_setvbuf_reversed = yes; then
16396
16397 cat >>confdefs.h <<\EOF
16398 #define SETVBUF_REVERSED 1
16399 EOF
16400
16401 fi
16402
16403 fi
16404 echo "$as_me:16404: checking return type of signal handlers" >&5
16405 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16406 if test "${ac_cv_type_signal+set}" = set; then
16407   echo $ECHO_N "(cached) $ECHO_C" >&6
16408 else
16409   cat >conftest.$ac_ext <<_ACEOF
16410 #line 16410 "configure"
16411 #include "confdefs.h"
16412 #include <sys/types.h>
16413 #include <signal.h>
16414 #ifdef signal
16415 # undef signal
16416 #endif
16417 #ifdef __cplusplus
16418 extern "C" void (*signal (int, void (*)(int)))(int);
16419 #else
16420 void (*signal ()) ();
16421 #endif
16422
16423 int
16424 main ()
16425 {
16426 int i;
16427   ;
16428   return 0;
16429 }
16430 _ACEOF
16431 rm -f conftest.$ac_objext
16432 if { (eval echo "$as_me:16432: \"$ac_compile\"") >&5
16433   (eval $ac_compile) 2>&5
16434   ac_status=$?
16435   echo "$as_me:16435: \$? = $ac_status" >&5
16436   (exit $ac_status); } &&
16437          { ac_try='test -s conftest.$ac_objext'
16438   { (eval echo "$as_me:16438: \"$ac_try\"") >&5
16439   (eval $ac_try) 2>&5
16440   ac_status=$?
16441   echo "$as_me:16441: \$? = $ac_status" >&5
16442   (exit $ac_status); }; }; then
16443   ac_cv_type_signal=void
16444 else
16445   echo "$as_me: failed program was:" >&5
16446 cat conftest.$ac_ext >&5
16447 ac_cv_type_signal=int
16448 fi
16449 rm -f conftest.$ac_objext conftest.$ac_ext
16450 fi
16451 echo "$as_me:16451: result: $ac_cv_type_signal" >&5
16452 echo "${ECHO_T}$ac_cv_type_signal" >&6
16453
16454 cat >>confdefs.h <<EOF
16455 #define RETSIGTYPE $ac_cv_type_signal
16456 EOF
16457
16458 echo "$as_me:16458: checking for intptr_t" >&5
16459 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16460 if test "${ac_cv_type_intptr_t+set}" = set; then
16461   echo $ECHO_N "(cached) $ECHO_C" >&6
16462 else
16463   cat >conftest.$ac_ext <<_ACEOF
16464 #line 16464 "configure"
16465 #include "confdefs.h"
16466 $ac_includes_default
16467 int
16468 main ()
16469 {
16470 if ((intptr_t *) 0)
16471   return 0;
16472 if (sizeof (intptr_t))
16473   return 0;
16474   ;
16475   return 0;
16476 }
16477 _ACEOF
16478 rm -f conftest.$ac_objext
16479 if { (eval echo "$as_me:16479: \"$ac_compile\"") >&5
16480   (eval $ac_compile) 2>&5
16481   ac_status=$?
16482   echo "$as_me:16482: \$? = $ac_status" >&5
16483   (exit $ac_status); } &&
16484          { ac_try='test -s conftest.$ac_objext'
16485   { (eval echo "$as_me:16485: \"$ac_try\"") >&5
16486   (eval $ac_try) 2>&5
16487   ac_status=$?
16488   echo "$as_me:16488: \$? = $ac_status" >&5
16489   (exit $ac_status); }; }; then
16490   ac_cv_type_intptr_t=yes
16491 else
16492   echo "$as_me: failed program was:" >&5
16493 cat conftest.$ac_ext >&5
16494 ac_cv_type_intptr_t=no
16495 fi
16496 rm -f conftest.$ac_objext conftest.$ac_ext
16497 fi
16498 echo "$as_me:16498: result: $ac_cv_type_intptr_t" >&5
16499 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16500 if test $ac_cv_type_intptr_t = yes; then
16501   :
16502 else
16503
16504 cat >>confdefs.h <<EOF
16505 #define intptr_t long
16506 EOF
16507
16508 fi
16509
16510 echo "$as_me:16510: checking for type sigaction_t" >&5
16511 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16512 if test "${cf_cv_type_sigaction+set}" = set; then
16513   echo $ECHO_N "(cached) $ECHO_C" >&6
16514 else
16515
16516         cat >conftest.$ac_ext <<_ACEOF
16517 #line 16517 "configure"
16518 #include "confdefs.h"
16519
16520 #include <signal.h>
16521 int
16522 main ()
16523 {
16524 sigaction_t x
16525   ;
16526   return 0;
16527 }
16528 _ACEOF
16529 rm -f conftest.$ac_objext
16530 if { (eval echo "$as_me:16530: \"$ac_compile\"") >&5
16531   (eval $ac_compile) 2>&5
16532   ac_status=$?
16533   echo "$as_me:16533: \$? = $ac_status" >&5
16534   (exit $ac_status); } &&
16535          { ac_try='test -s conftest.$ac_objext'
16536   { (eval echo "$as_me:16536: \"$ac_try\"") >&5
16537   (eval $ac_try) 2>&5
16538   ac_status=$?
16539   echo "$as_me:16539: \$? = $ac_status" >&5
16540   (exit $ac_status); }; }; then
16541   cf_cv_type_sigaction=yes
16542 else
16543   echo "$as_me: failed program was:" >&5
16544 cat conftest.$ac_ext >&5
16545 cf_cv_type_sigaction=no
16546 fi
16547 rm -f conftest.$ac_objext conftest.$ac_ext
16548 fi
16549
16550 echo "$as_me:16550: result: $cf_cv_type_sigaction" >&5
16551 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16552 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16553 #define HAVE_TYPE_SIGACTION 1
16554 EOF
16555
16556 echo "$as_me:16556: checking declaration of size-change" >&5
16557 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16558 if test "${cf_cv_sizechange+set}" = set; then
16559   echo $ECHO_N "(cached) $ECHO_C" >&6
16560 else
16561
16562     cf_cv_sizechange=unknown
16563     cf_save_CPPFLAGS="$CPPFLAGS"
16564
16565 for cf_opts in "" "NEED_PTEM_H"
16566 do
16567
16568     CPPFLAGS="$cf_save_CPPFLAGS"
16569     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16570     cat >conftest.$ac_ext <<_ACEOF
16571 #line 16571 "configure"
16572 #include "confdefs.h"
16573 #include <sys/types.h>
16574 #ifdef HAVE_TERMIOS_H
16575 #include <termios.h>
16576 #else
16577 #ifdef HAVE_TERMIO_H
16578 #include <termio.h>
16579 #endif
16580 #endif
16581 #ifdef NEED_PTEM_H
16582 /* This is a workaround for SCO:  they neglected to define struct winsize in
16583  * termios.h -- it's only in termio.h and ptem.h
16584  */
16585 #include        <sys/stream.h>
16586 #include        <sys/ptem.h>
16587 #endif
16588 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16589 #include <sys/ioctl.h>
16590 #endif
16591
16592 int
16593 main ()
16594 {
16595
16596 #ifdef TIOCGSIZE
16597         struct ttysize win;     /* FIXME: what system is this? */
16598         int y = win.ts_lines;
16599         int x = win.ts_cols;
16600 #else
16601 #ifdef TIOCGWINSZ
16602         struct winsize win;
16603         int y = win.ws_row;
16604         int x = win.ws_col;
16605 #else
16606         no TIOCGSIZE or TIOCGWINSZ
16607 #endif /* TIOCGWINSZ */
16608 #endif /* TIOCGSIZE */
16609
16610   ;
16611   return 0;
16612 }
16613 _ACEOF
16614 rm -f conftest.$ac_objext
16615 if { (eval echo "$as_me:16615: \"$ac_compile\"") >&5
16616   (eval $ac_compile) 2>&5
16617   ac_status=$?
16618   echo "$as_me:16618: \$? = $ac_status" >&5
16619   (exit $ac_status); } &&
16620          { ac_try='test -s conftest.$ac_objext'
16621   { (eval echo "$as_me:16621: \"$ac_try\"") >&5
16622   (eval $ac_try) 2>&5
16623   ac_status=$?
16624   echo "$as_me:16624: \$? = $ac_status" >&5
16625   (exit $ac_status); }; }; then
16626   cf_cv_sizechange=yes
16627 else
16628   echo "$as_me: failed program was:" >&5
16629 cat conftest.$ac_ext >&5
16630 cf_cv_sizechange=no
16631 fi
16632 rm -f conftest.$ac_objext conftest.$ac_ext
16633
16634         CPPFLAGS="$cf_save_CPPFLAGS"
16635         if test "$cf_cv_sizechange" = yes ; then
16636                 echo "size-change succeeded ($cf_opts)" >&5
16637                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16638                 break
16639         fi
16640 done
16641
16642 fi
16643 echo "$as_me:16643: result: $cf_cv_sizechange" >&5
16644 echo "${ECHO_T}$cf_cv_sizechange" >&6
16645 if test "$cf_cv_sizechange" != no ; then
16646         cat >>confdefs.h <<\EOF
16647 #define HAVE_SIZECHANGE 1
16648 EOF
16649
16650         case $cf_cv_sizechange in #(vi
16651         NEED*)
16652                 cat >>confdefs.h <<EOF
16653 #define $cf_cv_sizechange  1
16654 EOF
16655
16656                 ;;
16657         esac
16658 fi
16659
16660 echo "$as_me:16660: checking for memmove" >&5
16661 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16662 if test "${ac_cv_func_memmove+set}" = set; then
16663   echo $ECHO_N "(cached) $ECHO_C" >&6
16664 else
16665   cat >conftest.$ac_ext <<_ACEOF
16666 #line 16666 "configure"
16667 #include "confdefs.h"
16668 /* System header to define __stub macros and hopefully few prototypes,
16669     which can conflict with char memmove (); below.  */
16670 #include <assert.h>
16671 /* Override any gcc2 internal prototype to avoid an error.  */
16672 #ifdef __cplusplus
16673 extern "C"
16674 #endif
16675 /* We use char because int might match the return type of a gcc2
16676    builtin and then its argument prototype would still apply.  */
16677 char memmove ();
16678 char (*f) ();
16679
16680 int
16681 main ()
16682 {
16683 /* The GNU C library defines this for functions which it implements
16684     to always fail with ENOSYS.  Some functions are actually named
16685     something starting with __ and the normal name is an alias.  */
16686 #if defined (__stub_memmove) || defined (__stub___memmove)
16687 choke me
16688 #else
16689 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16690 #endif
16691
16692   ;
16693   return 0;
16694 }
16695 _ACEOF
16696 rm -f conftest.$ac_objext conftest$ac_exeext
16697 if { (eval echo "$as_me:16697: \"$ac_link\"") >&5
16698   (eval $ac_link) 2>&5
16699   ac_status=$?
16700   echo "$as_me:16700: \$? = $ac_status" >&5
16701   (exit $ac_status); } &&
16702          { ac_try='test -s conftest$ac_exeext'
16703   { (eval echo "$as_me:16703: \"$ac_try\"") >&5
16704   (eval $ac_try) 2>&5
16705   ac_status=$?
16706   echo "$as_me:16706: \$? = $ac_status" >&5
16707   (exit $ac_status); }; }; then
16708   ac_cv_func_memmove=yes
16709 else
16710   echo "$as_me: failed program was:" >&5
16711 cat conftest.$ac_ext >&5
16712 ac_cv_func_memmove=no
16713 fi
16714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16715 fi
16716 echo "$as_me:16716: result: $ac_cv_func_memmove" >&5
16717 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16718 if test $ac_cv_func_memmove = yes; then
16719   :
16720 else
16721
16722 echo "$as_me:16722: checking for bcopy" >&5
16723 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16724 if test "${ac_cv_func_bcopy+set}" = set; then
16725   echo $ECHO_N "(cached) $ECHO_C" >&6
16726 else
16727   cat >conftest.$ac_ext <<_ACEOF
16728 #line 16728 "configure"
16729 #include "confdefs.h"
16730 /* System header to define __stub macros and hopefully few prototypes,
16731     which can conflict with char bcopy (); below.  */
16732 #include <assert.h>
16733 /* Override any gcc2 internal prototype to avoid an error.  */
16734 #ifdef __cplusplus
16735 extern "C"
16736 #endif
16737 /* We use char because int might match the return type of a gcc2
16738    builtin and then its argument prototype would still apply.  */
16739 char bcopy ();
16740 char (*f) ();
16741
16742 int
16743 main ()
16744 {
16745 /* The GNU C library defines this for functions which it implements
16746     to always fail with ENOSYS.  Some functions are actually named
16747     something starting with __ and the normal name is an alias.  */
16748 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16749 choke me
16750 #else
16751 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16752 #endif
16753
16754   ;
16755   return 0;
16756 }
16757 _ACEOF
16758 rm -f conftest.$ac_objext conftest$ac_exeext
16759 if { (eval echo "$as_me:16759: \"$ac_link\"") >&5
16760   (eval $ac_link) 2>&5
16761   ac_status=$?
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); } &&
16764          { ac_try='test -s conftest$ac_exeext'
16765   { (eval echo "$as_me:16765: \"$ac_try\"") >&5
16766   (eval $ac_try) 2>&5
16767   ac_status=$?
16768   echo "$as_me:16768: \$? = $ac_status" >&5
16769   (exit $ac_status); }; }; then
16770   ac_cv_func_bcopy=yes
16771 else
16772   echo "$as_me: failed program was:" >&5
16773 cat conftest.$ac_ext >&5
16774 ac_cv_func_bcopy=no
16775 fi
16776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16777 fi
16778 echo "$as_me:16778: result: $ac_cv_func_bcopy" >&5
16779 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16780 if test $ac_cv_func_bcopy = yes; then
16781
16782         echo "$as_me:16782: checking if bcopy does overlapping moves" >&5
16783 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16784 if test "${cf_cv_good_bcopy+set}" = set; then
16785   echo $ECHO_N "(cached) $ECHO_C" >&6
16786 else
16787
16788                 if test "$cross_compiling" = yes; then
16789   cf_cv_good_bcopy=unknown
16790 else
16791   cat >conftest.$ac_ext <<_ACEOF
16792 #line 16792 "configure"
16793 #include "confdefs.h"
16794
16795 int main() {
16796         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16797         char temp[40];
16798         bcopy(data, temp, sizeof(data));
16799         bcopy(temp+10, temp, 15);
16800         bcopy(temp+5, temp+15, 10);
16801         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16802 }
16803
16804 _ACEOF
16805 rm -f conftest$ac_exeext
16806 if { (eval echo "$as_me:16806: \"$ac_link\"") >&5
16807   (eval $ac_link) 2>&5
16808   ac_status=$?
16809   echo "$as_me:16809: \$? = $ac_status" >&5
16810   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16811   { (eval echo "$as_me:16811: \"$ac_try\"") >&5
16812   (eval $ac_try) 2>&5
16813   ac_status=$?
16814   echo "$as_me:16814: \$? = $ac_status" >&5
16815   (exit $ac_status); }; }; then
16816   cf_cv_good_bcopy=yes
16817 else
16818   echo "$as_me: program exited with status $ac_status" >&5
16819 echo "$as_me: failed program was:" >&5
16820 cat conftest.$ac_ext >&5
16821 cf_cv_good_bcopy=no
16822 fi
16823 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16824 fi
16825
16826 fi
16827 echo "$as_me:16827: result: $cf_cv_good_bcopy" >&5
16828 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16829
16830 else
16831   cf_cv_good_bcopy=no
16832 fi
16833
16834         if test "$cf_cv_good_bcopy" = yes ; then
16835                 cat >>confdefs.h <<\EOF
16836 #define USE_OK_BCOPY 1
16837 EOF
16838
16839         else
16840                 cat >>confdefs.h <<\EOF
16841 #define USE_MY_MEMMOVE 1
16842 EOF
16843
16844         fi
16845
16846 fi
16847
16848 echo "$as_me:16848: checking if poll really works" >&5
16849 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16850 if test "${cf_cv_working_poll+set}" = set; then
16851   echo $ECHO_N "(cached) $ECHO_C" >&6
16852 else
16853
16854 if test "$cross_compiling" = yes; then
16855   cf_cv_working_poll=unknown
16856 else
16857   cat >conftest.$ac_ext <<_ACEOF
16858 #line 16858 "configure"
16859 #include "confdefs.h"
16860
16861 #include <stdlib.h>
16862 #include <stdio.h>
16863 #include <unistd.h>
16864 #include <fcntl.h>
16865 #ifdef HAVE_POLL_H
16866 #include <poll.h>
16867 #else
16868 #include <sys/poll.h>
16869 #endif
16870 int main() {
16871         struct pollfd myfds;
16872         int ret;
16873
16874         /* check for Darwin bug with respect to "devices" */
16875         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16876         if (myfds.fd < 0)
16877                 myfds.fd = 0;
16878         myfds.events = POLLIN;
16879         myfds.revents = 0;
16880
16881         ret = poll(&myfds, 1, 100);
16882
16883         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16884                 ret = -1;
16885         } else {
16886                 int fd = 0;
16887                 if (!isatty(fd)) {
16888                         fd = open("/dev/tty", 2);       /* O_RDWR */
16889                 }
16890
16891                 if (fd >= 0) {
16892                         /* also check with standard input */
16893                         myfds.fd = fd;
16894                         myfds.events = POLLIN;
16895                         myfds.revents = 0;
16896                         ret = poll(&myfds, 1, 100);
16897                 } else {
16898                         ret = -1;
16899                 }
16900         }
16901         ${cf_cv_main_return:-return}(ret < 0);
16902 }
16903 _ACEOF
16904 rm -f conftest$ac_exeext
16905 if { (eval echo "$as_me:16905: \"$ac_link\"") >&5
16906   (eval $ac_link) 2>&5
16907   ac_status=$?
16908   echo "$as_me:16908: \$? = $ac_status" >&5
16909   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16910   { (eval echo "$as_me:16910: \"$ac_try\"") >&5
16911   (eval $ac_try) 2>&5
16912   ac_status=$?
16913   echo "$as_me:16913: \$? = $ac_status" >&5
16914   (exit $ac_status); }; }; then
16915   cf_cv_working_poll=yes
16916 else
16917   echo "$as_me: program exited with status $ac_status" >&5
16918 echo "$as_me: failed program was:" >&5
16919 cat conftest.$ac_ext >&5
16920 cf_cv_working_poll=no
16921 fi
16922 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16923 fi
16924 fi
16925 echo "$as_me:16925: result: $cf_cv_working_poll" >&5
16926 echo "${ECHO_T}$cf_cv_working_poll" >&6
16927 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16928 #define HAVE_WORKING_POLL 1
16929 EOF
16930
16931 echo "$as_me:16931: checking for va_copy" >&5
16932 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16933 if test "${cf_cv_have_va_copy+set}" = set; then
16934   echo $ECHO_N "(cached) $ECHO_C" >&6
16935 else
16936
16937 cat >conftest.$ac_ext <<_ACEOF
16938 #line 16938 "configure"
16939 #include "confdefs.h"
16940
16941 #include <stdarg.h>
16942
16943 int
16944 main ()
16945 {
16946
16947         static va_list dst;
16948         static va_list src;
16949         va_copy(dst, src)
16950   ;
16951   return 0;
16952 }
16953 _ACEOF
16954 rm -f conftest.$ac_objext conftest$ac_exeext
16955 if { (eval echo "$as_me:16955: \"$ac_link\"") >&5
16956   (eval $ac_link) 2>&5
16957   ac_status=$?
16958   echo "$as_me:16958: \$? = $ac_status" >&5
16959   (exit $ac_status); } &&
16960          { ac_try='test -s conftest$ac_exeext'
16961   { (eval echo "$as_me:16961: \"$ac_try\"") >&5
16962   (eval $ac_try) 2>&5
16963   ac_status=$?
16964   echo "$as_me:16964: \$? = $ac_status" >&5
16965   (exit $ac_status); }; }; then
16966   cf_cv_have_va_copy=yes
16967 else
16968   echo "$as_me: failed program was:" >&5
16969 cat conftest.$ac_ext >&5
16970 cf_cv_have_va_copy=no
16971 fi
16972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16973 fi
16974 echo "$as_me:16974: result: $cf_cv_have_va_copy" >&5
16975 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16976
16977 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16978 #define HAVE_VA_COPY 1
16979 EOF
16980
16981 echo "$as_me:16981: checking for __va_copy" >&5
16982 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16983 if test "${cf_cv_have___va_copy+set}" = set; then
16984   echo $ECHO_N "(cached) $ECHO_C" >&6
16985 else
16986
16987 cat >conftest.$ac_ext <<_ACEOF
16988 #line 16988 "configure"
16989 #include "confdefs.h"
16990
16991 #include <stdarg.h>
16992
16993 int
16994 main ()
16995 {
16996
16997         static va_list dst;
16998         static va_list src;
16999         __va_copy(dst, src)
17000   ;
17001   return 0;
17002 }
17003 _ACEOF
17004 rm -f conftest.$ac_objext conftest$ac_exeext
17005 if { (eval echo "$as_me:17005: \"$ac_link\"") >&5
17006   (eval $ac_link) 2>&5
17007   ac_status=$?
17008   echo "$as_me:17008: \$? = $ac_status" >&5
17009   (exit $ac_status); } &&
17010          { ac_try='test -s conftest$ac_exeext'
17011   { (eval echo "$as_me:17011: \"$ac_try\"") >&5
17012   (eval $ac_try) 2>&5
17013   ac_status=$?
17014   echo "$as_me:17014: \$? = $ac_status" >&5
17015   (exit $ac_status); }; }; then
17016   cf_cv_have___va_copy=yes
17017 else
17018   echo "$as_me: failed program was:" >&5
17019 cat conftest.$ac_ext >&5
17020 cf_cv_have___va_copy=no
17021 fi
17022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17023 fi
17024 echo "$as_me:17024: result: $cf_cv_have___va_copy" >&5
17025 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17026
17027 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
17028 #define HAVE___VA_COPY 1
17029 EOF
17030
17031 echo "$as_me:17031: checking for pid_t" >&5
17032 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17033 if test "${ac_cv_type_pid_t+set}" = set; then
17034   echo $ECHO_N "(cached) $ECHO_C" >&6
17035 else
17036   cat >conftest.$ac_ext <<_ACEOF
17037 #line 17037 "configure"
17038 #include "confdefs.h"
17039 $ac_includes_default
17040 int
17041 main ()
17042 {
17043 if ((pid_t *) 0)
17044   return 0;
17045 if (sizeof (pid_t))
17046   return 0;
17047   ;
17048   return 0;
17049 }
17050 _ACEOF
17051 rm -f conftest.$ac_objext
17052 if { (eval echo "$as_me:17052: \"$ac_compile\"") >&5
17053   (eval $ac_compile) 2>&5
17054   ac_status=$?
17055   echo "$as_me:17055: \$? = $ac_status" >&5
17056   (exit $ac_status); } &&
17057          { ac_try='test -s conftest.$ac_objext'
17058   { (eval echo "$as_me:17058: \"$ac_try\"") >&5
17059   (eval $ac_try) 2>&5
17060   ac_status=$?
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit $ac_status); }; }; then
17063   ac_cv_type_pid_t=yes
17064 else
17065   echo "$as_me: failed program was:" >&5
17066 cat conftest.$ac_ext >&5
17067 ac_cv_type_pid_t=no
17068 fi
17069 rm -f conftest.$ac_objext conftest.$ac_ext
17070 fi
17071 echo "$as_me:17071: result: $ac_cv_type_pid_t" >&5
17072 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17073 if test $ac_cv_type_pid_t = yes; then
17074   :
17075 else
17076
17077 cat >>confdefs.h <<EOF
17078 #define pid_t int
17079 EOF
17080
17081 fi
17082
17083 for ac_header in unistd.h vfork.h
17084 do
17085 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17086 echo "$as_me:17086: checking for $ac_header" >&5
17087 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17088 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17089   echo $ECHO_N "(cached) $ECHO_C" >&6
17090 else
17091   cat >conftest.$ac_ext <<_ACEOF
17092 #line 17092 "configure"
17093 #include "confdefs.h"
17094 #include <$ac_header>
17095 _ACEOF
17096 if { (eval echo "$as_me:17096: \"$ac_cpp conftest.$ac_ext\"") >&5
17097   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17098   ac_status=$?
17099   egrep -v '^ *\+' conftest.er1 >conftest.err
17100   rm -f conftest.er1
17101   cat conftest.err >&5
17102   echo "$as_me:17102: \$? = $ac_status" >&5
17103   (exit $ac_status); } >/dev/null; then
17104   if test -s conftest.err; then
17105     ac_cpp_err=$ac_c_preproc_warn_flag
17106   else
17107     ac_cpp_err=
17108   fi
17109 else
17110   ac_cpp_err=yes
17111 fi
17112 if test -z "$ac_cpp_err"; then
17113   eval "$as_ac_Header=yes"
17114 else
17115   echo "$as_me: failed program was:" >&5
17116   cat conftest.$ac_ext >&5
17117   eval "$as_ac_Header=no"
17118 fi
17119 rm -f conftest.err conftest.$ac_ext
17120 fi
17121 echo "$as_me:17121: result: `eval echo '${'$as_ac_Header'}'`" >&5
17122 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17123 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17124   cat >>confdefs.h <<EOF
17125 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17126 EOF
17127
17128 fi
17129 done
17130
17131 for ac_func in fork vfork
17132 do
17133 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17134 echo "$as_me:17134: checking for $ac_func" >&5
17135 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17136 if eval "test \"\${$as_ac_var+set}\" = set"; then
17137   echo $ECHO_N "(cached) $ECHO_C" >&6
17138 else
17139   cat >conftest.$ac_ext <<_ACEOF
17140 #line 17140 "configure"
17141 #include "confdefs.h"
17142 /* System header to define __stub macros and hopefully few prototypes,
17143     which can conflict with char $ac_func (); below.  */
17144 #include <assert.h>
17145 /* Override any gcc2 internal prototype to avoid an error.  */
17146 #ifdef __cplusplus
17147 extern "C"
17148 #endif
17149 /* We use char because int might match the return type of a gcc2
17150    builtin and then its argument prototype would still apply.  */
17151 char $ac_func ();
17152 char (*f) ();
17153
17154 int
17155 main ()
17156 {
17157 /* The GNU C library defines this for functions which it implements
17158     to always fail with ENOSYS.  Some functions are actually named
17159     something starting with __ and the normal name is an alias.  */
17160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17161 choke me
17162 #else
17163 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17164 #endif
17165
17166   ;
17167   return 0;
17168 }
17169 _ACEOF
17170 rm -f conftest.$ac_objext conftest$ac_exeext
17171 if { (eval echo "$as_me:17171: \"$ac_link\"") >&5
17172   (eval $ac_link) 2>&5
17173   ac_status=$?
17174   echo "$as_me:17174: \$? = $ac_status" >&5
17175   (exit $ac_status); } &&
17176          { ac_try='test -s conftest$ac_exeext'
17177   { (eval echo "$as_me:17177: \"$ac_try\"") >&5
17178   (eval $ac_try) 2>&5
17179   ac_status=$?
17180   echo "$as_me:17180: \$? = $ac_status" >&5
17181   (exit $ac_status); }; }; then
17182   eval "$as_ac_var=yes"
17183 else
17184   echo "$as_me: failed program was:" >&5
17185 cat conftest.$ac_ext >&5
17186 eval "$as_ac_var=no"
17187 fi
17188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17189 fi
17190 echo "$as_me:17190: result: `eval echo '${'$as_ac_var'}'`" >&5
17191 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17192 if test `eval echo '${'$as_ac_var'}'` = yes; then
17193   cat >>confdefs.h <<EOF
17194 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17195 EOF
17196
17197 fi
17198 done
17199
17200 ac_cv_func_fork_works=$ac_cv_func_fork
17201 if test "x$ac_cv_func_fork" = xyes; then
17202   echo "$as_me:17202: checking for working fork" >&5
17203 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17204 if test "${ac_cv_func_fork_works+set}" = set; then
17205   echo $ECHO_N "(cached) $ECHO_C" >&6
17206 else
17207   if test "$cross_compiling" = yes; then
17208   ac_cv_func_fork_works=cross
17209 else
17210   cat >conftest.$ac_ext <<_ACEOF
17211 /* By Rüdiger Kuhlmann. */
17212       #include <sys/types.h>
17213       #if HAVE_UNISTD_H
17214       # include <unistd.h>
17215       #endif
17216       /* Some systems only have a dummy stub for fork() */
17217       int main ()
17218       {
17219         if (fork() < 0)
17220           $ac_main_return (1);
17221         $ac_main_return (0);
17222       }
17223 _ACEOF
17224 rm -f conftest$ac_exeext
17225 if { (eval echo "$as_me:17225: \"$ac_link\"") >&5
17226   (eval $ac_link) 2>&5
17227   ac_status=$?
17228   echo "$as_me:17228: \$? = $ac_status" >&5
17229   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17230   { (eval echo "$as_me:17230: \"$ac_try\"") >&5
17231   (eval $ac_try) 2>&5
17232   ac_status=$?
17233   echo "$as_me:17233: \$? = $ac_status" >&5
17234   (exit $ac_status); }; }; then
17235   ac_cv_func_fork_works=yes
17236 else
17237   echo "$as_me: program exited with status $ac_status" >&5
17238 echo "$as_me: failed program was:" >&5
17239 cat conftest.$ac_ext >&5
17240 ac_cv_func_fork_works=no
17241 fi
17242 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17243 fi
17244 fi
17245 echo "$as_me:17245: result: $ac_cv_func_fork_works" >&5
17246 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17247
17248 fi
17249 if test "x$ac_cv_func_fork_works" = xcross; then
17250   case $host in
17251     *-*-amigaos* | *-*-msdosdjgpp*)
17252       # Override, as these systems have only a dummy fork() stub
17253       ac_cv_func_fork_works=no
17254       ;;
17255     *)
17256       ac_cv_func_fork_works=yes
17257       ;;
17258   esac
17259   { echo "$as_me:17259: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17260 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17261 fi
17262 ac_cv_func_vfork_works=$ac_cv_func_vfork
17263 if test "x$ac_cv_func_vfork" = xyes; then
17264   echo "$as_me:17264: checking for working vfork" >&5
17265 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17266 if test "${ac_cv_func_vfork_works+set}" = set; then
17267   echo $ECHO_N "(cached) $ECHO_C" >&6
17268 else
17269   if test "$cross_compiling" = yes; then
17270   ac_cv_func_vfork_works=cross
17271 else
17272   cat >conftest.$ac_ext <<_ACEOF
17273 #line 17273 "configure"
17274 #include "confdefs.h"
17275 /* Thanks to Paul Eggert for this test.  */
17276 #include <stdio.h>
17277 #include <sys/types.h>
17278 #include <sys/stat.h>
17279 #if HAVE_UNISTD_H
17280 # include <unistd.h>
17281 #endif
17282 #if HAVE_VFORK_H
17283 # include <vfork.h>
17284 #endif
17285 /* On some sparc systems, changes by the child to local and incoming
17286    argument registers are propagated back to the parent.  The compiler
17287    is told about this with #include <vfork.h>, but some compilers
17288    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17289    static variable whose address is put into a register that is
17290    clobbered by the vfork.  */
17291 static
17292 #ifdef __cplusplus
17293 sparc_address_test (int arg)
17294 # else
17295 sparc_address_test (arg) int arg;
17296 #endif
17297 {
17298   static pid_t child;
17299   if (!child) {
17300     child = vfork ();
17301     if (child < 0) {
17302       perror ("vfork");
17303       _exit(2);
17304     }
17305     if (!child) {
17306       arg = getpid();
17307       write(-1, "", 0);
17308       _exit (arg);
17309     }
17310   }
17311 }
17312
17313 int
17314 main ()
17315 {
17316   pid_t parent = getpid ();
17317   pid_t child;
17318
17319   sparc_address_test ();
17320
17321   child = vfork ();
17322
17323   if (child == 0) {
17324     /* Here is another test for sparc vfork register problems.  This
17325        test uses lots of local variables, at least as many local
17326        variables as main has allocated so far including compiler
17327        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17328        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17329        reuse the register of parent for one of the local variables,
17330        since it will think that parent can't possibly be used any more
17331        in this routine.  Assigning to the local variable will thus
17332        munge parent in the parent process.  */
17333     pid_t
17334       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17335       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17336     /* Convince the compiler that p..p7 are live; otherwise, it might
17337        use the same hardware register for all 8 local variables.  */
17338     if (p != p1 || p != p2 || p != p3 || p != p4
17339         || p != p5 || p != p6 || p != p7)
17340       _exit(1);
17341
17342     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17343        from child file descriptors.  If the child closes a descriptor
17344        before it execs or exits, this munges the parent's descriptor
17345        as well.  Test for this by closing stdout in the child.  */
17346     _exit(close(fileno(stdout)) != 0);
17347   } else {
17348     int status;
17349     struct stat st;
17350
17351     while (wait(&status) != child)
17352       ;
17353     $ac_main_return(
17354          /* Was there some problem with vforking?  */
17355          child < 0
17356
17357          /* Did the child fail?  (This shouldn't happen.)  */
17358          || status
17359
17360          /* Did the vfork/compiler bug occur?  */
17361          || parent != getpid()
17362
17363          /* Did the file descriptor bug occur?  */
17364          || fstat(fileno(stdout), &st) != 0
17365          );
17366   }
17367 }
17368 _ACEOF
17369 rm -f conftest$ac_exeext
17370 if { (eval echo "$as_me:17370: \"$ac_link\"") >&5
17371   (eval $ac_link) 2>&5
17372   ac_status=$?
17373   echo "$as_me:17373: \$? = $ac_status" >&5
17374   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17375   { (eval echo "$as_me:17375: \"$ac_try\"") >&5
17376   (eval $ac_try) 2>&5
17377   ac_status=$?
17378   echo "$as_me:17378: \$? = $ac_status" >&5
17379   (exit $ac_status); }; }; then
17380   ac_cv_func_vfork_works=yes
17381 else
17382   echo "$as_me: program exited with status $ac_status" >&5
17383 echo "$as_me: failed program was:" >&5
17384 cat conftest.$ac_ext >&5
17385 ac_cv_func_vfork_works=no
17386 fi
17387 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17388 fi
17389 fi
17390 echo "$as_me:17390: result: $ac_cv_func_vfork_works" >&5
17391 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17392
17393 fi;
17394 if test "x$ac_cv_func_fork_works" = xcross; then
17395   ac_cv_func_vfork_works=ac_cv_func_vfork
17396   { echo "$as_me:17396: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17397 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17398 fi
17399
17400 if test "x$ac_cv_func_vfork_works" = xyes; then
17401
17402 cat >>confdefs.h <<\EOF
17403 #define HAVE_WORKING_VFORK 1
17404 EOF
17405
17406 else
17407
17408 cat >>confdefs.h <<\EOF
17409 #define vfork fork
17410 EOF
17411
17412 fi
17413 if test "x$ac_cv_func_fork_works" = xyes; then
17414
17415 cat >>confdefs.h <<\EOF
17416 #define HAVE_WORKING_FORK 1
17417 EOF
17418
17419 fi
17420
17421 # special check for test/ditto.c
17422
17423 echo "$as_me:17423: checking for openpty in -lutil" >&5
17424 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17425 if test "${ac_cv_lib_util_openpty+set}" = set; then
17426   echo $ECHO_N "(cached) $ECHO_C" >&6
17427 else
17428   ac_check_lib_save_LIBS=$LIBS
17429 LIBS="-lutil  $LIBS"
17430 cat >conftest.$ac_ext <<_ACEOF
17431 #line 17431 "configure"
17432 #include "confdefs.h"
17433
17434 /* Override any gcc2 internal prototype to avoid an error.  */
17435 #ifdef __cplusplus
17436 extern "C"
17437 #endif
17438 /* We use char because int might match the return type of a gcc2
17439    builtin and then its argument prototype would still apply.  */
17440 char openpty ();
17441 int
17442 main ()
17443 {
17444 openpty ();
17445   ;
17446   return 0;
17447 }
17448 _ACEOF
17449 rm -f conftest.$ac_objext conftest$ac_exeext
17450 if { (eval echo "$as_me:17450: \"$ac_link\"") >&5
17451   (eval $ac_link) 2>&5
17452   ac_status=$?
17453   echo "$as_me:17453: \$? = $ac_status" >&5
17454   (exit $ac_status); } &&
17455          { ac_try='test -s conftest$ac_exeext'
17456   { (eval echo "$as_me:17456: \"$ac_try\"") >&5
17457   (eval $ac_try) 2>&5
17458   ac_status=$?
17459   echo "$as_me:17459: \$? = $ac_status" >&5
17460   (exit $ac_status); }; }; then
17461   ac_cv_lib_util_openpty=yes
17462 else
17463   echo "$as_me: failed program was:" >&5
17464 cat conftest.$ac_ext >&5
17465 ac_cv_lib_util_openpty=no
17466 fi
17467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17468 LIBS=$ac_check_lib_save_LIBS
17469 fi
17470 echo "$as_me:17470: result: $ac_cv_lib_util_openpty" >&5
17471 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17472 if test $ac_cv_lib_util_openpty = yes; then
17473   cf_cv_lib_util=yes
17474 else
17475   cf_cv_lib_util=no
17476 fi
17477
17478 echo "$as_me:17478: checking for openpty header" >&5
17479 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17480 if test "${cf_cv_func_openpty+set}" = set; then
17481   echo $ECHO_N "(cached) $ECHO_C" >&6
17482 else
17483
17484     cf_save_LIBS="$LIBS"
17485     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17486     for cf_header in pty.h libutil.h util.h
17487     do
17488     cat >conftest.$ac_ext <<_ACEOF
17489 #line 17489 "configure"
17490 #include "confdefs.h"
17491
17492 #include <$cf_header>
17493
17494 int
17495 main ()
17496 {
17497
17498     int x = openpty((int *)0, (int *)0, (char *)0,
17499                    (struct termios *)0, (struct winsize *)0);
17500
17501   ;
17502   return 0;
17503 }
17504 _ACEOF
17505 rm -f conftest.$ac_objext conftest$ac_exeext
17506 if { (eval echo "$as_me:17506: \"$ac_link\"") >&5
17507   (eval $ac_link) 2>&5
17508   ac_status=$?
17509   echo "$as_me:17509: \$? = $ac_status" >&5
17510   (exit $ac_status); } &&
17511          { ac_try='test -s conftest$ac_exeext'
17512   { (eval echo "$as_me:17512: \"$ac_try\"") >&5
17513   (eval $ac_try) 2>&5
17514   ac_status=$?
17515   echo "$as_me:17515: \$? = $ac_status" >&5
17516   (exit $ac_status); }; }; then
17517
17518         cf_cv_func_openpty=$cf_header
17519         break
17520
17521 else
17522   echo "$as_me: failed program was:" >&5
17523 cat conftest.$ac_ext >&5
17524
17525         cf_cv_func_openpty=no
17526
17527 fi
17528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17529     done
17530     LIBS="$cf_save_LIBS"
17531
17532 fi
17533 echo "$as_me:17533: result: $cf_cv_func_openpty" >&5
17534 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17535
17536 if test "$cf_cv_func_openpty" != no ; then
17537     cat >>confdefs.h <<EOF
17538 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17539 EOF
17540
17541     cat >>confdefs.h <<\EOF
17542 #define USE_XTERM_PTY 1
17543 EOF
17544
17545     if test "$cf_cv_lib_util" = yes ; then
17546         TEST_LIBS="-lutil $TEST_LIBS"
17547     fi
17548 fi
17549
17550 if test "$with_hashed_db" != no ; then
17551         cat >>confdefs.h <<\EOF
17552 #define USE_HASHED_DB 1
17553 EOF
17554
17555 case $with_hashed_db in #(vi
17556 yes|*able*) #(vi
17557     ;;
17558 *)
17559     if test -d "$with_hashed_db" ; then
17560
17561 if test -n "$with_hashed_db/include" ; then
17562   for cf_add_incdir in $with_hashed_db/include
17563   do
17564         while test $cf_add_incdir != /usr/include
17565         do
17566           if test -d $cf_add_incdir
17567           then
17568                 cf_have_incdir=no
17569                 if test -n "$CFLAGS$CPPFLAGS" ; then
17570                   # a loop is needed to ensure we can add subdirs of existing dirs
17571                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17572                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17573                           cf_have_incdir=yes; break
17574                         fi
17575                   done
17576                 fi
17577
17578                 if test "$cf_have_incdir" = no ; then
17579                   if test "$cf_add_incdir" = /usr/local/include ; then
17580                         if test "$GCC" = yes
17581                         then
17582                           cf_save_CPPFLAGS=$CPPFLAGS
17583                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17584                           cat >conftest.$ac_ext <<_ACEOF
17585 #line 17585 "configure"
17586 #include "confdefs.h"
17587 #include <stdio.h>
17588 int
17589 main ()
17590 {
17591 printf("Hello")
17592   ;
17593   return 0;
17594 }
17595 _ACEOF
17596 rm -f conftest.$ac_objext
17597 if { (eval echo "$as_me:17597: \"$ac_compile\"") >&5
17598   (eval $ac_compile) 2>&5
17599   ac_status=$?
17600   echo "$as_me:17600: \$? = $ac_status" >&5
17601   (exit $ac_status); } &&
17602          { ac_try='test -s conftest.$ac_objext'
17603   { (eval echo "$as_me:17603: \"$ac_try\"") >&5
17604   (eval $ac_try) 2>&5
17605   ac_status=$?
17606   echo "$as_me:17606: \$? = $ac_status" >&5
17607   (exit $ac_status); }; }; then
17608   :
17609 else
17610   echo "$as_me: failed program was:" >&5
17611 cat conftest.$ac_ext >&5
17612 cf_have_incdir=yes
17613 fi
17614 rm -f conftest.$ac_objext conftest.$ac_ext
17615                           CPPFLAGS=$cf_save_CPPFLAGS
17616                         fi
17617                   fi
17618                 fi
17619
17620                 if test "$cf_have_incdir" = no ; then
17621                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17622
17623 echo "${as_me:-configure}:17623: testing adding $cf_add_incdir to include-path ..." 1>&5
17624
17625                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17626
17627                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17628                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17629                   cf_add_incdir="$cf_top_incdir"
17630                 else
17631                   break
17632                 fi
17633           fi
17634         done
17635   done
17636 fi
17637
17638 if test -n "$with_hashed_db/lib" ; then
17639   for cf_add_libdir in $with_hashed_db/lib
17640   do
17641     if test $cf_add_libdir = /usr/lib ; then
17642       :
17643     elif test -d $cf_add_libdir
17644     then
17645       cf_have_libdir=no
17646       if test -n "$LDFLAGS$LIBS" ; then
17647         # a loop is needed to ensure we can add subdirs of existing dirs
17648         for cf_test_libdir in $LDFLAGS $LIBS ; do
17649           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17650             cf_have_libdir=yes; break
17651           fi
17652         done
17653       fi
17654       if test "$cf_have_libdir" = no ; then
17655         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17656
17657 echo "${as_me:-configure}:17657: testing adding $cf_add_libdir to library-path ..." 1>&5
17658
17659         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17660       fi
17661     fi
17662   done
17663 fi
17664
17665     fi
17666 esac
17667
17668 echo "$as_me:17668: checking for db.h" >&5
17669 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17670 if test "${ac_cv_header_db_h+set}" = set; then
17671   echo $ECHO_N "(cached) $ECHO_C" >&6
17672 else
17673   cat >conftest.$ac_ext <<_ACEOF
17674 #line 17674 "configure"
17675 #include "confdefs.h"
17676 #include <db.h>
17677 _ACEOF
17678 if { (eval echo "$as_me:17678: \"$ac_cpp conftest.$ac_ext\"") >&5
17679   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17680   ac_status=$?
17681   egrep -v '^ *\+' conftest.er1 >conftest.err
17682   rm -f conftest.er1
17683   cat conftest.err >&5
17684   echo "$as_me:17684: \$? = $ac_status" >&5
17685   (exit $ac_status); } >/dev/null; then
17686   if test -s conftest.err; then
17687     ac_cpp_err=$ac_c_preproc_warn_flag
17688   else
17689     ac_cpp_err=
17690   fi
17691 else
17692   ac_cpp_err=yes
17693 fi
17694 if test -z "$ac_cpp_err"; then
17695   ac_cv_header_db_h=yes
17696 else
17697   echo "$as_me: failed program was:" >&5
17698   cat conftest.$ac_ext >&5
17699   ac_cv_header_db_h=no
17700 fi
17701 rm -f conftest.err conftest.$ac_ext
17702 fi
17703 echo "$as_me:17703: result: $ac_cv_header_db_h" >&5
17704 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17705 if test $ac_cv_header_db_h = yes; then
17706
17707 echo "$as_me:17707: checking for version of db" >&5
17708 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17709 if test "${cf_cv_hashed_db_version+set}" = set; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712
17713 cf_cv_hashed_db_version=unknown
17714
17715 for cf_db_version in 1 2 3 4 5
17716 do
17717
17718 echo "${as_me:-configure}:17718: testing checking for db version $cf_db_version ..." 1>&5
17719
17720         cat >conftest.$ac_ext <<_ACEOF
17721 #line 17721 "configure"
17722 #include "confdefs.h"
17723
17724 $ac_includes_default
17725 #include <db.h>
17726
17727 #ifdef DB_VERSION_MAJOR
17728         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17729 #if $cf_db_version == DB_VERSION_MAJOR
17730         /* ok */
17731 #else
17732         make an error
17733 #endif
17734 #else
17735 #if $cf_db_version == 1
17736         /* ok: assuming this is DB 1.8.5 */
17737 #else
17738         make an error
17739 #endif
17740 #endif
17741
17742 int
17743 main ()
17744 {
17745 DBT *foo = 0
17746   ;
17747   return 0;
17748 }
17749 _ACEOF
17750 rm -f conftest.$ac_objext
17751 if { (eval echo "$as_me:17751: \"$ac_compile\"") >&5
17752   (eval $ac_compile) 2>&5
17753   ac_status=$?
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit $ac_status); } &&
17756          { ac_try='test -s conftest.$ac_objext'
17757   { (eval echo "$as_me:17757: \"$ac_try\"") >&5
17758   (eval $ac_try) 2>&5
17759   ac_status=$?
17760   echo "$as_me:17760: \$? = $ac_status" >&5
17761   (exit $ac_status); }; }; then
17762
17763         cf_cv_hashed_db_version=$cf_db_version
17764         break
17765
17766 else
17767   echo "$as_me: failed program was:" >&5
17768 cat conftest.$ac_ext >&5
17769 fi
17770 rm -f conftest.$ac_objext conftest.$ac_ext
17771 done
17772
17773 fi
17774 echo "$as_me:17774: result: $cf_cv_hashed_db_version" >&5
17775 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17776
17777 if test "$cf_cv_hashed_db_version" = unknown ; then
17778         { { echo "$as_me:17778: error: Cannot determine version of db" >&5
17779 echo "$as_me: error: Cannot determine version of db" >&2;}
17780    { (exit 1); exit 1; }; }
17781 else
17782
17783 echo "$as_me:17783: checking for db libraries" >&5
17784 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17785 if test "${cf_cv_hashed_db_libs+set}" = set; then
17786   echo $ECHO_N "(cached) $ECHO_C" >&6
17787 else
17788
17789 cf_cv_hashed_db_libs=unknown
17790 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17791 do
17792         cf_save_libs="$LIBS"
17793         if test -n "$cf_db_libs"; then
17794                 LIBS="-l$cf_db_libs $LIBS"
17795         fi
17796
17797 echo "${as_me:-configure}:17797: testing checking for library "$cf_db_libs" ..." 1>&5
17798
17799         cat >conftest.$ac_ext <<_ACEOF
17800 #line 17800 "configure"
17801 #include "confdefs.h"
17802
17803 $ac_includes_default
17804 #include <db.h>
17805
17806 int
17807 main ()
17808 {
17809
17810         char *path = "/tmp/foo";
17811 #ifdef DB_VERSION_MAJOR
17812 #if DB_VERSION_MAJOR >= 4
17813         DB *result = 0;
17814         db_create(&result, NULL, 0);
17815         result->open(result,
17816                 NULL,
17817                 path,
17818                 path,
17819                 DB_HASH,
17820                 DB_CREATE,
17821                 0644);
17822 #elif DB_VERSION_MAJOR >= 3
17823         DB *result = 0;
17824         db_create(&result, NULL, 0);
17825         result->open(result,
17826                 path,
17827                 path,
17828                 DB_HASH,
17829                 DB_CREATE,
17830                 0644);
17831 #elif DB_VERSION_MAJOR >= 2
17832         DB *result = 0;
17833         db_open(path,
17834                 DB_HASH,
17835                 DB_CREATE,
17836                 0644,
17837                 (DB_ENV *) 0,
17838                 (DB_INFO *) 0,
17839                 &result);
17840 #endif /* DB_VERSION_MAJOR */
17841 #else
17842         DB *result = dbopen(path,
17843                      2,
17844                      0644,
17845                      DB_HASH,
17846                      0);
17847 #endif
17848         ${cf_cv_main_return:-return}(result != 0)
17849
17850   ;
17851   return 0;
17852 }
17853 _ACEOF
17854 rm -f conftest.$ac_objext conftest$ac_exeext
17855 if { (eval echo "$as_me:17855: \"$ac_link\"") >&5
17856   (eval $ac_link) 2>&5
17857   ac_status=$?
17858   echo "$as_me:17858: \$? = $ac_status" >&5
17859   (exit $ac_status); } &&
17860          { ac_try='test -s conftest$ac_exeext'
17861   { (eval echo "$as_me:17861: \"$ac_try\"") >&5
17862   (eval $ac_try) 2>&5
17863   ac_status=$?
17864   echo "$as_me:17864: \$? = $ac_status" >&5
17865   (exit $ac_status); }; }; then
17866
17867         if test -n "$cf_db_libs" ; then
17868                 cf_cv_hashed_db_libs=$cf_db_libs
17869         else
17870                 cf_cv_hashed_db_libs=default
17871         fi
17872         LIBS="$cf_save_libs"
17873         break
17874
17875 else
17876   echo "$as_me: failed program was:" >&5
17877 cat conftest.$ac_ext >&5
17878 fi
17879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17880         LIBS="$cf_save_libs"
17881 done
17882
17883 fi
17884 echo "$as_me:17884: result: $cf_cv_hashed_db_libs" >&5
17885 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17886
17887         if test "$cf_cv_hashed_db_libs" = unknown ; then
17888                 { { echo "$as_me:17888: error: Cannot determine library for db" >&5
17889 echo "$as_me: error: Cannot determine library for db" >&2;}
17890    { (exit 1); exit 1; }; }
17891         elif test "$cf_cv_hashed_db_libs" != default ; then
17892                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17893         fi
17894 fi
17895
17896 else
17897
17898         { { echo "$as_me:17898: error: Cannot find db.h" >&5
17899 echo "$as_me: error: Cannot find db.h" >&2;}
17900    { (exit 1); exit 1; }; }
17901
17902 fi
17903
17904 fi
17905
17906 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17907         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17908         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17909 fi
17910
17911 # Just in case, check if the C compiler has a bool type.
17912
17913 echo "$as_me:17913: checking if we should include stdbool.h" >&5
17914 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17915
17916 if test "${cf_cv_header_stdbool_h+set}" = set; then
17917   echo $ECHO_N "(cached) $ECHO_C" >&6
17918 else
17919
17920         cat >conftest.$ac_ext <<_ACEOF
17921 #line 17921 "configure"
17922 #include "confdefs.h"
17923
17924 int
17925 main ()
17926 {
17927 bool foo = false
17928   ;
17929   return 0;
17930 }
17931 _ACEOF
17932 rm -f conftest.$ac_objext
17933 if { (eval echo "$as_me:17933: \"$ac_compile\"") >&5
17934   (eval $ac_compile) 2>&5
17935   ac_status=$?
17936   echo "$as_me:17936: \$? = $ac_status" >&5
17937   (exit $ac_status); } &&
17938          { ac_try='test -s conftest.$ac_objext'
17939   { (eval echo "$as_me:17939: \"$ac_try\"") >&5
17940   (eval $ac_try) 2>&5
17941   ac_status=$?
17942   echo "$as_me:17942: \$? = $ac_status" >&5
17943   (exit $ac_status); }; }; then
17944   cf_cv_header_stdbool_h=0
17945 else
17946   echo "$as_me: failed program was:" >&5
17947 cat conftest.$ac_ext >&5
17948 cat >conftest.$ac_ext <<_ACEOF
17949 #line 17949 "configure"
17950 #include "confdefs.h"
17951
17952 #ifndef __BEOS__
17953 #include <stdbool.h>
17954 #endif
17955
17956 int
17957 main ()
17958 {
17959 bool foo = false
17960   ;
17961   return 0;
17962 }
17963 _ACEOF
17964 rm -f conftest.$ac_objext
17965 if { (eval echo "$as_me:17965: \"$ac_compile\"") >&5
17966   (eval $ac_compile) 2>&5
17967   ac_status=$?
17968   echo "$as_me:17968: \$? = $ac_status" >&5
17969   (exit $ac_status); } &&
17970          { ac_try='test -s conftest.$ac_objext'
17971   { (eval echo "$as_me:17971: \"$ac_try\"") >&5
17972   (eval $ac_try) 2>&5
17973   ac_status=$?
17974   echo "$as_me:17974: \$? = $ac_status" >&5
17975   (exit $ac_status); }; }; then
17976   cf_cv_header_stdbool_h=1
17977 else
17978   echo "$as_me: failed program was:" >&5
17979 cat conftest.$ac_ext >&5
17980 cf_cv_header_stdbool_h=0
17981 fi
17982 rm -f conftest.$ac_objext conftest.$ac_ext
17983 fi
17984 rm -f conftest.$ac_objext conftest.$ac_ext
17985 fi
17986
17987 if test "$cf_cv_header_stdbool_h" = 1
17988 then    echo "$as_me:17988: result: yes" >&5
17989 echo "${ECHO_T}yes" >&6
17990 else    echo "$as_me:17990: result: no" >&5
17991 echo "${ECHO_T}no" >&6
17992 fi
17993
17994 echo "$as_me:17994: checking for builtin bool type" >&5
17995 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17996
17997 if test "${cf_cv_cc_bool_type+set}" = set; then
17998   echo $ECHO_N "(cached) $ECHO_C" >&6
17999 else
18000
18001         cat >conftest.$ac_ext <<_ACEOF
18002 #line 18002 "configure"
18003 #include "confdefs.h"
18004
18005 #include <stdio.h>
18006 #include <sys/types.h>
18007
18008 int
18009 main ()
18010 {
18011 bool x = false
18012   ;
18013   return 0;
18014 }
18015 _ACEOF
18016 rm -f conftest.$ac_objext
18017 if { (eval echo "$as_me:18017: \"$ac_compile\"") >&5
18018   (eval $ac_compile) 2>&5
18019   ac_status=$?
18020   echo "$as_me:18020: \$? = $ac_status" >&5
18021   (exit $ac_status); } &&
18022          { ac_try='test -s conftest.$ac_objext'
18023   { (eval echo "$as_me:18023: \"$ac_try\"") >&5
18024   (eval $ac_try) 2>&5
18025   ac_status=$?
18026   echo "$as_me:18026: \$? = $ac_status" >&5
18027   (exit $ac_status); }; }; then
18028   cf_cv_cc_bool_type=1
18029 else
18030   echo "$as_me: failed program was:" >&5
18031 cat conftest.$ac_ext >&5
18032 cf_cv_cc_bool_type=0
18033 fi
18034 rm -f conftest.$ac_objext conftest.$ac_ext
18035
18036 fi
18037
18038 if test "$cf_cv_cc_bool_type" = 1
18039 then    echo "$as_me:18039: result: yes" >&5
18040 echo "${ECHO_T}yes" >&6
18041 else    echo "$as_me:18041: result: no" >&5
18042 echo "${ECHO_T}no" >&6
18043 fi
18044
18045 # Check for C++ compiler characteristics (and ensure that it's there!)
18046 if test -n "$CXX" ; then
18047         ac_ext=cc
18048 ac_cpp='$CXXCPP $CPPFLAGS'
18049 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18050 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18051 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18052 ac_main_return=return
18053
18054 if test -n "$GXX" ; then
18055 case $cf_cv_system_name in #(vi
18056 os2*) #(vi
18057         cf_stdcpp_libname=stdcpp
18058         ;;
18059 *)
18060         cf_stdcpp_libname=stdc++
18061         ;;
18062 esac
18063 echo "$as_me:18063: checking for library $cf_stdcpp_libname" >&5
18064 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18065 if test "${cf_cv_libstdcpp+set}" = set; then
18066   echo $ECHO_N "(cached) $ECHO_C" >&6
18067 else
18068
18069         cf_save="$LIBS"
18070         LIBS="-l$cf_stdcpp_libname $LIBS"
18071 cat >conftest.$ac_ext <<_ACEOF
18072 #line 18072 "configure"
18073 #include "confdefs.h"
18074
18075 #include <strstream.h>
18076 int
18077 main ()
18078 {
18079
18080 char buf[80];
18081 strstreambuf foo(buf, sizeof(buf))
18082
18083   ;
18084   return 0;
18085 }
18086 _ACEOF
18087 rm -f conftest.$ac_objext conftest$ac_exeext
18088 if { (eval echo "$as_me:18088: \"$ac_link\"") >&5
18089   (eval $ac_link) 2>&5
18090   ac_status=$?
18091   echo "$as_me:18091: \$? = $ac_status" >&5
18092   (exit $ac_status); } &&
18093          { ac_try='test -s conftest$ac_exeext'
18094   { (eval echo "$as_me:18094: \"$ac_try\"") >&5
18095   (eval $ac_try) 2>&5
18096   ac_status=$?
18097   echo "$as_me:18097: \$? = $ac_status" >&5
18098   (exit $ac_status); }; }; then
18099   cf_cv_libstdcpp=yes
18100 else
18101   echo "$as_me: failed program was:" >&5
18102 cat conftest.$ac_ext >&5
18103 cf_cv_libstdcpp=no
18104 fi
18105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18106         LIBS="$cf_save"
18107
18108 fi
18109 echo "$as_me:18109: result: $cf_cv_libstdcpp" >&5
18110 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18111 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18112 fi
18113
18114         echo "$as_me:18114: checking whether $CXX understands -c and -o together" >&5
18115 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18116 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18117   echo $ECHO_N "(cached) $ECHO_C" >&6
18118 else
18119
18120 cat > conftest.$ac_ext <<CF_EOF
18121 #include <stdio.h>
18122 int main()
18123 {
18124         ${cf_cv_main_return:-return}(0);
18125 }
18126 CF_EOF
18127 # We do the test twice because some compilers refuse to overwrite an
18128 # existing .o file with -o, though they will create one.
18129 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18130 if { (eval echo "$as_me:18130: \"$ac_try\"") >&5
18131   (eval $ac_try) 2>&5
18132   ac_status=$?
18133   echo "$as_me:18133: \$? = $ac_status" >&5
18134   (exit $ac_status); } &&
18135   test -f conftest2.$ac_objext && { (eval echo "$as_me:18135: \"$ac_try\"") >&5
18136   (eval $ac_try) 2>&5
18137   ac_status=$?
18138   echo "$as_me:18138: \$? = $ac_status" >&5
18139   (exit $ac_status); };
18140 then
18141   eval cf_cv_prog_CXX_c_o=yes
18142 else
18143   eval cf_cv_prog_CXX_c_o=no
18144 fi
18145 rm -rf conftest*
18146
18147 fi
18148 if test $cf_cv_prog_CXX_c_o = yes; then
18149   echo "$as_me:18149: result: yes" >&5
18150 echo "${ECHO_T}yes" >&6
18151 else
18152   echo "$as_me:18152: result: no" >&5
18153 echo "${ECHO_T}no" >&6
18154 fi
18155
18156         case $GXX_VERSION in
18157         1*|2.0-6*)
18158                 cf_cxx_library=yes
18159                 ;;
18160         *-2.7*|2.7*)
18161
18162 cf_cxx_library=unknown
18163 case $cf_cv_system_name in #(vi
18164 os2*) #(vi
18165         cf_gpp_libname=gpp
18166         ;;
18167 *)
18168         cf_gpp_libname=g++
18169         ;;
18170 esac
18171 if test "$GXX" = yes; then
18172         echo "$as_me:18172: checking for lib$cf_gpp_libname" >&5
18173 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18174         cf_save="$LIBS"
18175         LIBS="-l$cf_gpp_libname $LIBS"
18176         cat >conftest.$ac_ext <<_ACEOF
18177 #line 18177 "configure"
18178 #include "confdefs.h"
18179
18180 #include <$cf_gpp_libname/builtin.h>
18181
18182 int
18183 main ()
18184 {
18185 two_arg_error_handler_t foo2 = lib_error_handler
18186   ;
18187   return 0;
18188 }
18189 _ACEOF
18190 rm -f conftest.$ac_objext conftest$ac_exeext
18191 if { (eval echo "$as_me:18191: \"$ac_link\"") >&5
18192   (eval $ac_link) 2>&5
18193   ac_status=$?
18194   echo "$as_me:18194: \$? = $ac_status" >&5
18195   (exit $ac_status); } &&
18196          { ac_try='test -s conftest$ac_exeext'
18197   { (eval echo "$as_me:18197: \"$ac_try\"") >&5
18198   (eval $ac_try) 2>&5
18199   ac_status=$?
18200   echo "$as_me:18200: \$? = $ac_status" >&5
18201   (exit $ac_status); }; }; then
18202   cf_cxx_library=yes
18203          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18204          if test "$cf_gpp_libname" = cpp ; then
18205             cat >>confdefs.h <<\EOF
18206 #define HAVE_GPP_BUILTIN_H 1
18207 EOF
18208
18209          else
18210             cat >>confdefs.h <<\EOF
18211 #define HAVE_GXX_BUILTIN_H 1
18212 EOF
18213
18214          fi
18215 else
18216   echo "$as_me: failed program was:" >&5
18217 cat conftest.$ac_ext >&5
18218 cat >conftest.$ac_ext <<_ACEOF
18219 #line 18219 "configure"
18220 #include "confdefs.h"
18221
18222 #include <builtin.h>
18223
18224 int
18225 main ()
18226 {
18227 two_arg_error_handler_t foo2 = lib_error_handler
18228   ;
18229   return 0;
18230 }
18231 _ACEOF
18232 rm -f conftest.$ac_objext conftest$ac_exeext
18233 if { (eval echo "$as_me:18233: \"$ac_link\"") >&5
18234   (eval $ac_link) 2>&5
18235   ac_status=$?
18236   echo "$as_me:18236: \$? = $ac_status" >&5
18237   (exit $ac_status); } &&
18238          { ac_try='test -s conftest$ac_exeext'
18239   { (eval echo "$as_me:18239: \"$ac_try\"") >&5
18240   (eval $ac_try) 2>&5
18241   ac_status=$?
18242   echo "$as_me:18242: \$? = $ac_status" >&5
18243   (exit $ac_status); }; }; then
18244   cf_cxx_library=yes
18245          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18246          cat >>confdefs.h <<\EOF
18247 #define HAVE_BUILTIN_H 1
18248 EOF
18249
18250 else
18251   echo "$as_me: failed program was:" >&5
18252 cat conftest.$ac_ext >&5
18253 cf_cxx_library=no
18254 fi
18255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18256 fi
18257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18258         LIBS="$cf_save"
18259         echo "$as_me:18259: result: $cf_cxx_library" >&5
18260 echo "${ECHO_T}$cf_cxx_library" >&6
18261 fi
18262
18263                 ;;
18264         *)
18265                 cf_cxx_library=no
18266                 ;;
18267         esac
18268
18269         ac_ext=cc
18270 ac_cpp='$CXXCPP $CPPFLAGS'
18271 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18272 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18273 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18274 ac_main_return=return
18275 echo "$as_me:18275: checking how to run the C++ preprocessor" >&5
18276 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18277 if test -z "$CXXCPP"; then
18278   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18279   echo $ECHO_N "(cached) $ECHO_C" >&6
18280 else
18281       # Double quotes because CXXCPP needs to be expanded
18282     for CXXCPP in "$CXX -E" "/lib/cpp"
18283     do
18284       ac_preproc_ok=false
18285 for ac_cxx_preproc_warn_flag in '' yes
18286 do
18287   # Use a header file that comes with gcc, so configuring glibc
18288   # with a fresh cross-compiler works.
18289   # On the NeXT, cc -E runs the code through the compiler's parser,
18290   # not just through cpp. "Syntax error" is here to catch this case.
18291   cat >conftest.$ac_ext <<_ACEOF
18292 #line 18292 "configure"
18293 #include "confdefs.h"
18294 #include <assert.h>
18295                      Syntax error
18296 _ACEOF
18297 if { (eval echo "$as_me:18297: \"$ac_cpp conftest.$ac_ext\"") >&5
18298   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18299   ac_status=$?
18300   egrep -v '^ *\+' conftest.er1 >conftest.err
18301   rm -f conftest.er1
18302   cat conftest.err >&5
18303   echo "$as_me:18303: \$? = $ac_status" >&5
18304   (exit $ac_status); } >/dev/null; then
18305   if test -s conftest.err; then
18306     ac_cpp_err=$ac_cxx_preproc_warn_flag
18307   else
18308     ac_cpp_err=
18309   fi
18310 else
18311   ac_cpp_err=yes
18312 fi
18313 if test -z "$ac_cpp_err"; then
18314   :
18315 else
18316   echo "$as_me: failed program was:" >&5
18317   cat conftest.$ac_ext >&5
18318   # Broken: fails on valid input.
18319 continue
18320 fi
18321 rm -f conftest.err conftest.$ac_ext
18322
18323   # OK, works on sane cases.  Now check whether non-existent headers
18324   # can be detected and how.
18325   cat >conftest.$ac_ext <<_ACEOF
18326 #line 18326 "configure"
18327 #include "confdefs.h"
18328 #include <ac_nonexistent.h>
18329 _ACEOF
18330 if { (eval echo "$as_me:18330: \"$ac_cpp conftest.$ac_ext\"") >&5
18331   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18332   ac_status=$?
18333   egrep -v '^ *\+' conftest.er1 >conftest.err
18334   rm -f conftest.er1
18335   cat conftest.err >&5
18336   echo "$as_me:18336: \$? = $ac_status" >&5
18337   (exit $ac_status); } >/dev/null; then
18338   if test -s conftest.err; then
18339     ac_cpp_err=$ac_cxx_preproc_warn_flag
18340   else
18341     ac_cpp_err=
18342   fi
18343 else
18344   ac_cpp_err=yes
18345 fi
18346 if test -z "$ac_cpp_err"; then
18347   # Broken: success on invalid input.
18348 continue
18349 else
18350   echo "$as_me: failed program was:" >&5
18351   cat conftest.$ac_ext >&5
18352   # Passes both tests.
18353 ac_preproc_ok=:
18354 break
18355 fi
18356 rm -f conftest.err conftest.$ac_ext
18357
18358 done
18359 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18360 rm -f conftest.err conftest.$ac_ext
18361 if $ac_preproc_ok; then
18362   break
18363 fi
18364
18365     done
18366     ac_cv_prog_CXXCPP=$CXXCPP
18367
18368 fi
18369   CXXCPP=$ac_cv_prog_CXXCPP
18370 else
18371   ac_cv_prog_CXXCPP=$CXXCPP
18372 fi
18373 echo "$as_me:18373: result: $CXXCPP" >&5
18374 echo "${ECHO_T}$CXXCPP" >&6
18375 ac_preproc_ok=false
18376 for ac_cxx_preproc_warn_flag in '' yes
18377 do
18378   # Use a header file that comes with gcc, so configuring glibc
18379   # with a fresh cross-compiler works.
18380   # On the NeXT, cc -E runs the code through the compiler's parser,
18381   # not just through cpp. "Syntax error" is here to catch this case.
18382   cat >conftest.$ac_ext <<_ACEOF
18383 #line 18383 "configure"
18384 #include "confdefs.h"
18385 #include <assert.h>
18386                      Syntax error
18387 _ACEOF
18388 if { (eval echo "$as_me:18388: \"$ac_cpp conftest.$ac_ext\"") >&5
18389   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18390   ac_status=$?
18391   egrep -v '^ *\+' conftest.er1 >conftest.err
18392   rm -f conftest.er1
18393   cat conftest.err >&5
18394   echo "$as_me:18394: \$? = $ac_status" >&5
18395   (exit $ac_status); } >/dev/null; then
18396   if test -s conftest.err; then
18397     ac_cpp_err=$ac_cxx_preproc_warn_flag
18398   else
18399     ac_cpp_err=
18400   fi
18401 else
18402   ac_cpp_err=yes
18403 fi
18404 if test -z "$ac_cpp_err"; then
18405   :
18406 else
18407   echo "$as_me: failed program was:" >&5
18408   cat conftest.$ac_ext >&5
18409   # Broken: fails on valid input.
18410 continue
18411 fi
18412 rm -f conftest.err conftest.$ac_ext
18413
18414   # OK, works on sane cases.  Now check whether non-existent headers
18415   # can be detected and how.
18416   cat >conftest.$ac_ext <<_ACEOF
18417 #line 18417 "configure"
18418 #include "confdefs.h"
18419 #include <ac_nonexistent.h>
18420 _ACEOF
18421 if { (eval echo "$as_me:18421: \"$ac_cpp conftest.$ac_ext\"") >&5
18422   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18423   ac_status=$?
18424   egrep -v '^ *\+' conftest.er1 >conftest.err
18425   rm -f conftest.er1
18426   cat conftest.err >&5
18427   echo "$as_me:18427: \$? = $ac_status" >&5
18428   (exit $ac_status); } >/dev/null; then
18429   if test -s conftest.err; then
18430     ac_cpp_err=$ac_cxx_preproc_warn_flag
18431   else
18432     ac_cpp_err=
18433   fi
18434 else
18435   ac_cpp_err=yes
18436 fi
18437 if test -z "$ac_cpp_err"; then
18438   # Broken: success on invalid input.
18439 continue
18440 else
18441   echo "$as_me: failed program was:" >&5
18442   cat conftest.$ac_ext >&5
18443   # Passes both tests.
18444 ac_preproc_ok=:
18445 break
18446 fi
18447 rm -f conftest.err conftest.$ac_ext
18448
18449 done
18450 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18451 rm -f conftest.err conftest.$ac_ext
18452 if $ac_preproc_ok; then
18453   :
18454 else
18455   { { echo "$as_me:18455: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18456 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18457    { (exit 1); exit 1; }; }
18458 fi
18459
18460 ac_ext=cc
18461 ac_cpp='$CXXCPP $CPPFLAGS'
18462 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18463 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18464 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18465 ac_main_return=return
18466
18467 for ac_header in typeinfo
18468 do
18469 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18470 echo "$as_me:18470: checking for $ac_header" >&5
18471 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18472 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18473   echo $ECHO_N "(cached) $ECHO_C" >&6
18474 else
18475   cat >conftest.$ac_ext <<_ACEOF
18476 #line 18476 "configure"
18477 #include "confdefs.h"
18478 #include <$ac_header>
18479 _ACEOF
18480 if { (eval echo "$as_me:18480: \"$ac_cpp conftest.$ac_ext\"") >&5
18481   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18482   ac_status=$?
18483   egrep -v '^ *\+' conftest.er1 >conftest.err
18484   rm -f conftest.er1
18485   cat conftest.err >&5
18486   echo "$as_me:18486: \$? = $ac_status" >&5
18487   (exit $ac_status); } >/dev/null; then
18488   if test -s conftest.err; then
18489     ac_cpp_err=$ac_cxx_preproc_warn_flag
18490   else
18491     ac_cpp_err=
18492   fi
18493 else
18494   ac_cpp_err=yes
18495 fi
18496 if test -z "$ac_cpp_err"; then
18497   eval "$as_ac_Header=yes"
18498 else
18499   echo "$as_me: failed program was:" >&5
18500   cat conftest.$ac_ext >&5
18501   eval "$as_ac_Header=no"
18502 fi
18503 rm -f conftest.err conftest.$ac_ext
18504 fi
18505 echo "$as_me:18505: result: `eval echo '${'$as_ac_Header'}'`" >&5
18506 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18507 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18508   cat >>confdefs.h <<EOF
18509 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18510 EOF
18511
18512 fi
18513 done
18514
18515 for ac_header in iostream
18516 do
18517 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18518 echo "$as_me:18518: checking for $ac_header" >&5
18519 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18520 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18521   echo $ECHO_N "(cached) $ECHO_C" >&6
18522 else
18523   cat >conftest.$ac_ext <<_ACEOF
18524 #line 18524 "configure"
18525 #include "confdefs.h"
18526 #include <$ac_header>
18527 _ACEOF
18528 if { (eval echo "$as_me:18528: \"$ac_cpp conftest.$ac_ext\"") >&5
18529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18530   ac_status=$?
18531   egrep -v '^ *\+' conftest.er1 >conftest.err
18532   rm -f conftest.er1
18533   cat conftest.err >&5
18534   echo "$as_me:18534: \$? = $ac_status" >&5
18535   (exit $ac_status); } >/dev/null; then
18536   if test -s conftest.err; then
18537     ac_cpp_err=$ac_cxx_preproc_warn_flag
18538   else
18539     ac_cpp_err=
18540   fi
18541 else
18542   ac_cpp_err=yes
18543 fi
18544 if test -z "$ac_cpp_err"; then
18545   eval "$as_ac_Header=yes"
18546 else
18547   echo "$as_me: failed program was:" >&5
18548   cat conftest.$ac_ext >&5
18549   eval "$as_ac_Header=no"
18550 fi
18551 rm -f conftest.err conftest.$ac_ext
18552 fi
18553 echo "$as_me:18553: result: `eval echo '${'$as_ac_Header'}'`" >&5
18554 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18555 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18556   cat >>confdefs.h <<EOF
18557 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18558 EOF
18559
18560 fi
18561 done
18562
18563 if test x"$ac_cv_header_iostream" = xyes ; then
18564         echo "$as_me:18564: checking if iostream uses std-namespace" >&5
18565 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18566         cat >conftest.$ac_ext <<_ACEOF
18567 #line 18567 "configure"
18568 #include "confdefs.h"
18569
18570 #include <iostream>
18571 using std::endl;
18572 using std::cerr;
18573 int
18574 main ()
18575 {
18576
18577 cerr << "testing" << endl;
18578
18579   ;
18580   return 0;
18581 }
18582 _ACEOF
18583 rm -f conftest.$ac_objext
18584 if { (eval echo "$as_me:18584: \"$ac_compile\"") >&5
18585   (eval $ac_compile) 2>&5
18586   ac_status=$?
18587   echo "$as_me:18587: \$? = $ac_status" >&5
18588   (exit $ac_status); } &&
18589          { ac_try='test -s conftest.$ac_objext'
18590   { (eval echo "$as_me:18590: \"$ac_try\"") >&5
18591   (eval $ac_try) 2>&5
18592   ac_status=$?
18593   echo "$as_me:18593: \$? = $ac_status" >&5
18594   (exit $ac_status); }; }; then
18595   cf_iostream_namespace=yes
18596 else
18597   echo "$as_me: failed program was:" >&5
18598 cat conftest.$ac_ext >&5
18599 cf_iostream_namespace=no
18600 fi
18601 rm -f conftest.$ac_objext conftest.$ac_ext
18602         echo "$as_me:18602: result: $cf_iostream_namespace" >&5
18603 echo "${ECHO_T}$cf_iostream_namespace" >&6
18604         if test "$cf_iostream_namespace" = yes ; then
18605                 cat >>confdefs.h <<\EOF
18606 #define IOSTREAM_NAMESPACE 1
18607 EOF
18608
18609         fi
18610 fi
18611
18612 echo "$as_me:18612: checking if we should include stdbool.h" >&5
18613 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18614
18615 if test "${cf_cv_header_stdbool_h+set}" = set; then
18616   echo $ECHO_N "(cached) $ECHO_C" >&6
18617 else
18618
18619         cat >conftest.$ac_ext <<_ACEOF
18620 #line 18620 "configure"
18621 #include "confdefs.h"
18622
18623 int
18624 main ()
18625 {
18626 bool foo = false
18627   ;
18628   return 0;
18629 }
18630 _ACEOF
18631 rm -f conftest.$ac_objext
18632 if { (eval echo "$as_me:18632: \"$ac_compile\"") >&5
18633   (eval $ac_compile) 2>&5
18634   ac_status=$?
18635   echo "$as_me:18635: \$? = $ac_status" >&5
18636   (exit $ac_status); } &&
18637          { ac_try='test -s conftest.$ac_objext'
18638   { (eval echo "$as_me:18638: \"$ac_try\"") >&5
18639   (eval $ac_try) 2>&5
18640   ac_status=$?
18641   echo "$as_me:18641: \$? = $ac_status" >&5
18642   (exit $ac_status); }; }; then
18643   cf_cv_header_stdbool_h=0
18644 else
18645   echo "$as_me: failed program was:" >&5
18646 cat conftest.$ac_ext >&5
18647 cat >conftest.$ac_ext <<_ACEOF
18648 #line 18648 "configure"
18649 #include "confdefs.h"
18650
18651 #ifndef __BEOS__
18652 #include <stdbool.h>
18653 #endif
18654
18655 int
18656 main ()
18657 {
18658 bool foo = false
18659   ;
18660   return 0;
18661 }
18662 _ACEOF
18663 rm -f conftest.$ac_objext
18664 if { (eval echo "$as_me:18664: \"$ac_compile\"") >&5
18665   (eval $ac_compile) 2>&5
18666   ac_status=$?
18667   echo "$as_me:18667: \$? = $ac_status" >&5
18668   (exit $ac_status); } &&
18669          { ac_try='test -s conftest.$ac_objext'
18670   { (eval echo "$as_me:18670: \"$ac_try\"") >&5
18671   (eval $ac_try) 2>&5
18672   ac_status=$?
18673   echo "$as_me:18673: \$? = $ac_status" >&5
18674   (exit $ac_status); }; }; then
18675   cf_cv_header_stdbool_h=1
18676 else
18677   echo "$as_me: failed program was:" >&5
18678 cat conftest.$ac_ext >&5
18679 cf_cv_header_stdbool_h=0
18680 fi
18681 rm -f conftest.$ac_objext conftest.$ac_ext
18682 fi
18683 rm -f conftest.$ac_objext conftest.$ac_ext
18684 fi
18685
18686 if test "$cf_cv_header_stdbool_h" = 1
18687 then    echo "$as_me:18687: result: yes" >&5
18688 echo "${ECHO_T}yes" >&6
18689 else    echo "$as_me:18689: result: no" >&5
18690 echo "${ECHO_T}no" >&6
18691 fi
18692
18693 echo "$as_me:18693: checking for builtin bool type" >&5
18694 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18695
18696 if test "${cf_cv_builtin_bool+set}" = set; then
18697   echo $ECHO_N "(cached) $ECHO_C" >&6
18698 else
18699
18700         cat >conftest.$ac_ext <<_ACEOF
18701 #line 18701 "configure"
18702 #include "confdefs.h"
18703
18704 #include <stdio.h>
18705 #include <sys/types.h>
18706
18707 int
18708 main ()
18709 {
18710 bool x = false
18711   ;
18712   return 0;
18713 }
18714 _ACEOF
18715 rm -f conftest.$ac_objext
18716 if { (eval echo "$as_me:18716: \"$ac_compile\"") >&5
18717   (eval $ac_compile) 2>&5
18718   ac_status=$?
18719   echo "$as_me:18719: \$? = $ac_status" >&5
18720   (exit $ac_status); } &&
18721          { ac_try='test -s conftest.$ac_objext'
18722   { (eval echo "$as_me:18722: \"$ac_try\"") >&5
18723   (eval $ac_try) 2>&5
18724   ac_status=$?
18725   echo "$as_me:18725: \$? = $ac_status" >&5
18726   (exit $ac_status); }; }; then
18727   cf_cv_builtin_bool=1
18728 else
18729   echo "$as_me: failed program was:" >&5
18730 cat conftest.$ac_ext >&5
18731 cf_cv_builtin_bool=0
18732 fi
18733 rm -f conftest.$ac_objext conftest.$ac_ext
18734
18735 fi
18736
18737 if test "$cf_cv_builtin_bool" = 1
18738 then    echo "$as_me:18738: result: yes" >&5
18739 echo "${ECHO_T}yes" >&6
18740 else    echo "$as_me:18740: result: no" >&5
18741 echo "${ECHO_T}no" >&6
18742 fi
18743
18744 echo "$as_me:18744: checking for size of bool" >&5
18745 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18746 if test "${cf_cv_type_of_bool+set}" = set; then
18747   echo $ECHO_N "(cached) $ECHO_C" >&6
18748 else
18749
18750         rm -f cf_test.out
18751         if test "$cross_compiling" = yes; then
18752   cf_cv_type_of_bool=unknown
18753 else
18754   cat >conftest.$ac_ext <<_ACEOF
18755 #line 18755 "configure"
18756 #include "confdefs.h"
18757
18758 #include <stdlib.h>
18759 #include <stdio.h>
18760
18761 #if defined(__cplusplus)
18762
18763 #ifdef HAVE_GXX_BUILTIN_H
18764 #include <g++/builtin.h>
18765 #elif HAVE_GPP_BUILTIN_H
18766 #include <gpp/builtin.h>
18767 #elif HAVE_BUILTIN_H
18768 #include <builtin.h>
18769 #endif
18770
18771 #else
18772
18773 #if $cf_cv_header_stdbool_h
18774 #include <stdbool.h>
18775 #endif
18776
18777 #endif
18778
18779 main()
18780 {
18781         FILE *fp = fopen("cf_test.out", "w");
18782         if (fp != 0) {
18783                 bool x = true;
18784                 if ((bool)(-x) >= 0)
18785                         fputs("unsigned ", fp);
18786                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18787                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18788                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18789                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18790                 fclose(fp);
18791         }
18792         ${cf_cv_main_return:-return}(0);
18793 }
18794
18795 _ACEOF
18796 rm -f conftest$ac_exeext
18797 if { (eval echo "$as_me:18797: \"$ac_link\"") >&5
18798   (eval $ac_link) 2>&5
18799   ac_status=$?
18800   echo "$as_me:18800: \$? = $ac_status" >&5
18801   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18802   { (eval echo "$as_me:18802: \"$ac_try\"") >&5
18803   (eval $ac_try) 2>&5
18804   ac_status=$?
18805   echo "$as_me:18805: \$? = $ac_status" >&5
18806   (exit $ac_status); }; }; then
18807   cf_cv_type_of_bool=`cat cf_test.out`
18808                  if test -z "$cf_cv_type_of_bool"; then
18809                    cf_cv_type_of_bool=unknown
18810                  fi
18811 else
18812   echo "$as_me: program exited with status $ac_status" >&5
18813 echo "$as_me: failed program was:" >&5
18814 cat conftest.$ac_ext >&5
18815 cf_cv_type_of_bool=unknown
18816 fi
18817 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18818 fi
18819
18820 fi
18821
18822         rm -f cf_test.out
18823 echo "$as_me:18823: result: $cf_cv_type_of_bool" >&5
18824 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18825 if test "$cf_cv_type_of_bool" = unknown ; then
18826         case .$NCURSES_BOOL in #(vi
18827         .auto|.) NCURSES_BOOL=unsigned;;
18828         esac
18829         { echo "$as_me:18829: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18830 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18831         cf_cv_type_of_bool=$NCURSES_BOOL
18832 fi
18833
18834 echo "$as_me:18834: checking for special defines needed for etip.h" >&5
18835 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18836 cf_save_CXXFLAGS="$CXXFLAGS"
18837 cf_result="none"
18838
18839 # etip.h includes ncurses.h which includes ncurses_dll.h
18840 # But ncurses_dll.h is generated - fix here.
18841 test -d include || mkdir include
18842 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
18843
18844 for cf_math in "" MATH_H
18845 do
18846 for cf_excp in "" MATH_EXCEPTION
18847 do
18848         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18849         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18850         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18851 cat >conftest.$ac_ext <<_ACEOF
18852 #line 18852 "configure"
18853 #include "confdefs.h"
18854
18855 #include <etip.h.in>
18856
18857 int
18858 main ()
18859 {
18860
18861   ;
18862   return 0;
18863 }
18864 _ACEOF
18865 rm -f conftest.$ac_objext
18866 if { (eval echo "$as_me:18866: \"$ac_compile\"") >&5
18867   (eval $ac_compile) 2>&5
18868   ac_status=$?
18869   echo "$as_me:18869: \$? = $ac_status" >&5
18870   (exit $ac_status); } &&
18871          { ac_try='test -s conftest.$ac_objext'
18872   { (eval echo "$as_me:18872: \"$ac_try\"") >&5
18873   (eval $ac_try) 2>&5
18874   ac_status=$?
18875   echo "$as_me:18875: \$? = $ac_status" >&5
18876   (exit $ac_status); }; }; then
18877
18878         test -n "$cf_math" && cat >>confdefs.h <<EOF
18879 #define ETIP_NEEDS_${cf_math} 1
18880 EOF
18881
18882         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18883 #define ETIP_NEEDS_${cf_excp} 1
18884 EOF
18885
18886         cf_result="$cf_math $cf_excp"
18887         break 2
18888
18889 else
18890   echo "$as_me: failed program was:" >&5
18891 cat conftest.$ac_ext >&5
18892 fi
18893 rm -f conftest.$ac_objext conftest.$ac_ext
18894 done
18895 done
18896 echo "$as_me:18896: result: $cf_result" >&5
18897 echo "${ECHO_T}$cf_result" >&6
18898 CXXFLAGS="$cf_save_CXXFLAGS"
18899
18900 if test -n "$CXX"; then
18901 echo "$as_me:18901: checking if $CXX accepts parameter initialization" >&5
18902 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18903 if test "${cf_cv_cpp_param_init+set}" = set; then
18904   echo $ECHO_N "(cached) $ECHO_C" >&6
18905 else
18906
18907         ac_ext=cc
18908 ac_cpp='$CXXCPP $CPPFLAGS'
18909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18912 ac_main_return=return
18913
18914         if test "$cross_compiling" = yes; then
18915   cf_cv_cpp_param_init=unknown
18916 else
18917   cat >conftest.$ac_ext <<_ACEOF
18918 #line 18918 "configure"
18919 #include "confdefs.h"
18920
18921 class TEST {
18922 private:
18923         int value;
18924 public:
18925         TEST(int x = 1);
18926         ~TEST();
18927 };
18928
18929 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18930 {
18931         value = x;
18932 }
18933 int main() { }
18934
18935 _ACEOF
18936 rm -f conftest$ac_exeext
18937 if { (eval echo "$as_me:18937: \"$ac_link\"") >&5
18938   (eval $ac_link) 2>&5
18939   ac_status=$?
18940   echo "$as_me:18940: \$? = $ac_status" >&5
18941   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18942   { (eval echo "$as_me:18942: \"$ac_try\"") >&5
18943   (eval $ac_try) 2>&5
18944   ac_status=$?
18945   echo "$as_me:18945: \$? = $ac_status" >&5
18946   (exit $ac_status); }; }; then
18947   cf_cv_cpp_param_init=yes
18948 else
18949   echo "$as_me: program exited with status $ac_status" >&5
18950 echo "$as_me: failed program was:" >&5
18951 cat conftest.$ac_ext >&5
18952 cf_cv_cpp_param_init=no
18953 fi
18954 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18955 fi
18956         ac_ext=cc
18957 ac_cpp='$CXXCPP $CPPFLAGS'
18958 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18959 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18960 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18961 ac_main_return=return
18962
18963 fi
18964 echo "$as_me:18964: result: $cf_cv_cpp_param_init" >&5
18965 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18966 fi
18967 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18968 #define CPP_HAS_PARAM_INIT 1
18969 EOF
18970
18971 if test -n "$CXX"; then
18972
18973 echo "$as_me:18973: checking if $CXX accepts static_cast" >&5
18974 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18975 if test "${cf_cv_cpp_static_cast+set}" = set; then
18976   echo $ECHO_N "(cached) $ECHO_C" >&6
18977 else
18978
18979         ac_ext=cc
18980 ac_cpp='$CXXCPP $CPPFLAGS'
18981 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18982 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18983 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18984 ac_main_return=return
18985
18986         cat >conftest.$ac_ext <<_ACEOF
18987 #line 18987 "configure"
18988 #include "confdefs.h"
18989
18990 class NCursesPanel
18991 {
18992 public:
18993   NCursesPanel(int nlines,
18994                int ncols,
18995                int begin_y = 0,
18996                int begin_x = 0)
18997   {
18998   }
18999
19000   ~NCursesPanel();
19001 };
19002
19003 template<class T> class NCursesUserPanel : public NCursesPanel
19004 {
19005 public:
19006   NCursesUserPanel (int nlines,
19007                     int ncols,
19008                     int begin_y = 0,
19009                     int begin_x = 0,
19010                     const T* p_UserData = static_cast<T*>(0))
19011     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19012   {
19013   };
19014   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19015   {
19016   };
19017
19018   virtual ~NCursesUserPanel() {};
19019 };
19020
19021 int
19022 main ()
19023 {
19024
19025         const char* p_UserData = static_cast<char*>(0)
19026   ;
19027   return 0;
19028 }
19029 _ACEOF
19030 rm -f conftest.$ac_objext
19031 if { (eval echo "$as_me:19031: \"$ac_compile\"") >&5
19032   (eval $ac_compile) 2>&5
19033   ac_status=$?
19034   echo "$as_me:19034: \$? = $ac_status" >&5
19035   (exit $ac_status); } &&
19036          { ac_try='test -s conftest.$ac_objext'
19037   { (eval echo "$as_me:19037: \"$ac_try\"") >&5
19038   (eval $ac_try) 2>&5
19039   ac_status=$?
19040   echo "$as_me:19040: \$? = $ac_status" >&5
19041   (exit $ac_status); }; }; then
19042   cf_cv_cpp_static_cast=yes
19043 else
19044   echo "$as_me: failed program was:" >&5
19045 cat conftest.$ac_ext >&5
19046 cf_cv_cpp_static_cast=no
19047 fi
19048 rm -f conftest.$ac_objext conftest.$ac_ext
19049
19050         ac_ext=cc
19051 ac_cpp='$CXXCPP $CPPFLAGS'
19052 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19053 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19054 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19055 ac_main_return=return
19056
19057 fi
19058 echo "$as_me:19058: result: $cf_cv_cpp_static_cast" >&5
19059 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19060
19061 fi
19062
19063 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
19064 #define CPP_HAS_STATIC_CAST 1
19065 EOF
19066
19067         CXX_AR='$(AR)'
19068         CXX_ARFLAGS='$(ARFLAGS)'
19069         case $cf_cv_system_name in #(vi
19070         irix*) #(vi
19071             if test "$GXX" != yes ; then
19072                 CXX_AR='$(CXX)'
19073                 CXX_ARFLAGS='-ar -o'
19074             fi
19075             ;;
19076         sco3.2v5*) #(vi
19077             CXXLDFLAGS="-u main"
19078             ;;
19079         solaris2*)
19080             if test "$GXX" != yes ; then
19081                 CXX_AR='$(CXX)'
19082                 CXX_ARFLAGS='-xar -o'
19083             fi
19084             ;;
19085         esac
19086
19087 else
19088         cf_cxx_library=no
19089         cf_cv_builtin_bool=1
19090
19091         # Just because we are not configuring against C++ right now does not
19092         # mean that a user will not want to use C++.  Some distributors disable
19093         # the C++ portion of this configuration as a shortcut (or just to avoid
19094         # compiling the demo in the c++ directory).  So we need a reasonable
19095         # default for the 'bool' type.
19096         #
19097         # Caveat: since the storage of the bool type is not standardized, it
19098         # may change.
19099
19100         if test "$NCURSES_BOOL" != auto ; then
19101                 cf_cv_type_of_bool=$NCURSES_BOOL
19102                 cf_cv_header_stdbool_h=0
19103         else
19104                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19105
19106 echo "$as_me:19106: checking for size of bool" >&5
19107 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19108 if test "${cf_cv_type_of_bool+set}" = set; then
19109   echo $ECHO_N "(cached) $ECHO_C" >&6
19110 else
19111
19112         rm -f cf_test.out
19113         if test "$cross_compiling" = yes; then
19114   cf_cv_type_of_bool=unknown
19115 else
19116   cat >conftest.$ac_ext <<_ACEOF
19117 #line 19117 "configure"
19118 #include "confdefs.h"
19119
19120 #include <stdlib.h>
19121 #include <stdio.h>
19122
19123 #if defined(__cplusplus)
19124
19125 #ifdef HAVE_GXX_BUILTIN_H
19126 #include <g++/builtin.h>
19127 #elif HAVE_GPP_BUILTIN_H
19128 #include <gpp/builtin.h>
19129 #elif HAVE_BUILTIN_H
19130 #include <builtin.h>
19131 #endif
19132
19133 #else
19134
19135 #if $cf_cv_header_stdbool_h
19136 #include <stdbool.h>
19137 #endif
19138
19139 #endif
19140
19141 main()
19142 {
19143         FILE *fp = fopen("cf_test.out", "w");
19144         if (fp != 0) {
19145                 bool x = true;
19146                 if ((bool)(-x) >= 0)
19147                         fputs("unsigned ", fp);
19148                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19149                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19150                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19151                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19152                 fclose(fp);
19153         }
19154         ${cf_cv_main_return:-return}(0);
19155 }
19156
19157 _ACEOF
19158 rm -f conftest$ac_exeext
19159 if { (eval echo "$as_me:19159: \"$ac_link\"") >&5
19160   (eval $ac_link) 2>&5
19161   ac_status=$?
19162   echo "$as_me:19162: \$? = $ac_status" >&5
19163   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19164   { (eval echo "$as_me:19164: \"$ac_try\"") >&5
19165   (eval $ac_try) 2>&5
19166   ac_status=$?
19167   echo "$as_me:19167: \$? = $ac_status" >&5
19168   (exit $ac_status); }; }; then
19169   cf_cv_type_of_bool=`cat cf_test.out`
19170                  if test -z "$cf_cv_type_of_bool"; then
19171                    cf_cv_type_of_bool=unknown
19172                  fi
19173 else
19174   echo "$as_me: program exited with status $ac_status" >&5
19175 echo "$as_me: failed program was:" >&5
19176 cat conftest.$ac_ext >&5
19177 cf_cv_type_of_bool=unknown
19178 fi
19179 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19180 fi
19181
19182 fi
19183
19184         rm -f cf_test.out
19185 echo "$as_me:19185: result: $cf_cv_type_of_bool" >&5
19186 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19187 if test "$cf_cv_type_of_bool" = unknown ; then
19188         case .$NCURSES_BOOL in #(vi
19189         .auto|.) NCURSES_BOOL=unsigned;;
19190         esac
19191         { echo "$as_me:19191: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19192 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19193         cf_cv_type_of_bool=$NCURSES_BOOL
19194 fi
19195
19196                 else
19197                         echo "$as_me:19197: checking for fallback type of bool" >&5
19198 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19199                         case "$host_cpu" in #(vi
19200                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19201                         *)      cf_cv_type_of_bool=int  ;;
19202                         esac
19203                         echo "$as_me:19203: result: $cf_cv_type_of_bool" >&5
19204 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19205                 fi
19206         fi
19207 fi
19208
19209 # If the C compiler did not declare bool, and we did not determine that the C++
19210 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19211 # ncurses library use the same type as C++ bool.  Note that this allows one to
19212 # specify the type of bool in a configure-script option and postpone
19213 # integration with the C++ compiler provided that the types are compatible.
19214 USE_CXX_BOOL=1
19215 if test $cf_cv_cc_bool_type = 1
19216 then
19217         # oops: C has a bool.  Unlikely, but C++ could differ.
19218         USE_CXX_BOOL=0
19219 elif test $cf_cv_builtin_bool = 0
19220 then
19221         # C++ has no bool
19222         USE_CXX_BOOL=0
19223 else
19224         # this is the normal case
19225         USE_CXX_BOOL='defined(__cplusplus)'
19226 fi
19227
19228 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19229
19230         if test "$cf_with_ada" != "no" ; then
19231                 if test "$with_libtool" != "no"; then
19232                         { echo "$as_me:19232: WARNING: libtool does not support Ada - disabling feature" >&5
19233 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19234                         cf_with_ada=no
19235                 fi
19236         fi
19237
19238         if test "$cf_with_ada" != "no" ; then
19239
19240 cf_ada_make=gnatmake
19241 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19242 set dummy $cf_ada_make; ac_word=$2
19243 echo "$as_me:19243: checking for $ac_word" >&5
19244 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19245 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19246   echo $ECHO_N "(cached) $ECHO_C" >&6
19247 else
19248   if test -n "$gnat_exists"; then
19249   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19250 else
19251   ac_save_IFS=$IFS; IFS=$ac_path_separator
19252 ac_dummy="$PATH"
19253 for ac_dir in $ac_dummy; do
19254   IFS=$ac_save_IFS
19255   test -z "$ac_dir" && ac_dir=.
19256   $as_executable_p "$ac_dir/$ac_word" || continue
19257 ac_cv_prog_gnat_exists="yes"
19258 echo "$as_me:19258: found $ac_dir/$ac_word" >&5
19259 break
19260 done
19261
19262   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19263 fi
19264 fi
19265 gnat_exists=$ac_cv_prog_gnat_exists
19266 if test -n "$gnat_exists"; then
19267   echo "$as_me:19267: result: $gnat_exists" >&5
19268 echo "${ECHO_T}$gnat_exists" >&6
19269 else
19270   echo "$as_me:19270: result: no" >&5
19271 echo "${ECHO_T}no" >&6
19272 fi
19273
19274 if test "$ac_cv_prog_gnat_exists" = no; then
19275    cf_ada_make=
19276    cf_cv_prog_gnat_correct=no
19277 else
19278
19279 echo "$as_me:19279: checking for gnat version" >&5
19280 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19281 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19282         grep '[0-9].[0-9][0-9]*' |\
19283     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19284 echo "$as_me:19284: result: $cf_gnat_version" >&5
19285 echo "${ECHO_T}$cf_gnat_version" >&6
19286
19287 case $cf_gnat_version in #(vi
19288 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19289         cf_cv_prog_gnat_correct=yes
19290         ;;
19291 *)
19292         { echo "$as_me:19292: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19293 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19294         cf_cv_prog_gnat_correct=no
19295         ;;
19296 esac
19297
19298    # Extract the first word of "m4", so it can be a program name with args.
19299 set dummy m4; ac_word=$2
19300 echo "$as_me:19300: checking for $ac_word" >&5
19301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19302 if test "${ac_cv_prog_M4_exists+set}" = set; then
19303   echo $ECHO_N "(cached) $ECHO_C" >&6
19304 else
19305   if test -n "$M4_exists"; then
19306   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19307 else
19308   ac_save_IFS=$IFS; IFS=$ac_path_separator
19309 ac_dummy="$PATH"
19310 for ac_dir in $ac_dummy; do
19311   IFS=$ac_save_IFS
19312   test -z "$ac_dir" && ac_dir=.
19313   $as_executable_p "$ac_dir/$ac_word" || continue
19314 ac_cv_prog_M4_exists="yes"
19315 echo "$as_me:19315: found $ac_dir/$ac_word" >&5
19316 break
19317 done
19318
19319   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19320 fi
19321 fi
19322 M4_exists=$ac_cv_prog_M4_exists
19323 if test -n "$M4_exists"; then
19324   echo "$as_me:19324: result: $M4_exists" >&5
19325 echo "${ECHO_T}$M4_exists" >&6
19326 else
19327   echo "$as_me:19327: result: no" >&5
19328 echo "${ECHO_T}no" >&6
19329 fi
19330
19331    if test "$ac_cv_prog_M4_exists" = no; then
19332       cf_cv_prog_gnat_correct=no
19333       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19334    fi
19335    if test "$cf_cv_prog_gnat_correct" = yes; then
19336       echo "$as_me:19336: checking if GNAT works" >&5
19337 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19338
19339 rm -rf conftest* *~conftest*
19340 cat >>conftest.ads <<CF_EOF
19341 procedure conftest;
19342 CF_EOF
19343 cat >>conftest.adb <<CF_EOF
19344 with Text_IO;
19345 with GNAT.OS_Lib;
19346 procedure conftest is
19347 begin
19348    Text_IO.Put ("Hello World");
19349    Text_IO.New_Line;
19350    GNAT.OS_Lib.OS_Exit (0);
19351 end conftest;
19352 CF_EOF
19353 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19354    if ( ./conftest 1>&5 2>&1 ) ; then
19355       cf_cv_prog_gnat_correct=yes
19356    else
19357       cf_cv_prog_gnat_correct=no
19358    fi
19359 else
19360    cf_cv_prog_gnat_correct=no
19361 fi
19362 rm -rf conftest* *~conftest*
19363
19364       echo "$as_me:19364: result: $cf_cv_prog_gnat_correct" >&5
19365 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19366    fi
19367 fi
19368
19369                 if test "$cf_cv_prog_gnat_correct" = yes; then
19370
19371         ADAFLAGS="$ADAFLAGS -gnatpn"
19372
19373         echo "$as_me:19373: checking optimization options for ADAFLAGS" >&5
19374 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19375         case "$CFLAGS" in
19376         *-g*)
19377
19378         ADAFLAGS="$ADAFLAGS -g"
19379
19380                 ;;
19381         esac
19382         case "$CFLAGS" in
19383         *-O*)
19384                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19385
19386         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19387
19388                 ;;
19389         esac
19390         echo "$as_me:19390: result: $ADAFLAGS" >&5
19391 echo "${ECHO_T}$ADAFLAGS" >&6
19392
19393 echo "$as_me:19393: checking if GNAT supports generics" >&5
19394 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19395 case $cf_gnat_version in #(vi
19396 3.[1-9]*|[4-9].*) #(vi
19397         cf_gnat_generics=yes
19398         ;;
19399 *)
19400         cf_gnat_generics=no
19401         ;;
19402 esac
19403 echo "$as_me:19403: result: $cf_gnat_generics" >&5
19404 echo "${ECHO_T}$cf_gnat_generics" >&6
19405
19406 if test "$cf_gnat_generics" = yes
19407 then
19408         cf_compile_generics=generics
19409         cf_generic_objects="\${GENOBJS}"
19410 else
19411         cf_compile_generics=
19412         cf_generic_objects=
19413 fi
19414
19415 echo "$as_me:19415: checking if GNAT supports SIGINT" >&5
19416 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19417 if test "${cf_cv_gnat_sigint+set}" = set; then
19418   echo $ECHO_N "(cached) $ECHO_C" >&6
19419 else
19420
19421 rm -rf conftest* *~conftest*
19422 cat >>conftest.ads <<CF_EOF
19423 with Ada.Interrupts.Names;
19424
19425 package ConfTest is
19426
19427    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19428    pragma Unreserve_All_Interrupts;
19429    pragma Warnings (On);
19430
19431    protected Process is
19432       procedure Stop;
19433       function Continue return Boolean;
19434       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19435    private
19436       Done : Boolean := False;
19437    end Process;
19438
19439 end ConfTest;
19440 CF_EOF
19441 cat >>conftest.adb <<CF_EOF
19442 package body ConfTest is
19443    protected body Process is
19444       procedure Stop is
19445       begin
19446          Done := True;
19447       end Stop;
19448       function Continue return Boolean is
19449       begin
19450          return not Done;
19451       end Continue;
19452    end Process;
19453 end ConfTest;
19454 CF_EOF
19455 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19456       cf_cv_gnat_sigint=yes
19457 else
19458    cf_cv_gnat_sigint=no
19459 fi
19460 rm -rf conftest* *~conftest*
19461
19462 fi
19463 echo "$as_me:19463: result: $cf_cv_gnat_sigint" >&5
19464 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19465
19466 if test $cf_cv_gnat_sigint = yes ; then
19467         USE_GNAT_SIGINT=""
19468 else
19469         USE_GNAT_SIGINT="#"
19470 fi
19471
19472 echo "$as_me:19472: checking if GNAT pragma Unreferenced works" >&5
19473 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19474 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19475   echo $ECHO_N "(cached) $ECHO_C" >&6
19476 else
19477
19478 rm -rf conftest* *~conftest*
19479 cat >>conftest.ads <<CF_EOF
19480 procedure conftest;
19481 CF_EOF
19482 cat >>conftest.adb <<CF_EOF
19483 with Text_IO;
19484 with GNAT.OS_Lib;
19485 procedure conftest is
19486    test : Integer;
19487    pragma Unreferenced (test);
19488 begin
19489    test := 1;
19490    Text_IO.Put ("Hello World");
19491    Text_IO.New_Line;
19492    GNAT.OS_Lib.OS_Exit (0);
19493 end conftest;
19494 CF_EOF
19495 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19496       cf_cv_pragma_unreferenced=yes
19497 else
19498    cf_cv_pragma_unreferenced=no
19499 fi
19500 rm -rf conftest* *~conftest*
19501
19502 fi
19503 echo "$as_me:19503: result: $cf_cv_pragma_unreferenced" >&5
19504 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19505
19506 # if the pragma is supported, use it (needed in the Trace code).
19507 if test $cf_cv_pragma_unreferenced = yes ; then
19508         PRAGMA_UNREF=TRUE
19509 else
19510         PRAGMA_UNREF=FALSE
19511 fi
19512
19513 cf_gnat_libraries=no
19514 cf_gnat_projects=no
19515
19516 echo "$as_me:19516: checking if GNAT supports project files" >&5
19517 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19518 case $cf_gnat_version in #(vi
19519 3.[0-9]*) #(vi
19520         ;;
19521 *)
19522         case $cf_cv_system_name in #(vi
19523         cygwin*) #(vi
19524                 ;;
19525         *)
19526                 mkdir conftest.src conftest.bin conftest.lib
19527                 cd conftest.src
19528                 rm -rf conftest* *~conftest*
19529                 cat >>library.gpr <<CF_EOF
19530 project Library is
19531   Kind := External ("LIB_KIND");
19532   for Library_Name use "ConfTest";
19533   for Object_Dir use ".";
19534   for Library_ALI_Dir use External("LIBRARY_DIR");
19535   for Library_Version use External ("SONAME");
19536   for Library_Kind use Kind;
19537   for Library_Dir use External("BUILD_DIR");
19538   Source_Dir := External ("SOURCE_DIR");
19539   for Source_Dirs use (Source_Dir);
19540   package Compiler is
19541      for Default_Switches ("Ada") use
19542        ("-g",
19543         "-O2",
19544         "-gnatafno",
19545         "-gnatVa",   -- All validity checks
19546         "-gnatwa");  -- Activate all optional errors
19547   end Compiler;
19548 end Library;
19549 CF_EOF
19550                 cat >>confpackage.ads <<CF_EOF
19551 package ConfPackage is
19552    procedure conftest;
19553 end ConfPackage;
19554 CF_EOF
19555                 cat >>confpackage.adb <<CF_EOF
19556 with Text_IO;
19557 package body ConfPackage is
19558    procedure conftest is
19559    begin
19560       Text_IO.Put ("Hello World");
19561       Text_IO.New_Line;
19562    end conftest;
19563 end ConfPackage;
19564 CF_EOF
19565                 if ( $cf_ada_make $ADAFLAGS \
19566                                 -Plibrary.gpr \
19567                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19568                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19569                                 -XSOURCE_DIR=`pwd` \
19570                                 -XSONAME=libConfTest.so.1 \
19571                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19572                         cf_gnat_projects=yes
19573                 fi
19574                 cd ..
19575                 if test -f conftest.lib/confpackage.ali
19576                 then
19577                         cf_gnat_libraries=yes
19578                 fi
19579                 rm -rf conftest* *~conftest*
19580                 ;;
19581         esac
19582         ;;
19583 esac
19584 echo "$as_me:19584: result: $cf_gnat_projects" >&5
19585 echo "${ECHO_T}$cf_gnat_projects" >&6
19586
19587 if test $cf_gnat_projects = yes
19588 then
19589         echo "$as_me:19589: checking if GNAT supports libraries" >&5
19590 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19591         echo "$as_me:19591: result: $cf_gnat_libraries" >&5
19592 echo "${ECHO_T}$cf_gnat_libraries" >&6
19593 fi
19594
19595 if test "$cf_gnat_projects" = yes
19596 then
19597         USE_OLD_MAKERULES="#"
19598         USE_GNAT_PROJECTS=""
19599 else
19600         USE_OLD_MAKERULES=""
19601         USE_GNAT_PROJECTS="#"
19602 fi
19603
19604 if test "$cf_gnat_libraries" = yes
19605 then
19606         USE_GNAT_LIBRARIES=""
19607 else
19608         USE_GNAT_LIBRARIES="#"
19609 fi
19610
19611 echo "$as_me:19611: checking for ada-compiler" >&5
19612 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19613
19614 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19615 if test "${with_ada_compiler+set}" = set; then
19616   withval="$with_ada_compiler"
19617   cf_ada_compiler=$withval
19618 else
19619   cf_ada_compiler=gnatmake
19620 fi;
19621
19622 echo "$as_me:19622: result: $cf_ada_compiler" >&5
19623 echo "${ECHO_T}$cf_ada_compiler" >&6
19624
19625                         cf_ada_package=terminal_interface
19626
19627 echo "$as_me:19627: checking for ada-include" >&5
19628 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19629
19630 # Check whether --with-ada-include or --without-ada-include was given.
19631 if test "${with_ada_include+set}" = set; then
19632   withval="$with_ada_include"
19633
19634 else
19635   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19636 fi; if test -n "$prefix/share/ada/adainclude" ; then
19637
19638 if test "x$prefix" != xNONE; then
19639   cf_path_syntax="$prefix"
19640 else
19641   cf_path_syntax="$ac_default_prefix"
19642 fi
19643
19644 case ".$withval" in #(vi
19645 .\$\(*\)*|.\'*\'*) #(vi
19646   ;;
19647 ..|./*|.\\*) #(vi
19648   ;;
19649 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19650   ;;
19651 .\${*prefix}*|.\${*dir}*) #(vi
19652   eval withval="$withval"
19653   case ".$withval" in #(vi
19654   .NONE/*)
19655     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19656     ;;
19657   esac
19658   ;; #(vi
19659 .no|.NONE/*)
19660   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19661   ;;
19662 *)
19663   { { echo "$as_me:19663: error: expected a pathname, not \"$withval\"" >&5
19664 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19665    { (exit 1); exit 1; }; }
19666   ;;
19667 esac
19668
19669 fi
19670 eval ADA_INCLUDE="$withval"
19671
19672 echo "$as_me:19672: result: $ADA_INCLUDE" >&5
19673 echo "${ECHO_T}$ADA_INCLUDE" >&6
19674
19675 echo "$as_me:19675: checking for ada-objects" >&5
19676 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19677
19678 # Check whether --with-ada-objects or --without-ada-objects was given.
19679 if test "${with_ada_objects+set}" = set; then
19680   withval="$with_ada_objects"
19681
19682 else
19683   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19684 fi; if test -n "$prefix/lib/ada/adalib" ; then
19685
19686 if test "x$prefix" != xNONE; then
19687   cf_path_syntax="$prefix"
19688 else
19689   cf_path_syntax="$ac_default_prefix"
19690 fi
19691
19692 case ".$withval" in #(vi
19693 .\$\(*\)*|.\'*\'*) #(vi
19694   ;;
19695 ..|./*|.\\*) #(vi
19696   ;;
19697 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19698   ;;
19699 .\${*prefix}*|.\${*dir}*) #(vi
19700   eval withval="$withval"
19701   case ".$withval" in #(vi
19702   .NONE/*)
19703     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19704     ;;
19705   esac
19706   ;; #(vi
19707 .no|.NONE/*)
19708   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19709   ;;
19710 *)
19711   { { echo "$as_me:19711: error: expected a pathname, not \"$withval\"" >&5
19712 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19713    { (exit 1); exit 1; }; }
19714   ;;
19715 esac
19716
19717 fi
19718 eval ADA_OBJECTS="$withval"
19719
19720 echo "$as_me:19720: result: $ADA_OBJECTS" >&5
19721 echo "${ECHO_T}$ADA_OBJECTS" >&6
19722
19723 echo "$as_me:19723: checking if an Ada95 shared-library should be built" >&5
19724 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19725
19726 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19727 if test "${with_ada_sharedlib+set}" = set; then
19728   withval="$with_ada_sharedlib"
19729   with_ada_sharedlib=$withval
19730 else
19731   with_ada_sharedlib=no
19732 fi;
19733 echo "$as_me:19733: result: $with_ada_sharedlib" >&5
19734 echo "${ECHO_T}$with_ada_sharedlib" >&6
19735
19736 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19737 MAKE_ADA_SHAREDLIB="#"
19738
19739 if test "x$with_ada_sharedlib" != xno
19740 then
19741         MAKE_ADA_SHAREDLIB=
19742         if test "x$with_ada_sharedlib" != xyes
19743         then
19744                 ADA_SHAREDLIB="$with_ada_sharedlib"
19745         fi
19746 fi
19747
19748                 fi
19749         fi
19750 else
19751         cf_with_ada=no
19752 fi
19753
19754 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19755 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19756 ###
19757 ### ticlib modules may be a separate library, otherwise contained in termlib.
19758 ### termlib modules may be a separate library, otherwise contained in ncurses.
19759 ###
19760 ### The of "+" or " " between the tokens controls the way the script
19761 ### chooses to split module lists into libraries.
19762 ###
19763 ### (see CF_LIB_RULES).
19764 echo "$as_me:19764: checking for library subsets" >&5
19765 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19766 LIB_SUBSETS=
19767
19768 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19769         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19770         if test "$with_ticlib" != no ; then
19771                 LIB_SUBSETS="${LIB_SUBSETS} "
19772         else
19773                 LIB_SUBSETS="${LIB_SUBSETS}+"
19774         fi
19775 fi
19776
19777 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19778 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19779
19780 if test "$with_termlib" != no ; then
19781         LIB_SUBSETS="${LIB_SUBSETS} "
19782 else
19783         LIB_SUBSETS="${LIB_SUBSETS}+"
19784 fi
19785
19786 LIB_SUBSETS="${LIB_SUBSETS}base"
19787
19788 # Most term-driver calls are to tinfo, but some like init_pair are to the
19789 # base library (so it resides in base).
19790 if test "$with_term_driver" != no ; then
19791         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19792         case $cf_cv_system_name in #(vi
19793         *mingw32*) #(vi
19794                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19795                 ;;
19796         *) #(vi
19797                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19798                 ;;
19799         esac
19800 fi
19801
19802 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19803 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19804
19805 echo "$as_me:19805: result: $LIB_SUBSETS" >&5
19806 echo "${ECHO_T}$LIB_SUBSETS" >&6
19807
19808 ### Construct the list of include-directories to be generated
19809
19810 CPPFLAGS="$CPPFLAGS -I. -I../include"
19811 if test "$srcdir" != "."; then
19812         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19813 fi
19814 if test "$GCC" != yes; then
19815         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19816 elif test "$includedir" != "/usr/include"; then
19817         if test "$includedir" = '${prefix}/include' ; then
19818                 if test $prefix != /usr ; then
19819                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19820                 fi
19821         else
19822                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19823         fi
19824 fi
19825
19826 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19827 if test "$srcdir" != "."; then
19828         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19829 fi
19830 if test "$GCC" != yes; then
19831         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19832 elif test "$includedir" != "/usr/include"; then
19833         if test "$includedir" = '${prefix}/include' ; then
19834                 if test $prefix != /usr ; then
19835                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19836                 fi
19837         else
19838                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19839         fi
19840 fi
19841
19842 ### Build up pieces for makefile rules
19843 echo "$as_me:19843: checking default library suffix" >&5
19844 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19845
19846         case $DFT_LWR_MODEL in
19847         libtool) DFT_ARG_SUFFIX=''   ;;
19848         normal)  DFT_ARG_SUFFIX=''   ;;
19849         debug)   DFT_ARG_SUFFIX='_g' ;;
19850         profile) DFT_ARG_SUFFIX='_p' ;;
19851         shared)  DFT_ARG_SUFFIX=''   ;;
19852         esac
19853         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19854 echo "$as_me:19854: result: $DFT_ARG_SUFFIX" >&5
19855 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19856
19857 echo "$as_me:19857: checking default library-dependency suffix" >&5
19858 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19859
19860         case $DFT_LWR_MODEL in #(vi
19861         libtool) #(vi
19862                 DFT_LIB_SUFFIX='.la'
19863                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19864                 ;;
19865         normal) #(vi
19866                 DFT_LIB_SUFFIX='.a'
19867                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19868                 ;;
19869         debug) #(vi
19870                 DFT_LIB_SUFFIX='_g.a'
19871                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19872                 ;;
19873         profile) #(vi
19874                 DFT_LIB_SUFFIX='_p.a'
19875                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19876                 ;;
19877         shared) #(vi
19878                 case $cf_cv_system_name in
19879                 aix[5-7]*) #(vi
19880                         DFT_LIB_SUFFIX='.a'
19881                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19882                         ;;
19883                 cygwin*|mingw*) #(vi
19884                         DFT_LIB_SUFFIX='.dll'
19885                         DFT_DEP_SUFFIX='.dll.a'
19886                         ;;
19887                 darwin*) #(vi
19888                         DFT_LIB_SUFFIX='.dylib'
19889                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19890                         ;;
19891                 hpux*) #(vi
19892                         case $target in
19893                         ia64*) #(vi
19894                                 DFT_LIB_SUFFIX='.so'
19895                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19896                                 ;;
19897                         *) #(vi
19898                                 DFT_LIB_SUFFIX='.sl'
19899                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19900                                 ;;
19901                         esac
19902                         ;;
19903                 *)      DFT_LIB_SUFFIX='.so'
19904                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19905                         ;;
19906                 esac
19907         esac
19908         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19909         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19910 echo "$as_me:19910: result: $DFT_DEP_SUFFIX" >&5
19911 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19912
19913 echo "$as_me:19913: checking default object directory" >&5
19914 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19915
19916         case $DFT_LWR_MODEL in
19917         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19918         normal)  DFT_OBJ_SUBDIR='objects' ;;
19919         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19920         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19921         shared)
19922                 case $cf_cv_system_name in #(vi
19923                 cygwin) #(vi
19924                         DFT_OBJ_SUBDIR='objects' ;;
19925                 *)
19926                         DFT_OBJ_SUBDIR='obj_s' ;;
19927                 esac
19928         esac
19929 echo "$as_me:19929: result: $DFT_OBJ_SUBDIR" >&5
19930 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19931
19932 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19933 if test "$cf_with_cxx" = yes ; then
19934 echo "$as_me:19934: checking c++ library-dependency suffix" >&5
19935 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19936 if test "$with_libtool" != "no"; then
19937         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19938 else
19939
19940         case normal in #(vi
19941         libtool) #(vi
19942                 CXX_LIB_SUFFIX='.la'
19943                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19944                 ;;
19945         normal) #(vi
19946                 CXX_LIB_SUFFIX='.a'
19947                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19948                 ;;
19949         debug) #(vi
19950                 CXX_LIB_SUFFIX='_g.a'
19951                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19952                 ;;
19953         profile) #(vi
19954                 CXX_LIB_SUFFIX='_p.a'
19955                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19956                 ;;
19957         shared) #(vi
19958                 case $cf_cv_system_name in
19959                 aix[5-7]*) #(vi
19960                         CXX_LIB_SUFFIX='.a'
19961                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19962                         ;;
19963                 cygwin*|mingw*) #(vi
19964                         CXX_LIB_SUFFIX='.dll'
19965                         CXX_DEP_SUFFIX='.dll.a'
19966                         ;;
19967                 darwin*) #(vi
19968                         CXX_LIB_SUFFIX='.dylib'
19969                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19970                         ;;
19971                 hpux*) #(vi
19972                         case $target in
19973                         ia64*) #(vi
19974                                 CXX_LIB_SUFFIX='.so'
19975                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19976                                 ;;
19977                         *) #(vi
19978                                 CXX_LIB_SUFFIX='.sl'
19979                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19980                                 ;;
19981                         esac
19982                         ;;
19983                 *)      CXX_LIB_SUFFIX='.so'
19984                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19985                         ;;
19986                 esac
19987         esac
19988         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19989         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19990 fi
19991 echo "$as_me:19991: result: $CXX_LIB_SUFFIX" >&5
19992 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19993
19994 fi
19995
19996 # do not want -ldl in build except as needed for -lncurses dependency
19997 if test "$with_dlsym" = yes ; then
19998 if test $DFT_LWR_MODEL = shared || \
19999    test $DFT_LWR_MODEL = libtool ; then
20000
20001 # remove dl library from $LIBS
20002 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20003
20004 fi
20005 fi
20006 ### Set up low-level terminfo dependencies for makefiles.
20007
20008 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20009 # do not need libdl
20010 TICS_LIST=
20011 if test "$with_dlsym" = yes ; then
20012
20013 # remove dl library from $SHLIB_LIST
20014 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20015
20016 fi
20017
20018 if test "$with_ticlib" != no ; then
20019
20020         if test "$with_ticlib" != yes ; then
20021                 TICS_NAME=$with_ticlib
20022                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20023                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20024                 TICS_LIB_SUFFIX="${with_ticlib}"
20025         else
20026                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20027                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20028                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20029         fi
20030         TICS_LDFLAGS="-L${LIB_DIR}"
20031         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20032 else
20033         TICS_LDFLAGS="-L${LIB_DIR}"
20034         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20035 fi
20036
20037 if test "$with_termlib" != no ; then
20038
20039         if test "$with_termlib" != yes ; then
20040                 TINFO_NAME=$with_termlib
20041                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20042                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20043                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20044                 TINFO_LIB_SUFFIX="${with_termlib}"
20045         else
20046                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20047                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20048                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20049                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20050         fi
20051
20052         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20053         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20054         if test "$DFT_LWR_MODEL" = "libtool"; then
20055                 TEST_ARGS="${TEST_DEPS}"
20056                 TEST_ARG2="${TEST_DEP2}"
20057                 TINFO_LDFLAGS="-L${LIB_DIR}"
20058                 TINFO_LIBS="$TEST_ARGS"
20059                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20060                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20061         else
20062                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20063                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20064                 if test "x$with_term_driver" != xno ; then
20065                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20066                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20067                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20068                 else
20069                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20070                         TINFO_LIBS="$TEST_ARGS"
20071                 fi
20072                 TINFO_LDFLAGS="-L${LIB_DIR}"
20073                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20074         fi
20075 else
20076         # the next lines are needed for linking libtic over libncurses
20077         TINFO_NAME=${LIB_NAME}
20078         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20079         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20080         if test "$with_tic_depends" = yes ; then
20081                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20082         else
20083                 TICS_LIST="$SHLIB_LIST"
20084         fi
20085
20086         TINFO_LDFLAGS="-L${LIB_DIR}"
20087         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20088 fi
20089
20090 if test "$DFT_LWR_MODEL" = shared ; then
20091         case $cf_cv_system_name in #(vi
20092         cygwin*)
20093                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20094                 TINFO_SUFFIX=.dll
20095                 ;;
20096         esac
20097 fi
20098
20099 if test "$with_dlsym" = yes ; then
20100
20101 # remove dl library from $TICS_LIST
20102 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20103
20104 fi
20105
20106 if test "$DFT_LWR_MODEL" = "libtool"; then
20107     OBJEXT=lo
20108 fi
20109
20110 # needed for Ada95
20111 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20112
20113 case $DFT_LWR_MODEL in
20114 normal|debug|profile)
20115
20116 if test "$GCC" = yes ; then
20117         case $cf_cv_system_name in #(
20118         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20119                 LDFLAGS_STATIC=
20120                 LDFLAGS_SHARED=
20121                 ;;
20122     *)  #( normally, except when broken
20123         LDFLAGS_STATIC=-static
20124         LDFLAGS_SHARED=-dynamic
20125         ;;
20126     esac
20127 else
20128         case $cf_cv_system_name in #(
20129         aix[4-7]*)      #( from ld manpage
20130                 LDFLAGS_STATIC=-bstatic
20131                 LDFLAGS_SHARED=-bdynamic
20132                 ;;
20133         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20134                 # We could also use just "archive" and "shared".
20135                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20136                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20137                 ;;
20138         irix*)          #( from ld manpage IRIX64
20139                 LDFLAGS_STATIC=-Bstatic
20140                 LDFLAGS_SHARED=-Bdynamic
20141                 ;;
20142         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20143                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20144                 LDFLAGS_STATIC=-noso
20145                 LDFLAGS_SHARED=-so_archive
20146                 ;;
20147         solaris2*)
20148                 LDFLAGS_STATIC=-Bstatic
20149                 LDFLAGS_SHARED=-Bdynamic
20150                 ;;
20151         esac
20152 fi
20153
20154 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20155 then
20156         echo "$as_me:20156: checking if linker supports switching between static/dynamic" >&5
20157 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20158
20159         rm -f libconftest.a
20160         cat >conftest.$ac_ext <<EOF
20161 #line 20161 "configure"
20162 #include <stdio.h>
20163 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20164 EOF
20165         if { (eval echo "$as_me:20165: \"$ac_compile\"") >&5
20166   (eval $ac_compile) 2>&5
20167   ac_status=$?
20168   echo "$as_me:20168: \$? = $ac_status" >&5
20169   (exit $ac_status); } ; then
20170                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20171                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20172         fi
20173         rm -f conftest.*
20174
20175         cf_save_LIBS="$LIBS"
20176
20177         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20178         cat >conftest.$ac_ext <<_ACEOF
20179 #line 20179 "configure"
20180 #include "confdefs.h"
20181
20182 #line 20182 "configure"
20183 #include <stdio.h>
20184 int cf_ldflags_static(FILE *fp);
20185
20186 int
20187 main ()
20188 {
20189
20190         return cf_ldflags_static(stdin);
20191
20192   ;
20193   return 0;
20194 }
20195 _ACEOF
20196 rm -f conftest.$ac_objext conftest$ac_exeext
20197 if { (eval echo "$as_me:20197: \"$ac_link\"") >&5
20198   (eval $ac_link) 2>&5
20199   ac_status=$?
20200   echo "$as_me:20200: \$? = $ac_status" >&5
20201   (exit $ac_status); } &&
20202          { ac_try='test -s conftest$ac_exeext'
20203   { (eval echo "$as_me:20203: \"$ac_try\"") >&5
20204   (eval $ac_try) 2>&5
20205   ac_status=$?
20206   echo "$as_me:20206: \$? = $ac_status" >&5
20207   (exit $ac_status); }; }; then
20208
20209         # some linkers simply ignore the -dynamic
20210         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20211         *static*) # (vi
20212                 cf_ldflags_static=no
20213                 ;;
20214         *)
20215                 cf_ldflags_static=yes
20216                 ;;
20217         esac
20218
20219 else
20220   echo "$as_me: failed program was:" >&5
20221 cat conftest.$ac_ext >&5
20222 cf_ldflags_static=no
20223 fi
20224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20225
20226         rm -f libconftest.*
20227         LIBS="$cf_save_LIBS"
20228
20229         echo "$as_me:20229: result: $cf_ldflags_static" >&5
20230 echo "${ECHO_T}$cf_ldflags_static" >&6
20231
20232         if test $cf_ldflags_static != yes
20233         then
20234                 LDFLAGS_STATIC=
20235                 LDFLAGS_SHARED=
20236         fi
20237 else
20238         LDFLAGS_STATIC=
20239         LDFLAGS_SHARED=
20240 fi
20241
20242         ;;
20243 esac
20244
20245 echo "$as_me:20245: checking where we will install curses.h" >&5
20246 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20247 test "$with_overwrite" = no && \
20248 test "x$includedir" = 'x${prefix}/include' && \
20249         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20250 echo "$as_me:20250: result: $includedir" >&5
20251 echo "${ECHO_T}$includedir" >&6
20252
20253 ### Resolve a conflict between normal and wide-curses by forcing applications
20254 ### that will need libutf8 to add it to their configure script.
20255 if test "$with_overwrite" != no ; then
20256 if test "$NCURSES_LIBUTF8" = 1 ; then
20257         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20258         { echo "$as_me:20258: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20259 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20260 fi
20261 fi
20262 WITH_OVERWRITE=$with_overwrite
20263
20264 # used to separate tack out of the tree
20265 NCURSES_TREE=
20266
20267 ### predefined stuff for the test programs
20268 cat >>confdefs.h <<\EOF
20269 #define HAVE_SLK_COLOR 1
20270 EOF
20271
20272 ### Construct the list of subdirectories for which we'll customize makefiles
20273 ### with the appropriate compile-rules.
20274
20275 echo "$as_me:20275: checking for src modules" >&5
20276 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20277
20278 # dependencies and linker-arguments for test-programs
20279 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20280 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20281 if test "$DFT_LWR_MODEL" = "libtool"; then
20282         TEST_ARGS="${TEST_DEPS}"
20283         TEST_ARG2="${TEST_DEP2}"
20284 else
20285         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20286         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20287 fi
20288
20289 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20290 cf_cv_src_modules=
20291 for cf_dir in $modules_to_build
20292 do
20293         if test -f $srcdir/$cf_dir/modules; then
20294
20295                 # We may/may not have tack in the distribution, though the
20296                 # makefile is.
20297                 if test $cf_dir = tack ; then
20298                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20299                                 continue
20300                         fi
20301                 fi
20302
20303                 if test -z "$cf_cv_src_modules"; then
20304                         cf_cv_src_modules=$cf_dir
20305                 else
20306                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20307                 fi
20308
20309                 # Make the ncurses_cfg.h file record the library interface files as
20310                 # well.  These are header files that are the same name as their
20311                 # directory.  Ncurses is the only library that does not follow
20312                 # that pattern.
20313                 if test $cf_dir = tack ; then
20314                         continue
20315                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20316
20317 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20318
20319                         cat >>confdefs.h <<EOF
20320 #define HAVE_${cf_have_include}_H 1
20321 EOF
20322
20323                         cat >>confdefs.h <<EOF
20324 #define HAVE_LIB${cf_have_include} 1
20325 EOF
20326
20327                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20328                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20329                         if test "$DFT_LWR_MODEL" = "libtool"; then
20330                                 TEST_ARGS="${TEST_DEPS}"
20331                                 TEST_ARG2="${TEST_DEP2}"
20332                         else
20333                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20334                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20335                         fi
20336                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20337                 fi
20338         fi
20339 done
20340 echo "$as_me:20340: result: $cf_cv_src_modules" >&5
20341 echo "${ECHO_T}$cf_cv_src_modules" >&6
20342
20343 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20344 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20345
20346 SRC_SUBDIRS=
20347 if test "x$cf_with_manpages" != xno ; then
20348         SRC_SUBDIRS="$SRC_SUBDIRS man"
20349 fi
20350 SRC_SUBDIRS="$SRC_SUBDIRS include"
20351 for cf_dir in $cf_cv_src_modules
20352 do
20353         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20354 done
20355 if test "x$cf_with_tests" != "xno" ; then
20356         SRC_SUBDIRS="$SRC_SUBDIRS test"
20357 fi
20358 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20359 if test "$cf_with_cxx_binding" != no; then
20360         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20361         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20362 fi
20363
20364 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20365 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20366
20367 ADA_SUBDIRS=
20368 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20369         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20370         ADA_SUBDIRS="gen src"
20371         if test "x$cf_with_tests" != "xno" ; then
20372                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20373         fi
20374 fi
20375
20376 SUB_MAKEFILES=
20377 for cf_dir in $SRC_SUBDIRS
20378 do
20379         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20380 done
20381
20382 if test -n "$ADA_SUBDIRS"; then
20383         for cf_dir in $ADA_SUBDIRS
20384         do
20385                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20386         done
20387
20388 fi
20389
20390 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20391    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20392    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20393 fi
20394
20395 DIRS_TO_MAKE="lib"
20396 for cf_item in $cf_list_models
20397 do
20398
20399         case $cf_item in
20400         libtool) cf_subdir='obj_lo'  ;;
20401         normal)  cf_subdir='objects' ;;
20402         debug)   cf_subdir='obj_g' ;;
20403         profile) cf_subdir='obj_p' ;;
20404         shared)
20405                 case $cf_cv_system_name in #(vi
20406                 cygwin) #(vi
20407                         cf_subdir='objects' ;;
20408                 *)
20409                         cf_subdir='obj_s' ;;
20410                 esac
20411         esac
20412
20413         for cf_item2 in $DIRS_TO_MAKE
20414         do
20415                 test $cf_item2 = $cf_subdir && break
20416         done
20417         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20418 done
20419 for cf_dir in $DIRS_TO_MAKE
20420 do
20421         test ! -d $cf_dir && mkdir $cf_dir
20422 done
20423
20424 # symbols that differ when compiling Ada95 by itself.
20425 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20426
20427 # values to use as strings
20428 cat >>confdefs.h <<EOF
20429 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20430 EOF
20431
20432 cat >>confdefs.h <<EOF
20433 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20434 EOF
20435
20436 ### Now that we're done running tests, add the compiler-warnings, if any
20437
20438 cf_fix_cppflags=no
20439 cf_new_cflags=
20440 cf_new_cppflags=
20441 cf_new_extra_cppflags=
20442
20443 for cf_add_cflags in $EXTRA_CFLAGS
20444 do
20445 case $cf_fix_cppflags in
20446 no)
20447         case $cf_add_cflags in #(vi
20448         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20449                 case $cf_add_cflags in
20450                 -D*)
20451                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20452
20453                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20454                                 && test -z "${cf_tst_cflags}" \
20455                                 && cf_fix_cppflags=yes
20456
20457                         if test $cf_fix_cppflags = yes ; then
20458                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20459                                 continue
20460                         elif test "${cf_tst_cflags}" = "\"'" ; then
20461                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20462                                 continue
20463                         fi
20464                         ;;
20465                 esac
20466                 case "$CPPFLAGS" in
20467                 *$cf_add_cflags) #(vi
20468                         ;;
20469                 *) #(vi
20470                         case $cf_add_cflags in #(vi
20471                         -D*)
20472                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20473
20474 CPPFLAGS=`echo "$CPPFLAGS" | \
20475         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20476                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20477
20478                                 ;;
20479                         esac
20480                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20481                         ;;
20482                 esac
20483                 ;;
20484         *)
20485                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20486                 ;;
20487         esac
20488         ;;
20489 yes)
20490         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20491
20492         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20493
20494         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20495                 && test -z "${cf_tst_cflags}" \
20496                 && cf_fix_cppflags=no
20497         ;;
20498 esac
20499 done
20500
20501 if test -n "$cf_new_cflags" ; then
20502
20503         CFLAGS="$CFLAGS $cf_new_cflags"
20504 fi
20505
20506 if test -n "$cf_new_cppflags" ; then
20507
20508         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20509 fi
20510
20511 if test -n "$cf_new_extra_cppflags" ; then
20512
20513         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20514 fi
20515
20516 ### Define substitutions for header files to avoid name-pollution
20517
20518 if test "$cf_cv_have_tcgetattr" = yes ; then
20519         HAVE_TCGETATTR=1
20520 else
20521         HAVE_TCGETATTR=0
20522 fi
20523
20524 if test "$ac_cv_header_termio_h" = yes ; then
20525         HAVE_TERMIO_H=1
20526 else
20527         HAVE_TERMIO_H=0
20528 fi
20529
20530 if test "$ac_cv_header_termios_h" = yes ; then
20531         HAVE_TERMIOS_H=1
20532 else
20533         HAVE_TERMIOS_H=0
20534 fi
20535
20536 ################################################################################
20537 test "$use_database" = yes && \
20538 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20539
20540 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20541 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20542
20543 if test x"$enable_pc_files" = xyes ; then \
20544 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20545 MAKE_PC_FILES=
20546 else
20547 MAKE_PC_FILES="#"
20548 fi
20549
20550 # Extract the first word of "tic", so it can be a program name with args.
20551 set dummy tic; ac_word=$2
20552 echo "$as_me:20552: checking for $ac_word" >&5
20553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20554 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20555   echo $ECHO_N "(cached) $ECHO_C" >&6
20556 else
20557   case $TIC_PATH in
20558   [\\/]* | ?:[\\/]*)
20559   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20560   ;;
20561   *)
20562   ac_save_IFS=$IFS; IFS=$ac_path_separator
20563 ac_dummy="$PATH:/usr/local/ncurses/bin"
20564 for ac_dir in $ac_dummy; do
20565   IFS=$ac_save_IFS
20566   test -z "$ac_dir" && ac_dir=.
20567   if $as_executable_p "$ac_dir/$ac_word"; then
20568    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20569    echo "$as_me:20569: found $ac_dir/$ac_word" >&5
20570    break
20571 fi
20572 done
20573
20574   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20575   ;;
20576 esac
20577 fi
20578 TIC_PATH=$ac_cv_path_TIC_PATH
20579
20580 if test -n "$TIC_PATH"; then
20581   echo "$as_me:20581: result: $TIC_PATH" >&5
20582 echo "${ECHO_T}$TIC_PATH" >&6
20583 else
20584   echo "$as_me:20584: result: no" >&5
20585 echo "${ECHO_T}no" >&6
20586 fi
20587
20588 if test -n "$FALLBACK_LIST"
20589 then
20590         if test "$TIC_PATH" = unknown
20591         then
20592                 { echo "$as_me:20592: WARNING: no tic program found for fallbacks" >&5
20593 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20594         fi
20595 fi
20596
20597 if test "x$cf_with_tests" != xno ; then
20598         MAKE_TESTS=
20599 else
20600         MAKE_TESTS="#"
20601 fi
20602
20603 ADAHTML_DIR=../../doc/html/ada
20604
20605 SUB_SCRIPTS=
20606
20607 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"
20608 ac_config_commands="$ac_config_commands default"
20609 cat >confcache <<\_ACEOF
20610 # This file is a shell script that caches the results of configure
20611 # tests run on this system so they can be shared between configure
20612 # scripts and configure runs, see configure's option --config-cache.
20613 # It is not useful on other systems.  If it contains results you don't
20614 # want to keep, you may remove or edit it.
20615 #
20616 # config.status only pays attention to the cache file if you give it
20617 # the --recheck option to rerun configure.
20618 #
20619 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20620 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20621 # following values.
20622
20623 _ACEOF
20624
20625 # The following way of writing the cache mishandles newlines in values,
20626 # but we know of no workaround that is simple, portable, and efficient.
20627 # So, don't put newlines in cache variables' values.
20628 # Ultrix sh set writes to stderr and can't be redirected directly,
20629 # and sets the high bit in the cache file unless we assign to the vars.
20630 {
20631   (set) 2>&1 |
20632     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20633     *ac_space=\ *)
20634       # `set' does not quote correctly, so add quotes (double-quote
20635       # substitution turns \\\\ into \\, and sed turns \\ into \).
20636       sed -n \
20637         "s/'/'\\\\''/g;
20638           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20639       ;;
20640     *)
20641       # `set' quotes correctly as required by POSIX, so do not add quotes.
20642       sed -n \
20643         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20644       ;;
20645     esac;
20646 } |
20647   sed '
20648      t clear
20649      : clear
20650      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20651      t end
20652      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20653      : end' >>confcache
20654 if cmp -s $cache_file confcache; then :; else
20655   if test -w $cache_file; then
20656     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20657     cat confcache >$cache_file
20658   else
20659     echo "not updating unwritable cache $cache_file"
20660   fi
20661 fi
20662 rm -f confcache
20663
20664 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20665 # Let make expand exec_prefix.
20666 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20667
20668 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20669 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20670 # trailing colons and then remove the whole line if VPATH becomes empty
20671 # (actually we leave an empty line to preserve line numbers).
20672 if test "x$srcdir" = x.; then
20673   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20674 s/:*\$(srcdir):*/:/;
20675 s/:*\${srcdir}:*/:/;
20676 s/:*@srcdir@:*/:/;
20677 s/^\([^=]*=[    ]*\):*/\1/;
20678 s/:*$//;
20679 s/^[^=]*=[      ]*$//;
20680 }'
20681 fi
20682
20683 DEFS=-DHAVE_CONFIG_H
20684
20685 : ${CONFIG_STATUS=./config.status}
20686 ac_clean_files_save=$ac_clean_files
20687 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20688 { echo "$as_me:20688: creating $CONFIG_STATUS" >&5
20689 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20690 cat >$CONFIG_STATUS <<_ACEOF
20691 #! $SHELL
20692 # Generated automatically by configure.
20693 # Run this file to recreate the current configuration.
20694 # Compiler output produced by configure, useful for debugging
20695 # configure, is in config.log if it exists.
20696
20697 debug=false
20698 SHELL=\${CONFIG_SHELL-$SHELL}
20699 ac_cs_invocation="\$0 \$@"
20700
20701 _ACEOF
20702
20703 cat >>$CONFIG_STATUS <<\_ACEOF
20704 # Be Bourne compatible
20705 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20706   emulate sh
20707   NULLCMD=:
20708 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20709   set -o posix
20710 fi
20711
20712 # Name of the executable.
20713 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20714
20715 if expr a : '\(a\)' >/dev/null 2>&1; then
20716   as_expr=expr
20717 else
20718   as_expr=false
20719 fi
20720
20721 rm -f conf$$ conf$$.exe conf$$.file
20722 echo >conf$$.file
20723 if ln -s conf$$.file conf$$ 2>/dev/null; then
20724   # We could just check for DJGPP; but this test a) works b) is more generic
20725   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20726   if test -f conf$$.exe; then
20727     # Don't use ln at all; we don't have any links
20728     as_ln_s='cp -p'
20729   else
20730     as_ln_s='ln -s'
20731   fi
20732 elif ln conf$$.file conf$$ 2>/dev/null; then
20733   as_ln_s=ln
20734 else
20735   as_ln_s='cp -p'
20736 fi
20737 rm -f conf$$ conf$$.exe conf$$.file
20738
20739 as_executable_p="test -f"
20740
20741 # Support unset when possible.
20742 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20743   as_unset=unset
20744 else
20745   as_unset=false
20746 fi
20747
20748 # NLS nuisances.
20749 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20750 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20751 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20752 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20753 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20754 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20755 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20756 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20757
20758 # IFS
20759 # We need space, tab and new line, in precisely that order.
20760 as_nl='
20761 '
20762 IFS="   $as_nl"
20763
20764 # CDPATH.
20765 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20766
20767 exec 6>&1
20768
20769 _ACEOF
20770
20771 # Files that config.status was made for.
20772 if test -n "$ac_config_files"; then
20773   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20774 fi
20775
20776 if test -n "$ac_config_headers"; then
20777   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20778 fi
20779
20780 if test -n "$ac_config_links"; then
20781   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20782 fi
20783
20784 if test -n "$ac_config_commands"; then
20785   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20786 fi
20787
20788 cat >>$CONFIG_STATUS <<\EOF
20789
20790 ac_cs_usage="\
20791 \`$as_me' instantiates files from templates according to the
20792 current configuration.
20793
20794 Usage: $0 [OPTIONS] [FILE]...
20795
20796   -h, --help       print this help, then exit
20797   -V, --version    print version number, then exit
20798   -d, --debug      don't remove temporary files
20799       --recheck    update $as_me by reconfiguring in the same conditions
20800   --file=FILE[:TEMPLATE]
20801                    instantiate the configuration file FILE
20802   --header=FILE[:TEMPLATE]
20803                    instantiate the configuration header FILE
20804
20805 Configuration files:
20806 $config_files
20807
20808 Configuration headers:
20809 $config_headers
20810
20811 Configuration commands:
20812 $config_commands
20813
20814 Report bugs to <dickey@invisible-island.net>."
20815 EOF
20816
20817 cat >>$CONFIG_STATUS <<EOF
20818 ac_cs_version="\\
20819 config.status
20820 configured by $0, generated by GNU Autoconf 2.52.20120811,
20821   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20822
20823 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20824 Free Software Foundation, Inc.
20825 This config.status script is free software; the Free Software Foundation
20826 gives unlimited permission to copy, distribute and modify it."
20827 srcdir=$srcdir
20828 INSTALL="$INSTALL"
20829 EOF
20830
20831 cat >>$CONFIG_STATUS <<\EOF
20832 # If no file are specified by the user, then we need to provide default
20833 # value.  By we need to know if files were specified by the user.
20834 ac_need_defaults=:
20835 while test $# != 0
20836 do
20837   case $1 in
20838   --*=*)
20839     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20840     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20841     shift
20842     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20843     shift
20844     ;;
20845   -*);;
20846   *) # This is not an option, so the user has probably given explicit
20847      # arguments.
20848      ac_need_defaults=false;;
20849   esac
20850
20851   case $1 in
20852   # Handling of the options.
20853 EOF
20854 cat >>$CONFIG_STATUS <<EOF
20855   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20856     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20857     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20858 EOF
20859 cat >>$CONFIG_STATUS <<\EOF
20860   --version | --vers* | -V )
20861     echo "$ac_cs_version"; exit 0 ;;
20862   --he | --h)
20863     # Conflict between --help and --header
20864     { { echo "$as_me:20864: error: ambiguous option: $1
20865 Try \`$0 --help' for more information." >&5
20866 echo "$as_me: error: ambiguous option: $1
20867 Try \`$0 --help' for more information." >&2;}
20868    { (exit 1); exit 1; }; };;
20869   --help | --hel | -h )
20870     echo "$ac_cs_usage"; exit 0 ;;
20871   --debug | --d* | -d )
20872     debug=: ;;
20873   --file | --fil | --fi | --f )
20874     shift
20875     CONFIG_FILES="$CONFIG_FILES $1"
20876     ac_need_defaults=false;;
20877   --header | --heade | --head | --hea )
20878     shift
20879     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20880     ac_need_defaults=false;;
20881
20882   # This is an error.
20883   -*) { { echo "$as_me:20883: error: unrecognized option: $1
20884 Try \`$0 --help' for more information." >&5
20885 echo "$as_me: error: unrecognized option: $1
20886 Try \`$0 --help' for more information." >&2;}
20887    { (exit 1); exit 1; }; } ;;
20888
20889   *) ac_config_targets="$ac_config_targets $1" ;;
20890
20891   esac
20892   shift
20893 done
20894
20895 exec 5>>config.log
20896 cat >&5 << _ACEOF
20897
20898 ## ----------------------- ##
20899 ## Running config.status.  ##
20900 ## ----------------------- ##
20901
20902 This file was extended by $as_me 2.52.20120811, executed with
20903   CONFIG_FILES    = $CONFIG_FILES
20904   CONFIG_HEADERS  = $CONFIG_HEADERS
20905   CONFIG_LINKS    = $CONFIG_LINKS
20906   CONFIG_COMMANDS = $CONFIG_COMMANDS
20907   > $ac_cs_invocation
20908 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20909
20910 _ACEOF
20911 EOF
20912
20913 cat >>$CONFIG_STATUS <<EOF
20914 #
20915 # INIT-COMMANDS section.
20916 #
20917
20918 ### Special initialization commands, used to pass information from the
20919 ### configuration-run into config.status
20920
20921 AWK="$AWK"
20922 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20923 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20924 ECHO_LD="$ECHO_LD"
20925 LDCONFIG="$LDCONFIG"
20926 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20927 LIB_NAME="$LIB_NAME"
20928 LIB_PREFIX="$LIB_PREFIX"
20929 LIB_SUBSETS="$LIB_SUBSETS"
20930 LIB_SUFFIX="$LIB_SUFFIX"
20931 LIB_TRACING="$LIB_TRACING"
20932 LN_S="$LN_S"
20933 MAKE_TERMINFO="$MAKE_TERMINFO"
20934 NCURSES_MAJOR="$NCURSES_MAJOR"
20935 NCURSES_MINOR="$NCURSES_MINOR"
20936 NCURSES_OSPEED="$NCURSES_OSPEED"
20937 NCURSES_PATCH="$NCURSES_PATCH"
20938 SRC_SUBDIRS="$SRC_SUBDIRS"
20939 TERMINFO="$TERMINFO"
20940 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20941 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20942 TICS_NAME="$TICS_NAME"
20943 TIC_PATH="$TIC_PATH"
20944 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20945 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20946 TINFO_NAME="$TINFO_NAME"
20947 TINFO_SUFFIX="$TINFO_SUFFIX"
20948 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20949 WITH_CURSES_H="$with_curses_h"
20950 WITH_ECHO="${enable_echo:=yes}"
20951 WITH_OVERWRITE="$with_overwrite"
20952 cf_LIST_MODELS="$cf_list_models"
20953 cf_cv_abi_version="$cf_cv_abi_version"
20954 cf_cv_do_relink="$cf_cv_do_relink"
20955 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20956 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20957 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20958 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20959 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20960 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20961 cf_cv_rel_version="$cf_cv_rel_version"
20962 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20963 cf_cv_shared_soname='$cf_cv_shared_soname'
20964 cf_cv_shlib_version="$cf_cv_shlib_version"
20965 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20966 cf_cv_system_name="$cf_cv_system_name"
20967 cf_cv_term_driver="$with_term_driver"
20968 cf_with_ada="$cf_with_ada"
20969 cf_with_cxx_binding="$cf_with_cxx_binding"
20970 cf_with_manpages="$cf_with_manpages"
20971 cf_with_tests="$cf_with_tests"
20972 host="$host"
20973 target="$target"
20974
20975 EOF
20976
20977 cat >>$CONFIG_STATUS <<\EOF
20978 for ac_config_target in $ac_config_targets
20979 do
20980   case "$ac_config_target" in
20981   # Handling of arguments.
20982   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20983   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20984   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20985   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20986   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20987   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20988   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20989   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20990   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20991   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20992   *) { { echo "$as_me:20992: error: invalid argument: $ac_config_target" >&5
20993 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20994    { (exit 1); exit 1; }; };;
20995   esac
20996 done
20997
20998 # If the user did not use the arguments to specify the items to instantiate,
20999 # then the envvar interface is used.  Set only those that are not.
21000 # We use the long form for the default assignment because of an extremely
21001 # bizarre bug on SunOS 4.1.3.
21002 if $ac_need_defaults; then
21003   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21004   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21005   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21006 fi
21007
21008 # Create a temporary directory, and hook for its removal unless debugging.
21009 $debug ||
21010 {
21011   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21012   trap '{ (exit 1); exit 1; }' 1 2 13 15
21013 }
21014
21015 # Create a (secure) tmp directory for tmp files.
21016 : ${TMPDIR=/tmp}
21017 {
21018   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21019   test -n "$tmp" && test -d "$tmp"
21020 }  ||
21021 {
21022   tmp=$TMPDIR/cs$$-$RANDOM
21023   (umask 077 && mkdir $tmp)
21024 } ||
21025 {
21026    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21027    { (exit 1); exit 1; }
21028 }
21029
21030 EOF
21031
21032 cat >>$CONFIG_STATUS <<EOF
21033
21034 #
21035 # CONFIG_FILES section.
21036 #
21037
21038 # No need to generate the scripts if there are no CONFIG_FILES.
21039 # This happens for instance when ./config.status config.h
21040 if test -n "\$CONFIG_FILES"; then
21041   # Protect against being on the right side of a sed subst in config.status.
21042   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21043    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21044 s,@SHELL@,$SHELL,;t t
21045 s,@exec_prefix@,$exec_prefix,;t t
21046 s,@prefix@,$prefix,;t t
21047 s,@program_transform_name@,$program_transform_name,;t t
21048 s,@bindir@,$bindir,;t t
21049 s,@sbindir@,$sbindir,;t t
21050 s,@libexecdir@,$libexecdir,;t t
21051 s,@datarootdir@,$datarootdir,;t t
21052 s,@datadir@,$datadir,;t t
21053 s,@sysconfdir@,$sysconfdir,;t t
21054 s,@sharedstatedir@,$sharedstatedir,;t t
21055 s,@localstatedir@,$localstatedir,;t t
21056 s,@libdir@,$libdir,;t t
21057 s,@includedir@,$includedir,;t t
21058 s,@oldincludedir@,$oldincludedir,;t t
21059 s,@infodir@,$infodir,;t t
21060 s,@mandir@,$mandir,;t t
21061 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21062 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21063 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21064 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21065 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21066 s,@build_alias@,$build_alias,;t t
21067 s,@host_alias@,$host_alias,;t t
21068 s,@target_alias@,$target_alias,;t t
21069 s,@ECHO_C@,$ECHO_C,;t t
21070 s,@ECHO_N@,$ECHO_N,;t t
21071 s,@ECHO_T@,$ECHO_T,;t t
21072 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21073 s,@DEFS@,$DEFS,;t t
21074 s,@LIBS@,$LIBS,;t t
21075 s,@top_builddir@,$top_builddir,;t t
21076 s,@EGREP@,$EGREP,;t t
21077 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21078 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21079 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21080 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21081 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21082 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21083 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21084 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21085 s,@build@,$build,;t t
21086 s,@build_cpu@,$build_cpu,;t t
21087 s,@build_vendor@,$build_vendor,;t t
21088 s,@build_os@,$build_os,;t t
21089 s,@host@,$host,;t t
21090 s,@host_cpu@,$host_cpu,;t t
21091 s,@host_vendor@,$host_vendor,;t t
21092 s,@host_os@,$host_os,;t t
21093 s,@target@,$target,;t t
21094 s,@target_cpu@,$target_cpu,;t t
21095 s,@target_vendor@,$target_vendor,;t t
21096 s,@target_os@,$target_os,;t t
21097 s,@CC@,$CC,;t t
21098 s,@CFLAGS@,$CFLAGS,;t t
21099 s,@LDFLAGS@,$LDFLAGS,;t t
21100 s,@CPPFLAGS@,$CPPFLAGS,;t t
21101 s,@ac_ct_CC@,$ac_ct_CC,;t t
21102 s,@EXEEXT@,$EXEEXT,;t t
21103 s,@OBJEXT@,$OBJEXT,;t t
21104 s,@CPP@,$CPP,;t t
21105 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21106 s,@PROG_EXT@,$PROG_EXT,;t t
21107 s,@LDCONFIG@,$LDCONFIG,;t t
21108 s,@CXX@,$CXX,;t t
21109 s,@CXXFLAGS@,$CXXFLAGS,;t t
21110 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21111 s,@AWK@,$AWK,;t t
21112 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21113 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21114 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21115 s,@LINT@,$LINT,;t t
21116 s,@LINT_OPTS@,$LINT_OPTS,;t t
21117 s,@LN_S@,$LN_S,;t t
21118 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21119 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21120 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21121 s,@SET_MAKE@,$SET_MAKE,;t t
21122 s,@CTAGS@,$CTAGS,;t t
21123 s,@ETAGS@,$ETAGS,;t t
21124 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21125 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21126 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21127 s,@RANLIB@,$RANLIB,;t t
21128 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21129 s,@LD@,$LD,;t t
21130 s,@ac_ct_LD@,$ac_ct_LD,;t t
21131 s,@AR@,$AR,;t t
21132 s,@ac_ct_AR@,$ac_ct_AR,;t t
21133 s,@ARFLAGS@,$ARFLAGS,;t t
21134 s,@DESTDIR@,$DESTDIR,;t t
21135 s,@BUILD_CC@,$BUILD_CC,;t t
21136 s,@BUILD_CPP@,$BUILD_CPP,;t t
21137 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21138 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21139 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21140 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21141 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21142 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21143 s,@cf_list_models@,$cf_list_models,;t t
21144 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21145 s,@LIBTOOL@,$LIBTOOL,;t t
21146 s,@LT_UNDEF@,$LT_UNDEF,;t t
21147 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21148 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21149 s,@LIB_CREATE@,$LIB_CREATE,;t t
21150 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21151 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21152 s,@LIB_PREP@,$LIB_PREP,;t t
21153 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21154 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21155 s,@LIB_LINK@,$LIB_LINK,;t t
21156 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21157 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21158 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21159 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21160 s,@TICS_NAME@,$TICS_NAME,;t t
21161 s,@TINFO_NAME@,$TINFO_NAME,;t t
21162 s,@LIB_NAME@,$LIB_NAME,;t t
21163 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21164 s,@CC_G_OPT@,$CC_G_OPT,;t t
21165 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21166 s,@LD_MODEL@,$LD_MODEL,;t t
21167 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21168 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21169 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21170 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21171 s,@LINK_PROGS@,$LINK_PROGS,;t t
21172 s,@LINK_TESTS@,$LINK_TESTS,;t t
21173 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21174 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21175 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21176 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21177 s,@RPATH_LIST@,$RPATH_LIST,;t t
21178 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21179 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21180 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21181 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21182 s,@XTERM_KBS@,$XTERM_KBS,;t t
21183 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21184 s,@TERMINFO@,$TERMINFO,;t t
21185 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21186 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21187 s,@TERMPATH@,$TERMPATH,;t t
21188 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21189 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21190 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21191 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21192 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21193 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21194 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21195 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21196 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21197 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21198 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21199 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21200 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21201 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21202 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21203 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21204 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21205 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21206 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21207 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21208 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21209 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21210 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21211 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21212 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21213 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21214 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21215 s,@PTHREAD@,$PTHREAD,;t t
21216 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21217 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21218 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21219 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21220 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21221 s,@ECHO_LT@,$ECHO_LT,;t t
21222 s,@ECHO_LD@,$ECHO_LD,;t t
21223 s,@RULE_CC@,$RULE_CC,;t t
21224 s,@SHOW_CC@,$SHOW_CC,;t t
21225 s,@ECHO_CC@,$ECHO_CC,;t t
21226 s,@ECHO_LINK@,$ECHO_LINK,;t t
21227 s,@ADAFLAGS@,$ADAFLAGS,;t t
21228 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21229 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21230 s,@ADA_TRACE@,$ADA_TRACE,;t t
21231 s,@MATH_LIB@,$MATH_LIB,;t t
21232 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21233 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21234 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21235 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21236 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21237 s,@TEST_LIBS@,$TEST_LIBS,;t t
21238 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21239 s,@CXXCPP@,$CXXCPP,;t t
21240 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21241 s,@CXX_AR@,$CXX_AR,;t t
21242 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21243 s,@CXXLIBS@,$CXXLIBS,;t t
21244 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21245 s,@gnat_exists@,$gnat_exists,;t t
21246 s,@M4_exists@,$M4_exists,;t t
21247 s,@cf_ada_make@,$cf_ada_make,;t t
21248 s,@cf_compile_generics@,$cf_compile_generics,;t t
21249 s,@cf_generic_objects@,$cf_generic_objects,;t t
21250 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21251 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21252 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21253 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21254 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21255 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21256 s,@cf_ada_package@,$cf_ada_package,;t t
21257 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21258 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21259 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21260 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21261 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21262 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21263 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21264 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21265 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21266 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21267 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21268 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21269 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21270 s,@TICS_LIBS@,$TICS_LIBS,;t t
21271 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21272 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21273 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21274 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21275 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21276 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21277 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21278 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21279 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21280 s,@TICS_LIST@,$TICS_LIST,;t t
21281 s,@TINFO_LIST@,$TINFO_LIST,;t t
21282 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21283 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21284 s,@TEST_ARGS@,$TEST_ARGS,;t t
21285 s,@TEST_DEPS@,$TEST_DEPS,;t t
21286 s,@TEST_ARG2@,$TEST_ARG2,;t t
21287 s,@TEST_DEP2@,$TEST_DEP2,;t t
21288 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21289 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21290 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21291 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21292 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21293 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21294 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21295 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21296 s,@cross_compiling@,$cross_compiling,;t t
21297 s,@TIC_PATH@,$TIC_PATH,;t t
21298 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21299 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21300 CEOF
21301
21302 EOF
21303
21304   cat >>$CONFIG_STATUS <<\EOF
21305   # Split the substitutions into bite-sized pieces for seds with
21306   # small command number limits, like on Digital OSF/1 and HP-UX.
21307   ac_max_sed_lines=48
21308   ac_sed_frag=1 # Number of current file.
21309   ac_beg=1 # First line for current file.
21310   ac_end=$ac_max_sed_lines # Line after last line for current file.
21311   ac_more_lines=:
21312   ac_sed_cmds=
21313   while $ac_more_lines; do
21314     if test $ac_beg -gt 1; then
21315       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21316     else
21317       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21318     fi
21319     if test ! -s $tmp/subs.frag; then
21320       ac_more_lines=false
21321     else
21322       # The purpose of the label and of the branching condition is to
21323       # speed up the sed processing (if there are no `@' at all, there
21324       # is no need to browse any of the substitutions).
21325       # These are the two extra sed commands mentioned above.
21326       (echo ':t
21327   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21328       if test -z "$ac_sed_cmds"; then
21329         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21330       else
21331         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21332       fi
21333       ac_sed_frag=`expr $ac_sed_frag + 1`
21334       ac_beg=$ac_end
21335       ac_end=`expr $ac_end + $ac_max_sed_lines`
21336     fi
21337   done
21338   if test -z "$ac_sed_cmds"; then
21339     ac_sed_cmds=cat
21340   fi
21341 fi # test -n "$CONFIG_FILES"
21342
21343 EOF
21344 cat >>$CONFIG_STATUS <<\EOF
21345 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21346   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21347   case $ac_file in
21348   - | *:- | *:-:* ) # input from stdin
21349         cat >$tmp/stdin
21350         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21351         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21352   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21353         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21354   * )   ac_file_in=$ac_file.in ;;
21355   esac
21356
21357   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21358   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21359          X"$ac_file" : 'X\(//\)[^/]' \| \
21360          X"$ac_file" : 'X\(//\)$' \| \
21361          X"$ac_file" : 'X\(/\)' \| \
21362          .     : '\(.\)' 2>/dev/null ||
21363 echo X"$ac_file" |
21364     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21365           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21366           /^X\(\/\/\)$/{ s//\1/; q; }
21367           /^X\(\/\).*/{ s//\1/; q; }
21368           s/.*/./; q'`
21369   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21370     { case "$ac_dir" in
21371   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21372   *)                      as_incr_dir=.;;
21373 esac
21374 as_dummy="$ac_dir"
21375 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21376   case $as_mkdir_dir in
21377     # Skip DOS drivespec
21378     ?:) as_incr_dir=$as_mkdir_dir ;;
21379     *)
21380       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21381       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21382     ;;
21383   esac
21384 done; }
21385
21386     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21387     # A "../" for each directory in $ac_dir_suffix.
21388     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21389   else
21390     ac_dir_suffix= ac_dots=
21391   fi
21392
21393   case $srcdir in
21394   .)  ac_srcdir=.
21395       if test -z "$ac_dots"; then
21396          ac_top_srcdir=.
21397       else
21398          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21399       fi ;;
21400   [\\/]* | ?:[\\/]* )
21401       ac_srcdir=$srcdir$ac_dir_suffix;
21402       ac_top_srcdir=$srcdir ;;
21403   *) # Relative path.
21404     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21405     ac_top_srcdir=$ac_dots$srcdir ;;
21406   esac
21407
21408   case $INSTALL in
21409   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21410   *) ac_INSTALL=$ac_dots$INSTALL ;;
21411   esac
21412
21413   if test x"$ac_file" != x-; then
21414     { echo "$as_me:21414: creating $ac_file" >&5
21415 echo "$as_me: creating $ac_file" >&6;}
21416     rm -f "$ac_file"
21417   fi
21418   # Let's still pretend it is `configure' which instantiates (i.e., don't
21419   # use $as_me), people would be surprised to read:
21420   #    /* config.h.  Generated automatically by config.status.  */
21421   configure_input="Generated automatically from `echo $ac_file_in |
21422                                                  sed 's,.*/,,'` by configure."
21423
21424   # First look for the input files in the build tree, otherwise in the
21425   # src tree.
21426   ac_file_inputs=`IFS=:
21427     for f in $ac_file_in; do
21428       case $f in
21429       -) echo $tmp/stdin ;;
21430       [\\/$]*)
21431          # Absolute (can't be DOS-style, as IFS=:)
21432          test -f "$f" || { { echo "$as_me:21432: error: cannot find input file: $f" >&5
21433 echo "$as_me: error: cannot find input file: $f" >&2;}
21434    { (exit 1); exit 1; }; }
21435          echo $f;;
21436       *) # Relative
21437          if test -f "$f"; then
21438            # Build tree
21439            echo $f
21440          elif test -f "$srcdir/$f"; then
21441            # Source tree
21442            echo $srcdir/$f
21443          else
21444            # /dev/null tree
21445            { { echo "$as_me:21445: error: cannot find input file: $f" >&5
21446 echo "$as_me: error: cannot find input file: $f" >&2;}
21447    { (exit 1); exit 1; }; }
21448          fi;;
21449       esac
21450     done` || { (exit 1); exit 1; }
21451 EOF
21452 cat >>$CONFIG_STATUS <<EOF
21453   sed "$ac_vpsub
21454 $extrasub
21455 EOF
21456 cat >>$CONFIG_STATUS <<\EOF
21457 :t
21458 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21459 s,@configure_input@,$configure_input,;t t
21460 s,@srcdir@,$ac_srcdir,;t t
21461 s,@top_srcdir@,$ac_top_srcdir,;t t
21462 s,@INSTALL@,$ac_INSTALL,;t t
21463 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21464   rm -f $tmp/stdin
21465   if test x"$ac_file" != x-; then
21466     mv $tmp/out $ac_file
21467   else
21468     cat $tmp/out
21469     rm -f $tmp/out
21470   fi
21471
21472 done
21473 EOF
21474 cat >>$CONFIG_STATUS <<\EOF
21475
21476 #
21477 # CONFIG_HEADER section.
21478 #
21479
21480 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21481 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21482 #
21483 # ac_d sets the value in "#define NAME VALUE" lines.
21484 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21485 ac_dB='[        ].*$,\1#\2'
21486 ac_dC=' '
21487 ac_dD=',;t'
21488 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21489 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21490 ac_iB='\([      ]\),\1#\2define\3'
21491 ac_iC=' '
21492 ac_iD='\4,;t'
21493 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21494 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21495 ac_uB='$,\1#\2define\3'
21496 ac_uC=' '
21497 ac_uD=',;t'
21498
21499 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21500   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21501   case $ac_file in
21502   - | *:- | *:-:* ) # input from stdin
21503         cat >$tmp/stdin
21504         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21505         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21506   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21507         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21508   * )   ac_file_in=$ac_file.in ;;
21509   esac
21510
21511   test x"$ac_file" != x- && { echo "$as_me:21511: creating $ac_file" >&5
21512 echo "$as_me: creating $ac_file" >&6;}
21513
21514   # First look for the input files in the build tree, otherwise in the
21515   # src tree.
21516   ac_file_inputs=`IFS=:
21517     for f in $ac_file_in; do
21518       case $f in
21519       -) echo $tmp/stdin ;;
21520       [\\/$]*)
21521          # Absolute (can't be DOS-style, as IFS=:)
21522          test -f "$f" || { { echo "$as_me:21522: error: cannot find input file: $f" >&5
21523 echo "$as_me: error: cannot find input file: $f" >&2;}
21524    { (exit 1); exit 1; }; }
21525          echo $f;;
21526       *) # Relative
21527          if test -f "$f"; then
21528            # Build tree
21529            echo $f
21530          elif test -f "$srcdir/$f"; then
21531            # Source tree
21532            echo $srcdir/$f
21533          else
21534            # /dev/null tree
21535            { { echo "$as_me:21535: error: cannot find input file: $f" >&5
21536 echo "$as_me: error: cannot find input file: $f" >&2;}
21537    { (exit 1); exit 1; }; }
21538          fi;;
21539       esac
21540     done` || { (exit 1); exit 1; }
21541   # Remove the trailing spaces.
21542   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21543
21544 EOF
21545
21546 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21547 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21548 # be either 'cat' or 'sort'.
21549 cat confdefs.h | uniq >conftest.vals
21550
21551 # Break up conftest.vals because some shells have a limit on
21552 # the size of here documents, and old seds have small limits too.
21553
21554 rm -f conftest.tail
21555 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21556 while grep . conftest.vals >/dev/null
21557 do
21558   # Write chunks of a limited-size here document to conftest.frag.
21559   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21560   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21561   echo 'CEOF' >> $CONFIG_STATUS
21562   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21563   rm -f conftest.vals
21564   mv conftest.tail conftest.vals
21565 done
21566 rm -f conftest.vals
21567
21568 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21569 # marker @DEFS@.
21570 echo '  cat >> conftest.edit <<CEOF
21571 /@DEFS@/r conftest.frag
21572 /@DEFS@/d
21573 CEOF
21574 sed -f conftest.edit $tmp/in > $tmp/out
21575 rm -f $tmp/in
21576 mv $tmp/out $tmp/in
21577 rm -f conftest.edit conftest.frag
21578 ' >> $CONFIG_STATUS
21579
21580 cat >>$CONFIG_STATUS <<\EOF
21581   # Let's still pretend it is `configure' which instantiates (i.e., don't
21582   # use $as_me), people would be surprised to read:
21583   #    /* config.h.  Generated automatically by config.status.  */
21584   if test x"$ac_file" = x-; then
21585     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21586   else
21587     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21588   fi
21589   cat $tmp/in >>$tmp/config.h
21590   rm -f $tmp/in
21591   if test x"$ac_file" != x-; then
21592     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21593       { echo "$as_me:21593: $ac_file is unchanged" >&5
21594 echo "$as_me: $ac_file is unchanged" >&6;}
21595     else
21596       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21597          X"$ac_file" : 'X\(//\)[^/]' \| \
21598          X"$ac_file" : 'X\(//\)$' \| \
21599          X"$ac_file" : 'X\(/\)' \| \
21600          .     : '\(.\)' 2>/dev/null ||
21601 echo X"$ac_file" |
21602     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21603           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21604           /^X\(\/\/\)$/{ s//\1/; q; }
21605           /^X\(\/\).*/{ s//\1/; q; }
21606           s/.*/./; q'`
21607       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21608         { case "$ac_dir" in
21609   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21610   *)                      as_incr_dir=.;;
21611 esac
21612 as_dummy="$ac_dir"
21613 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21614   case $as_mkdir_dir in
21615     # Skip DOS drivespec
21616     ?:) as_incr_dir=$as_mkdir_dir ;;
21617     *)
21618       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21619       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21620     ;;
21621   esac
21622 done; }
21623
21624       fi
21625       rm -f $ac_file
21626       mv $tmp/config.h $ac_file
21627     fi
21628   else
21629     cat $tmp/config.h
21630     rm -f $tmp/config.h
21631   fi
21632 done
21633 EOF
21634 cat >>$CONFIG_STATUS <<\EOF
21635 #
21636 # CONFIG_COMMANDS section.
21637 #
21638 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21639   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21640   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21641
21642   case $ac_dest in
21643     default )
21644 if test "x$cf_with_tests" != xno ; then
21645
21646 for cf_dir in test
21647 do
21648         if test ! -d $srcdir/$cf_dir; then
21649                 continue
21650         elif test -f $srcdir/$cf_dir/programs; then
21651                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21652         fi
21653 done
21654
21655 fi
21656
21657 cf_prefix=$LIB_PREFIX
21658
21659 case $cf_cv_shlib_version in #(vi
21660 cygdll|mingw)
21661         TINFO_NAME=$TINFO_ARG_SUFFIX
21662         TINFO_SUFFIX=.dll
21663         ;;
21664 esac
21665
21666 if test -n "$TINFO_SUFFIX" ; then
21667         case $TINFO_SUFFIX in
21668         tw*)
21669                 TINFO_NAME="${TINFO_NAME}tw"
21670                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21671                 ;;
21672         t*)
21673                 TINFO_NAME="${TINFO_NAME}t"
21674                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21675                 ;;
21676         w*)
21677                 TINFO_NAME="${TINFO_NAME}w"
21678                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21679                 ;;
21680         esac
21681 fi
21682
21683 for cf_dir in $SRC_SUBDIRS
21684 do
21685         if test ! -d $srcdir/$cf_dir ; then
21686                 continue
21687         elif test -f $srcdir/$cf_dir/modules; then
21688
21689                 SHARED_LIB=
21690                 LIBS_TO_MAKE=
21691                 for cf_item in $cf_LIST_MODELS
21692                 do
21693
21694         case $cf_item in #(vi
21695         libtool) #(vi
21696                 cf_suffix='.la'
21697                 cf_depsuf=$cf_suffix
21698                 ;;
21699         normal) #(vi
21700                 cf_suffix='.a'
21701                 cf_depsuf=$cf_suffix
21702                 ;;
21703         debug) #(vi
21704                 cf_suffix='_g.a'
21705                 cf_depsuf=$cf_suffix
21706                 ;;
21707         profile) #(vi
21708                 cf_suffix='_p.a'
21709                 cf_depsuf=$cf_suffix
21710                 ;;
21711         shared) #(vi
21712                 case $cf_cv_system_name in
21713                 aix[5-7]*) #(vi
21714                         cf_suffix='.a'
21715                         cf_depsuf=$cf_suffix
21716                         ;;
21717                 cygwin*|mingw*) #(vi
21718                         cf_suffix='.dll'
21719                         cf_depsuf='.dll.a'
21720                         ;;
21721                 darwin*) #(vi
21722                         cf_suffix='.dylib'
21723                         cf_depsuf=$cf_suffix
21724                         ;;
21725                 hpux*) #(vi
21726                         case $target in
21727                         ia64*) #(vi
21728                                 cf_suffix='.so'
21729                                 cf_depsuf=$cf_suffix
21730                                 ;;
21731                         *) #(vi
21732                                 cf_suffix='.sl'
21733                                 cf_depsuf=$cf_suffix
21734                                 ;;
21735                         esac
21736                         ;;
21737                 *)      cf_suffix='.so'
21738                         cf_depsuf=$cf_suffix
21739                         ;;
21740                 esac
21741         esac
21742         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21743         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21744
21745                         if test $cf_item = shared ; then
21746                         if test "$cf_cv_do_symlinks" = yes ; then
21747                                 case "$cf_cv_shlib_version" in #(vi
21748                                 rel) #(vi
21749                                         case "$cf_cv_system_name" in #(vi
21750                                         darwin*)
21751                                         case .${LIB_SUFFIX} in
21752                                         .tw*)
21753                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21754                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21755                                                 ;;
21756                                         .t*)
21757                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21758                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21759                                                 ;;
21760                                         .w*)
21761                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21762                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21763                                                 ;;
21764                                         *)
21765                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21766                                                 ;;
21767                                         esac
21768                                         ;; #(vi
21769                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21770                                         esac
21771                                         ;;
21772                                 abi)
21773                                         case "$cf_cv_system_name" in #(vi
21774                                         darwin*)
21775                                         case .${LIB_SUFFIX} in
21776                                         .tw*)
21777                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21778                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21779                                                 ;;
21780                                         .t*)
21781                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21782                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21783                                                 ;;
21784                                         .w*)
21785                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21786                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21787                                                 ;;
21788                                         *)
21789                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21790                                                 ;;
21791                                         esac
21792                                         ;; #(vi
21793                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21794                                         esac
21795                                         ;;
21796                                 esac
21797                         fi
21798                         # cygwin needs import library, and has unique naming convention
21799                         # use autodetected ${cf_prefix} for import lib and static lib, but
21800                         # use 'cyg' prefix for shared lib.
21801                         case $cf_cv_shlib_version in #(vi
21802                         cygdll) #(vi
21803                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21804                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21805                                 continue
21806                                 ;;
21807                         mingw)
21808                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21809                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/lib${cf_dir}${cf_cygsuf}"
21810                                 continue
21811                                 ;;
21812                         esac
21813                         fi
21814                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21815                 done
21816
21817                 if test $cf_dir = ncurses ; then
21818                         cf_subsets="$LIB_SUBSETS"
21819                         cf_r_parts="$cf_subsets"
21820                         cf_liblist="$LIBS_TO_MAKE"
21821
21822                         while test -n "$cf_r_parts"
21823                         do
21824                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21825                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21826                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21827                                         cf_item=
21828                                         case $cf_l_parts in #(vi
21829                                         *termlib*) #(vi
21830                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21831                                                 ;;
21832                                         *ticlib*)
21833                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21834                                                 ;;
21835                                         *)
21836                                                 break
21837                                                 ;;
21838                                         esac
21839                                         if test -n "$cf_item"; then
21840                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21841                                         fi
21842                                 else
21843                                         break
21844                                 fi
21845                         done
21846                 else
21847                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21848                 fi
21849
21850                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21851                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21852                         $cf_dir/Makefile >$cf_dir/Makefile.out
21853                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21854
21855                 $AWK -f $srcdir/mk-0th.awk \
21856                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21857                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21858
21859                 for cf_subset in $cf_subsets
21860                 do
21861                         cf_subdirs=
21862                         for cf_item in $cf_LIST_MODELS
21863                         do
21864                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21865
21866 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21867
21868         case $cf_item in #(vi
21869         libtool) #(vi
21870                 cf_suffix='.la'
21871                 cf_depsuf=$cf_suffix
21872                 ;;
21873         normal) #(vi
21874                 cf_suffix='.a'
21875                 cf_depsuf=$cf_suffix
21876                 ;;
21877         debug) #(vi
21878                 cf_suffix='_g.a'
21879                 cf_depsuf=$cf_suffix
21880                 ;;
21881         profile) #(vi
21882                 cf_suffix='_p.a'
21883                 cf_depsuf=$cf_suffix
21884                 ;;
21885         shared) #(vi
21886                 case $cf_cv_system_name in
21887                 aix[5-7]*) #(vi
21888                         cf_suffix='.a'
21889                         cf_depsuf=$cf_suffix
21890                         ;;
21891                 cygwin*|mingw*) #(vi
21892                         cf_suffix='.dll'
21893                         cf_depsuf='.dll.a'
21894                         ;;
21895                 darwin*) #(vi
21896                         cf_suffix='.dylib'
21897                         cf_depsuf=$cf_suffix
21898                         ;;
21899                 hpux*) #(vi
21900                         case $target in
21901                         ia64*) #(vi
21902                                 cf_suffix='.so'
21903                                 cf_depsuf=$cf_suffix
21904                                 ;;
21905                         *) #(vi
21906                                 cf_suffix='.sl'
21907                                 cf_depsuf=$cf_suffix
21908                                 ;;
21909                         esac
21910                         ;;
21911                 *)      cf_suffix='.so'
21912                         cf_depsuf=$cf_suffix
21913                         ;;
21914                 esac
21915         esac
21916         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21917         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21918
21919         case $cf_item in
21920         libtool) cf_subdir='obj_lo'  ;;
21921         normal)  cf_subdir='objects' ;;
21922         debug)   cf_subdir='obj_g' ;;
21923         profile) cf_subdir='obj_p' ;;
21924         shared)
21925                 case $cf_cv_system_name in #(vi
21926                 cygwin) #(vi
21927                         cf_subdir='objects' ;;
21928                 *)
21929                         cf_subdir='obj_s' ;;
21930                 esac
21931         esac
21932
21933                         # Test for case where we build libtinfo with a different name.
21934                         cf_libname=$cf_dir
21935                         if test $cf_dir = ncurses ; then
21936                                 case $cf_subset in
21937                                 *base*)
21938                                         cf_libname=${cf_libname}$LIB_SUFFIX
21939                                         ;;
21940                                 *termlib*)
21941                                         cf_libname=$TINFO_LIB_SUFFIX
21942                                         ;;
21943                                 ticlib*)
21944                                         cf_libname=$TICS_LIB_SUFFIX
21945                                         ;;
21946                                 esac
21947                         else
21948                                 cf_libname=${cf_libname}$LIB_SUFFIX
21949                         fi
21950                         if test -n "${DFT_ARG_SUFFIX}" ; then
21951                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21952                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21953                         fi
21954
21955                         # These dependencies really are for development, not
21956                         # builds, but they are useful in porting, too.
21957                         cf_depend="../include/ncurses_cfg.h"
21958                         if test "$srcdir" = "."; then
21959                                 cf_reldir="."
21960                         else
21961                                 cf_reldir="\${srcdir}"
21962                         fi
21963
21964                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21965                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21966                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21967                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21968                         fi
21969
21970                         cf_dir_suffix=
21971                         old_cf_suffix="$cf_suffix"
21972                         if test "$cf_cv_shlib_version_infix" = yes ; then
21973                         if test -n "$LIB_SUFFIX" ; then
21974                                 case $LIB_SUFFIX in
21975                                 tw*)
21976                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21977                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21978                                         cf_dir_suffix=tw
21979                                         ;;
21980                                 t*)
21981                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21982                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21983                                         cf_dir_suffix=t
21984                                         ;;
21985                                 w*)
21986                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21987                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21988                                         cf_dir_suffix=w
21989                                         ;;
21990                                 esac
21991                         fi
21992                         fi
21993
21994                         $AWK -f $srcdir/mk-1st.awk \
21995                                 name=${cf_libname}${cf_dir_suffix} \
21996                                 traces=$LIB_TRACING \
21997                                 MODEL=$cf_ITEM \
21998                                 model=$cf_subdir \
21999                                 prefix=$cf_prefix \
22000                                 suffix=$cf_suffix \
22001                                 subset=$cf_subset \
22002                                 driver=$cf_cv_term_driver \
22003                                 SymLink="$LN_S" \
22004                                 TermlibRoot=$TINFO_NAME \
22005                                 TermlibSuffix=$TINFO_SUFFIX \
22006                                 ShlibVer=$cf_cv_shlib_version \
22007                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22008                                 ReLink=${cf_cv_do_relink:-no} \
22009                                 DoLinks=$cf_cv_do_symlinks \
22010                                 rmSoLocs=$cf_cv_rm_so_locs \
22011                                 ldconfig="$LDCONFIG" \
22012                                 overwrite=$WITH_OVERWRITE \
22013                                 depend="$cf_depend" \
22014                                 host="$host" \
22015                                 libtool_version="$LIBTOOL_VERSION" \
22016                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22017
22018                         cf_suffix="$old_cf_suffix"
22019
22020                         for cf_subdir2 in $cf_subdirs lib
22021                         do
22022                                 test $cf_subdir = $cf_subdir2 && break
22023                         done
22024                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22025                         $AWK -f $srcdir/mk-2nd.awk \
22026                                 name=$cf_dir \
22027                                 traces=$LIB_TRACING \
22028                                 MODEL=$cf_ITEM \
22029                                 model=$cf_subdir \
22030                                 subset=$cf_subset \
22031                                 srcdir=$srcdir \
22032                                 echo=$WITH_ECHO \
22033                                 crenames=$cf_cv_prog_CC_c_o \
22034                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22035                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22036                         cf_subdirs="$cf_subdirs $cf_subdir"
22037                         done
22038                 done
22039         fi
22040
22041         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
22042 done
22043
22044 for cf_dir in $SRC_SUBDIRS
22045 do
22046         if test ! -d $srcdir/$cf_dir ; then
22047                 continue
22048         fi
22049
22050         if test -f $cf_dir/Makefile ; then
22051                 case "$cf_dir" in
22052                 Ada95) #(vi
22053                         echo 'libs \' >> Makefile
22054                         echo 'install.libs \' >> Makefile
22055                         echo 'uninstall.libs ::' >> Makefile
22056                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
22057                         ;;
22058                 esac
22059         fi
22060
22061         if test -f $srcdir/$cf_dir/modules; then
22062                 echo >> Makefile
22063                 if test -f $srcdir/$cf_dir/headers; then
22064 cat >> Makefile <<CF_EOF
22065 install.includes \\
22066 uninstall.includes \\
22067 CF_EOF
22068                 fi
22069 if test "$cf_dir" != "c++" ; then
22070 echo 'lint \' >> Makefile
22071 fi
22072 cat >> Makefile <<CF_EOF
22073 libs \\
22074 lintlib \\
22075 install.libs \\
22076 uninstall.libs \\
22077 install.$cf_dir \\
22078 uninstall.$cf_dir ::
22079         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22080 CF_EOF
22081         elif test -f $srcdir/$cf_dir/headers; then
22082 cat >> Makefile <<CF_EOF
22083
22084 libs \\
22085 install.libs \\
22086 uninstall.libs \\
22087 install.includes \\
22088 uninstall.includes ::
22089         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22090 CF_EOF
22091 fi
22092 done
22093
22094 cat >> Makefile <<CF_EOF
22095
22096 install.libs uninstall.libs \\
22097 install.data uninstall.data ::
22098 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
22099 CF_EOF
22100
22101 if test "x$cf_with_manpages" = xyes; then
22102 cat >> Makefile <<CF_EOF
22103
22104 install.man \\
22105 uninstall.man ::
22106         cd man && \${MAKE} \${CF_MFLAGS} \$@
22107 CF_EOF
22108 fi
22109
22110 cat >> Makefile <<CF_EOF
22111
22112 distclean ::
22113         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22114         rm -f headers.sh headers.sed mk_shared_lib.sh
22115         rm -f edit_man.* man_alias.*
22116         rm -rf \${DIRS_TO_MAKE}
22117 CF_EOF
22118
22119 # Special case: tack's manpage lives in its own directory.
22120 if test "x$cf_with_manpages" = xyes; then
22121 if test -d tack ; then
22122 if test -f $srcdir/$tack.h; then
22123 cat >> Makefile <<CF_EOF
22124
22125 install.man \\
22126 uninstall.man ::
22127         cd tack && \${MAKE} \${CF_MFLAGS} \$@
22128 CF_EOF
22129 fi
22130 fi
22131 fi
22132
22133 rm -f headers.sed headers.sh
22134
22135 echo creating headers.sh
22136 cat >headers.sh <<CF_EOF
22137 #! /bin/sh
22138 # This shell script is generated by the 'configure' script.  It is invoked in a
22139 # subdirectory of the build tree.  It generates a sed-script in the parent
22140 # directory that is used to adjust includes for header files that reside in a
22141 # subdirectory of /usr/include, etc.
22142 PRG=""
22143 while test \$# != 3
22144 do
22145 PRG="\$PRG \$1"; shift
22146 done
22147 DST=\$1
22148 REF=\$2
22149 SRC=\$3
22150 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22151 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22152 echo installing \$SRC in \$DST
22153 CF_EOF
22154
22155 if test $WITH_CURSES_H = yes; then
22156         cat >>headers.sh <<CF_EOF
22157 case \$DST in
22158 /*/include/*)
22159         END=\`basename \$DST\`
22160         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22161         do
22162                 NAME=\`basename \$i\`
22163                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22164         done
22165         ;;
22166 *)
22167         echo "" >> \$TMPSED
22168         ;;
22169 esac
22170 CF_EOF
22171
22172 else
22173         cat >>headers.sh <<CF_EOF
22174 case \$DST in
22175 /*/include/*)
22176         END=\`basename \$DST\`
22177         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22178         do
22179                 NAME=\`basename \$i\`
22180                 if test "\$NAME" = "curses.h"
22181                 then
22182                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22183                         NAME=ncurses.h
22184                 fi
22185                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22186         done
22187         ;;
22188 *)
22189         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22190         ;;
22191 esac
22192 CF_EOF
22193 fi
22194 cat >>headers.sh <<CF_EOF
22195 rm -f \$TMPSRC
22196 sed -f \$TMPSED \$SRC > \$TMPSRC
22197 NAME=\`basename \$SRC\`
22198 CF_EOF
22199 if test $WITH_CURSES_H != yes; then
22200         cat >>headers.sh <<CF_EOF
22201 test "\$NAME" = "curses.h" && NAME=ncurses.h
22202 CF_EOF
22203 fi
22204 cat >>headers.sh <<CF_EOF
22205 # Just in case someone gzip'd manpages, remove the conflicting copy.
22206 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22207
22208 eval \$PRG \$TMPSRC \$DST/\$NAME
22209 rm -f \$TMPSRC \$TMPSED
22210 CF_EOF
22211
22212 chmod 0755 headers.sh
22213
22214 for cf_dir in $SRC_SUBDIRS
22215 do
22216         if test ! -d $srcdir/$cf_dir ; then
22217                 continue
22218         fi
22219
22220         if test -f $srcdir/$cf_dir/headers; then
22221                 $AWK -f $srcdir/mk-hdr.awk \
22222                         subset="$LIB_SUBSETS" \
22223                         compat="$WITH_CURSES_H" \
22224                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22225         fi
22226
22227         if test -f $srcdir/$cf_dir/modules; then
22228                 if test "$cf_dir" != "c++" ; then
22229                         cat >>$cf_dir/Makefile <<"CF_EOF"
22230 depend : ${AUTO_SRC}
22231         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22232
22233 # DO NOT DELETE THIS LINE -- make depend depends on it.
22234 CF_EOF
22235                 fi
22236         fi
22237 done
22238
22239 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22240 if test -z "$USE_OLD_MAKERULES" ; then
22241         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22242 fi
22243 fi
22244  ;;
22245   esac
22246 done
22247 EOF
22248
22249 cat >>$CONFIG_STATUS <<\EOF
22250
22251 { (exit 0); exit 0; }
22252 EOF
22253 chmod +x $CONFIG_STATUS
22254 ac_clean_files=$ac_clean_files_save
22255
22256 # configure is writing to config.log, and then calls config.status.
22257 # config.status does its own redirection, appending to config.log.
22258 # Unfortunately, on DOS this fails, as config.log is still kept open
22259 # by configure, so config.status won't be able to write to it; its
22260 # output is simply discarded.  So we exec the FD to /dev/null,
22261 # effectively closing config.log, so it can be properly (re)opened and
22262 # appended to by config.status.  When coming back to configure, we
22263 # need to make the FD available again.
22264 if test "$no_create" != yes; then
22265   ac_cs_success=:
22266   exec 5>/dev/null
22267   $SHELL $CONFIG_STATUS || ac_cs_success=false
22268   exec 5>>config.log
22269   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22270   # would make configure fail if this is the last instruction.
22271   $ac_cs_success || { (exit 1); exit 1; }
22272 fi
22273 ${MAKE:-make} preinstall