]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
db5ca6826f0c7d1946a44a8a61da4293e3f2bb09
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.599 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --disable-overwrite     leave out the link to -lcurses
751   --disable-database      do not use terminfo, only fallbacks/termcap
752   --with-database=XXX     specify terminfo source to install
753   --with-hashed-db        specify hashed-database library
754   --with-fallbacks=XXX    specify list of fallback terminal descriptions
755   --without-xterm-new     specify if xterm terminfo should be old version
756   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
757   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
758   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
759   --disable-big-core      assume machine has little memory
760   --disable-big-strings   assume compiler has only standard-size strings
761   --enable-termcap        compile in termcap fallback support
762   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
763   --enable-getcap         fast termcap load, no xrefs to terminfo
764   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
765   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
766   --disable-root-environ  restrict environment when running as root
767   --enable-symlinks       make tic use symbolic links not hard links
768   --enable-broken_linker  compile with broken-linker support code
769   --enable-bsdpad         recognize BSD-style prefix padding
770   --enable-widec          compile with wide-char/UTF-8 code
771   --disable-lp64          allow chtype to be long (ignore _LP64)
772   --disable-largefile     omit support for large files
773   --disable-tparm-varargs compile tparm() without varargs interface
774   --disable-tic-depends   link tic library without explicit dependency on ncurses library
775   --with-bool=TYPE        override fallback type of bool variable
776   --with-caps=alt         compile with alternate Caps file
777   --with-chtype=TYPE      override type of chtype
778   --with-ospeed=TYPE      override type of ospeed variable
779   --with-mmask-t=TYPE     override type of mmask_t
780   --with-ccharw-max=XXX   override size CCHARW_MAX
781   --with-tparm-arg=TYPE   override parameter type of tparm
782   --with-rcs-ids          compile-in RCS identifiers
783 Options to Specify How Manpages are Installed:
784   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
785                           optionally formatted/catonly, e.g., gzip,formatted
786   --with-manpage-renames  specify manpage-renaming
787   --with-manpage-aliases  specify manpage-aliases using .so
788   --with-manpage-symlinks specify manpage-aliases using symlinks
789   --with-manpage-tbl      specify manpage processing with tbl
790 Extensions:
791   --disable-ext-funcs     disable function-extensions
792   --enable-sp-funcs       enable experimental SCREEN-extensions
793   --enable-term-driver    enable experimental terminal-driver
794   --enable-const          compile with extra/non-standard const
795   --enable-ext-colors     compile for 256-color support
796   --enable-ext-mouse      compile for extended mouse-encoding
797   --enable-no-padding     compile with $NCURSES_NO_PADDING code
798   --enable-signed-char    compile using signed Boolean's in term.h
799   --enable-sigwinch       compile with SIGWINCH handler
800   --enable-tcap-names     compile with user-definable terminal capabilities
801 Development Code:
802   --without-develop       disable development options
803   --enable-hard-tabs      compile with hard-tabs code
804   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
805 Experimental Code:
806   --disable-assumed-color do not assume anything about default-colors
807   --disable-hashmap       compile without hashmap scrolling-optimization
808   --enable-colorfgbg      compile-in experimental $COLORFGBG code
809   --enable-interop        compile-in experimental interop bindings
810   --with-pthread          use POSIX thread library
811   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
812   --enable-weak-symbols   enable weak-symbols for pthreads
813   --enable-reentrant      compile with experimental reentrant code
814   --with-wrap-prefix=XXX  override prefix used for public variables
815   --enable-safe-sprintf   compile with experimental safe-sprintf code
816   --disable-scroll-hints  compile without scroll-hints code
817   --enable-wgetch-events  compile with experimental wgetch-events code
818 Testing/development Options:
819   --disable-echo          do not display "compiling" commands
820   --enable-warnings       build: turn on GCC compiler warnings
821   --enable-string-hacks   work around bogus compiler/loader warnings
822   --enable-assertions     test: turn on generation of assertion code
823   --with-dmalloc          test: use Gray Watson's dmalloc library
824   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
825   --with-valgrind         test: use valgrind
826   --disable-leaks         test: free permanent memory, analyze leaks
827   --enable-expanded       test: generate functions for certain macros
828   --disable-macros        test: use functions rather than macros
829   --with-trace            test: add trace() function to all models of ncurses
830   --disable-gnat-projects test: disable GNAT projects even if usable
831 Ada95 Binding Options:
832   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
833   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
834   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
835   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
836
837 Some influential environment variables:
838   CC          C compiler command
839   CFLAGS      C compiler flags
840   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
841               nonstandard directory <lib dir>
842   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
843               headers in a nonstandard directory <include dir>
844   CPP         C preprocessor
845   CXX         C++ compiler command
846   CXXFLAGS    C++ compiler flags
847   CXXCPP      C++ preprocessor
848
849 Use these variables to override the choices made by `configure' or to help
850 it to find libraries and programs with nonstandard names/locations.
851
852 EOF
853 fi
854
855 if test "$ac_init_help" = "recursive"; then
856   # If there are subdirs, report their specific --help.
857   ac_popdir=`pwd`
858   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
859     cd $ac_subdir
860     # A "../" for each directory in /$ac_subdir.
861     ac_dots=`echo $ac_subdir |
862              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
863
864     case $srcdir in
865     .) # No --srcdir option.  We are building in place.
866       ac_sub_srcdir=$srcdir ;;
867     [\\/]* | ?:[\\/]* ) # Absolute path.
868       ac_sub_srcdir=$srcdir/$ac_subdir ;;
869     *) # Relative path.
870       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
871     esac
872
873     # Check for guested configure; otherwise get Cygnus style configure.
874     if test -f $ac_sub_srcdir/configure.gnu; then
875       echo
876       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
877     elif test -f $ac_sub_srcdir/configure; then
878       echo
879       $SHELL $ac_sub_srcdir/configure  --help=recursive
880     elif test -f $ac_sub_srcdir/configure.ac ||
881            test -f $ac_sub_srcdir/configure.in; then
882       echo
883       $ac_configure --help
884     else
885       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
886     fi
887     cd $ac_popdir
888   done
889 fi
890
891 test -n "$ac_init_help" && exit 0
892 if $ac_init_version; then
893   cat <<\EOF
894
895 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
896 Free Software Foundation, Inc.
897 This configure script is free software; the Free Software Foundation
898 gives unlimited permission to copy, distribute and modify it.
899 EOF
900   exit 0
901 fi
902 exec 5>config.log
903 cat >&5 <<EOF
904 This file contains any messages produced by compilers while
905 running configure, to aid debugging if configure makes a mistake.
906
907 It was created by $as_me, which was
908 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
909
910   $ $0 $@
911
912 EOF
913 {
914 cat <<_ASUNAME
915 ## ---------- ##
916 ## Platform.  ##
917 ## ---------- ##
918
919 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
920 uname -m = `(uname -m) 2>/dev/null || echo unknown`
921 uname -r = `(uname -r) 2>/dev/null || echo unknown`
922 uname -s = `(uname -s) 2>/dev/null || echo unknown`
923 uname -v = `(uname -v) 2>/dev/null || echo unknown`
924
925 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
926 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
927
928 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
929 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
930 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
931 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
932 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
933 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
934 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
935
936 PATH = $PATH
937
938 _ASUNAME
939 } >&5
940
941 cat >&5 <<EOF
942 ## ------------ ##
943 ## Core tests.  ##
944 ## ------------ ##
945
946 EOF
947
948 # Keep a trace of the command line.
949 # Strip out --no-create and --no-recursion so they do not pile up.
950 # Also quote any args containing shell meta-characters.
951 ac_configure_args=
952 ac_sep=
953 for ac_arg
954 do
955   case $ac_arg in
956   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
957   | --no-cr | --no-c) ;;
958   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
960   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
961     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
962     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
963     ac_sep=" " ;;
964   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
965      ac_sep=" " ;;
966   esac
967   # Get rid of the leading space.
968 done
969
970 # When interrupted or exit'd, cleanup temporary files, and complete
971 # config.log.  We remove comments because anyway the quotes in there
972 # would cause problems or look ugly.
973 trap 'exit_status=$?
974   # Save into config.log some information that might help in debugging.
975   echo >&5
976   echo "## ----------------- ##" >&5
977   echo "## Cache variables.  ##" >&5
978   echo "## ----------------- ##" >&5
979   echo >&5
980   # The following way of writing the cache mishandles newlines in values,
981 {
982   (set) 2>&1 |
983     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
984     *ac_space=\ *)
985       sed -n \
986         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
987           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
988       ;;
989     *)
990       sed -n \
991         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
992       ;;
993     esac;
994 } >&5
995   sed "/^$/d" confdefs.h >conftest.log
996   if test -s conftest.log; then
997     echo >&5
998     echo "## ------------ ##" >&5
999     echo "## confdefs.h.  ##" >&5
1000     echo "## ------------ ##" >&5
1001     echo >&5
1002     cat conftest.log >&5
1003   fi
1004   (echo; echo) >&5
1005   test "$ac_signal" != 0 &&
1006     echo "$as_me: caught signal $ac_signal" >&5
1007   echo "$as_me: exit $exit_status" >&5
1008   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1009     exit $exit_status
1010      ' 0
1011 for ac_signal in 1 2 13 15; do
1012   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1013 done
1014 ac_signal=0
1015
1016 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1017 rm -rf conftest* confdefs.h
1018 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1019 echo >confdefs.h
1020
1021 # Let the site file select an alternate cache file if it wants to.
1022 # Prefer explicitly selected file to automatically selected ones.
1023 if test -z "$CONFIG_SITE"; then
1024   if test "x$prefix" != xNONE; then
1025     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1026   else
1027     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1028   fi
1029 fi
1030 for ac_site_file in $CONFIG_SITE; do
1031   if test -r "$ac_site_file"; then
1032     { echo "$as_me:1032: loading site script $ac_site_file" >&5
1033 echo "$as_me: loading site script $ac_site_file" >&6;}
1034     cat "$ac_site_file" >&5
1035     . "$ac_site_file"
1036   fi
1037 done
1038
1039 if test -r "$cache_file"; then
1040   # Some versions of bash will fail to source /dev/null (special
1041   # files actually), so we avoid doing that.
1042   if test -f "$cache_file"; then
1043     { echo "$as_me:1043: loading cache $cache_file" >&5
1044 echo "$as_me: loading cache $cache_file" >&6;}
1045     case $cache_file in
1046       [\\/]* | ?:[\\/]* ) . $cache_file;;
1047       *)                      . ./$cache_file;;
1048     esac
1049   fi
1050 else
1051   { echo "$as_me:1051: creating cache $cache_file" >&5
1052 echo "$as_me: creating cache $cache_file" >&6;}
1053   >$cache_file
1054 fi
1055
1056 # Check that the precious variables saved in the cache have kept the same
1057 # value.
1058 ac_cache_corrupted=false
1059 for ac_var in `(set) 2>&1 |
1060                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1061   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1062   eval ac_new_set=\$ac_env_${ac_var}_set
1063   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1064   eval ac_new_val="\$ac_env_${ac_var}_value"
1065   case $ac_old_set,$ac_new_set in
1066     set,)
1067       { echo "$as_me:1067: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,set)
1071       { echo "$as_me:1071: error: \`$ac_var' was not set in the previous run" >&5
1072 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1073       ac_cache_corrupted=: ;;
1074     ,);;
1075     *)
1076       if test "x$ac_old_val" != "x$ac_new_val"; then
1077         { echo "$as_me:1077: error: \`$ac_var' has changed since the previous run:" >&5
1078 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1079         { echo "$as_me:1079:   former value:  $ac_old_val" >&5
1080 echo "$as_me:   former value:  $ac_old_val" >&2;}
1081         { echo "$as_me:1081:   current value: $ac_new_val" >&5
1082 echo "$as_me:   current value: $ac_new_val" >&2;}
1083         ac_cache_corrupted=:
1084       fi;;
1085   esac
1086   # Pass precious variables to config.status.  It doesn't matter if
1087   # we pass some twice (in addition to the command line arguments).
1088   if test "$ac_new_set" = set; then
1089     case $ac_new_val in
1090     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1091       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1092       ac_configure_args="$ac_configure_args '$ac_arg'"
1093       ;;
1094     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1095        ;;
1096     esac
1097   fi
1098 done
1099 if $ac_cache_corrupted; then
1100   { echo "$as_me:1100: error: changes in the environment can compromise the build" >&5
1101 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1102   { { echo "$as_me:1102: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1103 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1104    { (exit 1); exit 1; }; }
1105 fi
1106
1107 ac_ext=c
1108 ac_cpp='$CPP $CPPFLAGS'
1109 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1110 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1111 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1112 ac_main_return=return
1113
1114 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1115   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1116                    ECHO_T='     ' ;;
1117   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1118   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1119 esac
1120 echo "#! $SHELL" >conftest.sh
1121 echo  "exit 0"   >>conftest.sh
1122 chmod +x conftest.sh
1123 if { (echo "$as_me:1123: PATH=\".;.\"; conftest.sh") >&5
1124   (PATH=".;."; conftest.sh) 2>&5
1125   ac_status=$?
1126   echo "$as_me:1126: \$? = $ac_status" >&5
1127   (exit $ac_status); }; then
1128   ac_path_separator=';'
1129 else
1130   ac_path_separator=:
1131 fi
1132 PATH_SEPARATOR="$ac_path_separator"
1133 rm -f conftest.sh
1134
1135 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1136
1137 top_builddir=`pwd`
1138
1139 echo "$as_me:1139: checking for egrep" >&5
1140 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1141 if test "${ac_cv_prog_egrep+set}" = set; then
1142   echo $ECHO_N "(cached) $ECHO_C" >&6
1143 else
1144   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1145     then ac_cv_prog_egrep='grep -E'
1146     else ac_cv_prog_egrep='egrep'
1147     fi
1148 fi
1149 echo "$as_me:1149: result: $ac_cv_prog_egrep" >&5
1150 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1151  EGREP=$ac_cv_prog_egrep
1152
1153 test -z "$EGREP" && { { echo "$as_me:1153: error: No egrep program found" >&5
1154 echo "$as_me: error: No egrep program found" >&2;}
1155    { (exit 1); exit 1; }; }
1156
1157 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1158 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1159 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 cf_cv_abi_version=${NCURSES_MAJOR}
1161 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1162 cf_cv_timestamp=`date`
1163 echo "$as_me:1163: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1164 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1165
1166 if test -f $srcdir/VERSION ; then
1167         echo "$as_me:1167: checking for package version" >&5
1168 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1169
1170         # if there are not enough fields, cut returns the last one...
1171         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1172         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1173         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1174
1175         # this is how CF_BUNDLED_INTL uses $VERSION:
1176         VERSION="$cf_field1"
1177
1178         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1179         test -z "$VERSION_MAJOR" && { { echo "$as_me:1179: error: missing major-version" >&5
1180 echo "$as_me: error: missing major-version" >&2;}
1181    { (exit 1); exit 1; }; }
1182
1183         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1184         test -z "$VERSION_MINOR" && { { echo "$as_me:1184: error: missing minor-version" >&5
1185 echo "$as_me: error: missing minor-version" >&2;}
1186    { (exit 1); exit 1; }; }
1187
1188         echo "$as_me:1188: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1189 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1190
1191         echo "$as_me:1191: checking for package patch date" >&5
1192 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1193         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1194         case .$VERSION_PATCH in
1195         .)
1196                 { { echo "$as_me:1196: error: missing patch-date $VERSION_PATCH" >&5
1197 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1198    { (exit 1); exit 1; }; }
1199                 ;;
1200         .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1201                 ;;
1202         *)
1203                 { { echo "$as_me:1203: error: illegal patch-date $VERSION_PATCH" >&5
1204 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1205    { (exit 1); exit 1; }; }
1206                 ;;
1207         esac
1208         echo "$as_me:1208: result: $VERSION_PATCH" >&5
1209 echo "${ECHO_T}$VERSION_PATCH" >&6
1210 else
1211         { { echo "$as_me:1211: error: did not find $srcdir/VERSION" >&5
1212 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1213    { (exit 1); exit 1; }; }
1214 fi
1215
1216 # show the actual data that we have for versions:
1217 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1218
1219 echo "${as_me:-configure}:1219: testing ABI VERSION $VERSION ..." 1>&5
1220
1221 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1222
1223 echo "${as_me:-configure}:1223: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1224
1225 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1226
1227 echo "${as_me:-configure}:1227: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1228
1229 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1232
1233         cf_PACKAGE=NCURSES
1234         PACKAGE=ncurses
1235
1236 cat >>confdefs.h <<EOF
1237 #define PACKAGE "$PACKAGE"
1238 EOF
1239
1240 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1241
1242         cat >>confdefs.h <<EOF
1243 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1244 EOF
1245
1246         cat >>confdefs.h <<EOF
1247 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1248 EOF
1249
1250 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1251
1252 # Check whether --with-rel-version or --without-rel-version was given.
1253 if test "${with_rel_version+set}" = set; then
1254   withval="$with_rel_version"
1255   { echo "$as_me:1255: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1256 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1257  cf_cv_rel_version=$withval
1258 fi;
1259
1260  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1261  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1262
1263 if test -n "$NCURSES_MAJOR" ; then
1264   case $NCURSES_MAJOR in #(vi
1265   [0-9]*) #(vi
1266         ;;
1267   *)
1268         { { echo "$as_me:1268: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1269 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1270    { (exit 1); exit 1; }; }
1271         ;;
1272   esac
1273 else
1274   { { echo "$as_me:1274: error: Release major-version value is empty" >&5
1275 echo "$as_me: error: Release major-version value is empty" >&2;}
1276    { (exit 1); exit 1; }; }
1277 fi
1278
1279 if test -n "$NCURSES_MINOR" ; then
1280   case $NCURSES_MINOR in #(vi
1281   [0-9]*) #(vi
1282         ;;
1283   *)
1284         { { echo "$as_me:1284: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1285 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1286    { (exit 1); exit 1; }; }
1287         ;;
1288   esac
1289 else
1290   { { echo "$as_me:1290: error: Release minor-version value is empty" >&5
1291 echo "$as_me: error: Release minor-version value is empty" >&2;}
1292    { (exit 1); exit 1; }; }
1293 fi
1294
1295 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1296
1297 # Check whether --with-abi-version or --without-abi-version was given.
1298 if test "${with_abi_version+set}" = set; then
1299   withval="$with_abi_version"
1300   { echo "$as_me:1300: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1301 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1302  cf_cv_abi_version=$withval
1303 fi;
1304
1305 if test -n "$cf_cv_abi_version" ; then
1306   case $cf_cv_abi_version in #(vi
1307   [0-9]*) #(vi
1308         ;;
1309   *)
1310         { { echo "$as_me:1310: error: ABI version is not a number: $cf_cv_abi_version" >&5
1311 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1312    { (exit 1); exit 1; }; }
1313         ;;
1314   esac
1315 else
1316   { { echo "$as_me:1316: error: ABI version value is empty" >&5
1317 echo "$as_me: error: ABI version value is empty" >&2;}
1318    { (exit 1); exit 1; }; }
1319 fi
1320
1321 ac_aux_dir=
1322 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1323   if test -f $ac_dir/install-sh; then
1324     ac_aux_dir=$ac_dir
1325     ac_install_sh="$ac_aux_dir/install-sh -c"
1326     break
1327   elif test -f $ac_dir/install.sh; then
1328     ac_aux_dir=$ac_dir
1329     ac_install_sh="$ac_aux_dir/install.sh -c"
1330     break
1331   elif test -f $ac_dir/shtool; then
1332     ac_aux_dir=$ac_dir
1333     ac_install_sh="$ac_aux_dir/shtool install -c"
1334     break
1335   fi
1336 done
1337 if test -z "$ac_aux_dir"; then
1338   { { echo "$as_me:1338: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1339 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1343 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1344 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1345
1346 # Make sure we can run config.sub.
1347 $ac_config_sub sun4 >/dev/null 2>&1 ||
1348   { { echo "$as_me:1348: error: cannot run $ac_config_sub" >&5
1349 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1350    { (exit 1); exit 1; }; }
1351
1352 echo "$as_me:1352: checking build system type" >&5
1353 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1354 if test "${ac_cv_build+set}" = set; then
1355   echo $ECHO_N "(cached) $ECHO_C" >&6
1356 else
1357   ac_cv_build_alias=$build_alias
1358 test -z "$ac_cv_build_alias" &&
1359   ac_cv_build_alias=`$ac_config_guess`
1360 test -z "$ac_cv_build_alias" &&
1361   { { echo "$as_me:1361: error: cannot guess build type; you must specify one" >&5
1362 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1363    { (exit 1); exit 1; }; }
1364 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1365   { { echo "$as_me:1365: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1366 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1367    { (exit 1); exit 1; }; }
1368
1369 fi
1370 echo "$as_me:1370: result: $ac_cv_build" >&5
1371 echo "${ECHO_T}$ac_cv_build" >&6
1372 build=$ac_cv_build
1373 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1374 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1375 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1376
1377 echo "$as_me:1377: checking host system type" >&5
1378 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1379 if test "${ac_cv_host+set}" = set; then
1380   echo $ECHO_N "(cached) $ECHO_C" >&6
1381 else
1382   ac_cv_host_alias=$host_alias
1383 test -z "$ac_cv_host_alias" &&
1384   ac_cv_host_alias=$ac_cv_build_alias
1385 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1386   { { echo "$as_me:1386: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1387 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1388    { (exit 1); exit 1; }; }
1389
1390 fi
1391 echo "$as_me:1391: result: $ac_cv_host" >&5
1392 echo "${ECHO_T}$ac_cv_host" >&6
1393 host=$ac_cv_host
1394 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1395 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1396 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1397
1398 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1399         echo "$as_me:1399: checking target system type" >&5
1400 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1401 if test "${ac_cv_target+set}" = set; then
1402   echo $ECHO_N "(cached) $ECHO_C" >&6
1403 else
1404   ac_cv_target_alias=$target_alias
1405 test "x$ac_cv_target_alias" = "x" &&
1406   ac_cv_target_alias=$ac_cv_host_alias
1407 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1408   { { echo "$as_me:1408: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1409 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1410    { (exit 1); exit 1; }; }
1411
1412 fi
1413 echo "$as_me:1413: result: $ac_cv_target" >&5
1414 echo "${ECHO_T}$ac_cv_target" >&6
1415 target=$ac_cv_target
1416 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1417 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1418 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1419
1420 # The aliases save the names the user supplied, while $host etc.
1421 # will get canonicalized.
1422 test -n "$target_alias" &&
1423   test "$program_prefix$program_suffix$program_transform_name" = \
1424     NONENONEs,x,x, &&
1425   program_prefix=${target_alias}-
1426         system_name="$host_os"
1427 else
1428         system_name="`(uname -s -r) 2>/dev/null`"
1429         if test -z "$system_name" ; then
1430                 system_name="`(hostname) 2>/dev/null`"
1431         fi
1432 fi
1433 test -n "$system_name" &&
1434 cat >>confdefs.h <<EOF
1435 #define SYSTEM_NAME "$system_name"
1436 EOF
1437
1438 if test "${cf_cv_system_name+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   cf_cv_system_name="$system_name"
1442 fi
1443
1444 test -z "$system_name" && system_name="$cf_cv_system_name"
1445 test -n "$cf_cv_system_name" && echo "$as_me:1445: result: Configuring for $cf_cv_system_name" >&5
1446 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1447
1448 if test ".$system_name" != ".$cf_cv_system_name" ; then
1449         echo "$as_me:1449: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1450 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1451         { { echo "$as_me:1451: error: \"Please remove config.cache and try again.\"" >&5
1452 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1453    { (exit 1); exit 1; }; }
1454 fi
1455
1456 # Check whether --with-system-type or --without-system-type was given.
1457 if test "${with_system_type+set}" = set; then
1458   withval="$with_system_type"
1459   { echo "$as_me:1459: WARNING: overriding system type to $withval" >&5
1460 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1461         cf_cv_system_name=$withval
1462         host_os=$withval
1463
1464 fi;
1465
1466 ###     Save the given $CFLAGS to allow user-override.
1467 cf_user_CFLAGS="$CFLAGS"
1468
1469 ###     Default install-location
1470
1471 echo "$as_me:1471: checking for prefix" >&5
1472 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1473 if test "x$prefix" = "xNONE" ; then
1474         case "$cf_cv_system_name" in
1475                 # non-vendor systems don't have a conflict
1476         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1477                 prefix=/usr
1478                 ;;
1479         *)      prefix=$ac_default_prefix
1480                 ;;
1481         esac
1482 fi
1483 echo "$as_me:1483: result: $prefix" >&5
1484 echo "${ECHO_T}$prefix" >&6
1485
1486 if test "x$prefix" = "xNONE" ; then
1487 echo "$as_me:1487: checking for default include-directory" >&5
1488 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1489 test -n "$verbose" && echo 1>&6
1490 for cf_symbol in \
1491         $includedir \
1492         $includedir/ncurses \
1493         $prefix/include \
1494         $prefix/include/ncurses \
1495         /usr/local/include \
1496         /usr/local/include/ncurses \
1497         /usr/include \
1498         /usr/include/ncurses
1499 do
1500         cf_dir=`eval echo $cf_symbol`
1501         if test -f $cf_dir/curses.h ; then
1502         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1503                 includedir="$cf_symbol"
1504                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1505                 break
1506         fi
1507         fi
1508         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1509 done
1510 echo "$as_me:1510: result: $includedir" >&5
1511 echo "${ECHO_T}$includedir" >&6
1512 fi
1513
1514 ###     Checks for programs.
1515
1516 # Check whether --with-ada or --without-ada was given.
1517 if test "${with_ada+set}" = set; then
1518   withval="$with_ada"
1519   cf_with_ada=$withval
1520 else
1521   cf_with_ada=yes
1522 fi;
1523 if test "x$cf_with_ada" = xyes
1524 then
1525         cf_PROG_CC="gnatgcc gcc cc"
1526 else
1527         cf_PROG_CC="gcc cc"
1528 fi
1529
1530 ac_ext=c
1531 ac_cpp='$CPP $CPPFLAGS'
1532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1535 ac_main_return=return
1536 if test -n "$ac_tool_prefix"; then
1537   for ac_prog in $cf_PROG_CC
1538   do
1539     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1540 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1541 echo "$as_me:1541: checking for $ac_word" >&5
1542 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1543 if test "${ac_cv_prog_CC+set}" = set; then
1544   echo $ECHO_N "(cached) $ECHO_C" >&6
1545 else
1546   if test -n "$CC"; then
1547   ac_cv_prog_CC="$CC" # Let the user override the test.
1548 else
1549   ac_save_IFS=$IFS; IFS=$ac_path_separator
1550 ac_dummy="$PATH"
1551 for ac_dir in $ac_dummy; do
1552   IFS=$ac_save_IFS
1553   test -z "$ac_dir" && ac_dir=.
1554   $as_executable_p "$ac_dir/$ac_word" || continue
1555 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1556 echo "$as_me:1556: found $ac_dir/$ac_word" >&5
1557 break
1558 done
1559
1560 fi
1561 fi
1562 CC=$ac_cv_prog_CC
1563 if test -n "$CC"; then
1564   echo "$as_me:1564: result: $CC" >&5
1565 echo "${ECHO_T}$CC" >&6
1566 else
1567   echo "$as_me:1567: result: no" >&5
1568 echo "${ECHO_T}no" >&6
1569 fi
1570
1571     test -n "$CC" && break
1572   done
1573 fi
1574 if test -z "$CC"; then
1575   ac_ct_CC=$CC
1576   for ac_prog in $cf_PROG_CC
1577 do
1578   # Extract the first word of "$ac_prog", so it can be a program name with args.
1579 set dummy $ac_prog; ac_word=$2
1580 echo "$as_me:1580: checking for $ac_word" >&5
1581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1582 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1583   echo $ECHO_N "(cached) $ECHO_C" >&6
1584 else
1585   if test -n "$ac_ct_CC"; then
1586   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1587 else
1588   ac_save_IFS=$IFS; IFS=$ac_path_separator
1589 ac_dummy="$PATH"
1590 for ac_dir in $ac_dummy; do
1591   IFS=$ac_save_IFS
1592   test -z "$ac_dir" && ac_dir=.
1593   $as_executable_p "$ac_dir/$ac_word" || continue
1594 ac_cv_prog_ac_ct_CC="$ac_prog"
1595 echo "$as_me:1595: found $ac_dir/$ac_word" >&5
1596 break
1597 done
1598
1599 fi
1600 fi
1601 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1602 if test -n "$ac_ct_CC"; then
1603   echo "$as_me:1603: result: $ac_ct_CC" >&5
1604 echo "${ECHO_T}$ac_ct_CC" >&6
1605 else
1606   echo "$as_me:1606: result: no" >&5
1607 echo "${ECHO_T}no" >&6
1608 fi
1609
1610   test -n "$ac_ct_CC" && break
1611 done
1612
1613   CC=$ac_ct_CC
1614 fi
1615
1616 test -z "$CC" && { { echo "$as_me:1616: error: no acceptable cc found in \$PATH" >&5
1617 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1618    { (exit 1); exit 1; }; }
1619
1620 # Provide some information about the compiler.
1621 echo "$as_me:1621:" \
1622      "checking for C compiler version" >&5
1623 ac_compiler=`set X $ac_compile; echo $2`
1624 { (eval echo "$as_me:1624: \"$ac_compiler --version </dev/null >&5\"") >&5
1625   (eval $ac_compiler --version </dev/null >&5) 2>&5
1626   ac_status=$?
1627   echo "$as_me:1627: \$? = $ac_status" >&5
1628   (exit $ac_status); }
1629 { (eval echo "$as_me:1629: \"$ac_compiler -v </dev/null >&5\"") >&5
1630   (eval $ac_compiler -v </dev/null >&5) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }
1634 { (eval echo "$as_me:1634: \"$ac_compiler -V </dev/null >&5\"") >&5
1635   (eval $ac_compiler -V </dev/null >&5) 2>&5
1636   ac_status=$?
1637   echo "$as_me:1637: \$? = $ac_status" >&5
1638   (exit $ac_status); }
1639
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1643
1644 int
1645 main ()
1646 {
1647
1648   ;
1649   return 0;
1650 }
1651 _ACEOF
1652 ac_clean_files_save=$ac_clean_files
1653 ac_clean_files="$ac_clean_files a.out a.exe"
1654 # Try to create an executable without -o first, disregard a.out.
1655 # It will help us diagnose broken compilers, and finding out an intuition
1656 # of exeext.
1657 echo "$as_me:1657: checking for C compiler default output" >&5
1658 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1659 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1660 if { (eval echo "$as_me:1660: \"$ac_link_default\"") >&5
1661   (eval $ac_link_default) 2>&5
1662   ac_status=$?
1663   echo "$as_me:1663: \$? = $ac_status" >&5
1664   (exit $ac_status); }; then
1665   # Find the output, starting from the most likely.  This scheme is
1666 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1667 # resort.
1668 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1669                 ls a.out conftest 2>/dev/null;
1670                 ls a.* conftest.* 2>/dev/null`; do
1671   case $ac_file in
1672     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1673     a.out ) # We found the default executable, but exeext='' is most
1674             # certainly right.
1675             break;;
1676     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1677           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1678           export ac_cv_exeext
1679           break;;
1680     * ) break;;
1681   esac
1682 done
1683 else
1684   echo "$as_me: failed program was:" >&5
1685 cat conftest.$ac_ext >&5
1686 { { echo "$as_me:1686: error: C compiler cannot create executables" >&5
1687 echo "$as_me: error: C compiler cannot create executables" >&2;}
1688    { (exit 77); exit 77; }; }
1689 fi
1690
1691 ac_exeext=$ac_cv_exeext
1692 echo "$as_me:1692: result: $ac_file" >&5
1693 echo "${ECHO_T}$ac_file" >&6
1694
1695 # Check the compiler produces executables we can run.  If not, either
1696 # the compiler is broken, or we cross compile.
1697 echo "$as_me:1697: checking whether the C compiler works" >&5
1698 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1699 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1700 # If not cross compiling, check that we can run a simple program.
1701 if test "$cross_compiling" != yes; then
1702   if { ac_try='./$ac_file'
1703   { (eval echo "$as_me:1703: \"$ac_try\"") >&5
1704   (eval $ac_try) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }; }; then
1708     cross_compiling=no
1709   else
1710     if test "$cross_compiling" = maybe; then
1711         cross_compiling=yes
1712     else
1713         { { echo "$as_me:1713: error: cannot run C compiled programs.
1714 If you meant to cross compile, use \`--host'." >&5
1715 echo "$as_me: error: cannot run C compiled programs.
1716 If you meant to cross compile, use \`--host'." >&2;}
1717    { (exit 1); exit 1; }; }
1718     fi
1719   fi
1720 fi
1721 echo "$as_me:1721: result: yes" >&5
1722 echo "${ECHO_T}yes" >&6
1723
1724 rm -f a.out a.exe conftest$ac_cv_exeext
1725 ac_clean_files=$ac_clean_files_save
1726 # Check the compiler produces executables we can run.  If not, either
1727 # the compiler is broken, or we cross compile.
1728 echo "$as_me:1728: checking whether we are cross compiling" >&5
1729 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1730 echo "$as_me:1730: result: $cross_compiling" >&5
1731 echo "${ECHO_T}$cross_compiling" >&6
1732
1733 echo "$as_me:1733: checking for executable suffix" >&5
1734 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1735 if { (eval echo "$as_me:1735: \"$ac_link\"") >&5
1736   (eval $ac_link) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; then
1740   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1741 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1742 # work properly (i.e., refer to `conftest.exe'), while it won't with
1743 # `rm'.
1744 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1745   case $ac_file in
1746     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1747     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1748           export ac_cv_exeext
1749           break;;
1750     * ) break;;
1751   esac
1752 done
1753 else
1754   { { echo "$as_me:1754: error: cannot compute EXEEXT: cannot compile and link" >&5
1755 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1756    { (exit 1); exit 1; }; }
1757 fi
1758
1759 rm -f conftest$ac_cv_exeext
1760 echo "$as_me:1760: result: $ac_cv_exeext" >&5
1761 echo "${ECHO_T}$ac_cv_exeext" >&6
1762
1763 rm -f conftest.$ac_ext
1764 EXEEXT=$ac_cv_exeext
1765 ac_exeext=$EXEEXT
1766 echo "$as_me:1766: checking for object suffix" >&5
1767 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1768 if test "${ac_cv_objext+set}" = set; then
1769   echo $ECHO_N "(cached) $ECHO_C" >&6
1770 else
1771   cat >conftest.$ac_ext <<_ACEOF
1772 #line 1772 "configure"
1773 #include "confdefs.h"
1774
1775 int
1776 main ()
1777 {
1778
1779   ;
1780   return 0;
1781 }
1782 _ACEOF
1783 rm -f conftest.o conftest.obj
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785   (eval $ac_compile) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; then
1789   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1790   case $ac_file in
1791     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1792     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1793        break;;
1794   esac
1795 done
1796 else
1797   echo "$as_me: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1799 { { echo "$as_me:1799: error: cannot compute OBJEXT: cannot compile" >&5
1800 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1801    { (exit 1); exit 1; }; }
1802 fi
1803
1804 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1805 fi
1806 echo "$as_me:1806: result: $ac_cv_objext" >&5
1807 echo "${ECHO_T}$ac_cv_objext" >&6
1808 OBJEXT=$ac_cv_objext
1809 ac_objext=$OBJEXT
1810 echo "$as_me:1810: checking whether we are using the GNU C compiler" >&5
1811 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1812 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1813   echo $ECHO_N "(cached) $ECHO_C" >&6
1814 else
1815   cat >conftest.$ac_ext <<_ACEOF
1816 #line 1816 "configure"
1817 #include "confdefs.h"
1818
1819 int
1820 main ()
1821 {
1822 #ifndef __GNUC__
1823        choke me
1824 #endif
1825
1826   ;
1827   return 0;
1828 }
1829 _ACEOF
1830 rm -f conftest.$ac_objext
1831 if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
1832   (eval $ac_compile) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -s conftest.$ac_objext'
1837   { (eval echo "$as_me:1837: \"$ac_try\"") >&5
1838   (eval $ac_try) 2>&5
1839   ac_status=$?
1840   echo "$as_me:1840: \$? = $ac_status" >&5
1841   (exit $ac_status); }; }; then
1842   ac_compiler_gnu=yes
1843 else
1844   echo "$as_me: failed program was:" >&5
1845 cat conftest.$ac_ext >&5
1846 ac_compiler_gnu=no
1847 fi
1848 rm -f conftest.$ac_objext conftest.$ac_ext
1849 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1850
1851 fi
1852 echo "$as_me:1852: result: $ac_cv_c_compiler_gnu" >&5
1853 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1854 GCC=`test $ac_compiler_gnu = yes && echo yes`
1855 ac_test_CFLAGS=${CFLAGS+set}
1856 ac_save_CFLAGS=$CFLAGS
1857 CFLAGS="-g"
1858 echo "$as_me:1858: checking whether $CC accepts -g" >&5
1859 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1860 if test "${ac_cv_prog_cc_g+set}" = set; then
1861   echo $ECHO_N "(cached) $ECHO_C" >&6
1862 else
1863   cat >conftest.$ac_ext <<_ACEOF
1864 #line 1864 "configure"
1865 #include "confdefs.h"
1866
1867 int
1868 main ()
1869 {
1870
1871   ;
1872   return 0;
1873 }
1874 _ACEOF
1875 rm -f conftest.$ac_objext
1876 if { (eval echo "$as_me:1876: \"$ac_compile\"") >&5
1877   (eval $ac_compile) 2>&5
1878   ac_status=$?
1879   echo "$as_me:1879: \$? = $ac_status" >&5
1880   (exit $ac_status); } &&
1881          { ac_try='test -s conftest.$ac_objext'
1882   { (eval echo "$as_me:1882: \"$ac_try\"") >&5
1883   (eval $ac_try) 2>&5
1884   ac_status=$?
1885   echo "$as_me:1885: \$? = $ac_status" >&5
1886   (exit $ac_status); }; }; then
1887   ac_cv_prog_cc_g=yes
1888 else
1889   echo "$as_me: failed program was:" >&5
1890 cat conftest.$ac_ext >&5
1891 ac_cv_prog_cc_g=no
1892 fi
1893 rm -f conftest.$ac_objext conftest.$ac_ext
1894 fi
1895 echo "$as_me:1895: result: $ac_cv_prog_cc_g" >&5
1896 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1897 if test "$ac_test_CFLAGS" = set; then
1898   CFLAGS=$ac_save_CFLAGS
1899 elif test $ac_cv_prog_cc_g = yes; then
1900   if test "$GCC" = yes; then
1901     CFLAGS="-g -O2"
1902   else
1903     CFLAGS="-g"
1904   fi
1905 else
1906   if test "$GCC" = yes; then
1907     CFLAGS="-O2"
1908   else
1909     CFLAGS=
1910   fi
1911 fi
1912 # Some people use a C++ compiler to compile C.  Since we use `exit',
1913 # in C++ we need to declare it.  In case someone uses the same compiler
1914 # for both compiling C and C++ we need to have the C++ compiler decide
1915 # the declaration of exit, since it's the most demanding environment.
1916 cat >conftest.$ac_ext <<_ACEOF
1917 #ifndef __cplusplus
1918   choke me
1919 #endif
1920 _ACEOF
1921 rm -f conftest.$ac_objext
1922 if { (eval echo "$as_me:1922: \"$ac_compile\"") >&5
1923   (eval $ac_compile) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit $ac_status); } &&
1927          { ac_try='test -s conftest.$ac_objext'
1928   { (eval echo "$as_me:1928: \"$ac_try\"") >&5
1929   (eval $ac_try) 2>&5
1930   ac_status=$?
1931   echo "$as_me:1931: \$? = $ac_status" >&5
1932   (exit $ac_status); }; }; then
1933   for ac_declaration in \
1934    ''\
1935    '#include <stdlib.h>' \
1936    'extern "C" void std::exit (int) throw (); using std::exit;' \
1937    'extern "C" void std::exit (int); using std::exit;' \
1938    'extern "C" void exit (int) throw ();' \
1939    'extern "C" void exit (int);' \
1940    'void exit (int);'
1941 do
1942   cat >conftest.$ac_ext <<_ACEOF
1943 #line 1943 "configure"
1944 #include "confdefs.h"
1945 #include <stdlib.h>
1946 $ac_declaration
1947 int
1948 main ()
1949 {
1950 exit (42);
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   :
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 continue
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974   cat >conftest.$ac_ext <<_ACEOF
1975 #line 1975 "configure"
1976 #include "confdefs.h"
1977 $ac_declaration
1978 int
1979 main ()
1980 {
1981 exit (42);
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 rm -f conftest.$ac_objext
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988   (eval $ac_compile) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); } &&
1992          { ac_try='test -s conftest.$ac_objext'
1993   { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994   (eval $ac_try) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); }; }; then
1998   break
1999 else
2000   echo "$as_me: failed program was:" >&5
2001 cat conftest.$ac_ext >&5
2002 fi
2003 rm -f conftest.$ac_objext conftest.$ac_ext
2004 done
2005 rm -rf conftest*
2006 if test -n "$ac_declaration"; then
2007   echo '#ifdef __cplusplus' >>confdefs.h
2008   echo $ac_declaration      >>confdefs.h
2009   echo '#endif'             >>confdefs.h
2010 fi
2011
2012 else
2013   echo "$as_me: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 fi
2016 rm -f conftest.$ac_objext conftest.$ac_ext
2017 ac_ext=c
2018 ac_cpp='$CPP $CPPFLAGS'
2019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2022 ac_main_return=return
2023
2024 GCC_VERSION=none
2025 if test "$GCC" = yes ; then
2026         echo "$as_me:2026: checking version of $CC" >&5
2027 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2028         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2029         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2030         echo "$as_me:2030: result: $GCC_VERSION" >&5
2031 echo "${ECHO_T}$GCC_VERSION" >&6
2032 fi
2033
2034 echo "$as_me:2034: checking for $CC option to accept ANSI C" >&5
2035 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2036 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2037   echo $ECHO_N "(cached) $ECHO_C" >&6
2038 else
2039   ac_cv_prog_cc_stdc=no
2040 ac_save_CC=$CC
2041 cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 #include <stdarg.h>
2045 #include <stdio.h>
2046 #include <sys/types.h>
2047 #include <sys/stat.h>
2048 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2049 struct buf { int x; };
2050 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2051 static char *e (p, i)
2052      char **p;
2053      int i;
2054 {
2055   return p[i];
2056 }
2057 static char *f (char * (*g) (char **, int), char **p, ...)
2058 {
2059   char *s;
2060   va_list v;
2061   va_start (v,p);
2062   s = g (p, va_arg (v,int));
2063   va_end (v);
2064   return s;
2065 }
2066 int test (int i, double x);
2067 struct s1 {int (*f) (int a);};
2068 struct s2 {int (*f) (double a);};
2069 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2070 int argc;
2071 char **argv;
2072 int
2073 main ()
2074 {
2075 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2076   ;
2077   return 0;
2078 }
2079 _ACEOF
2080 # Don't try gcc -ansi; that turns off useful extensions and
2081 # breaks some systems' header files.
2082 # AIX                   -qlanglvl=ansi
2083 # Ultrix and OSF/1      -std1
2084 # HP-UX 10.20 and later -Ae
2085 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2086 # SVR4                  -Xc -D__EXTENSIONS__
2087 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2088 do
2089   CC="$ac_save_CC $ac_arg"
2090   rm -f conftest.$ac_objext
2091 if { (eval echo "$as_me:2091: \"$ac_compile\"") >&5
2092   (eval $ac_compile) 2>&5
2093   ac_status=$?
2094   echo "$as_me:2094: \$? = $ac_status" >&5
2095   (exit $ac_status); } &&
2096          { ac_try='test -s conftest.$ac_objext'
2097   { (eval echo "$as_me:2097: \"$ac_try\"") >&5
2098   (eval $ac_try) 2>&5
2099   ac_status=$?
2100   echo "$as_me:2100: \$? = $ac_status" >&5
2101   (exit $ac_status); }; }; then
2102   ac_cv_prog_cc_stdc=$ac_arg
2103 break
2104 else
2105   echo "$as_me: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 fi
2108 rm -f conftest.$ac_objext
2109 done
2110 rm -f conftest.$ac_ext conftest.$ac_objext
2111 CC=$ac_save_CC
2112
2113 fi
2114
2115 case "x$ac_cv_prog_cc_stdc" in
2116   x|xno)
2117     echo "$as_me:2117: result: none needed" >&5
2118 echo "${ECHO_T}none needed" >&6 ;;
2119   *)
2120     echo "$as_me:2120: result: $ac_cv_prog_cc_stdc" >&5
2121 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2122     CC="$CC $ac_cv_prog_cc_stdc" ;;
2123 esac
2124
2125 # This should have been defined by AC_PROG_CC
2126 : ${CC:=cc}
2127
2128 echo "$as_me:2128: checking \$CC variable" >&5
2129 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2130 case "$CC" in #(vi
2131 *[\ \   ]-[IUD]*)
2132         echo "$as_me:2132: result: broken" >&5
2133 echo "${ECHO_T}broken" >&6
2134         { echo "$as_me:2134: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2135 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2136         # humor him...
2137         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2138         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2139
2140 cf_fix_cppflags=no
2141 cf_new_cflags=
2142 cf_new_cppflags=
2143 cf_new_extra_cppflags=
2144
2145 for cf_add_cflags in $cf_flags
2146 do
2147 case $cf_fix_cppflags in
2148 no)
2149         case $cf_add_cflags in #(vi
2150         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2151                 case $cf_add_cflags in
2152                 -D*)
2153                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2154
2155                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2156                                 && test -z "${cf_tst_cflags}" \
2157                                 && cf_fix_cppflags=yes
2158
2159                         if test $cf_fix_cppflags = yes ; then
2160                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2161                                 continue
2162                         elif test "${cf_tst_cflags}" = "\"'" ; then
2163                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2164                                 continue
2165                         fi
2166                         ;;
2167                 esac
2168                 case "$CPPFLAGS" in
2169                 *$cf_add_cflags) #(vi
2170                         ;;
2171                 *) #(vi
2172                         case $cf_add_cflags in #(vi
2173                         -D*)
2174                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2175
2176 CPPFLAGS=`echo "$CPPFLAGS" | \
2177         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2178                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2179
2180                                 ;;
2181                         esac
2182                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2183                         ;;
2184                 esac
2185                 ;;
2186         *)
2187                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2188                 ;;
2189         esac
2190         ;;
2191 yes)
2192         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2193
2194         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2195
2196         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2197                 && test -z "${cf_tst_cflags}" \
2198                 && cf_fix_cppflags=no
2199         ;;
2200 esac
2201 done
2202
2203 if test -n "$cf_new_cflags" ; then
2204
2205         CFLAGS="$CFLAGS $cf_new_cflags"
2206 fi
2207
2208 if test -n "$cf_new_cppflags" ; then
2209
2210         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2211 fi
2212
2213 if test -n "$cf_new_extra_cppflags" ; then
2214
2215         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2216 fi
2217
2218         ;;
2219 *)
2220         echo "$as_me:2220: result: ok" >&5
2221 echo "${ECHO_T}ok" >&6
2222         ;;
2223 esac
2224
2225 ac_ext=c
2226 ac_cpp='$CPP $CPPFLAGS'
2227 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2228 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2229 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2230 ac_main_return=return
2231 echo "$as_me:2231: checking how to run the C preprocessor" >&5
2232 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2233 # On Suns, sometimes $CPP names a directory.
2234 if test -n "$CPP" && test -d "$CPP"; then
2235   CPP=
2236 fi
2237 if test -z "$CPP"; then
2238   if test "${ac_cv_prog_CPP+set}" = set; then
2239   echo $ECHO_N "(cached) $ECHO_C" >&6
2240 else
2241       # Double quotes because CPP needs to be expanded
2242     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2243     do
2244       ac_preproc_ok=false
2245 for ac_c_preproc_warn_flag in '' yes
2246 do
2247   # Use a header file that comes with gcc, so configuring glibc
2248   # with a fresh cross-compiler works.
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp. "Syntax error" is here to catch this case.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255                      Syntax error
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   :
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Broken: fails on valid input.
2279 continue
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283   # OK, works on sane cases.  Now check whether non-existent headers
2284   # can be detected and how.
2285   cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2289 _ACEOF
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2292   ac_status=$?
2293   egrep -v '^ *\+' conftest.er1 >conftest.err
2294   rm -f conftest.er1
2295   cat conftest.err >&5
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); } >/dev/null; then
2298   if test -s conftest.err; then
2299     ac_cpp_err=$ac_c_preproc_warn_flag
2300   else
2301     ac_cpp_err=
2302   fi
2303 else
2304   ac_cpp_err=yes
2305 fi
2306 if test -z "$ac_cpp_err"; then
2307   # Broken: success on invalid input.
2308 continue
2309 else
2310   echo "$as_me: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   # Passes both tests.
2313 ac_preproc_ok=:
2314 break
2315 fi
2316 rm -f conftest.err conftest.$ac_ext
2317
2318 done
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2322   break
2323 fi
2324
2325     done
2326     ac_cv_prog_CPP=$CPP
2327
2328 fi
2329   CPP=$ac_cv_prog_CPP
2330 else
2331   ac_cv_prog_CPP=$CPP
2332 fi
2333 echo "$as_me:2333: result: $CPP" >&5
2334 echo "${ECHO_T}$CPP" >&6
2335 ac_preproc_ok=false
2336 for ac_c_preproc_warn_flag in '' yes
2337 do
2338   # Use a header file that comes with gcc, so configuring glibc
2339   # with a fresh cross-compiler works.
2340   # On the NeXT, cc -E runs the code through the compiler's parser,
2341   # not just through cpp. "Syntax error" is here to catch this case.
2342   cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345 #include <assert.h>
2346                      Syntax error
2347 _ACEOF
2348 if { (eval echo "$as_me:2348: \"$ac_cpp conftest.$ac_ext\"") >&5
2349   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2350   ac_status=$?
2351   egrep -v '^ *\+' conftest.er1 >conftest.err
2352   rm -f conftest.er1
2353   cat conftest.err >&5
2354   echo "$as_me:2354: \$? = $ac_status" >&5
2355   (exit $ac_status); } >/dev/null; then
2356   if test -s conftest.err; then
2357     ac_cpp_err=$ac_c_preproc_warn_flag
2358   else
2359     ac_cpp_err=
2360   fi
2361 else
2362   ac_cpp_err=yes
2363 fi
2364 if test -z "$ac_cpp_err"; then
2365   :
2366 else
2367   echo "$as_me: failed program was:" >&5
2368   cat conftest.$ac_ext >&5
2369   # Broken: fails on valid input.
2370 continue
2371 fi
2372 rm -f conftest.err conftest.$ac_ext
2373
2374   # OK, works on sane cases.  Now check whether non-existent headers
2375   # can be detected and how.
2376   cat >conftest.$ac_ext <<_ACEOF
2377 #line 2377 "configure"
2378 #include "confdefs.h"
2379 #include <ac_nonexistent.h>
2380 _ACEOF
2381 if { (eval echo "$as_me:2381: \"$ac_cpp conftest.$ac_ext\"") >&5
2382   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2383   ac_status=$?
2384   egrep -v '^ *\+' conftest.er1 >conftest.err
2385   rm -f conftest.er1
2386   cat conftest.err >&5
2387   echo "$as_me:2387: \$? = $ac_status" >&5
2388   (exit $ac_status); } >/dev/null; then
2389   if test -s conftest.err; then
2390     ac_cpp_err=$ac_c_preproc_warn_flag
2391   else
2392     ac_cpp_err=
2393   fi
2394 else
2395   ac_cpp_err=yes
2396 fi
2397 if test -z "$ac_cpp_err"; then
2398   # Broken: success on invalid input.
2399 continue
2400 else
2401   echo "$as_me: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   # Passes both tests.
2404 ac_preproc_ok=:
2405 break
2406 fi
2407 rm -f conftest.err conftest.$ac_ext
2408
2409 done
2410 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2411 rm -f conftest.err conftest.$ac_ext
2412 if $ac_preproc_ok; then
2413   :
2414 else
2415   { { echo "$as_me:2415: error: C preprocessor \"$CPP\" fails sanity check" >&5
2416 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2417    { (exit 1); exit 1; }; }
2418 fi
2419
2420 ac_ext=c
2421 ac_cpp='$CPP $CPPFLAGS'
2422 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2423 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2424 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2425 ac_main_return=return
2426
2427 if test $ac_cv_c_compiler_gnu = yes; then
2428     echo "$as_me:2428: checking whether $CC needs -traditional" >&5
2429 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2430 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433     ac_pattern="Autoconf.*'x'"
2434   cat >conftest.$ac_ext <<_ACEOF
2435 #line 2435 "configure"
2436 #include "confdefs.h"
2437 #include <sgtty.h>
2438 int Autoconf = TIOCGETP;
2439 _ACEOF
2440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2441   egrep "$ac_pattern" >/dev/null 2>&1; then
2442   ac_cv_prog_gcc_traditional=yes
2443 else
2444   ac_cv_prog_gcc_traditional=no
2445 fi
2446 rm -rf conftest*
2447
2448   if test $ac_cv_prog_gcc_traditional = no; then
2449     cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2452 #include <termio.h>
2453 int Autoconf = TCGETA;
2454 _ACEOF
2455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2456   egrep "$ac_pattern" >/dev/null 2>&1; then
2457   ac_cv_prog_gcc_traditional=yes
2458 fi
2459 rm -rf conftest*
2460
2461   fi
2462 fi
2463 echo "$as_me:2463: result: $ac_cv_prog_gcc_traditional" >&5
2464 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2465   if test $ac_cv_prog_gcc_traditional = yes; then
2466     CC="$CC -traditional"
2467   fi
2468 fi
2469
2470 echo "$as_me:2470: checking whether $CC understands -c and -o together" >&5
2471 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2472 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2473   echo $ECHO_N "(cached) $ECHO_C" >&6
2474 else
2475
2476 cat > conftest.$ac_ext <<CF_EOF
2477 #include <stdio.h>
2478 int main()
2479 {
2480         ${cf_cv_main_return:-return}(0);
2481 }
2482 CF_EOF
2483 # We do the test twice because some compilers refuse to overwrite an
2484 # existing .o file with -o, though they will create one.
2485 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2486 if { (eval echo "$as_me:2486: \"$ac_try\"") >&5
2487   (eval $ac_try) 2>&5
2488   ac_status=$?
2489   echo "$as_me:2489: \$? = $ac_status" >&5
2490   (exit $ac_status); } &&
2491   test -f conftest2.$ac_objext && { (eval echo "$as_me:2491: \"$ac_try\"") >&5
2492   (eval $ac_try) 2>&5
2493   ac_status=$?
2494   echo "$as_me:2494: \$? = $ac_status" >&5
2495   (exit $ac_status); };
2496 then
2497   eval cf_cv_prog_CC_c_o=yes
2498 else
2499   eval cf_cv_prog_CC_c_o=no
2500 fi
2501 rm -rf conftest*
2502
2503 fi
2504 if test $cf_cv_prog_CC_c_o = yes; then
2505   echo "$as_me:2505: result: yes" >&5
2506 echo "${ECHO_T}yes" >&6
2507 else
2508   echo "$as_me:2508: result: no" >&5
2509 echo "${ECHO_T}no" >&6
2510 fi
2511
2512 if test "$cross_compiling" = yes ; then
2513   LDCONFIG=:
2514 else
2515 case "$cf_cv_system_name" in #(vi
2516 dragonfly*|mirbsd*|freebsd*) #(vi
2517   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2518   ;;
2519 *) LDPATH=$PATH:/sbin:/usr/sbin
2520   # Extract the first word of "ldconfig", so it can be a program name with args.
2521 set dummy ldconfig; ac_word=$2
2522 echo "$as_me:2522: checking for $ac_word" >&5
2523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2524 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2525   echo $ECHO_N "(cached) $ECHO_C" >&6
2526 else
2527   case $LDCONFIG in
2528   [\\/]* | ?:[\\/]*)
2529   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2530   ;;
2531   *)
2532   ac_save_IFS=$IFS; IFS=$ac_path_separator
2533 ac_dummy="$LDPATH"
2534 for ac_dir in $ac_dummy; do
2535   IFS=$ac_save_IFS
2536   test -z "$ac_dir" && ac_dir=.
2537   if $as_executable_p "$ac_dir/$ac_word"; then
2538    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2539    echo "$as_me:2539: found $ac_dir/$ac_word" >&5
2540    break
2541 fi
2542 done
2543
2544   ;;
2545 esac
2546 fi
2547 LDCONFIG=$ac_cv_path_LDCONFIG
2548
2549 if test -n "$LDCONFIG"; then
2550   echo "$as_me:2550: result: $LDCONFIG" >&5
2551 echo "${ECHO_T}$LDCONFIG" >&6
2552 else
2553   echo "$as_me:2553: result: no" >&5
2554 echo "${ECHO_T}no" >&6
2555 fi
2556
2557   ;;
2558 esac
2559 fi
2560
2561 echo "$as_me:2561: checking if you want to ensure bool is consistent with C++" >&5
2562 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2563
2564 # Check whether --with-cxx or --without-cxx was given.
2565 if test "${with_cxx+set}" = set; then
2566   withval="$with_cxx"
2567   cf_with_cxx=$withval
2568 else
2569   cf_with_cxx=yes
2570 fi;
2571 echo "$as_me:2571: result: $cf_with_cxx" >&5
2572 echo "${ECHO_T}$cf_with_cxx" >&6
2573 if test "X$cf_with_cxx" = Xno ; then
2574         CXX=""
2575         GXX=""
2576 else
2577         # with autoconf 2.13, we can change the error to a warning:
2578                 ac_ext=cc
2579 ac_cpp='$CXXCPP $CPPFLAGS'
2580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2583 ac_main_return=return
2584 if test -n "$ac_tool_prefix"; then
2585   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2586   do
2587     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2588 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2589 echo "$as_me:2589: checking for $ac_word" >&5
2590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2591 if test "${ac_cv_prog_CXX+set}" = set; then
2592   echo $ECHO_N "(cached) $ECHO_C" >&6
2593 else
2594   if test -n "$CXX"; then
2595   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2596 else
2597   ac_save_IFS=$IFS; IFS=$ac_path_separator
2598 ac_dummy="$PATH"
2599 for ac_dir in $ac_dummy; do
2600   IFS=$ac_save_IFS
2601   test -z "$ac_dir" && ac_dir=.
2602   $as_executable_p "$ac_dir/$ac_word" || continue
2603 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2604 echo "$as_me:2604: found $ac_dir/$ac_word" >&5
2605 break
2606 done
2607
2608 fi
2609 fi
2610 CXX=$ac_cv_prog_CXX
2611 if test -n "$CXX"; then
2612   echo "$as_me:2612: result: $CXX" >&5
2613 echo "${ECHO_T}$CXX" >&6
2614 else
2615   echo "$as_me:2615: result: no" >&5
2616 echo "${ECHO_T}no" >&6
2617 fi
2618
2619     test -n "$CXX" && break
2620   done
2621 fi
2622 if test -z "$CXX"; then
2623   ac_ct_CXX=$CXX
2624   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2625 do
2626   # Extract the first word of "$ac_prog", so it can be a program name with args.
2627 set dummy $ac_prog; ac_word=$2
2628 echo "$as_me:2628: checking for $ac_word" >&5
2629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2630 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   if test -n "$ac_ct_CXX"; then
2634   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2635 else
2636   ac_save_IFS=$IFS; IFS=$ac_path_separator
2637 ac_dummy="$PATH"
2638 for ac_dir in $ac_dummy; do
2639   IFS=$ac_save_IFS
2640   test -z "$ac_dir" && ac_dir=.
2641   $as_executable_p "$ac_dir/$ac_word" || continue
2642 ac_cv_prog_ac_ct_CXX="$ac_prog"
2643 echo "$as_me:2643: found $ac_dir/$ac_word" >&5
2644 break
2645 done
2646
2647 fi
2648 fi
2649 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2650 if test -n "$ac_ct_CXX"; then
2651   echo "$as_me:2651: result: $ac_ct_CXX" >&5
2652 echo "${ECHO_T}$ac_ct_CXX" >&6
2653 else
2654   echo "$as_me:2654: result: no" >&5
2655 echo "${ECHO_T}no" >&6
2656 fi
2657
2658   test -n "$ac_ct_CXX" && break
2659 done
2660 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2661
2662   CXX=$ac_ct_CXX
2663 fi
2664
2665 # Provide some information about the compiler.
2666 echo "$as_me:2666:" \
2667      "checking for C++ compiler version" >&5
2668 ac_compiler=`set X $ac_compile; echo $2`
2669 { (eval echo "$as_me:2669: \"$ac_compiler --version </dev/null >&5\"") >&5
2670   (eval $ac_compiler --version </dev/null >&5) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }
2674 { (eval echo "$as_me:2674: \"$ac_compiler -v </dev/null >&5\"") >&5
2675   (eval $ac_compiler -v </dev/null >&5) 2>&5
2676   ac_status=$?
2677   echo "$as_me:2677: \$? = $ac_status" >&5
2678   (exit $ac_status); }
2679 { (eval echo "$as_me:2679: \"$ac_compiler -V </dev/null >&5\"") >&5
2680   (eval $ac_compiler -V </dev/null >&5) 2>&5
2681   ac_status=$?
2682   echo "$as_me:2682: \$? = $ac_status" >&5
2683   (exit $ac_status); }
2684
2685 echo "$as_me:2685: checking whether we are using the GNU C++ compiler" >&5
2686 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2687 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2688   echo $ECHO_N "(cached) $ECHO_C" >&6
2689 else
2690   cat >conftest.$ac_ext <<_ACEOF
2691 #line 2691 "configure"
2692 #include "confdefs.h"
2693
2694 int
2695 main ()
2696 {
2697 #ifndef __GNUC__
2698        choke me
2699 #endif
2700
2701   ;
2702   return 0;
2703 }
2704 _ACEOF
2705 rm -f conftest.$ac_objext
2706 if { (eval echo "$as_me:2706: \"$ac_compile\"") >&5
2707   (eval $ac_compile) 2>&5
2708   ac_status=$?
2709   echo "$as_me:2709: \$? = $ac_status" >&5
2710   (exit $ac_status); } &&
2711          { ac_try='test -s conftest.$ac_objext'
2712   { (eval echo "$as_me:2712: \"$ac_try\"") >&5
2713   (eval $ac_try) 2>&5
2714   ac_status=$?
2715   echo "$as_me:2715: \$? = $ac_status" >&5
2716   (exit $ac_status); }; }; then
2717   ac_compiler_gnu=yes
2718 else
2719   echo "$as_me: failed program was:" >&5
2720 cat conftest.$ac_ext >&5
2721 ac_compiler_gnu=no
2722 fi
2723 rm -f conftest.$ac_objext conftest.$ac_ext
2724 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2725
2726 fi
2727 echo "$as_me:2727: result: $ac_cv_cxx_compiler_gnu" >&5
2728 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2729 GXX=`test $ac_compiler_gnu = yes && echo yes`
2730 ac_test_CXXFLAGS=${CXXFLAGS+set}
2731 ac_save_CXXFLAGS=$CXXFLAGS
2732 CXXFLAGS="-g"
2733 echo "$as_me:2733: checking whether $CXX accepts -g" >&5
2734 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2735 if test "${ac_cv_prog_cxx_g+set}" = set; then
2736   echo $ECHO_N "(cached) $ECHO_C" >&6
2737 else
2738   cat >conftest.$ac_ext <<_ACEOF
2739 #line 2739 "configure"
2740 #include "confdefs.h"
2741
2742 int
2743 main ()
2744 {
2745
2746   ;
2747   return 0;
2748 }
2749 _ACEOF
2750 rm -f conftest.$ac_objext
2751 if { (eval echo "$as_me:2751: \"$ac_compile\"") >&5
2752   (eval $ac_compile) 2>&5
2753   ac_status=$?
2754   echo "$as_me:2754: \$? = $ac_status" >&5
2755   (exit $ac_status); } &&
2756          { ac_try='test -s conftest.$ac_objext'
2757   { (eval echo "$as_me:2757: \"$ac_try\"") >&5
2758   (eval $ac_try) 2>&5
2759   ac_status=$?
2760   echo "$as_me:2760: \$? = $ac_status" >&5
2761   (exit $ac_status); }; }; then
2762   ac_cv_prog_cxx_g=yes
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 ac_cv_prog_cxx_g=no
2767 fi
2768 rm -f conftest.$ac_objext conftest.$ac_ext
2769 fi
2770 echo "$as_me:2770: result: $ac_cv_prog_cxx_g" >&5
2771 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2772 if test "$ac_test_CXXFLAGS" = set; then
2773   CXXFLAGS=$ac_save_CXXFLAGS
2774 elif test $ac_cv_prog_cxx_g = yes; then
2775   if test "$GXX" = yes; then
2776     CXXFLAGS="-g -O2"
2777   else
2778     CXXFLAGS="-g"
2779   fi
2780 else
2781   if test "$GXX" = yes; then
2782     CXXFLAGS="-O2"
2783   else
2784     CXXFLAGS=
2785   fi
2786 fi
2787 for ac_declaration in \
2788    ''\
2789    '#include <stdlib.h>' \
2790    'extern "C" void std::exit (int) throw (); using std::exit;' \
2791    'extern "C" void std::exit (int); using std::exit;' \
2792    'extern "C" void exit (int) throw ();' \
2793    'extern "C" void exit (int);' \
2794    'void exit (int);'
2795 do
2796   cat >conftest.$ac_ext <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799 #include <stdlib.h>
2800 $ac_declaration
2801 int
2802 main ()
2803 {
2804 exit (42);
2805   ;
2806   return 0;
2807 }
2808 _ACEOF
2809 rm -f conftest.$ac_objext
2810 if { (eval echo "$as_me:2810: \"$ac_compile\"") >&5
2811   (eval $ac_compile) 2>&5
2812   ac_status=$?
2813   echo "$as_me:2813: \$? = $ac_status" >&5
2814   (exit $ac_status); } &&
2815          { ac_try='test -s conftest.$ac_objext'
2816   { (eval echo "$as_me:2816: \"$ac_try\"") >&5
2817   (eval $ac_try) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }; }; then
2821   :
2822 else
2823   echo "$as_me: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2825 continue
2826 fi
2827 rm -f conftest.$ac_objext conftest.$ac_ext
2828   cat >conftest.$ac_ext <<_ACEOF
2829 #line 2829 "configure"
2830 #include "confdefs.h"
2831 $ac_declaration
2832 int
2833 main ()
2834 {
2835 exit (42);
2836   ;
2837   return 0;
2838 }
2839 _ACEOF
2840 rm -f conftest.$ac_objext
2841 if { (eval echo "$as_me:2841: \"$ac_compile\"") >&5
2842   (eval $ac_compile) 2>&5
2843   ac_status=$?
2844   echo "$as_me:2844: \$? = $ac_status" >&5
2845   (exit $ac_status); } &&
2846          { ac_try='test -s conftest.$ac_objext'
2847   { (eval echo "$as_me:2847: \"$ac_try\"") >&5
2848   (eval $ac_try) 2>&5
2849   ac_status=$?
2850   echo "$as_me:2850: \$? = $ac_status" >&5
2851   (exit $ac_status); }; }; then
2852   break
2853 else
2854   echo "$as_me: failed program was:" >&5
2855 cat conftest.$ac_ext >&5
2856 fi
2857 rm -f conftest.$ac_objext conftest.$ac_ext
2858 done
2859 rm -rf conftest*
2860 if test -n "$ac_declaration"; then
2861   echo '#ifdef __cplusplus' >>confdefs.h
2862   echo $ac_declaration      >>confdefs.h
2863   echo '#endif'             >>confdefs.h
2864 fi
2865
2866 ac_ext=c
2867 ac_cpp='$CPP $CPPFLAGS'
2868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2871 ac_main_return=return
2872
2873         ac_ext=cc
2874 ac_cpp='$CXXCPP $CPPFLAGS'
2875 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2876 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2877 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2878 ac_main_return=return
2879
2880         if test "x$cf_with_cxx" != xno
2881         then
2882                 # Several of the C++ configurations do not work, particularly when
2883                 # cross-compiling (20140913 -TD)
2884                 echo "$as_me:2884: checking if $CXX works" >&5
2885 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2886
2887                 save_CPPFLAGS="$CPPFLAGS"
2888                 eval cf_includedir=${includedir}
2889                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2890
2891 cat >conftest.$ac_ext <<_ACEOF
2892 #line 2892 "configure"
2893 #include "confdefs.h"
2894
2895 #include <stdlib.h>
2896 #include <stdio.h>
2897
2898 int
2899 main ()
2900 {
2901
2902                 printf("Hello world!\n")
2903
2904   ;
2905   return 0;
2906 }
2907 _ACEOF
2908 rm -f conftest.$ac_objext
2909 if { (eval echo "$as_me:2909: \"$ac_compile\"") >&5
2910   (eval $ac_compile) 2>&5
2911   ac_status=$?
2912   echo "$as_me:2912: \$? = $ac_status" >&5
2913   (exit $ac_status); } &&
2914          { ac_try='test -s conftest.$ac_objext'
2915   { (eval echo "$as_me:2915: \"$ac_try\"") >&5
2916   (eval $ac_try) 2>&5
2917   ac_status=$?
2918   echo "$as_me:2918: \$? = $ac_status" >&5
2919   (exit $ac_status); }; }; then
2920   cf_cxx_works=yes
2921 else
2922   echo "$as_me: failed program was:" >&5
2923 cat conftest.$ac_ext >&5
2924 cf_cxx_works=no
2925 fi
2926 rm -f conftest.$ac_objext conftest.$ac_ext
2927                 CPPFLAGS="$save_CPPFLAGS"
2928
2929                 echo "$as_me:2929: result: $cf_cxx_works" >&5
2930 echo "${ECHO_T}$cf_cxx_works" >&6
2931                 if test "x$cf_cxx_works" = xno
2932                 then
2933                         { echo "$as_me:2933: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2934 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2935                         cf_with_cxx=no; CXX=""; GXX="";
2936                 fi
2937         fi
2938         ac_ext=c
2939 ac_cpp='$CPP $CPPFLAGS'
2940 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2941 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2942 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2943 ac_main_return=return
2944
2945         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2946         if test "$CXX" = "g++" ; then
2947                 # Extract the first word of "g++", so it can be a program name with args.
2948 set dummy g++; ac_word=$2
2949 echo "$as_me:2949: checking for $ac_word" >&5
2950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2951 if test "${ac_cv_path_CXX+set}" = set; then
2952   echo $ECHO_N "(cached) $ECHO_C" >&6
2953 else
2954   case $CXX in
2955   [\\/]* | ?:[\\/]*)
2956   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2957   ;;
2958   *)
2959   ac_save_IFS=$IFS; IFS=$ac_path_separator
2960 ac_dummy="$PATH"
2961 for ac_dir in $ac_dummy; do
2962   IFS=$ac_save_IFS
2963   test -z "$ac_dir" && ac_dir=.
2964   if $as_executable_p "$ac_dir/$ac_word"; then
2965    ac_cv_path_CXX="$ac_dir/$ac_word"
2966    echo "$as_me:2966: found $ac_dir/$ac_word" >&5
2967    break
2968 fi
2969 done
2970
2971   ;;
2972 esac
2973 fi
2974 CXX=$ac_cv_path_CXX
2975
2976 if test -n "$CXX"; then
2977   echo "$as_me:2977: result: $CXX" >&5
2978 echo "${ECHO_T}$CXX" >&6
2979 else
2980   echo "$as_me:2980: result: no" >&5
2981 echo "${ECHO_T}no" >&6
2982 fi
2983
2984         fi
2985         case "x$CXX" in #(vi
2986         x|xg++)
2987                 { echo "$as_me:2987: WARNING: You don't have any C++ compiler, too bad" >&5
2988 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2989                 cf_with_cxx=no; CXX=""; GXX="";
2990                 ;;
2991         esac
2992 fi
2993
2994 GXX_VERSION=none
2995 if test "$GXX" = yes; then
2996         echo "$as_me:2996: checking version of ${CXX:-g++}" >&5
2997 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2998         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2999         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3000         echo "$as_me:3000: result: $GXX_VERSION" >&5
3001 echo "${ECHO_T}$GXX_VERSION" >&6
3002 fi
3003
3004 case $GXX_VERSION in
3005 1*|2.[0-6]*)
3006         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3007         # cf_cxx_library=no
3008         { echo "$as_me:3008: WARNING: templates do not work" >&5
3009 echo "$as_me: WARNING: templates do not work" >&2;}
3010         ;;
3011 esac
3012
3013 echo "$as_me:3013: checking if you want to build C++ binding and demo" >&5
3014 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3015
3016 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3017 if test "${with_cxx_binding+set}" = set; then
3018   withval="$with_cxx_binding"
3019   cf_with_cxx_binding=$withval
3020 else
3021   cf_with_cxx_binding=$cf_with_cxx
3022 fi;
3023 echo "$as_me:3023: result: $cf_with_cxx_binding" >&5
3024 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3025
3026 echo "$as_me:3026: checking if you want to build with Ada95" >&5
3027 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3028 echo "$as_me:3028: result: $cf_with_ada" >&5
3029 echo "${ECHO_T}$cf_with_ada" >&6
3030
3031 echo "$as_me:3031: checking if you want to install terminal database" >&5
3032 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3033
3034 # Check whether --enable-db-install or --disable-db-install was given.
3035 if test "${enable_db_install+set}" = set; then
3036   enableval="$enable_db_install"
3037   cf_with_db_install=$enableval
3038 else
3039   cf_with_db_install=yes
3040 fi;
3041 echo "$as_me:3041: result: $cf_with_db_install" >&5
3042 echo "${ECHO_T}$cf_with_db_install" >&6
3043
3044 echo "$as_me:3044: checking if you want to install manpages" >&5
3045 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3046
3047 # Check whether --with-manpages or --without-manpages was given.
3048 if test "${with_manpages+set}" = set; then
3049   withval="$with_manpages"
3050   cf_with_manpages=$withval
3051 else
3052   cf_with_manpages=yes
3053 fi;
3054 echo "$as_me:3054: result: $cf_with_manpages" >&5
3055 echo "${ECHO_T}$cf_with_manpages" >&6
3056
3057 echo "$as_me:3057: checking if you want to build programs such as tic" >&5
3058 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3059
3060 # Check whether --with-progs or --without-progs was given.
3061 if test "${with_progs+set}" = set; then
3062   withval="$with_progs"
3063   cf_with_progs=$withval
3064 else
3065   cf_with_progs=yes
3066 fi;
3067 echo "$as_me:3067: result: $cf_with_progs" >&5
3068 echo "${ECHO_T}$cf_with_progs" >&6
3069
3070 echo "$as_me:3070: checking if you want to build test-programs" >&5
3071 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3072
3073 # Check whether --with-tests or --without-tests was given.
3074 if test "${with_tests+set}" = set; then
3075   withval="$with_tests"
3076   cf_with_tests=$withval
3077 else
3078   cf_with_tests=yes
3079 fi;
3080 echo "$as_me:3080: result: $cf_with_tests" >&5
3081 echo "${ECHO_T}$cf_with_tests" >&6
3082
3083 echo "$as_me:3083: checking if you wish to install curses.h" >&5
3084 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3085
3086 # Check whether --with-curses-h or --without-curses-h was given.
3087 if test "${with_curses_h+set}" = set; then
3088   withval="$with_curses_h"
3089   with_curses_h=$withval
3090 else
3091   with_curses_h=yes
3092 fi;
3093 echo "$as_me:3093: result: $with_curses_h" >&5
3094 echo "${ECHO_T}$with_curses_h" >&6
3095
3096 modules_to_build="ncurses"
3097 if test "X$cf_with_progs" != Xno ; then
3098 modules_to_build="$modules_to_build progs tack"
3099 fi
3100 modules_to_build="$modules_to_build panel menu form"
3101
3102 test "$program_prefix" != NONE &&
3103   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3104 # Use a double $ so make ignores it.
3105 test "$program_suffix" != NONE &&
3106   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3107 # Double any \ or $.  echo might interpret backslashes.
3108 # By default was `s,x,x', remove it if useless.
3109 cat <<\_ACEOF >conftest.sed
3110 s/[\\$]/&&/g;s/;s,x,x,$//
3111 _ACEOF
3112 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3113 rm conftest.sed
3114
3115 for ac_prog in mawk gawk nawk awk
3116 do
3117   # Extract the first word of "$ac_prog", so it can be a program name with args.
3118 set dummy $ac_prog; ac_word=$2
3119 echo "$as_me:3119: checking for $ac_word" >&5
3120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3121 if test "${ac_cv_prog_AWK+set}" = set; then
3122   echo $ECHO_N "(cached) $ECHO_C" >&6
3123 else
3124   if test -n "$AWK"; then
3125   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3126 else
3127   ac_save_IFS=$IFS; IFS=$ac_path_separator
3128 ac_dummy="$PATH"
3129 for ac_dir in $ac_dummy; do
3130   IFS=$ac_save_IFS
3131   test -z "$ac_dir" && ac_dir=.
3132   $as_executable_p "$ac_dir/$ac_word" || continue
3133 ac_cv_prog_AWK="$ac_prog"
3134 echo "$as_me:3134: found $ac_dir/$ac_word" >&5
3135 break
3136 done
3137
3138 fi
3139 fi
3140 AWK=$ac_cv_prog_AWK
3141 if test -n "$AWK"; then
3142   echo "$as_me:3142: result: $AWK" >&5
3143 echo "${ECHO_T}$AWK" >&6
3144 else
3145   echo "$as_me:3145: result: no" >&5
3146 echo "${ECHO_T}no" >&6
3147 fi
3148
3149   test -n "$AWK" && break
3150 done
3151
3152 test -z "$AWK" && { { echo "$as_me:3152: error: No awk program found" >&5
3153 echo "$as_me: error: No awk program found" >&2;}
3154    { (exit 1); exit 1; }; }
3155
3156 echo "$as_me:3156: checking for egrep" >&5
3157 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3158 if test "${ac_cv_prog_egrep+set}" = set; then
3159   echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3162     then ac_cv_prog_egrep='grep -E'
3163     else ac_cv_prog_egrep='egrep'
3164     fi
3165 fi
3166 echo "$as_me:3166: result: $ac_cv_prog_egrep" >&5
3167 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3168  EGREP=$ac_cv_prog_egrep
3169
3170 test -z "$EGREP" && { { echo "$as_me:3170: error: No egrep program found" >&5
3171 echo "$as_me: error: No egrep program found" >&2;}
3172    { (exit 1); exit 1; }; }
3173
3174 # Find a good install program.  We prefer a C program (faster),
3175 # so one script is as good as another.  But avoid the broken or
3176 # incompatible versions:
3177 # SysV /etc/install, /usr/sbin/install
3178 # SunOS /usr/etc/install
3179 # IRIX /sbin/install
3180 # AIX /bin/install
3181 # AmigaOS /C/install, which installs bootblocks on floppy discs
3182 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3183 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3184 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3185 # ./install, which can be erroneously created by make from ./install.sh.
3186 echo "$as_me:3186: checking for a BSD compatible install" >&5
3187 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3188 if test -z "$INSTALL"; then
3189 if test "${ac_cv_path_install+set}" = set; then
3190   echo $ECHO_N "(cached) $ECHO_C" >&6
3191 else
3192     ac_save_IFS=$IFS; IFS=$ac_path_separator
3193   for ac_dir in $PATH; do
3194     IFS=$ac_save_IFS
3195     # Account for people who put trailing slashes in PATH elements.
3196     case $ac_dir/ in
3197     / | ./ | .// | /cC/* \
3198     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3199     | /usr/ucb/* ) ;;
3200     *)
3201       # OSF1 and SCO ODT 3.0 have their own names for install.
3202       # Don't use installbsd from OSF since it installs stuff as root
3203       # by default.
3204       for ac_prog in ginstall scoinst install; do
3205         if $as_executable_p "$ac_dir/$ac_prog"; then
3206           if test $ac_prog = install &&
3207             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3208             # AIX install.  It has an incompatible calling convention.
3209             :
3210           elif test $ac_prog = install &&
3211             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3212             # program-specific install script used by HP pwplus--don't use.
3213             :
3214           else
3215             ac_cv_path_install="$ac_dir/$ac_prog -c"
3216             break 2
3217           fi
3218         fi
3219       done
3220       ;;
3221     esac
3222   done
3223
3224 fi
3225   if test "${ac_cv_path_install+set}" = set; then
3226     INSTALL=$ac_cv_path_install
3227   else
3228     # As a last resort, use the slow shell script.  We don't cache a
3229     # path for INSTALL within a source directory, because that will
3230     # break other packages using the cache if that directory is
3231     # removed, or if the path is relative.
3232     INSTALL=$ac_install_sh
3233   fi
3234 fi
3235 echo "$as_me:3235: result: $INSTALL" >&5
3236 echo "${ECHO_T}$INSTALL" >&6
3237
3238 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3239 # It thinks the first close brace ends the variable substitution.
3240 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3241
3242 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3243
3244 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3245
3246 case $INSTALL in
3247 /*)
3248   ;;
3249 *)
3250   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3251   test -z "$cf_dir" && cf_dir=.
3252   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3253   ;;
3254 esac
3255
3256 for ac_prog in tdlint lint alint splint lclint
3257 do
3258   # Extract the first word of "$ac_prog", so it can be a program name with args.
3259 set dummy $ac_prog; ac_word=$2
3260 echo "$as_me:3260: checking for $ac_word" >&5
3261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3262 if test "${ac_cv_prog_LINT+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   if test -n "$LINT"; then
3266   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3267 else
3268   ac_save_IFS=$IFS; IFS=$ac_path_separator
3269 ac_dummy="$PATH"
3270 for ac_dir in $ac_dummy; do
3271   IFS=$ac_save_IFS
3272   test -z "$ac_dir" && ac_dir=.
3273   $as_executable_p "$ac_dir/$ac_word" || continue
3274 ac_cv_prog_LINT="$ac_prog"
3275 echo "$as_me:3275: found $ac_dir/$ac_word" >&5
3276 break
3277 done
3278
3279 fi
3280 fi
3281 LINT=$ac_cv_prog_LINT
3282 if test -n "$LINT"; then
3283   echo "$as_me:3283: result: $LINT" >&5
3284 echo "${ECHO_T}$LINT" >&6
3285 else
3286   echo "$as_me:3286: result: no" >&5
3287 echo "${ECHO_T}no" >&6
3288 fi
3289
3290   test -n "$LINT" && break
3291 done
3292
3293 echo "$as_me:3293: checking whether ln -s works" >&5
3294 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3295 LN_S=$as_ln_s
3296 if test "$LN_S" = "ln -s"; then
3297   echo "$as_me:3297: result: yes" >&5
3298 echo "${ECHO_T}yes" >&6
3299 else
3300   echo "$as_me:3300: result: no, using $LN_S" >&5
3301 echo "${ECHO_T}no, using $LN_S" >&6
3302 fi
3303
3304 echo "$as_me:3304: checking if $LN_S -f options work" >&5
3305 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3306
3307 rm -f conf$$.src conf$$dst
3308 echo >conf$$.dst
3309 echo first >conf$$.src
3310 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3311         cf_prog_ln_sf=yes
3312 else
3313         cf_prog_ln_sf=no
3314 fi
3315 rm -f conf$$.dst conf$$src
3316 echo "$as_me:3316: result: $cf_prog_ln_sf" >&5
3317 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3318
3319 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3320
3321 echo "$as_me:3321: checking for long file names" >&5
3322 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3323 if test "${ac_cv_sys_long_file_names+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326   ac_cv_sys_long_file_names=yes
3327 # Test for long file names in all the places we know might matter:
3328 #      .                the current directory, where building will happen
3329 #      $prefix/lib      where we will be installing things
3330 #      $exec_prefix/lib likewise
3331 # eval it to expand exec_prefix.
3332 #      $TMPDIR          if set, where it might want to write temporary files
3333 # if $TMPDIR is not set:
3334 #      /tmp             where it might want to write temporary files
3335 #      /var/tmp         likewise
3336 #      /usr/tmp         likewise
3337 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3338   ac_tmpdirs=$TMPDIR
3339 else
3340   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3341 fi
3342 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3343   test -d $ac_dir || continue
3344   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3345   ac_xdir=$ac_dir/cf$$
3346   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3347   ac_tf1=$ac_xdir/conftest9012345
3348   ac_tf2=$ac_xdir/conftest9012346
3349   (echo 1 >$ac_tf1) 2>/dev/null
3350   (echo 2 >$ac_tf2) 2>/dev/null
3351   ac_val=`cat $ac_tf1 2>/dev/null`
3352   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3353     ac_cv_sys_long_file_names=no
3354     rm -rf $ac_xdir 2>/dev/null
3355     break
3356   fi
3357   rm -rf $ac_xdir 2>/dev/null
3358 done
3359 fi
3360 echo "$as_me:3360: result: $ac_cv_sys_long_file_names" >&5
3361 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3362 if test $ac_cv_sys_long_file_names = yes; then
3363
3364 cat >>confdefs.h <<\EOF
3365 #define HAVE_LONG_FILE_NAMES 1
3366 EOF
3367
3368 fi
3369
3370 # if we find pkg-config, check if we should install the ".pc" files.
3371
3372 echo "$as_me:3372: checking if you want to use pkg-config" >&5
3373 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3374
3375 # Check whether --with-pkg-config or --without-pkg-config was given.
3376 if test "${with_pkg_config+set}" = set; then
3377   withval="$with_pkg_config"
3378   cf_pkg_config=$withval
3379 else
3380   cf_pkg_config=yes
3381 fi;
3382 echo "$as_me:3382: result: $cf_pkg_config" >&5
3383 echo "${ECHO_T}$cf_pkg_config" >&6
3384
3385 case $cf_pkg_config in #(vi
3386 no) #(vi
3387         PKG_CONFIG=none
3388         ;;
3389 yes) #(vi
3390
3391 if test -n "$ac_tool_prefix"; then
3392   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3393 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3394 echo "$as_me:3394: checking for $ac_word" >&5
3395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   case $PKG_CONFIG in
3400   [\\/]* | ?:[\\/]*)
3401   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3402   ;;
3403   *)
3404   ac_save_IFS=$IFS; IFS=$ac_path_separator
3405 ac_dummy="$PATH"
3406 for ac_dir in $ac_dummy; do
3407   IFS=$ac_save_IFS
3408   test -z "$ac_dir" && ac_dir=.
3409   if $as_executable_p "$ac_dir/$ac_word"; then
3410    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3411    echo "$as_me:3411: found $ac_dir/$ac_word" >&5
3412    break
3413 fi
3414 done
3415
3416   ;;
3417 esac
3418 fi
3419 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3420
3421 if test -n "$PKG_CONFIG"; then
3422   echo "$as_me:3422: result: $PKG_CONFIG" >&5
3423 echo "${ECHO_T}$PKG_CONFIG" >&6
3424 else
3425   echo "$as_me:3425: result: no" >&5
3426 echo "${ECHO_T}no" >&6
3427 fi
3428
3429 fi
3430 if test -z "$ac_cv_path_PKG_CONFIG"; then
3431   ac_pt_PKG_CONFIG=$PKG_CONFIG
3432   # Extract the first word of "pkg-config", so it can be a program name with args.
3433 set dummy pkg-config; ac_word=$2
3434 echo "$as_me:3434: checking for $ac_word" >&5
3435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3436 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3437   echo $ECHO_N "(cached) $ECHO_C" >&6
3438 else
3439   case $ac_pt_PKG_CONFIG in
3440   [\\/]* | ?:[\\/]*)
3441   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3442   ;;
3443   *)
3444   ac_save_IFS=$IFS; IFS=$ac_path_separator
3445 ac_dummy="$PATH"
3446 for ac_dir in $ac_dummy; do
3447   IFS=$ac_save_IFS
3448   test -z "$ac_dir" && ac_dir=.
3449   if $as_executable_p "$ac_dir/$ac_word"; then
3450    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3451    echo "$as_me:3451: found $ac_dir/$ac_word" >&5
3452    break
3453 fi
3454 done
3455
3456   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3457   ;;
3458 esac
3459 fi
3460 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3461
3462 if test -n "$ac_pt_PKG_CONFIG"; then
3463   echo "$as_me:3463: result: $ac_pt_PKG_CONFIG" >&5
3464 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3465 else
3466   echo "$as_me:3466: result: no" >&5
3467 echo "${ECHO_T}no" >&6
3468 fi
3469
3470   PKG_CONFIG=$ac_pt_PKG_CONFIG
3471 else
3472   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3473 fi
3474
3475         ;;
3476 *)
3477         PKG_CONFIG=$withval
3478         ;;
3479 esac
3480
3481 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3482 if test "$PKG_CONFIG" != none ; then
3483
3484 if test "x$prefix" != xNONE; then
3485   cf_path_syntax="$prefix"
3486 else
3487   cf_path_syntax="$ac_default_prefix"
3488 fi
3489
3490 case ".$PKG_CONFIG" in #(vi
3491 .\$\(*\)*|.\'*\'*) #(vi
3492   ;;
3493 ..|./*|.\\*) #(vi
3494   ;;
3495 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3496   ;;
3497 .\${*prefix}*|.\${*dir}*) #(vi
3498   eval PKG_CONFIG="$PKG_CONFIG"
3499   case ".$PKG_CONFIG" in #(vi
3500   .NONE/*)
3501     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3502     ;;
3503   esac
3504   ;; #(vi
3505 .no|.NONE/*)
3506   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3507   ;;
3508 *)
3509   { { echo "$as_me:3509: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3510 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3511    { (exit 1); exit 1; }; }
3512   ;;
3513 esac
3514
3515 else
3516         { echo "$as_me:3516: WARNING: pkg-config is not installed" >&5
3517 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3518 fi
3519
3520 echo "$as_me:3520: checking for $PKG_CONFIG library directory" >&5
3521 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3522
3523 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3524 if test "${with_pkg_config_libdir+set}" = set; then
3525   withval="$with_pkg_config_libdir"
3526   PKG_CONFIG_LIBDIR=$withval
3527 else
3528   PKG_CONFIG_LIBDIR=yes
3529 fi;
3530
3531 case x$PKG_CONFIG_LIBDIR in #(vi
3532 x/*) #(vi
3533         ;;
3534 xyes) #(vi
3535         # Look for the library directory using the same prefix as the executable
3536         if test "x$PKG_CONFIG" = xnone
3537         then
3538                 cf_path=$prefix
3539         else
3540                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3541         fi
3542
3543         # If you don't like using the default architecture, you have to specify the
3544         # intended library directory and corresponding compiler/linker options.
3545         #
3546         # This case allows for Debian's 2014-flavor of multiarch, along with the
3547         # most common variations before that point.  Some other variants spell the
3548         # directory differently, e.g., "pkg-config", and put it in unusual places.
3549         # pkg-config has always been poorly standardized, which is ironic...
3550         case x`(arch) 2>/dev/null` in #(vi
3551         *64) #(vi
3552                 cf_search_path="\
3553                         $cf_path/lib/*64-linux-gnu \
3554                         $cf_path/share \
3555                         $cf_path/lib64 \
3556                         $cf_path/lib32 \
3557                         $cf_path/lib"
3558                 ;;
3559         *)
3560                 cf_search_path="\
3561                         $cf_path/lib/*-linux-gnu \
3562                         $cf_path/share \
3563                         $cf_path/lib32 \
3564                         $cf_path/lib \
3565                         $cf_path/libdata"
3566                 ;;
3567         esac
3568
3569         test -n "$verbose" && echo "    list..." 1>&6
3570
3571 echo "${as_me:-configure}:3571: testing list... ..." 1>&5
3572
3573         for cf_config in $cf_search_path
3574         do
3575                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3576
3577 echo "${as_me:-configure}:3577: testing checking $cf_config/pkgconfig ..." 1>&5
3578
3579                 if test -d $cf_config/pkgconfig
3580                 then
3581                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3582                         echo "$as_me:3582: checking done" >&5
3583 echo $ECHO_N "checking done... $ECHO_C" >&6
3584                         break
3585                 fi
3586         done
3587         ;;
3588 *)
3589         ;;
3590 esac
3591
3592 echo "$as_me:3592: result: $PKG_CONFIG_LIBDIR" >&5
3593 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3594
3595 if test "x$PKG_CONFIG" != xnone
3596 then
3597         echo "$as_me:3597: checking if we should install .pc files for $PKG_CONFIG" >&5
3598 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3599 else
3600         echo "$as_me:3600: checking if we should install .pc files" >&5
3601 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3602 fi
3603
3604 # Check whether --enable-pc-files or --disable-pc-files was given.
3605 if test "${enable_pc_files+set}" = set; then
3606   enableval="$enable_pc_files"
3607   enable_pc_files=$enableval
3608 else
3609   enable_pc_files=no
3610 fi;
3611 echo "$as_me:3611: result: $enable_pc_files" >&5
3612 echo "${ECHO_T}$enable_pc_files" >&6
3613
3614 if test "x$enable_pc_files" != xno
3615 then
3616         case "x$PKG_CONFIG_LIBDIR" in #(vi
3617         xno|xyes) #(vi
3618                 { echo "$as_me:3618: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3619 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3620                 MAKE_PC_FILES="#"
3621                 ;;
3622         *)
3623
3624 if test "x$prefix" != xNONE; then
3625   cf_path_syntax="$prefix"
3626 else
3627   cf_path_syntax="$ac_default_prefix"
3628 fi
3629
3630 case ".$PKG_CONFIG_LIBDIR" in #(vi
3631 .\$\(*\)*|.\'*\'*) #(vi
3632   ;;
3633 ..|./*|.\\*) #(vi
3634   ;;
3635 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3636   ;;
3637 .\${*prefix}*|.\${*dir}*) #(vi
3638   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3639   case ".$PKG_CONFIG_LIBDIR" in #(vi
3640   .NONE/*)
3641     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3642     ;;
3643   esac
3644   ;; #(vi
3645 .no|.NONE/*)
3646   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3647   ;;
3648 *)
3649   { { echo "$as_me:3649: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3650 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3651    { (exit 1); exit 1; }; }
3652   ;;
3653 esac
3654
3655                 MAKE_PC_FILES=
3656                 ;;
3657         esac
3658 else
3659         MAKE_PC_FILES="#"
3660 fi
3661
3662 if test -z "$MAKE_PC_FILES"
3663 then
3664         echo "$as_me:3664: checking for suffix to add to pc-files" >&5
3665 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3666
3667 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3668 if test "${with_pc_suffix+set}" = set; then
3669   withval="$with_pc_suffix"
3670   case "x$withval" in #(vi
3671         xyes|xno) #(vi
3672                 PC_MODULE_SUFFIX=
3673                 ;;
3674         *)      PC_MODULE_SUFFIX="$withval"
3675                 ;;
3676         esac
3677 fi;
3678         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3679         echo "$as_me:3679: result: $PC_MODULE_SUFFIX" >&5
3680 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3681         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3682
3683 fi
3684
3685 echo "$as_me:3685: checking if we should assume mixed-case filenames" >&5
3686 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3687
3688 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3689 if test "${enable_mixed_case+set}" = set; then
3690   enableval="$enable_mixed_case"
3691   enable_mixedcase=$enableval
3692 else
3693   enable_mixedcase=auto
3694 fi;
3695 echo "$as_me:3695: result: $enable_mixedcase" >&5
3696 echo "${ECHO_T}$enable_mixedcase" >&6
3697 if test "$enable_mixedcase" = "auto" ; then
3698
3699 echo "$as_me:3699: checking if filesystem supports mixed-case filenames" >&5
3700 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3701 if test "${cf_cv_mixedcase+set}" = set; then
3702   echo $ECHO_N "(cached) $ECHO_C" >&6
3703 else
3704
3705 if test "$cross_compiling" = yes ; then
3706         case $target_alias in #(vi
3707         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3708                 cf_cv_mixedcase=no
3709                 ;;
3710         *)
3711                 cf_cv_mixedcase=yes
3712                 ;;
3713         esac
3714 else
3715         rm -f conftest CONFTEST
3716         echo test >conftest
3717         if test -f CONFTEST ; then
3718                 cf_cv_mixedcase=no
3719         else
3720                 cf_cv_mixedcase=yes
3721         fi
3722         rm -f conftest CONFTEST
3723 fi
3724
3725 fi
3726 echo "$as_me:3726: result: $cf_cv_mixedcase" >&5
3727 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3728 test "$cf_cv_mixedcase" = yes &&
3729 cat >>confdefs.h <<\EOF
3730 #define MIXEDCASE_FILENAMES 1
3731 EOF
3732
3733 else
3734     cf_cv_mixedcase=$enable_mixedcase
3735     if test "x$enable_mixedcase" = "xyes" ; then
3736
3737 cat >>confdefs.h <<\EOF
3738 #define MIXEDCASE_FILENAMES 1
3739 EOF
3740
3741     fi
3742 fi
3743
3744 # do this after mixed-case option (tags/TAGS is not as important as tic).
3745 echo "$as_me:3745: checking whether ${MAKE-make} sets \${MAKE}" >&5
3746 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3747 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3748 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3749   echo $ECHO_N "(cached) $ECHO_C" >&6
3750 else
3751   cat >conftest.make <<\EOF
3752 all:
3753         @echo 'ac_maketemp="${MAKE}"'
3754 EOF
3755 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3756 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3757 if test -n "$ac_maketemp"; then
3758   eval ac_cv_prog_make_${ac_make}_set=yes
3759 else
3760   eval ac_cv_prog_make_${ac_make}_set=no
3761 fi
3762 rm -f conftest.make
3763 fi
3764 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3765   echo "$as_me:3765: result: yes" >&5
3766 echo "${ECHO_T}yes" >&6
3767   SET_MAKE=
3768 else
3769   echo "$as_me:3769: result: no" >&5
3770 echo "${ECHO_T}no" >&6
3771   SET_MAKE="MAKE=${MAKE-make}"
3772 fi
3773
3774 for ac_prog in exctags ctags
3775 do
3776   # Extract the first word of "$ac_prog", so it can be a program name with args.
3777 set dummy $ac_prog; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_CTAGS+set}" = set; then
3781   echo $ECHO_N "(cached) $ECHO_C" >&6
3782 else
3783   if test -n "$CTAGS"; then
3784   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3785 else
3786   ac_save_IFS=$IFS; IFS=$ac_path_separator
3787 ac_dummy="$PATH"
3788 for ac_dir in $ac_dummy; do
3789   IFS=$ac_save_IFS
3790   test -z "$ac_dir" && ac_dir=.
3791   $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_CTAGS="$ac_prog"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3794 break
3795 done
3796
3797 fi
3798 fi
3799 CTAGS=$ac_cv_prog_CTAGS
3800 if test -n "$CTAGS"; then
3801   echo "$as_me:3801: result: $CTAGS" >&5
3802 echo "${ECHO_T}$CTAGS" >&6
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806 fi
3807
3808   test -n "$CTAGS" && break
3809 done
3810
3811 for ac_prog in exetags etags
3812 do
3813   # Extract the first word of "$ac_prog", so it can be a program name with args.
3814 set dummy $ac_prog; ac_word=$2
3815 echo "$as_me:3815: checking for $ac_word" >&5
3816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3817 if test "${ac_cv_prog_ETAGS+set}" = set; then
3818   echo $ECHO_N "(cached) $ECHO_C" >&6
3819 else
3820   if test -n "$ETAGS"; then
3821   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3822 else
3823   ac_save_IFS=$IFS; IFS=$ac_path_separator
3824 ac_dummy="$PATH"
3825 for ac_dir in $ac_dummy; do
3826   IFS=$ac_save_IFS
3827   test -z "$ac_dir" && ac_dir=.
3828   $as_executable_p "$ac_dir/$ac_word" || continue
3829 ac_cv_prog_ETAGS="$ac_prog"
3830 echo "$as_me:3830: found $ac_dir/$ac_word" >&5
3831 break
3832 done
3833
3834 fi
3835 fi
3836 ETAGS=$ac_cv_prog_ETAGS
3837 if test -n "$ETAGS"; then
3838   echo "$as_me:3838: result: $ETAGS" >&5
3839 echo "${ECHO_T}$ETAGS" >&6
3840 else
3841   echo "$as_me:3841: result: no" >&5
3842 echo "${ECHO_T}no" >&6
3843 fi
3844
3845   test -n "$ETAGS" && break
3846 done
3847
3848 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3849 set dummy ${CTAGS:-ctags}; ac_word=$2
3850 echo "$as_me:3850: checking for $ac_word" >&5
3851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3852 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3853   echo $ECHO_N "(cached) $ECHO_C" >&6
3854 else
3855   if test -n "$MAKE_LOWER_TAGS"; then
3856   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3857 else
3858   ac_save_IFS=$IFS; IFS=$ac_path_separator
3859 ac_dummy="$PATH"
3860 for ac_dir in $ac_dummy; do
3861   IFS=$ac_save_IFS
3862   test -z "$ac_dir" && ac_dir=.
3863   $as_executable_p "$ac_dir/$ac_word" || continue
3864 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3865 echo "$as_me:3865: found $ac_dir/$ac_word" >&5
3866 break
3867 done
3868
3869   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3870 fi
3871 fi
3872 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3873 if test -n "$MAKE_LOWER_TAGS"; then
3874   echo "$as_me:3874: result: $MAKE_LOWER_TAGS" >&5
3875 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3876 else
3877   echo "$as_me:3877: result: no" >&5
3878 echo "${ECHO_T}no" >&6
3879 fi
3880
3881 if test "$cf_cv_mixedcase" = yes ; then
3882         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3883 set dummy ${ETAGS:-etags}; ac_word=$2
3884 echo "$as_me:3884: checking for $ac_word" >&5
3885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3886 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3887   echo $ECHO_N "(cached) $ECHO_C" >&6
3888 else
3889   if test -n "$MAKE_UPPER_TAGS"; then
3890   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3891 else
3892   ac_save_IFS=$IFS; IFS=$ac_path_separator
3893 ac_dummy="$PATH"
3894 for ac_dir in $ac_dummy; do
3895   IFS=$ac_save_IFS
3896   test -z "$ac_dir" && ac_dir=.
3897   $as_executable_p "$ac_dir/$ac_word" || continue
3898 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3899 echo "$as_me:3899: found $ac_dir/$ac_word" >&5
3900 break
3901 done
3902
3903   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3904 fi
3905 fi
3906 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3907 if test -n "$MAKE_UPPER_TAGS"; then
3908   echo "$as_me:3908: result: $MAKE_UPPER_TAGS" >&5
3909 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915 else
3916         MAKE_UPPER_TAGS=no
3917 fi
3918
3919 if test "$MAKE_UPPER_TAGS" = yes ; then
3920         MAKE_UPPER_TAGS=
3921 else
3922         MAKE_UPPER_TAGS="#"
3923 fi
3924
3925 if test "$MAKE_LOWER_TAGS" = yes ; then
3926         MAKE_LOWER_TAGS=
3927 else
3928         MAKE_LOWER_TAGS="#"
3929 fi
3930
3931 echo "$as_me:3931: checking for makeflags variable" >&5
3932 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3933 if test "${cf_cv_makeflags+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936
3937         cf_cv_makeflags=''
3938         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3939         do
3940                 cat >cf_makeflags.tmp <<CF_EOF
3941 SHELL = /bin/sh
3942 all :
3943         @ echo '.$cf_option'
3944 CF_EOF
3945                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3946                 case "$cf_result" in
3947                 .*k|.*kw)
3948                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3949                         case "$cf_result" in
3950                         .*CC=*) cf_cv_makeflags=
3951                                 ;;
3952                         *)      cf_cv_makeflags=$cf_option
3953                                 ;;
3954                         esac
3955                         break
3956                         ;;
3957                 .-)     ;;
3958                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3959                         ;;
3960                 esac
3961         done
3962         rm -f cf_makeflags.tmp
3963
3964 fi
3965 echo "$as_me:3965: result: $cf_cv_makeflags" >&5
3966 echo "${ECHO_T}$cf_cv_makeflags" >&6
3967
3968 if test -n "$ac_tool_prefix"; then
3969   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3970 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3971 echo "$as_me:3971: checking for $ac_word" >&5
3972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3973 if test "${ac_cv_prog_RANLIB+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976   if test -n "$RANLIB"; then
3977   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3978 else
3979   ac_save_IFS=$IFS; IFS=$ac_path_separator
3980 ac_dummy="$PATH"
3981 for ac_dir in $ac_dummy; do
3982   IFS=$ac_save_IFS
3983   test -z "$ac_dir" && ac_dir=.
3984   $as_executable_p "$ac_dir/$ac_word" || continue
3985 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3986 echo "$as_me:3986: found $ac_dir/$ac_word" >&5
3987 break
3988 done
3989
3990 fi
3991 fi
3992 RANLIB=$ac_cv_prog_RANLIB
3993 if test -n "$RANLIB"; then
3994   echo "$as_me:3994: result: $RANLIB" >&5
3995 echo "${ECHO_T}$RANLIB" >&6
3996 else
3997   echo "$as_me:3997: result: no" >&5
3998 echo "${ECHO_T}no" >&6
3999 fi
4000
4001 fi
4002 if test -z "$ac_cv_prog_RANLIB"; then
4003   ac_ct_RANLIB=$RANLIB
4004   # Extract the first word of "ranlib", so it can be a program name with args.
4005 set dummy ranlib; ac_word=$2
4006 echo "$as_me:4006: checking for $ac_word" >&5
4007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4008 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4009   echo $ECHO_N "(cached) $ECHO_C" >&6
4010 else
4011   if test -n "$ac_ct_RANLIB"; then
4012   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4013 else
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   $as_executable_p "$ac_dir/$ac_word" || continue
4020 ac_cv_prog_ac_ct_RANLIB="ranlib"
4021 echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022 break
4023 done
4024
4025   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4026 fi
4027 fi
4028 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4029 if test -n "$ac_ct_RANLIB"; then
4030   echo "$as_me:4030: result: $ac_ct_RANLIB" >&5
4031 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4032 else
4033   echo "$as_me:4033: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4035 fi
4036
4037   RANLIB=$ac_ct_RANLIB
4038 else
4039   RANLIB="$ac_cv_prog_RANLIB"
4040 fi
4041
4042 if test -n "$ac_tool_prefix"; then
4043   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4044 set dummy ${ac_tool_prefix}ld; ac_word=$2
4045 echo "$as_me:4045: checking for $ac_word" >&5
4046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4047 if test "${ac_cv_prog_LD+set}" = set; then
4048   echo $ECHO_N "(cached) $ECHO_C" >&6
4049 else
4050   if test -n "$LD"; then
4051   ac_cv_prog_LD="$LD" # Let the user override the test.
4052 else
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   $as_executable_p "$ac_dir/$ac_word" || continue
4059 ac_cv_prog_LD="${ac_tool_prefix}ld"
4060 echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061 break
4062 done
4063
4064 fi
4065 fi
4066 LD=$ac_cv_prog_LD
4067 if test -n "$LD"; then
4068   echo "$as_me:4068: result: $LD" >&5
4069 echo "${ECHO_T}$LD" >&6
4070 else
4071   echo "$as_me:4071: result: no" >&5
4072 echo "${ECHO_T}no" >&6
4073 fi
4074
4075 fi
4076 if test -z "$ac_cv_prog_LD"; then
4077   ac_ct_LD=$LD
4078   # Extract the first word of "ld", so it can be a program name with args.
4079 set dummy ld; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   if test -n "$ac_ct_LD"; then
4086   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4087 else
4088   ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 ac_dummy="$PATH"
4090 for ac_dir in $ac_dummy; do
4091   IFS=$ac_save_IFS
4092   test -z "$ac_dir" && ac_dir=.
4093   $as_executable_p "$ac_dir/$ac_word" || continue
4094 ac_cv_prog_ac_ct_LD="ld"
4095 echo "$as_me:4095: found $ac_dir/$ac_word" >&5
4096 break
4097 done
4098
4099   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4100 fi
4101 fi
4102 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4103 if test -n "$ac_ct_LD"; then
4104   echo "$as_me:4104: result: $ac_ct_LD" >&5
4105 echo "${ECHO_T}$ac_ct_LD" >&6
4106 else
4107   echo "$as_me:4107: result: no" >&5
4108 echo "${ECHO_T}no" >&6
4109 fi
4110
4111   LD=$ac_ct_LD
4112 else
4113   LD="$ac_cv_prog_LD"
4114 fi
4115
4116 if test -n "$ac_tool_prefix"; then
4117   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4118 set dummy ${ac_tool_prefix}ar; ac_word=$2
4119 echo "$as_me:4119: checking for $ac_word" >&5
4120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4121 if test "${ac_cv_prog_AR+set}" = set; then
4122   echo $ECHO_N "(cached) $ECHO_C" >&6
4123 else
4124   if test -n "$AR"; then
4125   ac_cv_prog_AR="$AR" # Let the user override the test.
4126 else
4127   ac_save_IFS=$IFS; IFS=$ac_path_separator
4128 ac_dummy="$PATH"
4129 for ac_dir in $ac_dummy; do
4130   IFS=$ac_save_IFS
4131   test -z "$ac_dir" && ac_dir=.
4132   $as_executable_p "$ac_dir/$ac_word" || continue
4133 ac_cv_prog_AR="${ac_tool_prefix}ar"
4134 echo "$as_me:4134: found $ac_dir/$ac_word" >&5
4135 break
4136 done
4137
4138 fi
4139 fi
4140 AR=$ac_cv_prog_AR
4141 if test -n "$AR"; then
4142   echo "$as_me:4142: result: $AR" >&5
4143 echo "${ECHO_T}$AR" >&6
4144 else
4145   echo "$as_me:4145: result: no" >&5
4146 echo "${ECHO_T}no" >&6
4147 fi
4148
4149 fi
4150 if test -z "$ac_cv_prog_AR"; then
4151   ac_ct_AR=$AR
4152   # Extract the first word of "ar", so it can be a program name with args.
4153 set dummy ar; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$ac_ct_AR"; then
4160   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_ac_ct_AR="ar"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4174 fi
4175 fi
4176 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4177 if test -n "$ac_ct_AR"; then
4178   echo "$as_me:4178: result: $ac_ct_AR" >&5
4179 echo "${ECHO_T}$ac_ct_AR" >&6
4180 else
4181   echo "$as_me:4181: result: no" >&5
4182 echo "${ECHO_T}no" >&6
4183 fi
4184
4185   AR=$ac_ct_AR
4186 else
4187   AR="$ac_cv_prog_AR"
4188 fi
4189
4190 if test -n "$ac_tool_prefix"; then
4191   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4192 set dummy ${ac_tool_prefix}nm; ac_word=$2
4193 echo "$as_me:4193: checking for $ac_word" >&5
4194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4195 if test "${ac_cv_prog_NM+set}" = set; then
4196   echo $ECHO_N "(cached) $ECHO_C" >&6
4197 else
4198   if test -n "$NM"; then
4199   ac_cv_prog_NM="$NM" # Let the user override the test.
4200 else
4201   ac_save_IFS=$IFS; IFS=$ac_path_separator
4202 ac_dummy="$PATH"
4203 for ac_dir in $ac_dummy; do
4204   IFS=$ac_save_IFS
4205   test -z "$ac_dir" && ac_dir=.
4206   $as_executable_p "$ac_dir/$ac_word" || continue
4207 ac_cv_prog_NM="${ac_tool_prefix}nm"
4208 echo "$as_me:4208: found $ac_dir/$ac_word" >&5
4209 break
4210 done
4211
4212 fi
4213 fi
4214 NM=$ac_cv_prog_NM
4215 if test -n "$NM"; then
4216   echo "$as_me:4216: result: $NM" >&5
4217 echo "${ECHO_T}$NM" >&6
4218 else
4219   echo "$as_me:4219: result: no" >&5
4220 echo "${ECHO_T}no" >&6
4221 fi
4222
4223 fi
4224 if test -z "$ac_cv_prog_NM"; then
4225   ac_ct_NM=$NM
4226   # Extract the first word of "nm", so it can be a program name with args.
4227 set dummy nm; ac_word=$2
4228 echo "$as_me:4228: checking for $ac_word" >&5
4229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4230 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4231   echo $ECHO_N "(cached) $ECHO_C" >&6
4232 else
4233   if test -n "$ac_ct_NM"; then
4234   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4235 else
4236   ac_save_IFS=$IFS; IFS=$ac_path_separator
4237 ac_dummy="$PATH"
4238 for ac_dir in $ac_dummy; do
4239   IFS=$ac_save_IFS
4240   test -z "$ac_dir" && ac_dir=.
4241   $as_executable_p "$ac_dir/$ac_word" || continue
4242 ac_cv_prog_ac_ct_NM="nm"
4243 echo "$as_me:4243: found $ac_dir/$ac_word" >&5
4244 break
4245 done
4246
4247   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4248 fi
4249 fi
4250 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4251 if test -n "$ac_ct_NM"; then
4252   echo "$as_me:4252: result: $ac_ct_NM" >&5
4253 echo "${ECHO_T}$ac_ct_NM" >&6
4254 else
4255   echo "$as_me:4255: result: no" >&5
4256 echo "${ECHO_T}no" >&6
4257 fi
4258
4259   NM=$ac_ct_NM
4260 else
4261   NM="$ac_cv_prog_NM"
4262 fi
4263
4264 if test -n "$ac_tool_prefix"; then
4265   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4266 set dummy ${ac_tool_prefix}ar; ac_word=$2
4267 echo "$as_me:4267: checking for $ac_word" >&5
4268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4269 if test "${ac_cv_prog_AR+set}" = set; then
4270   echo $ECHO_N "(cached) $ECHO_C" >&6
4271 else
4272   if test -n "$AR"; then
4273   ac_cv_prog_AR="$AR" # Let the user override the test.
4274 else
4275   ac_save_IFS=$IFS; IFS=$ac_path_separator
4276 ac_dummy="$PATH"
4277 for ac_dir in $ac_dummy; do
4278   IFS=$ac_save_IFS
4279   test -z "$ac_dir" && ac_dir=.
4280   $as_executable_p "$ac_dir/$ac_word" || continue
4281 ac_cv_prog_AR="${ac_tool_prefix}ar"
4282 echo "$as_me:4282: found $ac_dir/$ac_word" >&5
4283 break
4284 done
4285
4286 fi
4287 fi
4288 AR=$ac_cv_prog_AR
4289 if test -n "$AR"; then
4290   echo "$as_me:4290: result: $AR" >&5
4291 echo "${ECHO_T}$AR" >&6
4292 else
4293   echo "$as_me:4293: result: no" >&5
4294 echo "${ECHO_T}no" >&6
4295 fi
4296
4297 fi
4298 if test -z "$ac_cv_prog_AR"; then
4299   ac_ct_AR=$AR
4300   # Extract the first word of "ar", so it can be a program name with args.
4301 set dummy ar; ac_word=$2
4302 echo "$as_me:4302: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$ac_ct_AR"; then
4308   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4309 else
4310   ac_save_IFS=$IFS; IFS=$ac_path_separator
4311 ac_dummy="$PATH"
4312 for ac_dir in $ac_dummy; do
4313   IFS=$ac_save_IFS
4314   test -z "$ac_dir" && ac_dir=.
4315   $as_executable_p "$ac_dir/$ac_word" || continue
4316 ac_cv_prog_ac_ct_AR="ar"
4317 echo "$as_me:4317: found $ac_dir/$ac_word" >&5
4318 break
4319 done
4320
4321   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4322 fi
4323 fi
4324 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4325 if test -n "$ac_ct_AR"; then
4326   echo "$as_me:4326: result: $ac_ct_AR" >&5
4327 echo "${ECHO_T}$ac_ct_AR" >&6
4328 else
4329   echo "$as_me:4329: result: no" >&5
4330 echo "${ECHO_T}no" >&6
4331 fi
4332
4333   AR=$ac_ct_AR
4334 else
4335   AR="$ac_cv_prog_AR"
4336 fi
4337
4338 echo "$as_me:4338: checking for options to update archives" >&5
4339 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4340 if test "${cf_cv_ar_flags+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343
4344         cf_cv_ar_flags=unknown
4345         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4346         do
4347
4348                 # check if $ARFLAGS already contains this choice
4349                 if test "x$ARFLAGS" != "x" ; then
4350                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4351                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4352                                 cf_cv_ar_flags=
4353                                 break
4354                         fi
4355                 fi
4356
4357                 rm -f conftest.$ac_cv_objext
4358                 rm -f conftest.a
4359
4360                 cat >conftest.$ac_ext <<EOF
4361 #line 4361 "configure"
4362 int     testdata[3] = { 123, 456, 789 };
4363 EOF
4364                 if { (eval echo "$as_me:4364: \"$ac_compile\"") >&5
4365   (eval $ac_compile) 2>&5
4366   ac_status=$?
4367   echo "$as_me:4367: \$? = $ac_status" >&5
4368   (exit $ac_status); } ; then
4369                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4370                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4371                         if test -f conftest.a ; then
4372                                 cf_cv_ar_flags=$cf_ar_flags
4373                                 break
4374                         fi
4375                 else
4376                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4377
4378 echo "${as_me:-configure}:4378: testing cannot compile test-program ..." 1>&5
4379
4380                         break
4381                 fi
4382         done
4383         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4384
4385 fi
4386 echo "$as_me:4386: result: $cf_cv_ar_flags" >&5
4387 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4388
4389 if test -n "$ARFLAGS" ; then
4390         if test -n "$cf_cv_ar_flags" ; then
4391                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4392         fi
4393 else
4394         ARFLAGS=$cf_cv_ar_flags
4395 fi
4396
4397 echo "$as_me:4397: checking if you have specified an install-prefix" >&5
4398 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4399
4400 # Check whether --with-install-prefix or --without-install-prefix was given.
4401 if test "${with_install_prefix+set}" = set; then
4402   withval="$with_install_prefix"
4403   case "x$withval" in #(vi
4404         xyes|xno) #(vi
4405                 ;;
4406         *)      DESTDIR="$withval"
4407                 ;;
4408         esac
4409 fi;
4410 echo "$as_me:4410: result: $DESTDIR" >&5
4411 echo "${ECHO_T}$DESTDIR" >&6
4412
4413 ###############################################################################
4414
4415 # If we're cross-compiling, allow the user to override the tools and their
4416 # options.  The configure script is oriented toward identifying the host
4417 # compiler, etc., but we need a build compiler to generate parts of the source.
4418
4419 if test "$cross_compiling" = yes ; then
4420
4421         # defaults that we might want to override
4422         : ${BUILD_CFLAGS:=''}
4423         : ${BUILD_CPPFLAGS:=''}
4424         : ${BUILD_LDFLAGS:=''}
4425         : ${BUILD_LIBS:=''}
4426         : ${BUILD_EXEEXT:='$x'}
4427         : ${BUILD_OBJEXT:='o'}
4428
4429 # Check whether --with-build-cc or --without-build-cc was given.
4430 if test "${with_build_cc+set}" = set; then
4431   withval="$with_build_cc"
4432   BUILD_CC="$withval"
4433 else
4434   for ac_prog in gcc cc cl
4435 do
4436   # Extract the first word of "$ac_prog", so it can be a program name with args.
4437 set dummy $ac_prog; ac_word=$2
4438 echo "$as_me:4438: checking for $ac_word" >&5
4439 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4440 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4441   echo $ECHO_N "(cached) $ECHO_C" >&6
4442 else
4443   if test -n "$BUILD_CC"; then
4444   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4445 else
4446   ac_save_IFS=$IFS; IFS=$ac_path_separator
4447 ac_dummy="$PATH"
4448 for ac_dir in $ac_dummy; do
4449   IFS=$ac_save_IFS
4450   test -z "$ac_dir" && ac_dir=.
4451   $as_executable_p "$ac_dir/$ac_word" || continue
4452 ac_cv_prog_BUILD_CC="$ac_prog"
4453 echo "$as_me:4453: found $ac_dir/$ac_word" >&5
4454 break
4455 done
4456
4457 fi
4458 fi
4459 BUILD_CC=$ac_cv_prog_BUILD_CC
4460 if test -n "$BUILD_CC"; then
4461   echo "$as_me:4461: result: $BUILD_CC" >&5
4462 echo "${ECHO_T}$BUILD_CC" >&6
4463 else
4464   echo "$as_me:4464: result: no" >&5
4465 echo "${ECHO_T}no" >&6
4466 fi
4467
4468   test -n "$BUILD_CC" && break
4469 done
4470
4471 fi;
4472         echo "$as_me:4472: checking for native build C compiler" >&5
4473 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4474         echo "$as_me:4474: result: $BUILD_CC" >&5
4475 echo "${ECHO_T}$BUILD_CC" >&6
4476
4477         echo "$as_me:4477: checking for native build C preprocessor" >&5
4478 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4479
4480 # Check whether --with-build-cpp or --without-build-cpp was given.
4481 if test "${with_build_cpp+set}" = set; then
4482   withval="$with_build_cpp"
4483   BUILD_CPP="$withval"
4484 else
4485   BUILD_CPP='${BUILD_CC} -E'
4486 fi;
4487         echo "$as_me:4487: result: $BUILD_CPP" >&5
4488 echo "${ECHO_T}$BUILD_CPP" >&6
4489
4490         echo "$as_me:4490: checking for native build C flags" >&5
4491 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4492
4493 # Check whether --with-build-cflags or --without-build-cflags was given.
4494 if test "${with_build_cflags+set}" = set; then
4495   withval="$with_build_cflags"
4496   BUILD_CFLAGS="$withval"
4497 fi;
4498         echo "$as_me:4498: result: $BUILD_CFLAGS" >&5
4499 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4500
4501         echo "$as_me:4501: checking for native build C preprocessor-flags" >&5
4502 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4503
4504 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4505 if test "${with_build_cppflags+set}" = set; then
4506   withval="$with_build_cppflags"
4507   BUILD_CPPFLAGS="$withval"
4508 fi;
4509         echo "$as_me:4509: result: $BUILD_CPPFLAGS" >&5
4510 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4511
4512         echo "$as_me:4512: checking for native build linker-flags" >&5
4513 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4514
4515 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4516 if test "${with_build_ldflags+set}" = set; then
4517   withval="$with_build_ldflags"
4518   BUILD_LDFLAGS="$withval"
4519 fi;
4520         echo "$as_me:4520: result: $BUILD_LDFLAGS" >&5
4521 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4522
4523         echo "$as_me:4523: checking for native build linker-libraries" >&5
4524 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4525
4526 # Check whether --with-build-libs or --without-build-libs was given.
4527 if test "${with_build_libs+set}" = set; then
4528   withval="$with_build_libs"
4529   BUILD_LIBS="$withval"
4530 fi;
4531         echo "$as_me:4531: result: $BUILD_LIBS" >&5
4532 echo "${ECHO_T}$BUILD_LIBS" >&6
4533
4534         # this assumes we're on Unix.
4535         BUILD_EXEEXT=
4536         BUILD_OBJEXT=o
4537
4538         : ${BUILD_CC:='${CC}'}
4539
4540         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4541                 { { echo "$as_me:4541: error: Cross-build requires two compilers.
4542 Use --with-build-cc to specify the native compiler." >&5
4543 echo "$as_me: error: Cross-build requires two compilers.
4544 Use --with-build-cc to specify the native compiler." >&2;}
4545    { (exit 1); exit 1; }; }
4546         fi
4547
4548 else
4549         : ${BUILD_CC:='${CC}'}
4550         : ${BUILD_CPP:='${CPP}'}
4551         : ${BUILD_CFLAGS:='${CFLAGS}'}
4552         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4553         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4554         : ${BUILD_LIBS:='${LIBS}'}
4555         : ${BUILD_EXEEXT:='$x'}
4556         : ${BUILD_OBJEXT:='o'}
4557 fi
4558
4559 ###############################################################################
4560
4561 ### Options to allow the user to specify the set of libraries which are used.
4562 ### Use "--without-normal --with-shared" to allow the default model to be
4563 ### shared, for example.
4564 cf_list_models=""
4565
4566 echo "$as_me:4566: checking if libtool -version-number should be used" >&5
4567 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4568
4569 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4570 if test "${enable_libtool_version+set}" = set; then
4571   enableval="$enable_libtool_version"
4572   test "$enableval" != no && enableval=yes
4573   if test "$enableval" != "yes" ; then
4574     cf_libtool_version=no
4575   else
4576     cf_libtool_version=yes
4577   fi
4578 else
4579   enableval=yes
4580   cf_libtool_version=yes
4581
4582 fi;
4583 echo "$as_me:4583: result: $cf_libtool_version" >&5
4584 echo "${ECHO_T}$cf_libtool_version" >&6
4585
4586 if test "$cf_libtool_version" = yes ; then
4587         LIBTOOL_VERSION="-version-number"
4588 else
4589         LIBTOOL_VERSION="-version-info"
4590         case "x$VERSION" in #(vi
4591         x) #(vi
4592                 { echo "$as_me:4592: WARNING: VERSION was not set" >&5
4593 echo "$as_me: WARNING: VERSION was not set" >&2;}
4594                 ;;
4595         x*.*.*)
4596                 ABI_VERSION="$VERSION"
4597                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4598
4599 echo "${as_me:-configure}:4599: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4600
4601                 ;;
4602         x*:*:*)
4603                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4604                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4605
4606 echo "${as_me:-configure}:4606: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4607
4608                 ;;
4609         *)
4610                 { echo "$as_me:4610: WARNING: unexpected VERSION value: $VERSION" >&5
4611 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4612                 ;;
4613         esac
4614 fi
4615
4616 LIBTOOL=
4617
4618 # common library maintenance symbols that are convenient for libtool scripts:
4619 LIB_CREATE='${AR} -cr'
4620 LIB_OBJECT='${OBJECTS}'
4621 LIB_SUFFIX=.a
4622 LIB_PREP="$RANLIB"
4623
4624 # symbols used to prop libtool up to enable it to determine what it should be
4625 # doing:
4626 LIB_CLEAN=
4627 LIB_COMPILE=
4628 LIB_LINK='${CC}'
4629 LIB_INSTALL=
4630 LIB_UNINSTALL=
4631
4632 echo "$as_me:4632: checking if you want to build libraries with libtool" >&5
4633 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4634
4635 # Check whether --with-libtool or --without-libtool was given.
4636 if test "${with_libtool+set}" = set; then
4637   withval="$with_libtool"
4638   with_libtool=$withval
4639 else
4640   with_libtool=no
4641 fi;
4642 echo "$as_me:4642: result: $with_libtool" >&5
4643 echo "${ECHO_T}$with_libtool" >&6
4644 if test "$with_libtool" != "no"; then
4645
4646         if test "$with_libtool" != "yes" ; then
4647
4648 if test "x$prefix" != xNONE; then
4649   cf_path_syntax="$prefix"
4650 else
4651   cf_path_syntax="$ac_default_prefix"
4652 fi
4653
4654 case ".$with_libtool" in #(vi
4655 .\$\(*\)*|.\'*\'*) #(vi
4656   ;;
4657 ..|./*|.\\*) #(vi
4658   ;;
4659 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4660   ;;
4661 .\${*prefix}*|.\${*dir}*) #(vi
4662   eval with_libtool="$with_libtool"
4663   case ".$with_libtool" in #(vi
4664   .NONE/*)
4665     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4666     ;;
4667   esac
4668   ;; #(vi
4669 .no|.NONE/*)
4670   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4671   ;;
4672 *)
4673   { { echo "$as_me:4673: error: expected a pathname, not \"$with_libtool\"" >&5
4674 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4675    { (exit 1); exit 1; }; }
4676   ;;
4677 esac
4678
4679                 LIBTOOL=$with_libtool
4680         else
4681                 if test -n "$ac_tool_prefix"; then
4682   for ac_prog in libtool glibtool
4683   do
4684     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4685 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4686 echo "$as_me:4686: checking for $ac_word" >&5
4687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4688 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4689   echo $ECHO_N "(cached) $ECHO_C" >&6
4690 else
4691   if test -n "$LIBTOOL"; then
4692   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4693 else
4694   ac_save_IFS=$IFS; IFS=$ac_path_separator
4695 ac_dummy="$PATH"
4696 for ac_dir in $ac_dummy; do
4697   IFS=$ac_save_IFS
4698   test -z "$ac_dir" && ac_dir=.
4699   $as_executable_p "$ac_dir/$ac_word" || continue
4700 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4701 echo "$as_me:4701: found $ac_dir/$ac_word" >&5
4702 break
4703 done
4704
4705 fi
4706 fi
4707 LIBTOOL=$ac_cv_prog_LIBTOOL
4708 if test -n "$LIBTOOL"; then
4709   echo "$as_me:4709: result: $LIBTOOL" >&5
4710 echo "${ECHO_T}$LIBTOOL" >&6
4711 else
4712   echo "$as_me:4712: result: no" >&5
4713 echo "${ECHO_T}no" >&6
4714 fi
4715
4716     test -n "$LIBTOOL" && break
4717   done
4718 fi
4719 if test -z "$LIBTOOL"; then
4720   ac_ct_LIBTOOL=$LIBTOOL
4721   for ac_prog in libtool glibtool
4722 do
4723   # Extract the first word of "$ac_prog", so it can be a program name with args.
4724 set dummy $ac_prog; ac_word=$2
4725 echo "$as_me:4725: checking for $ac_word" >&5
4726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4727 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4728   echo $ECHO_N "(cached) $ECHO_C" >&6
4729 else
4730   if test -n "$ac_ct_LIBTOOL"; then
4731   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4732 else
4733   ac_save_IFS=$IFS; IFS=$ac_path_separator
4734 ac_dummy="$PATH"
4735 for ac_dir in $ac_dummy; do
4736   IFS=$ac_save_IFS
4737   test -z "$ac_dir" && ac_dir=.
4738   $as_executable_p "$ac_dir/$ac_word" || continue
4739 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4740 echo "$as_me:4740: found $ac_dir/$ac_word" >&5
4741 break
4742 done
4743
4744 fi
4745 fi
4746 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4747 if test -n "$ac_ct_LIBTOOL"; then
4748   echo "$as_me:4748: result: $ac_ct_LIBTOOL" >&5
4749 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4750 else
4751   echo "$as_me:4751: result: no" >&5
4752 echo "${ECHO_T}no" >&6
4753 fi
4754
4755   test -n "$ac_ct_LIBTOOL" && break
4756 done
4757 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4758
4759   LIBTOOL=$ac_ct_LIBTOOL
4760 fi
4761
4762 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4763 then
4764         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.].*//'`
4765 else
4766         cf_cv_libtool_version=
4767 fi
4768 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4769
4770                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4771                 then
4772
4773 unset ac_cv_prog_ac_ct_LIBTOOL
4774 unset ac_ct_LIBTOOL
4775 unset LIBTOOL
4776
4777                         if test -n "$ac_tool_prefix"; then
4778   for ac_prog in glibtool
4779   do
4780     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4781 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4782 echo "$as_me:4782: checking for $ac_word" >&5
4783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4784 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4785   echo $ECHO_N "(cached) $ECHO_C" >&6
4786 else
4787   if test -n "$LIBTOOL"; then
4788   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4789 else
4790   ac_save_IFS=$IFS; IFS=$ac_path_separator
4791 ac_dummy="$PATH"
4792 for ac_dir in $ac_dummy; do
4793   IFS=$ac_save_IFS
4794   test -z "$ac_dir" && ac_dir=.
4795   $as_executable_p "$ac_dir/$ac_word" || continue
4796 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4797 echo "$as_me:4797: found $ac_dir/$ac_word" >&5
4798 break
4799 done
4800
4801 fi
4802 fi
4803 LIBTOOL=$ac_cv_prog_LIBTOOL
4804 if test -n "$LIBTOOL"; then
4805   echo "$as_me:4805: result: $LIBTOOL" >&5
4806 echo "${ECHO_T}$LIBTOOL" >&6
4807 else
4808   echo "$as_me:4808: result: no" >&5
4809 echo "${ECHO_T}no" >&6
4810 fi
4811
4812     test -n "$LIBTOOL" && break
4813   done
4814 fi
4815 if test -z "$LIBTOOL"; then
4816   ac_ct_LIBTOOL=$LIBTOOL
4817   for ac_prog in glibtool
4818 do
4819   # Extract the first word of "$ac_prog", so it can be a program name with args.
4820 set dummy $ac_prog; ac_word=$2
4821 echo "$as_me:4821: checking for $ac_word" >&5
4822 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4823 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4824   echo $ECHO_N "(cached) $ECHO_C" >&6
4825 else
4826   if test -n "$ac_ct_LIBTOOL"; then
4827   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4828 else
4829   ac_save_IFS=$IFS; IFS=$ac_path_separator
4830 ac_dummy="$PATH"
4831 for ac_dir in $ac_dummy; do
4832   IFS=$ac_save_IFS
4833   test -z "$ac_dir" && ac_dir=.
4834   $as_executable_p "$ac_dir/$ac_word" || continue
4835 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4836 echo "$as_me:4836: found $ac_dir/$ac_word" >&5
4837 break
4838 done
4839
4840 fi
4841 fi
4842 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4843 if test -n "$ac_ct_LIBTOOL"; then
4844   echo "$as_me:4844: result: $ac_ct_LIBTOOL" >&5
4845 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4846 else
4847   echo "$as_me:4847: result: no" >&5
4848 echo "${ECHO_T}no" >&6
4849 fi
4850
4851   test -n "$ac_ct_LIBTOOL" && break
4852 done
4853 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4854
4855   LIBTOOL=$ac_ct_LIBTOOL
4856 fi
4857
4858 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4859 then
4860         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.].*//'`
4861 else
4862         cf_cv_libtool_version=
4863 fi
4864 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4865
4866                 fi
4867         fi
4868         if test -z "$LIBTOOL" ; then
4869                 { { echo "$as_me:4869: error: Cannot find libtool" >&5
4870 echo "$as_me: error: Cannot find libtool" >&2;}
4871    { (exit 1); exit 1; }; }
4872         fi
4873         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4874         LIB_OBJECT='${OBJECTS:.o=.lo}'
4875         LIB_SUFFIX=.la
4876         LIB_CLEAN='${LIBTOOL} --mode=clean'
4877         LIB_COMPILE='${LIBTOOL} --mode=compile'
4878         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4879         LIB_INSTALL='${LIBTOOL} --mode=install'
4880         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4881         LIB_PREP=:
4882
4883 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4884 then
4885         echo "$as_me:4885: checking version of $LIBTOOL" >&5
4886 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4887
4888 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4889 then
4890         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.].*//'`
4891 else
4892         cf_cv_libtool_version=
4893 fi
4894 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4895
4896         echo "$as_me:4896: result: $cf_cv_libtool_version" >&5
4897 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4898         if test -z "$cf_cv_libtool_version" ; then
4899                 { { echo "$as_me:4899: error: This is not GNU libtool" >&5
4900 echo "$as_me: error: This is not GNU libtool" >&2;}
4901    { (exit 1); exit 1; }; }
4902         fi
4903 else
4904         { { echo "$as_me:4904: error: GNU libtool has not been found" >&5
4905 echo "$as_me: error: GNU libtool has not been found" >&2;}
4906    { (exit 1); exit 1; }; }
4907 fi
4908
4909         # special hack to add -no-undefined (which libtool should do for itself)
4910         LT_UNDEF=
4911         case "$cf_cv_system_name" in #(vi
4912         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4913                 LT_UNDEF=-no-undefined
4914                 ;;
4915         esac
4916
4917         # special hack to add --tag option for C++ compiler
4918         case $cf_cv_libtool_version in #(vi
4919         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4920                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4921                 LIBTOOL="$LIBTOOL --tag=CC"
4922                 ;;
4923         *)
4924                 LIBTOOL_CXX="$LIBTOOL"
4925                 ;;
4926         esac
4927 else
4928         LIBTOOL=""
4929         LIBTOOL_CXX=""
4930 fi
4931
4932 test -z "$LIBTOOL" && ECHO_LT=
4933
4934 if test "$with_libtool" != "no" ; then
4935
4936 cf_list_models="$cf_list_models libtool"
4937
4938 else
4939
4940 echo "$as_me:4940: checking if you want to build shared libraries" >&5
4941 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4942
4943 # Check whether --with-shared or --without-shared was given.
4944 if test "${with_shared+set}" = set; then
4945   withval="$with_shared"
4946   with_shared=$withval
4947 else
4948   with_shared=no
4949 fi;
4950 echo "$as_me:4950: result: $with_shared" >&5
4951 echo "${ECHO_T}$with_shared" >&6
4952 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4953
4954 echo "$as_me:4954: checking if you want to build static libraries" >&5
4955 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4956
4957 # Check whether --with-normal or --without-normal was given.
4958 if test "${with_normal+set}" = set; then
4959   withval="$with_normal"
4960   with_normal=$withval
4961 else
4962   with_normal=yes
4963 fi;
4964 echo "$as_me:4964: result: $with_normal" >&5
4965 echo "${ECHO_T}$with_normal" >&6
4966 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4967
4968 echo "$as_me:4968: checking if you want to build debug libraries" >&5
4969 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4970
4971 # Check whether --with-debug or --without-debug was given.
4972 if test "${with_debug+set}" = set; then
4973   withval="$with_debug"
4974   with_debug=$withval
4975 else
4976   with_debug=yes
4977 fi;
4978 echo "$as_me:4978: result: $with_debug" >&5
4979 echo "${ECHO_T}$with_debug" >&6
4980 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4981
4982 echo "$as_me:4982: checking if you want to build profiling libraries" >&5
4983 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4984
4985 # Check whether --with-profile or --without-profile was given.
4986 if test "${with_profile+set}" = set; then
4987   withval="$with_profile"
4988   with_profile=$withval
4989 else
4990   with_profile=no
4991 fi;
4992 echo "$as_me:4992: result: $with_profile" >&5
4993 echo "${ECHO_T}$with_profile" >&6
4994 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4995
4996 fi
4997
4998 if test "X$cf_with_cxx_binding" != Xno; then
4999 if test "x$with_shared" = "xyes"; then
5000 echo "$as_me:5000: checking if you want to build C++ shared libraries" >&5
5001 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5002
5003 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5004 if test "${with_cxx_shared+set}" = set; then
5005   withval="$with_cxx_shared"
5006   with_shared_cxx=$withval
5007 else
5008   with_shared_cxx=no
5009 fi;
5010 echo "$as_me:5010: result: $with_shared_cxx" >&5
5011 echo "${ECHO_T}$with_shared_cxx" >&6
5012 fi
5013 fi
5014
5015 ###############################################################################
5016
5017 echo "$as_me:5017: checking for specified models" >&5
5018 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5019 test -z "$cf_list_models" && cf_list_models=normal
5020 test "$with_libtool" != "no" && cf_list_models=libtool
5021 echo "$as_me:5021: result: $cf_list_models" >&5
5022 echo "${ECHO_T}$cf_list_models" >&6
5023
5024 ### Use the first model as the default, and save its suffix for use in building
5025 ### up test-applications.
5026 echo "$as_me:5026: checking for default model" >&5
5027 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5028 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5029 echo "$as_me:5029: result: $DFT_LWR_MODEL" >&5
5030 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5031
5032 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5033
5034 TICS_NAME=tic
5035
5036 TINFO_NAME=tinfo
5037
5038 LIB_NAME=ncurses
5039
5040 LIB_DIR=../lib
5041 LIB_2ND=../../lib
5042
5043 echo "$as_me:5043: checking if you want to have a library-prefix" >&5
5044 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5045
5046 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5047 if test "${with_lib_prefix+set}" = set; then
5048   withval="$with_lib_prefix"
5049   with_lib_prefix=$withval
5050 else
5051   with_lib_prefix=auto
5052 fi;
5053 echo "$as_me:5053: result: $with_lib_prefix" >&5
5054 echo "${ECHO_T}$with_lib_prefix" >&6
5055
5056 if test $with_lib_prefix = auto
5057 then
5058
5059         case $cf_cv_system_name in #(vi
5060         OS/2*|os2*) #(vi
5061         LIB_PREFIX=''
5062         ;;
5063         *)      LIB_PREFIX='lib'
5064         ;;
5065         esac
5066 cf_prefix=$LIB_PREFIX
5067
5068 elif test $with_lib_prefix = no
5069 then
5070         LIB_PREFIX=
5071 else
5072         LIB_PREFIX=$with_lib_prefix
5073 fi
5074
5075 LIB_SUFFIX=
5076
5077         echo "$as_me:5077: checking for PATH separator" >&5
5078 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5079         case $cf_cv_system_name in
5080         os2*)   PATH_SEPARATOR=';'  ;;
5081         *)      ${PATH_SEPARATOR:=':'}  ;;
5082         esac
5083
5084         echo "$as_me:5084: result: $PATH_SEPARATOR" >&5
5085 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5086
5087 ###############################################################################
5088
5089 echo "$as_me:5089: checking if you want to build a separate terminfo library" >&5
5090 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5091
5092 # Check whether --with-termlib or --without-termlib was given.
5093 if test "${with_termlib+set}" = set; then
5094   withval="$with_termlib"
5095   with_termlib=$withval
5096 else
5097   with_termlib=no
5098 fi;
5099 echo "$as_me:5099: result: $with_termlib" >&5
5100 echo "${ECHO_T}$with_termlib" >&6
5101
5102 echo "$as_me:5102: checking if you want to build a separate tic library" >&5
5103 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5104
5105 # Check whether --with-ticlib or --without-ticlib was given.
5106 if test "${with_ticlib+set}" = set; then
5107   withval="$with_ticlib"
5108   with_ticlib=$withval
5109 else
5110   with_ticlib=no
5111 fi;
5112 echo "$as_me:5112: result: $with_ticlib" >&5
5113 echo "${ECHO_T}$with_ticlib" >&6
5114
5115 ### Checks for special libraries, must be done up-front.
5116 SHLIB_LIST=""
5117
5118 echo "$as_me:5118: checking if you want to link with the GPM mouse library" >&5
5119 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5120
5121 # Check whether --with-gpm or --without-gpm was given.
5122 if test "${with_gpm+set}" = set; then
5123   withval="$with_gpm"
5124   with_gpm=$withval
5125 else
5126   with_gpm=maybe
5127 fi;
5128 echo "$as_me:5128: result: $with_gpm" >&5
5129 echo "${ECHO_T}$with_gpm" >&6
5130
5131 if test "$with_gpm" != no ; then
5132         echo "$as_me:5132: checking for gpm.h" >&5
5133 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5134 if test "${ac_cv_header_gpm_h+set}" = set; then
5135   echo $ECHO_N "(cached) $ECHO_C" >&6
5136 else
5137   cat >conftest.$ac_ext <<_ACEOF
5138 #line 5138 "configure"
5139 #include "confdefs.h"
5140 #include <gpm.h>
5141 _ACEOF
5142 if { (eval echo "$as_me:5142: \"$ac_cpp conftest.$ac_ext\"") >&5
5143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5144   ac_status=$?
5145   egrep -v '^ *\+' conftest.er1 >conftest.err
5146   rm -f conftest.er1
5147   cat conftest.err >&5
5148   echo "$as_me:5148: \$? = $ac_status" >&5
5149   (exit $ac_status); } >/dev/null; then
5150   if test -s conftest.err; then
5151     ac_cpp_err=$ac_c_preproc_warn_flag
5152   else
5153     ac_cpp_err=
5154   fi
5155 else
5156   ac_cpp_err=yes
5157 fi
5158 if test -z "$ac_cpp_err"; then
5159   ac_cv_header_gpm_h=yes
5160 else
5161   echo "$as_me: failed program was:" >&5
5162   cat conftest.$ac_ext >&5
5163   ac_cv_header_gpm_h=no
5164 fi
5165 rm -f conftest.err conftest.$ac_ext
5166 fi
5167 echo "$as_me:5167: result: $ac_cv_header_gpm_h" >&5
5168 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5169 if test $ac_cv_header_gpm_h = yes; then
5170
5171 cat >>confdefs.h <<\EOF
5172 #define HAVE_GPM_H 1
5173 EOF
5174
5175                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5176                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5177
5178 echo "${as_me:-configure}:5178: testing assuming we really have GPM library ..." 1>&5
5179
5180 cat >>confdefs.h <<\EOF
5181 #define HAVE_LIBGPM 1
5182 EOF
5183
5184                 else
5185                         echo "$as_me:5185: checking for Gpm_Open in -lgpm" >&5
5186 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5187 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5188   echo $ECHO_N "(cached) $ECHO_C" >&6
5189 else
5190   ac_check_lib_save_LIBS=$LIBS
5191 LIBS="-lgpm  $LIBS"
5192 cat >conftest.$ac_ext <<_ACEOF
5193 #line 5193 "configure"
5194 #include "confdefs.h"
5195
5196 /* Override any gcc2 internal prototype to avoid an error.  */
5197 #ifdef __cplusplus
5198 extern "C"
5199 #endif
5200 /* We use char because int might match the return type of a gcc2
5201    builtin and then its argument prototype would still apply.  */
5202 char Gpm_Open ();
5203 int
5204 main ()
5205 {
5206 Gpm_Open ();
5207   ;
5208   return 0;
5209 }
5210 _ACEOF
5211 rm -f conftest.$ac_objext conftest$ac_exeext
5212 if { (eval echo "$as_me:5212: \"$ac_link\"") >&5
5213   (eval $ac_link) 2>&5
5214   ac_status=$?
5215   echo "$as_me:5215: \$? = $ac_status" >&5
5216   (exit $ac_status); } &&
5217          { ac_try='test -s conftest$ac_exeext'
5218   { (eval echo "$as_me:5218: \"$ac_try\"") >&5
5219   (eval $ac_try) 2>&5
5220   ac_status=$?
5221   echo "$as_me:5221: \$? = $ac_status" >&5
5222   (exit $ac_status); }; }; then
5223   ac_cv_lib_gpm_Gpm_Open=yes
5224 else
5225   echo "$as_me: failed program was:" >&5
5226 cat conftest.$ac_ext >&5
5227 ac_cv_lib_gpm_Gpm_Open=no
5228 fi
5229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5230 LIBS=$ac_check_lib_save_LIBS
5231 fi
5232 echo "$as_me:5232: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5233 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5234 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5235   :
5236 else
5237
5238                                 { { echo "$as_me:5238: error: Cannot link with GPM library" >&5
5239 echo "$as_me: error: Cannot link with GPM library" >&2;}
5240    { (exit 1); exit 1; }; }
5241                 fi
5242                 with_gpm=yes
5243
5244 fi
5245
5246 else
5247
5248                 test "$with_gpm" != maybe && { echo "$as_me:5248: WARNING: Cannot find GPM header" >&5
5249 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5250                 with_gpm=no
5251
5252 fi
5253
5254 fi
5255
5256 if test "$with_gpm" != no ; then
5257         echo "$as_me:5257: checking if you want to load GPM dynamically" >&5
5258 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5259
5260 # Check whether --with-dlsym or --without-dlsym was given.
5261 if test "${with_dlsym+set}" = set; then
5262   withval="$with_dlsym"
5263   with_dlsym=$withval
5264 else
5265   with_dlsym=yes
5266 fi;
5267         echo "$as_me:5267: result: $with_dlsym" >&5
5268 echo "${ECHO_T}$with_dlsym" >&6
5269         if test "x$with_dlsym" = xyes ; then
5270
5271 cf_have_dlsym=no
5272 echo "$as_me:5272: checking for dlsym" >&5
5273 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5274 if test "${ac_cv_func_dlsym+set}" = set; then
5275   echo $ECHO_N "(cached) $ECHO_C" >&6
5276 else
5277   cat >conftest.$ac_ext <<_ACEOF
5278 #line 5278 "configure"
5279 #include "confdefs.h"
5280 /* System header to define __stub macros and hopefully few prototypes,
5281     which can conflict with char dlsym (); below.  */
5282 #include <assert.h>
5283 /* Override any gcc2 internal prototype to avoid an error.  */
5284 #ifdef __cplusplus
5285 extern "C"
5286 #endif
5287 /* We use char because int might match the return type of a gcc2
5288    builtin and then its argument prototype would still apply.  */
5289 char dlsym ();
5290 char (*f) ();
5291
5292 int
5293 main ()
5294 {
5295 /* The GNU C library defines this for functions which it implements
5296     to always fail with ENOSYS.  Some functions are actually named
5297     something starting with __ and the normal name is an alias.  */
5298 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5299 choke me
5300 #else
5301 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5302 #endif
5303
5304   ;
5305   return 0;
5306 }
5307 _ACEOF
5308 rm -f conftest.$ac_objext conftest$ac_exeext
5309 if { (eval echo "$as_me:5309: \"$ac_link\"") >&5
5310   (eval $ac_link) 2>&5
5311   ac_status=$?
5312   echo "$as_me:5312: \$? = $ac_status" >&5
5313   (exit $ac_status); } &&
5314          { ac_try='test -s conftest$ac_exeext'
5315   { (eval echo "$as_me:5315: \"$ac_try\"") >&5
5316   (eval $ac_try) 2>&5
5317   ac_status=$?
5318   echo "$as_me:5318: \$? = $ac_status" >&5
5319   (exit $ac_status); }; }; then
5320   ac_cv_func_dlsym=yes
5321 else
5322   echo "$as_me: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 ac_cv_func_dlsym=no
5325 fi
5326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5327 fi
5328 echo "$as_me:5328: result: $ac_cv_func_dlsym" >&5
5329 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5330 if test $ac_cv_func_dlsym = yes; then
5331   cf_have_dlsym=yes
5332 else
5333
5334 cf_have_libdl=no
5335 echo "$as_me:5335: checking for dlsym in -ldl" >&5
5336 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5337 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5338   echo $ECHO_N "(cached) $ECHO_C" >&6
5339 else
5340   ac_check_lib_save_LIBS=$LIBS
5341 LIBS="-ldl  $LIBS"
5342 cat >conftest.$ac_ext <<_ACEOF
5343 #line 5343 "configure"
5344 #include "confdefs.h"
5345
5346 /* Override any gcc2 internal prototype to avoid an error.  */
5347 #ifdef __cplusplus
5348 extern "C"
5349 #endif
5350 /* We use char because int might match the return type of a gcc2
5351    builtin and then its argument prototype would still apply.  */
5352 char dlsym ();
5353 int
5354 main ()
5355 {
5356 dlsym ();
5357   ;
5358   return 0;
5359 }
5360 _ACEOF
5361 rm -f conftest.$ac_objext conftest$ac_exeext
5362 if { (eval echo "$as_me:5362: \"$ac_link\"") >&5
5363   (eval $ac_link) 2>&5
5364   ac_status=$?
5365   echo "$as_me:5365: \$? = $ac_status" >&5
5366   (exit $ac_status); } &&
5367          { ac_try='test -s conftest$ac_exeext'
5368   { (eval echo "$as_me:5368: \"$ac_try\"") >&5
5369   (eval $ac_try) 2>&5
5370   ac_status=$?
5371   echo "$as_me:5371: \$? = $ac_status" >&5
5372   (exit $ac_status); }; }; then
5373   ac_cv_lib_dl_dlsym=yes
5374 else
5375   echo "$as_me: failed program was:" >&5
5376 cat conftest.$ac_ext >&5
5377 ac_cv_lib_dl_dlsym=no
5378 fi
5379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5380 LIBS=$ac_check_lib_save_LIBS
5381 fi
5382 echo "$as_me:5382: result: $ac_cv_lib_dl_dlsym" >&5
5383 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5384 if test $ac_cv_lib_dl_dlsym = yes; then
5385
5386         cf_have_dlsym=yes
5387         cf_have_libdl=yes
5388 fi
5389
5390 fi
5391
5392 if test "$cf_have_dlsym" = yes ; then
5393         test "$cf_have_libdl" = yes &&
5394 cf_add_libs="-ldl"
5395 # Filter out duplicates - this happens with badly-designed ".pc" files...
5396 for cf_add_1lib in $LIBS
5397 do
5398         for cf_add_2lib in $cf_add_libs
5399         do
5400                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5401                 then
5402                         cf_add_1lib=
5403                         break
5404                 fi
5405         done
5406         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5407 done
5408 LIBS="$cf_add_libs"
5409
5410         echo "$as_me:5410: checking whether able to link to dl*() functions" >&5
5411 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5412         cat >conftest.$ac_ext <<_ACEOF
5413 #line 5413 "configure"
5414 #include "confdefs.h"
5415 #include <dlfcn.h>
5416 int
5417 main ()
5418 {
5419
5420                 void *obj;
5421                 if ((obj = dlopen("filename", 0)) != 0) {
5422                         if (dlsym(obj, "symbolname") == 0) {
5423                         dlclose(obj);
5424                         }
5425                 }
5426   ;
5427   return 0;
5428 }
5429 _ACEOF
5430 rm -f conftest.$ac_objext conftest$ac_exeext
5431 if { (eval echo "$as_me:5431: \"$ac_link\"") >&5
5432   (eval $ac_link) 2>&5
5433   ac_status=$?
5434   echo "$as_me:5434: \$? = $ac_status" >&5
5435   (exit $ac_status); } &&
5436          { ac_try='test -s conftest$ac_exeext'
5437   { (eval echo "$as_me:5437: \"$ac_try\"") >&5
5438   (eval $ac_try) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); }; }; then
5442
5443 cat >>confdefs.h <<\EOF
5444 #define HAVE_LIBDL 1
5445 EOF
5446
5447 else
5448   echo "$as_me: failed program was:" >&5
5449 cat conftest.$ac_ext >&5
5450
5451                 { { echo "$as_me:5451: error: Cannot link test program for libdl" >&5
5452 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5453    { (exit 1); exit 1; }; }
5454 fi
5455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5456         echo "$as_me:5456: result: ok" >&5
5457 echo "${ECHO_T}ok" >&6
5458 else
5459         { { echo "$as_me:5459: error: Cannot find dlsym function" >&5
5460 echo "$as_me: error: Cannot find dlsym function" >&2;}
5461    { (exit 1); exit 1; }; }
5462 fi
5463
5464                 if test "x$with_gpm" != xyes ; then
5465                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5466
5467 echo "${as_me:-configure}:5467: testing assuming soname for gpm is $with_gpm ..." 1>&5
5468
5469                         cf_cv_gpm_soname="$with_gpm"
5470                 else
5471
5472 echo "$as_me:5472: checking for soname of gpm library" >&5
5473 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5474 if test "${cf_cv_gpm_soname+set}" = set; then
5475   echo $ECHO_N "(cached) $ECHO_C" >&6
5476 else
5477
5478 cf_cv_gpm_soname=unknown
5479 if test "$cross_compiling" != yes ; then
5480 cat >conftest.$ac_ext <<CF_EOF
5481 #include <gpm.h>
5482 int main()
5483 {
5484 if (Gpm_Open(0,0)) Gpm_Close();
5485         ${cf_cv_main_return:-return}(0);
5486 }
5487 CF_EOF
5488 cf_save_LIBS="$LIBS"
5489
5490 cf_add_libs="-lgpm"
5491 # Filter out duplicates - this happens with badly-designed ".pc" files...
5492 for cf_add_1lib in $LIBS
5493 do
5494         for cf_add_2lib in $cf_add_libs
5495         do
5496                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5497                 then
5498                         cf_add_1lib=
5499                         break
5500                 fi
5501         done
5502         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5503 done
5504 LIBS="$cf_add_libs"
5505
5506         if { (eval echo "$as_me:5506: \"$ac_compile\"") >&5
5507   (eval $ac_compile) 2>&5
5508   ac_status=$?
5509   echo "$as_me:5509: \$? = $ac_status" >&5
5510   (exit $ac_status); } ; then
5511                 if { (eval echo "$as_me:5511: \"$ac_link\"") >&5
5512   (eval $ac_link) 2>&5
5513   ac_status=$?
5514   echo "$as_me:5514: \$? = $ac_status" >&5
5515   (exit $ac_status); } ; then
5516                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5517                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5518                 fi
5519         fi
5520 rm -rf conftest*
5521 LIBS="$cf_save_LIBS"
5522 fi
5523
5524 fi
5525 echo "$as_me:5525: result: $cf_cv_gpm_soname" >&5
5526 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5527
5528                 fi
5529                 test "$cf_cv_gpm_soname" != "unknown" &&
5530 cat >>confdefs.h <<EOF
5531 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5532 EOF
5533
5534                 SHLIB_LIST="-ldl $SHLIB_LIST"
5535         else
5536                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5537
5538 cf_add_libs="-lgpm"
5539 # Filter out duplicates - this happens with badly-designed ".pc" files...
5540 for cf_add_1lib in $TEST_LIBS
5541 do
5542         for cf_add_2lib in $cf_add_libs
5543         do
5544                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5545                 then
5546                         cf_add_1lib=
5547                         break
5548                 fi
5549         done
5550         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5551 done
5552 TEST_LIBS="$cf_add_libs"
5553
5554         fi
5555
5556 cat >>confdefs.h <<\EOF
5557 #define HAVE_LIBGPM 1
5558 EOF
5559
5560 echo "$as_me:5560: checking for Gpm_Wgetch in -lgpm" >&5
5561 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5562 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5563   echo $ECHO_N "(cached) $ECHO_C" >&6
5564 else
5565   ac_check_lib_save_LIBS=$LIBS
5566 LIBS="-lgpm  $LIBS"
5567 cat >conftest.$ac_ext <<_ACEOF
5568 #line 5568 "configure"
5569 #include "confdefs.h"
5570
5571 /* Override any gcc2 internal prototype to avoid an error.  */
5572 #ifdef __cplusplus
5573 extern "C"
5574 #endif
5575 /* We use char because int might match the return type of a gcc2
5576    builtin and then its argument prototype would still apply.  */
5577 char Gpm_Wgetch ();
5578 int
5579 main ()
5580 {
5581 Gpm_Wgetch ();
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 rm -f conftest.$ac_objext conftest$ac_exeext
5587 if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
5588   (eval $ac_link) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } &&
5592          { ac_try='test -s conftest$ac_exeext'
5593   { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5594   (eval $ac_try) 2>&5
5595   ac_status=$?
5596   echo "$as_me:5596: \$? = $ac_status" >&5
5597   (exit $ac_status); }; }; then
5598   ac_cv_lib_gpm_Gpm_Wgetch=yes
5599 else
5600   echo "$as_me: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 ac_cv_lib_gpm_Gpm_Wgetch=no
5603 fi
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605 LIBS=$ac_check_lib_save_LIBS
5606 fi
5607 echo "$as_me:5607: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5608 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5609 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5610
5611 echo "$as_me:5611: checking if GPM is weakly bound to curses library" >&5
5612 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5613 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5614   echo $ECHO_N "(cached) $ECHO_C" >&6
5615 else
5616
5617 cf_cv_check_gpm_wgetch=unknown
5618 if test "$cross_compiling" != yes ; then
5619
5620 cat >conftest.$ac_ext <<CF_EOF
5621 #include <gpm.h>
5622 int main()
5623 {
5624         Gpm_Wgetch();
5625         ${cf_cv_main_return:-return}(0);
5626 }
5627 CF_EOF
5628
5629         cf_save_LIBS="$LIBS"
5630         # This only works if we can look at the symbol table.  If a shared
5631         # library is stripped for install, we cannot use that.  So we're forced
5632         # to rely on the static library, noting that some packagers may not
5633         # include it.
5634         LIBS="-static -lgpm -dynamic $LIBS"
5635         if { (eval echo "$as_me:5635: \"$ac_compile\"") >&5
5636   (eval $ac_compile) 2>&5
5637   ac_status=$?
5638   echo "$as_me:5638: \$? = $ac_status" >&5
5639   (exit $ac_status); } ; then
5640                 if { (eval echo "$as_me:5640: \"$ac_link\"") >&5
5641   (eval $ac_link) 2>&5
5642   ac_status=$?
5643   echo "$as_me:5643: \$? = $ac_status" >&5
5644   (exit $ac_status); } ; then
5645                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5646                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5647                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5648                 fi
5649         fi
5650         rm -rf conftest*
5651         LIBS="$cf_save_LIBS"
5652 fi
5653
5654 fi
5655 echo "$as_me:5655: result: $cf_cv_check_gpm_wgetch" >&5
5656 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5657
5658 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5659         { echo "$as_me:5659: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5660 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5661 fi
5662
5663 fi
5664
5665 fi
5666
5667 # not everyone has "test -c"
5668 if test -c /dev/sysmouse 2>/dev/null ; then
5669 echo "$as_me:5669: checking if you want to use sysmouse" >&5
5670 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5671
5672 # Check whether --with-sysmouse or --without-sysmouse was given.
5673 if test "${with_sysmouse+set}" = set; then
5674   withval="$with_sysmouse"
5675   cf_with_sysmouse=$withval
5676 else
5677   cf_with_sysmouse=maybe
5678 fi;
5679         if test "$cf_with_sysmouse" != no ; then
5680         cat >conftest.$ac_ext <<_ACEOF
5681 #line 5681 "configure"
5682 #include "confdefs.h"
5683
5684 #include <osreldate.h>
5685 #if (__FreeBSD_version >= 400017)
5686 #include <sys/consio.h>
5687 #include <sys/fbio.h>
5688 #else
5689 #include <machine/console.h>
5690 #endif
5691
5692 int
5693 main ()
5694 {
5695
5696         struct mouse_info the_mouse;
5697         ioctl(0, CONS_MOUSECTL, &the_mouse);
5698
5699   ;
5700   return 0;
5701 }
5702 _ACEOF
5703 rm -f conftest.$ac_objext
5704 if { (eval echo "$as_me:5704: \"$ac_compile\"") >&5
5705   (eval $ac_compile) 2>&5
5706   ac_status=$?
5707   echo "$as_me:5707: \$? = $ac_status" >&5
5708   (exit $ac_status); } &&
5709          { ac_try='test -s conftest.$ac_objext'
5710   { (eval echo "$as_me:5710: \"$ac_try\"") >&5
5711   (eval $ac_try) 2>&5
5712   ac_status=$?
5713   echo "$as_me:5713: \$? = $ac_status" >&5
5714   (exit $ac_status); }; }; then
5715   cf_with_sysmouse=yes
5716 else
5717   echo "$as_me: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5719 cf_with_sysmouse=no
5720 fi
5721 rm -f conftest.$ac_objext conftest.$ac_ext
5722         fi
5723 echo "$as_me:5723: result: $cf_with_sysmouse" >&5
5724 echo "${ECHO_T}$cf_with_sysmouse" >&6
5725 test "$cf_with_sysmouse" = yes &&
5726 cat >>confdefs.h <<\EOF
5727 #define USE_SYSMOUSE 1
5728 EOF
5729
5730 fi
5731
5732 if test X"$CC_G_OPT" = X"" ; then
5733         CC_G_OPT='-g'
5734         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5735 fi
5736
5737 if test X"$CXX_G_OPT" = X"" ; then
5738         CXX_G_OPT='-g'
5739         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5740 fi
5741
5742 echo "$as_me:5742: checking for default loader flags" >&5
5743 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5744 case $DFT_LWR_MODEL in
5745 libtool) LD_MODEL=''   ;;
5746 normal)  LD_MODEL=''   ;;
5747 debug)   LD_MODEL=$CC_G_OPT ;;
5748 profile) LD_MODEL='-pg';;
5749 shared)  LD_MODEL=''   ;;
5750 esac
5751 echo "$as_me:5751: result: $LD_MODEL" >&5
5752 echo "${ECHO_T}$LD_MODEL" >&6
5753
5754 case $DFT_LWR_MODEL in
5755 shared)
5756
5757 echo "$as_me:5757: checking if rpath option should be used" >&5
5758 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5759
5760 # Check whether --enable-rpath or --disable-rpath was given.
5761 if test "${enable_rpath+set}" = set; then
5762   enableval="$enable_rpath"
5763   cf_cv_enable_rpath=$enableval
5764 else
5765   cf_cv_enable_rpath=no
5766 fi;
5767 echo "$as_me:5767: result: $cf_cv_enable_rpath" >&5
5768 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5769
5770 echo "$as_me:5770: checking if shared libraries should be relinked during install" >&5
5771 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5772
5773 # Check whether --enable-relink or --disable-relink was given.
5774 if test "${enable_relink+set}" = set; then
5775   enableval="$enable_relink"
5776   cf_cv_do_relink=$enableval
5777 else
5778   cf_cv_do_relink=yes
5779 fi;
5780 echo "$as_me:5780: result: $cf_cv_do_relink" >&5
5781 echo "${ECHO_T}$cf_cv_do_relink" >&6
5782         ;;
5783 esac
5784
5785 # we will build libraries one-level down.
5786 rel_builddir=..
5787
5788 LD_RPATH_OPT=
5789 echo "$as_me:5789: checking for an rpath option" >&5
5790 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5791 case $cf_cv_system_name in #(vi
5792 irix*) #(vi
5793         if test "$GCC" = yes; then
5794                 LD_RPATH_OPT="-Wl,-rpath,"
5795         else
5796                 LD_RPATH_OPT="-rpath "
5797         fi
5798         ;;
5799 linux*|gnu*|k*bsd*-gnu) #(vi
5800         LD_RPATH_OPT="-Wl,-rpath,"
5801         ;;
5802 openbsd[2-9].*|mirbsd*) #(vi
5803         LD_RPATH_OPT="-Wl,-rpath,"
5804         ;;
5805 dragonfly*|freebsd*) #(vi
5806         LD_RPATH_OPT="-rpath "
5807         ;;
5808 netbsd*) #(vi
5809         LD_RPATH_OPT="-Wl,-rpath,"
5810         ;;
5811 osf*|mls+*) #(vi
5812         LD_RPATH_OPT="-rpath "
5813         ;;
5814 solaris2*) #(vi
5815         LD_RPATH_OPT="-R"
5816         ;;
5817 *)
5818         ;;
5819 esac
5820 echo "$as_me:5820: result: $LD_RPATH_OPT" >&5
5821 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5822
5823 case "x$LD_RPATH_OPT" in #(vi
5824 x-R*)
5825         echo "$as_me:5825: checking if we need a space after rpath option" >&5
5826 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5827         cf_save_LIBS="$LIBS"
5828
5829 cf_add_libs="${LD_RPATH_OPT}$libdir"
5830 # Filter out duplicates - this happens with badly-designed ".pc" files...
5831 for cf_add_1lib in $LIBS
5832 do
5833         for cf_add_2lib in $cf_add_libs
5834         do
5835                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5836                 then
5837                         cf_add_1lib=
5838                         break
5839                 fi
5840         done
5841         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5842 done
5843 LIBS="$cf_add_libs"
5844
5845         cat >conftest.$ac_ext <<_ACEOF
5846 #line 5846 "configure"
5847 #include "confdefs.h"
5848
5849 int
5850 main ()
5851 {
5852
5853   ;
5854   return 0;
5855 }
5856 _ACEOF
5857 rm -f conftest.$ac_objext conftest$ac_exeext
5858 if { (eval echo "$as_me:5858: \"$ac_link\"") >&5
5859   (eval $ac_link) 2>&5
5860   ac_status=$?
5861   echo "$as_me:5861: \$? = $ac_status" >&5
5862   (exit $ac_status); } &&
5863          { ac_try='test -s conftest$ac_exeext'
5864   { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5865   (eval $ac_try) 2>&5
5866   ac_status=$?
5867   echo "$as_me:5867: \$? = $ac_status" >&5
5868   (exit $ac_status); }; }; then
5869   cf_rpath_space=no
5870 else
5871   echo "$as_me: failed program was:" >&5
5872 cat conftest.$ac_ext >&5
5873 cf_rpath_space=yes
5874 fi
5875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5876         LIBS="$cf_save_LIBS"
5877         echo "$as_me:5877: result: $cf_rpath_space" >&5
5878 echo "${ECHO_T}$cf_rpath_space" >&6
5879         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5880         ;;
5881 esac
5882
5883         RM_SHARED_OPTS=
5884         LOCAL_LDFLAGS=
5885         LOCAL_LDFLAGS2=
5886         LD_SHARED_OPTS=
5887         INSTALL_LIB="-m 644"
5888         : ${rel_builddir:=.}
5889
5890         shlibdir=$libdir
5891
5892         MAKE_DLLS="#"
5893
5894         cf_cv_do_symlinks=no
5895         cf_ld_rpath_opt=
5896         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5897
5898         echo "$as_me:5898: checking if release/abi version should be used for shared libs" >&5
5899 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5900
5901 # Check whether --with-shlib-version or --without-shlib-version was given.
5902 if test "${with_shlib_version+set}" = set; then
5903   withval="$with_shlib_version"
5904   test -z "$withval" && withval=auto
5905         case $withval in #(vi
5906         yes) #(vi
5907                 cf_cv_shlib_version=auto
5908                 ;;
5909         rel|abi|auto|no) #(vi
5910                 cf_cv_shlib_version=$withval
5911                 ;;
5912         *)
5913                 { { echo "$as_me:5913: error: option value must be one of: rel, abi, auto or no" >&5
5914 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5915    { (exit 1); exit 1; }; }
5916                 ;;
5917         esac
5918
5919 else
5920   cf_cv_shlib_version=auto
5921 fi;
5922         echo "$as_me:5922: result: $cf_cv_shlib_version" >&5
5923 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5924
5925         cf_cv_rm_so_locs=no
5926         cf_try_cflags=
5927
5928         # Some less-capable ports of gcc support only -fpic
5929         CC_SHARED_OPTS=
5930         if test "$GCC" = yes
5931         then
5932                 echo "$as_me:5932: checking which $CC option to use" >&5
5933 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5934                 cf_save_CFLAGS="$CFLAGS"
5935                 for CC_SHARED_OPTS in -fPIC -fpic ''
5936                 do
5937                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5938                         cat >conftest.$ac_ext <<_ACEOF
5939 #line 5939 "configure"
5940 #include "confdefs.h"
5941 #include <stdio.h>
5942 int
5943 main ()
5944 {
5945 int x = 1
5946   ;
5947   return 0;
5948 }
5949 _ACEOF
5950 rm -f conftest.$ac_objext
5951 if { (eval echo "$as_me:5951: \"$ac_compile\"") >&5
5952   (eval $ac_compile) 2>&5
5953   ac_status=$?
5954   echo "$as_me:5954: \$? = $ac_status" >&5
5955   (exit $ac_status); } &&
5956          { ac_try='test -s conftest.$ac_objext'
5957   { (eval echo "$as_me:5957: \"$ac_try\"") >&5
5958   (eval $ac_try) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); }; }; then
5962   break
5963 else
5964   echo "$as_me: failed program was:" >&5
5965 cat conftest.$ac_ext >&5
5966 fi
5967 rm -f conftest.$ac_objext conftest.$ac_ext
5968                 done
5969                 echo "$as_me:5969: result: $CC_SHARED_OPTS" >&5
5970 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5971                 CFLAGS="$cf_save_CFLAGS"
5972         fi
5973
5974         cf_cv_shlib_version_infix=no
5975
5976         case $cf_cv_system_name in #(vi
5977         aix4.3-9*|aix[5-7]*) #(vi
5978                 if test "$GCC" = yes; then
5979                         CC_SHARED_OPTS=
5980                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5981                 else
5982                         # CC_SHARED_OPTS='-qpic=large -G'
5983                         # perhaps "-bM:SRE -bnoentry -bexpall"
5984                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5985                 fi
5986                 ;;
5987         beos*) #(vi
5988                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5989                 ;;
5990         cygwin*) #(vi
5991                 CC_SHARED_OPTS=
5992                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5993                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5994                 cf_cv_shlib_version=cygdll
5995                 cf_cv_shlib_version_infix=cygdll
5996                 shlibdir=$bindir
5997                 MAKE_DLLS=
5998                 cat >mk_shared_lib.sh <<-CF_EOF
5999                 #!/bin/sh
6000                 SHARED_LIB=\$1
6001                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6002                 shift
6003                 cat <<-EOF
6004                 Linking shared library
6005                 ** SHARED_LIB \$SHARED_LIB
6006                 ** IMPORT_LIB \$IMPORT_LIB
6007 EOF
6008                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6009 CF_EOF
6010                 chmod +x mk_shared_lib.sh
6011                 ;;
6012         msys*) #(vi
6013                 CC_SHARED_OPTS=
6014                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6015                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6016                 cf_cv_shlib_version=msysdll
6017                 cf_cv_shlib_version_infix=msysdll
6018                 shlibdir=$bindir
6019                 MAKE_DLLS=
6020                 cat >mk_shared_lib.sh <<-CF_EOF
6021                 #!/bin/sh
6022                 SHARED_LIB=\$1
6023                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6024                 shift
6025                 cat <<-EOF
6026                 Linking shared library
6027                 ** SHARED_LIB \$SHARED_LIB
6028                 ** IMPORT_LIB \$IMPORT_LIB
6029 EOF
6030                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6031 CF_EOF
6032                 chmod +x mk_shared_lib.sh
6033                 ;;
6034         darwin*) #(vi
6035                 cf_try_cflags="no-cpp-precomp"
6036                 CC_SHARED_OPTS="-dynamic"
6037                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6038                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6039                 cf_cv_shlib_version_infix=yes
6040                 echo "$as_me:6040: checking if ld -search_paths_first works" >&5
6041 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6042 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6043   echo $ECHO_N "(cached) $ECHO_C" >&6
6044 else
6045
6046                         cf_save_LDFLAGS=$LDFLAGS
6047                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6048                         cat >conftest.$ac_ext <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6051
6052 int
6053 main ()
6054 {
6055 int i;
6056   ;
6057   return 0;
6058 }
6059 _ACEOF
6060 rm -f conftest.$ac_objext conftest$ac_exeext
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062   (eval $ac_link) 2>&5
6063   ac_status=$?
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit $ac_status); } &&
6066          { ac_try='test -s conftest$ac_exeext'
6067   { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit $ac_status); }; }; then
6072   cf_cv_ldflags_search_paths_first=yes
6073 else
6074   echo "$as_me: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6076 cf_cv_ldflags_search_paths_first=no
6077 fi
6078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6079                                 LDFLAGS=$cf_save_LDFLAGS
6080 fi
6081 echo "$as_me:6081: result: $cf_cv_ldflags_search_paths_first" >&5
6082 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6083                 if test $cf_cv_ldflags_search_paths_first = yes; then
6084                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6085                 fi
6086                 ;;
6087         hpux[7-8]*) #(vi
6088                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6089                 if test "$GCC" != yes; then
6090                         CC_SHARED_OPTS='+Z'
6091                 fi
6092                 MK_SHARED_LIB='${LD} -b -o $@'
6093                 INSTALL_LIB="-m 555"
6094                 ;;
6095         hpux*) #(vi
6096                 # (tested with gcc 2.7.2 -- I don't have c89)
6097                 if test "$GCC" = yes; then
6098                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6099                 else
6100                         CC_SHARED_OPTS='+Z'
6101                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6102                 fi
6103                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6104                 # HP-UX shared libraries must be executable, and should be
6105                 # readonly to exploit a quirk in the memory manager.
6106                 INSTALL_LIB="-m 555"
6107                 ;;
6108         interix*)
6109                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6110                 if test "$cf_cv_shlib_version" = rel; then
6111                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6112                 else
6113                         cf_shared_soname='`basename `'
6114                 fi
6115                 CC_SHARED_OPTS=
6116                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6117                 ;;
6118         irix*) #(vi
6119                 if test "$cf_cv_enable_rpath" = yes ; then
6120                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6121                 fi
6122                 # tested with IRIX 5.2 and 'cc'.
6123                 if test "$GCC" != yes; then
6124                         CC_SHARED_OPTS='-KPIC'
6125                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6126                 else
6127                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6128                 fi
6129                 cf_cv_rm_so_locs=yes
6130                 ;;
6131         linux*|gnu*|k*bsd*-gnu) #(vi
6132                 if test "$DFT_LWR_MODEL" = "shared" ; then
6133                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6134                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6135                 fi
6136                 if test "$cf_cv_enable_rpath" = yes ; then
6137                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6138                 fi
6139
6140         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6141         if test "$cf_cv_shlib_version" = rel; then
6142                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6143         else
6144                 cf_cv_shared_soname='`basename $@`'
6145         fi
6146
6147                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6148                 ;;
6149         mingw*) #(vi
6150                 cf_cv_shlib_version=mingw
6151                 cf_cv_shlib_version_infix=mingw
6152                 shlibdir=$bindir
6153                 MAKE_DLLS=
6154                 if test "$DFT_LWR_MODEL" = "shared" ; then
6155                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6156                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6157                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6158                 fi
6159                 CC_SHARED_OPTS=
6160                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6161                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6162                 cat >mk_shared_lib.sh <<-CF_EOF
6163                 #!/bin/sh
6164                 SHARED_LIB=\$1
6165                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6166                 shift
6167                 cat <<-EOF
6168                 Linking shared library
6169                 ** SHARED_LIB \$SHARED_LIB
6170                 ** IMPORT_LIB \$IMPORT_LIB
6171 EOF
6172                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6173 CF_EOF
6174                 chmod +x mk_shared_lib.sh
6175                 ;;
6176         openbsd[2-9].*|mirbsd*) #(vi
6177                 if test "$DFT_LWR_MODEL" = "shared" ; then
6178                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6179                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6180                 fi
6181                 if test "$cf_cv_enable_rpath" = yes ; then
6182                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6183                 fi
6184                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6185
6186         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6187         if test "$cf_cv_shlib_version" = rel; then
6188                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6189         else
6190                 cf_cv_shared_soname='`basename $@`'
6191         fi
6192
6193                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6194                 ;;
6195         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6196                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6197                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6198                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6199                 ;;
6200         dragonfly*|freebsd*) #(vi
6201                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6202                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6203                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6204                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6205                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6206                 fi
6207
6208         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6209         if test "$cf_cv_shlib_version" = rel; then
6210                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6211         else
6212                 cf_cv_shared_soname='`basename $@`'
6213         fi
6214
6215                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6216                 ;;
6217         netbsd*) #(vi
6218                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6219                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6220                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6221                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6222                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6223                         if test "$cf_cv_shlib_version" = auto; then
6224                         if test -f /usr/libexec/ld.elf_so; then
6225                                 cf_cv_shlib_version=abi
6226                         else
6227                                 cf_cv_shlib_version=rel
6228                         fi
6229                         fi
6230
6231         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6232         if test "$cf_cv_shlib_version" = rel; then
6233                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6234         else
6235                 cf_cv_shared_soname='`basename $@`'
6236         fi
6237
6238                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6239                 else
6240                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6241                 fi
6242                 ;;
6243         osf*|mls+*) #(vi
6244                 # tested with OSF/1 V3.2 and 'cc'
6245                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6246                 # link with shared libs).
6247                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6248                 case $host_os in #(vi
6249                 osf4*)
6250                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6251                         ;;
6252                 esac
6253                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6254                 if test "$DFT_LWR_MODEL" = "shared" ; then
6255                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6257                 fi
6258                 cf_cv_rm_so_locs=yes
6259                 ;;
6260         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6261                 # tested with osr5.0.5
6262                 if test "$GCC" != yes; then
6263                         CC_SHARED_OPTS='-belf -KPIC'
6264                 fi
6265                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6266                 if test "$cf_cv_enable_rpath" = yes ; then
6267                         # only way is to set LD_RUN_PATH but no switch for it
6268                         RUN_PATH=$libdir
6269                 fi
6270                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6271                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6272                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6273                 ;;
6274         sunos4*) #(vi
6275                 # tested with SunOS 4.1.1 and gcc 2.7.0
6276                 if test "$GCC" != yes; then
6277                         CC_SHARED_OPTS='-KPIC'
6278                 fi
6279                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6280                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6281                 ;;
6282         solaris2*) #(vi
6283                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6284                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6285                 if test "$DFT_LWR_MODEL" = "shared" ; then
6286                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6287                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6288                 fi
6289                 if test "$cf_cv_enable_rpath" = yes ; then
6290                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6291                 fi
6292
6293         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6294         if test "$cf_cv_shlib_version" = rel; then
6295                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6296         else
6297                 cf_cv_shared_soname='`basename $@`'
6298         fi
6299
6300                 if test "$GCC" != yes; then
6301                         cf_save_CFLAGS="$CFLAGS"
6302                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6303                         do
6304                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6305                                 cat >conftest.$ac_ext <<_ACEOF
6306 #line 6306 "configure"
6307 #include "confdefs.h"
6308 #include <stdio.h>
6309 int
6310 main ()
6311 {
6312 printf("Hello\n");
6313   ;
6314   return 0;
6315 }
6316 _ACEOF
6317 rm -f conftest.$ac_objext
6318 if { (eval echo "$as_me:6318: \"$ac_compile\"") >&5
6319   (eval $ac_compile) 2>&5
6320   ac_status=$?
6321   echo "$as_me:6321: \$? = $ac_status" >&5
6322   (exit $ac_status); } &&
6323          { ac_try='test -s conftest.$ac_objext'
6324   { (eval echo "$as_me:6324: \"$ac_try\"") >&5
6325   (eval $ac_try) 2>&5
6326   ac_status=$?
6327   echo "$as_me:6327: \$? = $ac_status" >&5
6328   (exit $ac_status); }; }; then
6329   break
6330 else
6331   echo "$as_me: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6333 fi
6334 rm -f conftest.$ac_objext conftest.$ac_ext
6335                         done
6336                         CFLAGS="$cf_save_CFLAGS"
6337                         CC_SHARED_OPTS=$cf_shared_opts
6338                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6339                 else
6340                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6341                 fi
6342                 ;;
6343         sysv5uw7*|unix_sv*) #(vi
6344                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6345                 if test "$GCC" != yes; then
6346                         CC_SHARED_OPTS='-KPIC'
6347                 fi
6348                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6349                 ;;
6350         *)
6351                 CC_SHARED_OPTS='unknown'
6352                 MK_SHARED_LIB='echo unknown'
6353                 ;;
6354         esac
6355
6356         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6357         case "$cf_cv_shlib_version" in #(vi
6358         rel|abi)
6359                 case "$MK_SHARED_LIB" in #(vi
6360                 *'-o $@') #(vi
6361                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6362                         ;;
6363                 *)
6364                         { echo "$as_me:6364: WARNING: ignored --with-shlib-version" >&5
6365 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6366                         ;;
6367                 esac
6368                 ;;
6369         esac
6370
6371         if test -n "$cf_try_cflags"
6372         then
6373 cat > conftest.$ac_ext <<EOF
6374 #line 6374 "${as_me:-configure}"
6375 #include <stdio.h>
6376 int main(int argc, char *argv[])
6377 {
6378         printf("hello\n");
6379         return (argv[argc-1] == 0) ;
6380 }
6381 EOF
6382                 cf_save_CFLAGS="$CFLAGS"
6383                 for cf_opt in $cf_try_cflags
6384                 do
6385                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6386                         echo "$as_me:6386: checking if CFLAGS option -$cf_opt works" >&5
6387 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6388                         if { (eval echo "$as_me:6388: \"$ac_compile\"") >&5
6389   (eval $ac_compile) 2>&5
6390   ac_status=$?
6391   echo "$as_me:6391: \$? = $ac_status" >&5
6392   (exit $ac_status); }; then
6393                                 echo "$as_me:6393: result: yes" >&5
6394 echo "${ECHO_T}yes" >&6
6395                                 cf_save_CFLAGS="$CFLAGS"
6396                         else
6397                                 echo "$as_me:6397: result: no" >&5
6398 echo "${ECHO_T}no" >&6
6399                         fi
6400                 done
6401                 CFLAGS="$cf_save_CFLAGS"
6402         fi
6403
6404         # RPATH_LIST is a colon-separated list of directories
6405         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6406         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6407
6408         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6409
6410         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6411
6412 echo "${as_me:-configure}:6412: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6413
6414         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6415
6416 echo "${as_me:-configure}:6416: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6417
6418 for model in $cf_list_models; do
6419         case $model in #(vi
6420         libtool)
6421
6422 echo "$as_me:6422: checking for additional libtool options" >&5
6423 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6424
6425 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6426 if test "${with_libtool_opts+set}" = set; then
6427   withval="$with_libtool_opts"
6428   with_libtool_opts=$withval
6429 else
6430   with_libtool_opts=no
6431 fi;
6432 echo "$as_me:6432: result: $with_libtool_opts" >&5
6433 echo "${ECHO_T}$with_libtool_opts" >&6
6434
6435 case .$with_libtool_opts in
6436 .yes|.no|.)
6437         ;;
6438 *)
6439         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6440         ;;
6441 esac
6442
6443 echo "$as_me:6443: checking if exported-symbols file should be used" >&5
6444 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6445
6446 # Check whether --with-export-syms or --without-export-syms was given.
6447 if test "${with_export_syms+set}" = set; then
6448   withval="$with_export_syms"
6449   with_export_syms=$withval
6450 else
6451   with_export_syms=no
6452 fi;
6453 if test "x$with_export_syms" = xyes
6454 then
6455         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6456
6457 fi
6458 echo "$as_me:6458: result: $with_export_syms" >&5
6459 echo "${ECHO_T}$with_export_syms" >&6
6460 if test "x$with_export_syms" != xno
6461 then
6462         EXPORT_SYMS="-export-symbols $with_export_syms"
6463
6464 fi
6465
6466                 ;;
6467         shared) #(vi
6468                 if test "$CC_SHARED_OPTS" = "unknown"; then
6469                         { { echo "$as_me:6469: error: Shared libraries are not supported in this version" >&5
6470 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6471    { (exit 1); exit 1; }; }
6472                 fi
6473
6474 echo "$as_me:6474: checking if versioned-symbols file should be used" >&5
6475 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6476
6477 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6478 if test "${with_versioned_syms+set}" = set; then
6479   withval="$with_versioned_syms"
6480   with_versioned_syms=$withval
6481 else
6482   with_versioned_syms=no
6483 fi;
6484 if test "x$with_versioned_syms" = xyes
6485 then
6486         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6487
6488 fi
6489 echo "$as_me:6489: result: $with_versioned_syms" >&5
6490 echo "${ECHO_T}$with_versioned_syms" >&6
6491
6492 RESULTING_SYMS=
6493 VERSIONED_SYMS=
6494 WILDCARD_SYMS=
6495
6496 if test "x$with_versioned_syms" != xno
6497 then
6498         RESULTING_SYMS=$with_versioned_syms
6499         case "x$MK_SHARED_LIB" in
6500         *-Wl,*) #(vi
6501                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6502                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6503                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6504
6505 echo "${as_me:-configure}:6505: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6506
6507                 ;;
6508         *-dy\ *) #(vi
6509                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6510                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6511                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6512
6513 echo "${as_me:-configure}:6513: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6514
6515                 ;;
6516         *)
6517                 { echo "$as_me:6517: WARNING: this system does not support versioned-symbols" >&5
6518 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6519                 ;;
6520         esac
6521
6522         # Linux ld can selectively override scope, e.g., of symbols beginning with
6523         # "_" by first declaring some as global, and then using a wildcard to
6524         # declare the others as local.  Some other loaders cannot do this.  Check
6525         # by constructing a (very) simple shared library and inspecting its
6526         # symbols.
6527         if test "x$VERSIONED_SYMS" != "x"
6528         then
6529                 echo "$as_me:6529: checking if wildcards can be used to selectively omit symbols" >&5
6530 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6531                 WILDCARD_SYMS=no
6532
6533                 # make sources
6534                 rm -f conftest.*
6535
6536                 cat >conftest.ver <<EOF
6537 module_1.0 {
6538 global:
6539         globalf1;
6540 local:
6541         localf1;
6542 };
6543 module_2.0 {
6544 global:
6545         globalf2;
6546 local:
6547         localf2;
6548         _*;
6549 } module_1.0;
6550 submodule_1.0 {
6551 global:
6552         subglobalf1;
6553         _ismissing;
6554 local:
6555         sublocalf1;
6556 };
6557 submodule_2.0 {
6558 global:
6559         subglobalf2;
6560 local:
6561         sublocalf2;
6562         _*;
6563 } submodule_1.0;
6564 EOF
6565                 cat >conftest.$ac_ext <<EOF
6566 #line 6566 "configure"
6567 int     _ismissing(void) { return 1; }
6568 int     _localf1(void) { return 1; }
6569 int     _localf2(void) { return 2; }
6570 int     globalf1(void) { return 1; }
6571 int     globalf2(void) { return 2; }
6572 int     _sublocalf1(void) { return 1; }
6573 int     _sublocalf2(void) { return 2; }
6574 int     subglobalf1(void) { return 1; }
6575 int     subglobalf2(void) { return 2; }
6576 EOF
6577                 cat >conftest.mk <<EOF
6578 CC=${CC}
6579 CFLAGS=${CFLAGS}
6580 CPPFLAGS=${CPPFLAGS}
6581 LDFLAGS=${LDFLAGS}
6582 LIBS=${LIBS}
6583 VERSIONED_SYMS=${VERSIONED_SYMS}
6584 RESULTING_SYMS=conftest.ver
6585 MK_SHARED_LIB=${MK_SHARED_LIB}
6586 conftest.so: conftest.$ac_cv_objext
6587                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6588 EOF
6589
6590                 # compile source, make library
6591                 if make -f conftest.mk 2>&5 >/dev/null
6592                 then
6593                         # test for missing symbol
6594                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6595                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6596                 fi
6597                 echo "$as_me:6597: result: $WILDCARD_SYMS" >&5
6598 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6599                 rm -f conftest.*
6600         fi
6601 fi
6602
6603                 ;;
6604         esac
6605 done
6606
6607 # pretend that ncurses==ncursesw==ncursest
6608 echo "$as_me:6608: checking if you want to disable library suffixes" >&5
6609 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6610
6611 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6612 if test "${enable_lib_suffixes+set}" = set; then
6613   enableval="$enable_lib_suffixes"
6614   test "$enableval" != no && enableval=yes
6615   if test "$enableval" != "yes" ; then
6616     disable_lib_suffixes=yes
6617   else
6618     disable_lib_suffixes=no
6619   fi
6620 else
6621   enableval=yes
6622   disable_lib_suffixes=no
6623
6624 fi;
6625 echo "$as_me:6625: result: $disable_lib_suffixes" >&5
6626 echo "${ECHO_T}$disable_lib_suffixes" >&6
6627
6628 ### If we're building with rpath, try to link non-standard libs that way too.
6629 if test "$DFT_LWR_MODEL" = "shared"; then
6630
6631 echo "$as_me:6631: checking if rpath-hack should be disabled" >&5
6632 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6633
6634 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6635 if test "${enable_rpath_hack+set}" = set; then
6636   enableval="$enable_rpath_hack"
6637   test "$enableval" != no && enableval=yes
6638   if test "$enableval" != "yes" ; then
6639     cf_disable_rpath_hack=yes
6640   else
6641     cf_disable_rpath_hack=no
6642   fi
6643 else
6644   enableval=yes
6645   cf_disable_rpath_hack=no
6646
6647 fi;
6648 echo "$as_me:6648: result: $cf_disable_rpath_hack" >&5
6649 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6650 if test "$cf_disable_rpath_hack" = no ; then
6651
6652 echo "$as_me:6652: checking for updated LDFLAGS" >&5
6653 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6654 if test -n "$LD_RPATH_OPT" ; then
6655         echo "$as_me:6655: result: maybe" >&5
6656 echo "${ECHO_T}maybe" >&6
6657
6658         for ac_prog in ldd
6659 do
6660   # Extract the first word of "$ac_prog", so it can be a program name with args.
6661 set dummy $ac_prog; ac_word=$2
6662 echo "$as_me:6662: checking for $ac_word" >&5
6663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6664 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6665   echo $ECHO_N "(cached) $ECHO_C" >&6
6666 else
6667   if test -n "$cf_ldd_prog"; then
6668   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6669 else
6670   ac_save_IFS=$IFS; IFS=$ac_path_separator
6671 ac_dummy="$PATH"
6672 for ac_dir in $ac_dummy; do
6673   IFS=$ac_save_IFS
6674   test -z "$ac_dir" && ac_dir=.
6675   $as_executable_p "$ac_dir/$ac_word" || continue
6676 ac_cv_prog_cf_ldd_prog="$ac_prog"
6677 echo "$as_me:6677: found $ac_dir/$ac_word" >&5
6678 break
6679 done
6680
6681 fi
6682 fi
6683 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6684 if test -n "$cf_ldd_prog"; then
6685   echo "$as_me:6685: result: $cf_ldd_prog" >&5
6686 echo "${ECHO_T}$cf_ldd_prog" >&6
6687 else
6688   echo "$as_me:6688: result: no" >&5
6689 echo "${ECHO_T}no" >&6
6690 fi
6691
6692   test -n "$cf_ldd_prog" && break
6693 done
6694 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6695
6696         cf_rpath_list="/usr/lib /lib"
6697         if test "$cf_ldd_prog" != no
6698         then
6699                 cf_rpath_oops=
6700
6701 cat >conftest.$ac_ext <<_ACEOF
6702 #line 6702 "configure"
6703 #include "confdefs.h"
6704 #include <stdio.h>
6705 int
6706 main ()
6707 {
6708 printf("Hello");
6709   ;
6710   return 0;
6711 }
6712 _ACEOF
6713 rm -f conftest.$ac_objext conftest$ac_exeext
6714 if { (eval echo "$as_me:6714: \"$ac_link\"") >&5
6715   (eval $ac_link) 2>&5
6716   ac_status=$?
6717   echo "$as_me:6717: \$? = $ac_status" >&5
6718   (exit $ac_status); } &&
6719          { ac_try='test -s conftest$ac_exeext'
6720   { (eval echo "$as_me:6720: \"$ac_try\"") >&5
6721   (eval $ac_try) 2>&5
6722   ac_status=$?
6723   echo "$as_me:6723: \$? = $ac_status" >&5
6724   (exit $ac_status); }; }; then
6725   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6726                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6727 else
6728   echo "$as_me: failed program was:" >&5
6729 cat conftest.$ac_ext >&5
6730 fi
6731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6732
6733                 # If we passed the link-test, but get a "not found" on a given library,
6734                 # this could be due to inept reconfiguration of gcc to make it only
6735                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6736                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6737                 # /usr/local libraries.
6738                 if test -n "$cf_rpath_oops"
6739                 then
6740                         for cf_rpath_src in $cf_rpath_oops
6741                         do
6742                                 for cf_rpath_dir in \
6743                                         /usr/local \
6744                                         /usr/pkg \
6745                                         /opt/sfw
6746                                 do
6747                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6748                                         then
6749                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6750
6751 echo "${as_me:-configure}:6751: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6752
6753                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6754                                                 break
6755                                         fi
6756                                 done
6757                         done
6758                 fi
6759         fi
6760
6761         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6762
6763 echo "${as_me:-configure}:6763: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6764
6765 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6766
6767 echo "${as_me:-configure}:6767: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6768
6769 cf_rpath_dst=
6770 for cf_rpath_src in $LDFLAGS
6771 do
6772         case $cf_rpath_src in #(vi
6773         -L*) #(vi
6774
6775                 # check if this refers to a directory which we will ignore
6776                 cf_rpath_skip=no
6777                 if test -n "$cf_rpath_list"
6778                 then
6779                         for cf_rpath_item in $cf_rpath_list
6780                         do
6781                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6782                                 then
6783                                         cf_rpath_skip=yes
6784                                         break
6785                                 fi
6786                         done
6787                 fi
6788
6789                 if test "$cf_rpath_skip" = no
6790                 then
6791                         # transform the option
6792                         if test "$LD_RPATH_OPT" = "-R " ; then
6793                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6794                         else
6795                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6796                         fi
6797
6798                         # if we have not already added this, add it now
6799                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6800                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6801                         then
6802                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6803
6804 echo "${as_me:-configure}:6804: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6805
6806                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6807                         fi
6808                 fi
6809                 ;;
6810         esac
6811         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6812 done
6813 LDFLAGS=$cf_rpath_dst
6814
6815 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6816
6817 echo "${as_me:-configure}:6817: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6818
6819 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6820
6821 echo "${as_me:-configure}:6821: testing ...checking LIBS $LIBS ..." 1>&5
6822
6823 cf_rpath_dst=
6824 for cf_rpath_src in $LIBS
6825 do
6826         case $cf_rpath_src in #(vi
6827         -L*) #(vi
6828
6829                 # check if this refers to a directory which we will ignore
6830                 cf_rpath_skip=no
6831                 if test -n "$cf_rpath_list"
6832                 then
6833                         for cf_rpath_item in $cf_rpath_list
6834                         do
6835                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6836                                 then
6837                                         cf_rpath_skip=yes
6838                                         break
6839                                 fi
6840                         done
6841                 fi
6842
6843                 if test "$cf_rpath_skip" = no
6844                 then
6845                         # transform the option
6846                         if test "$LD_RPATH_OPT" = "-R " ; then
6847                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6848                         else
6849                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6850                         fi
6851
6852                         # if we have not already added this, add it now
6853                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6854                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6855                         then
6856                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6857
6858 echo "${as_me:-configure}:6858: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6859
6860                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6861                         fi
6862                 fi
6863                 ;;
6864         esac
6865         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6866 done
6867 LIBS=$cf_rpath_dst
6868
6869 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6870
6871 echo "${as_me:-configure}:6871: testing ...checked LIBS $LIBS ..." 1>&5
6872
6873         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6874
6875 echo "${as_me:-configure}:6875: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6876
6877 else
6878         echo "$as_me:6878: result: no" >&5
6879 echo "${ECHO_T}no" >&6
6880 fi
6881
6882 fi
6883
6884 fi
6885
6886 ###############################################################################
6887
6888 ###     use option --disable-overwrite to leave out the link to -lcurses
6889 echo "$as_me:6889: checking if you wish to install ncurses overwriting curses" >&5
6890 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6891
6892 # Check whether --enable-overwrite or --disable-overwrite was given.
6893 if test "${enable_overwrite+set}" = set; then
6894   enableval="$enable_overwrite"
6895   with_overwrite=$enableval
6896 else
6897   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6898 fi;
6899 echo "$as_me:6899: result: $with_overwrite" >&5
6900 echo "${ECHO_T}$with_overwrite" >&6
6901
6902 echo "$as_me:6902: checking if external terminfo-database is used" >&5
6903 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6904
6905 # Check whether --enable-database or --disable-database was given.
6906 if test "${enable_database+set}" = set; then
6907   enableval="$enable_database"
6908   use_database=$enableval
6909 else
6910   use_database=yes
6911 fi;
6912 echo "$as_me:6912: result: $use_database" >&5
6913 echo "${ECHO_T}$use_database" >&6
6914
6915 case $host_os in #(vi
6916 os2*) #(vi
6917         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6918         ;;
6919 *) #(vi
6920         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6921         ;;
6922 esac
6923
6924 NCURSES_USE_DATABASE=0
6925 if test "$use_database" != no ; then
6926         NCURSES_USE_DATABASE=1
6927
6928         echo "$as_me:6928: checking which terminfo source-file will be installed" >&5
6929 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6930
6931 # Check whether --with-database or --without-database was given.
6932 if test "${with_database+set}" = set; then
6933   withval="$with_database"
6934   TERMINFO_SRC=$withval
6935 fi;
6936         echo "$as_me:6936: result: $TERMINFO_SRC" >&5
6937 echo "${ECHO_T}$TERMINFO_SRC" >&6
6938
6939         echo "$as_me:6939: checking whether to use hashed database instead of directory/tree" >&5
6940 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6941
6942 # Check whether --with-hashed-db or --without-hashed-db was given.
6943 if test "${with_hashed_db+set}" = set; then
6944   withval="$with_hashed_db"
6945
6946 else
6947   with_hashed_db=no
6948 fi;
6949         echo "$as_me:6949: result: $with_hashed_db" >&5
6950 echo "${ECHO_T}$with_hashed_db" >&6
6951 else
6952         with_hashed_db=no
6953 fi
6954
6955 echo "$as_me:6955: checking for list of fallback descriptions" >&5
6956 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6957
6958 # Check whether --with-fallbacks or --without-fallbacks was given.
6959 if test "${with_fallbacks+set}" = set; then
6960   withval="$with_fallbacks"
6961   with_fallback=$withval
6962 else
6963   with_fallback=
6964 fi;
6965 echo "$as_me:6965: result: $with_fallback" >&5
6966 echo "${ECHO_T}$with_fallback" >&6
6967 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6968
6969 echo "$as_me:6969: checking if you want modern xterm or antique" >&5
6970 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6971
6972 # Check whether --with-xterm-new or --without-xterm-new was given.
6973 if test "${with_xterm_new+set}" = set; then
6974   withval="$with_xterm_new"
6975   with_xterm_new=$withval
6976 else
6977   with_xterm_new=yes
6978 fi;
6979 case $with_xterm_new in
6980 no)     with_xterm_new=xterm-old;;
6981 *)      with_xterm_new=xterm-new;;
6982 esac
6983 echo "$as_me:6983: result: $with_xterm_new" >&5
6984 echo "${ECHO_T}$with_xterm_new" >&6
6985 WHICH_XTERM=$with_xterm_new
6986
6987 echo "$as_me:6987: checking if xterm backspace sends BS or DEL" >&5
6988 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6989
6990 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6991 if test "${with_xterm_kbs+set}" = set; then
6992   withval="$with_xterm_kbs"
6993   with_xterm_kbs=$withval
6994 else
6995   with_xterm_kbs=BS
6996 fi;
6997 case x$with_xterm_kbs in
6998 xyes|xno|xBS|xbs|x8)
6999         with_xterm_kbs=BS
7000         ;;
7001 xDEL|xdel|x127)
7002         with_xterm_kbs=DEL
7003         ;;
7004 *)
7005         with_xterm_kbs=$withval
7006         ;;
7007 esac
7008 echo "$as_me:7008: result: $with_xterm_kbs" >&5
7009 echo "${ECHO_T}$with_xterm_kbs" >&6
7010 XTERM_KBS=$with_xterm_kbs
7011
7012 MAKE_TERMINFO=
7013 if test "$use_database" = no ; then
7014         TERMINFO="${datadir}/terminfo"
7015         MAKE_TERMINFO="#"
7016 else
7017
7018 echo "$as_me:7018: checking for list of terminfo directories" >&5
7019 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7020
7021 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7022 if test "${with_terminfo_dirs+set}" = set; then
7023   withval="$with_terminfo_dirs"
7024
7025 else
7026   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7027 fi;
7028 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7029 cf_dst_path=
7030 for cf_src_path in $withval
7031 do
7032
7033 if test "x$prefix" != xNONE; then
7034   cf_path_syntax="$prefix"
7035 else
7036   cf_path_syntax="$ac_default_prefix"
7037 fi
7038
7039 case ".$cf_src_path" in #(vi
7040 .\$\(*\)*|.\'*\'*) #(vi
7041   ;;
7042 ..|./*|.\\*) #(vi
7043   ;;
7044 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7045   ;;
7046 .\${*prefix}*|.\${*dir}*) #(vi
7047   eval cf_src_path="$cf_src_path"
7048   case ".$cf_src_path" in #(vi
7049   .NONE/*)
7050     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7051     ;;
7052   esac
7053   ;; #(vi
7054 .no|.NONE/*)
7055   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7056   ;;
7057 *)
7058   { { echo "$as_me:7058: error: expected a pathname, not \"$cf_src_path\"" >&5
7059 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7060    { (exit 1); exit 1; }; }
7061   ;;
7062 esac
7063
7064   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7065   cf_dst_path="${cf_dst_path}${cf_src_path}"
7066 done
7067 IFS="$ac_save_ifs"
7068
7069 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7070 # so we have to check/work around.  We do prefer the result of "eval"...
7071 eval cf_dst_eval="$cf_dst_path"
7072 case "x$cf_dst_eval" in #(vi
7073 xNONE*) #(vi
7074         TERMINFO_DIRS=$cf_dst_path
7075         ;;
7076 *)
7077         TERMINFO_DIRS="$cf_dst_eval"
7078         ;;
7079 esac
7080
7081 echo "$as_me:7081: result: $TERMINFO_DIRS" >&5
7082 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7083 test -n "$TERMINFO_DIRS" &&
7084 cat >>confdefs.h <<EOF
7085 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7086 EOF
7087
7088 echo "$as_me:7088: checking for default terminfo directory" >&5
7089 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7090
7091 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7092 if test "${with_default_terminfo_dir+set}" = set; then
7093   withval="$with_default_terminfo_dir"
7094
7095 else
7096   withval="${TERMINFO:-${datadir}/terminfo}"
7097 fi; if test -n "${datadir}/terminfo" ; then
7098
7099 if test "x$prefix" != xNONE; then
7100   cf_path_syntax="$prefix"
7101 else
7102   cf_path_syntax="$ac_default_prefix"
7103 fi
7104
7105 case ".$withval" in #(vi
7106 .\$\(*\)*|.\'*\'*) #(vi
7107   ;;
7108 ..|./*|.\\*) #(vi
7109   ;;
7110 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7111   ;;
7112 .\${*prefix}*|.\${*dir}*) #(vi
7113   eval withval="$withval"
7114   case ".$withval" in #(vi
7115   .NONE/*)
7116     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7117     ;;
7118   esac
7119   ;; #(vi
7120 .no|.NONE/*)
7121   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7122   ;;
7123 *)
7124   { { echo "$as_me:7124: error: expected a pathname, not \"$withval\"" >&5
7125 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7126    { (exit 1); exit 1; }; }
7127   ;;
7128 esac
7129
7130 fi
7131 eval TERMINFO="$withval"
7132
7133 echo "$as_me:7133: result: $TERMINFO" >&5
7134 echo "${ECHO_T}$TERMINFO" >&6
7135
7136 cat >>confdefs.h <<EOF
7137 #define TERMINFO "$TERMINFO"
7138 EOF
7139
7140 fi
7141
7142 ###     use option --disable-big-core to make tic run on small machines
7143 ###     We need 4Mb, check if we can allocate 50% more than that.
7144 echo "$as_me:7144: checking if big-core option selected" >&5
7145 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7146
7147 # Check whether --enable-big-core or --disable-big-core was given.
7148 if test "${enable_big_core+set}" = set; then
7149   enableval="$enable_big_core"
7150   with_big_core=$enableval
7151 else
7152   if test "$cross_compiling" = yes; then
7153   with_big_core=no
7154 else
7155   cat >conftest.$ac_ext <<_ACEOF
7156 #line 7156 "configure"
7157 #include "confdefs.h"
7158
7159 #include <stdlib.h>
7160 #include <string.h>
7161 int main() {
7162         unsigned long n = 6000000L;
7163         char *s = malloc(n);
7164         if (s != 0)
7165                 s[0] = s[n-1] = 0;
7166         ${cf_cv_main_return:-return}(s == 0);
7167 }
7168 _ACEOF
7169 rm -f conftest$ac_exeext
7170 if { (eval echo "$as_me:7170: \"$ac_link\"") >&5
7171   (eval $ac_link) 2>&5
7172   ac_status=$?
7173   echo "$as_me:7173: \$? = $ac_status" >&5
7174   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7175   { (eval echo "$as_me:7175: \"$ac_try\"") >&5
7176   (eval $ac_try) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit $ac_status); }; }; then
7180   with_big_core=yes
7181 else
7182   echo "$as_me: program exited with status $ac_status" >&5
7183 echo "$as_me: failed program was:" >&5
7184 cat conftest.$ac_ext >&5
7185 with_big_core=no
7186 fi
7187 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7188 fi
7189 fi;
7190 echo "$as_me:7190: result: $with_big_core" >&5
7191 echo "${ECHO_T}$with_big_core" >&6
7192 test "x$with_big_core" = "xyes" &&
7193 cat >>confdefs.h <<\EOF
7194 #define HAVE_BIG_CORE 1
7195 EOF
7196
7197 ### ISO C only guarantees 512-char strings, we have tables which load faster
7198 ### when constructed using "big" strings.  More than the C compiler, the awk
7199 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7200 echo "$as_me:7200: checking if big-strings option selected" >&5
7201 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7202
7203 # Check whether --enable-big-strings or --disable-big-strings was given.
7204 if test "${enable_big_strings+set}" = set; then
7205   enableval="$enable_big_strings"
7206   with_big_strings=$enableval
7207 else
7208
7209         case x$AWK in #(vi
7210         x)
7211                 eval with_big_strings=no
7212                 ;;
7213         *) #(vi
7214                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7215                         | $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
7216                         eval with_big_strings=yes
7217                 else
7218                         eval with_big_strings=no
7219                 fi
7220                 ;;
7221         esac
7222
7223 fi;
7224 echo "$as_me:7224: result: $with_big_strings" >&5
7225 echo "${ECHO_T}$with_big_strings" >&6
7226
7227 USE_BIG_STRINGS=0
7228 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7229
7230 ###     use option --enable-termcap to compile in the termcap fallback support
7231 echo "$as_me:7231: checking if you want termcap-fallback support" >&5
7232 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7233
7234 # Check whether --enable-termcap or --disable-termcap was given.
7235 if test "${enable_termcap+set}" = set; then
7236   enableval="$enable_termcap"
7237   with_termcap=$enableval
7238 else
7239   with_termcap=no
7240 fi;
7241 echo "$as_me:7241: result: $with_termcap" >&5
7242 echo "${ECHO_T}$with_termcap" >&6
7243
7244 NCURSES_USE_TERMCAP=0
7245 if test "x$with_termcap" != "xyes" ; then
7246         if test "$use_database" = no ; then
7247                 if test -z "$with_fallback" ; then
7248                         { { echo "$as_me:7248: error: You have disabled the database w/o specifying fallbacks" >&5
7249 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7250    { (exit 1); exit 1; }; }
7251                 fi
7252         fi
7253
7254 cat >>confdefs.h <<\EOF
7255 #define PURE_TERMINFO 1
7256 EOF
7257
7258 else
7259
7260         if test "$with_ticlib" != no ; then
7261                 { { echo "$as_me:7261: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7262 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7263    { (exit 1); exit 1; }; }
7264         fi
7265
7266         NCURSES_USE_TERMCAP=1
7267         echo "$as_me:7267: checking for list of termcap files" >&5
7268 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7269
7270 # Check whether --with-termpath or --without-termpath was given.
7271 if test "${with_termpath+set}" = set; then
7272   withval="$with_termpath"
7273
7274 else
7275   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7276 fi;
7277 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7278 cf_dst_path=
7279 for cf_src_path in $withval
7280 do
7281
7282 if test "x$prefix" != xNONE; then
7283   cf_path_syntax="$prefix"
7284 else
7285   cf_path_syntax="$ac_default_prefix"
7286 fi
7287
7288 case ".$cf_src_path" in #(vi
7289 .\$\(*\)*|.\'*\'*) #(vi
7290   ;;
7291 ..|./*|.\\*) #(vi
7292   ;;
7293 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7294   ;;
7295 .\${*prefix}*|.\${*dir}*) #(vi
7296   eval cf_src_path="$cf_src_path"
7297   case ".$cf_src_path" in #(vi
7298   .NONE/*)
7299     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7300     ;;
7301   esac
7302   ;; #(vi
7303 .no|.NONE/*)
7304   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7305   ;;
7306 *)
7307   { { echo "$as_me:7307: error: expected a pathname, not \"$cf_src_path\"" >&5
7308 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7309    { (exit 1); exit 1; }; }
7310   ;;
7311 esac
7312
7313   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7314   cf_dst_path="${cf_dst_path}${cf_src_path}"
7315 done
7316 IFS="$ac_save_ifs"
7317
7318 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7319 # so we have to check/work around.  We do prefer the result of "eval"...
7320 eval cf_dst_eval="$cf_dst_path"
7321 case "x$cf_dst_eval" in #(vi
7322 xNONE*) #(vi
7323         TERMPATH=$cf_dst_path
7324         ;;
7325 *)
7326         TERMPATH="$cf_dst_eval"
7327         ;;
7328 esac
7329
7330         echo "$as_me:7330: result: $TERMPATH" >&5
7331 echo "${ECHO_T}$TERMPATH" >&6
7332         test -n "$TERMPATH" &&
7333 cat >>confdefs.h <<EOF
7334 #define TERMPATH "$TERMPATH"
7335 EOF
7336
7337         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7338         echo "$as_me:7338: checking if fast termcap-loader is needed" >&5
7339 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7340
7341 # Check whether --enable-getcap or --disable-getcap was given.
7342 if test "${enable_getcap+set}" = set; then
7343   enableval="$enable_getcap"
7344   with_getcap=$enableval
7345 else
7346   with_getcap=no
7347 fi;
7348         echo "$as_me:7348: result: $with_getcap" >&5
7349 echo "${ECHO_T}$with_getcap" >&6
7350         test "x$with_getcap" = "xyes" &&
7351 cat >>confdefs.h <<\EOF
7352 #define USE_GETCAP 1
7353 EOF
7354
7355         echo "$as_me:7355: checking if translated termcaps will be cached in ~/.terminfo" >&5
7356 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7357
7358 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7359 if test "${enable_getcap_cache+set}" = set; then
7360   enableval="$enable_getcap_cache"
7361   with_getcap_cache=$enableval
7362 else
7363   with_getcap_cache=no
7364 fi;
7365         echo "$as_me:7365: result: $with_getcap_cache" >&5
7366 echo "${ECHO_T}$with_getcap_cache" >&6
7367         test "x$with_getcap_cache" = "xyes" &&
7368 cat >>confdefs.h <<\EOF
7369 #define USE_GETCAP_CACHE 1
7370 EOF
7371
7372 fi
7373
7374 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7375 echo "$as_me:7375: checking if ~/.terminfo is wanted" >&5
7376 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7377
7378 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7379 if test "${enable_home_terminfo+set}" = set; then
7380   enableval="$enable_home_terminfo"
7381   with_home_terminfo=$enableval
7382 else
7383   with_home_terminfo=yes
7384 fi;
7385 echo "$as_me:7385: result: $with_home_terminfo" >&5
7386 echo "${ECHO_T}$with_home_terminfo" >&6
7387 test "x$with_home_terminfo" = "xyes" &&
7388 cat >>confdefs.h <<\EOF
7389 #define USE_HOME_TERMINFO 1
7390 EOF
7391
7392 echo "$as_me:7392: checking if you want to use restricted environment when running as root" >&5
7393 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7394
7395 # Check whether --enable-root-environ or --disable-root-environ was given.
7396 if test "${enable_root_environ+set}" = set; then
7397   enableval="$enable_root_environ"
7398   with_root_environ=$enableval
7399 else
7400   with_root_environ=yes
7401 fi;
7402 echo "$as_me:7402: result: $with_root_environ" >&5
7403 echo "${ECHO_T}$with_root_environ" >&6
7404 test "x$with_root_environ" = xyes &&
7405 cat >>confdefs.h <<\EOF
7406 #define USE_ROOT_ENVIRON 1
7407 EOF
7408
7409 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7410 ###   to reduce storage requirements for the terminfo database.
7411
7412 for ac_func in \
7413         remove \
7414         unlink
7415 do
7416 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7417 echo "$as_me:7417: checking for $ac_func" >&5
7418 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7419 if eval "test \"\${$as_ac_var+set}\" = set"; then
7420   echo $ECHO_N "(cached) $ECHO_C" >&6
7421 else
7422   cat >conftest.$ac_ext <<_ACEOF
7423 #line 7423 "configure"
7424 #include "confdefs.h"
7425 /* System header to define __stub macros and hopefully few prototypes,
7426     which can conflict with char $ac_func (); below.  */
7427 #include <assert.h>
7428 /* Override any gcc2 internal prototype to avoid an error.  */
7429 #ifdef __cplusplus
7430 extern "C"
7431 #endif
7432 /* We use char because int might match the return type of a gcc2
7433    builtin and then its argument prototype would still apply.  */
7434 char $ac_func ();
7435 char (*f) ();
7436
7437 int
7438 main ()
7439 {
7440 /* The GNU C library defines this for functions which it implements
7441     to always fail with ENOSYS.  Some functions are actually named
7442     something starting with __ and the normal name is an alias.  */
7443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7444 choke me
7445 #else
7446 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7447 #endif
7448
7449   ;
7450   return 0;
7451 }
7452 _ACEOF
7453 rm -f conftest.$ac_objext conftest$ac_exeext
7454 if { (eval echo "$as_me:7454: \"$ac_link\"") >&5
7455   (eval $ac_link) 2>&5
7456   ac_status=$?
7457   echo "$as_me:7457: \$? = $ac_status" >&5
7458   (exit $ac_status); } &&
7459          { ac_try='test -s conftest$ac_exeext'
7460   { (eval echo "$as_me:7460: \"$ac_try\"") >&5
7461   (eval $ac_try) 2>&5
7462   ac_status=$?
7463   echo "$as_me:7463: \$? = $ac_status" >&5
7464   (exit $ac_status); }; }; then
7465   eval "$as_ac_var=yes"
7466 else
7467   echo "$as_me: failed program was:" >&5
7468 cat conftest.$ac_ext >&5
7469 eval "$as_ac_var=no"
7470 fi
7471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7472 fi
7473 echo "$as_me:7473: result: `eval echo '${'$as_ac_var'}'`" >&5
7474 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7475 if test `eval echo '${'$as_ac_var'}'` = yes; then
7476   cat >>confdefs.h <<EOF
7477 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7478 EOF
7479
7480 fi
7481 done
7482
7483 if test "$cross_compiling" = yes ; then
7484
7485 for ac_func in \
7486                 link \
7487                 symlink
7488 do
7489 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7490 echo "$as_me:7490: checking for $ac_func" >&5
7491 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7492 if eval "test \"\${$as_ac_var+set}\" = set"; then
7493   echo $ECHO_N "(cached) $ECHO_C" >&6
7494 else
7495   cat >conftest.$ac_ext <<_ACEOF
7496 #line 7496 "configure"
7497 #include "confdefs.h"
7498 /* System header to define __stub macros and hopefully few prototypes,
7499     which can conflict with char $ac_func (); below.  */
7500 #include <assert.h>
7501 /* Override any gcc2 internal prototype to avoid an error.  */
7502 #ifdef __cplusplus
7503 extern "C"
7504 #endif
7505 /* We use char because int might match the return type of a gcc2
7506    builtin and then its argument prototype would still apply.  */
7507 char $ac_func ();
7508 char (*f) ();
7509
7510 int
7511 main ()
7512 {
7513 /* The GNU C library defines this for functions which it implements
7514     to always fail with ENOSYS.  Some functions are actually named
7515     something starting with __ and the normal name is an alias.  */
7516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7517 choke me
7518 #else
7519 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7520 #endif
7521
7522   ;
7523   return 0;
7524 }
7525 _ACEOF
7526 rm -f conftest.$ac_objext conftest$ac_exeext
7527 if { (eval echo "$as_me:7527: \"$ac_link\"") >&5
7528   (eval $ac_link) 2>&5
7529   ac_status=$?
7530   echo "$as_me:7530: \$? = $ac_status" >&5
7531   (exit $ac_status); } &&
7532          { ac_try='test -s conftest$ac_exeext'
7533   { (eval echo "$as_me:7533: \"$ac_try\"") >&5
7534   (eval $ac_try) 2>&5
7535   ac_status=$?
7536   echo "$as_me:7536: \$? = $ac_status" >&5
7537   (exit $ac_status); }; }; then
7538   eval "$as_ac_var=yes"
7539 else
7540   echo "$as_me: failed program was:" >&5
7541 cat conftest.$ac_ext >&5
7542 eval "$as_ac_var=no"
7543 fi
7544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7545 fi
7546 echo "$as_me:7546: result: `eval echo '${'$as_ac_var'}'`" >&5
7547 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7548 if test `eval echo '${'$as_ac_var'}'` = yes; then
7549   cat >>confdefs.h <<EOF
7550 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7551 EOF
7552
7553 fi
7554 done
7555
7556 else
7557         echo "$as_me:7557: checking if link/symlink functions work" >&5
7558 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7559 if test "${cf_cv_link_funcs+set}" = set; then
7560   echo $ECHO_N "(cached) $ECHO_C" >&6
7561 else
7562
7563                 cf_cv_link_funcs=
7564                 for cf_func in link symlink ; do
7565                         if test "$cross_compiling" = yes; then
7566
7567                         eval 'ac_cv_func_'$cf_func'=error'
7568 else
7569   cat >conftest.$ac_ext <<_ACEOF
7570 #line 7570 "configure"
7571 #include "confdefs.h"
7572
7573 #include <sys/types.h>
7574 #include <sys/stat.h>
7575 #ifdef HAVE_UNISTD_H
7576 #include <unistd.h>
7577 #endif
7578 int main()
7579 {
7580         int fail = 0;
7581         char *src = "config.log";
7582         char *dst = "conftest.chk";
7583         struct stat src_sb;
7584         struct stat dst_sb;
7585
7586         stat(src, &src_sb);
7587         fail = ($cf_func("config.log", "conftest.chk") < 0)
7588             || (stat(dst, &dst_sb) < 0)
7589             || (dst_sb.st_mtime != src_sb.st_mtime);
7590 #ifdef HAVE_UNLINK
7591         unlink(dst);
7592 #else
7593         remove(dst);
7594 #endif
7595         ${cf_cv_main_return:-return} (fail);
7596 }
7597
7598 _ACEOF
7599 rm -f conftest$ac_exeext
7600 if { (eval echo "$as_me:7600: \"$ac_link\"") >&5
7601   (eval $ac_link) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7605   { (eval echo "$as_me:7605: \"$ac_try\"") >&5
7606   (eval $ac_try) 2>&5
7607   ac_status=$?
7608   echo "$as_me:7608: \$? = $ac_status" >&5
7609   (exit $ac_status); }; }; then
7610
7611                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7612                         eval 'ac_cv_func_'$cf_func'=yes'
7613 else
7614   echo "$as_me: program exited with status $ac_status" >&5
7615 echo "$as_me: failed program was:" >&5
7616 cat conftest.$ac_ext >&5
7617
7618                         eval 'ac_cv_func_'$cf_func'=no'
7619 fi
7620 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7621 fi
7622                 done
7623                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7624
7625 fi
7626 echo "$as_me:7626: result: $cf_cv_link_funcs" >&5
7627 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7628         test "$ac_cv_func_link"    = yes &&
7629 cat >>confdefs.h <<\EOF
7630 #define HAVE_LINK 1
7631 EOF
7632
7633         test "$ac_cv_func_symlink" = yes &&
7634 cat >>confdefs.h <<\EOF
7635 #define HAVE_SYMLINK 1
7636 EOF
7637
7638 fi
7639
7640 with_links=no
7641 with_symlinks=no
7642
7643 # soft links (symbolic links) are useful for some systems where hard links do
7644 # not work, or to make it simpler to copy terminfo trees around.
7645 if test "x$ac_cv_func_symlink" = xyes ; then
7646     echo "$as_me:7646: checking if tic should use symbolic links" >&5
7647 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7648
7649 # Check whether --enable-symlinks or --disable-symlinks was given.
7650 if test "${enable_symlinks+set}" = set; then
7651   enableval="$enable_symlinks"
7652   with_symlinks=$enableval
7653 else
7654   with_symlinks=no
7655 fi;
7656     echo "$as_me:7656: result: $with_symlinks" >&5
7657 echo "${ECHO_T}$with_symlinks" >&6
7658 fi
7659
7660 # If we have hard links and did not choose to use soft links instead, there is
7661 # no reason to make this choice optional - use the hard links.
7662 if test "$with_symlinks" = no ; then
7663     echo "$as_me:7663: checking if tic should use hard links" >&5
7664 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7665     if test "x$ac_cv_func_link" = xyes ; then
7666         with_links=yes
7667     else
7668         with_links=no
7669     fi
7670     echo "$as_me:7670: result: $with_links" >&5
7671 echo "${ECHO_T}$with_links" >&6
7672 fi
7673
7674 test "x$with_links" = xyes &&
7675 cat >>confdefs.h <<\EOF
7676 #define USE_LINKS 1
7677 EOF
7678
7679 test "x$with_symlinks" = xyes &&
7680 cat >>confdefs.h <<\EOF
7681 #define USE_SYMLINKS 1
7682 EOF
7683
7684 ###   use option --enable-broken-linker to force on use of broken-linker support
7685 echo "$as_me:7685: checking if you want broken-linker support code" >&5
7686 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7687
7688 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7689 if test "${enable_broken_linker+set}" = set; then
7690   enableval="$enable_broken_linker"
7691   with_broken_linker=$enableval
7692 else
7693   with_broken_linker=${BROKEN_LINKER:-no}
7694 fi;
7695 echo "$as_me:7695: result: $with_broken_linker" >&5
7696 echo "${ECHO_T}$with_broken_linker" >&6
7697
7698 BROKEN_LINKER=0
7699 if test "x$with_broken_linker" = xyes ; then
7700
7701 cat >>confdefs.h <<\EOF
7702 #define BROKEN_LINKER 1
7703 EOF
7704
7705         BROKEN_LINKER=1
7706 elif test "$DFT_LWR_MODEL" = shared ; then
7707         case $cf_cv_system_name in #(vi
7708         cygwin*)
7709
7710 cat >>confdefs.h <<\EOF
7711 #define BROKEN_LINKER 1
7712 EOF
7713
7714                 BROKEN_LINKER=1
7715                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7716
7717 echo "${as_me:-configure}:7717: testing cygwin linker is broken anyway ..." 1>&5
7718
7719                 ;;
7720         esac
7721 fi
7722
7723 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7724 echo "$as_me:7724: checking if tputs should process BSD-style prefix padding" >&5
7725 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7726
7727 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7728 if test "${enable_bsdpad+set}" = set; then
7729   enableval="$enable_bsdpad"
7730   with_bsdpad=$enableval
7731 else
7732   with_bsdpad=no
7733 fi;
7734 echo "$as_me:7734: result: $with_bsdpad" >&5
7735 echo "${ECHO_T}$with_bsdpad" >&6
7736 test "x$with_bsdpad" = xyes &&
7737 cat >>confdefs.h <<\EOF
7738 #define BSD_TPUTS 1
7739 EOF
7740
7741 ###   use option --enable-widec to turn on use of wide-character support
7742 NCURSES_CH_T=chtype
7743 NCURSES_LIBUTF8=0
7744
7745 NEED_WCHAR_H=0
7746 NCURSES_MBSTATE_T=0
7747 NCURSES_WCHAR_T=0
7748 NCURSES_WINT_T=0
7749
7750 # Check to define _XOPEN_SOURCE "automatically"
7751 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7752
7753 cf_XOPEN_SOURCE=500
7754 cf_POSIX_C_SOURCE=199506L
7755 cf_xopen_source=
7756
7757 case $host_os in #(vi
7758 aix[4-7]*) #(vi
7759         cf_xopen_source="-D_ALL_SOURCE"
7760         ;;
7761 cygwin|msys) #(vi
7762         cf_XOPEN_SOURCE=600
7763         ;;
7764 darwin[0-8].*) #(vi
7765         cf_xopen_source="-D_APPLE_C_SOURCE"
7766         ;;
7767 darwin*) #(vi
7768         cf_xopen_source="-D_DARWIN_C_SOURCE"
7769         cf_XOPEN_SOURCE=
7770         ;;
7771 freebsd*|dragonfly*) #(vi
7772         # 5.x headers associate
7773         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7774         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7775         cf_POSIX_C_SOURCE=200112L
7776         cf_XOPEN_SOURCE=600
7777         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7778         ;;
7779 hpux11*) #(vi
7780         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7781         ;;
7782 hpux*) #(vi
7783         cf_xopen_source="-D_HPUX_SOURCE"
7784         ;;
7785 irix[56].*) #(vi
7786         cf_xopen_source="-D_SGI_SOURCE"
7787         cf_XOPEN_SOURCE=
7788         ;;
7789 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7790
7791 echo "$as_me:7791: checking if we must define _GNU_SOURCE" >&5
7792 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7793 if test "${cf_cv_gnu_source+set}" = set; then
7794   echo $ECHO_N "(cached) $ECHO_C" >&6
7795 else
7796
7797 cat >conftest.$ac_ext <<_ACEOF
7798 #line 7798 "configure"
7799 #include "confdefs.h"
7800 #include <sys/types.h>
7801 int
7802 main ()
7803 {
7804
7805 #ifndef _XOPEN_SOURCE
7806 make an error
7807 #endif
7808   ;
7809   return 0;
7810 }
7811 _ACEOF
7812 rm -f conftest.$ac_objext
7813 if { (eval echo "$as_me:7813: \"$ac_compile\"") >&5
7814   (eval $ac_compile) 2>&5
7815   ac_status=$?
7816   echo "$as_me:7816: \$? = $ac_status" >&5
7817   (exit $ac_status); } &&
7818          { ac_try='test -s conftest.$ac_objext'
7819   { (eval echo "$as_me:7819: \"$ac_try\"") >&5
7820   (eval $ac_try) 2>&5
7821   ac_status=$?
7822   echo "$as_me:7822: \$? = $ac_status" >&5
7823   (exit $ac_status); }; }; then
7824   cf_cv_gnu_source=no
7825 else
7826   echo "$as_me: failed program was:" >&5
7827 cat conftest.$ac_ext >&5
7828 cf_save="$CPPFLAGS"
7829          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7830          cat >conftest.$ac_ext <<_ACEOF
7831 #line 7831 "configure"
7832 #include "confdefs.h"
7833 #include <sys/types.h>
7834 int
7835 main ()
7836 {
7837
7838 #ifdef _XOPEN_SOURCE
7839 make an error
7840 #endif
7841   ;
7842   return 0;
7843 }
7844 _ACEOF
7845 rm -f conftest.$ac_objext
7846 if { (eval echo "$as_me:7846: \"$ac_compile\"") >&5
7847   (eval $ac_compile) 2>&5
7848   ac_status=$?
7849   echo "$as_me:7849: \$? = $ac_status" >&5
7850   (exit $ac_status); } &&
7851          { ac_try='test -s conftest.$ac_objext'
7852   { (eval echo "$as_me:7852: \"$ac_try\"") >&5
7853   (eval $ac_try) 2>&5
7854   ac_status=$?
7855   echo "$as_me:7855: \$? = $ac_status" >&5
7856   (exit $ac_status); }; }; then
7857   cf_cv_gnu_source=no
7858 else
7859   echo "$as_me: failed program was:" >&5
7860 cat conftest.$ac_ext >&5
7861 cf_cv_gnu_source=yes
7862 fi
7863 rm -f conftest.$ac_objext conftest.$ac_ext
7864         CPPFLAGS="$cf_save"
7865
7866 fi
7867 rm -f conftest.$ac_objext conftest.$ac_ext
7868
7869 fi
7870 echo "$as_me:7870: result: $cf_cv_gnu_source" >&5
7871 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7872 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7873
7874         ;;
7875 minix*) #(vi
7876         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7877         ;;
7878 mirbsd*) #(vi
7879         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7880         cf_XOPEN_SOURCE=
7881
7882 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7883
7884 cf_save_CFLAGS="$CFLAGS"
7885 cf_save_CPPFLAGS="$CPPFLAGS"
7886
7887 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7888         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7889                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7890
7891 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7892         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7893                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7894
7895 echo "$as_me:7895: checking if we should define _POSIX_C_SOURCE" >&5
7896 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7897 if test "${cf_cv_posix_c_source+set}" = set; then
7898   echo $ECHO_N "(cached) $ECHO_C" >&6
7899 else
7900
7901 echo "${as_me:-configure}:7901: testing if the symbol is already defined go no further ..." 1>&5
7902
7903         cat >conftest.$ac_ext <<_ACEOF
7904 #line 7904 "configure"
7905 #include "confdefs.h"
7906 #include <sys/types.h>
7907 int
7908 main ()
7909 {
7910
7911 #ifndef _POSIX_C_SOURCE
7912 make an error
7913 #endif
7914   ;
7915   return 0;
7916 }
7917 _ACEOF
7918 rm -f conftest.$ac_objext
7919 if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
7920   (eval $ac_compile) 2>&5
7921   ac_status=$?
7922   echo "$as_me:7922: \$? = $ac_status" >&5
7923   (exit $ac_status); } &&
7924          { ac_try='test -s conftest.$ac_objext'
7925   { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:7928: \$? = $ac_status" >&5
7929   (exit $ac_status); }; }; then
7930   cf_cv_posix_c_source=no
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934 cf_want_posix_source=no
7935          case .$cf_POSIX_C_SOURCE in #(vi
7936          .[12]??*) #(vi
7937                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7938                 ;;
7939          .2) #(vi
7940                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7941                 cf_want_posix_source=yes
7942                 ;;
7943          .*)
7944                 cf_want_posix_source=yes
7945                 ;;
7946          esac
7947          if test "$cf_want_posix_source" = yes ; then
7948                 cat >conftest.$ac_ext <<_ACEOF
7949 #line 7949 "configure"
7950 #include "confdefs.h"
7951 #include <sys/types.h>
7952 int
7953 main ()
7954 {
7955
7956 #ifdef _POSIX_SOURCE
7957 make an error
7958 #endif
7959   ;
7960   return 0;
7961 }
7962 _ACEOF
7963 rm -f conftest.$ac_objext
7964 if { (eval echo "$as_me:7964: \"$ac_compile\"") >&5
7965   (eval $ac_compile) 2>&5
7966   ac_status=$?
7967   echo "$as_me:7967: \$? = $ac_status" >&5
7968   (exit $ac_status); } &&
7969          { ac_try='test -s conftest.$ac_objext'
7970   { (eval echo "$as_me:7970: \"$ac_try\"") >&5
7971   (eval $ac_try) 2>&5
7972   ac_status=$?
7973   echo "$as_me:7973: \$? = $ac_status" >&5
7974   (exit $ac_status); }; }; then
7975   :
7976 else
7977   echo "$as_me: failed program was:" >&5
7978 cat conftest.$ac_ext >&5
7979 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7980 fi
7981 rm -f conftest.$ac_objext conftest.$ac_ext
7982          fi
7983
7984 echo "${as_me:-configure}:7984: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7985
7986          CFLAGS="$cf_trim_CFLAGS"
7987          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7988
7989 echo "${as_me:-configure}:7989: testing if the second compile does not leave our definition intact error ..." 1>&5
7990
7991          cat >conftest.$ac_ext <<_ACEOF
7992 #line 7992 "configure"
7993 #include "confdefs.h"
7994 #include <sys/types.h>
7995 int
7996 main ()
7997 {
7998
7999 #ifndef _POSIX_C_SOURCE
8000 make an error
8001 #endif
8002   ;
8003   return 0;
8004 }
8005 _ACEOF
8006 rm -f conftest.$ac_objext
8007 if { (eval echo "$as_me:8007: \"$ac_compile\"") >&5
8008   (eval $ac_compile) 2>&5
8009   ac_status=$?
8010   echo "$as_me:8010: \$? = $ac_status" >&5
8011   (exit $ac_status); } &&
8012          { ac_try='test -s conftest.$ac_objext'
8013   { (eval echo "$as_me:8013: \"$ac_try\"") >&5
8014   (eval $ac_try) 2>&5
8015   ac_status=$?
8016   echo "$as_me:8016: \$? = $ac_status" >&5
8017   (exit $ac_status); }; }; then
8018   :
8019 else
8020   echo "$as_me: failed program was:" >&5
8021 cat conftest.$ac_ext >&5
8022 cf_cv_posix_c_source=no
8023 fi
8024 rm -f conftest.$ac_objext conftest.$ac_ext
8025          CFLAGS="$cf_save_CFLAGS"
8026          CPPFLAGS="$cf_save_CPPFLAGS"
8027
8028 fi
8029 rm -f conftest.$ac_objext conftest.$ac_ext
8030
8031 fi
8032 echo "$as_me:8032: result: $cf_cv_posix_c_source" >&5
8033 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8034
8035 if test "$cf_cv_posix_c_source" != no ; then
8036         CFLAGS="$cf_trim_CFLAGS"
8037         CPPFLAGS="$cf_trim_CPPFLAGS"
8038
8039 cf_fix_cppflags=no
8040 cf_new_cflags=
8041 cf_new_cppflags=
8042 cf_new_extra_cppflags=
8043
8044 for cf_add_cflags in $cf_cv_posix_c_source
8045 do
8046 case $cf_fix_cppflags in
8047 no)
8048         case $cf_add_cflags in #(vi
8049         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8050                 case $cf_add_cflags in
8051                 -D*)
8052                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8053
8054                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8055                                 && test -z "${cf_tst_cflags}" \
8056                                 && cf_fix_cppflags=yes
8057
8058                         if test $cf_fix_cppflags = yes ; then
8059                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8060                                 continue
8061                         elif test "${cf_tst_cflags}" = "\"'" ; then
8062                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8063                                 continue
8064                         fi
8065                         ;;
8066                 esac
8067                 case "$CPPFLAGS" in
8068                 *$cf_add_cflags) #(vi
8069                         ;;
8070                 *) #(vi
8071                         case $cf_add_cflags in #(vi
8072                         -D*)
8073                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8074
8075 CPPFLAGS=`echo "$CPPFLAGS" | \
8076         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8077                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8078
8079                                 ;;
8080                         esac
8081                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8082                         ;;
8083                 esac
8084                 ;;
8085         *)
8086                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8087                 ;;
8088         esac
8089         ;;
8090 yes)
8091         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8092
8093         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8094
8095         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8096                 && test -z "${cf_tst_cflags}" \
8097                 && cf_fix_cppflags=no
8098         ;;
8099 esac
8100 done
8101
8102 if test -n "$cf_new_cflags" ; then
8103
8104         CFLAGS="$CFLAGS $cf_new_cflags"
8105 fi
8106
8107 if test -n "$cf_new_cppflags" ; then
8108
8109         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8110 fi
8111
8112 if test -n "$cf_new_extra_cppflags" ; then
8113
8114         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8115 fi
8116
8117 fi
8118
8119         ;;
8120 netbsd*) #(vi
8121         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8122         ;;
8123 openbsd[4-9]*) #(vi
8124         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8125         cf_xopen_source="-D_BSD_SOURCE"
8126         cf_XOPEN_SOURCE=600
8127         ;;
8128 openbsd*) #(vi
8129         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8130         ;;
8131 osf[45]*) #(vi
8132         cf_xopen_source="-D_OSF_SOURCE"
8133         ;;
8134 nto-qnx*) #(vi
8135         cf_xopen_source="-D_QNX_SOURCE"
8136         ;;
8137 sco*) #(vi
8138         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8139         ;;
8140 solaris2.*) #(vi
8141         cf_xopen_source="-D__EXTENSIONS__"
8142         cf_cv_xopen_source=broken
8143         ;;
8144 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8145         cf_XOPEN_SOURCE=
8146         cf_POSIX_C_SOURCE=
8147         ;;
8148 *)
8149
8150 echo "$as_me:8150: checking if we should define _XOPEN_SOURCE" >&5
8151 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8152 if test "${cf_cv_xopen_source+set}" = set; then
8153   echo $ECHO_N "(cached) $ECHO_C" >&6
8154 else
8155
8156         cat >conftest.$ac_ext <<_ACEOF
8157 #line 8157 "configure"
8158 #include "confdefs.h"
8159
8160 #include <stdlib.h>
8161 #include <string.h>
8162 #include <sys/types.h>
8163
8164 int
8165 main ()
8166 {
8167
8168 #ifndef _XOPEN_SOURCE
8169 make an error
8170 #endif
8171   ;
8172   return 0;
8173 }
8174 _ACEOF
8175 rm -f conftest.$ac_objext
8176 if { (eval echo "$as_me:8176: \"$ac_compile\"") >&5
8177   (eval $ac_compile) 2>&5
8178   ac_status=$?
8179   echo "$as_me:8179: \$? = $ac_status" >&5
8180   (exit $ac_status); } &&
8181          { ac_try='test -s conftest.$ac_objext'
8182   { (eval echo "$as_me:8182: \"$ac_try\"") >&5
8183   (eval $ac_try) 2>&5
8184   ac_status=$?
8185   echo "$as_me:8185: \$? = $ac_status" >&5
8186   (exit $ac_status); }; }; then
8187   cf_cv_xopen_source=no
8188 else
8189   echo "$as_me: failed program was:" >&5
8190 cat conftest.$ac_ext >&5
8191 cf_save="$CPPFLAGS"
8192          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8193          cat >conftest.$ac_ext <<_ACEOF
8194 #line 8194 "configure"
8195 #include "confdefs.h"
8196
8197 #include <stdlib.h>
8198 #include <string.h>
8199 #include <sys/types.h>
8200
8201 int
8202 main ()
8203 {
8204
8205 #ifdef _XOPEN_SOURCE
8206 make an error
8207 #endif
8208   ;
8209   return 0;
8210 }
8211 _ACEOF
8212 rm -f conftest.$ac_objext
8213 if { (eval echo "$as_me:8213: \"$ac_compile\"") >&5
8214   (eval $ac_compile) 2>&5
8215   ac_status=$?
8216   echo "$as_me:8216: \$? = $ac_status" >&5
8217   (exit $ac_status); } &&
8218          { ac_try='test -s conftest.$ac_objext'
8219   { (eval echo "$as_me:8219: \"$ac_try\"") >&5
8220   (eval $ac_try) 2>&5
8221   ac_status=$?
8222   echo "$as_me:8222: \$? = $ac_status" >&5
8223   (exit $ac_status); }; }; then
8224   cf_cv_xopen_source=no
8225 else
8226   echo "$as_me: failed program was:" >&5
8227 cat conftest.$ac_ext >&5
8228 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8229 fi
8230 rm -f conftest.$ac_objext conftest.$ac_ext
8231         CPPFLAGS="$cf_save"
8232
8233 fi
8234 rm -f conftest.$ac_objext conftest.$ac_ext
8235
8236 fi
8237 echo "$as_me:8237: result: $cf_cv_xopen_source" >&5
8238 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8239
8240 if test "$cf_cv_xopen_source" != no ; then
8241
8242 CFLAGS=`echo "$CFLAGS" | \
8243         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8244                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8245
8246 CPPFLAGS=`echo "$CPPFLAGS" | \
8247         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8248                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8249
8250         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8251
8252 cf_fix_cppflags=no
8253 cf_new_cflags=
8254 cf_new_cppflags=
8255 cf_new_extra_cppflags=
8256
8257 for cf_add_cflags in $cf_temp_xopen_source
8258 do
8259 case $cf_fix_cppflags in
8260 no)
8261         case $cf_add_cflags in #(vi
8262         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8263                 case $cf_add_cflags in
8264                 -D*)
8265                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8266
8267                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8268                                 && test -z "${cf_tst_cflags}" \
8269                                 && cf_fix_cppflags=yes
8270
8271                         if test $cf_fix_cppflags = yes ; then
8272                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8273                                 continue
8274                         elif test "${cf_tst_cflags}" = "\"'" ; then
8275                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8276                                 continue
8277                         fi
8278                         ;;
8279                 esac
8280                 case "$CPPFLAGS" in
8281                 *$cf_add_cflags) #(vi
8282                         ;;
8283                 *) #(vi
8284                         case $cf_add_cflags in #(vi
8285                         -D*)
8286                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8287
8288 CPPFLAGS=`echo "$CPPFLAGS" | \
8289         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8290                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8291
8292                                 ;;
8293                         esac
8294                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8295                         ;;
8296                 esac
8297                 ;;
8298         *)
8299                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8300                 ;;
8301         esac
8302         ;;
8303 yes)
8304         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8305
8306         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8307
8308         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8309                 && test -z "${cf_tst_cflags}" \
8310                 && cf_fix_cppflags=no
8311         ;;
8312 esac
8313 done
8314
8315 if test -n "$cf_new_cflags" ; then
8316
8317         CFLAGS="$CFLAGS $cf_new_cflags"
8318 fi
8319
8320 if test -n "$cf_new_cppflags" ; then
8321
8322         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8323 fi
8324
8325 if test -n "$cf_new_extra_cppflags" ; then
8326
8327         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8328 fi
8329
8330 fi
8331
8332 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8333
8334 cf_save_CFLAGS="$CFLAGS"
8335 cf_save_CPPFLAGS="$CPPFLAGS"
8336
8337 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8338         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8339                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8340
8341 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8342         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8343                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8344
8345 echo "$as_me:8345: checking if we should define _POSIX_C_SOURCE" >&5
8346 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8347 if test "${cf_cv_posix_c_source+set}" = set; then
8348   echo $ECHO_N "(cached) $ECHO_C" >&6
8349 else
8350
8351 echo "${as_me:-configure}:8351: testing if the symbol is already defined go no further ..." 1>&5
8352
8353         cat >conftest.$ac_ext <<_ACEOF
8354 #line 8354 "configure"
8355 #include "confdefs.h"
8356 #include <sys/types.h>
8357 int
8358 main ()
8359 {
8360
8361 #ifndef _POSIX_C_SOURCE
8362 make an error
8363 #endif
8364   ;
8365   return 0;
8366 }
8367 _ACEOF
8368 rm -f conftest.$ac_objext
8369 if { (eval echo "$as_me:8369: \"$ac_compile\"") >&5
8370   (eval $ac_compile) 2>&5
8371   ac_status=$?
8372   echo "$as_me:8372: \$? = $ac_status" >&5
8373   (exit $ac_status); } &&
8374          { ac_try='test -s conftest.$ac_objext'
8375   { (eval echo "$as_me:8375: \"$ac_try\"") >&5
8376   (eval $ac_try) 2>&5
8377   ac_status=$?
8378   echo "$as_me:8378: \$? = $ac_status" >&5
8379   (exit $ac_status); }; }; then
8380   cf_cv_posix_c_source=no
8381 else
8382   echo "$as_me: failed program was:" >&5
8383 cat conftest.$ac_ext >&5
8384 cf_want_posix_source=no
8385          case .$cf_POSIX_C_SOURCE in #(vi
8386          .[12]??*) #(vi
8387                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8388                 ;;
8389          .2) #(vi
8390                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8391                 cf_want_posix_source=yes
8392                 ;;
8393          .*)
8394                 cf_want_posix_source=yes
8395                 ;;
8396          esac
8397          if test "$cf_want_posix_source" = yes ; then
8398                 cat >conftest.$ac_ext <<_ACEOF
8399 #line 8399 "configure"
8400 #include "confdefs.h"
8401 #include <sys/types.h>
8402 int
8403 main ()
8404 {
8405
8406 #ifdef _POSIX_SOURCE
8407 make an error
8408 #endif
8409   ;
8410   return 0;
8411 }
8412 _ACEOF
8413 rm -f conftest.$ac_objext
8414 if { (eval echo "$as_me:8414: \"$ac_compile\"") >&5
8415   (eval $ac_compile) 2>&5
8416   ac_status=$?
8417   echo "$as_me:8417: \$? = $ac_status" >&5
8418   (exit $ac_status); } &&
8419          { ac_try='test -s conftest.$ac_objext'
8420   { (eval echo "$as_me:8420: \"$ac_try\"") >&5
8421   (eval $ac_try) 2>&5
8422   ac_status=$?
8423   echo "$as_me:8423: \$? = $ac_status" >&5
8424   (exit $ac_status); }; }; then
8425   :
8426 else
8427   echo "$as_me: failed program was:" >&5
8428 cat conftest.$ac_ext >&5
8429 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8430 fi
8431 rm -f conftest.$ac_objext conftest.$ac_ext
8432          fi
8433
8434 echo "${as_me:-configure}:8434: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8435
8436          CFLAGS="$cf_trim_CFLAGS"
8437          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8438
8439 echo "${as_me:-configure}:8439: testing if the second compile does not leave our definition intact error ..." 1>&5
8440
8441          cat >conftest.$ac_ext <<_ACEOF
8442 #line 8442 "configure"
8443 #include "confdefs.h"
8444 #include <sys/types.h>
8445 int
8446 main ()
8447 {
8448
8449 #ifndef _POSIX_C_SOURCE
8450 make an error
8451 #endif
8452   ;
8453   return 0;
8454 }
8455 _ACEOF
8456 rm -f conftest.$ac_objext
8457 if { (eval echo "$as_me:8457: \"$ac_compile\"") >&5
8458   (eval $ac_compile) 2>&5
8459   ac_status=$?
8460   echo "$as_me:8460: \$? = $ac_status" >&5
8461   (exit $ac_status); } &&
8462          { ac_try='test -s conftest.$ac_objext'
8463   { (eval echo "$as_me:8463: \"$ac_try\"") >&5
8464   (eval $ac_try) 2>&5
8465   ac_status=$?
8466   echo "$as_me:8466: \$? = $ac_status" >&5
8467   (exit $ac_status); }; }; then
8468   :
8469 else
8470   echo "$as_me: failed program was:" >&5
8471 cat conftest.$ac_ext >&5
8472 cf_cv_posix_c_source=no
8473 fi
8474 rm -f conftest.$ac_objext conftest.$ac_ext
8475          CFLAGS="$cf_save_CFLAGS"
8476          CPPFLAGS="$cf_save_CPPFLAGS"
8477
8478 fi
8479 rm -f conftest.$ac_objext conftest.$ac_ext
8480
8481 fi
8482 echo "$as_me:8482: result: $cf_cv_posix_c_source" >&5
8483 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8484
8485 if test "$cf_cv_posix_c_source" != no ; then
8486         CFLAGS="$cf_trim_CFLAGS"
8487         CPPFLAGS="$cf_trim_CPPFLAGS"
8488
8489 cf_fix_cppflags=no
8490 cf_new_cflags=
8491 cf_new_cppflags=
8492 cf_new_extra_cppflags=
8493
8494 for cf_add_cflags in $cf_cv_posix_c_source
8495 do
8496 case $cf_fix_cppflags in
8497 no)
8498         case $cf_add_cflags in #(vi
8499         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8500                 case $cf_add_cflags in
8501                 -D*)
8502                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8503
8504                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8505                                 && test -z "${cf_tst_cflags}" \
8506                                 && cf_fix_cppflags=yes
8507
8508                         if test $cf_fix_cppflags = yes ; then
8509                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8510                                 continue
8511                         elif test "${cf_tst_cflags}" = "\"'" ; then
8512                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8513                                 continue
8514                         fi
8515                         ;;
8516                 esac
8517                 case "$CPPFLAGS" in
8518                 *$cf_add_cflags) #(vi
8519                         ;;
8520                 *) #(vi
8521                         case $cf_add_cflags in #(vi
8522                         -D*)
8523                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8524
8525 CPPFLAGS=`echo "$CPPFLAGS" | \
8526         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8527                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8528
8529                                 ;;
8530                         esac
8531                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8532                         ;;
8533                 esac
8534                 ;;
8535         *)
8536                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8537                 ;;
8538         esac
8539         ;;
8540 yes)
8541         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8542
8543         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8544
8545         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8546                 && test -z "${cf_tst_cflags}" \
8547                 && cf_fix_cppflags=no
8548         ;;
8549 esac
8550 done
8551
8552 if test -n "$cf_new_cflags" ; then
8553
8554         CFLAGS="$CFLAGS $cf_new_cflags"
8555 fi
8556
8557 if test -n "$cf_new_cppflags" ; then
8558
8559         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8560 fi
8561
8562 if test -n "$cf_new_extra_cppflags" ; then
8563
8564         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8565 fi
8566
8567 fi
8568
8569         ;;
8570 esac
8571
8572 if test -n "$cf_xopen_source" ; then
8573
8574 cf_fix_cppflags=no
8575 cf_new_cflags=
8576 cf_new_cppflags=
8577 cf_new_extra_cppflags=
8578
8579 for cf_add_cflags in $cf_xopen_source
8580 do
8581 case $cf_fix_cppflags in
8582 no)
8583         case $cf_add_cflags in #(vi
8584         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8585                 case $cf_add_cflags in
8586                 -D*)
8587                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8588
8589                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8590                                 && test -z "${cf_tst_cflags}" \
8591                                 && cf_fix_cppflags=yes
8592
8593                         if test $cf_fix_cppflags = yes ; then
8594                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8595                                 continue
8596                         elif test "${cf_tst_cflags}" = "\"'" ; then
8597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8598                                 continue
8599                         fi
8600                         ;;
8601                 esac
8602                 case "$CPPFLAGS" in
8603                 *$cf_add_cflags) #(vi
8604                         ;;
8605                 *) #(vi
8606                         case $cf_add_cflags in #(vi
8607                         -D*)
8608                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8609
8610 CPPFLAGS=`echo "$CPPFLAGS" | \
8611         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8612                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8613
8614                                 ;;
8615                         esac
8616                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8617                         ;;
8618                 esac
8619                 ;;
8620         *)
8621                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8622                 ;;
8623         esac
8624         ;;
8625 yes)
8626         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8627
8628         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8629
8630         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8631                 && test -z "${cf_tst_cflags}" \
8632                 && cf_fix_cppflags=no
8633         ;;
8634 esac
8635 done
8636
8637 if test -n "$cf_new_cflags" ; then
8638         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8639
8640 echo "${as_me:-configure}:8640: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8641
8642         CFLAGS="$CFLAGS $cf_new_cflags"
8643 fi
8644
8645 if test -n "$cf_new_cppflags" ; then
8646         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8647
8648 echo "${as_me:-configure}:8648: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8649
8650         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8651 fi
8652
8653 if test -n "$cf_new_extra_cppflags" ; then
8654         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8655
8656 echo "${as_me:-configure}:8656: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8657
8658         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8659 fi
8660
8661 fi
8662
8663 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8664         echo "$as_me:8664: checking if _XOPEN_SOURCE really is set" >&5
8665 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8666         cat >conftest.$ac_ext <<_ACEOF
8667 #line 8667 "configure"
8668 #include "confdefs.h"
8669 #include <stdlib.h>
8670 int
8671 main ()
8672 {
8673
8674 #ifndef _XOPEN_SOURCE
8675 make an error
8676 #endif
8677   ;
8678   return 0;
8679 }
8680 _ACEOF
8681 rm -f conftest.$ac_objext
8682 if { (eval echo "$as_me:8682: \"$ac_compile\"") >&5
8683   (eval $ac_compile) 2>&5
8684   ac_status=$?
8685   echo "$as_me:8685: \$? = $ac_status" >&5
8686   (exit $ac_status); } &&
8687          { ac_try='test -s conftest.$ac_objext'
8688   { (eval echo "$as_me:8688: \"$ac_try\"") >&5
8689   (eval $ac_try) 2>&5
8690   ac_status=$?
8691   echo "$as_me:8691: \$? = $ac_status" >&5
8692   (exit $ac_status); }; }; then
8693   cf_XOPEN_SOURCE_set=yes
8694 else
8695   echo "$as_me: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8697 cf_XOPEN_SOURCE_set=no
8698 fi
8699 rm -f conftest.$ac_objext conftest.$ac_ext
8700         echo "$as_me:8700: result: $cf_XOPEN_SOURCE_set" >&5
8701 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8702         if test $cf_XOPEN_SOURCE_set = yes
8703         then
8704                 cat >conftest.$ac_ext <<_ACEOF
8705 #line 8705 "configure"
8706 #include "confdefs.h"
8707 #include <stdlib.h>
8708 int
8709 main ()
8710 {
8711
8712 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8713 make an error
8714 #endif
8715   ;
8716   return 0;
8717 }
8718 _ACEOF
8719 rm -f conftest.$ac_objext
8720 if { (eval echo "$as_me:8720: \"$ac_compile\"") >&5
8721   (eval $ac_compile) 2>&5
8722   ac_status=$?
8723   echo "$as_me:8723: \$? = $ac_status" >&5
8724   (exit $ac_status); } &&
8725          { ac_try='test -s conftest.$ac_objext'
8726   { (eval echo "$as_me:8726: \"$ac_try\"") >&5
8727   (eval $ac_try) 2>&5
8728   ac_status=$?
8729   echo "$as_me:8729: \$? = $ac_status" >&5
8730   (exit $ac_status); }; }; then
8731   cf_XOPEN_SOURCE_set_ok=yes
8732 else
8733   echo "$as_me: failed program was:" >&5
8734 cat conftest.$ac_ext >&5
8735 cf_XOPEN_SOURCE_set_ok=no
8736 fi
8737 rm -f conftest.$ac_objext conftest.$ac_ext
8738                 if test $cf_XOPEN_SOURCE_set_ok = no
8739                 then
8740                         { echo "$as_me:8740: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8741 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8742                 fi
8743         else
8744
8745 echo "$as_me:8745: checking if we should define _XOPEN_SOURCE" >&5
8746 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8747 if test "${cf_cv_xopen_source+set}" = set; then
8748   echo $ECHO_N "(cached) $ECHO_C" >&6
8749 else
8750
8751         cat >conftest.$ac_ext <<_ACEOF
8752 #line 8752 "configure"
8753 #include "confdefs.h"
8754
8755 #include <stdlib.h>
8756 #include <string.h>
8757 #include <sys/types.h>
8758
8759 int
8760 main ()
8761 {
8762
8763 #ifndef _XOPEN_SOURCE
8764 make an error
8765 #endif
8766   ;
8767   return 0;
8768 }
8769 _ACEOF
8770 rm -f conftest.$ac_objext
8771 if { (eval echo "$as_me:8771: \"$ac_compile\"") >&5
8772   (eval $ac_compile) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); } &&
8776          { ac_try='test -s conftest.$ac_objext'
8777   { (eval echo "$as_me:8777: \"$ac_try\"") >&5
8778   (eval $ac_try) 2>&5
8779   ac_status=$?
8780   echo "$as_me:8780: \$? = $ac_status" >&5
8781   (exit $ac_status); }; }; then
8782   cf_cv_xopen_source=no
8783 else
8784   echo "$as_me: failed program was:" >&5
8785 cat conftest.$ac_ext >&5
8786 cf_save="$CPPFLAGS"
8787          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8788          cat >conftest.$ac_ext <<_ACEOF
8789 #line 8789 "configure"
8790 #include "confdefs.h"
8791
8792 #include <stdlib.h>
8793 #include <string.h>
8794 #include <sys/types.h>
8795
8796 int
8797 main ()
8798 {
8799
8800 #ifdef _XOPEN_SOURCE
8801 make an error
8802 #endif
8803   ;
8804   return 0;
8805 }
8806 _ACEOF
8807 rm -f conftest.$ac_objext
8808 if { (eval echo "$as_me:8808: \"$ac_compile\"") >&5
8809   (eval $ac_compile) 2>&5
8810   ac_status=$?
8811   echo "$as_me:8811: \$? = $ac_status" >&5
8812   (exit $ac_status); } &&
8813          { ac_try='test -s conftest.$ac_objext'
8814   { (eval echo "$as_me:8814: \"$ac_try\"") >&5
8815   (eval $ac_try) 2>&5
8816   ac_status=$?
8817   echo "$as_me:8817: \$? = $ac_status" >&5
8818   (exit $ac_status); }; }; then
8819   cf_cv_xopen_source=no
8820 else
8821   echo "$as_me: failed program was:" >&5
8822 cat conftest.$ac_ext >&5
8823 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8824 fi
8825 rm -f conftest.$ac_objext conftest.$ac_ext
8826         CPPFLAGS="$cf_save"
8827
8828 fi
8829 rm -f conftest.$ac_objext conftest.$ac_ext
8830
8831 fi
8832 echo "$as_me:8832: result: $cf_cv_xopen_source" >&5
8833 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8834
8835 if test "$cf_cv_xopen_source" != no ; then
8836
8837 CFLAGS=`echo "$CFLAGS" | \
8838         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8839                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8840
8841 CPPFLAGS=`echo "$CPPFLAGS" | \
8842         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8843                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8844
8845         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8846
8847 cf_fix_cppflags=no
8848 cf_new_cflags=
8849 cf_new_cppflags=
8850 cf_new_extra_cppflags=
8851
8852 for cf_add_cflags in $cf_temp_xopen_source
8853 do
8854 case $cf_fix_cppflags in
8855 no)
8856         case $cf_add_cflags in #(vi
8857         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8858                 case $cf_add_cflags in
8859                 -D*)
8860                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8861
8862                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8863                                 && test -z "${cf_tst_cflags}" \
8864                                 && cf_fix_cppflags=yes
8865
8866                         if test $cf_fix_cppflags = yes ; then
8867                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8868                                 continue
8869                         elif test "${cf_tst_cflags}" = "\"'" ; then
8870                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8871                                 continue
8872                         fi
8873                         ;;
8874                 esac
8875                 case "$CPPFLAGS" in
8876                 *$cf_add_cflags) #(vi
8877                         ;;
8878                 *) #(vi
8879                         case $cf_add_cflags in #(vi
8880                         -D*)
8881                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8882
8883 CPPFLAGS=`echo "$CPPFLAGS" | \
8884         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8885                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8886
8887                                 ;;
8888                         esac
8889                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8890                         ;;
8891                 esac
8892                 ;;
8893         *)
8894                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8895                 ;;
8896         esac
8897         ;;
8898 yes)
8899         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8900
8901         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8902
8903         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8904                 && test -z "${cf_tst_cflags}" \
8905                 && cf_fix_cppflags=no
8906         ;;
8907 esac
8908 done
8909
8910 if test -n "$cf_new_cflags" ; then
8911
8912         CFLAGS="$CFLAGS $cf_new_cflags"
8913 fi
8914
8915 if test -n "$cf_new_cppflags" ; then
8916
8917         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8918 fi
8919
8920 if test -n "$cf_new_extra_cppflags" ; then
8921
8922         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8923 fi
8924
8925 fi
8926
8927         fi
8928 fi
8929
8930 CPPFLAGS_after_XOPEN="$CPPFLAGS"
8931
8932 # Work around breakage on OS X
8933
8934 echo "$as_me:8934: checking if SIGWINCH is defined" >&5
8935 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8936 if test "${cf_cv_define_sigwinch+set}" = set; then
8937   echo $ECHO_N "(cached) $ECHO_C" >&6
8938 else
8939
8940         cat >conftest.$ac_ext <<_ACEOF
8941 #line 8941 "configure"
8942 #include "confdefs.h"
8943
8944 #include <sys/types.h>
8945 #include <sys/signal.h>
8946
8947 int
8948 main ()
8949 {
8950 int x = SIGWINCH
8951   ;
8952   return 0;
8953 }
8954 _ACEOF
8955 rm -f conftest.$ac_objext
8956 if { (eval echo "$as_me:8956: \"$ac_compile\"") >&5
8957   (eval $ac_compile) 2>&5
8958   ac_status=$?
8959   echo "$as_me:8959: \$? = $ac_status" >&5
8960   (exit $ac_status); } &&
8961          { ac_try='test -s conftest.$ac_objext'
8962   { (eval echo "$as_me:8962: \"$ac_try\"") >&5
8963   (eval $ac_try) 2>&5
8964   ac_status=$?
8965   echo "$as_me:8965: \$? = $ac_status" >&5
8966   (exit $ac_status); }; }; then
8967   cf_cv_define_sigwinch=yes
8968 else
8969   echo "$as_me: failed program was:" >&5
8970 cat conftest.$ac_ext >&5
8971 cat >conftest.$ac_ext <<_ACEOF
8972 #line 8972 "configure"
8973 #include "confdefs.h"
8974
8975 #undef _XOPEN_SOURCE
8976 #undef _POSIX_SOURCE
8977 #undef _POSIX_C_SOURCE
8978 #include <sys/types.h>
8979 #include <sys/signal.h>
8980
8981 int
8982 main ()
8983 {
8984 int x = SIGWINCH
8985   ;
8986   return 0;
8987 }
8988 _ACEOF
8989 rm -f conftest.$ac_objext
8990 if { (eval echo "$as_me:8990: \"$ac_compile\"") >&5
8991   (eval $ac_compile) 2>&5
8992   ac_status=$?
8993   echo "$as_me:8993: \$? = $ac_status" >&5
8994   (exit $ac_status); } &&
8995          { ac_try='test -s conftest.$ac_objext'
8996   { (eval echo "$as_me:8996: \"$ac_try\"") >&5
8997   (eval $ac_try) 2>&5
8998   ac_status=$?
8999   echo "$as_me:8999: \$? = $ac_status" >&5
9000   (exit $ac_status); }; }; then
9001   cf_cv_define_sigwinch=maybe
9002 else
9003   echo "$as_me: failed program was:" >&5
9004 cat conftest.$ac_ext >&5
9005 cf_cv_define_sigwinch=no
9006 fi
9007 rm -f conftest.$ac_objext conftest.$ac_ext
9008
9009 fi
9010 rm -f conftest.$ac_objext conftest.$ac_ext
9011
9012 fi
9013 echo "$as_me:9013: result: $cf_cv_define_sigwinch" >&5
9014 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9015
9016 if test "$cf_cv_define_sigwinch" = maybe ; then
9017 echo "$as_me:9017: checking for actual SIGWINCH definition" >&5
9018 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9019 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9020   echo $ECHO_N "(cached) $ECHO_C" >&6
9021 else
9022
9023 cf_cv_fixup_sigwinch=unknown
9024 cf_sigwinch=32
9025 while test $cf_sigwinch != 1
9026 do
9027         cat >conftest.$ac_ext <<_ACEOF
9028 #line 9028 "configure"
9029 #include "confdefs.h"
9030
9031 #undef _XOPEN_SOURCE
9032 #undef _POSIX_SOURCE
9033 #undef _POSIX_C_SOURCE
9034 #include <sys/types.h>
9035 #include <sys/signal.h>
9036
9037 int
9038 main ()
9039 {
9040
9041 #if SIGWINCH != $cf_sigwinch
9042 make an error
9043 #endif
9044 int x = SIGWINCH
9045   ;
9046   return 0;
9047 }
9048 _ACEOF
9049 rm -f conftest.$ac_objext
9050 if { (eval echo "$as_me:9050: \"$ac_compile\"") >&5
9051   (eval $ac_compile) 2>&5
9052   ac_status=$?
9053   echo "$as_me:9053: \$? = $ac_status" >&5
9054   (exit $ac_status); } &&
9055          { ac_try='test -s conftest.$ac_objext'
9056   { (eval echo "$as_me:9056: \"$ac_try\"") >&5
9057   (eval $ac_try) 2>&5
9058   ac_status=$?
9059   echo "$as_me:9059: \$? = $ac_status" >&5
9060   (exit $ac_status); }; }; then
9061   cf_cv_fixup_sigwinch=$cf_sigwinch
9062          break
9063 else
9064   echo "$as_me: failed program was:" >&5
9065 cat conftest.$ac_ext >&5
9066 fi
9067 rm -f conftest.$ac_objext conftest.$ac_ext
9068
9069 cf_sigwinch=`expr $cf_sigwinch - 1`
9070 done
9071
9072 fi
9073 echo "$as_me:9073: result: $cf_cv_fixup_sigwinch" >&5
9074 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9075
9076         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9077                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9078         fi
9079 fi
9080
9081 # Checks for CODESET support.
9082
9083   echo "$as_me:9083: checking for nl_langinfo and CODESET" >&5
9084 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9085 if test "${am_cv_langinfo_codeset+set}" = set; then
9086   echo $ECHO_N "(cached) $ECHO_C" >&6
9087 else
9088   cat >conftest.$ac_ext <<_ACEOF
9089 #line 9089 "configure"
9090 #include "confdefs.h"
9091 #include <langinfo.h>
9092 int
9093 main ()
9094 {
9095 char* cs = nl_langinfo(CODESET);
9096   ;
9097   return 0;
9098 }
9099 _ACEOF
9100 rm -f conftest.$ac_objext conftest$ac_exeext
9101 if { (eval echo "$as_me:9101: \"$ac_link\"") >&5
9102   (eval $ac_link) 2>&5
9103   ac_status=$?
9104   echo "$as_me:9104: \$? = $ac_status" >&5
9105   (exit $ac_status); } &&
9106          { ac_try='test -s conftest$ac_exeext'
9107   { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108   (eval $ac_try) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); }; }; then
9112   am_cv_langinfo_codeset=yes
9113 else
9114   echo "$as_me: failed program was:" >&5
9115 cat conftest.$ac_ext >&5
9116 am_cv_langinfo_codeset=no
9117 fi
9118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9119
9120 fi
9121 echo "$as_me:9121: result: $am_cv_langinfo_codeset" >&5
9122 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9123   if test $am_cv_langinfo_codeset = yes; then
9124
9125 cat >>confdefs.h <<\EOF
9126 #define HAVE_LANGINFO_CODESET 1
9127 EOF
9128
9129   fi
9130
9131 # use these variables to work around a defect in gcc's fixincludes.
9132 NCURSES_OK_WCHAR_T=
9133 NCURSES_OK_WINT_T=
9134
9135 echo "$as_me:9135: checking if you want wide-character code" >&5
9136 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9137
9138 # Check whether --enable-widec or --disable-widec was given.
9139 if test "${enable_widec+set}" = set; then
9140   enableval="$enable_widec"
9141   with_widec=$enableval
9142 else
9143   with_widec=no
9144 fi;
9145 echo "$as_me:9145: result: $with_widec" >&5
9146 echo "${ECHO_T}$with_widec" >&6
9147 if test "x$with_widec" = xyes ; then
9148         if test "x$disable_lib_suffixes" = xno ; then
9149                 LIB_SUFFIX="w${LIB_SUFFIX}"
9150         fi
9151
9152 cat >>confdefs.h <<\EOF
9153 #define USE_WIDEC_SUPPORT 1
9154 EOF
9155
9156 cat >>confdefs.h <<\EOF
9157 #define NCURSES_WIDECHAR 1
9158 EOF
9159
9160 echo "$as_me:9160: checking if wchar.h can be used as is" >&5
9161 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9162 if test "${cf_cv_wchar_h_okay+set}" = set; then
9163   echo $ECHO_N "(cached) $ECHO_C" >&6
9164 else
9165
9166 cat >conftest.$ac_ext <<_ACEOF
9167 #line 9167 "configure"
9168 #include "confdefs.h"
9169
9170 #include <stdlib.h>
9171 #include <wchar.h>
9172
9173 int
9174 main ()
9175 {
9176
9177         wint_t foo = 0;
9178         int bar = iswpunct(foo)
9179   ;
9180   return 0;
9181 }
9182 _ACEOF
9183 rm -f conftest.$ac_objext
9184 if { (eval echo "$as_me:9184: \"$ac_compile\"") >&5
9185   (eval $ac_compile) 2>&5
9186   ac_status=$?
9187   echo "$as_me:9187: \$? = $ac_status" >&5
9188   (exit $ac_status); } &&
9189          { ac_try='test -s conftest.$ac_objext'
9190   { (eval echo "$as_me:9190: \"$ac_try\"") >&5
9191   (eval $ac_try) 2>&5
9192   ac_status=$?
9193   echo "$as_me:9193: \$? = $ac_status" >&5
9194   (exit $ac_status); }; }; then
9195   cf_cv_wchar_h_okay=yes
9196 else
9197   echo "$as_me: failed program was:" >&5
9198 cat conftest.$ac_ext >&5
9199 cf_cv_wchar_h_okay=no
9200 fi
9201 rm -f conftest.$ac_objext conftest.$ac_ext
9202 fi
9203 echo "$as_me:9203: result: $cf_cv_wchar_h_okay" >&5
9204 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9205
9206 if test $cf_cv_wchar_h_okay = no
9207 then
9208
9209 echo "$as_me:9209: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9210 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9211 cat >conftest.$ac_ext <<_ACEOF
9212 #line 9212 "configure"
9213 #include "confdefs.h"
9214 #include <sys/types.h>
9215
9216 int
9217 main ()
9218 {
9219
9220 #ifndef _XOPEN_SOURCE_EXTENDED
9221 make an error
9222 #endif
9223   ;
9224   return 0;
9225 }
9226 _ACEOF
9227 rm -f conftest.$ac_objext
9228 if { (eval echo "$as_me:9228: \"$ac_compile\"") >&5
9229   (eval $ac_compile) 2>&5
9230   ac_status=$?
9231   echo "$as_me:9231: \$? = $ac_status" >&5
9232   (exit $ac_status); } &&
9233          { ac_try='test -s conftest.$ac_objext'
9234   { (eval echo "$as_me:9234: \"$ac_try\"") >&5
9235   (eval $ac_try) 2>&5
9236   ac_status=$?
9237   echo "$as_me:9237: \$? = $ac_status" >&5
9238   (exit $ac_status); }; }; then
9239   cf_result=no
9240 else
9241   echo "$as_me: failed program was:" >&5
9242 cat conftest.$ac_ext >&5
9243 cf_result=yes
9244 fi
9245 rm -f conftest.$ac_objext conftest.$ac_ext
9246 echo "$as_me:9246: result: $cf_result" >&5
9247 echo "${ECHO_T}$cf_result" >&6
9248
9249 if test "$cf_result" = yes ; then
9250         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9251 elif test "x" != "x" ; then
9252         echo "$as_me:9252: checking checking for compatible value versus " >&5
9253 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9254         cat >conftest.$ac_ext <<_ACEOF
9255 #line 9255 "configure"
9256 #include "confdefs.h"
9257 #include <sys/types.h>
9258
9259 int
9260 main ()
9261 {
9262
9263 #if _XOPEN_SOURCE_EXTENDED- < 0
9264 make an error
9265 #endif
9266   ;
9267   return 0;
9268 }
9269 _ACEOF
9270 rm -f conftest.$ac_objext
9271 if { (eval echo "$as_me:9271: \"$ac_compile\"") >&5
9272   (eval $ac_compile) 2>&5
9273   ac_status=$?
9274   echo "$as_me:9274: \$? = $ac_status" >&5
9275   (exit $ac_status); } &&
9276          { ac_try='test -s conftest.$ac_objext'
9277   { (eval echo "$as_me:9277: \"$ac_try\"") >&5
9278   (eval $ac_try) 2>&5
9279   ac_status=$?
9280   echo "$as_me:9280: \$? = $ac_status" >&5
9281   (exit $ac_status); }; }; then
9282   cf_result=yes
9283 else
9284   echo "$as_me: failed program was:" >&5
9285 cat conftest.$ac_ext >&5
9286 cf_result=no
9287 fi
9288 rm -f conftest.$ac_objext conftest.$ac_ext
9289         echo "$as_me:9289: result: $cf_result" >&5
9290 echo "${ECHO_T}$cf_result" >&6
9291         if test "$cf_result" = no ; then
9292                 # perhaps we can override it - try...
9293                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9294         fi
9295 fi
9296
9297 fi
9298
9299         # with_overwrite=no
9300         NCURSES_CH_T=cchar_t
9301
9302 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9303 do
9304 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9305 echo "$as_me:9305: checking for $ac_func" >&5
9306 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9307 if eval "test \"\${$as_ac_var+set}\" = set"; then
9308   echo $ECHO_N "(cached) $ECHO_C" >&6
9309 else
9310   cat >conftest.$ac_ext <<_ACEOF
9311 #line 9311 "configure"
9312 #include "confdefs.h"
9313 /* System header to define __stub macros and hopefully few prototypes,
9314     which can conflict with char $ac_func (); below.  */
9315 #include <assert.h>
9316 /* Override any gcc2 internal prototype to avoid an error.  */
9317 #ifdef __cplusplus
9318 extern "C"
9319 #endif
9320 /* We use char because int might match the return type of a gcc2
9321    builtin and then its argument prototype would still apply.  */
9322 char $ac_func ();
9323 char (*f) ();
9324
9325 int
9326 main ()
9327 {
9328 /* The GNU C library defines this for functions which it implements
9329     to always fail with ENOSYS.  Some functions are actually named
9330     something starting with __ and the normal name is an alias.  */
9331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9332 choke me
9333 #else
9334 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9335 #endif
9336
9337   ;
9338   return 0;
9339 }
9340 _ACEOF
9341 rm -f conftest.$ac_objext conftest$ac_exeext
9342 if { (eval echo "$as_me:9342: \"$ac_link\"") >&5
9343   (eval $ac_link) 2>&5
9344   ac_status=$?
9345   echo "$as_me:9345: \$? = $ac_status" >&5
9346   (exit $ac_status); } &&
9347          { ac_try='test -s conftest$ac_exeext'
9348   { (eval echo "$as_me:9348: \"$ac_try\"") >&5
9349   (eval $ac_try) 2>&5
9350   ac_status=$?
9351   echo "$as_me:9351: \$? = $ac_status" >&5
9352   (exit $ac_status); }; }; then
9353   eval "$as_ac_var=yes"
9354 else
9355   echo "$as_me: failed program was:" >&5
9356 cat conftest.$ac_ext >&5
9357 eval "$as_ac_var=no"
9358 fi
9359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9360 fi
9361 echo "$as_me:9361: result: `eval echo '${'$as_ac_var'}'`" >&5
9362 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9363 if test `eval echo '${'$as_ac_var'}'` = yes; then
9364   cat >>confdefs.h <<EOF
9365 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9366 EOF
9367
9368 fi
9369 done
9370
9371         if test "x$ac_cv_func_putwc" != xyes ; then
9372
9373 echo "$as_me:9373: checking for multibyte character support" >&5
9374 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9375 if test "${cf_cv_utf8_lib+set}" = set; then
9376   echo $ECHO_N "(cached) $ECHO_C" >&6
9377 else
9378
9379         cf_save_LIBS="$LIBS"
9380         cat >conftest.$ac_ext <<_ACEOF
9381 #line 9381 "configure"
9382 #include "confdefs.h"
9383
9384 #include <stdlib.h>
9385 int
9386 main ()
9387 {
9388 putwc(0,0);
9389   ;
9390   return 0;
9391 }
9392 _ACEOF
9393 rm -f conftest.$ac_objext conftest$ac_exeext
9394 if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
9395   (eval $ac_link) 2>&5
9396   ac_status=$?
9397   echo "$as_me:9397: \$? = $ac_status" >&5
9398   (exit $ac_status); } &&
9399          { ac_try='test -s conftest$ac_exeext'
9400   { (eval echo "$as_me:9400: \"$ac_try\"") >&5
9401   (eval $ac_try) 2>&5
9402   ac_status=$?
9403   echo "$as_me:9403: \$? = $ac_status" >&5
9404   (exit $ac_status); }; }; then
9405   cf_cv_utf8_lib=yes
9406 else
9407   echo "$as_me: failed program was:" >&5
9408 cat conftest.$ac_ext >&5
9409
9410 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9411 # will be set on completion of the AC_TRY_LINK below.
9412 cf_cv_header_path_utf8=
9413 cf_cv_library_path_utf8=
9414
9415 echo "${as_me:-configure}:9415: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9416
9417 cf_save_LIBS="$LIBS"
9418
9419 cat >conftest.$ac_ext <<_ACEOF
9420 #line 9420 "configure"
9421 #include "confdefs.h"
9422
9423 #include <libutf8.h>
9424 int
9425 main ()
9426 {
9427 putwc(0,0);
9428   ;
9429   return 0;
9430 }
9431 _ACEOF
9432 rm -f conftest.$ac_objext conftest$ac_exeext
9433 if { (eval echo "$as_me:9433: \"$ac_link\"") >&5
9434   (eval $ac_link) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); } &&
9438          { ac_try='test -s conftest$ac_exeext'
9439   { (eval echo "$as_me:9439: \"$ac_try\"") >&5
9440   (eval $ac_try) 2>&5
9441   ac_status=$?
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); }; }; then
9444
9445         cf_cv_find_linkage_utf8=yes
9446         cf_cv_header_path_utf8=/usr/include
9447         cf_cv_library_path_utf8=/usr/lib
9448
9449 else
9450   echo "$as_me: failed program was:" >&5
9451 cat conftest.$ac_ext >&5
9452
9453 LIBS="-lutf8  $cf_save_LIBS"
9454
9455 cat >conftest.$ac_ext <<_ACEOF
9456 #line 9456 "configure"
9457 #include "confdefs.h"
9458
9459 #include <libutf8.h>
9460 int
9461 main ()
9462 {
9463 putwc(0,0);
9464   ;
9465   return 0;
9466 }
9467 _ACEOF
9468 rm -f conftest.$ac_objext conftest$ac_exeext
9469 if { (eval echo "$as_me:9469: \"$ac_link\"") >&5
9470   (eval $ac_link) 2>&5
9471   ac_status=$?
9472   echo "$as_me:9472: \$? = $ac_status" >&5
9473   (exit $ac_status); } &&
9474          { ac_try='test -s conftest$ac_exeext'
9475   { (eval echo "$as_me:9475: \"$ac_try\"") >&5
9476   (eval $ac_try) 2>&5
9477   ac_status=$?
9478   echo "$as_me:9478: \$? = $ac_status" >&5
9479   (exit $ac_status); }; }; then
9480
9481         cf_cv_find_linkage_utf8=yes
9482         cf_cv_header_path_utf8=/usr/include
9483         cf_cv_library_path_utf8=/usr/lib
9484         cf_cv_library_file_utf8="-lutf8"
9485
9486 else
9487   echo "$as_me: failed program was:" >&5
9488 cat conftest.$ac_ext >&5
9489
9490         cf_cv_find_linkage_utf8=no
9491         LIBS="$cf_save_LIBS"
9492
9493     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9494
9495 echo "${as_me:-configure}:9495: testing find linkage for utf8 library ..." 1>&5
9496
9497 echo "${as_me:-configure}:9497: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9498
9499     cf_save_CPPFLAGS="$CPPFLAGS"
9500     cf_test_CPPFLAGS="$CPPFLAGS"
9501
9502 cf_search=
9503
9504 # collect the current set of include-directories from compiler flags
9505 cf_header_path_list=""
9506 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9507         for cf_header_path in $CPPFLAGS $CFLAGS
9508         do
9509                 case $cf_header_path in #(vi
9510                 -I*)
9511                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9512
9513 test "x$cf_header_path" != "xNONE" && \
9514 test -d "$cf_header_path" && \
9515  {
9516         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9517         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9518         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9519         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9520         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9521         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9522 }
9523
9524                         cf_header_path_list="$cf_header_path_list $cf_search"
9525                         ;;
9526                 esac
9527         done
9528 fi
9529
9530 # add the variations for the package we are looking for
9531
9532 cf_search=
9533
9534 test "x$prefix" != "xNONE" && \
9535 test -d "$prefix" && \
9536  {
9537         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9538         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9539         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9540         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9541         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9542         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9543 }
9544
9545 for cf_subdir_prefix in \
9546         /usr \
9547         /usr/local \
9548         /usr/pkg \
9549         /opt \
9550         /opt/local \
9551         $HOME
9552 do
9553
9554 test "x$cf_subdir_prefix" != "x$prefix" && \
9555 test -d "$cf_subdir_prefix" && \
9556 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9557         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9558         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9559         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9560         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9561         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9562         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9563 }
9564
9565 done
9566
9567 test "$includedir" != NONE && \
9568 test "$includedir" != "/usr/include" && \
9569 test -d "$includedir" && {
9570         test -d $includedir &&    cf_search="$cf_search $includedir"
9571         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9572 }
9573
9574 test "$oldincludedir" != NONE && \
9575 test "$oldincludedir" != "/usr/include" && \
9576 test -d "$oldincludedir" && {
9577         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9578         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9579 }
9580
9581 cf_search="$cf_search $cf_header_path_list"
9582
9583     for cf_cv_header_path_utf8 in $cf_search
9584     do
9585       if test -d $cf_cv_header_path_utf8 ; then
9586         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9587
9588 echo "${as_me:-configure}:9588: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9589
9590         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9591         cat >conftest.$ac_ext <<_ACEOF
9592 #line 9592 "configure"
9593 #include "confdefs.h"
9594
9595 #include <libutf8.h>
9596 int
9597 main ()
9598 {
9599 putwc(0,0);
9600   ;
9601   return 0;
9602 }
9603 _ACEOF
9604 rm -f conftest.$ac_objext
9605 if { (eval echo "$as_me:9605: \"$ac_compile\"") >&5
9606   (eval $ac_compile) 2>&5
9607   ac_status=$?
9608   echo "$as_me:9608: \$? = $ac_status" >&5
9609   (exit $ac_status); } &&
9610          { ac_try='test -s conftest.$ac_objext'
9611   { (eval echo "$as_me:9611: \"$ac_try\"") >&5
9612   (eval $ac_try) 2>&5
9613   ac_status=$?
9614   echo "$as_me:9614: \$? = $ac_status" >&5
9615   (exit $ac_status); }; }; then
9616
9617             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9618
9619 echo "${as_me:-configure}:9619: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9620
9621             cf_cv_find_linkage_utf8=maybe
9622             cf_test_CPPFLAGS="$CPPFLAGS"
9623             break
9624 else
9625   echo "$as_me: failed program was:" >&5
9626 cat conftest.$ac_ext >&5
9627
9628             CPPFLAGS="$cf_save_CPPFLAGS"
9629
9630 fi
9631 rm -f conftest.$ac_objext conftest.$ac_ext
9632       fi
9633     done
9634
9635     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9636
9637 echo "${as_me:-configure}:9637: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9638
9639       cf_save_LIBS="$LIBS"
9640       cf_save_LDFLAGS="$LDFLAGS"
9641
9642       if test "$cf_cv_find_linkage_utf8" != yes ; then
9643
9644 cf_search=
9645 cf_library_path_list=""
9646 if test -n "${LDFLAGS}${LIBS}" ; then
9647         for cf_library_path in $LDFLAGS $LIBS
9648         do
9649                 case $cf_library_path in #(vi
9650                 -L*)
9651                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9652
9653 test "x$cf_library_path" != "xNONE" && \
9654 test -d "$cf_library_path" && \
9655  {
9656         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9657         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9658         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9659         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9660         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9661         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9662 }
9663
9664                         cf_library_path_list="$cf_library_path_list $cf_search"
9665                         ;;
9666                 esac
9667         done
9668 fi
9669
9670 cf_search=
9671
9672 test "x$prefix" != "xNONE" && \
9673 test -d "$prefix" && \
9674  {
9675         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9676         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9677         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9678         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9679         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9680         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9681 }
9682
9683 for cf_subdir_prefix in \
9684         /usr \
9685         /usr/local \
9686         /usr/pkg \
9687         /opt \
9688         /opt/local \
9689         $HOME
9690 do
9691
9692 test "x$cf_subdir_prefix" != "x$prefix" && \
9693 test -d "$cf_subdir_prefix" && \
9694 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9695         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9696         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9697         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9698         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9699         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9700         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9701 }
9702
9703 done
9704
9705 cf_search="$cf_library_path_list $cf_search"
9706
9707         for cf_cv_library_path_utf8 in $cf_search
9708         do
9709           if test -d $cf_cv_library_path_utf8 ; then
9710             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9711
9712 echo "${as_me:-configure}:9712: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9713
9714             CPPFLAGS="$cf_test_CPPFLAGS"
9715             LIBS="-lutf8  $cf_save_LIBS"
9716             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9717             cat >conftest.$ac_ext <<_ACEOF
9718 #line 9718 "configure"
9719 #include "confdefs.h"
9720
9721 #include <libutf8.h>
9722 int
9723 main ()
9724 {
9725 putwc(0,0);
9726   ;
9727   return 0;
9728 }
9729 _ACEOF
9730 rm -f conftest.$ac_objext conftest$ac_exeext
9731 if { (eval echo "$as_me:9731: \"$ac_link\"") >&5
9732   (eval $ac_link) 2>&5
9733   ac_status=$?
9734   echo "$as_me:9734: \$? = $ac_status" >&5
9735   (exit $ac_status); } &&
9736          { ac_try='test -s conftest$ac_exeext'
9737   { (eval echo "$as_me:9737: \"$ac_try\"") >&5
9738   (eval $ac_try) 2>&5
9739   ac_status=$?
9740   echo "$as_me:9740: \$? = $ac_status" >&5
9741   (exit $ac_status); }; }; then
9742
9743                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9744
9745 echo "${as_me:-configure}:9745: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9746
9747                 cf_cv_find_linkage_utf8=yes
9748                 cf_cv_library_file_utf8="-lutf8"
9749                 break
9750 else
9751   echo "$as_me: failed program was:" >&5
9752 cat conftest.$ac_ext >&5
9753
9754                 CPPFLAGS="$cf_save_CPPFLAGS"
9755                 LIBS="$cf_save_LIBS"
9756                 LDFLAGS="$cf_save_LDFLAGS"
9757
9758 fi
9759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9760           fi
9761         done
9762         CPPFLAGS="$cf_save_CPPFLAGS"
9763         LDFLAGS="$cf_save_LDFLAGS"
9764       fi
9765
9766     else
9767       cf_cv_find_linkage_utf8=no
9768     fi
9769
9770 fi
9771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9772
9773 fi
9774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9775
9776 LIBS="$cf_save_LIBS"
9777
9778 if test "$cf_cv_find_linkage_utf8" = yes ; then
9779 cf_cv_utf8_lib=add-on
9780 else
9781 cf_cv_utf8_lib=no
9782 fi
9783
9784 fi
9785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9786 fi
9787 echo "$as_me:9787: result: $cf_cv_utf8_lib" >&5
9788 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9789
9790 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9791 # ncurses/ncursesw:
9792 if test "$cf_cv_utf8_lib" = "add-on" ; then
9793
9794 cat >>confdefs.h <<\EOF
9795 #define HAVE_LIBUTF8_H 1
9796 EOF
9797
9798 if test -n "$cf_cv_header_path_utf8" ; then
9799   for cf_add_incdir in $cf_cv_header_path_utf8
9800   do
9801         while test $cf_add_incdir != /usr/include
9802         do
9803           if test -d $cf_add_incdir
9804           then
9805                 cf_have_incdir=no
9806                 if test -n "$CFLAGS$CPPFLAGS" ; then
9807                   # a loop is needed to ensure we can add subdirs of existing dirs
9808                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9809                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9810                           cf_have_incdir=yes; break
9811                         fi
9812                   done
9813                 fi
9814
9815                 if test "$cf_have_incdir" = no ; then
9816                   if test "$cf_add_incdir" = /usr/local/include ; then
9817                         if test "$GCC" = yes
9818                         then
9819                           cf_save_CPPFLAGS=$CPPFLAGS
9820                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9821                           cat >conftest.$ac_ext <<_ACEOF
9822 #line 9822 "configure"
9823 #include "confdefs.h"
9824 #include <stdio.h>
9825 int
9826 main ()
9827 {
9828 printf("Hello")
9829   ;
9830   return 0;
9831 }
9832 _ACEOF
9833 rm -f conftest.$ac_objext
9834 if { (eval echo "$as_me:9834: \"$ac_compile\"") >&5
9835   (eval $ac_compile) 2>&5
9836   ac_status=$?
9837   echo "$as_me:9837: \$? = $ac_status" >&5
9838   (exit $ac_status); } &&
9839          { ac_try='test -s conftest.$ac_objext'
9840   { (eval echo "$as_me:9840: \"$ac_try\"") >&5
9841   (eval $ac_try) 2>&5
9842   ac_status=$?
9843   echo "$as_me:9843: \$? = $ac_status" >&5
9844   (exit $ac_status); }; }; then
9845   :
9846 else
9847   echo "$as_me: failed program was:" >&5
9848 cat conftest.$ac_ext >&5
9849 cf_have_incdir=yes
9850 fi
9851 rm -f conftest.$ac_objext conftest.$ac_ext
9852                           CPPFLAGS=$cf_save_CPPFLAGS
9853                         fi
9854                   fi
9855                 fi
9856
9857                 if test "$cf_have_incdir" = no ; then
9858                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9859
9860 echo "${as_me:-configure}:9860: testing adding $cf_add_incdir to include-path ..." 1>&5
9861
9862                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9863
9864                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9865                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9866                   cf_add_incdir="$cf_top_incdir"
9867                 else
9868                   break
9869                 fi
9870           fi
9871         done
9872   done
9873 fi
9874
9875 if test -n "$cf_cv_library_path_utf8" ; then
9876   for cf_add_libdir in $cf_cv_library_path_utf8
9877   do
9878     if test $cf_add_libdir = /usr/lib ; then
9879       :
9880     elif test -d $cf_add_libdir
9881     then
9882       cf_have_libdir=no
9883       if test -n "$LDFLAGS$LIBS" ; then
9884         # a loop is needed to ensure we can add subdirs of existing dirs
9885         for cf_test_libdir in $LDFLAGS $LIBS ; do
9886           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9887             cf_have_libdir=yes; break
9888           fi
9889         done
9890       fi
9891       if test "$cf_have_libdir" = no ; then
9892         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9893
9894 echo "${as_me:-configure}:9894: testing adding $cf_add_libdir to library-path ..." 1>&5
9895
9896         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9897       fi
9898     fi
9899   done
9900 fi
9901
9902 cf_add_libs="$cf_cv_library_file_utf8"
9903 # Filter out duplicates - this happens with badly-designed ".pc" files...
9904 for cf_add_1lib in $LIBS
9905 do
9906         for cf_add_2lib in $cf_add_libs
9907         do
9908                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9909                 then
9910                         cf_add_1lib=
9911                         break
9912                 fi
9913         done
9914         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9915 done
9916 LIBS="$cf_add_libs"
9917
9918 fi
9919
9920                 if test "$cf_cv_utf8_lib" != no ; then
9921                         NCURSES_LIBUTF8=1
9922                 fi
9923         fi
9924
9925 # This is needed on Tru64 5.0 to declare mbstate_t
9926 echo "$as_me:9926: checking if we must include wchar.h to declare mbstate_t" >&5
9927 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9928 if test "${cf_cv_mbstate_t+set}" = set; then
9929   echo $ECHO_N "(cached) $ECHO_C" >&6
9930 else
9931
9932 cat >conftest.$ac_ext <<_ACEOF
9933 #line 9933 "configure"
9934 #include "confdefs.h"
9935
9936 #include <stdlib.h>
9937 #include <stdarg.h>
9938 #include <stdio.h>
9939 #ifdef HAVE_LIBUTF8_H
9940 #include <libutf8.h>
9941 #endif
9942 int
9943 main ()
9944 {
9945 mbstate_t state
9946   ;
9947   return 0;
9948 }
9949 _ACEOF
9950 rm -f conftest.$ac_objext
9951 if { (eval echo "$as_me:9951: \"$ac_compile\"") >&5
9952   (eval $ac_compile) 2>&5
9953   ac_status=$?
9954   echo "$as_me:9954: \$? = $ac_status" >&5
9955   (exit $ac_status); } &&
9956          { ac_try='test -s conftest.$ac_objext'
9957   { (eval echo "$as_me:9957: \"$ac_try\"") >&5
9958   (eval $ac_try) 2>&5
9959   ac_status=$?
9960   echo "$as_me:9960: \$? = $ac_status" >&5
9961   (exit $ac_status); }; }; then
9962   cf_cv_mbstate_t=no
9963 else
9964   echo "$as_me: failed program was:" >&5
9965 cat conftest.$ac_ext >&5
9966 cat >conftest.$ac_ext <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969
9970 #include <stdlib.h>
9971 #include <stdarg.h>
9972 #include <stdio.h>
9973 #include <wchar.h>
9974 #ifdef HAVE_LIBUTF8_H
9975 #include <libutf8.h>
9976 #endif
9977 int
9978 main ()
9979 {
9980 mbstate_t value
9981   ;
9982   return 0;
9983 }
9984 _ACEOF
9985 rm -f conftest.$ac_objext
9986 if { (eval echo "$as_me:9986: \"$ac_compile\"") >&5
9987   (eval $ac_compile) 2>&5
9988   ac_status=$?
9989   echo "$as_me:9989: \$? = $ac_status" >&5
9990   (exit $ac_status); } &&
9991          { ac_try='test -s conftest.$ac_objext'
9992   { (eval echo "$as_me:9992: \"$ac_try\"") >&5
9993   (eval $ac_try) 2>&5
9994   ac_status=$?
9995   echo "$as_me:9995: \$? = $ac_status" >&5
9996   (exit $ac_status); }; }; then
9997   cf_cv_mbstate_t=yes
9998 else
9999   echo "$as_me: failed program was:" >&5
10000 cat conftest.$ac_ext >&5
10001 cf_cv_mbstate_t=unknown
10002 fi
10003 rm -f conftest.$ac_objext conftest.$ac_ext
10004 fi
10005 rm -f conftest.$ac_objext conftest.$ac_ext
10006 fi
10007 echo "$as_me:10007: result: $cf_cv_mbstate_t" >&5
10008 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10009
10010 if test "$cf_cv_mbstate_t" = yes ; then
10011
10012 cat >>confdefs.h <<\EOF
10013 #define NEED_WCHAR_H 1
10014 EOF
10015
10016         NEED_WCHAR_H=1
10017 fi
10018
10019 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10020 if test "$cf_cv_mbstate_t" = unknown ; then
10021         NCURSES_MBSTATE_T=1
10022 fi
10023
10024 # This is needed on Tru64 5.0 to declare wchar_t
10025 echo "$as_me:10025: checking if we must include wchar.h to declare wchar_t" >&5
10026 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10027 if test "${cf_cv_wchar_t+set}" = set; then
10028   echo $ECHO_N "(cached) $ECHO_C" >&6
10029 else
10030
10031 cat >conftest.$ac_ext <<_ACEOF
10032 #line 10032 "configure"
10033 #include "confdefs.h"
10034
10035 #include <stdlib.h>
10036 #include <stdarg.h>
10037 #include <stdio.h>
10038 #ifdef HAVE_LIBUTF8_H
10039 #include <libutf8.h>
10040 #endif
10041 int
10042 main ()
10043 {
10044 wchar_t state
10045   ;
10046   return 0;
10047 }
10048 _ACEOF
10049 rm -f conftest.$ac_objext
10050 if { (eval echo "$as_me:10050: \"$ac_compile\"") >&5
10051   (eval $ac_compile) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); } &&
10055          { ac_try='test -s conftest.$ac_objext'
10056   { (eval echo "$as_me:10056: \"$ac_try\"") >&5
10057   (eval $ac_try) 2>&5
10058   ac_status=$?
10059   echo "$as_me:10059: \$? = $ac_status" >&5
10060   (exit $ac_status); }; }; then
10061   cf_cv_wchar_t=no
10062 else
10063   echo "$as_me: failed program was:" >&5
10064 cat conftest.$ac_ext >&5
10065 cat >conftest.$ac_ext <<_ACEOF
10066 #line 10066 "configure"
10067 #include "confdefs.h"
10068
10069 #include <stdlib.h>
10070 #include <stdarg.h>
10071 #include <stdio.h>
10072 #include <wchar.h>
10073 #ifdef HAVE_LIBUTF8_H
10074 #include <libutf8.h>
10075 #endif
10076 int
10077 main ()
10078 {
10079 wchar_t value
10080   ;
10081   return 0;
10082 }
10083 _ACEOF
10084 rm -f conftest.$ac_objext
10085 if { (eval echo "$as_me:10085: \"$ac_compile\"") >&5
10086   (eval $ac_compile) 2>&5
10087   ac_status=$?
10088   echo "$as_me:10088: \$? = $ac_status" >&5
10089   (exit $ac_status); } &&
10090          { ac_try='test -s conftest.$ac_objext'
10091   { (eval echo "$as_me:10091: \"$ac_try\"") >&5
10092   (eval $ac_try) 2>&5
10093   ac_status=$?
10094   echo "$as_me:10094: \$? = $ac_status" >&5
10095   (exit $ac_status); }; }; then
10096   cf_cv_wchar_t=yes
10097 else
10098   echo "$as_me: failed program was:" >&5
10099 cat conftest.$ac_ext >&5
10100 cf_cv_wchar_t=unknown
10101 fi
10102 rm -f conftest.$ac_objext conftest.$ac_ext
10103 fi
10104 rm -f conftest.$ac_objext conftest.$ac_ext
10105 fi
10106 echo "$as_me:10106: result: $cf_cv_wchar_t" >&5
10107 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10108
10109 if test "$cf_cv_wchar_t" = yes ; then
10110
10111 cat >>confdefs.h <<\EOF
10112 #define NEED_WCHAR_H 1
10113 EOF
10114
10115         NEED_WCHAR_H=1
10116 fi
10117
10118 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10119 if test "$cf_cv_wchar_t" = unknown ; then
10120         NCURSES_WCHAR_T=1
10121 fi
10122
10123 # if we find wchar_t in either place, use substitution to provide a fallback.
10124 if test "$cf_cv_wchar_t" != unknown ; then
10125         NCURSES_OK_WCHAR_T=1
10126 fi
10127
10128 # This is needed on Tru64 5.0 to declare wint_t
10129 echo "$as_me:10129: checking if we must include wchar.h to declare wint_t" >&5
10130 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10131 if test "${cf_cv_wint_t+set}" = set; then
10132   echo $ECHO_N "(cached) $ECHO_C" >&6
10133 else
10134
10135 cat >conftest.$ac_ext <<_ACEOF
10136 #line 10136 "configure"
10137 #include "confdefs.h"
10138
10139 #include <stdlib.h>
10140 #include <stdarg.h>
10141 #include <stdio.h>
10142 #ifdef HAVE_LIBUTF8_H
10143 #include <libutf8.h>
10144 #endif
10145 int
10146 main ()
10147 {
10148 wint_t state
10149   ;
10150   return 0;
10151 }
10152 _ACEOF
10153 rm -f conftest.$ac_objext
10154 if { (eval echo "$as_me:10154: \"$ac_compile\"") >&5
10155   (eval $ac_compile) 2>&5
10156   ac_status=$?
10157   echo "$as_me:10157: \$? = $ac_status" >&5
10158   (exit $ac_status); } &&
10159          { ac_try='test -s conftest.$ac_objext'
10160   { (eval echo "$as_me:10160: \"$ac_try\"") >&5
10161   (eval $ac_try) 2>&5
10162   ac_status=$?
10163   echo "$as_me:10163: \$? = $ac_status" >&5
10164   (exit $ac_status); }; }; then
10165   cf_cv_wint_t=no
10166 else
10167   echo "$as_me: failed program was:" >&5
10168 cat conftest.$ac_ext >&5
10169 cat >conftest.$ac_ext <<_ACEOF
10170 #line 10170 "configure"
10171 #include "confdefs.h"
10172
10173 #include <stdlib.h>
10174 #include <stdarg.h>
10175 #include <stdio.h>
10176 #include <wchar.h>
10177 #ifdef HAVE_LIBUTF8_H
10178 #include <libutf8.h>
10179 #endif
10180 int
10181 main ()
10182 {
10183 wint_t value
10184   ;
10185   return 0;
10186 }
10187 _ACEOF
10188 rm -f conftest.$ac_objext
10189 if { (eval echo "$as_me:10189: \"$ac_compile\"") >&5
10190   (eval $ac_compile) 2>&5
10191   ac_status=$?
10192   echo "$as_me:10192: \$? = $ac_status" >&5
10193   (exit $ac_status); } &&
10194          { ac_try='test -s conftest.$ac_objext'
10195   { (eval echo "$as_me:10195: \"$ac_try\"") >&5
10196   (eval $ac_try) 2>&5
10197   ac_status=$?
10198   echo "$as_me:10198: \$? = $ac_status" >&5
10199   (exit $ac_status); }; }; then
10200   cf_cv_wint_t=yes
10201 else
10202   echo "$as_me: failed program was:" >&5
10203 cat conftest.$ac_ext >&5
10204 cf_cv_wint_t=unknown
10205 fi
10206 rm -f conftest.$ac_objext conftest.$ac_ext
10207 fi
10208 rm -f conftest.$ac_objext conftest.$ac_ext
10209 fi
10210 echo "$as_me:10210: result: $cf_cv_wint_t" >&5
10211 echo "${ECHO_T}$cf_cv_wint_t" >&6
10212
10213 if test "$cf_cv_wint_t" = yes ; then
10214
10215 cat >>confdefs.h <<\EOF
10216 #define NEED_WCHAR_H 1
10217 EOF
10218
10219         NEED_WCHAR_H=1
10220 fi
10221
10222 # if we do not find wint_t in either place, use substitution to provide a fallback.
10223 if test "$cf_cv_wint_t" = unknown ; then
10224         NCURSES_WINT_T=1
10225 fi
10226
10227 # if we find wint_t in either place, use substitution to provide a fallback.
10228 if test "$cf_cv_wint_t" != unknown ; then
10229         NCURSES_OK_WINT_T=1
10230 fi
10231
10232         if test "$NCURSES_MBSTATE_T" != 0; then
10233
10234 cat >>confdefs.h <<\EOF
10235 #define NEED_MBSTATE_T_DEF 1
10236 EOF
10237
10238         fi
10239 fi
10240
10241 ###   use option --disable-lp64 to allow long chtype
10242 case $cf_cv_abi_version in
10243 [345]*)
10244         default_with_lp64=no
10245         ;;
10246 *)
10247         default_with_lp64=yes
10248         ;;
10249 esac
10250
10251 echo "$as_me:10251: checking whether to enable _LP64 definition in curses.h" >&5
10252 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10253
10254 # Check whether --enable-lp64 or --disable-lp64 was given.
10255 if test "${enable_lp64+set}" = set; then
10256   enableval="$enable_lp64"
10257   with_lp64=$enableval
10258 else
10259   with_lp64=$default_with_lp64
10260 fi;
10261 echo "$as_me:10261: result: $with_lp64" >&5
10262 echo "${ECHO_T}$with_lp64" >&6
10263
10264 if test "x$with_lp64" = xyes ; then
10265         cf_cv_enable_lp64=1
10266 else
10267         cf_cv_enable_lp64=0
10268 fi
10269
10270 # Check whether --enable-largefile or --disable-largefile was given.
10271 if test "${enable_largefile+set}" = set; then
10272   enableval="$enable_largefile"
10273
10274 fi;
10275 if test "$enable_largefile" != no; then
10276
10277   echo "$as_me:10277: checking for special C compiler options needed for large files" >&5
10278 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10279 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10280   echo $ECHO_N "(cached) $ECHO_C" >&6
10281 else
10282   ac_cv_sys_largefile_CC=no
10283      if test "$GCC" != yes; then
10284        ac_save_CC=$CC
10285        while :; do
10286          # IRIX 6.2 and later do not support large files by default,
10287          # so use the C compiler's -n32 option if that helps.
10288          cat >conftest.$ac_ext <<_ACEOF
10289 #line 10289 "configure"
10290 #include "confdefs.h"
10291 #include <sys/types.h>
10292  /* Check that off_t can represent 2**63 - 1 correctly.
10293     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10294     since some C++ compilers masquerading as C compilers
10295     incorrectly reject 9223372036854775807.  */
10296 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10297   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10298                        && LARGE_OFF_T % 2147483647 == 1)
10299                       ? 1 : -1];
10300 int
10301 main ()
10302 {
10303
10304   ;
10305   return 0;
10306 }
10307 _ACEOF
10308          rm -f conftest.$ac_objext
10309 if { (eval echo "$as_me:10309: \"$ac_compile\"") >&5
10310   (eval $ac_compile) 2>&5
10311   ac_status=$?
10312   echo "$as_me:10312: \$? = $ac_status" >&5
10313   (exit $ac_status); } &&
10314          { ac_try='test -s conftest.$ac_objext'
10315   { (eval echo "$as_me:10315: \"$ac_try\"") >&5
10316   (eval $ac_try) 2>&5
10317   ac_status=$?
10318   echo "$as_me:10318: \$? = $ac_status" >&5
10319   (exit $ac_status); }; }; then
10320   break
10321 else
10322   echo "$as_me: failed program was:" >&5
10323 cat conftest.$ac_ext >&5
10324 fi
10325 rm -f conftest.$ac_objext
10326          CC="$CC -n32"
10327          rm -f conftest.$ac_objext
10328 if { (eval echo "$as_me:10328: \"$ac_compile\"") >&5
10329   (eval $ac_compile) 2>&5
10330   ac_status=$?
10331   echo "$as_me:10331: \$? = $ac_status" >&5
10332   (exit $ac_status); } &&
10333          { ac_try='test -s conftest.$ac_objext'
10334   { (eval echo "$as_me:10334: \"$ac_try\"") >&5
10335   (eval $ac_try) 2>&5
10336   ac_status=$?
10337   echo "$as_me:10337: \$? = $ac_status" >&5
10338   (exit $ac_status); }; }; then
10339   ac_cv_sys_largefile_CC=' -n32'; break
10340 else
10341   echo "$as_me: failed program was:" >&5
10342 cat conftest.$ac_ext >&5
10343 fi
10344 rm -f conftest.$ac_objext
10345          break
10346        done
10347        CC=$ac_save_CC
10348        rm -f conftest.$ac_ext
10349     fi
10350 fi
10351 echo "$as_me:10351: result: $ac_cv_sys_largefile_CC" >&5
10352 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10353   if test "$ac_cv_sys_largefile_CC" != no; then
10354     CC=$CC$ac_cv_sys_largefile_CC
10355   fi
10356
10357   echo "$as_me:10357: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10358 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10359 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10360   echo $ECHO_N "(cached) $ECHO_C" >&6
10361 else
10362   while :; do
10363   ac_cv_sys_file_offset_bits=no
10364   cat >conftest.$ac_ext <<_ACEOF
10365 #line 10365 "configure"
10366 #include "confdefs.h"
10367 #include <sys/types.h>
10368  /* Check that off_t can represent 2**63 - 1 correctly.
10369     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10370     since some C++ compilers masquerading as C compilers
10371     incorrectly reject 9223372036854775807.  */
10372 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10373   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10374                        && LARGE_OFF_T % 2147483647 == 1)
10375                       ? 1 : -1];
10376 int
10377 main ()
10378 {
10379
10380   ;
10381   return 0;
10382 }
10383 _ACEOF
10384 rm -f conftest.$ac_objext
10385 if { (eval echo "$as_me:10385: \"$ac_compile\"") >&5
10386   (eval $ac_compile) 2>&5
10387   ac_status=$?
10388   echo "$as_me:10388: \$? = $ac_status" >&5
10389   (exit $ac_status); } &&
10390          { ac_try='test -s conftest.$ac_objext'
10391   { (eval echo "$as_me:10391: \"$ac_try\"") >&5
10392   (eval $ac_try) 2>&5
10393   ac_status=$?
10394   echo "$as_me:10394: \$? = $ac_status" >&5
10395   (exit $ac_status); }; }; then
10396   break
10397 else
10398   echo "$as_me: failed program was:" >&5
10399 cat conftest.$ac_ext >&5
10400 fi
10401 rm -f conftest.$ac_objext conftest.$ac_ext
10402   cat >conftest.$ac_ext <<_ACEOF
10403 #line 10403 "configure"
10404 #include "confdefs.h"
10405 #define _FILE_OFFSET_BITS 64
10406 #include <sys/types.h>
10407  /* Check that off_t can represent 2**63 - 1 correctly.
10408     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10409     since some C++ compilers masquerading as C compilers
10410     incorrectly reject 9223372036854775807.  */
10411 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10412   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10413                        && LARGE_OFF_T % 2147483647 == 1)
10414                       ? 1 : -1];
10415 int
10416 main ()
10417 {
10418
10419   ;
10420   return 0;
10421 }
10422 _ACEOF
10423 rm -f conftest.$ac_objext
10424 if { (eval echo "$as_me:10424: \"$ac_compile\"") >&5
10425   (eval $ac_compile) 2>&5
10426   ac_status=$?
10427   echo "$as_me:10427: \$? = $ac_status" >&5
10428   (exit $ac_status); } &&
10429          { ac_try='test -s conftest.$ac_objext'
10430   { (eval echo "$as_me:10430: \"$ac_try\"") >&5
10431   (eval $ac_try) 2>&5
10432   ac_status=$?
10433   echo "$as_me:10433: \$? = $ac_status" >&5
10434   (exit $ac_status); }; }; then
10435   ac_cv_sys_file_offset_bits=64; break
10436 else
10437   echo "$as_me: failed program was:" >&5
10438 cat conftest.$ac_ext >&5
10439 fi
10440 rm -f conftest.$ac_objext conftest.$ac_ext
10441   break
10442 done
10443 fi
10444 echo "$as_me:10444: result: $ac_cv_sys_file_offset_bits" >&5
10445 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10446 if test "$ac_cv_sys_file_offset_bits" != no; then
10447
10448 cat >>confdefs.h <<EOF
10449 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10450 EOF
10451
10452 fi
10453 rm -rf conftest*
10454   echo "$as_me:10454: checking for _LARGE_FILES value needed for large files" >&5
10455 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10456 if test "${ac_cv_sys_large_files+set}" = set; then
10457   echo $ECHO_N "(cached) $ECHO_C" >&6
10458 else
10459   while :; do
10460   ac_cv_sys_large_files=no
10461   cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464 #include <sys/types.h>
10465  /* Check that off_t can represent 2**63 - 1 correctly.
10466     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10467     since some C++ compilers masquerading as C compilers
10468     incorrectly reject 9223372036854775807.  */
10469 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10470   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10471                        && LARGE_OFF_T % 2147483647 == 1)
10472                       ? 1 : -1];
10473 int
10474 main ()
10475 {
10476
10477   ;
10478   return 0;
10479 }
10480 _ACEOF
10481 rm -f conftest.$ac_objext
10482 if { (eval echo "$as_me:10482: \"$ac_compile\"") >&5
10483   (eval $ac_compile) 2>&5
10484   ac_status=$?
10485   echo "$as_me:10485: \$? = $ac_status" >&5
10486   (exit $ac_status); } &&
10487          { ac_try='test -s conftest.$ac_objext'
10488   { (eval echo "$as_me:10488: \"$ac_try\"") >&5
10489   (eval $ac_try) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); }; }; then
10493   break
10494 else
10495   echo "$as_me: failed program was:" >&5
10496 cat conftest.$ac_ext >&5
10497 fi
10498 rm -f conftest.$ac_objext conftest.$ac_ext
10499   cat >conftest.$ac_ext <<_ACEOF
10500 #line 10500 "configure"
10501 #include "confdefs.h"
10502 #define _LARGE_FILES 1
10503 #include <sys/types.h>
10504  /* Check that off_t can represent 2**63 - 1 correctly.
10505     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10506     since some C++ compilers masquerading as C compilers
10507     incorrectly reject 9223372036854775807.  */
10508 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10509   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10510                        && LARGE_OFF_T % 2147483647 == 1)
10511                       ? 1 : -1];
10512 int
10513 main ()
10514 {
10515
10516   ;
10517   return 0;
10518 }
10519 _ACEOF
10520 rm -f conftest.$ac_objext
10521 if { (eval echo "$as_me:10521: \"$ac_compile\"") >&5
10522   (eval $ac_compile) 2>&5
10523   ac_status=$?
10524   echo "$as_me:10524: \$? = $ac_status" >&5
10525   (exit $ac_status); } &&
10526          { ac_try='test -s conftest.$ac_objext'
10527   { (eval echo "$as_me:10527: \"$ac_try\"") >&5
10528   (eval $ac_try) 2>&5
10529   ac_status=$?
10530   echo "$as_me:10530: \$? = $ac_status" >&5
10531   (exit $ac_status); }; }; then
10532   ac_cv_sys_large_files=1; break
10533 else
10534   echo "$as_me: failed program was:" >&5
10535 cat conftest.$ac_ext >&5
10536 fi
10537 rm -f conftest.$ac_objext conftest.$ac_ext
10538   break
10539 done
10540 fi
10541 echo "$as_me:10541: result: $ac_cv_sys_large_files" >&5
10542 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10543 if test "$ac_cv_sys_large_files" != no; then
10544
10545 cat >>confdefs.h <<EOF
10546 #define _LARGE_FILES $ac_cv_sys_large_files
10547 EOF
10548
10549 fi
10550 rm -rf conftest*
10551 fi
10552
10553     if test "$enable_largefile" != no ; then
10554         echo "$as_me:10554: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10555 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10556 if test "${ac_cv_sys_largefile_source+set}" = set; then
10557   echo $ECHO_N "(cached) $ECHO_C" >&6
10558 else
10559   while :; do
10560   ac_cv_sys_largefile_source=no
10561   cat >conftest.$ac_ext <<_ACEOF
10562 #line 10562 "configure"
10563 #include "confdefs.h"
10564 #include <stdio.h>
10565 int
10566 main ()
10567 {
10568 return !fseeko;
10569   ;
10570   return 0;
10571 }
10572 _ACEOF
10573 rm -f conftest.$ac_objext
10574 if { (eval echo "$as_me:10574: \"$ac_compile\"") >&5
10575   (eval $ac_compile) 2>&5
10576   ac_status=$?
10577   echo "$as_me:10577: \$? = $ac_status" >&5
10578   (exit $ac_status); } &&
10579          { ac_try='test -s conftest.$ac_objext'
10580   { (eval echo "$as_me:10580: \"$ac_try\"") >&5
10581   (eval $ac_try) 2>&5
10582   ac_status=$?
10583   echo "$as_me:10583: \$? = $ac_status" >&5
10584   (exit $ac_status); }; }; then
10585   break
10586 else
10587   echo "$as_me: failed program was:" >&5
10588 cat conftest.$ac_ext >&5
10589 fi
10590 rm -f conftest.$ac_objext conftest.$ac_ext
10591   cat >conftest.$ac_ext <<_ACEOF
10592 #line 10592 "configure"
10593 #include "confdefs.h"
10594 #define _LARGEFILE_SOURCE 1
10595 #include <stdio.h>
10596 int
10597 main ()
10598 {
10599 return !fseeko;
10600   ;
10601   return 0;
10602 }
10603 _ACEOF
10604 rm -f conftest.$ac_objext
10605 if { (eval echo "$as_me:10605: \"$ac_compile\"") >&5
10606   (eval $ac_compile) 2>&5
10607   ac_status=$?
10608   echo "$as_me:10608: \$? = $ac_status" >&5
10609   (exit $ac_status); } &&
10610          { ac_try='test -s conftest.$ac_objext'
10611   { (eval echo "$as_me:10611: \"$ac_try\"") >&5
10612   (eval $ac_try) 2>&5
10613   ac_status=$?
10614   echo "$as_me:10614: \$? = $ac_status" >&5
10615   (exit $ac_status); }; }; then
10616   ac_cv_sys_largefile_source=1; break
10617 else
10618   echo "$as_me: failed program was:" >&5
10619 cat conftest.$ac_ext >&5
10620 fi
10621 rm -f conftest.$ac_objext conftest.$ac_ext
10622   break
10623 done
10624 fi
10625 echo "$as_me:10625: result: $ac_cv_sys_largefile_source" >&5
10626 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10627 if test "$ac_cv_sys_largefile_source" != no; then
10628
10629 cat >>confdefs.h <<EOF
10630 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10631 EOF
10632
10633 fi
10634 rm -rf conftest*
10635
10636 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10637 # in glibc 2.1.3, but that breaks too many other things.
10638 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10639 echo "$as_me:10639: checking for fseeko" >&5
10640 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10641 if test "${ac_cv_func_fseeko+set}" = set; then
10642   echo $ECHO_N "(cached) $ECHO_C" >&6
10643 else
10644   cat >conftest.$ac_ext <<_ACEOF
10645 #line 10645 "configure"
10646 #include "confdefs.h"
10647 #include <stdio.h>
10648 int
10649 main ()
10650 {
10651 return fseeko && fseeko (stdin, 0, 0);
10652   ;
10653   return 0;
10654 }
10655 _ACEOF
10656 rm -f conftest.$ac_objext conftest$ac_exeext
10657 if { (eval echo "$as_me:10657: \"$ac_link\"") >&5
10658   (eval $ac_link) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit $ac_status); } &&
10662          { ac_try='test -s conftest$ac_exeext'
10663   { (eval echo "$as_me:10663: \"$ac_try\"") >&5
10664   (eval $ac_try) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit $ac_status); }; }; then
10668   ac_cv_func_fseeko=yes
10669 else
10670   echo "$as_me: failed program was:" >&5
10671 cat conftest.$ac_ext >&5
10672 ac_cv_func_fseeko=no
10673 fi
10674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10675 fi
10676 echo "$as_me:10676: result: $ac_cv_func_fseeko" >&5
10677 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10678 if test $ac_cv_func_fseeko = yes; then
10679
10680 cat >>confdefs.h <<\EOF
10681 #define HAVE_FSEEKO 1
10682 EOF
10683
10684 fi
10685
10686         # Normally we would collect these definitions in the config.h,
10687         # but (like _XOPEN_SOURCE), some environments rely on having these
10688         # defined before any of the system headers are included.  Another
10689         # case comes up with C++, e.g., on AIX the compiler compiles the
10690         # header files by themselves before looking at the body files it is
10691         # told to compile.  For ncurses, those header files do not include
10692         # the config.h
10693         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10694         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10695         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10696
10697         echo "$as_me:10697: checking whether to use struct dirent64" >&5
10698 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10699 if test "${cf_cv_struct_dirent64+set}" = set; then
10700   echo $ECHO_N "(cached) $ECHO_C" >&6
10701 else
10702
10703                 cat >conftest.$ac_ext <<_ACEOF
10704 #line 10704 "configure"
10705 #include "confdefs.h"
10706
10707 #include <sys/types.h>
10708 #include <dirent.h>
10709
10710 int
10711 main ()
10712 {
10713
10714                 /* if transitional largefile support is setup, this is true */
10715                 extern struct dirent64 * readdir(DIR *);
10716                 struct dirent64 *x = readdir((DIR *)0);
10717                 struct dirent *y = readdir((DIR *)0);
10718                 int z = x - y;
10719
10720   ;
10721   return 0;
10722 }
10723 _ACEOF
10724 rm -f conftest.$ac_objext
10725 if { (eval echo "$as_me:10725: \"$ac_compile\"") >&5
10726   (eval $ac_compile) 2>&5
10727   ac_status=$?
10728   echo "$as_me:10728: \$? = $ac_status" >&5
10729   (exit $ac_status); } &&
10730          { ac_try='test -s conftest.$ac_objext'
10731   { (eval echo "$as_me:10731: \"$ac_try\"") >&5
10732   (eval $ac_try) 2>&5
10733   ac_status=$?
10734   echo "$as_me:10734: \$? = $ac_status" >&5
10735   (exit $ac_status); }; }; then
10736   cf_cv_struct_dirent64=yes
10737 else
10738   echo "$as_me: failed program was:" >&5
10739 cat conftest.$ac_ext >&5
10740 cf_cv_struct_dirent64=no
10741 fi
10742 rm -f conftest.$ac_objext conftest.$ac_ext
10743
10744 fi
10745 echo "$as_me:10745: result: $cf_cv_struct_dirent64" >&5
10746 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10747         test "$cf_cv_struct_dirent64" = yes &&
10748 cat >>confdefs.h <<\EOF
10749 #define HAVE_STRUCT_DIRENT64 1
10750 EOF
10751
10752     fi
10753
10754 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10755 echo "$as_me:10755: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10756 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10757
10758 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10759 if test "${enable_tparm_varargs+set}" = set; then
10760   enableval="$enable_tparm_varargs"
10761   with_tparm_varargs=$enableval
10762 else
10763   with_tparm_varargs=yes
10764 fi;
10765 echo "$as_me:10765: result: $with_tparm_varargs" >&5
10766 echo "${ECHO_T}$with_tparm_varargs" >&6
10767 NCURSES_TPARM_VARARGS=0
10768 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10769
10770 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10771 if test "$with_ticlib" != no ; then
10772 echo "$as_me:10772: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10773 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10774
10775 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10776 if test "${enable_tic_depends+set}" = set; then
10777   enableval="$enable_tic_depends"
10778   with_tic_depends=$enableval
10779 else
10780   with_tic_depends=yes
10781 fi;
10782 echo "$as_me:10782: result: $with_tic_depends" >&5
10783 echo "${ECHO_T}$with_tic_depends" >&6
10784 else
10785         with_tic_depends=no
10786 fi
10787
10788 ###   use option --with-bool to override bool's type
10789 echo "$as_me:10789: checking for type of bool" >&5
10790 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10791
10792 # Check whether --with-bool or --without-bool was given.
10793 if test "${with_bool+set}" = set; then
10794   withval="$with_bool"
10795   NCURSES_BOOL="$withval"
10796 else
10797   NCURSES_BOOL=auto
10798 fi;
10799 echo "$as_me:10799: result: $NCURSES_BOOL" >&5
10800 echo "${ECHO_T}$NCURSES_BOOL" >&6
10801
10802 echo "$as_me:10802: checking for alternate terminal capabilities file" >&5
10803 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10804
10805 # Check whether --with-caps or --without-caps was given.
10806 if test "${with_caps+set}" = set; then
10807   withval="$with_caps"
10808   TERMINFO_CAPS=Caps.$withval
10809 else
10810   TERMINFO_CAPS=Caps
10811 fi;
10812 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10813 echo "$as_me:10813: result: $TERMINFO_CAPS" >&5
10814 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10815
10816 ###   use option --with-chtype to override chtype's type
10817 echo "$as_me:10817: checking for type of chtype" >&5
10818 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10819
10820 # Check whether --with-chtype or --without-chtype was given.
10821 if test "${with_chtype+set}" = set; then
10822   withval="$with_chtype"
10823   NCURSES_CHTYPE="$withval"
10824 else
10825   NCURSES_CHTYPE=auto
10826 fi;
10827 echo "$as_me:10827: result: $NCURSES_CHTYPE" >&5
10828 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10829
10830 ###   use option --with-ospeed to override ospeed's type
10831 echo "$as_me:10831: checking for type of ospeed" >&5
10832 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10833
10834 # Check whether --with-ospeed or --without-ospeed was given.
10835 if test "${with_ospeed+set}" = set; then
10836   withval="$with_ospeed"
10837   NCURSES_OSPEED="$withval"
10838 else
10839   NCURSES_OSPEED=short
10840 fi;
10841 echo "$as_me:10841: result: $NCURSES_OSPEED" >&5
10842 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10843
10844 ###   use option --with-mmask-t to override mmask_t's type
10845 echo "$as_me:10845: checking for type of mmask_t" >&5
10846 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10847
10848 # Check whether --with-mmask-t or --without-mmask-t was given.
10849 if test "${with_mmask_t+set}" = set; then
10850   withval="$with_mmask_t"
10851   NCURSES_MMASK_T="$withval"
10852 else
10853   NCURSES_MMASK_T=auto
10854 fi;
10855 echo "$as_me:10855: result: $NCURSES_MMASK_T" >&5
10856 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10857
10858 ###   use option --with-ccharw-max to override CCHARW_MAX size
10859 echo "$as_me:10859: checking for size CCHARW_MAX" >&5
10860 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10861
10862 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10863 if test "${with_ccharw_max+set}" = set; then
10864   withval="$with_ccharw_max"
10865   NCURSES_CCHARW_MAX="$withval"
10866 else
10867   NCURSES_CCHARW_MAX=5
10868 fi;
10869 echo "$as_me:10869: result: $NCURSES_CCHARW_MAX" >&5
10870 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10871
10872 ###   use option --with-tparm-arg to override tparm's argument type
10873 echo "$as_me:10873: checking for type of tparm args" >&5
10874 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10875
10876 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10877 if test "${with_tparm_arg+set}" = set; then
10878   withval="$with_tparm_arg"
10879   NCURSES_TPARM_ARG="$withval"
10880 else
10881   NCURSES_TPARM_ARG=long
10882 fi;
10883 echo "$as_me:10883: result: $NCURSES_TPARM_ARG" >&5
10884 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10885
10886 ### Enable compiling-in rcs id's
10887 echo "$as_me:10887: checking if RCS identifiers should be compiled-in" >&5
10888 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10889
10890 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10891 if test "${with_rcs_ids+set}" = set; then
10892   withval="$with_rcs_ids"
10893   with_rcs_ids=$withval
10894 else
10895   with_rcs_ids=no
10896 fi;
10897 echo "$as_me:10897: result: $with_rcs_ids" >&5
10898 echo "${ECHO_T}$with_rcs_ids" >&6
10899 test "x$with_rcs_ids" = xyes &&
10900 cat >>confdefs.h <<\EOF
10901 #define USE_RCS_IDS 1
10902 EOF
10903
10904 ###############################################################################
10905
10906 echo "$as_me:10906: checking format of man-pages" >&5
10907 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10908
10909 # Check whether --with-manpage-format or --without-manpage-format was given.
10910 if test "${with_manpage_format+set}" = set; then
10911   withval="$with_manpage_format"
10912   MANPAGE_FORMAT=$withval
10913 else
10914   MANPAGE_FORMAT=unknown
10915 fi;
10916
10917 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10918 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10919
10920 cf_unknown=
10921
10922 case $MANPAGE_FORMAT in
10923 unknown)
10924   if test -z "$MANPATH" ; then
10925     MANPATH="/usr/man:/usr/share/man"
10926   fi
10927
10928   # look for the 'date' man-page (it's most likely to be installed!)
10929   MANPAGE_FORMAT=
10930   cf_preform=no
10931   cf_catonly=yes
10932   cf_example=date
10933
10934   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10935   for cf_dir in $MANPATH; do
10936     test -z "$cf_dir" && cf_dir=/usr/man
10937     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
10938     do
10939       cf_test=`echo $cf_name | sed -e 's/*//'`
10940       if test "x$cf_test" = "x$cf_name" ; then
10941
10942         case "$cf_name" in
10943         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10944         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10945         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10946         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10947         esac
10948
10949         case "$cf_name" in
10950         $cf_dir/man*)
10951           cf_catonly=no
10952           ;;
10953         $cf_dir/cat*)
10954           cf_preform=yes
10955           ;;
10956         esac
10957         break
10958       fi
10959
10960       # if we found a match in either man* or cat*, stop looking
10961       if test -n "$MANPAGE_FORMAT" ; then
10962         cf_found=no
10963         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10964         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10965         case "$cf_name" in
10966         $cf_dir/cat*)
10967           cf_found=yes
10968           ;;
10969         esac
10970         test $cf_found=yes && break
10971       fi
10972     done
10973     # only check the first directory in $MANPATH where we find manpages
10974     if test -n "$MANPAGE_FORMAT" ; then
10975        break
10976     fi
10977   done
10978   # if we did not find the example, just assume it is normal
10979   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10980   IFS="$ac_save_ifs"
10981   ;;
10982 *)
10983   for cf_option in $MANPAGE_FORMAT; do
10984      case $cf_option in #(vi
10985      gzip|compress|BSDI|normal|formatted|catonly)
10986        ;;
10987      *)
10988        cf_unknown="$cf_unknown $cf_option"
10989        ;;
10990      esac
10991   done
10992   ;;
10993 esac
10994
10995 echo "$as_me:10995: result: $MANPAGE_FORMAT" >&5
10996 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10997 if test -n "$cf_unknown" ; then
10998   { echo "$as_me:10998: WARNING: Unexpected manpage-format $cf_unknown" >&5
10999 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11000 fi
11001
11002 echo "$as_me:11002: checking for manpage renaming" >&5
11003 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11004
11005 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11006 if test "${with_manpage_renames+set}" = set; then
11007   withval="$with_manpage_renames"
11008   MANPAGE_RENAMES=$withval
11009 else
11010   MANPAGE_RENAMES=yes
11011 fi;
11012
11013 case ".$MANPAGE_RENAMES" in #(vi
11014 .no) #(vi
11015   ;;
11016 .|.yes)
11017   # Debian 'man' program?
11018   if test -f /etc/debian_version ; then
11019     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11020   else
11021     MANPAGE_RENAMES=no
11022   fi
11023   ;;
11024 esac
11025
11026 if test "$MANPAGE_RENAMES" != no ; then
11027   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11028     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11029   elif test ! -f $MANPAGE_RENAMES ; then
11030     { { echo "$as_me:11030: error: not a filename: $MANPAGE_RENAMES" >&5
11031 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11032    { (exit 1); exit 1; }; }
11033   fi
11034
11035   test ! -d man && mkdir man
11036
11037   # Construct a sed-script to perform renaming within man-pages
11038   if test -n "$MANPAGE_RENAMES" ; then
11039     test ! -d man && mkdir man
11040     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11041   fi
11042 fi
11043
11044 echo "$as_me:11044: result: $MANPAGE_RENAMES" >&5
11045 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11046
11047 echo "$as_me:11047: checking if manpage aliases will be installed" >&5
11048 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11049
11050 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11051 if test "${with_manpage_aliases+set}" = set; then
11052   withval="$with_manpage_aliases"
11053   MANPAGE_ALIASES=$withval
11054 else
11055   MANPAGE_ALIASES=yes
11056 fi;
11057
11058 echo "$as_me:11058: result: $MANPAGE_ALIASES" >&5
11059 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11060
11061 case "x$LN_S" in #(vi
11062 xln*) #(vi
11063         cf_use_symlinks=yes
11064         ;;
11065 *)
11066         cf_use_symlinks=no
11067         ;;
11068 esac
11069
11070 MANPAGE_SYMLINKS=no
11071 if test "$MANPAGE_ALIASES" = yes ; then
11072 echo "$as_me:11072: checking if manpage symlinks should be used" >&5
11073 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11074
11075 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11076 if test "${with_manpage_symlinks+set}" = set; then
11077   withval="$with_manpage_symlinks"
11078   MANPAGE_SYMLINKS=$withval
11079 else
11080   MANPAGE_SYMLINKS=$cf_use_symlinks
11081 fi;
11082
11083 if test "$$cf_use_symlinks" = no; then
11084 if test "$MANPAGE_SYMLINKS" = yes ; then
11085         { echo "$as_me:11085: WARNING: cannot make symlinks" >&5
11086 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11087         MANPAGE_SYMLINKS=no
11088 fi
11089 fi
11090
11091 echo "$as_me:11091: result: $MANPAGE_SYMLINKS" >&5
11092 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11093 fi
11094
11095 echo "$as_me:11095: checking for manpage tbl" >&5
11096 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11097
11098 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11099 if test "${with_manpage_tbl+set}" = set; then
11100   withval="$with_manpage_tbl"
11101   MANPAGE_TBL=$withval
11102 else
11103   MANPAGE_TBL=no
11104 fi;
11105
11106 echo "$as_me:11106: result: $MANPAGE_TBL" >&5
11107 echo "${ECHO_T}$MANPAGE_TBL" >&6
11108
11109   if test "$prefix" = "NONE" ; then
11110      cf_prefix="$ac_default_prefix"
11111   else
11112      cf_prefix="$prefix"
11113   fi
11114
11115   case "$MANPAGE_FORMAT" in # (vi
11116   *catonly*) # (vi
11117     cf_format=yes
11118     cf_inboth=no
11119     ;;
11120   *formatted*) # (vi
11121     cf_format=yes
11122     cf_inboth=yes
11123     ;;
11124   *)
11125     cf_format=no
11126     cf_inboth=no
11127     ;;
11128   esac
11129
11130 test ! -d man && mkdir man
11131
11132 cf_so_strip=
11133 cf_compress=
11134 case "$MANPAGE_FORMAT" in #(vi
11135 *compress*) #(vi
11136         cf_so_strip="Z"
11137         cf_compress=compress
11138   ;;
11139 *gzip*)
11140         cf_so_strip="gz"
11141         cf_compress=gzip
11142   ;;
11143 esac
11144
11145 cf_edit_man=./edit_man.sh
11146 cf_man_alias=`pwd`/man_alias.sed
11147
11148 cat >$cf_edit_man <<CF_EOF
11149 #! /bin/sh
11150 # this script is generated by the configure-script CF_MAN_PAGES macro.
11151
11152 prefix="$cf_prefix"
11153 datarootdir="$datarootdir"
11154 datadir="$datadir"
11155
11156 NCURSES_MAJOR="$NCURSES_MAJOR"
11157 NCURSES_MINOR="$NCURSES_MINOR"
11158 NCURSES_PATCH="$NCURSES_PATCH"
11159
11160 NCURSES_OSPEED="$NCURSES_OSPEED"
11161 TERMINFO="$TERMINFO"
11162
11163 INSTALL="$INSTALL"
11164 INSTALL_DATA="$INSTALL_DATA"
11165
11166 transform="$program_transform_name"
11167
11168 TMP=\${TMPDIR:=/tmp}/man\$\$
11169 trap "rm -f \$TMP" 0 1 2 5 15
11170
11171 form=\$1
11172 shift || exit 1
11173
11174 verb=\$1
11175 shift || exit 1
11176
11177 mandir=\$1
11178 shift || exit 1
11179
11180 srcdir=\$1
11181 top_srcdir=\$srcdir/..
11182 shift || exit 1
11183
11184 if test "\$form" = normal ; then
11185         if test "$cf_format" = yes ; then
11186         if test "$cf_inboth" = no ; then
11187                 sh \$0 format \$verb \$mandir \$srcdir \$*
11188                 exit $?
11189         fi
11190         fi
11191         cf_subdir=\$mandir/man
11192         cf_tables=$MANPAGE_TBL
11193 else
11194         cf_subdir=\$mandir/cat
11195         cf_tables=yes
11196 fi
11197
11198 # process the list of source-files
11199 for i in \$* ; do
11200 case \$i in #(vi
11201 *.orig|*.rej) ;; #(vi
11202 *.[0-9]*)
11203         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11204         if test \$verb = installing ; then
11205         if test ! -d \$cf_subdir\${section} ; then
11206                 mkdir -p \$cf_subdir\$section
11207         fi
11208         fi
11209
11210         # replace variables in man page
11211         if test ! -f $cf_man_alias ; then
11212 cat >>$cf_man_alias <<-CF_EOF2
11213                 s,@DATADIR@,\$datadir,g
11214                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11215                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11216                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11217                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11218                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11219                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11220 CF_EOF
11221
11222         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11223         do
11224                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11225                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11226 cat >>$cf_edit_man <<-CF_EOF
11227                 s,@$cf_NAME@,$cf_name,g
11228 CF_EOF
11229         done
11230
11231 cat >>$cf_edit_man <<CF_EOF
11232 CF_EOF2
11233                 echo "...made $cf_man_alias"
11234         fi
11235
11236         aliases=
11237         cf_source=\`basename \$i\`
11238         inalias=\$cf_source
11239         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11240         if test ! -f \$inalias ; then
11241                 echo .. skipped \$cf_source
11242                 continue
11243         fi
11244 CF_EOF
11245
11246 if test "$MANPAGE_ALIASES" != no ; then
11247 cat >>$cf_edit_man <<CF_EOF
11248         nCurses=ignore.3x
11249         test $with_curses_h = yes && nCurses=ncurses.3x
11250         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11251 CF_EOF
11252 fi
11253
11254 if test "$MANPAGE_RENAMES" = no ; then
11255 cat >>$cf_edit_man <<CF_EOF
11256         # perform program transformations for section 1 man pages
11257         if test \$section = 1 ; then
11258                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11259         else
11260                 cf_target=\$cf_subdir\${section}/\$cf_source
11261         fi
11262 CF_EOF
11263 else
11264 cat >>$cf_edit_man <<CF_EOF
11265         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11266         if test -z "\$cf_target" ; then
11267                 echo '? missing rename for '\$cf_source
11268                 cf_target="\$cf_source"
11269         fi
11270         cf_target="\$cf_subdir\${section}/\${cf_target}"
11271
11272 CF_EOF
11273 fi
11274
11275 cat >>$cf_edit_man <<CF_EOF
11276         sed     -f $cf_man_alias \\
11277 CF_EOF
11278
11279 if test -f $MANPAGE_RENAMES ; then
11280 cat >>$cf_edit_man <<CF_EOF
11281                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11282 CF_EOF
11283 else
11284 cat >>$cf_edit_man <<CF_EOF
11285                 < \$i >\$TMP
11286 CF_EOF
11287 fi
11288
11289 cat >>$cf_edit_man <<CF_EOF
11290 if test \$cf_tables = yes ; then
11291         tbl \$TMP >\$TMP.out
11292         mv \$TMP.out \$TMP
11293 fi
11294 CF_EOF
11295
11296 if test $with_overwrite != yes ; then
11297 cat >>$cf_edit_man <<CF_EOF
11298         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11299         mv \$TMP.out \$TMP
11300 CF_EOF
11301 fi
11302
11303 if test $with_curses_h != yes ; then
11304 cat >>$cf_edit_man <<CF_EOF
11305         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11306         mv \$TMP.out \$TMP
11307 CF_EOF
11308 fi
11309
11310 cat >>$cf_edit_man <<CF_EOF
11311         if test \$form = format ; then
11312                 nroff -man \$TMP >\$TMP.out
11313                 mv \$TMP.out \$TMP
11314         fi
11315 CF_EOF
11316
11317 if test -n "$cf_compress" ; then
11318 cat >>$cf_edit_man <<CF_EOF
11319         if test \$verb = installing ; then
11320         if ( $cf_compress -f \$TMP )
11321         then
11322                 mv \$TMP.$cf_so_strip \$TMP
11323         fi
11324         fi
11325         cf_target="\$cf_target.$cf_so_strip"
11326 CF_EOF
11327 fi
11328
11329 case "$MANPAGE_FORMAT" in #(vi
11330 *BSDI*)
11331 cat >>$cf_edit_man <<CF_EOF
11332         if test \$form = format ; then
11333                 # BSDI installs only .0 suffixes in the cat directories
11334                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11335         fi
11336 CF_EOF
11337   ;;
11338 esac
11339
11340 cat >>$cf_edit_man <<CF_EOF
11341         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11342         if test \$verb = installing ; then
11343                 echo \$verb \$cf_target
11344                 \$INSTALL_DATA \$TMP \$cf_target
11345                 test -d \$cf_subdir\${section} &&
11346                 test -n "\$aliases" && (
11347                         cd \$cf_subdir\${section} && (
11348                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11349                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11350                                 cf_target=\`basename \$cf_target\`
11351                                 for cf_alias in \$aliases
11352                                 do
11353                                         if test \$section = 1 ; then
11354                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11355                                         fi
11356
11357                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11358                                                 if test -f \$cf_alias\${suffix} ; then
11359                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11360                                                         then
11361                                                                 continue
11362                                                         fi
11363                                                 fi
11364                                                 echo .. \$verb alias \$cf_alias\${suffix}
11365 CF_EOF
11366 case "x$LN_S" in #(vi
11367 *-f) #(vi
11368 cat >>$cf_edit_man <<CF_EOF
11369                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11370 CF_EOF
11371         ;;
11372 *)
11373 cat >>$cf_edit_man <<CF_EOF
11374                                                 rm -f \$cf_alias\${suffix}
11375                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11376 CF_EOF
11377         ;;
11378 esac
11379 cat >>$cf_edit_man <<CF_EOF
11380                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11381                                                 echo ".so \$cf_source" >\$TMP
11382 CF_EOF
11383 if test -n "$cf_compress" ; then
11384 cat >>$cf_edit_man <<CF_EOF
11385                                                 if test -n "$cf_so_strip" ; then
11386                                                         $cf_compress -f \$TMP
11387                                                         mv \$TMP.$cf_so_strip \$TMP
11388                                                 fi
11389 CF_EOF
11390 fi
11391 cat >>$cf_edit_man <<CF_EOF
11392                                                 echo .. \$verb alias \$cf_alias\${suffix}
11393                                                 rm -f \$cf_alias\${suffix}
11394                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11395                                         fi
11396                                 done
11397                         )
11398                 )
11399         elif test \$verb = removing ; then
11400                 test -f \$cf_target && (
11401                         echo \$verb \$cf_target
11402                         rm -f \$cf_target
11403                 )
11404                 test -d \$cf_subdir\${section} &&
11405                 test -n "\$aliases" && (
11406                         cd \$cf_subdir\${section} && (
11407                                 for cf_alias in \$aliases
11408                                 do
11409                                         if test \$section = 1 ; then
11410                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11411                                         fi
11412
11413                                         echo .. \$verb alias \$cf_alias\${suffix}
11414                                         rm -f \$cf_alias\${suffix}
11415                                 done
11416                         )
11417                 )
11418         else
11419 #               echo ".hy 0"
11420                 cat \$TMP
11421         fi
11422         ;;
11423 esac
11424 done
11425
11426 if test $cf_inboth = yes ; then
11427 if test \$form != format ; then
11428         sh \$0 format \$verb \$mandir \$srcdir \$*
11429 fi
11430 fi
11431
11432 exit 0
11433 CF_EOF
11434 chmod 755 $cf_edit_man
11435
11436 ###############################################################################
11437
11438 ### Note that some functions (such as const) are normally disabled anyway.
11439 echo "$as_me:11439: checking if you want to build with function extensions" >&5
11440 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11441
11442 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11443 if test "${enable_ext_funcs+set}" = set; then
11444   enableval="$enable_ext_funcs"
11445   with_ext_funcs=$enableval
11446 else
11447   with_ext_funcs=yes
11448 fi;
11449 echo "$as_me:11449: result: $with_ext_funcs" >&5
11450 echo "${ECHO_T}$with_ext_funcs" >&6
11451 if test "x$with_ext_funcs" = xyes ; then
11452         NCURSES_EXT_FUNCS=1
11453
11454 cat >>confdefs.h <<\EOF
11455 #define HAVE_ASSUME_DEFAULT_COLORS 1
11456 EOF
11457
11458 cat >>confdefs.h <<\EOF
11459 #define HAVE_CURSES_VERSION 1
11460 EOF
11461
11462 cat >>confdefs.h <<\EOF
11463 #define HAVE_HAS_KEY 1
11464 EOF
11465
11466 cat >>confdefs.h <<\EOF
11467 #define HAVE_RESIZETERM 1
11468 EOF
11469
11470 cat >>confdefs.h <<\EOF
11471 #define HAVE_RESIZE_TERM 1
11472 EOF
11473
11474 cat >>confdefs.h <<\EOF
11475 #define HAVE_TERM_ENTRY_H 1
11476 EOF
11477
11478 cat >>confdefs.h <<\EOF
11479 #define HAVE_USE_DEFAULT_COLORS 1
11480 EOF
11481
11482 cat >>confdefs.h <<\EOF
11483 #define HAVE_USE_SCREEN 1
11484 EOF
11485
11486 cat >>confdefs.h <<\EOF
11487 #define HAVE_USE_WINDOW 1
11488 EOF
11489
11490 cat >>confdefs.h <<\EOF
11491 #define HAVE_WRESIZE 1
11492 EOF
11493
11494 cat >>confdefs.h <<\EOF
11495 #define NCURSES_EXT_FUNCS 1
11496 EOF
11497
11498         GENERATED_EXT_FUNCS=generated
11499 else
11500         NCURSES_EXT_FUNCS=0
11501         GENERATED_EXT_FUNCS=
11502 fi
11503
11504 echo "$as_me:11504: checking if you want to build with experimental SCREEN extensions" >&5
11505 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11506
11507 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11508 if test "${enable_sp_funcs+set}" = set; then
11509   enableval="$enable_sp_funcs"
11510   with_sp_funcs=$enableval
11511 else
11512   with_sp_funcs=no
11513 fi;
11514 echo "$as_me:11514: result: $with_sp_funcs" >&5
11515 echo "${ECHO_T}$with_sp_funcs" >&6
11516 if test "x$with_sp_funcs" = xyes ; then
11517         NCURSES_SP_FUNCS=1
11518
11519 cat >>confdefs.h <<\EOF
11520 #define NCURSES_SP_FUNCS 1
11521 EOF
11522
11523         GENERATED_SP_FUNCS=generated
11524 else
11525         NCURSES_SP_FUNCS=0
11526         GENERATED_SP_FUNCS=
11527 fi
11528
11529 echo "$as_me:11529: checking if you want to build with experimental terminal-driver" >&5
11530 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11531
11532 # Check whether --enable-term-driver or --disable-term-driver was given.
11533 if test "${enable_term_driver+set}" = set; then
11534   enableval="$enable_term_driver"
11535   with_term_driver=$enableval
11536 else
11537   with_term_driver=no
11538 fi;
11539 echo "$as_me:11539: result: $with_term_driver" >&5
11540 echo "${ECHO_T}$with_term_driver" >&6
11541 if test "x$with_term_driver" = xyes ; then
11542
11543 cat >>confdefs.h <<\EOF
11544 #define USE_TERM_DRIVER 1
11545 EOF
11546
11547         if test "x$with_sp_funcs" != xyes ; then
11548                 { { echo "$as_me:11548: error: The term-driver option relies upon sp-funcs" >&5
11549 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11550    { (exit 1); exit 1; }; }
11551         fi
11552 fi
11553
11554 ###   use option --enable-const to turn on use of const beyond that in XSI.
11555 echo "$as_me:11555: checking for extended use of const keyword" >&5
11556 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11557
11558 # Check whether --enable-const or --disable-const was given.
11559 if test "${enable_const+set}" = set; then
11560   enableval="$enable_const"
11561   with_ext_const=$enableval
11562 else
11563   with_ext_const=no
11564 fi;
11565 echo "$as_me:11565: result: $with_ext_const" >&5
11566 echo "${ECHO_T}$with_ext_const" >&6
11567 NCURSES_CONST='/*nothing*/'
11568 if test "x$with_ext_const" = xyes ; then
11569         NCURSES_CONST=const
11570 fi
11571
11572 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11573 echo "$as_me:11573: checking if you want to use extended colors" >&5
11574 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11575
11576 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11577 if test "${enable_ext_colors+set}" = set; then
11578   enableval="$enable_ext_colors"
11579   with_ext_colors=$enableval
11580 else
11581   with_ext_colors=no
11582 fi;
11583 echo "$as_me:11583: result: $with_ext_colors" >&5
11584 echo "${ECHO_T}$with_ext_colors" >&6
11585 NCURSES_EXT_COLORS=0
11586 if test "x$with_ext_colors" = xyes ; then
11587         if test "x$with_widec" != xyes ; then
11588                 { { echo "$as_me:11588: error: This option applies only to wide-character library" >&5
11589 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11590    { (exit 1); exit 1; }; }
11591         else
11592                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11593
11594 if test "${with_abi_version+set}" != set; then
11595         case $cf_cv_rel_version in
11596         5.*)
11597                 cf_cv_rel_version=6.0
11598                 cf_cv_abi_version=6
11599                 { echo "$as_me:11599: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11600 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11601                 ;;
11602         esac
11603 fi
11604
11605         fi
11606         NCURSES_EXT_COLORS=1
11607
11608 cat >>confdefs.h <<\EOF
11609 #define NCURSES_EXT_COLORS 1
11610 EOF
11611
11612 fi
11613
11614 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11615 echo "$as_me:11615: checking if you want to use extended mouse encoding" >&5
11616 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11617
11618 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11619 if test "${enable_ext_mouse+set}" = set; then
11620   enableval="$enable_ext_mouse"
11621   with_ext_mouse=$enableval
11622 else
11623   with_ext_mouse=no
11624 fi;
11625 echo "$as_me:11625: result: $with_ext_mouse" >&5
11626 echo "${ECHO_T}$with_ext_mouse" >&6
11627 NCURSES_MOUSE_VERSION=1
11628 if test "x$with_ext_mouse" = xyes ; then
11629         NCURSES_MOUSE_VERSION=2
11630
11631 if test "${with_abi_version+set}" != set; then
11632         case $cf_cv_rel_version in
11633         5.*)
11634                 cf_cv_rel_version=6.0
11635                 cf_cv_abi_version=6
11636                 { echo "$as_me:11636: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11637 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11638                 ;;
11639         esac
11640 fi
11641
11642 fi
11643
11644 echo "$as_me:11644: checking if you want \$NCURSES_NO_PADDING code" >&5
11645 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11646
11647 # Check whether --enable-no-padding or --disable-no-padding was given.
11648 if test "${enable_no_padding+set}" = set; then
11649   enableval="$enable_no_padding"
11650   with_no_padding=$enableval
11651 else
11652   with_no_padding=$with_ext_funcs
11653 fi;
11654 echo "$as_me:11654: result: $with_no_padding" >&5
11655 echo "${ECHO_T}$with_no_padding" >&6
11656 test "x$with_no_padding" = xyes &&
11657 cat >>confdefs.h <<\EOF
11658 #define NCURSES_NO_PADDING 1
11659 EOF
11660
11661 echo "$as_me:11661: checking for ANSI C header files" >&5
11662 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11663 if test "${ac_cv_header_stdc+set}" = set; then
11664   echo $ECHO_N "(cached) $ECHO_C" >&6
11665 else
11666   cat >conftest.$ac_ext <<_ACEOF
11667 #line 11667 "configure"
11668 #include "confdefs.h"
11669 #include <stdlib.h>
11670 #include <stdarg.h>
11671 #include <string.h>
11672 #include <float.h>
11673
11674 _ACEOF
11675 if { (eval echo "$as_me:11675: \"$ac_cpp conftest.$ac_ext\"") >&5
11676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11677   ac_status=$?
11678   egrep -v '^ *\+' conftest.er1 >conftest.err
11679   rm -f conftest.er1
11680   cat conftest.err >&5
11681   echo "$as_me:11681: \$? = $ac_status" >&5
11682   (exit $ac_status); } >/dev/null; then
11683   if test -s conftest.err; then
11684     ac_cpp_err=$ac_c_preproc_warn_flag
11685   else
11686     ac_cpp_err=
11687   fi
11688 else
11689   ac_cpp_err=yes
11690 fi
11691 if test -z "$ac_cpp_err"; then
11692   ac_cv_header_stdc=yes
11693 else
11694   echo "$as_me: failed program was:" >&5
11695   cat conftest.$ac_ext >&5
11696   ac_cv_header_stdc=no
11697 fi
11698 rm -f conftest.err conftest.$ac_ext
11699
11700 if test $ac_cv_header_stdc = yes; then
11701   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11702   cat >conftest.$ac_ext <<_ACEOF
11703 #line 11703 "configure"
11704 #include "confdefs.h"
11705 #include <string.h>
11706
11707 _ACEOF
11708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11709   egrep "memchr" >/dev/null 2>&1; then
11710   :
11711 else
11712   ac_cv_header_stdc=no
11713 fi
11714 rm -rf conftest*
11715
11716 fi
11717
11718 if test $ac_cv_header_stdc = yes; then
11719   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11720   cat >conftest.$ac_ext <<_ACEOF
11721 #line 11721 "configure"
11722 #include "confdefs.h"
11723 #include <stdlib.h>
11724
11725 _ACEOF
11726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11727   egrep "free" >/dev/null 2>&1; then
11728   :
11729 else
11730   ac_cv_header_stdc=no
11731 fi
11732 rm -rf conftest*
11733
11734 fi
11735
11736 if test $ac_cv_header_stdc = yes; then
11737   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11738   if test "$cross_compiling" = yes; then
11739   :
11740 else
11741   cat >conftest.$ac_ext <<_ACEOF
11742 #line 11742 "configure"
11743 #include "confdefs.h"
11744 #include <ctype.h>
11745 #if ((' ' & 0x0FF) == 0x020)
11746 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11747 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11748 #else
11749 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11750                      || ('j' <= (c) && (c) <= 'r') \
11751                      || ('s' <= (c) && (c) <= 'z'))
11752 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11753 #endif
11754
11755 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11756 int
11757 main ()
11758 {
11759   int i;
11760   for (i = 0; i < 256; i++)
11761     if (XOR (islower (i), ISLOWER (i))
11762         || toupper (i) != TOUPPER (i))
11763       $ac_main_return(2);
11764   $ac_main_return (0);
11765 }
11766 _ACEOF
11767 rm -f conftest$ac_exeext
11768 if { (eval echo "$as_me:11768: \"$ac_link\"") >&5
11769   (eval $ac_link) 2>&5
11770   ac_status=$?
11771   echo "$as_me:11771: \$? = $ac_status" >&5
11772   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11773   { (eval echo "$as_me:11773: \"$ac_try\"") >&5
11774   (eval $ac_try) 2>&5
11775   ac_status=$?
11776   echo "$as_me:11776: \$? = $ac_status" >&5
11777   (exit $ac_status); }; }; then
11778   :
11779 else
11780   echo "$as_me: program exited with status $ac_status" >&5
11781 echo "$as_me: failed program was:" >&5
11782 cat conftest.$ac_ext >&5
11783 ac_cv_header_stdc=no
11784 fi
11785 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11786 fi
11787 fi
11788 fi
11789 echo "$as_me:11789: result: $ac_cv_header_stdc" >&5
11790 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11791 if test $ac_cv_header_stdc = yes; then
11792
11793 cat >>confdefs.h <<\EOF
11794 #define STDC_HEADERS 1
11795 EOF
11796
11797 fi
11798
11799 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11800
11801 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11802                   inttypes.h stdint.h unistd.h
11803 do
11804 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11805 echo "$as_me:11805: checking for $ac_header" >&5
11806 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11807 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11808   echo $ECHO_N "(cached) $ECHO_C" >&6
11809 else
11810   cat >conftest.$ac_ext <<_ACEOF
11811 #line 11811 "configure"
11812 #include "confdefs.h"
11813 $ac_includes_default
11814 #include <$ac_header>
11815 _ACEOF
11816 rm -f conftest.$ac_objext
11817 if { (eval echo "$as_me:11817: \"$ac_compile\"") >&5
11818   (eval $ac_compile) 2>&5
11819   ac_status=$?
11820   echo "$as_me:11820: \$? = $ac_status" >&5
11821   (exit $ac_status); } &&
11822          { ac_try='test -s conftest.$ac_objext'
11823   { (eval echo "$as_me:11823: \"$ac_try\"") >&5
11824   (eval $ac_try) 2>&5
11825   ac_status=$?
11826   echo "$as_me:11826: \$? = $ac_status" >&5
11827   (exit $ac_status); }; }; then
11828   eval "$as_ac_Header=yes"
11829 else
11830   echo "$as_me: failed program was:" >&5
11831 cat conftest.$ac_ext >&5
11832 eval "$as_ac_Header=no"
11833 fi
11834 rm -f conftest.$ac_objext conftest.$ac_ext
11835 fi
11836 echo "$as_me:11836: result: `eval echo '${'$as_ac_Header'}'`" >&5
11837 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11838 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11839   cat >>confdefs.h <<EOF
11840 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11841 EOF
11842
11843 fi
11844 done
11845
11846 echo "$as_me:11846: checking for signed char" >&5
11847 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11848 if test "${ac_cv_type_signed_char+set}" = set; then
11849   echo $ECHO_N "(cached) $ECHO_C" >&6
11850 else
11851   cat >conftest.$ac_ext <<_ACEOF
11852 #line 11852 "configure"
11853 #include "confdefs.h"
11854 $ac_includes_default
11855 int
11856 main ()
11857 {
11858 if ((signed char *) 0)
11859   return 0;
11860 if (sizeof (signed char))
11861   return 0;
11862   ;
11863   return 0;
11864 }
11865 _ACEOF
11866 rm -f conftest.$ac_objext
11867 if { (eval echo "$as_me:11867: \"$ac_compile\"") >&5
11868   (eval $ac_compile) 2>&5
11869   ac_status=$?
11870   echo "$as_me:11870: \$? = $ac_status" >&5
11871   (exit $ac_status); } &&
11872          { ac_try='test -s conftest.$ac_objext'
11873   { (eval echo "$as_me:11873: \"$ac_try\"") >&5
11874   (eval $ac_try) 2>&5
11875   ac_status=$?
11876   echo "$as_me:11876: \$? = $ac_status" >&5
11877   (exit $ac_status); }; }; then
11878   ac_cv_type_signed_char=yes
11879 else
11880   echo "$as_me: failed program was:" >&5
11881 cat conftest.$ac_ext >&5
11882 ac_cv_type_signed_char=no
11883 fi
11884 rm -f conftest.$ac_objext conftest.$ac_ext
11885 fi
11886 echo "$as_me:11886: result: $ac_cv_type_signed_char" >&5
11887 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11888
11889 echo "$as_me:11889: checking size of signed char" >&5
11890 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11891 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11892   echo $ECHO_N "(cached) $ECHO_C" >&6
11893 else
11894   if test "$ac_cv_type_signed_char" = yes; then
11895   if test "$cross_compiling" = yes; then
11896   # Depending upon the size, compute the lo and hi bounds.
11897 cat >conftest.$ac_ext <<_ACEOF
11898 #line 11898 "configure"
11899 #include "confdefs.h"
11900 $ac_includes_default
11901 int
11902 main ()
11903 {
11904 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11905   ;
11906   return 0;
11907 }
11908 _ACEOF
11909 rm -f conftest.$ac_objext
11910 if { (eval echo "$as_me:11910: \"$ac_compile\"") >&5
11911   (eval $ac_compile) 2>&5
11912   ac_status=$?
11913   echo "$as_me:11913: \$? = $ac_status" >&5
11914   (exit $ac_status); } &&
11915          { ac_try='test -s conftest.$ac_objext'
11916   { (eval echo "$as_me:11916: \"$ac_try\"") >&5
11917   (eval $ac_try) 2>&5
11918   ac_status=$?
11919   echo "$as_me:11919: \$? = $ac_status" >&5
11920   (exit $ac_status); }; }; then
11921   ac_lo=0 ac_mid=0
11922   while :; do
11923     cat >conftest.$ac_ext <<_ACEOF
11924 #line 11924 "configure"
11925 #include "confdefs.h"
11926 $ac_includes_default
11927 int
11928 main ()
11929 {
11930 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11931   ;
11932   return 0;
11933 }
11934 _ACEOF
11935 rm -f conftest.$ac_objext
11936 if { (eval echo "$as_me:11936: \"$ac_compile\"") >&5
11937   (eval $ac_compile) 2>&5
11938   ac_status=$?
11939   echo "$as_me:11939: \$? = $ac_status" >&5
11940   (exit $ac_status); } &&
11941          { ac_try='test -s conftest.$ac_objext'
11942   { (eval echo "$as_me:11942: \"$ac_try\"") >&5
11943   (eval $ac_try) 2>&5
11944   ac_status=$?
11945   echo "$as_me:11945: \$? = $ac_status" >&5
11946   (exit $ac_status); }; }; then
11947   ac_hi=$ac_mid; break
11948 else
11949   echo "$as_me: failed program was:" >&5
11950 cat conftest.$ac_ext >&5
11951 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11952 fi
11953 rm -f conftest.$ac_objext conftest.$ac_ext
11954   done
11955 else
11956   echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11958 ac_hi=-1 ac_mid=-1
11959   while :; do
11960     cat >conftest.$ac_ext <<_ACEOF
11961 #line 11961 "configure"
11962 #include "confdefs.h"
11963 $ac_includes_default
11964 int
11965 main ()
11966 {
11967 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11968   ;
11969   return 0;
11970 }
11971 _ACEOF
11972 rm -f conftest.$ac_objext
11973 if { (eval echo "$as_me:11973: \"$ac_compile\"") >&5
11974   (eval $ac_compile) 2>&5
11975   ac_status=$?
11976   echo "$as_me:11976: \$? = $ac_status" >&5
11977   (exit $ac_status); } &&
11978          { ac_try='test -s conftest.$ac_objext'
11979   { (eval echo "$as_me:11979: \"$ac_try\"") >&5
11980   (eval $ac_try) 2>&5
11981   ac_status=$?
11982   echo "$as_me:11982: \$? = $ac_status" >&5
11983   (exit $ac_status); }; }; then
11984   ac_lo=$ac_mid; break
11985 else
11986   echo "$as_me: failed program was:" >&5
11987 cat conftest.$ac_ext >&5
11988 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11989 fi
11990 rm -f conftest.$ac_objext conftest.$ac_ext
11991   done
11992 fi
11993 rm -f conftest.$ac_objext conftest.$ac_ext
11994 # Binary search between lo and hi bounds.
11995 while test "x$ac_lo" != "x$ac_hi"; do
11996   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11997   cat >conftest.$ac_ext <<_ACEOF
11998 #line 11998 "configure"
11999 #include "confdefs.h"
12000 $ac_includes_default
12001 int
12002 main ()
12003 {
12004 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12005   ;
12006   return 0;
12007 }
12008 _ACEOF
12009 rm -f conftest.$ac_objext
12010 if { (eval echo "$as_me:12010: \"$ac_compile\"") >&5
12011   (eval $ac_compile) 2>&5
12012   ac_status=$?
12013   echo "$as_me:12013: \$? = $ac_status" >&5
12014   (exit $ac_status); } &&
12015          { ac_try='test -s conftest.$ac_objext'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); }; }; then
12021   ac_hi=$ac_mid
12022 else
12023   echo "$as_me: failed program was:" >&5
12024 cat conftest.$ac_ext >&5
12025 ac_lo=`expr $ac_mid + 1`
12026 fi
12027 rm -f conftest.$ac_objext conftest.$ac_ext
12028 done
12029 ac_cv_sizeof_signed_char=$ac_lo
12030 else
12031   if test "$cross_compiling" = yes; then
12032   { { echo "$as_me:12032: error: cannot run test program while cross compiling" >&5
12033 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12034    { (exit 1); exit 1; }; }
12035 else
12036   cat >conftest.$ac_ext <<_ACEOF
12037 #line 12037 "configure"
12038 #include "confdefs.h"
12039 $ac_includes_default
12040 int
12041 main ()
12042 {
12043 FILE *f = fopen ("conftest.val", "w");
12044 if (!f)
12045   $ac_main_return (1);
12046 fprintf (f, "%d", (sizeof (signed char)));
12047 fclose (f);
12048   ;
12049   return 0;
12050 }
12051 _ACEOF
12052 rm -f conftest$ac_exeext
12053 if { (eval echo "$as_me:12053: \"$ac_link\"") >&5
12054   (eval $ac_link) 2>&5
12055   ac_status=$?
12056   echo "$as_me:12056: \$? = $ac_status" >&5
12057   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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   ac_cv_sizeof_signed_char=`cat conftest.val`
12064 else
12065   echo "$as_me: program exited with status $ac_status" >&5
12066 echo "$as_me: failed program was:" >&5
12067 cat conftest.$ac_ext >&5
12068 fi
12069 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12070 fi
12071 fi
12072 rm -f conftest.val
12073 else
12074   ac_cv_sizeof_signed_char=0
12075 fi
12076 fi
12077 echo "$as_me:12077: result: $ac_cv_sizeof_signed_char" >&5
12078 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12079 cat >>confdefs.h <<EOF
12080 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12081 EOF
12082
12083 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12084         NCURSES_SBOOL="signed char"
12085 else
12086         NCURSES_SBOOL="char"
12087 fi
12088 echo "$as_me:12088: checking if you want to use signed Boolean array in term.h" >&5
12089 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12090
12091 # Check whether --enable-signed-char or --disable-signed-char was given.
12092 if test "${enable_signed_char+set}" = set; then
12093   enableval="$enable_signed_char"
12094   with_signed_char=$enableval
12095 else
12096   with_signed_char=no
12097 fi;
12098 echo "$as_me:12098: result: $with_signed_char" >&5
12099 echo "${ECHO_T}$with_signed_char" >&6
12100 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12101
12102 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12103 echo "$as_me:12103: checking if you want SIGWINCH handler" >&5
12104 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12105
12106 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12107 if test "${enable_sigwinch+set}" = set; then
12108   enableval="$enable_sigwinch"
12109   with_sigwinch=$enableval
12110 else
12111   with_sigwinch=$with_ext_funcs
12112 fi;
12113 echo "$as_me:12113: result: $with_sigwinch" >&5
12114 echo "${ECHO_T}$with_sigwinch" >&6
12115 test "x$with_sigwinch" = xyes &&
12116 cat >>confdefs.h <<\EOF
12117 #define USE_SIGWINCH 1
12118 EOF
12119
12120 ###   use option --enable-tcap-names to allow user to define new capabilities
12121 echo "$as_me:12121: checking if you want user-definable terminal capabilities like termcap" >&5
12122 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12123
12124 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12125 if test "${enable_tcap_names+set}" = set; then
12126   enableval="$enable_tcap_names"
12127   with_tcap_names=$enableval
12128 else
12129   with_tcap_names=$with_ext_funcs
12130 fi;
12131 echo "$as_me:12131: result: $with_tcap_names" >&5
12132 echo "${ECHO_T}$with_tcap_names" >&6
12133 NCURSES_XNAMES=0
12134 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12135
12136 ###############################################################################
12137 # These options are relatively safe to experiment with.
12138
12139 echo "$as_me:12139: checking if you want all development code" >&5
12140 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12141
12142 # Check whether --with-develop or --without-develop was given.
12143 if test "${with_develop+set}" = set; then
12144   withval="$with_develop"
12145   with_develop=$withval
12146 else
12147   with_develop=no
12148 fi;
12149 echo "$as_me:12149: result: $with_develop" >&5
12150 echo "${ECHO_T}$with_develop" >&6
12151
12152 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12153 echo "$as_me:12153: checking if you want hard-tabs code" >&5
12154 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12155
12156 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12157 if test "${enable_hard_tabs+set}" = set; then
12158   enableval="$enable_hard_tabs"
12159
12160 else
12161   enable_hard_tabs=$with_develop
12162 fi;
12163 echo "$as_me:12163: result: $enable_hard_tabs" >&5
12164 echo "${ECHO_T}$enable_hard_tabs" >&6
12165 test "x$enable_hard_tabs" = xyes &&
12166 cat >>confdefs.h <<\EOF
12167 #define USE_HARD_TABS 1
12168 EOF
12169
12170 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12171 echo "$as_me:12171: checking if you want limited support for xmc" >&5
12172 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12173
12174 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12175 if test "${enable_xmc_glitch+set}" = set; then
12176   enableval="$enable_xmc_glitch"
12177
12178 else
12179   enable_xmc_glitch=$with_develop
12180 fi;
12181 echo "$as_me:12181: result: $enable_xmc_glitch" >&5
12182 echo "${ECHO_T}$enable_xmc_glitch" >&6
12183 test "x$enable_xmc_glitch" = xyes &&
12184 cat >>confdefs.h <<\EOF
12185 #define USE_XMC_SUPPORT 1
12186 EOF
12187
12188 ###############################################################################
12189 # These are just experimental, probably should not be in a package:
12190
12191 echo "$as_me:12191: checking if you do not want to assume colors are white-on-black" >&5
12192 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12193
12194 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12195 if test "${enable_assumed_color+set}" = set; then
12196   enableval="$enable_assumed_color"
12197   with_assumed_color=$enableval
12198 else
12199   with_assumed_color=yes
12200 fi;
12201 echo "$as_me:12201: result: $with_assumed_color" >&5
12202 echo "${ECHO_T}$with_assumed_color" >&6
12203 test "x$with_assumed_color" = xyes &&
12204 cat >>confdefs.h <<\EOF
12205 #define USE_ASSUMED_COLOR 1
12206 EOF
12207
12208 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12209 echo "$as_me:12209: checking if you want hashmap scrolling-optimization code" >&5
12210 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12211
12212 # Check whether --enable-hashmap or --disable-hashmap was given.
12213 if test "${enable_hashmap+set}" = set; then
12214   enableval="$enable_hashmap"
12215   with_hashmap=$enableval
12216 else
12217   with_hashmap=yes
12218 fi;
12219 echo "$as_me:12219: result: $with_hashmap" >&5
12220 echo "${ECHO_T}$with_hashmap" >&6
12221 test "x$with_hashmap" = xyes &&
12222 cat >>confdefs.h <<\EOF
12223 #define USE_HASHMAP 1
12224 EOF
12225
12226 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12227 echo "$as_me:12227: checking if you want colorfgbg code" >&5
12228 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12229
12230 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12231 if test "${enable_colorfgbg+set}" = set; then
12232   enableval="$enable_colorfgbg"
12233   with_colorfgbg=$enableval
12234 else
12235   with_colorfgbg=no
12236 fi;
12237 echo "$as_me:12237: result: $with_colorfgbg" >&5
12238 echo "${ECHO_T}$with_colorfgbg" >&6
12239 test "x$with_colorfgbg" = xyes &&
12240 cat >>confdefs.h <<\EOF
12241 #define USE_COLORFGBG 1
12242 EOF
12243
12244 ###   use option --enable-interop to turn on use of bindings used for interop
12245 echo "$as_me:12245: checking if you want interop bindings" >&5
12246 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12247
12248 # Check whether --enable-interop or --disable-interop was given.
12249 if test "${enable_interop+set}" = set; then
12250   enableval="$enable_interop"
12251   with_exp_interop=$enableval
12252 else
12253   with_exp_interop=no
12254 fi;
12255 echo "$as_me:12255: result: $with_exp_interop" >&5
12256 echo "${ECHO_T}$with_exp_interop" >&6
12257
12258 NCURSES_INTEROP_FUNCS=0
12259 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12260
12261 # This is still experimental (20080329), but should ultimately be moved to
12262 # the script-block --with-normal, etc.
12263
12264 echo "$as_me:12264: checking if you want to link with the pthread library" >&5
12265 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12266
12267 # Check whether --with-pthread or --without-pthread was given.
12268 if test "${with_pthread+set}" = set; then
12269   withval="$with_pthread"
12270   with_pthread=$withval
12271 else
12272   with_pthread=no
12273 fi;
12274 echo "$as_me:12274: result: $with_pthread" >&5
12275 echo "${ECHO_T}$with_pthread" >&6
12276
12277 if test "$with_pthread" != no ; then
12278     echo "$as_me:12278: checking for pthread.h" >&5
12279 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12280 if test "${ac_cv_header_pthread_h+set}" = set; then
12281   echo $ECHO_N "(cached) $ECHO_C" >&6
12282 else
12283   cat >conftest.$ac_ext <<_ACEOF
12284 #line 12284 "configure"
12285 #include "confdefs.h"
12286 #include <pthread.h>
12287 _ACEOF
12288 if { (eval echo "$as_me:12288: \"$ac_cpp conftest.$ac_ext\"") >&5
12289   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12290   ac_status=$?
12291   egrep -v '^ *\+' conftest.er1 >conftest.err
12292   rm -f conftest.er1
12293   cat conftest.err >&5
12294   echo "$as_me:12294: \$? = $ac_status" >&5
12295   (exit $ac_status); } >/dev/null; then
12296   if test -s conftest.err; then
12297     ac_cpp_err=$ac_c_preproc_warn_flag
12298   else
12299     ac_cpp_err=
12300   fi
12301 else
12302   ac_cpp_err=yes
12303 fi
12304 if test -z "$ac_cpp_err"; then
12305   ac_cv_header_pthread_h=yes
12306 else
12307   echo "$as_me: failed program was:" >&5
12308   cat conftest.$ac_ext >&5
12309   ac_cv_header_pthread_h=no
12310 fi
12311 rm -f conftest.err conftest.$ac_ext
12312 fi
12313 echo "$as_me:12313: result: $ac_cv_header_pthread_h" >&5
12314 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12315 if test $ac_cv_header_pthread_h = yes; then
12316
12317 cat >>confdefs.h <<\EOF
12318 #define HAVE_PTHREADS_H 1
12319 EOF
12320
12321         for cf_lib_pthread in pthread c_r
12322         do
12323             echo "$as_me:12323: checking if we can link with the $cf_lib_pthread library" >&5
12324 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12325             cf_save_LIBS="$LIBS"
12326
12327 cf_add_libs="-l$cf_lib_pthread"
12328 # Filter out duplicates - this happens with badly-designed ".pc" files...
12329 for cf_add_1lib in $LIBS
12330 do
12331         for cf_add_2lib in $cf_add_libs
12332         do
12333                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12334                 then
12335                         cf_add_1lib=
12336                         break
12337                 fi
12338         done
12339         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12340 done
12341 LIBS="$cf_add_libs"
12342
12343             cat >conftest.$ac_ext <<_ACEOF
12344 #line 12344 "configure"
12345 #include "confdefs.h"
12346
12347 #include <pthread.h>
12348
12349 int
12350 main ()
12351 {
12352
12353                 int rc = pthread_create(0,0,0,0);
12354                 int r2 = pthread_mutexattr_settype(0, 0);
12355
12356   ;
12357   return 0;
12358 }
12359 _ACEOF
12360 rm -f conftest.$ac_objext conftest$ac_exeext
12361 if { (eval echo "$as_me:12361: \"$ac_link\"") >&5
12362   (eval $ac_link) 2>&5
12363   ac_status=$?
12364   echo "$as_me:12364: \$? = $ac_status" >&5
12365   (exit $ac_status); } &&
12366          { ac_try='test -s conftest$ac_exeext'
12367   { (eval echo "$as_me:12367: \"$ac_try\"") >&5
12368   (eval $ac_try) 2>&5
12369   ac_status=$?
12370   echo "$as_me:12370: \$? = $ac_status" >&5
12371   (exit $ac_status); }; }; then
12372   with_pthread=yes
12373 else
12374   echo "$as_me: failed program was:" >&5
12375 cat conftest.$ac_ext >&5
12376 with_pthread=no
12377 fi
12378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12379             LIBS="$cf_save_LIBS"
12380             echo "$as_me:12380: result: $with_pthread" >&5
12381 echo "${ECHO_T}$with_pthread" >&6
12382             test "$with_pthread" = yes && break
12383         done
12384
12385         if test "$with_pthread" = yes ; then
12386
12387 cf_add_libs="-l$cf_lib_pthread"
12388 # Filter out duplicates - this happens with badly-designed ".pc" files...
12389 for cf_add_1lib in $LIBS
12390 do
12391         for cf_add_2lib in $cf_add_libs
12392         do
12393                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12394                 then
12395                         cf_add_1lib=
12396                         break
12397                 fi
12398         done
12399         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12400 done
12401 LIBS="$cf_add_libs"
12402
12403 cat >>confdefs.h <<\EOF
12404 #define HAVE_LIBPTHREADS 1
12405 EOF
12406
12407         else
12408             { { echo "$as_me:12408: error: Cannot link with pthread library" >&5
12409 echo "$as_me: error: Cannot link with pthread library" >&2;}
12410    { (exit 1); exit 1; }; }
12411         fi
12412
12413 fi
12414
12415 fi
12416
12417 if test "x$with_pthread" != xno; then
12418         echo "$as_me:12418: checking for pthread_kill" >&5
12419 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12420 if test "${ac_cv_func_pthread_kill+set}" = set; then
12421   echo $ECHO_N "(cached) $ECHO_C" >&6
12422 else
12423   cat >conftest.$ac_ext <<_ACEOF
12424 #line 12424 "configure"
12425 #include "confdefs.h"
12426 /* System header to define __stub macros and hopefully few prototypes,
12427     which can conflict with char pthread_kill (); below.  */
12428 #include <assert.h>
12429 /* Override any gcc2 internal prototype to avoid an error.  */
12430 #ifdef __cplusplus
12431 extern "C"
12432 #endif
12433 /* We use char because int might match the return type of a gcc2
12434    builtin and then its argument prototype would still apply.  */
12435 char pthread_kill ();
12436 char (*f) ();
12437
12438 int
12439 main ()
12440 {
12441 /* The GNU C library defines this for functions which it implements
12442     to always fail with ENOSYS.  Some functions are actually named
12443     something starting with __ and the normal name is an alias.  */
12444 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12445 choke me
12446 #else
12447 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12448 #endif
12449
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 rm -f conftest.$ac_objext conftest$ac_exeext
12455 if { (eval echo "$as_me:12455: \"$ac_link\"") >&5
12456   (eval $ac_link) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); } &&
12460          { ac_try='test -s conftest$ac_exeext'
12461   { (eval echo "$as_me:12461: \"$ac_try\"") >&5
12462   (eval $ac_try) 2>&5
12463   ac_status=$?
12464   echo "$as_me:12464: \$? = $ac_status" >&5
12465   (exit $ac_status); }; }; then
12466   ac_cv_func_pthread_kill=yes
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 cat conftest.$ac_ext >&5
12470 ac_cv_func_pthread_kill=no
12471 fi
12472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12473 fi
12474 echo "$as_me:12474: result: $ac_cv_func_pthread_kill" >&5
12475 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12476 if test $ac_cv_func_pthread_kill = yes; then
12477
12478                 echo "$as_me:12478: checking if you want to allow EINTR in wgetch with pthreads" >&5
12479 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12480
12481 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12482 if test "${enable_pthreads_eintr+set}" = set; then
12483   enableval="$enable_pthreads_eintr"
12484   use_pthreads_eintr=$enableval
12485 else
12486   use_pthreads_eintr=no
12487 fi;
12488                 echo "$as_me:12488: result: $use_pthreads_eintr" >&5
12489 echo "${ECHO_T}$use_pthreads_eintr" >&6
12490                 if test "x$use_pthreads_eintr" = xyes ; then
12491
12492 cat >>confdefs.h <<\EOF
12493 #define USE_PTHREADS_EINTR 1
12494 EOF
12495
12496                 fi
12497 fi
12498
12499         echo "$as_me:12499: checking if you want to use weak-symbols for pthreads" >&5
12500 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12501
12502 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12503 if test "${enable_weak_symbols+set}" = set; then
12504   enableval="$enable_weak_symbols"
12505   use_weak_symbols=$enableval
12506 else
12507   use_weak_symbols=no
12508 fi;
12509         echo "$as_me:12509: result: $use_weak_symbols" >&5
12510 echo "${ECHO_T}$use_weak_symbols" >&6
12511         if test "x$use_weak_symbols" = xyes ; then
12512
12513 echo "$as_me:12513: checking if $CC supports weak symbols" >&5
12514 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12515 if test "${cf_cv_weak_symbols+set}" = set; then
12516   echo $ECHO_N "(cached) $ECHO_C" >&6
12517 else
12518
12519 cat >conftest.$ac_ext <<_ACEOF
12520 #line 12520 "configure"
12521 #include "confdefs.h"
12522
12523 #include <stdio.h>
12524 int
12525 main ()
12526 {
12527
12528 #if defined(__GNUC__)
12529 #  if defined __USE_ISOC99
12530 #    define _cat_pragma(exp)    _Pragma(#exp)
12531 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12532 #  else
12533 #    define _weak_pragma(exp)
12534 #  endif
12535 #  define _declare(name)        __extension__ extern __typeof__(name) name
12536 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12537 #endif
12538
12539 weak_symbol(fopen);
12540
12541   ;
12542   return 0;
12543 }
12544 _ACEOF
12545 rm -f conftest.$ac_objext
12546 if { (eval echo "$as_me:12546: \"$ac_compile\"") >&5
12547   (eval $ac_compile) 2>&5
12548   ac_status=$?
12549   echo "$as_me:12549: \$? = $ac_status" >&5
12550   (exit $ac_status); } &&
12551          { ac_try='test -s conftest.$ac_objext'
12552   { (eval echo "$as_me:12552: \"$ac_try\"") >&5
12553   (eval $ac_try) 2>&5
12554   ac_status=$?
12555   echo "$as_me:12555: \$? = $ac_status" >&5
12556   (exit $ac_status); }; }; then
12557   cf_cv_weak_symbols=yes
12558 else
12559   echo "$as_me: failed program was:" >&5
12560 cat conftest.$ac_ext >&5
12561 cf_cv_weak_symbols=no
12562 fi
12563 rm -f conftest.$ac_objext conftest.$ac_ext
12564
12565 fi
12566 echo "$as_me:12566: result: $cf_cv_weak_symbols" >&5
12567 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12568
12569         else
12570                 cf_cv_weak_symbols=no
12571         fi
12572
12573         if test "x$cf_cv_weak_symbols" = xyes ; then
12574
12575 cat >>confdefs.h <<\EOF
12576 #define USE_WEAK_SYMBOLS 1
12577 EOF
12578
12579         fi
12580 fi
12581
12582 PTHREAD=
12583 if test "x$with_pthread" = "xyes" ; then
12584
12585 cat >>confdefs.h <<\EOF
12586 #define USE_PTHREADS 1
12587 EOF
12588
12589     enable_reentrant=yes
12590     if test "x$cf_cv_weak_symbols" = xyes ; then
12591         PTHREAD=-lpthread
12592     fi
12593 fi
12594
12595 # Reentrant code has to be opaque; there's little advantage to making ncurses
12596 # opaque outside of that, so there is no --enable-opaque option.  We can use
12597 # this option without --with-pthreads, but this will be always set for
12598 # pthreads.
12599 echo "$as_me:12599: checking if you want experimental reentrant code" >&5
12600 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12601
12602 # Check whether --enable-reentrant or --disable-reentrant was given.
12603 if test "${enable_reentrant+set}" = set; then
12604   enableval="$enable_reentrant"
12605   with_reentrant=$enableval
12606 else
12607   with_reentrant=no
12608 fi;
12609 echo "$as_me:12609: result: $with_reentrant" >&5
12610 echo "${ECHO_T}$with_reentrant" >&6
12611 if test "x$with_reentrant" = xyes ; then
12612         cf_cv_enable_reentrant=1
12613         cf_cv_enable_opaque="NCURSES_INTERNALS"
12614         NCURSES_OPAQUE=1
12615         NCURSES_SIZE_T=int
12616         if test "x$cf_cv_weak_symbols" = xyes ; then
12617
12618 # remove pthread library from $LIBS
12619 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12620
12621 cf_add_libs="-lpthread"
12622 # Filter out duplicates - this happens with badly-designed ".pc" files...
12623 for cf_add_1lib in $TEST_LIBS
12624 do
12625         for cf_add_2lib in $cf_add_libs
12626         do
12627                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12628                 then
12629                         cf_add_1lib=
12630                         break
12631                 fi
12632         done
12633         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12634 done
12635 TEST_LIBS="$cf_add_libs"
12636
12637 cf_add_libs="-lpthread"
12638 # Filter out duplicates - this happens with badly-designed ".pc" files...
12639 for cf_add_1lib in $TEST_LIBS2
12640 do
12641         for cf_add_2lib in $cf_add_libs
12642         do
12643                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12644                 then
12645                         cf_add_1lib=
12646                         break
12647                 fi
12648         done
12649         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12650 done
12651 TEST_LIBS2="$cf_add_libs"
12652
12653         else
12654                 # when not using weak symbols but with_reentrant,
12655                 # add 't' to the library suffix on all platforms
12656                 # except cygwin, where we only do that if ALSO
12657                 # compiling with full thread support.
12658                 case "$host" in
12659                 *cygwin* | *msys*) #(vi
12660                         if test "$with_pthread" = "yes" ; then
12661                                 if test "x$disable_lib_suffixes" = "xno" ; then
12662                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12663                                 fi
12664                         fi ;;
12665                 *)
12666                         if test "x$disable_lib_suffixes" = "xno" ; then
12667                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12668                         fi
12669                         ;;
12670                 esac
12671         fi
12672
12673 cat >>confdefs.h <<\EOF
12674 #define USE_REENTRANT 1
12675 EOF
12676
12677 if test "${with_abi_version+set}" != set; then
12678         case $cf_cv_rel_version in
12679         5.*)
12680                 cf_cv_rel_version=6.0
12681                 cf_cv_abi_version=6
12682                 { echo "$as_me:12682: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12683 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12684                 ;;
12685         esac
12686 fi
12687
12688 else
12689         cf_cv_enable_reentrant=0
12690         cf_cv_enable_opaque="NCURSES_OPAQUE"
12691         NCURSES_OPAQUE=0
12692         NCURSES_SIZE_T=short
12693 fi
12694
12695 ### Allow using a different wrap-prefix
12696 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12697         echo "$as_me:12697: checking for prefix used to wrap public variables" >&5
12698 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12699
12700 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12701 if test "${with_wrap_prefix+set}" = set; then
12702   withval="$with_wrap_prefix"
12703   NCURSES_WRAP_PREFIX=$withval
12704 else
12705   NCURSES_WRAP_PREFIX=_nc_
12706 fi;
12707         echo "$as_me:12707: result: $NCURSES_WRAP_PREFIX" >&5
12708 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12709 else
12710         NCURSES_WRAP_PREFIX=_nc_
12711 fi
12712
12713 cat >>confdefs.h <<EOF
12714 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12715 EOF
12716
12717 echo "$as_me:12717: checking if you want experimental safe-sprintf code" >&5
12718 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12719
12720 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12721 if test "${enable_safe_sprintf+set}" = set; then
12722   enableval="$enable_safe_sprintf"
12723   with_safe_sprintf=$enableval
12724 else
12725   with_safe_sprintf=no
12726 fi;
12727 echo "$as_me:12727: result: $with_safe_sprintf" >&5
12728 echo "${ECHO_T}$with_safe_sprintf" >&6
12729 test "x$with_safe_sprintf" = xyes &&
12730 cat >>confdefs.h <<\EOF
12731 #define USE_SAFE_SPRINTF 1
12732 EOF
12733
12734 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12735 # when hashmap is used scroll hints are useless
12736 if test "$with_hashmap" = no ; then
12737 echo "$as_me:12737: checking if you want to experiment without scrolling-hints code" >&5
12738 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12739
12740 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12741 if test "${enable_scroll_hints+set}" = set; then
12742   enableval="$enable_scroll_hints"
12743   with_scroll_hints=$enableval
12744 else
12745   with_scroll_hints=yes
12746 fi;
12747 echo "$as_me:12747: result: $with_scroll_hints" >&5
12748 echo "${ECHO_T}$with_scroll_hints" >&6
12749 test "x$with_scroll_hints" = xyes &&
12750 cat >>confdefs.h <<\EOF
12751 #define USE_SCROLL_HINTS 1
12752 EOF
12753
12754 fi
12755
12756 echo "$as_me:12756: checking if you want experimental wgetch-events code" >&5
12757 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12758
12759 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12760 if test "${enable_wgetch_events+set}" = set; then
12761   enableval="$enable_wgetch_events"
12762   with_wgetch_events=$enableval
12763 else
12764   with_wgetch_events=no
12765 fi;
12766 echo "$as_me:12766: result: $with_wgetch_events" >&5
12767 echo "${ECHO_T}$with_wgetch_events" >&6
12768 test "x$with_wgetch_events" = xyes &&
12769 cat >>confdefs.h <<\EOF
12770 #define NCURSES_WGETCH_EVENTS 1
12771 EOF
12772
12773 ###############################################################################
12774
12775 ###     use option --disable-echo to suppress full display compiling commands
12776
12777 echo "$as_me:12777: checking if you want to see long compiling messages" >&5
12778 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12779
12780 # Check whether --enable-echo or --disable-echo was given.
12781 if test "${enable_echo+set}" = set; then
12782   enableval="$enable_echo"
12783   test "$enableval" != no && enableval=yes
12784   if test "$enableval" != "yes" ; then
12785
12786     ECHO_LT='--silent'
12787     ECHO_LD='@echo linking $@;'
12788     RULE_CC='@echo compiling $<'
12789     SHOW_CC='@echo compiling $@'
12790     ECHO_CC='@'
12791
12792   else
12793
12794     ECHO_LT=''
12795     ECHO_LD=''
12796     RULE_CC=''
12797     SHOW_CC=''
12798     ECHO_CC=''
12799
12800   fi
12801 else
12802   enableval=yes
12803
12804     ECHO_LT=''
12805     ECHO_LD=''
12806     RULE_CC=''
12807     SHOW_CC=''
12808     ECHO_CC=''
12809
12810 fi;
12811 echo "$as_me:12811: result: $enableval" >&5
12812 echo "${ECHO_T}$enableval" >&6
12813
12814 if test "x$enable_echo" = xyes; then
12815         ECHO_LINK=
12816 else
12817         ECHO_LINK='@ echo linking $@ ... ;'
12818         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12819         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12820 fi
12821
12822 ###     use option --enable-warnings to turn on all gcc warnings
12823 echo "$as_me:12823: checking if you want to see compiler warnings" >&5
12824 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12825
12826 # Check whether --enable-warnings or --disable-warnings was given.
12827 if test "${enable_warnings+set}" = set; then
12828   enableval="$enable_warnings"
12829   with_warnings=$enableval
12830 fi;
12831 echo "$as_me:12831: result: $with_warnings" >&5
12832 echo "${ECHO_T}$with_warnings" >&6
12833
12834 if test "x$with_warnings" = "xyes"; then
12835
12836         ADAFLAGS="$ADAFLAGS -gnatg"
12837
12838 INTEL_COMPILER=no
12839
12840 if test "$GCC" = yes ; then
12841         case $host_os in
12842         linux*|gnu*)
12843                 echo "$as_me:12843: checking if this is really Intel C compiler" >&5
12844 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12845                 cf_save_CFLAGS="$CFLAGS"
12846                 CFLAGS="$CFLAGS -no-gcc"
12847                 cat >conftest.$ac_ext <<_ACEOF
12848 #line 12848 "configure"
12849 #include "confdefs.h"
12850
12851 int
12852 main ()
12853 {
12854
12855 #ifdef __INTEL_COMPILER
12856 #else
12857 make an error
12858 #endif
12859
12860   ;
12861   return 0;
12862 }
12863 _ACEOF
12864 rm -f conftest.$ac_objext
12865 if { (eval echo "$as_me:12865: \"$ac_compile\"") >&5
12866   (eval $ac_compile) 2>&5
12867   ac_status=$?
12868   echo "$as_me:12868: \$? = $ac_status" >&5
12869   (exit $ac_status); } &&
12870          { ac_try='test -s conftest.$ac_objext'
12871   { (eval echo "$as_me:12871: \"$ac_try\"") >&5
12872   (eval $ac_try) 2>&5
12873   ac_status=$?
12874   echo "$as_me:12874: \$? = $ac_status" >&5
12875   (exit $ac_status); }; }; then
12876   INTEL_COMPILER=yes
12877 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12878
12879 else
12880   echo "$as_me: failed program was:" >&5
12881 cat conftest.$ac_ext >&5
12882 fi
12883 rm -f conftest.$ac_objext conftest.$ac_ext
12884                 CFLAGS="$cf_save_CFLAGS"
12885                 echo "$as_me:12885: result: $INTEL_COMPILER" >&5
12886 echo "${ECHO_T}$INTEL_COMPILER" >&6
12887                 ;;
12888         esac
12889 fi
12890
12891 CLANG_COMPILER=no
12892
12893 if test "$GCC" = yes ; then
12894         echo "$as_me:12894: checking if this is really Clang C compiler" >&5
12895 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12896         cf_save_CFLAGS="$CFLAGS"
12897         CFLAGS="$CFLAGS -Qunused-arguments"
12898         cat >conftest.$ac_ext <<_ACEOF
12899 #line 12899 "configure"
12900 #include "confdefs.h"
12901
12902 int
12903 main ()
12904 {
12905
12906 #ifdef __clang__
12907 #else
12908 make an error
12909 #endif
12910
12911   ;
12912   return 0;
12913 }
12914 _ACEOF
12915 rm -f conftest.$ac_objext
12916 if { (eval echo "$as_me:12916: \"$ac_compile\"") >&5
12917   (eval $ac_compile) 2>&5
12918   ac_status=$?
12919   echo "$as_me:12919: \$? = $ac_status" >&5
12920   (exit $ac_status); } &&
12921          { ac_try='test -s conftest.$ac_objext'
12922   { (eval echo "$as_me:12922: \"$ac_try\"") >&5
12923   (eval $ac_try) 2>&5
12924   ac_status=$?
12925   echo "$as_me:12925: \$? = $ac_status" >&5
12926   (exit $ac_status); }; }; then
12927   CLANG_COMPILER=yes
12928 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12929
12930 else
12931   echo "$as_me: failed program was:" >&5
12932 cat conftest.$ac_ext >&5
12933 fi
12934 rm -f conftest.$ac_objext conftest.$ac_ext
12935         CFLAGS="$cf_save_CFLAGS"
12936         echo "$as_me:12936: result: $CLANG_COMPILER" >&5
12937 echo "${ECHO_T}$CLANG_COMPILER" >&6
12938 fi
12939
12940 cat > conftest.$ac_ext <<EOF
12941 #line 12941 "${as_me:-configure}"
12942 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12943 EOF
12944
12945 if test "$INTEL_COMPILER" = yes
12946 then
12947 # The "-wdXXX" options suppress warnings:
12948 # remark #1419: external declaration in primary source file
12949 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12950 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12951 # remark #193: zero used for undefined preprocessing identifier
12952 # remark #593: variable "curs_sb_left_arrow" was set but never used
12953 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12954 # remark #869: parameter "tw" was never referenced
12955 # remark #981: operands are evaluated in unspecified order
12956 # warning #279: controlling expression is constant
12957
12958         { echo "$as_me:12958: checking for $CC warning options..." >&5
12959 echo "$as_me: checking for $CC warning options..." >&6;}
12960         cf_save_CFLAGS="$CFLAGS"
12961         EXTRA_CFLAGS="-Wall"
12962         for cf_opt in \
12963                 wd1419 \
12964                 wd1683 \
12965                 wd1684 \
12966                 wd193 \
12967                 wd593 \
12968                 wd279 \
12969                 wd810 \
12970                 wd869 \
12971                 wd981
12972         do
12973                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12974                 if { (eval echo "$as_me:12974: \"$ac_compile\"") >&5
12975   (eval $ac_compile) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); }; then
12979                         test -n "$verbose" && echo "$as_me:12979: result: ... -$cf_opt" >&5
12980 echo "${ECHO_T}... -$cf_opt" >&6
12981                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12982                 fi
12983         done
12984         CFLAGS="$cf_save_CFLAGS"
12985
12986 elif test "$GCC" = yes
12987 then
12988         { echo "$as_me:12988: checking for $CC warning options..." >&5
12989 echo "$as_me: checking for $CC warning options..." >&6;}
12990         cf_save_CFLAGS="$CFLAGS"
12991         EXTRA_CFLAGS=
12992         cf_warn_CONST=""
12993         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12994         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12995         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12996         for cf_opt in W Wall \
12997                 Wbad-function-cast \
12998                 Wcast-align \
12999                 Wcast-qual \
13000                 Wdeclaration-after-statement \
13001                 Wextra \
13002                 Winline \
13003                 Wmissing-declarations \
13004                 Wmissing-prototypes \
13005                 Wnested-externs \
13006                 Wpointer-arith \
13007                 Wshadow \
13008                 Wstrict-prototypes \
13009                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13010         do
13011                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13012                 if { (eval echo "$as_me:13012: \"$ac_compile\"") >&5
13013   (eval $ac_compile) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit $ac_status); }; then
13017                         test -n "$verbose" && echo "$as_me:13017: result: ... -$cf_opt" >&5
13018 echo "${ECHO_T}... -$cf_opt" >&6
13019                         case $cf_opt in #(vi
13020                         Wcast-qual) #(vi
13021                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13022                                 ;;
13023                         Winline) #(vi
13024                                 case $GCC_VERSION in
13025                                 [34].*)
13026                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13027
13028 echo "${as_me:-configure}:13028: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13029
13030                                         continue;;
13031                                 esac
13032                                 ;;
13033                         Wpointer-arith) #(vi
13034                                 case $GCC_VERSION in
13035                                 [12].*)
13036                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13037
13038 echo "${as_me:-configure}:13038: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13039
13040                                         continue;;
13041                                 esac
13042                                 ;;
13043                         esac
13044                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13045                 fi
13046         done
13047         CFLAGS="$cf_save_CFLAGS"
13048 fi
13049 rm -rf conftest*
13050
13051         if test "x$cf_with_cxx" = xyes ; then
13052
13053 INTEL_CPLUSPLUS=no
13054
13055 if test "$GCC" = yes ; then
13056         case $host_os in
13057         linux*|gnu*)
13058                 echo "$as_me:13058: checking if this is really Intel C++ compiler" >&5
13059 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13060                 cf_save_CFLAGS="$CXXFLAGS"
13061                 CXXFLAGS="$CXXFLAGS -no-gcc"
13062                 cat >conftest.$ac_ext <<_ACEOF
13063 #line 13063 "configure"
13064 #include "confdefs.h"
13065
13066 int
13067 main ()
13068 {
13069
13070 #ifdef __INTEL_COMPILER
13071 #else
13072 make an error
13073 #endif
13074
13075   ;
13076   return 0;
13077 }
13078 _ACEOF
13079 rm -f conftest.$ac_objext
13080 if { (eval echo "$as_me:13080: \"$ac_compile\"") >&5
13081   (eval $ac_compile) 2>&5
13082   ac_status=$?
13083   echo "$as_me:13083: \$? = $ac_status" >&5
13084   (exit $ac_status); } &&
13085          { ac_try='test -s conftest.$ac_objext'
13086   { (eval echo "$as_me:13086: \"$ac_try\"") >&5
13087   (eval $ac_try) 2>&5
13088   ac_status=$?
13089   echo "$as_me:13089: \$? = $ac_status" >&5
13090   (exit $ac_status); }; }; then
13091   INTEL_CPLUSPLUS=yes
13092 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13093
13094 else
13095   echo "$as_me: failed program was:" >&5
13096 cat conftest.$ac_ext >&5
13097 fi
13098 rm -f conftest.$ac_objext conftest.$ac_ext
13099                 CXXFLAGS="$cf_save_CFLAGS"
13100                 echo "$as_me:13100: result: $INTEL_CPLUSPLUS" >&5
13101 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13102                 ;;
13103         esac
13104 fi
13105
13106 CLANG_CPLUSPLUS=no
13107
13108 if test "$GCC" = yes ; then
13109         echo "$as_me:13109: checking if this is really Clang C++ compiler" >&5
13110 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13111         cf_save_CFLAGS="$CXXFLAGS"
13112         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13113         cat >conftest.$ac_ext <<_ACEOF
13114 #line 13114 "configure"
13115 #include "confdefs.h"
13116
13117 int
13118 main ()
13119 {
13120
13121 #ifdef __clang__
13122 #else
13123 make an error
13124 #endif
13125
13126   ;
13127   return 0;
13128 }
13129 _ACEOF
13130 rm -f conftest.$ac_objext
13131 if { (eval echo "$as_me:13131: \"$ac_compile\"") >&5
13132   (eval $ac_compile) 2>&5
13133   ac_status=$?
13134   echo "$as_me:13134: \$? = $ac_status" >&5
13135   (exit $ac_status); } &&
13136          { ac_try='test -s conftest.$ac_objext'
13137   { (eval echo "$as_me:13137: \"$ac_try\"") >&5
13138   (eval $ac_try) 2>&5
13139   ac_status=$?
13140   echo "$as_me:13140: \$? = $ac_status" >&5
13141   (exit $ac_status); }; }; then
13142   CLANG_CPLUSPLUS=yes
13143 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13144
13145 else
13146   echo "$as_me: failed program was:" >&5
13147 cat conftest.$ac_ext >&5
13148 fi
13149 rm -f conftest.$ac_objext conftest.$ac_ext
13150         CXXFLAGS="$cf_save_CFLAGS"
13151         echo "$as_me:13151: result: $CLANG_CPLUSPLUS" >&5
13152 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13153 fi
13154
13155 ac_ext=cc
13156 ac_cpp='$CXXCPP $CPPFLAGS'
13157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13158 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13160 ac_main_return=return
13161
13162 cat > conftest.$ac_ext <<EOF
13163 #line 13163 "configure"
13164 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13165 EOF
13166
13167 if test "$INTEL_CPLUSPLUS" = yes
13168 then
13169 # The "-wdXXX" options suppress warnings:
13170 # remark #1419: external declaration in primary source file
13171 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13172 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13173 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13174 # remark #193: zero used for undefined preprocessing identifier
13175 # remark #593: variable "curs_sb_left_arrow" was set but never used
13176 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13177 # remark #869: parameter "tw" was never referenced
13178 # remark #981: operands are evaluated in unspecified order
13179 # warning #269: invalid format string conversion
13180
13181         { echo "$as_me:13181: checking for $CC warning options..." >&5
13182 echo "$as_me: checking for $CC warning options..." >&6;}
13183         cf_save_CXXFLAGS="$CXXFLAGS"
13184         EXTRA_CXXFLAGS="-Wall"
13185         for cf_opt in \
13186                 wd1419 \
13187                 wd1682 \
13188                 wd1683 \
13189                 wd1684 \
13190                 wd193 \
13191                 wd279 \
13192                 wd593 \
13193                 wd810 \
13194                 wd869 \
13195                 wd981
13196         do
13197                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13198                 if { (eval echo "$as_me:13198: \"$ac_compile\"") >&5
13199   (eval $ac_compile) 2>&5
13200   ac_status=$?
13201   echo "$as_me:13201: \$? = $ac_status" >&5
13202   (exit $ac_status); }; then
13203                         test -n "$verbose" && echo "$as_me:13203: result: ... -$cf_opt" >&5
13204 echo "${ECHO_T}... -$cf_opt" >&6
13205                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13206                 fi
13207         done
13208         CXXFLAGS="$cf_save_CXXFLAGS"
13209
13210 elif test "$GXX" = yes
13211 then
13212         { echo "$as_me:13212: checking for $CXX warning options..." >&5
13213 echo "$as_me: checking for $CXX warning options..." >&6;}
13214         cf_save_CXXFLAGS="$CXXFLAGS"
13215         EXTRA_CXXFLAGS="-W -Wall"
13216         cf_gxx_extra_warnings=""
13217         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13218         case "$GCC_VERSION" in
13219         [1-2].*)
13220                 ;;
13221         *)
13222                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13223                 ;;
13224         esac
13225         for cf_opt in \
13226                 Wabi \
13227                 fabi-version=0 \
13228                 Wextra \
13229                 Wignored-qualifiers \
13230                 Wlogical-op \
13231                 Woverloaded-virtual \
13232                 Wsign-promo \
13233                 Wsynth \
13234                 Wold-style-cast \
13235                 Wcast-align \
13236                 Wcast-qual \
13237                 Wpointer-arith \
13238                 Wshadow \
13239                 Wundef $cf_gxx_extra_warnings Wno-unused
13240         do
13241                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13242                 if { (eval echo "$as_me:13242: \"$ac_compile\"") >&5
13243   (eval $ac_compile) 2>&5
13244   ac_status=$?
13245   echo "$as_me:13245: \$? = $ac_status" >&5
13246   (exit $ac_status); }; then
13247                         test -n "$verbose" && echo "$as_me:13247: result: ... -$cf_opt" >&5
13248 echo "${ECHO_T}... -$cf_opt" >&6
13249                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13250                 else
13251                         test -n "$verbose" && echo "$as_me:13251: result: ... no -$cf_opt" >&5
13252 echo "${ECHO_T}... no -$cf_opt" >&6
13253                 fi
13254         done
13255         CXXFLAGS="$cf_save_CXXFLAGS"
13256 fi
13257
13258 rm -rf conftest*
13259 ac_ext=c
13260 ac_cpp='$CPP $CPPFLAGS'
13261 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13262 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13263 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13264 ac_main_return=return
13265
13266         fi
13267 fi
13268
13269 if test "$GCC" = yes
13270 then
13271 cat > conftest.i <<EOF
13272 #ifndef GCC_PRINTF
13273 #define GCC_PRINTF 0
13274 #endif
13275 #ifndef GCC_SCANF
13276 #define GCC_SCANF 0
13277 #endif
13278 #ifndef GCC_NORETURN
13279 #define GCC_NORETURN /* nothing */
13280 #endif
13281 #ifndef GCC_UNUSED
13282 #define GCC_UNUSED /* nothing */
13283 #endif
13284 EOF
13285 if test "$GCC" = yes
13286 then
13287         { echo "$as_me:13287: checking for $CC __attribute__ directives..." >&5
13288 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13289 cat > conftest.$ac_ext <<EOF
13290 #line 13290 "${as_me:-configure}"
13291 #include "confdefs.h"
13292 #include "conftest.h"
13293 #include "conftest.i"
13294 #if     GCC_PRINTF
13295 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13296 #else
13297 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13298 #endif
13299 #if     GCC_SCANF
13300 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13301 #else
13302 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13303 #endif
13304 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13305 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13306 extern void foo(void) GCC_NORETURN;
13307 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13308 EOF
13309         cf_printf_attribute=no
13310         cf_scanf_attribute=no
13311         for cf_attribute in scanf printf unused noreturn
13312         do
13313
13314 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13315
13316                 cf_directive="__attribute__(($cf_attribute))"
13317                 echo "checking for $CC $cf_directive" 1>&5
13318
13319                 case $cf_attribute in #(vi
13320                 printf) #(vi
13321                         cf_printf_attribute=yes
13322                         cat >conftest.h <<EOF
13323 #define GCC_$cf_ATTRIBUTE 1
13324 EOF
13325                         ;;
13326                 scanf) #(vi
13327                         cf_scanf_attribute=yes
13328                         cat >conftest.h <<EOF
13329 #define GCC_$cf_ATTRIBUTE 1
13330 EOF
13331                         ;;
13332                 *) #(vi
13333                         cat >conftest.h <<EOF
13334 #define GCC_$cf_ATTRIBUTE $cf_directive
13335 EOF
13336                         ;;
13337                 esac
13338
13339                 if { (eval echo "$as_me:13339: \"$ac_compile\"") >&5
13340   (eval $ac_compile) 2>&5
13341   ac_status=$?
13342   echo "$as_me:13342: \$? = $ac_status" >&5
13343   (exit $ac_status); }; then
13344                         test -n "$verbose" && echo "$as_me:13344: result: ... $cf_attribute" >&5
13345 echo "${ECHO_T}... $cf_attribute" >&6
13346                         cat conftest.h >>confdefs.h
13347                         case $cf_attribute in #(vi
13348                         noreturn) #(vi
13349
13350 cat >>confdefs.h <<EOF
13351 #define GCC_NORETURN $cf_directive
13352 EOF
13353
13354                                 ;;
13355                         printf) #(vi
13356                                 cf_value='/* nothing */'
13357                                 if test "$cf_printf_attribute" != no ; then
13358                                         cf_value='__attribute__((format(printf,fmt,var)))'
13359
13360 cat >>confdefs.h <<\EOF
13361 #define GCC_PRINTF 1
13362 EOF
13363
13364                                 fi
13365
13366 cat >>confdefs.h <<EOF
13367 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13368 EOF
13369
13370                                 ;;
13371                         scanf) #(vi
13372                                 cf_value='/* nothing */'
13373                                 if test "$cf_scanf_attribute" != no ; then
13374                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13375
13376 cat >>confdefs.h <<\EOF
13377 #define GCC_SCANF 1
13378 EOF
13379
13380                                 fi
13381
13382 cat >>confdefs.h <<EOF
13383 #define GCC_SCANFLIKE(fmt,var) $cf_value
13384 EOF
13385
13386                                 ;;
13387                         unused) #(vi
13388
13389 cat >>confdefs.h <<EOF
13390 #define GCC_UNUSED $cf_directive
13391 EOF
13392
13393                                 ;;
13394                         esac
13395                 fi
13396         done
13397 else
13398         fgrep define conftest.i >>confdefs.h
13399 fi
13400 rm -rf conftest*
13401 fi
13402
13403 echo "$as_me:13403: checking if you want to work around bogus compiler/loader warnings" >&5
13404 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13405
13406 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13407 if test "${enable_string_hacks+set}" = set; then
13408   enableval="$enable_string_hacks"
13409   with_string_hacks=$enableval
13410 else
13411   with_string_hacks=no
13412 fi;
13413 echo "$as_me:13413: result: $with_string_hacks" >&5
13414 echo "${ECHO_T}$with_string_hacks" >&6
13415
13416 if test "x$with_string_hacks" = "xyes"; then
13417
13418 cat >>confdefs.h <<\EOF
13419 #define USE_STRING_HACKS 1
13420 EOF
13421
13422         { echo "$as_me:13422: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13423 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13424
13425 for ac_func in strlcat strlcpy snprintf
13426 do
13427 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13428 echo "$as_me:13428: checking for $ac_func" >&5
13429 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13430 if eval "test \"\${$as_ac_var+set}\" = set"; then
13431   echo $ECHO_N "(cached) $ECHO_C" >&6
13432 else
13433   cat >conftest.$ac_ext <<_ACEOF
13434 #line 13434 "configure"
13435 #include "confdefs.h"
13436 /* System header to define __stub macros and hopefully few prototypes,
13437     which can conflict with char $ac_func (); below.  */
13438 #include <assert.h>
13439 /* Override any gcc2 internal prototype to avoid an error.  */
13440 #ifdef __cplusplus
13441 extern "C"
13442 #endif
13443 /* We use char because int might match the return type of a gcc2
13444    builtin and then its argument prototype would still apply.  */
13445 char $ac_func ();
13446 char (*f) ();
13447
13448 int
13449 main ()
13450 {
13451 /* The GNU C library defines this for functions which it implements
13452     to always fail with ENOSYS.  Some functions are actually named
13453     something starting with __ and the normal name is an alias.  */
13454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13455 choke me
13456 #else
13457 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13458 #endif
13459
13460   ;
13461   return 0;
13462 }
13463 _ACEOF
13464 rm -f conftest.$ac_objext conftest$ac_exeext
13465 if { (eval echo "$as_me:13465: \"$ac_link\"") >&5
13466   (eval $ac_link) 2>&5
13467   ac_status=$?
13468   echo "$as_me:13468: \$? = $ac_status" >&5
13469   (exit $ac_status); } &&
13470          { ac_try='test -s conftest$ac_exeext'
13471   { (eval echo "$as_me:13471: \"$ac_try\"") >&5
13472   (eval $ac_try) 2>&5
13473   ac_status=$?
13474   echo "$as_me:13474: \$? = $ac_status" >&5
13475   (exit $ac_status); }; }; then
13476   eval "$as_ac_var=yes"
13477 else
13478   echo "$as_me: failed program was:" >&5
13479 cat conftest.$ac_ext >&5
13480 eval "$as_ac_var=no"
13481 fi
13482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13483 fi
13484 echo "$as_me:13484: result: `eval echo '${'$as_ac_var'}'`" >&5
13485 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13486 if test `eval echo '${'$as_ac_var'}'` = yes; then
13487   cat >>confdefs.h <<EOF
13488 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13489 EOF
13490
13491 fi
13492 done
13493
13494 fi
13495
13496 ###     use option --enable-assertions to turn on generation of assertion code
13497 echo "$as_me:13497: checking if you want to enable runtime assertions" >&5
13498 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13499
13500 # Check whether --enable-assertions or --disable-assertions was given.
13501 if test "${enable_assertions+set}" = set; then
13502   enableval="$enable_assertions"
13503   with_assertions=$enableval
13504 else
13505   with_assertions=no
13506 fi;
13507 echo "$as_me:13507: result: $with_assertions" >&5
13508 echo "${ECHO_T}$with_assertions" >&6
13509 if test -n "$GCC"
13510 then
13511         if test "$with_assertions" = no
13512         then
13513                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13514         else
13515
13516         ADAFLAGS="$ADAFLAGS -gnata"
13517
13518         fi
13519 fi
13520
13521 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13522
13523 echo "$as_me:13523: checking if you want to use dmalloc for testing" >&5
13524 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13525
13526 # Check whether --with-dmalloc or --without-dmalloc was given.
13527 if test "${with_dmalloc+set}" = set; then
13528   withval="$with_dmalloc"
13529
13530 cat >>confdefs.h <<EOF
13531 #define USE_DMALLOC 1
13532 EOF
13533
13534         : ${with_cflags:=-g}
13535         : ${with_no_leaks:=yes}
13536          with_dmalloc=yes
13537 else
13538   with_dmalloc=
13539 fi;
13540 echo "$as_me:13540: result: ${with_dmalloc:-no}" >&5
13541 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13542
13543 case .$with_cflags in #(vi
13544 .*-g*)
13545         case .$CFLAGS in #(vi
13546         .*-g*) #(vi
13547                 ;;
13548         *)
13549
13550 cf_fix_cppflags=no
13551 cf_new_cflags=
13552 cf_new_cppflags=
13553 cf_new_extra_cppflags=
13554
13555 for cf_add_cflags in -g
13556 do
13557 case $cf_fix_cppflags in
13558 no)
13559         case $cf_add_cflags in #(vi
13560         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13561                 case $cf_add_cflags in
13562                 -D*)
13563                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13564
13565                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13566                                 && test -z "${cf_tst_cflags}" \
13567                                 && cf_fix_cppflags=yes
13568
13569                         if test $cf_fix_cppflags = yes ; then
13570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13571                                 continue
13572                         elif test "${cf_tst_cflags}" = "\"'" ; then
13573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13574                                 continue
13575                         fi
13576                         ;;
13577                 esac
13578                 case "$CPPFLAGS" in
13579                 *$cf_add_cflags) #(vi
13580                         ;;
13581                 *) #(vi
13582                         case $cf_add_cflags in #(vi
13583                         -D*)
13584                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13585
13586 CPPFLAGS=`echo "$CPPFLAGS" | \
13587         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13588                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13589
13590                                 ;;
13591                         esac
13592                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13593                         ;;
13594                 esac
13595                 ;;
13596         *)
13597                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13598                 ;;
13599         esac
13600         ;;
13601 yes)
13602         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13603
13604         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13605
13606         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13607                 && test -z "${cf_tst_cflags}" \
13608                 && cf_fix_cppflags=no
13609         ;;
13610 esac
13611 done
13612
13613 if test -n "$cf_new_cflags" ; then
13614
13615         CFLAGS="$CFLAGS $cf_new_cflags"
13616 fi
13617
13618 if test -n "$cf_new_cppflags" ; then
13619
13620         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13621 fi
13622
13623 if test -n "$cf_new_extra_cppflags" ; then
13624
13625         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13626 fi
13627
13628                 ;;
13629         esac
13630         ;;
13631 esac
13632
13633 if test "$with_dmalloc" = yes ; then
13634         echo "$as_me:13634: checking for dmalloc.h" >&5
13635 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13636 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13637   echo $ECHO_N "(cached) $ECHO_C" >&6
13638 else
13639   cat >conftest.$ac_ext <<_ACEOF
13640 #line 13640 "configure"
13641 #include "confdefs.h"
13642 #include <dmalloc.h>
13643 _ACEOF
13644 if { (eval echo "$as_me:13644: \"$ac_cpp conftest.$ac_ext\"") >&5
13645   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13646   ac_status=$?
13647   egrep -v '^ *\+' conftest.er1 >conftest.err
13648   rm -f conftest.er1
13649   cat conftest.err >&5
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit $ac_status); } >/dev/null; then
13652   if test -s conftest.err; then
13653     ac_cpp_err=$ac_c_preproc_warn_flag
13654   else
13655     ac_cpp_err=
13656   fi
13657 else
13658   ac_cpp_err=yes
13659 fi
13660 if test -z "$ac_cpp_err"; then
13661   ac_cv_header_dmalloc_h=yes
13662 else
13663   echo "$as_me: failed program was:" >&5
13664   cat conftest.$ac_ext >&5
13665   ac_cv_header_dmalloc_h=no
13666 fi
13667 rm -f conftest.err conftest.$ac_ext
13668 fi
13669 echo "$as_me:13669: result: $ac_cv_header_dmalloc_h" >&5
13670 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13671 if test $ac_cv_header_dmalloc_h = yes; then
13672
13673 echo "$as_me:13673: checking for dmalloc_debug in -ldmalloc" >&5
13674 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13675 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13676   echo $ECHO_N "(cached) $ECHO_C" >&6
13677 else
13678   ac_check_lib_save_LIBS=$LIBS
13679 LIBS="-ldmalloc  $LIBS"
13680 cat >conftest.$ac_ext <<_ACEOF
13681 #line 13681 "configure"
13682 #include "confdefs.h"
13683
13684 /* Override any gcc2 internal prototype to avoid an error.  */
13685 #ifdef __cplusplus
13686 extern "C"
13687 #endif
13688 /* We use char because int might match the return type of a gcc2
13689    builtin and then its argument prototype would still apply.  */
13690 char dmalloc_debug ();
13691 int
13692 main ()
13693 {
13694 dmalloc_debug ();
13695   ;
13696   return 0;
13697 }
13698 _ACEOF
13699 rm -f conftest.$ac_objext conftest$ac_exeext
13700 if { (eval echo "$as_me:13700: \"$ac_link\"") >&5
13701   (eval $ac_link) 2>&5
13702   ac_status=$?
13703   echo "$as_me:13703: \$? = $ac_status" >&5
13704   (exit $ac_status); } &&
13705          { ac_try='test -s conftest$ac_exeext'
13706   { (eval echo "$as_me:13706: \"$ac_try\"") >&5
13707   (eval $ac_try) 2>&5
13708   ac_status=$?
13709   echo "$as_me:13709: \$? = $ac_status" >&5
13710   (exit $ac_status); }; }; then
13711   ac_cv_lib_dmalloc_dmalloc_debug=yes
13712 else
13713   echo "$as_me: failed program was:" >&5
13714 cat conftest.$ac_ext >&5
13715 ac_cv_lib_dmalloc_dmalloc_debug=no
13716 fi
13717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13718 LIBS=$ac_check_lib_save_LIBS
13719 fi
13720 echo "$as_me:13720: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13721 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13722 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13723   cat >>confdefs.h <<EOF
13724 #define HAVE_LIBDMALLOC 1
13725 EOF
13726
13727   LIBS="-ldmalloc $LIBS"
13728
13729 fi
13730
13731 fi
13732
13733 fi
13734
13735 echo "$as_me:13735: checking if you want to use dbmalloc for testing" >&5
13736 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13737
13738 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13739 if test "${with_dbmalloc+set}" = set; then
13740   withval="$with_dbmalloc"
13741
13742 cat >>confdefs.h <<EOF
13743 #define USE_DBMALLOC 1
13744 EOF
13745
13746         : ${with_cflags:=-g}
13747         : ${with_no_leaks:=yes}
13748          with_dbmalloc=yes
13749 else
13750   with_dbmalloc=
13751 fi;
13752 echo "$as_me:13752: result: ${with_dbmalloc:-no}" >&5
13753 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13754
13755 case .$with_cflags in #(vi
13756 .*-g*)
13757         case .$CFLAGS in #(vi
13758         .*-g*) #(vi
13759                 ;;
13760         *)
13761
13762 cf_fix_cppflags=no
13763 cf_new_cflags=
13764 cf_new_cppflags=
13765 cf_new_extra_cppflags=
13766
13767 for cf_add_cflags in -g
13768 do
13769 case $cf_fix_cppflags in
13770 no)
13771         case $cf_add_cflags in #(vi
13772         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13773                 case $cf_add_cflags in
13774                 -D*)
13775                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13776
13777                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13778                                 && test -z "${cf_tst_cflags}" \
13779                                 && cf_fix_cppflags=yes
13780
13781                         if test $cf_fix_cppflags = yes ; then
13782                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13783                                 continue
13784                         elif test "${cf_tst_cflags}" = "\"'" ; then
13785                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13786                                 continue
13787                         fi
13788                         ;;
13789                 esac
13790                 case "$CPPFLAGS" in
13791                 *$cf_add_cflags) #(vi
13792                         ;;
13793                 *) #(vi
13794                         case $cf_add_cflags in #(vi
13795                         -D*)
13796                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13797
13798 CPPFLAGS=`echo "$CPPFLAGS" | \
13799         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13800                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13801
13802                                 ;;
13803                         esac
13804                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13805                         ;;
13806                 esac
13807                 ;;
13808         *)
13809                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13810                 ;;
13811         esac
13812         ;;
13813 yes)
13814         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13815
13816         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13817
13818         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13819                 && test -z "${cf_tst_cflags}" \
13820                 && cf_fix_cppflags=no
13821         ;;
13822 esac
13823 done
13824
13825 if test -n "$cf_new_cflags" ; then
13826
13827         CFLAGS="$CFLAGS $cf_new_cflags"
13828 fi
13829
13830 if test -n "$cf_new_cppflags" ; then
13831
13832         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13833 fi
13834
13835 if test -n "$cf_new_extra_cppflags" ; then
13836
13837         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13838 fi
13839
13840                 ;;
13841         esac
13842         ;;
13843 esac
13844
13845 if test "$with_dbmalloc" = yes ; then
13846         echo "$as_me:13846: checking for dbmalloc.h" >&5
13847 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13848 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13849   echo $ECHO_N "(cached) $ECHO_C" >&6
13850 else
13851   cat >conftest.$ac_ext <<_ACEOF
13852 #line 13852 "configure"
13853 #include "confdefs.h"
13854 #include <dbmalloc.h>
13855 _ACEOF
13856 if { (eval echo "$as_me:13856: \"$ac_cpp conftest.$ac_ext\"") >&5
13857   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13858   ac_status=$?
13859   egrep -v '^ *\+' conftest.er1 >conftest.err
13860   rm -f conftest.er1
13861   cat conftest.err >&5
13862   echo "$as_me:13862: \$? = $ac_status" >&5
13863   (exit $ac_status); } >/dev/null; then
13864   if test -s conftest.err; then
13865     ac_cpp_err=$ac_c_preproc_warn_flag
13866   else
13867     ac_cpp_err=
13868   fi
13869 else
13870   ac_cpp_err=yes
13871 fi
13872 if test -z "$ac_cpp_err"; then
13873   ac_cv_header_dbmalloc_h=yes
13874 else
13875   echo "$as_me: failed program was:" >&5
13876   cat conftest.$ac_ext >&5
13877   ac_cv_header_dbmalloc_h=no
13878 fi
13879 rm -f conftest.err conftest.$ac_ext
13880 fi
13881 echo "$as_me:13881: result: $ac_cv_header_dbmalloc_h" >&5
13882 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13883 if test $ac_cv_header_dbmalloc_h = yes; then
13884
13885 echo "$as_me:13885: checking for debug_malloc in -ldbmalloc" >&5
13886 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13887 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13888   echo $ECHO_N "(cached) $ECHO_C" >&6
13889 else
13890   ac_check_lib_save_LIBS=$LIBS
13891 LIBS="-ldbmalloc  $LIBS"
13892 cat >conftest.$ac_ext <<_ACEOF
13893 #line 13893 "configure"
13894 #include "confdefs.h"
13895
13896 /* Override any gcc2 internal prototype to avoid an error.  */
13897 #ifdef __cplusplus
13898 extern "C"
13899 #endif
13900 /* We use char because int might match the return type of a gcc2
13901    builtin and then its argument prototype would still apply.  */
13902 char debug_malloc ();
13903 int
13904 main ()
13905 {
13906 debug_malloc ();
13907   ;
13908   return 0;
13909 }
13910 _ACEOF
13911 rm -f conftest.$ac_objext conftest$ac_exeext
13912 if { (eval echo "$as_me:13912: \"$ac_link\"") >&5
13913   (eval $ac_link) 2>&5
13914   ac_status=$?
13915   echo "$as_me:13915: \$? = $ac_status" >&5
13916   (exit $ac_status); } &&
13917          { ac_try='test -s conftest$ac_exeext'
13918   { (eval echo "$as_me:13918: \"$ac_try\"") >&5
13919   (eval $ac_try) 2>&5
13920   ac_status=$?
13921   echo "$as_me:13921: \$? = $ac_status" >&5
13922   (exit $ac_status); }; }; then
13923   ac_cv_lib_dbmalloc_debug_malloc=yes
13924 else
13925   echo "$as_me: failed program was:" >&5
13926 cat conftest.$ac_ext >&5
13927 ac_cv_lib_dbmalloc_debug_malloc=no
13928 fi
13929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13930 LIBS=$ac_check_lib_save_LIBS
13931 fi
13932 echo "$as_me:13932: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13933 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13934 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13935   cat >>confdefs.h <<EOF
13936 #define HAVE_LIBDBMALLOC 1
13937 EOF
13938
13939   LIBS="-ldbmalloc $LIBS"
13940
13941 fi
13942
13943 fi
13944
13945 fi
13946
13947 echo "$as_me:13947: checking if you want to use valgrind for testing" >&5
13948 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13949
13950 # Check whether --with-valgrind or --without-valgrind was given.
13951 if test "${with_valgrind+set}" = set; then
13952   withval="$with_valgrind"
13953
13954 cat >>confdefs.h <<EOF
13955 #define USE_VALGRIND 1
13956 EOF
13957
13958         : ${with_cflags:=-g}
13959         : ${with_no_leaks:=yes}
13960          with_valgrind=yes
13961 else
13962   with_valgrind=
13963 fi;
13964 echo "$as_me:13964: result: ${with_valgrind:-no}" >&5
13965 echo "${ECHO_T}${with_valgrind:-no}" >&6
13966
13967 case .$with_cflags in #(vi
13968 .*-g*)
13969         case .$CFLAGS in #(vi
13970         .*-g*) #(vi
13971                 ;;
13972         *)
13973
13974 cf_fix_cppflags=no
13975 cf_new_cflags=
13976 cf_new_cppflags=
13977 cf_new_extra_cppflags=
13978
13979 for cf_add_cflags in -g
13980 do
13981 case $cf_fix_cppflags in
13982 no)
13983         case $cf_add_cflags in #(vi
13984         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13985                 case $cf_add_cflags in
13986                 -D*)
13987                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13988
13989                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13990                                 && test -z "${cf_tst_cflags}" \
13991                                 && cf_fix_cppflags=yes
13992
13993                         if test $cf_fix_cppflags = yes ; then
13994                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13995                                 continue
13996                         elif test "${cf_tst_cflags}" = "\"'" ; then
13997                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13998                                 continue
13999                         fi
14000                         ;;
14001                 esac
14002                 case "$CPPFLAGS" in
14003                 *$cf_add_cflags) #(vi
14004                         ;;
14005                 *) #(vi
14006                         case $cf_add_cflags in #(vi
14007                         -D*)
14008                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14009
14010 CPPFLAGS=`echo "$CPPFLAGS" | \
14011         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14012                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14013
14014                                 ;;
14015                         esac
14016                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14017                         ;;
14018                 esac
14019                 ;;
14020         *)
14021                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14022                 ;;
14023         esac
14024         ;;
14025 yes)
14026         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14027
14028         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14029
14030         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14031                 && test -z "${cf_tst_cflags}" \
14032                 && cf_fix_cppflags=no
14033         ;;
14034 esac
14035 done
14036
14037 if test -n "$cf_new_cflags" ; then
14038
14039         CFLAGS="$CFLAGS $cf_new_cflags"
14040 fi
14041
14042 if test -n "$cf_new_cppflags" ; then
14043
14044         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14045 fi
14046
14047 if test -n "$cf_new_extra_cppflags" ; then
14048
14049         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14050 fi
14051
14052                 ;;
14053         esac
14054         ;;
14055 esac
14056
14057 echo "$as_me:14057: checking if you want to perform memory-leak testing" >&5
14058 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14059
14060 # Check whether --enable-leaks or --disable-leaks was given.
14061 if test "${enable_leaks+set}" = set; then
14062   enableval="$enable_leaks"
14063   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14064 else
14065   : ${with_no_leaks:=no}
14066 fi;
14067 echo "$as_me:14067: result: $with_no_leaks" >&5
14068 echo "${ECHO_T}$with_no_leaks" >&6
14069
14070 if test "$with_no_leaks" = yes ; then
14071
14072 cat >>confdefs.h <<\EOF
14073 #define NO_LEAKS 1
14074 EOF
14075
14076 cat >>confdefs.h <<\EOF
14077 #define YY_NO_LEAKS 1
14078 EOF
14079
14080 fi
14081
14082 cat >>confdefs.h <<\EOF
14083 #define HAVE_NC_ALLOC_H 1
14084 EOF
14085
14086 ###     use option --enable-expanded to generate certain macros as functions
14087
14088 # Check whether --enable-expanded or --disable-expanded was given.
14089 if test "${enable_expanded+set}" = set; then
14090   enableval="$enable_expanded"
14091   test "x$enableval" = xyes &&
14092 cat >>confdefs.h <<\EOF
14093 #define NCURSES_EXPANDED 1
14094 EOF
14095
14096 fi;
14097
14098 ###     use option --disable-macros to suppress macros in favor of functions
14099
14100 # Check whether --enable-macros or --disable-macros was given.
14101 if test "${enable_macros+set}" = set; then
14102   enableval="$enable_macros"
14103   test "$enableval" = no &&
14104 cat >>confdefs.h <<\EOF
14105 #define NCURSES_NOMACROS 1
14106 EOF
14107
14108 fi;
14109
14110 # Normally we only add trace() to the debug-library.  Allow this to be
14111 # extended to all models of the ncurses library:
14112 cf_all_traces=no
14113 case "$CFLAGS $CPPFLAGS" in
14114 *-DTRACE*)
14115         cf_all_traces=yes
14116         ;;
14117 esac
14118
14119 echo "$as_me:14119: checking whether to add trace feature to all models" >&5
14120 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14121
14122 # Check whether --with-trace or --without-trace was given.
14123 if test "${with_trace+set}" = set; then
14124   withval="$with_trace"
14125   cf_with_trace=$withval
14126 else
14127   cf_with_trace=$cf_all_traces
14128 fi;
14129 echo "$as_me:14129: result: $cf_with_trace" >&5
14130 echo "${ECHO_T}$cf_with_trace" >&6
14131
14132 if test "x$cf_with_trace" = xyes ; then
14133         LIB_TRACING=all
14134         ADA_TRACE=TRUE
14135
14136 cf_fix_cppflags=no
14137 cf_new_cflags=
14138 cf_new_cppflags=
14139 cf_new_extra_cppflags=
14140
14141 for cf_add_cflags in -DTRACE
14142 do
14143 case $cf_fix_cppflags in
14144 no)
14145         case $cf_add_cflags in #(vi
14146         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14147                 case $cf_add_cflags in
14148                 -D*)
14149                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14150
14151                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14152                                 && test -z "${cf_tst_cflags}" \
14153                                 && cf_fix_cppflags=yes
14154
14155                         if test $cf_fix_cppflags = yes ; then
14156                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14157                                 continue
14158                         elif test "${cf_tst_cflags}" = "\"'" ; then
14159                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14160                                 continue
14161                         fi
14162                         ;;
14163                 esac
14164                 case "$CPPFLAGS" in
14165                 *$cf_add_cflags) #(vi
14166                         ;;
14167                 *) #(vi
14168                         case $cf_add_cflags in #(vi
14169                         -D*)
14170                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14171
14172 CPPFLAGS=`echo "$CPPFLAGS" | \
14173         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14174                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14175
14176                                 ;;
14177                         esac
14178                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14179                         ;;
14180                 esac
14181                 ;;
14182         *)
14183                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14184                 ;;
14185         esac
14186         ;;
14187 yes)
14188         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14189
14190         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14191
14192         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14193                 && test -z "${cf_tst_cflags}" \
14194                 && cf_fix_cppflags=no
14195         ;;
14196 esac
14197 done
14198
14199 if test -n "$cf_new_cflags" ; then
14200
14201         CFLAGS="$CFLAGS $cf_new_cflags"
14202 fi
14203
14204 if test -n "$cf_new_cppflags" ; then
14205
14206         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14207 fi
14208
14209 if test -n "$cf_new_extra_cppflags" ; then
14210
14211         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14212 fi
14213
14214 else
14215         LIB_TRACING=DEBUG
14216         ADA_TRACE=FALSE
14217 fi
14218
14219 echo "$as_me:14219: checking if we want to use GNAT projects" >&5
14220 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14221
14222 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14223 if test "${enable_gnat_projects+set}" = set; then
14224   enableval="$enable_gnat_projects"
14225   test "$enableval" != no && enableval=yes
14226   if test "$enableval" != "yes" ; then
14227     enable_gnat_projects=no
14228   else
14229     enable_gnat_projects=yes
14230   fi
14231 else
14232   enableval=yes
14233   enable_gnat_projects=yes
14234
14235 fi;
14236 echo "$as_me:14236: result: $enable_gnat_projects" >&5
14237 echo "${ECHO_T}$enable_gnat_projects" >&6
14238
14239 ###     Checks for libraries.
14240 case $cf_cv_system_name in #(vi
14241 *mingw32*|*mingw64*) #(vi
14242         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14243         LIBS=" -lpsapi $LIBS"
14244         ;;
14245 *)
14246 echo "$as_me:14246: checking for gettimeofday" >&5
14247 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14248 if test "${ac_cv_func_gettimeofday+set}" = set; then
14249   echo $ECHO_N "(cached) $ECHO_C" >&6
14250 else
14251   cat >conftest.$ac_ext <<_ACEOF
14252 #line 14252 "configure"
14253 #include "confdefs.h"
14254 /* System header to define __stub macros and hopefully few prototypes,
14255     which can conflict with char gettimeofday (); below.  */
14256 #include <assert.h>
14257 /* Override any gcc2 internal prototype to avoid an error.  */
14258 #ifdef __cplusplus
14259 extern "C"
14260 #endif
14261 /* We use char because int might match the return type of a gcc2
14262    builtin and then its argument prototype would still apply.  */
14263 char gettimeofday ();
14264 char (*f) ();
14265
14266 int
14267 main ()
14268 {
14269 /* The GNU C library defines this for functions which it implements
14270     to always fail with ENOSYS.  Some functions are actually named
14271     something starting with __ and the normal name is an alias.  */
14272 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14273 choke me
14274 #else
14275 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14276 #endif
14277
14278   ;
14279   return 0;
14280 }
14281 _ACEOF
14282 rm -f conftest.$ac_objext conftest$ac_exeext
14283 if { (eval echo "$as_me:14283: \"$ac_link\"") >&5
14284   (eval $ac_link) 2>&5
14285   ac_status=$?
14286   echo "$as_me:14286: \$? = $ac_status" >&5
14287   (exit $ac_status); } &&
14288          { ac_try='test -s conftest$ac_exeext'
14289   { (eval echo "$as_me:14289: \"$ac_try\"") >&5
14290   (eval $ac_try) 2>&5
14291   ac_status=$?
14292   echo "$as_me:14292: \$? = $ac_status" >&5
14293   (exit $ac_status); }; }; then
14294   ac_cv_func_gettimeofday=yes
14295 else
14296   echo "$as_me: failed program was:" >&5
14297 cat conftest.$ac_ext >&5
14298 ac_cv_func_gettimeofday=no
14299 fi
14300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14301 fi
14302 echo "$as_me:14302: result: $ac_cv_func_gettimeofday" >&5
14303 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14304 if test $ac_cv_func_gettimeofday = yes; then
14305
14306 cat >>confdefs.h <<\EOF
14307 #define HAVE_GETTIMEOFDAY 1
14308 EOF
14309
14310 else
14311
14312 echo "$as_me:14312: checking for gettimeofday in -lbsd" >&5
14313 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14314 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14315   echo $ECHO_N "(cached) $ECHO_C" >&6
14316 else
14317   ac_check_lib_save_LIBS=$LIBS
14318 LIBS="-lbsd  $LIBS"
14319 cat >conftest.$ac_ext <<_ACEOF
14320 #line 14320 "configure"
14321 #include "confdefs.h"
14322
14323 /* Override any gcc2 internal prototype to avoid an error.  */
14324 #ifdef __cplusplus
14325 extern "C"
14326 #endif
14327 /* We use char because int might match the return type of a gcc2
14328    builtin and then its argument prototype would still apply.  */
14329 char gettimeofday ();
14330 int
14331 main ()
14332 {
14333 gettimeofday ();
14334   ;
14335   return 0;
14336 }
14337 _ACEOF
14338 rm -f conftest.$ac_objext conftest$ac_exeext
14339 if { (eval echo "$as_me:14339: \"$ac_link\"") >&5
14340   (eval $ac_link) 2>&5
14341   ac_status=$?
14342   echo "$as_me:14342: \$? = $ac_status" >&5
14343   (exit $ac_status); } &&
14344          { ac_try='test -s conftest$ac_exeext'
14345   { (eval echo "$as_me:14345: \"$ac_try\"") >&5
14346   (eval $ac_try) 2>&5
14347   ac_status=$?
14348   echo "$as_me:14348: \$? = $ac_status" >&5
14349   (exit $ac_status); }; }; then
14350   ac_cv_lib_bsd_gettimeofday=yes
14351 else
14352   echo "$as_me: failed program was:" >&5
14353 cat conftest.$ac_ext >&5
14354 ac_cv_lib_bsd_gettimeofday=no
14355 fi
14356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14357 LIBS=$ac_check_lib_save_LIBS
14358 fi
14359 echo "$as_me:14359: result: $ac_cv_lib_bsd_gettimeofday" >&5
14360 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14361 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14362
14363 cat >>confdefs.h <<\EOF
14364 #define HAVE_GETTIMEOFDAY 1
14365 EOF
14366
14367 cf_add_libs="-lbsd"
14368 # Filter out duplicates - this happens with badly-designed ".pc" files...
14369 for cf_add_1lib in $LIBS
14370 do
14371         for cf_add_2lib in $cf_add_libs
14372         do
14373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14374                 then
14375                         cf_add_1lib=
14376                         break
14377                 fi
14378         done
14379         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14380 done
14381 LIBS="$cf_add_libs"
14382
14383 fi
14384
14385 fi
14386         ;;
14387 esac
14388
14389 echo "$as_me:14389: checking if -lm needed for math functions" >&5
14390 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14391 if test "${cf_cv_need_libm+set}" = set; then
14392   echo $ECHO_N "(cached) $ECHO_C" >&6
14393 else
14394
14395         cat >conftest.$ac_ext <<_ACEOF
14396 #line 14396 "configure"
14397 #include "confdefs.h"
14398
14399         #include <stdio.h>
14400         #include <math.h>
14401
14402 int
14403 main ()
14404 {
14405 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14406   ;
14407   return 0;
14408 }
14409 _ACEOF
14410 rm -f conftest.$ac_objext conftest$ac_exeext
14411 if { (eval echo "$as_me:14411: \"$ac_link\"") >&5
14412   (eval $ac_link) 2>&5
14413   ac_status=$?
14414   echo "$as_me:14414: \$? = $ac_status" >&5
14415   (exit $ac_status); } &&
14416          { ac_try='test -s conftest$ac_exeext'
14417   { (eval echo "$as_me:14417: \"$ac_try\"") >&5
14418   (eval $ac_try) 2>&5
14419   ac_status=$?
14420   echo "$as_me:14420: \$? = $ac_status" >&5
14421   (exit $ac_status); }; }; then
14422   cf_cv_need_libm=no
14423 else
14424   echo "$as_me: failed program was:" >&5
14425 cat conftest.$ac_ext >&5
14426 cf_cv_need_libm=yes
14427 fi
14428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14429 fi
14430 echo "$as_me:14430: result: $cf_cv_need_libm" >&5
14431 echo "${ECHO_T}$cf_cv_need_libm" >&6
14432 if test "$cf_cv_need_libm" = yes
14433 then
14434 MATH_LIB=-lm
14435 fi
14436
14437 ###     Checks for header files.
14438 echo "$as_me:14438: checking for ANSI C header files" >&5
14439 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14440 if test "${ac_cv_header_stdc+set}" = set; then
14441   echo $ECHO_N "(cached) $ECHO_C" >&6
14442 else
14443   cat >conftest.$ac_ext <<_ACEOF
14444 #line 14444 "configure"
14445 #include "confdefs.h"
14446 #include <stdlib.h>
14447 #include <stdarg.h>
14448 #include <string.h>
14449 #include <float.h>
14450
14451 _ACEOF
14452 if { (eval echo "$as_me:14452: \"$ac_cpp conftest.$ac_ext\"") >&5
14453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14454   ac_status=$?
14455   egrep -v '^ *\+' conftest.er1 >conftest.err
14456   rm -f conftest.er1
14457   cat conftest.err >&5
14458   echo "$as_me:14458: \$? = $ac_status" >&5
14459   (exit $ac_status); } >/dev/null; then
14460   if test -s conftest.err; then
14461     ac_cpp_err=$ac_c_preproc_warn_flag
14462   else
14463     ac_cpp_err=
14464   fi
14465 else
14466   ac_cpp_err=yes
14467 fi
14468 if test -z "$ac_cpp_err"; then
14469   ac_cv_header_stdc=yes
14470 else
14471   echo "$as_me: failed program was:" >&5
14472   cat conftest.$ac_ext >&5
14473   ac_cv_header_stdc=no
14474 fi
14475 rm -f conftest.err conftest.$ac_ext
14476
14477 if test $ac_cv_header_stdc = yes; then
14478   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14479   cat >conftest.$ac_ext <<_ACEOF
14480 #line 14480 "configure"
14481 #include "confdefs.h"
14482 #include <string.h>
14483
14484 _ACEOF
14485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14486   egrep "memchr" >/dev/null 2>&1; then
14487   :
14488 else
14489   ac_cv_header_stdc=no
14490 fi
14491 rm -rf conftest*
14492
14493 fi
14494
14495 if test $ac_cv_header_stdc = yes; then
14496   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14497   cat >conftest.$ac_ext <<_ACEOF
14498 #line 14498 "configure"
14499 #include "confdefs.h"
14500 #include <stdlib.h>
14501
14502 _ACEOF
14503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14504   egrep "free" >/dev/null 2>&1; then
14505   :
14506 else
14507   ac_cv_header_stdc=no
14508 fi
14509 rm -rf conftest*
14510
14511 fi
14512
14513 if test $ac_cv_header_stdc = yes; then
14514   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14515   if test "$cross_compiling" = yes; then
14516   :
14517 else
14518   cat >conftest.$ac_ext <<_ACEOF
14519 #line 14519 "configure"
14520 #include "confdefs.h"
14521 #include <ctype.h>
14522 #if ((' ' & 0x0FF) == 0x020)
14523 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14524 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14525 #else
14526 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14527                      || ('j' <= (c) && (c) <= 'r') \
14528                      || ('s' <= (c) && (c) <= 'z'))
14529 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14530 #endif
14531
14532 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14533 int
14534 main ()
14535 {
14536   int i;
14537   for (i = 0; i < 256; i++)
14538     if (XOR (islower (i), ISLOWER (i))
14539         || toupper (i) != TOUPPER (i))
14540       $ac_main_return(2);
14541   $ac_main_return (0);
14542 }
14543 _ACEOF
14544 rm -f conftest$ac_exeext
14545 if { (eval echo "$as_me:14545: \"$ac_link\"") >&5
14546   (eval $ac_link) 2>&5
14547   ac_status=$?
14548   echo "$as_me:14548: \$? = $ac_status" >&5
14549   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14550   { (eval echo "$as_me:14550: \"$ac_try\"") >&5
14551   (eval $ac_try) 2>&5
14552   ac_status=$?
14553   echo "$as_me:14553: \$? = $ac_status" >&5
14554   (exit $ac_status); }; }; then
14555   :
14556 else
14557   echo "$as_me: program exited with status $ac_status" >&5
14558 echo "$as_me: failed program was:" >&5
14559 cat conftest.$ac_ext >&5
14560 ac_cv_header_stdc=no
14561 fi
14562 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14563 fi
14564 fi
14565 fi
14566 echo "$as_me:14566: result: $ac_cv_header_stdc" >&5
14567 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14568 if test $ac_cv_header_stdc = yes; then
14569
14570 cat >>confdefs.h <<\EOF
14571 #define STDC_HEADERS 1
14572 EOF
14573
14574 fi
14575
14576 ac_header_dirent=no
14577 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14578   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14579 echo "$as_me:14579: checking for $ac_hdr that defines DIR" >&5
14580 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14581 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14582   echo $ECHO_N "(cached) $ECHO_C" >&6
14583 else
14584   cat >conftest.$ac_ext <<_ACEOF
14585 #line 14585 "configure"
14586 #include "confdefs.h"
14587 #include <sys/types.h>
14588 #include <$ac_hdr>
14589
14590 int
14591 main ()
14592 {
14593 if ((DIR *) 0)
14594 return 0;
14595   ;
14596   return 0;
14597 }
14598 _ACEOF
14599 rm -f conftest.$ac_objext
14600 if { (eval echo "$as_me:14600: \"$ac_compile\"") >&5
14601   (eval $ac_compile) 2>&5
14602   ac_status=$?
14603   echo "$as_me:14603: \$? = $ac_status" >&5
14604   (exit $ac_status); } &&
14605          { ac_try='test -s conftest.$ac_objext'
14606   { (eval echo "$as_me:14606: \"$ac_try\"") >&5
14607   (eval $ac_try) 2>&5
14608   ac_status=$?
14609   echo "$as_me:14609: \$? = $ac_status" >&5
14610   (exit $ac_status); }; }; then
14611   eval "$as_ac_Header=yes"
14612 else
14613   echo "$as_me: failed program was:" >&5
14614 cat conftest.$ac_ext >&5
14615 eval "$as_ac_Header=no"
14616 fi
14617 rm -f conftest.$ac_objext conftest.$ac_ext
14618 fi
14619 echo "$as_me:14619: result: `eval echo '${'$as_ac_Header'}'`" >&5
14620 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14621 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14622   cat >>confdefs.h <<EOF
14623 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14624 EOF
14625
14626 ac_header_dirent=$ac_hdr; break
14627 fi
14628
14629 done
14630 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14631 if test $ac_header_dirent = dirent.h; then
14632   echo "$as_me:14632: checking for opendir in -ldir" >&5
14633 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14634 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14635   echo $ECHO_N "(cached) $ECHO_C" >&6
14636 else
14637   ac_check_lib_save_LIBS=$LIBS
14638 LIBS="-ldir  $LIBS"
14639 cat >conftest.$ac_ext <<_ACEOF
14640 #line 14640 "configure"
14641 #include "confdefs.h"
14642
14643 /* Override any gcc2 internal prototype to avoid an error.  */
14644 #ifdef __cplusplus
14645 extern "C"
14646 #endif
14647 /* We use char because int might match the return type of a gcc2
14648    builtin and then its argument prototype would still apply.  */
14649 char opendir ();
14650 int
14651 main ()
14652 {
14653 opendir ();
14654   ;
14655   return 0;
14656 }
14657 _ACEOF
14658 rm -f conftest.$ac_objext conftest$ac_exeext
14659 if { (eval echo "$as_me:14659: \"$ac_link\"") >&5
14660   (eval $ac_link) 2>&5
14661   ac_status=$?
14662   echo "$as_me:14662: \$? = $ac_status" >&5
14663   (exit $ac_status); } &&
14664          { ac_try='test -s conftest$ac_exeext'
14665   { (eval echo "$as_me:14665: \"$ac_try\"") >&5
14666   (eval $ac_try) 2>&5
14667   ac_status=$?
14668   echo "$as_me:14668: \$? = $ac_status" >&5
14669   (exit $ac_status); }; }; then
14670   ac_cv_lib_dir_opendir=yes
14671 else
14672   echo "$as_me: failed program was:" >&5
14673 cat conftest.$ac_ext >&5
14674 ac_cv_lib_dir_opendir=no
14675 fi
14676 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14677 LIBS=$ac_check_lib_save_LIBS
14678 fi
14679 echo "$as_me:14679: result: $ac_cv_lib_dir_opendir" >&5
14680 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14681 if test $ac_cv_lib_dir_opendir = yes; then
14682   LIBS="$LIBS -ldir"
14683 fi
14684
14685 else
14686   echo "$as_me:14686: checking for opendir in -lx" >&5
14687 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14688 if test "${ac_cv_lib_x_opendir+set}" = set; then
14689   echo $ECHO_N "(cached) $ECHO_C" >&6
14690 else
14691   ac_check_lib_save_LIBS=$LIBS
14692 LIBS="-lx  $LIBS"
14693 cat >conftest.$ac_ext <<_ACEOF
14694 #line 14694 "configure"
14695 #include "confdefs.h"
14696
14697 /* Override any gcc2 internal prototype to avoid an error.  */
14698 #ifdef __cplusplus
14699 extern "C"
14700 #endif
14701 /* We use char because int might match the return type of a gcc2
14702    builtin and then its argument prototype would still apply.  */
14703 char opendir ();
14704 int
14705 main ()
14706 {
14707 opendir ();
14708   ;
14709   return 0;
14710 }
14711 _ACEOF
14712 rm -f conftest.$ac_objext conftest$ac_exeext
14713 if { (eval echo "$as_me:14713: \"$ac_link\"") >&5
14714   (eval $ac_link) 2>&5
14715   ac_status=$?
14716   echo "$as_me:14716: \$? = $ac_status" >&5
14717   (exit $ac_status); } &&
14718          { ac_try='test -s conftest$ac_exeext'
14719   { (eval echo "$as_me:14719: \"$ac_try\"") >&5
14720   (eval $ac_try) 2>&5
14721   ac_status=$?
14722   echo "$as_me:14722: \$? = $ac_status" >&5
14723   (exit $ac_status); }; }; then
14724   ac_cv_lib_x_opendir=yes
14725 else
14726   echo "$as_me: failed program was:" >&5
14727 cat conftest.$ac_ext >&5
14728 ac_cv_lib_x_opendir=no
14729 fi
14730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14731 LIBS=$ac_check_lib_save_LIBS
14732 fi
14733 echo "$as_me:14733: result: $ac_cv_lib_x_opendir" >&5
14734 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14735 if test $ac_cv_lib_x_opendir = yes; then
14736   LIBS="$LIBS -lx"
14737 fi
14738
14739 fi
14740
14741 echo "$as_me:14741: checking whether time.h and sys/time.h may both be included" >&5
14742 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14743 if test "${ac_cv_header_time+set}" = set; then
14744   echo $ECHO_N "(cached) $ECHO_C" >&6
14745 else
14746   cat >conftest.$ac_ext <<_ACEOF
14747 #line 14747 "configure"
14748 #include "confdefs.h"
14749 #include <sys/types.h>
14750 #include <sys/time.h>
14751 #include <time.h>
14752
14753 int
14754 main ()
14755 {
14756 if ((struct tm *) 0)
14757 return 0;
14758   ;
14759   return 0;
14760 }
14761 _ACEOF
14762 rm -f conftest.$ac_objext
14763 if { (eval echo "$as_me:14763: \"$ac_compile\"") >&5
14764   (eval $ac_compile) 2>&5
14765   ac_status=$?
14766   echo "$as_me:14766: \$? = $ac_status" >&5
14767   (exit $ac_status); } &&
14768          { ac_try='test -s conftest.$ac_objext'
14769   { (eval echo "$as_me:14769: \"$ac_try\"") >&5
14770   (eval $ac_try) 2>&5
14771   ac_status=$?
14772   echo "$as_me:14772: \$? = $ac_status" >&5
14773   (exit $ac_status); }; }; then
14774   ac_cv_header_time=yes
14775 else
14776   echo "$as_me: failed program was:" >&5
14777 cat conftest.$ac_ext >&5
14778 ac_cv_header_time=no
14779 fi
14780 rm -f conftest.$ac_objext conftest.$ac_ext
14781 fi
14782 echo "$as_me:14782: result: $ac_cv_header_time" >&5
14783 echo "${ECHO_T}$ac_cv_header_time" >&6
14784 if test $ac_cv_header_time = yes; then
14785
14786 cat >>confdefs.h <<\EOF
14787 #define TIME_WITH_SYS_TIME 1
14788 EOF
14789
14790 fi
14791
14792 cf_regex_func=no
14793
14794 cf_regex_libs="regex re"
14795 case $host_os in #(vi
14796 mingw*)
14797         cf_regex_libs="gnurx $cf_regex_libs"
14798         ;;
14799 esac
14800
14801 echo "$as_me:14801: checking for regcomp" >&5
14802 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14803 if test "${ac_cv_func_regcomp+set}" = set; then
14804   echo $ECHO_N "(cached) $ECHO_C" >&6
14805 else
14806   cat >conftest.$ac_ext <<_ACEOF
14807 #line 14807 "configure"
14808 #include "confdefs.h"
14809 /* System header to define __stub macros and hopefully few prototypes,
14810     which can conflict with char regcomp (); below.  */
14811 #include <assert.h>
14812 /* Override any gcc2 internal prototype to avoid an error.  */
14813 #ifdef __cplusplus
14814 extern "C"
14815 #endif
14816 /* We use char because int might match the return type of a gcc2
14817    builtin and then its argument prototype would still apply.  */
14818 char regcomp ();
14819 char (*f) ();
14820
14821 int
14822 main ()
14823 {
14824 /* The GNU C library defines this for functions which it implements
14825     to always fail with ENOSYS.  Some functions are actually named
14826     something starting with __ and the normal name is an alias.  */
14827 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14828 choke me
14829 #else
14830 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14831 #endif
14832
14833   ;
14834   return 0;
14835 }
14836 _ACEOF
14837 rm -f conftest.$ac_objext conftest$ac_exeext
14838 if { (eval echo "$as_me:14838: \"$ac_link\"") >&5
14839   (eval $ac_link) 2>&5
14840   ac_status=$?
14841   echo "$as_me:14841: \$? = $ac_status" >&5
14842   (exit $ac_status); } &&
14843          { ac_try='test -s conftest$ac_exeext'
14844   { (eval echo "$as_me:14844: \"$ac_try\"") >&5
14845   (eval $ac_try) 2>&5
14846   ac_status=$?
14847   echo "$as_me:14847: \$? = $ac_status" >&5
14848   (exit $ac_status); }; }; then
14849   ac_cv_func_regcomp=yes
14850 else
14851   echo "$as_me: failed program was:" >&5
14852 cat conftest.$ac_ext >&5
14853 ac_cv_func_regcomp=no
14854 fi
14855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14856 fi
14857 echo "$as_me:14857: result: $ac_cv_func_regcomp" >&5
14858 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14859 if test $ac_cv_func_regcomp = yes; then
14860   cf_regex_func=regcomp
14861 else
14862
14863         for cf_regex_lib in $cf_regex_libs
14864         do
14865                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14866 echo "$as_me:14866: checking for regcomp in -l$cf_regex_lib" >&5
14867 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14868 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14869   echo $ECHO_N "(cached) $ECHO_C" >&6
14870 else
14871   ac_check_lib_save_LIBS=$LIBS
14872 LIBS="-l$cf_regex_lib  $LIBS"
14873 cat >conftest.$ac_ext <<_ACEOF
14874 #line 14874 "configure"
14875 #include "confdefs.h"
14876
14877 /* Override any gcc2 internal prototype to avoid an error.  */
14878 #ifdef __cplusplus
14879 extern "C"
14880 #endif
14881 /* We use char because int might match the return type of a gcc2
14882    builtin and then its argument prototype would still apply.  */
14883 char regcomp ();
14884 int
14885 main ()
14886 {
14887 regcomp ();
14888   ;
14889   return 0;
14890 }
14891 _ACEOF
14892 rm -f conftest.$ac_objext conftest$ac_exeext
14893 if { (eval echo "$as_me:14893: \"$ac_link\"") >&5
14894   (eval $ac_link) 2>&5
14895   ac_status=$?
14896   echo "$as_me:14896: \$? = $ac_status" >&5
14897   (exit $ac_status); } &&
14898          { ac_try='test -s conftest$ac_exeext'
14899   { (eval echo "$as_me:14899: \"$ac_try\"") >&5
14900   (eval $ac_try) 2>&5
14901   ac_status=$?
14902   echo "$as_me:14902: \$? = $ac_status" >&5
14903   (exit $ac_status); }; }; then
14904   eval "$as_ac_Lib=yes"
14905 else
14906   echo "$as_me: failed program was:" >&5
14907 cat conftest.$ac_ext >&5
14908 eval "$as_ac_Lib=no"
14909 fi
14910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14911 LIBS=$ac_check_lib_save_LIBS
14912 fi
14913 echo "$as_me:14913: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14914 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14915 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14916
14917 cf_add_libs="-l$cf_regex_lib"
14918 # Filter out duplicates - this happens with badly-designed ".pc" files...
14919 for cf_add_1lib in $LIBS
14920 do
14921         for cf_add_2lib in $cf_add_libs
14922         do
14923                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14924                 then
14925                         cf_add_1lib=
14926                         break
14927                 fi
14928         done
14929         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14930 done
14931 LIBS="$cf_add_libs"
14932
14933                                 cf_regex_func=regcomp
14934                                 break
14935 fi
14936
14937         done
14938
14939 fi
14940
14941 if test "$cf_regex_func" = no ; then
14942         echo "$as_me:14942: checking for compile" >&5
14943 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14944 if test "${ac_cv_func_compile+set}" = set; then
14945   echo $ECHO_N "(cached) $ECHO_C" >&6
14946 else
14947   cat >conftest.$ac_ext <<_ACEOF
14948 #line 14948 "configure"
14949 #include "confdefs.h"
14950 /* System header to define __stub macros and hopefully few prototypes,
14951     which can conflict with char compile (); below.  */
14952 #include <assert.h>
14953 /* Override any gcc2 internal prototype to avoid an error.  */
14954 #ifdef __cplusplus
14955 extern "C"
14956 #endif
14957 /* We use char because int might match the return type of a gcc2
14958    builtin and then its argument prototype would still apply.  */
14959 char compile ();
14960 char (*f) ();
14961
14962 int
14963 main ()
14964 {
14965 /* The GNU C library defines this for functions which it implements
14966     to always fail with ENOSYS.  Some functions are actually named
14967     something starting with __ and the normal name is an alias.  */
14968 #if defined (__stub_compile) || defined (__stub___compile)
14969 choke me
14970 #else
14971 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14972 #endif
14973
14974   ;
14975   return 0;
14976 }
14977 _ACEOF
14978 rm -f conftest.$ac_objext conftest$ac_exeext
14979 if { (eval echo "$as_me:14979: \"$ac_link\"") >&5
14980   (eval $ac_link) 2>&5
14981   ac_status=$?
14982   echo "$as_me:14982: \$? = $ac_status" >&5
14983   (exit $ac_status); } &&
14984          { ac_try='test -s conftest$ac_exeext'
14985   { (eval echo "$as_me:14985: \"$ac_try\"") >&5
14986   (eval $ac_try) 2>&5
14987   ac_status=$?
14988   echo "$as_me:14988: \$? = $ac_status" >&5
14989   (exit $ac_status); }; }; then
14990   ac_cv_func_compile=yes
14991 else
14992   echo "$as_me: failed program was:" >&5
14993 cat conftest.$ac_ext >&5
14994 ac_cv_func_compile=no
14995 fi
14996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14997 fi
14998 echo "$as_me:14998: result: $ac_cv_func_compile" >&5
14999 echo "${ECHO_T}$ac_cv_func_compile" >&6
15000 if test $ac_cv_func_compile = yes; then
15001   cf_regex_func=compile
15002 else
15003
15004                 echo "$as_me:15004: checking for compile in -lgen" >&5
15005 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15006 if test "${ac_cv_lib_gen_compile+set}" = set; then
15007   echo $ECHO_N "(cached) $ECHO_C" >&6
15008 else
15009   ac_check_lib_save_LIBS=$LIBS
15010 LIBS="-lgen  $LIBS"
15011 cat >conftest.$ac_ext <<_ACEOF
15012 #line 15012 "configure"
15013 #include "confdefs.h"
15014
15015 /* Override any gcc2 internal prototype to avoid an error.  */
15016 #ifdef __cplusplus
15017 extern "C"
15018 #endif
15019 /* We use char because int might match the return type of a gcc2
15020    builtin and then its argument prototype would still apply.  */
15021 char compile ();
15022 int
15023 main ()
15024 {
15025 compile ();
15026   ;
15027   return 0;
15028 }
15029 _ACEOF
15030 rm -f conftest.$ac_objext conftest$ac_exeext
15031 if { (eval echo "$as_me:15031: \"$ac_link\"") >&5
15032   (eval $ac_link) 2>&5
15033   ac_status=$?
15034   echo "$as_me:15034: \$? = $ac_status" >&5
15035   (exit $ac_status); } &&
15036          { ac_try='test -s conftest$ac_exeext'
15037   { (eval echo "$as_me:15037: \"$ac_try\"") >&5
15038   (eval $ac_try) 2>&5
15039   ac_status=$?
15040   echo "$as_me:15040: \$? = $ac_status" >&5
15041   (exit $ac_status); }; }; then
15042   ac_cv_lib_gen_compile=yes
15043 else
15044   echo "$as_me: failed program was:" >&5
15045 cat conftest.$ac_ext >&5
15046 ac_cv_lib_gen_compile=no
15047 fi
15048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15049 LIBS=$ac_check_lib_save_LIBS
15050 fi
15051 echo "$as_me:15051: result: $ac_cv_lib_gen_compile" >&5
15052 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15053 if test $ac_cv_lib_gen_compile = yes; then
15054
15055 cf_add_libs="-lgen"
15056 # Filter out duplicates - this happens with badly-designed ".pc" files...
15057 for cf_add_1lib in $LIBS
15058 do
15059         for cf_add_2lib in $cf_add_libs
15060         do
15061                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15062                 then
15063                         cf_add_1lib=
15064                         break
15065                 fi
15066         done
15067         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15068 done
15069 LIBS="$cf_add_libs"
15070
15071                                 cf_regex_func=compile
15072 fi
15073
15074 fi
15075
15076 fi
15077
15078 if test "$cf_regex_func" = no ; then
15079         { echo "$as_me:15079: WARNING: cannot find regular expression library" >&5
15080 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15081 fi
15082
15083 echo "$as_me:15083: checking for regular-expression headers" >&5
15084 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15085 if test "${cf_cv_regex_hdrs+set}" = set; then
15086   echo $ECHO_N "(cached) $ECHO_C" >&6
15087 else
15088
15089 cf_cv_regex_hdrs=no
15090 case $cf_regex_func in #(vi
15091 compile) #(vi
15092         for cf_regex_hdr in regexp.h regexpr.h
15093         do
15094                 cat >conftest.$ac_ext <<_ACEOF
15095 #line 15095 "configure"
15096 #include "confdefs.h"
15097 #include <$cf_regex_hdr>
15098 int
15099 main ()
15100 {
15101
15102                         char *p = compile("", "", "", 0);
15103                         int x = step("", "");
15104
15105   ;
15106   return 0;
15107 }
15108 _ACEOF
15109 rm -f conftest.$ac_objext conftest$ac_exeext
15110 if { (eval echo "$as_me:15110: \"$ac_link\"") >&5
15111   (eval $ac_link) 2>&5
15112   ac_status=$?
15113   echo "$as_me:15113: \$? = $ac_status" >&5
15114   (exit $ac_status); } &&
15115          { ac_try='test -s conftest$ac_exeext'
15116   { (eval echo "$as_me:15116: \"$ac_try\"") >&5
15117   (eval $ac_try) 2>&5
15118   ac_status=$?
15119   echo "$as_me:15119: \$? = $ac_status" >&5
15120   (exit $ac_status); }; }; then
15121
15122                         cf_cv_regex_hdrs=$cf_regex_hdr
15123                         break
15124
15125 else
15126   echo "$as_me: failed program was:" >&5
15127 cat conftest.$ac_ext >&5
15128 fi
15129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15130         done
15131         ;;
15132 *)
15133         for cf_regex_hdr in regex.h
15134         do
15135                 cat >conftest.$ac_ext <<_ACEOF
15136 #line 15136 "configure"
15137 #include "confdefs.h"
15138 #include <sys/types.h>
15139 #include <$cf_regex_hdr>
15140 int
15141 main ()
15142 {
15143
15144                         regex_t *p;
15145                         int x = regcomp(p, "", 0);
15146                         int y = regexec(p, "", 0, 0, 0);
15147                         regfree(p);
15148
15149   ;
15150   return 0;
15151 }
15152 _ACEOF
15153 rm -f conftest.$ac_objext conftest$ac_exeext
15154 if { (eval echo "$as_me:15154: \"$ac_link\"") >&5
15155   (eval $ac_link) 2>&5
15156   ac_status=$?
15157   echo "$as_me:15157: \$? = $ac_status" >&5
15158   (exit $ac_status); } &&
15159          { ac_try='test -s conftest$ac_exeext'
15160   { (eval echo "$as_me:15160: \"$ac_try\"") >&5
15161   (eval $ac_try) 2>&5
15162   ac_status=$?
15163   echo "$as_me:15163: \$? = $ac_status" >&5
15164   (exit $ac_status); }; }; then
15165
15166                         cf_cv_regex_hdrs=$cf_regex_hdr
15167                         break
15168
15169 else
15170   echo "$as_me: failed program was:" >&5
15171 cat conftest.$ac_ext >&5
15172 fi
15173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15174         done
15175         ;;
15176 esac
15177
15178 fi
15179 echo "$as_me:15179: result: $cf_cv_regex_hdrs" >&5
15180 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15181
15182 case $cf_cv_regex_hdrs in #(vi
15183     no)        { echo "$as_me:15183: WARNING: no regular expression header found" >&5
15184 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15185     regex.h)
15186 cat >>confdefs.h <<\EOF
15187 #define HAVE_REGEX_H_FUNCS 1
15188 EOF
15189  ;; #(vi
15190     regexp.h)
15191 cat >>confdefs.h <<\EOF
15192 #define HAVE_REGEXP_H_FUNCS 1
15193 EOF
15194  ;; #(vi
15195     regexpr.h)
15196 cat >>confdefs.h <<\EOF
15197 #define HAVE_REGEXPR_H_FUNCS 1
15198 EOF
15199  ;;
15200 esac
15201
15202 for ac_header in \
15203 fcntl.h \
15204 getopt.h \
15205 limits.h \
15206 locale.h \
15207 math.h \
15208 poll.h \
15209 sys/bsdtypes.h \
15210 sys/ioctl.h \
15211 sys/param.h \
15212 sys/poll.h \
15213 sys/select.h \
15214 sys/time.h \
15215 sys/times.h \
15216 ttyent.h \
15217 unistd.h \
15218 wctype.h \
15219
15220 do
15221 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15222 echo "$as_me:15222: checking for $ac_header" >&5
15223 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15224 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15225   echo $ECHO_N "(cached) $ECHO_C" >&6
15226 else
15227   cat >conftest.$ac_ext <<_ACEOF
15228 #line 15228 "configure"
15229 #include "confdefs.h"
15230 #include <$ac_header>
15231 _ACEOF
15232 if { (eval echo "$as_me:15232: \"$ac_cpp conftest.$ac_ext\"") >&5
15233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15234   ac_status=$?
15235   egrep -v '^ *\+' conftest.er1 >conftest.err
15236   rm -f conftest.er1
15237   cat conftest.err >&5
15238   echo "$as_me:15238: \$? = $ac_status" >&5
15239   (exit $ac_status); } >/dev/null; then
15240   if test -s conftest.err; then
15241     ac_cpp_err=$ac_c_preproc_warn_flag
15242   else
15243     ac_cpp_err=
15244   fi
15245 else
15246   ac_cpp_err=yes
15247 fi
15248 if test -z "$ac_cpp_err"; then
15249   eval "$as_ac_Header=yes"
15250 else
15251   echo "$as_me: failed program was:" >&5
15252   cat conftest.$ac_ext >&5
15253   eval "$as_ac_Header=no"
15254 fi
15255 rm -f conftest.err conftest.$ac_ext
15256 fi
15257 echo "$as_me:15257: result: `eval echo '${'$as_ac_Header'}'`" >&5
15258 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15259 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15260   cat >>confdefs.h <<EOF
15261 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15262 EOF
15263
15264 fi
15265 done
15266
15267 for ac_header in unistd.h getopt.h
15268 do
15269 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15270 echo "$as_me:15270: checking for $ac_header" >&5
15271 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15272 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15273   echo $ECHO_N "(cached) $ECHO_C" >&6
15274 else
15275   cat >conftest.$ac_ext <<_ACEOF
15276 #line 15276 "configure"
15277 #include "confdefs.h"
15278 #include <$ac_header>
15279 _ACEOF
15280 if { (eval echo "$as_me:15280: \"$ac_cpp conftest.$ac_ext\"") >&5
15281   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15282   ac_status=$?
15283   egrep -v '^ *\+' conftest.er1 >conftest.err
15284   rm -f conftest.er1
15285   cat conftest.err >&5
15286   echo "$as_me:15286: \$? = $ac_status" >&5
15287   (exit $ac_status); } >/dev/null; then
15288   if test -s conftest.err; then
15289     ac_cpp_err=$ac_c_preproc_warn_flag
15290   else
15291     ac_cpp_err=
15292   fi
15293 else
15294   ac_cpp_err=yes
15295 fi
15296 if test -z "$ac_cpp_err"; then
15297   eval "$as_ac_Header=yes"
15298 else
15299   echo "$as_me: failed program was:" >&5
15300   cat conftest.$ac_ext >&5
15301   eval "$as_ac_Header=no"
15302 fi
15303 rm -f conftest.err conftest.$ac_ext
15304 fi
15305 echo "$as_me:15305: result: `eval echo '${'$as_ac_Header'}'`" >&5
15306 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15307 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15308   cat >>confdefs.h <<EOF
15309 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15310 EOF
15311
15312 fi
15313 done
15314
15315 echo "$as_me:15315: checking for header declaring getopt variables" >&5
15316 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15317 if test "${cf_cv_getopt_header+set}" = set; then
15318   echo $ECHO_N "(cached) $ECHO_C" >&6
15319 else
15320
15321 cf_cv_getopt_header=none
15322 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15323 do
15324 cat >conftest.$ac_ext <<_ACEOF
15325 #line 15325 "configure"
15326 #include "confdefs.h"
15327
15328 #include <$cf_header>
15329 int
15330 main ()
15331 {
15332 int x = optind; char *y = optarg
15333   ;
15334   return 0;
15335 }
15336 _ACEOF
15337 rm -f conftest.$ac_objext
15338 if { (eval echo "$as_me:15338: \"$ac_compile\"") >&5
15339   (eval $ac_compile) 2>&5
15340   ac_status=$?
15341   echo "$as_me:15341: \$? = $ac_status" >&5
15342   (exit $ac_status); } &&
15343          { ac_try='test -s conftest.$ac_objext'
15344   { (eval echo "$as_me:15344: \"$ac_try\"") >&5
15345   (eval $ac_try) 2>&5
15346   ac_status=$?
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); }; }; then
15349   cf_cv_getopt_header=$cf_header
15350  break
15351 else
15352   echo "$as_me: failed program was:" >&5
15353 cat conftest.$ac_ext >&5
15354 fi
15355 rm -f conftest.$ac_objext conftest.$ac_ext
15356 done
15357
15358 fi
15359 echo "$as_me:15359: result: $cf_cv_getopt_header" >&5
15360 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15361 if test $cf_cv_getopt_header != none ; then
15362
15363 cat >>confdefs.h <<\EOF
15364 #define HAVE_GETOPT_HEADER 1
15365 EOF
15366
15367 fi
15368 if test $cf_cv_getopt_header = getopt.h ; then
15369
15370 cat >>confdefs.h <<\EOF
15371 #define NEED_GETOPT_H 1
15372 EOF
15373
15374 fi
15375
15376 # check for ISC (this may also define _POSIX_SOURCE)
15377 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15378 if test "x$ISC" = xyes ; then
15379
15380 echo "$as_me:15380: checking for main in -lcposix" >&5
15381 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15382 if test "${ac_cv_lib_cposix_main+set}" = set; then
15383   echo $ECHO_N "(cached) $ECHO_C" >&6
15384 else
15385   ac_check_lib_save_LIBS=$LIBS
15386 LIBS="-lcposix  $LIBS"
15387 cat >conftest.$ac_ext <<_ACEOF
15388 #line 15388 "configure"
15389 #include "confdefs.h"
15390
15391 int
15392 main ()
15393 {
15394 main ();
15395   ;
15396   return 0;
15397 }
15398 _ACEOF
15399 rm -f conftest.$ac_objext conftest$ac_exeext
15400 if { (eval echo "$as_me:15400: \"$ac_link\"") >&5
15401   (eval $ac_link) 2>&5
15402   ac_status=$?
15403   echo "$as_me:15403: \$? = $ac_status" >&5
15404   (exit $ac_status); } &&
15405          { ac_try='test -s conftest$ac_exeext'
15406   { (eval echo "$as_me:15406: \"$ac_try\"") >&5
15407   (eval $ac_try) 2>&5
15408   ac_status=$?
15409   echo "$as_me:15409: \$? = $ac_status" >&5
15410   (exit $ac_status); }; }; then
15411   ac_cv_lib_cposix_main=yes
15412 else
15413   echo "$as_me: failed program was:" >&5
15414 cat conftest.$ac_ext >&5
15415 ac_cv_lib_cposix_main=no
15416 fi
15417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15418 LIBS=$ac_check_lib_save_LIBS
15419 fi
15420 echo "$as_me:15420: result: $ac_cv_lib_cposix_main" >&5
15421 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15422 if test $ac_cv_lib_cposix_main = yes; then
15423   cat >>confdefs.h <<EOF
15424 #define HAVE_LIBCPOSIX 1
15425 EOF
15426
15427   LIBS="-lcposix $LIBS"
15428
15429 fi
15430
15431         echo "$as_me:15431: checking for bzero in -linet" >&5
15432 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15433 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15434   echo $ECHO_N "(cached) $ECHO_C" >&6
15435 else
15436   ac_check_lib_save_LIBS=$LIBS
15437 LIBS="-linet  $LIBS"
15438 cat >conftest.$ac_ext <<_ACEOF
15439 #line 15439 "configure"
15440 #include "confdefs.h"
15441
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 bzero ();
15449 int
15450 main ()
15451 {
15452 bzero ();
15453   ;
15454   return 0;
15455 }
15456 _ACEOF
15457 rm -f conftest.$ac_objext conftest$ac_exeext
15458 if { (eval echo "$as_me:15458: \"$ac_link\"") >&5
15459   (eval $ac_link) 2>&5
15460   ac_status=$?
15461   echo "$as_me:15461: \$? = $ac_status" >&5
15462   (exit $ac_status); } &&
15463          { ac_try='test -s conftest$ac_exeext'
15464   { (eval echo "$as_me:15464: \"$ac_try\"") >&5
15465   (eval $ac_try) 2>&5
15466   ac_status=$?
15467   echo "$as_me:15467: \$? = $ac_status" >&5
15468   (exit $ac_status); }; }; then
15469   ac_cv_lib_inet_bzero=yes
15470 else
15471   echo "$as_me: failed program was:" >&5
15472 cat conftest.$ac_ext >&5
15473 ac_cv_lib_inet_bzero=no
15474 fi
15475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15476 LIBS=$ac_check_lib_save_LIBS
15477 fi
15478 echo "$as_me:15478: result: $ac_cv_lib_inet_bzero" >&5
15479 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15480 if test $ac_cv_lib_inet_bzero = yes; then
15481
15482 cf_add_libs="-linet"
15483 # Filter out duplicates - this happens with badly-designed ".pc" files...
15484 for cf_add_1lib in $LIBS
15485 do
15486         for cf_add_2lib in $cf_add_libs
15487         do
15488                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15489                 then
15490                         cf_add_1lib=
15491                         break
15492                 fi
15493         done
15494         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15495 done
15496 LIBS="$cf_add_libs"
15497
15498 fi
15499 fi
15500
15501 echo "$as_me:15501: checking if sys/time.h works with sys/select.h" >&5
15502 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15503 if test "${cf_cv_sys_time_select+set}" = set; then
15504   echo $ECHO_N "(cached) $ECHO_C" >&6
15505 else
15506
15507 cat >conftest.$ac_ext <<_ACEOF
15508 #line 15508 "configure"
15509 #include "confdefs.h"
15510
15511 #include <sys/types.h>
15512 #ifdef HAVE_SYS_TIME_H
15513 #include <sys/time.h>
15514 #endif
15515 #ifdef HAVE_SYS_SELECT_H
15516 #include <sys/select.h>
15517 #endif
15518
15519 int
15520 main ()
15521 {
15522
15523   ;
15524   return 0;
15525 }
15526 _ACEOF
15527 rm -f conftest.$ac_objext
15528 if { (eval echo "$as_me:15528: \"$ac_compile\"") >&5
15529   (eval $ac_compile) 2>&5
15530   ac_status=$?
15531   echo "$as_me:15531: \$? = $ac_status" >&5
15532   (exit $ac_status); } &&
15533          { ac_try='test -s conftest.$ac_objext'
15534   { (eval echo "$as_me:15534: \"$ac_try\"") >&5
15535   (eval $ac_try) 2>&5
15536   ac_status=$?
15537   echo "$as_me:15537: \$? = $ac_status" >&5
15538   (exit $ac_status); }; }; then
15539   cf_cv_sys_time_select=yes
15540 else
15541   echo "$as_me: failed program was:" >&5
15542 cat conftest.$ac_ext >&5
15543 cf_cv_sys_time_select=no
15544 fi
15545 rm -f conftest.$ac_objext conftest.$ac_ext
15546
15547 fi
15548
15549 echo "$as_me:15549: result: $cf_cv_sys_time_select" >&5
15550 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15551 test "$cf_cv_sys_time_select" = yes &&
15552 cat >>confdefs.h <<\EOF
15553 #define HAVE_SYS_TIME_SELECT 1
15554 EOF
15555
15556 ###     checks for compiler characteristics
15557 ac_ext=c
15558 ac_cpp='$CPP $CPPFLAGS'
15559 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15560 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15561 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15562 ac_main_return=return
15563
15564 echo "$as_me:15564: checking for an ANSI C-conforming const" >&5
15565 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15566 if test "${ac_cv_c_const+set}" = set; then
15567   echo $ECHO_N "(cached) $ECHO_C" >&6
15568 else
15569   cat >conftest.$ac_ext <<_ACEOF
15570 #line 15570 "configure"
15571 #include "confdefs.h"
15572
15573 int
15574 main ()
15575 {
15576 /* FIXME: Include the comments suggested by Paul. */
15577 #ifndef __cplusplus
15578   /* Ultrix mips cc rejects this.  */
15579   typedef int charset[2];
15580   const charset x;
15581   /* SunOS 4.1.1 cc rejects this.  */
15582   char const *const *ccp;
15583   char **p;
15584   /* NEC SVR4.0.2 mips cc rejects this.  */
15585   struct point {int x, y;};
15586   static struct point const zero = {0,0};
15587   /* AIX XL C 1.02.0.0 rejects this.
15588      It does not let you subtract one const X* pointer from another in
15589      an arm of an if-expression whose if-part is not a constant
15590      expression */
15591   const char *g = "string";
15592   ccp = &g + (g ? g-g : 0);
15593   /* HPUX 7.0 cc rejects these. */
15594   ++ccp;
15595   p = (char**) ccp;
15596   ccp = (char const *const *) p;
15597   { /* SCO 3.2v4 cc rejects this.  */
15598     char *t;
15599     char const *s = 0 ? (char *) 0 : (char const *) 0;
15600
15601     *t++ = 0;
15602   }
15603   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15604     int x[] = {25, 17};
15605     const int *foo = &x[0];
15606     ++foo;
15607   }
15608   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15609     typedef const int *iptr;
15610     iptr p = 0;
15611     ++p;
15612   }
15613   { /* AIX XL C 1.02.0.0 rejects this saying
15614        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15615     struct s { int j; const int *ap[3]; };
15616     struct s *b; b->j = 5;
15617   }
15618   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15619     const int foo = 10;
15620   }
15621 #endif
15622
15623   ;
15624   return 0;
15625 }
15626 _ACEOF
15627 rm -f conftest.$ac_objext
15628 if { (eval echo "$as_me:15628: \"$ac_compile\"") >&5
15629   (eval $ac_compile) 2>&5
15630   ac_status=$?
15631   echo "$as_me:15631: \$? = $ac_status" >&5
15632   (exit $ac_status); } &&
15633          { ac_try='test -s conftest.$ac_objext'
15634   { (eval echo "$as_me:15634: \"$ac_try\"") >&5
15635   (eval $ac_try) 2>&5
15636   ac_status=$?
15637   echo "$as_me:15637: \$? = $ac_status" >&5
15638   (exit $ac_status); }; }; then
15639   ac_cv_c_const=yes
15640 else
15641   echo "$as_me: failed program was:" >&5
15642 cat conftest.$ac_ext >&5
15643 ac_cv_c_const=no
15644 fi
15645 rm -f conftest.$ac_objext conftest.$ac_ext
15646 fi
15647 echo "$as_me:15647: result: $ac_cv_c_const" >&5
15648 echo "${ECHO_T}$ac_cv_c_const" >&6
15649 if test $ac_cv_c_const = no; then
15650
15651 cat >>confdefs.h <<\EOF
15652 #define const
15653 EOF
15654
15655 fi
15656
15657 echo "$as_me:15657: checking for inline" >&5
15658 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15659 if test "${ac_cv_c_inline+set}" = set; then
15660   echo $ECHO_N "(cached) $ECHO_C" >&6
15661 else
15662   ac_cv_c_inline=no
15663 for ac_kw in inline __inline__ __inline; do
15664   cat >conftest.$ac_ext <<_ACEOF
15665 #line 15665 "configure"
15666 #include "confdefs.h"
15667 #ifndef __cplusplus
15668 static $ac_kw int static_foo () {return 0; }
15669 $ac_kw int foo () {return 0; }
15670 #endif
15671
15672 _ACEOF
15673 rm -f conftest.$ac_objext
15674 if { (eval echo "$as_me:15674: \"$ac_compile\"") >&5
15675   (eval $ac_compile) 2>&5
15676   ac_status=$?
15677   echo "$as_me:15677: \$? = $ac_status" >&5
15678   (exit $ac_status); } &&
15679          { ac_try='test -s conftest.$ac_objext'
15680   { (eval echo "$as_me:15680: \"$ac_try\"") >&5
15681   (eval $ac_try) 2>&5
15682   ac_status=$?
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit $ac_status); }; }; then
15685   ac_cv_c_inline=$ac_kw; break
15686 else
15687   echo "$as_me: failed program was:" >&5
15688 cat conftest.$ac_ext >&5
15689 fi
15690 rm -f conftest.$ac_objext conftest.$ac_ext
15691 done
15692
15693 fi
15694 echo "$as_me:15694: result: $ac_cv_c_inline" >&5
15695 echo "${ECHO_T}$ac_cv_c_inline" >&6
15696 case $ac_cv_c_inline in
15697   inline | yes) ;;
15698   no)
15699 cat >>confdefs.h <<\EOF
15700 #define inline
15701 EOF
15702  ;;
15703   *)  cat >>confdefs.h <<EOF
15704 #define inline $ac_cv_c_inline
15705 EOF
15706  ;;
15707 esac
15708
15709 NCURSES_INLINE=
15710 if test "$ac_cv_c_inline" != no ; then
15711   NCURSES_INLINE=inline
15712   if test "$INTEL_COMPILER" = yes
15713   then
15714     :
15715   elif test "$CLANG_COMPILER" = yes
15716   then
15717     :
15718   elif test "$GCC" = yes
15719   then
15720     echo "$as_me:15720: checking if $CC supports options to tune inlining" >&5
15721 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15722 if test "${cf_cv_gcc_inline+set}" = set; then
15723   echo $ECHO_N "(cached) $ECHO_C" >&6
15724 else
15725
15726       cf_save_CFLAGS=$CFLAGS
15727       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15728       cat >conftest.$ac_ext <<_ACEOF
15729 #line 15729 "configure"
15730 #include "confdefs.h"
15731 inline int foo(void) { return 1; }
15732 int
15733 main ()
15734 {
15735 ${cf_cv_main_return:-return} foo()
15736   ;
15737   return 0;
15738 }
15739 _ACEOF
15740 rm -f conftest.$ac_objext
15741 if { (eval echo "$as_me:15741: \"$ac_compile\"") >&5
15742   (eval $ac_compile) 2>&5
15743   ac_status=$?
15744   echo "$as_me:15744: \$? = $ac_status" >&5
15745   (exit $ac_status); } &&
15746          { ac_try='test -s conftest.$ac_objext'
15747   { (eval echo "$as_me:15747: \"$ac_try\"") >&5
15748   (eval $ac_try) 2>&5
15749   ac_status=$?
15750   echo "$as_me:15750: \$? = $ac_status" >&5
15751   (exit $ac_status); }; }; then
15752   cf_cv_gcc_inline=yes
15753 else
15754   echo "$as_me: failed program was:" >&5
15755 cat conftest.$ac_ext >&5
15756 cf_cv_gcc_inline=no
15757 fi
15758 rm -f conftest.$ac_objext conftest.$ac_ext
15759       CFLAGS=$cf_save_CFLAGS
15760
15761 fi
15762 echo "$as_me:15762: result: $cf_cv_gcc_inline" >&5
15763 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15764     if test "$cf_cv_gcc_inline" = yes ; then
15765
15766 cf_fix_cppflags=no
15767 cf_new_cflags=
15768 cf_new_cppflags=
15769 cf_new_extra_cppflags=
15770
15771 for cf_add_cflags in --param max-inline-insns-single=1200
15772 do
15773 case $cf_fix_cppflags in
15774 no)
15775         case $cf_add_cflags in #(vi
15776         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15777                 case $cf_add_cflags in
15778                 -D*)
15779                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15780
15781                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15782                                 && test -z "${cf_tst_cflags}" \
15783                                 && cf_fix_cppflags=yes
15784
15785                         if test $cf_fix_cppflags = yes ; then
15786                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15787                                 continue
15788                         elif test "${cf_tst_cflags}" = "\"'" ; then
15789                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15790                                 continue
15791                         fi
15792                         ;;
15793                 esac
15794                 case "$CPPFLAGS" in
15795                 *$cf_add_cflags) #(vi
15796                         ;;
15797                 *) #(vi
15798                         case $cf_add_cflags in #(vi
15799                         -D*)
15800                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15801
15802 CPPFLAGS=`echo "$CPPFLAGS" | \
15803         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15804                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15805
15806                                 ;;
15807                         esac
15808                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15809                         ;;
15810                 esac
15811                 ;;
15812         *)
15813                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15814                 ;;
15815         esac
15816         ;;
15817 yes)
15818         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15819
15820         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15821
15822         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15823                 && test -z "${cf_tst_cflags}" \
15824                 && cf_fix_cppflags=no
15825         ;;
15826 esac
15827 done
15828
15829 if test -n "$cf_new_cflags" ; then
15830
15831         CFLAGS="$CFLAGS $cf_new_cflags"
15832 fi
15833
15834 if test -n "$cf_new_cppflags" ; then
15835
15836         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15837 fi
15838
15839 if test -n "$cf_new_extra_cppflags" ; then
15840
15841         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15842 fi
15843
15844     fi
15845   fi
15846 fi
15847
15848 echo "$as_me:15848: checking for signal global datatype" >&5
15849 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15850 if test "${cf_cv_sig_atomic_t+set}" = set; then
15851   echo $ECHO_N "(cached) $ECHO_C" >&6
15852 else
15853
15854         for cf_type in \
15855                 "volatile sig_atomic_t" \
15856                 "sig_atomic_t" \
15857                 "int"
15858         do
15859         cat >conftest.$ac_ext <<_ACEOF
15860 #line 15860 "configure"
15861 #include "confdefs.h"
15862
15863 #include <sys/types.h>
15864 #include <signal.h>
15865 #include <stdio.h>
15866
15867 extern $cf_type x;
15868 $cf_type x;
15869 static void handler(int sig)
15870 {
15871         x = 5;
15872 }
15873 int
15874 main ()
15875 {
15876 signal(SIGINT, handler);
15877                  x = 1
15878   ;
15879   return 0;
15880 }
15881 _ACEOF
15882 rm -f conftest.$ac_objext
15883 if { (eval echo "$as_me:15883: \"$ac_compile\"") >&5
15884   (eval $ac_compile) 2>&5
15885   ac_status=$?
15886   echo "$as_me:15886: \$? = $ac_status" >&5
15887   (exit $ac_status); } &&
15888          { ac_try='test -s conftest.$ac_objext'
15889   { (eval echo "$as_me:15889: \"$ac_try\"") >&5
15890   (eval $ac_try) 2>&5
15891   ac_status=$?
15892   echo "$as_me:15892: \$? = $ac_status" >&5
15893   (exit $ac_status); }; }; then
15894   cf_cv_sig_atomic_t=$cf_type
15895 else
15896   echo "$as_me: failed program was:" >&5
15897 cat conftest.$ac_ext >&5
15898 cf_cv_sig_atomic_t=no
15899 fi
15900 rm -f conftest.$ac_objext conftest.$ac_ext
15901                 test "$cf_cv_sig_atomic_t" != no && break
15902         done
15903
15904 fi
15905
15906 echo "$as_me:15906: result: $cf_cv_sig_atomic_t" >&5
15907 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15908 test "$cf_cv_sig_atomic_t" != no &&
15909 cat >>confdefs.h <<EOF
15910 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15911 EOF
15912
15913 if test $NCURSES_CHTYPE = auto ; then
15914
15915 echo "$as_me:15915: checking for type of chtype" >&5
15916 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15917 if test "${cf_cv_typeof_chtype+set}" = set; then
15918   echo $ECHO_N "(cached) $ECHO_C" >&6
15919 else
15920
15921                 if test "$cross_compiling" = yes; then
15922   cf_cv_typeof_chtype=long
15923 else
15924   cat >conftest.$ac_ext <<_ACEOF
15925 #line 15925 "configure"
15926 #include "confdefs.h"
15927
15928 #define WANT_BITS 31
15929 #include <stdio.h>
15930 int main()
15931 {
15932         FILE *fp = fopen("cf_test.out", "w");
15933         if (fp != 0) {
15934                 char *result = "long";
15935                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15936                         int n;
15937                         unsigned int x, y;
15938                         for (n = 0; n < WANT_BITS; n++) {
15939                                 x = (1 << n);
15940                                 y = (x >> n);
15941                                 if (y != 1 || x == 0) {
15942                                         x = 0;
15943                                         break;
15944                                 }
15945                         }
15946                         /*
15947                          * If x is nonzero, an int is big enough for the bits
15948                          * that we want.
15949                          */
15950                         result = (x != 0) ? "int" : "long";
15951                 }
15952                 fputs(result, fp);
15953                 fclose(fp);
15954         }
15955         ${cf_cv_main_return:-return}(0);
15956 }
15957
15958 _ACEOF
15959 rm -f conftest$ac_exeext
15960 if { (eval echo "$as_me:15960: \"$ac_link\"") >&5
15961   (eval $ac_link) 2>&5
15962   ac_status=$?
15963   echo "$as_me:15963: \$? = $ac_status" >&5
15964   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15965   { (eval echo "$as_me:15965: \"$ac_try\"") >&5
15966   (eval $ac_try) 2>&5
15967   ac_status=$?
15968   echo "$as_me:15968: \$? = $ac_status" >&5
15969   (exit $ac_status); }; }; then
15970   cf_cv_typeof_chtype=`cat cf_test.out`
15971 else
15972   echo "$as_me: program exited with status $ac_status" >&5
15973 echo "$as_me: failed program was:" >&5
15974 cat conftest.$ac_ext >&5
15975 cf_cv_typeof_chtype=long
15976 fi
15977 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15978 fi
15979                 rm -f cf_test.out
15980
15981 fi
15982
15983 echo "$as_me:15983: result: $cf_cv_typeof_chtype" >&5
15984 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15985
15986 cat >>confdefs.h <<EOF
15987 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15988 EOF
15989
15990 else
15991         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15992 fi
15993 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15994
15995 echo "$as_me:15995: checking if unsigned literals are legal" >&5
15996 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15997 if test "${cf_cv_unsigned_literals+set}" = set; then
15998   echo $ECHO_N "(cached) $ECHO_C" >&6
15999 else
16000
16001         cat >conftest.$ac_ext <<_ACEOF
16002 #line 16002 "configure"
16003 #include "confdefs.h"
16004
16005 int
16006 main ()
16007 {
16008 long x = 1L + 1UL + 1U + 1
16009   ;
16010   return 0;
16011 }
16012 _ACEOF
16013 rm -f conftest.$ac_objext
16014 if { (eval echo "$as_me:16014: \"$ac_compile\"") >&5
16015   (eval $ac_compile) 2>&5
16016   ac_status=$?
16017   echo "$as_me:16017: \$? = $ac_status" >&5
16018   (exit $ac_status); } &&
16019          { ac_try='test -s conftest.$ac_objext'
16020   { (eval echo "$as_me:16020: \"$ac_try\"") >&5
16021   (eval $ac_try) 2>&5
16022   ac_status=$?
16023   echo "$as_me:16023: \$? = $ac_status" >&5
16024   (exit $ac_status); }; }; then
16025   cf_cv_unsigned_literals=yes
16026 else
16027   echo "$as_me: failed program was:" >&5
16028 cat conftest.$ac_ext >&5
16029 cf_cv_unsigned_literals=no
16030 fi
16031 rm -f conftest.$ac_objext conftest.$ac_ext
16032
16033 fi
16034
16035 echo "$as_me:16035: result: $cf_cv_unsigned_literals" >&5
16036 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16037
16038 cf_cv_1UL="1"
16039 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16040 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16041
16042 if test $NCURSES_MMASK_T = auto ; then
16043         cf_cv_typeof_mmask_t=long
16044 else
16045         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16046 fi
16047 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16048
16049 ###     Checks for external-data
16050
16051 echo "$as_me:16051: checking if external errno is declared" >&5
16052 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16053 if test "${cf_cv_dcl_errno+set}" = set; then
16054   echo $ECHO_N "(cached) $ECHO_C" >&6
16055 else
16056
16057     cat >conftest.$ac_ext <<_ACEOF
16058 #line 16058 "configure"
16059 #include "confdefs.h"
16060
16061 #ifdef HAVE_STDLIB_H
16062 #include <stdlib.h>
16063 #endif
16064 #include <stdio.h>
16065 #include <sys/types.h>
16066 #include <errno.h>
16067 int
16068 main ()
16069 {
16070 int x = (int) errno
16071   ;
16072   return 0;
16073 }
16074 _ACEOF
16075 rm -f conftest.$ac_objext
16076 if { (eval echo "$as_me:16076: \"$ac_compile\"") >&5
16077   (eval $ac_compile) 2>&5
16078   ac_status=$?
16079   echo "$as_me:16079: \$? = $ac_status" >&5
16080   (exit $ac_status); } &&
16081          { ac_try='test -s conftest.$ac_objext'
16082   { (eval echo "$as_me:16082: \"$ac_try\"") >&5
16083   (eval $ac_try) 2>&5
16084   ac_status=$?
16085   echo "$as_me:16085: \$? = $ac_status" >&5
16086   (exit $ac_status); }; }; then
16087   cf_cv_dcl_errno=yes
16088 else
16089   echo "$as_me: failed program was:" >&5
16090 cat conftest.$ac_ext >&5
16091 cf_cv_dcl_errno=no
16092 fi
16093 rm -f conftest.$ac_objext conftest.$ac_ext
16094
16095 fi
16096 echo "$as_me:16096: result: $cf_cv_dcl_errno" >&5
16097 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16098
16099 if test "$cf_cv_dcl_errno" = no ; then
16100
16101 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16102
16103     cat >>confdefs.h <<EOF
16104 #define $cf_result 1
16105 EOF
16106
16107 fi
16108
16109 # It's possible (for near-UNIX clones) that the data doesn't exist
16110
16111 echo "$as_me:16111: checking if external errno exists" >&5
16112 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16113 if test "${cf_cv_have_errno+set}" = set; then
16114   echo $ECHO_N "(cached) $ECHO_C" >&6
16115 else
16116
16117     cat >conftest.$ac_ext <<_ACEOF
16118 #line 16118 "configure"
16119 #include "confdefs.h"
16120
16121 #undef errno
16122 extern int errno;
16123
16124 int
16125 main ()
16126 {
16127 errno = 2
16128   ;
16129   return 0;
16130 }
16131 _ACEOF
16132 rm -f conftest.$ac_objext conftest$ac_exeext
16133 if { (eval echo "$as_me:16133: \"$ac_link\"") >&5
16134   (eval $ac_link) 2>&5
16135   ac_status=$?
16136   echo "$as_me:16136: \$? = $ac_status" >&5
16137   (exit $ac_status); } &&
16138          { ac_try='test -s conftest$ac_exeext'
16139   { (eval echo "$as_me:16139: \"$ac_try\"") >&5
16140   (eval $ac_try) 2>&5
16141   ac_status=$?
16142   echo "$as_me:16142: \$? = $ac_status" >&5
16143   (exit $ac_status); }; }; then
16144   cf_cv_have_errno=yes
16145 else
16146   echo "$as_me: failed program was:" >&5
16147 cat conftest.$ac_ext >&5
16148 cf_cv_have_errno=no
16149 fi
16150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16151
16152 fi
16153 echo "$as_me:16153: result: $cf_cv_have_errno" >&5
16154 echo "${ECHO_T}$cf_cv_have_errno" >&6
16155
16156 if test "$cf_cv_have_errno" = yes ; then
16157
16158 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16159
16160     cat >>confdefs.h <<EOF
16161 #define $cf_result 1
16162 EOF
16163
16164 fi
16165
16166 echo "$as_me:16166: checking if data-only library module links" >&5
16167 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16168 if test "${cf_cv_link_dataonly+set}" = set; then
16169   echo $ECHO_N "(cached) $ECHO_C" >&6
16170 else
16171
16172         rm -f conftest.a
16173         cat >conftest.$ac_ext <<EOF
16174 #line 16174 "configure"
16175 int     testdata[3] = { 123, 456, 789 };
16176 EOF
16177         if { (eval echo "$as_me:16177: \"$ac_compile\"") >&5
16178   (eval $ac_compile) 2>&5
16179   ac_status=$?
16180   echo "$as_me:16180: \$? = $ac_status" >&5
16181   (exit $ac_status); } ; then
16182                 mv conftest.o data.o && \
16183                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16184         fi
16185         rm -f conftest.$ac_ext data.o
16186         cat >conftest.$ac_ext <<EOF
16187 #line 16187 "configure"
16188 int     testfunc()
16189 {
16190 #if defined(NeXT)
16191         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16192 #else
16193         extern int testdata[3];
16194         return testdata[0] == 123
16195            &&  testdata[1] == 456
16196            &&  testdata[2] == 789;
16197 #endif
16198 }
16199 EOF
16200         if { (eval echo "$as_me:16200: \"$ac_compile\"") >&5
16201   (eval $ac_compile) 2>&5
16202   ac_status=$?
16203   echo "$as_me:16203: \$? = $ac_status" >&5
16204   (exit $ac_status); }; then
16205                 mv conftest.o func.o && \
16206                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16207         fi
16208         rm -f conftest.$ac_ext func.o
16209         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16210         cf_saveLIBS="$LIBS"
16211         LIBS="conftest.a $LIBS"
16212         if test "$cross_compiling" = yes; then
16213   cf_cv_link_dataonly=unknown
16214 else
16215   cat >conftest.$ac_ext <<_ACEOF
16216 #line 16216 "configure"
16217 #include "confdefs.h"
16218
16219         int main()
16220         {
16221                 extern int testfunc();
16222                 ${cf_cv_main_return:-return} (!testfunc());
16223         }
16224
16225 _ACEOF
16226 rm -f conftest$ac_exeext
16227 if { (eval echo "$as_me:16227: \"$ac_link\"") >&5
16228   (eval $ac_link) 2>&5
16229   ac_status=$?
16230   echo "$as_me:16230: \$? = $ac_status" >&5
16231   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16232   { (eval echo "$as_me:16232: \"$ac_try\"") >&5
16233   (eval $ac_try) 2>&5
16234   ac_status=$?
16235   echo "$as_me:16235: \$? = $ac_status" >&5
16236   (exit $ac_status); }; }; then
16237   cf_cv_link_dataonly=yes
16238 else
16239   echo "$as_me: program exited with status $ac_status" >&5
16240 echo "$as_me: failed program was:" >&5
16241 cat conftest.$ac_ext >&5
16242 cf_cv_link_dataonly=no
16243 fi
16244 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16245 fi
16246         LIBS="$cf_saveLIBS"
16247
16248 fi
16249
16250 echo "$as_me:16250: result: $cf_cv_link_dataonly" >&5
16251 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16252
16253 if test "$cf_cv_link_dataonly" = no ; then
16254
16255 cat >>confdefs.h <<\EOF
16256 #define BROKEN_LINKER 1
16257 EOF
16258
16259         BROKEN_LINKER=1
16260 fi
16261
16262 ###     Checks for library functions.
16263
16264 for ac_func in \
16265 getcwd \
16266 getegid \
16267 geteuid \
16268 getopt \
16269 getttynam \
16270 issetugid \
16271 poll \
16272 putenv \
16273 remove \
16274 select \
16275 setbuf \
16276 setbuffer \
16277 setenv \
16278 setvbuf \
16279 sigaction \
16280 sigvec \
16281 strdup \
16282 strstr \
16283 tcgetpgrp \
16284 times \
16285 vsnprintf \
16286
16287 do
16288 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16289 echo "$as_me:16289: checking for $ac_func" >&5
16290 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16291 if eval "test \"\${$as_ac_var+set}\" = set"; then
16292   echo $ECHO_N "(cached) $ECHO_C" >&6
16293 else
16294   cat >conftest.$ac_ext <<_ACEOF
16295 #line 16295 "configure"
16296 #include "confdefs.h"
16297 /* System header to define __stub macros and hopefully few prototypes,
16298     which can conflict with char $ac_func (); below.  */
16299 #include <assert.h>
16300 /* Override any gcc2 internal prototype to avoid an error.  */
16301 #ifdef __cplusplus
16302 extern "C"
16303 #endif
16304 /* We use char because int might match the return type of a gcc2
16305    builtin and then its argument prototype would still apply.  */
16306 char $ac_func ();
16307 char (*f) ();
16308
16309 int
16310 main ()
16311 {
16312 /* The GNU C library defines this for functions which it implements
16313     to always fail with ENOSYS.  Some functions are actually named
16314     something starting with __ and the normal name is an alias.  */
16315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16316 choke me
16317 #else
16318 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16319 #endif
16320
16321   ;
16322   return 0;
16323 }
16324 _ACEOF
16325 rm -f conftest.$ac_objext conftest$ac_exeext
16326 if { (eval echo "$as_me:16326: \"$ac_link\"") >&5
16327   (eval $ac_link) 2>&5
16328   ac_status=$?
16329   echo "$as_me:16329: \$? = $ac_status" >&5
16330   (exit $ac_status); } &&
16331          { ac_try='test -s conftest$ac_exeext'
16332   { (eval echo "$as_me:16332: \"$ac_try\"") >&5
16333   (eval $ac_try) 2>&5
16334   ac_status=$?
16335   echo "$as_me:16335: \$? = $ac_status" >&5
16336   (exit $ac_status); }; }; then
16337   eval "$as_ac_var=yes"
16338 else
16339   echo "$as_me: failed program was:" >&5
16340 cat conftest.$ac_ext >&5
16341 eval "$as_ac_var=no"
16342 fi
16343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16344 fi
16345 echo "$as_me:16345: result: `eval echo '${'$as_ac_var'}'`" >&5
16346 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16347 if test `eval echo '${'$as_ac_var'}'` = yes; then
16348   cat >>confdefs.h <<EOF
16349 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16350 EOF
16351
16352 fi
16353 done
16354
16355 if test "x$ac_cv_func_getopt" = xno &&
16356    test "x$cf_with_progs$cf_with_tests" != xnono; then
16357         { { echo "$as_me:16357: error: getopt is required for building programs" >&5
16358 echo "$as_me: error: getopt is required for building programs" >&2;}
16359    { (exit 1); exit 1; }; }
16360 fi
16361
16362 if test "x$with_getcap" = "xyes" ; then
16363
16364 echo "$as_me:16364: checking for terminal-capability database functions" >&5
16365 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16366 if test "${cf_cv_cgetent+set}" = set; then
16367   echo $ECHO_N "(cached) $ECHO_C" >&6
16368 else
16369
16370 cat >conftest.$ac_ext <<_ACEOF
16371 #line 16371 "configure"
16372 #include "confdefs.h"
16373
16374 #include <stdlib.h>
16375 int
16376 main ()
16377 {
16378
16379         char temp[128];
16380         char *buf = temp;
16381         char *db_array = temp;
16382         cgetent(&buf, &db_array, "vt100");
16383         cgetcap(buf, "tc", '=');
16384         cgetmatch(buf, "tc");
16385
16386   ;
16387   return 0;
16388 }
16389 _ACEOF
16390 rm -f conftest.$ac_objext conftest$ac_exeext
16391 if { (eval echo "$as_me:16391: \"$ac_link\"") >&5
16392   (eval $ac_link) 2>&5
16393   ac_status=$?
16394   echo "$as_me:16394: \$? = $ac_status" >&5
16395   (exit $ac_status); } &&
16396          { ac_try='test -s conftest$ac_exeext'
16397   { (eval echo "$as_me:16397: \"$ac_try\"") >&5
16398   (eval $ac_try) 2>&5
16399   ac_status=$?
16400   echo "$as_me:16400: \$? = $ac_status" >&5
16401   (exit $ac_status); }; }; then
16402   cf_cv_cgetent=yes
16403 else
16404   echo "$as_me: failed program was:" >&5
16405 cat conftest.$ac_ext >&5
16406 cf_cv_cgetent=no
16407 fi
16408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16409
16410 fi
16411 echo "$as_me:16411: result: $cf_cv_cgetent" >&5
16412 echo "${ECHO_T}$cf_cv_cgetent" >&6
16413
16414 if test "$cf_cv_cgetent" = yes
16415 then
16416
16417 cat >>confdefs.h <<\EOF
16418 #define HAVE_BSD_CGETENT 1
16419 EOF
16420
16421 echo "$as_me:16421: checking if cgetent uses const parameter" >&5
16422 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16423 if test "${cf_cv_cgetent_const+set}" = set; then
16424   echo $ECHO_N "(cached) $ECHO_C" >&6
16425 else
16426
16427 cat >conftest.$ac_ext <<_ACEOF
16428 #line 16428 "configure"
16429 #include "confdefs.h"
16430
16431 #include <stdlib.h>
16432 int
16433 main ()
16434 {
16435
16436         char temp[128];
16437         char *buf = temp;
16438 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16439         const char *db_array = temp;
16440         cgetent(&buf, &db_array, "vt100");
16441 #endif
16442         cgetcap(buf, "tc", '=');
16443         cgetmatch(buf, "tc");
16444
16445   ;
16446   return 0;
16447 }
16448 _ACEOF
16449 rm -f conftest.$ac_objext conftest$ac_exeext
16450 if { (eval echo "$as_me:16450: \"$ac_link\"") >&5
16451   (eval $ac_link) 2>&5
16452   ac_status=$?
16453   echo "$as_me:16453: \$? = $ac_status" >&5
16454   (exit $ac_status); } &&
16455          { ac_try='test -s conftest$ac_exeext'
16456   { (eval echo "$as_me:16456: \"$ac_try\"") >&5
16457   (eval $ac_try) 2>&5
16458   ac_status=$?
16459   echo "$as_me:16459: \$? = $ac_status" >&5
16460   (exit $ac_status); }; }; then
16461   cf_cv_cgetent_const=yes
16462 else
16463   echo "$as_me: failed program was:" >&5
16464 cat conftest.$ac_ext >&5
16465 cf_cv_cgetent_const=no
16466 fi
16467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16468
16469 fi
16470 echo "$as_me:16470: result: $cf_cv_cgetent_const" >&5
16471 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16472         if test "$cf_cv_cgetent_const" = yes
16473         then
16474
16475 cat >>confdefs.h <<EOF
16476 #define CGETENT_CONST const
16477 EOF
16478
16479         fi
16480 fi
16481
16482 fi
16483
16484 echo "$as_me:16484: checking for isascii" >&5
16485 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16486 if test "${cf_cv_have_isascii+set}" = set; then
16487   echo $ECHO_N "(cached) $ECHO_C" >&6
16488 else
16489
16490         cat >conftest.$ac_ext <<_ACEOF
16491 #line 16491 "configure"
16492 #include "confdefs.h"
16493 #include <ctype.h>
16494 int
16495 main ()
16496 {
16497 int x = isascii(' ')
16498   ;
16499   return 0;
16500 }
16501 _ACEOF
16502 rm -f conftest.$ac_objext conftest$ac_exeext
16503 if { (eval echo "$as_me:16503: \"$ac_link\"") >&5
16504   (eval $ac_link) 2>&5
16505   ac_status=$?
16506   echo "$as_me:16506: \$? = $ac_status" >&5
16507   (exit $ac_status); } &&
16508          { ac_try='test -s conftest$ac_exeext'
16509   { (eval echo "$as_me:16509: \"$ac_try\"") >&5
16510   (eval $ac_try) 2>&5
16511   ac_status=$?
16512   echo "$as_me:16512: \$? = $ac_status" >&5
16513   (exit $ac_status); }; }; then
16514   cf_cv_have_isascii=yes
16515 else
16516   echo "$as_me: failed program was:" >&5
16517 cat conftest.$ac_ext >&5
16518 cf_cv_have_isascii=no
16519 fi
16520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16521
16522 fi
16523 echo "$as_me:16523: result: $cf_cv_have_isascii" >&5
16524 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16525 test "$cf_cv_have_isascii" = yes &&
16526 cat >>confdefs.h <<\EOF
16527 #define HAVE_ISASCII 1
16528 EOF
16529
16530 if test "$ac_cv_func_sigaction" = yes; then
16531 echo "$as_me:16531: checking whether sigaction needs _POSIX_SOURCE" >&5
16532 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16533 cat >conftest.$ac_ext <<_ACEOF
16534 #line 16534 "configure"
16535 #include "confdefs.h"
16536
16537 #include <sys/types.h>
16538 #include <signal.h>
16539 int
16540 main ()
16541 {
16542 struct sigaction act
16543   ;
16544   return 0;
16545 }
16546 _ACEOF
16547 rm -f conftest.$ac_objext
16548 if { (eval echo "$as_me:16548: \"$ac_compile\"") >&5
16549   (eval $ac_compile) 2>&5
16550   ac_status=$?
16551   echo "$as_me:16551: \$? = $ac_status" >&5
16552   (exit $ac_status); } &&
16553          { ac_try='test -s conftest.$ac_objext'
16554   { (eval echo "$as_me:16554: \"$ac_try\"") >&5
16555   (eval $ac_try) 2>&5
16556   ac_status=$?
16557   echo "$as_me:16557: \$? = $ac_status" >&5
16558   (exit $ac_status); }; }; then
16559   sigact_bad=no
16560 else
16561   echo "$as_me: failed program was:" >&5
16562 cat conftest.$ac_ext >&5
16563
16564 cat >conftest.$ac_ext <<_ACEOF
16565 #line 16565 "configure"
16566 #include "confdefs.h"
16567
16568 #define _POSIX_SOURCE
16569 #include <sys/types.h>
16570 #include <signal.h>
16571 int
16572 main ()
16573 {
16574 struct sigaction act
16575   ;
16576   return 0;
16577 }
16578 _ACEOF
16579 rm -f conftest.$ac_objext
16580 if { (eval echo "$as_me:16580: \"$ac_compile\"") >&5
16581   (eval $ac_compile) 2>&5
16582   ac_status=$?
16583   echo "$as_me:16583: \$? = $ac_status" >&5
16584   (exit $ac_status); } &&
16585          { ac_try='test -s conftest.$ac_objext'
16586   { (eval echo "$as_me:16586: \"$ac_try\"") >&5
16587   (eval $ac_try) 2>&5
16588   ac_status=$?
16589   echo "$as_me:16589: \$? = $ac_status" >&5
16590   (exit $ac_status); }; }; then
16591   sigact_bad=yes
16592
16593 cat >>confdefs.h <<\EOF
16594 #define _POSIX_SOURCE 1
16595 EOF
16596
16597 else
16598   echo "$as_me: failed program was:" >&5
16599 cat conftest.$ac_ext >&5
16600 sigact_bad=unknown
16601 fi
16602 rm -f conftest.$ac_objext conftest.$ac_ext
16603 fi
16604 rm -f conftest.$ac_objext conftest.$ac_ext
16605 echo "$as_me:16605: result: $sigact_bad" >&5
16606 echo "${ECHO_T}$sigact_bad" >&6
16607 fi
16608
16609 echo "$as_me:16609: checking if nanosleep really works" >&5
16610 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16611 if test "${cf_cv_func_nanosleep+set}" = set; then
16612   echo $ECHO_N "(cached) $ECHO_C" >&6
16613 else
16614
16615 if test "$cross_compiling" = yes; then
16616   cf_cv_func_nanosleep=unknown
16617 else
16618   cat >conftest.$ac_ext <<_ACEOF
16619 #line 16619 "configure"
16620 #include "confdefs.h"
16621
16622 #include <stdio.h>
16623 #include <errno.h>
16624 #include <time.h>
16625
16626 #ifdef HAVE_SYS_TIME_H
16627 #include <sys/time.h>
16628 #endif
16629
16630 int main() {
16631         struct timespec ts1, ts2;
16632         int code;
16633         ts1.tv_sec  = 0;
16634         ts1.tv_nsec = 750000000;
16635         ts2.tv_sec  = 0;
16636         ts2.tv_nsec = 0;
16637         errno = 0;
16638         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16639         ${cf_cv_main_return:-return}(code != 0);
16640 }
16641
16642 _ACEOF
16643 rm -f conftest$ac_exeext
16644 if { (eval echo "$as_me:16644: \"$ac_link\"") >&5
16645   (eval $ac_link) 2>&5
16646   ac_status=$?
16647   echo "$as_me:16647: \$? = $ac_status" >&5
16648   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16649   { (eval echo "$as_me:16649: \"$ac_try\"") >&5
16650   (eval $ac_try) 2>&5
16651   ac_status=$?
16652   echo "$as_me:16652: \$? = $ac_status" >&5
16653   (exit $ac_status); }; }; then
16654   cf_cv_func_nanosleep=yes
16655 else
16656   echo "$as_me: program exited with status $ac_status" >&5
16657 echo "$as_me: failed program was:" >&5
16658 cat conftest.$ac_ext >&5
16659 cf_cv_func_nanosleep=no
16660 fi
16661 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16662 fi
16663 fi
16664 echo "$as_me:16664: result: $cf_cv_func_nanosleep" >&5
16665 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16666
16667 test "$cf_cv_func_nanosleep" = "yes" &&
16668 cat >>confdefs.h <<\EOF
16669 #define HAVE_NANOSLEEP 1
16670 EOF
16671
16672 for ac_header in \
16673 termio.h \
16674 termios.h \
16675 unistd.h \
16676
16677 do
16678 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16679 echo "$as_me:16679: checking for $ac_header" >&5
16680 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16681 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16682   echo $ECHO_N "(cached) $ECHO_C" >&6
16683 else
16684   cat >conftest.$ac_ext <<_ACEOF
16685 #line 16685 "configure"
16686 #include "confdefs.h"
16687 #include <$ac_header>
16688 _ACEOF
16689 if { (eval echo "$as_me:16689: \"$ac_cpp conftest.$ac_ext\"") >&5
16690   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16691   ac_status=$?
16692   egrep -v '^ *\+' conftest.er1 >conftest.err
16693   rm -f conftest.er1
16694   cat conftest.err >&5
16695   echo "$as_me:16695: \$? = $ac_status" >&5
16696   (exit $ac_status); } >/dev/null; then
16697   if test -s conftest.err; then
16698     ac_cpp_err=$ac_c_preproc_warn_flag
16699   else
16700     ac_cpp_err=
16701   fi
16702 else
16703   ac_cpp_err=yes
16704 fi
16705 if test -z "$ac_cpp_err"; then
16706   eval "$as_ac_Header=yes"
16707 else
16708   echo "$as_me: failed program was:" >&5
16709   cat conftest.$ac_ext >&5
16710   eval "$as_ac_Header=no"
16711 fi
16712 rm -f conftest.err conftest.$ac_ext
16713 fi
16714 echo "$as_me:16714: result: `eval echo '${'$as_ac_Header'}'`" >&5
16715 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16716 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16717   cat >>confdefs.h <<EOF
16718 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16719 EOF
16720
16721 fi
16722 done
16723
16724 if test "$ISC" = yes ; then
16725
16726 for ac_header in sys/termio.h
16727 do
16728 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16729 echo "$as_me:16729: checking for $ac_header" >&5
16730 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16731 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16732   echo $ECHO_N "(cached) $ECHO_C" >&6
16733 else
16734   cat >conftest.$ac_ext <<_ACEOF
16735 #line 16735 "configure"
16736 #include "confdefs.h"
16737 #include <$ac_header>
16738 _ACEOF
16739 if { (eval echo "$as_me:16739: \"$ac_cpp conftest.$ac_ext\"") >&5
16740   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16741   ac_status=$?
16742   egrep -v '^ *\+' conftest.er1 >conftest.err
16743   rm -f conftest.er1
16744   cat conftest.err >&5
16745   echo "$as_me:16745: \$? = $ac_status" >&5
16746   (exit $ac_status); } >/dev/null; then
16747   if test -s conftest.err; then
16748     ac_cpp_err=$ac_c_preproc_warn_flag
16749   else
16750     ac_cpp_err=
16751   fi
16752 else
16753   ac_cpp_err=yes
16754 fi
16755 if test -z "$ac_cpp_err"; then
16756   eval "$as_ac_Header=yes"
16757 else
16758   echo "$as_me: failed program was:" >&5
16759   cat conftest.$ac_ext >&5
16760   eval "$as_ac_Header=no"
16761 fi
16762 rm -f conftest.err conftest.$ac_ext
16763 fi
16764 echo "$as_me:16764: result: `eval echo '${'$as_ac_Header'}'`" >&5
16765 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16766 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16767   cat >>confdefs.h <<EOF
16768 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16769 EOF
16770
16771 fi
16772 done
16773
16774 fi
16775 if test "$ac_cv_header_termios_h" = yes ; then
16776         case "$CFLAGS $CPPFLAGS" in
16777         *-D_POSIX_SOURCE*)
16778                 termios_bad=dunno ;;
16779         *)      termios_bad=maybe ;;
16780         esac
16781         if test "$termios_bad" = maybe ; then
16782         echo "$as_me:16782: checking whether termios.h needs _POSIX_SOURCE" >&5
16783 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16784         cat >conftest.$ac_ext <<_ACEOF
16785 #line 16785 "configure"
16786 #include "confdefs.h"
16787 #include <termios.h>
16788 int
16789 main ()
16790 {
16791 struct termios foo; int x = foo.c_iflag
16792   ;
16793   return 0;
16794 }
16795 _ACEOF
16796 rm -f conftest.$ac_objext
16797 if { (eval echo "$as_me:16797: \"$ac_compile\"") >&5
16798   (eval $ac_compile) 2>&5
16799   ac_status=$?
16800   echo "$as_me:16800: \$? = $ac_status" >&5
16801   (exit $ac_status); } &&
16802          { ac_try='test -s conftest.$ac_objext'
16803   { (eval echo "$as_me:16803: \"$ac_try\"") >&5
16804   (eval $ac_try) 2>&5
16805   ac_status=$?
16806   echo "$as_me:16806: \$? = $ac_status" >&5
16807   (exit $ac_status); }; }; then
16808   termios_bad=no
16809 else
16810   echo "$as_me: failed program was:" >&5
16811 cat conftest.$ac_ext >&5
16812
16813                 cat >conftest.$ac_ext <<_ACEOF
16814 #line 16814 "configure"
16815 #include "confdefs.h"
16816
16817 #define _POSIX_SOURCE
16818 #include <termios.h>
16819 int
16820 main ()
16821 {
16822 struct termios foo; int x = foo.c_iflag
16823   ;
16824   return 0;
16825 }
16826 _ACEOF
16827 rm -f conftest.$ac_objext
16828 if { (eval echo "$as_me:16828: \"$ac_compile\"") >&5
16829   (eval $ac_compile) 2>&5
16830   ac_status=$?
16831   echo "$as_me:16831: \$? = $ac_status" >&5
16832   (exit $ac_status); } &&
16833          { ac_try='test -s conftest.$ac_objext'
16834   { (eval echo "$as_me:16834: \"$ac_try\"") >&5
16835   (eval $ac_try) 2>&5
16836   ac_status=$?
16837   echo "$as_me:16837: \$? = $ac_status" >&5
16838   (exit $ac_status); }; }; then
16839   termios_bad=unknown
16840 else
16841   echo "$as_me: failed program was:" >&5
16842 cat conftest.$ac_ext >&5
16843 termios_bad=yes
16844 cat >>confdefs.h <<\EOF
16845 #define _POSIX_SOURCE 1
16846 EOF
16847
16848 fi
16849 rm -f conftest.$ac_objext conftest.$ac_ext
16850
16851 fi
16852 rm -f conftest.$ac_objext conftest.$ac_ext
16853         echo "$as_me:16853: result: $termios_bad" >&5
16854 echo "${ECHO_T}$termios_bad" >&6
16855         fi
16856 fi
16857
16858 echo "$as_me:16858: checking for tcgetattr" >&5
16859 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16860 if test "${cf_cv_have_tcgetattr+set}" = set; then
16861   echo $ECHO_N "(cached) $ECHO_C" >&6
16862 else
16863
16864 cat >conftest.$ac_ext <<_ACEOF
16865 #line 16865 "configure"
16866 #include "confdefs.h"
16867
16868 #include <sys/types.h>
16869 #ifdef HAVE_UNISTD_H
16870 #include <unistd.h>
16871 #endif
16872 #ifdef HAVE_TERMIOS_H
16873 #include <termios.h>
16874 #define TTY struct termios
16875 #else
16876 #ifdef HAVE_TERMIO_H
16877 #include <termio.h>
16878 #define TTY struct termio
16879 #endif
16880 #endif
16881
16882 int
16883 main ()
16884 {
16885
16886 TTY foo;
16887 tcgetattr(1, &foo);
16888   ;
16889   return 0;
16890 }
16891 _ACEOF
16892 rm -f conftest.$ac_objext conftest$ac_exeext
16893 if { (eval echo "$as_me:16893: \"$ac_link\"") >&5
16894   (eval $ac_link) 2>&5
16895   ac_status=$?
16896   echo "$as_me:16896: \$? = $ac_status" >&5
16897   (exit $ac_status); } &&
16898          { ac_try='test -s conftest$ac_exeext'
16899   { (eval echo "$as_me:16899: \"$ac_try\"") >&5
16900   (eval $ac_try) 2>&5
16901   ac_status=$?
16902   echo "$as_me:16902: \$? = $ac_status" >&5
16903   (exit $ac_status); }; }; then
16904   cf_cv_have_tcgetattr=yes
16905 else
16906   echo "$as_me: failed program was:" >&5
16907 cat conftest.$ac_ext >&5
16908 cf_cv_have_tcgetattr=no
16909 fi
16910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16911 fi
16912 echo "$as_me:16912: result: $cf_cv_have_tcgetattr" >&5
16913 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16914 test "$cf_cv_have_tcgetattr" = yes &&
16915 cat >>confdefs.h <<\EOF
16916 #define HAVE_TCGETATTR 1
16917 EOF
16918
16919 echo "$as_me:16919: checking for vsscanf function or workaround" >&5
16920 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16921 if test "${cf_cv_func_vsscanf+set}" = set; then
16922   echo $ECHO_N "(cached) $ECHO_C" >&6
16923 else
16924
16925 cat >conftest.$ac_ext <<_ACEOF
16926 #line 16926 "configure"
16927 #include "confdefs.h"
16928
16929 #include <stdarg.h>
16930 #include <stdio.h>
16931 int
16932 main ()
16933 {
16934
16935         va_list ap;
16936         vsscanf("from", "%d", ap)
16937   ;
16938   return 0;
16939 }
16940 _ACEOF
16941 rm -f conftest.$ac_objext conftest$ac_exeext
16942 if { (eval echo "$as_me:16942: \"$ac_link\"") >&5
16943   (eval $ac_link) 2>&5
16944   ac_status=$?
16945   echo "$as_me:16945: \$? = $ac_status" >&5
16946   (exit $ac_status); } &&
16947          { ac_try='test -s conftest$ac_exeext'
16948   { (eval echo "$as_me:16948: \"$ac_try\"") >&5
16949   (eval $ac_try) 2>&5
16950   ac_status=$?
16951   echo "$as_me:16951: \$? = $ac_status" >&5
16952   (exit $ac_status); }; }; then
16953   cf_cv_func_vsscanf=vsscanf
16954 else
16955   echo "$as_me: failed program was:" >&5
16956 cat conftest.$ac_ext >&5
16957
16958 cat >conftest.$ac_ext <<_ACEOF
16959 #line 16959 "configure"
16960 #include "confdefs.h"
16961
16962 #include <stdarg.h>
16963 #include <stdio.h>
16964 int
16965 main ()
16966 {
16967
16968     FILE strbuf;
16969     char *str = "from";
16970
16971     strbuf._flag = _IOREAD;
16972     strbuf._ptr = strbuf._base = (unsigned char *) str;
16973     strbuf._cnt = strlen(str);
16974     strbuf._file = _NFILE;
16975     return (vfscanf(&strbuf, "%d", ap))
16976   ;
16977   return 0;
16978 }
16979 _ACEOF
16980 rm -f conftest.$ac_objext conftest$ac_exeext
16981 if { (eval echo "$as_me:16981: \"$ac_link\"") >&5
16982   (eval $ac_link) 2>&5
16983   ac_status=$?
16984   echo "$as_me:16984: \$? = $ac_status" >&5
16985   (exit $ac_status); } &&
16986          { ac_try='test -s conftest$ac_exeext'
16987   { (eval echo "$as_me:16987: \"$ac_try\"") >&5
16988   (eval $ac_try) 2>&5
16989   ac_status=$?
16990   echo "$as_me:16990: \$? = $ac_status" >&5
16991   (exit $ac_status); }; }; then
16992   cf_cv_func_vsscanf=vfscanf
16993 else
16994   echo "$as_me: failed program was:" >&5
16995 cat conftest.$ac_ext >&5
16996
16997 cat >conftest.$ac_ext <<_ACEOF
16998 #line 16998 "configure"
16999 #include "confdefs.h"
17000
17001 #include <stdarg.h>
17002 #include <stdio.h>
17003 int
17004 main ()
17005 {
17006
17007     FILE strbuf;
17008     char *str = "from";
17009
17010     strbuf._flag = _IOREAD;
17011     strbuf._ptr = strbuf._base = (unsigned char *) str;
17012     strbuf._cnt = strlen(str);
17013     strbuf._file = _NFILE;
17014     return (_doscan(&strbuf, "%d", ap))
17015   ;
17016   return 0;
17017 }
17018 _ACEOF
17019 rm -f conftest.$ac_objext conftest$ac_exeext
17020 if { (eval echo "$as_me:17020: \"$ac_link\"") >&5
17021   (eval $ac_link) 2>&5
17022   ac_status=$?
17023   echo "$as_me:17023: \$? = $ac_status" >&5
17024   (exit $ac_status); } &&
17025          { ac_try='test -s conftest$ac_exeext'
17026   { (eval echo "$as_me:17026: \"$ac_try\"") >&5
17027   (eval $ac_try) 2>&5
17028   ac_status=$?
17029   echo "$as_me:17029: \$? = $ac_status" >&5
17030   (exit $ac_status); }; }; then
17031   cf_cv_func_vsscanf=_doscan
17032 else
17033   echo "$as_me: failed program was:" >&5
17034 cat conftest.$ac_ext >&5
17035
17036 cf_cv_func_vsscanf=no
17037 fi
17038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17039 fi
17040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17041 fi
17042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17043 fi
17044 echo "$as_me:17044: result: $cf_cv_func_vsscanf" >&5
17045 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17046
17047 case $cf_cv_func_vsscanf in #(vi
17048 vsscanf)
17049 cat >>confdefs.h <<\EOF
17050 #define HAVE_VSSCANF 1
17051 EOF
17052 ;; #(vi
17053 vfscanf)
17054 cat >>confdefs.h <<\EOF
17055 #define HAVE_VFSCANF 1
17056 EOF
17057 ;; #(vi
17058 _doscan)
17059 cat >>confdefs.h <<\EOF
17060 #define HAVE__DOSCAN 1
17061 EOF
17062 ;;
17063 esac
17064
17065 echo "$as_me:17065: checking for working mkstemp" >&5
17066 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17067 if test "${cf_cv_func_mkstemp+set}" = set; then
17068   echo $ECHO_N "(cached) $ECHO_C" >&6
17069 else
17070
17071 rm -rf conftest*
17072 if test "$cross_compiling" = yes; then
17073   cf_cv_func_mkstemp=maybe
17074 else
17075   cat >conftest.$ac_ext <<_ACEOF
17076 #line 17076 "configure"
17077 #include "confdefs.h"
17078
17079 #include <sys/types.h>
17080 #include <stdlib.h>
17081 #include <stdio.h>
17082 #include <string.h>
17083 #include <sys/stat.h>
17084 int main()
17085 {
17086         char *tmpl = "conftestXXXXXX";
17087         char name[2][80];
17088         int n;
17089         int result = 0;
17090         int fd;
17091         struct stat sb;
17092
17093         umask(077);
17094         for (n = 0; n < 2; ++n) {
17095                 strcpy(name[n], tmpl);
17096                 if ((fd = mkstemp(name[n])) >= 0) {
17097                         if (!strcmp(name[n], tmpl)
17098                          || stat(name[n], &sb) != 0
17099                          || (sb.st_mode & S_IFMT) != S_IFREG
17100                          || (sb.st_mode & 077) != 0) {
17101                                 result = 1;
17102                         }
17103                         close(fd);
17104                 }
17105         }
17106         if (result == 0
17107          && !strcmp(name[0], name[1]))
17108                 result = 1;
17109         ${cf_cv_main_return:-return}(result);
17110 }
17111
17112 _ACEOF
17113 rm -f conftest$ac_exeext
17114 if { (eval echo "$as_me:17114: \"$ac_link\"") >&5
17115   (eval $ac_link) 2>&5
17116   ac_status=$?
17117   echo "$as_me:17117: \$? = $ac_status" >&5
17118   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17119   { (eval echo "$as_me:17119: \"$ac_try\"") >&5
17120   (eval $ac_try) 2>&5
17121   ac_status=$?
17122   echo "$as_me:17122: \$? = $ac_status" >&5
17123   (exit $ac_status); }; }; then
17124   cf_cv_func_mkstemp=yes
17125
17126 else
17127   echo "$as_me: program exited with status $ac_status" >&5
17128 echo "$as_me: failed program was:" >&5
17129 cat conftest.$ac_ext >&5
17130 cf_cv_func_mkstemp=no
17131
17132 fi
17133 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17134 fi
17135
17136 fi
17137 echo "$as_me:17137: result: $cf_cv_func_mkstemp" >&5
17138 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17139 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17140         echo "$as_me:17140: checking for mkstemp" >&5
17141 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17142 if test "${ac_cv_func_mkstemp+set}" = set; then
17143   echo $ECHO_N "(cached) $ECHO_C" >&6
17144 else
17145   cat >conftest.$ac_ext <<_ACEOF
17146 #line 17146 "configure"
17147 #include "confdefs.h"
17148 /* System header to define __stub macros and hopefully few prototypes,
17149     which can conflict with char mkstemp (); below.  */
17150 #include <assert.h>
17151 /* Override any gcc2 internal prototype to avoid an error.  */
17152 #ifdef __cplusplus
17153 extern "C"
17154 #endif
17155 /* We use char because int might match the return type of a gcc2
17156    builtin and then its argument prototype would still apply.  */
17157 char mkstemp ();
17158 char (*f) ();
17159
17160 int
17161 main ()
17162 {
17163 /* The GNU C library defines this for functions which it implements
17164     to always fail with ENOSYS.  Some functions are actually named
17165     something starting with __ and the normal name is an alias.  */
17166 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17167 choke me
17168 #else
17169 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17170 #endif
17171
17172   ;
17173   return 0;
17174 }
17175 _ACEOF
17176 rm -f conftest.$ac_objext conftest$ac_exeext
17177 if { (eval echo "$as_me:17177: \"$ac_link\"") >&5
17178   (eval $ac_link) 2>&5
17179   ac_status=$?
17180   echo "$as_me:17180: \$? = $ac_status" >&5
17181   (exit $ac_status); } &&
17182          { ac_try='test -s conftest$ac_exeext'
17183   { (eval echo "$as_me:17183: \"$ac_try\"") >&5
17184   (eval $ac_try) 2>&5
17185   ac_status=$?
17186   echo "$as_me:17186: \$? = $ac_status" >&5
17187   (exit $ac_status); }; }; then
17188   ac_cv_func_mkstemp=yes
17189 else
17190   echo "$as_me: failed program was:" >&5
17191 cat conftest.$ac_ext >&5
17192 ac_cv_func_mkstemp=no
17193 fi
17194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17195 fi
17196 echo "$as_me:17196: result: $ac_cv_func_mkstemp" >&5
17197 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17198
17199 fi
17200 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17201
17202 cat >>confdefs.h <<\EOF
17203 #define HAVE_MKSTEMP 1
17204 EOF
17205
17206 fi
17207
17208 # setup for prototype of fallback for vsscanf()
17209
17210 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17211         HAVE_VSSCANF=1
17212 else
17213         HAVE_VSSCANF=0
17214 fi
17215
17216 if test "x$cross_compiling" = xyes ; then
17217         { echo "$as_me:17217: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17218 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17219 else
17220         echo "$as_me:17220: checking whether setvbuf arguments are reversed" >&5
17221 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17222 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17223   echo $ECHO_N "(cached) $ECHO_C" >&6
17224 else
17225   if test "$cross_compiling" = yes; then
17226   { { echo "$as_me:17226: error: cannot run test program while cross compiling" >&5
17227 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17228    { (exit 1); exit 1; }; }
17229 else
17230   cat >conftest.$ac_ext <<_ACEOF
17231 #line 17231 "configure"
17232 #include "confdefs.h"
17233 #include <stdio.h>
17234 /* If setvbuf has the reversed format, exit 0. */
17235 int
17236 main ()
17237 {
17238   /* This call has the arguments reversed.
17239      A reversed system may check and see that the address of main
17240      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17241   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17242     $ac_main_return(1);
17243   putc('\r', stdout);
17244   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17245 }
17246 _ACEOF
17247 rm -f conftest$ac_exeext
17248 if { (eval echo "$as_me:17248: \"$ac_link\"") >&5
17249   (eval $ac_link) 2>&5
17250   ac_status=$?
17251   echo "$as_me:17251: \$? = $ac_status" >&5
17252   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17253   { (eval echo "$as_me:17253: \"$ac_try\"") >&5
17254   (eval $ac_try) 2>&5
17255   ac_status=$?
17256   echo "$as_me:17256: \$? = $ac_status" >&5
17257   (exit $ac_status); }; }; then
17258   ac_cv_func_setvbuf_reversed=yes
17259 else
17260   echo "$as_me: program exited with status $ac_status" >&5
17261 echo "$as_me: failed program was:" >&5
17262 cat conftest.$ac_ext >&5
17263 ac_cv_func_setvbuf_reversed=no
17264 fi
17265 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17266 fi
17267 rm -f core core.* *.core
17268 fi
17269 echo "$as_me:17269: result: $ac_cv_func_setvbuf_reversed" >&5
17270 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17271 if test $ac_cv_func_setvbuf_reversed = yes; then
17272
17273 cat >>confdefs.h <<\EOF
17274 #define SETVBUF_REVERSED 1
17275 EOF
17276
17277 fi
17278
17279 fi
17280 echo "$as_me:17280: checking for intptr_t" >&5
17281 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17282 if test "${ac_cv_type_intptr_t+set}" = set; then
17283   echo $ECHO_N "(cached) $ECHO_C" >&6
17284 else
17285   cat >conftest.$ac_ext <<_ACEOF
17286 #line 17286 "configure"
17287 #include "confdefs.h"
17288 $ac_includes_default
17289 int
17290 main ()
17291 {
17292 if ((intptr_t *) 0)
17293   return 0;
17294 if (sizeof (intptr_t))
17295   return 0;
17296   ;
17297   return 0;
17298 }
17299 _ACEOF
17300 rm -f conftest.$ac_objext
17301 if { (eval echo "$as_me:17301: \"$ac_compile\"") >&5
17302   (eval $ac_compile) 2>&5
17303   ac_status=$?
17304   echo "$as_me:17304: \$? = $ac_status" >&5
17305   (exit $ac_status); } &&
17306          { ac_try='test -s conftest.$ac_objext'
17307   { (eval echo "$as_me:17307: \"$ac_try\"") >&5
17308   (eval $ac_try) 2>&5
17309   ac_status=$?
17310   echo "$as_me:17310: \$? = $ac_status" >&5
17311   (exit $ac_status); }; }; then
17312   ac_cv_type_intptr_t=yes
17313 else
17314   echo "$as_me: failed program was:" >&5
17315 cat conftest.$ac_ext >&5
17316 ac_cv_type_intptr_t=no
17317 fi
17318 rm -f conftest.$ac_objext conftest.$ac_ext
17319 fi
17320 echo "$as_me:17320: result: $ac_cv_type_intptr_t" >&5
17321 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17322 if test $ac_cv_type_intptr_t = yes; then
17323   :
17324 else
17325
17326 cat >>confdefs.h <<EOF
17327 #define intptr_t long
17328 EOF
17329
17330 fi
17331
17332 echo "$as_me:17332: checking for ssize_t" >&5
17333 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17334 if test "${ac_cv_type_ssize_t+set}" = set; then
17335   echo $ECHO_N "(cached) $ECHO_C" >&6
17336 else
17337   cat >conftest.$ac_ext <<_ACEOF
17338 #line 17338 "configure"
17339 #include "confdefs.h"
17340 $ac_includes_default
17341 int
17342 main ()
17343 {
17344 if ((ssize_t *) 0)
17345   return 0;
17346 if (sizeof (ssize_t))
17347   return 0;
17348   ;
17349   return 0;
17350 }
17351 _ACEOF
17352 rm -f conftest.$ac_objext
17353 if { (eval echo "$as_me:17353: \"$ac_compile\"") >&5
17354   (eval $ac_compile) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); } &&
17358          { ac_try='test -s conftest.$ac_objext'
17359   { (eval echo "$as_me:17359: \"$ac_try\"") >&5
17360   (eval $ac_try) 2>&5
17361   ac_status=$?
17362   echo "$as_me:17362: \$? = $ac_status" >&5
17363   (exit $ac_status); }; }; then
17364   ac_cv_type_ssize_t=yes
17365 else
17366   echo "$as_me: failed program was:" >&5
17367 cat conftest.$ac_ext >&5
17368 ac_cv_type_ssize_t=no
17369 fi
17370 rm -f conftest.$ac_objext conftest.$ac_ext
17371 fi
17372 echo "$as_me:17372: result: $ac_cv_type_ssize_t" >&5
17373 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17374 if test $ac_cv_type_ssize_t = yes; then
17375   :
17376 else
17377
17378 cat >>confdefs.h <<EOF
17379 #define ssize_t int
17380 EOF
17381
17382 fi
17383
17384 echo "$as_me:17384: checking for type sigaction_t" >&5
17385 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17386 if test "${cf_cv_type_sigaction+set}" = set; then
17387   echo $ECHO_N "(cached) $ECHO_C" >&6
17388 else
17389
17390         cat >conftest.$ac_ext <<_ACEOF
17391 #line 17391 "configure"
17392 #include "confdefs.h"
17393
17394 #include <signal.h>
17395 int
17396 main ()
17397 {
17398 sigaction_t x
17399   ;
17400   return 0;
17401 }
17402 _ACEOF
17403 rm -f conftest.$ac_objext
17404 if { (eval echo "$as_me:17404: \"$ac_compile\"") >&5
17405   (eval $ac_compile) 2>&5
17406   ac_status=$?
17407   echo "$as_me:17407: \$? = $ac_status" >&5
17408   (exit $ac_status); } &&
17409          { ac_try='test -s conftest.$ac_objext'
17410   { (eval echo "$as_me:17410: \"$ac_try\"") >&5
17411   (eval $ac_try) 2>&5
17412   ac_status=$?
17413   echo "$as_me:17413: \$? = $ac_status" >&5
17414   (exit $ac_status); }; }; then
17415   cf_cv_type_sigaction=yes
17416 else
17417   echo "$as_me: failed program was:" >&5
17418 cat conftest.$ac_ext >&5
17419 cf_cv_type_sigaction=no
17420 fi
17421 rm -f conftest.$ac_objext conftest.$ac_ext
17422 fi
17423
17424 echo "$as_me:17424: result: $cf_cv_type_sigaction" >&5
17425 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17426 test "$cf_cv_type_sigaction" = yes &&
17427 cat >>confdefs.h <<\EOF
17428 #define HAVE_TYPE_SIGACTION 1
17429 EOF
17430
17431 echo "$as_me:17431: checking declaration of size-change" >&5
17432 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17433 if test "${cf_cv_sizechange+set}" = set; then
17434   echo $ECHO_N "(cached) $ECHO_C" >&6
17435 else
17436
17437     cf_cv_sizechange=unknown
17438     cf_save_CPPFLAGS="$CPPFLAGS"
17439
17440 for cf_opts in "" "NEED_PTEM_H"
17441 do
17442
17443     CPPFLAGS="$cf_save_CPPFLAGS"
17444     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17445     cat >conftest.$ac_ext <<_ACEOF
17446 #line 17446 "configure"
17447 #include "confdefs.h"
17448 #include <sys/types.h>
17449 #ifdef HAVE_TERMIOS_H
17450 #include <termios.h>
17451 #else
17452 #ifdef HAVE_TERMIO_H
17453 #include <termio.h>
17454 #endif
17455 #endif
17456 #ifdef NEED_PTEM_H
17457 /* This is a workaround for SCO:  they neglected to define struct winsize in
17458  * termios.h -- it's only in termio.h and ptem.h
17459  */
17460 #include        <sys/stream.h>
17461 #include        <sys/ptem.h>
17462 #endif
17463 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17464 #include <sys/ioctl.h>
17465 #endif
17466
17467 int
17468 main ()
17469 {
17470
17471 #ifdef TIOCGSIZE
17472         struct ttysize win;     /* FIXME: what system is this? */
17473         int y = win.ts_lines;
17474         int x = win.ts_cols;
17475 #else
17476 #ifdef TIOCGWINSZ
17477         struct winsize win;
17478         int y = win.ws_row;
17479         int x = win.ws_col;
17480 #else
17481         no TIOCGSIZE or TIOCGWINSZ
17482 #endif /* TIOCGWINSZ */
17483 #endif /* TIOCGSIZE */
17484
17485   ;
17486   return 0;
17487 }
17488 _ACEOF
17489 rm -f conftest.$ac_objext
17490 if { (eval echo "$as_me:17490: \"$ac_compile\"") >&5
17491   (eval $ac_compile) 2>&5
17492   ac_status=$?
17493   echo "$as_me:17493: \$? = $ac_status" >&5
17494   (exit $ac_status); } &&
17495          { ac_try='test -s conftest.$ac_objext'
17496   { (eval echo "$as_me:17496: \"$ac_try\"") >&5
17497   (eval $ac_try) 2>&5
17498   ac_status=$?
17499   echo "$as_me:17499: \$? = $ac_status" >&5
17500   (exit $ac_status); }; }; then
17501   cf_cv_sizechange=yes
17502 else
17503   echo "$as_me: failed program was:" >&5
17504 cat conftest.$ac_ext >&5
17505 cf_cv_sizechange=no
17506 fi
17507 rm -f conftest.$ac_objext conftest.$ac_ext
17508
17509         CPPFLAGS="$cf_save_CPPFLAGS"
17510         if test "$cf_cv_sizechange" = yes ; then
17511                 echo "size-change succeeded ($cf_opts)" >&5
17512                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17513                 break
17514         fi
17515 done
17516
17517 fi
17518 echo "$as_me:17518: result: $cf_cv_sizechange" >&5
17519 echo "${ECHO_T}$cf_cv_sizechange" >&6
17520 if test "$cf_cv_sizechange" != no ; then
17521
17522 cat >>confdefs.h <<\EOF
17523 #define HAVE_SIZECHANGE 1
17524 EOF
17525
17526         case $cf_cv_sizechange in #(vi
17527         NEED*)
17528                 cat >>confdefs.h <<EOF
17529 #define $cf_cv_sizechange  1
17530 EOF
17531
17532                 ;;
17533         esac
17534 fi
17535
17536 echo "$as_me:17536: checking for memmove" >&5
17537 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17538 if test "${ac_cv_func_memmove+set}" = set; then
17539   echo $ECHO_N "(cached) $ECHO_C" >&6
17540 else
17541   cat >conftest.$ac_ext <<_ACEOF
17542 #line 17542 "configure"
17543 #include "confdefs.h"
17544 /* System header to define __stub macros and hopefully few prototypes,
17545     which can conflict with char memmove (); below.  */
17546 #include <assert.h>
17547 /* Override any gcc2 internal prototype to avoid an error.  */
17548 #ifdef __cplusplus
17549 extern "C"
17550 #endif
17551 /* We use char because int might match the return type of a gcc2
17552    builtin and then its argument prototype would still apply.  */
17553 char memmove ();
17554 char (*f) ();
17555
17556 int
17557 main ()
17558 {
17559 /* The GNU C library defines this for functions which it implements
17560     to always fail with ENOSYS.  Some functions are actually named
17561     something starting with __ and the normal name is an alias.  */
17562 #if defined (__stub_memmove) || defined (__stub___memmove)
17563 choke me
17564 #else
17565 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17566 #endif
17567
17568   ;
17569   return 0;
17570 }
17571 _ACEOF
17572 rm -f conftest.$ac_objext conftest$ac_exeext
17573 if { (eval echo "$as_me:17573: \"$ac_link\"") >&5
17574   (eval $ac_link) 2>&5
17575   ac_status=$?
17576   echo "$as_me:17576: \$? = $ac_status" >&5
17577   (exit $ac_status); } &&
17578          { ac_try='test -s conftest$ac_exeext'
17579   { (eval echo "$as_me:17579: \"$ac_try\"") >&5
17580   (eval $ac_try) 2>&5
17581   ac_status=$?
17582   echo "$as_me:17582: \$? = $ac_status" >&5
17583   (exit $ac_status); }; }; then
17584   ac_cv_func_memmove=yes
17585 else
17586   echo "$as_me: failed program was:" >&5
17587 cat conftest.$ac_ext >&5
17588 ac_cv_func_memmove=no
17589 fi
17590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17591 fi
17592 echo "$as_me:17592: result: $ac_cv_func_memmove" >&5
17593 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17594 if test $ac_cv_func_memmove = yes; then
17595   :
17596 else
17597
17598 echo "$as_me:17598: checking for bcopy" >&5
17599 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17600 if test "${ac_cv_func_bcopy+set}" = set; then
17601   echo $ECHO_N "(cached) $ECHO_C" >&6
17602 else
17603   cat >conftest.$ac_ext <<_ACEOF
17604 #line 17604 "configure"
17605 #include "confdefs.h"
17606 /* System header to define __stub macros and hopefully few prototypes,
17607     which can conflict with char bcopy (); below.  */
17608 #include <assert.h>
17609 /* Override any gcc2 internal prototype to avoid an error.  */
17610 #ifdef __cplusplus
17611 extern "C"
17612 #endif
17613 /* We use char because int might match the return type of a gcc2
17614    builtin and then its argument prototype would still apply.  */
17615 char bcopy ();
17616 char (*f) ();
17617
17618 int
17619 main ()
17620 {
17621 /* The GNU C library defines this for functions which it implements
17622     to always fail with ENOSYS.  Some functions are actually named
17623     something starting with __ and the normal name is an alias.  */
17624 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17625 choke me
17626 #else
17627 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17628 #endif
17629
17630   ;
17631   return 0;
17632 }
17633 _ACEOF
17634 rm -f conftest.$ac_objext conftest$ac_exeext
17635 if { (eval echo "$as_me:17635: \"$ac_link\"") >&5
17636   (eval $ac_link) 2>&5
17637   ac_status=$?
17638   echo "$as_me:17638: \$? = $ac_status" >&5
17639   (exit $ac_status); } &&
17640          { ac_try='test -s conftest$ac_exeext'
17641   { (eval echo "$as_me:17641: \"$ac_try\"") >&5
17642   (eval $ac_try) 2>&5
17643   ac_status=$?
17644   echo "$as_me:17644: \$? = $ac_status" >&5
17645   (exit $ac_status); }; }; then
17646   ac_cv_func_bcopy=yes
17647 else
17648   echo "$as_me: failed program was:" >&5
17649 cat conftest.$ac_ext >&5
17650 ac_cv_func_bcopy=no
17651 fi
17652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17653 fi
17654 echo "$as_me:17654: result: $ac_cv_func_bcopy" >&5
17655 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17656 if test $ac_cv_func_bcopy = yes; then
17657
17658         echo "$as_me:17658: checking if bcopy does overlapping moves" >&5
17659 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17660 if test "${cf_cv_good_bcopy+set}" = set; then
17661   echo $ECHO_N "(cached) $ECHO_C" >&6
17662 else
17663
17664                 if test "$cross_compiling" = yes; then
17665   cf_cv_good_bcopy=unknown
17666 else
17667   cat >conftest.$ac_ext <<_ACEOF
17668 #line 17668 "configure"
17669 #include "confdefs.h"
17670
17671 int main() {
17672         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17673         char temp[40];
17674         bcopy(data, temp, sizeof(data));
17675         bcopy(temp+10, temp, 15);
17676         bcopy(temp+5, temp+15, 10);
17677         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17678 }
17679
17680 _ACEOF
17681 rm -f conftest$ac_exeext
17682 if { (eval echo "$as_me:17682: \"$ac_link\"") >&5
17683   (eval $ac_link) 2>&5
17684   ac_status=$?
17685   echo "$as_me:17685: \$? = $ac_status" >&5
17686   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17687   { (eval echo "$as_me:17687: \"$ac_try\"") >&5
17688   (eval $ac_try) 2>&5
17689   ac_status=$?
17690   echo "$as_me:17690: \$? = $ac_status" >&5
17691   (exit $ac_status); }; }; then
17692   cf_cv_good_bcopy=yes
17693 else
17694   echo "$as_me: program exited with status $ac_status" >&5
17695 echo "$as_me: failed program was:" >&5
17696 cat conftest.$ac_ext >&5
17697 cf_cv_good_bcopy=no
17698 fi
17699 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17700 fi
17701
17702 fi
17703 echo "$as_me:17703: result: $cf_cv_good_bcopy" >&5
17704 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17705
17706 else
17707   cf_cv_good_bcopy=no
17708 fi
17709
17710         if test "$cf_cv_good_bcopy" = yes ; then
17711
17712 cat >>confdefs.h <<\EOF
17713 #define USE_OK_BCOPY 1
17714 EOF
17715
17716         else
17717
17718 cat >>confdefs.h <<\EOF
17719 #define USE_MY_MEMMOVE 1
17720 EOF
17721
17722         fi
17723
17724 fi
17725
17726 echo "$as_me:17726: checking if poll really works" >&5
17727 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17728 if test "${cf_cv_working_poll+set}" = set; then
17729   echo $ECHO_N "(cached) $ECHO_C" >&6
17730 else
17731
17732 if test "$cross_compiling" = yes; then
17733   cf_cv_working_poll=unknown
17734 else
17735   cat >conftest.$ac_ext <<_ACEOF
17736 #line 17736 "configure"
17737 #include "confdefs.h"
17738
17739 #include <stdlib.h>
17740 #include <stdio.h>
17741 #include <unistd.h>
17742 #include <fcntl.h>
17743 #ifdef HAVE_POLL_H
17744 #include <poll.h>
17745 #else
17746 #include <sys/poll.h>
17747 #endif
17748 int main() {
17749         struct pollfd myfds;
17750         int ret;
17751
17752         /* check for Darwin bug with respect to "devices" */
17753         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17754         if (myfds.fd < 0)
17755                 myfds.fd = 0;
17756         myfds.events = POLLIN;
17757         myfds.revents = 0;
17758
17759         ret = poll(&myfds, 1, 100);
17760
17761         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17762                 ret = -1;
17763         } else {
17764                 int fd = 0;
17765                 if (!isatty(fd)) {
17766                         fd = open("/dev/tty", 2);       /* O_RDWR */
17767                 }
17768
17769                 if (fd >= 0) {
17770                         /* also check with standard input */
17771                         myfds.fd = fd;
17772                         myfds.events = POLLIN;
17773                         myfds.revents = 0;
17774                         ret = poll(&myfds, 1, 100);
17775                 } else {
17776                         ret = -1;
17777                 }
17778         }
17779         ${cf_cv_main_return:-return}(ret < 0);
17780 }
17781 _ACEOF
17782 rm -f conftest$ac_exeext
17783 if { (eval echo "$as_me:17783: \"$ac_link\"") >&5
17784   (eval $ac_link) 2>&5
17785   ac_status=$?
17786   echo "$as_me:17786: \$? = $ac_status" >&5
17787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17788   { (eval echo "$as_me:17788: \"$ac_try\"") >&5
17789   (eval $ac_try) 2>&5
17790   ac_status=$?
17791   echo "$as_me:17791: \$? = $ac_status" >&5
17792   (exit $ac_status); }; }; then
17793   cf_cv_working_poll=yes
17794 else
17795   echo "$as_me: program exited with status $ac_status" >&5
17796 echo "$as_me: failed program was:" >&5
17797 cat conftest.$ac_ext >&5
17798 cf_cv_working_poll=no
17799 fi
17800 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17801 fi
17802 fi
17803 echo "$as_me:17803: result: $cf_cv_working_poll" >&5
17804 echo "${ECHO_T}$cf_cv_working_poll" >&6
17805 test "$cf_cv_working_poll" = "yes" &&
17806 cat >>confdefs.h <<\EOF
17807 #define HAVE_WORKING_POLL 1
17808 EOF
17809
17810 echo "$as_me:17810: checking for va_copy" >&5
17811 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17812 if test "${cf_cv_have_va_copy+set}" = set; then
17813   echo $ECHO_N "(cached) $ECHO_C" >&6
17814 else
17815
17816 cat >conftest.$ac_ext <<_ACEOF
17817 #line 17817 "configure"
17818 #include "confdefs.h"
17819
17820 #include <stdarg.h>
17821
17822 int
17823 main ()
17824 {
17825
17826         static va_list dst;
17827         static va_list src;
17828         va_copy(dst, src)
17829   ;
17830   return 0;
17831 }
17832 _ACEOF
17833 rm -f conftest.$ac_objext conftest$ac_exeext
17834 if { (eval echo "$as_me:17834: \"$ac_link\"") >&5
17835   (eval $ac_link) 2>&5
17836   ac_status=$?
17837   echo "$as_me:17837: \$? = $ac_status" >&5
17838   (exit $ac_status); } &&
17839          { ac_try='test -s conftest$ac_exeext'
17840   { (eval echo "$as_me:17840: \"$ac_try\"") >&5
17841   (eval $ac_try) 2>&5
17842   ac_status=$?
17843   echo "$as_me:17843: \$? = $ac_status" >&5
17844   (exit $ac_status); }; }; then
17845   cf_cv_have_va_copy=yes
17846 else
17847   echo "$as_me: failed program was:" >&5
17848 cat conftest.$ac_ext >&5
17849 cf_cv_have_va_copy=no
17850 fi
17851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17852 fi
17853 echo "$as_me:17853: result: $cf_cv_have_va_copy" >&5
17854 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17855
17856 test "$cf_cv_have_va_copy" = yes &&
17857 cat >>confdefs.h <<\EOF
17858 #define HAVE_VA_COPY 1
17859 EOF
17860
17861 echo "$as_me:17861: checking for __va_copy" >&5
17862 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17863 if test "${cf_cv_have___va_copy+set}" = set; then
17864   echo $ECHO_N "(cached) $ECHO_C" >&6
17865 else
17866
17867 cat >conftest.$ac_ext <<_ACEOF
17868 #line 17868 "configure"
17869 #include "confdefs.h"
17870
17871 #include <stdarg.h>
17872
17873 int
17874 main ()
17875 {
17876
17877         static va_list dst;
17878         static va_list src;
17879         __va_copy(dst, src)
17880   ;
17881   return 0;
17882 }
17883 _ACEOF
17884 rm -f conftest.$ac_objext conftest$ac_exeext
17885 if { (eval echo "$as_me:17885: \"$ac_link\"") >&5
17886   (eval $ac_link) 2>&5
17887   ac_status=$?
17888   echo "$as_me:17888: \$? = $ac_status" >&5
17889   (exit $ac_status); } &&
17890          { ac_try='test -s conftest$ac_exeext'
17891   { (eval echo "$as_me:17891: \"$ac_try\"") >&5
17892   (eval $ac_try) 2>&5
17893   ac_status=$?
17894   echo "$as_me:17894: \$? = $ac_status" >&5
17895   (exit $ac_status); }; }; then
17896   cf_cv_have___va_copy=yes
17897 else
17898   echo "$as_me: failed program was:" >&5
17899 cat conftest.$ac_ext >&5
17900 cf_cv_have___va_copy=no
17901 fi
17902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17903 fi
17904 echo "$as_me:17904: result: $cf_cv_have___va_copy" >&5
17905 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17906
17907 test "$cf_cv_have___va_copy" = yes &&
17908 cat >>confdefs.h <<\EOF
17909 #define HAVE___VA_COPY 1
17910 EOF
17911
17912 echo "$as_me:17912: checking for pid_t" >&5
17913 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17914 if test "${ac_cv_type_pid_t+set}" = set; then
17915   echo $ECHO_N "(cached) $ECHO_C" >&6
17916 else
17917   cat >conftest.$ac_ext <<_ACEOF
17918 #line 17918 "configure"
17919 #include "confdefs.h"
17920 $ac_includes_default
17921 int
17922 main ()
17923 {
17924 if ((pid_t *) 0)
17925   return 0;
17926 if (sizeof (pid_t))
17927   return 0;
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   ac_cv_type_pid_t=yes
17945 else
17946   echo "$as_me: failed program was:" >&5
17947 cat conftest.$ac_ext >&5
17948 ac_cv_type_pid_t=no
17949 fi
17950 rm -f conftest.$ac_objext conftest.$ac_ext
17951 fi
17952 echo "$as_me:17952: result: $ac_cv_type_pid_t" >&5
17953 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17954 if test $ac_cv_type_pid_t = yes; then
17955   :
17956 else
17957
17958 cat >>confdefs.h <<EOF
17959 #define pid_t int
17960 EOF
17961
17962 fi
17963
17964 for ac_header in unistd.h vfork.h
17965 do
17966 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17967 echo "$as_me:17967: checking for $ac_header" >&5
17968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17970   echo $ECHO_N "(cached) $ECHO_C" >&6
17971 else
17972   cat >conftest.$ac_ext <<_ACEOF
17973 #line 17973 "configure"
17974 #include "confdefs.h"
17975 #include <$ac_header>
17976 _ACEOF
17977 if { (eval echo "$as_me:17977: \"$ac_cpp conftest.$ac_ext\"") >&5
17978   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17979   ac_status=$?
17980   egrep -v '^ *\+' conftest.er1 >conftest.err
17981   rm -f conftest.er1
17982   cat conftest.err >&5
17983   echo "$as_me:17983: \$? = $ac_status" >&5
17984   (exit $ac_status); } >/dev/null; then
17985   if test -s conftest.err; then
17986     ac_cpp_err=$ac_c_preproc_warn_flag
17987   else
17988     ac_cpp_err=
17989   fi
17990 else
17991   ac_cpp_err=yes
17992 fi
17993 if test -z "$ac_cpp_err"; then
17994   eval "$as_ac_Header=yes"
17995 else
17996   echo "$as_me: failed program was:" >&5
17997   cat conftest.$ac_ext >&5
17998   eval "$as_ac_Header=no"
17999 fi
18000 rm -f conftest.err conftest.$ac_ext
18001 fi
18002 echo "$as_me:18002: result: `eval echo '${'$as_ac_Header'}'`" >&5
18003 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18004 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18005   cat >>confdefs.h <<EOF
18006 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18007 EOF
18008
18009 fi
18010 done
18011
18012 for ac_func in fork vfork
18013 do
18014 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18015 echo "$as_me:18015: checking for $ac_func" >&5
18016 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18017 if eval "test \"\${$as_ac_var+set}\" = set"; then
18018   echo $ECHO_N "(cached) $ECHO_C" >&6
18019 else
18020   cat >conftest.$ac_ext <<_ACEOF
18021 #line 18021 "configure"
18022 #include "confdefs.h"
18023 /* System header to define __stub macros and hopefully few prototypes,
18024     which can conflict with char $ac_func (); below.  */
18025 #include <assert.h>
18026 /* Override any gcc2 internal prototype to avoid an error.  */
18027 #ifdef __cplusplus
18028 extern "C"
18029 #endif
18030 /* We use char because int might match the return type of a gcc2
18031    builtin and then its argument prototype would still apply.  */
18032 char $ac_func ();
18033 char (*f) ();
18034
18035 int
18036 main ()
18037 {
18038 /* The GNU C library defines this for functions which it implements
18039     to always fail with ENOSYS.  Some functions are actually named
18040     something starting with __ and the normal name is an alias.  */
18041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18042 choke me
18043 #else
18044 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18045 #endif
18046
18047   ;
18048   return 0;
18049 }
18050 _ACEOF
18051 rm -f conftest.$ac_objext conftest$ac_exeext
18052 if { (eval echo "$as_me:18052: \"$ac_link\"") >&5
18053   (eval $ac_link) 2>&5
18054   ac_status=$?
18055   echo "$as_me:18055: \$? = $ac_status" >&5
18056   (exit $ac_status); } &&
18057          { ac_try='test -s conftest$ac_exeext'
18058   { (eval echo "$as_me:18058: \"$ac_try\"") >&5
18059   (eval $ac_try) 2>&5
18060   ac_status=$?
18061   echo "$as_me:18061: \$? = $ac_status" >&5
18062   (exit $ac_status); }; }; then
18063   eval "$as_ac_var=yes"
18064 else
18065   echo "$as_me: failed program was:" >&5
18066 cat conftest.$ac_ext >&5
18067 eval "$as_ac_var=no"
18068 fi
18069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18070 fi
18071 echo "$as_me:18071: result: `eval echo '${'$as_ac_var'}'`" >&5
18072 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18073 if test `eval echo '${'$as_ac_var'}'` = yes; then
18074   cat >>confdefs.h <<EOF
18075 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18076 EOF
18077
18078 fi
18079 done
18080
18081 ac_cv_func_fork_works=$ac_cv_func_fork
18082 if test "x$ac_cv_func_fork" = xyes; then
18083   echo "$as_me:18083: checking for working fork" >&5
18084 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18085 if test "${ac_cv_func_fork_works+set}" = set; then
18086   echo $ECHO_N "(cached) $ECHO_C" >&6
18087 else
18088   if test "$cross_compiling" = yes; then
18089   ac_cv_func_fork_works=cross
18090 else
18091   cat >conftest.$ac_ext <<_ACEOF
18092 /* By Rüdiger Kuhlmann. */
18093       #include <sys/types.h>
18094       #if HAVE_UNISTD_H
18095       # include <unistd.h>
18096       #endif
18097       /* Some systems only have a dummy stub for fork() */
18098       int main ()
18099       {
18100         if (fork() < 0)
18101           $ac_main_return (1);
18102         $ac_main_return (0);
18103       }
18104 _ACEOF
18105 rm -f conftest$ac_exeext
18106 if { (eval echo "$as_me:18106: \"$ac_link\"") >&5
18107   (eval $ac_link) 2>&5
18108   ac_status=$?
18109   echo "$as_me:18109: \$? = $ac_status" >&5
18110   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18111   { (eval echo "$as_me:18111: \"$ac_try\"") >&5
18112   (eval $ac_try) 2>&5
18113   ac_status=$?
18114   echo "$as_me:18114: \$? = $ac_status" >&5
18115   (exit $ac_status); }; }; then
18116   ac_cv_func_fork_works=yes
18117 else
18118   echo "$as_me: program exited with status $ac_status" >&5
18119 echo "$as_me: failed program was:" >&5
18120 cat conftest.$ac_ext >&5
18121 ac_cv_func_fork_works=no
18122 fi
18123 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18124 fi
18125 fi
18126 echo "$as_me:18126: result: $ac_cv_func_fork_works" >&5
18127 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18128
18129 fi
18130 if test "x$ac_cv_func_fork_works" = xcross; then
18131   case $host in
18132     *-*-amigaos* | *-*-msdosdjgpp*)
18133       # Override, as these systems have only a dummy fork() stub
18134       ac_cv_func_fork_works=no
18135       ;;
18136     *)
18137       ac_cv_func_fork_works=yes
18138       ;;
18139   esac
18140   { echo "$as_me:18140: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18141 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18142 fi
18143 ac_cv_func_vfork_works=$ac_cv_func_vfork
18144 if test "x$ac_cv_func_vfork" = xyes; then
18145   echo "$as_me:18145: checking for working vfork" >&5
18146 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18147 if test "${ac_cv_func_vfork_works+set}" = set; then
18148   echo $ECHO_N "(cached) $ECHO_C" >&6
18149 else
18150   if test "$cross_compiling" = yes; then
18151   ac_cv_func_vfork_works=cross
18152 else
18153   cat >conftest.$ac_ext <<_ACEOF
18154 #line 18154 "configure"
18155 #include "confdefs.h"
18156 /* Thanks to Paul Eggert for this test.  */
18157 #include <stdio.h>
18158 #include <sys/types.h>
18159 #include <sys/stat.h>
18160 #if HAVE_UNISTD_H
18161 # include <unistd.h>
18162 #endif
18163 #if HAVE_VFORK_H
18164 # include <vfork.h>
18165 #endif
18166 /* On some sparc systems, changes by the child to local and incoming
18167    argument registers are propagated back to the parent.  The compiler
18168    is told about this with #include <vfork.h>, but some compilers
18169    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18170    static variable whose address is put into a register that is
18171    clobbered by the vfork.  */
18172 static
18173 #ifdef __cplusplus
18174 sparc_address_test (int arg)
18175 # else
18176 sparc_address_test (arg) int arg;
18177 #endif
18178 {
18179   static pid_t child;
18180   if (!child) {
18181     child = vfork ();
18182     if (child < 0) {
18183       perror ("vfork");
18184       _exit(2);
18185     }
18186     if (!child) {
18187       arg = getpid();
18188       write(-1, "", 0);
18189       _exit (arg);
18190     }
18191   }
18192 }
18193
18194 int
18195 main ()
18196 {
18197   pid_t parent = getpid ();
18198   pid_t child;
18199
18200   sparc_address_test ();
18201
18202   child = vfork ();
18203
18204   if (child == 0) {
18205     /* Here is another test for sparc vfork register problems.  This
18206        test uses lots of local variables, at least as many local
18207        variables as main has allocated so far including compiler
18208        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18209        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18210        reuse the register of parent for one of the local variables,
18211        since it will think that parent can't possibly be used any more
18212        in this routine.  Assigning to the local variable will thus
18213        munge parent in the parent process.  */
18214     pid_t
18215       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18216       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18217     /* Convince the compiler that p..p7 are live; otherwise, it might
18218        use the same hardware register for all 8 local variables.  */
18219     if (p != p1 || p != p2 || p != p3 || p != p4
18220         || p != p5 || p != p6 || p != p7)
18221       _exit(1);
18222
18223     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18224        from child file descriptors.  If the child closes a descriptor
18225        before it execs or exits, this munges the parent's descriptor
18226        as well.  Test for this by closing stdout in the child.  */
18227     _exit(close(fileno(stdout)) != 0);
18228   } else {
18229     int status;
18230     struct stat st;
18231
18232     while (wait(&status) != child)
18233       ;
18234     $ac_main_return(
18235          /* Was there some problem with vforking?  */
18236          child < 0
18237
18238          /* Did the child fail?  (This shouldn't happen.)  */
18239          || status
18240
18241          /* Did the vfork/compiler bug occur?  */
18242          || parent != getpid()
18243
18244          /* Did the file descriptor bug occur?  */
18245          || fstat(fileno(stdout), &st) != 0
18246          );
18247   }
18248 }
18249 _ACEOF
18250 rm -f conftest$ac_exeext
18251 if { (eval echo "$as_me:18251: \"$ac_link\"") >&5
18252   (eval $ac_link) 2>&5
18253   ac_status=$?
18254   echo "$as_me:18254: \$? = $ac_status" >&5
18255   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18256   { (eval echo "$as_me:18256: \"$ac_try\"") >&5
18257   (eval $ac_try) 2>&5
18258   ac_status=$?
18259   echo "$as_me:18259: \$? = $ac_status" >&5
18260   (exit $ac_status); }; }; then
18261   ac_cv_func_vfork_works=yes
18262 else
18263   echo "$as_me: program exited with status $ac_status" >&5
18264 echo "$as_me: failed program was:" >&5
18265 cat conftest.$ac_ext >&5
18266 ac_cv_func_vfork_works=no
18267 fi
18268 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18269 fi
18270 fi
18271 echo "$as_me:18271: result: $ac_cv_func_vfork_works" >&5
18272 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18273
18274 fi;
18275 if test "x$ac_cv_func_fork_works" = xcross; then
18276   ac_cv_func_vfork_works=ac_cv_func_vfork
18277   { echo "$as_me:18277: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18278 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18279 fi
18280
18281 if test "x$ac_cv_func_vfork_works" = xyes; then
18282
18283 cat >>confdefs.h <<\EOF
18284 #define HAVE_WORKING_VFORK 1
18285 EOF
18286
18287 else
18288
18289 cat >>confdefs.h <<\EOF
18290 #define vfork fork
18291 EOF
18292
18293 fi
18294 if test "x$ac_cv_func_fork_works" = xyes; then
18295
18296 cat >>confdefs.h <<\EOF
18297 #define HAVE_WORKING_FORK 1
18298 EOF
18299
18300 fi
18301
18302 # special check for test/ditto.c
18303
18304 echo "$as_me:18304: checking for openpty in -lutil" >&5
18305 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18306 if test "${ac_cv_lib_util_openpty+set}" = set; then
18307   echo $ECHO_N "(cached) $ECHO_C" >&6
18308 else
18309   ac_check_lib_save_LIBS=$LIBS
18310 LIBS="-lutil  $LIBS"
18311 cat >conftest.$ac_ext <<_ACEOF
18312 #line 18312 "configure"
18313 #include "confdefs.h"
18314
18315 /* Override any gcc2 internal prototype to avoid an error.  */
18316 #ifdef __cplusplus
18317 extern "C"
18318 #endif
18319 /* We use char because int might match the return type of a gcc2
18320    builtin and then its argument prototype would still apply.  */
18321 char openpty ();
18322 int
18323 main ()
18324 {
18325 openpty ();
18326   ;
18327   return 0;
18328 }
18329 _ACEOF
18330 rm -f conftest.$ac_objext conftest$ac_exeext
18331 if { (eval echo "$as_me:18331: \"$ac_link\"") >&5
18332   (eval $ac_link) 2>&5
18333   ac_status=$?
18334   echo "$as_me:18334: \$? = $ac_status" >&5
18335   (exit $ac_status); } &&
18336          { ac_try='test -s conftest$ac_exeext'
18337   { (eval echo "$as_me:18337: \"$ac_try\"") >&5
18338   (eval $ac_try) 2>&5
18339   ac_status=$?
18340   echo "$as_me:18340: \$? = $ac_status" >&5
18341   (exit $ac_status); }; }; then
18342   ac_cv_lib_util_openpty=yes
18343 else
18344   echo "$as_me: failed program was:" >&5
18345 cat conftest.$ac_ext >&5
18346 ac_cv_lib_util_openpty=no
18347 fi
18348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18349 LIBS=$ac_check_lib_save_LIBS
18350 fi
18351 echo "$as_me:18351: result: $ac_cv_lib_util_openpty" >&5
18352 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18353 if test $ac_cv_lib_util_openpty = yes; then
18354   cf_cv_lib_util=yes
18355 else
18356   cf_cv_lib_util=no
18357 fi
18358
18359 echo "$as_me:18359: checking for openpty header" >&5
18360 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18361 if test "${cf_cv_func_openpty+set}" = set; then
18362   echo $ECHO_N "(cached) $ECHO_C" >&6
18363 else
18364
18365     cf_save_LIBS="$LIBS"
18366     test $cf_cv_lib_util = yes &&
18367 cf_add_libs="-lutil"
18368 # Filter out duplicates - this happens with badly-designed ".pc" files...
18369 for cf_add_1lib in $LIBS
18370 do
18371         for cf_add_2lib in $cf_add_libs
18372         do
18373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18374                 then
18375                         cf_add_1lib=
18376                         break
18377                 fi
18378         done
18379         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18380 done
18381 LIBS="$cf_add_libs"
18382
18383     for cf_header in pty.h libutil.h util.h
18384     do
18385     cat >conftest.$ac_ext <<_ACEOF
18386 #line 18386 "configure"
18387 #include "confdefs.h"
18388
18389 #include <$cf_header>
18390
18391 int
18392 main ()
18393 {
18394
18395     int x = openpty((int *)0, (int *)0, (char *)0,
18396                    (struct termios *)0, (struct winsize *)0);
18397
18398   ;
18399   return 0;
18400 }
18401 _ACEOF
18402 rm -f conftest.$ac_objext conftest$ac_exeext
18403 if { (eval echo "$as_me:18403: \"$ac_link\"") >&5
18404   (eval $ac_link) 2>&5
18405   ac_status=$?
18406   echo "$as_me:18406: \$? = $ac_status" >&5
18407   (exit $ac_status); } &&
18408          { ac_try='test -s conftest$ac_exeext'
18409   { (eval echo "$as_me:18409: \"$ac_try\"") >&5
18410   (eval $ac_try) 2>&5
18411   ac_status=$?
18412   echo "$as_me:18412: \$? = $ac_status" >&5
18413   (exit $ac_status); }; }; then
18414
18415         cf_cv_func_openpty=$cf_header
18416         break
18417
18418 else
18419   echo "$as_me: failed program was:" >&5
18420 cat conftest.$ac_ext >&5
18421
18422         cf_cv_func_openpty=no
18423
18424 fi
18425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18426     done
18427     LIBS="$cf_save_LIBS"
18428
18429 fi
18430 echo "$as_me:18430: result: $cf_cv_func_openpty" >&5
18431 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18432
18433 if test "$cf_cv_func_openpty" != no ; then
18434
18435 cat >>confdefs.h <<EOF
18436 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18437 EOF
18438
18439 cat >>confdefs.h <<\EOF
18440 #define USE_XTERM_PTY 1
18441 EOF
18442
18443     if test "x$cf_cv_lib_util" = xyes ; then
18444
18445 cf_add_libs="-lutil"
18446 # Filter out duplicates - this happens with badly-designed ".pc" files...
18447 for cf_add_1lib in $TEST_LIBS
18448 do
18449         for cf_add_2lib in $cf_add_libs
18450         do
18451                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18452                 then
18453                         cf_add_1lib=
18454                         break
18455                 fi
18456         done
18457         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18458 done
18459 TEST_LIBS="$cf_add_libs"
18460
18461     fi
18462 fi
18463
18464 if test "$with_hashed_db" != no ; then
18465
18466 cat >>confdefs.h <<\EOF
18467 #define USE_HASHED_DB 1
18468 EOF
18469
18470 case $with_hashed_db in #(vi
18471 yes|*able*) #(vi
18472     ;;
18473 *)
18474     if test -d "$with_hashed_db" ; then
18475
18476 if test -n "$with_hashed_db/include" ; then
18477   for cf_add_incdir in $with_hashed_db/include
18478   do
18479         while test $cf_add_incdir != /usr/include
18480         do
18481           if test -d $cf_add_incdir
18482           then
18483                 cf_have_incdir=no
18484                 if test -n "$CFLAGS$CPPFLAGS" ; then
18485                   # a loop is needed to ensure we can add subdirs of existing dirs
18486                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18487                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18488                           cf_have_incdir=yes; break
18489                         fi
18490                   done
18491                 fi
18492
18493                 if test "$cf_have_incdir" = no ; then
18494                   if test "$cf_add_incdir" = /usr/local/include ; then
18495                         if test "$GCC" = yes
18496                         then
18497                           cf_save_CPPFLAGS=$CPPFLAGS
18498                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18499                           cat >conftest.$ac_ext <<_ACEOF
18500 #line 18500 "configure"
18501 #include "confdefs.h"
18502 #include <stdio.h>
18503 int
18504 main ()
18505 {
18506 printf("Hello")
18507   ;
18508   return 0;
18509 }
18510 _ACEOF
18511 rm -f conftest.$ac_objext
18512 if { (eval echo "$as_me:18512: \"$ac_compile\"") >&5
18513   (eval $ac_compile) 2>&5
18514   ac_status=$?
18515   echo "$as_me:18515: \$? = $ac_status" >&5
18516   (exit $ac_status); } &&
18517          { ac_try='test -s conftest.$ac_objext'
18518   { (eval echo "$as_me:18518: \"$ac_try\"") >&5
18519   (eval $ac_try) 2>&5
18520   ac_status=$?
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit $ac_status); }; }; then
18523   :
18524 else
18525   echo "$as_me: failed program was:" >&5
18526 cat conftest.$ac_ext >&5
18527 cf_have_incdir=yes
18528 fi
18529 rm -f conftest.$ac_objext conftest.$ac_ext
18530                           CPPFLAGS=$cf_save_CPPFLAGS
18531                         fi
18532                   fi
18533                 fi
18534
18535                 if test "$cf_have_incdir" = no ; then
18536                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18537
18538 echo "${as_me:-configure}:18538: testing adding $cf_add_incdir to include-path ..." 1>&5
18539
18540                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18541
18542                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18543                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18544                   cf_add_incdir="$cf_top_incdir"
18545                 else
18546                   break
18547                 fi
18548           fi
18549         done
18550   done
18551 fi
18552
18553 if test -n "$with_hashed_db/lib" ; then
18554   for cf_add_libdir in $with_hashed_db/lib
18555   do
18556     if test $cf_add_libdir = /usr/lib ; then
18557       :
18558     elif test -d $cf_add_libdir
18559     then
18560       cf_have_libdir=no
18561       if test -n "$LDFLAGS$LIBS" ; then
18562         # a loop is needed to ensure we can add subdirs of existing dirs
18563         for cf_test_libdir in $LDFLAGS $LIBS ; do
18564           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18565             cf_have_libdir=yes; break
18566           fi
18567         done
18568       fi
18569       if test "$cf_have_libdir" = no ; then
18570         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18571
18572 echo "${as_me:-configure}:18572: testing adding $cf_add_libdir to library-path ..." 1>&5
18573
18574         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18575       fi
18576     fi
18577   done
18578 fi
18579
18580         else
18581                 case "$with_hashed_db" in #(vi
18582                 ./*|../*|/*)
18583                         { echo "$as_me:18583: WARNING: no such directory $with_hashed_db" >&5
18584 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18585                         ;; #(vi
18586                 *)
18587
18588 cf_search=
18589
18590 test "x$prefix" != "xNONE" && \
18591 test -d "$prefix" && \
18592  {
18593         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18594         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18595         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18596         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18597         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18598         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18599 }
18600
18601 for cf_subdir_prefix in \
18602         /usr \
18603         /usr/local \
18604         /usr/pkg \
18605         /opt \
18606         /opt/local \
18607         $HOME
18608 do
18609
18610 test "x$cf_subdir_prefix" != "x$prefix" && \
18611 test -d "$cf_subdir_prefix" && \
18612 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18613         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18614         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18615         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18616         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18617         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18618         test -d $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
18619 }
18620
18621 done
18622
18623         for cf_item in $cf_search
18624         do
18625                 case $cf_item in #(vi
18626                 */$with_hashed_db)
18627
18628 if test -n "$cf_item" ; then
18629   for cf_add_incdir in $cf_item
18630   do
18631         while test $cf_add_incdir != /usr/include
18632         do
18633           if test -d $cf_add_incdir
18634           then
18635                 cf_have_incdir=no
18636                 if test -n "$CFLAGS$CPPFLAGS" ; then
18637                   # a loop is needed to ensure we can add subdirs of existing dirs
18638                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18639                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18640                           cf_have_incdir=yes; break
18641                         fi
18642                   done
18643                 fi
18644
18645                 if test "$cf_have_incdir" = no ; then
18646                   if test "$cf_add_incdir" = /usr/local/include ; then
18647                         if test "$GCC" = yes
18648                         then
18649                           cf_save_CPPFLAGS=$CPPFLAGS
18650                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18651                           cat >conftest.$ac_ext <<_ACEOF
18652 #line 18652 "configure"
18653 #include "confdefs.h"
18654 #include <stdio.h>
18655 int
18656 main ()
18657 {
18658 printf("Hello")
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   :
18676 else
18677   echo "$as_me: failed program was:" >&5
18678 cat conftest.$ac_ext >&5
18679 cf_have_incdir=yes
18680 fi
18681 rm -f conftest.$ac_objext conftest.$ac_ext
18682                           CPPFLAGS=$cf_save_CPPFLAGS
18683                         fi
18684                   fi
18685                 fi
18686
18687                 if test "$cf_have_incdir" = no ; then
18688                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18689
18690 echo "${as_me:-configure}:18690: testing adding $cf_add_incdir to include-path ..." 1>&5
18691
18692                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18693
18694                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18695                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18696                   cf_add_incdir="$cf_top_incdir"
18697                 else
18698                   break
18699                 fi
18700           fi
18701         done
18702   done
18703 fi
18704
18705                         ;;
18706                 esac
18707         done
18708
18709 cf_search=
18710
18711 test "x$prefix" != "xNONE" && \
18712 test -d "$prefix" && \
18713  {
18714         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18715         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18716         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18717         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18718         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18719         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18720 }
18721
18722 for cf_subdir_prefix in \
18723         /usr \
18724         /usr/local \
18725         /usr/pkg \
18726         /opt \
18727         /opt/local \
18728         $HOME
18729 do
18730
18731 test "x$cf_subdir_prefix" != "x$prefix" && \
18732 test -d "$cf_subdir_prefix" && \
18733 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18734         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18735         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18736         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18737         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18738         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18739         test -d $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
18740 }
18741
18742 done
18743
18744         for cf_item in $cf_search
18745         do
18746                 case $cf_item in #(vi
18747                 */$with_hashed_db)
18748
18749 if test -n "$cf_item" ; then
18750   for cf_add_libdir in $cf_item
18751   do
18752     if test $cf_add_libdir = /usr/lib ; then
18753       :
18754     elif test -d $cf_add_libdir
18755     then
18756       cf_have_libdir=no
18757       if test -n "$LDFLAGS$LIBS" ; then
18758         # a loop is needed to ensure we can add subdirs of existing dirs
18759         for cf_test_libdir in $LDFLAGS $LIBS ; do
18760           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18761             cf_have_libdir=yes; break
18762           fi
18763         done
18764       fi
18765       if test "$cf_have_libdir" = no ; then
18766         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18767
18768 echo "${as_me:-configure}:18768: testing adding $cf_add_libdir to library-path ..." 1>&5
18769
18770         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18771       fi
18772     fi
18773   done
18774 fi
18775
18776                         ;;
18777                 esac
18778         done
18779
18780                         ;;
18781                 esac
18782     fi
18783 esac
18784
18785 echo "$as_me:18785: checking for db.h" >&5
18786 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18787 if test "${ac_cv_header_db_h+set}" = set; then
18788   echo $ECHO_N "(cached) $ECHO_C" >&6
18789 else
18790   cat >conftest.$ac_ext <<_ACEOF
18791 #line 18791 "configure"
18792 #include "confdefs.h"
18793 #include <db.h>
18794 _ACEOF
18795 if { (eval echo "$as_me:18795: \"$ac_cpp conftest.$ac_ext\"") >&5
18796   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18797   ac_status=$?
18798   egrep -v '^ *\+' conftest.er1 >conftest.err
18799   rm -f conftest.er1
18800   cat conftest.err >&5
18801   echo "$as_me:18801: \$? = $ac_status" >&5
18802   (exit $ac_status); } >/dev/null; then
18803   if test -s conftest.err; then
18804     ac_cpp_err=$ac_c_preproc_warn_flag
18805   else
18806     ac_cpp_err=
18807   fi
18808 else
18809   ac_cpp_err=yes
18810 fi
18811 if test -z "$ac_cpp_err"; then
18812   ac_cv_header_db_h=yes
18813 else
18814   echo "$as_me: failed program was:" >&5
18815   cat conftest.$ac_ext >&5
18816   ac_cv_header_db_h=no
18817 fi
18818 rm -f conftest.err conftest.$ac_ext
18819 fi
18820 echo "$as_me:18820: result: $ac_cv_header_db_h" >&5
18821 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18822 if test $ac_cv_header_db_h = yes; then
18823
18824 echo "$as_me:18824: checking for version of db" >&5
18825 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18826 if test "${cf_cv_hashed_db_version+set}" = set; then
18827   echo $ECHO_N "(cached) $ECHO_C" >&6
18828 else
18829
18830 cf_cv_hashed_db_version=unknown
18831
18832 for cf_db_version in 1 2 3 4 5 6
18833 do
18834
18835 echo "${as_me:-configure}:18835: testing checking for db version $cf_db_version ..." 1>&5
18836
18837         cat >conftest.$ac_ext <<_ACEOF
18838 #line 18838 "configure"
18839 #include "confdefs.h"
18840
18841 $ac_includes_default
18842 #include <db.h>
18843
18844 #ifdef DB_VERSION_MAJOR
18845         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18846 #if $cf_db_version == DB_VERSION_MAJOR
18847         /* ok */
18848 #else
18849         make an error
18850 #endif
18851 #else
18852 #if $cf_db_version == 1
18853         /* ok: assuming this is DB 1.8.5 */
18854 #else
18855         make an error
18856 #endif
18857 #endif
18858
18859 int
18860 main ()
18861 {
18862 DBT *foo = 0
18863   ;
18864   return 0;
18865 }
18866 _ACEOF
18867 rm -f conftest.$ac_objext
18868 if { (eval echo "$as_me:18868: \"$ac_compile\"") >&5
18869   (eval $ac_compile) 2>&5
18870   ac_status=$?
18871   echo "$as_me:18871: \$? = $ac_status" >&5
18872   (exit $ac_status); } &&
18873          { ac_try='test -s conftest.$ac_objext'
18874   { (eval echo "$as_me:18874: \"$ac_try\"") >&5
18875   (eval $ac_try) 2>&5
18876   ac_status=$?
18877   echo "$as_me:18877: \$? = $ac_status" >&5
18878   (exit $ac_status); }; }; then
18879
18880         cf_cv_hashed_db_version=$cf_db_version
18881         break
18882
18883 else
18884   echo "$as_me: failed program was:" >&5
18885 cat conftest.$ac_ext >&5
18886 fi
18887 rm -f conftest.$ac_objext conftest.$ac_ext
18888 done
18889
18890 fi
18891 echo "$as_me:18891: result: $cf_cv_hashed_db_version" >&5
18892 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18893
18894 if test "$cf_cv_hashed_db_version" = unknown ; then
18895         { { echo "$as_me:18895: error: Cannot determine version of db" >&5
18896 echo "$as_me: error: Cannot determine version of db" >&2;}
18897    { (exit 1); exit 1; }; }
18898 else
18899
18900 echo "$as_me:18900: checking for db libraries" >&5
18901 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18902 if test "${cf_cv_hashed_db_libs+set}" = set; then
18903   echo $ECHO_N "(cached) $ECHO_C" >&6
18904 else
18905
18906 cf_cv_hashed_db_libs=unknown
18907 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18908 do
18909         cf_save_libs="$LIBS"
18910         if test -n "$cf_db_libs"; then
18911
18912 cf_add_libs="-l$cf_db_libs"
18913 # Filter out duplicates - this happens with badly-designed ".pc" files...
18914 for cf_add_1lib in $LIBS
18915 do
18916         for cf_add_2lib in $cf_add_libs
18917         do
18918                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18919                 then
18920                         cf_add_1lib=
18921                         break
18922                 fi
18923         done
18924         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18925 done
18926 LIBS="$cf_add_libs"
18927
18928         fi
18929
18930 echo "${as_me:-configure}:18930: testing checking for library "$cf_db_libs" ..." 1>&5
18931
18932         cat >conftest.$ac_ext <<_ACEOF
18933 #line 18933 "configure"
18934 #include "confdefs.h"
18935
18936 $ac_includes_default
18937 #include <db.h>
18938
18939 int
18940 main ()
18941 {
18942
18943         char *path = "/tmp/foo";
18944 #ifdef DB_VERSION_MAJOR
18945 #if DB_VERSION_MAJOR >= 4
18946         DB *result = 0;
18947         db_create(&result, NULL, 0);
18948         result->open(result,
18949                 NULL,
18950                 path,
18951                 path,
18952                 DB_HASH,
18953                 DB_CREATE,
18954                 0644);
18955 #elif DB_VERSION_MAJOR >= 3
18956         DB *result = 0;
18957         db_create(&result, NULL, 0);
18958         result->open(result,
18959                 path,
18960                 path,
18961                 DB_HASH,
18962                 DB_CREATE,
18963                 0644);
18964 #elif DB_VERSION_MAJOR >= 2
18965         DB *result = 0;
18966         db_open(path,
18967                 DB_HASH,
18968                 DB_CREATE,
18969                 0644,
18970                 (DB_ENV *) 0,
18971                 (DB_INFO *) 0,
18972                 &result);
18973 #endif /* DB_VERSION_MAJOR */
18974 #else
18975         DB *result = dbopen(path,
18976                      2,
18977                      0644,
18978                      DB_HASH,
18979                      0);
18980 #endif
18981         ${cf_cv_main_return:-return}(result != 0)
18982
18983   ;
18984   return 0;
18985 }
18986 _ACEOF
18987 rm -f conftest.$ac_objext conftest$ac_exeext
18988 if { (eval echo "$as_me:18988: \"$ac_link\"") >&5
18989   (eval $ac_link) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); } &&
18993          { ac_try='test -s conftest$ac_exeext'
18994   { (eval echo "$as_me:18994: \"$ac_try\"") >&5
18995   (eval $ac_try) 2>&5
18996   ac_status=$?
18997   echo "$as_me:18997: \$? = $ac_status" >&5
18998   (exit $ac_status); }; }; then
18999
19000         if test -n "$cf_db_libs" ; then
19001                 cf_cv_hashed_db_libs=$cf_db_libs
19002         else
19003                 cf_cv_hashed_db_libs=default
19004         fi
19005         LIBS="$cf_save_libs"
19006         break
19007
19008 else
19009   echo "$as_me: failed program was:" >&5
19010 cat conftest.$ac_ext >&5
19011 fi
19012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19013         LIBS="$cf_save_libs"
19014 done
19015
19016 fi
19017 echo "$as_me:19017: result: $cf_cv_hashed_db_libs" >&5
19018 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19019
19020         if test "$cf_cv_hashed_db_libs" = unknown ; then
19021                 { { echo "$as_me:19021: error: Cannot determine library for db" >&5
19022 echo "$as_me: error: Cannot determine library for db" >&2;}
19023    { (exit 1); exit 1; }; }
19024         elif test "$cf_cv_hashed_db_libs" != default ; then
19025
19026 cf_add_libs="-l$cf_cv_hashed_db_libs"
19027 # Filter out duplicates - this happens with badly-designed ".pc" files...
19028 for cf_add_1lib in $LIBS
19029 do
19030         for cf_add_2lib in $cf_add_libs
19031         do
19032                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19033                 then
19034                         cf_add_1lib=
19035                         break
19036                 fi
19037         done
19038         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19039 done
19040 LIBS="$cf_add_libs"
19041
19042         fi
19043 fi
19044
19045 else
19046
19047         { { echo "$as_me:19047: error: Cannot find db.h" >&5
19048 echo "$as_me: error: Cannot find db.h" >&2;}
19049    { (exit 1); exit 1; }; }
19050
19051 fi
19052
19053 fi
19054
19055 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19056         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19057         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19058 fi
19059
19060 # Just in case, check if the C compiler has a bool type.
19061
19062 echo "$as_me:19062: checking if we should include stdbool.h" >&5
19063 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19064
19065 if test "${cf_cv_header_stdbool_h+set}" = set; then
19066   echo $ECHO_N "(cached) $ECHO_C" >&6
19067 else
19068
19069         cat >conftest.$ac_ext <<_ACEOF
19070 #line 19070 "configure"
19071 #include "confdefs.h"
19072
19073 int
19074 main ()
19075 {
19076 bool foo = false
19077   ;
19078   return 0;
19079 }
19080 _ACEOF
19081 rm -f conftest.$ac_objext
19082 if { (eval echo "$as_me:19082: \"$ac_compile\"") >&5
19083   (eval $ac_compile) 2>&5
19084   ac_status=$?
19085   echo "$as_me:19085: \$? = $ac_status" >&5
19086   (exit $ac_status); } &&
19087          { ac_try='test -s conftest.$ac_objext'
19088   { (eval echo "$as_me:19088: \"$ac_try\"") >&5
19089   (eval $ac_try) 2>&5
19090   ac_status=$?
19091   echo "$as_me:19091: \$? = $ac_status" >&5
19092   (exit $ac_status); }; }; then
19093   cf_cv_header_stdbool_h=0
19094 else
19095   echo "$as_me: failed program was:" >&5
19096 cat conftest.$ac_ext >&5
19097 cat >conftest.$ac_ext <<_ACEOF
19098 #line 19098 "configure"
19099 #include "confdefs.h"
19100
19101 #ifndef __BEOS__
19102 #include <stdbool.h>
19103 #endif
19104
19105 int
19106 main ()
19107 {
19108 bool foo = false
19109   ;
19110   return 0;
19111 }
19112 _ACEOF
19113 rm -f conftest.$ac_objext
19114 if { (eval echo "$as_me:19114: \"$ac_compile\"") >&5
19115   (eval $ac_compile) 2>&5
19116   ac_status=$?
19117   echo "$as_me:19117: \$? = $ac_status" >&5
19118   (exit $ac_status); } &&
19119          { ac_try='test -s conftest.$ac_objext'
19120   { (eval echo "$as_me:19120: \"$ac_try\"") >&5
19121   (eval $ac_try) 2>&5
19122   ac_status=$?
19123   echo "$as_me:19123: \$? = $ac_status" >&5
19124   (exit $ac_status); }; }; then
19125   cf_cv_header_stdbool_h=1
19126 else
19127   echo "$as_me: failed program was:" >&5
19128 cat conftest.$ac_ext >&5
19129 cf_cv_header_stdbool_h=0
19130 fi
19131 rm -f conftest.$ac_objext conftest.$ac_ext
19132 fi
19133 rm -f conftest.$ac_objext conftest.$ac_ext
19134 fi
19135
19136 if test "$cf_cv_header_stdbool_h" = 1
19137 then    echo "$as_me:19137: result: yes" >&5
19138 echo "${ECHO_T}yes" >&6
19139 else    echo "$as_me:19139: result: no" >&5
19140 echo "${ECHO_T}no" >&6
19141 fi
19142
19143 echo "$as_me:19143: checking for builtin bool type" >&5
19144 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19145
19146 if test "${cf_cv_cc_bool_type+set}" = set; then
19147   echo $ECHO_N "(cached) $ECHO_C" >&6
19148 else
19149
19150         cat >conftest.$ac_ext <<_ACEOF
19151 #line 19151 "configure"
19152 #include "confdefs.h"
19153
19154 #include <stdio.h>
19155 #include <sys/types.h>
19156
19157 int
19158 main ()
19159 {
19160 bool x = false
19161   ;
19162   return 0;
19163 }
19164 _ACEOF
19165 rm -f conftest.$ac_objext
19166 if { (eval echo "$as_me:19166: \"$ac_compile\"") >&5
19167   (eval $ac_compile) 2>&5
19168   ac_status=$?
19169   echo "$as_me:19169: \$? = $ac_status" >&5
19170   (exit $ac_status); } &&
19171          { ac_try='test -s conftest.$ac_objext'
19172   { (eval echo "$as_me:19172: \"$ac_try\"") >&5
19173   (eval $ac_try) 2>&5
19174   ac_status=$?
19175   echo "$as_me:19175: \$? = $ac_status" >&5
19176   (exit $ac_status); }; }; then
19177   cf_cv_cc_bool_type=1
19178 else
19179   echo "$as_me: failed program was:" >&5
19180 cat conftest.$ac_ext >&5
19181 cf_cv_cc_bool_type=0
19182 fi
19183 rm -f conftest.$ac_objext conftest.$ac_ext
19184
19185 fi
19186
19187 if test "$cf_cv_cc_bool_type" = 1
19188 then    echo "$as_me:19188: result: yes" >&5
19189 echo "${ECHO_T}yes" >&6
19190 else    echo "$as_me:19190: result: no" >&5
19191 echo "${ECHO_T}no" >&6
19192 fi
19193
19194 # Check for C++ compiler characteristics (and ensure that it's there!)
19195 if test -n "$CXX" ; then
19196         ac_ext=cc
19197 ac_cpp='$CXXCPP $CPPFLAGS'
19198 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19199 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19200 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19201 ac_main_return=return
19202
19203 if test -n "$GXX" ; then
19204 case $cf_cv_system_name in #(vi
19205 os2*) #(vi
19206         cf_stdcpp_libname=stdcpp
19207         ;;
19208 *)
19209         cf_stdcpp_libname=stdc++
19210         ;;
19211 esac
19212 echo "$as_me:19212: checking for library $cf_stdcpp_libname" >&5
19213 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19214 if test "${cf_cv_libstdcpp+set}" = set; then
19215   echo $ECHO_N "(cached) $ECHO_C" >&6
19216 else
19217
19218         cf_save="$LIBS"
19219
19220 cf_add_libs="-l$cf_stdcpp_libname"
19221 # Filter out duplicates - this happens with badly-designed ".pc" files...
19222 for cf_add_1lib in $LIBS
19223 do
19224         for cf_add_2lib in $cf_add_libs
19225         do
19226                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19227                 then
19228                         cf_add_1lib=
19229                         break
19230                 fi
19231         done
19232         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19233 done
19234 LIBS="$cf_add_libs"
19235
19236 cat >conftest.$ac_ext <<_ACEOF
19237 #line 19237 "configure"
19238 #include "confdefs.h"
19239
19240 #include <strstream.h>
19241 int
19242 main ()
19243 {
19244
19245 char buf[80];
19246 strstreambuf foo(buf, sizeof(buf))
19247
19248   ;
19249   return 0;
19250 }
19251 _ACEOF
19252 rm -f conftest.$ac_objext conftest$ac_exeext
19253 if { (eval echo "$as_me:19253: \"$ac_link\"") >&5
19254   (eval $ac_link) 2>&5
19255   ac_status=$?
19256   echo "$as_me:19256: \$? = $ac_status" >&5
19257   (exit $ac_status); } &&
19258          { ac_try='test -s conftest$ac_exeext'
19259   { (eval echo "$as_me:19259: \"$ac_try\"") >&5
19260   (eval $ac_try) 2>&5
19261   ac_status=$?
19262   echo "$as_me:19262: \$? = $ac_status" >&5
19263   (exit $ac_status); }; }; then
19264   cf_cv_libstdcpp=yes
19265 else
19266   echo "$as_me: failed program was:" >&5
19267 cat conftest.$ac_ext >&5
19268 cf_cv_libstdcpp=no
19269 fi
19270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19271         LIBS="$cf_save"
19272
19273 fi
19274 echo "$as_me:19274: result: $cf_cv_libstdcpp" >&5
19275 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19276 test "$cf_cv_libstdcpp" = yes &&
19277 cf_add_libs="-l$cf_stdcpp_libname"
19278 # Filter out duplicates - this happens with badly-designed ".pc" files...
19279 for cf_add_1lib in $CXXLIBS
19280 do
19281         for cf_add_2lib in $cf_add_libs
19282         do
19283                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19284                 then
19285                         cf_add_1lib=
19286                         break
19287                 fi
19288         done
19289         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19290 done
19291 CXXLIBS="$cf_add_libs"
19292
19293 fi
19294
19295         echo "$as_me:19295: checking whether $CXX understands -c and -o together" >&5
19296 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19297 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19298   echo $ECHO_N "(cached) $ECHO_C" >&6
19299 else
19300
19301 cat > conftest.$ac_ext <<CF_EOF
19302 #include <stdio.h>
19303 int main()
19304 {
19305         ${cf_cv_main_return:-return}(0);
19306 }
19307 CF_EOF
19308 # We do the test twice because some compilers refuse to overwrite an
19309 # existing .o file with -o, though they will create one.
19310 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19311 if { (eval echo "$as_me:19311: \"$ac_try\"") >&5
19312   (eval $ac_try) 2>&5
19313   ac_status=$?
19314   echo "$as_me:19314: \$? = $ac_status" >&5
19315   (exit $ac_status); } &&
19316   test -f conftest2.$ac_objext && { (eval echo "$as_me:19316: \"$ac_try\"") >&5
19317   (eval $ac_try) 2>&5
19318   ac_status=$?
19319   echo "$as_me:19319: \$? = $ac_status" >&5
19320   (exit $ac_status); };
19321 then
19322   eval cf_cv_prog_CXX_c_o=yes
19323 else
19324   eval cf_cv_prog_CXX_c_o=no
19325 fi
19326 rm -rf conftest*
19327
19328 fi
19329 if test $cf_cv_prog_CXX_c_o = yes; then
19330   echo "$as_me:19330: result: yes" >&5
19331 echo "${ECHO_T}yes" >&6
19332 else
19333   echo "$as_me:19333: result: no" >&5
19334 echo "${ECHO_T}no" >&6
19335 fi
19336
19337         case $GXX_VERSION in
19338         1*|2.0-6*)
19339                 cf_cxx_library=yes
19340                 ;;
19341         *-2.7*|2.7*)
19342
19343 cf_cxx_library=unknown
19344 case $cf_cv_system_name in #(vi
19345 os2*) #(vi
19346         cf_gpp_libname=gpp
19347         ;;
19348 *)
19349         cf_gpp_libname=g++
19350         ;;
19351 esac
19352 if test "$GXX" = yes; then
19353         echo "$as_me:19353: checking for lib$cf_gpp_libname" >&5
19354 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19355         cf_save="$LIBS"
19356
19357 cf_add_libs="-l$cf_gpp_libname"
19358 # Filter out duplicates - this happens with badly-designed ".pc" files...
19359 for cf_add_1lib in $LIBS
19360 do
19361         for cf_add_2lib in $cf_add_libs
19362         do
19363                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19364                 then
19365                         cf_add_1lib=
19366                         break
19367                 fi
19368         done
19369         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19370 done
19371 LIBS="$cf_add_libs"
19372
19373         cat >conftest.$ac_ext <<_ACEOF
19374 #line 19374 "configure"
19375 #include "confdefs.h"
19376
19377 #include <$cf_gpp_libname/builtin.h>
19378
19379 int
19380 main ()
19381 {
19382 two_arg_error_handler_t foo2 = lib_error_handler
19383   ;
19384   return 0;
19385 }
19386 _ACEOF
19387 rm -f conftest.$ac_objext conftest$ac_exeext
19388 if { (eval echo "$as_me:19388: \"$ac_link\"") >&5
19389   (eval $ac_link) 2>&5
19390   ac_status=$?
19391   echo "$as_me:19391: \$? = $ac_status" >&5
19392   (exit $ac_status); } &&
19393          { ac_try='test -s conftest$ac_exeext'
19394   { (eval echo "$as_me:19394: \"$ac_try\"") >&5
19395   (eval $ac_try) 2>&5
19396   ac_status=$?
19397   echo "$as_me:19397: \$? = $ac_status" >&5
19398   (exit $ac_status); }; }; then
19399   cf_cxx_library=yes
19400
19401 cf_add_libs="-l$cf_gpp_libname"
19402 # Filter out duplicates - this happens with badly-designed ".pc" files...
19403 for cf_add_1lib in $CXXLIBS
19404 do
19405         for cf_add_2lib in $cf_add_libs
19406         do
19407                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19408                 then
19409                         cf_add_1lib=
19410                         break
19411                 fi
19412         done
19413         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19414 done
19415 CXXLIBS="$cf_add_libs"
19416
19417          if test "$cf_gpp_libname" = cpp ; then
19418
19419 cat >>confdefs.h <<\EOF
19420 #define HAVE_GPP_BUILTIN_H 1
19421 EOF
19422
19423          else
19424
19425 cat >>confdefs.h <<\EOF
19426 #define HAVE_GXX_BUILTIN_H 1
19427 EOF
19428
19429          fi
19430 else
19431   echo "$as_me: failed program was:" >&5
19432 cat conftest.$ac_ext >&5
19433 cat >conftest.$ac_ext <<_ACEOF
19434 #line 19434 "configure"
19435 #include "confdefs.h"
19436
19437 #include <builtin.h>
19438
19439 int
19440 main ()
19441 {
19442 two_arg_error_handler_t foo2 = lib_error_handler
19443   ;
19444   return 0;
19445 }
19446 _ACEOF
19447 rm -f conftest.$ac_objext conftest$ac_exeext
19448 if { (eval echo "$as_me:19448: \"$ac_link\"") >&5
19449   (eval $ac_link) 2>&5
19450   ac_status=$?
19451   echo "$as_me:19451: \$? = $ac_status" >&5
19452   (exit $ac_status); } &&
19453          { ac_try='test -s conftest$ac_exeext'
19454   { (eval echo "$as_me:19454: \"$ac_try\"") >&5
19455   (eval $ac_try) 2>&5
19456   ac_status=$?
19457   echo "$as_me:19457: \$? = $ac_status" >&5
19458   (exit $ac_status); }; }; then
19459   cf_cxx_library=yes
19460
19461 cf_add_libs="-l$cf_gpp_libname"
19462 # Filter out duplicates - this happens with badly-designed ".pc" files...
19463 for cf_add_1lib in $CXXLIBS
19464 do
19465         for cf_add_2lib in $cf_add_libs
19466         do
19467                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19468                 then
19469                         cf_add_1lib=
19470                         break
19471                 fi
19472         done
19473         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19474 done
19475 CXXLIBS="$cf_add_libs"
19476
19477 cat >>confdefs.h <<\EOF
19478 #define HAVE_BUILTIN_H 1
19479 EOF
19480
19481 else
19482   echo "$as_me: failed program was:" >&5
19483 cat conftest.$ac_ext >&5
19484 cf_cxx_library=no
19485 fi
19486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19487 fi
19488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19489         LIBS="$cf_save"
19490         echo "$as_me:19490: result: $cf_cxx_library" >&5
19491 echo "${ECHO_T}$cf_cxx_library" >&6
19492 fi
19493
19494                 ;;
19495         *)
19496                 cf_cxx_library=no
19497                 ;;
19498         esac
19499
19500         ac_ext=cc
19501 ac_cpp='$CXXCPP $CPPFLAGS'
19502 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19503 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19504 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19505 ac_main_return=return
19506 echo "$as_me:19506: checking how to run the C++ preprocessor" >&5
19507 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19508 if test -z "$CXXCPP"; then
19509   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19510   echo $ECHO_N "(cached) $ECHO_C" >&6
19511 else
19512       # Double quotes because CXXCPP needs to be expanded
19513     for CXXCPP in "$CXX -E" "/lib/cpp"
19514     do
19515       ac_preproc_ok=false
19516 for ac_cxx_preproc_warn_flag in '' yes
19517 do
19518   # Use a header file that comes with gcc, so configuring glibc
19519   # with a fresh cross-compiler works.
19520   # On the NeXT, cc -E runs the code through the compiler's parser,
19521   # not just through cpp. "Syntax error" is here to catch this case.
19522   cat >conftest.$ac_ext <<_ACEOF
19523 #line 19523 "configure"
19524 #include "confdefs.h"
19525 #include <assert.h>
19526                      Syntax error
19527 _ACEOF
19528 if { (eval echo "$as_me:19528: \"$ac_cpp conftest.$ac_ext\"") >&5
19529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19530   ac_status=$?
19531   egrep -v '^ *\+' conftest.er1 >conftest.err
19532   rm -f conftest.er1
19533   cat conftest.err >&5
19534   echo "$as_me:19534: \$? = $ac_status" >&5
19535   (exit $ac_status); } >/dev/null; then
19536   if test -s conftest.err; then
19537     ac_cpp_err=$ac_cxx_preproc_warn_flag
19538   else
19539     ac_cpp_err=
19540   fi
19541 else
19542   ac_cpp_err=yes
19543 fi
19544 if test -z "$ac_cpp_err"; then
19545   :
19546 else
19547   echo "$as_me: failed program was:" >&5
19548   cat conftest.$ac_ext >&5
19549   # Broken: fails on valid input.
19550 continue
19551 fi
19552 rm -f conftest.err conftest.$ac_ext
19553
19554   # OK, works on sane cases.  Now check whether non-existent headers
19555   # can be detected and how.
19556   cat >conftest.$ac_ext <<_ACEOF
19557 #line 19557 "configure"
19558 #include "confdefs.h"
19559 #include <ac_nonexistent.h>
19560 _ACEOF
19561 if { (eval echo "$as_me:19561: \"$ac_cpp conftest.$ac_ext\"") >&5
19562   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19563   ac_status=$?
19564   egrep -v '^ *\+' conftest.er1 >conftest.err
19565   rm -f conftest.er1
19566   cat conftest.err >&5
19567   echo "$as_me:19567: \$? = $ac_status" >&5
19568   (exit $ac_status); } >/dev/null; then
19569   if test -s conftest.err; then
19570     ac_cpp_err=$ac_cxx_preproc_warn_flag
19571   else
19572     ac_cpp_err=
19573   fi
19574 else
19575   ac_cpp_err=yes
19576 fi
19577 if test -z "$ac_cpp_err"; then
19578   # Broken: success on invalid input.
19579 continue
19580 else
19581   echo "$as_me: failed program was:" >&5
19582   cat conftest.$ac_ext >&5
19583   # Passes both tests.
19584 ac_preproc_ok=:
19585 break
19586 fi
19587 rm -f conftest.err conftest.$ac_ext
19588
19589 done
19590 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19591 rm -f conftest.err conftest.$ac_ext
19592 if $ac_preproc_ok; then
19593   break
19594 fi
19595
19596     done
19597     ac_cv_prog_CXXCPP=$CXXCPP
19598
19599 fi
19600   CXXCPP=$ac_cv_prog_CXXCPP
19601 else
19602   ac_cv_prog_CXXCPP=$CXXCPP
19603 fi
19604 echo "$as_me:19604: result: $CXXCPP" >&5
19605 echo "${ECHO_T}$CXXCPP" >&6
19606 ac_preproc_ok=false
19607 for ac_cxx_preproc_warn_flag in '' yes
19608 do
19609   # Use a header file that comes with gcc, so configuring glibc
19610   # with a fresh cross-compiler works.
19611   # On the NeXT, cc -E runs the code through the compiler's parser,
19612   # not just through cpp. "Syntax error" is here to catch this case.
19613   cat >conftest.$ac_ext <<_ACEOF
19614 #line 19614 "configure"
19615 #include "confdefs.h"
19616 #include <assert.h>
19617                      Syntax error
19618 _ACEOF
19619 if { (eval echo "$as_me:19619: \"$ac_cpp conftest.$ac_ext\"") >&5
19620   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19621   ac_status=$?
19622   egrep -v '^ *\+' conftest.er1 >conftest.err
19623   rm -f conftest.er1
19624   cat conftest.err >&5
19625   echo "$as_me:19625: \$? = $ac_status" >&5
19626   (exit $ac_status); } >/dev/null; then
19627   if test -s conftest.err; then
19628     ac_cpp_err=$ac_cxx_preproc_warn_flag
19629   else
19630     ac_cpp_err=
19631   fi
19632 else
19633   ac_cpp_err=yes
19634 fi
19635 if test -z "$ac_cpp_err"; then
19636   :
19637 else
19638   echo "$as_me: failed program was:" >&5
19639   cat conftest.$ac_ext >&5
19640   # Broken: fails on valid input.
19641 continue
19642 fi
19643 rm -f conftest.err conftest.$ac_ext
19644
19645   # OK, works on sane cases.  Now check whether non-existent headers
19646   # can be detected and how.
19647   cat >conftest.$ac_ext <<_ACEOF
19648 #line 19648 "configure"
19649 #include "confdefs.h"
19650 #include <ac_nonexistent.h>
19651 _ACEOF
19652 if { (eval echo "$as_me:19652: \"$ac_cpp conftest.$ac_ext\"") >&5
19653   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19654   ac_status=$?
19655   egrep -v '^ *\+' conftest.er1 >conftest.err
19656   rm -f conftest.er1
19657   cat conftest.err >&5
19658   echo "$as_me:19658: \$? = $ac_status" >&5
19659   (exit $ac_status); } >/dev/null; then
19660   if test -s conftest.err; then
19661     ac_cpp_err=$ac_cxx_preproc_warn_flag
19662   else
19663     ac_cpp_err=
19664   fi
19665 else
19666   ac_cpp_err=yes
19667 fi
19668 if test -z "$ac_cpp_err"; then
19669   # Broken: success on invalid input.
19670 continue
19671 else
19672   echo "$as_me: failed program was:" >&5
19673   cat conftest.$ac_ext >&5
19674   # Passes both tests.
19675 ac_preproc_ok=:
19676 break
19677 fi
19678 rm -f conftest.err conftest.$ac_ext
19679
19680 done
19681 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19682 rm -f conftest.err conftest.$ac_ext
19683 if $ac_preproc_ok; then
19684   :
19685 else
19686   { { echo "$as_me:19686: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19687 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19688    { (exit 1); exit 1; }; }
19689 fi
19690
19691 ac_ext=cc
19692 ac_cpp='$CXXCPP $CPPFLAGS'
19693 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19694 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19695 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19696 ac_main_return=return
19697
19698 for ac_header in typeinfo
19699 do
19700 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19701 echo "$as_me:19701: checking for $ac_header" >&5
19702 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19703 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19704   echo $ECHO_N "(cached) $ECHO_C" >&6
19705 else
19706   cat >conftest.$ac_ext <<_ACEOF
19707 #line 19707 "configure"
19708 #include "confdefs.h"
19709 #include <$ac_header>
19710 _ACEOF
19711 if { (eval echo "$as_me:19711: \"$ac_cpp conftest.$ac_ext\"") >&5
19712   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19713   ac_status=$?
19714   egrep -v '^ *\+' conftest.er1 >conftest.err
19715   rm -f conftest.er1
19716   cat conftest.err >&5
19717   echo "$as_me:19717: \$? = $ac_status" >&5
19718   (exit $ac_status); } >/dev/null; then
19719   if test -s conftest.err; then
19720     ac_cpp_err=$ac_cxx_preproc_warn_flag
19721   else
19722     ac_cpp_err=
19723   fi
19724 else
19725   ac_cpp_err=yes
19726 fi
19727 if test -z "$ac_cpp_err"; then
19728   eval "$as_ac_Header=yes"
19729 else
19730   echo "$as_me: failed program was:" >&5
19731   cat conftest.$ac_ext >&5
19732   eval "$as_ac_Header=no"
19733 fi
19734 rm -f conftest.err conftest.$ac_ext
19735 fi
19736 echo "$as_me:19736: result: `eval echo '${'$as_ac_Header'}'`" >&5
19737 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19738 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19739   cat >>confdefs.h <<EOF
19740 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19741 EOF
19742
19743 fi
19744 done
19745
19746 for ac_header in iostream
19747 do
19748 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19749 echo "$as_me:19749: checking for $ac_header" >&5
19750 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19751 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19752   echo $ECHO_N "(cached) $ECHO_C" >&6
19753 else
19754   cat >conftest.$ac_ext <<_ACEOF
19755 #line 19755 "configure"
19756 #include "confdefs.h"
19757 #include <$ac_header>
19758 _ACEOF
19759 if { (eval echo "$as_me:19759: \"$ac_cpp conftest.$ac_ext\"") >&5
19760   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19761   ac_status=$?
19762   egrep -v '^ *\+' conftest.er1 >conftest.err
19763   rm -f conftest.er1
19764   cat conftest.err >&5
19765   echo "$as_me:19765: \$? = $ac_status" >&5
19766   (exit $ac_status); } >/dev/null; then
19767   if test -s conftest.err; then
19768     ac_cpp_err=$ac_cxx_preproc_warn_flag
19769   else
19770     ac_cpp_err=
19771   fi
19772 else
19773   ac_cpp_err=yes
19774 fi
19775 if test -z "$ac_cpp_err"; then
19776   eval "$as_ac_Header=yes"
19777 else
19778   echo "$as_me: failed program was:" >&5
19779   cat conftest.$ac_ext >&5
19780   eval "$as_ac_Header=no"
19781 fi
19782 rm -f conftest.err conftest.$ac_ext
19783 fi
19784 echo "$as_me:19784: result: `eval echo '${'$as_ac_Header'}'`" >&5
19785 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19786 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19787   cat >>confdefs.h <<EOF
19788 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19789 EOF
19790
19791 fi
19792 done
19793
19794 if test x"$ac_cv_header_iostream" = xyes ; then
19795         echo "$as_me:19795: checking if iostream uses std-namespace" >&5
19796 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19797         cat >conftest.$ac_ext <<_ACEOF
19798 #line 19798 "configure"
19799 #include "confdefs.h"
19800
19801 #include <iostream>
19802 using std::endl;
19803 using std::cerr;
19804 int
19805 main ()
19806 {
19807
19808 cerr << "testing" << endl;
19809
19810   ;
19811   return 0;
19812 }
19813 _ACEOF
19814 rm -f conftest.$ac_objext
19815 if { (eval echo "$as_me:19815: \"$ac_compile\"") >&5
19816   (eval $ac_compile) 2>&5
19817   ac_status=$?
19818   echo "$as_me:19818: \$? = $ac_status" >&5
19819   (exit $ac_status); } &&
19820          { ac_try='test -s conftest.$ac_objext'
19821   { (eval echo "$as_me:19821: \"$ac_try\"") >&5
19822   (eval $ac_try) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit $ac_status); }; }; then
19826   cf_iostream_namespace=yes
19827 else
19828   echo "$as_me: failed program was:" >&5
19829 cat conftest.$ac_ext >&5
19830 cf_iostream_namespace=no
19831 fi
19832 rm -f conftest.$ac_objext conftest.$ac_ext
19833         echo "$as_me:19833: result: $cf_iostream_namespace" >&5
19834 echo "${ECHO_T}$cf_iostream_namespace" >&6
19835         if test "$cf_iostream_namespace" = yes ; then
19836
19837 cat >>confdefs.h <<\EOF
19838 #define IOSTREAM_NAMESPACE 1
19839 EOF
19840
19841         fi
19842 fi
19843
19844 echo "$as_me:19844: checking if we should include stdbool.h" >&5
19845 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19846
19847 if test "${cf_cv_header_stdbool_h+set}" = set; then
19848   echo $ECHO_N "(cached) $ECHO_C" >&6
19849 else
19850
19851         cat >conftest.$ac_ext <<_ACEOF
19852 #line 19852 "configure"
19853 #include "confdefs.h"
19854
19855 int
19856 main ()
19857 {
19858 bool foo = false
19859   ;
19860   return 0;
19861 }
19862 _ACEOF
19863 rm -f conftest.$ac_objext
19864 if { (eval echo "$as_me:19864: \"$ac_compile\"") >&5
19865   (eval $ac_compile) 2>&5
19866   ac_status=$?
19867   echo "$as_me:19867: \$? = $ac_status" >&5
19868   (exit $ac_status); } &&
19869          { ac_try='test -s conftest.$ac_objext'
19870   { (eval echo "$as_me:19870: \"$ac_try\"") >&5
19871   (eval $ac_try) 2>&5
19872   ac_status=$?
19873   echo "$as_me:19873: \$? = $ac_status" >&5
19874   (exit $ac_status); }; }; then
19875   cf_cv_header_stdbool_h=0
19876 else
19877   echo "$as_me: failed program was:" >&5
19878 cat conftest.$ac_ext >&5
19879 cat >conftest.$ac_ext <<_ACEOF
19880 #line 19880 "configure"
19881 #include "confdefs.h"
19882
19883 #ifndef __BEOS__
19884 #include <stdbool.h>
19885 #endif
19886
19887 int
19888 main ()
19889 {
19890 bool foo = false
19891   ;
19892   return 0;
19893 }
19894 _ACEOF
19895 rm -f conftest.$ac_objext
19896 if { (eval echo "$as_me:19896: \"$ac_compile\"") >&5
19897   (eval $ac_compile) 2>&5
19898   ac_status=$?
19899   echo "$as_me:19899: \$? = $ac_status" >&5
19900   (exit $ac_status); } &&
19901          { ac_try='test -s conftest.$ac_objext'
19902   { (eval echo "$as_me:19902: \"$ac_try\"") >&5
19903   (eval $ac_try) 2>&5
19904   ac_status=$?
19905   echo "$as_me:19905: \$? = $ac_status" >&5
19906   (exit $ac_status); }; }; then
19907   cf_cv_header_stdbool_h=1
19908 else
19909   echo "$as_me: failed program was:" >&5
19910 cat conftest.$ac_ext >&5
19911 cf_cv_header_stdbool_h=0
19912 fi
19913 rm -f conftest.$ac_objext conftest.$ac_ext
19914 fi
19915 rm -f conftest.$ac_objext conftest.$ac_ext
19916 fi
19917
19918 if test "$cf_cv_header_stdbool_h" = 1
19919 then    echo "$as_me:19919: result: yes" >&5
19920 echo "${ECHO_T}yes" >&6
19921 else    echo "$as_me:19921: result: no" >&5
19922 echo "${ECHO_T}no" >&6
19923 fi
19924
19925 echo "$as_me:19925: checking for builtin bool type" >&5
19926 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19927
19928 if test "${cf_cv_builtin_bool+set}" = set; then
19929   echo $ECHO_N "(cached) $ECHO_C" >&6
19930 else
19931
19932         cat >conftest.$ac_ext <<_ACEOF
19933 #line 19933 "configure"
19934 #include "confdefs.h"
19935
19936 #include <stdio.h>
19937 #include <sys/types.h>
19938
19939 int
19940 main ()
19941 {
19942 bool x = false
19943   ;
19944   return 0;
19945 }
19946 _ACEOF
19947 rm -f conftest.$ac_objext
19948 if { (eval echo "$as_me:19948: \"$ac_compile\"") >&5
19949   (eval $ac_compile) 2>&5
19950   ac_status=$?
19951   echo "$as_me:19951: \$? = $ac_status" >&5
19952   (exit $ac_status); } &&
19953          { ac_try='test -s conftest.$ac_objext'
19954   { (eval echo "$as_me:19954: \"$ac_try\"") >&5
19955   (eval $ac_try) 2>&5
19956   ac_status=$?
19957   echo "$as_me:19957: \$? = $ac_status" >&5
19958   (exit $ac_status); }; }; then
19959   cf_cv_builtin_bool=1
19960 else
19961   echo "$as_me: failed program was:" >&5
19962 cat conftest.$ac_ext >&5
19963 cf_cv_builtin_bool=0
19964 fi
19965 rm -f conftest.$ac_objext conftest.$ac_ext
19966
19967 fi
19968
19969 if test "$cf_cv_builtin_bool" = 1
19970 then    echo "$as_me:19970: result: yes" >&5
19971 echo "${ECHO_T}yes" >&6
19972 else    echo "$as_me:19972: result: no" >&5
19973 echo "${ECHO_T}no" >&6
19974 fi
19975
19976 echo "$as_me:19976: checking for size of bool" >&5
19977 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19978 if test "${cf_cv_type_of_bool+set}" = set; then
19979   echo $ECHO_N "(cached) $ECHO_C" >&6
19980 else
19981
19982         rm -f cf_test.out
19983         if test "$cross_compiling" = yes; then
19984   cf_cv_type_of_bool=unknown
19985 else
19986   cat >conftest.$ac_ext <<_ACEOF
19987 #line 19987 "configure"
19988 #include "confdefs.h"
19989
19990 #include <stdlib.h>
19991 #include <stdio.h>
19992
19993 #if defined(__cplusplus)
19994
19995 #ifdef HAVE_GXX_BUILTIN_H
19996 #include <g++/builtin.h>
19997 #elif HAVE_GPP_BUILTIN_H
19998 #include <gpp/builtin.h>
19999 #elif HAVE_BUILTIN_H
20000 #include <builtin.h>
20001 #endif
20002
20003 #else
20004
20005 #if $cf_cv_header_stdbool_h
20006 #include <stdbool.h>
20007 #endif
20008
20009 #endif
20010
20011 int main()
20012 {
20013         FILE *fp = fopen("cf_test.out", "w");
20014         if (fp != 0) {
20015                 bool x = true;
20016                 if ((bool)(-x) >= 0)
20017                         fputs("unsigned ", fp);
20018                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20019                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20020                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20021                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20022                 fclose(fp);
20023         }
20024         ${cf_cv_main_return:-return}(0);
20025 }
20026
20027 _ACEOF
20028 rm -f conftest$ac_exeext
20029 if { (eval echo "$as_me:20029: \"$ac_link\"") >&5
20030   (eval $ac_link) 2>&5
20031   ac_status=$?
20032   echo "$as_me:20032: \$? = $ac_status" >&5
20033   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20034   { (eval echo "$as_me:20034: \"$ac_try\"") >&5
20035   (eval $ac_try) 2>&5
20036   ac_status=$?
20037   echo "$as_me:20037: \$? = $ac_status" >&5
20038   (exit $ac_status); }; }; then
20039   cf_cv_type_of_bool=`cat cf_test.out`
20040                  if test -z "$cf_cv_type_of_bool"; then
20041                    cf_cv_type_of_bool=unknown
20042                  fi
20043 else
20044   echo "$as_me: program exited with status $ac_status" >&5
20045 echo "$as_me: failed program was:" >&5
20046 cat conftest.$ac_ext >&5
20047 cf_cv_type_of_bool=unknown
20048 fi
20049 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20050 fi
20051
20052 fi
20053
20054         rm -f cf_test.out
20055 echo "$as_me:20055: result: $cf_cv_type_of_bool" >&5
20056 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20057 if test "$cf_cv_type_of_bool" = unknown ; then
20058         case .$NCURSES_BOOL in #(vi
20059         .auto|.) NCURSES_BOOL=unsigned;;
20060         esac
20061         { echo "$as_me:20061: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20062 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20063         cf_cv_type_of_bool=$NCURSES_BOOL
20064 fi
20065
20066 echo "$as_me:20066: checking for special defines needed for etip.h" >&5
20067 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20068 cf_save_CXXFLAGS="$CXXFLAGS"
20069 cf_result="none"
20070
20071 # etip.h includes ncurses.h which includes ncurses_dll.h
20072 # But ncurses_dll.h is generated - fix here.
20073 test -d include || mkdir include
20074 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
20075
20076 for cf_math in "" MATH_H
20077 do
20078 for cf_excp in "" MATH_EXCEPTION
20079 do
20080         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20081         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20082         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20083 cat >conftest.$ac_ext <<_ACEOF
20084 #line 20084 "configure"
20085 #include "confdefs.h"
20086
20087 #include <etip.h.in>
20088
20089 int
20090 main ()
20091 {
20092
20093   ;
20094   return 0;
20095 }
20096 _ACEOF
20097 rm -f conftest.$ac_objext
20098 if { (eval echo "$as_me:20098: \"$ac_compile\"") >&5
20099   (eval $ac_compile) 2>&5
20100   ac_status=$?
20101   echo "$as_me:20101: \$? = $ac_status" >&5
20102   (exit $ac_status); } &&
20103          { ac_try='test -s conftest.$ac_objext'
20104   { (eval echo "$as_me:20104: \"$ac_try\"") >&5
20105   (eval $ac_try) 2>&5
20106   ac_status=$?
20107   echo "$as_me:20107: \$? = $ac_status" >&5
20108   (exit $ac_status); }; }; then
20109
20110         test -n "$cf_math" && cat >>confdefs.h <<EOF
20111 #define ETIP_NEEDS_${cf_math} 1
20112 EOF
20113
20114         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20115 #define ETIP_NEEDS_${cf_excp} 1
20116 EOF
20117
20118         cf_result="$cf_math $cf_excp"
20119         break 2
20120
20121 else
20122   echo "$as_me: failed program was:" >&5
20123 cat conftest.$ac_ext >&5
20124 fi
20125 rm -f conftest.$ac_objext conftest.$ac_ext
20126 done
20127 done
20128 echo "$as_me:20128: result: $cf_result" >&5
20129 echo "${ECHO_T}$cf_result" >&6
20130 CXXFLAGS="$cf_save_CXXFLAGS"
20131
20132 if test -n "$CXX"; then
20133 echo "$as_me:20133: checking if $CXX accepts parameter initialization" >&5
20134 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20135 if test "${cf_cv_cpp_param_init+set}" = set; then
20136   echo $ECHO_N "(cached) $ECHO_C" >&6
20137 else
20138
20139         ac_ext=cc
20140 ac_cpp='$CXXCPP $CPPFLAGS'
20141 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20142 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20143 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20144 ac_main_return=return
20145
20146         if test "$cross_compiling" = yes; then
20147   cf_cv_cpp_param_init=unknown
20148 else
20149   cat >conftest.$ac_ext <<_ACEOF
20150 #line 20150 "configure"
20151 #include "confdefs.h"
20152
20153 class TEST {
20154 private:
20155         int value;
20156 public:
20157         TEST(int x = 1);
20158         ~TEST();
20159 };
20160
20161 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20162 {
20163         value = x;
20164 }
20165 int main() { }
20166
20167 _ACEOF
20168 rm -f conftest$ac_exeext
20169 if { (eval echo "$as_me:20169: \"$ac_link\"") >&5
20170   (eval $ac_link) 2>&5
20171   ac_status=$?
20172   echo "$as_me:20172: \$? = $ac_status" >&5
20173   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20174   { (eval echo "$as_me:20174: \"$ac_try\"") >&5
20175   (eval $ac_try) 2>&5
20176   ac_status=$?
20177   echo "$as_me:20177: \$? = $ac_status" >&5
20178   (exit $ac_status); }; }; then
20179   cf_cv_cpp_param_init=yes
20180 else
20181   echo "$as_me: program exited with status $ac_status" >&5
20182 echo "$as_me: failed program was:" >&5
20183 cat conftest.$ac_ext >&5
20184 cf_cv_cpp_param_init=no
20185 fi
20186 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20187 fi
20188         ac_ext=cc
20189 ac_cpp='$CXXCPP $CPPFLAGS'
20190 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20191 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20192 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20193 ac_main_return=return
20194
20195 fi
20196 echo "$as_me:20196: result: $cf_cv_cpp_param_init" >&5
20197 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20198 fi
20199 test "$cf_cv_cpp_param_init" = yes &&
20200 cat >>confdefs.h <<\EOF
20201 #define CPP_HAS_PARAM_INIT 1
20202 EOF
20203
20204 if test -n "$CXX"; then
20205
20206 echo "$as_me:20206: checking if $CXX accepts static_cast" >&5
20207 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20208 if test "${cf_cv_cpp_static_cast+set}" = set; then
20209   echo $ECHO_N "(cached) $ECHO_C" >&6
20210 else
20211
20212         ac_ext=cc
20213 ac_cpp='$CXXCPP $CPPFLAGS'
20214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20215 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20217 ac_main_return=return
20218
20219         cat >conftest.$ac_ext <<_ACEOF
20220 #line 20220 "configure"
20221 #include "confdefs.h"
20222
20223 class NCursesPanel
20224 {
20225 public:
20226   NCursesPanel(int nlines,
20227                int ncols,
20228                int begin_y = 0,
20229                int begin_x = 0)
20230   {
20231   }
20232   NCursesPanel();
20233   ~NCursesPanel();
20234 };
20235
20236 template<class T> class NCursesUserPanel : public NCursesPanel
20237 {
20238 public:
20239   NCursesUserPanel (int nlines,
20240                     int ncols,
20241                     int begin_y = 0,
20242                     int begin_x = 0,
20243                     const T* p_UserData = static_cast<T*>(0))
20244     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20245   {
20246   };
20247   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20248   {
20249   };
20250
20251   virtual ~NCursesUserPanel() {};
20252 };
20253
20254 int
20255 main ()
20256 {
20257
20258         const char* p_UserData = static_cast<char*>(0)
20259   ;
20260   return 0;
20261 }
20262 _ACEOF
20263 rm -f conftest.$ac_objext
20264 if { (eval echo "$as_me:20264: \"$ac_compile\"") >&5
20265   (eval $ac_compile) 2>&5
20266   ac_status=$?
20267   echo "$as_me:20267: \$? = $ac_status" >&5
20268   (exit $ac_status); } &&
20269          { ac_try='test -s conftest.$ac_objext'
20270   { (eval echo "$as_me:20270: \"$ac_try\"") >&5
20271   (eval $ac_try) 2>&5
20272   ac_status=$?
20273   echo "$as_me:20273: \$? = $ac_status" >&5
20274   (exit $ac_status); }; }; then
20275   cf_cv_cpp_static_cast=yes
20276 else
20277   echo "$as_me: failed program was:" >&5
20278 cat conftest.$ac_ext >&5
20279 cf_cv_cpp_static_cast=no
20280 fi
20281 rm -f conftest.$ac_objext conftest.$ac_ext
20282
20283         ac_ext=cc
20284 ac_cpp='$CXXCPP $CPPFLAGS'
20285 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20286 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20287 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20288 ac_main_return=return
20289
20290 fi
20291 echo "$as_me:20291: result: $cf_cv_cpp_static_cast" >&5
20292 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20293
20294 fi
20295
20296 test "$cf_cv_cpp_static_cast" = yes &&
20297 cat >>confdefs.h <<\EOF
20298 #define CPP_HAS_STATIC_CAST 1
20299 EOF
20300
20301         CXX_AR='$(AR)'
20302         CXX_ARFLAGS='$(ARFLAGS)'
20303         case $cf_cv_system_name in #(vi
20304         irix*) #(vi
20305             if test "$GXX" != yes ; then
20306                 CXX_AR='$(CXX)'
20307                 CXX_ARFLAGS='-ar -o'
20308             fi
20309             ;;
20310         sco3.2v5*) #(vi
20311             CXXLDFLAGS="-u main"
20312             ;;
20313         solaris2*)
20314             if test "$GXX" != yes ; then
20315                 CXX_AR='$(CXX)'
20316                 CXX_ARFLAGS='-xar -o'
20317             fi
20318             ;;
20319         esac
20320
20321 else
20322         cf_cxx_library=no
20323         cf_cv_builtin_bool=1
20324
20325         # Just because we are not configuring against C++ right now does not
20326         # mean that a user will not want to use C++.  Some distributors disable
20327         # the C++ portion of this configuration as a shortcut (or just to avoid
20328         # compiling the demo in the c++ directory).  So we need a reasonable
20329         # default for the 'bool' type.
20330         #
20331         # Caveat: since the storage of the bool type is not standardized, it
20332         # may change.
20333
20334         if test "$NCURSES_BOOL" != auto ; then
20335                 cf_cv_type_of_bool=$NCURSES_BOOL
20336                 cf_cv_header_stdbool_h=0
20337         else
20338                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20339
20340 echo "$as_me:20340: checking for size of bool" >&5
20341 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20342 if test "${cf_cv_type_of_bool+set}" = set; then
20343   echo $ECHO_N "(cached) $ECHO_C" >&6
20344 else
20345
20346         rm -f cf_test.out
20347         if test "$cross_compiling" = yes; then
20348   cf_cv_type_of_bool=unknown
20349 else
20350   cat >conftest.$ac_ext <<_ACEOF
20351 #line 20351 "configure"
20352 #include "confdefs.h"
20353
20354 #include <stdlib.h>
20355 #include <stdio.h>
20356
20357 #if defined(__cplusplus)
20358
20359 #ifdef HAVE_GXX_BUILTIN_H
20360 #include <g++/builtin.h>
20361 #elif HAVE_GPP_BUILTIN_H
20362 #include <gpp/builtin.h>
20363 #elif HAVE_BUILTIN_H
20364 #include <builtin.h>
20365 #endif
20366
20367 #else
20368
20369 #if $cf_cv_header_stdbool_h
20370 #include <stdbool.h>
20371 #endif
20372
20373 #endif
20374
20375 int main()
20376 {
20377         FILE *fp = fopen("cf_test.out", "w");
20378         if (fp != 0) {
20379                 bool x = true;
20380                 if ((bool)(-x) >= 0)
20381                         fputs("unsigned ", fp);
20382                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20383                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20384                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20385                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20386                 fclose(fp);
20387         }
20388         ${cf_cv_main_return:-return}(0);
20389 }
20390
20391 _ACEOF
20392 rm -f conftest$ac_exeext
20393 if { (eval echo "$as_me:20393: \"$ac_link\"") >&5
20394   (eval $ac_link) 2>&5
20395   ac_status=$?
20396   echo "$as_me:20396: \$? = $ac_status" >&5
20397   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20398   { (eval echo "$as_me:20398: \"$ac_try\"") >&5
20399   (eval $ac_try) 2>&5
20400   ac_status=$?
20401   echo "$as_me:20401: \$? = $ac_status" >&5
20402   (exit $ac_status); }; }; then
20403   cf_cv_type_of_bool=`cat cf_test.out`
20404                  if test -z "$cf_cv_type_of_bool"; then
20405                    cf_cv_type_of_bool=unknown
20406                  fi
20407 else
20408   echo "$as_me: program exited with status $ac_status" >&5
20409 echo "$as_me: failed program was:" >&5
20410 cat conftest.$ac_ext >&5
20411 cf_cv_type_of_bool=unknown
20412 fi
20413 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20414 fi
20415
20416 fi
20417
20418         rm -f cf_test.out
20419 echo "$as_me:20419: result: $cf_cv_type_of_bool" >&5
20420 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20421 if test "$cf_cv_type_of_bool" = unknown ; then
20422         case .$NCURSES_BOOL in #(vi
20423         .auto|.) NCURSES_BOOL=unsigned;;
20424         esac
20425         { echo "$as_me:20425: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20426 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20427         cf_cv_type_of_bool=$NCURSES_BOOL
20428 fi
20429
20430                 else
20431                         echo "$as_me:20431: checking for fallback type of bool" >&5
20432 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20433                         case "$host_cpu" in #(vi
20434                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20435                         *)      cf_cv_type_of_bool=int  ;;
20436                         esac
20437                         echo "$as_me:20437: result: $cf_cv_type_of_bool" >&5
20438 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20439                 fi
20440         fi
20441 fi
20442
20443 # If the C compiler did not declare bool, and we did not determine that the C++
20444 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20445 # ncurses library use the same type as C++ bool.  Note that this allows one to
20446 # specify the type of bool in a configure-script option and postpone
20447 # integration with the C++ compiler provided that the types are compatible.
20448 USE_CXX_BOOL=1
20449 if test $cf_cv_cc_bool_type = 1
20450 then
20451         # oops: C has a bool.  Unlikely, but C++ could differ.
20452         USE_CXX_BOOL=0
20453 elif test $cf_cv_builtin_bool = 0
20454 then
20455         # C++ has no bool
20456         USE_CXX_BOOL=0
20457 else
20458         # this is the normal case
20459         USE_CXX_BOOL='defined(__cplusplus)'
20460 fi
20461
20462 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20463
20464         if test "$cf_with_ada" != "no" ; then
20465                 if test "$with_libtool" != "no"; then
20466                         { echo "$as_me:20466: WARNING: libtool does not support Ada - disabling feature" >&5
20467 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20468                         cf_with_ada=no
20469                 fi
20470         fi
20471
20472         if test "$cf_with_ada" != "no" ; then
20473
20474 cf_ada_make=gnatmake
20475 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20476 set dummy $cf_ada_make; ac_word=$2
20477 echo "$as_me:20477: checking for $ac_word" >&5
20478 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20479 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20480   echo $ECHO_N "(cached) $ECHO_C" >&6
20481 else
20482   if test -n "$gnat_exists"; then
20483   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20484 else
20485   ac_save_IFS=$IFS; IFS=$ac_path_separator
20486 ac_dummy="$PATH"
20487 for ac_dir in $ac_dummy; do
20488   IFS=$ac_save_IFS
20489   test -z "$ac_dir" && ac_dir=.
20490   $as_executable_p "$ac_dir/$ac_word" || continue
20491 ac_cv_prog_gnat_exists="yes"
20492 echo "$as_me:20492: found $ac_dir/$ac_word" >&5
20493 break
20494 done
20495
20496   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20497 fi
20498 fi
20499 gnat_exists=$ac_cv_prog_gnat_exists
20500 if test -n "$gnat_exists"; then
20501   echo "$as_me:20501: result: $gnat_exists" >&5
20502 echo "${ECHO_T}$gnat_exists" >&6
20503 else
20504   echo "$as_me:20504: result: no" >&5
20505 echo "${ECHO_T}no" >&6
20506 fi
20507
20508 if test "$ac_cv_prog_gnat_exists" = no; then
20509    cf_ada_make=
20510    cf_cv_prog_gnat_correct=no
20511 else
20512
20513 echo "$as_me:20513: checking for gnat version" >&5
20514 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20515 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20516         grep '[0-9].[0-9][0-9]*' |\
20517     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20518 echo "$as_me:20518: result: $cf_gnat_version" >&5
20519 echo "${ECHO_T}$cf_gnat_version" >&6
20520
20521 case $cf_gnat_version in #(vi
20522 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20523         cf_cv_prog_gnat_correct=yes
20524         ;;
20525 *)
20526         { echo "$as_me:20526: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20527 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20528         cf_cv_prog_gnat_correct=no
20529         ;;
20530 esac
20531
20532    # Extract the first word of "m4", so it can be a program name with args.
20533 set dummy m4; ac_word=$2
20534 echo "$as_me:20534: checking for $ac_word" >&5
20535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20536 if test "${ac_cv_prog_M4_exists+set}" = set; then
20537   echo $ECHO_N "(cached) $ECHO_C" >&6
20538 else
20539   if test -n "$M4_exists"; then
20540   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20541 else
20542   ac_save_IFS=$IFS; IFS=$ac_path_separator
20543 ac_dummy="$PATH"
20544 for ac_dir in $ac_dummy; do
20545   IFS=$ac_save_IFS
20546   test -z "$ac_dir" && ac_dir=.
20547   $as_executable_p "$ac_dir/$ac_word" || continue
20548 ac_cv_prog_M4_exists="yes"
20549 echo "$as_me:20549: found $ac_dir/$ac_word" >&5
20550 break
20551 done
20552
20553   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20554 fi
20555 fi
20556 M4_exists=$ac_cv_prog_M4_exists
20557 if test -n "$M4_exists"; then
20558   echo "$as_me:20558: result: $M4_exists" >&5
20559 echo "${ECHO_T}$M4_exists" >&6
20560 else
20561   echo "$as_me:20561: result: no" >&5
20562 echo "${ECHO_T}no" >&6
20563 fi
20564
20565    if test "$ac_cv_prog_M4_exists" = no; then
20566       cf_cv_prog_gnat_correct=no
20567       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20568    fi
20569    if test "$cf_cv_prog_gnat_correct" = yes; then
20570       echo "$as_me:20570: checking if GNAT works" >&5
20571 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20572
20573 rm -rf conftest* *~conftest*
20574 cat >>conftest.ads <<CF_EOF
20575 procedure conftest;
20576 CF_EOF
20577 cat >>conftest.adb <<CF_EOF
20578 with Text_IO;
20579 with GNAT.OS_Lib;
20580 procedure conftest is
20581 begin
20582    Text_IO.Put ("Hello World");
20583    Text_IO.New_Line;
20584    GNAT.OS_Lib.OS_Exit (0);
20585 end conftest;
20586 CF_EOF
20587 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20588    if ( ./conftest 1>&5 2>&1 ) ; then
20589       cf_cv_prog_gnat_correct=yes
20590    else
20591       cf_cv_prog_gnat_correct=no
20592    fi
20593 else
20594    cf_cv_prog_gnat_correct=no
20595 fi
20596 rm -rf conftest* *~conftest*
20597
20598       echo "$as_me:20598: result: $cf_cv_prog_gnat_correct" >&5
20599 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20600    fi
20601 fi
20602
20603                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20604
20605         ADAFLAGS="$ADAFLAGS -gnatpn"
20606
20607         echo "$as_me:20607: checking optimization options for ADAFLAGS" >&5
20608 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20609         case "$CFLAGS" in
20610         *-g*)
20611
20612         ADAFLAGS="$ADAFLAGS -g"
20613
20614                 ;;
20615         esac
20616         case "$CFLAGS" in
20617         *-O*)
20618                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20619
20620         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20621
20622                 ;;
20623         esac
20624         echo "$as_me:20624: result: $ADAFLAGS" >&5
20625 echo "${ECHO_T}$ADAFLAGS" >&6
20626
20627 echo "$as_me:20627: checking if GNATPREP supports -T option" >&5
20628 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20629 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20630   echo $ECHO_N "(cached) $ECHO_C" >&6
20631 else
20632
20633 cf_cv_gnatprep_opt_t=no
20634 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20635
20636 fi
20637 echo "$as_me:20637: result: $cf_cv_gnatprep_opt_t" >&5
20638 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20639 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20640
20641 echo "$as_me:20641: checking if GNAT supports generics" >&5
20642 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20643 case $cf_gnat_version in #(vi
20644 3.[1-9]*|[4-9].*) #(vi
20645         cf_gnat_generics=yes
20646         ;;
20647 *)
20648         cf_gnat_generics=no
20649         ;;
20650 esac
20651 echo "$as_me:20651: result: $cf_gnat_generics" >&5
20652 echo "${ECHO_T}$cf_gnat_generics" >&6
20653
20654 if test "$cf_gnat_generics" = yes
20655 then
20656         cf_compile_generics=generics
20657         cf_generic_objects="\${GENOBJS}"
20658 else
20659         cf_compile_generics=
20660         cf_generic_objects=
20661 fi
20662
20663 echo "$as_me:20663: checking if GNAT supports SIGINT" >&5
20664 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20665 if test "${cf_cv_gnat_sigint+set}" = set; then
20666   echo $ECHO_N "(cached) $ECHO_C" >&6
20667 else
20668
20669 rm -rf conftest* *~conftest*
20670 cat >>conftest.ads <<CF_EOF
20671 with Ada.Interrupts.Names;
20672
20673 package ConfTest is
20674
20675    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20676    pragma Unreserve_All_Interrupts;
20677    pragma Warnings (On);
20678
20679    protected Process is
20680       procedure Stop;
20681       function Continue return Boolean;
20682       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20683    private
20684       Done : Boolean := False;
20685    end Process;
20686
20687 end ConfTest;
20688 CF_EOF
20689 cat >>conftest.adb <<CF_EOF
20690 package body ConfTest is
20691    protected body Process is
20692       procedure Stop is
20693       begin
20694          Done := True;
20695       end Stop;
20696       function Continue return Boolean is
20697       begin
20698          return not Done;
20699       end Continue;
20700    end Process;
20701 end ConfTest;
20702 CF_EOF
20703 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20704       cf_cv_gnat_sigint=yes
20705 else
20706    cf_cv_gnat_sigint=no
20707 fi
20708 rm -rf conftest* *~conftest*
20709
20710 fi
20711 echo "$as_me:20711: result: $cf_cv_gnat_sigint" >&5
20712 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20713
20714 if test $cf_cv_gnat_sigint = yes ; then
20715         USE_GNAT_SIGINT=""
20716 else
20717         USE_GNAT_SIGINT="#"
20718 fi
20719
20720 cf_gnat_libraries=no
20721 cf_gnat_projects=no
20722
20723 if test "$enable_gnat_projects" != no ; then
20724 echo "$as_me:20724: checking if GNAT supports project files" >&5
20725 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20726 case $cf_gnat_version in #(vi
20727 3.[0-9]*) #(vi
20728         ;;
20729 *)
20730         case $cf_cv_system_name in #(vi
20731         cygwin*|msys*) #(vi
20732                 ;;
20733         *)
20734                 mkdir conftest.src conftest.bin conftest.lib
20735                 cd conftest.src
20736                 rm -rf conftest* *~conftest*
20737                 cat >>library.gpr <<CF_EOF
20738 project Library is
20739   Kind := External ("LIB_KIND");
20740   for Library_Name use "ConfTest";
20741   for Object_Dir use ".";
20742   for Library_ALI_Dir use External("LIBRARY_DIR");
20743   for Library_Version use External ("SONAME");
20744   for Library_Kind use Kind;
20745   for Library_Dir use External("BUILD_DIR");
20746   Source_Dir := External ("SOURCE_DIR");
20747   for Source_Dirs use (Source_Dir);
20748 end Library;
20749 CF_EOF
20750                 cat >>confpackage.ads <<CF_EOF
20751 package ConfPackage is
20752    procedure conftest;
20753 end ConfPackage;
20754 CF_EOF
20755                 cat >>confpackage.adb <<CF_EOF
20756 with Text_IO;
20757 package body ConfPackage is
20758    procedure conftest is
20759    begin
20760       Text_IO.Put ("Hello World");
20761       Text_IO.New_Line;
20762    end conftest;
20763 end ConfPackage;
20764 CF_EOF
20765                 if ( $cf_ada_make $ADAFLAGS \
20766                                 -Plibrary.gpr \
20767                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20768                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20769                                 -XSOURCE_DIR=`pwd` \
20770                                 -XSONAME=libConfTest.so.1 \
20771                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20772                         cf_gnat_projects=yes
20773                 fi
20774                 cd ..
20775                 if test -f conftest.lib/confpackage.ali
20776                 then
20777                         cf_gnat_libraries=yes
20778                 fi
20779                 rm -rf conftest* *~conftest*
20780                 ;;
20781         esac
20782         ;;
20783 esac
20784 echo "$as_me:20784: result: $cf_gnat_projects" >&5
20785 echo "${ECHO_T}$cf_gnat_projects" >&6
20786 fi # enable_gnat_projects
20787
20788 if test $cf_gnat_projects = yes
20789 then
20790         echo "$as_me:20790: checking if GNAT supports libraries" >&5
20791 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20792         echo "$as_me:20792: result: $cf_gnat_libraries" >&5
20793 echo "${ECHO_T}$cf_gnat_libraries" >&6
20794 fi
20795
20796 if test "$cf_gnat_projects" = yes
20797 then
20798         USE_OLD_MAKERULES="#"
20799         USE_GNAT_PROJECTS=""
20800 else
20801         USE_OLD_MAKERULES=""
20802         USE_GNAT_PROJECTS="#"
20803 fi
20804
20805 if test "$cf_gnat_libraries" = yes
20806 then
20807         USE_GNAT_LIBRARIES=""
20808 else
20809         USE_GNAT_LIBRARIES="#"
20810 fi
20811
20812 echo "$as_me:20812: checking for ada-compiler" >&5
20813 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20814
20815 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20816 if test "${with_ada_compiler+set}" = set; then
20817   withval="$with_ada_compiler"
20818   cf_ada_compiler=$withval
20819 else
20820   cf_ada_compiler=gnatmake
20821 fi;
20822
20823 echo "$as_me:20823: result: $cf_ada_compiler" >&5
20824 echo "${ECHO_T}$cf_ada_compiler" >&6
20825
20826                         cf_ada_package=terminal_interface
20827
20828 echo "$as_me:20828: checking for ada-include" >&5
20829 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20830
20831 # Check whether --with-ada-include or --without-ada-include was given.
20832 if test "${with_ada_include+set}" = set; then
20833   withval="$with_ada_include"
20834
20835 else
20836   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20837 fi; if test -n "$prefix/share/ada/adainclude" ; then
20838
20839 if test "x$prefix" != xNONE; then
20840   cf_path_syntax="$prefix"
20841 else
20842   cf_path_syntax="$ac_default_prefix"
20843 fi
20844
20845 case ".$withval" in #(vi
20846 .\$\(*\)*|.\'*\'*) #(vi
20847   ;;
20848 ..|./*|.\\*) #(vi
20849   ;;
20850 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20851   ;;
20852 .\${*prefix}*|.\${*dir}*) #(vi
20853   eval withval="$withval"
20854   case ".$withval" in #(vi
20855   .NONE/*)
20856     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20857     ;;
20858   esac
20859   ;; #(vi
20860 .no|.NONE/*)
20861   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20862   ;;
20863 *)
20864   { { echo "$as_me:20864: error: expected a pathname, not \"$withval\"" >&5
20865 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20866    { (exit 1); exit 1; }; }
20867   ;;
20868 esac
20869
20870 fi
20871 eval ADA_INCLUDE="$withval"
20872
20873 echo "$as_me:20873: result: $ADA_INCLUDE" >&5
20874 echo "${ECHO_T}$ADA_INCLUDE" >&6
20875
20876 echo "$as_me:20876: checking for ada-objects" >&5
20877 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20878
20879 # Check whether --with-ada-objects or --without-ada-objects was given.
20880 if test "${with_ada_objects+set}" = set; then
20881   withval="$with_ada_objects"
20882
20883 else
20884   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20885 fi; if test -n "$prefix/lib/ada/adalib" ; then
20886
20887 if test "x$prefix" != xNONE; then
20888   cf_path_syntax="$prefix"
20889 else
20890   cf_path_syntax="$ac_default_prefix"
20891 fi
20892
20893 case ".$withval" in #(vi
20894 .\$\(*\)*|.\'*\'*) #(vi
20895   ;;
20896 ..|./*|.\\*) #(vi
20897   ;;
20898 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20899   ;;
20900 .\${*prefix}*|.\${*dir}*) #(vi
20901   eval withval="$withval"
20902   case ".$withval" in #(vi
20903   .NONE/*)
20904     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20905     ;;
20906   esac
20907   ;; #(vi
20908 .no|.NONE/*)
20909   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20910   ;;
20911 *)
20912   { { echo "$as_me:20912: error: expected a pathname, not \"$withval\"" >&5
20913 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20914    { (exit 1); exit 1; }; }
20915   ;;
20916 esac
20917
20918 fi
20919 eval ADA_OBJECTS="$withval"
20920
20921 echo "$as_me:20921: result: $ADA_OBJECTS" >&5
20922 echo "${ECHO_T}$ADA_OBJECTS" >&6
20923
20924 echo "$as_me:20924: checking if an Ada95 shared-library should be built" >&5
20925 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20926
20927 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20928 if test "${with_ada_sharedlib+set}" = set; then
20929   withval="$with_ada_sharedlib"
20930   with_ada_sharedlib=$withval
20931 else
20932   with_ada_sharedlib=no
20933 fi;
20934 echo "$as_me:20934: result: $with_ada_sharedlib" >&5
20935 echo "${ECHO_T}$with_ada_sharedlib" >&6
20936
20937 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20938 MAKE_ADA_SHAREDLIB="#"
20939
20940 if test "x$with_ada_sharedlib" != xno
20941 then
20942         MAKE_ADA_SHAREDLIB=
20943         if test "x$with_ada_sharedlib" != xyes
20944         then
20945                 ADA_SHAREDLIB="$with_ada_sharedlib"
20946         fi
20947 fi
20948
20949                 fi
20950         fi
20951 else
20952         cf_with_ada=no
20953 fi
20954
20955 # do this "late" to avoid conflict with header-checks
20956 if test "x$with_widec" = xyes ; then
20957         echo "$as_me:20957: checking for wchar_t" >&5
20958 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20959 if test "${ac_cv_type_wchar_t+set}" = set; then
20960   echo $ECHO_N "(cached) $ECHO_C" >&6
20961 else
20962   cat >conftest.$ac_ext <<_ACEOF
20963 #line 20963 "configure"
20964 #include "confdefs.h"
20965 $ac_includes_default
20966 int
20967 main ()
20968 {
20969 if ((wchar_t *) 0)
20970   return 0;
20971 if (sizeof (wchar_t))
20972   return 0;
20973   ;
20974   return 0;
20975 }
20976 _ACEOF
20977 rm -f conftest.$ac_objext
20978 if { (eval echo "$as_me:20978: \"$ac_compile\"") >&5
20979   (eval $ac_compile) 2>&5
20980   ac_status=$?
20981   echo "$as_me:20981: \$? = $ac_status" >&5
20982   (exit $ac_status); } &&
20983          { ac_try='test -s conftest.$ac_objext'
20984   { (eval echo "$as_me:20984: \"$ac_try\"") >&5
20985   (eval $ac_try) 2>&5
20986   ac_status=$?
20987   echo "$as_me:20987: \$? = $ac_status" >&5
20988   (exit $ac_status); }; }; then
20989   ac_cv_type_wchar_t=yes
20990 else
20991   echo "$as_me: failed program was:" >&5
20992 cat conftest.$ac_ext >&5
20993 ac_cv_type_wchar_t=no
20994 fi
20995 rm -f conftest.$ac_objext conftest.$ac_ext
20996 fi
20997 echo "$as_me:20997: result: $ac_cv_type_wchar_t" >&5
20998 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20999
21000 echo "$as_me:21000: checking size of wchar_t" >&5
21001 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21002 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21003   echo $ECHO_N "(cached) $ECHO_C" >&6
21004 else
21005   if test "$ac_cv_type_wchar_t" = yes; then
21006   if test "$cross_compiling" = yes; then
21007   # Depending upon the size, compute the lo and hi bounds.
21008 cat >conftest.$ac_ext <<_ACEOF
21009 #line 21009 "configure"
21010 #include "confdefs.h"
21011 $ac_includes_default
21012 int
21013 main ()
21014 {
21015 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21016   ;
21017   return 0;
21018 }
21019 _ACEOF
21020 rm -f conftest.$ac_objext
21021 if { (eval echo "$as_me:21021: \"$ac_compile\"") >&5
21022   (eval $ac_compile) 2>&5
21023   ac_status=$?
21024   echo "$as_me:21024: \$? = $ac_status" >&5
21025   (exit $ac_status); } &&
21026          { ac_try='test -s conftest.$ac_objext'
21027   { (eval echo "$as_me:21027: \"$ac_try\"") >&5
21028   (eval $ac_try) 2>&5
21029   ac_status=$?
21030   echo "$as_me:21030: \$? = $ac_status" >&5
21031   (exit $ac_status); }; }; then
21032   ac_lo=0 ac_mid=0
21033   while :; do
21034     cat >conftest.$ac_ext <<_ACEOF
21035 #line 21035 "configure"
21036 #include "confdefs.h"
21037 $ac_includes_default
21038 int
21039 main ()
21040 {
21041 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21042   ;
21043   return 0;
21044 }
21045 _ACEOF
21046 rm -f conftest.$ac_objext
21047 if { (eval echo "$as_me:21047: \"$ac_compile\"") >&5
21048   (eval $ac_compile) 2>&5
21049   ac_status=$?
21050   echo "$as_me:21050: \$? = $ac_status" >&5
21051   (exit $ac_status); } &&
21052          { ac_try='test -s conftest.$ac_objext'
21053   { (eval echo "$as_me:21053: \"$ac_try\"") >&5
21054   (eval $ac_try) 2>&5
21055   ac_status=$?
21056   echo "$as_me:21056: \$? = $ac_status" >&5
21057   (exit $ac_status); }; }; then
21058   ac_hi=$ac_mid; break
21059 else
21060   echo "$as_me: failed program was:" >&5
21061 cat conftest.$ac_ext >&5
21062 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21063 fi
21064 rm -f conftest.$ac_objext conftest.$ac_ext
21065   done
21066 else
21067   echo "$as_me: failed program was:" >&5
21068 cat conftest.$ac_ext >&5
21069 ac_hi=-1 ac_mid=-1
21070   while :; do
21071     cat >conftest.$ac_ext <<_ACEOF
21072 #line 21072 "configure"
21073 #include "confdefs.h"
21074 $ac_includes_default
21075 int
21076 main ()
21077 {
21078 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21079   ;
21080   return 0;
21081 }
21082 _ACEOF
21083 rm -f conftest.$ac_objext
21084 if { (eval echo "$as_me:21084: \"$ac_compile\"") >&5
21085   (eval $ac_compile) 2>&5
21086   ac_status=$?
21087   echo "$as_me:21087: \$? = $ac_status" >&5
21088   (exit $ac_status); } &&
21089          { ac_try='test -s conftest.$ac_objext'
21090   { (eval echo "$as_me:21090: \"$ac_try\"") >&5
21091   (eval $ac_try) 2>&5
21092   ac_status=$?
21093   echo "$as_me:21093: \$? = $ac_status" >&5
21094   (exit $ac_status); }; }; then
21095   ac_lo=$ac_mid; break
21096 else
21097   echo "$as_me: failed program was:" >&5
21098 cat conftest.$ac_ext >&5
21099 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21100 fi
21101 rm -f conftest.$ac_objext conftest.$ac_ext
21102   done
21103 fi
21104 rm -f conftest.$ac_objext conftest.$ac_ext
21105 # Binary search between lo and hi bounds.
21106 while test "x$ac_lo" != "x$ac_hi"; do
21107   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21108   cat >conftest.$ac_ext <<_ACEOF
21109 #line 21109 "configure"
21110 #include "confdefs.h"
21111 $ac_includes_default
21112 int
21113 main ()
21114 {
21115 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21116   ;
21117   return 0;
21118 }
21119 _ACEOF
21120 rm -f conftest.$ac_objext
21121 if { (eval echo "$as_me:21121: \"$ac_compile\"") >&5
21122   (eval $ac_compile) 2>&5
21123   ac_status=$?
21124   echo "$as_me:21124: \$? = $ac_status" >&5
21125   (exit $ac_status); } &&
21126          { ac_try='test -s conftest.$ac_objext'
21127   { (eval echo "$as_me:21127: \"$ac_try\"") >&5
21128   (eval $ac_try) 2>&5
21129   ac_status=$?
21130   echo "$as_me:21130: \$? = $ac_status" >&5
21131   (exit $ac_status); }; }; then
21132   ac_hi=$ac_mid
21133 else
21134   echo "$as_me: failed program was:" >&5
21135 cat conftest.$ac_ext >&5
21136 ac_lo=`expr $ac_mid + 1`
21137 fi
21138 rm -f conftest.$ac_objext conftest.$ac_ext
21139 done
21140 ac_cv_sizeof_wchar_t=$ac_lo
21141 else
21142   if test "$cross_compiling" = yes; then
21143   { { echo "$as_me:21143: error: cannot run test program while cross compiling" >&5
21144 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21145    { (exit 1); exit 1; }; }
21146 else
21147   cat >conftest.$ac_ext <<_ACEOF
21148 #line 21148 "configure"
21149 #include "confdefs.h"
21150 $ac_includes_default
21151 int
21152 main ()
21153 {
21154 FILE *f = fopen ("conftest.val", "w");
21155 if (!f)
21156   $ac_main_return (1);
21157 fprintf (f, "%d", (sizeof (wchar_t)));
21158 fclose (f);
21159   ;
21160   return 0;
21161 }
21162 _ACEOF
21163 rm -f conftest$ac_exeext
21164 if { (eval echo "$as_me:21164: \"$ac_link\"") >&5
21165   (eval $ac_link) 2>&5
21166   ac_status=$?
21167   echo "$as_me:21167: \$? = $ac_status" >&5
21168   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21169   { (eval echo "$as_me:21169: \"$ac_try\"") >&5
21170   (eval $ac_try) 2>&5
21171   ac_status=$?
21172   echo "$as_me:21172: \$? = $ac_status" >&5
21173   (exit $ac_status); }; }; then
21174   ac_cv_sizeof_wchar_t=`cat conftest.val`
21175 else
21176   echo "$as_me: program exited with status $ac_status" >&5
21177 echo "$as_me: failed program was:" >&5
21178 cat conftest.$ac_ext >&5
21179 fi
21180 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21181 fi
21182 fi
21183 rm -f conftest.val
21184 else
21185   ac_cv_sizeof_wchar_t=0
21186 fi
21187 fi
21188 echo "$as_me:21188: result: $ac_cv_sizeof_wchar_t" >&5
21189 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21190 cat >>confdefs.h <<EOF
21191 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21192 EOF
21193
21194 fi
21195
21196 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21197 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21198 ###
21199 ### ticlib modules may be a separate library, otherwise contained in termlib.
21200 ### termlib modules may be a separate library, otherwise contained in ncurses.
21201 ###
21202 ### The of "+" or " " between the tokens controls the way the script
21203 ### chooses to split module lists into libraries.
21204 ###
21205 ### (see CF_LIB_RULES).
21206 echo "$as_me:21206: checking for library subsets" >&5
21207 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21208 LIB_SUBSETS=
21209
21210 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21211         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21212         if test "$with_ticlib" != no ; then
21213                 LIB_SUBSETS="${LIB_SUBSETS} "
21214         else
21215                 LIB_SUBSETS="${LIB_SUBSETS}+"
21216         fi
21217 fi
21218
21219 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21220 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21221
21222 if test "$with_termlib" != no ; then
21223         LIB_SUBSETS="${LIB_SUBSETS} "
21224 else
21225         LIB_SUBSETS="${LIB_SUBSETS}+"
21226 fi
21227
21228 LIB_SUBSETS="${LIB_SUBSETS}base"
21229
21230 # Most term-driver calls are to tinfo, but some like init_pair are to the
21231 # base library (so it resides in base).
21232 if test "$with_term_driver" != no ; then
21233         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21234         case $cf_cv_system_name in #(vi
21235         *mingw32*|*mingw64*) #(vi
21236                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21237                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21238                 ;;
21239         *) #(vi
21240                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21241                 ;;
21242         esac
21243 fi
21244
21245 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21246 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21247
21248 echo "$as_me:21248: result: $LIB_SUBSETS" >&5
21249 echo "${ECHO_T}$LIB_SUBSETS" >&6
21250
21251 ### Construct the list of include-directories to be generated
21252
21253 if test "$srcdir" != "."; then
21254         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21255 fi
21256 CPPFLAGS="-I../include $CPPFLAGS"
21257 if test "$srcdir" != "."; then
21258         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21259 fi
21260 CPPFLAGS="-I. $CPPFLAGS"
21261
21262 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21263 if test "$srcdir" != "."; then
21264         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21265 fi
21266 if test "$GCC" != yes; then
21267         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21268 elif test "$includedir" != "/usr/include"; then
21269         if test "$includedir" = '${prefix}/include' ; then
21270                 if test x$prefix != x/usr ; then
21271                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21272                 fi
21273         else
21274                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21275         fi
21276 fi
21277
21278 ### Build up pieces for makefile rules
21279 echo "$as_me:21279: checking default library suffix" >&5
21280 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21281
21282         case $DFT_LWR_MODEL in
21283         libtool) DFT_ARG_SUFFIX=''   ;;
21284         normal)  DFT_ARG_SUFFIX=''   ;;
21285         debug)   DFT_ARG_SUFFIX='_g' ;;
21286         profile) DFT_ARG_SUFFIX='_p' ;;
21287         shared)  DFT_ARG_SUFFIX=''   ;;
21288         esac
21289         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21290 echo "$as_me:21290: result: $DFT_ARG_SUFFIX" >&5
21291 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21292
21293 echo "$as_me:21293: checking default library-dependency suffix" >&5
21294 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21295
21296         case X$DFT_LWR_MODEL in #(vi
21297         Xlibtool) #(vi
21298                 DFT_LIB_SUFFIX='.la'
21299                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21300                 ;;
21301         Xdebug) #(vi
21302                 DFT_LIB_SUFFIX='_g.a'
21303                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21304                 ;;
21305         Xprofile) #(vi
21306                 DFT_LIB_SUFFIX='_p.a'
21307                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21308                 ;;
21309         Xshared) #(vi
21310                 case $cf_cv_system_name in
21311                 aix[5-7]*) #(vi
21312                         DFT_LIB_SUFFIX='.so'
21313                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21314                         ;;
21315                 cygwin*|msys*|mingw*) #(vi
21316                         DFT_LIB_SUFFIX='.dll'
21317                         DFT_DEP_SUFFIX='.dll.a'
21318                         ;;
21319                 darwin*) #(vi
21320                         DFT_LIB_SUFFIX='.dylib'
21321                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21322                         ;;
21323                 hpux*) #(vi
21324                         case $target in
21325                         ia64*) #(vi
21326                                 DFT_LIB_SUFFIX='.so'
21327                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21328                                 ;;
21329                         *) #(vi
21330                                 DFT_LIB_SUFFIX='.sl'
21331                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21332                                 ;;
21333                         esac
21334                         ;;
21335                 *) #(vi
21336                         DFT_LIB_SUFFIX='.so'
21337                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21338                         ;;
21339                 esac
21340                 ;;
21341         *)
21342                 DFT_LIB_SUFFIX='.a'
21343                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21344                 ;;
21345         esac
21346         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21347         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21348 echo "$as_me:21348: result: $DFT_DEP_SUFFIX" >&5
21349 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21350
21351 echo "$as_me:21351: checking default object directory" >&5
21352 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21353
21354         case $DFT_LWR_MODEL in
21355         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21356         normal)  DFT_OBJ_SUBDIR='objects' ;;
21357         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21358         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21359         shared)
21360                 case $cf_cv_system_name in #(vi
21361                 cygwin|msys) #(vi
21362                         DFT_OBJ_SUBDIR='objects' ;;
21363                 *)
21364                         DFT_OBJ_SUBDIR='obj_s' ;;
21365                 esac
21366         esac
21367 echo "$as_me:21367: result: $DFT_OBJ_SUBDIR" >&5
21368 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21369
21370 if test "x$cf_with_cxx" = xyes ; then
21371 echo "$as_me:21371: checking c++ library-dependency suffix" >&5
21372 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21373 if test "$with_libtool" != "no"; then
21374         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21375         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21376 elif test "$with_shared_cxx" != "no"; then
21377         # also for g++ users...
21378         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21379 else
21380         # we normally make a static library because C/C++ library rules differ
21381
21382         case Xnormal in #(vi
21383         Xlibtool) #(vi
21384                 CXX_LIB_SUFFIX='.la'
21385                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21386                 ;;
21387         Xdebug) #(vi
21388                 CXX_LIB_SUFFIX='_g.a'
21389                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21390                 ;;
21391         Xprofile) #(vi
21392                 CXX_LIB_SUFFIX='_p.a'
21393                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21394                 ;;
21395         Xshared) #(vi
21396                 case $cf_cv_system_name in
21397                 aix[5-7]*) #(vi
21398                         CXX_LIB_SUFFIX='.so'
21399                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21400                         ;;
21401                 cygwin*|msys*|mingw*) #(vi
21402                         CXX_LIB_SUFFIX='.dll'
21403                         CXX_DEP_SUFFIX='.dll.a'
21404                         ;;
21405                 darwin*) #(vi
21406                         CXX_LIB_SUFFIX='.dylib'
21407                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21408                         ;;
21409                 hpux*) #(vi
21410                         case $target in
21411                         ia64*) #(vi
21412                                 CXX_LIB_SUFFIX='.so'
21413                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21414                                 ;;
21415                         *) #(vi
21416                                 CXX_LIB_SUFFIX='.sl'
21417                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21418                                 ;;
21419                         esac
21420                         ;;
21421                 *) #(vi
21422                         CXX_LIB_SUFFIX='.so'
21423                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21424                         ;;
21425                 esac
21426                 ;;
21427         *)
21428                 CXX_LIB_SUFFIX='.a'
21429                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21430                 ;;
21431         esac
21432         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21433         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21434
21435 fi
21436 echo "$as_me:21436: result: $CXX_LIB_SUFFIX" >&5
21437 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21438
21439 fi
21440
21441 # do not want -ldl in build except as needed for -lncurses dependency
21442 if test "x$with_dlsym" = xyes ; then
21443 if test $DFT_LWR_MODEL = shared || \
21444    test $DFT_LWR_MODEL = libtool ; then
21445
21446 # remove dl library from $LIBS
21447 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21448
21449 fi
21450 fi
21451 ### Set up low-level terminfo dependencies for makefiles.
21452
21453 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21454 # do not need libdl
21455 TICS_LIST=
21456 if test "x$with_dlsym" = xyes ; then
21457
21458 # remove dl library from $SHLIB_LIST
21459 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21460
21461 fi
21462
21463 if test "$with_ticlib" != no ; then
21464
21465         if test "x$with_ticlib" != xyes ; then
21466                 TICS_NAME=$with_ticlib
21467                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21468                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21469                 TICS_LIB_SUFFIX="${with_ticlib}"
21470         else
21471                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21472                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21473                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21474         fi
21475         TICS_LDFLAGS="-L${LIB_DIR}"
21476         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21477 else
21478         TICS_LDFLAGS="-L${LIB_DIR}"
21479         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21480 fi
21481
21482 if test "$with_termlib" != no ; then
21483
21484         if test "x$with_termlib" != xyes ; then
21485                 TINFO_NAME=$with_termlib
21486                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21487                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21488                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21489                 TINFO_LIB_SUFFIX="${with_termlib}"
21490         else
21491                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21492                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21493                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21494                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21495         fi
21496
21497         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21498         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21499         if test "$DFT_LWR_MODEL" = "libtool"; then
21500                 TEST_ARGS="${TEST_DEPS}"
21501                 TEST_ARG2="${TEST_DEP2}"
21502                 TINFO_LDFLAGS="-L${LIB_DIR}"
21503                 TINFO_LIBS="$TEST_ARGS"
21504                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21505                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21506         else
21507                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21508                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21509                 if test "x$with_term_driver" != xno ; then
21510                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21511                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21512                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21513                 else
21514                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21515                         TINFO_LIBS="$TEST_ARGS"
21516                 fi
21517                 TINFO_LDFLAGS="-L${LIB_DIR}"
21518                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21519         fi
21520 else
21521         # the next lines are needed for linking libtic over libncurses
21522         TINFO_NAME=${LIB_NAME}
21523         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21524         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21525         if test "x$with_tic_depends" = xyes ; then
21526                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21527         else
21528                 TICS_LIST="$SHLIB_LIST"
21529         fi
21530
21531         TINFO_LDFLAGS="-L${LIB_DIR}"
21532         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21533 fi
21534
21535 if test "$DFT_LWR_MODEL" = shared ; then
21536         case $cf_cv_system_name in #(vi
21537         cygwin*|msys*)
21538                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21539                 TINFO_SUFFIX=.dll
21540                 ;;
21541         esac
21542 fi
21543
21544 if test "x$with_dlsym" = xyes ; then
21545
21546 # remove dl library from $TICS_LIST
21547 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21548
21549 fi
21550
21551 if test "$DFT_LWR_MODEL" = "libtool"; then
21552     OBJEXT=lo
21553 fi
21554
21555 # needed for Ada95
21556 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21557
21558 case $DFT_LWR_MODEL in
21559 normal|debug|profile)
21560
21561 if test "$GCC" = yes ; then
21562         case $cf_cv_system_name in #(
21563         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21564                 LDFLAGS_STATIC=
21565                 LDFLAGS_SHARED=
21566                 ;;
21567     *)  #( normally, except when broken
21568         LDFLAGS_STATIC=-static
21569         LDFLAGS_SHARED=-dynamic
21570         ;;
21571     esac
21572 else
21573         case $cf_cv_system_name in #(
21574         aix[4-7]*)      #( from ld manpage
21575                 LDFLAGS_STATIC=-bstatic
21576                 LDFLAGS_SHARED=-bdynamic
21577                 ;;
21578         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21579                 # We could also use just "archive" and "shared".
21580                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21581                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21582                 ;;
21583         irix*)          #( from ld manpage IRIX64
21584                 LDFLAGS_STATIC=-Bstatic
21585                 LDFLAGS_SHARED=-Bdynamic
21586                 ;;
21587         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21588                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21589                 LDFLAGS_STATIC=-noso
21590                 LDFLAGS_SHARED=-so_archive
21591                 ;;
21592         solaris2*)
21593                 LDFLAGS_STATIC=-Bstatic
21594                 LDFLAGS_SHARED=-Bdynamic
21595                 ;;
21596         esac
21597 fi
21598
21599 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21600 then
21601         echo "$as_me:21601: checking if linker supports switching between static/dynamic" >&5
21602 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21603
21604         rm -f libconftest.a
21605         cat >conftest.$ac_ext <<EOF
21606 #line 21606 "configure"
21607 #include <stdio.h>
21608 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21609 EOF
21610         if { (eval echo "$as_me:21610: \"$ac_compile\"") >&5
21611   (eval $ac_compile) 2>&5
21612   ac_status=$?
21613   echo "$as_me:21613: \$? = $ac_status" >&5
21614   (exit $ac_status); } ; then
21615                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21616                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21617         fi
21618         rm -f conftest.*
21619
21620         cf_save_LIBS="$LIBS"
21621
21622         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21623         cat >conftest.$ac_ext <<_ACEOF
21624 #line 21624 "configure"
21625 #include "confdefs.h"
21626
21627 #line 21627 "configure"
21628 #include <stdio.h>
21629 int cf_ldflags_static(FILE *fp);
21630
21631 int
21632 main ()
21633 {
21634
21635         return cf_ldflags_static(stdin);
21636
21637   ;
21638   return 0;
21639 }
21640 _ACEOF
21641 rm -f conftest.$ac_objext conftest$ac_exeext
21642 if { (eval echo "$as_me:21642: \"$ac_link\"") >&5
21643   (eval $ac_link) 2>&5
21644   ac_status=$?
21645   echo "$as_me:21645: \$? = $ac_status" >&5
21646   (exit $ac_status); } &&
21647          { ac_try='test -s conftest$ac_exeext'
21648   { (eval echo "$as_me:21648: \"$ac_try\"") >&5
21649   (eval $ac_try) 2>&5
21650   ac_status=$?
21651   echo "$as_me:21651: \$? = $ac_status" >&5
21652   (exit $ac_status); }; }; then
21653
21654         # some linkers simply ignore the -dynamic
21655         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21656         *static*) # (vi
21657                 cf_ldflags_static=no
21658                 ;;
21659         *)
21660                 cf_ldflags_static=yes
21661                 ;;
21662         esac
21663
21664 else
21665   echo "$as_me: failed program was:" >&5
21666 cat conftest.$ac_ext >&5
21667 cf_ldflags_static=no
21668 fi
21669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21670
21671         rm -f libconftest.*
21672         LIBS="$cf_save_LIBS"
21673
21674         echo "$as_me:21674: result: $cf_ldflags_static" >&5
21675 echo "${ECHO_T}$cf_ldflags_static" >&6
21676
21677         if test $cf_ldflags_static != yes
21678         then
21679                 LDFLAGS_STATIC=
21680                 LDFLAGS_SHARED=
21681         fi
21682 else
21683         LDFLAGS_STATIC=
21684         LDFLAGS_SHARED=
21685 fi
21686
21687         ;;
21688 esac
21689
21690 echo "$as_me:21690: checking where we will install curses.h" >&5
21691 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21692
21693 includesubdir=
21694 if test "$with_overwrite" = no && \
21695  ( test "x$includedir" = 'x${prefix}/include' || \
21696    test "x$includedir" = "x${prefix}/include" )
21697 then
21698         includesubdir="/ncurses${LIB_SUFFIX}"
21699 fi
21700 echo "$as_me:21700: result: ${includedir}${includesubdir}" >&5
21701 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21702
21703 ### Resolve a conflict between normal and wide-curses by forcing applications
21704 ### that will need libutf8 to add it to their configure script.
21705 if test "$with_overwrite" != no ; then
21706 if test "$NCURSES_LIBUTF8" = 1 ; then
21707         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21708         { echo "$as_me:21708: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21709 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21710 fi
21711 fi
21712 WITH_OVERWRITE=$with_overwrite
21713
21714 # used to separate tack out of the tree
21715 NCURSES_TREE=
21716
21717 ### predefined stuff for the test programs
21718
21719 cat >>confdefs.h <<\EOF
21720 #define HAVE_SLK_COLOR 1
21721 EOF
21722
21723 ### Construct the list of subdirectories for which we'll customize makefiles
21724 ### with the appropriate compile-rules.
21725
21726 echo "$as_me:21726: checking for src modules" >&5
21727 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21728
21729 # dependencies and linker-arguments for test-programs
21730 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21731 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21732 if test "$DFT_LWR_MODEL" = "libtool"; then
21733         TEST_ARGS="${TEST_DEPS}"
21734         TEST_ARG2="${TEST_DEP2}"
21735 else
21736         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21737         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21738 fi
21739
21740 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21741 cf_cv_src_modules=
21742 for cf_dir in $modules_to_build
21743 do
21744         if test -f $srcdir/$cf_dir/modules; then
21745
21746                 # We may/may not have tack in the distribution, though the
21747                 # makefile is.
21748                 if test $cf_dir = tack ; then
21749                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21750                                 continue
21751                         fi
21752                 fi
21753
21754                 if test -z "$cf_cv_src_modules"; then
21755                         cf_cv_src_modules=$cf_dir
21756                 else
21757                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21758                 fi
21759
21760                 # Make the ncurses_cfg.h file record the library interface files as
21761                 # well.  These are header files that are the same name as their
21762                 # directory.  Ncurses is the only library that does not follow
21763                 # that pattern.
21764                 if test $cf_dir = tack ; then
21765                         continue
21766                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21767
21768 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21769
21770                         cat >>confdefs.h <<EOF
21771 #define HAVE_${cf_have_include}_H 1
21772 EOF
21773
21774                         cat >>confdefs.h <<EOF
21775 #define HAVE_LIB${cf_have_include} 1
21776 EOF
21777
21778                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21779                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21780                         if test "$DFT_LWR_MODEL" = "libtool"; then
21781                                 TEST_ARGS="${TEST_DEPS}"
21782                                 TEST_ARG2="${TEST_DEP2}"
21783                         else
21784                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21785                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21786                         fi
21787                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21788                 fi
21789         fi
21790 done
21791 echo "$as_me:21791: result: $cf_cv_src_modules" >&5
21792 echo "${ECHO_T}$cf_cv_src_modules" >&6
21793
21794 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21795 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21796
21797 SRC_SUBDIRS=
21798 if test "x$cf_with_manpages" != xno ; then
21799         SRC_SUBDIRS="$SRC_SUBDIRS man"
21800 fi
21801 SRC_SUBDIRS="$SRC_SUBDIRS include"
21802 for cf_dir in $cf_cv_src_modules
21803 do
21804         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21805 done
21806 if test "x$cf_with_tests" != "xno" ; then
21807         SRC_SUBDIRS="$SRC_SUBDIRS test"
21808 fi
21809 # always make this, to install the ncurses-config script
21810 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21811 if test "$cf_with_cxx_binding" != no; then
21812         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21813         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21814 fi
21815
21816 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21817 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21818
21819 ADA_SUBDIRS=
21820 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21821         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21822         ADA_SUBDIRS="gen src"
21823         if test "x$cf_with_tests" != "xno" ; then
21824                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21825         fi
21826 fi
21827
21828 SUB_MAKEFILES=
21829 for cf_dir in $SRC_SUBDIRS
21830 do
21831         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21832 done
21833
21834 if test -n "$ADA_SUBDIRS"; then
21835         for cf_dir in $ADA_SUBDIRS
21836         do
21837                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21838         done
21839
21840 fi
21841
21842 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21843    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21844    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21845 fi
21846
21847 DIRS_TO_MAKE="lib"
21848 for cf_item in $cf_list_models
21849 do
21850
21851         case $cf_item in
21852         libtool) cf_subdir='obj_lo'  ;;
21853         normal)  cf_subdir='objects' ;;
21854         debug)   cf_subdir='obj_g' ;;
21855         profile) cf_subdir='obj_p' ;;
21856         shared)
21857                 case $cf_cv_system_name in #(vi
21858                 cygwin|msys) #(vi
21859                         cf_subdir='objects' ;;
21860                 *)
21861                         cf_subdir='obj_s' ;;
21862                 esac
21863         esac
21864
21865         for cf_item2 in $DIRS_TO_MAKE
21866         do
21867                 test $cf_item2 = $cf_subdir && break
21868         done
21869         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21870 done
21871 for cf_dir in $DIRS_TO_MAKE
21872 do
21873         test ! -d $cf_dir && mkdir $cf_dir
21874 done
21875
21876 # symbols that differ when compiling Ada95 by itself.
21877 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21878
21879 # values to use as strings
21880
21881 cat >>confdefs.h <<EOF
21882 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21883 EOF
21884
21885 cat >>confdefs.h <<EOF
21886 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21887 EOF
21888
21889 ### Now that we're done running tests, add the compiler-warnings, if any
21890
21891 cf_fix_cppflags=no
21892 cf_new_cflags=
21893 cf_new_cppflags=
21894 cf_new_extra_cppflags=
21895
21896 for cf_add_cflags in $EXTRA_CFLAGS
21897 do
21898 case $cf_fix_cppflags in
21899 no)
21900         case $cf_add_cflags in #(vi
21901         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21902                 case $cf_add_cflags in
21903                 -D*)
21904                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21905
21906                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21907                                 && test -z "${cf_tst_cflags}" \
21908                                 && cf_fix_cppflags=yes
21909
21910                         if test $cf_fix_cppflags = yes ; then
21911                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21912                                 continue
21913                         elif test "${cf_tst_cflags}" = "\"'" ; then
21914                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21915                                 continue
21916                         fi
21917                         ;;
21918                 esac
21919                 case "$CPPFLAGS" in
21920                 *$cf_add_cflags) #(vi
21921                         ;;
21922                 *) #(vi
21923                         case $cf_add_cflags in #(vi
21924                         -D*)
21925                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21926
21927 CPPFLAGS=`echo "$CPPFLAGS" | \
21928         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21929                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21930
21931                                 ;;
21932                         esac
21933                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21934                         ;;
21935                 esac
21936                 ;;
21937         *)
21938                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21939                 ;;
21940         esac
21941         ;;
21942 yes)
21943         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21944
21945         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21946
21947         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21948                 && test -z "${cf_tst_cflags}" \
21949                 && cf_fix_cppflags=no
21950         ;;
21951 esac
21952 done
21953
21954 if test -n "$cf_new_cflags" ; then
21955
21956         CFLAGS="$CFLAGS $cf_new_cflags"
21957 fi
21958
21959 if test -n "$cf_new_cppflags" ; then
21960
21961         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21962 fi
21963
21964 if test -n "$cf_new_extra_cppflags" ; then
21965
21966         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21967 fi
21968
21969 ### Define substitutions for header files to avoid name-pollution
21970
21971 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21972         HAVE_TCGETATTR=1
21973 else
21974         HAVE_TCGETATTR=0
21975 fi
21976
21977 if test "x$ac_cv_header_stdint_h" = xyes ; then
21978         HAVE_STDINT_H=1
21979 else
21980         HAVE_STDINT_H=0
21981 fi
21982
21983 if test "x$ac_cv_header_termio_h" = xyes ; then
21984         HAVE_TERMIO_H=1
21985 else
21986         HAVE_TERMIO_H=0
21987 fi
21988
21989 if test "x$ac_cv_header_termios_h" = xyes ; then
21990         HAVE_TERMIOS_H=1
21991 else
21992         HAVE_TERMIOS_H=0
21993 fi
21994
21995 ################################################################################
21996 test "x$use_database" = xyes && \
21997 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21998
21999 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22000 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
22001
22002 if test "x$enable_pc_files" = xyes ; then \
22003 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22004 MAKE_PC_FILES=
22005 else
22006 MAKE_PC_FILES="#"
22007 fi
22008
22009 # Extract the first word of "tic", so it can be a program name with args.
22010 set dummy tic; ac_word=$2
22011 echo "$as_me:22011: checking for $ac_word" >&5
22012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22013 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22014   echo $ECHO_N "(cached) $ECHO_C" >&6
22015 else
22016   case $TIC_PATH in
22017   [\\/]* | ?:[\\/]*)
22018   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22019   ;;
22020   *)
22021   ac_save_IFS=$IFS; IFS=$ac_path_separator
22022 ac_dummy="$PATH:/usr/local/ncurses/bin"
22023 for ac_dir in $ac_dummy; do
22024   IFS=$ac_save_IFS
22025   test -z "$ac_dir" && ac_dir=.
22026   if $as_executable_p "$ac_dir/$ac_word"; then
22027    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22028    echo "$as_me:22028: found $ac_dir/$ac_word" >&5
22029    break
22030 fi
22031 done
22032
22033   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22034   ;;
22035 esac
22036 fi
22037 TIC_PATH=$ac_cv_path_TIC_PATH
22038
22039 if test -n "$TIC_PATH"; then
22040   echo "$as_me:22040: result: $TIC_PATH" >&5
22041 echo "${ECHO_T}$TIC_PATH" >&6
22042 else
22043   echo "$as_me:22043: result: no" >&5
22044 echo "${ECHO_T}no" >&6
22045 fi
22046
22047 if test -n "$FALLBACK_LIST"
22048 then
22049         if test "$TIC_PATH" = unknown
22050         then
22051                 { echo "$as_me:22051: WARNING: no tic program found for fallbacks" >&5
22052 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22053         fi
22054 fi
22055
22056 if test "x$cf_with_tests" != xno ; then
22057         MAKE_TESTS=
22058 else
22059         MAKE_TESTS="#"
22060 fi
22061
22062 ADAHTML_DIR=../../doc/html/ada
22063
22064 # these could be configurable, but are not currently
22065 PANEL_NAME=panel
22066 MENU_NAME=menu
22067 FORM_NAME=form
22068 CXX_NAME=ncurses++
22069
22070 # workaround for g++ versus Solaris (20131116)
22071 case $cf_cv_system_name in #(vi
22072 solaris2*)
22073         case "x$CPPFLAGS" in #(vi
22074         *-D_XOPEN_SOURCE_EXTENDED*)
22075                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22076
22077 echo "${as_me:-configure}:22077: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22078
22079                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22080                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22081                 ;;
22082         esac
22083         ;;
22084 esac
22085
22086 # Help to automatically enable the extended curses features when using either
22087 # the *-config or the ".pc" files by adding defines.
22088 echo "$as_me:22088: checking for defines to add to ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config script" >&5
22089 echo $ECHO_N "checking for defines to add to ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config script... $ECHO_C" >&6
22090 PKG_CFLAGS=
22091 for cf_loop1 in $CPPFLAGS_after_XOPEN
22092 do
22093         cf_found=no
22094         for cf_loop2 in $CPPFLAGS_before_XOPEN
22095         do
22096                 if test "x$cf_loop1" = "x$cf_loop2"
22097                 then
22098                         cf_found=yes
22099                         break
22100                 fi
22101         done
22102         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22103 done
22104 echo "$as_me:22104: result: $PKG_CFLAGS" >&5
22105 echo "${ECHO_T}$PKG_CFLAGS" >&6
22106
22107 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22108 case "x$NCURSES_OSPEED" in #(vi
22109 *short*) #(vi
22110         cf_compatible=1
22111         ;;
22112 *)
22113         cf_compatible=0
22114         ;;
22115 esac
22116
22117 cat >>confdefs.h <<EOF
22118 #define NCURSES_OSPEED_COMPAT $cf_compatible
22119 EOF
22120
22121 case "x$cf_cv_typeof_chtype" in
22122 xshort|xint|xlong)
22123         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22124         ;;
22125 esac
22126
22127 case "x$cf_cv_typeof_mmask_t" in
22128 xshort|xint|xlong)
22129         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22130         ;;
22131 esac
22132
22133 # substitute into misc/Makefile to suppress
22134 # (un)install.data from the
22135 # (un)install rules.
22136 if test "x$cf_with_db_install" = "xno"; then
22137         MISC_INSTALL_DATA=
22138         MISC_UNINSTALL_DATA=
22139 else
22140         MISC_INSTALL_DATA=install.data
22141         MISC_UNINSTALL_DATA=uninstall.data
22142 fi
22143
22144 SUB_SCRIPTS=
22145
22146 if test -n "$PACKAGE"
22147 then
22148         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22149         export PACKAGE
22150         echo "package: $PACKAGE"
22151 fi
22152
22153 UNALTERED_SYMS=
22154 cf_filter_syms=no
22155
22156 if test -n "$RESULTING_SYMS"
22157 then
22158         case $cf_cv_abi_version in
22159         [6789])
22160                 test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22161
22162 echo "${as_me:-configure}:22162: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22163
22164                 cf_filter_syms=yes
22165                 ;;
22166         *)
22167                 test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
22168
22169 echo "${as_me:-configure}:22169: testing will map symbols to default ABI ..." 1>&5
22170
22171                 ;;
22172         esac
22173 fi
22174
22175 if test "x$WILDCARD_SYMS" = xno
22176 then
22177         cf_filter_syms=yes
22178 fi
22179
22180 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22181 if test $cf_filter_syms = yes
22182 then
22183         RESULTING_SYMS=resulting.map
22184 fi
22185
22186 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"
22187 ac_config_commands="$ac_config_commands default"
22188 cat >confcache <<\_ACEOF
22189 # This file is a shell script that caches the results of configure
22190 # tests run on this system so they can be shared between configure
22191 # scripts and configure runs, see configure's option --config-cache.
22192 # It is not useful on other systems.  If it contains results you don't
22193 # want to keep, you may remove or edit it.
22194 #
22195 # config.status only pays attention to the cache file if you give it
22196 # the --recheck option to rerun configure.
22197 #
22198 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22199 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22200 # following values.
22201
22202 _ACEOF
22203
22204 # The following way of writing the cache mishandles newlines in values,
22205 # but we know of no workaround that is simple, portable, and efficient.
22206 # So, don't put newlines in cache variables' values.
22207 # Ultrix sh set writes to stderr and can't be redirected directly,
22208 # and sets the high bit in the cache file unless we assign to the vars.
22209 {
22210   (set) 2>&1 |
22211     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22212     *ac_space=\ *)
22213       # `set' does not quote correctly, so add quotes (double-quote
22214       # substitution turns \\\\ into \\, and sed turns \\ into \).
22215       sed -n \
22216         "s/'/'\\\\''/g;
22217           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22218       ;;
22219     *)
22220       # `set' quotes correctly as required by POSIX, so do not add quotes.
22221       sed -n \
22222         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22223       ;;
22224     esac;
22225 } |
22226   sed '
22227      t clear
22228      : clear
22229      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22230      t end
22231      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22232      : end' >>confcache
22233 if cmp -s $cache_file confcache; then :; else
22234   if test -w $cache_file; then
22235     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22236     cat confcache >$cache_file
22237   else
22238     echo "not updating unwritable cache $cache_file"
22239   fi
22240 fi
22241 rm -f confcache
22242
22243 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22244 # Let make expand exec_prefix.
22245 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22246
22247 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22248 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22249 # trailing colons and then remove the whole line if VPATH becomes empty
22250 # (actually we leave an empty line to preserve line numbers).
22251 if test "x$srcdir" = x.; then
22252   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22253 s/:*\$(srcdir):*/:/;
22254 s/:*\${srcdir}:*/:/;
22255 s/:*@srcdir@:*/:/;
22256 s/^\([^=]*=[    ]*\):*/\1/;
22257 s/:*$//;
22258 s/^[^=]*=[      ]*$//;
22259 }'
22260 fi
22261
22262 DEFS=-DHAVE_CONFIG_H
22263
22264 : ${CONFIG_STATUS=./config.status}
22265 ac_clean_files_save=$ac_clean_files
22266 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22267 { echo "$as_me:22267: creating $CONFIG_STATUS" >&5
22268 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22269 cat >$CONFIG_STATUS <<_ACEOF
22270 #! $SHELL
22271 # Generated automatically by configure.
22272 # Run this file to recreate the current configuration.
22273 # Compiler output produced by configure, useful for debugging
22274 # configure, is in config.log if it exists.
22275
22276 debug=false
22277 SHELL=\${CONFIG_SHELL-$SHELL}
22278 ac_cs_invocation="\$0 \$@"
22279
22280 _ACEOF
22281
22282 cat >>$CONFIG_STATUS <<\_ACEOF
22283 # Be Bourne compatible
22284 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22285   emulate sh
22286   NULLCMD=:
22287 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22288   set -o posix
22289 fi
22290
22291 # Name of the executable.
22292 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22293
22294 if expr a : '\(a\)' >/dev/null 2>&1; then
22295   as_expr=expr
22296 else
22297   as_expr=false
22298 fi
22299
22300 rm -f conf$$ conf$$.exe conf$$.file
22301 echo >conf$$.file
22302 if ln -s conf$$.file conf$$ 2>/dev/null; then
22303   # We could just check for DJGPP; but this test a) works b) is more generic
22304   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22305   if test -f conf$$.exe; then
22306     # Don't use ln at all; we don't have any links
22307     as_ln_s='cp -p'
22308   else
22309     as_ln_s='ln -s'
22310   fi
22311 elif ln conf$$.file conf$$ 2>/dev/null; then
22312   as_ln_s=ln
22313 else
22314   as_ln_s='cp -p'
22315 fi
22316 rm -f conf$$ conf$$.exe conf$$.file
22317
22318 as_executable_p="test -f"
22319
22320 # Support unset when possible.
22321 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22322   as_unset=unset
22323 else
22324   as_unset=false
22325 fi
22326
22327 # NLS nuisances.
22328 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22329 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22330 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22331 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22332 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22333 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22334 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22335 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22336
22337 # IFS
22338 # We need space, tab and new line, in precisely that order.
22339 as_nl='
22340 '
22341 IFS="   $as_nl"
22342
22343 # CDPATH.
22344 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22345
22346 exec 6>&1
22347
22348 _ACEOF
22349
22350 # Files that config.status was made for.
22351 if test -n "$ac_config_files"; then
22352   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22353 fi
22354
22355 if test -n "$ac_config_headers"; then
22356   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22357 fi
22358
22359 if test -n "$ac_config_links"; then
22360   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22361 fi
22362
22363 if test -n "$ac_config_commands"; then
22364   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22365 fi
22366
22367 cat >>$CONFIG_STATUS <<\EOF
22368
22369 ac_cs_usage="\
22370 \`$as_me' instantiates files from templates according to the
22371 current configuration.
22372
22373 Usage: $0 [OPTIONS] [FILE]...
22374
22375   -h, --help       print this help, then exit
22376   -V, --version    print version number, then exit
22377   -d, --debug      don't remove temporary files
22378       --recheck    update $as_me by reconfiguring in the same conditions
22379   --file=FILE[:TEMPLATE]
22380                    instantiate the configuration file FILE
22381   --header=FILE[:TEMPLATE]
22382                    instantiate the configuration header FILE
22383
22384 Configuration files:
22385 $config_files
22386
22387 Configuration headers:
22388 $config_headers
22389
22390 Configuration commands:
22391 $config_commands
22392
22393 Report bugs to <dickey@invisible-island.net>."
22394 EOF
22395
22396 cat >>$CONFIG_STATUS <<EOF
22397 ac_cs_version="\\
22398 config.status
22399 configured by $0, generated by GNU Autoconf 2.52.20141204,
22400   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22401
22402 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22403 Free Software Foundation, Inc.
22404 This config.status script is free software; the Free Software Foundation
22405 gives unlimited permission to copy, distribute and modify it."
22406 srcdir=$srcdir
22407 INSTALL="$INSTALL"
22408 EOF
22409
22410 cat >>$CONFIG_STATUS <<\EOF
22411 # If no file are specified by the user, then we need to provide default
22412 # value.  By we need to know if files were specified by the user.
22413 ac_need_defaults=:
22414 while test $# != 0
22415 do
22416   case $1 in
22417   --*=*)
22418     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22419     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22420     shift
22421     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22422     shift
22423     ;;
22424   -*);;
22425   *) # This is not an option, so the user has probably given explicit
22426      # arguments.
22427      ac_need_defaults=false;;
22428   esac
22429
22430   case $1 in
22431   # Handling of the options.
22432 EOF
22433 cat >>$CONFIG_STATUS <<EOF
22434   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22435     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22436     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22437 EOF
22438 cat >>$CONFIG_STATUS <<\EOF
22439   --version | --vers* | -V )
22440     echo "$ac_cs_version"; exit 0 ;;
22441   --he | --h)
22442     # Conflict between --help and --header
22443     { { echo "$as_me:22443: error: ambiguous option: $1
22444 Try \`$0 --help' for more information." >&5
22445 echo "$as_me: error: ambiguous option: $1
22446 Try \`$0 --help' for more information." >&2;}
22447    { (exit 1); exit 1; }; };;
22448   --help | --hel | -h )
22449     echo "$ac_cs_usage"; exit 0 ;;
22450   --debug | --d* | -d )
22451     debug=: ;;
22452   --file | --fil | --fi | --f )
22453     shift
22454     CONFIG_FILES="$CONFIG_FILES $1"
22455     ac_need_defaults=false;;
22456   --header | --heade | --head | --hea )
22457     shift
22458     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22459     ac_need_defaults=false;;
22460
22461   # This is an error.
22462   -*) { { echo "$as_me:22462: error: unrecognized option: $1
22463 Try \`$0 --help' for more information." >&5
22464 echo "$as_me: error: unrecognized option: $1
22465 Try \`$0 --help' for more information." >&2;}
22466    { (exit 1); exit 1; }; } ;;
22467
22468   *) ac_config_targets="$ac_config_targets $1" ;;
22469
22470   esac
22471   shift
22472 done
22473
22474 exec 5>>config.log
22475 cat >&5 << _ACEOF
22476
22477 ## ----------------------- ##
22478 ## Running config.status.  ##
22479 ## ----------------------- ##
22480
22481 This file was extended by $as_me 2.52.20141204, executed with
22482   CONFIG_FILES    = $CONFIG_FILES
22483   CONFIG_HEADERS  = $CONFIG_HEADERS
22484   CONFIG_LINKS    = $CONFIG_LINKS
22485   CONFIG_COMMANDS = $CONFIG_COMMANDS
22486   > $ac_cs_invocation
22487 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22488
22489 _ACEOF
22490 EOF
22491
22492 cat >>$CONFIG_STATUS <<EOF
22493 #
22494 # INIT-COMMANDS section.
22495 #
22496
22497 ### Special initialization commands, used to pass information from the
22498 ### configuration-run into config.status
22499
22500 AWK="$AWK"
22501 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22502 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22503 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22504 ECHO_LD="$ECHO_LD"
22505 LDCONFIG="$LDCONFIG"
22506 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22507 LIB_NAME="$LIB_NAME"
22508 LIB_PREFIX="$LIB_PREFIX"
22509 LIB_SUBSETS="$LIB_SUBSETS"
22510 LIB_SUFFIX="$LIB_SUFFIX"
22511 LIB_TRACING="$LIB_TRACING"
22512 LN_S="$LN_S"
22513 MAKE_TERMINFO="$MAKE_TERMINFO"
22514 NCURSES_MAJOR="$NCURSES_MAJOR"
22515 NCURSES_MINOR="$NCURSES_MINOR"
22516 NCURSES_OSPEED="$NCURSES_OSPEED"
22517 NCURSES_PATCH="$NCURSES_PATCH"
22518 SRC_SUBDIRS="$SRC_SUBDIRS"
22519 TERMINFO="$TERMINFO"
22520 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22521 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22522 TICS_NAME="$TICS_NAME"
22523 TIC_PATH="$TIC_PATH"
22524 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22525 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22526 TINFO_NAME="$TINFO_NAME"
22527 TINFO_SUFFIX="$TINFO_SUFFIX"
22528 UNALTERED_SYMS="$UNALTERED_SYMS"
22529 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22530 WILDCARD_SYMS="$WILDCARD_SYMS"
22531 WITH_CURSES_H="$with_curses_h"
22532 WITH_ECHO="${enable_echo:=yes}"
22533 WITH_OVERWRITE="$with_overwrite"
22534 cf_LIST_MODELS="$cf_list_models"
22535 cf_cv_abi_version="$cf_cv_abi_version"
22536 cf_cv_do_relink="$cf_cv_do_relink"
22537 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22538 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22539 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22540 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22541 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22542 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22543 cf_cv_rel_version="$cf_cv_rel_version"
22544 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22545 cf_cv_shared_soname='$cf_cv_shared_soname'
22546 cf_cv_shlib_version="$cf_cv_shlib_version"
22547 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22548 cf_cv_system_name="$cf_cv_system_name"
22549 cf_cv_term_driver="$with_term_driver"
22550 cf_with_ada="$cf_with_ada"
22551 cf_with_cxx_binding="$cf_with_cxx_binding"
22552 cf_with_db_install="$cf_with_db_install"
22553 cf_with_manpages="$cf_with_manpages"
22554 cf_with_tests="$cf_with_tests"
22555 host="$host"
22556 target="$target"
22557 with_shared_cxx="$with_shared_cxx"
22558
22559 EOF
22560
22561 cat >>$CONFIG_STATUS <<\EOF
22562 for ac_config_target in $ac_config_targets
22563 do
22564   case "$ac_config_target" in
22565   # Handling of arguments.
22566   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22567   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22568   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22569   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22570   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22571   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22572   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22573   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22574   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22575   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22576   *) { { echo "$as_me:22576: error: invalid argument: $ac_config_target" >&5
22577 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22578    { (exit 1); exit 1; }; };;
22579   esac
22580 done
22581
22582 # If the user did not use the arguments to specify the items to instantiate,
22583 # then the envvar interface is used.  Set only those that are not.
22584 # We use the long form for the default assignment because of an extremely
22585 # bizarre bug on SunOS 4.1.3.
22586 if $ac_need_defaults; then
22587   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22588   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22589   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22590 fi
22591
22592 # Create a temporary directory, and hook for its removal unless debugging.
22593 $debug ||
22594 {
22595   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22596   trap '{ (exit 1); exit 1; }' 1 2 13 15
22597 }
22598
22599 # Create a (secure) tmp directory for tmp files.
22600 : ${TMPDIR=/tmp}
22601 {
22602   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22603   test -n "$tmp" && test -d "$tmp"
22604 }  ||
22605 {
22606   tmp=$TMPDIR/cs$$-$RANDOM
22607   (umask 077 && mkdir $tmp)
22608 } ||
22609 {
22610    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22611    { (exit 1); exit 1; }
22612 }
22613
22614 EOF
22615
22616 cat >>$CONFIG_STATUS <<EOF
22617
22618 #
22619 # CONFIG_FILES section.
22620 #
22621
22622 # No need to generate the scripts if there are no CONFIG_FILES.
22623 # This happens for instance when ./config.status config.h
22624 if test -n "\$CONFIG_FILES"; then
22625   # Protect against being on the right side of a sed subst in config.status.
22626   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22627    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22628 s,@SHELL@,$SHELL,;t t
22629 s,@exec_prefix@,$exec_prefix,;t t
22630 s,@prefix@,$prefix,;t t
22631 s,@program_transform_name@,$program_transform_name,;t t
22632 s,@bindir@,$bindir,;t t
22633 s,@sbindir@,$sbindir,;t t
22634 s,@libexecdir@,$libexecdir,;t t
22635 s,@datarootdir@,$datarootdir,;t t
22636 s,@datadir@,$datadir,;t t
22637 s,@sysconfdir@,$sysconfdir,;t t
22638 s,@sharedstatedir@,$sharedstatedir,;t t
22639 s,@localstatedir@,$localstatedir,;t t
22640 s,@libdir@,$libdir,;t t
22641 s,@includedir@,$includedir,;t t
22642 s,@oldincludedir@,$oldincludedir,;t t
22643 s,@infodir@,$infodir,;t t
22644 s,@mandir@,$mandir,;t t
22645 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22646 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22647 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22648 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22649 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22650 s,@build_alias@,$build_alias,;t t
22651 s,@host_alias@,$host_alias,;t t
22652 s,@target_alias@,$target_alias,;t t
22653 s,@ECHO_C@,$ECHO_C,;t t
22654 s,@ECHO_N@,$ECHO_N,;t t
22655 s,@ECHO_T@,$ECHO_T,;t t
22656 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22657 s,@DEFS@,$DEFS,;t t
22658 s,@LIBS@,$LIBS,;t t
22659 s,@top_builddir@,$top_builddir,;t t
22660 s,@EGREP@,$EGREP,;t t
22661 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22662 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22663 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22664 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22665 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22666 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22667 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22668 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22669 s,@VERSION@,$VERSION,;t t
22670 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22671 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22672 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22673 s,@PACKAGE@,$PACKAGE,;t t
22674 s,@build@,$build,;t t
22675 s,@build_cpu@,$build_cpu,;t t
22676 s,@build_vendor@,$build_vendor,;t t
22677 s,@build_os@,$build_os,;t t
22678 s,@host@,$host,;t t
22679 s,@host_cpu@,$host_cpu,;t t
22680 s,@host_vendor@,$host_vendor,;t t
22681 s,@host_os@,$host_os,;t t
22682 s,@target@,$target,;t t
22683 s,@target_cpu@,$target_cpu,;t t
22684 s,@target_vendor@,$target_vendor,;t t
22685 s,@target_os@,$target_os,;t t
22686 s,@CC@,$CC,;t t
22687 s,@CFLAGS@,$CFLAGS,;t t
22688 s,@LDFLAGS@,$LDFLAGS,;t t
22689 s,@CPPFLAGS@,$CPPFLAGS,;t t
22690 s,@ac_ct_CC@,$ac_ct_CC,;t t
22691 s,@EXEEXT@,$EXEEXT,;t t
22692 s,@OBJEXT@,$OBJEXT,;t t
22693 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22694 s,@CPP@,$CPP,;t t
22695 s,@LDCONFIG@,$LDCONFIG,;t t
22696 s,@CXX@,$CXX,;t t
22697 s,@CXXFLAGS@,$CXXFLAGS,;t t
22698 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22699 s,@AWK@,$AWK,;t t
22700 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22701 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22702 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22703 s,@LINT@,$LINT,;t t
22704 s,@LINT_OPTS@,$LINT_OPTS,;t t
22705 s,@LN_S@,$LN_S,;t t
22706 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22707 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22708 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22709 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22710 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22711 s,@SET_MAKE@,$SET_MAKE,;t t
22712 s,@CTAGS@,$CTAGS,;t t
22713 s,@ETAGS@,$ETAGS,;t t
22714 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22715 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22716 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22717 s,@RANLIB@,$RANLIB,;t t
22718 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22719 s,@LD@,$LD,;t t
22720 s,@ac_ct_LD@,$ac_ct_LD,;t t
22721 s,@AR@,$AR,;t t
22722 s,@ac_ct_AR@,$ac_ct_AR,;t t
22723 s,@NM@,$NM,;t t
22724 s,@ac_ct_NM@,$ac_ct_NM,;t t
22725 s,@ARFLAGS@,$ARFLAGS,;t t
22726 s,@DESTDIR@,$DESTDIR,;t t
22727 s,@BUILD_CC@,$BUILD_CC,;t t
22728 s,@BUILD_CPP@,$BUILD_CPP,;t t
22729 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22730 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22731 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22732 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22733 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22734 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22735 s,@cf_list_models@,$cf_list_models,;t t
22736 s,@ABI_VERSION@,$ABI_VERSION,;t t
22737 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22738 s,@LIBTOOL@,$LIBTOOL,;t t
22739 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22740 s,@LT_UNDEF@,$LT_UNDEF,;t t
22741 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22742 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22743 s,@LIB_CREATE@,$LIB_CREATE,;t t
22744 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22745 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22746 s,@LIB_PREP@,$LIB_PREP,;t t
22747 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22748 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22749 s,@LIB_LINK@,$LIB_LINK,;t t
22750 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22751 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22752 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22753 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22754 s,@TICS_NAME@,$TICS_NAME,;t t
22755 s,@TINFO_NAME@,$TINFO_NAME,;t t
22756 s,@LIB_NAME@,$LIB_NAME,;t t
22757 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22758 s,@CC_G_OPT@,$CC_G_OPT,;t t
22759 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22760 s,@LD_MODEL@,$LD_MODEL,;t t
22761 s,@shlibdir@,$shlibdir,;t t
22762 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22763 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22764 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22765 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22766 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22767 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22768 s,@LINK_PROGS@,$LINK_PROGS,;t t
22769 s,@LINK_TESTS@,$LINK_TESTS,;t t
22770 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22771 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22772 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22773 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22774 s,@RPATH_LIST@,$RPATH_LIST,;t t
22775 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22776 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22777 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22778 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22779 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22780 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22781 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22782 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22783 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22784 s,@XTERM_KBS@,$XTERM_KBS,;t t
22785 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22786 s,@TERMINFO@,$TERMINFO,;t t
22787 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22788 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22789 s,@TERMPATH@,$TERMPATH,;t t
22790 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22791 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22792 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22793 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22794 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22795 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22796 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22797 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22798 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22799 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22800 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22801 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22802 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22803 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22804 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22805 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22806 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22807 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22808 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22809 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22810 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22811 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22812 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22813 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22814 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22815 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22816 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22817 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22818 s,@PTHREAD@,$PTHREAD,;t t
22819 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22820 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22821 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22822 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22823 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22824 s,@ECHO_LT@,$ECHO_LT,;t t
22825 s,@ECHO_LD@,$ECHO_LD,;t t
22826 s,@RULE_CC@,$RULE_CC,;t t
22827 s,@SHOW_CC@,$SHOW_CC,;t t
22828 s,@ECHO_CC@,$ECHO_CC,;t t
22829 s,@ECHO_LINK@,$ECHO_LINK,;t t
22830 s,@ADAFLAGS@,$ADAFLAGS,;t t
22831 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22832 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22833 s,@ADA_TRACE@,$ADA_TRACE,;t t
22834 s,@MATH_LIB@,$MATH_LIB,;t t
22835 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22836 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22837 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22838 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22839 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22840 s,@TEST_LIBS@,$TEST_LIBS,;t t
22841 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22842 s,@CXXCPP@,$CXXCPP,;t t
22843 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22844 s,@CXX_AR@,$CXX_AR,;t t
22845 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22846 s,@CXXLIBS@,$CXXLIBS,;t t
22847 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22848 s,@gnat_exists@,$gnat_exists,;t t
22849 s,@M4_exists@,$M4_exists,;t t
22850 s,@cf_ada_make@,$cf_ada_make,;t t
22851 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22852 s,@cf_compile_generics@,$cf_compile_generics,;t t
22853 s,@cf_generic_objects@,$cf_generic_objects,;t t
22854 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22855 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22856 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22857 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22858 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22859 s,@cf_ada_package@,$cf_ada_package,;t t
22860 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22861 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22862 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22863 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22864 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22865 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22866 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22867 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22868 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22869 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22870 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22871 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22872 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22873 s,@TICS_LIBS@,$TICS_LIBS,;t t
22874 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22875 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22876 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22877 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22878 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22879 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22880 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22881 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22882 s,@includesubdir@,$includesubdir,;t t
22883 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22884 s,@TICS_LIST@,$TICS_LIST,;t t
22885 s,@TINFO_LIST@,$TINFO_LIST,;t t
22886 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22887 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22888 s,@TEST_ARGS@,$TEST_ARGS,;t t
22889 s,@TEST_DEPS@,$TEST_DEPS,;t t
22890 s,@TEST_ARG2@,$TEST_ARG2,;t t
22891 s,@TEST_DEP2@,$TEST_DEP2,;t t
22892 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22893 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22894 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22895 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22896 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22897 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22898 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22899 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22900 s,@cross_compiling@,$cross_compiling,;t t
22901 s,@TIC_PATH@,$TIC_PATH,;t t
22902 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22903 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22904 s,@PANEL_NAME@,$PANEL_NAME,;t t
22905 s,@MENU_NAME@,$MENU_NAME,;t t
22906 s,@FORM_NAME@,$FORM_NAME,;t t
22907 s,@CXX_NAME@,$CXX_NAME,;t t
22908 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
22909 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22910 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22911 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
22912 CEOF
22913
22914 EOF
22915
22916   cat >>$CONFIG_STATUS <<\EOF
22917   # Split the substitutions into bite-sized pieces for seds with
22918   # small command number limits, like on Digital OSF/1 and HP-UX.
22919   ac_max_sed_lines=48
22920   ac_sed_frag=1 # Number of current file.
22921   ac_beg=1 # First line for current file.
22922   ac_end=$ac_max_sed_lines # Line after last line for current file.
22923   ac_more_lines=:
22924   ac_sed_cmds=
22925   while $ac_more_lines; do
22926     if test $ac_beg -gt 1; then
22927       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22928     else
22929       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22930     fi
22931     if test ! -s $tmp/subs.frag; then
22932       ac_more_lines=false
22933     else
22934       # The purpose of the label and of the branching condition is to
22935       # speed up the sed processing (if there are no `@' at all, there
22936       # is no need to browse any of the substitutions).
22937       # These are the two extra sed commands mentioned above.
22938       (echo ':t
22939   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22940       if test -z "$ac_sed_cmds"; then
22941         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22942       else
22943         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22944       fi
22945       ac_sed_frag=`expr $ac_sed_frag + 1`
22946       ac_beg=$ac_end
22947       ac_end=`expr $ac_end + $ac_max_sed_lines`
22948     fi
22949   done
22950   if test -z "$ac_sed_cmds"; then
22951     ac_sed_cmds=cat
22952   fi
22953 fi # test -n "$CONFIG_FILES"
22954
22955 EOF
22956 cat >>$CONFIG_STATUS <<\EOF
22957 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22958   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22959   case $ac_file in
22960   - | *:- | *:-:* ) # input from stdin
22961         cat >$tmp/stdin
22962         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22963         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22964   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22965         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22966   * )   ac_file_in=$ac_file.in ;;
22967   esac
22968
22969   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22970   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22971          X"$ac_file" : 'X\(//\)[^/]' \| \
22972          X"$ac_file" : 'X\(//\)$' \| \
22973          X"$ac_file" : 'X\(/\)' \| \
22974          .     : '\(.\)' 2>/dev/null ||
22975 echo X"$ac_file" |
22976     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22977           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22978           /^X\(\/\/\)$/{ s//\1/; q; }
22979           /^X\(\/\).*/{ s//\1/; q; }
22980           s/.*/./; q'`
22981   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22982     { case "$ac_dir" in
22983   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22984   *)                      as_incr_dir=.;;
22985 esac
22986 as_dummy="$ac_dir"
22987 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22988   case $as_mkdir_dir in
22989     # Skip DOS drivespec
22990     ?:) as_incr_dir=$as_mkdir_dir ;;
22991     *)
22992       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22993       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22994     ;;
22995   esac
22996 done; }
22997
22998     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22999     # A "../" for each directory in $ac_dir_suffix.
23000     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23001   else
23002     ac_dir_suffix= ac_dots=
23003   fi
23004
23005   case $srcdir in
23006   .)  ac_srcdir=.
23007       if test -z "$ac_dots"; then
23008          ac_top_srcdir=.
23009       else
23010          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23011       fi ;;
23012   [\\/]* | ?:[\\/]* )
23013       ac_srcdir=$srcdir$ac_dir_suffix;
23014       ac_top_srcdir=$srcdir ;;
23015   *) # Relative path.
23016     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23017     ac_top_srcdir=$ac_dots$srcdir ;;
23018   esac
23019
23020   case $INSTALL in
23021   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23022   *) ac_INSTALL=$ac_dots$INSTALL ;;
23023   esac
23024
23025   if test x"$ac_file" != x-; then
23026     { echo "$as_me:23026: creating $ac_file" >&5
23027 echo "$as_me: creating $ac_file" >&6;}
23028     rm -f "$ac_file"
23029   fi
23030   # Let's still pretend it is `configure' which instantiates (i.e., don't
23031   # use $as_me), people would be surprised to read:
23032   #    /* config.h.  Generated automatically by config.status.  */
23033   configure_input="Generated automatically from `echo $ac_file_in |
23034                                                  sed 's,.*/,,'` by configure."
23035
23036   # First look for the input files in the build tree, otherwise in the
23037   # src tree.
23038   ac_file_inputs=`IFS=:
23039     for f in $ac_file_in; do
23040       case $f in
23041       -) echo $tmp/stdin ;;
23042       [\\/$]*)
23043          # Absolute (can't be DOS-style, as IFS=:)
23044          test -f "$f" || { { echo "$as_me:23044: error: cannot find input file: $f" >&5
23045 echo "$as_me: error: cannot find input file: $f" >&2;}
23046    { (exit 1); exit 1; }; }
23047          echo $f;;
23048       *) # Relative
23049          if test -f "$f"; then
23050            # Build tree
23051            echo $f
23052          elif test -f "$srcdir/$f"; then
23053            # Source tree
23054            echo $srcdir/$f
23055          else
23056            # /dev/null tree
23057            { { echo "$as_me:23057: error: cannot find input file: $f" >&5
23058 echo "$as_me: error: cannot find input file: $f" >&2;}
23059    { (exit 1); exit 1; }; }
23060          fi;;
23061       esac
23062     done` || { (exit 1); exit 1; }
23063 EOF
23064 cat >>$CONFIG_STATUS <<\EOF
23065   ac_warn_datarootdir=no
23066   if test x"$ac_file" != x-; then
23067     for ac_item in $ac_file_inputs
23068     do
23069       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23070       if test -n "$ac_seen"; then
23071         ac_used=`grep '@datarootdir@' $ac_item`
23072         if test -z "$ac_used"; then
23073           { echo "$as_me:23073: WARNING: datarootdir was used implicitly but not set:
23074 $ac_seen" >&5
23075 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23076 $ac_seen" >&2;}
23077           ac_warn_datarootdir=yes
23078         fi
23079       fi
23080       ac_seen=`grep '${datarootdir}' $ac_item`
23081       if test -n "$ac_seen"; then
23082         { echo "$as_me:23082: WARNING: datarootdir was used explicitly but not set:
23083 $ac_seen" >&5
23084 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23085 $ac_seen" >&2;}
23086         ac_warn_datarootdir=yes
23087       fi
23088     done
23089   fi
23090
23091 if test "x$ac_warn_datarootdir" = xyes; then
23092   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23093 fi
23094
23095 EOF
23096 cat >>$CONFIG_STATUS <<EOF
23097   sed "$ac_vpsub
23098 $extrasub
23099 EOF
23100 cat >>$CONFIG_STATUS <<\EOF
23101 :t
23102 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23103 s,@configure_input@,$configure_input,;t t
23104 s,@srcdir@,$ac_srcdir,;t t
23105 s,@top_srcdir@,$ac_top_srcdir,;t t
23106 s,@INSTALL@,$ac_INSTALL,;t t
23107 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23108   rm -f $tmp/stdin
23109   if test x"$ac_file" != x-; then
23110     cp $tmp/out $ac_file
23111
23112     for ac_name in prefix exec_prefix datarootdir
23113     do
23114         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23115         if test -n "$ac_seen"; then
23116             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23117             if test -z "$ac_init"; then
23118               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23119               { echo "$as_me:23119: WARNING: Variable $ac_name is used but was not set:
23120 $ac_seen" >&5
23121 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23122 $ac_seen" >&2;}
23123             fi
23124         fi
23125     done
23126     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23127     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23128     if test -s $tmp/out; then
23129       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23130       { echo "$as_me:23130: WARNING: Some variables may not be substituted:
23131 $ac_seen" >&5
23132 echo "$as_me: WARNING: Some variables may not be substituted:
23133 $ac_seen" >&2;}
23134     fi
23135   else
23136     cat $tmp/out
23137   fi
23138   rm -f $tmp/out
23139
23140 done
23141 EOF
23142 cat >>$CONFIG_STATUS <<\EOF
23143
23144 #
23145 # CONFIG_HEADER section.
23146 #
23147
23148 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23149 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23150 #
23151 # ac_d sets the value in "#define NAME VALUE" lines.
23152 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23153 ac_dB='[        ].*$,\1#\2'
23154 ac_dC=' '
23155 ac_dD=',;t'
23156 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23157 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23158 ac_iB='\([      ]\),\1#\2define\3'
23159 ac_iC=' '
23160 ac_iD='\4,;t'
23161 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23162 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23163 ac_uB='$,\1#\2define\3'
23164 ac_uC=' '
23165 ac_uD=',;t'
23166
23167 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23168   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23169   case $ac_file in
23170   - | *:- | *:-:* ) # input from stdin
23171         cat >$tmp/stdin
23172         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23173         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23174   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23175         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23176   * )   ac_file_in=$ac_file.in ;;
23177   esac
23178
23179   test x"$ac_file" != x- && { echo "$as_me:23179: creating $ac_file" >&5
23180 echo "$as_me: creating $ac_file" >&6;}
23181
23182   # First look for the input files in the build tree, otherwise in the
23183   # src tree.
23184   ac_file_inputs=`IFS=:
23185     for f in $ac_file_in; do
23186       case $f in
23187       -) echo $tmp/stdin ;;
23188       [\\/$]*)
23189          # Absolute (can't be DOS-style, as IFS=:)
23190          test -f "$f" || { { echo "$as_me:23190: error: cannot find input file: $f" >&5
23191 echo "$as_me: error: cannot find input file: $f" >&2;}
23192    { (exit 1); exit 1; }; }
23193          echo $f;;
23194       *) # Relative
23195          if test -f "$f"; then
23196            # Build tree
23197            echo $f
23198          elif test -f "$srcdir/$f"; then
23199            # Source tree
23200            echo $srcdir/$f
23201          else
23202            # /dev/null tree
23203            { { echo "$as_me:23203: error: cannot find input file: $f" >&5
23204 echo "$as_me: error: cannot find input file: $f" >&2;}
23205    { (exit 1); exit 1; }; }
23206          fi;;
23207       esac
23208     done` || { (exit 1); exit 1; }
23209   # Remove the trailing spaces.
23210   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23211
23212 EOF
23213
23214 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23215 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23216 # be either 'cat' or 'sort'.
23217 cat confdefs.h | uniq >conftest.vals
23218
23219 # Break up conftest.vals because some shells have a limit on
23220 # the size of here documents, and old seds have small limits too.
23221
23222 rm -f conftest.tail
23223 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23224 while grep . conftest.vals >/dev/null
23225 do
23226   # Write chunks of a limited-size here document to conftest.frag.
23227   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23228   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23229   echo 'CEOF' >> $CONFIG_STATUS
23230   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23231   rm -f conftest.vals
23232   mv conftest.tail conftest.vals
23233 done
23234 rm -f conftest.vals
23235
23236 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23237 # marker @DEFS@.
23238 echo '  cat >> conftest.edit <<CEOF
23239 /@DEFS@/r conftest.frag
23240 /@DEFS@/d
23241 CEOF
23242 sed -f conftest.edit $tmp/in > $tmp/out
23243 rm -f $tmp/in
23244 mv $tmp/out $tmp/in
23245 rm -f conftest.edit conftest.frag
23246 ' >> $CONFIG_STATUS
23247
23248 cat >>$CONFIG_STATUS <<\EOF
23249   # Let's still pretend it is `configure' which instantiates (i.e., don't
23250   # use $as_me), people would be surprised to read:
23251   #    /* config.h.  Generated automatically by config.status.  */
23252   if test x"$ac_file" = x-; then
23253     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23254   else
23255     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23256   fi
23257   cat $tmp/in >>$tmp/config.h
23258   rm -f $tmp/in
23259   if test x"$ac_file" != x-; then
23260     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23261       { echo "$as_me:23261: $ac_file is unchanged" >&5
23262 echo "$as_me: $ac_file is unchanged" >&6;}
23263     else
23264       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23265          X"$ac_file" : 'X\(//\)[^/]' \| \
23266          X"$ac_file" : 'X\(//\)$' \| \
23267          X"$ac_file" : 'X\(/\)' \| \
23268          .     : '\(.\)' 2>/dev/null ||
23269 echo X"$ac_file" |
23270     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23271           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23272           /^X\(\/\/\)$/{ s//\1/; q; }
23273           /^X\(\/\).*/{ s//\1/; q; }
23274           s/.*/./; q'`
23275       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23276         { case "$ac_dir" in
23277   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23278   *)                      as_incr_dir=.;;
23279 esac
23280 as_dummy="$ac_dir"
23281 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23282   case $as_mkdir_dir in
23283     # Skip DOS drivespec
23284     ?:) as_incr_dir=$as_mkdir_dir ;;
23285     *)
23286       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23287       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23288     ;;
23289   esac
23290 done; }
23291
23292       fi
23293       rm -f $ac_file
23294       mv $tmp/config.h $ac_file
23295     fi
23296   else
23297     cat $tmp/config.h
23298     rm -f $tmp/config.h
23299   fi
23300 done
23301 EOF
23302 cat >>$CONFIG_STATUS <<\EOF
23303 #
23304 # CONFIG_COMMANDS section.
23305 #
23306 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23307   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23308   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23309
23310   case $ac_dest in
23311     default )
23312 if test "x$cf_with_tests" != xno ; then
23313
23314 for cf_dir in test
23315 do
23316         if test ! -d $srcdir/$cf_dir; then
23317                 continue
23318         elif test -f $srcdir/$cf_dir/programs; then
23319                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23320         fi
23321 done
23322
23323 fi
23324
23325 cf_prefix=$LIB_PREFIX
23326
23327 case $cf_cv_shlib_version in #(vi
23328 cygdll|msysdll|mingw)
23329         TINFO_NAME=$TINFO_ARG_SUFFIX
23330         TINFO_SUFFIX=.dll
23331         ;;
23332 esac
23333
23334 if test -n "$TINFO_SUFFIX" ; then
23335         case $TINFO_SUFFIX in
23336         tw*)
23337                 TINFO_NAME="${TINFO_NAME}tw"
23338                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23339                 ;;
23340         t*)
23341                 TINFO_NAME="${TINFO_NAME}t"
23342                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23343                 ;;
23344         w*)
23345                 TINFO_NAME="${TINFO_NAME}w"
23346                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23347                 ;;
23348         esac
23349 fi
23350
23351 for cf_dir in $SRC_SUBDIRS
23352 do
23353         if test ! -d $srcdir/$cf_dir ; then
23354                 continue
23355         elif test -f $srcdir/$cf_dir/modules; then
23356
23357                 SHARED_LIB=
23358                 Libs_To_Make=
23359
23360                 cf_sed_options=
23361                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23362                 then
23363                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23364                 fi
23365
23366                 if test "x$WILDCARD_SYMS" = xno
23367                 then
23368                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23369                 fi
23370
23371                 if test "x$cf_sed_options" != "x"
23372                 then
23373                         cat >>$cf_dir/Makefile <<CF_EOF
23374
23375 # Generated by CF_LIB_RULES
23376 resulting.map: $UNALTERED_SYMS
23377         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23378
23379 clean::
23380         rm -f resulting.map
23381 CF_EOF
23382                 fi
23383
23384                 for cf_item in $cf_LIST_MODELS
23385                 do
23386
23387         case X$cf_item in #(vi
23388         Xlibtool) #(vi
23389                 cf_suffix='.la'
23390                 cf_depsuf=$cf_suffix
23391                 ;;
23392         Xdebug) #(vi
23393                 cf_suffix='_g.a'
23394                 cf_depsuf=$cf_suffix
23395                 ;;
23396         Xprofile) #(vi
23397                 cf_suffix='_p.a'
23398                 cf_depsuf=$cf_suffix
23399                 ;;
23400         Xshared) #(vi
23401                 case $cf_cv_system_name in
23402                 aix[5-7]*) #(vi
23403                         cf_suffix='.so'
23404                         cf_depsuf=$cf_suffix
23405                         ;;
23406                 cygwin*|msys*|mingw*) #(vi
23407                         cf_suffix='.dll'
23408                         cf_depsuf='.dll.a'
23409                         ;;
23410                 darwin*) #(vi
23411                         cf_suffix='.dylib'
23412                         cf_depsuf=$cf_suffix
23413                         ;;
23414                 hpux*) #(vi
23415                         case $target in
23416                         ia64*) #(vi
23417                                 cf_suffix='.so'
23418                                 cf_depsuf=$cf_suffix
23419                                 ;;
23420                         *) #(vi
23421                                 cf_suffix='.sl'
23422                                 cf_depsuf=$cf_suffix
23423                                 ;;
23424                         esac
23425                         ;;
23426                 *) #(vi
23427                         cf_suffix='.so'
23428                         cf_depsuf=$cf_suffix
23429                         ;;
23430                 esac
23431                 ;;
23432         *)
23433                 cf_suffix='.a'
23434                 cf_depsuf=$cf_suffix
23435                 ;;
23436         esac
23437         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23438         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23439
23440                         cf_libname=$cf_dir
23441                         test "$cf_dir" = c++ && cf_libname=ncurses++
23442                         if test $cf_item = shared ; then
23443                                 if test -n "${LIB_SUFFIX}"
23444                                 then
23445                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23446                                 else
23447                                         cf_shared_suffix="$cf_suffix"
23448                                 fi
23449                                 if test "$cf_cv_do_symlinks" = yes ; then
23450                                         cf_version_name=
23451
23452                                         case "$cf_cv_shlib_version" in #(vi
23453                                         rel) #(vi
23454                                                 cf_version_name=REL_VERSION
23455                                                 ;;
23456                                         abi)
23457                                                 cf_version_name=ABI_VERSION
23458                                                 ;;
23459                                         esac
23460
23461                                         if test -n "$cf_version_name"
23462                                         then
23463                                                 case "$cf_cv_system_name" in #(vi
23464                                                 darwin*)
23465                                                         # "w", etc?
23466                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23467                                                         ;; #(vi
23468                                                 *)
23469                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23470                                                         ;;
23471                                                 esac
23472                                         fi
23473                                         if test -n "${LIB_SUFFIX}"
23474                                         then
23475                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23476                                         else
23477                                                 cf_shared_suffix="$cf_suffix"
23478                                         fi
23479                                 fi
23480                                 # cygwin needs import library, and has unique naming convention
23481                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23482                                 # use 'cyg' prefix for shared lib.
23483                                 case $cf_cv_shlib_version in #(vi
23484                                 cygdll) #(vi
23485                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23486                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23487                                         continue
23488                                         ;;
23489                                 msysdll) #(vi
23490                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23491                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23492                                         continue
23493                                         ;;
23494                                 mingw)
23495                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23496                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23497                                         continue
23498                                         ;;
23499                                 esac
23500                         fi
23501                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23502                 done
23503
23504                 if test $cf_dir = ncurses ; then
23505                         cf_subsets="$LIB_SUBSETS"
23506                         cf_r_parts="$cf_subsets"
23507                         cf_liblist="$Libs_To_Make"
23508
23509                         while test -n "$cf_r_parts"
23510                         do
23511                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23512                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23513                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23514                                         cf_item=
23515                                         case $cf_l_parts in #(vi
23516                                         *termlib*) #(vi
23517                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23518                                                 ;;
23519                                         *ticlib*)
23520                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23521                                                 ;;
23522                                         *)
23523                                                 break
23524                                                 ;;
23525                                         esac
23526                                         if test -n "$cf_item"; then
23527                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23528                                         fi
23529                                 else
23530                                         break
23531                                 fi
23532                         done
23533                 else
23534                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23535                 fi
23536
23537                 if test $cf_dir = c++; then
23538                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23539                                 cf_list=
23540                                 for cf_item in $Libs_To_Make
23541                                 do
23542                                         case $cf_item in
23543                                         *.a)
23544                                                 ;;
23545                                         *)
23546                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23547                                                 ;;
23548                                         esac
23549                                         for cf_test in $cf_list
23550                                         do
23551                                                 if test "$cf_test" = "$cf_item"
23552                                                 then
23553                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23554                                                         cf_item=
23555                                                         break
23556                                                 fi
23557                                         done
23558                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23559                                 done
23560                                 Libs_To_Make="$cf_list"
23561                         fi
23562                 fi
23563
23564                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23565                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23566                         $cf_dir/Makefile >$cf_dir/Makefile.out
23567                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23568
23569                 $AWK -f $srcdir/mk-0th.awk \
23570                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23571                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23572
23573                 for cf_subset in $cf_subsets
23574                 do
23575                         cf_subdirs=
23576                         for cf_item in $cf_LIST_MODELS
23577                         do
23578
23579                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23580
23581 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23582
23583                         CXX_MODEL=$cf_ITEM
23584                         if test "$CXX_MODEL" = SHARED; then
23585                                 case $cf_cv_shlib_version in #(vi
23586                                 cygdll|msysdll|mingw) #(vi
23587                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23588
23589 echo "${as_me:-configure}:23589: testing overriding CXX_MODEL to SHARED ..." 1>&5
23590
23591                                         with_shared_cxx=yes
23592                                         ;;
23593                                 *)
23594                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23595                                         ;;
23596                                 esac
23597                         fi
23598
23599         case X$cf_item in #(vi
23600         Xlibtool) #(vi
23601                 cf_suffix='.la'
23602                 cf_depsuf=$cf_suffix
23603                 ;;
23604         Xdebug) #(vi
23605                 cf_suffix='_g.a'
23606                 cf_depsuf=$cf_suffix
23607                 ;;
23608         Xprofile) #(vi
23609                 cf_suffix='_p.a'
23610                 cf_depsuf=$cf_suffix
23611                 ;;
23612         Xshared) #(vi
23613                 case $cf_cv_system_name in
23614                 aix[5-7]*) #(vi
23615                         cf_suffix='.so'
23616                         cf_depsuf=$cf_suffix
23617                         ;;
23618                 cygwin*|msys*|mingw*) #(vi
23619                         cf_suffix='.dll'
23620                         cf_depsuf='.dll.a'
23621                         ;;
23622                 darwin*) #(vi
23623                         cf_suffix='.dylib'
23624                         cf_depsuf=$cf_suffix
23625                         ;;
23626                 hpux*) #(vi
23627                         case $target in
23628                         ia64*) #(vi
23629                                 cf_suffix='.so'
23630                                 cf_depsuf=$cf_suffix
23631                                 ;;
23632                         *) #(vi
23633                                 cf_suffix='.sl'
23634                                 cf_depsuf=$cf_suffix
23635                                 ;;
23636                         esac
23637                         ;;
23638                 *) #(vi
23639                         cf_suffix='.so'
23640                         cf_depsuf=$cf_suffix
23641                         ;;
23642                 esac
23643                 ;;
23644         *)
23645                 cf_suffix='.a'
23646                 cf_depsuf=$cf_suffix
23647                 ;;
23648         esac
23649         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23650         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23651
23652         case $cf_item in
23653         libtool) cf_subdir='obj_lo'  ;;
23654         normal)  cf_subdir='objects' ;;
23655         debug)   cf_subdir='obj_g' ;;
23656         profile) cf_subdir='obj_p' ;;
23657         shared)
23658                 case $cf_cv_system_name in #(vi
23659                 cygwin|msys) #(vi
23660                         cf_subdir='objects' ;;
23661                 *)
23662                         cf_subdir='obj_s' ;;
23663                 esac
23664         esac
23665
23666                         # Test for case where we build libtinfo with a different name.
23667                         cf_libname=$cf_dir
23668                         if test $cf_dir = ncurses ; then
23669                                 case $cf_subset in
23670                                 *base*)
23671                                         cf_libname=${cf_libname}$LIB_SUFFIX
23672                                         ;;
23673                                 *termlib*)
23674                                         cf_libname=$TINFO_LIB_SUFFIX
23675                                         ;;
23676                                 ticlib*)
23677                                         cf_libname=$TICS_LIB_SUFFIX
23678                                         ;;
23679                                 esac
23680                         elif test $cf_dir = c++ ; then
23681                                 cf_libname=ncurses++$LIB_SUFFIX
23682                         else
23683                                 cf_libname=${cf_libname}$LIB_SUFFIX
23684                         fi
23685                         if test -n "${DFT_ARG_SUFFIX}" ; then
23686                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23687                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23688                         fi
23689
23690                         # These dependencies really are for development, not
23691                         # builds, but they are useful in porting, too.
23692                         cf_depend="../include/ncurses_cfg.h"
23693                         if test "$srcdir" = "."; then
23694                                 cf_reldir="."
23695                         else
23696                                 cf_reldir="\${srcdir}"
23697                         fi
23698
23699                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23700                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23701                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23702                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23703                         fi
23704
23705                         cf_dir_suffix=
23706                         old_cf_suffix="$cf_suffix"
23707                         if test "$cf_cv_shlib_version_infix" = yes ; then
23708                         if test -n "$LIB_SUFFIX" ; then
23709                                 case $LIB_SUFFIX in
23710                                 tw*)
23711                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23712                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23713                                         cf_dir_suffix=tw
23714                                         ;;
23715                                 t*)
23716                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23717                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23718                                         cf_dir_suffix=t
23719                                         ;;
23720                                 w*)
23721                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23722                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23723                                         cf_dir_suffix=w
23724                                         ;;
23725                                 esac
23726                         fi
23727                         fi
23728
23729                         $AWK -f $srcdir/mk-1st.awk \
23730                                 name=${cf_libname}${cf_dir_suffix} \
23731                                 traces=$LIB_TRACING \
23732                                 MODEL=$cf_ITEM \
23733                                 CXX_MODEL=$CXX_MODEL \
23734                                 model=$cf_subdir \
23735                                 prefix=$cf_prefix \
23736                                 suffix=$cf_suffix \
23737                                 subset=$cf_subset \
23738                                 driver=$cf_cv_term_driver \
23739                                 SymLink="$LN_S" \
23740                                 TermlibRoot=$TINFO_NAME \
23741                                 TermlibSuffix=$TINFO_SUFFIX \
23742                                 ShlibVer=$cf_cv_shlib_version \
23743                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23744                                 ReLink=${cf_cv_do_relink:-no} \
23745                                 DoLinks=$cf_cv_do_symlinks \
23746                                 rmSoLocs=$cf_cv_rm_so_locs \
23747                                 ldconfig="$LDCONFIG" \
23748                                 overwrite=$WITH_OVERWRITE \
23749                                 depend="$cf_depend" \
23750                                 host="$host" \
23751                                 libtool_version="$LIBTOOL_VERSION" \
23752                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23753
23754                         cf_suffix="$old_cf_suffix"
23755
23756                         for cf_subdir2 in $cf_subdirs lib
23757                         do
23758                                 test $cf_subdir = $cf_subdir2 && break
23759                         done
23760                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23761                         $AWK -f $srcdir/mk-2nd.awk \
23762                                 name=$cf_dir \
23763                                 traces=$LIB_TRACING \
23764                                 MODEL=$cf_ITEM \
23765                                 model=$cf_subdir \
23766                                 subset=$cf_subset \
23767                                 srcdir=$srcdir \
23768                                 echo=$WITH_ECHO \
23769                                 crenames=$cf_cv_prog_CC_c_o \
23770                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23771                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23772                         cf_subdirs="$cf_subdirs $cf_subdir"
23773                         done
23774                 done
23775         fi
23776
23777         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23778 done
23779
23780 for cf_dir in $SRC_SUBDIRS
23781 do
23782         if test ! -d $srcdir/$cf_dir ; then
23783                 continue
23784         fi
23785
23786         if test -f $cf_dir/Makefile ; then
23787                 case "$cf_dir" in
23788                 Ada95) #(vi
23789                         echo 'libs \' >> Makefile
23790                         echo 'install.libs \' >> Makefile
23791                         echo 'uninstall.libs ::' >> Makefile
23792                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23793                         ;;
23794                 esac
23795         fi
23796
23797         if test -f $srcdir/$cf_dir/modules; then
23798                 echo >> Makefile
23799                 if test -f $srcdir/$cf_dir/headers; then
23800 cat >> Makefile <<CF_EOF
23801 install.includes \\
23802 uninstall.includes \\
23803 CF_EOF
23804                 fi
23805 if test "$cf_dir" != "c++" ; then
23806 echo 'lint \' >> Makefile
23807 fi
23808 cat >> Makefile <<CF_EOF
23809 libs \\
23810 lintlib \\
23811 install.libs \\
23812 uninstall.libs \\
23813 install.$cf_dir \\
23814 uninstall.$cf_dir ::
23815         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23816 CF_EOF
23817         elif test -f $srcdir/$cf_dir/headers; then
23818 cat >> Makefile <<CF_EOF
23819
23820 libs \\
23821 install.libs \\
23822 uninstall.libs \\
23823 install.includes \\
23824 uninstall.includes ::
23825         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23826 CF_EOF
23827 fi
23828 done
23829
23830 if test "x$cf_with_db_install" = xyes; then
23831 cat >> Makefile <<CF_EOF
23832
23833 install.libs uninstall.libs \\
23834 install.data uninstall.data ::
23835 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23836 CF_EOF
23837 else
23838 cat >> Makefile <<CF_EOF
23839
23840 install.libs uninstall.libs ::
23841         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23842 CF_EOF
23843 fi
23844
23845 if test "x$cf_with_manpages" = xyes; then
23846 cat >> Makefile <<CF_EOF
23847
23848 install.man \\
23849 uninstall.man ::
23850         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23851 CF_EOF
23852 fi
23853
23854 cat >> Makefile <<CF_EOF
23855
23856 distclean ::
23857         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23858         rm -f headers.sh headers.sed mk_shared_lib.sh
23859         rm -f edit_man.* man_alias.*
23860         rm -rf \${DIRS_TO_MAKE}
23861 CF_EOF
23862
23863 # Special case: tack's manpage lives in its own directory.
23864 if test "x$cf_with_manpages" = xyes; then
23865 if test -d tack ; then
23866 if test -f $srcdir/$tack.h; then
23867 cat >> Makefile <<CF_EOF
23868
23869 install.man \\
23870 uninstall.man ::
23871         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23872 CF_EOF
23873 fi
23874 fi
23875 fi
23876
23877 rm -f headers.sed headers.sh
23878
23879 echo creating headers.sh
23880 cat >headers.sh <<CF_EOF
23881 #! /bin/sh
23882 # This shell script is generated by the 'configure' script.  It is invoked in a
23883 # subdirectory of the build tree.  It generates a sed-script in the parent
23884 # directory that is used to adjust includes for header files that reside in a
23885 # subdirectory of /usr/include, etc.
23886 PRG=""
23887 while test \$# != 3
23888 do
23889 PRG="\$PRG \$1"; shift
23890 done
23891 DST=\$1
23892 REF=\$2
23893 SRC=\$3
23894 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23895 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23896 echo installing \$SRC in \$DST
23897 CF_EOF
23898
23899 if test $WITH_CURSES_H = yes; then
23900         cat >>headers.sh <<CF_EOF
23901 case \$DST in
23902 /*/include/*)
23903         END=\`basename \$DST\`
23904         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23905         do
23906                 NAME=\`basename \$i\`
23907                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23908         done
23909         ;;
23910 *)
23911         echo "" >> \$TMPSED
23912         ;;
23913 esac
23914 CF_EOF
23915
23916 else
23917         cat >>headers.sh <<CF_EOF
23918 case \$DST in
23919 /*/include/*)
23920         END=\`basename \$DST\`
23921         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23922         do
23923                 NAME=\`basename \$i\`
23924                 if test "\$NAME" = "curses.h"
23925                 then
23926                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23927                         NAME=ncurses.h
23928                 fi
23929                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23930         done
23931         ;;
23932 *)
23933         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23934         ;;
23935 esac
23936 CF_EOF
23937 fi
23938 cat >>headers.sh <<CF_EOF
23939 rm -f \$TMPSRC
23940 sed -f \$TMPSED \$SRC > \$TMPSRC
23941 NAME=\`basename \$SRC\`
23942 CF_EOF
23943 if test $WITH_CURSES_H != yes; then
23944         cat >>headers.sh <<CF_EOF
23945 test "\$NAME" = "curses.h" && NAME=ncurses.h
23946 CF_EOF
23947 fi
23948 cat >>headers.sh <<CF_EOF
23949 # Just in case someone gzip'd manpages, remove the conflicting copy.
23950 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23951
23952 eval \$PRG \$TMPSRC \$DST/\$NAME
23953 rm -f \$TMPSRC \$TMPSED
23954 CF_EOF
23955
23956 chmod 0755 headers.sh
23957
23958 for cf_dir in $SRC_SUBDIRS
23959 do
23960         if test ! -d $srcdir/$cf_dir ; then
23961                 continue
23962         fi
23963
23964         if test -f $srcdir/$cf_dir/headers; then
23965                 $AWK -f $srcdir/mk-hdr.awk \
23966                         subset="$LIB_SUBSETS" \
23967                         compat="$WITH_CURSES_H" \
23968                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23969         fi
23970
23971         if test -f $srcdir/$cf_dir/modules; then
23972                 if test "$cf_dir" != "c++" ; then
23973                         cat >>$cf_dir/Makefile <<"CF_EOF"
23974 depend : ${AUTO_SRC}
23975         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23976
23977 # DO NOT DELETE THIS LINE -- make depend depends on it.
23978 CF_EOF
23979                 fi
23980         fi
23981 done
23982
23983 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23984 if test -z "$USE_OLD_MAKERULES" ; then
23985         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23986 fi
23987 fi
23988  ;;
23989   esac
23990 done
23991 EOF
23992
23993 cat >>$CONFIG_STATUS <<\EOF
23994
23995 { (exit 0); exit 0; }
23996 EOF
23997 chmod +x $CONFIG_STATUS
23998 ac_clean_files=$ac_clean_files_save
23999
24000 # configure is writing to config.log, and then calls config.status.
24001 # config.status does its own redirection, appending to config.log.
24002 # Unfortunately, on DOS this fails, as config.log is still kept open
24003 # by configure, so config.status won't be able to write to it; its
24004 # output is simply discarded.  So we exec the FD to /dev/null,
24005 # effectively closing config.log, so it can be properly (re)opened and
24006 # appended to by config.status.  When coming back to configure, we
24007 # need to make the FD available again.
24008 if test "$no_create" != yes; then
24009   ac_cs_success=:
24010   exec 5>/dev/null
24011   $SHELL $CONFIG_STATUS || ac_cs_success=false
24012   exec 5>>config.log
24013   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24014   # would make configure fail if this is the last instruction.
24015   $ac_cs_success || { (exit 1); exit 1; }
24016 fi
24017 ${MAKE:-make} preinstall