]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20170729
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.645 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
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-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-pkg-config{=path} enable/disable use of pkg-config
716   --with-pkg-config-libdir=XXX use given directory for installing pc-files
717   --enable-pc-files       generate and install .pc files for pkg-config
718   --with-pc-suffix        suffixes pc-files
719   --enable-mixed-case     tic should assume mixed-case filenames
720   --with-install-prefix   prefixes actual install-location ($DESTDIR)
721 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
722   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
723   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
724   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
725   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
726   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
727   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
728 Options to Specify the Libraries Built/Used:
729   --disable-libtool-version  enable to use libtool's incompatible naming scheme
730   --with-libtool          generate libraries with libtool
731   --with-shared           generate shared-libraries
732   --with-normal           generate normal-libraries (default)
733   --with-debug            generate debug-libraries (default)
734   --with-profile          generate profile-libraries
735   --with-cxx-shared       generate C++ shared-libraries
736   --with-lib-prefix       override library-prefix
737   --with-termlib          generate separate terminfo library
738   --with-ticlib           generate separate tic library
739   --with-gpm              use Alessandro Rubini's GPM library
740   --without-dlsym         do not use dlsym() to load GPM dynamically
741   --with-sysmouse         use sysmouse (FreeBSD console)
742   --enable-rpath          use rpath option when generating shared libraries
743   --disable-relink        relink shared libraries during install
744   --with-shlib-version=X  Specify rel or abi version for shared libs
745   --with-libtool-opts=XXX specify additional libtool options
746   --with-export-syms=XXX  limit exported symbols using libtool
747   --with-versioned-syms=X markup versioned symbols using ld
748   --disable-lib-suffixes  disable library suffixes
749   --disable-rpath-hack    don't add rpath options for additional libraries
750 Fine-Tuning Your Configuration:
751   --with-extra-suffix=X   append extra suffix to header/library paths
752   --disable-overwrite     put headers in subdir, omit link to -lcurses
753   --disable-database      do not use terminfo, only fallbacks/termcap
754   --with-database=XXX     specify terminfo source to install
755   --with-hashed-db        specify hashed-database library
756   --with-fallbacks=XXX    specify list of fallback terminal descriptions
757   --without-xterm-new     specify if xterm terminfo should be old version
758   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
759   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
760   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
761   --disable-big-core      assume machine has little memory
762   --disable-big-strings   assume compiler has only standard-size strings
763   --enable-termcap        compile in termcap fallback support
764   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
765   --enable-getcap         fast termcap load, no xrefs to terminfo
766   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
767   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
768   --disable-root-environ  restrict environment when running as root
769   --enable-symlinks       make tic use symbolic links not hard links
770   --enable-broken_linker  compile with broken-linker support code
771   --enable-bsdpad         recognize BSD-style prefix padding
772   --enable-widec          compile with wide-char/UTF-8 code
773   --disable-lp64          allow chtype to be long (ignore _LP64)
774   --disable-largefile     omit support for large files
775   --disable-tparm-varargs compile tparm() without varargs interface
776   --disable-tic-depends   link tic library without explicit dependency on ncurses library
777   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
778   --with-bool=TYPE        override fallback type of bool variable
779   --with-caps=alt         compile with alternate Caps file
780   --with-chtype=TYPE      override type of chtype
781   --with-ospeed=TYPE      override type of ospeed variable
782   --with-mmask-t=TYPE     override type of mmask_t
783   --with-ccharw-max=XXX   override size CCHARW_MAX
784   --with-tparm-arg=TYPE   override parameter type of tparm
785   --with-rcs-ids          compile-in RCS identifiers
786 Options to Specify How Manpages are Installed:
787   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
788                           optionally formatted/catonly, e.g., gzip,formatted
789   --with-manpage-renames  specify manpage-renaming
790   --with-manpage-aliases  specify manpage-aliases using .so
791   --with-manpage-symlinks specify manpage-aliases using symlinks
792   --with-manpage-tbl      specify manpage processing with tbl
793 Extensions:
794   --disable-ext-funcs     disable function-extensions
795   --enable-sp-funcs       enable SCREEN-extensions
796   --enable-term-driver    enable terminal-driver
797   --enable-const          compile with extra/non-standard const
798   --enable-ext-colors     compile for 256-color support
799   --enable-ext-mouse      compile for extended mouse-encoding
800   --enable-ext-putwin     compile with extended putwin/screendump
801   --enable-no-padding     compile with $NCURSES_NO_PADDING code
802   --enable-signed-char    compile using signed Boolean's in term.h
803   --enable-sigwinch       compile with SIGWINCH handler
804   --enable-tcap-names     compile with user-definable terminal capabilities
805   --with-pthread          use POSIX thread library
806   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
807   --enable-weak-symbols   enable weak-symbols for pthreads
808   --enable-reentrant      compile with reentrant code
809   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
810   --enable-opaque-form    make form-library structures "opaque"
811   --enable-opaque-menu    make menu-library structures "opaque"
812   --enable-opaque-panel   make panel-library structures "opaque"
813   --with-wrap-prefix=XXX  override prefix used for public variables
814 Development Code:
815   --without-develop       disable development options
816   --enable-hard-tabs      compile with hard-tabs code
817   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
818 Experimental Code:
819   --disable-assumed-color do not assume anything about default-colors
820   --disable-hashmap       compile without hashmap scrolling-optimization
821   --enable-colorfgbg      compile-in experimental $COLORFGBG code
822   --enable-interop        compile-in interop bindings
823   --enable-safe-sprintf   compile with experimental safe-sprintf code
824   --disable-scroll-hints  compile without scroll-hints code
825   --enable-wgetch-events  compile with wgetch-events code
826 Testing/development Options:
827   --disable-echo          do not display "compiling" commands
828   --enable-warnings       build: turn on GCC compiler warnings
829   --enable-string-hacks   work around bogus compiler/loader warnings
830   --enable-assertions     test: turn on generation of assertion code
831   --with-dmalloc          test: use Gray Watson's dmalloc library
832   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
833   --with-valgrind         test: use valgrind
834   --disable-leaks         test: free permanent memory, analyze leaks
835   --enable-expanded       test: generate functions for certain macros
836   --disable-macros        test: use functions rather than macros
837   --with-trace            test: add trace() function to all models of ncurses
838   --disable-gnat-projects test: disable GNAT projects even if usable
839 Ada95 Binding Options:
840   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
841   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
842   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
843   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
844
845 Some influential environment variables:
846   CC          C compiler command
847   CFLAGS      C compiler flags
848   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
849               nonstandard directory <lib dir>
850   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
851               headers in a nonstandard directory <include dir>
852   CPP         C preprocessor
853   CXX         C++ compiler command
854   CXXFLAGS    C++ compiler flags
855   CXXCPP      C++ preprocessor
856
857 Use these variables to override the choices made by `configure' or to help
858 it to find libraries and programs with nonstandard names/locations.
859
860 EOF
861 fi
862
863 if test "$ac_init_help" = "recursive"; then
864   # If there are subdirs, report their specific --help.
865   ac_popdir=`pwd`
866   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
867     cd $ac_subdir
868     # A "../" for each directory in /$ac_subdir.
869     ac_dots=`echo $ac_subdir |
870              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
871
872     case $srcdir in
873     .) # No --srcdir option.  We are building in place.
874       ac_sub_srcdir=$srcdir ;;
875     [\\/]* | ?:[\\/]* ) # Absolute path.
876       ac_sub_srcdir=$srcdir/$ac_subdir ;;
877     *) # Relative path.
878       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
879     esac
880
881     # Check for guested configure; otherwise get Cygnus style configure.
882     if test -f $ac_sub_srcdir/configure.gnu; then
883       echo
884       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
885     elif test -f $ac_sub_srcdir/configure; then
886       echo
887       $SHELL $ac_sub_srcdir/configure  --help=recursive
888     elif test -f $ac_sub_srcdir/configure.ac ||
889            test -f $ac_sub_srcdir/configure.in; then
890       echo
891       $ac_configure --help
892     else
893       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
894     fi
895     cd $ac_popdir
896   done
897 fi
898
899 test -n "$ac_init_help" && exit 0
900 if $ac_init_version; then
901   cat <<\EOF
902
903 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
904 Free Software Foundation, Inc.
905 This configure script is free software; the Free Software Foundation
906 gives unlimited permission to copy, distribute and modify it.
907 EOF
908   exit 0
909 fi
910 exec 5>config.log
911 cat >&5 <<EOF
912 This file contains any messages produced by compilers while
913 running configure, to aid debugging if configure makes a mistake.
914
915 It was created by $as_me, which was
916 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
917
918   $ $0 $@
919
920 EOF
921 {
922 cat <<_ASUNAME
923 ## ---------- ##
924 ## Platform.  ##
925 ## ---------- ##
926
927 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
928 uname -m = `(uname -m) 2>/dev/null || echo unknown`
929 uname -r = `(uname -r) 2>/dev/null || echo unknown`
930 uname -s = `(uname -s) 2>/dev/null || echo unknown`
931 uname -v = `(uname -v) 2>/dev/null || echo unknown`
932
933 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
934 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
935
936 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
937 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
938 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
939 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
940 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
941 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
942 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
943
944 PATH = $PATH
945
946 _ASUNAME
947 } >&5
948
949 cat >&5 <<EOF
950 ## ------------ ##
951 ## Core tests.  ##
952 ## ------------ ##
953
954 EOF
955
956 # Keep a trace of the command line.
957 # Strip out --no-create and --no-recursion so they do not pile up.
958 # Also quote any args containing shell meta-characters.
959 ac_configure_args=
960 ac_sep=
961 for ac_arg
962 do
963   case $ac_arg in
964   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
965   | --no-cr | --no-c) ;;
966   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
967   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
968   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
969     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
970     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
971     ac_sep=" " ;;
972   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
973      ac_sep=" " ;;
974   esac
975   # Get rid of the leading space.
976 done
977
978 # When interrupted or exit'd, cleanup temporary files, and complete
979 # config.log.  We remove comments because anyway the quotes in there
980 # would cause problems or look ugly.
981 trap 'exit_status=$?
982   # Save into config.log some information that might help in debugging.
983   echo >&5
984   echo "## ----------------- ##" >&5
985   echo "## Cache variables.  ##" >&5
986   echo "## ----------------- ##" >&5
987   echo >&5
988   # The following way of writing the cache mishandles newlines in values,
989 {
990   (set) 2>&1 |
991     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
992     *ac_space=\ *)
993       sed -n \
994         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
995           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
996       ;;
997     *)
998       sed -n \
999         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1000       ;;
1001     esac;
1002 } >&5
1003   sed "/^$/d" confdefs.h >conftest.log
1004   if test -s conftest.log; then
1005     echo >&5
1006     echo "## ------------ ##" >&5
1007     echo "## confdefs.h.  ##" >&5
1008     echo "## ------------ ##" >&5
1009     echo >&5
1010     cat conftest.log >&5
1011   fi
1012   (echo; echo) >&5
1013   test "$ac_signal" != 0 &&
1014     echo "$as_me: caught signal $ac_signal" >&5
1015   echo "$as_me: exit $exit_status" >&5
1016   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1017     exit $exit_status
1018      ' 0
1019 for ac_signal in 1 2 13 15; do
1020   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1021 done
1022 ac_signal=0
1023
1024 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1025 rm -rf conftest* confdefs.h
1026 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1027 echo >confdefs.h
1028
1029 # Let the site file select an alternate cache file if it wants to.
1030 # Prefer explicitly selected file to automatically selected ones.
1031 if test -z "$CONFIG_SITE"; then
1032   if test "x$prefix" != xNONE; then
1033     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1034   else
1035     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1036   fi
1037 fi
1038 for ac_site_file in $CONFIG_SITE; do
1039   if test -r "$ac_site_file"; then
1040     { echo "$as_me:1040: loading site script $ac_site_file" >&5
1041 echo "$as_me: loading site script $ac_site_file" >&6;}
1042     cat "$ac_site_file" >&5
1043     . "$ac_site_file"
1044   fi
1045 done
1046
1047 if test -r "$cache_file"; then
1048   # Some versions of bash will fail to source /dev/null (special
1049   # files actually), so we avoid doing that.
1050   if test -f "$cache_file"; then
1051     { echo "$as_me:1051: loading cache $cache_file" >&5
1052 echo "$as_me: loading cache $cache_file" >&6;}
1053     case $cache_file in
1054       [\\/]* | ?:[\\/]* ) . $cache_file;;
1055       *)                      . ./$cache_file;;
1056     esac
1057   fi
1058 else
1059   { echo "$as_me:1059: creating cache $cache_file" >&5
1060 echo "$as_me: creating cache $cache_file" >&6;}
1061   >$cache_file
1062 fi
1063
1064 # Check that the precious variables saved in the cache have kept the same
1065 # value.
1066 ac_cache_corrupted=false
1067 for ac_var in `(set) 2>&1 |
1068                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1069   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1070   eval ac_new_set=\$ac_env_${ac_var}_set
1071   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1072   eval ac_new_val="\$ac_env_${ac_var}_value"
1073   case $ac_old_set,$ac_new_set in
1074     set,)
1075       { echo "$as_me:1075: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1076 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1077       ac_cache_corrupted=: ;;
1078     ,set)
1079       { echo "$as_me:1079: error: \`$ac_var' was not set in the previous run" >&5
1080 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1081       ac_cache_corrupted=: ;;
1082     ,);;
1083     *)
1084       if test "x$ac_old_val" != "x$ac_new_val"; then
1085         { echo "$as_me:1085: error: \`$ac_var' has changed since the previous run:" >&5
1086 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1087         { echo "$as_me:1087:   former value:  $ac_old_val" >&5
1088 echo "$as_me:   former value:  $ac_old_val" >&2;}
1089         { echo "$as_me:1089:   current value: $ac_new_val" >&5
1090 echo "$as_me:   current value: $ac_new_val" >&2;}
1091         ac_cache_corrupted=:
1092       fi;;
1093   esac
1094   # Pass precious variables to config.status.  It doesn't matter if
1095   # we pass some twice (in addition to the command line arguments).
1096   if test "$ac_new_set" = set; then
1097     case $ac_new_val in
1098     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1099       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1100       ac_configure_args="$ac_configure_args '$ac_arg'"
1101       ;;
1102     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1103        ;;
1104     esac
1105   fi
1106 done
1107 if $ac_cache_corrupted; then
1108   { echo "$as_me:1108: error: changes in the environment can compromise the build" >&5
1109 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1110   { { echo "$as_me:1110: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1111 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1112    { (exit 1); exit 1; }; }
1113 fi
1114
1115 ac_ext=c
1116 ac_cpp='$CPP $CPPFLAGS'
1117 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1118 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1119 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1120 ac_main_return=return
1121
1122 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1123   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1124                    ECHO_T='     ' ;;
1125   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1126   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1127 esac
1128 echo "#! $SHELL" >conftest.sh
1129 echo  "exit 0"   >>conftest.sh
1130 chmod +x conftest.sh
1131 if { (echo "$as_me:1131: PATH=\".;.\"; conftest.sh") >&5
1132   (PATH=".;."; conftest.sh) 2>&5
1133   ac_status=$?
1134   echo "$as_me:1134: \$? = $ac_status" >&5
1135   (exit $ac_status); }; then
1136   ac_path_separator=';'
1137 else
1138   ac_path_separator=:
1139 fi
1140 PATH_SEPARATOR="$ac_path_separator"
1141 rm -f conftest.sh
1142
1143 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1144
1145 top_builddir=`pwd`
1146
1147 echo "$as_me:1147: checking for egrep" >&5
1148 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1149 if test "${ac_cv_prog_egrep+set}" = set; then
1150   echo $ECHO_N "(cached) $ECHO_C" >&6
1151 else
1152   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1153                 then ac_cv_prog_egrep='grep -E'
1154                 else ac_cv_prog_egrep='egrep'
1155         fi
1156 fi
1157 echo "$as_me:1157: result: $ac_cv_prog_egrep" >&5
1158 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1159         EGREP=$ac_cv_prog_egrep
1160
1161         test -z "$EGREP" && { { echo "$as_me:1161: error: No egrep program found" >&5
1162 echo "$as_me: error: No egrep program found" >&2;}
1163    { (exit 1); exit 1; }; }
1164
1165 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1166 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1167 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1168 cf_cv_abi_version=${NCURSES_MAJOR}
1169 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1170 cf_cv_timestamp=`date`
1171 echo "$as_me:1171: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1172 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1173
1174 if test -f $srcdir/VERSION ; then
1175         echo "$as_me:1175: checking for package version" >&5
1176 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1177
1178         # if there are not enough fields, cut returns the last one...
1179         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1180         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1181         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1182
1183         # this is how CF_BUNDLED_INTL uses $VERSION:
1184         VERSION="$cf_field1"
1185
1186         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1187         test -z "$VERSION_MAJOR" && { { echo "$as_me:1187: error: missing major-version" >&5
1188 echo "$as_me: error: missing major-version" >&2;}
1189    { (exit 1); exit 1; }; }
1190
1191         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1192         test -z "$VERSION_MINOR" && { { echo "$as_me:1192: error: missing minor-version" >&5
1193 echo "$as_me: error: missing minor-version" >&2;}
1194    { (exit 1); exit 1; }; }
1195
1196         echo "$as_me:1196: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1197 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1198
1199         echo "$as_me:1199: checking for package patch date" >&5
1200 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1201         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1202         case .$VERSION_PATCH in
1203         (.)
1204                 { { echo "$as_me:1204: error: missing patch-date $VERSION_PATCH" >&5
1205 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1206    { (exit 1); exit 1; }; }
1207                 ;;
1208         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1209                 ;;
1210         (*)
1211                 { { echo "$as_me:1211: error: illegal patch-date $VERSION_PATCH" >&5
1212 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1213    { (exit 1); exit 1; }; }
1214                 ;;
1215         esac
1216         echo "$as_me:1216: result: $VERSION_PATCH" >&5
1217 echo "${ECHO_T}$VERSION_PATCH" >&6
1218 else
1219         { { echo "$as_me:1219: error: did not find $srcdir/VERSION" >&5
1220 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1221    { (exit 1); exit 1; }; }
1222 fi
1223
1224 # show the actual data that we have for versions:
1225 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1226
1227 echo "${as_me:-configure}:1227: testing ABI VERSION $VERSION ..." 1>&5
1228
1229 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1232
1233 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1234
1235 echo "${as_me:-configure}:1235: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1236
1237 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1238
1239 echo "${as_me:-configure}:1239: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1240
1241         cf_PACKAGE=NCURSES
1242         PACKAGE=ncurses
1243
1244 cat >>confdefs.h <<EOF
1245 #define PACKAGE "$PACKAGE"
1246 EOF
1247
1248 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1249
1250         cat >>confdefs.h <<EOF
1251 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1252 EOF
1253
1254         cat >>confdefs.h <<EOF
1255 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1256 EOF
1257
1258 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1259
1260 # Check whether --with-rel-version or --without-rel-version was given.
1261 if test "${with_rel_version+set}" = set; then
1262   withval="$with_rel_version"
1263   { echo "$as_me:1263: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1264 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1265  cf_cv_rel_version=$withval
1266 fi;
1267
1268  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1269  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1270
1271 if test -n "$NCURSES_MAJOR" ; then
1272   case $NCURSES_MAJOR in
1273   ([0-9]*)
1274         ;;
1275   (*)
1276         { { echo "$as_me:1276: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1277 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1278    { (exit 1); exit 1; }; }
1279         ;;
1280   esac
1281 else
1282   { { echo "$as_me:1282: error: Release major-version value is empty" >&5
1283 echo "$as_me: error: Release major-version value is empty" >&2;}
1284    { (exit 1); exit 1; }; }
1285 fi
1286
1287 if test -n "$NCURSES_MINOR" ; then
1288   case $NCURSES_MINOR in
1289   ([0-9]*)
1290         ;;
1291   (*)
1292         { { echo "$as_me:1292: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1293 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1294    { (exit 1); exit 1; }; }
1295         ;;
1296   esac
1297 else
1298   { { echo "$as_me:1298: error: Release minor-version value is empty" >&5
1299 echo "$as_me: error: Release minor-version value is empty" >&2;}
1300    { (exit 1); exit 1; }; }
1301 fi
1302
1303 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1304
1305 # Check whether --with-abi-version or --without-abi-version was given.
1306 if test "${with_abi_version+set}" = set; then
1307   withval="$with_abi_version"
1308
1309         if test "x$cf_cv_abi_version" != "x$withval"
1310         then
1311                 { echo "$as_me:1311: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1312 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1313                 case $cf_cv_rel_version in
1314                 (5.*)
1315                         cf_cv_rel_version=$withval.0
1316                         ;;
1317                 (6.*)
1318                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1319                         ;;
1320                 esac
1321         fi
1322         cf_cv_abi_version=$withval
1323 fi;
1324
1325 if test -n "$cf_cv_abi_version" ; then
1326   case $cf_cv_abi_version in
1327   ([0-9]*)
1328         ;;
1329   (*)
1330         { { echo "$as_me:1330: error: ABI version is not a number: $cf_cv_abi_version" >&5
1331 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1332    { (exit 1); exit 1; }; }
1333         ;;
1334   esac
1335 else
1336   { { echo "$as_me:1336: error: ABI version value is empty" >&5
1337 echo "$as_me: error: ABI version value is empty" >&2;}
1338    { (exit 1); exit 1; }; }
1339 fi
1340
1341 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1342 then
1343         case $cf_cv_rel_version in
1344         (5.*)
1345                 cf_cv_rel_version=$with_abi_version.0
1346                 ;;
1347         esac
1348 fi
1349
1350 ac_aux_dir=
1351 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1352   if test -f $ac_dir/install-sh; then
1353     ac_aux_dir=$ac_dir
1354     ac_install_sh="$ac_aux_dir/install-sh -c"
1355     break
1356   elif test -f $ac_dir/install.sh; then
1357     ac_aux_dir=$ac_dir
1358     ac_install_sh="$ac_aux_dir/install.sh -c"
1359     break
1360   elif test -f $ac_dir/shtool; then
1361     ac_aux_dir=$ac_dir
1362     ac_install_sh="$ac_aux_dir/shtool install -c"
1363     break
1364   fi
1365 done
1366 if test -z "$ac_aux_dir"; then
1367   { { echo "$as_me:1367: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1368 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1369    { (exit 1); exit 1; }; }
1370 fi
1371 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1372 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1373 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1374
1375 # Make sure we can run config.sub.
1376 $ac_config_sub sun4 >/dev/null 2>&1 ||
1377   { { echo "$as_me:1377: error: cannot run $ac_config_sub" >&5
1378 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1379    { (exit 1); exit 1; }; }
1380
1381 echo "$as_me:1381: checking build system type" >&5
1382 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1383 if test "${ac_cv_build+set}" = set; then
1384   echo $ECHO_N "(cached) $ECHO_C" >&6
1385 else
1386   ac_cv_build_alias=$build_alias
1387 test -z "$ac_cv_build_alias" &&
1388   ac_cv_build_alias=`$ac_config_guess`
1389 test -z "$ac_cv_build_alias" &&
1390   { { echo "$as_me:1390: error: cannot guess build type; you must specify one" >&5
1391 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1392    { (exit 1); exit 1; }; }
1393 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1394   { { echo "$as_me:1394: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1395 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1396    { (exit 1); exit 1; }; }
1397
1398 fi
1399 echo "$as_me:1399: result: $ac_cv_build" >&5
1400 echo "${ECHO_T}$ac_cv_build" >&6
1401 build=$ac_cv_build
1402 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1403 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1404 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1405
1406 echo "$as_me:1406: checking host system type" >&5
1407 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1408 if test "${ac_cv_host+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_host_alias=$host_alias
1412 test -z "$ac_cv_host_alias" &&
1413   ac_cv_host_alias=$ac_cv_build_alias
1414 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1415   { { echo "$as_me:1415: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1416 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1417    { (exit 1); exit 1; }; }
1418
1419 fi
1420 echo "$as_me:1420: result: $ac_cv_host" >&5
1421 echo "${ECHO_T}$ac_cv_host" >&6
1422 host=$ac_cv_host
1423 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1424 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1425 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1426
1427 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1428         echo "$as_me:1428: checking target system type" >&5
1429 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1430 if test "${ac_cv_target+set}" = set; then
1431   echo $ECHO_N "(cached) $ECHO_C" >&6
1432 else
1433   ac_cv_target_alias=$target_alias
1434 test "x$ac_cv_target_alias" = "x" &&
1435   ac_cv_target_alias=$ac_cv_host_alias
1436 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1437   { { echo "$as_me:1437: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1438 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1439    { (exit 1); exit 1; }; }
1440
1441 fi
1442 echo "$as_me:1442: result: $ac_cv_target" >&5
1443 echo "${ECHO_T}$ac_cv_target" >&6
1444 target=$ac_cv_target
1445 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1446 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1447 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1448
1449 # The aliases save the names the user supplied, while $host etc.
1450 # will get canonicalized.
1451 test -n "$target_alias" &&
1452   test "$program_prefix$program_suffix$program_transform_name" = \
1453     NONENONEs,x,x, &&
1454   program_prefix=${target_alias}-
1455         system_name="$host_os"
1456 else
1457         system_name="`(uname -s -r) 2>/dev/null`"
1458         if test -z "$system_name" ; then
1459                 system_name="`(hostname) 2>/dev/null`"
1460         fi
1461 fi
1462 test -n "$system_name" &&
1463 cat >>confdefs.h <<EOF
1464 #define SYSTEM_NAME "$system_name"
1465 EOF
1466
1467 if test "${cf_cv_system_name+set}" = set; then
1468   echo $ECHO_N "(cached) $ECHO_C" >&6
1469 else
1470   cf_cv_system_name="$system_name"
1471 fi
1472
1473 test -z "$system_name" && system_name="$cf_cv_system_name"
1474 test -n "$cf_cv_system_name" && echo "$as_me:1474: result: Configuring for $cf_cv_system_name" >&5
1475 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1476
1477 if test ".$system_name" != ".$cf_cv_system_name" ; then
1478         echo "$as_me:1478: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1479 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1480         { { echo "$as_me:1480: error: \"Please remove config.cache and try again.\"" >&5
1481 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1482    { (exit 1); exit 1; }; }
1483 fi
1484
1485 # Check whether --with-system-type or --without-system-type was given.
1486 if test "${with_system_type+set}" = set; then
1487   withval="$with_system_type"
1488   { echo "$as_me:1488: WARNING: overriding system type to $withval" >&5
1489 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1490         cf_cv_system_name=$withval
1491         host_os=$withval
1492
1493 fi;
1494
1495 ###     Save the given $CFLAGS to allow user-override.
1496 cf_user_CFLAGS="$CFLAGS"
1497
1498 ###     Default install-location
1499
1500 echo "$as_me:1500: checking for prefix" >&5
1501 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1502 if test "x$prefix" = "xNONE" ; then
1503         case "$cf_cv_system_name" in
1504                 # non-vendor systems don't have a conflict
1505         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1506                 prefix=/usr
1507                 ;;
1508         (*)     prefix=$ac_default_prefix
1509                 ;;
1510         esac
1511 fi
1512 echo "$as_me:1512: result: $prefix" >&5
1513 echo "${ECHO_T}$prefix" >&6
1514
1515 if test "x$prefix" = "xNONE" ; then
1516 echo "$as_me:1516: checking for default include-directory" >&5
1517 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1518 test -n "$verbose" && echo 1>&6
1519 for cf_symbol in \
1520         $includedir \
1521         $includedir/ncurses \
1522         $prefix/include \
1523         $prefix/include/ncurses \
1524         /usr/local/include \
1525         /usr/local/include/ncurses \
1526         /usr/include \
1527         /usr/include/ncurses
1528 do
1529         cf_dir=`eval echo $cf_symbol`
1530         if test -f $cf_dir/curses.h ; then
1531         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1532                 includedir="$cf_symbol"
1533                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1534                 break
1535         fi
1536         fi
1537         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1538 done
1539 echo "$as_me:1539: result: $includedir" >&5
1540 echo "${ECHO_T}$includedir" >&6
1541 fi
1542
1543 ### Defaults for ncurses ABI
1544
1545 case x$cf_cv_abi_version in
1546 (x[6789])
1547         cf_dft_ext_colors=yes
1548         cf_dft_ext_const=yes
1549         cf_dft_ext_mouse=yes
1550         cf_dft_ext_putwin=yes
1551         cf_dft_ext_spfuncs=yes
1552         cf_dft_filter_syms=yes
1553         cf_dft_chtype=uint32_t
1554         cf_dft_mmask_t=uint32_t
1555         cf_dft_interop=yes
1556         cf_dft_tparm_arg=intptr_t
1557         cf_dft_with_lp64=yes
1558         ;;
1559 (*)
1560         cf_dft_ext_colors=no
1561         cf_dft_ext_const=no
1562         cf_dft_ext_mouse=no
1563         cf_dft_ext_putwin=no
1564         cf_dft_ext_spfuncs=no
1565         cf_dft_filter_syms=no
1566         cf_dft_chtype=auto
1567         cf_dft_mmask_t=auto
1568         cf_dft_interop=no
1569         cf_dft_tparm_arg=long
1570         cf_dft_with_lp64=no
1571         ;;
1572 esac
1573
1574 ###     Checks for programs.
1575
1576 # Check whether --with-ada or --without-ada was given.
1577 if test "${with_ada+set}" = set; then
1578   withval="$with_ada"
1579   cf_with_ada=$withval
1580 else
1581   cf_with_ada=yes
1582 fi;
1583 if test "x$cf_with_ada" = xyes
1584 then
1585         cf_PROG_CC="gnatgcc gcc cc"
1586 else
1587         cf_PROG_CC="gcc cc"
1588 fi
1589
1590 ac_ext=c
1591 ac_cpp='$CPP $CPPFLAGS'
1592 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1593 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1594 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1595 ac_main_return=return
1596 if test -n "$ac_tool_prefix"; then
1597   for ac_prog in $cf_PROG_CC
1598   do
1599     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1600 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1601 echo "$as_me:1601: checking for $ac_word" >&5
1602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1603 if test "${ac_cv_prog_CC+set}" = set; then
1604   echo $ECHO_N "(cached) $ECHO_C" >&6
1605 else
1606   if test -n "$CC"; then
1607   ac_cv_prog_CC="$CC" # Let the user override the test.
1608 else
1609   ac_save_IFS=$IFS; IFS=$ac_path_separator
1610 ac_dummy="$PATH"
1611 for ac_dir in $ac_dummy; do
1612   IFS=$ac_save_IFS
1613   test -z "$ac_dir" && ac_dir=.
1614   $as_executable_p "$ac_dir/$ac_word" || continue
1615 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1616 echo "$as_me:1616: found $ac_dir/$ac_word" >&5
1617 break
1618 done
1619
1620 fi
1621 fi
1622 CC=$ac_cv_prog_CC
1623 if test -n "$CC"; then
1624   echo "$as_me:1624: result: $CC" >&5
1625 echo "${ECHO_T}$CC" >&6
1626 else
1627   echo "$as_me:1627: result: no" >&5
1628 echo "${ECHO_T}no" >&6
1629 fi
1630
1631     test -n "$CC" && break
1632   done
1633 fi
1634 if test -z "$CC"; then
1635   ac_ct_CC=$CC
1636   for ac_prog in $cf_PROG_CC
1637 do
1638   # Extract the first word of "$ac_prog", so it can be a program name with args.
1639 set dummy $ac_prog; ac_word=$2
1640 echo "$as_me:1640: checking for $ac_word" >&5
1641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1642 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1643   echo $ECHO_N "(cached) $ECHO_C" >&6
1644 else
1645   if test -n "$ac_ct_CC"; then
1646   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1647 else
1648   ac_save_IFS=$IFS; IFS=$ac_path_separator
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651   IFS=$ac_save_IFS
1652   test -z "$ac_dir" && ac_dir=.
1653   $as_executable_p "$ac_dir/$ac_word" || continue
1654 ac_cv_prog_ac_ct_CC="$ac_prog"
1655 echo "$as_me:1655: found $ac_dir/$ac_word" >&5
1656 break
1657 done
1658
1659 fi
1660 fi
1661 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1662 if test -n "$ac_ct_CC"; then
1663   echo "$as_me:1663: result: $ac_ct_CC" >&5
1664 echo "${ECHO_T}$ac_ct_CC" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$ac_ct_CC" && break
1671 done
1672
1673   CC=$ac_ct_CC
1674 fi
1675
1676 test -z "$CC" && { { echo "$as_me:1676: error: no acceptable cc found in \$PATH" >&5
1677 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1678    { (exit 1); exit 1; }; }
1679
1680 # Provide some information about the compiler.
1681 echo "$as_me:1681:" \
1682      "checking for C compiler version" >&5
1683 ac_compiler=`set X $ac_compile; echo $2`
1684 { (eval echo "$as_me:1684: \"$ac_compiler --version </dev/null >&5\"") >&5
1685   (eval $ac_compiler --version </dev/null >&5) 2>&5
1686   ac_status=$?
1687   echo "$as_me:1687: \$? = $ac_status" >&5
1688   (exit $ac_status); }
1689 { (eval echo "$as_me:1689: \"$ac_compiler -v </dev/null >&5\"") >&5
1690   (eval $ac_compiler -v </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694 { (eval echo "$as_me:1694: \"$ac_compiler -V </dev/null >&5\"") >&5
1695   (eval $ac_compiler -V </dev/null >&5) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }
1699
1700 cat >conftest.$ac_ext <<_ACEOF
1701 #line 1701 "configure"
1702 #include "confdefs.h"
1703
1704 int
1705 main (void)
1706 {
1707
1708   ;
1709   return 0;
1710 }
1711 _ACEOF
1712 ac_clean_files_save=$ac_clean_files
1713 ac_clean_files="$ac_clean_files a.out a.exe"
1714 # Try to create an executable without -o first, disregard a.out.
1715 # It will help us diagnose broken compilers, and finding out an intuition
1716 # of exeext.
1717 echo "$as_me:1717: checking for C compiler default output" >&5
1718 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1719 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1720 if { (eval echo "$as_me:1720: \"$ac_link_default\"") >&5
1721   (eval $ac_link_default) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }; then
1725   # Find the output, starting from the most likely.  This scheme is
1726 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1727 # resort.
1728 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1729                 ls a.out conftest 2>/dev/null;
1730                 ls a.* conftest.* 2>/dev/null`; do
1731   case $ac_file in
1732     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1733     a.out ) # We found the default executable, but exeext='' is most
1734             # certainly right.
1735             break;;
1736     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1737           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1738           export ac_cv_exeext
1739           break;;
1740     * ) break;;
1741   esac
1742 done
1743 else
1744   echo "$as_me: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1746 { { echo "$as_me:1746: error: C compiler cannot create executables" >&5
1747 echo "$as_me: error: C compiler cannot create executables" >&2;}
1748    { (exit 77); exit 77; }; }
1749 fi
1750
1751 ac_exeext=$ac_cv_exeext
1752 echo "$as_me:1752: result: $ac_file" >&5
1753 echo "${ECHO_T}$ac_file" >&6
1754
1755 # Check the compiler produces executables we can run.  If not, either
1756 # the compiler is broken, or we cross compile.
1757 echo "$as_me:1757: checking whether the C compiler works" >&5
1758 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1759 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1760 # If not cross compiling, check that we can run a simple program.
1761 if test "$cross_compiling" != yes; then
1762   if { ac_try='./$ac_file'
1763   { (eval echo "$as_me:1763: \"$ac_try\"") >&5
1764   (eval $ac_try) 2>&5
1765   ac_status=$?
1766   echo "$as_me:1766: \$? = $ac_status" >&5
1767   (exit $ac_status); }; }; then
1768     cross_compiling=no
1769   else
1770     if test "$cross_compiling" = maybe; then
1771         cross_compiling=yes
1772     else
1773         { { echo "$as_me:1773: error: cannot run C compiled programs.
1774 If you meant to cross compile, use \`--host'." >&5
1775 echo "$as_me: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&2;}
1777    { (exit 1); exit 1; }; }
1778     fi
1779   fi
1780 fi
1781 echo "$as_me:1781: result: yes" >&5
1782 echo "${ECHO_T}yes" >&6
1783
1784 rm -f a.out a.exe conftest$ac_cv_exeext
1785 ac_clean_files=$ac_clean_files_save
1786 # Check the compiler produces executables we can run.  If not, either
1787 # the compiler is broken, or we cross compile.
1788 echo "$as_me:1788: checking whether we are cross compiling" >&5
1789 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1790 echo "$as_me:1790: result: $cross_compiling" >&5
1791 echo "${ECHO_T}$cross_compiling" >&6
1792
1793 echo "$as_me:1793: checking for executable suffix" >&5
1794 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1795 if { (eval echo "$as_me:1795: \"$ac_link\"") >&5
1796   (eval $ac_link) 2>&5
1797   ac_status=$?
1798   echo "$as_me:1798: \$? = $ac_status" >&5
1799   (exit $ac_status); }; then
1800   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1801 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1802 # work properly (i.e., refer to `conftest.exe'), while it won't with
1803 # `rm'.
1804 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1805   case $ac_file in
1806     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1807     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1808           export ac_cv_exeext
1809           break;;
1810     * ) break;;
1811   esac
1812 done
1813 else
1814   { { echo "$as_me:1814: error: cannot compute EXEEXT: cannot compile and link" >&5
1815 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1816    { (exit 1); exit 1; }; }
1817 fi
1818
1819 rm -f conftest$ac_cv_exeext
1820 echo "$as_me:1820: result: $ac_cv_exeext" >&5
1821 echo "${ECHO_T}$ac_cv_exeext" >&6
1822
1823 rm -f conftest.$ac_ext
1824 EXEEXT=$ac_cv_exeext
1825 ac_exeext=$EXEEXT
1826 echo "$as_me:1826: checking for object suffix" >&5
1827 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1828 if test "${ac_cv_objext+set}" = set; then
1829   echo $ECHO_N "(cached) $ECHO_C" >&6
1830 else
1831   cat >conftest.$ac_ext <<_ACEOF
1832 #line 1832 "configure"
1833 #include "confdefs.h"
1834
1835 int
1836 main (void)
1837 {
1838
1839   ;
1840   return 0;
1841 }
1842 _ACEOF
1843 rm -f conftest.o conftest.obj
1844 if { (eval echo "$as_me:1844: \"$ac_compile\"") >&5
1845   (eval $ac_compile) 2>&5
1846   ac_status=$?
1847   echo "$as_me:1847: \$? = $ac_status" >&5
1848   (exit $ac_status); }; then
1849   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1850   case $ac_file in
1851     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1852     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1853        break;;
1854   esac
1855 done
1856 else
1857   echo "$as_me: failed program was:" >&5
1858 cat conftest.$ac_ext >&5
1859 { { echo "$as_me:1859: error: cannot compute OBJEXT: cannot compile" >&5
1860 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1861    { (exit 1); exit 1; }; }
1862 fi
1863
1864 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1865 fi
1866 echo "$as_me:1866: result: $ac_cv_objext" >&5
1867 echo "${ECHO_T}$ac_cv_objext" >&6
1868 OBJEXT=$ac_cv_objext
1869 ac_objext=$OBJEXT
1870 echo "$as_me:1870: checking whether we are using the GNU C compiler" >&5
1871 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1872 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1873   echo $ECHO_N "(cached) $ECHO_C" >&6
1874 else
1875   cat >conftest.$ac_ext <<_ACEOF
1876 #line 1876 "configure"
1877 #include "confdefs.h"
1878
1879 int
1880 main (void)
1881 {
1882 #ifndef __GNUC__
1883        choke me
1884 #endif
1885
1886   ;
1887   return 0;
1888 }
1889 _ACEOF
1890 rm -f conftest.$ac_objext
1891 if { (eval echo "$as_me:1891: \"$ac_compile\"") >&5
1892   (eval $ac_compile) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); } &&
1896          { ac_try='test -s conftest.$ac_objext'
1897   { (eval echo "$as_me:1897: \"$ac_try\"") >&5
1898   (eval $ac_try) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); }; }; then
1902   ac_compiler_gnu=yes
1903 else
1904   echo "$as_me: failed program was:" >&5
1905 cat conftest.$ac_ext >&5
1906 ac_compiler_gnu=no
1907 fi
1908 rm -f conftest.$ac_objext conftest.$ac_ext
1909 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1910
1911 fi
1912 echo "$as_me:1912: result: $ac_cv_c_compiler_gnu" >&5
1913 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1914 GCC=`test $ac_compiler_gnu = yes && echo yes`
1915 ac_test_CFLAGS=${CFLAGS+set}
1916 ac_save_CFLAGS=$CFLAGS
1917 CFLAGS="-g"
1918 echo "$as_me:1918: checking whether $CC accepts -g" >&5
1919 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1920 if test "${ac_cv_prog_cc_g+set}" = set; then
1921   echo $ECHO_N "(cached) $ECHO_C" >&6
1922 else
1923   cat >conftest.$ac_ext <<_ACEOF
1924 #line 1924 "configure"
1925 #include "confdefs.h"
1926
1927 int
1928 main (void)
1929 {
1930
1931   ;
1932   return 0;
1933 }
1934 _ACEOF
1935 rm -f conftest.$ac_objext
1936 if { (eval echo "$as_me:1936: \"$ac_compile\"") >&5
1937   (eval $ac_compile) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); } &&
1941          { ac_try='test -s conftest.$ac_objext'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); }; }; then
1947   ac_cv_prog_cc_g=yes
1948 else
1949   echo "$as_me: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
1951 ac_cv_prog_cc_g=no
1952 fi
1953 rm -f conftest.$ac_objext conftest.$ac_ext
1954 fi
1955 echo "$as_me:1955: result: $ac_cv_prog_cc_g" >&5
1956 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1957 if test "$ac_test_CFLAGS" = set; then
1958   CFLAGS=$ac_save_CFLAGS
1959 elif test $ac_cv_prog_cc_g = yes; then
1960   if test "$GCC" = yes; then
1961     CFLAGS="-g -O2"
1962   else
1963     CFLAGS="-g"
1964   fi
1965 else
1966   if test "$GCC" = yes; then
1967     CFLAGS="-O2"
1968   else
1969     CFLAGS=
1970   fi
1971 fi
1972 # Some people use a C++ compiler to compile C.  Since we use `exit',
1973 # in C++ we need to declare it.  In case someone uses the same compiler
1974 # for both compiling C and C++ we need to have the C++ compiler decide
1975 # the declaration of exit, since it's the most demanding environment.
1976 cat >conftest.$ac_ext <<_ACEOF
1977 #ifndef __cplusplus
1978   choke me
1979 #endif
1980 _ACEOF
1981 rm -f conftest.$ac_objext
1982 if { (eval echo "$as_me:1982: \"$ac_compile\"") >&5
1983   (eval $ac_compile) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); } &&
1987          { ac_try='test -s conftest.$ac_objext'
1988   { (eval echo "$as_me:1988: \"$ac_try\"") >&5
1989   (eval $ac_try) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); }; }; then
1993   for ac_declaration in \
1994    ''\
1995    '#include <stdlib.h>' \
1996    'extern "C" void std::exit (int) throw (); using std::exit;' \
1997    'extern "C" void std::exit (int); using std::exit;' \
1998    'extern "C" void exit (int) throw ();' \
1999    'extern "C" void exit (int);' \
2000    'void exit (int);'
2001 do
2002   cat >conftest.$ac_ext <<_ACEOF
2003 #line 2003 "configure"
2004 #include "confdefs.h"
2005 #include <stdlib.h>
2006 $ac_declaration
2007 int
2008 main (void)
2009 {
2010 exit (42);
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 rm -f conftest.$ac_objext
2016 if { (eval echo "$as_me:2016: \"$ac_compile\"") >&5
2017   (eval $ac_compile) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } &&
2021          { ac_try='test -s conftest.$ac_objext'
2022   { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2023   (eval $ac_try) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); }; }; then
2027   :
2028 else
2029   echo "$as_me: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2031 continue
2032 fi
2033 rm -f conftest.$ac_objext conftest.$ac_ext
2034   cat >conftest.$ac_ext <<_ACEOF
2035 #line 2035 "configure"
2036 #include "confdefs.h"
2037 $ac_declaration
2038 int
2039 main (void)
2040 {
2041 exit (42);
2042   ;
2043   return 0;
2044 }
2045 _ACEOF
2046 rm -f conftest.$ac_objext
2047 if { (eval echo "$as_me:2047: \"$ac_compile\"") >&5
2048   (eval $ac_compile) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); } &&
2052          { ac_try='test -s conftest.$ac_objext'
2053   { (eval echo "$as_me:2053: \"$ac_try\"") >&5
2054   (eval $ac_try) 2>&5
2055   ac_status=$?
2056   echo "$as_me:2056: \$? = $ac_status" >&5
2057   (exit $ac_status); }; }; then
2058   break
2059 else
2060   echo "$as_me: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062 fi
2063 rm -f conftest.$ac_objext conftest.$ac_ext
2064 done
2065 rm -rf conftest*
2066 if test -n "$ac_declaration"; then
2067   echo '#ifdef __cplusplus' >>confdefs.h
2068   echo $ac_declaration      >>confdefs.h
2069   echo '#endif'             >>confdefs.h
2070 fi
2071
2072 else
2073   echo "$as_me: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 fi
2076 rm -f conftest.$ac_objext conftest.$ac_ext
2077 ac_ext=c
2078 ac_cpp='$CPP $CPPFLAGS'
2079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2082 ac_main_return=return
2083
2084 GCC_VERSION=none
2085 if test "$GCC" = yes ; then
2086         echo "$as_me:2086: checking version of $CC" >&5
2087 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2088         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.].*//'`"
2089         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2090         echo "$as_me:2090: result: $GCC_VERSION" >&5
2091 echo "${ECHO_T}$GCC_VERSION" >&6
2092 fi
2093
2094 echo "$as_me:2094: checking for $CC option to accept ANSI C" >&5
2095 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2096 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2097   echo $ECHO_N "(cached) $ECHO_C" >&6
2098 else
2099   ac_cv_prog_cc_stdc=no
2100 ac_save_CC=$CC
2101 cat >conftest.$ac_ext <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104 #include <stdarg.h>
2105 #include <stdio.h>
2106 #include <sys/types.h>
2107 #include <sys/stat.h>
2108 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2109 struct buf { int x; };
2110 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2111 static char *e (p, i)
2112      char **p;
2113      int i;
2114 {
2115   return p[i];
2116 }
2117 static char *f (char * (*g) (char **, int), char **p, ...)
2118 {
2119   char *s;
2120   va_list v;
2121   va_start (v,p);
2122   s = g (p, va_arg (v,int));
2123   va_end (v);
2124   return s;
2125 }
2126 int test (int i, double x);
2127 struct s1 {int (*f) (int a);};
2128 struct s2 {int (*f) (double a);};
2129 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2130 int argc;
2131 char **argv;
2132 int
2133 main (void)
2134 {
2135 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2136   ;
2137   return 0;
2138 }
2139 _ACEOF
2140 # Don't try gcc -ansi; that turns off useful extensions and
2141 # breaks some systems' header files.
2142 # AIX                   -qlanglvl=ansi
2143 # Ultrix and OSF/1      -std1
2144 # HP-UX 10.20 and later -Ae
2145 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2146 # SVR4                  -Xc -D__EXTENSIONS__
2147 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2148 do
2149   CC="$ac_save_CC $ac_arg"
2150   rm -f conftest.$ac_objext
2151 if { (eval echo "$as_me:2151: \"$ac_compile\"") >&5
2152   (eval $ac_compile) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); } &&
2156          { ac_try='test -s conftest.$ac_objext'
2157   { (eval echo "$as_me:2157: \"$ac_try\"") >&5
2158   (eval $ac_try) 2>&5
2159   ac_status=$?
2160   echo "$as_me:2160: \$? = $ac_status" >&5
2161   (exit $ac_status); }; }; then
2162   ac_cv_prog_cc_stdc=$ac_arg
2163 break
2164 else
2165   echo "$as_me: failed program was:" >&5
2166 cat conftest.$ac_ext >&5
2167 fi
2168 rm -f conftest.$ac_objext
2169 done
2170 rm -f conftest.$ac_ext conftest.$ac_objext
2171 CC=$ac_save_CC
2172
2173 fi
2174
2175 case "x$ac_cv_prog_cc_stdc" in
2176   x|xno)
2177     echo "$as_me:2177: result: none needed" >&5
2178 echo "${ECHO_T}none needed" >&6 ;;
2179   *)
2180     echo "$as_me:2180: result: $ac_cv_prog_cc_stdc" >&5
2181 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2182     CC="$CC $ac_cv_prog_cc_stdc" ;;
2183 esac
2184
2185 # This should have been defined by AC_PROG_CC
2186 : ${CC:=cc}
2187
2188 echo "$as_me:2188: checking \$CC variable" >&5
2189 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2190 case "$CC" in
2191 (*[\ \  ]-*)
2192         echo "$as_me:2192: result: broken" >&5
2193 echo "${ECHO_T}broken" >&6
2194         { echo "$as_me:2194: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2195 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2196         # humor him...
2197         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2198         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2199         CC="$cf_prog"
2200         for cf_arg in $cf_flags
2201         do
2202                 case "x$cf_arg" in
2203                 (x-[IUDfgOW]*)
2204
2205 cf_fix_cppflags=no
2206 cf_new_cflags=
2207 cf_new_cppflags=
2208 cf_new_extra_cppflags=
2209
2210 for cf_add_cflags in $cf_arg
2211 do
2212 case $cf_fix_cppflags in
2213 (no)
2214         case $cf_add_cflags in
2215         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2216                 case $cf_add_cflags in
2217                 (-D*)
2218                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2219
2220                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2221                                 && test -z "${cf_tst_cflags}" \
2222                                 && cf_fix_cppflags=yes
2223
2224                         if test $cf_fix_cppflags = yes ; then
2225
2226         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2227         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2228
2229                                 continue
2230                         elif test "${cf_tst_cflags}" = "\"'" ; then
2231
2232         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2233         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2234
2235                                 continue
2236                         fi
2237                         ;;
2238                 esac
2239                 case "$CPPFLAGS" in
2240                 (*$cf_add_cflags)
2241                         ;;
2242                 (*)
2243                         case $cf_add_cflags in
2244                         (-D*)
2245                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2246
2247 CPPFLAGS=`echo "$CPPFLAGS" | \
2248         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2249                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2250
2251                                 ;;
2252                         esac
2253
2254         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2255         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2256
2257                         ;;
2258                 esac
2259                 ;;
2260         (*)
2261
2262         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2263         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2264
2265                 ;;
2266         esac
2267         ;;
2268 (yes)
2269
2270         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2271         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2272
2273         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2274
2275         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2276                 && test -z "${cf_tst_cflags}" \
2277                 && cf_fix_cppflags=no
2278         ;;
2279 esac
2280 done
2281
2282 if test -n "$cf_new_cflags" ; then
2283
2284         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2285         CFLAGS="${CFLAGS}$cf_new_cflags"
2286
2287 fi
2288
2289 if test -n "$cf_new_cppflags" ; then
2290
2291         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2292         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2293
2294 fi
2295
2296 if test -n "$cf_new_extra_cppflags" ; then
2297
2298         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2299         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2300
2301 fi
2302
2303                         ;;
2304                 (*)
2305                         CC="$CC $cf_arg"
2306                         ;;
2307                 esac
2308         done
2309         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2310
2311 echo "${as_me:-configure}:2311: testing resulting CC: '$CC' ..." 1>&5
2312
2313         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2314
2315 echo "${as_me:-configure}:2315: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2316
2317         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2318
2319 echo "${as_me:-configure}:2319: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2320
2321         ;;
2322 (*)
2323         echo "$as_me:2323: result: ok" >&5
2324 echo "${ECHO_T}ok" >&6
2325         ;;
2326 esac
2327
2328 ac_ext=c
2329 ac_cpp='$CPP $CPPFLAGS'
2330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2333 ac_main_return=return
2334 echo "$as_me:2334: checking how to run the C preprocessor" >&5
2335 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2336 # On Suns, sometimes $CPP names a directory.
2337 if test -n "$CPP" && test -d "$CPP"; then
2338   CPP=
2339 fi
2340 if test -z "$CPP"; then
2341   if test "${ac_cv_prog_CPP+set}" = set; then
2342   echo $ECHO_N "(cached) $ECHO_C" >&6
2343 else
2344       # Double quotes because CPP needs to be expanded
2345     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2346     do
2347       ac_preproc_ok=false
2348 for ac_c_preproc_warn_flag in '' yes
2349 do
2350   # Use a header file that comes with gcc, so configuring glibc
2351   # with a fresh cross-compiler works.
2352   # On the NeXT, cc -E runs the code through the compiler's parser,
2353   # not just through cpp. "Syntax error" is here to catch this case.
2354   cat >conftest.$ac_ext <<_ACEOF
2355 #line 2355 "configure"
2356 #include "confdefs.h"
2357 #include <assert.h>
2358                      Syntax error
2359 _ACEOF
2360 if { (eval echo "$as_me:2360: \"$ac_cpp conftest.$ac_ext\"") >&5
2361   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2362   ac_status=$?
2363   egrep -v '^ *\+' conftest.er1 >conftest.err
2364   rm -f conftest.er1
2365   cat conftest.err >&5
2366   echo "$as_me:2366: \$? = $ac_status" >&5
2367   (exit $ac_status); } >/dev/null; then
2368   if test -s conftest.err; then
2369     ac_cpp_err=$ac_c_preproc_warn_flag
2370   else
2371     ac_cpp_err=
2372   fi
2373 else
2374   ac_cpp_err=yes
2375 fi
2376 if test -z "$ac_cpp_err"; then
2377   :
2378 else
2379   echo "$as_me: failed program was:" >&5
2380   cat conftest.$ac_ext >&5
2381   # Broken: fails on valid input.
2382 continue
2383 fi
2384 rm -f conftest.err conftest.$ac_ext
2385
2386   # OK, works on sane cases.  Now check whether non-existent headers
2387   # can be detected and how.
2388   cat >conftest.$ac_ext <<_ACEOF
2389 #line 2389 "configure"
2390 #include "confdefs.h"
2391 #include <ac_nonexistent.h>
2392 _ACEOF
2393 if { (eval echo "$as_me:2393: \"$ac_cpp conftest.$ac_ext\"") >&5
2394   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2395   ac_status=$?
2396   egrep -v '^ *\+' conftest.er1 >conftest.err
2397   rm -f conftest.er1
2398   cat conftest.err >&5
2399   echo "$as_me:2399: \$? = $ac_status" >&5
2400   (exit $ac_status); } >/dev/null; then
2401   if test -s conftest.err; then
2402     ac_cpp_err=$ac_c_preproc_warn_flag
2403   else
2404     ac_cpp_err=
2405   fi
2406 else
2407   ac_cpp_err=yes
2408 fi
2409 if test -z "$ac_cpp_err"; then
2410   # Broken: success on invalid input.
2411 continue
2412 else
2413   echo "$as_me: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   # Passes both tests.
2416 ac_preproc_ok=:
2417 break
2418 fi
2419 rm -f conftest.err conftest.$ac_ext
2420
2421 done
2422 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2423 rm -f conftest.err conftest.$ac_ext
2424 if $ac_preproc_ok; then
2425   break
2426 fi
2427
2428     done
2429     ac_cv_prog_CPP=$CPP
2430
2431 fi
2432   CPP=$ac_cv_prog_CPP
2433 else
2434   ac_cv_prog_CPP=$CPP
2435 fi
2436 echo "$as_me:2436: result: $CPP" >&5
2437 echo "${ECHO_T}$CPP" >&6
2438 ac_preproc_ok=false
2439 for ac_c_preproc_warn_flag in '' yes
2440 do
2441   # Use a header file that comes with gcc, so configuring glibc
2442   # with a fresh cross-compiler works.
2443   # On the NeXT, cc -E runs the code through the compiler's parser,
2444   # not just through cpp. "Syntax error" is here to catch this case.
2445   cat >conftest.$ac_ext <<_ACEOF
2446 #line 2446 "configure"
2447 #include "confdefs.h"
2448 #include <assert.h>
2449                      Syntax error
2450 _ACEOF
2451 if { (eval echo "$as_me:2451: \"$ac_cpp conftest.$ac_ext\"") >&5
2452   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2453   ac_status=$?
2454   egrep -v '^ *\+' conftest.er1 >conftest.err
2455   rm -f conftest.er1
2456   cat conftest.err >&5
2457   echo "$as_me:2457: \$? = $ac_status" >&5
2458   (exit $ac_status); } >/dev/null; then
2459   if test -s conftest.err; then
2460     ac_cpp_err=$ac_c_preproc_warn_flag
2461   else
2462     ac_cpp_err=
2463   fi
2464 else
2465   ac_cpp_err=yes
2466 fi
2467 if test -z "$ac_cpp_err"; then
2468   :
2469 else
2470   echo "$as_me: failed program was:" >&5
2471   cat conftest.$ac_ext >&5
2472   # Broken: fails on valid input.
2473 continue
2474 fi
2475 rm -f conftest.err conftest.$ac_ext
2476
2477   # OK, works on sane cases.  Now check whether non-existent headers
2478   # can be detected and how.
2479   cat >conftest.$ac_ext <<_ACEOF
2480 #line 2480 "configure"
2481 #include "confdefs.h"
2482 #include <ac_nonexistent.h>
2483 _ACEOF
2484 if { (eval echo "$as_me:2484: \"$ac_cpp conftest.$ac_ext\"") >&5
2485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2486   ac_status=$?
2487   egrep -v '^ *\+' conftest.er1 >conftest.err
2488   rm -f conftest.er1
2489   cat conftest.err >&5
2490   echo "$as_me:2490: \$? = $ac_status" >&5
2491   (exit $ac_status); } >/dev/null; then
2492   if test -s conftest.err; then
2493     ac_cpp_err=$ac_c_preproc_warn_flag
2494   else
2495     ac_cpp_err=
2496   fi
2497 else
2498   ac_cpp_err=yes
2499 fi
2500 if test -z "$ac_cpp_err"; then
2501   # Broken: success on invalid input.
2502 continue
2503 else
2504   echo "$as_me: failed program was:" >&5
2505   cat conftest.$ac_ext >&5
2506   # Passes both tests.
2507 ac_preproc_ok=:
2508 break
2509 fi
2510 rm -f conftest.err conftest.$ac_ext
2511
2512 done
2513 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2514 rm -f conftest.err conftest.$ac_ext
2515 if $ac_preproc_ok; then
2516   :
2517 else
2518   { { echo "$as_me:2518: error: C preprocessor \"$CPP\" fails sanity check" >&5
2519 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2520    { (exit 1); exit 1; }; }
2521 fi
2522
2523 ac_ext=c
2524 ac_cpp='$CPP $CPPFLAGS'
2525 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2526 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2527 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2528 ac_main_return=return
2529
2530 if test $ac_cv_c_compiler_gnu = yes; then
2531     echo "$as_me:2531: checking whether $CC needs -traditional" >&5
2532 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2533 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2534   echo $ECHO_N "(cached) $ECHO_C" >&6
2535 else
2536     ac_pattern="Autoconf.*'x'"
2537   cat >conftest.$ac_ext <<_ACEOF
2538 #line 2538 "configure"
2539 #include "confdefs.h"
2540 #include <sgtty.h>
2541 int Autoconf = TIOCGETP;
2542 _ACEOF
2543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2544   egrep "$ac_pattern" >/dev/null 2>&1; then
2545   ac_cv_prog_gcc_traditional=yes
2546 else
2547   ac_cv_prog_gcc_traditional=no
2548 fi
2549 rm -rf conftest*
2550
2551   if test $ac_cv_prog_gcc_traditional = no; then
2552     cat >conftest.$ac_ext <<_ACEOF
2553 #line 2553 "configure"
2554 #include "confdefs.h"
2555 #include <termio.h>
2556 int Autoconf = TCGETA;
2557 _ACEOF
2558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2559   egrep "$ac_pattern" >/dev/null 2>&1; then
2560   ac_cv_prog_gcc_traditional=yes
2561 fi
2562 rm -rf conftest*
2563
2564   fi
2565 fi
2566 echo "$as_me:2566: result: $ac_cv_prog_gcc_traditional" >&5
2567 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2568   if test $ac_cv_prog_gcc_traditional = yes; then
2569     CC="$CC -traditional"
2570   fi
2571 fi
2572
2573 echo "$as_me:2573: checking whether $CC understands -c and -o together" >&5
2574 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2575 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2576   echo $ECHO_N "(cached) $ECHO_C" >&6
2577 else
2578
2579 cat > conftest.$ac_ext <<CF_EOF
2580 int main(void)
2581 {
2582         ${cf_cv_main_return:-return}(0);
2583 }
2584 CF_EOF
2585 # We do the test twice because some compilers refuse to overwrite an
2586 # existing .o file with -o, though they will create one.
2587 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2588 if { (eval echo "$as_me:2588: \"$ac_try\"") >&5
2589   (eval $ac_try) 2>&5
2590   ac_status=$?
2591   echo "$as_me:2591: \$? = $ac_status" >&5
2592   (exit $ac_status); } &&
2593   test -f conftest2.$ac_objext && { (eval echo "$as_me:2593: \"$ac_try\"") >&5
2594   (eval $ac_try) 2>&5
2595   ac_status=$?
2596   echo "$as_me:2596: \$? = $ac_status" >&5
2597   (exit $ac_status); };
2598 then
2599   eval cf_cv_prog_CC_c_o=yes
2600 else
2601   eval cf_cv_prog_CC_c_o=no
2602 fi
2603 rm -rf conftest*
2604
2605 fi
2606 if test $cf_cv_prog_CC_c_o = yes; then
2607   echo "$as_me:2607: result: yes" >&5
2608 echo "${ECHO_T}yes" >&6
2609 else
2610   echo "$as_me:2610: result: no" >&5
2611 echo "${ECHO_T}no" >&6
2612 fi
2613
2614 if test "$cross_compiling" = yes ; then
2615         LDCONFIG=:
2616 else
2617         case "$cf_cv_system_name" in
2618         (dragonfly*|mirbsd*|freebsd*)
2619                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2620                 ;;
2621         (*) LDPATH=$PATH:/sbin:/usr/sbin
2622                 # Extract the first word of "ldconfig", so it can be a program name with args.
2623 set dummy ldconfig; ac_word=$2
2624 echo "$as_me:2624: checking for $ac_word" >&5
2625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2626 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2627   echo $ECHO_N "(cached) $ECHO_C" >&6
2628 else
2629   case $LDCONFIG in
2630   [\\/]* | ?:[\\/]*)
2631   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2632   ;;
2633   *)
2634   ac_save_IFS=$IFS; IFS=$ac_path_separator
2635 ac_dummy="$LDPATH"
2636 for ac_dir in $ac_dummy; do
2637   IFS=$ac_save_IFS
2638   test -z "$ac_dir" && ac_dir=.
2639   if $as_executable_p "$ac_dir/$ac_word"; then
2640    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2641    echo "$as_me:2641: found $ac_dir/$ac_word" >&5
2642    break
2643 fi
2644 done
2645
2646   ;;
2647 esac
2648 fi
2649 LDCONFIG=$ac_cv_path_LDCONFIG
2650
2651 if test -n "$LDCONFIG"; then
2652   echo "$as_me:2652: result: $LDCONFIG" >&5
2653 echo "${ECHO_T}$LDCONFIG" >&6
2654 else
2655   echo "$as_me:2655: result: no" >&5
2656 echo "${ECHO_T}no" >&6
2657 fi
2658
2659                 ;;
2660         esac
2661 fi
2662
2663 echo "$as_me:2663: checking if you want to ensure bool is consistent with C++" >&5
2664 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2665
2666 # Check whether --with-cxx or --without-cxx was given.
2667 if test "${with_cxx+set}" = set; then
2668   withval="$with_cxx"
2669   cf_with_cxx=$withval
2670 else
2671   cf_with_cxx=yes
2672 fi;
2673 echo "$as_me:2673: result: $cf_with_cxx" >&5
2674 echo "${ECHO_T}$cf_with_cxx" >&6
2675 if test "X$cf_with_cxx" = Xno ; then
2676         CXX=""
2677         GXX=""
2678 else
2679         # with autoconf 2.13, we can change the error to a warning:
2680                 ac_ext=cc
2681 ac_cpp='$CXXCPP $CPPFLAGS'
2682 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2685 ac_main_return=return
2686 if test -n "$ac_tool_prefix"; then
2687   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2688   do
2689     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2690 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2691 echo "$as_me:2691: checking for $ac_word" >&5
2692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2693 if test "${ac_cv_prog_CXX+set}" = set; then
2694   echo $ECHO_N "(cached) $ECHO_C" >&6
2695 else
2696   if test -n "$CXX"; then
2697   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2698 else
2699   ac_save_IFS=$IFS; IFS=$ac_path_separator
2700 ac_dummy="$PATH"
2701 for ac_dir in $ac_dummy; do
2702   IFS=$ac_save_IFS
2703   test -z "$ac_dir" && ac_dir=.
2704   $as_executable_p "$ac_dir/$ac_word" || continue
2705 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2706 echo "$as_me:2706: found $ac_dir/$ac_word" >&5
2707 break
2708 done
2709
2710 fi
2711 fi
2712 CXX=$ac_cv_prog_CXX
2713 if test -n "$CXX"; then
2714   echo "$as_me:2714: result: $CXX" >&5
2715 echo "${ECHO_T}$CXX" >&6
2716 else
2717   echo "$as_me:2717: result: no" >&5
2718 echo "${ECHO_T}no" >&6
2719 fi
2720
2721     test -n "$CXX" && break
2722   done
2723 fi
2724 if test -z "$CXX"; then
2725   ac_ct_CXX=$CXX
2726   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2727 do
2728   # Extract the first word of "$ac_prog", so it can be a program name with args.
2729 set dummy $ac_prog; ac_word=$2
2730 echo "$as_me:2730: checking for $ac_word" >&5
2731 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2732 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2733   echo $ECHO_N "(cached) $ECHO_C" >&6
2734 else
2735   if test -n "$ac_ct_CXX"; then
2736   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2737 else
2738   ac_save_IFS=$IFS; IFS=$ac_path_separator
2739 ac_dummy="$PATH"
2740 for ac_dir in $ac_dummy; do
2741   IFS=$ac_save_IFS
2742   test -z "$ac_dir" && ac_dir=.
2743   $as_executable_p "$ac_dir/$ac_word" || continue
2744 ac_cv_prog_ac_ct_CXX="$ac_prog"
2745 echo "$as_me:2745: found $ac_dir/$ac_word" >&5
2746 break
2747 done
2748
2749 fi
2750 fi
2751 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2752 if test -n "$ac_ct_CXX"; then
2753   echo "$as_me:2753: result: $ac_ct_CXX" >&5
2754 echo "${ECHO_T}$ac_ct_CXX" >&6
2755 else
2756   echo "$as_me:2756: result: no" >&5
2757 echo "${ECHO_T}no" >&6
2758 fi
2759
2760   test -n "$ac_ct_CXX" && break
2761 done
2762 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2763
2764   CXX=$ac_ct_CXX
2765 fi
2766
2767 # Provide some information about the compiler.
2768 echo "$as_me:2768:" \
2769      "checking for C++ compiler version" >&5
2770 ac_compiler=`set X $ac_compile; echo $2`
2771 { (eval echo "$as_me:2771: \"$ac_compiler --version </dev/null >&5\"") >&5
2772   (eval $ac_compiler --version </dev/null >&5) 2>&5
2773   ac_status=$?
2774   echo "$as_me:2774: \$? = $ac_status" >&5
2775   (exit $ac_status); }
2776 { (eval echo "$as_me:2776: \"$ac_compiler -v </dev/null >&5\"") >&5
2777   (eval $ac_compiler -v </dev/null >&5) 2>&5
2778   ac_status=$?
2779   echo "$as_me:2779: \$? = $ac_status" >&5
2780   (exit $ac_status); }
2781 { (eval echo "$as_me:2781: \"$ac_compiler -V </dev/null >&5\"") >&5
2782   (eval $ac_compiler -V </dev/null >&5) 2>&5
2783   ac_status=$?
2784   echo "$as_me:2784: \$? = $ac_status" >&5
2785   (exit $ac_status); }
2786
2787 echo "$as_me:2787: checking whether we are using the GNU C++ compiler" >&5
2788 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2789 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   cat >conftest.$ac_ext <<_ACEOF
2793 #line 2793 "configure"
2794 #include "confdefs.h"
2795
2796 int
2797 main (void)
2798 {
2799 #ifndef __GNUC__
2800        choke me
2801 #endif
2802
2803   ;
2804   return 0;
2805 }
2806 _ACEOF
2807 rm -f conftest.$ac_objext
2808 if { (eval echo "$as_me:2808: \"$ac_compile\"") >&5
2809   (eval $ac_compile) 2>&5
2810   ac_status=$?
2811   echo "$as_me:2811: \$? = $ac_status" >&5
2812   (exit $ac_status); } &&
2813          { ac_try='test -s conftest.$ac_objext'
2814   { (eval echo "$as_me:2814: \"$ac_try\"") >&5
2815   (eval $ac_try) 2>&5
2816   ac_status=$?
2817   echo "$as_me:2817: \$? = $ac_status" >&5
2818   (exit $ac_status); }; }; then
2819   ac_compiler_gnu=yes
2820 else
2821   echo "$as_me: failed program was:" >&5
2822 cat conftest.$ac_ext >&5
2823 ac_compiler_gnu=no
2824 fi
2825 rm -f conftest.$ac_objext conftest.$ac_ext
2826 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2827
2828 fi
2829 echo "$as_me:2829: result: $ac_cv_cxx_compiler_gnu" >&5
2830 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2831 GXX=`test $ac_compiler_gnu = yes && echo yes`
2832 ac_test_CXXFLAGS=${CXXFLAGS+set}
2833 ac_save_CXXFLAGS=$CXXFLAGS
2834 CXXFLAGS="-g"
2835 echo "$as_me:2835: checking whether $CXX accepts -g" >&5
2836 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2837 if test "${ac_cv_prog_cxx_g+set}" = set; then
2838   echo $ECHO_N "(cached) $ECHO_C" >&6
2839 else
2840   cat >conftest.$ac_ext <<_ACEOF
2841 #line 2841 "configure"
2842 #include "confdefs.h"
2843
2844 int
2845 main (void)
2846 {
2847
2848   ;
2849   return 0;
2850 }
2851 _ACEOF
2852 rm -f conftest.$ac_objext
2853 if { (eval echo "$as_me:2853: \"$ac_compile\"") >&5
2854   (eval $ac_compile) 2>&5
2855   ac_status=$?
2856   echo "$as_me:2856: \$? = $ac_status" >&5
2857   (exit $ac_status); } &&
2858          { ac_try='test -s conftest.$ac_objext'
2859   { (eval echo "$as_me:2859: \"$ac_try\"") >&5
2860   (eval $ac_try) 2>&5
2861   ac_status=$?
2862   echo "$as_me:2862: \$? = $ac_status" >&5
2863   (exit $ac_status); }; }; then
2864   ac_cv_prog_cxx_g=yes
2865 else
2866   echo "$as_me: failed program was:" >&5
2867 cat conftest.$ac_ext >&5
2868 ac_cv_prog_cxx_g=no
2869 fi
2870 rm -f conftest.$ac_objext conftest.$ac_ext
2871 fi
2872 echo "$as_me:2872: result: $ac_cv_prog_cxx_g" >&5
2873 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2874 if test "$ac_test_CXXFLAGS" = set; then
2875   CXXFLAGS=$ac_save_CXXFLAGS
2876 elif test $ac_cv_prog_cxx_g = yes; then
2877   if test "$GXX" = yes; then
2878     CXXFLAGS="-g -O2"
2879   else
2880     CXXFLAGS="-g"
2881   fi
2882 else
2883   if test "$GXX" = yes; then
2884     CXXFLAGS="-O2"
2885   else
2886     CXXFLAGS=
2887   fi
2888 fi
2889 for ac_declaration in \
2890    ''\
2891    '#include <stdlib.h>' \
2892    'extern "C" void std::exit (int) throw (); using std::exit;' \
2893    'extern "C" void std::exit (int); using std::exit;' \
2894    'extern "C" void exit (int) throw ();' \
2895    'extern "C" void exit (int);' \
2896    'void exit (int);'
2897 do
2898   cat >conftest.$ac_ext <<_ACEOF
2899 #line 2899 "configure"
2900 #include "confdefs.h"
2901 #include <stdlib.h>
2902 $ac_declaration
2903 int
2904 main (void)
2905 {
2906 exit (42);
2907   ;
2908   return 0;
2909 }
2910 _ACEOF
2911 rm -f conftest.$ac_objext
2912 if { (eval echo "$as_me:2912: \"$ac_compile\"") >&5
2913   (eval $ac_compile) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); } &&
2917          { ac_try='test -s conftest.$ac_objext'
2918   { (eval echo "$as_me:2918: \"$ac_try\"") >&5
2919   (eval $ac_try) 2>&5
2920   ac_status=$?
2921   echo "$as_me:2921: \$? = $ac_status" >&5
2922   (exit $ac_status); }; }; then
2923   :
2924 else
2925   echo "$as_me: failed program was:" >&5
2926 cat conftest.$ac_ext >&5
2927 continue
2928 fi
2929 rm -f conftest.$ac_objext conftest.$ac_ext
2930   cat >conftest.$ac_ext <<_ACEOF
2931 #line 2931 "configure"
2932 #include "confdefs.h"
2933 $ac_declaration
2934 int
2935 main (void)
2936 {
2937 exit (42);
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 rm -f conftest.$ac_objext
2943 if { (eval echo "$as_me:2943: \"$ac_compile\"") >&5
2944   (eval $ac_compile) 2>&5
2945   ac_status=$?
2946   echo "$as_me:2946: \$? = $ac_status" >&5
2947   (exit $ac_status); } &&
2948          { ac_try='test -s conftest.$ac_objext'
2949   { (eval echo "$as_me:2949: \"$ac_try\"") >&5
2950   (eval $ac_try) 2>&5
2951   ac_status=$?
2952   echo "$as_me:2952: \$? = $ac_status" >&5
2953   (exit $ac_status); }; }; then
2954   break
2955 else
2956   echo "$as_me: failed program was:" >&5
2957 cat conftest.$ac_ext >&5
2958 fi
2959 rm -f conftest.$ac_objext conftest.$ac_ext
2960 done
2961 rm -rf conftest*
2962 if test -n "$ac_declaration"; then
2963   echo '#ifdef __cplusplus' >>confdefs.h
2964   echo $ac_declaration      >>confdefs.h
2965   echo '#endif'             >>confdefs.h
2966 fi
2967
2968 ac_ext=c
2969 ac_cpp='$CPP $CPPFLAGS'
2970 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2971 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2972 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2973 ac_main_return=return
2974
2975         ac_ext=cc
2976 ac_cpp='$CXXCPP $CPPFLAGS'
2977 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2978 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2979 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2980 ac_main_return=return
2981
2982         if test "x$cf_with_cxx" != xno
2983         then
2984                 # Several of the C++ configurations do not work, particularly when
2985                 # cross-compiling (20140913 -TD)
2986                 echo "$as_me:2986: checking if $CXX works" >&5
2987 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2988
2989                 save_CPPFLAGS="$CPPFLAGS"
2990                 eval cf_includedir=${includedir}
2991                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2992
2993 cat >conftest.$ac_ext <<_ACEOF
2994 #line 2994 "configure"
2995 #include "confdefs.h"
2996
2997 #include <stdlib.h>
2998 #include <stdio.h>
2999
3000 int
3001 main (void)
3002 {
3003
3004                 printf("Hello world!\n")
3005
3006   ;
3007   return 0;
3008 }
3009 _ACEOF
3010 rm -f conftest.$ac_objext
3011 if { (eval echo "$as_me:3011: \"$ac_compile\"") >&5
3012   (eval $ac_compile) 2>&5
3013   ac_status=$?
3014   echo "$as_me:3014: \$? = $ac_status" >&5
3015   (exit $ac_status); } &&
3016          { ac_try='test -s conftest.$ac_objext'
3017   { (eval echo "$as_me:3017: \"$ac_try\"") >&5
3018   (eval $ac_try) 2>&5
3019   ac_status=$?
3020   echo "$as_me:3020: \$? = $ac_status" >&5
3021   (exit $ac_status); }; }; then
3022   cf_cxx_works=yes
3023 else
3024   echo "$as_me: failed program was:" >&5
3025 cat conftest.$ac_ext >&5
3026 cf_cxx_works=no
3027 fi
3028 rm -f conftest.$ac_objext conftest.$ac_ext
3029                 CPPFLAGS="$save_CPPFLAGS"
3030
3031                 echo "$as_me:3031: result: $cf_cxx_works" >&5
3032 echo "${ECHO_T}$cf_cxx_works" >&6
3033                 if test "x$cf_cxx_works" = xno
3034                 then
3035                         { echo "$as_me:3035: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3036 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3037                         cf_with_cxx=no; CXX=""; GXX="";
3038                 fi
3039         fi
3040         ac_ext=c
3041 ac_cpp='$CPP $CPPFLAGS'
3042 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3043 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3044 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3045 ac_main_return=return
3046
3047         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3048         if test "$CXX" = "g++" ; then
3049                 # Extract the first word of "g++", so it can be a program name with args.
3050 set dummy g++; ac_word=$2
3051 echo "$as_me:3051: checking for $ac_word" >&5
3052 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3053 if test "${ac_cv_path_CXX+set}" = set; then
3054   echo $ECHO_N "(cached) $ECHO_C" >&6
3055 else
3056   case $CXX in
3057   [\\/]* | ?:[\\/]*)
3058   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3059   ;;
3060   *)
3061   ac_save_IFS=$IFS; IFS=$ac_path_separator
3062 ac_dummy="$PATH"
3063 for ac_dir in $ac_dummy; do
3064   IFS=$ac_save_IFS
3065   test -z "$ac_dir" && ac_dir=.
3066   if $as_executable_p "$ac_dir/$ac_word"; then
3067    ac_cv_path_CXX="$ac_dir/$ac_word"
3068    echo "$as_me:3068: found $ac_dir/$ac_word" >&5
3069    break
3070 fi
3071 done
3072
3073   ;;
3074 esac
3075 fi
3076 CXX=$ac_cv_path_CXX
3077
3078 if test -n "$CXX"; then
3079   echo "$as_me:3079: result: $CXX" >&5
3080 echo "${ECHO_T}$CXX" >&6
3081 else
3082   echo "$as_me:3082: result: no" >&5
3083 echo "${ECHO_T}no" >&6
3084 fi
3085
3086         fi
3087         case "x$CXX" in
3088         (x|xg++)
3089                 { echo "$as_me:3089: WARNING: You don't have any C++ compiler, too bad" >&5
3090 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3091                 cf_with_cxx=no; CXX=""; GXX="";
3092                 ;;
3093         esac
3094 fi
3095
3096 GXX_VERSION=none
3097 if test "$GXX" = yes; then
3098         echo "$as_me:3098: checking version of ${CXX:-g++}" >&5
3099 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3100         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3101         if test -z "$GXX_VERSION"
3102         then
3103                 GXX_VERSION=unknown
3104                 GXX=no
3105         fi
3106         echo "$as_me:3106: result: $GXX_VERSION" >&5
3107 echo "${ECHO_T}$GXX_VERSION" >&6
3108 fi
3109
3110 case $GXX_VERSION in
3111 (1*|2.[0-6]*)
3112         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3113         # cf_cxx_library=no
3114         { echo "$as_me:3114: WARNING: templates do not work" >&5
3115 echo "$as_me: WARNING: templates do not work" >&2;}
3116         ;;
3117 esac
3118
3119 echo "$as_me:3119: checking if you want to build C++ binding and demo" >&5
3120 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3121
3122 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3123 if test "${with_cxx_binding+set}" = set; then
3124   withval="$with_cxx_binding"
3125   cf_with_cxx_binding=$withval
3126 else
3127   cf_with_cxx_binding=$cf_with_cxx
3128 fi;
3129 echo "$as_me:3129: result: $cf_with_cxx_binding" >&5
3130 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3131
3132 echo "$as_me:3132: checking if you want to build with Ada95" >&5
3133 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3134 echo "$as_me:3134: result: $cf_with_ada" >&5
3135 echo "${ECHO_T}$cf_with_ada" >&6
3136
3137 echo "$as_me:3137: checking if you want to install terminal database" >&5
3138 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3139
3140 # Check whether --enable-db-install or --disable-db-install was given.
3141 if test "${enable_db_install+set}" = set; then
3142   enableval="$enable_db_install"
3143   cf_with_db_install=$enableval
3144 else
3145   cf_with_db_install=yes
3146 fi;
3147 echo "$as_me:3147: result: $cf_with_db_install" >&5
3148 echo "${ECHO_T}$cf_with_db_install" >&6
3149
3150 echo "$as_me:3150: checking if you want to install manpages" >&5
3151 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3152
3153 # Check whether --with-manpages or --without-manpages was given.
3154 if test "${with_manpages+set}" = set; then
3155   withval="$with_manpages"
3156   cf_with_manpages=$withval
3157 else
3158   cf_with_manpages=yes
3159 fi;
3160 echo "$as_me:3160: result: $cf_with_manpages" >&5
3161 echo "${ECHO_T}$cf_with_manpages" >&6
3162
3163 echo "$as_me:3163: checking if you want to build programs such as tic" >&5
3164 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3165
3166 # Check whether --with-progs or --without-progs was given.
3167 if test "${with_progs+set}" = set; then
3168   withval="$with_progs"
3169   cf_with_progs=$withval
3170 else
3171   cf_with_progs=yes
3172 fi;
3173 echo "$as_me:3173: result: $cf_with_progs" >&5
3174 echo "${ECHO_T}$cf_with_progs" >&6
3175
3176 if test -f $srcdir/tack/tack.h; then
3177         if test "x$cross_compiling" = xyes ; then
3178                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3179
3180 echo "${as_me:-configure}:3180: testing ignoring tack because we are cross-compiling ..." 1>&5
3181
3182                 cf_with_tack=no
3183         else
3184                 echo "$as_me:3184: checking if you want to build the tack program" >&5
3185 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3186
3187 # Check whether --with-tack or --without-tack was given.
3188 if test "${with_tack+set}" = set; then
3189   withval="$with_tack"
3190   cf_with_tack=$withval
3191 else
3192   cf_with_tack=$cf_with_progs
3193 fi;
3194                 echo "$as_me:3194: result: $cf_with_tack" >&5
3195 echo "${ECHO_T}$cf_with_tack" >&6
3196         fi
3197 else
3198         cf_with_tack=no
3199 fi
3200
3201 echo "$as_me:3201: checking if you want to build test-programs" >&5
3202 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3203
3204 # Check whether --with-tests or --without-tests was given.
3205 if test "${with_tests+set}" = set; then
3206   withval="$with_tests"
3207   cf_with_tests=$withval
3208 else
3209   cf_with_tests=yes
3210 fi;
3211 echo "$as_me:3211: result: $cf_with_tests" >&5
3212 echo "${ECHO_T}$cf_with_tests" >&6
3213
3214 echo "$as_me:3214: checking if you wish to install curses.h" >&5
3215 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3216
3217 # Check whether --with-curses-h or --without-curses-h was given.
3218 if test "${with_curses_h+set}" = set; then
3219   withval="$with_curses_h"
3220   with_curses_h=$withval
3221 else
3222   with_curses_h=yes
3223 fi;
3224 echo "$as_me:3224: result: $with_curses_h" >&5
3225 echo "${ECHO_T}$with_curses_h" >&6
3226
3227 modules_to_build="ncurses"
3228 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3229 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3230 modules_to_build="$modules_to_build panel menu form"
3231
3232 test "$program_prefix" != NONE &&
3233   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3234 # Use a double $ so make ignores it.
3235 test "$program_suffix" != NONE &&
3236   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3237 # Double any \ or $.  echo might interpret backslashes.
3238 # By default was `s,x,x', remove it if useless.
3239 cat <<\_ACEOF >conftest.sed
3240 s/[\\$]/&&/g;s/;s,x,x,$//
3241 _ACEOF
3242 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3243 rm conftest.sed
3244
3245 for ac_prog in mawk gawk nawk awk
3246 do
3247   # Extract the first word of "$ac_prog", so it can be a program name with args.
3248 set dummy $ac_prog; ac_word=$2
3249 echo "$as_me:3249: checking for $ac_word" >&5
3250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3251 if test "${ac_cv_prog_AWK+set}" = set; then
3252   echo $ECHO_N "(cached) $ECHO_C" >&6
3253 else
3254   if test -n "$AWK"; then
3255   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3256 else
3257   ac_save_IFS=$IFS; IFS=$ac_path_separator
3258 ac_dummy="$PATH"
3259 for ac_dir in $ac_dummy; do
3260   IFS=$ac_save_IFS
3261   test -z "$ac_dir" && ac_dir=.
3262   $as_executable_p "$ac_dir/$ac_word" || continue
3263 ac_cv_prog_AWK="$ac_prog"
3264 echo "$as_me:3264: found $ac_dir/$ac_word" >&5
3265 break
3266 done
3267
3268 fi
3269 fi
3270 AWK=$ac_cv_prog_AWK
3271 if test -n "$AWK"; then
3272   echo "$as_me:3272: result: $AWK" >&5
3273 echo "${ECHO_T}$AWK" >&6
3274 else
3275   echo "$as_me:3275: result: no" >&5
3276 echo "${ECHO_T}no" >&6
3277 fi
3278
3279   test -n "$AWK" && break
3280 done
3281
3282 test -z "$AWK" && { { echo "$as_me:3282: error: No awk program found" >&5
3283 echo "$as_me: error: No awk program found" >&2;}
3284    { (exit 1); exit 1; }; }
3285
3286 echo "$as_me:3286: checking for egrep" >&5
3287 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3288 if test "${ac_cv_prog_egrep+set}" = set; then
3289   echo $ECHO_N "(cached) $ECHO_C" >&6
3290 else
3291   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3292                 then ac_cv_prog_egrep='grep -E'
3293                 else ac_cv_prog_egrep='egrep'
3294         fi
3295 fi
3296 echo "$as_me:3296: result: $ac_cv_prog_egrep" >&5
3297 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3298         EGREP=$ac_cv_prog_egrep
3299
3300         test -z "$EGREP" && { { echo "$as_me:3300: error: No egrep program found" >&5
3301 echo "$as_me: error: No egrep program found" >&2;}
3302    { (exit 1); exit 1; }; }
3303
3304 # Find a good install program.  We prefer a C program (faster),
3305 # so one script is as good as another.  But avoid the broken or
3306 # incompatible versions:
3307 # SysV /etc/install, /usr/sbin/install
3308 # SunOS /usr/etc/install
3309 # IRIX /sbin/install
3310 # AIX /bin/install
3311 # AmigaOS /C/install, which installs bootblocks on floppy discs
3312 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3313 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3314 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3315 # ./install, which can be erroneously created by make from ./install.sh.
3316 echo "$as_me:3316: checking for a BSD compatible install" >&5
3317 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3318 if test -z "$INSTALL"; then
3319 if test "${ac_cv_path_install+set}" = set; then
3320   echo $ECHO_N "(cached) $ECHO_C" >&6
3321 else
3322     ac_save_IFS=$IFS; IFS=$ac_path_separator
3323   for ac_dir in $PATH; do
3324     IFS=$ac_save_IFS
3325     # Account for people who put trailing slashes in PATH elements.
3326     case $ac_dir/ in
3327     / | ./ | .// | /cC/* \
3328     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3329     | /usr/ucb/* ) ;;
3330     *)
3331       # OSF1 and SCO ODT 3.0 have their own names for install.
3332       # Don't use installbsd from OSF since it installs stuff as root
3333       # by default.
3334       for ac_prog in ginstall scoinst install; do
3335         if $as_executable_p "$ac_dir/$ac_prog"; then
3336           if test $ac_prog = install &&
3337             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3338             # AIX install.  It has an incompatible calling convention.
3339             :
3340           elif test $ac_prog = install &&
3341             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3342             # program-specific install script used by HP pwplus--don't use.
3343             :
3344           else
3345             ac_cv_path_install="$ac_dir/$ac_prog -c"
3346             break 2
3347           fi
3348         fi
3349       done
3350       ;;
3351     esac
3352   done
3353
3354 fi
3355   if test "${ac_cv_path_install+set}" = set; then
3356     INSTALL=$ac_cv_path_install
3357   else
3358     # As a last resort, use the slow shell script.  We don't cache a
3359     # path for INSTALL within a source directory, because that will
3360     # break other packages using the cache if that directory is
3361     # removed, or if the path is relative.
3362     INSTALL=$ac_install_sh
3363   fi
3364 fi
3365 echo "$as_me:3365: result: $INSTALL" >&5
3366 echo "${ECHO_T}$INSTALL" >&6
3367
3368 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3369 # It thinks the first close brace ends the variable substitution.
3370 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3371
3372 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3373
3374 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3375
3376 case $INSTALL in
3377 (/*)
3378         ;;
3379 (*)
3380         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3381         test -z "$cf_dir" && cf_dir=.
3382         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3383         ;;
3384 esac
3385
3386 for ac_prog in lint cppcheck splint
3387 do
3388   # Extract the first word of "$ac_prog", so it can be a program name with args.
3389 set dummy $ac_prog; ac_word=$2
3390 echo "$as_me:3390: checking for $ac_word" >&5
3391 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3392 if test "${ac_cv_prog_LINT+set}" = set; then
3393   echo $ECHO_N "(cached) $ECHO_C" >&6
3394 else
3395   if test -n "$LINT"; then
3396   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3397 else
3398   ac_save_IFS=$IFS; IFS=$ac_path_separator
3399 ac_dummy="$PATH"
3400 for ac_dir in $ac_dummy; do
3401   IFS=$ac_save_IFS
3402   test -z "$ac_dir" && ac_dir=.
3403   $as_executable_p "$ac_dir/$ac_word" || continue
3404 ac_cv_prog_LINT="$ac_prog"
3405 echo "$as_me:3405: found $ac_dir/$ac_word" >&5
3406 break
3407 done
3408
3409 fi
3410 fi
3411 LINT=$ac_cv_prog_LINT
3412 if test -n "$LINT"; then
3413   echo "$as_me:3413: result: $LINT" >&5
3414 echo "${ECHO_T}$LINT" >&6
3415 else
3416   echo "$as_me:3416: result: no" >&5
3417 echo "${ECHO_T}no" >&6
3418 fi
3419
3420   test -n "$LINT" && break
3421 done
3422
3423 echo "$as_me:3423: checking whether ln -s works" >&5
3424 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3425 LN_S=$as_ln_s
3426 if test "$LN_S" = "ln -s"; then
3427   echo "$as_me:3427: result: yes" >&5
3428 echo "${ECHO_T}yes" >&6
3429 else
3430   echo "$as_me:3430: result: no, using $LN_S" >&5
3431 echo "${ECHO_T}no, using $LN_S" >&6
3432 fi
3433
3434 echo "$as_me:3434: checking if $LN_S -f options work" >&5
3435 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3436
3437 rm -f conf$$.src conf$$dst
3438 echo >conf$$.dst
3439 echo first >conf$$.src
3440 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3441         cf_prog_ln_sf=yes
3442 else
3443         cf_prog_ln_sf=no
3444 fi
3445 rm -f conf$$.dst conf$$src
3446 echo "$as_me:3446: result: $cf_prog_ln_sf" >&5
3447 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3448
3449 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3450
3451 echo "$as_me:3451: checking for long file names" >&5
3452 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3453 if test "${ac_cv_sys_long_file_names+set}" = set; then
3454   echo $ECHO_N "(cached) $ECHO_C" >&6
3455 else
3456   ac_cv_sys_long_file_names=yes
3457 # Test for long file names in all the places we know might matter:
3458 #      .                the current directory, where building will happen
3459 #      $prefix/lib      where we will be installing things
3460 #      $exec_prefix/lib likewise
3461 # eval it to expand exec_prefix.
3462 #      $TMPDIR          if set, where it might want to write temporary files
3463 # if $TMPDIR is not set:
3464 #      /tmp             where it might want to write temporary files
3465 #      /var/tmp         likewise
3466 #      /usr/tmp         likewise
3467 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3468   ac_tmpdirs=$TMPDIR
3469 else
3470   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3471 fi
3472 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3473   test -d $ac_dir || continue
3474   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3475   ac_xdir=$ac_dir/cf$$
3476   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3477   ac_tf1=$ac_xdir/conftest9012345
3478   ac_tf2=$ac_xdir/conftest9012346
3479   (echo 1 >$ac_tf1) 2>/dev/null
3480   (echo 2 >$ac_tf2) 2>/dev/null
3481   ac_val=`cat $ac_tf1 2>/dev/null`
3482   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3483     ac_cv_sys_long_file_names=no
3484     rm -rf $ac_xdir 2>/dev/null
3485     break
3486   fi
3487   rm -rf $ac_xdir 2>/dev/null
3488 done
3489 fi
3490 echo "$as_me:3490: result: $ac_cv_sys_long_file_names" >&5
3491 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3492 if test $ac_cv_sys_long_file_names = yes; then
3493
3494 cat >>confdefs.h <<\EOF
3495 #define HAVE_LONG_FILE_NAMES 1
3496 EOF
3497
3498 fi
3499
3500 # if we find pkg-config, check if we should install the ".pc" files.
3501
3502 echo "$as_me:3502: checking if you want to use pkg-config" >&5
3503 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3504
3505 # Check whether --with-pkg-config or --without-pkg-config was given.
3506 if test "${with_pkg_config+set}" = set; then
3507   withval="$with_pkg_config"
3508   cf_pkg_config=$withval
3509 else
3510   cf_pkg_config=yes
3511 fi;
3512 echo "$as_me:3512: result: $cf_pkg_config" >&5
3513 echo "${ECHO_T}$cf_pkg_config" >&6
3514
3515 case $cf_pkg_config in
3516 (no)
3517         PKG_CONFIG=none
3518         ;;
3519 (yes)
3520
3521 if test -n "$ac_tool_prefix"; then
3522   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3523 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3524 echo "$as_me:3524: checking for $ac_word" >&5
3525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3526 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3527   echo $ECHO_N "(cached) $ECHO_C" >&6
3528 else
3529   case $PKG_CONFIG in
3530   [\\/]* | ?:[\\/]*)
3531   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3532   ;;
3533   *)
3534   ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 ac_dummy="$PATH"
3536 for ac_dir in $ac_dummy; do
3537   IFS=$ac_save_IFS
3538   test -z "$ac_dir" && ac_dir=.
3539   if $as_executable_p "$ac_dir/$ac_word"; then
3540    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3541    echo "$as_me:3541: found $ac_dir/$ac_word" >&5
3542    break
3543 fi
3544 done
3545
3546   ;;
3547 esac
3548 fi
3549 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3550
3551 if test -n "$PKG_CONFIG"; then
3552   echo "$as_me:3552: result: $PKG_CONFIG" >&5
3553 echo "${ECHO_T}$PKG_CONFIG" >&6
3554 else
3555   echo "$as_me:3555: result: no" >&5
3556 echo "${ECHO_T}no" >&6
3557 fi
3558
3559 fi
3560 if test -z "$ac_cv_path_PKG_CONFIG"; then
3561   ac_pt_PKG_CONFIG=$PKG_CONFIG
3562   # Extract the first word of "pkg-config", so it can be a program name with args.
3563 set dummy pkg-config; ac_word=$2
3564 echo "$as_me:3564: checking for $ac_word" >&5
3565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3566 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569   case $ac_pt_PKG_CONFIG in
3570   [\\/]* | ?:[\\/]*)
3571   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3572   ;;
3573   *)
3574   ac_save_IFS=$IFS; IFS=$ac_path_separator
3575 ac_dummy="$PATH"
3576 for ac_dir in $ac_dummy; do
3577   IFS=$ac_save_IFS
3578   test -z "$ac_dir" && ac_dir=.
3579   if $as_executable_p "$ac_dir/$ac_word"; then
3580    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3581    echo "$as_me:3581: found $ac_dir/$ac_word" >&5
3582    break
3583 fi
3584 done
3585
3586   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3587   ;;
3588 esac
3589 fi
3590 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3591
3592 if test -n "$ac_pt_PKG_CONFIG"; then
3593   echo "$as_me:3593: result: $ac_pt_PKG_CONFIG" >&5
3594 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3595 else
3596   echo "$as_me:3596: result: no" >&5
3597 echo "${ECHO_T}no" >&6
3598 fi
3599
3600   PKG_CONFIG=$ac_pt_PKG_CONFIG
3601 else
3602   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3603 fi
3604
3605         ;;
3606 (*)
3607         PKG_CONFIG=$withval
3608         ;;
3609 esac
3610
3611 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3612 if test "$PKG_CONFIG" != none ; then
3613
3614 if test "x$prefix" != xNONE; then
3615         cf_path_syntax="$prefix"
3616 else
3617         cf_path_syntax="$ac_default_prefix"
3618 fi
3619
3620 case ".$PKG_CONFIG" in
3621 (.\$\(*\)*|.\'*\'*)
3622         ;;
3623 (..|./*|.\\*)
3624         ;;
3625 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3626         ;;
3627 (.\${*prefix}*|.\${*dir}*)
3628         eval PKG_CONFIG="$PKG_CONFIG"
3629         case ".$PKG_CONFIG" in
3630         (.NONE/*)
3631                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3632                 ;;
3633         esac
3634         ;;
3635 (.no|.NONE/*)
3636         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3637         ;;
3638 (*)
3639         { { echo "$as_me:3639: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3640 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3641    { (exit 1); exit 1; }; }
3642         ;;
3643 esac
3644
3645 elif test "x$cf_pkg_config" != xno ; then
3646         { echo "$as_me:3646: WARNING: pkg-config is not installed" >&5
3647 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3648 fi
3649
3650 case $PKG_CONFIG in
3651 (no|none|yes)
3652         echo "$as_me:3652: checking for pkg-config library directory" >&5
3653 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3654         ;;
3655 (*)
3656         echo "$as_me:3656: checking for $PKG_CONFIG library directory" >&5
3657 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3658         ;;
3659 esac
3660
3661 PKG_CONFIG_LIBDIR=no
3662
3663 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3664 if test "${with_pkg_config_libdir+set}" = set; then
3665   withval="$with_pkg_config_libdir"
3666   PKG_CONFIG_LIBDIR=$withval
3667 else
3668   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3669 fi;
3670
3671 case x$PKG_CONFIG_LIBDIR in
3672 (x/*)
3673         ;;
3674 (xyes)
3675         # Look for the library directory using the same prefix as the executable
3676         if test "x$PKG_CONFIG" = xnone
3677         then
3678                 cf_path=$prefix
3679         else
3680                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3681         fi
3682
3683         # If you don't like using the default architecture, you have to specify the
3684         # intended library directory and corresponding compiler/linker options.
3685         #
3686         # This case allows for Debian's 2014-flavor of multiarch, along with the
3687         # most common variations before that point.  Some other variants spell the
3688         # directory differently, e.g., "pkg-config", and put it in unusual places.
3689         # pkg-config has always been poorly standardized, which is ironic...
3690         case x`(arch) 2>/dev/null` in
3691         (*64)
3692                 cf_search_path="\
3693                         $cf_path/lib/*64-linux-gnu \
3694                         $cf_path/share \
3695                         $cf_path/lib64 \
3696                         $cf_path/lib32 \
3697                         $cf_path/lib"
3698                 ;;
3699         (*)
3700                 cf_search_path="\
3701                         $cf_path/lib/*-linux-gnu \
3702                         $cf_path/share \
3703                         $cf_path/lib32 \
3704                         $cf_path/lib \
3705                         $cf_path/libdata"
3706                 ;;
3707         esac
3708
3709         test -n "$verbose" && echo "    list..." 1>&6
3710
3711 echo "${as_me:-configure}:3711: testing list... ..." 1>&5
3712
3713         for cf_config in $cf_search_path
3714         do
3715                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3716
3717 echo "${as_me:-configure}:3717: testing checking $cf_config/pkgconfig ..." 1>&5
3718
3719                 if test -d $cf_config/pkgconfig
3720                 then
3721                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3722                         echo "$as_me:3722: checking done" >&5
3723 echo $ECHO_N "checking done... $ECHO_C" >&6
3724                         break
3725                 fi
3726         done
3727         ;;
3728 (*)
3729         ;;
3730 esac
3731
3732 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3733         echo "$as_me:3733: result: $PKG_CONFIG_LIBDIR" >&5
3734 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3735 fi
3736
3737 if test "x$PKG_CONFIG" != xnone
3738 then
3739         echo "$as_me:3739: checking if we should install .pc files for $PKG_CONFIG" >&5
3740 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3741 else
3742         echo "$as_me:3742: checking if we should install .pc files" >&5
3743 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3744 fi
3745
3746 # Check whether --enable-pc-files or --disable-pc-files was given.
3747 if test "${enable_pc_files+set}" = set; then
3748   enableval="$enable_pc_files"
3749   enable_pc_files=$enableval
3750 else
3751   enable_pc_files=no
3752 fi;
3753 echo "$as_me:3753: result: $enable_pc_files" >&5
3754 echo "${ECHO_T}$enable_pc_files" >&6
3755
3756 if test "x$enable_pc_files" != xno
3757 then
3758         MAKE_PC_FILES=
3759         case "x$PKG_CONFIG_LIBDIR" in
3760         (xno|xyes)
3761                 { echo "$as_me:3761: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3762 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3763                 ;;
3764         (*)
3765
3766 if test "x$prefix" != xNONE; then
3767         cf_path_syntax="$prefix"
3768 else
3769         cf_path_syntax="$ac_default_prefix"
3770 fi
3771
3772 case ".$PKG_CONFIG_LIBDIR" in
3773 (.\$\(*\)*|.\'*\'*)
3774         ;;
3775 (..|./*|.\\*)
3776         ;;
3777 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3778         ;;
3779 (.\${*prefix}*|.\${*dir}*)
3780         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3781         case ".$PKG_CONFIG_LIBDIR" in
3782         (.NONE/*)
3783                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3784                 ;;
3785         esac
3786         ;;
3787 (.no|.NONE/*)
3788         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3789         ;;
3790 (*)
3791         { { echo "$as_me:3791: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3792 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3793    { (exit 1); exit 1; }; }
3794         ;;
3795 esac
3796
3797                 ;;
3798         esac
3799 else
3800         MAKE_PC_FILES="#"
3801 fi
3802
3803 if test -z "$MAKE_PC_FILES"
3804 then
3805         echo "$as_me:3805: checking for suffix to add to pc-files" >&5
3806 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3807
3808 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3809 if test "${with_pc_suffix+set}" = set; then
3810   withval="$with_pc_suffix"
3811   case "x$withval" in
3812         (xyes|xno)
3813                 PC_MODULE_SUFFIX=
3814                 ;;
3815         (*)     PC_MODULE_SUFFIX="$withval"
3816                 ;;
3817         esac
3818 fi;
3819         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3820         echo "$as_me:3820: result: $PC_MODULE_SUFFIX" >&5
3821 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3822         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3823
3824 fi
3825
3826 echo "$as_me:3826: checking if we should assume mixed-case filenames" >&5
3827 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3828
3829 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3830 if test "${enable_mixed_case+set}" = set; then
3831   enableval="$enable_mixed_case"
3832   enable_mixedcase=$enableval
3833 else
3834   enable_mixedcase=auto
3835 fi;
3836 echo "$as_me:3836: result: $enable_mixedcase" >&5
3837 echo "${ECHO_T}$enable_mixedcase" >&6
3838 if test "$enable_mixedcase" = "auto" ; then
3839
3840 echo "$as_me:3840: checking if filesystem supports mixed-case filenames" >&5
3841 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3842 if test "${cf_cv_mixedcase+set}" = set; then
3843   echo $ECHO_N "(cached) $ECHO_C" >&6
3844 else
3845
3846 if test "$cross_compiling" = yes ; then
3847         case $target_alias in
3848         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3849                 cf_cv_mixedcase=no
3850                 ;;
3851         (*)
3852                 cf_cv_mixedcase=yes
3853                 ;;
3854         esac
3855 else
3856         rm -f conftest CONFTEST
3857         echo test >conftest
3858         if test -f CONFTEST ; then
3859                 cf_cv_mixedcase=no
3860         else
3861                 cf_cv_mixedcase=yes
3862         fi
3863         rm -f conftest CONFTEST
3864 fi
3865
3866 fi
3867 echo "$as_me:3867: result: $cf_cv_mixedcase" >&5
3868 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3869 test "$cf_cv_mixedcase" = yes &&
3870 cat >>confdefs.h <<\EOF
3871 #define MIXEDCASE_FILENAMES 1
3872 EOF
3873
3874 else
3875         cf_cv_mixedcase=$enable_mixedcase
3876         if test "x$enable_mixedcase" = "xyes" ; then
3877
3878 cat >>confdefs.h <<\EOF
3879 #define MIXEDCASE_FILENAMES 1
3880 EOF
3881
3882         fi
3883 fi
3884
3885 # do this after mixed-case option (tags/TAGS is not as important as tic).
3886 echo "$as_me:3886: checking whether ${MAKE-make} sets \${MAKE}" >&5
3887 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3888 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3889 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   cat >conftest.make <<\EOF
3893 all:
3894         @echo 'ac_maketemp="${MAKE}"'
3895 EOF
3896 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3897 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3898 if test -n "$ac_maketemp"; then
3899   eval ac_cv_prog_make_${ac_make}_set=yes
3900 else
3901   eval ac_cv_prog_make_${ac_make}_set=no
3902 fi
3903 rm -f conftest.make
3904 fi
3905 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3906   echo "$as_me:3906: result: yes" >&5
3907 echo "${ECHO_T}yes" >&6
3908   SET_MAKE=
3909 else
3910   echo "$as_me:3910: result: no" >&5
3911 echo "${ECHO_T}no" >&6
3912   SET_MAKE="MAKE=${MAKE-make}"
3913 fi
3914
3915 for ac_prog in exctags ctags
3916 do
3917   # Extract the first word of "$ac_prog", so it can be a program name with args.
3918 set dummy $ac_prog; ac_word=$2
3919 echo "$as_me:3919: checking for $ac_word" >&5
3920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3921 if test "${ac_cv_prog_CTAGS+set}" = set; then
3922   echo $ECHO_N "(cached) $ECHO_C" >&6
3923 else
3924   if test -n "$CTAGS"; then
3925   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3926 else
3927   ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 ac_dummy="$PATH"
3929 for ac_dir in $ac_dummy; do
3930   IFS=$ac_save_IFS
3931   test -z "$ac_dir" && ac_dir=.
3932   $as_executable_p "$ac_dir/$ac_word" || continue
3933 ac_cv_prog_CTAGS="$ac_prog"
3934 echo "$as_me:3934: found $ac_dir/$ac_word" >&5
3935 break
3936 done
3937
3938 fi
3939 fi
3940 CTAGS=$ac_cv_prog_CTAGS
3941 if test -n "$CTAGS"; then
3942   echo "$as_me:3942: result: $CTAGS" >&5
3943 echo "${ECHO_T}$CTAGS" >&6
3944 else
3945   echo "$as_me:3945: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   test -n "$CTAGS" && break
3950 done
3951
3952 for ac_prog in exetags etags
3953 do
3954   # Extract the first word of "$ac_prog", so it can be a program name with args.
3955 set dummy $ac_prog; ac_word=$2
3956 echo "$as_me:3956: checking for $ac_word" >&5
3957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3958 if test "${ac_cv_prog_ETAGS+set}" = set; then
3959   echo $ECHO_N "(cached) $ECHO_C" >&6
3960 else
3961   if test -n "$ETAGS"; then
3962   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3963 else
3964   ac_save_IFS=$IFS; IFS=$ac_path_separator
3965 ac_dummy="$PATH"
3966 for ac_dir in $ac_dummy; do
3967   IFS=$ac_save_IFS
3968   test -z "$ac_dir" && ac_dir=.
3969   $as_executable_p "$ac_dir/$ac_word" || continue
3970 ac_cv_prog_ETAGS="$ac_prog"
3971 echo "$as_me:3971: found $ac_dir/$ac_word" >&5
3972 break
3973 done
3974
3975 fi
3976 fi
3977 ETAGS=$ac_cv_prog_ETAGS
3978 if test -n "$ETAGS"; then
3979   echo "$as_me:3979: result: $ETAGS" >&5
3980 echo "${ECHO_T}$ETAGS" >&6
3981 else
3982   echo "$as_me:3982: result: no" >&5
3983 echo "${ECHO_T}no" >&6
3984 fi
3985
3986   test -n "$ETAGS" && break
3987 done
3988
3989 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3990 set dummy ${CTAGS:-ctags}; ac_word=$2
3991 echo "$as_me:3991: checking for $ac_word" >&5
3992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3993 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3994   echo $ECHO_N "(cached) $ECHO_C" >&6
3995 else
3996   if test -n "$MAKE_LOWER_TAGS"; then
3997   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3998 else
3999   ac_save_IFS=$IFS; IFS=$ac_path_separator
4000 ac_dummy="$PATH"
4001 for ac_dir in $ac_dummy; do
4002   IFS=$ac_save_IFS
4003   test -z "$ac_dir" && ac_dir=.
4004   $as_executable_p "$ac_dir/$ac_word" || continue
4005 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4006 echo "$as_me:4006: found $ac_dir/$ac_word" >&5
4007 break
4008 done
4009
4010   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4011 fi
4012 fi
4013 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4014 if test -n "$MAKE_LOWER_TAGS"; then
4015   echo "$as_me:4015: result: $MAKE_LOWER_TAGS" >&5
4016 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4017 else
4018   echo "$as_me:4018: result: no" >&5
4019 echo "${ECHO_T}no" >&6
4020 fi
4021
4022 if test "$cf_cv_mixedcase" = yes ; then
4023         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4024 set dummy ${ETAGS:-etags}; ac_word=$2
4025 echo "$as_me:4025: checking for $ac_word" >&5
4026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4027 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4028   echo $ECHO_N "(cached) $ECHO_C" >&6
4029 else
4030   if test -n "$MAKE_UPPER_TAGS"; then
4031   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4032 else
4033   ac_save_IFS=$IFS; IFS=$ac_path_separator
4034 ac_dummy="$PATH"
4035 for ac_dir in $ac_dummy; do
4036   IFS=$ac_save_IFS
4037   test -z "$ac_dir" && ac_dir=.
4038   $as_executable_p "$ac_dir/$ac_word" || continue
4039 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4040 echo "$as_me:4040: found $ac_dir/$ac_word" >&5
4041 break
4042 done
4043
4044   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4045 fi
4046 fi
4047 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4048 if test -n "$MAKE_UPPER_TAGS"; then
4049   echo "$as_me:4049: result: $MAKE_UPPER_TAGS" >&5
4050 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4051 else
4052   echo "$as_me:4052: result: no" >&5
4053 echo "${ECHO_T}no" >&6
4054 fi
4055
4056 else
4057         MAKE_UPPER_TAGS=no
4058 fi
4059
4060 if test "$MAKE_UPPER_TAGS" = yes ; then
4061         MAKE_UPPER_TAGS=
4062 else
4063         MAKE_UPPER_TAGS="#"
4064 fi
4065
4066 if test "$MAKE_LOWER_TAGS" = yes ; then
4067         MAKE_LOWER_TAGS=
4068 else
4069         MAKE_LOWER_TAGS="#"
4070 fi
4071
4072 echo "$as_me:4072: checking for makeflags variable" >&5
4073 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4074 if test "${cf_cv_makeflags+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077
4078         cf_cv_makeflags=''
4079         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4080         do
4081                 cat >cf_makeflags.tmp <<CF_EOF
4082 SHELL = $SHELL
4083 all :
4084         @ echo '.$cf_option'
4085 CF_EOF
4086                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4087                 case "$cf_result" in
4088                 (.*k|.*kw)
4089                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4090                         case "$cf_result" in
4091                         (.*CC=*)        cf_cv_makeflags=
4092                                 ;;
4093                         (*)     cf_cv_makeflags=$cf_option
4094                                 ;;
4095                         esac
4096                         break
4097                         ;;
4098                 (.-)    ;;
4099                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4100                         ;;
4101                 esac
4102         done
4103         rm -f cf_makeflags.tmp
4104
4105 fi
4106 echo "$as_me:4106: result: $cf_cv_makeflags" >&5
4107 echo "${ECHO_T}$cf_cv_makeflags" >&6
4108
4109 if test -n "$ac_tool_prefix"; then
4110   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4111 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4112 echo "$as_me:4112: checking for $ac_word" >&5
4113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4114 if test "${ac_cv_prog_RANLIB+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   if test -n "$RANLIB"; then
4118   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4119 else
4120   ac_save_IFS=$IFS; IFS=$ac_path_separator
4121 ac_dummy="$PATH"
4122 for ac_dir in $ac_dummy; do
4123   IFS=$ac_save_IFS
4124   test -z "$ac_dir" && ac_dir=.
4125   $as_executable_p "$ac_dir/$ac_word" || continue
4126 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4127 echo "$as_me:4127: found $ac_dir/$ac_word" >&5
4128 break
4129 done
4130
4131 fi
4132 fi
4133 RANLIB=$ac_cv_prog_RANLIB
4134 if test -n "$RANLIB"; then
4135   echo "$as_me:4135: result: $RANLIB" >&5
4136 echo "${ECHO_T}$RANLIB" >&6
4137 else
4138   echo "$as_me:4138: result: no" >&5
4139 echo "${ECHO_T}no" >&6
4140 fi
4141
4142 fi
4143 if test -z "$ac_cv_prog_RANLIB"; then
4144   ac_ct_RANLIB=$RANLIB
4145   # Extract the first word of "ranlib", so it can be a program name with args.
4146 set dummy ranlib; ac_word=$2
4147 echo "$as_me:4147: checking for $ac_word" >&5
4148 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4149 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4150   echo $ECHO_N "(cached) $ECHO_C" >&6
4151 else
4152   if test -n "$ac_ct_RANLIB"; then
4153   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4154 else
4155   ac_save_IFS=$IFS; IFS=$ac_path_separator
4156 ac_dummy="$PATH"
4157 for ac_dir in $ac_dummy; do
4158   IFS=$ac_save_IFS
4159   test -z "$ac_dir" && ac_dir=.
4160   $as_executable_p "$ac_dir/$ac_word" || continue
4161 ac_cv_prog_ac_ct_RANLIB="ranlib"
4162 echo "$as_me:4162: found $ac_dir/$ac_word" >&5
4163 break
4164 done
4165
4166   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4167 fi
4168 fi
4169 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4170 if test -n "$ac_ct_RANLIB"; then
4171   echo "$as_me:4171: result: $ac_ct_RANLIB" >&5
4172 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176 fi
4177
4178   RANLIB=$ac_ct_RANLIB
4179 else
4180   RANLIB="$ac_cv_prog_RANLIB"
4181 fi
4182
4183 if test -n "$ac_tool_prefix"; then
4184   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4185 set dummy ${ac_tool_prefix}ld; ac_word=$2
4186 echo "$as_me:4186: checking for $ac_word" >&5
4187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4188 if test "${ac_cv_prog_LD+set}" = set; then
4189   echo $ECHO_N "(cached) $ECHO_C" >&6
4190 else
4191   if test -n "$LD"; then
4192   ac_cv_prog_LD="$LD" # Let the user override the test.
4193 else
4194   ac_save_IFS=$IFS; IFS=$ac_path_separator
4195 ac_dummy="$PATH"
4196 for ac_dir in $ac_dummy; do
4197   IFS=$ac_save_IFS
4198   test -z "$ac_dir" && ac_dir=.
4199   $as_executable_p "$ac_dir/$ac_word" || continue
4200 ac_cv_prog_LD="${ac_tool_prefix}ld"
4201 echo "$as_me:4201: found $ac_dir/$ac_word" >&5
4202 break
4203 done
4204
4205 fi
4206 fi
4207 LD=$ac_cv_prog_LD
4208 if test -n "$LD"; then
4209   echo "$as_me:4209: result: $LD" >&5
4210 echo "${ECHO_T}$LD" >&6
4211 else
4212   echo "$as_me:4212: result: no" >&5
4213 echo "${ECHO_T}no" >&6
4214 fi
4215
4216 fi
4217 if test -z "$ac_cv_prog_LD"; then
4218   ac_ct_LD=$LD
4219   # Extract the first word of "ld", so it can be a program name with args.
4220 set dummy ld; ac_word=$2
4221 echo "$as_me:4221: checking for $ac_word" >&5
4222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4223 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4224   echo $ECHO_N "(cached) $ECHO_C" >&6
4225 else
4226   if test -n "$ac_ct_LD"; then
4227   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4228 else
4229   ac_save_IFS=$IFS; IFS=$ac_path_separator
4230 ac_dummy="$PATH"
4231 for ac_dir in $ac_dummy; do
4232   IFS=$ac_save_IFS
4233   test -z "$ac_dir" && ac_dir=.
4234   $as_executable_p "$ac_dir/$ac_word" || continue
4235 ac_cv_prog_ac_ct_LD="ld"
4236 echo "$as_me:4236: found $ac_dir/$ac_word" >&5
4237 break
4238 done
4239
4240   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4241 fi
4242 fi
4243 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4244 if test -n "$ac_ct_LD"; then
4245   echo "$as_me:4245: result: $ac_ct_LD" >&5
4246 echo "${ECHO_T}$ac_ct_LD" >&6
4247 else
4248   echo "$as_me:4248: result: no" >&5
4249 echo "${ECHO_T}no" >&6
4250 fi
4251
4252   LD=$ac_ct_LD
4253 else
4254   LD="$ac_cv_prog_LD"
4255 fi
4256
4257 if test -n "$ac_tool_prefix"; then
4258   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4259 set dummy ${ac_tool_prefix}ar; ac_word=$2
4260 echo "$as_me:4260: checking for $ac_word" >&5
4261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4262 if test "${ac_cv_prog_AR+set}" = set; then
4263   echo $ECHO_N "(cached) $ECHO_C" >&6
4264 else
4265   if test -n "$AR"; then
4266   ac_cv_prog_AR="$AR" # Let the user override the test.
4267 else
4268   ac_save_IFS=$IFS; IFS=$ac_path_separator
4269 ac_dummy="$PATH"
4270 for ac_dir in $ac_dummy; do
4271   IFS=$ac_save_IFS
4272   test -z "$ac_dir" && ac_dir=.
4273   $as_executable_p "$ac_dir/$ac_word" || continue
4274 ac_cv_prog_AR="${ac_tool_prefix}ar"
4275 echo "$as_me:4275: found $ac_dir/$ac_word" >&5
4276 break
4277 done
4278
4279 fi
4280 fi
4281 AR=$ac_cv_prog_AR
4282 if test -n "$AR"; then
4283   echo "$as_me:4283: result: $AR" >&5
4284 echo "${ECHO_T}$AR" >&6
4285 else
4286   echo "$as_me:4286: result: no" >&5
4287 echo "${ECHO_T}no" >&6
4288 fi
4289
4290 fi
4291 if test -z "$ac_cv_prog_AR"; then
4292   ac_ct_AR=$AR
4293   # Extract the first word of "ar", so it can be a program name with args.
4294 set dummy ar; ac_word=$2
4295 echo "$as_me:4295: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4298   echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300   if test -n "$ac_ct_AR"; then
4301   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4302 else
4303   ac_save_IFS=$IFS; IFS=$ac_path_separator
4304 ac_dummy="$PATH"
4305 for ac_dir in $ac_dummy; do
4306   IFS=$ac_save_IFS
4307   test -z "$ac_dir" && ac_dir=.
4308   $as_executable_p "$ac_dir/$ac_word" || continue
4309 ac_cv_prog_ac_ct_AR="ar"
4310 echo "$as_me:4310: found $ac_dir/$ac_word" >&5
4311 break
4312 done
4313
4314   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4315 fi
4316 fi
4317 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4318 if test -n "$ac_ct_AR"; then
4319   echo "$as_me:4319: result: $ac_ct_AR" >&5
4320 echo "${ECHO_T}$ac_ct_AR" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326   AR=$ac_ct_AR
4327 else
4328   AR="$ac_cv_prog_AR"
4329 fi
4330
4331 if test -n "$ac_tool_prefix"; then
4332   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4333 set dummy ${ac_tool_prefix}nm; ac_word=$2
4334 echo "$as_me:4334: checking for $ac_word" >&5
4335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4336 if test "${ac_cv_prog_NM+set}" = set; then
4337   echo $ECHO_N "(cached) $ECHO_C" >&6
4338 else
4339   if test -n "$NM"; then
4340   ac_cv_prog_NM="$NM" # Let the user override the test.
4341 else
4342   ac_save_IFS=$IFS; IFS=$ac_path_separator
4343 ac_dummy="$PATH"
4344 for ac_dir in $ac_dummy; do
4345   IFS=$ac_save_IFS
4346   test -z "$ac_dir" && ac_dir=.
4347   $as_executable_p "$ac_dir/$ac_word" || continue
4348 ac_cv_prog_NM="${ac_tool_prefix}nm"
4349 echo "$as_me:4349: found $ac_dir/$ac_word" >&5
4350 break
4351 done
4352
4353 fi
4354 fi
4355 NM=$ac_cv_prog_NM
4356 if test -n "$NM"; then
4357   echo "$as_me:4357: result: $NM" >&5
4358 echo "${ECHO_T}$NM" >&6
4359 else
4360   echo "$as_me:4360: result: no" >&5
4361 echo "${ECHO_T}no" >&6
4362 fi
4363
4364 fi
4365 if test -z "$ac_cv_prog_NM"; then
4366   ac_ct_NM=$NM
4367   # Extract the first word of "nm", so it can be a program name with args.
4368 set dummy nm; ac_word=$2
4369 echo "$as_me:4369: checking for $ac_word" >&5
4370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4371 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4372   echo $ECHO_N "(cached) $ECHO_C" >&6
4373 else
4374   if test -n "$ac_ct_NM"; then
4375   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4376 else
4377   ac_save_IFS=$IFS; IFS=$ac_path_separator
4378 ac_dummy="$PATH"
4379 for ac_dir in $ac_dummy; do
4380   IFS=$ac_save_IFS
4381   test -z "$ac_dir" && ac_dir=.
4382   $as_executable_p "$ac_dir/$ac_word" || continue
4383 ac_cv_prog_ac_ct_NM="nm"
4384 echo "$as_me:4384: found $ac_dir/$ac_word" >&5
4385 break
4386 done
4387
4388   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4389 fi
4390 fi
4391 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4392 if test -n "$ac_ct_NM"; then
4393   echo "$as_me:4393: result: $ac_ct_NM" >&5
4394 echo "${ECHO_T}$ac_ct_NM" >&6
4395 else
4396   echo "$as_me:4396: result: no" >&5
4397 echo "${ECHO_T}no" >&6
4398 fi
4399
4400   NM=$ac_ct_NM
4401 else
4402   NM="$ac_cv_prog_NM"
4403 fi
4404
4405 if test -n "$ac_tool_prefix"; then
4406   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4407 set dummy ${ac_tool_prefix}ar; ac_word=$2
4408 echo "$as_me:4408: checking for $ac_word" >&5
4409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4410 if test "${ac_cv_prog_AR+set}" = set; then
4411   echo $ECHO_N "(cached) $ECHO_C" >&6
4412 else
4413   if test -n "$AR"; then
4414   ac_cv_prog_AR="$AR" # Let the user override the test.
4415 else
4416   ac_save_IFS=$IFS; IFS=$ac_path_separator
4417 ac_dummy="$PATH"
4418 for ac_dir in $ac_dummy; do
4419   IFS=$ac_save_IFS
4420   test -z "$ac_dir" && ac_dir=.
4421   $as_executable_p "$ac_dir/$ac_word" || continue
4422 ac_cv_prog_AR="${ac_tool_prefix}ar"
4423 echo "$as_me:4423: found $ac_dir/$ac_word" >&5
4424 break
4425 done
4426
4427 fi
4428 fi
4429 AR=$ac_cv_prog_AR
4430 if test -n "$AR"; then
4431   echo "$as_me:4431: result: $AR" >&5
4432 echo "${ECHO_T}$AR" >&6
4433 else
4434   echo "$as_me:4434: result: no" >&5
4435 echo "${ECHO_T}no" >&6
4436 fi
4437
4438 fi
4439 if test -z "$ac_cv_prog_AR"; then
4440   ac_ct_AR=$AR
4441   # Extract the first word of "ar", so it can be a program name with args.
4442 set dummy ar; ac_word=$2
4443 echo "$as_me:4443: checking for $ac_word" >&5
4444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4445 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4446   echo $ECHO_N "(cached) $ECHO_C" >&6
4447 else
4448   if test -n "$ac_ct_AR"; then
4449   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4450 else
4451   ac_save_IFS=$IFS; IFS=$ac_path_separator
4452 ac_dummy="$PATH"
4453 for ac_dir in $ac_dummy; do
4454   IFS=$ac_save_IFS
4455   test -z "$ac_dir" && ac_dir=.
4456   $as_executable_p "$ac_dir/$ac_word" || continue
4457 ac_cv_prog_ac_ct_AR="ar"
4458 echo "$as_me:4458: found $ac_dir/$ac_word" >&5
4459 break
4460 done
4461
4462   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4463 fi
4464 fi
4465 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4466 if test -n "$ac_ct_AR"; then
4467   echo "$as_me:4467: result: $ac_ct_AR" >&5
4468 echo "${ECHO_T}$ac_ct_AR" >&6
4469 else
4470   echo "$as_me:4470: result: no" >&5
4471 echo "${ECHO_T}no" >&6
4472 fi
4473
4474   AR=$ac_ct_AR
4475 else
4476   AR="$ac_cv_prog_AR"
4477 fi
4478
4479 echo "$as_me:4479: checking for options to update archives" >&5
4480 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4481 if test "${cf_cv_ar_flags+set}" = set; then
4482   echo $ECHO_N "(cached) $ECHO_C" >&6
4483 else
4484
4485         cf_cv_ar_flags=unknown
4486         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4487         do
4488
4489                 # check if $ARFLAGS already contains this choice
4490                 if test "x$ARFLAGS" != "x" ; then
4491                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4492                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4493                                 cf_cv_ar_flags=
4494                                 break
4495                         fi
4496                 fi
4497
4498                 rm -f conftest.$ac_cv_objext
4499                 rm -f conftest.a
4500
4501                 cat >conftest.$ac_ext <<EOF
4502 #line 4502 "configure"
4503 int     testdata[3] = { 123, 456, 789 };
4504 EOF
4505                 if { (eval echo "$as_me:4505: \"$ac_compile\"") >&5
4506   (eval $ac_compile) 2>&5
4507   ac_status=$?
4508   echo "$as_me:4508: \$? = $ac_status" >&5
4509   (exit $ac_status); } ; then
4510                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4511                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4512                         if test -f conftest.a ; then
4513                                 cf_cv_ar_flags=$cf_ar_flags
4514                                 break
4515                         fi
4516                 else
4517                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4518
4519 echo "${as_me:-configure}:4519: testing cannot compile test-program ..." 1>&5
4520
4521                         break
4522                 fi
4523         done
4524         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4525
4526 fi
4527 echo "$as_me:4527: result: $cf_cv_ar_flags" >&5
4528 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4529
4530 if test -n "$ARFLAGS" ; then
4531         if test -n "$cf_cv_ar_flags" ; then
4532                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4533         fi
4534 else
4535         ARFLAGS=$cf_cv_ar_flags
4536 fi
4537
4538 echo "$as_me:4538: checking if you have specified an install-prefix" >&5
4539 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4540
4541 # Check whether --with-install-prefix or --without-install-prefix was given.
4542 if test "${with_install_prefix+set}" = set; then
4543   withval="$with_install_prefix"
4544   case "x$withval" in
4545         (xyes|xno)
4546                 ;;
4547         (*)     DESTDIR="$withval"
4548                 ;;
4549         esac
4550 fi;
4551 echo "$as_me:4551: result: $DESTDIR" >&5
4552 echo "${ECHO_T}$DESTDIR" >&6
4553
4554 ###############################################################################
4555
4556 # If we're cross-compiling, allow the user to override the tools and their
4557 # options.  The configure script is oriented toward identifying the host
4558 # compiler, etc., but we need a build compiler to generate parts of the source.
4559
4560 if test "$cross_compiling" = yes ; then
4561
4562         # defaults that we might want to override
4563         : ${BUILD_CFLAGS:=''}
4564         : ${BUILD_CPPFLAGS:=''}
4565         : ${BUILD_LDFLAGS:=''}
4566         : ${BUILD_LIBS:=''}
4567         : ${BUILD_EXEEXT:='$x'}
4568         : ${BUILD_OBJEXT:='o'}
4569
4570 # Check whether --with-build-cc or --without-build-cc was given.
4571 if test "${with_build_cc+set}" = set; then
4572   withval="$with_build_cc"
4573   BUILD_CC="$withval"
4574 else
4575   for ac_prog in gcc cc cl
4576 do
4577   # Extract the first word of "$ac_prog", so it can be a program name with args.
4578 set dummy $ac_prog; ac_word=$2
4579 echo "$as_me:4579: checking for $ac_word" >&5
4580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4581 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4582   echo $ECHO_N "(cached) $ECHO_C" >&6
4583 else
4584   if test -n "$BUILD_CC"; then
4585   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4586 else
4587   ac_save_IFS=$IFS; IFS=$ac_path_separator
4588 ac_dummy="$PATH"
4589 for ac_dir in $ac_dummy; do
4590   IFS=$ac_save_IFS
4591   test -z "$ac_dir" && ac_dir=.
4592   $as_executable_p "$ac_dir/$ac_word" || continue
4593 ac_cv_prog_BUILD_CC="$ac_prog"
4594 echo "$as_me:4594: found $ac_dir/$ac_word" >&5
4595 break
4596 done
4597
4598 fi
4599 fi
4600 BUILD_CC=$ac_cv_prog_BUILD_CC
4601 if test -n "$BUILD_CC"; then
4602   echo "$as_me:4602: result: $BUILD_CC" >&5
4603 echo "${ECHO_T}$BUILD_CC" >&6
4604 else
4605   echo "$as_me:4605: result: no" >&5
4606 echo "${ECHO_T}no" >&6
4607 fi
4608
4609   test -n "$BUILD_CC" && break
4610 done
4611
4612 fi;
4613         echo "$as_me:4613: checking for native build C compiler" >&5
4614 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4615         echo "$as_me:4615: result: $BUILD_CC" >&5
4616 echo "${ECHO_T}$BUILD_CC" >&6
4617
4618         echo "$as_me:4618: checking for native build C preprocessor" >&5
4619 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4620
4621 # Check whether --with-build-cpp or --without-build-cpp was given.
4622 if test "${with_build_cpp+set}" = set; then
4623   withval="$with_build_cpp"
4624   BUILD_CPP="$withval"
4625 else
4626   BUILD_CPP='${BUILD_CC} -E'
4627 fi;
4628         echo "$as_me:4628: result: $BUILD_CPP" >&5
4629 echo "${ECHO_T}$BUILD_CPP" >&6
4630
4631         echo "$as_me:4631: checking for native build C flags" >&5
4632 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4633
4634 # Check whether --with-build-cflags or --without-build-cflags was given.
4635 if test "${with_build_cflags+set}" = set; then
4636   withval="$with_build_cflags"
4637   BUILD_CFLAGS="$withval"
4638 fi;
4639         echo "$as_me:4639: result: $BUILD_CFLAGS" >&5
4640 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4641
4642         echo "$as_me:4642: checking for native build C preprocessor-flags" >&5
4643 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4644
4645 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4646 if test "${with_build_cppflags+set}" = set; then
4647   withval="$with_build_cppflags"
4648   BUILD_CPPFLAGS="$withval"
4649 fi;
4650         echo "$as_me:4650: result: $BUILD_CPPFLAGS" >&5
4651 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4652
4653         echo "$as_me:4653: checking for native build linker-flags" >&5
4654 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4655
4656 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4657 if test "${with_build_ldflags+set}" = set; then
4658   withval="$with_build_ldflags"
4659   BUILD_LDFLAGS="$withval"
4660 fi;
4661         echo "$as_me:4661: result: $BUILD_LDFLAGS" >&5
4662 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4663
4664         echo "$as_me:4664: checking for native build linker-libraries" >&5
4665 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4666
4667 # Check whether --with-build-libs or --without-build-libs was given.
4668 if test "${with_build_libs+set}" = set; then
4669   withval="$with_build_libs"
4670   BUILD_LIBS="$withval"
4671 fi;
4672         echo "$as_me:4672: result: $BUILD_LIBS" >&5
4673 echo "${ECHO_T}$BUILD_LIBS" >&6
4674
4675         # this assumes we're on Unix.
4676         BUILD_EXEEXT=
4677         BUILD_OBJEXT=o
4678
4679         : ${BUILD_CC:='${CC}'}
4680
4681         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4682                 { { echo "$as_me:4682: error: Cross-build requires two compilers.
4683 Use --with-build-cc to specify the native compiler." >&5
4684 echo "$as_me: error: Cross-build requires two compilers.
4685 Use --with-build-cc to specify the native compiler." >&2;}
4686    { (exit 1); exit 1; }; }
4687         fi
4688
4689 else
4690         : ${BUILD_CC:='${CC}'}
4691         : ${BUILD_CPP:='${CPP}'}
4692         : ${BUILD_CFLAGS:='${CFLAGS}'}
4693         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4694         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4695         : ${BUILD_LIBS:='${LIBS}'}
4696         : ${BUILD_EXEEXT:='$x'}
4697         : ${BUILD_OBJEXT:='o'}
4698 fi
4699
4700 ###############################################################################
4701
4702 ### Options to allow the user to specify the set of libraries which are used.
4703 ### Use "--without-normal --with-shared" to allow the default model to be
4704 ### shared, for example.
4705 cf_list_models=""
4706
4707 echo "$as_me:4707: checking if libtool -version-number should be used" >&5
4708 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4709
4710 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4711 if test "${enable_libtool_version+set}" = set; then
4712   enableval="$enable_libtool_version"
4713   test "$enableval" != no && enableval=yes
4714         if test "$enableval" != "yes" ; then
4715     cf_libtool_version=no
4716         else
4717                 cf_libtool_version=yes
4718         fi
4719 else
4720   enableval=yes
4721         cf_libtool_version=yes
4722
4723 fi;
4724 echo "$as_me:4724: result: $cf_libtool_version" >&5
4725 echo "${ECHO_T}$cf_libtool_version" >&6
4726
4727 if test "$cf_libtool_version" = yes ; then
4728         LIBTOOL_VERSION="-version-number"
4729 else
4730         LIBTOOL_VERSION="-version-info"
4731         case "x$VERSION" in
4732         (x)
4733                 { echo "$as_me:4733: WARNING: VERSION was not set" >&5
4734 echo "$as_me: WARNING: VERSION was not set" >&2;}
4735                 ;;
4736         (x*.*.*)
4737                 ABI_VERSION="$VERSION"
4738                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4739
4740 echo "${as_me:-configure}:4740: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4741
4742                 ;;
4743         (x*:*:*)
4744                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4745                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4746
4747 echo "${as_me:-configure}:4747: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4748
4749                 ;;
4750         (*)
4751                 { echo "$as_me:4751: WARNING: unexpected VERSION value: $VERSION" >&5
4752 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4753                 ;;
4754         esac
4755 fi
4756
4757 LIBTOOL=
4758
4759 # common library maintenance symbols that are convenient for libtool scripts:
4760 LIB_CREATE='${AR} -cr'
4761 LIB_OBJECT='${OBJECTS}'
4762 LIB_SUFFIX=.a
4763 LIB_PREP="$RANLIB"
4764
4765 # symbols used to prop libtool up to enable it to determine what it should be
4766 # doing:
4767 LIB_CLEAN=
4768 LIB_COMPILE=
4769 LIB_LINK='${CC}'
4770 LIB_INSTALL=
4771 LIB_UNINSTALL=
4772
4773 echo "$as_me:4773: checking if you want to build libraries with libtool" >&5
4774 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4775
4776 # Check whether --with-libtool or --without-libtool was given.
4777 if test "${with_libtool+set}" = set; then
4778   withval="$with_libtool"
4779   with_libtool=$withval
4780 else
4781   with_libtool=no
4782 fi;
4783 echo "$as_me:4783: result: $with_libtool" >&5
4784 echo "${ECHO_T}$with_libtool" >&6
4785 if test "$with_libtool" != "no"; then
4786
4787         if test "$with_libtool" != "yes" ; then
4788
4789 if test "x$prefix" != xNONE; then
4790         cf_path_syntax="$prefix"
4791 else
4792         cf_path_syntax="$ac_default_prefix"
4793 fi
4794
4795 case ".$with_libtool" in
4796 (.\$\(*\)*|.\'*\'*)
4797         ;;
4798 (..|./*|.\\*)
4799         ;;
4800 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4801         ;;
4802 (.\${*prefix}*|.\${*dir}*)
4803         eval with_libtool="$with_libtool"
4804         case ".$with_libtool" in
4805         (.NONE/*)
4806                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4807                 ;;
4808         esac
4809         ;;
4810 (.no|.NONE/*)
4811         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4812         ;;
4813 (*)
4814         { { echo "$as_me:4814: error: expected a pathname, not \"$with_libtool\"" >&5
4815 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4816    { (exit 1); exit 1; }; }
4817         ;;
4818 esac
4819
4820                 LIBTOOL=$with_libtool
4821         else
4822                 if test -n "$ac_tool_prefix"; then
4823   for ac_prog in libtool glibtool
4824   do
4825     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4826 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4827 echo "$as_me:4827: checking for $ac_word" >&5
4828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4829 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4830   echo $ECHO_N "(cached) $ECHO_C" >&6
4831 else
4832   if test -n "$LIBTOOL"; then
4833   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4834 else
4835   ac_save_IFS=$IFS; IFS=$ac_path_separator
4836 ac_dummy="$PATH"
4837 for ac_dir in $ac_dummy; do
4838   IFS=$ac_save_IFS
4839   test -z "$ac_dir" && ac_dir=.
4840   $as_executable_p "$ac_dir/$ac_word" || continue
4841 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4842 echo "$as_me:4842: found $ac_dir/$ac_word" >&5
4843 break
4844 done
4845
4846 fi
4847 fi
4848 LIBTOOL=$ac_cv_prog_LIBTOOL
4849 if test -n "$LIBTOOL"; then
4850   echo "$as_me:4850: result: $LIBTOOL" >&5
4851 echo "${ECHO_T}$LIBTOOL" >&6
4852 else
4853   echo "$as_me:4853: result: no" >&5
4854 echo "${ECHO_T}no" >&6
4855 fi
4856
4857     test -n "$LIBTOOL" && break
4858   done
4859 fi
4860 if test -z "$LIBTOOL"; then
4861   ac_ct_LIBTOOL=$LIBTOOL
4862   for ac_prog in libtool glibtool
4863 do
4864   # Extract the first word of "$ac_prog", so it can be a program name with args.
4865 set dummy $ac_prog; ac_word=$2
4866 echo "$as_me:4866: checking for $ac_word" >&5
4867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4868 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4869   echo $ECHO_N "(cached) $ECHO_C" >&6
4870 else
4871   if test -n "$ac_ct_LIBTOOL"; then
4872   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4873 else
4874   ac_save_IFS=$IFS; IFS=$ac_path_separator
4875 ac_dummy="$PATH"
4876 for ac_dir in $ac_dummy; do
4877   IFS=$ac_save_IFS
4878   test -z "$ac_dir" && ac_dir=.
4879   $as_executable_p "$ac_dir/$ac_word" || continue
4880 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4881 echo "$as_me:4881: found $ac_dir/$ac_word" >&5
4882 break
4883 done
4884
4885 fi
4886 fi
4887 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4888 if test -n "$ac_ct_LIBTOOL"; then
4889   echo "$as_me:4889: result: $ac_ct_LIBTOOL" >&5
4890 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4891 else
4892   echo "$as_me:4892: result: no" >&5
4893 echo "${ECHO_T}no" >&6
4894 fi
4895
4896   test -n "$ac_ct_LIBTOOL" && break
4897 done
4898 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4899
4900   LIBTOOL=$ac_ct_LIBTOOL
4901 fi
4902
4903 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4904 then
4905         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.].*//'`
4906 else
4907         cf_cv_libtool_version=
4908 fi
4909 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4910
4911                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4912                 then
4913
4914 unset ac_cv_prog_ac_ct_LIBTOOL
4915 unset ac_ct_LIBTOOL
4916 unset LIBTOOL
4917
4918                         if test -n "$ac_tool_prefix"; then
4919   for ac_prog in glibtool
4920   do
4921     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4922 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4923 echo "$as_me:4923: checking for $ac_word" >&5
4924 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4925 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4926   echo $ECHO_N "(cached) $ECHO_C" >&6
4927 else
4928   if test -n "$LIBTOOL"; then
4929   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4930 else
4931   ac_save_IFS=$IFS; IFS=$ac_path_separator
4932 ac_dummy="$PATH"
4933 for ac_dir in $ac_dummy; do
4934   IFS=$ac_save_IFS
4935   test -z "$ac_dir" && ac_dir=.
4936   $as_executable_p "$ac_dir/$ac_word" || continue
4937 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4938 echo "$as_me:4938: found $ac_dir/$ac_word" >&5
4939 break
4940 done
4941
4942 fi
4943 fi
4944 LIBTOOL=$ac_cv_prog_LIBTOOL
4945 if test -n "$LIBTOOL"; then
4946   echo "$as_me:4946: result: $LIBTOOL" >&5
4947 echo "${ECHO_T}$LIBTOOL" >&6
4948 else
4949   echo "$as_me:4949: result: no" >&5
4950 echo "${ECHO_T}no" >&6
4951 fi
4952
4953     test -n "$LIBTOOL" && break
4954   done
4955 fi
4956 if test -z "$LIBTOOL"; then
4957   ac_ct_LIBTOOL=$LIBTOOL
4958   for ac_prog in glibtool
4959 do
4960   # Extract the first word of "$ac_prog", so it can be a program name with args.
4961 set dummy $ac_prog; ac_word=$2
4962 echo "$as_me:4962: checking for $ac_word" >&5
4963 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4964 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4965   echo $ECHO_N "(cached) $ECHO_C" >&6
4966 else
4967   if test -n "$ac_ct_LIBTOOL"; then
4968   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4969 else
4970   ac_save_IFS=$IFS; IFS=$ac_path_separator
4971 ac_dummy="$PATH"
4972 for ac_dir in $ac_dummy; do
4973   IFS=$ac_save_IFS
4974   test -z "$ac_dir" && ac_dir=.
4975   $as_executable_p "$ac_dir/$ac_word" || continue
4976 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4977 echo "$as_me:4977: found $ac_dir/$ac_word" >&5
4978 break
4979 done
4980
4981 fi
4982 fi
4983 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4984 if test -n "$ac_ct_LIBTOOL"; then
4985   echo "$as_me:4985: result: $ac_ct_LIBTOOL" >&5
4986 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4987 else
4988   echo "$as_me:4988: result: no" >&5
4989 echo "${ECHO_T}no" >&6
4990 fi
4991
4992   test -n "$ac_ct_LIBTOOL" && break
4993 done
4994 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4995
4996   LIBTOOL=$ac_ct_LIBTOOL
4997 fi
4998
4999 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5000 then
5001         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.].*//'`
5002 else
5003         cf_cv_libtool_version=
5004 fi
5005 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5006
5007                 fi
5008         fi
5009         if test -z "$LIBTOOL" ; then
5010                 { { echo "$as_me:5010: error: Cannot find libtool" >&5
5011 echo "$as_me: error: Cannot find libtool" >&2;}
5012    { (exit 1); exit 1; }; }
5013         fi
5014         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5015         LIB_OBJECT='${OBJECTS:.o=.lo}'
5016         LIB_SUFFIX=.la
5017         LIB_CLEAN='${LIBTOOL} --mode=clean'
5018         LIB_COMPILE='${LIBTOOL} --mode=compile'
5019         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5020         LIB_INSTALL='${LIBTOOL} --mode=install'
5021         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5022         LIB_PREP=:
5023
5024 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5025 then
5026         echo "$as_me:5026: checking version of $LIBTOOL" >&5
5027 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5028
5029 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5030 then
5031         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.].*//'`
5032 else
5033         cf_cv_libtool_version=
5034 fi
5035 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5036
5037         echo "$as_me:5037: result: $cf_cv_libtool_version" >&5
5038 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5039         if test -z "$cf_cv_libtool_version" ; then
5040                 { { echo "$as_me:5040: error: This is not GNU libtool" >&5
5041 echo "$as_me: error: This is not GNU libtool" >&2;}
5042    { (exit 1); exit 1; }; }
5043         fi
5044 else
5045         { { echo "$as_me:5045: error: GNU libtool has not been found" >&5
5046 echo "$as_me: error: GNU libtool has not been found" >&2;}
5047    { (exit 1); exit 1; }; }
5048 fi
5049
5050         # special hack to add -no-undefined (which libtool should do for itself)
5051         LT_UNDEF=
5052         case "$cf_cv_system_name" in
5053         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5054                 LT_UNDEF=-no-undefined
5055                 ;;
5056         esac
5057
5058         # special hack to add --tag option for C++ compiler
5059         case $cf_cv_libtool_version in
5060         (1.[5-9]*|[2-9].[0-9.a-z]*)
5061                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5062                 LIBTOOL="$LIBTOOL --tag=CC"
5063                 ;;
5064         (*)
5065                 LIBTOOL_CXX="$LIBTOOL"
5066                 ;;
5067         esac
5068 else
5069         LIBTOOL=""
5070         LIBTOOL_CXX=""
5071 fi
5072
5073 test -z "$LIBTOOL" && ECHO_LT=
5074
5075 if test "$with_libtool" != "no" ; then
5076
5077 cf_list_models="$cf_list_models libtool"
5078
5079 else
5080
5081 echo "$as_me:5081: checking if you want to build shared libraries" >&5
5082 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5083
5084 # Check whether --with-shared or --without-shared was given.
5085 if test "${with_shared+set}" = set; then
5086   withval="$with_shared"
5087   with_shared=$withval
5088 else
5089   with_shared=no
5090 fi;
5091 echo "$as_me:5091: result: $with_shared" >&5
5092 echo "${ECHO_T}$with_shared" >&6
5093 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5094
5095 echo "$as_me:5095: checking if you want to build static libraries" >&5
5096 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5097
5098 # Check whether --with-normal or --without-normal was given.
5099 if test "${with_normal+set}" = set; then
5100   withval="$with_normal"
5101   with_normal=$withval
5102 else
5103   with_normal=yes
5104 fi;
5105 echo "$as_me:5105: result: $with_normal" >&5
5106 echo "${ECHO_T}$with_normal" >&6
5107 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5108
5109 echo "$as_me:5109: checking if you want to build debug libraries" >&5
5110 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5111
5112 # Check whether --with-debug or --without-debug was given.
5113 if test "${with_debug+set}" = set; then
5114   withval="$with_debug"
5115   with_debug=$withval
5116 else
5117   with_debug=yes
5118 fi;
5119 echo "$as_me:5119: result: $with_debug" >&5
5120 echo "${ECHO_T}$with_debug" >&6
5121 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5122
5123 echo "$as_me:5123: checking if you want to build profiling libraries" >&5
5124 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5125
5126 # Check whether --with-profile or --without-profile was given.
5127 if test "${with_profile+set}" = set; then
5128   withval="$with_profile"
5129   with_profile=$withval
5130 else
5131   with_profile=no
5132 fi;
5133 echo "$as_me:5133: result: $with_profile" >&5
5134 echo "${ECHO_T}$with_profile" >&6
5135 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5136
5137 fi
5138
5139 if test "X$cf_with_cxx_binding" != Xno; then
5140 if test "x$with_shared" = "xyes"; then
5141 echo "$as_me:5141: checking if you want to build C++ shared libraries" >&5
5142 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5143
5144 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5145 if test "${with_cxx_shared+set}" = set; then
5146   withval="$with_cxx_shared"
5147   with_shared_cxx=$withval
5148 else
5149   with_shared_cxx=no
5150 fi;
5151 echo "$as_me:5151: result: $with_shared_cxx" >&5
5152 echo "${ECHO_T}$with_shared_cxx" >&6
5153 fi
5154 fi
5155
5156 ###############################################################################
5157
5158 echo "$as_me:5158: checking for specified models" >&5
5159 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5160 test -z "$cf_list_models" && cf_list_models=normal
5161 test "$with_libtool" != "no" && cf_list_models=libtool
5162 echo "$as_me:5162: result: $cf_list_models" >&5
5163 echo "${ECHO_T}$cf_list_models" >&6
5164
5165 ### Use the first model as the default, and save its suffix for use in building
5166 ### up test-applications.
5167 echo "$as_me:5167: checking for default model" >&5
5168 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5169 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5170 echo "$as_me:5170: result: $DFT_LWR_MODEL" >&5
5171 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5172
5173 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5174
5175 TICS_NAME=tic
5176
5177 TINFO_NAME=tinfo
5178
5179 LIB_NAME=ncurses
5180
5181 LIB_DIR=../lib
5182 LIB_2ND=../../lib
5183
5184 echo "$as_me:5184: checking if you want to have a library-prefix" >&5
5185 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5186
5187 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5188 if test "${with_lib_prefix+set}" = set; then
5189   withval="$with_lib_prefix"
5190   with_lib_prefix=$withval
5191 else
5192   with_lib_prefix=auto
5193 fi;
5194 echo "$as_me:5194: result: $with_lib_prefix" >&5
5195 echo "${ECHO_T}$with_lib_prefix" >&6
5196
5197 if test $with_lib_prefix = auto
5198 then
5199
5200         case $cf_cv_system_name in
5201         (OS/2*|os2*)
5202                 if test "$DFT_LWR_MODEL" = libtool; then
5203                         LIB_PREFIX='lib'
5204                 else
5205                         LIB_PREFIX=''
5206                 fi
5207                 ;;
5208         (*)     LIB_PREFIX='lib'
5209                 ;;
5210         esac
5211 cf_prefix=$LIB_PREFIX
5212
5213 elif test $with_lib_prefix = no
5214 then
5215         LIB_PREFIX=
5216 else
5217         LIB_PREFIX=$with_lib_prefix
5218 fi
5219
5220 LIB_SUFFIX=
5221
5222         echo "$as_me:5222: checking for PATH separator" >&5
5223 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5224         case $cf_cv_system_name in
5225         (os2*)  PATH_SEPARATOR=';'  ;;
5226         (*)     ${PATH_SEPARATOR:=':'}  ;;
5227         esac
5228
5229         echo "$as_me:5229: result: $PATH_SEPARATOR" >&5
5230 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5231
5232 ###############################################################################
5233
5234 echo "$as_me:5234: checking if you want to build a separate terminfo library" >&5
5235 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5236
5237 # Check whether --with-termlib or --without-termlib was given.
5238 if test "${with_termlib+set}" = set; then
5239   withval="$with_termlib"
5240   with_termlib=$withval
5241 else
5242   with_termlib=no
5243 fi;
5244 echo "$as_me:5244: result: $with_termlib" >&5
5245 echo "${ECHO_T}$with_termlib" >&6
5246
5247 echo "$as_me:5247: checking if you want to build a separate tic library" >&5
5248 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5249
5250 # Check whether --with-ticlib or --without-ticlib was given.
5251 if test "${with_ticlib+set}" = set; then
5252   withval="$with_ticlib"
5253   with_ticlib=$withval
5254 else
5255   with_ticlib=no
5256 fi;
5257 echo "$as_me:5257: result: $with_ticlib" >&5
5258 echo "${ECHO_T}$with_ticlib" >&6
5259
5260 ### Checks for special libraries, must be done up-front.
5261 SHLIB_LIST=""
5262
5263 echo "$as_me:5263: checking if you want to link with the GPM mouse library" >&5
5264 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5265
5266 # Check whether --with-gpm or --without-gpm was given.
5267 if test "${with_gpm+set}" = set; then
5268   withval="$with_gpm"
5269   with_gpm=$withval
5270 else
5271   with_gpm=maybe
5272 fi;
5273 echo "$as_me:5273: result: $with_gpm" >&5
5274 echo "${ECHO_T}$with_gpm" >&6
5275
5276 if test "$with_gpm" != no ; then
5277         echo "$as_me:5277: checking for gpm.h" >&5
5278 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5279 if test "${ac_cv_header_gpm_h+set}" = set; then
5280   echo $ECHO_N "(cached) $ECHO_C" >&6
5281 else
5282   cat >conftest.$ac_ext <<_ACEOF
5283 #line 5283 "configure"
5284 #include "confdefs.h"
5285 #include <gpm.h>
5286 _ACEOF
5287 if { (eval echo "$as_me:5287: \"$ac_cpp conftest.$ac_ext\"") >&5
5288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5289   ac_status=$?
5290   egrep -v '^ *\+' conftest.er1 >conftest.err
5291   rm -f conftest.er1
5292   cat conftest.err >&5
5293   echo "$as_me:5293: \$? = $ac_status" >&5
5294   (exit $ac_status); } >/dev/null; then
5295   if test -s conftest.err; then
5296     ac_cpp_err=$ac_c_preproc_warn_flag
5297   else
5298     ac_cpp_err=
5299   fi
5300 else
5301   ac_cpp_err=yes
5302 fi
5303 if test -z "$ac_cpp_err"; then
5304   ac_cv_header_gpm_h=yes
5305 else
5306   echo "$as_me: failed program was:" >&5
5307   cat conftest.$ac_ext >&5
5308   ac_cv_header_gpm_h=no
5309 fi
5310 rm -f conftest.err conftest.$ac_ext
5311 fi
5312 echo "$as_me:5312: result: $ac_cv_header_gpm_h" >&5
5313 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5314 if test $ac_cv_header_gpm_h = yes; then
5315
5316 cat >>confdefs.h <<\EOF
5317 #define HAVE_GPM_H 1
5318 EOF
5319
5320                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5321                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5322
5323 echo "${as_me:-configure}:5323: testing assuming we really have GPM library ..." 1>&5
5324
5325 cat >>confdefs.h <<\EOF
5326 #define HAVE_LIBGPM 1
5327 EOF
5328
5329                         with_gpm=yes
5330                 else
5331                         echo "$as_me:5331: checking for Gpm_Open in -lgpm" >&5
5332 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5333 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5334   echo $ECHO_N "(cached) $ECHO_C" >&6
5335 else
5336   ac_check_lib_save_LIBS=$LIBS
5337 LIBS="-lgpm  $LIBS"
5338 cat >conftest.$ac_ext <<_ACEOF
5339 #line 5339 "configure"
5340 #include "confdefs.h"
5341
5342 /* Override any gcc2 internal prototype to avoid an error.  */
5343 #ifdef __cplusplus
5344 extern "C"
5345 #endif
5346 /* We use char because int might match the return type of a gcc2
5347    builtin and then its argument prototype would still apply.  */
5348 char Gpm_Open ();
5349 int
5350 main (void)
5351 {
5352 Gpm_Open ();
5353   ;
5354   return 0;
5355 }
5356 _ACEOF
5357 rm -f conftest.$ac_objext conftest$ac_exeext
5358 if { (eval echo "$as_me:5358: \"$ac_link\"") >&5
5359   (eval $ac_link) 2>&5
5360   ac_status=$?
5361   echo "$as_me:5361: \$? = $ac_status" >&5
5362   (exit $ac_status); } &&
5363          { ac_try='test -s conftest$ac_exeext'
5364   { (eval echo "$as_me:5364: \"$ac_try\"") >&5
5365   (eval $ac_try) 2>&5
5366   ac_status=$?
5367   echo "$as_me:5367: \$? = $ac_status" >&5
5368   (exit $ac_status); }; }; then
5369   ac_cv_lib_gpm_Gpm_Open=yes
5370 else
5371   echo "$as_me: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
5373 ac_cv_lib_gpm_Gpm_Open=no
5374 fi
5375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5376 LIBS=$ac_check_lib_save_LIBS
5377 fi
5378 echo "$as_me:5378: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5379 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5380 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5381   with_gpm=yes
5382 else
5383
5384                                 if test "$with_gpm" = maybe; then
5385                                         { echo "$as_me:5385: WARNING: Cannot link with GPM library" >&5
5386 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5387                                         with_gpm=no
5388                                 else
5389                                         { { echo "$as_me:5389: error: Cannot link with GPM library" >&5
5390 echo "$as_me: error: Cannot link with GPM library" >&2;}
5391    { (exit 1); exit 1; }; }
5392                                 fi
5393
5394 fi
5395
5396                 fi
5397
5398 else
5399
5400                 test "$with_gpm" != maybe && { echo "$as_me:5400: WARNING: Cannot find GPM header" >&5
5401 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5402                 with_gpm=no
5403
5404 fi
5405
5406 fi
5407
5408 if test "$with_gpm" != no ; then
5409         echo "$as_me:5409: checking if you want to load GPM dynamically" >&5
5410 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5411
5412 # Check whether --with-dlsym or --without-dlsym was given.
5413 if test "${with_dlsym+set}" = set; then
5414   withval="$with_dlsym"
5415   with_dlsym=$withval
5416 else
5417   with_dlsym=yes
5418 fi;
5419         echo "$as_me:5419: result: $with_dlsym" >&5
5420 echo "${ECHO_T}$with_dlsym" >&6
5421         if test "x$with_dlsym" = xyes ; then
5422
5423 cf_have_dlsym=no
5424 echo "$as_me:5424: checking for dlsym" >&5
5425 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5426 if test "${ac_cv_func_dlsym+set}" = set; then
5427   echo $ECHO_N "(cached) $ECHO_C" >&6
5428 else
5429   cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432 /* System header to define __stub macros and hopefully few prototypes,
5433     which can conflict with char dlsym (); below.  */
5434 #include <assert.h>
5435 /* Override any gcc2 internal prototype to avoid an error.  */
5436 #ifdef __cplusplus
5437 extern "C"
5438 #endif
5439 /* We use char because int might match the return type of a gcc2
5440    builtin and then its argument prototype would still apply.  */
5441 char dlsym ();
5442 char (*f) ();
5443
5444 int
5445 main (void)
5446 {
5447 /* The GNU C library defines this for functions which it implements
5448     to always fail with ENOSYS.  Some functions are actually named
5449     something starting with __ and the normal name is an alias.  */
5450 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5451 choke me
5452 #else
5453 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5454 #endif
5455
5456   ;
5457   return 0;
5458 }
5459 _ACEOF
5460 rm -f conftest.$ac_objext conftest$ac_exeext
5461 if { (eval echo "$as_me:5461: \"$ac_link\"") >&5
5462   (eval $ac_link) 2>&5
5463   ac_status=$?
5464   echo "$as_me:5464: \$? = $ac_status" >&5
5465   (exit $ac_status); } &&
5466          { ac_try='test -s conftest$ac_exeext'
5467   { (eval echo "$as_me:5467: \"$ac_try\"") >&5
5468   (eval $ac_try) 2>&5
5469   ac_status=$?
5470   echo "$as_me:5470: \$? = $ac_status" >&5
5471   (exit $ac_status); }; }; then
5472   ac_cv_func_dlsym=yes
5473 else
5474   echo "$as_me: failed program was:" >&5
5475 cat conftest.$ac_ext >&5
5476 ac_cv_func_dlsym=no
5477 fi
5478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5479 fi
5480 echo "$as_me:5480: result: $ac_cv_func_dlsym" >&5
5481 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5482 if test $ac_cv_func_dlsym = yes; then
5483   cf_have_dlsym=yes
5484 else
5485
5486 cf_have_libdl=no
5487 echo "$as_me:5487: checking for dlsym in -ldl" >&5
5488 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5489 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5490   echo $ECHO_N "(cached) $ECHO_C" >&6
5491 else
5492   ac_check_lib_save_LIBS=$LIBS
5493 LIBS="-ldl  $LIBS"
5494 cat >conftest.$ac_ext <<_ACEOF
5495 #line 5495 "configure"
5496 #include "confdefs.h"
5497
5498 /* Override any gcc2 internal prototype to avoid an error.  */
5499 #ifdef __cplusplus
5500 extern "C"
5501 #endif
5502 /* We use char because int might match the return type of a gcc2
5503    builtin and then its argument prototype would still apply.  */
5504 char dlsym ();
5505 int
5506 main (void)
5507 {
5508 dlsym ();
5509   ;
5510   return 0;
5511 }
5512 _ACEOF
5513 rm -f conftest.$ac_objext conftest$ac_exeext
5514 if { (eval echo "$as_me:5514: \"$ac_link\"") >&5
5515   (eval $ac_link) 2>&5
5516   ac_status=$?
5517   echo "$as_me:5517: \$? = $ac_status" >&5
5518   (exit $ac_status); } &&
5519          { ac_try='test -s conftest$ac_exeext'
5520   { (eval echo "$as_me:5520: \"$ac_try\"") >&5
5521   (eval $ac_try) 2>&5
5522   ac_status=$?
5523   echo "$as_me:5523: \$? = $ac_status" >&5
5524   (exit $ac_status); }; }; then
5525   ac_cv_lib_dl_dlsym=yes
5526 else
5527   echo "$as_me: failed program was:" >&5
5528 cat conftest.$ac_ext >&5
5529 ac_cv_lib_dl_dlsym=no
5530 fi
5531 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5532 LIBS=$ac_check_lib_save_LIBS
5533 fi
5534 echo "$as_me:5534: result: $ac_cv_lib_dl_dlsym" >&5
5535 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5536 if test $ac_cv_lib_dl_dlsym = yes; then
5537
5538         cf_have_dlsym=yes
5539         cf_have_libdl=yes
5540 fi
5541
5542 fi
5543
5544 if test "$cf_have_dlsym" = yes ; then
5545         test "$cf_have_libdl" = yes && {
5546 cf_add_libs="-ldl"
5547 # Filter out duplicates - this happens with badly-designed ".pc" files...
5548 for cf_add_1lib in $LIBS
5549 do
5550         for cf_add_2lib in $cf_add_libs
5551         do
5552                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5553                 then
5554                         cf_add_1lib=
5555                         break
5556                 fi
5557         done
5558         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5559 done
5560 LIBS="$cf_add_libs"
5561  }
5562
5563         echo "$as_me:5563: checking whether able to link to dl*() functions" >&5
5564 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5565         cat >conftest.$ac_ext <<_ACEOF
5566 #line 5566 "configure"
5567 #include "confdefs.h"
5568 #include <dlfcn.h>
5569 int
5570 main (void)
5571 {
5572
5573                 void *obj;
5574                 if ((obj = dlopen("filename", 0)) != 0) {
5575                         if (dlsym(obj, "symbolname") == 0) {
5576                         dlclose(obj);
5577                         }
5578                 }
5579   ;
5580   return 0;
5581 }
5582 _ACEOF
5583 rm -f conftest.$ac_objext conftest$ac_exeext
5584 if { (eval echo "$as_me:5584: \"$ac_link\"") >&5
5585   (eval $ac_link) 2>&5
5586   ac_status=$?
5587   echo "$as_me:5587: \$? = $ac_status" >&5
5588   (exit $ac_status); } &&
5589          { ac_try='test -s conftest$ac_exeext'
5590   { (eval echo "$as_me:5590: \"$ac_try\"") >&5
5591   (eval $ac_try) 2>&5
5592   ac_status=$?
5593   echo "$as_me:5593: \$? = $ac_status" >&5
5594   (exit $ac_status); }; }; then
5595
5596 cat >>confdefs.h <<\EOF
5597 #define HAVE_LIBDL 1
5598 EOF
5599
5600 else
5601   echo "$as_me: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603
5604                 { { echo "$as_me:5604: error: Cannot link test program for libdl" >&5
5605 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5606    { (exit 1); exit 1; }; }
5607 fi
5608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5609         echo "$as_me:5609: result: ok" >&5
5610 echo "${ECHO_T}ok" >&6
5611 else
5612         { { echo "$as_me:5612: error: Cannot find dlsym function" >&5
5613 echo "$as_me: error: Cannot find dlsym function" >&2;}
5614    { (exit 1); exit 1; }; }
5615 fi
5616
5617                 if test "x$with_gpm" != xyes ; then
5618                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5619
5620 echo "${as_me:-configure}:5620: testing assuming soname for gpm is $with_gpm ..." 1>&5
5621
5622                         cf_cv_gpm_soname="$with_gpm"
5623                 else
5624
5625 echo "$as_me:5625: checking for soname of gpm library" >&5
5626 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5627 if test "${cf_cv_gpm_soname+set}" = set; then
5628   echo $ECHO_N "(cached) $ECHO_C" >&6
5629 else
5630
5631 cf_cv_gpm_soname=unknown
5632 if test "$cross_compiling" != yes ; then
5633 cat >conftest.$ac_ext <<CF_EOF
5634 #include <gpm.h>
5635 int main(void)
5636 {
5637 if (Gpm_Open(0,0)) Gpm_Close();
5638         ${cf_cv_main_return:-return}(0);
5639 }
5640 CF_EOF
5641 cf_save_LIBS="$LIBS"
5642
5643 cf_add_libs="-lgpm"
5644 # Filter out duplicates - this happens with badly-designed ".pc" files...
5645 for cf_add_1lib in $LIBS
5646 do
5647         for cf_add_2lib in $cf_add_libs
5648         do
5649                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5650                 then
5651                         cf_add_1lib=
5652                         break
5653                 fi
5654         done
5655         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5656 done
5657 LIBS="$cf_add_libs"
5658
5659         if { (eval echo "$as_me:5659: \"$ac_compile\"") >&5
5660   (eval $ac_compile) 2>&5
5661   ac_status=$?
5662   echo "$as_me:5662: \$? = $ac_status" >&5
5663   (exit $ac_status); } ; then
5664                 if { (eval echo "$as_me:5664: \"$ac_link\"") >&5
5665   (eval $ac_link) 2>&5
5666   ac_status=$?
5667   echo "$as_me:5667: \$? = $ac_status" >&5
5668   (exit $ac_status); } ; then
5669                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5670                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5671                 fi
5672         fi
5673 rm -rf conftest*
5674 LIBS="$cf_save_LIBS"
5675 fi
5676
5677 fi
5678 echo "$as_me:5678: result: $cf_cv_gpm_soname" >&5
5679 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5680
5681                 fi
5682                 test "$cf_cv_gpm_soname" != "unknown" &&
5683 cat >>confdefs.h <<EOF
5684 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5685 EOF
5686
5687                 SHLIB_LIST="-ldl $SHLIB_LIST"
5688         else
5689                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5690
5691 cf_add_libs="-lgpm"
5692 # Filter out duplicates - this happens with badly-designed ".pc" files...
5693 for cf_add_1lib in $TEST_LIBS
5694 do
5695         for cf_add_2lib in $cf_add_libs
5696         do
5697                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5698                 then
5699                         cf_add_1lib=
5700                         break
5701                 fi
5702         done
5703         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5704 done
5705 TEST_LIBS="$cf_add_libs"
5706
5707         fi
5708
5709 cat >>confdefs.h <<\EOF
5710 #define HAVE_LIBGPM 1
5711 EOF
5712
5713 echo "$as_me:5713: checking for Gpm_Wgetch in -lgpm" >&5
5714 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5715 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5716   echo $ECHO_N "(cached) $ECHO_C" >&6
5717 else
5718   ac_check_lib_save_LIBS=$LIBS
5719 LIBS="-lgpm  $LIBS"
5720 cat >conftest.$ac_ext <<_ACEOF
5721 #line 5721 "configure"
5722 #include "confdefs.h"
5723
5724 /* Override any gcc2 internal prototype to avoid an error.  */
5725 #ifdef __cplusplus
5726 extern "C"
5727 #endif
5728 /* We use char because int might match the return type of a gcc2
5729    builtin and then its argument prototype would still apply.  */
5730 char Gpm_Wgetch ();
5731 int
5732 main (void)
5733 {
5734 Gpm_Wgetch ();
5735   ;
5736   return 0;
5737 }
5738 _ACEOF
5739 rm -f conftest.$ac_objext conftest$ac_exeext
5740 if { (eval echo "$as_me:5740: \"$ac_link\"") >&5
5741   (eval $ac_link) 2>&5
5742   ac_status=$?
5743   echo "$as_me:5743: \$? = $ac_status" >&5
5744   (exit $ac_status); } &&
5745          { ac_try='test -s conftest$ac_exeext'
5746   { (eval echo "$as_me:5746: \"$ac_try\"") >&5
5747   (eval $ac_try) 2>&5
5748   ac_status=$?
5749   echo "$as_me:5749: \$? = $ac_status" >&5
5750   (exit $ac_status); }; }; then
5751   ac_cv_lib_gpm_Gpm_Wgetch=yes
5752 else
5753   echo "$as_me: failed program was:" >&5
5754 cat conftest.$ac_ext >&5
5755 ac_cv_lib_gpm_Gpm_Wgetch=no
5756 fi
5757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5758 LIBS=$ac_check_lib_save_LIBS
5759 fi
5760 echo "$as_me:5760: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5761 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5762 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5763
5764 echo "$as_me:5764: checking if GPM is weakly bound to curses library" >&5
5765 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5766 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5767   echo $ECHO_N "(cached) $ECHO_C" >&6
5768 else
5769
5770 cf_cv_check_gpm_wgetch=unknown
5771 if test "$cross_compiling" != yes ; then
5772
5773 cat >conftest.$ac_ext <<CF_EOF
5774 #include <gpm.h>
5775 int main(void)
5776 {
5777         Gpm_Wgetch();
5778         ${cf_cv_main_return:-return}(0);
5779 }
5780 CF_EOF
5781
5782         cf_save_LIBS="$LIBS"
5783         # This only works if we can look at the symbol table.  If a shared
5784         # library is stripped for install, we cannot use that.  So we're forced
5785         # to rely on the static library, noting that some packagers may not
5786         # include it.
5787         LIBS="-static -lgpm -dynamic $LIBS"
5788         if { (eval echo "$as_me:5788: \"$ac_compile\"") >&5
5789   (eval $ac_compile) 2>&5
5790   ac_status=$?
5791   echo "$as_me:5791: \$? = $ac_status" >&5
5792   (exit $ac_status); } ; then
5793                 if { (eval echo "$as_me:5793: \"$ac_link\"") >&5
5794   (eval $ac_link) 2>&5
5795   ac_status=$?
5796   echo "$as_me:5796: \$? = $ac_status" >&5
5797   (exit $ac_status); } ; then
5798                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5799                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5800                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5801                 fi
5802         fi
5803         rm -rf conftest*
5804         LIBS="$cf_save_LIBS"
5805 fi
5806
5807 fi
5808 echo "$as_me:5808: result: $cf_cv_check_gpm_wgetch" >&5
5809 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5810
5811 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5812         { echo "$as_me:5812: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5813 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5814 fi
5815
5816 fi
5817
5818 fi
5819
5820 # not everyone has "test -c"
5821 if test -c /dev/sysmouse 2>/dev/null ; then
5822 echo "$as_me:5822: checking if you want to use sysmouse" >&5
5823 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5824
5825 # Check whether --with-sysmouse or --without-sysmouse was given.
5826 if test "${with_sysmouse+set}" = set; then
5827   withval="$with_sysmouse"
5828   cf_with_sysmouse=$withval
5829 else
5830   cf_with_sysmouse=maybe
5831 fi;
5832         if test "$cf_with_sysmouse" != no ; then
5833         cat >conftest.$ac_ext <<_ACEOF
5834 #line 5834 "configure"
5835 #include "confdefs.h"
5836
5837 #include <osreldate.h>
5838 #if (__FreeBSD_version >= 400017)
5839 #include <sys/consio.h>
5840 #include <sys/fbio.h>
5841 #else
5842 #include <machine/console.h>
5843 #endif
5844
5845 int
5846 main (void)
5847 {
5848
5849         struct mouse_info the_mouse;
5850         ioctl(0, CONS_MOUSECTL, &the_mouse);
5851
5852   ;
5853   return 0;
5854 }
5855 _ACEOF
5856 rm -f conftest.$ac_objext
5857 if { (eval echo "$as_me:5857: \"$ac_compile\"") >&5
5858   (eval $ac_compile) 2>&5
5859   ac_status=$?
5860   echo "$as_me:5860: \$? = $ac_status" >&5
5861   (exit $ac_status); } &&
5862          { ac_try='test -s conftest.$ac_objext'
5863   { (eval echo "$as_me:5863: \"$ac_try\"") >&5
5864   (eval $ac_try) 2>&5
5865   ac_status=$?
5866   echo "$as_me:5866: \$? = $ac_status" >&5
5867   (exit $ac_status); }; }; then
5868   cf_with_sysmouse=yes
5869 else
5870   echo "$as_me: failed program was:" >&5
5871 cat conftest.$ac_ext >&5
5872 cf_with_sysmouse=no
5873 fi
5874 rm -f conftest.$ac_objext conftest.$ac_ext
5875         fi
5876 echo "$as_me:5876: result: $cf_with_sysmouse" >&5
5877 echo "${ECHO_T}$cf_with_sysmouse" >&6
5878 test "$cf_with_sysmouse" = yes &&
5879 cat >>confdefs.h <<\EOF
5880 #define USE_SYSMOUSE 1
5881 EOF
5882
5883 fi
5884
5885 if test X"$CC_G_OPT" = X"" ; then
5886         CC_G_OPT='-g'
5887         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5888 fi
5889
5890 if test X"$CXX_G_OPT" = X"" ; then
5891         CXX_G_OPT='-g'
5892         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5893 fi
5894
5895 echo "$as_me:5895: checking for default loader flags" >&5
5896 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5897 case $DFT_LWR_MODEL in
5898 (libtool) LD_MODEL=''   ;;
5899 (normal)  LD_MODEL=''   ;;
5900 (debug)   LD_MODEL=$CC_G_OPT ;;
5901 (profile) LD_MODEL='-pg';;
5902 (shared)  LD_MODEL=''   ;;
5903 esac
5904 echo "$as_me:5904: result: $LD_MODEL" >&5
5905 echo "${ECHO_T}$LD_MODEL" >&6
5906
5907 case $DFT_LWR_MODEL in
5908 (shared)
5909
5910 echo "$as_me:5910: checking if rpath option should be used" >&5
5911 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5912
5913 # Check whether --enable-rpath or --disable-rpath was given.
5914 if test "${enable_rpath+set}" = set; then
5915   enableval="$enable_rpath"
5916   cf_cv_enable_rpath=$enableval
5917 else
5918   cf_cv_enable_rpath=no
5919 fi;
5920 echo "$as_me:5920: result: $cf_cv_enable_rpath" >&5
5921 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5922
5923 echo "$as_me:5923: checking if shared libraries should be relinked during install" >&5
5924 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5925
5926 # Check whether --enable-relink or --disable-relink was given.
5927 if test "${enable_relink+set}" = set; then
5928   enableval="$enable_relink"
5929   cf_cv_do_relink=$enableval
5930 else
5931   cf_cv_do_relink=yes
5932 fi;
5933 echo "$as_me:5933: result: $cf_cv_do_relink" >&5
5934 echo "${ECHO_T}$cf_cv_do_relink" >&6
5935         ;;
5936 esac
5937
5938 # we will build libraries one-level down.
5939 rel_builddir=..
5940
5941 LD_RPATH_OPT=
5942 echo "$as_me:5942: checking for an rpath option" >&5
5943 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5944 case $cf_cv_system_name in
5945 (irix*)
5946         if test "$GCC" = yes; then
5947                 LD_RPATH_OPT="-Wl,-rpath,"
5948         else
5949                 LD_RPATH_OPT="-rpath "
5950         fi
5951         ;;
5952 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5953         LD_RPATH_OPT="-Wl,-rpath,"
5954         ;;
5955 (openbsd[2-9].*|mirbsd*)
5956         LD_RPATH_OPT="-Wl,-rpath,"
5957         ;;
5958 (dragonfly*)
5959         LD_RPATH_OPT="-rpath "
5960         ;;
5961 (netbsd*)
5962         LD_RPATH_OPT="-Wl,-rpath,"
5963         ;;
5964 (osf*|mls+*)
5965         LD_RPATH_OPT="-rpath "
5966         ;;
5967 (solaris2*)
5968         LD_RPATH_OPT="-R"
5969         ;;
5970 (*)
5971         ;;
5972 esac
5973 echo "$as_me:5973: result: $LD_RPATH_OPT" >&5
5974 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5975
5976 case "x$LD_RPATH_OPT" in
5977 (x-R*)
5978         echo "$as_me:5978: checking if we need a space after rpath option" >&5
5979 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5980         cf_save_LIBS="$LIBS"
5981
5982 cf_add_libs="${LD_RPATH_OPT}$libdir"
5983 # Filter out duplicates - this happens with badly-designed ".pc" files...
5984 for cf_add_1lib in $LIBS
5985 do
5986         for cf_add_2lib in $cf_add_libs
5987         do
5988                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5989                 then
5990                         cf_add_1lib=
5991                         break
5992                 fi
5993         done
5994         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5995 done
5996 LIBS="$cf_add_libs"
5997
5998         cat >conftest.$ac_ext <<_ACEOF
5999 #line 5999 "configure"
6000 #include "confdefs.h"
6001
6002 int
6003 main (void)
6004 {
6005
6006   ;
6007   return 0;
6008 }
6009 _ACEOF
6010 rm -f conftest.$ac_objext conftest$ac_exeext
6011 if { (eval echo "$as_me:6011: \"$ac_link\"") >&5
6012   (eval $ac_link) 2>&5
6013   ac_status=$?
6014   echo "$as_me:6014: \$? = $ac_status" >&5
6015   (exit $ac_status); } &&
6016          { ac_try='test -s conftest$ac_exeext'
6017   { (eval echo "$as_me:6017: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:6020: \$? = $ac_status" >&5
6021   (exit $ac_status); }; }; then
6022   cf_rpath_space=no
6023 else
6024   echo "$as_me: failed program was:" >&5
6025 cat conftest.$ac_ext >&5
6026 cf_rpath_space=yes
6027 fi
6028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6029         LIBS="$cf_save_LIBS"
6030         echo "$as_me:6030: result: $cf_rpath_space" >&5
6031 echo "${ECHO_T}$cf_rpath_space" >&6
6032         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6033         ;;
6034 esac
6035
6036         RM_SHARED_OPTS=
6037         LOCAL_LDFLAGS=
6038         LOCAL_LDFLAGS2=
6039         LD_SHARED_OPTS=
6040         INSTALL_LIB="-m 644"
6041         : ${rel_builddir:=.}
6042
6043         shlibdir=$libdir
6044
6045         MAKE_DLLS="#"
6046
6047         cf_cv_do_symlinks=no
6048         cf_ld_rpath_opt=
6049         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6050
6051         echo "$as_me:6051: checking if release/abi version should be used for shared libs" >&5
6052 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6053
6054 # Check whether --with-shlib-version or --without-shlib-version was given.
6055 if test "${with_shlib_version+set}" = set; then
6056   withval="$with_shlib_version"
6057   test -z "$withval" && withval=auto
6058         case $withval in
6059         (yes)
6060                 cf_cv_shlib_version=auto
6061                 ;;
6062         (rel|abi|auto)
6063                 cf_cv_shlib_version=$withval
6064                 ;;
6065         (*)
6066                 echo "$as_me:6066: result: $withval" >&5
6067 echo "${ECHO_T}$withval" >&6
6068                 { { echo "$as_me:6068: error: option value must be one of: rel, abi, or auto" >&5
6069 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6070    { (exit 1); exit 1; }; }
6071                 ;;
6072         esac
6073
6074 else
6075   cf_cv_shlib_version=auto
6076 fi;
6077         echo "$as_me:6077: result: $cf_cv_shlib_version" >&5
6078 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6079
6080         cf_cv_rm_so_locs=no
6081         cf_try_cflags=
6082
6083         # Some less-capable ports of gcc support only -fpic
6084         CC_SHARED_OPTS=
6085
6086         cf_try_fPIC=no
6087         if test "$GCC" = yes
6088         then
6089                 cf_try_fPIC=yes
6090         else
6091                 case $cf_cv_system_name in
6092                 (*linux*)       # e.g., PGI compiler
6093                         cf_try_fPIC=yes
6094                         ;;
6095                 esac
6096         fi
6097
6098         if test "$cf_try_fPIC" = yes
6099         then
6100                 echo "$as_me:6100: checking which $CC option to use" >&5
6101 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6102                 cf_save_CFLAGS="$CFLAGS"
6103                 for CC_SHARED_OPTS in -fPIC -fpic ''
6104                 do
6105                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6106                         cat >conftest.$ac_ext <<_ACEOF
6107 #line 6107 "configure"
6108 #include "confdefs.h"
6109 #include <stdio.h>
6110 int
6111 main (void)
6112 {
6113 int x = 1
6114   ;
6115   return 0;
6116 }
6117 _ACEOF
6118 rm -f conftest.$ac_objext
6119 if { (eval echo "$as_me:6119: \"$ac_compile\"") >&5
6120   (eval $ac_compile) 2>&5
6121   ac_status=$?
6122   echo "$as_me:6122: \$? = $ac_status" >&5
6123   (exit $ac_status); } &&
6124          { ac_try='test -s conftest.$ac_objext'
6125   { (eval echo "$as_me:6125: \"$ac_try\"") >&5
6126   (eval $ac_try) 2>&5
6127   ac_status=$?
6128   echo "$as_me:6128: \$? = $ac_status" >&5
6129   (exit $ac_status); }; }; then
6130   break
6131 else
6132   echo "$as_me: failed program was:" >&5
6133 cat conftest.$ac_ext >&5
6134 fi
6135 rm -f conftest.$ac_objext conftest.$ac_ext
6136                 done
6137                 echo "$as_me:6137: result: $CC_SHARED_OPTS" >&5
6138 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6139                 CFLAGS="$cf_save_CFLAGS"
6140         fi
6141
6142         cf_cv_shlib_version_infix=no
6143
6144         case $cf_cv_system_name in
6145         (aix4.3-9*|aix[5-7]*)
6146                 if test "$GCC" = yes; then
6147                         CC_SHARED_OPTS='-Wl,-brtl'
6148                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6149                 else
6150                         CC_SHARED_OPTS='-brtl'
6151                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6152                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6153                 fi
6154                 ;;
6155         (beos*)
6156                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6157                 ;;
6158         (cygwin*)
6159                 CC_SHARED_OPTS=
6160                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6161                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6162                 cf_cv_shlib_version=cygdll
6163                 cf_cv_shlib_version_infix=cygdll
6164                 shlibdir=$bindir
6165                 MAKE_DLLS=
6166                 cat >mk_shared_lib.sh <<-CF_EOF
6167                 #!$SHELL
6168                 SHARED_LIB=\$1
6169                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6170                 shift
6171                 cat <<-EOF
6172                 Linking shared library
6173                 ** SHARED_LIB \$SHARED_LIB
6174                 ** IMPORT_LIB \$IMPORT_LIB
6175 EOF
6176                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6177 CF_EOF
6178                 chmod +x mk_shared_lib.sh
6179                 ;;
6180         (msys*)
6181                 CC_SHARED_OPTS=
6182                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6183                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6184                 cf_cv_shlib_version=msysdll
6185                 cf_cv_shlib_version_infix=msysdll
6186                 shlibdir=$bindir
6187                 MAKE_DLLS=
6188                 cat >mk_shared_lib.sh <<-CF_EOF
6189                 #!$SHELL
6190                 SHARED_LIB=\$1
6191                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6192                 shift
6193                 cat <<-EOF
6194                 Linking shared library
6195                 ** SHARED_LIB \$SHARED_LIB
6196                 ** IMPORT_LIB \$IMPORT_LIB
6197 EOF
6198                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6199 CF_EOF
6200                 chmod +x mk_shared_lib.sh
6201                 ;;
6202         (darwin*)
6203                 cf_try_cflags="no-cpp-precomp"
6204                 CC_SHARED_OPTS="-dynamic"
6205                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6206                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6207                 cf_cv_shlib_version_infix=yes
6208                 echo "$as_me:6208: checking if ld -search_paths_first works" >&5
6209 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6210 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6211   echo $ECHO_N "(cached) $ECHO_C" >&6
6212 else
6213
6214                         cf_save_LDFLAGS=$LDFLAGS
6215                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6216                         cat >conftest.$ac_ext <<_ACEOF
6217 #line 6217 "configure"
6218 #include "confdefs.h"
6219
6220 int
6221 main (void)
6222 {
6223 int i;
6224   ;
6225   return 0;
6226 }
6227 _ACEOF
6228 rm -f conftest.$ac_objext conftest$ac_exeext
6229 if { (eval echo "$as_me:6229: \"$ac_link\"") >&5
6230   (eval $ac_link) 2>&5
6231   ac_status=$?
6232   echo "$as_me:6232: \$? = $ac_status" >&5
6233   (exit $ac_status); } &&
6234          { ac_try='test -s conftest$ac_exeext'
6235   { (eval echo "$as_me:6235: \"$ac_try\"") >&5
6236   (eval $ac_try) 2>&5
6237   ac_status=$?
6238   echo "$as_me:6238: \$? = $ac_status" >&5
6239   (exit $ac_status); }; }; then
6240   cf_cv_ldflags_search_paths_first=yes
6241 else
6242   echo "$as_me: failed program was:" >&5
6243 cat conftest.$ac_ext >&5
6244 cf_cv_ldflags_search_paths_first=no
6245 fi
6246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6247                                 LDFLAGS=$cf_save_LDFLAGS
6248 fi
6249 echo "$as_me:6249: result: $cf_cv_ldflags_search_paths_first" >&5
6250 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6251                 if test $cf_cv_ldflags_search_paths_first = yes; then
6252                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6253                 fi
6254                 ;;
6255         (hpux[7-8]*)
6256                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6257                 if test "$GCC" != yes; then
6258                         CC_SHARED_OPTS='+Z'
6259                 fi
6260                 MK_SHARED_LIB='${LD} -b -o $@'
6261                 INSTALL_LIB="-m 555"
6262                 ;;
6263         (hpux*)
6264                 # (tested with gcc 2.7.2 -- I don't have c89)
6265                 if test "$GCC" = yes; then
6266                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6267                 else
6268                         CC_SHARED_OPTS='+Z'
6269                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6270                 fi
6271                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6272                 # HP-UX shared libraries must be executable, and should be
6273                 # readonly to exploit a quirk in the memory manager.
6274                 INSTALL_LIB="-m 555"
6275                 ;;
6276         (interix*)
6277                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6278                 if test "$cf_cv_shlib_version" = rel; then
6279                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6280                 else
6281                         cf_shared_soname='`basename `'
6282                 fi
6283                 CC_SHARED_OPTS=
6284                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6285                 ;;
6286         (irix*)
6287                 if test "$cf_cv_enable_rpath" = yes ; then
6288                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6289                 fi
6290                 # tested with IRIX 5.2 and 'cc'.
6291                 if test "$GCC" != yes; then
6292                         CC_SHARED_OPTS='-KPIC'
6293                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6294                 else
6295                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6296                 fi
6297                 cf_cv_rm_so_locs=yes
6298                 ;;
6299         (linux*|gnu*|k*bsd*-gnu)
6300                 if test "$DFT_LWR_MODEL" = "shared" ; then
6301                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6302                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6303                 fi
6304                 if test "$cf_cv_enable_rpath" = yes ; then
6305                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6306                 fi
6307
6308         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6309         if test "$cf_cv_shlib_version" = rel; then
6310                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6311         else
6312                 cf_cv_shared_soname='`basename $@`'
6313         fi
6314
6315                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6316                 ;;
6317         (mingw*)
6318                 cf_cv_shlib_version=mingw
6319                 cf_cv_shlib_version_infix=mingw
6320                 shlibdir=$bindir
6321                 MAKE_DLLS=
6322                 if test "$DFT_LWR_MODEL" = "shared" ; then
6323                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6324                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6325                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6326                 fi
6327                 CC_SHARED_OPTS=
6328                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6329                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6330                 cat >mk_shared_lib.sh <<-CF_EOF
6331                 #!$SHELL
6332                 SHARED_LIB=\$1
6333                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6334                 shift
6335                 cat <<-EOF
6336                 Linking shared library
6337                 ** SHARED_LIB \$SHARED_LIB
6338                 ** IMPORT_LIB \$IMPORT_LIB
6339 EOF
6340                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6341 CF_EOF
6342                 chmod +x mk_shared_lib.sh
6343                 ;;
6344         (openbsd[2-9].*|mirbsd*)
6345                 if test "$DFT_LWR_MODEL" = "shared" ; then
6346                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6347                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6348                 fi
6349                 if test "$cf_cv_enable_rpath" = yes ; then
6350                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6351                 fi
6352                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6353
6354         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6355         if test "$cf_cv_shlib_version" = rel; then
6356                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6357         else
6358                 cf_cv_shared_soname='`basename $@`'
6359         fi
6360
6361                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6362                 ;;
6363         (nto-qnx*|openbsd*|freebsd[12].*)
6364                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6365                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6366                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6367                 ;;
6368         (dragonfly*|freebsd*)
6369                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6370                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6371                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6372                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6373                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6374                 fi
6375
6376         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6377         if test "$cf_cv_shlib_version" = rel; then
6378                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6379         else
6380                 cf_cv_shared_soname='`basename $@`'
6381         fi
6382
6383                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6384                 ;;
6385         (netbsd*)
6386                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6387                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6388                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6389                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6390                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6391                         if test "$cf_cv_shlib_version" = auto; then
6392                         if test -f /usr/libexec/ld.elf_so; then
6393                                 cf_cv_shlib_version=abi
6394                         else
6395                                 cf_cv_shlib_version=rel
6396                         fi
6397                         fi
6398
6399         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6400         if test "$cf_cv_shlib_version" = rel; then
6401                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6402         else
6403                 cf_cv_shared_soname='`basename $@`'
6404         fi
6405
6406                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6407                 else
6408                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6409                 fi
6410                 ;;
6411         (osf*|mls+*)
6412                 # tested with OSF/1 V3.2 and 'cc'
6413                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6414                 # link with shared libs).
6415                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6416                 case $host_os in
6417                 (osf4*)
6418                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6419                         ;;
6420                 esac
6421                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6422                 if test "$DFT_LWR_MODEL" = "shared" ; then
6423                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6424                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6425                 fi
6426                 cf_cv_rm_so_locs=yes
6427                 ;;
6428         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6429                 # tested with osr5.0.5
6430                 if test "$GCC" != yes; then
6431                         CC_SHARED_OPTS='-belf -KPIC'
6432                 fi
6433                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6434                 if test "$cf_cv_enable_rpath" = yes ; then
6435                         # only way is to set LD_RUN_PATH but no switch for it
6436                         RUN_PATH=$libdir
6437                 fi
6438                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6439                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6440                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6441                 ;;
6442         (sunos4*)
6443                 # tested with SunOS 4.1.1 and gcc 2.7.0
6444                 if test "$GCC" != yes; then
6445                         CC_SHARED_OPTS='-KPIC'
6446                 fi
6447                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6448                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6449                 ;;
6450         (solaris2*)
6451                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6452                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6453                 if test "$DFT_LWR_MODEL" = "shared" ; then
6454                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6455                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6456                 fi
6457                 if test "$cf_cv_enable_rpath" = yes ; then
6458                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6459                 fi
6460
6461         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6462         if test "$cf_cv_shlib_version" = rel; then
6463                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6464         else
6465                 cf_cv_shared_soname='`basename $@`'
6466         fi
6467
6468                 if test "$GCC" != yes; then
6469                         cf_save_CFLAGS="$CFLAGS"
6470                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6471                         do
6472                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6473                                 cat >conftest.$ac_ext <<_ACEOF
6474 #line 6474 "configure"
6475 #include "confdefs.h"
6476 #include <stdio.h>
6477 int
6478 main (void)
6479 {
6480 printf("Hello\n");
6481   ;
6482   return 0;
6483 }
6484 _ACEOF
6485 rm -f conftest.$ac_objext
6486 if { (eval echo "$as_me:6486: \"$ac_compile\"") >&5
6487   (eval $ac_compile) 2>&5
6488   ac_status=$?
6489   echo "$as_me:6489: \$? = $ac_status" >&5
6490   (exit $ac_status); } &&
6491          { ac_try='test -s conftest.$ac_objext'
6492   { (eval echo "$as_me:6492: \"$ac_try\"") >&5
6493   (eval $ac_try) 2>&5
6494   ac_status=$?
6495   echo "$as_me:6495: \$? = $ac_status" >&5
6496   (exit $ac_status); }; }; then
6497   break
6498 else
6499   echo "$as_me: failed program was:" >&5
6500 cat conftest.$ac_ext >&5
6501 fi
6502 rm -f conftest.$ac_objext conftest.$ac_ext
6503                         done
6504                         CFLAGS="$cf_save_CFLAGS"
6505                         CC_SHARED_OPTS=$cf_shared_opts
6506                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6507                 else
6508                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6509                 fi
6510                 ;;
6511         (sysv5uw7*|unix_sv*)
6512                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6513                 if test "$GCC" != yes; then
6514                         CC_SHARED_OPTS='-KPIC'
6515                 fi
6516                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6517                 ;;
6518         (*)
6519                 CC_SHARED_OPTS='unknown'
6520                 MK_SHARED_LIB='echo unknown'
6521                 ;;
6522         esac
6523
6524         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6525         case "$cf_cv_shlib_version" in
6526         (rel|abi)
6527                 case "$MK_SHARED_LIB" in
6528                 (*'-o $@')
6529                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6530                         ;;
6531                 (*)
6532                         { echo "$as_me:6532: WARNING: ignored --with-shlib-version" >&5
6533 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6534                         ;;
6535                 esac
6536                 ;;
6537         esac
6538
6539         if test -n "$cf_try_cflags"
6540         then
6541 cat > conftest.$ac_ext <<EOF
6542 #line 6542 "${as_me:-configure}"
6543 #include <stdio.h>
6544 int main(int argc, char *argv[])
6545 {
6546         printf("hello\n");
6547         return (argv[argc-1] == 0) ;
6548 }
6549 EOF
6550                 cf_save_CFLAGS="$CFLAGS"
6551                 for cf_opt in $cf_try_cflags
6552                 do
6553                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6554                         echo "$as_me:6554: checking if CFLAGS option -$cf_opt works" >&5
6555 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6556                         if { (eval echo "$as_me:6556: \"$ac_compile\"") >&5
6557   (eval $ac_compile) 2>&5
6558   ac_status=$?
6559   echo "$as_me:6559: \$? = $ac_status" >&5
6560   (exit $ac_status); }; then
6561                                 echo "$as_me:6561: result: yes" >&5
6562 echo "${ECHO_T}yes" >&6
6563                                 cf_save_CFLAGS="$CFLAGS"
6564                         else
6565                                 echo "$as_me:6565: result: no" >&5
6566 echo "${ECHO_T}no" >&6
6567                         fi
6568                 done
6569                 CFLAGS="$cf_save_CFLAGS"
6570         fi
6571
6572         # RPATH_LIST is a colon-separated list of directories
6573         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6574         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6575
6576         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6577
6578         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6579
6580 echo "${as_me:-configure}:6580: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6581
6582         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6583
6584 echo "${as_me:-configure}:6584: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6585
6586 for model in $cf_list_models; do
6587         case $model in
6588         (libtool)
6589
6590 echo "$as_me:6590: checking for additional libtool options" >&5
6591 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6592
6593 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6594 if test "${with_libtool_opts+set}" = set; then
6595   withval="$with_libtool_opts"
6596   with_libtool_opts=$withval
6597 else
6598   with_libtool_opts=no
6599 fi;
6600 echo "$as_me:6600: result: $with_libtool_opts" >&5
6601 echo "${ECHO_T}$with_libtool_opts" >&6
6602
6603 case .$with_libtool_opts in
6604 (.yes|.no|.)
6605         ;;
6606 (*)
6607         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6608         ;;
6609 esac
6610
6611 echo "$as_me:6611: checking if exported-symbols file should be used" >&5
6612 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6613
6614 # Check whether --with-export-syms or --without-export-syms was given.
6615 if test "${with_export_syms+set}" = set; then
6616   withval="$with_export_syms"
6617   with_export_syms=$withval
6618 else
6619   with_export_syms=no
6620 fi;
6621 if test "x$with_export_syms" = xyes
6622 then
6623         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6624
6625 fi
6626 echo "$as_me:6626: result: $with_export_syms" >&5
6627 echo "${ECHO_T}$with_export_syms" >&6
6628 if test "x$with_export_syms" != xno
6629 then
6630         EXPORT_SYMS="-export-symbols $with_export_syms"
6631
6632 fi
6633
6634                 ;;
6635         (shared)
6636                 if test "$CC_SHARED_OPTS" = "unknown"; then
6637                         { { echo "$as_me:6637: error: Shared libraries are not supported in this version" >&5
6638 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6639    { (exit 1); exit 1; }; }
6640                 fi
6641                 # workaround for inept transition to PIE vs PIC...
6642                 echo "$as_me:6642: checking if current CFLAGS link properly" >&5
6643 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6644                 cat >conftest.$ac_ext <<_ACEOF
6645 #line 6645 "configure"
6646 #include "confdefs.h"
6647 #include <stdio.h>
6648 int
6649 main (void)
6650 {
6651 printf("Hello work\n");
6652   ;
6653   return 0;
6654 }
6655 _ACEOF
6656 rm -f conftest.$ac_objext conftest$ac_exeext
6657 if { (eval echo "$as_me:6657: \"$ac_link\"") >&5
6658   (eval $ac_link) 2>&5
6659   ac_status=$?
6660   echo "$as_me:6660: \$? = $ac_status" >&5
6661   (exit $ac_status); } &&
6662          { ac_try='test -s conftest$ac_exeext'
6663   { (eval echo "$as_me:6663: \"$ac_try\"") >&5
6664   (eval $ac_try) 2>&5
6665   ac_status=$?
6666   echo "$as_me:6666: \$? = $ac_status" >&5
6667   (exit $ac_status); }; }; then
6668   cf_cflags_work=yes
6669 else
6670   echo "$as_me: failed program was:" >&5
6671 cat conftest.$ac_ext >&5
6672 cf_cflags_work=no
6673 fi
6674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6675                 echo "$as_me:6675: result: $cf_cflags_work" >&5
6676 echo "${ECHO_T}$cf_cflags_work" >&6
6677                 if test "$cf_cflags_work" = no
6678                 then
6679                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6680
6681 echo "${as_me:-configure}:6681: testing try to work around by appending shared-options ..." 1>&5
6682
6683                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6684                 fi
6685
6686 echo "$as_me:6686: checking if versioned-symbols file should be used" >&5
6687 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6688
6689 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6690 if test "${with_versioned_syms+set}" = set; then
6691   withval="$with_versioned_syms"
6692   with_versioned_syms=$withval
6693 else
6694   with_versioned_syms=no
6695 fi;
6696 if test "x$with_versioned_syms" = xyes
6697 then
6698         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6699
6700 fi
6701 echo "$as_me:6701: result: $with_versioned_syms" >&5
6702 echo "${ECHO_T}$with_versioned_syms" >&6
6703
6704 RESULTING_SYMS=
6705 VERSIONED_SYMS=
6706 WILDCARD_SYMS=
6707
6708 if test "x$with_versioned_syms" != xno
6709 then
6710         RESULTING_SYMS=$with_versioned_syms
6711         case "x$MK_SHARED_LIB" in
6712         (*-Wl,*)
6713                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6714                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6715                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6716
6717 echo "${as_me:-configure}:6717: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6718
6719                 ;;
6720         (*-dy\ *)
6721                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6722                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6723                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6724
6725 echo "${as_me:-configure}:6725: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6726
6727                 ;;
6728         (*)
6729                 { echo "$as_me:6729: WARNING: this system does not support versioned-symbols" >&5
6730 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6731                 ;;
6732         esac
6733
6734         # Linux ld can selectively override scope, e.g., of symbols beginning with
6735         # "_" by first declaring some as global, and then using a wildcard to
6736         # declare the others as local.  Some other loaders cannot do this.  Check
6737         # by constructing a (very) simple shared library and inspecting its
6738         # symbols.
6739         if test "x$VERSIONED_SYMS" != "x"
6740         then
6741                 echo "$as_me:6741: checking if wildcards can be used to selectively omit symbols" >&5
6742 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6743                 WILDCARD_SYMS=no
6744
6745                 # make sources
6746                 rm -f conftest.*
6747
6748                 cat >conftest.ver <<EOF
6749 module_1.0 {
6750 global:
6751         globalf1;
6752 local:
6753         localf1;
6754 };
6755 module_2.0 {
6756 global:
6757         globalf2;
6758 local:
6759         localf2;
6760         _*;
6761 } module_1.0;
6762 submodule_1.0 {
6763 global:
6764         subglobalf1;
6765         _ismissing;
6766 local:
6767         sublocalf1;
6768 };
6769 submodule_2.0 {
6770 global:
6771         subglobalf2;
6772 local:
6773         sublocalf2;
6774         _*;
6775 } submodule_1.0;
6776 EOF
6777                 cat >conftest.$ac_ext <<EOF
6778 #line 6778 "configure"
6779 int     _ismissing(void) { return 1; }
6780 int     _localf1(void) { return 1; }
6781 int     _localf2(void) { return 2; }
6782 int     globalf1(void) { return 1; }
6783 int     globalf2(void) { return 2; }
6784 int     _sublocalf1(void) { return 1; }
6785 int     _sublocalf2(void) { return 2; }
6786 int     subglobalf1(void) { return 1; }
6787 int     subglobalf2(void) { return 2; }
6788 EOF
6789                 cat >conftest.mk <<EOF
6790 CC=${CC}
6791 CFLAGS=${CFLAGS}
6792 CPPFLAGS=${CPPFLAGS}
6793 LDFLAGS=${LDFLAGS}
6794 LIBS=${LIBS}
6795 VERSIONED_SYMS=${VERSIONED_SYMS}
6796 RESULTING_SYMS=conftest.ver
6797 MK_SHARED_LIB=${MK_SHARED_LIB}
6798 conftest.so: conftest.$ac_cv_objext
6799                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6800 EOF
6801
6802                 # compile source, make library
6803                 if make -f conftest.mk 2>&5 >/dev/null
6804                 then
6805                         # test for missing symbol in either Data or Text section
6806                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6807                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6808                 fi
6809                 echo "$as_me:6809: result: $WILDCARD_SYMS" >&5
6810 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6811                 rm -f conftest.*
6812         fi
6813 fi
6814
6815                 ;;
6816         esac
6817 done
6818
6819 # pretend that ncurses==ncursesw==ncursest
6820 echo "$as_me:6820: checking if you want to disable library suffixes" >&5
6821 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6822
6823 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6824 if test "${enable_lib_suffixes+set}" = set; then
6825   enableval="$enable_lib_suffixes"
6826   test "$enableval" != no && enableval=yes
6827         if test "$enableval" != "yes" ; then
6828     disable_lib_suffixes=yes
6829         else
6830                 disable_lib_suffixes=no
6831         fi
6832 else
6833   enableval=yes
6834         disable_lib_suffixes=no
6835
6836 fi;
6837 echo "$as_me:6837: result: $disable_lib_suffixes" >&5
6838 echo "${ECHO_T}$disable_lib_suffixes" >&6
6839
6840 ### If we're building with rpath, try to link non-standard libs that way too.
6841 if test "$DFT_LWR_MODEL" = "shared"; then
6842
6843 echo "$as_me:6843: checking if rpath-hack should be disabled" >&5
6844 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6845
6846 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6847 if test "${enable_rpath_hack+set}" = set; then
6848   enableval="$enable_rpath_hack"
6849   test "$enableval" != no && enableval=yes
6850         if test "$enableval" != "yes" ; then
6851     cf_disable_rpath_hack=yes
6852         else
6853                 cf_disable_rpath_hack=no
6854         fi
6855 else
6856   enableval=yes
6857         cf_disable_rpath_hack=no
6858
6859 fi;
6860 echo "$as_me:6860: result: $cf_disable_rpath_hack" >&5
6861 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6862 if test "$cf_disable_rpath_hack" = no ; then
6863
6864 echo "$as_me:6864: checking for updated LDFLAGS" >&5
6865 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6866 if test -n "$LD_RPATH_OPT" ; then
6867         echo "$as_me:6867: result: maybe" >&5
6868 echo "${ECHO_T}maybe" >&6
6869
6870         for ac_prog in ldd
6871 do
6872   # Extract the first word of "$ac_prog", so it can be a program name with args.
6873 set dummy $ac_prog; ac_word=$2
6874 echo "$as_me:6874: checking for $ac_word" >&5
6875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6876 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6877   echo $ECHO_N "(cached) $ECHO_C" >&6
6878 else
6879   if test -n "$cf_ldd_prog"; then
6880   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6881 else
6882   ac_save_IFS=$IFS; IFS=$ac_path_separator
6883 ac_dummy="$PATH"
6884 for ac_dir in $ac_dummy; do
6885   IFS=$ac_save_IFS
6886   test -z "$ac_dir" && ac_dir=.
6887   $as_executable_p "$ac_dir/$ac_word" || continue
6888 ac_cv_prog_cf_ldd_prog="$ac_prog"
6889 echo "$as_me:6889: found $ac_dir/$ac_word" >&5
6890 break
6891 done
6892
6893 fi
6894 fi
6895 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6896 if test -n "$cf_ldd_prog"; then
6897   echo "$as_me:6897: result: $cf_ldd_prog" >&5
6898 echo "${ECHO_T}$cf_ldd_prog" >&6
6899 else
6900   echo "$as_me:6900: result: no" >&5
6901 echo "${ECHO_T}no" >&6
6902 fi
6903
6904   test -n "$cf_ldd_prog" && break
6905 done
6906 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6907
6908         cf_rpath_list="/usr/lib /lib"
6909         if test "$cf_ldd_prog" != no
6910         then
6911                 cf_rpath_oops=
6912
6913 cat >conftest.$ac_ext <<_ACEOF
6914 #line 6914 "configure"
6915 #include "confdefs.h"
6916 #include <stdio.h>
6917 int
6918 main (void)
6919 {
6920 printf("Hello");
6921   ;
6922   return 0;
6923 }
6924 _ACEOF
6925 rm -f conftest.$ac_objext conftest$ac_exeext
6926 if { (eval echo "$as_me:6926: \"$ac_link\"") >&5
6927   (eval $ac_link) 2>&5
6928   ac_status=$?
6929   echo "$as_me:6929: \$? = $ac_status" >&5
6930   (exit $ac_status); } &&
6931          { ac_try='test -s conftest$ac_exeext'
6932   { (eval echo "$as_me:6932: \"$ac_try\"") >&5
6933   (eval $ac_try) 2>&5
6934   ac_status=$?
6935   echo "$as_me:6935: \$? = $ac_status" >&5
6936   (exit $ac_status); }; }; then
6937   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6938                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6939 else
6940   echo "$as_me: failed program was:" >&5
6941 cat conftest.$ac_ext >&5
6942 fi
6943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6944
6945                 # If we passed the link-test, but get a "not found" on a given library,
6946                 # this could be due to inept reconfiguration of gcc to make it only
6947                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6948                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6949                 # /usr/local libraries.
6950                 if test -n "$cf_rpath_oops"
6951                 then
6952                         for cf_rpath_src in $cf_rpath_oops
6953                         do
6954                                 for cf_rpath_dir in \
6955                                         /usr/local \
6956                                         /usr/pkg \
6957                                         /opt/sfw
6958                                 do
6959                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6960                                         then
6961                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6962
6963 echo "${as_me:-configure}:6963: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6964
6965                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6966                                                 break
6967                                         fi
6968                                 done
6969                         done
6970                 fi
6971         fi
6972
6973         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6974
6975 echo "${as_me:-configure}:6975: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6976
6977 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6978
6979 echo "${as_me:-configure}:6979: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6980
6981 cf_rpath_dst=
6982 for cf_rpath_src in $LDFLAGS
6983 do
6984         case $cf_rpath_src in
6985         (-L*)
6986
6987                 # check if this refers to a directory which we will ignore
6988                 cf_rpath_skip=no
6989                 if test -n "$cf_rpath_list"
6990                 then
6991                         for cf_rpath_item in $cf_rpath_list
6992                         do
6993                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6994                                 then
6995                                         cf_rpath_skip=yes
6996                                         break
6997                                 fi
6998                         done
6999                 fi
7000
7001                 if test "$cf_rpath_skip" = no
7002                 then
7003                         # transform the option
7004                         if test "$LD_RPATH_OPT" = "-R " ; then
7005                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7006                         else
7007                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7008                         fi
7009
7010                         # if we have not already added this, add it now
7011                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7012                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7013                         then
7014                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7015
7016 echo "${as_me:-configure}:7016: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7017
7018                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7019                         fi
7020                 fi
7021                 ;;
7022         esac
7023         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7024 done
7025 LDFLAGS=$cf_rpath_dst
7026
7027 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7028
7029 echo "${as_me:-configure}:7029: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7030
7031 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7032
7033 echo "${as_me:-configure}:7033: testing ...checking LIBS $LIBS ..." 1>&5
7034
7035 cf_rpath_dst=
7036 for cf_rpath_src in $LIBS
7037 do
7038         case $cf_rpath_src in
7039         (-L*)
7040
7041                 # check if this refers to a directory which we will ignore
7042                 cf_rpath_skip=no
7043                 if test -n "$cf_rpath_list"
7044                 then
7045                         for cf_rpath_item in $cf_rpath_list
7046                         do
7047                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7048                                 then
7049                                         cf_rpath_skip=yes
7050                                         break
7051                                 fi
7052                         done
7053                 fi
7054
7055                 if test "$cf_rpath_skip" = no
7056                 then
7057                         # transform the option
7058                         if test "$LD_RPATH_OPT" = "-R " ; then
7059                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7060                         else
7061                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7062                         fi
7063
7064                         # if we have not already added this, add it now
7065                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7066                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7067                         then
7068                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7069
7070 echo "${as_me:-configure}:7070: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7071
7072                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7073                         fi
7074                 fi
7075                 ;;
7076         esac
7077         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7078 done
7079 LIBS=$cf_rpath_dst
7080
7081 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7082
7083 echo "${as_me:-configure}:7083: testing ...checked LIBS $LIBS ..." 1>&5
7084
7085         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7086
7087 echo "${as_me:-configure}:7087: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7088
7089 else
7090         echo "$as_me:7090: result: no" >&5
7091 echo "${ECHO_T}no" >&6
7092 fi
7093
7094 fi
7095
7096 fi
7097
7098 ###############################################################################
7099
7100 ###     use option --with-extra-suffix to append suffix to headers and libraries
7101 echo "$as_me:7101: checking if you wish to append extra suffix to header/library paths" >&5
7102 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7103 EXTRA_SUFFIX=
7104
7105 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7106 if test "${with_extra_suffix+set}" = set; then
7107   withval="$with_extra_suffix"
7108   case x$withval in
7109         (no)
7110                 ;;
7111         (xyes|x)
7112                 EXTRA_SUFFIX=$cf_cv_abi_version
7113                 ;;
7114         (*)
7115                 EXTRA_SUFFIX=$withval
7116                 ;;
7117         esac
7118
7119 fi;
7120 echo "$as_me:7120: result: $EXTRA_SUFFIX" >&5
7121 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7122
7123 ###     use option --disable-overwrite to leave out the link to -lcurses
7124 echo "$as_me:7124: checking if you wish to install ncurses overwriting curses" >&5
7125 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7126
7127 # Check whether --enable-overwrite or --disable-overwrite was given.
7128 if test "${enable_overwrite+set}" = set; then
7129   enableval="$enable_overwrite"
7130   with_overwrite=$enableval
7131 else
7132   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7133 fi;
7134 echo "$as_me:7134: result: $with_overwrite" >&5
7135 echo "${ECHO_T}$with_overwrite" >&6
7136
7137 echo "$as_me:7137: checking if external terminfo-database is used" >&5
7138 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7139
7140 # Check whether --enable-database or --disable-database was given.
7141 if test "${enable_database+set}" = set; then
7142   enableval="$enable_database"
7143   use_database=$enableval
7144 else
7145   use_database=yes
7146 fi;
7147 echo "$as_me:7147: result: $use_database" >&5
7148 echo "${ECHO_T}$use_database" >&6
7149
7150 case $host_os in
7151 (os2*)
7152         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7153         ;;
7154 (*)
7155         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7156         ;;
7157 esac
7158
7159 NCURSES_USE_DATABASE=0
7160 if test "$use_database" != no ; then
7161         NCURSES_USE_DATABASE=1
7162
7163         echo "$as_me:7163: checking which terminfo source-file will be installed" >&5
7164 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7165
7166 # Check whether --with-database or --without-database was given.
7167 if test "${with_database+set}" = set; then
7168   withval="$with_database"
7169   TERMINFO_SRC=$withval
7170 fi;
7171         echo "$as_me:7171: result: $TERMINFO_SRC" >&5
7172 echo "${ECHO_T}$TERMINFO_SRC" >&6
7173
7174         echo "$as_me:7174: checking whether to use hashed database instead of directory/tree" >&5
7175 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7176
7177 # Check whether --with-hashed-db or --without-hashed-db was given.
7178 if test "${with_hashed_db+set}" = set; then
7179   withval="$with_hashed_db"
7180
7181 else
7182   with_hashed_db=no
7183 fi;
7184         echo "$as_me:7184: result: $with_hashed_db" >&5
7185 echo "${ECHO_T}$with_hashed_db" >&6
7186 else
7187         with_hashed_db=no
7188 fi
7189
7190 echo "$as_me:7190: checking for list of fallback descriptions" >&5
7191 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7192
7193 # Check whether --with-fallbacks or --without-fallbacks was given.
7194 if test "${with_fallbacks+set}" = set; then
7195   withval="$with_fallbacks"
7196   with_fallback=$withval
7197 else
7198   with_fallback=
7199 fi;
7200 echo "$as_me:7200: result: $with_fallback" >&5
7201 echo "${ECHO_T}$with_fallback" >&6
7202 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7203
7204 echo "$as_me:7204: checking if you want modern xterm or antique" >&5
7205 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7206
7207 # Check whether --with-xterm-new or --without-xterm-new was given.
7208 if test "${with_xterm_new+set}" = set; then
7209   withval="$with_xterm_new"
7210   with_xterm_new=$withval
7211 else
7212   with_xterm_new=yes
7213 fi;
7214 case $with_xterm_new in
7215 (no) with_xterm_new=xterm-old;;
7216 (*)      with_xterm_new=xterm-new;;
7217 esac
7218 echo "$as_me:7218: result: $with_xterm_new" >&5
7219 echo "${ECHO_T}$with_xterm_new" >&6
7220 WHICH_XTERM=$with_xterm_new
7221
7222 echo "$as_me:7222: checking if xterm backspace sends BS or DEL" >&5
7223 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7224
7225 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7226 if test "${with_xterm_kbs+set}" = set; then
7227   withval="$with_xterm_kbs"
7228   with_xterm_kbs=$withval
7229 else
7230   with_xterm_kbs=BS
7231 fi;
7232 case x$with_xterm_kbs in
7233 (xyes|xno|xBS|xbs|x8)
7234         with_xterm_kbs=BS
7235         ;;
7236 (xDEL|xdel|x127)
7237         with_xterm_kbs=DEL
7238         ;;
7239 (*)
7240         with_xterm_kbs=$withval
7241         ;;
7242 esac
7243 echo "$as_me:7243: result: $with_xterm_kbs" >&5
7244 echo "${ECHO_T}$with_xterm_kbs" >&6
7245 XTERM_KBS=$with_xterm_kbs
7246
7247 MAKE_TERMINFO=
7248 if test "$use_database" = no ; then
7249         TERMINFO="${datadir}/terminfo"
7250         MAKE_TERMINFO="#"
7251 else
7252
7253 echo "$as_me:7253: checking for list of terminfo directories" >&5
7254 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7255
7256 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7257 if test "${with_terminfo_dirs+set}" = set; then
7258   withval="$with_terminfo_dirs"
7259
7260 else
7261   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7262 fi;
7263 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7264 cf_dst_path=
7265 for cf_src_path in $withval
7266 do
7267
7268 if test "x$prefix" != xNONE; then
7269         cf_path_syntax="$prefix"
7270 else
7271         cf_path_syntax="$ac_default_prefix"
7272 fi
7273
7274 case ".$cf_src_path" in
7275 (.\$\(*\)*|.\'*\'*)
7276         ;;
7277 (..|./*|.\\*)
7278         ;;
7279 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7280         ;;
7281 (.\${*prefix}*|.\${*dir}*)
7282         eval cf_src_path="$cf_src_path"
7283         case ".$cf_src_path" in
7284         (.NONE/*)
7285                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7286                 ;;
7287         esac
7288         ;;
7289 (.no|.NONE/*)
7290         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7291         ;;
7292 (*)
7293         { { echo "$as_me:7293: error: expected a pathname, not \"$cf_src_path\"" >&5
7294 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7295    { (exit 1); exit 1; }; }
7296         ;;
7297 esac
7298
7299   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7300   cf_dst_path="${cf_dst_path}${cf_src_path}"
7301 done
7302 IFS="$ac_save_ifs"
7303
7304 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7305 # so we have to check/work around.  We do prefer the result of "eval"...
7306 eval cf_dst_eval="$cf_dst_path"
7307 case "x$cf_dst_eval" in
7308 (xNONE*)
7309         TERMINFO_DIRS=$cf_dst_path
7310         ;;
7311 (*)
7312         TERMINFO_DIRS="$cf_dst_eval"
7313         ;;
7314 esac
7315
7316 echo "$as_me:7316: result: $TERMINFO_DIRS" >&5
7317 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7318 test -n "$TERMINFO_DIRS" &&
7319 cat >>confdefs.h <<EOF
7320 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7321 EOF
7322
7323 echo "$as_me:7323: checking for default terminfo directory" >&5
7324 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7325
7326 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7327 if test "${with_default_terminfo_dir+set}" = set; then
7328   withval="$with_default_terminfo_dir"
7329
7330 else
7331   withval="${TERMINFO:-${datadir}/terminfo}"
7332 fi; if test -n "${datadir}/terminfo" ; then
7333
7334 if test "x$prefix" != xNONE; then
7335         cf_path_syntax="$prefix"
7336 else
7337         cf_path_syntax="$ac_default_prefix"
7338 fi
7339
7340 case ".$withval" in
7341 (.\$\(*\)*|.\'*\'*)
7342         ;;
7343 (..|./*|.\\*)
7344         ;;
7345 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7346         ;;
7347 (.\${*prefix}*|.\${*dir}*)
7348         eval withval="$withval"
7349         case ".$withval" in
7350         (.NONE/*)
7351                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7352                 ;;
7353         esac
7354         ;;
7355 (.no|.NONE/*)
7356         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7357         ;;
7358 (*)
7359         { { echo "$as_me:7359: error: expected a pathname, not \"$withval\"" >&5
7360 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7361    { (exit 1); exit 1; }; }
7362         ;;
7363 esac
7364
7365 fi
7366 eval TERMINFO="$withval"
7367
7368 echo "$as_me:7368: result: $TERMINFO" >&5
7369 echo "${ECHO_T}$TERMINFO" >&6
7370
7371 cat >>confdefs.h <<EOF
7372 #define TERMINFO "$TERMINFO"
7373 EOF
7374
7375 fi
7376
7377 ###     use option --disable-big-core to make tic run on small machines
7378 ###     We need 4Mb, check if we can allocate 50% more than that.
7379 echo "$as_me:7379: checking if big-core option selected" >&5
7380 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7381
7382 # Check whether --enable-big-core or --disable-big-core was given.
7383 if test "${enable_big_core+set}" = set; then
7384   enableval="$enable_big_core"
7385   with_big_core=$enableval
7386 else
7387   if test "$cross_compiling" = yes; then
7388   with_big_core=no
7389 else
7390   cat >conftest.$ac_ext <<_ACEOF
7391 #line 7391 "configure"
7392 #include "confdefs.h"
7393
7394 #include <stdlib.h>
7395 #include <string.h>
7396 int main() {
7397         unsigned long n = 6000000L;
7398         char *s = malloc(n);
7399         if (s != 0)
7400                 s[0] = s[n-1] = 0;
7401         ${cf_cv_main_return:-return}(s == 0);
7402 }
7403 _ACEOF
7404 rm -f conftest$ac_exeext
7405 if { (eval echo "$as_me:7405: \"$ac_link\"") >&5
7406   (eval $ac_link) 2>&5
7407   ac_status=$?
7408   echo "$as_me:7408: \$? = $ac_status" >&5
7409   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7410   { (eval echo "$as_me:7410: \"$ac_try\"") >&5
7411   (eval $ac_try) 2>&5
7412   ac_status=$?
7413   echo "$as_me:7413: \$? = $ac_status" >&5
7414   (exit $ac_status); }; }; then
7415   with_big_core=yes
7416 else
7417   echo "$as_me: program exited with status $ac_status" >&5
7418 echo "$as_me: failed program was:" >&5
7419 cat conftest.$ac_ext >&5
7420 with_big_core=no
7421 fi
7422 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7423 fi
7424 fi;
7425 echo "$as_me:7425: result: $with_big_core" >&5
7426 echo "${ECHO_T}$with_big_core" >&6
7427 test "x$with_big_core" = "xyes" &&
7428 cat >>confdefs.h <<\EOF
7429 #define HAVE_BIG_CORE 1
7430 EOF
7431
7432 ### ISO C only guarantees 512-char strings, we have tables which load faster
7433 ### when constructed using "big" strings.  More than the C compiler, the awk
7434 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7435 echo "$as_me:7435: checking if big-strings option selected" >&5
7436 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7437
7438 # Check whether --enable-big-strings or --disable-big-strings was given.
7439 if test "${enable_big_strings+set}" = set; then
7440   enableval="$enable_big_strings"
7441   with_big_strings=$enableval
7442 else
7443
7444         case x$AWK in
7445         (x)
7446                 eval with_big_strings=no
7447                 ;;
7448         (*)
7449                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7450                         | $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
7451                         eval with_big_strings=yes
7452                 else
7453                         eval with_big_strings=no
7454                 fi
7455                 ;;
7456         esac
7457
7458 fi;
7459 echo "$as_me:7459: result: $with_big_strings" >&5
7460 echo "${ECHO_T}$with_big_strings" >&6
7461
7462 USE_BIG_STRINGS=0
7463 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7464
7465 ###     use option --enable-termcap to compile in the termcap fallback support
7466 echo "$as_me:7466: checking if you want termcap-fallback support" >&5
7467 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7468
7469 # Check whether --enable-termcap or --disable-termcap was given.
7470 if test "${enable_termcap+set}" = set; then
7471   enableval="$enable_termcap"
7472   with_termcap=$enableval
7473 else
7474   with_termcap=no
7475 fi;
7476 echo "$as_me:7476: result: $with_termcap" >&5
7477 echo "${ECHO_T}$with_termcap" >&6
7478
7479 NCURSES_USE_TERMCAP=0
7480 if test "x$with_termcap" != "xyes" ; then
7481         if test "$use_database" = no ; then
7482                 if test -z "$with_fallback" ; then
7483                         { { echo "$as_me:7483: error: You have disabled the database w/o specifying fallbacks" >&5
7484 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7485    { (exit 1); exit 1; }; }
7486                 fi
7487         fi
7488
7489 cat >>confdefs.h <<\EOF
7490 #define PURE_TERMINFO 1
7491 EOF
7492
7493 else
7494
7495         if test "$with_ticlib" != no ; then
7496                 { { echo "$as_me:7496: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7497 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7498    { (exit 1); exit 1; }; }
7499         fi
7500
7501         NCURSES_USE_TERMCAP=1
7502         echo "$as_me:7502: checking for list of termcap files" >&5
7503 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7504
7505 # Check whether --with-termpath or --without-termpath was given.
7506 if test "${with_termpath+set}" = set; then
7507   withval="$with_termpath"
7508
7509 else
7510   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7511 fi;
7512 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7513 cf_dst_path=
7514 for cf_src_path in $withval
7515 do
7516
7517 if test "x$prefix" != xNONE; then
7518         cf_path_syntax="$prefix"
7519 else
7520         cf_path_syntax="$ac_default_prefix"
7521 fi
7522
7523 case ".$cf_src_path" in
7524 (.\$\(*\)*|.\'*\'*)
7525         ;;
7526 (..|./*|.\\*)
7527         ;;
7528 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7529         ;;
7530 (.\${*prefix}*|.\${*dir}*)
7531         eval cf_src_path="$cf_src_path"
7532         case ".$cf_src_path" in
7533         (.NONE/*)
7534                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7535                 ;;
7536         esac
7537         ;;
7538 (.no|.NONE/*)
7539         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7540         ;;
7541 (*)
7542         { { echo "$as_me:7542: error: expected a pathname, not \"$cf_src_path\"" >&5
7543 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7544    { (exit 1); exit 1; }; }
7545         ;;
7546 esac
7547
7548   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7549   cf_dst_path="${cf_dst_path}${cf_src_path}"
7550 done
7551 IFS="$ac_save_ifs"
7552
7553 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7554 # so we have to check/work around.  We do prefer the result of "eval"...
7555 eval cf_dst_eval="$cf_dst_path"
7556 case "x$cf_dst_eval" in
7557 (xNONE*)
7558         TERMPATH=$cf_dst_path
7559         ;;
7560 (*)
7561         TERMPATH="$cf_dst_eval"
7562         ;;
7563 esac
7564
7565         echo "$as_me:7565: result: $TERMPATH" >&5
7566 echo "${ECHO_T}$TERMPATH" >&6
7567         test -n "$TERMPATH" &&
7568 cat >>confdefs.h <<EOF
7569 #define TERMPATH "$TERMPATH"
7570 EOF
7571
7572         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7573         echo "$as_me:7573: checking if fast termcap-loader is needed" >&5
7574 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7575
7576 # Check whether --enable-getcap or --disable-getcap was given.
7577 if test "${enable_getcap+set}" = set; then
7578   enableval="$enable_getcap"
7579   with_getcap=$enableval
7580 else
7581   with_getcap=no
7582 fi;
7583         echo "$as_me:7583: result: $with_getcap" >&5
7584 echo "${ECHO_T}$with_getcap" >&6
7585         test "x$with_getcap" = "xyes" &&
7586 cat >>confdefs.h <<\EOF
7587 #define USE_GETCAP 1
7588 EOF
7589
7590         echo "$as_me:7590: checking if translated termcaps will be cached in ~/.terminfo" >&5
7591 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7592
7593 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7594 if test "${enable_getcap_cache+set}" = set; then
7595   enableval="$enable_getcap_cache"
7596   with_getcap_cache=$enableval
7597 else
7598   with_getcap_cache=no
7599 fi;
7600         echo "$as_me:7600: result: $with_getcap_cache" >&5
7601 echo "${ECHO_T}$with_getcap_cache" >&6
7602         test "x$with_getcap_cache" = "xyes" &&
7603 cat >>confdefs.h <<\EOF
7604 #define USE_GETCAP_CACHE 1
7605 EOF
7606
7607 fi
7608
7609 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7610 echo "$as_me:7610: checking if ~/.terminfo is wanted" >&5
7611 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7612
7613 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7614 if test "${enable_home_terminfo+set}" = set; then
7615   enableval="$enable_home_terminfo"
7616   with_home_terminfo=$enableval
7617 else
7618   with_home_terminfo=yes
7619 fi;
7620 echo "$as_me:7620: result: $with_home_terminfo" >&5
7621 echo "${ECHO_T}$with_home_terminfo" >&6
7622 test "x$with_home_terminfo" = "xyes" &&
7623 cat >>confdefs.h <<\EOF
7624 #define USE_HOME_TERMINFO 1
7625 EOF
7626
7627 echo "$as_me:7627: checking if you want to use restricted environment when running as root" >&5
7628 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7629
7630 # Check whether --enable-root-environ or --disable-root-environ was given.
7631 if test "${enable_root_environ+set}" = set; then
7632   enableval="$enable_root_environ"
7633   with_root_environ=$enableval
7634 else
7635   with_root_environ=yes
7636 fi;
7637 echo "$as_me:7637: result: $with_root_environ" >&5
7638 echo "${ECHO_T}$with_root_environ" >&6
7639 test "x$with_root_environ" = xyes &&
7640 cat >>confdefs.h <<\EOF
7641 #define USE_ROOT_ENVIRON 1
7642 EOF
7643
7644 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7645 ###   to reduce storage requirements for the terminfo database.
7646
7647 for ac_header in \
7648 unistd.h \
7649
7650 do
7651 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7652 echo "$as_me:7652: checking for $ac_header" >&5
7653 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7654 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7655   echo $ECHO_N "(cached) $ECHO_C" >&6
7656 else
7657   cat >conftest.$ac_ext <<_ACEOF
7658 #line 7658 "configure"
7659 #include "confdefs.h"
7660 #include <$ac_header>
7661 _ACEOF
7662 if { (eval echo "$as_me:7662: \"$ac_cpp conftest.$ac_ext\"") >&5
7663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7664   ac_status=$?
7665   egrep -v '^ *\+' conftest.er1 >conftest.err
7666   rm -f conftest.er1
7667   cat conftest.err >&5
7668   echo "$as_me:7668: \$? = $ac_status" >&5
7669   (exit $ac_status); } >/dev/null; then
7670   if test -s conftest.err; then
7671     ac_cpp_err=$ac_c_preproc_warn_flag
7672   else
7673     ac_cpp_err=
7674   fi
7675 else
7676   ac_cpp_err=yes
7677 fi
7678 if test -z "$ac_cpp_err"; then
7679   eval "$as_ac_Header=yes"
7680 else
7681   echo "$as_me: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   eval "$as_ac_Header=no"
7684 fi
7685 rm -f conftest.err conftest.$ac_ext
7686 fi
7687 echo "$as_me:7687: result: `eval echo '${'$as_ac_Header'}'`" >&5
7688 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7689 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7690   cat >>confdefs.h <<EOF
7691 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7692 EOF
7693
7694 fi
7695 done
7696
7697 for ac_func in \
7698         remove \
7699         unlink
7700 do
7701 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7702 echo "$as_me:7702: checking for $ac_func" >&5
7703 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7704 if eval "test \"\${$as_ac_var+set}\" = set"; then
7705   echo $ECHO_N "(cached) $ECHO_C" >&6
7706 else
7707   cat >conftest.$ac_ext <<_ACEOF
7708 #line 7708 "configure"
7709 #include "confdefs.h"
7710 /* System header to define __stub macros and hopefully few prototypes,
7711     which can conflict with char $ac_func (); below.  */
7712 #include <assert.h>
7713 /* Override any gcc2 internal prototype to avoid an error.  */
7714 #ifdef __cplusplus
7715 extern "C"
7716 #endif
7717 /* We use char because int might match the return type of a gcc2
7718    builtin and then its argument prototype would still apply.  */
7719 char $ac_func ();
7720 char (*f) ();
7721
7722 int
7723 main (void)
7724 {
7725 /* The GNU C library defines this for functions which it implements
7726     to always fail with ENOSYS.  Some functions are actually named
7727     something starting with __ and the normal name is an alias.  */
7728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7729 choke me
7730 #else
7731 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7732 #endif
7733
7734   ;
7735   return 0;
7736 }
7737 _ACEOF
7738 rm -f conftest.$ac_objext conftest$ac_exeext
7739 if { (eval echo "$as_me:7739: \"$ac_link\"") >&5
7740   (eval $ac_link) 2>&5
7741   ac_status=$?
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); } &&
7744          { ac_try='test -s conftest$ac_exeext'
7745   { (eval echo "$as_me:7745: \"$ac_try\"") >&5
7746   (eval $ac_try) 2>&5
7747   ac_status=$?
7748   echo "$as_me:7748: \$? = $ac_status" >&5
7749   (exit $ac_status); }; }; then
7750   eval "$as_ac_var=yes"
7751 else
7752   echo "$as_me: failed program was:" >&5
7753 cat conftest.$ac_ext >&5
7754 eval "$as_ac_var=no"
7755 fi
7756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7757 fi
7758 echo "$as_me:7758: result: `eval echo '${'$as_ac_var'}'`" >&5
7759 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7760 if test `eval echo '${'$as_ac_var'}'` = yes; then
7761   cat >>confdefs.h <<EOF
7762 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7763 EOF
7764
7765 fi
7766 done
7767
7768 if test "$cross_compiling" = yes ; then
7769
7770 for ac_func in \
7771                 link \
7772                 symlink
7773 do
7774 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7775 echo "$as_me:7775: checking for $ac_func" >&5
7776 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7777 if eval "test \"\${$as_ac_var+set}\" = set"; then
7778   echo $ECHO_N "(cached) $ECHO_C" >&6
7779 else
7780   cat >conftest.$ac_ext <<_ACEOF
7781 #line 7781 "configure"
7782 #include "confdefs.h"
7783 /* System header to define __stub macros and hopefully few prototypes,
7784     which can conflict with char $ac_func (); below.  */
7785 #include <assert.h>
7786 /* Override any gcc2 internal prototype to avoid an error.  */
7787 #ifdef __cplusplus
7788 extern "C"
7789 #endif
7790 /* We use char because int might match the return type of a gcc2
7791    builtin and then its argument prototype would still apply.  */
7792 char $ac_func ();
7793 char (*f) ();
7794
7795 int
7796 main (void)
7797 {
7798 /* The GNU C library defines this for functions which it implements
7799     to always fail with ENOSYS.  Some functions are actually named
7800     something starting with __ and the normal name is an alias.  */
7801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7802 choke me
7803 #else
7804 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7805 #endif
7806
7807   ;
7808   return 0;
7809 }
7810 _ACEOF
7811 rm -f conftest.$ac_objext conftest$ac_exeext
7812 if { (eval echo "$as_me:7812: \"$ac_link\"") >&5
7813   (eval $ac_link) 2>&5
7814   ac_status=$?
7815   echo "$as_me:7815: \$? = $ac_status" >&5
7816   (exit $ac_status); } &&
7817          { ac_try='test -s conftest$ac_exeext'
7818   { (eval echo "$as_me:7818: \"$ac_try\"") >&5
7819   (eval $ac_try) 2>&5
7820   ac_status=$?
7821   echo "$as_me:7821: \$? = $ac_status" >&5
7822   (exit $ac_status); }; }; then
7823   eval "$as_ac_var=yes"
7824 else
7825   echo "$as_me: failed program was:" >&5
7826 cat conftest.$ac_ext >&5
7827 eval "$as_ac_var=no"
7828 fi
7829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7830 fi
7831 echo "$as_me:7831: result: `eval echo '${'$as_ac_var'}'`" >&5
7832 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7833 if test `eval echo '${'$as_ac_var'}'` = yes; then
7834   cat >>confdefs.h <<EOF
7835 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7836 EOF
7837
7838 fi
7839 done
7840
7841 else
7842         echo "$as_me:7842: checking if link/symlink functions work" >&5
7843 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7844 if test "${cf_cv_link_funcs+set}" = set; then
7845   echo $ECHO_N "(cached) $ECHO_C" >&6
7846 else
7847
7848                 cf_cv_link_funcs=
7849                 for cf_func in link symlink ; do
7850                         if test "$cross_compiling" = yes; then
7851
7852                         eval 'ac_cv_func_'$cf_func'=error'
7853 else
7854   cat >conftest.$ac_ext <<_ACEOF
7855 #line 7855 "configure"
7856 #include "confdefs.h"
7857
7858 #include <sys/types.h>
7859 #include <sys/stat.h>
7860 #ifdef HAVE_UNISTD_H
7861 #include <unistd.h>
7862 #endif
7863 int main(void)
7864 {
7865         int fail = 0;
7866         char *src = "config.log";
7867         char *dst = "conftest.chk";
7868         struct stat src_sb;
7869         struct stat dst_sb;
7870
7871         stat(src, &src_sb);
7872         fail = ($cf_func("config.log", "conftest.chk") < 0)
7873             || (stat(dst, &dst_sb) < 0)
7874             || (dst_sb.st_mtime != src_sb.st_mtime);
7875 #ifdef HAVE_UNLINK
7876         unlink(dst);
7877 #else
7878         remove(dst);
7879 #endif
7880         ${cf_cv_main_return:-return} (fail);
7881 }
7882
7883 _ACEOF
7884 rm -f conftest$ac_exeext
7885 if { (eval echo "$as_me:7885: \"$ac_link\"") >&5
7886   (eval $ac_link) 2>&5
7887   ac_status=$?
7888   echo "$as_me:7888: \$? = $ac_status" >&5
7889   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7890   { (eval echo "$as_me:7890: \"$ac_try\"") >&5
7891   (eval $ac_try) 2>&5
7892   ac_status=$?
7893   echo "$as_me:7893: \$? = $ac_status" >&5
7894   (exit $ac_status); }; }; then
7895
7896                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7897                         eval 'ac_cv_func_'$cf_func'=yes'
7898 else
7899   echo "$as_me: program exited with status $ac_status" >&5
7900 echo "$as_me: failed program was:" >&5
7901 cat conftest.$ac_ext >&5
7902
7903                         eval 'ac_cv_func_'$cf_func'=no'
7904 fi
7905 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7906 fi
7907                 done
7908                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7909
7910 fi
7911 echo "$as_me:7911: result: $cf_cv_link_funcs" >&5
7912 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7913         test "$ac_cv_func_link"    = yes &&
7914 cat >>confdefs.h <<\EOF
7915 #define HAVE_LINK 1
7916 EOF
7917
7918         test "$ac_cv_func_symlink" = yes &&
7919 cat >>confdefs.h <<\EOF
7920 #define HAVE_SYMLINK 1
7921 EOF
7922
7923 fi
7924
7925 with_links=no
7926 with_symlinks=no
7927
7928 # soft links (symbolic links) are useful for some systems where hard links do
7929 # not work, or to make it simpler to copy terminfo trees around.
7930 if test "x$ac_cv_func_symlink" = xyes ; then
7931         echo "$as_me:7931: checking if tic should use symbolic links" >&5
7932 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7933
7934 # Check whether --enable-symlinks or --disable-symlinks was given.
7935 if test "${enable_symlinks+set}" = set; then
7936   enableval="$enable_symlinks"
7937   with_symlinks=$enableval
7938 else
7939   with_symlinks=no
7940 fi;
7941         echo "$as_me:7941: result: $with_symlinks" >&5
7942 echo "${ECHO_T}$with_symlinks" >&6
7943 fi
7944
7945 # If we have hard links and did not choose to use soft links instead, there is
7946 # no reason to make this choice optional - use the hard links.
7947 if test "$with_symlinks" = no ; then
7948         echo "$as_me:7948: checking if tic should use hard links" >&5
7949 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7950         if test "x$ac_cv_func_link" = xyes ; then
7951                 with_links=yes
7952         else
7953                 with_links=no
7954         fi
7955         echo "$as_me:7955: result: $with_links" >&5
7956 echo "${ECHO_T}$with_links" >&6
7957 fi
7958
7959 test "x$with_links" = xyes &&
7960 cat >>confdefs.h <<\EOF
7961 #define USE_LINKS 1
7962 EOF
7963
7964 test "x$with_symlinks" = xyes &&
7965 cat >>confdefs.h <<\EOF
7966 #define USE_SYMLINKS 1
7967 EOF
7968
7969 ###   use option --enable-broken-linker to force on use of broken-linker support
7970 echo "$as_me:7970: checking if you want broken-linker support code" >&5
7971 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7972
7973 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7974 if test "${enable_broken_linker+set}" = set; then
7975   enableval="$enable_broken_linker"
7976   with_broken_linker=$enableval
7977 else
7978   with_broken_linker=${BROKEN_LINKER:-no}
7979 fi;
7980 echo "$as_me:7980: result: $with_broken_linker" >&5
7981 echo "${ECHO_T}$with_broken_linker" >&6
7982
7983 BROKEN_LINKER=0
7984 if test "x$with_broken_linker" = xyes ; then
7985
7986 cat >>confdefs.h <<\EOF
7987 #define BROKEN_LINKER 1
7988 EOF
7989
7990         BROKEN_LINKER=1
7991 elif test "$DFT_LWR_MODEL" = shared ; then
7992         case $cf_cv_system_name in
7993         (cygwin*)
7994
7995 cat >>confdefs.h <<\EOF
7996 #define BROKEN_LINKER 1
7997 EOF
7998
7999                 BROKEN_LINKER=1
8000                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8001
8002 echo "${as_me:-configure}:8002: testing cygwin linker is broken anyway ..." 1>&5
8003
8004                 ;;
8005         esac
8006 fi
8007
8008 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8009 echo "$as_me:8009: checking if tputs should process BSD-style prefix padding" >&5
8010 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8011
8012 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8013 if test "${enable_bsdpad+set}" = set; then
8014   enableval="$enable_bsdpad"
8015   with_bsdpad=$enableval
8016 else
8017   with_bsdpad=no
8018 fi;
8019 echo "$as_me:8019: result: $with_bsdpad" >&5
8020 echo "${ECHO_T}$with_bsdpad" >&6
8021 test "x$with_bsdpad" = xyes &&
8022 cat >>confdefs.h <<\EOF
8023 #define BSD_TPUTS 1
8024 EOF
8025
8026 ###   use option --enable-widec to turn on use of wide-character support
8027 NCURSES_CH_T=chtype
8028 NCURSES_LIBUTF8=0
8029
8030 NEED_WCHAR_H=0
8031 NCURSES_MBSTATE_T=0
8032 NCURSES_WCHAR_T=0
8033 NCURSES_WINT_T=0
8034
8035 # Check to define _XOPEN_SOURCE "automatically"
8036 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8037
8038 cf_XOPEN_SOURCE=500
8039 cf_POSIX_C_SOURCE=199506L
8040 cf_xopen_source=
8041
8042 case $host_os in
8043 (aix[4-7]*)
8044         cf_xopen_source="-D_ALL_SOURCE"
8045         ;;
8046 (msys)
8047         cf_XOPEN_SOURCE=600
8048         ;;
8049 (darwin[0-8].*)
8050         cf_xopen_source="-D_APPLE_C_SOURCE"
8051         ;;
8052 (darwin*)
8053         cf_xopen_source="-D_DARWIN_C_SOURCE"
8054         cf_XOPEN_SOURCE=
8055         ;;
8056 (freebsd*|dragonfly*)
8057         # 5.x headers associate
8058         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8059         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8060         cf_POSIX_C_SOURCE=200112L
8061         cf_XOPEN_SOURCE=600
8062         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8063         ;;
8064 (hpux11*)
8065         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8066         ;;
8067 (hpux*)
8068         cf_xopen_source="-D_HPUX_SOURCE"
8069         ;;
8070 (irix[56].*)
8071         cf_xopen_source="-D_SGI_SOURCE"
8072         cf_XOPEN_SOURCE=
8073         ;;
8074 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8075
8076 echo "$as_me:8076: checking if we must define _GNU_SOURCE" >&5
8077 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8078 if test "${cf_cv_gnu_source+set}" = set; then
8079   echo $ECHO_N "(cached) $ECHO_C" >&6
8080 else
8081
8082 cat >conftest.$ac_ext <<_ACEOF
8083 #line 8083 "configure"
8084 #include "confdefs.h"
8085 #include <sys/types.h>
8086 int
8087 main (void)
8088 {
8089
8090 #ifndef _XOPEN_SOURCE
8091 make an error
8092 #endif
8093   ;
8094   return 0;
8095 }
8096 _ACEOF
8097 rm -f conftest.$ac_objext
8098 if { (eval echo "$as_me:8098: \"$ac_compile\"") >&5
8099   (eval $ac_compile) 2>&5
8100   ac_status=$?
8101   echo "$as_me:8101: \$? = $ac_status" >&5
8102   (exit $ac_status); } &&
8103          { ac_try='test -s conftest.$ac_objext'
8104   { (eval echo "$as_me:8104: \"$ac_try\"") >&5
8105   (eval $ac_try) 2>&5
8106   ac_status=$?
8107   echo "$as_me:8107: \$? = $ac_status" >&5
8108   (exit $ac_status); }; }; then
8109   cf_cv_gnu_source=no
8110 else
8111   echo "$as_me: failed program was:" >&5
8112 cat conftest.$ac_ext >&5
8113 cf_save="$CPPFLAGS"
8114          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8115          cat >conftest.$ac_ext <<_ACEOF
8116 #line 8116 "configure"
8117 #include "confdefs.h"
8118 #include <sys/types.h>
8119 int
8120 main (void)
8121 {
8122
8123 #ifdef _XOPEN_SOURCE
8124 make an error
8125 #endif
8126   ;
8127   return 0;
8128 }
8129 _ACEOF
8130 rm -f conftest.$ac_objext
8131 if { (eval echo "$as_me:8131: \"$ac_compile\"") >&5
8132   (eval $ac_compile) 2>&5
8133   ac_status=$?
8134   echo "$as_me:8134: \$? = $ac_status" >&5
8135   (exit $ac_status); } &&
8136          { ac_try='test -s conftest.$ac_objext'
8137   { (eval echo "$as_me:8137: \"$ac_try\"") >&5
8138   (eval $ac_try) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); }; }; then
8142   cf_cv_gnu_source=no
8143 else
8144   echo "$as_me: failed program was:" >&5
8145 cat conftest.$ac_ext >&5
8146 cf_cv_gnu_source=yes
8147 fi
8148 rm -f conftest.$ac_objext conftest.$ac_ext
8149         CPPFLAGS="$cf_save"
8150
8151 fi
8152 rm -f conftest.$ac_objext conftest.$ac_ext
8153
8154 fi
8155 echo "$as_me:8155: result: $cf_cv_gnu_source" >&5
8156 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8157
8158 if test "$cf_cv_gnu_source" = yes
8159 then
8160 echo "$as_me:8160: checking if we should also define _DEFAULT_SOURCE" >&5
8161 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8162 if test "${cf_cv_default_source+set}" = set; then
8163   echo $ECHO_N "(cached) $ECHO_C" >&6
8164 else
8165
8166 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8167         cat >conftest.$ac_ext <<_ACEOF
8168 #line 8168 "configure"
8169 #include "confdefs.h"
8170 #include <sys/types.h>
8171 int
8172 main (void)
8173 {
8174
8175 #ifdef _DEFAULT_SOURCE
8176 make an error
8177 #endif
8178   ;
8179   return 0;
8180 }
8181 _ACEOF
8182 rm -f conftest.$ac_objext
8183 if { (eval echo "$as_me:8183: \"$ac_compile\"") >&5
8184   (eval $ac_compile) 2>&5
8185   ac_status=$?
8186   echo "$as_me:8186: \$? = $ac_status" >&5
8187   (exit $ac_status); } &&
8188          { ac_try='test -s conftest.$ac_objext'
8189   { (eval echo "$as_me:8189: \"$ac_try\"") >&5
8190   (eval $ac_try) 2>&5
8191   ac_status=$?
8192   echo "$as_me:8192: \$? = $ac_status" >&5
8193   (exit $ac_status); }; }; then
8194   cf_cv_default_source=no
8195 else
8196   echo "$as_me: failed program was:" >&5
8197 cat conftest.$ac_ext >&5
8198 cf_cv_default_source=yes
8199 fi
8200 rm -f conftest.$ac_objext conftest.$ac_ext
8201
8202 fi
8203 echo "$as_me:8203: result: $cf_cv_default_source" >&5
8204 echo "${ECHO_T}$cf_cv_default_source" >&6
8205 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8206 fi
8207
8208         ;;
8209 (minix*)
8210         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8211         ;;
8212 (mirbsd*)
8213         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8214         cf_XOPEN_SOURCE=
8215
8216 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8217
8218 cf_save_CFLAGS="$CFLAGS"
8219 cf_save_CPPFLAGS="$CPPFLAGS"
8220
8221 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8222         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8223                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8224
8225 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8226         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8227                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8228
8229 echo "$as_me:8229: checking if we should define _POSIX_C_SOURCE" >&5
8230 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8231 if test "${cf_cv_posix_c_source+set}" = set; then
8232   echo $ECHO_N "(cached) $ECHO_C" >&6
8233 else
8234
8235 echo "${as_me:-configure}:8235: testing if the symbol is already defined go no further ..." 1>&5
8236
8237         cat >conftest.$ac_ext <<_ACEOF
8238 #line 8238 "configure"
8239 #include "confdefs.h"
8240 #include <sys/types.h>
8241 int
8242 main (void)
8243 {
8244
8245 #ifndef _POSIX_C_SOURCE
8246 make an error
8247 #endif
8248   ;
8249   return 0;
8250 }
8251 _ACEOF
8252 rm -f conftest.$ac_objext
8253 if { (eval echo "$as_me:8253: \"$ac_compile\"") >&5
8254   (eval $ac_compile) 2>&5
8255   ac_status=$?
8256   echo "$as_me:8256: \$? = $ac_status" >&5
8257   (exit $ac_status); } &&
8258          { ac_try='test -s conftest.$ac_objext'
8259   { (eval echo "$as_me:8259: \"$ac_try\"") >&5
8260   (eval $ac_try) 2>&5
8261   ac_status=$?
8262   echo "$as_me:8262: \$? = $ac_status" >&5
8263   (exit $ac_status); }; }; then
8264   cf_cv_posix_c_source=no
8265 else
8266   echo "$as_me: failed program was:" >&5
8267 cat conftest.$ac_ext >&5
8268 cf_want_posix_source=no
8269          case .$cf_POSIX_C_SOURCE in
8270          (.[12]??*)
8271                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8272                 ;;
8273          (.2)
8274                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8275                 cf_want_posix_source=yes
8276                 ;;
8277          (.*)
8278                 cf_want_posix_source=yes
8279                 ;;
8280          esac
8281          if test "$cf_want_posix_source" = yes ; then
8282                 cat >conftest.$ac_ext <<_ACEOF
8283 #line 8283 "configure"
8284 #include "confdefs.h"
8285 #include <sys/types.h>
8286 int
8287 main (void)
8288 {
8289
8290 #ifdef _POSIX_SOURCE
8291 make an error
8292 #endif
8293   ;
8294   return 0;
8295 }
8296 _ACEOF
8297 rm -f conftest.$ac_objext
8298 if { (eval echo "$as_me:8298: \"$ac_compile\"") >&5
8299   (eval $ac_compile) 2>&5
8300   ac_status=$?
8301   echo "$as_me:8301: \$? = $ac_status" >&5
8302   (exit $ac_status); } &&
8303          { ac_try='test -s conftest.$ac_objext'
8304   { (eval echo "$as_me:8304: \"$ac_try\"") >&5
8305   (eval $ac_try) 2>&5
8306   ac_status=$?
8307   echo "$as_me:8307: \$? = $ac_status" >&5
8308   (exit $ac_status); }; }; then
8309   :
8310 else
8311   echo "$as_me: failed program was:" >&5
8312 cat conftest.$ac_ext >&5
8313 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8314 fi
8315 rm -f conftest.$ac_objext conftest.$ac_ext
8316          fi
8317
8318 echo "${as_me:-configure}:8318: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8319
8320          CFLAGS="$cf_trim_CFLAGS"
8321          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8322
8323 echo "${as_me:-configure}:8323: testing if the second compile does not leave our definition intact error ..." 1>&5
8324
8325          cat >conftest.$ac_ext <<_ACEOF
8326 #line 8326 "configure"
8327 #include "confdefs.h"
8328 #include <sys/types.h>
8329 int
8330 main (void)
8331 {
8332
8333 #ifndef _POSIX_C_SOURCE
8334 make an error
8335 #endif
8336   ;
8337   return 0;
8338 }
8339 _ACEOF
8340 rm -f conftest.$ac_objext
8341 if { (eval echo "$as_me:8341: \"$ac_compile\"") >&5
8342   (eval $ac_compile) 2>&5
8343   ac_status=$?
8344   echo "$as_me:8344: \$? = $ac_status" >&5
8345   (exit $ac_status); } &&
8346          { ac_try='test -s conftest.$ac_objext'
8347   { (eval echo "$as_me:8347: \"$ac_try\"") >&5
8348   (eval $ac_try) 2>&5
8349   ac_status=$?
8350   echo "$as_me:8350: \$? = $ac_status" >&5
8351   (exit $ac_status); }; }; then
8352   :
8353 else
8354   echo "$as_me: failed program was:" >&5
8355 cat conftest.$ac_ext >&5
8356 cf_cv_posix_c_source=no
8357 fi
8358 rm -f conftest.$ac_objext conftest.$ac_ext
8359          CFLAGS="$cf_save_CFLAGS"
8360          CPPFLAGS="$cf_save_CPPFLAGS"
8361
8362 fi
8363 rm -f conftest.$ac_objext conftest.$ac_ext
8364
8365 fi
8366 echo "$as_me:8366: result: $cf_cv_posix_c_source" >&5
8367 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8368
8369 if test "$cf_cv_posix_c_source" != no ; then
8370         CFLAGS="$cf_trim_CFLAGS"
8371         CPPFLAGS="$cf_trim_CPPFLAGS"
8372
8373 cf_fix_cppflags=no
8374 cf_new_cflags=
8375 cf_new_cppflags=
8376 cf_new_extra_cppflags=
8377
8378 for cf_add_cflags in $cf_cv_posix_c_source
8379 do
8380 case $cf_fix_cppflags in
8381 (no)
8382         case $cf_add_cflags in
8383         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8384                 case $cf_add_cflags in
8385                 (-D*)
8386                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8387
8388                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8389                                 && test -z "${cf_tst_cflags}" \
8390                                 && cf_fix_cppflags=yes
8391
8392                         if test $cf_fix_cppflags = yes ; then
8393
8394         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8395         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8396
8397                                 continue
8398                         elif test "${cf_tst_cflags}" = "\"'" ; then
8399
8400         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8401         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8402
8403                                 continue
8404                         fi
8405                         ;;
8406                 esac
8407                 case "$CPPFLAGS" in
8408                 (*$cf_add_cflags)
8409                         ;;
8410                 (*)
8411                         case $cf_add_cflags in
8412                         (-D*)
8413                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8414
8415 CPPFLAGS=`echo "$CPPFLAGS" | \
8416         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8417                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8418
8419                                 ;;
8420                         esac
8421
8422         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8423         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8424
8425                         ;;
8426                 esac
8427                 ;;
8428         (*)
8429
8430         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8431         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8432
8433                 ;;
8434         esac
8435         ;;
8436 (yes)
8437
8438         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8439         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8440
8441         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8442
8443         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8444                 && test -z "${cf_tst_cflags}" \
8445                 && cf_fix_cppflags=no
8446         ;;
8447 esac
8448 done
8449
8450 if test -n "$cf_new_cflags" ; then
8451
8452         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8453         CFLAGS="${CFLAGS}$cf_new_cflags"
8454
8455 fi
8456
8457 if test -n "$cf_new_cppflags" ; then
8458
8459         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8460         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8461
8462 fi
8463
8464 if test -n "$cf_new_extra_cppflags" ; then
8465
8466         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8467         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8468
8469 fi
8470
8471 fi
8472
8473         ;;
8474 (netbsd*)
8475         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8476         ;;
8477 (openbsd[4-9]*)
8478         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8479         cf_xopen_source="-D_BSD_SOURCE"
8480         cf_XOPEN_SOURCE=600
8481         ;;
8482 (openbsd*)
8483         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8484         ;;
8485 (osf[45]*)
8486         cf_xopen_source="-D_OSF_SOURCE"
8487         ;;
8488 (nto-qnx*)
8489         cf_xopen_source="-D_QNX_SOURCE"
8490         ;;
8491 (sco*)
8492         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8493         ;;
8494 (solaris2.*)
8495         cf_xopen_source="-D__EXTENSIONS__"
8496         cf_cv_xopen_source=broken
8497         ;;
8498 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8499         cf_XOPEN_SOURCE=
8500         cf_POSIX_C_SOURCE=
8501         ;;
8502 (*)
8503
8504 echo "$as_me:8504: checking if we should define _XOPEN_SOURCE" >&5
8505 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8506 if test "${cf_cv_xopen_source+set}" = set; then
8507   echo $ECHO_N "(cached) $ECHO_C" >&6
8508 else
8509
8510         cat >conftest.$ac_ext <<_ACEOF
8511 #line 8511 "configure"
8512 #include "confdefs.h"
8513
8514 #include <stdlib.h>
8515 #include <string.h>
8516 #include <sys/types.h>
8517
8518 int
8519 main (void)
8520 {
8521
8522 #ifndef _XOPEN_SOURCE
8523 make an error
8524 #endif
8525   ;
8526   return 0;
8527 }
8528 _ACEOF
8529 rm -f conftest.$ac_objext
8530 if { (eval echo "$as_me:8530: \"$ac_compile\"") >&5
8531   (eval $ac_compile) 2>&5
8532   ac_status=$?
8533   echo "$as_me:8533: \$? = $ac_status" >&5
8534   (exit $ac_status); } &&
8535          { ac_try='test -s conftest.$ac_objext'
8536   { (eval echo "$as_me:8536: \"$ac_try\"") >&5
8537   (eval $ac_try) 2>&5
8538   ac_status=$?
8539   echo "$as_me:8539: \$? = $ac_status" >&5
8540   (exit $ac_status); }; }; then
8541   cf_cv_xopen_source=no
8542 else
8543   echo "$as_me: failed program was:" >&5
8544 cat conftest.$ac_ext >&5
8545 cf_save="$CPPFLAGS"
8546          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8547          cat >conftest.$ac_ext <<_ACEOF
8548 #line 8548 "configure"
8549 #include "confdefs.h"
8550
8551 #include <stdlib.h>
8552 #include <string.h>
8553 #include <sys/types.h>
8554
8555 int
8556 main (void)
8557 {
8558
8559 #ifdef _XOPEN_SOURCE
8560 make an error
8561 #endif
8562   ;
8563   return 0;
8564 }
8565 _ACEOF
8566 rm -f conftest.$ac_objext
8567 if { (eval echo "$as_me:8567: \"$ac_compile\"") >&5
8568   (eval $ac_compile) 2>&5
8569   ac_status=$?
8570   echo "$as_me:8570: \$? = $ac_status" >&5
8571   (exit $ac_status); } &&
8572          { ac_try='test -s conftest.$ac_objext'
8573   { (eval echo "$as_me:8573: \"$ac_try\"") >&5
8574   (eval $ac_try) 2>&5
8575   ac_status=$?
8576   echo "$as_me:8576: \$? = $ac_status" >&5
8577   (exit $ac_status); }; }; then
8578   cf_cv_xopen_source=no
8579 else
8580   echo "$as_me: failed program was:" >&5
8581 cat conftest.$ac_ext >&5
8582 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8583 fi
8584 rm -f conftest.$ac_objext conftest.$ac_ext
8585         CPPFLAGS="$cf_save"
8586
8587 fi
8588 rm -f conftest.$ac_objext conftest.$ac_ext
8589
8590 fi
8591 echo "$as_me:8591: result: $cf_cv_xopen_source" >&5
8592 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8593
8594 if test "$cf_cv_xopen_source" != no ; then
8595
8596 CFLAGS=`echo "$CFLAGS" | \
8597         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8598                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8599
8600 CPPFLAGS=`echo "$CPPFLAGS" | \
8601         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8602                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8603
8604         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8605
8606 cf_fix_cppflags=no
8607 cf_new_cflags=
8608 cf_new_cppflags=
8609 cf_new_extra_cppflags=
8610
8611 for cf_add_cflags in $cf_temp_xopen_source
8612 do
8613 case $cf_fix_cppflags in
8614 (no)
8615         case $cf_add_cflags in
8616         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8617                 case $cf_add_cflags in
8618                 (-D*)
8619                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8620
8621                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8622                                 && test -z "${cf_tst_cflags}" \
8623                                 && cf_fix_cppflags=yes
8624
8625                         if test $cf_fix_cppflags = yes ; then
8626
8627         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8628         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8629
8630                                 continue
8631                         elif test "${cf_tst_cflags}" = "\"'" ; then
8632
8633         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8634         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8635
8636                                 continue
8637                         fi
8638                         ;;
8639                 esac
8640                 case "$CPPFLAGS" in
8641                 (*$cf_add_cflags)
8642                         ;;
8643                 (*)
8644                         case $cf_add_cflags in
8645                         (-D*)
8646                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8647
8648 CPPFLAGS=`echo "$CPPFLAGS" | \
8649         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8650                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8651
8652                                 ;;
8653                         esac
8654
8655         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8656         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8657
8658                         ;;
8659                 esac
8660                 ;;
8661         (*)
8662
8663         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8664         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8665
8666                 ;;
8667         esac
8668         ;;
8669 (yes)
8670
8671         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8672         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8673
8674         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8675
8676         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8677                 && test -z "${cf_tst_cflags}" \
8678                 && cf_fix_cppflags=no
8679         ;;
8680 esac
8681 done
8682
8683 if test -n "$cf_new_cflags" ; then
8684
8685         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8686         CFLAGS="${CFLAGS}$cf_new_cflags"
8687
8688 fi
8689
8690 if test -n "$cf_new_cppflags" ; then
8691
8692         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8693         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8694
8695 fi
8696
8697 if test -n "$cf_new_extra_cppflags" ; then
8698
8699         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8700         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8701
8702 fi
8703
8704 fi
8705
8706 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8707
8708 cf_save_CFLAGS="$CFLAGS"
8709 cf_save_CPPFLAGS="$CPPFLAGS"
8710
8711 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8712         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8713                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8714
8715 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8716         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8717                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8718
8719 echo "$as_me:8719: checking if we should define _POSIX_C_SOURCE" >&5
8720 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8721 if test "${cf_cv_posix_c_source+set}" = set; then
8722   echo $ECHO_N "(cached) $ECHO_C" >&6
8723 else
8724
8725 echo "${as_me:-configure}:8725: testing if the symbol is already defined go no further ..." 1>&5
8726
8727         cat >conftest.$ac_ext <<_ACEOF
8728 #line 8728 "configure"
8729 #include "confdefs.h"
8730 #include <sys/types.h>
8731 int
8732 main (void)
8733 {
8734
8735 #ifndef _POSIX_C_SOURCE
8736 make an error
8737 #endif
8738   ;
8739   return 0;
8740 }
8741 _ACEOF
8742 rm -f conftest.$ac_objext
8743 if { (eval echo "$as_me:8743: \"$ac_compile\"") >&5
8744   (eval $ac_compile) 2>&5
8745   ac_status=$?
8746   echo "$as_me:8746: \$? = $ac_status" >&5
8747   (exit $ac_status); } &&
8748          { ac_try='test -s conftest.$ac_objext'
8749   { (eval echo "$as_me:8749: \"$ac_try\"") >&5
8750   (eval $ac_try) 2>&5
8751   ac_status=$?
8752   echo "$as_me:8752: \$? = $ac_status" >&5
8753   (exit $ac_status); }; }; then
8754   cf_cv_posix_c_source=no
8755 else
8756   echo "$as_me: failed program was:" >&5
8757 cat conftest.$ac_ext >&5
8758 cf_want_posix_source=no
8759          case .$cf_POSIX_C_SOURCE in
8760          (.[12]??*)
8761                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8762                 ;;
8763          (.2)
8764                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8765                 cf_want_posix_source=yes
8766                 ;;
8767          (.*)
8768                 cf_want_posix_source=yes
8769                 ;;
8770          esac
8771          if test "$cf_want_posix_source" = yes ; then
8772                 cat >conftest.$ac_ext <<_ACEOF
8773 #line 8773 "configure"
8774 #include "confdefs.h"
8775 #include <sys/types.h>
8776 int
8777 main (void)
8778 {
8779
8780 #ifdef _POSIX_SOURCE
8781 make an error
8782 #endif
8783   ;
8784   return 0;
8785 }
8786 _ACEOF
8787 rm -f conftest.$ac_objext
8788 if { (eval echo "$as_me:8788: \"$ac_compile\"") >&5
8789   (eval $ac_compile) 2>&5
8790   ac_status=$?
8791   echo "$as_me:8791: \$? = $ac_status" >&5
8792   (exit $ac_status); } &&
8793          { ac_try='test -s conftest.$ac_objext'
8794   { (eval echo "$as_me:8794: \"$ac_try\"") >&5
8795   (eval $ac_try) 2>&5
8796   ac_status=$?
8797   echo "$as_me:8797: \$? = $ac_status" >&5
8798   (exit $ac_status); }; }; then
8799   :
8800 else
8801   echo "$as_me: failed program was:" >&5
8802 cat conftest.$ac_ext >&5
8803 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8804 fi
8805 rm -f conftest.$ac_objext conftest.$ac_ext
8806          fi
8807
8808 echo "${as_me:-configure}:8808: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8809
8810          CFLAGS="$cf_trim_CFLAGS"
8811          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8812
8813 echo "${as_me:-configure}:8813: testing if the second compile does not leave our definition intact error ..." 1>&5
8814
8815          cat >conftest.$ac_ext <<_ACEOF
8816 #line 8816 "configure"
8817 #include "confdefs.h"
8818 #include <sys/types.h>
8819 int
8820 main (void)
8821 {
8822
8823 #ifndef _POSIX_C_SOURCE
8824 make an error
8825 #endif
8826   ;
8827   return 0;
8828 }
8829 _ACEOF
8830 rm -f conftest.$ac_objext
8831 if { (eval echo "$as_me:8831: \"$ac_compile\"") >&5
8832   (eval $ac_compile) 2>&5
8833   ac_status=$?
8834   echo "$as_me:8834: \$? = $ac_status" >&5
8835   (exit $ac_status); } &&
8836          { ac_try='test -s conftest.$ac_objext'
8837   { (eval echo "$as_me:8837: \"$ac_try\"") >&5
8838   (eval $ac_try) 2>&5
8839   ac_status=$?
8840   echo "$as_me:8840: \$? = $ac_status" >&5
8841   (exit $ac_status); }; }; then
8842   :
8843 else
8844   echo "$as_me: failed program was:" >&5
8845 cat conftest.$ac_ext >&5
8846 cf_cv_posix_c_source=no
8847 fi
8848 rm -f conftest.$ac_objext conftest.$ac_ext
8849          CFLAGS="$cf_save_CFLAGS"
8850          CPPFLAGS="$cf_save_CPPFLAGS"
8851
8852 fi
8853 rm -f conftest.$ac_objext conftest.$ac_ext
8854
8855 fi
8856 echo "$as_me:8856: result: $cf_cv_posix_c_source" >&5
8857 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8858
8859 if test "$cf_cv_posix_c_source" != no ; then
8860         CFLAGS="$cf_trim_CFLAGS"
8861         CPPFLAGS="$cf_trim_CPPFLAGS"
8862
8863 cf_fix_cppflags=no
8864 cf_new_cflags=
8865 cf_new_cppflags=
8866 cf_new_extra_cppflags=
8867
8868 for cf_add_cflags in $cf_cv_posix_c_source
8869 do
8870 case $cf_fix_cppflags in
8871 (no)
8872         case $cf_add_cflags in
8873         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8874                 case $cf_add_cflags in
8875                 (-D*)
8876                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8877
8878                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8879                                 && test -z "${cf_tst_cflags}" \
8880                                 && cf_fix_cppflags=yes
8881
8882                         if test $cf_fix_cppflags = yes ; then
8883
8884         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8885         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8886
8887                                 continue
8888                         elif test "${cf_tst_cflags}" = "\"'" ; then
8889
8890         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8891         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8892
8893                                 continue
8894                         fi
8895                         ;;
8896                 esac
8897                 case "$CPPFLAGS" in
8898                 (*$cf_add_cflags)
8899                         ;;
8900                 (*)
8901                         case $cf_add_cflags in
8902                         (-D*)
8903                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8904
8905 CPPFLAGS=`echo "$CPPFLAGS" | \
8906         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8907                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8908
8909                                 ;;
8910                         esac
8911
8912         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8913         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8914
8915                         ;;
8916                 esac
8917                 ;;
8918         (*)
8919
8920         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8921         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8922
8923                 ;;
8924         esac
8925         ;;
8926 (yes)
8927
8928         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8929         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8930
8931         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8932
8933         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8934                 && test -z "${cf_tst_cflags}" \
8935                 && cf_fix_cppflags=no
8936         ;;
8937 esac
8938 done
8939
8940 if test -n "$cf_new_cflags" ; then
8941
8942         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8943         CFLAGS="${CFLAGS}$cf_new_cflags"
8944
8945 fi
8946
8947 if test -n "$cf_new_cppflags" ; then
8948
8949         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8950         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8951
8952 fi
8953
8954 if test -n "$cf_new_extra_cppflags" ; then
8955
8956         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8957         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8958
8959 fi
8960
8961 fi
8962
8963         ;;
8964 esac
8965
8966 if test -n "$cf_xopen_source" ; then
8967
8968 cf_fix_cppflags=no
8969 cf_new_cflags=
8970 cf_new_cppflags=
8971 cf_new_extra_cppflags=
8972
8973 for cf_add_cflags in $cf_xopen_source
8974 do
8975 case $cf_fix_cppflags in
8976 (no)
8977         case $cf_add_cflags in
8978         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8979                 case $cf_add_cflags in
8980                 (-D*)
8981                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8982
8983                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8984                                 && test -z "${cf_tst_cflags}" \
8985                                 && cf_fix_cppflags=yes
8986
8987                         if test $cf_fix_cppflags = yes ; then
8988
8989         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8990         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8991
8992                                 continue
8993                         elif test "${cf_tst_cflags}" = "\"'" ; then
8994
8995         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8996         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8997
8998                                 continue
8999                         fi
9000                         ;;
9001                 esac
9002                 case "$CPPFLAGS" in
9003                 (*$cf_add_cflags)
9004                         ;;
9005                 (*)
9006                         case $cf_add_cflags in
9007                         (-D*)
9008                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9009
9010 CPPFLAGS=`echo "$CPPFLAGS" | \
9011         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9012                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9013
9014                                 ;;
9015                         esac
9016
9017         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9018         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9019
9020                         ;;
9021                 esac
9022                 ;;
9023         (*)
9024
9025         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9026         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9027
9028                 ;;
9029         esac
9030         ;;
9031 (yes)
9032
9033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9035
9036         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9037
9038         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9039                 && test -z "${cf_tst_cflags}" \
9040                 && cf_fix_cppflags=no
9041         ;;
9042 esac
9043 done
9044
9045 if test -n "$cf_new_cflags" ; then
9046         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9047
9048 echo "${as_me:-configure}:9048: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9049
9050         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9051         CFLAGS="${CFLAGS}$cf_new_cflags"
9052
9053 fi
9054
9055 if test -n "$cf_new_cppflags" ; then
9056         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9057
9058 echo "${as_me:-configure}:9058: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9059
9060         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9061         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9062
9063 fi
9064
9065 if test -n "$cf_new_extra_cppflags" ; then
9066         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9067
9068 echo "${as_me:-configure}:9068: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9069
9070         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9071         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9072
9073 fi
9074
9075 fi
9076
9077 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9078         echo "$as_me:9078: checking if _XOPEN_SOURCE really is set" >&5
9079 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9080         cat >conftest.$ac_ext <<_ACEOF
9081 #line 9081 "configure"
9082 #include "confdefs.h"
9083 #include <stdlib.h>
9084 int
9085 main (void)
9086 {
9087
9088 #ifndef _XOPEN_SOURCE
9089 make an error
9090 #endif
9091   ;
9092   return 0;
9093 }
9094 _ACEOF
9095 rm -f conftest.$ac_objext
9096 if { (eval echo "$as_me:9096: \"$ac_compile\"") >&5
9097   (eval $ac_compile) 2>&5
9098   ac_status=$?
9099   echo "$as_me:9099: \$? = $ac_status" >&5
9100   (exit $ac_status); } &&
9101          { ac_try='test -s conftest.$ac_objext'
9102   { (eval echo "$as_me:9102: \"$ac_try\"") >&5
9103   (eval $ac_try) 2>&5
9104   ac_status=$?
9105   echo "$as_me:9105: \$? = $ac_status" >&5
9106   (exit $ac_status); }; }; then
9107   cf_XOPEN_SOURCE_set=yes
9108 else
9109   echo "$as_me: failed program was:" >&5
9110 cat conftest.$ac_ext >&5
9111 cf_XOPEN_SOURCE_set=no
9112 fi
9113 rm -f conftest.$ac_objext conftest.$ac_ext
9114         echo "$as_me:9114: result: $cf_XOPEN_SOURCE_set" >&5
9115 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9116         if test $cf_XOPEN_SOURCE_set = yes
9117         then
9118                 cat >conftest.$ac_ext <<_ACEOF
9119 #line 9119 "configure"
9120 #include "confdefs.h"
9121 #include <stdlib.h>
9122 int
9123 main (void)
9124 {
9125
9126 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9127 make an error
9128 #endif
9129   ;
9130   return 0;
9131 }
9132 _ACEOF
9133 rm -f conftest.$ac_objext
9134 if { (eval echo "$as_me:9134: \"$ac_compile\"") >&5
9135   (eval $ac_compile) 2>&5
9136   ac_status=$?
9137   echo "$as_me:9137: \$? = $ac_status" >&5
9138   (exit $ac_status); } &&
9139          { ac_try='test -s conftest.$ac_objext'
9140   { (eval echo "$as_me:9140: \"$ac_try\"") >&5
9141   (eval $ac_try) 2>&5
9142   ac_status=$?
9143   echo "$as_me:9143: \$? = $ac_status" >&5
9144   (exit $ac_status); }; }; then
9145   cf_XOPEN_SOURCE_set_ok=yes
9146 else
9147   echo "$as_me: failed program was:" >&5
9148 cat conftest.$ac_ext >&5
9149 cf_XOPEN_SOURCE_set_ok=no
9150 fi
9151 rm -f conftest.$ac_objext conftest.$ac_ext
9152                 if test $cf_XOPEN_SOURCE_set_ok = no
9153                 then
9154                         { echo "$as_me:9154: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9155 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9156                 fi
9157         else
9158
9159 echo "$as_me:9159: checking if we should define _XOPEN_SOURCE" >&5
9160 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9161 if test "${cf_cv_xopen_source+set}" = set; then
9162   echo $ECHO_N "(cached) $ECHO_C" >&6
9163 else
9164
9165         cat >conftest.$ac_ext <<_ACEOF
9166 #line 9166 "configure"
9167 #include "confdefs.h"
9168
9169 #include <stdlib.h>
9170 #include <string.h>
9171 #include <sys/types.h>
9172
9173 int
9174 main (void)
9175 {
9176
9177 #ifndef _XOPEN_SOURCE
9178 make an error
9179 #endif
9180   ;
9181   return 0;
9182 }
9183 _ACEOF
9184 rm -f conftest.$ac_objext
9185 if { (eval echo "$as_me:9185: \"$ac_compile\"") >&5
9186   (eval $ac_compile) 2>&5
9187   ac_status=$?
9188   echo "$as_me:9188: \$? = $ac_status" >&5
9189   (exit $ac_status); } &&
9190          { ac_try='test -s conftest.$ac_objext'
9191   { (eval echo "$as_me:9191: \"$ac_try\"") >&5
9192   (eval $ac_try) 2>&5
9193   ac_status=$?
9194   echo "$as_me:9194: \$? = $ac_status" >&5
9195   (exit $ac_status); }; }; then
9196   cf_cv_xopen_source=no
9197 else
9198   echo "$as_me: failed program was:" >&5
9199 cat conftest.$ac_ext >&5
9200 cf_save="$CPPFLAGS"
9201          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9202          cat >conftest.$ac_ext <<_ACEOF
9203 #line 9203 "configure"
9204 #include "confdefs.h"
9205
9206 #include <stdlib.h>
9207 #include <string.h>
9208 #include <sys/types.h>
9209
9210 int
9211 main (void)
9212 {
9213
9214 #ifdef _XOPEN_SOURCE
9215 make an error
9216 #endif
9217   ;
9218   return 0;
9219 }
9220 _ACEOF
9221 rm -f conftest.$ac_objext
9222 if { (eval echo "$as_me:9222: \"$ac_compile\"") >&5
9223   (eval $ac_compile) 2>&5
9224   ac_status=$?
9225   echo "$as_me:9225: \$? = $ac_status" >&5
9226   (exit $ac_status); } &&
9227          { ac_try='test -s conftest.$ac_objext'
9228   { (eval echo "$as_me:9228: \"$ac_try\"") >&5
9229   (eval $ac_try) 2>&5
9230   ac_status=$?
9231   echo "$as_me:9231: \$? = $ac_status" >&5
9232   (exit $ac_status); }; }; then
9233   cf_cv_xopen_source=no
9234 else
9235   echo "$as_me: failed program was:" >&5
9236 cat conftest.$ac_ext >&5
9237 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9238 fi
9239 rm -f conftest.$ac_objext conftest.$ac_ext
9240         CPPFLAGS="$cf_save"
9241
9242 fi
9243 rm -f conftest.$ac_objext conftest.$ac_ext
9244
9245 fi
9246 echo "$as_me:9246: result: $cf_cv_xopen_source" >&5
9247 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9248
9249 if test "$cf_cv_xopen_source" != no ; then
9250
9251 CFLAGS=`echo "$CFLAGS" | \
9252         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9253                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9254
9255 CPPFLAGS=`echo "$CPPFLAGS" | \
9256         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9257                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9258
9259         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9260
9261 cf_fix_cppflags=no
9262 cf_new_cflags=
9263 cf_new_cppflags=
9264 cf_new_extra_cppflags=
9265
9266 for cf_add_cflags in $cf_temp_xopen_source
9267 do
9268 case $cf_fix_cppflags in
9269 (no)
9270         case $cf_add_cflags in
9271         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9272                 case $cf_add_cflags in
9273                 (-D*)
9274                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9275
9276                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9277                                 && test -z "${cf_tst_cflags}" \
9278                                 && cf_fix_cppflags=yes
9279
9280                         if test $cf_fix_cppflags = yes ; then
9281
9282         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9283         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9284
9285                                 continue
9286                         elif test "${cf_tst_cflags}" = "\"'" ; then
9287
9288         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9289         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9290
9291                                 continue
9292                         fi
9293                         ;;
9294                 esac
9295                 case "$CPPFLAGS" in
9296                 (*$cf_add_cflags)
9297                         ;;
9298                 (*)
9299                         case $cf_add_cflags in
9300                         (-D*)
9301                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9302
9303 CPPFLAGS=`echo "$CPPFLAGS" | \
9304         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9305                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9306
9307                                 ;;
9308                         esac
9309
9310         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9311         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9312
9313                         ;;
9314                 esac
9315                 ;;
9316         (*)
9317
9318         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9319         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9320
9321                 ;;
9322         esac
9323         ;;
9324 (yes)
9325
9326         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9327         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9328
9329         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9330
9331         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9332                 && test -z "${cf_tst_cflags}" \
9333                 && cf_fix_cppflags=no
9334         ;;
9335 esac
9336 done
9337
9338 if test -n "$cf_new_cflags" ; then
9339
9340         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9341         CFLAGS="${CFLAGS}$cf_new_cflags"
9342
9343 fi
9344
9345 if test -n "$cf_new_cppflags" ; then
9346
9347         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9348         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9349
9350 fi
9351
9352 if test -n "$cf_new_extra_cppflags" ; then
9353
9354         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9355         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9356
9357 fi
9358
9359 fi
9360
9361         fi
9362 fi
9363
9364 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9365
9366 # Work around breakage on OS X
9367
9368 echo "$as_me:9368: checking if SIGWINCH is defined" >&5
9369 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9370 if test "${cf_cv_define_sigwinch+set}" = set; then
9371   echo $ECHO_N "(cached) $ECHO_C" >&6
9372 else
9373
9374         cat >conftest.$ac_ext <<_ACEOF
9375 #line 9375 "configure"
9376 #include "confdefs.h"
9377
9378 #include <sys/types.h>
9379 #include <sys/signal.h>
9380
9381 int
9382 main (void)
9383 {
9384 int x = SIGWINCH
9385   ;
9386   return 0;
9387 }
9388 _ACEOF
9389 rm -f conftest.$ac_objext
9390 if { (eval echo "$as_me:9390: \"$ac_compile\"") >&5
9391   (eval $ac_compile) 2>&5
9392   ac_status=$?
9393   echo "$as_me:9393: \$? = $ac_status" >&5
9394   (exit $ac_status); } &&
9395          { ac_try='test -s conftest.$ac_objext'
9396   { (eval echo "$as_me:9396: \"$ac_try\"") >&5
9397   (eval $ac_try) 2>&5
9398   ac_status=$?
9399   echo "$as_me:9399: \$? = $ac_status" >&5
9400   (exit $ac_status); }; }; then
9401   cf_cv_define_sigwinch=yes
9402 else
9403   echo "$as_me: failed program was:" >&5
9404 cat conftest.$ac_ext >&5
9405 cat >conftest.$ac_ext <<_ACEOF
9406 #line 9406 "configure"
9407 #include "confdefs.h"
9408
9409 #undef _XOPEN_SOURCE
9410 #undef _POSIX_SOURCE
9411 #undef _POSIX_C_SOURCE
9412 #include <sys/types.h>
9413 #include <sys/signal.h>
9414
9415 int
9416 main (void)
9417 {
9418 int x = SIGWINCH
9419   ;
9420   return 0;
9421 }
9422 _ACEOF
9423 rm -f conftest.$ac_objext
9424 if { (eval echo "$as_me:9424: \"$ac_compile\"") >&5
9425   (eval $ac_compile) 2>&5
9426   ac_status=$?
9427   echo "$as_me:9427: \$? = $ac_status" >&5
9428   (exit $ac_status); } &&
9429          { ac_try='test -s conftest.$ac_objext'
9430   { (eval echo "$as_me:9430: \"$ac_try\"") >&5
9431   (eval $ac_try) 2>&5
9432   ac_status=$?
9433   echo "$as_me:9433: \$? = $ac_status" >&5
9434   (exit $ac_status); }; }; then
9435   cf_cv_define_sigwinch=maybe
9436 else
9437   echo "$as_me: failed program was:" >&5
9438 cat conftest.$ac_ext >&5
9439 cf_cv_define_sigwinch=no
9440 fi
9441 rm -f conftest.$ac_objext conftest.$ac_ext
9442
9443 fi
9444 rm -f conftest.$ac_objext conftest.$ac_ext
9445
9446 fi
9447 echo "$as_me:9447: result: $cf_cv_define_sigwinch" >&5
9448 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9449
9450 if test "$cf_cv_define_sigwinch" = maybe ; then
9451 echo "$as_me:9451: checking for actual SIGWINCH definition" >&5
9452 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9453 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9454   echo $ECHO_N "(cached) $ECHO_C" >&6
9455 else
9456
9457 cf_cv_fixup_sigwinch=unknown
9458 cf_sigwinch=32
9459 while test $cf_sigwinch != 1
9460 do
9461         cat >conftest.$ac_ext <<_ACEOF
9462 #line 9462 "configure"
9463 #include "confdefs.h"
9464
9465 #undef _XOPEN_SOURCE
9466 #undef _POSIX_SOURCE
9467 #undef _POSIX_C_SOURCE
9468 #include <sys/types.h>
9469 #include <sys/signal.h>
9470
9471 int
9472 main (void)
9473 {
9474
9475 #if SIGWINCH != $cf_sigwinch
9476 make an error
9477 #endif
9478 int x = SIGWINCH
9479   ;
9480   return 0;
9481 }
9482 _ACEOF
9483 rm -f conftest.$ac_objext
9484 if { (eval echo "$as_me:9484: \"$ac_compile\"") >&5
9485   (eval $ac_compile) 2>&5
9486   ac_status=$?
9487   echo "$as_me:9487: \$? = $ac_status" >&5
9488   (exit $ac_status); } &&
9489          { ac_try='test -s conftest.$ac_objext'
9490   { (eval echo "$as_me:9490: \"$ac_try\"") >&5
9491   (eval $ac_try) 2>&5
9492   ac_status=$?
9493   echo "$as_me:9493: \$? = $ac_status" >&5
9494   (exit $ac_status); }; }; then
9495   cf_cv_fixup_sigwinch=$cf_sigwinch
9496          break
9497 else
9498   echo "$as_me: failed program was:" >&5
9499 cat conftest.$ac_ext >&5
9500 fi
9501 rm -f conftest.$ac_objext conftest.$ac_ext
9502
9503 cf_sigwinch=`expr $cf_sigwinch - 1`
9504 done
9505
9506 fi
9507 echo "$as_me:9507: result: $cf_cv_fixup_sigwinch" >&5
9508 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9509
9510         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9511                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9512         fi
9513 fi
9514
9515 # Checks for CODESET support.
9516
9517 echo "$as_me:9517: checking for nl_langinfo and CODESET" >&5
9518 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9519 if test "${am_cv_langinfo_codeset+set}" = set; then
9520   echo $ECHO_N "(cached) $ECHO_C" >&6
9521 else
9522   cat >conftest.$ac_ext <<_ACEOF
9523 #line 9523 "configure"
9524 #include "confdefs.h"
9525 #include <langinfo.h>
9526 int
9527 main (void)
9528 {
9529 char* cs = nl_langinfo(CODESET);
9530   ;
9531   return 0;
9532 }
9533 _ACEOF
9534 rm -f conftest.$ac_objext conftest$ac_exeext
9535 if { (eval echo "$as_me:9535: \"$ac_link\"") >&5
9536   (eval $ac_link) 2>&5
9537   ac_status=$?
9538   echo "$as_me:9538: \$? = $ac_status" >&5
9539   (exit $ac_status); } &&
9540          { ac_try='test -s conftest$ac_exeext'
9541   { (eval echo "$as_me:9541: \"$ac_try\"") >&5
9542   (eval $ac_try) 2>&5
9543   ac_status=$?
9544   echo "$as_me:9544: \$? = $ac_status" >&5
9545   (exit $ac_status); }; }; then
9546   am_cv_langinfo_codeset=yes
9547 else
9548   echo "$as_me: failed program was:" >&5
9549 cat conftest.$ac_ext >&5
9550 am_cv_langinfo_codeset=no
9551 fi
9552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9553
9554 fi
9555 echo "$as_me:9555: result: $am_cv_langinfo_codeset" >&5
9556 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9557         if test $am_cv_langinfo_codeset = yes; then
9558
9559 cat >>confdefs.h <<\EOF
9560 #define HAVE_LANGINFO_CODESET 1
9561 EOF
9562
9563         fi
9564
9565 # use these variables to work around a defect in gcc's fixincludes.
9566 NCURSES_OK_WCHAR_T=
9567 NCURSES_OK_WINT_T=
9568
9569 echo "$as_me:9569: checking if you want wide-character code" >&5
9570 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9571
9572 # Check whether --enable-widec or --disable-widec was given.
9573 if test "${enable_widec+set}" = set; then
9574   enableval="$enable_widec"
9575   with_widec=$enableval
9576 else
9577   with_widec=no
9578 fi;
9579 echo "$as_me:9579: result: $with_widec" >&5
9580 echo "${ECHO_T}$with_widec" >&6
9581
9582 NCURSES_WCWIDTH_GRAPHICS=1
9583
9584 if test "x$with_widec" = xyes ; then
9585         if test "x$disable_lib_suffixes" = xno ; then
9586                 LIB_SUFFIX="w${LIB_SUFFIX}"
9587         fi
9588
9589 cat >>confdefs.h <<\EOF
9590 #define USE_WIDEC_SUPPORT 1
9591 EOF
9592
9593 cat >>confdefs.h <<\EOF
9594 #define NCURSES_WIDECHAR 1
9595 EOF
9596
9597 for ac_header in \
9598 wchar.h \
9599 wctype.h \
9600
9601 do
9602 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9603 echo "$as_me:9603: checking for $ac_header" >&5
9604 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9605 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9606   echo $ECHO_N "(cached) $ECHO_C" >&6
9607 else
9608   cat >conftest.$ac_ext <<_ACEOF
9609 #line 9609 "configure"
9610 #include "confdefs.h"
9611 #include <$ac_header>
9612 _ACEOF
9613 if { (eval echo "$as_me:9613: \"$ac_cpp conftest.$ac_ext\"") >&5
9614   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9615   ac_status=$?
9616   egrep -v '^ *\+' conftest.er1 >conftest.err
9617   rm -f conftest.er1
9618   cat conftest.err >&5
9619   echo "$as_me:9619: \$? = $ac_status" >&5
9620   (exit $ac_status); } >/dev/null; then
9621   if test -s conftest.err; then
9622     ac_cpp_err=$ac_c_preproc_warn_flag
9623   else
9624     ac_cpp_err=
9625   fi
9626 else
9627   ac_cpp_err=yes
9628 fi
9629 if test -z "$ac_cpp_err"; then
9630   eval "$as_ac_Header=yes"
9631 else
9632   echo "$as_me: failed program was:" >&5
9633   cat conftest.$ac_ext >&5
9634   eval "$as_ac_Header=no"
9635 fi
9636 rm -f conftest.err conftest.$ac_ext
9637 fi
9638 echo "$as_me:9638: result: `eval echo '${'$as_ac_Header'}'`" >&5
9639 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9640 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9641   cat >>confdefs.h <<EOF
9642 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9643 EOF
9644
9645 fi
9646 done
9647
9648 echo "$as_me:9648: checking if wchar.h can be used as is" >&5
9649 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9650 if test "${cf_cv_wchar_h_okay+set}" = set; then
9651   echo $ECHO_N "(cached) $ECHO_C" >&6
9652 else
9653
9654 cat >conftest.$ac_ext <<_ACEOF
9655 #line 9655 "configure"
9656 #include "confdefs.h"
9657
9658 #include <stdlib.h>
9659 #ifdef HAVE_WCHAR_H
9660 #include <wchar.h>
9661 #endif
9662 #ifdef HAVE_WCTYPE_H
9663 #include <wctype.h>
9664 #endif
9665
9666 int
9667 main (void)
9668 {
9669
9670         wint_t foo = 0;
9671         int bar = iswpunct(foo)
9672   ;
9673   return 0;
9674 }
9675 _ACEOF
9676 rm -f conftest.$ac_objext
9677 if { (eval echo "$as_me:9677: \"$ac_compile\"") >&5
9678   (eval $ac_compile) 2>&5
9679   ac_status=$?
9680   echo "$as_me:9680: \$? = $ac_status" >&5
9681   (exit $ac_status); } &&
9682          { ac_try='test -s conftest.$ac_objext'
9683   { (eval echo "$as_me:9683: \"$ac_try\"") >&5
9684   (eval $ac_try) 2>&5
9685   ac_status=$?
9686   echo "$as_me:9686: \$? = $ac_status" >&5
9687   (exit $ac_status); }; }; then
9688   cf_cv_wchar_h_okay=yes
9689 else
9690   echo "$as_me: failed program was:" >&5
9691 cat conftest.$ac_ext >&5
9692 cf_cv_wchar_h_okay=no
9693 fi
9694 rm -f conftest.$ac_objext conftest.$ac_ext
9695 fi
9696 echo "$as_me:9696: result: $cf_cv_wchar_h_okay" >&5
9697 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9698
9699 if test $cf_cv_wchar_h_okay = no
9700 then
9701
9702 echo "$as_me:9702: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9703 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9704 cat >conftest.$ac_ext <<_ACEOF
9705 #line 9705 "configure"
9706 #include "confdefs.h"
9707 #include <sys/types.h>
9708
9709 int
9710 main (void)
9711 {
9712
9713 #ifndef _XOPEN_SOURCE_EXTENDED
9714 make an error
9715 #endif
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 rm -f conftest.$ac_objext
9721 if { (eval echo "$as_me:9721: \"$ac_compile\"") >&5
9722   (eval $ac_compile) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); } &&
9726          { ac_try='test -s conftest.$ac_objext'
9727   { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728   (eval $ac_try) 2>&5
9729   ac_status=$?
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit $ac_status); }; }; then
9732   cf_result=no
9733 else
9734   echo "$as_me: failed program was:" >&5
9735 cat conftest.$ac_ext >&5
9736 cf_result=yes
9737 fi
9738 rm -f conftest.$ac_objext conftest.$ac_ext
9739 echo "$as_me:9739: result: $cf_result" >&5
9740 echo "${ECHO_T}$cf_result" >&6
9741
9742 if test "$cf_result" = yes ; then
9743         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9744 elif test "x" != "x" ; then
9745         echo "$as_me:9745: checking checking for compatible value versus " >&5
9746 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9747         cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 #include <sys/types.h>
9751
9752 int
9753 main (void)
9754 {
9755
9756 #if _XOPEN_SOURCE_EXTENDED- < 0
9757 make an error
9758 #endif
9759   ;
9760   return 0;
9761 }
9762 _ACEOF
9763 rm -f conftest.$ac_objext
9764 if { (eval echo "$as_me:9764: \"$ac_compile\"") >&5
9765   (eval $ac_compile) 2>&5
9766   ac_status=$?
9767   echo "$as_me:9767: \$? = $ac_status" >&5
9768   (exit $ac_status); } &&
9769          { ac_try='test -s conftest.$ac_objext'
9770   { (eval echo "$as_me:9770: \"$ac_try\"") >&5
9771   (eval $ac_try) 2>&5
9772   ac_status=$?
9773   echo "$as_me:9773: \$? = $ac_status" >&5
9774   (exit $ac_status); }; }; then
9775   cf_result=yes
9776 else
9777   echo "$as_me: failed program was:" >&5
9778 cat conftest.$ac_ext >&5
9779 cf_result=no
9780 fi
9781 rm -f conftest.$ac_objext conftest.$ac_ext
9782         echo "$as_me:9782: result: $cf_result" >&5
9783 echo "${ECHO_T}$cf_result" >&6
9784         if test "$cf_result" = no ; then
9785                 # perhaps we can override it - try...
9786                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9787         fi
9788 fi
9789
9790 fi
9791
9792 echo "$as_me:9792: checking if wcwidth agrees graphics are single-width" >&5
9793 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9794 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9795   echo $ECHO_N "(cached) $ECHO_C" >&6
9796 else
9797
9798 cat >conftest.in <<CF_EOF
9799 -       VT100 symbols
9800 0x250c  upper left corner
9801 0x2514  lower left corner
9802 0x2510  upper right corner
9803 0x2518  lower right corner
9804 0x251c  tee pointing left
9805 0x2524  tee pointing right
9806 0x2534  tee pointing up
9807 0x252c  tee pointing down
9808 0x2500  horizontal line
9809 0x2502  vertical line
9810 0x253c  large plus or crossover
9811 0x23ba  scan line 1
9812 0x23bd  scan line 9
9813 0x25c6  diamond
9814 0x2592  checker board (stipple)
9815 0x00b0  degree symbol
9816 0x00b1  plus/minus
9817 0x00b7  bullet
9818 -       Teletype 5410v1 symbols
9819 0x2190  arrow pointing left
9820 0x2192  arrow pointing right
9821 0x2193  arrow pointing down
9822 0x2191  arrow pointing up
9823 0x2592  board of squares
9824 0x2603  lantern symbol
9825 0x25ae  solid square block
9826 -       these defaults were invented for ncurses
9827 0x23bb  scan line 3
9828 0x23bc  scan line 7
9829 0x2264  less-than-or-equal-to
9830 0x2265  greater-than-or-equal-to
9831 0x03c0  greek pi
9832 0x2260  not-equal
9833 0x00a3  pound-sterling symbol
9834 -       thick-line-drawing
9835 0x250f  upper left corner
9836 0x2517  lower left corner
9837 0x2513  upper right corner
9838 0x251b  lower right corner
9839 0x2523  tee pointing left
9840 0x252b  tee pointing right
9841 0x253b  tee pointing up
9842 0x2533  tee pointing down
9843 0x2501  horizontal line
9844 0x2503  vertical line
9845 0x254b  large plus or crossover
9846 -       double-line-drawing
9847 0x2554  upper left corner
9848 0x255a  lower left corner
9849 0x2557  upper right corner
9850 0x255d  lower right corner
9851 0x2563  tee pointing left
9852 0x2560  tee pointing right
9853 0x2569  tee pointing up
9854 0x2566  tee pointing down
9855 0x2550  horizontal line
9856 0x2551  vertical line
9857 0x256c  large plus or crossover
9858 CF_EOF
9859 if test "$cross_compiling" = yes; then
9860   cf_cv_wcwidth_graphics=unknown
9861 else
9862   cat >conftest.$ac_ext <<_ACEOF
9863 #line 9863 "configure"
9864 #include "confdefs.h"
9865
9866 #include <locale.h>
9867 #include <stdio.h>
9868 #include <wchar.h>
9869
9870 #define MY_LEN 80
9871
9872 int
9873 main(void)
9874 {
9875         FILE *fp;
9876         int value;
9877         char buffer[MY_LEN + 1];
9878         char notes[MY_LEN + 1];
9879         int totals = 0;
9880         int passed = 0;
9881
9882         if (setlocale(LC_ALL, "en_US.UTF8") ||
9883                 setlocale(LC_ALL, "en_US.UTF-8") ||
9884                 setlocale(LC_ALL, "en_US.utf8") ||
9885                 setlocale(LC_ALL, "en_US.utf-8")) {
9886                 if ((fp = fopen("conftest.in", "r")) != 0) {
9887                         while (fgets(buffer, MY_LEN, fp) != 0) {
9888                                 if (*buffer == '-') {
9889                                         fprintf(stderr, "\t%s", buffer);
9890                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9891                                         ++totals;
9892                                         if (wcwidth(value) == 1)
9893                                                 ++passed;
9894                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9895                                 } else {
9896                                         fprintf(stderr, "?\t%s", buffer);
9897                                 }
9898                         }
9899                 }
9900         }
9901         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9902         return (totals == passed) ? 0 : 1;
9903 }
9904
9905 _ACEOF
9906 rm -f conftest$ac_exeext
9907 if { (eval echo "$as_me:9907: \"$ac_link\"") >&5
9908   (eval $ac_link) 2>&5
9909   ac_status=$?
9910   echo "$as_me:9910: \$? = $ac_status" >&5
9911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9912   { (eval echo "$as_me:9912: \"$ac_try\"") >&5
9913   (eval $ac_try) 2>&5
9914   ac_status=$?
9915   echo "$as_me:9915: \$? = $ac_status" >&5
9916   (exit $ac_status); }; }; then
9917   cf_cv_wcwidth_graphics=yes
9918 else
9919   echo "$as_me: program exited with status $ac_status" >&5
9920 echo "$as_me: failed program was:" >&5
9921 cat conftest.$ac_ext >&5
9922 cf_cv_wcwidth_graphics=no
9923 fi
9924 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9925 fi
9926
9927 fi
9928 echo "$as_me:9928: result: $cf_cv_wcwidth_graphics" >&5
9929 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9930
9931         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9932
9933         # with_overwrite=no
9934         NCURSES_CH_T=cchar_t
9935
9936 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9937 do
9938 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9939 echo "$as_me:9939: checking for $ac_func" >&5
9940 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9941 if eval "test \"\${$as_ac_var+set}\" = set"; then
9942   echo $ECHO_N "(cached) $ECHO_C" >&6
9943 else
9944   cat >conftest.$ac_ext <<_ACEOF
9945 #line 9945 "configure"
9946 #include "confdefs.h"
9947 /* System header to define __stub macros and hopefully few prototypes,
9948     which can conflict with char $ac_func (); below.  */
9949 #include <assert.h>
9950 /* Override any gcc2 internal prototype to avoid an error.  */
9951 #ifdef __cplusplus
9952 extern "C"
9953 #endif
9954 /* We use char because int might match the return type of a gcc2
9955    builtin and then its argument prototype would still apply.  */
9956 char $ac_func ();
9957 char (*f) ();
9958
9959 int
9960 main (void)
9961 {
9962 /* The GNU C library defines this for functions which it implements
9963     to always fail with ENOSYS.  Some functions are actually named
9964     something starting with __ and the normal name is an alias.  */
9965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9966 choke me
9967 #else
9968 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9969 #endif
9970
9971   ;
9972   return 0;
9973 }
9974 _ACEOF
9975 rm -f conftest.$ac_objext conftest$ac_exeext
9976 if { (eval echo "$as_me:9976: \"$ac_link\"") >&5
9977   (eval $ac_link) 2>&5
9978   ac_status=$?
9979   echo "$as_me:9979: \$? = $ac_status" >&5
9980   (exit $ac_status); } &&
9981          { ac_try='test -s conftest$ac_exeext'
9982   { (eval echo "$as_me:9982: \"$ac_try\"") >&5
9983   (eval $ac_try) 2>&5
9984   ac_status=$?
9985   echo "$as_me:9985: \$? = $ac_status" >&5
9986   (exit $ac_status); }; }; then
9987   eval "$as_ac_var=yes"
9988 else
9989   echo "$as_me: failed program was:" >&5
9990 cat conftest.$ac_ext >&5
9991 eval "$as_ac_var=no"
9992 fi
9993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9994 fi
9995 echo "$as_me:9995: result: `eval echo '${'$as_ac_var'}'`" >&5
9996 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9997 if test `eval echo '${'$as_ac_var'}'` = yes; then
9998   cat >>confdefs.h <<EOF
9999 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10000 EOF
10001
10002 fi
10003 done
10004
10005         if test "x$ac_cv_func_putwc" != xyes ; then
10006
10007 echo "$as_me:10007: checking for multibyte character support" >&5
10008 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10009 if test "${cf_cv_utf8_lib+set}" = set; then
10010   echo $ECHO_N "(cached) $ECHO_C" >&6
10011 else
10012
10013         cf_save_LIBS="$LIBS"
10014         cat >conftest.$ac_ext <<_ACEOF
10015 #line 10015 "configure"
10016 #include "confdefs.h"
10017
10018 #include <stdlib.h>
10019 int
10020 main (void)
10021 {
10022 putwc(0,0);
10023   ;
10024   return 0;
10025 }
10026 _ACEOF
10027 rm -f conftest.$ac_objext conftest$ac_exeext
10028 if { (eval echo "$as_me:10028: \"$ac_link\"") >&5
10029   (eval $ac_link) 2>&5
10030   ac_status=$?
10031   echo "$as_me:10031: \$? = $ac_status" >&5
10032   (exit $ac_status); } &&
10033          { ac_try='test -s conftest$ac_exeext'
10034   { (eval echo "$as_me:10034: \"$ac_try\"") >&5
10035   (eval $ac_try) 2>&5
10036   ac_status=$?
10037   echo "$as_me:10037: \$? = $ac_status" >&5
10038   (exit $ac_status); }; }; then
10039   cf_cv_utf8_lib=yes
10040 else
10041   echo "$as_me: failed program was:" >&5
10042 cat conftest.$ac_ext >&5
10043
10044 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10045 # will be set on completion of the AC_TRY_LINK below.
10046 cf_cv_header_path_utf8=
10047 cf_cv_library_path_utf8=
10048
10049 echo "${as_me:-configure}:10049: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10050
10051 cf_save_LIBS="$LIBS"
10052
10053 cat >conftest.$ac_ext <<_ACEOF
10054 #line 10054 "configure"
10055 #include "confdefs.h"
10056
10057 #include <libutf8.h>
10058 int
10059 main (void)
10060 {
10061 putwc(0,0);
10062   ;
10063   return 0;
10064 }
10065 _ACEOF
10066 rm -f conftest.$ac_objext conftest$ac_exeext
10067 if { (eval echo "$as_me:10067: \"$ac_link\"") >&5
10068   (eval $ac_link) 2>&5
10069   ac_status=$?
10070   echo "$as_me:10070: \$? = $ac_status" >&5
10071   (exit $ac_status); } &&
10072          { ac_try='test -s conftest$ac_exeext'
10073   { (eval echo "$as_me:10073: \"$ac_try\"") >&5
10074   (eval $ac_try) 2>&5
10075   ac_status=$?
10076   echo "$as_me:10076: \$? = $ac_status" >&5
10077   (exit $ac_status); }; }; then
10078
10079         cf_cv_find_linkage_utf8=yes
10080         cf_cv_header_path_utf8=/usr/include
10081         cf_cv_library_path_utf8=/usr/lib
10082
10083 else
10084   echo "$as_me: failed program was:" >&5
10085 cat conftest.$ac_ext >&5
10086
10087 LIBS="-lutf8  $cf_save_LIBS"
10088
10089 cat >conftest.$ac_ext <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092
10093 #include <libutf8.h>
10094 int
10095 main (void)
10096 {
10097 putwc(0,0);
10098   ;
10099   return 0;
10100 }
10101 _ACEOF
10102 rm -f conftest.$ac_objext conftest$ac_exeext
10103 if { (eval echo "$as_me:10103: \"$ac_link\"") >&5
10104   (eval $ac_link) 2>&5
10105   ac_status=$?
10106   echo "$as_me:10106: \$? = $ac_status" >&5
10107   (exit $ac_status); } &&
10108          { ac_try='test -s conftest$ac_exeext'
10109   { (eval echo "$as_me:10109: \"$ac_try\"") >&5
10110   (eval $ac_try) 2>&5
10111   ac_status=$?
10112   echo "$as_me:10112: \$? = $ac_status" >&5
10113   (exit $ac_status); }; }; then
10114
10115         cf_cv_find_linkage_utf8=yes
10116         cf_cv_header_path_utf8=/usr/include
10117         cf_cv_library_path_utf8=/usr/lib
10118         cf_cv_library_file_utf8="-lutf8"
10119
10120 else
10121   echo "$as_me: failed program was:" >&5
10122 cat conftest.$ac_ext >&5
10123
10124         cf_cv_find_linkage_utf8=no
10125         LIBS="$cf_save_LIBS"
10126
10127         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10128
10129 echo "${as_me:-configure}:10129: testing find linkage for utf8 library ..." 1>&5
10130
10131 echo "${as_me:-configure}:10131: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10132
10133         cf_save_CPPFLAGS="$CPPFLAGS"
10134         cf_test_CPPFLAGS="$CPPFLAGS"
10135
10136 cf_search=
10137
10138 # collect the current set of include-directories from compiler flags
10139 cf_header_path_list=""
10140 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10141         for cf_header_path in $CPPFLAGS $CFLAGS
10142         do
10143                 case $cf_header_path in
10144                 (-I*)
10145                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10146
10147 test "x$cf_header_path" != "xNONE" && \
10148 test -d "$cf_header_path" && \
10149  {
10150         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10151         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10152         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10153         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10154         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10155         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10156 }
10157
10158                         cf_header_path_list="$cf_header_path_list $cf_search"
10159                         ;;
10160                 esac
10161         done
10162 fi
10163
10164 # add the variations for the package we are looking for
10165
10166 cf_search=
10167
10168 test "x$prefix" != "xNONE" && \
10169 test -d "$prefix" && \
10170  {
10171         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10172         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10173         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10174         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10175         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10176         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10177 }
10178
10179 for cf_subdir_prefix in \
10180         /usr \
10181         /usr/local \
10182         /usr/pkg \
10183         /opt \
10184         /opt/local \
10185         $HOME
10186 do
10187
10188 test "x$cf_subdir_prefix" != "x$prefix" && \
10189 test -d "$cf_subdir_prefix" && \
10190 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10191         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10192         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10193         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10194         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10195         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10196         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10197 }
10198
10199 done
10200
10201 test "$includedir" != NONE && \
10202 test "$includedir" != "/usr/include" && \
10203 test -d "$includedir" && {
10204         test -d $includedir &&    cf_search="$cf_search $includedir"
10205         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10206 }
10207
10208 test "$oldincludedir" != NONE && \
10209 test "$oldincludedir" != "/usr/include" && \
10210 test -d "$oldincludedir" && {
10211         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10212         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10213 }
10214
10215 cf_search="$cf_search $cf_header_path_list"
10216
10217         for cf_cv_header_path_utf8 in $cf_search
10218         do
10219                 if test -d $cf_cv_header_path_utf8 ; then
10220                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10221
10222 echo "${as_me:-configure}:10222: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10223
10224                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10225                         cat >conftest.$ac_ext <<_ACEOF
10226 #line 10226 "configure"
10227 #include "confdefs.h"
10228
10229 #include <libutf8.h>
10230 int
10231 main (void)
10232 {
10233 putwc(0,0);
10234   ;
10235   return 0;
10236 }
10237 _ACEOF
10238 rm -f conftest.$ac_objext
10239 if { (eval echo "$as_me:10239: \"$ac_compile\"") >&5
10240   (eval $ac_compile) 2>&5
10241   ac_status=$?
10242   echo "$as_me:10242: \$? = $ac_status" >&5
10243   (exit $ac_status); } &&
10244          { ac_try='test -s conftest.$ac_objext'
10245   { (eval echo "$as_me:10245: \"$ac_try\"") >&5
10246   (eval $ac_try) 2>&5
10247   ac_status=$?
10248   echo "$as_me:10248: \$? = $ac_status" >&5
10249   (exit $ac_status); }; }; then
10250
10251                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10252
10253 echo "${as_me:-configure}:10253: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10254
10255                                 cf_cv_find_linkage_utf8=maybe
10256                                 cf_test_CPPFLAGS="$CPPFLAGS"
10257                                 break
10258 else
10259   echo "$as_me: failed program was:" >&5
10260 cat conftest.$ac_ext >&5
10261
10262                                 CPPFLAGS="$cf_save_CPPFLAGS"
10263
10264 fi
10265 rm -f conftest.$ac_objext conftest.$ac_ext
10266                 fi
10267         done
10268
10269         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10270
10271 echo "${as_me:-configure}:10271: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10272
10273                 cf_save_LIBS="$LIBS"
10274                 cf_save_LDFLAGS="$LDFLAGS"
10275
10276                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10277
10278 cf_search=
10279 cf_library_path_list=""
10280 if test -n "${LDFLAGS}${LIBS}" ; then
10281         for cf_library_path in $LDFLAGS $LIBS
10282         do
10283                 case $cf_library_path in
10284                 (-L*)
10285                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10286
10287 test "x$cf_library_path" != "xNONE" && \
10288 test -d "$cf_library_path" && \
10289  {
10290         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10291         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10292         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10293         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10294         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10295         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10296 }
10297
10298                         cf_library_path_list="$cf_library_path_list $cf_search"
10299                         ;;
10300                 esac
10301         done
10302 fi
10303
10304 cf_search=
10305
10306 test "x$prefix" != "xNONE" && \
10307 test -d "$prefix" && \
10308  {
10309         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10310         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10311         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10312         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10313         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10314         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10315 }
10316
10317 for cf_subdir_prefix in \
10318         /usr \
10319         /usr/local \
10320         /usr/pkg \
10321         /opt \
10322         /opt/local \
10323         $HOME
10324 do
10325
10326 test "x$cf_subdir_prefix" != "x$prefix" && \
10327 test -d "$cf_subdir_prefix" && \
10328 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10329         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10330         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10331         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10332         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10333         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10334         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10335 }
10336
10337 done
10338
10339 cf_search="$cf_library_path_list $cf_search"
10340
10341                         for cf_cv_library_path_utf8 in $cf_search
10342                         do
10343                                 if test -d $cf_cv_library_path_utf8 ; then
10344                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10345
10346 echo "${as_me:-configure}:10346: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10347
10348                                         CPPFLAGS="$cf_test_CPPFLAGS"
10349                                         LIBS="-lutf8  $cf_save_LIBS"
10350                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10351                                         cat >conftest.$ac_ext <<_ACEOF
10352 #line 10352 "configure"
10353 #include "confdefs.h"
10354
10355 #include <libutf8.h>
10356 int
10357 main (void)
10358 {
10359 putwc(0,0);
10360   ;
10361   return 0;
10362 }
10363 _ACEOF
10364 rm -f conftest.$ac_objext conftest$ac_exeext
10365 if { (eval echo "$as_me:10365: \"$ac_link\"") >&5
10366   (eval $ac_link) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit $ac_status); } &&
10370          { ac_try='test -s conftest$ac_exeext'
10371   { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:10374: \$? = $ac_status" >&5
10375   (exit $ac_status); }; }; then
10376
10377                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10378
10379 echo "${as_me:-configure}:10379: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10380
10381                                         cf_cv_find_linkage_utf8=yes
10382                                         cf_cv_library_file_utf8="-lutf8"
10383                                         break
10384 else
10385   echo "$as_me: failed program was:" >&5
10386 cat conftest.$ac_ext >&5
10387
10388                                         CPPFLAGS="$cf_save_CPPFLAGS"
10389                                         LIBS="$cf_save_LIBS"
10390                                         LDFLAGS="$cf_save_LDFLAGS"
10391
10392 fi
10393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10394                                 fi
10395                         done
10396                         CPPFLAGS="$cf_save_CPPFLAGS"
10397                         LDFLAGS="$cf_save_LDFLAGS"
10398                 fi
10399
10400         else
10401                 cf_cv_find_linkage_utf8=no
10402         fi
10403
10404 fi
10405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10406
10407 fi
10408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10409
10410 LIBS="$cf_save_LIBS"
10411
10412 if test "$cf_cv_find_linkage_utf8" = yes ; then
10413 cf_cv_utf8_lib=add-on
10414 else
10415 cf_cv_utf8_lib=no
10416 fi
10417
10418 fi
10419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10420 fi
10421 echo "$as_me:10421: result: $cf_cv_utf8_lib" >&5
10422 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10423
10424 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10425 # ncurses/ncursesw:
10426 if test "$cf_cv_utf8_lib" = "add-on" ; then
10427
10428 cat >>confdefs.h <<\EOF
10429 #define HAVE_LIBUTF8_H 1
10430 EOF
10431
10432 if test -n "$cf_cv_header_path_utf8" ; then
10433   for cf_add_incdir in $cf_cv_header_path_utf8
10434   do
10435         while test $cf_add_incdir != /usr/include
10436         do
10437           if test -d $cf_add_incdir
10438           then
10439                 cf_have_incdir=no
10440                 if test -n "$CFLAGS$CPPFLAGS" ; then
10441                   # a loop is needed to ensure we can add subdirs of existing dirs
10442                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10443                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10444                           cf_have_incdir=yes; break
10445                         fi
10446                   done
10447                 fi
10448
10449                 if test "$cf_have_incdir" = no ; then
10450                   if test "$cf_add_incdir" = /usr/local/include ; then
10451                         if test "$GCC" = yes
10452                         then
10453                           cf_save_CPPFLAGS=$CPPFLAGS
10454                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10455                           cat >conftest.$ac_ext <<_ACEOF
10456 #line 10456 "configure"
10457 #include "confdefs.h"
10458 #include <stdio.h>
10459 int
10460 main (void)
10461 {
10462 printf("Hello")
10463   ;
10464   return 0;
10465 }
10466 _ACEOF
10467 rm -f conftest.$ac_objext
10468 if { (eval echo "$as_me:10468: \"$ac_compile\"") >&5
10469   (eval $ac_compile) 2>&5
10470   ac_status=$?
10471   echo "$as_me:10471: \$? = $ac_status" >&5
10472   (exit $ac_status); } &&
10473          { ac_try='test -s conftest.$ac_objext'
10474   { (eval echo "$as_me:10474: \"$ac_try\"") >&5
10475   (eval $ac_try) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); }; }; then
10479   :
10480 else
10481   echo "$as_me: failed program was:" >&5
10482 cat conftest.$ac_ext >&5
10483 cf_have_incdir=yes
10484 fi
10485 rm -f conftest.$ac_objext conftest.$ac_ext
10486                           CPPFLAGS=$cf_save_CPPFLAGS
10487                         fi
10488                   fi
10489                 fi
10490
10491                 if test "$cf_have_incdir" = no ; then
10492                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10493
10494 echo "${as_me:-configure}:10494: testing adding $cf_add_incdir to include-path ..." 1>&5
10495
10496                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10497
10498                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10499                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10500                   cf_add_incdir="$cf_top_incdir"
10501                 else
10502                   break
10503                 fi
10504           else
10505                 break
10506           fi
10507         done
10508   done
10509 fi
10510
10511 if test -n "$cf_cv_library_path_utf8" ; then
10512         for cf_add_libdir in $cf_cv_library_path_utf8
10513         do
10514                 if test $cf_add_libdir = /usr/lib ; then
10515                         :
10516                 elif test -d $cf_add_libdir
10517                 then
10518                         cf_have_libdir=no
10519                         if test -n "$LDFLAGS$LIBS" ; then
10520                                 # a loop is needed to ensure we can add subdirs of existing dirs
10521                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10522                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10523                                                 cf_have_libdir=yes; break
10524                                         fi
10525                                 done
10526                         fi
10527                         if test "$cf_have_libdir" = no ; then
10528                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10529
10530 echo "${as_me:-configure}:10530: testing adding $cf_add_libdir to library-path ..." 1>&5
10531
10532                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10533                         fi
10534                 fi
10535         done
10536 fi
10537
10538 cf_add_libs="$cf_cv_library_file_utf8"
10539 # Filter out duplicates - this happens with badly-designed ".pc" files...
10540 for cf_add_1lib in $LIBS
10541 do
10542         for cf_add_2lib in $cf_add_libs
10543         do
10544                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10545                 then
10546                         cf_add_1lib=
10547                         break
10548                 fi
10549         done
10550         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10551 done
10552 LIBS="$cf_add_libs"
10553
10554 fi
10555
10556                 if test "$cf_cv_utf8_lib" != no ; then
10557                         NCURSES_LIBUTF8=1
10558                 fi
10559         fi
10560
10561 # This is needed on Tru64 5.0 to declare mbstate_t
10562 echo "$as_me:10562: checking if we must include wchar.h to declare mbstate_t" >&5
10563 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10564 if test "${cf_cv_mbstate_t+set}" = set; then
10565   echo $ECHO_N "(cached) $ECHO_C" >&6
10566 else
10567
10568 cat >conftest.$ac_ext <<_ACEOF
10569 #line 10569 "configure"
10570 #include "confdefs.h"
10571
10572 #include <stdlib.h>
10573 #include <stdarg.h>
10574 #include <stdio.h>
10575 #ifdef HAVE_LIBUTF8_H
10576 #include <libutf8.h>
10577 #endif
10578 int
10579 main (void)
10580 {
10581 mbstate_t state
10582   ;
10583   return 0;
10584 }
10585 _ACEOF
10586 rm -f conftest.$ac_objext
10587 if { (eval echo "$as_me:10587: \"$ac_compile\"") >&5
10588   (eval $ac_compile) 2>&5
10589   ac_status=$?
10590   echo "$as_me:10590: \$? = $ac_status" >&5
10591   (exit $ac_status); } &&
10592          { ac_try='test -s conftest.$ac_objext'
10593   { (eval echo "$as_me:10593: \"$ac_try\"") >&5
10594   (eval $ac_try) 2>&5
10595   ac_status=$?
10596   echo "$as_me:10596: \$? = $ac_status" >&5
10597   (exit $ac_status); }; }; then
10598   cf_cv_mbstate_t=no
10599 else
10600   echo "$as_me: failed program was:" >&5
10601 cat conftest.$ac_ext >&5
10602 cat >conftest.$ac_ext <<_ACEOF
10603 #line 10603 "configure"
10604 #include "confdefs.h"
10605
10606 #include <stdlib.h>
10607 #include <stdarg.h>
10608 #include <stdio.h>
10609 #include <wchar.h>
10610 #ifdef HAVE_LIBUTF8_H
10611 #include <libutf8.h>
10612 #endif
10613 int
10614 main (void)
10615 {
10616 mbstate_t value
10617   ;
10618   return 0;
10619 }
10620 _ACEOF
10621 rm -f conftest.$ac_objext
10622 if { (eval echo "$as_me:10622: \"$ac_compile\"") >&5
10623   (eval $ac_compile) 2>&5
10624   ac_status=$?
10625   echo "$as_me:10625: \$? = $ac_status" >&5
10626   (exit $ac_status); } &&
10627          { ac_try='test -s conftest.$ac_objext'
10628   { (eval echo "$as_me:10628: \"$ac_try\"") >&5
10629   (eval $ac_try) 2>&5
10630   ac_status=$?
10631   echo "$as_me:10631: \$? = $ac_status" >&5
10632   (exit $ac_status); }; }; then
10633   cf_cv_mbstate_t=yes
10634 else
10635   echo "$as_me: failed program was:" >&5
10636 cat conftest.$ac_ext >&5
10637 cf_cv_mbstate_t=unknown
10638 fi
10639 rm -f conftest.$ac_objext conftest.$ac_ext
10640 fi
10641 rm -f conftest.$ac_objext conftest.$ac_ext
10642 fi
10643 echo "$as_me:10643: result: $cf_cv_mbstate_t" >&5
10644 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10645
10646 if test "$cf_cv_mbstate_t" = yes ; then
10647
10648 cat >>confdefs.h <<\EOF
10649 #define NEED_WCHAR_H 1
10650 EOF
10651
10652         NEED_WCHAR_H=1
10653 fi
10654
10655 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10656 if test "$cf_cv_mbstate_t" = unknown ; then
10657         NCURSES_MBSTATE_T=1
10658 fi
10659
10660 # This is needed on Tru64 5.0 to declare wchar_t
10661 echo "$as_me:10661: checking if we must include wchar.h to declare wchar_t" >&5
10662 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10663 if test "${cf_cv_wchar_t+set}" = set; then
10664   echo $ECHO_N "(cached) $ECHO_C" >&6
10665 else
10666
10667 cat >conftest.$ac_ext <<_ACEOF
10668 #line 10668 "configure"
10669 #include "confdefs.h"
10670
10671 #include <stdlib.h>
10672 #include <stdarg.h>
10673 #include <stdio.h>
10674 #ifdef HAVE_LIBUTF8_H
10675 #include <libutf8.h>
10676 #endif
10677 int
10678 main (void)
10679 {
10680 wchar_t state
10681   ;
10682   return 0;
10683 }
10684 _ACEOF
10685 rm -f conftest.$ac_objext
10686 if { (eval echo "$as_me:10686: \"$ac_compile\"") >&5
10687   (eval $ac_compile) 2>&5
10688   ac_status=$?
10689   echo "$as_me:10689: \$? = $ac_status" >&5
10690   (exit $ac_status); } &&
10691          { ac_try='test -s conftest.$ac_objext'
10692   { (eval echo "$as_me:10692: \"$ac_try\"") >&5
10693   (eval $ac_try) 2>&5
10694   ac_status=$?
10695   echo "$as_me:10695: \$? = $ac_status" >&5
10696   (exit $ac_status); }; }; then
10697   cf_cv_wchar_t=no
10698 else
10699   echo "$as_me: failed program was:" >&5
10700 cat conftest.$ac_ext >&5
10701 cat >conftest.$ac_ext <<_ACEOF
10702 #line 10702 "configure"
10703 #include "confdefs.h"
10704
10705 #include <stdlib.h>
10706 #include <stdarg.h>
10707 #include <stdio.h>
10708 #include <wchar.h>
10709 #ifdef HAVE_LIBUTF8_H
10710 #include <libutf8.h>
10711 #endif
10712 int
10713 main (void)
10714 {
10715 wchar_t value
10716   ;
10717   return 0;
10718 }
10719 _ACEOF
10720 rm -f conftest.$ac_objext
10721 if { (eval echo "$as_me:10721: \"$ac_compile\"") >&5
10722   (eval $ac_compile) 2>&5
10723   ac_status=$?
10724   echo "$as_me:10724: \$? = $ac_status" >&5
10725   (exit $ac_status); } &&
10726          { ac_try='test -s conftest.$ac_objext'
10727   { (eval echo "$as_me:10727: \"$ac_try\"") >&5
10728   (eval $ac_try) 2>&5
10729   ac_status=$?
10730   echo "$as_me:10730: \$? = $ac_status" >&5
10731   (exit $ac_status); }; }; then
10732   cf_cv_wchar_t=yes
10733 else
10734   echo "$as_me: failed program was:" >&5
10735 cat conftest.$ac_ext >&5
10736 cf_cv_wchar_t=unknown
10737 fi
10738 rm -f conftest.$ac_objext conftest.$ac_ext
10739 fi
10740 rm -f conftest.$ac_objext conftest.$ac_ext
10741 fi
10742 echo "$as_me:10742: result: $cf_cv_wchar_t" >&5
10743 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10744
10745 if test "$cf_cv_wchar_t" = yes ; then
10746
10747 cat >>confdefs.h <<\EOF
10748 #define NEED_WCHAR_H 1
10749 EOF
10750
10751         NEED_WCHAR_H=1
10752 fi
10753
10754 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10755 if test "$cf_cv_wchar_t" = unknown ; then
10756         NCURSES_WCHAR_T=1
10757 fi
10758
10759 # if we find wchar_t in either place, use substitution to provide a fallback.
10760 if test "$cf_cv_wchar_t" != unknown ; then
10761         NCURSES_OK_WCHAR_T=1
10762 fi
10763
10764 # This is needed on Tru64 5.0 to declare wint_t
10765 echo "$as_me:10765: checking if we must include wchar.h to declare wint_t" >&5
10766 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10767 if test "${cf_cv_wint_t+set}" = set; then
10768   echo $ECHO_N "(cached) $ECHO_C" >&6
10769 else
10770
10771 cat >conftest.$ac_ext <<_ACEOF
10772 #line 10772 "configure"
10773 #include "confdefs.h"
10774
10775 #include <stdlib.h>
10776 #include <stdarg.h>
10777 #include <stdio.h>
10778 #ifdef HAVE_LIBUTF8_H
10779 #include <libutf8.h>
10780 #endif
10781 int
10782 main (void)
10783 {
10784 wint_t state
10785   ;
10786   return 0;
10787 }
10788 _ACEOF
10789 rm -f conftest.$ac_objext
10790 if { (eval echo "$as_me:10790: \"$ac_compile\"") >&5
10791   (eval $ac_compile) 2>&5
10792   ac_status=$?
10793   echo "$as_me:10793: \$? = $ac_status" >&5
10794   (exit $ac_status); } &&
10795          { ac_try='test -s conftest.$ac_objext'
10796   { (eval echo "$as_me:10796: \"$ac_try\"") >&5
10797   (eval $ac_try) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit $ac_status); }; }; then
10801   cf_cv_wint_t=no
10802 else
10803   echo "$as_me: failed program was:" >&5
10804 cat conftest.$ac_ext >&5
10805 cat >conftest.$ac_ext <<_ACEOF
10806 #line 10806 "configure"
10807 #include "confdefs.h"
10808
10809 #include <stdlib.h>
10810 #include <stdarg.h>
10811 #include <stdio.h>
10812 #include <wchar.h>
10813 #ifdef HAVE_LIBUTF8_H
10814 #include <libutf8.h>
10815 #endif
10816 int
10817 main (void)
10818 {
10819 wint_t value
10820   ;
10821   return 0;
10822 }
10823 _ACEOF
10824 rm -f conftest.$ac_objext
10825 if { (eval echo "$as_me:10825: \"$ac_compile\"") >&5
10826   (eval $ac_compile) 2>&5
10827   ac_status=$?
10828   echo "$as_me:10828: \$? = $ac_status" >&5
10829   (exit $ac_status); } &&
10830          { ac_try='test -s conftest.$ac_objext'
10831   { (eval echo "$as_me:10831: \"$ac_try\"") >&5
10832   (eval $ac_try) 2>&5
10833   ac_status=$?
10834   echo "$as_me:10834: \$? = $ac_status" >&5
10835   (exit $ac_status); }; }; then
10836   cf_cv_wint_t=yes
10837 else
10838   echo "$as_me: failed program was:" >&5
10839 cat conftest.$ac_ext >&5
10840 cf_cv_wint_t=unknown
10841 fi
10842 rm -f conftest.$ac_objext conftest.$ac_ext
10843 fi
10844 rm -f conftest.$ac_objext conftest.$ac_ext
10845 fi
10846 echo "$as_me:10846: result: $cf_cv_wint_t" >&5
10847 echo "${ECHO_T}$cf_cv_wint_t" >&6
10848
10849 if test "$cf_cv_wint_t" = yes ; then
10850
10851 cat >>confdefs.h <<\EOF
10852 #define NEED_WCHAR_H 1
10853 EOF
10854
10855         NEED_WCHAR_H=1
10856 fi
10857
10858 # if we do not find wint_t in either place, use substitution to provide a fallback.
10859 if test "$cf_cv_wint_t" = unknown ; then
10860         NCURSES_WINT_T=1
10861 fi
10862
10863 # if we find wint_t in either place, use substitution to provide a fallback.
10864 if test "$cf_cv_wint_t" != unknown ; then
10865         NCURSES_OK_WINT_T=1
10866 fi
10867
10868         if test "$NCURSES_MBSTATE_T" != 0; then
10869
10870 cat >>confdefs.h <<\EOF
10871 #define NEED_MBSTATE_T_DEF 1
10872 EOF
10873
10874         fi
10875 fi
10876
10877 ###   use option --disable-lp64 to allow long chtype
10878 echo "$as_me:10878: checking whether to enable _LP64 definition in curses.h" >&5
10879 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10880
10881 # Check whether --enable-lp64 or --disable-lp64 was given.
10882 if test "${enable_lp64+set}" = set; then
10883   enableval="$enable_lp64"
10884   with_lp64=$enableval
10885 else
10886   with_lp64=$cf_dft_with_lp64
10887 fi;
10888 echo "$as_me:10888: result: $with_lp64" >&5
10889 echo "${ECHO_T}$with_lp64" >&6
10890
10891 if test "x$with_lp64" = xyes ; then
10892         cf_cv_enable_lp64=1
10893 else
10894         cf_cv_enable_lp64=0
10895 fi
10896
10897 # Check whether --enable-largefile or --disable-largefile was given.
10898 if test "${enable_largefile+set}" = set; then
10899   enableval="$enable_largefile"
10900
10901 fi;
10902 if test "$enable_largefile" != no; then
10903
10904   echo "$as_me:10904: checking for special C compiler options needed for large files" >&5
10905 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10906 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10907   echo $ECHO_N "(cached) $ECHO_C" >&6
10908 else
10909   ac_cv_sys_largefile_CC=no
10910      if test "$GCC" != yes; then
10911        ac_save_CC=$CC
10912        while :; do
10913          # IRIX 6.2 and later do not support large files by default,
10914          # so use the C compiler's -n32 option if that helps.
10915          cat >conftest.$ac_ext <<_ACEOF
10916 #line 10916 "configure"
10917 #include "confdefs.h"
10918 #include <sys/types.h>
10919  /* Check that off_t can represent 2**63 - 1 correctly.
10920     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10921     since some C++ compilers masquerading as C compilers
10922     incorrectly reject 9223372036854775807.  */
10923 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10924   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10925                        && LARGE_OFF_T % 2147483647 == 1)
10926                       ? 1 : -1];
10927 int
10928 main (void)
10929 {
10930
10931   ;
10932   return 0;
10933 }
10934 _ACEOF
10935          rm -f conftest.$ac_objext
10936 if { (eval echo "$as_me:10936: \"$ac_compile\"") >&5
10937   (eval $ac_compile) 2>&5
10938   ac_status=$?
10939   echo "$as_me:10939: \$? = $ac_status" >&5
10940   (exit $ac_status); } &&
10941          { ac_try='test -s conftest.$ac_objext'
10942   { (eval echo "$as_me:10942: \"$ac_try\"") >&5
10943   (eval $ac_try) 2>&5
10944   ac_status=$?
10945   echo "$as_me:10945: \$? = $ac_status" >&5
10946   (exit $ac_status); }; }; then
10947   break
10948 else
10949   echo "$as_me: failed program was:" >&5
10950 cat conftest.$ac_ext >&5
10951 fi
10952 rm -f conftest.$ac_objext
10953          CC="$CC -n32"
10954          rm -f conftest.$ac_objext
10955 if { (eval echo "$as_me:10955: \"$ac_compile\"") >&5
10956   (eval $ac_compile) 2>&5
10957   ac_status=$?
10958   echo "$as_me:10958: \$? = $ac_status" >&5
10959   (exit $ac_status); } &&
10960          { ac_try='test -s conftest.$ac_objext'
10961   { (eval echo "$as_me:10961: \"$ac_try\"") >&5
10962   (eval $ac_try) 2>&5
10963   ac_status=$?
10964   echo "$as_me:10964: \$? = $ac_status" >&5
10965   (exit $ac_status); }; }; then
10966   ac_cv_sys_largefile_CC=' -n32'; break
10967 else
10968   echo "$as_me: failed program was:" >&5
10969 cat conftest.$ac_ext >&5
10970 fi
10971 rm -f conftest.$ac_objext
10972          break
10973        done
10974        CC=$ac_save_CC
10975        rm -f conftest.$ac_ext
10976     fi
10977 fi
10978 echo "$as_me:10978: result: $ac_cv_sys_largefile_CC" >&5
10979 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10980   if test "$ac_cv_sys_largefile_CC" != no; then
10981     CC=$CC$ac_cv_sys_largefile_CC
10982   fi
10983
10984   echo "$as_me:10984: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10985 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10986 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10987   echo $ECHO_N "(cached) $ECHO_C" >&6
10988 else
10989   while :; do
10990   ac_cv_sys_file_offset_bits=no
10991   cat >conftest.$ac_ext <<_ACEOF
10992 #line 10992 "configure"
10993 #include "confdefs.h"
10994 #include <sys/types.h>
10995  /* Check that off_t can represent 2**63 - 1 correctly.
10996     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10997     since some C++ compilers masquerading as C compilers
10998     incorrectly reject 9223372036854775807.  */
10999 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11000   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11001                        && LARGE_OFF_T % 2147483647 == 1)
11002                       ? 1 : -1];
11003 int
11004 main (void)
11005 {
11006
11007   ;
11008   return 0;
11009 }
11010 _ACEOF
11011 rm -f conftest.$ac_objext
11012 if { (eval echo "$as_me:11012: \"$ac_compile\"") >&5
11013   (eval $ac_compile) 2>&5
11014   ac_status=$?
11015   echo "$as_me:11015: \$? = $ac_status" >&5
11016   (exit $ac_status); } &&
11017          { ac_try='test -s conftest.$ac_objext'
11018   { (eval echo "$as_me:11018: \"$ac_try\"") >&5
11019   (eval $ac_try) 2>&5
11020   ac_status=$?
11021   echo "$as_me:11021: \$? = $ac_status" >&5
11022   (exit $ac_status); }; }; then
11023   break
11024 else
11025   echo "$as_me: failed program was:" >&5
11026 cat conftest.$ac_ext >&5
11027 fi
11028 rm -f conftest.$ac_objext conftest.$ac_ext
11029   cat >conftest.$ac_ext <<_ACEOF
11030 #line 11030 "configure"
11031 #include "confdefs.h"
11032 #define _FILE_OFFSET_BITS 64
11033 #include <sys/types.h>
11034  /* Check that off_t can represent 2**63 - 1 correctly.
11035     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11036     since some C++ compilers masquerading as C compilers
11037     incorrectly reject 9223372036854775807.  */
11038 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11039   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11040                        && LARGE_OFF_T % 2147483647 == 1)
11041                       ? 1 : -1];
11042 int
11043 main (void)
11044 {
11045
11046   ;
11047   return 0;
11048 }
11049 _ACEOF
11050 rm -f conftest.$ac_objext
11051 if { (eval echo "$as_me:11051: \"$ac_compile\"") >&5
11052   (eval $ac_compile) 2>&5
11053   ac_status=$?
11054   echo "$as_me:11054: \$? = $ac_status" >&5
11055   (exit $ac_status); } &&
11056          { ac_try='test -s conftest.$ac_objext'
11057   { (eval echo "$as_me:11057: \"$ac_try\"") >&5
11058   (eval $ac_try) 2>&5
11059   ac_status=$?
11060   echo "$as_me:11060: \$? = $ac_status" >&5
11061   (exit $ac_status); }; }; then
11062   ac_cv_sys_file_offset_bits=64; break
11063 else
11064   echo "$as_me: failed program was:" >&5
11065 cat conftest.$ac_ext >&5
11066 fi
11067 rm -f conftest.$ac_objext conftest.$ac_ext
11068   break
11069 done
11070 fi
11071 echo "$as_me:11071: result: $ac_cv_sys_file_offset_bits" >&5
11072 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11073 if test "$ac_cv_sys_file_offset_bits" != no; then
11074
11075 cat >>confdefs.h <<EOF
11076 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11077 EOF
11078
11079 fi
11080 rm -rf conftest*
11081   echo "$as_me:11081: checking for _LARGE_FILES value needed for large files" >&5
11082 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11083 if test "${ac_cv_sys_large_files+set}" = set; then
11084   echo $ECHO_N "(cached) $ECHO_C" >&6
11085 else
11086   while :; do
11087   ac_cv_sys_large_files=no
11088   cat >conftest.$ac_ext <<_ACEOF
11089 #line 11089 "configure"
11090 #include "confdefs.h"
11091 #include <sys/types.h>
11092  /* Check that off_t can represent 2**63 - 1 correctly.
11093     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11094     since some C++ compilers masquerading as C compilers
11095     incorrectly reject 9223372036854775807.  */
11096 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11097   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11098                        && LARGE_OFF_T % 2147483647 == 1)
11099                       ? 1 : -1];
11100 int
11101 main (void)
11102 {
11103
11104   ;
11105   return 0;
11106 }
11107 _ACEOF
11108 rm -f conftest.$ac_objext
11109 if { (eval echo "$as_me:11109: \"$ac_compile\"") >&5
11110   (eval $ac_compile) 2>&5
11111   ac_status=$?
11112   echo "$as_me:11112: \$? = $ac_status" >&5
11113   (exit $ac_status); } &&
11114          { ac_try='test -s conftest.$ac_objext'
11115   { (eval echo "$as_me:11115: \"$ac_try\"") >&5
11116   (eval $ac_try) 2>&5
11117   ac_status=$?
11118   echo "$as_me:11118: \$? = $ac_status" >&5
11119   (exit $ac_status); }; }; then
11120   break
11121 else
11122   echo "$as_me: failed program was:" >&5
11123 cat conftest.$ac_ext >&5
11124 fi
11125 rm -f conftest.$ac_objext conftest.$ac_ext
11126   cat >conftest.$ac_ext <<_ACEOF
11127 #line 11127 "configure"
11128 #include "confdefs.h"
11129 #define _LARGE_FILES 1
11130 #include <sys/types.h>
11131  /* Check that off_t can represent 2**63 - 1 correctly.
11132     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11133     since some C++ compilers masquerading as C compilers
11134     incorrectly reject 9223372036854775807.  */
11135 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11136   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11137                        && LARGE_OFF_T % 2147483647 == 1)
11138                       ? 1 : -1];
11139 int
11140 main (void)
11141 {
11142
11143   ;
11144   return 0;
11145 }
11146 _ACEOF
11147 rm -f conftest.$ac_objext
11148 if { (eval echo "$as_me:11148: \"$ac_compile\"") >&5
11149   (eval $ac_compile) 2>&5
11150   ac_status=$?
11151   echo "$as_me:11151: \$? = $ac_status" >&5
11152   (exit $ac_status); } &&
11153          { ac_try='test -s conftest.$ac_objext'
11154   { (eval echo "$as_me:11154: \"$ac_try\"") >&5
11155   (eval $ac_try) 2>&5
11156   ac_status=$?
11157   echo "$as_me:11157: \$? = $ac_status" >&5
11158   (exit $ac_status); }; }; then
11159   ac_cv_sys_large_files=1; break
11160 else
11161   echo "$as_me: failed program was:" >&5
11162 cat conftest.$ac_ext >&5
11163 fi
11164 rm -f conftest.$ac_objext conftest.$ac_ext
11165   break
11166 done
11167 fi
11168 echo "$as_me:11168: result: $ac_cv_sys_large_files" >&5
11169 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11170 if test "$ac_cv_sys_large_files" != no; then
11171
11172 cat >>confdefs.h <<EOF
11173 #define _LARGE_FILES $ac_cv_sys_large_files
11174 EOF
11175
11176 fi
11177 rm -rf conftest*
11178 fi
11179
11180         if test "$enable_largefile" != no ; then
11181         echo "$as_me:11181: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11182 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11183 if test "${ac_cv_sys_largefile_source+set}" = set; then
11184   echo $ECHO_N "(cached) $ECHO_C" >&6
11185 else
11186   while :; do
11187   ac_cv_sys_largefile_source=no
11188   cat >conftest.$ac_ext <<_ACEOF
11189 #line 11189 "configure"
11190 #include "confdefs.h"
11191 #include <stdio.h>
11192 int
11193 main (void)
11194 {
11195 return !fseeko;
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 rm -f conftest.$ac_objext
11201 if { (eval echo "$as_me:11201: \"$ac_compile\"") >&5
11202   (eval $ac_compile) 2>&5
11203   ac_status=$?
11204   echo "$as_me:11204: \$? = $ac_status" >&5
11205   (exit $ac_status); } &&
11206          { ac_try='test -s conftest.$ac_objext'
11207   { (eval echo "$as_me:11207: \"$ac_try\"") >&5
11208   (eval $ac_try) 2>&5
11209   ac_status=$?
11210   echo "$as_me:11210: \$? = $ac_status" >&5
11211   (exit $ac_status); }; }; then
11212   break
11213 else
11214   echo "$as_me: failed program was:" >&5
11215 cat conftest.$ac_ext >&5
11216 fi
11217 rm -f conftest.$ac_objext conftest.$ac_ext
11218   cat >conftest.$ac_ext <<_ACEOF
11219 #line 11219 "configure"
11220 #include "confdefs.h"
11221 #define _LARGEFILE_SOURCE 1
11222 #include <stdio.h>
11223 int
11224 main (void)
11225 {
11226 return !fseeko;
11227   ;
11228   return 0;
11229 }
11230 _ACEOF
11231 rm -f conftest.$ac_objext
11232 if { (eval echo "$as_me:11232: \"$ac_compile\"") >&5
11233   (eval $ac_compile) 2>&5
11234   ac_status=$?
11235   echo "$as_me:11235: \$? = $ac_status" >&5
11236   (exit $ac_status); } &&
11237          { ac_try='test -s conftest.$ac_objext'
11238   { (eval echo "$as_me:11238: \"$ac_try\"") >&5
11239   (eval $ac_try) 2>&5
11240   ac_status=$?
11241   echo "$as_me:11241: \$? = $ac_status" >&5
11242   (exit $ac_status); }; }; then
11243   ac_cv_sys_largefile_source=1; break
11244 else
11245   echo "$as_me: failed program was:" >&5
11246 cat conftest.$ac_ext >&5
11247 fi
11248 rm -f conftest.$ac_objext conftest.$ac_ext
11249   break
11250 done
11251 fi
11252 echo "$as_me:11252: result: $ac_cv_sys_largefile_source" >&5
11253 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11254 if test "$ac_cv_sys_largefile_source" != no; then
11255
11256 cat >>confdefs.h <<EOF
11257 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11258 EOF
11259
11260 fi
11261 rm -rf conftest*
11262
11263 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11264 # in glibc 2.1.3, but that breaks too many other things.
11265 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11266 echo "$as_me:11266: checking for fseeko" >&5
11267 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11268 if test "${ac_cv_func_fseeko+set}" = set; then
11269   echo $ECHO_N "(cached) $ECHO_C" >&6
11270 else
11271   cat >conftest.$ac_ext <<_ACEOF
11272 #line 11272 "configure"
11273 #include "confdefs.h"
11274 #include <stdio.h>
11275 int
11276 main (void)
11277 {
11278 return fseeko && fseeko (stdin, 0, 0);
11279   ;
11280   return 0;
11281 }
11282 _ACEOF
11283 rm -f conftest.$ac_objext conftest$ac_exeext
11284 if { (eval echo "$as_me:11284: \"$ac_link\"") >&5
11285   (eval $ac_link) 2>&5
11286   ac_status=$?
11287   echo "$as_me:11287: \$? = $ac_status" >&5
11288   (exit $ac_status); } &&
11289          { ac_try='test -s conftest$ac_exeext'
11290   { (eval echo "$as_me:11290: \"$ac_try\"") >&5
11291   (eval $ac_try) 2>&5
11292   ac_status=$?
11293   echo "$as_me:11293: \$? = $ac_status" >&5
11294   (exit $ac_status); }; }; then
11295   ac_cv_func_fseeko=yes
11296 else
11297   echo "$as_me: failed program was:" >&5
11298 cat conftest.$ac_ext >&5
11299 ac_cv_func_fseeko=no
11300 fi
11301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11302 fi
11303 echo "$as_me:11303: result: $ac_cv_func_fseeko" >&5
11304 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11305 if test $ac_cv_func_fseeko = yes; then
11306
11307 cat >>confdefs.h <<\EOF
11308 #define HAVE_FSEEKO 1
11309 EOF
11310
11311 fi
11312
11313         # Normally we would collect these definitions in the config.h,
11314         # but (like _XOPEN_SOURCE), some environments rely on having these
11315         # defined before any of the system headers are included.  Another
11316         # case comes up with C++, e.g., on AIX the compiler compiles the
11317         # header files by themselves before looking at the body files it is
11318         # told to compile.  For ncurses, those header files do not include
11319         # the config.h
11320         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11321         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11322         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11323
11324         echo "$as_me:11324: checking whether to use struct dirent64" >&5
11325 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11326 if test "${cf_cv_struct_dirent64+set}" = set; then
11327   echo $ECHO_N "(cached) $ECHO_C" >&6
11328 else
11329
11330                 cat >conftest.$ac_ext <<_ACEOF
11331 #line 11331 "configure"
11332 #include "confdefs.h"
11333
11334 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11335 #include <sys/types.h>
11336 #include <dirent.h>
11337
11338 int
11339 main (void)
11340 {
11341
11342                 /* if transitional largefile support is setup, this is true */
11343                 extern struct dirent64 * readdir(DIR *);
11344                 struct dirent64 *x = readdir((DIR *)0);
11345                 struct dirent *y = readdir((DIR *)0);
11346                 int z = x - y;
11347
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 rm -f conftest.$ac_objext
11353 if { (eval echo "$as_me:11353: \"$ac_compile\"") >&5
11354   (eval $ac_compile) 2>&5
11355   ac_status=$?
11356   echo "$as_me:11356: \$? = $ac_status" >&5
11357   (exit $ac_status); } &&
11358          { ac_try='test -s conftest.$ac_objext'
11359   { (eval echo "$as_me:11359: \"$ac_try\"") >&5
11360   (eval $ac_try) 2>&5
11361   ac_status=$?
11362   echo "$as_me:11362: \$? = $ac_status" >&5
11363   (exit $ac_status); }; }; then
11364   cf_cv_struct_dirent64=yes
11365 else
11366   echo "$as_me: failed program was:" >&5
11367 cat conftest.$ac_ext >&5
11368 cf_cv_struct_dirent64=no
11369 fi
11370 rm -f conftest.$ac_objext conftest.$ac_ext
11371
11372 fi
11373 echo "$as_me:11373: result: $cf_cv_struct_dirent64" >&5
11374 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11375         test "$cf_cv_struct_dirent64" = yes &&
11376 cat >>confdefs.h <<\EOF
11377 #define HAVE_STRUCT_DIRENT64 1
11378 EOF
11379
11380         fi
11381
11382 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11383 echo "$as_me:11383: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11384 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11385
11386 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11387 if test "${enable_tparm_varargs+set}" = set; then
11388   enableval="$enable_tparm_varargs"
11389   with_tparm_varargs=$enableval
11390 else
11391   with_tparm_varargs=yes
11392 fi;
11393 echo "$as_me:11393: result: $with_tparm_varargs" >&5
11394 echo "${ECHO_T}$with_tparm_varargs" >&6
11395 NCURSES_TPARM_VARARGS=0
11396 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11397
11398 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11399 if test "$with_ticlib" != no ; then
11400 echo "$as_me:11400: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11401 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11402
11403 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11404 if test "${enable_tic_depends+set}" = set; then
11405   enableval="$enable_tic_depends"
11406   with_tic_depends=$enableval
11407 else
11408   with_tic_depends=yes
11409 fi;
11410 echo "$as_me:11410: result: $with_tic_depends" >&5
11411 echo "${ECHO_T}$with_tic_depends" >&6
11412 else
11413         with_tic_depends=no
11414 fi
11415
11416 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11417 echo "$as_me:11417: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11418 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11419
11420 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11421 if test "${enable_wattr_macros+set}" = set; then
11422   enableval="$enable_wattr_macros"
11423   with_wattr_macros=$enableval
11424 else
11425   with_wattr_macros=yes
11426 fi;
11427 if [ "x$with_wattr_macros" != xyes ]; then
11428         NCURSES_WATTR_MACROS=0
11429         echo "$as_me:11429: result: yes" >&5
11430 echo "${ECHO_T}yes" >&6
11431 else
11432         NCURSES_WATTR_MACROS=1
11433         echo "$as_me:11433: result: no" >&5
11434 echo "${ECHO_T}no" >&6
11435 fi
11436
11437 ###   use option --with-bool to override bool's type
11438 echo "$as_me:11438: checking for type of bool" >&5
11439 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11440
11441 # Check whether --with-bool or --without-bool was given.
11442 if test "${with_bool+set}" = set; then
11443   withval="$with_bool"
11444   NCURSES_BOOL="$withval"
11445 else
11446   NCURSES_BOOL=auto
11447 fi;
11448 echo "$as_me:11448: result: $NCURSES_BOOL" >&5
11449 echo "${ECHO_T}$NCURSES_BOOL" >&6
11450
11451 echo "$as_me:11451: checking for alternate terminal capabilities file" >&5
11452 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11453
11454 # Check whether --with-caps or --without-caps was given.
11455 if test "${with_caps+set}" = set; then
11456   withval="$with_caps"
11457   TERMINFO_CAPS=Caps.$withval
11458 else
11459   TERMINFO_CAPS=Caps
11460 fi;
11461 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11462 echo "$as_me:11462: result: $TERMINFO_CAPS" >&5
11463 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11464
11465 ###   use option --with-chtype to override chtype's type
11466 echo "$as_me:11466: checking for type of chtype" >&5
11467 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11468
11469 # Check whether --with-chtype or --without-chtype was given.
11470 if test "${with_chtype+set}" = set; then
11471   withval="$with_chtype"
11472   NCURSES_CHTYPE="$withval"
11473 else
11474   NCURSES_CHTYPE=$cf_dft_chtype
11475 fi;
11476 echo "$as_me:11476: result: $NCURSES_CHTYPE" >&5
11477 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11478
11479 ###   use option --with-ospeed to override ospeed's type
11480 echo "$as_me:11480: checking for type of ospeed" >&5
11481 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11482
11483 # Check whether --with-ospeed or --without-ospeed was given.
11484 if test "${with_ospeed+set}" = set; then
11485   withval="$with_ospeed"
11486   NCURSES_OSPEED="$withval"
11487 else
11488   NCURSES_OSPEED=short
11489 fi;
11490 echo "$as_me:11490: result: $NCURSES_OSPEED" >&5
11491 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11492
11493 ###   use option --with-mmask-t to override mmask_t's type
11494 echo "$as_me:11494: checking for type of mmask_t" >&5
11495 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11496
11497 # Check whether --with-mmask-t or --without-mmask-t was given.
11498 if test "${with_mmask_t+set}" = set; then
11499   withval="$with_mmask_t"
11500   NCURSES_MMASK_T="$withval"
11501 else
11502   NCURSES_MMASK_T=$cf_dft_mmask_t
11503 fi;
11504 echo "$as_me:11504: result: $NCURSES_MMASK_T" >&5
11505 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11506
11507 ###   use option --with-ccharw-max to override CCHARW_MAX size
11508 echo "$as_me:11508: checking for size CCHARW_MAX" >&5
11509 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11510
11511 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11512 if test "${with_ccharw_max+set}" = set; then
11513   withval="$with_ccharw_max"
11514   NCURSES_CCHARW_MAX="$withval"
11515 else
11516   NCURSES_CCHARW_MAX=5
11517 fi;
11518 echo "$as_me:11518: result: $NCURSES_CCHARW_MAX" >&5
11519 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11520
11521 ###   use option --with-tparm-arg to override tparm's argument type
11522 echo "$as_me:11522: checking for type of tparm args" >&5
11523 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11524
11525 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11526 if test "${with_tparm_arg+set}" = set; then
11527   withval="$with_tparm_arg"
11528   NCURSES_TPARM_ARG="$withval"
11529 else
11530   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11531 fi;
11532 echo "$as_me:11532: result: $NCURSES_TPARM_ARG" >&5
11533 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11534
11535 ### Enable compiling-in rcs id's
11536 echo "$as_me:11536: checking if RCS identifiers should be compiled-in" >&5
11537 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11538
11539 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11540 if test "${with_rcs_ids+set}" = set; then
11541   withval="$with_rcs_ids"
11542   with_rcs_ids=$withval
11543 else
11544   with_rcs_ids=no
11545 fi;
11546 echo "$as_me:11546: result: $with_rcs_ids" >&5
11547 echo "${ECHO_T}$with_rcs_ids" >&6
11548 test "x$with_rcs_ids" = xyes &&
11549 cat >>confdefs.h <<\EOF
11550 #define USE_RCS_IDS 1
11551 EOF
11552
11553 ###############################################################################
11554
11555 echo "$as_me:11555: checking format of man-pages" >&5
11556 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11557
11558 # Check whether --with-manpage-format or --without-manpage-format was given.
11559 if test "${with_manpage_format+set}" = set; then
11560   withval="$with_manpage_format"
11561   MANPAGE_FORMAT=$withval
11562 else
11563   MANPAGE_FORMAT=unknown
11564 fi;
11565
11566 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11567 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11568
11569 cf_unknown=
11570
11571 case $MANPAGE_FORMAT in
11572 (unknown)
11573         if test -z "$MANPATH" ; then
11574                 MANPATH="/usr/man:/usr/share/man"
11575         fi
11576
11577         # look for the 'date' man-page (it's most likely to be installed!)
11578         MANPAGE_FORMAT=
11579         cf_preform=no
11580         cf_catonly=yes
11581         cf_example=date
11582
11583         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11584         for cf_dir in $MANPATH; do
11585                 test -z "$cf_dir" && cf_dir=/usr/man
11586                 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
11587                 do
11588                         cf_test=`echo $cf_name | sed -e 's/*//'`
11589                         if test "x$cf_test" = "x$cf_name" ; then
11590
11591                                 case "$cf_name" in
11592                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11593                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11594                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11595                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11596                                 esac
11597
11598                                 case "$cf_name" in
11599                                 ($cf_dir/man*)
11600                                         cf_catonly=no
11601                                         ;;
11602                                 ($cf_dir/cat*)
11603                                         cf_preform=yes
11604                                         ;;
11605                                 esac
11606                                 break
11607                         fi
11608
11609                         # if we found a match in either man* or cat*, stop looking
11610                         if test -n "$MANPAGE_FORMAT" ; then
11611                                 cf_found=no
11612                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11613                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11614                                 case "$cf_name" in
11615                                 ($cf_dir/cat*)
11616                                         cf_found=yes
11617                                         ;;
11618                                 esac
11619                                 test $cf_found=yes && break
11620                         fi
11621                 done
11622                 # only check the first directory in $MANPATH where we find manpages
11623                 if test -n "$MANPAGE_FORMAT" ; then
11624                         break
11625                 fi
11626         done
11627         # if we did not find the example, just assume it is normal
11628         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11629         IFS="$ac_save_ifs"
11630         ;;
11631 (*)
11632         for cf_option in $MANPAGE_FORMAT; do
11633         case $cf_option in
11634         (gzip|compress|BSDI|normal|formatted|catonly)
11635                 ;;
11636         (*)
11637                 cf_unknown="$cf_unknown $cf_option"
11638                 ;;
11639         esac
11640         done
11641         ;;
11642 esac
11643
11644 echo "$as_me:11644: result: $MANPAGE_FORMAT" >&5
11645 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11646 if test -n "$cf_unknown" ; then
11647         { echo "$as_me:11647: WARNING: Unexpected manpage-format $cf_unknown" >&5
11648 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11649 fi
11650
11651 echo "$as_me:11651: checking for manpage renaming" >&5
11652 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11653
11654 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11655 if test "${with_manpage_renames+set}" = set; then
11656   withval="$with_manpage_renames"
11657   MANPAGE_RENAMES=$withval
11658 else
11659   MANPAGE_RENAMES=yes
11660 fi;
11661
11662 case ".$MANPAGE_RENAMES" in
11663 (.no)
11664         ;;
11665 (.|.yes)
11666         # Debian 'man' program?
11667         if test -f /etc/debian_version ; then
11668                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11669         else
11670                 MANPAGE_RENAMES=no
11671         fi
11672         ;;
11673 esac
11674
11675 if test "$MANPAGE_RENAMES" != no ; then
11676         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11677                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11678         elif test ! -f $MANPAGE_RENAMES ; then
11679                 { { echo "$as_me:11679: error: not a filename: $MANPAGE_RENAMES" >&5
11680 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11681    { (exit 1); exit 1; }; }
11682         fi
11683
11684         test ! -d man && mkdir man
11685
11686         # Construct a sed-script to perform renaming within man-pages
11687         if test -n "$MANPAGE_RENAMES" ; then
11688                 test ! -d man && mkdir man
11689                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11690         fi
11691 fi
11692
11693 echo "$as_me:11693: result: $MANPAGE_RENAMES" >&5
11694 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11695
11696 echo "$as_me:11696: checking if manpage aliases will be installed" >&5
11697 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11698
11699 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11700 if test "${with_manpage_aliases+set}" = set; then
11701   withval="$with_manpage_aliases"
11702   MANPAGE_ALIASES=$withval
11703 else
11704   MANPAGE_ALIASES=yes
11705 fi;
11706
11707 echo "$as_me:11707: result: $MANPAGE_ALIASES" >&5
11708 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11709
11710 case "x$LN_S" in
11711 (xln*)
11712         cf_use_symlinks=yes
11713         ;;
11714 (*)
11715         cf_use_symlinks=no
11716         ;;
11717 esac
11718
11719 MANPAGE_SYMLINKS=no
11720 if test "$MANPAGE_ALIASES" = yes ; then
11721 echo "$as_me:11721: checking if manpage symlinks should be used" >&5
11722 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11723
11724 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11725 if test "${with_manpage_symlinks+set}" = set; then
11726   withval="$with_manpage_symlinks"
11727   MANPAGE_SYMLINKS=$withval
11728 else
11729   MANPAGE_SYMLINKS=$cf_use_symlinks
11730 fi;
11731
11732 if test "$$cf_use_symlinks" = no; then
11733 if test "$MANPAGE_SYMLINKS" = yes ; then
11734         { echo "$as_me:11734: WARNING: cannot make symlinks" >&5
11735 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11736         MANPAGE_SYMLINKS=no
11737 fi
11738 fi
11739
11740 echo "$as_me:11740: result: $MANPAGE_SYMLINKS" >&5
11741 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11742 fi
11743
11744 echo "$as_me:11744: checking for manpage tbl" >&5
11745 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11746
11747 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11748 if test "${with_manpage_tbl+set}" = set; then
11749   withval="$with_manpage_tbl"
11750   MANPAGE_TBL=$withval
11751 else
11752   MANPAGE_TBL=no
11753 fi;
11754
11755 echo "$as_me:11755: result: $MANPAGE_TBL" >&5
11756 echo "${ECHO_T}$MANPAGE_TBL" >&6
11757
11758 if test "$prefix" = "NONE" ; then
11759         cf_prefix="$ac_default_prefix"
11760 else
11761         cf_prefix="$prefix"
11762 fi
11763
11764 case "$MANPAGE_FORMAT" in
11765 (*catonly*)
11766         cf_format=yes
11767         cf_inboth=no
11768         ;;
11769 (*formatted*)
11770         cf_format=yes
11771         cf_inboth=yes
11772         ;;
11773 (*)
11774         cf_format=no
11775         cf_inboth=no
11776         ;;
11777 esac
11778
11779 test ! -d man && mkdir man
11780
11781 cf_so_strip=
11782 cf_compress=
11783 case "$MANPAGE_FORMAT" in
11784 (*compress*)
11785         cf_so_strip="Z"
11786         cf_compress=compress
11787         ;;
11788 (*gzip*)
11789         cf_so_strip="gz"
11790         cf_compress=gzip
11791         ;;
11792 esac
11793
11794 cf_edit_man=./edit_man.sh
11795 cf_man_alias=`pwd`/man_alias.sed
11796
11797 cat >$cf_edit_man <<CF_EOF
11798 #! $SHELL
11799 # this script is generated by the configure-script CF_MAN_PAGES macro.
11800
11801 prefix="$cf_prefix"
11802 datarootdir="$datarootdir"
11803 datadir="$datadir"
11804
11805 NCURSES_MAJOR="$NCURSES_MAJOR"
11806 NCURSES_MINOR="$NCURSES_MINOR"
11807 NCURSES_PATCH="$NCURSES_PATCH"
11808
11809 NCURSES_OSPEED="$NCURSES_OSPEED"
11810 TERMINFO="$TERMINFO"
11811
11812 INSTALL="$INSTALL"
11813 INSTALL_DATA="$INSTALL_DATA"
11814
11815 transform="$program_transform_name"
11816
11817 TMP=\${TMPDIR:=/tmp}/man\$\$
11818 trap "rm -f \$TMP" 0 1 2 5 15
11819
11820 form=\$1
11821 shift || exit 1
11822
11823 verb=\$1
11824 shift || exit 1
11825
11826 mandir=\$1
11827 shift || exit 1
11828
11829 srcdir=\$1
11830 top_srcdir=\$srcdir/..
11831 shift || exit 1
11832
11833 if test "\$form" = normal ; then
11834         if test "$cf_format" = yes ; then
11835         if test "$cf_inboth" = no ; then
11836                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11837                 exit $?
11838         fi
11839         fi
11840         cf_subdir=\$mandir/man
11841         cf_tables=$MANPAGE_TBL
11842 else
11843         cf_subdir=\$mandir/cat
11844         cf_tables=yes
11845 fi
11846
11847 # process the list of source-files
11848 for i in \$* ; do
11849 case \$i in
11850 (*.orig|*.rej) ;;
11851 (*.[0-9]*)
11852         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11853         if test \$verb = installing ; then
11854         if test ! -d \$cf_subdir\${section} ; then
11855                 mkdir -p \$cf_subdir\$section
11856         fi
11857         fi
11858
11859         # replace variables in man page
11860         if test ! -f $cf_man_alias ; then
11861 cat >>$cf_man_alias <<-CF_EOF2
11862                 s,@DATADIR@,\$datadir,g
11863                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11864                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11865                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11866                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11867                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11868                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11869 CF_EOF
11870
11871         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11872         do
11873                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11874                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11875 cat >>$cf_edit_man <<-CF_EOF
11876                 s,@$cf_NAME@,$cf_name,g
11877 CF_EOF
11878         done
11879
11880 cat >>$cf_edit_man <<CF_EOF
11881 CF_EOF2
11882                 echo "...made $cf_man_alias"
11883         fi
11884
11885         aliases=
11886         cf_source=\`basename \$i\`
11887         inalias=\$cf_source
11888         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11889         if test ! -f \$inalias ; then
11890                 echo .. skipped \$cf_source
11891                 continue
11892         fi
11893 CF_EOF
11894
11895 if test "$MANPAGE_ALIASES" != no ; then
11896 cat >>$cf_edit_man <<CF_EOF
11897         nCurses=ignore.3x
11898         test $with_curses_h = yes && nCurses=ncurses.3x
11899         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11900 CF_EOF
11901 fi
11902
11903 if test "$MANPAGE_RENAMES" = no ; then
11904 cat >>$cf_edit_man <<CF_EOF
11905         # perform program transformations for section 1 man pages
11906         if test \$section = 1 ; then
11907                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11908         else
11909                 cf_target=\$cf_subdir\${section}/\$cf_source
11910         fi
11911 CF_EOF
11912 else
11913 cat >>$cf_edit_man <<CF_EOF
11914         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11915         if test -z "\$cf_target" ; then
11916                 echo '? missing rename for '\$cf_source
11917                 cf_target="\$cf_source"
11918         fi
11919         cf_target="\$cf_subdir\${section}/\${cf_target}"
11920
11921 CF_EOF
11922 fi
11923
11924 cat >>$cf_edit_man <<CF_EOF
11925         sed     -f $cf_man_alias \\
11926 CF_EOF
11927
11928 if test -f $MANPAGE_RENAMES ; then
11929 cat >>$cf_edit_man <<CF_EOF
11930                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11931 CF_EOF
11932 else
11933 cat >>$cf_edit_man <<CF_EOF
11934                 < \$i >\$TMP
11935 CF_EOF
11936 fi
11937
11938 cat >>$cf_edit_man <<CF_EOF
11939 if test \$cf_tables = yes ; then
11940         tbl \$TMP >\$TMP.out
11941         mv \$TMP.out \$TMP
11942 fi
11943 CF_EOF
11944
11945 if test $with_overwrite != yes ; then
11946 cat >>$cf_edit_man <<CF_EOF
11947         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11948         mv \$TMP.out \$TMP
11949 CF_EOF
11950 fi
11951
11952 if test $with_curses_h != yes ; then
11953 cat >>$cf_edit_man <<CF_EOF
11954         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11955         mv \$TMP.out \$TMP
11956 CF_EOF
11957 fi
11958
11959 cat >>$cf_edit_man <<CF_EOF
11960         if test \$form = format ; then
11961                 nroff -man \$TMP >\$TMP.out
11962                 mv \$TMP.out \$TMP
11963         fi
11964 CF_EOF
11965
11966 if test -n "$cf_compress" ; then
11967 cat >>$cf_edit_man <<CF_EOF
11968         if test \$verb = installing ; then
11969         if ( $cf_compress -f \$TMP )
11970         then
11971                 mv \$TMP.$cf_so_strip \$TMP
11972         fi
11973         fi
11974         cf_target="\$cf_target.$cf_so_strip"
11975 CF_EOF
11976 fi
11977
11978 case "$MANPAGE_FORMAT" in
11979 (*BSDI*)
11980 cat >>$cf_edit_man <<CF_EOF
11981         if test \$form = format ; then
11982                 # BSDI installs only .0 suffixes in the cat directories
11983                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11984         fi
11985 CF_EOF
11986   ;;
11987 esac
11988
11989 cat >>$cf_edit_man <<CF_EOF
11990         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11991         if test \$verb = installing ; then
11992                 echo \$verb \$cf_target
11993                 \$INSTALL_DATA \$TMP \$cf_target
11994                 test -d \$cf_subdir\${section} &&
11995                 test -n "\$aliases" && (
11996                         cd \$cf_subdir\${section} && (
11997                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11998                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11999                                 cf_target=\`basename \$cf_target\`
12000                                 for cf_alias in \$aliases
12001                                 do
12002                                         if test \$section = 1 ; then
12003                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12004                                         fi
12005
12006                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12007                                                 if test -f \$cf_alias\${suffix} ; then
12008                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12009                                                         then
12010                                                                 continue
12011                                                         fi
12012                                                 fi
12013                                                 echo .. \$verb alias \$cf_alias\${suffix}
12014 CF_EOF
12015 case "x$LN_S" in
12016 (*-f)
12017 cat >>$cf_edit_man <<CF_EOF
12018                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12019 CF_EOF
12020         ;;
12021 (*)
12022 cat >>$cf_edit_man <<CF_EOF
12023                                                 rm -f \$cf_alias\${suffix}
12024                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12025 CF_EOF
12026         ;;
12027 esac
12028 cat >>$cf_edit_man <<CF_EOF
12029                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12030                                                 echo ".so \$cf_source" >\$TMP
12031 CF_EOF
12032 if test -n "$cf_compress" ; then
12033 cat >>$cf_edit_man <<CF_EOF
12034                                                 if test -n "$cf_so_strip" ; then
12035                                                         $cf_compress -f \$TMP
12036                                                         mv \$TMP.$cf_so_strip \$TMP
12037                                                 fi
12038 CF_EOF
12039 fi
12040 cat >>$cf_edit_man <<CF_EOF
12041                                                 echo .. \$verb alias \$cf_alias\${suffix}
12042                                                 rm -f \$cf_alias\${suffix}
12043                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12044                                         fi
12045                                 done
12046                         )
12047                 )
12048         elif test \$verb = removing ; then
12049                 test -f \$cf_target && (
12050                         echo \$verb \$cf_target
12051                         rm -f \$cf_target
12052                 )
12053                 test -d \$cf_subdir\${section} &&
12054                 test -n "\$aliases" && (
12055                         cd \$cf_subdir\${section} && (
12056                                 for cf_alias in \$aliases
12057                                 do
12058                                         if test \$section = 1 ; then
12059                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12060                                         fi
12061
12062                                         echo .. \$verb alias \$cf_alias\${suffix}
12063                                         rm -f \$cf_alias\${suffix}
12064                                 done
12065                         )
12066                 )
12067         else
12068 #               echo ".hy 0"
12069                 cat \$TMP
12070         fi
12071         ;;
12072 esac
12073 done
12074
12075 if test $cf_inboth = yes ; then
12076 if test \$form != format ; then
12077         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12078 fi
12079 fi
12080
12081 exit 0
12082 CF_EOF
12083 chmod 755 $cf_edit_man
12084
12085 ###############################################################################
12086
12087 ### Note that some functions (such as const) are normally disabled anyway.
12088 echo "$as_me:12088: checking if you want to build with function extensions" >&5
12089 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12090
12091 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12092 if test "${enable_ext_funcs+set}" = set; then
12093   enableval="$enable_ext_funcs"
12094   with_ext_funcs=$enableval
12095 else
12096   with_ext_funcs=yes
12097 fi;
12098 echo "$as_me:12098: result: $with_ext_funcs" >&5
12099 echo "${ECHO_T}$with_ext_funcs" >&6
12100 if test "x$with_ext_funcs" = xyes ; then
12101         NCURSES_EXT_FUNCS=1
12102
12103 cat >>confdefs.h <<\EOF
12104 #define NCURSES_EXT_FUNCS 1
12105 EOF
12106
12107 cat >>confdefs.h <<\EOF
12108 #define HAVE_ASSUME_DEFAULT_COLORS 1
12109 EOF
12110
12111 cat >>confdefs.h <<\EOF
12112 #define HAVE_CURSES_VERSION 1
12113 EOF
12114
12115 cat >>confdefs.h <<\EOF
12116 #define HAVE_HAS_KEY 1
12117 EOF
12118
12119 cat >>confdefs.h <<\EOF
12120 #define HAVE_RESIZETERM 1
12121 EOF
12122
12123 cat >>confdefs.h <<\EOF
12124 #define HAVE_RESIZE_TERM 1
12125 EOF
12126
12127 cat >>confdefs.h <<\EOF
12128 #define HAVE_TERM_ENTRY_H 1
12129 EOF
12130
12131 cat >>confdefs.h <<\EOF
12132 #define HAVE_USE_DEFAULT_COLORS 1
12133 EOF
12134
12135 cat >>confdefs.h <<\EOF
12136 #define HAVE_USE_EXTENDED_NAMES 1
12137 EOF
12138
12139 cat >>confdefs.h <<\EOF
12140 #define HAVE_USE_SCREEN 1
12141 EOF
12142
12143 cat >>confdefs.h <<\EOF
12144 #define HAVE_USE_WINDOW 1
12145 EOF
12146
12147 cat >>confdefs.h <<\EOF
12148 #define HAVE_WRESIZE 1
12149 EOF
12150
12151         GENERATED_EXT_FUNCS=generated
12152         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12153 else
12154         NCURSES_EXT_FUNCS=0
12155         GENERATED_EXT_FUNCS=
12156 fi
12157
12158 echo "$as_me:12158: checking if you want to build with SCREEN extensions" >&5
12159 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12160
12161 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12162 if test "${enable_sp_funcs+set}" = set; then
12163   enableval="$enable_sp_funcs"
12164   with_sp_funcs=$enableval
12165 else
12166   with_sp_funcs=$cf_dft_ext_spfuncs
12167 fi;
12168 echo "$as_me:12168: result: $with_sp_funcs" >&5
12169 echo "${ECHO_T}$with_sp_funcs" >&6
12170 if test "x$with_sp_funcs" = xyes ; then
12171         NCURSES_SP_FUNCS=1
12172
12173 cat >>confdefs.h <<\EOF
12174 #define NCURSES_SP_FUNCS 1
12175 EOF
12176
12177 cat >>confdefs.h <<\EOF
12178 #define HAVE_TPUTS_SP 1
12179 EOF
12180
12181         GENERATED_SP_FUNCS=generated
12182 else
12183         NCURSES_SP_FUNCS=0
12184         GENERATED_SP_FUNCS=
12185 fi
12186
12187 echo "$as_me:12187: checking if you want to build with terminal-driver" >&5
12188 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12189
12190 # Check whether --enable-term-driver or --disable-term-driver was given.
12191 if test "${enable_term_driver+set}" = set; then
12192   enableval="$enable_term_driver"
12193   with_term_driver=$enableval
12194 else
12195   with_term_driver=no
12196 fi;
12197 echo "$as_me:12197: result: $with_term_driver" >&5
12198 echo "${ECHO_T}$with_term_driver" >&6
12199 if test "x$with_term_driver" = xyes ; then
12200
12201 cat >>confdefs.h <<\EOF
12202 #define USE_TERM_DRIVER 1
12203 EOF
12204
12205         if test "x$with_termlib" != xno ; then
12206                 { { echo "$as_me:12206: error: The term-driver option conflicts with the termlib option" >&5
12207 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12208    { (exit 1); exit 1; }; }
12209         fi
12210         if test "x$with_sp_funcs" != xyes ; then
12211                 { { echo "$as_me:12211: error: The term-driver option relies upon sp-funcs" >&5
12212 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12213    { (exit 1); exit 1; }; }
12214         fi
12215 fi
12216
12217 ###   use option --enable-const to turn on use of const beyond that in XSI.
12218 echo "$as_me:12218: checking for extended use of const keyword" >&5
12219 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12220
12221 # Check whether --enable-const or --disable-const was given.
12222 if test "${enable_const+set}" = set; then
12223   enableval="$enable_const"
12224   with_ext_const=$enableval
12225 else
12226   with_ext_const=$cf_dft_ext_const
12227 fi;
12228 echo "$as_me:12228: result: $with_ext_const" >&5
12229 echo "${ECHO_T}$with_ext_const" >&6
12230 NCURSES_CONST='/*nothing*/'
12231 if test "x$with_ext_const" = xyes ; then
12232         NCURSES_CONST=const
12233 fi
12234
12235 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12236 echo "$as_me:12236: checking if you want to use extended colors" >&5
12237 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12238
12239 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12240 if test "${enable_ext_colors+set}" = set; then
12241   enableval="$enable_ext_colors"
12242   with_ext_colors=$enableval
12243 else
12244   with_ext_colors=$cf_dft_ext_colors
12245 fi;
12246 echo "$as_me:12246: result: $with_ext_colors" >&5
12247 echo "${ECHO_T}$with_ext_colors" >&6
12248 NCURSES_EXT_COLORS=0
12249 if test "x$with_ext_colors" = xyes ; then
12250         if test "x$with_widec" != xyes ; then
12251                 { echo "$as_me:12251: WARNING: This option applies only to wide-character library" >&5
12252 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12253         else
12254                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12255
12256 if test "${with_abi_version+set}" != set; then
12257         case $cf_cv_rel_version in
12258         (5.*)
12259                 cf_cv_rel_version=6.0
12260                 cf_cv_abi_version=6
12261                 { echo "$as_me:12261: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12262 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12263                 ;;
12264         esac
12265 fi
12266
12267                 NCURSES_EXT_COLORS=1
12268
12269 cat >>confdefs.h <<\EOF
12270 #define NCURSES_EXT_COLORS 1
12271 EOF
12272
12273 cat >>confdefs.h <<\EOF
12274 #define HAVE_ALLOC_PAIR 1
12275 EOF
12276
12277 cat >>confdefs.h <<\EOF
12278 #define HAVE_INIT_EXTENDED_COLOR 1
12279 EOF
12280
12281         fi
12282 fi
12283
12284 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12285 echo "$as_me:12285: checking if you want to use extended mouse encoding" >&5
12286 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12287
12288 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12289 if test "${enable_ext_mouse+set}" = set; then
12290   enableval="$enable_ext_mouse"
12291   with_ext_mouse=$enableval
12292 else
12293   with_ext_mouse=$cf_dft_ext_mouse
12294 fi;
12295 echo "$as_me:12295: result: $with_ext_mouse" >&5
12296 echo "${ECHO_T}$with_ext_mouse" >&6
12297 NCURSES_MOUSE_VERSION=1
12298 if test "x$with_ext_mouse" = xyes ; then
12299         NCURSES_MOUSE_VERSION=2
12300
12301 if test "${with_abi_version+set}" != set; then
12302         case $cf_cv_rel_version in
12303         (5.*)
12304                 cf_cv_rel_version=6.0
12305                 cf_cv_abi_version=6
12306                 { echo "$as_me:12306: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12307 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12308                 ;;
12309         esac
12310 fi
12311
12312 fi
12313
12314 ###   use option --enable-ext-putwin to turn on extended screendumps
12315 echo "$as_me:12315: checking if you want to use extended putwin/screendump" >&5
12316 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12317
12318 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12319 if test "${enable_ext_putwin+set}" = set; then
12320   enableval="$enable_ext_putwin"
12321   with_ext_putwin=$enableval
12322 else
12323   with_ext_putwin=$cf_dft_ext_putwin
12324 fi;
12325 echo "$as_me:12325: result: $with_ext_putwin" >&5
12326 echo "${ECHO_T}$with_ext_putwin" >&6
12327 if test "x$with_ext_putwin" = xyes ; then
12328
12329 cat >>confdefs.h <<\EOF
12330 #define NCURSES_EXT_PUTWIN 1
12331 EOF
12332
12333 fi
12334
12335 echo "$as_me:12335: checking if you want \$NCURSES_NO_PADDING code" >&5
12336 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12337
12338 # Check whether --enable-no-padding or --disable-no-padding was given.
12339 if test "${enable_no_padding+set}" = set; then
12340   enableval="$enable_no_padding"
12341   with_no_padding=$enableval
12342 else
12343   with_no_padding=$with_ext_funcs
12344 fi;
12345 echo "$as_me:12345: result: $with_no_padding" >&5
12346 echo "${ECHO_T}$with_no_padding" >&6
12347 test "x$with_no_padding" = xyes &&
12348 cat >>confdefs.h <<\EOF
12349 #define NCURSES_NO_PADDING 1
12350 EOF
12351
12352 echo "$as_me:12352: checking for ANSI C header files" >&5
12353 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12354 if test "${ac_cv_header_stdc+set}" = set; then
12355   echo $ECHO_N "(cached) $ECHO_C" >&6
12356 else
12357   cat >conftest.$ac_ext <<_ACEOF
12358 #line 12358 "configure"
12359 #include "confdefs.h"
12360 #include <stdlib.h>
12361 #include <stdarg.h>
12362 #include <string.h>
12363 #include <float.h>
12364
12365 _ACEOF
12366 if { (eval echo "$as_me:12366: \"$ac_cpp conftest.$ac_ext\"") >&5
12367   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12368   ac_status=$?
12369   egrep -v '^ *\+' conftest.er1 >conftest.err
12370   rm -f conftest.er1
12371   cat conftest.err >&5
12372   echo "$as_me:12372: \$? = $ac_status" >&5
12373   (exit $ac_status); } >/dev/null; then
12374   if test -s conftest.err; then
12375     ac_cpp_err=$ac_c_preproc_warn_flag
12376   else
12377     ac_cpp_err=
12378   fi
12379 else
12380   ac_cpp_err=yes
12381 fi
12382 if test -z "$ac_cpp_err"; then
12383   ac_cv_header_stdc=yes
12384 else
12385   echo "$as_me: failed program was:" >&5
12386   cat conftest.$ac_ext >&5
12387   ac_cv_header_stdc=no
12388 fi
12389 rm -f conftest.err conftest.$ac_ext
12390
12391 if test $ac_cv_header_stdc = yes; then
12392   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12393   cat >conftest.$ac_ext <<_ACEOF
12394 #line 12394 "configure"
12395 #include "confdefs.h"
12396 #include <string.h>
12397
12398 _ACEOF
12399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12400   egrep "memchr" >/dev/null 2>&1; then
12401   :
12402 else
12403   ac_cv_header_stdc=no
12404 fi
12405 rm -rf conftest*
12406
12407 fi
12408
12409 if test $ac_cv_header_stdc = yes; then
12410   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12411   cat >conftest.$ac_ext <<_ACEOF
12412 #line 12412 "configure"
12413 #include "confdefs.h"
12414 #include <stdlib.h>
12415
12416 _ACEOF
12417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12418   egrep "free" >/dev/null 2>&1; then
12419   :
12420 else
12421   ac_cv_header_stdc=no
12422 fi
12423 rm -rf conftest*
12424
12425 fi
12426
12427 if test $ac_cv_header_stdc = yes; then
12428   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12429   if test "$cross_compiling" = yes; then
12430   :
12431 else
12432   cat >conftest.$ac_ext <<_ACEOF
12433 #line 12433 "configure"
12434 #include "confdefs.h"
12435 #include <ctype.h>
12436 #if ((' ' & 0x0FF) == 0x020)
12437 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12438 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12439 #else
12440 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12441                      || ('j' <= (c) && (c) <= 'r') \
12442                      || ('s' <= (c) && (c) <= 'z'))
12443 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12444 #endif
12445
12446 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12447 int
12448 main (void)
12449 {
12450   int i;
12451   for (i = 0; i < 256; i++)
12452     if (XOR (islower (i), ISLOWER (i))
12453         || toupper (i) != TOUPPER (i))
12454       $ac_main_return(2);
12455   $ac_main_return (0);
12456 }
12457 _ACEOF
12458 rm -f conftest$ac_exeext
12459 if { (eval echo "$as_me:12459: \"$ac_link\"") >&5
12460   (eval $ac_link) 2>&5
12461   ac_status=$?
12462   echo "$as_me:12462: \$? = $ac_status" >&5
12463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12464   { (eval echo "$as_me:12464: \"$ac_try\"") >&5
12465   (eval $ac_try) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); }; }; then
12469   :
12470 else
12471   echo "$as_me: program exited with status $ac_status" >&5
12472 echo "$as_me: failed program was:" >&5
12473 cat conftest.$ac_ext >&5
12474 ac_cv_header_stdc=no
12475 fi
12476 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12477 fi
12478 fi
12479 fi
12480 echo "$as_me:12480: result: $ac_cv_header_stdc" >&5
12481 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12482 if test $ac_cv_header_stdc = yes; then
12483
12484 cat >>confdefs.h <<\EOF
12485 #define STDC_HEADERS 1
12486 EOF
12487
12488 fi
12489
12490 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12491
12492 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12493                   inttypes.h stdint.h unistd.h
12494 do
12495 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12496 echo "$as_me:12496: checking for $ac_header" >&5
12497 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12498 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12499   echo $ECHO_N "(cached) $ECHO_C" >&6
12500 else
12501   cat >conftest.$ac_ext <<_ACEOF
12502 #line 12502 "configure"
12503 #include "confdefs.h"
12504 $ac_includes_default
12505 #include <$ac_header>
12506 _ACEOF
12507 rm -f conftest.$ac_objext
12508 if { (eval echo "$as_me:12508: \"$ac_compile\"") >&5
12509   (eval $ac_compile) 2>&5
12510   ac_status=$?
12511   echo "$as_me:12511: \$? = $ac_status" >&5
12512   (exit $ac_status); } &&
12513          { ac_try='test -s conftest.$ac_objext'
12514   { (eval echo "$as_me:12514: \"$ac_try\"") >&5
12515   (eval $ac_try) 2>&5
12516   ac_status=$?
12517   echo "$as_me:12517: \$? = $ac_status" >&5
12518   (exit $ac_status); }; }; then
12519   eval "$as_ac_Header=yes"
12520 else
12521   echo "$as_me: failed program was:" >&5
12522 cat conftest.$ac_ext >&5
12523 eval "$as_ac_Header=no"
12524 fi
12525 rm -f conftest.$ac_objext conftest.$ac_ext
12526 fi
12527 echo "$as_me:12527: result: `eval echo '${'$as_ac_Header'}'`" >&5
12528 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12529 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12530   cat >>confdefs.h <<EOF
12531 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12532 EOF
12533
12534 fi
12535 done
12536
12537 echo "$as_me:12537: checking for signed char" >&5
12538 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12539 if test "${ac_cv_type_signed_char+set}" = set; then
12540   echo $ECHO_N "(cached) $ECHO_C" >&6
12541 else
12542   cat >conftest.$ac_ext <<_ACEOF
12543 #line 12543 "configure"
12544 #include "confdefs.h"
12545 $ac_includes_default
12546 int
12547 main (void)
12548 {
12549 if ((signed char *) 0)
12550   return 0;
12551 if (sizeof (signed char))
12552   return 0;
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557 rm -f conftest.$ac_objext
12558 if { (eval echo "$as_me:12558: \"$ac_compile\"") >&5
12559   (eval $ac_compile) 2>&5
12560   ac_status=$?
12561   echo "$as_me:12561: \$? = $ac_status" >&5
12562   (exit $ac_status); } &&
12563          { ac_try='test -s conftest.$ac_objext'
12564   { (eval echo "$as_me:12564: \"$ac_try\"") >&5
12565   (eval $ac_try) 2>&5
12566   ac_status=$?
12567   echo "$as_me:12567: \$? = $ac_status" >&5
12568   (exit $ac_status); }; }; then
12569   ac_cv_type_signed_char=yes
12570 else
12571   echo "$as_me: failed program was:" >&5
12572 cat conftest.$ac_ext >&5
12573 ac_cv_type_signed_char=no
12574 fi
12575 rm -f conftest.$ac_objext conftest.$ac_ext
12576 fi
12577 echo "$as_me:12577: result: $ac_cv_type_signed_char" >&5
12578 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12579
12580 echo "$as_me:12580: checking size of signed char" >&5
12581 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12582 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12583   echo $ECHO_N "(cached) $ECHO_C" >&6
12584 else
12585   if test "$ac_cv_type_signed_char" = yes; then
12586   if test "$cross_compiling" = yes; then
12587   # Depending upon the size, compute the lo and hi bounds.
12588 cat >conftest.$ac_ext <<_ACEOF
12589 #line 12589 "configure"
12590 #include "confdefs.h"
12591 $ac_includes_default
12592 int
12593 main (void)
12594 {
12595 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12596   ;
12597   return 0;
12598 }
12599 _ACEOF
12600 rm -f conftest.$ac_objext
12601 if { (eval echo "$as_me:12601: \"$ac_compile\"") >&5
12602   (eval $ac_compile) 2>&5
12603   ac_status=$?
12604   echo "$as_me:12604: \$? = $ac_status" >&5
12605   (exit $ac_status); } &&
12606          { ac_try='test -s conftest.$ac_objext'
12607   { (eval echo "$as_me:12607: \"$ac_try\"") >&5
12608   (eval $ac_try) 2>&5
12609   ac_status=$?
12610   echo "$as_me:12610: \$? = $ac_status" >&5
12611   (exit $ac_status); }; }; then
12612   ac_lo=0 ac_mid=0
12613   while :; do
12614     cat >conftest.$ac_ext <<_ACEOF
12615 #line 12615 "configure"
12616 #include "confdefs.h"
12617 $ac_includes_default
12618 int
12619 main (void)
12620 {
12621 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12622   ;
12623   return 0;
12624 }
12625 _ACEOF
12626 rm -f conftest.$ac_objext
12627 if { (eval echo "$as_me:12627: \"$ac_compile\"") >&5
12628   (eval $ac_compile) 2>&5
12629   ac_status=$?
12630   echo "$as_me:12630: \$? = $ac_status" >&5
12631   (exit $ac_status); } &&
12632          { ac_try='test -s conftest.$ac_objext'
12633   { (eval echo "$as_me:12633: \"$ac_try\"") >&5
12634   (eval $ac_try) 2>&5
12635   ac_status=$?
12636   echo "$as_me:12636: \$? = $ac_status" >&5
12637   (exit $ac_status); }; }; then
12638   ac_hi=$ac_mid; break
12639 else
12640   echo "$as_me: failed program was:" >&5
12641 cat conftest.$ac_ext >&5
12642 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12643 fi
12644 rm -f conftest.$ac_objext conftest.$ac_ext
12645   done
12646 else
12647   echo "$as_me: failed program was:" >&5
12648 cat conftest.$ac_ext >&5
12649 ac_hi=-1 ac_mid=-1
12650   while :; do
12651     cat >conftest.$ac_ext <<_ACEOF
12652 #line 12652 "configure"
12653 #include "confdefs.h"
12654 $ac_includes_default
12655 int
12656 main (void)
12657 {
12658 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12659   ;
12660   return 0;
12661 }
12662 _ACEOF
12663 rm -f conftest.$ac_objext
12664 if { (eval echo "$as_me:12664: \"$ac_compile\"") >&5
12665   (eval $ac_compile) 2>&5
12666   ac_status=$?
12667   echo "$as_me:12667: \$? = $ac_status" >&5
12668   (exit $ac_status); } &&
12669          { ac_try='test -s conftest.$ac_objext'
12670   { (eval echo "$as_me:12670: \"$ac_try\"") >&5
12671   (eval $ac_try) 2>&5
12672   ac_status=$?
12673   echo "$as_me:12673: \$? = $ac_status" >&5
12674   (exit $ac_status); }; }; then
12675   ac_lo=$ac_mid; break
12676 else
12677   echo "$as_me: failed program was:" >&5
12678 cat conftest.$ac_ext >&5
12679 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12680 fi
12681 rm -f conftest.$ac_objext conftest.$ac_ext
12682   done
12683 fi
12684 rm -f conftest.$ac_objext conftest.$ac_ext
12685 # Binary search between lo and hi bounds.
12686 while test "x$ac_lo" != "x$ac_hi"; do
12687   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12688   cat >conftest.$ac_ext <<_ACEOF
12689 #line 12689 "configure"
12690 #include "confdefs.h"
12691 $ac_includes_default
12692 int
12693 main (void)
12694 {
12695 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12696   ;
12697   return 0;
12698 }
12699 _ACEOF
12700 rm -f conftest.$ac_objext
12701 if { (eval echo "$as_me:12701: \"$ac_compile\"") >&5
12702   (eval $ac_compile) 2>&5
12703   ac_status=$?
12704   echo "$as_me:12704: \$? = $ac_status" >&5
12705   (exit $ac_status); } &&
12706          { ac_try='test -s conftest.$ac_objext'
12707   { (eval echo "$as_me:12707: \"$ac_try\"") >&5
12708   (eval $ac_try) 2>&5
12709   ac_status=$?
12710   echo "$as_me:12710: \$? = $ac_status" >&5
12711   (exit $ac_status); }; }; then
12712   ac_hi=$ac_mid
12713 else
12714   echo "$as_me: failed program was:" >&5
12715 cat conftest.$ac_ext >&5
12716 ac_lo=`expr $ac_mid + 1`
12717 fi
12718 rm -f conftest.$ac_objext conftest.$ac_ext
12719 done
12720 ac_cv_sizeof_signed_char=$ac_lo
12721 else
12722   if test "$cross_compiling" = yes; then
12723   { { echo "$as_me:12723: error: cannot run test program while cross compiling" >&5
12724 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12725    { (exit 1); exit 1; }; }
12726 else
12727   cat >conftest.$ac_ext <<_ACEOF
12728 #line 12728 "configure"
12729 #include "confdefs.h"
12730 $ac_includes_default
12731 int
12732 main (void)
12733 {
12734 FILE *f = fopen ("conftest.val", "w");
12735 if (!f)
12736   $ac_main_return (1);
12737 fprintf (f, "%d", (sizeof (signed char)));
12738 fclose (f);
12739   ;
12740   return 0;
12741 }
12742 _ACEOF
12743 rm -f conftest$ac_exeext
12744 if { (eval echo "$as_me:12744: \"$ac_link\"") >&5
12745   (eval $ac_link) 2>&5
12746   ac_status=$?
12747   echo "$as_me:12747: \$? = $ac_status" >&5
12748   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12749   { (eval echo "$as_me:12749: \"$ac_try\"") >&5
12750   (eval $ac_try) 2>&5
12751   ac_status=$?
12752   echo "$as_me:12752: \$? = $ac_status" >&5
12753   (exit $ac_status); }; }; then
12754   ac_cv_sizeof_signed_char=`cat conftest.val`
12755 else
12756   echo "$as_me: program exited with status $ac_status" >&5
12757 echo "$as_me: failed program was:" >&5
12758 cat conftest.$ac_ext >&5
12759 fi
12760 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12761 fi
12762 fi
12763 rm -f conftest.val
12764 else
12765   ac_cv_sizeof_signed_char=0
12766 fi
12767 fi
12768 echo "$as_me:12768: result: $ac_cv_sizeof_signed_char" >&5
12769 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12770 cat >>confdefs.h <<EOF
12771 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12772 EOF
12773
12774 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12775         NCURSES_SBOOL="signed char"
12776 else
12777         NCURSES_SBOOL="char"
12778 fi
12779 echo "$as_me:12779: checking if you want to use signed Boolean array in term.h" >&5
12780 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12781
12782 # Check whether --enable-signed-char or --disable-signed-char was given.
12783 if test "${enable_signed_char+set}" = set; then
12784   enableval="$enable_signed_char"
12785   with_signed_char=$enableval
12786 else
12787   with_signed_char=no
12788 fi;
12789 echo "$as_me:12789: result: $with_signed_char" >&5
12790 echo "${ECHO_T}$with_signed_char" >&6
12791 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12792
12793 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12794 echo "$as_me:12794: checking if you want SIGWINCH handler" >&5
12795 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12796
12797 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12798 if test "${enable_sigwinch+set}" = set; then
12799   enableval="$enable_sigwinch"
12800   with_sigwinch=$enableval
12801 else
12802   with_sigwinch=$with_ext_funcs
12803 fi;
12804 echo "$as_me:12804: result: $with_sigwinch" >&5
12805 echo "${ECHO_T}$with_sigwinch" >&6
12806 test "x$with_sigwinch" = xyes &&
12807 cat >>confdefs.h <<\EOF
12808 #define USE_SIGWINCH 1
12809 EOF
12810
12811 ###   use option --enable-tcap-names to allow user to define new capabilities
12812 echo "$as_me:12812: checking if you want user-definable terminal capabilities like termcap" >&5
12813 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12814
12815 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12816 if test "${enable_tcap_names+set}" = set; then
12817   enableval="$enable_tcap_names"
12818   with_tcap_names=$enableval
12819 else
12820   with_tcap_names=$with_ext_funcs
12821 fi;
12822 echo "$as_me:12822: result: $with_tcap_names" >&5
12823 echo "${ECHO_T}$with_tcap_names" >&6
12824 NCURSES_XNAMES=0
12825 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12826
12827 ##############################################################################
12828
12829 echo "$as_me:12829: checking if you want to link with the pthread library" >&5
12830 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12831
12832 # Check whether --with-pthread or --without-pthread was given.
12833 if test "${with_pthread+set}" = set; then
12834   withval="$with_pthread"
12835   with_pthread=$withval
12836 else
12837   with_pthread=no
12838 fi;
12839 echo "$as_me:12839: result: $with_pthread" >&5
12840 echo "${ECHO_T}$with_pthread" >&6
12841
12842 if test "$with_pthread" != no ; then
12843         echo "$as_me:12843: checking for pthread.h" >&5
12844 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12845 if test "${ac_cv_header_pthread_h+set}" = set; then
12846   echo $ECHO_N "(cached) $ECHO_C" >&6
12847 else
12848   cat >conftest.$ac_ext <<_ACEOF
12849 #line 12849 "configure"
12850 #include "confdefs.h"
12851 #include <pthread.h>
12852 _ACEOF
12853 if { (eval echo "$as_me:12853: \"$ac_cpp conftest.$ac_ext\"") >&5
12854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12855   ac_status=$?
12856   egrep -v '^ *\+' conftest.er1 >conftest.err
12857   rm -f conftest.er1
12858   cat conftest.err >&5
12859   echo "$as_me:12859: \$? = $ac_status" >&5
12860   (exit $ac_status); } >/dev/null; then
12861   if test -s conftest.err; then
12862     ac_cpp_err=$ac_c_preproc_warn_flag
12863   else
12864     ac_cpp_err=
12865   fi
12866 else
12867   ac_cpp_err=yes
12868 fi
12869 if test -z "$ac_cpp_err"; then
12870   ac_cv_header_pthread_h=yes
12871 else
12872   echo "$as_me: failed program was:" >&5
12873   cat conftest.$ac_ext >&5
12874   ac_cv_header_pthread_h=no
12875 fi
12876 rm -f conftest.err conftest.$ac_ext
12877 fi
12878 echo "$as_me:12878: result: $ac_cv_header_pthread_h" >&5
12879 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12880 if test $ac_cv_header_pthread_h = yes; then
12881
12882 cat >>confdefs.h <<\EOF
12883 #define HAVE_PTHREADS_H 1
12884 EOF
12885
12886         for cf_lib_pthread in pthread c_r
12887         do
12888             echo "$as_me:12888: checking if we can link with the $cf_lib_pthread library" >&5
12889 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12890             cf_save_LIBS="$LIBS"
12891
12892 cf_add_libs="-l$cf_lib_pthread"
12893 # Filter out duplicates - this happens with badly-designed ".pc" files...
12894 for cf_add_1lib in $LIBS
12895 do
12896         for cf_add_2lib in $cf_add_libs
12897         do
12898                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12899                 then
12900                         cf_add_1lib=
12901                         break
12902                 fi
12903         done
12904         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12905 done
12906 LIBS="$cf_add_libs"
12907
12908             cat >conftest.$ac_ext <<_ACEOF
12909 #line 12909 "configure"
12910 #include "confdefs.h"
12911
12912 #include <pthread.h>
12913
12914 int
12915 main (void)
12916 {
12917
12918                 int rc = pthread_create(0,0,0,0);
12919                 int r2 = pthread_mutexattr_settype(0, 0);
12920
12921   ;
12922   return 0;
12923 }
12924 _ACEOF
12925 rm -f conftest.$ac_objext conftest$ac_exeext
12926 if { (eval echo "$as_me:12926: \"$ac_link\"") >&5
12927   (eval $ac_link) 2>&5
12928   ac_status=$?
12929   echo "$as_me:12929: \$? = $ac_status" >&5
12930   (exit $ac_status); } &&
12931          { ac_try='test -s conftest$ac_exeext'
12932   { (eval echo "$as_me:12932: \"$ac_try\"") >&5
12933   (eval $ac_try) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); }; }; then
12937   with_pthread=yes
12938 else
12939   echo "$as_me: failed program was:" >&5
12940 cat conftest.$ac_ext >&5
12941 with_pthread=no
12942 fi
12943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12944             LIBS="$cf_save_LIBS"
12945             echo "$as_me:12945: result: $with_pthread" >&5
12946 echo "${ECHO_T}$with_pthread" >&6
12947             test "$with_pthread" = yes && break
12948         done
12949
12950         if test "$with_pthread" = yes ; then
12951
12952 cf_add_libs="-l$cf_lib_pthread"
12953 # Filter out duplicates - this happens with badly-designed ".pc" files...
12954 for cf_add_1lib in $LIBS
12955 do
12956         for cf_add_2lib in $cf_add_libs
12957         do
12958                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12959                 then
12960                         cf_add_1lib=
12961                         break
12962                 fi
12963         done
12964         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12965 done
12966 LIBS="$cf_add_libs"
12967
12968 cat >>confdefs.h <<\EOF
12969 #define HAVE_LIBPTHREADS 1
12970 EOF
12971
12972         else
12973             { { echo "$as_me:12973: error: Cannot link with pthread library" >&5
12974 echo "$as_me: error: Cannot link with pthread library" >&2;}
12975    { (exit 1); exit 1; }; }
12976         fi
12977
12978 fi
12979
12980 fi
12981
12982 if test "x$with_pthread" != xno; then
12983         echo "$as_me:12983: checking for pthread_kill" >&5
12984 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12985 if test "${ac_cv_func_pthread_kill+set}" = set; then
12986   echo $ECHO_N "(cached) $ECHO_C" >&6
12987 else
12988   cat >conftest.$ac_ext <<_ACEOF
12989 #line 12989 "configure"
12990 #include "confdefs.h"
12991 /* System header to define __stub macros and hopefully few prototypes,
12992     which can conflict with char pthread_kill (); below.  */
12993 #include <assert.h>
12994 /* Override any gcc2 internal prototype to avoid an error.  */
12995 #ifdef __cplusplus
12996 extern "C"
12997 #endif
12998 /* We use char because int might match the return type of a gcc2
12999    builtin and then its argument prototype would still apply.  */
13000 char pthread_kill ();
13001 char (*f) ();
13002
13003 int
13004 main (void)
13005 {
13006 /* The GNU C library defines this for functions which it implements
13007     to always fail with ENOSYS.  Some functions are actually named
13008     something starting with __ and the normal name is an alias.  */
13009 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13010 choke me
13011 #else
13012 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13013 #endif
13014
13015   ;
13016   return 0;
13017 }
13018 _ACEOF
13019 rm -f conftest.$ac_objext conftest$ac_exeext
13020 if { (eval echo "$as_me:13020: \"$ac_link\"") >&5
13021   (eval $ac_link) 2>&5
13022   ac_status=$?
13023   echo "$as_me:13023: \$? = $ac_status" >&5
13024   (exit $ac_status); } &&
13025          { ac_try='test -s conftest$ac_exeext'
13026   { (eval echo "$as_me:13026: \"$ac_try\"") >&5
13027   (eval $ac_try) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); }; }; then
13031   ac_cv_func_pthread_kill=yes
13032 else
13033   echo "$as_me: failed program was:" >&5
13034 cat conftest.$ac_ext >&5
13035 ac_cv_func_pthread_kill=no
13036 fi
13037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13038 fi
13039 echo "$as_me:13039: result: $ac_cv_func_pthread_kill" >&5
13040 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13041 if test $ac_cv_func_pthread_kill = yes; then
13042
13043                 echo "$as_me:13043: checking if you want to allow EINTR in wgetch with pthreads" >&5
13044 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13045
13046 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13047 if test "${enable_pthreads_eintr+set}" = set; then
13048   enableval="$enable_pthreads_eintr"
13049   use_pthreads_eintr=$enableval
13050 else
13051   use_pthreads_eintr=no
13052 fi;
13053                 echo "$as_me:13053: result: $use_pthreads_eintr" >&5
13054 echo "${ECHO_T}$use_pthreads_eintr" >&6
13055                 if test "x$use_pthreads_eintr" = xyes ; then
13056
13057 cat >>confdefs.h <<\EOF
13058 #define USE_PTHREADS_EINTR 1
13059 EOF
13060
13061                 fi
13062 fi
13063
13064         echo "$as_me:13064: checking if you want to use weak-symbols for pthreads" >&5
13065 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13066
13067 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13068 if test "${enable_weak_symbols+set}" = set; then
13069   enableval="$enable_weak_symbols"
13070   use_weak_symbols=$enableval
13071 else
13072   use_weak_symbols=no
13073 fi;
13074         echo "$as_me:13074: result: $use_weak_symbols" >&5
13075 echo "${ECHO_T}$use_weak_symbols" >&6
13076         if test "x$use_weak_symbols" = xyes ; then
13077
13078 echo "$as_me:13078: checking if $CC supports weak symbols" >&5
13079 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13080 if test "${cf_cv_weak_symbols+set}" = set; then
13081   echo $ECHO_N "(cached) $ECHO_C" >&6
13082 else
13083
13084 cat >conftest.$ac_ext <<_ACEOF
13085 #line 13085 "configure"
13086 #include "confdefs.h"
13087
13088 #include <stdio.h>
13089 int
13090 main (void)
13091 {
13092
13093 #if defined(__GNUC__)
13094 #  if defined __USE_ISOC99
13095 #    define _cat_pragma(exp)    _Pragma(#exp)
13096 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13097 #  else
13098 #    define _weak_pragma(exp)
13099 #  endif
13100 #  define _declare(name)        __extension__ extern __typeof__(name) name
13101 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13102 #endif
13103
13104 weak_symbol(fopen);
13105
13106   ;
13107   return 0;
13108 }
13109 _ACEOF
13110 rm -f conftest.$ac_objext
13111 if { (eval echo "$as_me:13111: \"$ac_compile\"") >&5
13112   (eval $ac_compile) 2>&5
13113   ac_status=$?
13114   echo "$as_me:13114: \$? = $ac_status" >&5
13115   (exit $ac_status); } &&
13116          { ac_try='test -s conftest.$ac_objext'
13117   { (eval echo "$as_me:13117: \"$ac_try\"") >&5
13118   (eval $ac_try) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); }; }; then
13122   cf_cv_weak_symbols=yes
13123 else
13124   echo "$as_me: failed program was:" >&5
13125 cat conftest.$ac_ext >&5
13126 cf_cv_weak_symbols=no
13127 fi
13128 rm -f conftest.$ac_objext conftest.$ac_ext
13129
13130 fi
13131 echo "$as_me:13131: result: $cf_cv_weak_symbols" >&5
13132 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13133
13134         else
13135                 cf_cv_weak_symbols=no
13136         fi
13137
13138         if test "x$cf_cv_weak_symbols" = xyes ; then
13139
13140 cat >>confdefs.h <<\EOF
13141 #define USE_WEAK_SYMBOLS 1
13142 EOF
13143
13144         fi
13145 fi
13146
13147 PTHREAD=
13148 if test "x$with_pthread" = "xyes" ; then
13149
13150 cat >>confdefs.h <<\EOF
13151 #define USE_PTHREADS 1
13152 EOF
13153
13154         enable_reentrant=yes
13155         if test "x$cf_cv_weak_symbols" = xyes ; then
13156                 PTHREAD=-lpthread
13157         fi
13158 fi
13159
13160 # Reentrant code has to be opaque; there's little advantage to making ncurses
13161 # opaque outside of that, so there is no --enable-opaque option.  We can use
13162 # this option without --with-pthreads, but this will be always set for
13163 # pthreads.
13164 echo "$as_me:13164: checking if you want reentrant code" >&5
13165 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13166
13167 # Check whether --enable-reentrant or --disable-reentrant was given.
13168 if test "${enable_reentrant+set}" = set; then
13169   enableval="$enable_reentrant"
13170   with_reentrant=$enableval
13171 else
13172   with_reentrant=no
13173 fi;
13174 echo "$as_me:13174: result: $with_reentrant" >&5
13175 echo "${ECHO_T}$with_reentrant" >&6
13176 if test "x$with_reentrant" = xyes ; then
13177         cf_cv_enable_reentrant=1
13178         cf_cv_enable_opaque="NCURSES_INTERNALS"
13179         NCURSES_SIZE_T=int
13180         if test "x$cf_cv_weak_symbols" = xyes ; then
13181
13182 # remove pthread library from $LIBS
13183 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13184
13185 cf_add_libs="-lpthread"
13186 # Filter out duplicates - this happens with badly-designed ".pc" files...
13187 for cf_add_1lib in $TEST_LIBS
13188 do
13189         for cf_add_2lib in $cf_add_libs
13190         do
13191                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13192                 then
13193                         cf_add_1lib=
13194                         break
13195                 fi
13196         done
13197         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13198 done
13199 TEST_LIBS="$cf_add_libs"
13200
13201 cf_add_libs="-lpthread"
13202 # Filter out duplicates - this happens with badly-designed ".pc" files...
13203 for cf_add_1lib in $TEST_LIBS2
13204 do
13205         for cf_add_2lib in $cf_add_libs
13206         do
13207                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13208                 then
13209                         cf_add_1lib=
13210                         break
13211                 fi
13212         done
13213         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13214 done
13215 TEST_LIBS2="$cf_add_libs"
13216
13217         else
13218                 # when not using weak symbols but with_reentrant,
13219                 # add 't' to the library suffix on all platforms
13220                 # except cygwin, where we only do that if ALSO
13221                 # compiling with full thread support.
13222                 case "$host" in
13223                 (*cygwin* | *msys*)
13224                         if test "$with_pthread" = "yes" ; then
13225                                 if test "x$disable_lib_suffixes" = "xno" ; then
13226                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13227                                 fi
13228                         fi ;;
13229                 (*)
13230                         if test "x$disable_lib_suffixes" = "xno" ; then
13231                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13232                         fi
13233                         ;;
13234                 esac
13235         fi
13236
13237 cat >>confdefs.h <<\EOF
13238 #define USE_REENTRANT 1
13239 EOF
13240
13241 if test "${with_abi_version+set}" != set; then
13242         case $cf_cv_rel_version in
13243         (5.*)
13244                 cf_cv_rel_version=6.0
13245                 cf_cv_abi_version=6
13246                 { echo "$as_me:13246: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13247 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13248                 ;;
13249         esac
13250 fi
13251
13252 else
13253         cf_cv_enable_reentrant=0
13254         cf_cv_enable_opaque="NCURSES_OPAQUE"
13255         NCURSES_SIZE_T=short
13256 fi
13257
13258 echo "$as_me:13258: checking if you want opaque curses-library structures" >&5
13259 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13260
13261 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13262 if test "${enable_opaque_curses+set}" = set; then
13263   enableval="$enable_opaque_curses"
13264   test "$enableval" != yes && enableval=no
13265         if test "$enableval" != "no" ; then
13266     enable_opaque_curses=yes
13267         else
13268
13269          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13270          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13271
13272         fi
13273 else
13274   enableval=no
13275
13276          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13277          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13278
13279 fi;
13280 echo "$as_me:13280: result: $enable_opaque_curses" >&5
13281 echo "${ECHO_T}$enable_opaque_curses" >&6
13282
13283 test "$cf_cv_enable_reentrant" = 1 && \
13284 test "$enable_opaque_curses" = no && \
13285 { { echo "$as_me:13285: error: reentrant configuration requires opaque library" >&5
13286 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13287    { (exit 1); exit 1; }; }
13288
13289 echo "$as_me:13289: checking if you want opaque form-library structures" >&5
13290 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13291
13292 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13293 if test "${enable_opaque_form+set}" = set; then
13294   enableval="$enable_opaque_form"
13295   enable_opaque_form=yes
13296 else
13297   enable_opaque_form=no
13298 fi;
13299 echo "$as_me:13299: result: $enable_opaque_form" >&5
13300 echo "${ECHO_T}$enable_opaque_form" >&6
13301
13302 echo "$as_me:13302: checking if you want opaque menu-library structures" >&5
13303 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13304
13305 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13306 if test "${enable_opaque_menu+set}" = set; then
13307   enableval="$enable_opaque_menu"
13308   enable_opaque_menu=yes
13309 else
13310   enable_opaque_menu=no
13311 fi;
13312 echo "$as_me:13312: result: $enable_opaque_menu" >&5
13313 echo "${ECHO_T}$enable_opaque_menu" >&6
13314
13315 echo "$as_me:13315: checking if you want opaque panel-library structures" >&5
13316 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13317
13318 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13319 if test "${enable_opaque_panel+set}" = set; then
13320   enableval="$enable_opaque_panel"
13321   enable_opaque_panel=yes
13322 else
13323   enable_opaque_panel=no
13324 fi;
13325 echo "$as_me:13325: result: $enable_opaque_panel" >&5
13326 echo "${ECHO_T}$enable_opaque_panel" >&6
13327
13328 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13329 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13330 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13331 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13332
13333 ### Allow using a different wrap-prefix
13334 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13335         echo "$as_me:13335: checking for prefix used to wrap public variables" >&5
13336 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13337
13338 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13339 if test "${with_wrap_prefix+set}" = set; then
13340   withval="$with_wrap_prefix"
13341   NCURSES_WRAP_PREFIX=$withval
13342 else
13343   NCURSES_WRAP_PREFIX=_nc_
13344 fi;
13345         echo "$as_me:13345: result: $NCURSES_WRAP_PREFIX" >&5
13346 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13347 else
13348         NCURSES_WRAP_PREFIX=_nc_
13349 fi
13350
13351 cat >>confdefs.h <<EOF
13352 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13353 EOF
13354
13355 ###############################################################################
13356 # These options are relatively safe to experiment with.
13357
13358 echo "$as_me:13358: checking if you want all development code" >&5
13359 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13360
13361 # Check whether --with-develop or --without-develop was given.
13362 if test "${with_develop+set}" = set; then
13363   withval="$with_develop"
13364   with_develop=$withval
13365 else
13366   with_develop=no
13367 fi;
13368 echo "$as_me:13368: result: $with_develop" >&5
13369 echo "${ECHO_T}$with_develop" >&6
13370
13371 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13372 echo "$as_me:13372: checking if you want hard-tabs code" >&5
13373 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13374
13375 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13376 if test "${enable_hard_tabs+set}" = set; then
13377   enableval="$enable_hard_tabs"
13378
13379 else
13380   enable_hard_tabs=$with_develop
13381 fi;
13382 echo "$as_me:13382: result: $enable_hard_tabs" >&5
13383 echo "${ECHO_T}$enable_hard_tabs" >&6
13384 test "x$enable_hard_tabs" = xyes &&
13385 cat >>confdefs.h <<\EOF
13386 #define USE_HARD_TABS 1
13387 EOF
13388
13389 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13390 echo "$as_me:13390: checking if you want limited support for xmc" >&5
13391 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13392
13393 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13394 if test "${enable_xmc_glitch+set}" = set; then
13395   enableval="$enable_xmc_glitch"
13396
13397 else
13398   enable_xmc_glitch=$with_develop
13399 fi;
13400 echo "$as_me:13400: result: $enable_xmc_glitch" >&5
13401 echo "${ECHO_T}$enable_xmc_glitch" >&6
13402 test "x$enable_xmc_glitch" = xyes &&
13403 cat >>confdefs.h <<\EOF
13404 #define USE_XMC_SUPPORT 1
13405 EOF
13406
13407 ###############################################################################
13408 # These are just experimental, probably should not be in a package:
13409
13410 echo "$as_me:13410: checking if you do not want to assume colors are white-on-black" >&5
13411 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13412
13413 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13414 if test "${enable_assumed_color+set}" = set; then
13415   enableval="$enable_assumed_color"
13416   with_assumed_color=$enableval
13417 else
13418   with_assumed_color=yes
13419 fi;
13420 echo "$as_me:13420: result: $with_assumed_color" >&5
13421 echo "${ECHO_T}$with_assumed_color" >&6
13422 test "x$with_assumed_color" = xyes &&
13423 cat >>confdefs.h <<\EOF
13424 #define USE_ASSUMED_COLOR 1
13425 EOF
13426
13427 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13428 echo "$as_me:13428: checking if you want hashmap scrolling-optimization code" >&5
13429 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13430
13431 # Check whether --enable-hashmap or --disable-hashmap was given.
13432 if test "${enable_hashmap+set}" = set; then
13433   enableval="$enable_hashmap"
13434   with_hashmap=$enableval
13435 else
13436   with_hashmap=yes
13437 fi;
13438 echo "$as_me:13438: result: $with_hashmap" >&5
13439 echo "${ECHO_T}$with_hashmap" >&6
13440 test "x$with_hashmap" = xyes &&
13441 cat >>confdefs.h <<\EOF
13442 #define USE_HASHMAP 1
13443 EOF
13444
13445 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13446 echo "$as_me:13446: checking if you want colorfgbg code" >&5
13447 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13448
13449 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13450 if test "${enable_colorfgbg+set}" = set; then
13451   enableval="$enable_colorfgbg"
13452   with_colorfgbg=$enableval
13453 else
13454   with_colorfgbg=no
13455 fi;
13456 echo "$as_me:13456: result: $with_colorfgbg" >&5
13457 echo "${ECHO_T}$with_colorfgbg" >&6
13458 test "x$with_colorfgbg" = xyes &&
13459 cat >>confdefs.h <<\EOF
13460 #define USE_COLORFGBG 1
13461 EOF
13462
13463 ###   use option --enable-interop to turn on use of bindings used for interop
13464 echo "$as_me:13464: checking if you want interop bindings" >&5
13465 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13466
13467 # Check whether --enable-interop or --disable-interop was given.
13468 if test "${enable_interop+set}" = set; then
13469   enableval="$enable_interop"
13470   with_exp_interop=$enableval
13471 else
13472   with_exp_interop=$cf_dft_interop
13473 fi;
13474 echo "$as_me:13474: result: $with_exp_interop" >&5
13475 echo "${ECHO_T}$with_exp_interop" >&6
13476
13477 NCURSES_INTEROP_FUNCS=0
13478 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13479
13480 echo "$as_me:13480: checking if you want experimental safe-sprintf code" >&5
13481 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13482
13483 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13484 if test "${enable_safe_sprintf+set}" = set; then
13485   enableval="$enable_safe_sprintf"
13486   with_safe_sprintf=$enableval
13487 else
13488   with_safe_sprintf=no
13489 fi;
13490 echo "$as_me:13490: result: $with_safe_sprintf" >&5
13491 echo "${ECHO_T}$with_safe_sprintf" >&6
13492 test "x$with_safe_sprintf" = xyes &&
13493 cat >>confdefs.h <<\EOF
13494 #define USE_SAFE_SPRINTF 1
13495 EOF
13496
13497 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13498 # when hashmap is used scroll hints are useless
13499 if test "$with_hashmap" = no ; then
13500 echo "$as_me:13500: checking if you want to experiment without scrolling-hints code" >&5
13501 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13502
13503 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13504 if test "${enable_scroll_hints+set}" = set; then
13505   enableval="$enable_scroll_hints"
13506   with_scroll_hints=$enableval
13507 else
13508   with_scroll_hints=yes
13509 fi;
13510 echo "$as_me:13510: result: $with_scroll_hints" >&5
13511 echo "${ECHO_T}$with_scroll_hints" >&6
13512 test "x$with_scroll_hints" = xyes &&
13513 cat >>confdefs.h <<\EOF
13514 #define USE_SCROLL_HINTS 1
13515 EOF
13516
13517 fi
13518
13519 echo "$as_me:13519: checking if you want wgetch-events code" >&5
13520 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13521
13522 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13523 if test "${enable_wgetch_events+set}" = set; then
13524   enableval="$enable_wgetch_events"
13525   with_wgetch_events=$enableval
13526 else
13527   with_wgetch_events=no
13528 fi;
13529 echo "$as_me:13529: result: $with_wgetch_events" >&5
13530 echo "${ECHO_T}$with_wgetch_events" >&6
13531 test "x$with_wgetch_events" = xyes &&
13532 cat >>confdefs.h <<\EOF
13533 #define NCURSES_WGETCH_EVENTS 1
13534 EOF
13535
13536 ###############################################################################
13537
13538 ###     use option --disable-echo to suppress full display compiling commands
13539
13540 echo "$as_me:13540: checking if you want to see long compiling messages" >&5
13541 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13542
13543 # Check whether --enable-echo or --disable-echo was given.
13544 if test "${enable_echo+set}" = set; then
13545   enableval="$enable_echo"
13546   test "$enableval" != no && enableval=yes
13547         if test "$enableval" != "yes" ; then
13548
13549         ECHO_LT='--silent'
13550         ECHO_LD='@echo linking $@;'
13551         RULE_CC='@echo compiling $<'
13552         SHOW_CC='@echo compiling $@'
13553         ECHO_CC='@'
13554
13555         else
13556
13557         ECHO_LT=''
13558         ECHO_LD=''
13559         RULE_CC=''
13560         SHOW_CC=''
13561         ECHO_CC=''
13562
13563         fi
13564 else
13565   enableval=yes
13566
13567         ECHO_LT=''
13568         ECHO_LD=''
13569         RULE_CC=''
13570         SHOW_CC=''
13571         ECHO_CC=''
13572
13573 fi;
13574 echo "$as_me:13574: result: $enableval" >&5
13575 echo "${ECHO_T}$enableval" >&6
13576
13577 if test "x$enable_echo" = xyes; then
13578         ECHO_LINK=
13579 else
13580         ECHO_LINK='@ echo linking $@ ... ;'
13581         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13582         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13583 fi
13584
13585 ###     use option --enable-warnings to turn on all gcc warnings
13586 echo "$as_me:13586: checking if you want to see compiler warnings" >&5
13587 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13588
13589 # Check whether --enable-warnings or --disable-warnings was given.
13590 if test "${enable_warnings+set}" = set; then
13591   enableval="$enable_warnings"
13592   with_warnings=$enableval
13593 fi;
13594 echo "$as_me:13594: result: $with_warnings" >&5
13595 echo "${ECHO_T}$with_warnings" >&6
13596
13597 if test "x$with_warnings" = "xyes"; then
13598
13599         ADAFLAGS="$ADAFLAGS -gnatg"
13600
13601 INTEL_COMPILER=no
13602
13603 if test "$GCC" = yes ; then
13604         case $host_os in
13605         (linux*|gnu*)
13606                 echo "$as_me:13606: checking if this is really Intel C compiler" >&5
13607 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13608                 cf_save_CFLAGS="$CFLAGS"
13609                 CFLAGS="$CFLAGS -no-gcc"
13610                 cat >conftest.$ac_ext <<_ACEOF
13611 #line 13611 "configure"
13612 #include "confdefs.h"
13613
13614 int
13615 main (void)
13616 {
13617
13618 #ifdef __INTEL_COMPILER
13619 #else
13620 make an error
13621 #endif
13622
13623   ;
13624   return 0;
13625 }
13626 _ACEOF
13627 rm -f conftest.$ac_objext
13628 if { (eval echo "$as_me:13628: \"$ac_compile\"") >&5
13629   (eval $ac_compile) 2>&5
13630   ac_status=$?
13631   echo "$as_me:13631: \$? = $ac_status" >&5
13632   (exit $ac_status); } &&
13633          { ac_try='test -s conftest.$ac_objext'
13634   { (eval echo "$as_me:13634: \"$ac_try\"") >&5
13635   (eval $ac_try) 2>&5
13636   ac_status=$?
13637   echo "$as_me:13637: \$? = $ac_status" >&5
13638   (exit $ac_status); }; }; then
13639   INTEL_COMPILER=yes
13640 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13641
13642 else
13643   echo "$as_me: failed program was:" >&5
13644 cat conftest.$ac_ext >&5
13645 fi
13646 rm -f conftest.$ac_objext conftest.$ac_ext
13647                 CFLAGS="$cf_save_CFLAGS"
13648                 echo "$as_me:13648: result: $INTEL_COMPILER" >&5
13649 echo "${ECHO_T}$INTEL_COMPILER" >&6
13650                 ;;
13651         esac
13652 fi
13653
13654 CLANG_COMPILER=no
13655
13656 if test "$GCC" = yes ; then
13657         echo "$as_me:13657: checking if this is really Clang C compiler" >&5
13658 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13659         cf_save_CFLAGS="$CFLAGS"
13660         CFLAGS="$CFLAGS -Qunused-arguments"
13661         cat >conftest.$ac_ext <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13664
13665 int
13666 main (void)
13667 {
13668
13669 #ifdef __clang__
13670 #else
13671 make an error
13672 #endif
13673
13674   ;
13675   return 0;
13676 }
13677 _ACEOF
13678 rm -f conftest.$ac_objext
13679 if { (eval echo "$as_me:13679: \"$ac_compile\"") >&5
13680   (eval $ac_compile) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit $ac_status); } &&
13684          { ac_try='test -s conftest.$ac_objext'
13685   { (eval echo "$as_me:13685: \"$ac_try\"") >&5
13686   (eval $ac_try) 2>&5
13687   ac_status=$?
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit $ac_status); }; }; then
13690   CLANG_COMPILER=yes
13691 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13692
13693 else
13694   echo "$as_me: failed program was:" >&5
13695 cat conftest.$ac_ext >&5
13696 fi
13697 rm -f conftest.$ac_objext conftest.$ac_ext
13698         CFLAGS="$cf_save_CFLAGS"
13699         echo "$as_me:13699: result: $CLANG_COMPILER" >&5
13700 echo "${ECHO_T}$CLANG_COMPILER" >&6
13701 fi
13702
13703 cat > conftest.$ac_ext <<EOF
13704 #line 13704 "${as_me:-configure}"
13705 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13706 EOF
13707
13708 if test "$INTEL_COMPILER" = yes
13709 then
13710 # The "-wdXXX" options suppress warnings:
13711 # remark #1419: external declaration in primary source file
13712 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13713 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13714 # remark #193: zero used for undefined preprocessing identifier
13715 # remark #593: variable "curs_sb_left_arrow" was set but never used
13716 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13717 # remark #869: parameter "tw" was never referenced
13718 # remark #981: operands are evaluated in unspecified order
13719 # warning #279: controlling expression is constant
13720
13721         { echo "$as_me:13721: checking for $CC warning options..." >&5
13722 echo "$as_me: checking for $CC warning options..." >&6;}
13723         cf_save_CFLAGS="$CFLAGS"
13724         EXTRA_CFLAGS="-Wall"
13725         for cf_opt in \
13726                 wd1419 \
13727                 wd1683 \
13728                 wd1684 \
13729                 wd193 \
13730                 wd593 \
13731                 wd279 \
13732                 wd810 \
13733                 wd869 \
13734                 wd981
13735         do
13736                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13737                 if { (eval echo "$as_me:13737: \"$ac_compile\"") >&5
13738   (eval $ac_compile) 2>&5
13739   ac_status=$?
13740   echo "$as_me:13740: \$? = $ac_status" >&5
13741   (exit $ac_status); }; then
13742                         test -n "$verbose" && echo "$as_me:13742: result: ... -$cf_opt" >&5
13743 echo "${ECHO_T}... -$cf_opt" >&6
13744                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13745                 fi
13746         done
13747         CFLAGS="$cf_save_CFLAGS"
13748
13749 elif test "$GCC" = yes
13750 then
13751         { echo "$as_me:13751: checking for $CC warning options..." >&5
13752 echo "$as_me: checking for $CC warning options..." >&6;}
13753         cf_save_CFLAGS="$CFLAGS"
13754         EXTRA_CFLAGS=
13755         cf_warn_CONST=""
13756         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13757         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13758         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13759         for cf_opt in W Wall \
13760                 Wbad-function-cast \
13761                 Wcast-align \
13762                 Wcast-qual \
13763                 Wdeclaration-after-statement \
13764                 Wextra \
13765                 Winline \
13766                 Wmissing-declarations \
13767                 Wmissing-prototypes \
13768                 Wnested-externs \
13769                 Wpointer-arith \
13770                 Wshadow \
13771                 Wstrict-prototypes \
13772                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13773         do
13774                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13775                 if { (eval echo "$as_me:13775: \"$ac_compile\"") >&5
13776   (eval $ac_compile) 2>&5
13777   ac_status=$?
13778   echo "$as_me:13778: \$? = $ac_status" >&5
13779   (exit $ac_status); }; then
13780                         test -n "$verbose" && echo "$as_me:13780: result: ... -$cf_opt" >&5
13781 echo "${ECHO_T}... -$cf_opt" >&6
13782                         case $cf_opt in
13783                         (Wcast-qual)
13784                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13785                                 ;;
13786                         (Winline)
13787                                 case $GCC_VERSION in
13788                                 ([34].*)
13789                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13790
13791 echo "${as_me:-configure}:13791: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13792
13793                                         continue;;
13794                                 esac
13795                                 ;;
13796                         (Wpointer-arith)
13797                                 case $GCC_VERSION in
13798                                 ([12].*)
13799                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13800
13801 echo "${as_me:-configure}:13801: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13802
13803                                         continue;;
13804                                 esac
13805                                 ;;
13806                         esac
13807                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13808                 fi
13809         done
13810         CFLAGS="$cf_save_CFLAGS"
13811 fi
13812 rm -rf conftest*
13813
13814         if test "x$cf_with_cxx" = xyes ; then
13815
13816 INTEL_CPLUSPLUS=no
13817
13818 if test "$GCC" = yes ; then
13819         case $host_os in
13820         (linux*|gnu*)
13821                 echo "$as_me:13821: checking if this is really Intel C++ compiler" >&5
13822 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13823                 cf_save_CFLAGS="$CXXFLAGS"
13824                 CXXFLAGS="$CXXFLAGS -no-gcc"
13825                 cat >conftest.$ac_ext <<_ACEOF
13826 #line 13826 "configure"
13827 #include "confdefs.h"
13828
13829 int
13830 main (void)
13831 {
13832
13833 #ifdef __INTEL_COMPILER
13834 #else
13835 make an error
13836 #endif
13837
13838   ;
13839   return 0;
13840 }
13841 _ACEOF
13842 rm -f conftest.$ac_objext
13843 if { (eval echo "$as_me:13843: \"$ac_compile\"") >&5
13844   (eval $ac_compile) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit $ac_status); } &&
13848          { ac_try='test -s conftest.$ac_objext'
13849   { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850   (eval $ac_try) 2>&5
13851   ac_status=$?
13852   echo "$as_me:13852: \$? = $ac_status" >&5
13853   (exit $ac_status); }; }; then
13854   INTEL_CPLUSPLUS=yes
13855 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13856
13857 else
13858   echo "$as_me: failed program was:" >&5
13859 cat conftest.$ac_ext >&5
13860 fi
13861 rm -f conftest.$ac_objext conftest.$ac_ext
13862                 CXXFLAGS="$cf_save_CFLAGS"
13863                 echo "$as_me:13863: result: $INTEL_CPLUSPLUS" >&5
13864 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13865                 ;;
13866         esac
13867 fi
13868
13869 CLANG_CPLUSPLUS=no
13870
13871 if test "$GCC" = yes ; then
13872         echo "$as_me:13872: checking if this is really Clang C++ compiler" >&5
13873 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13874         cf_save_CFLAGS="$CXXFLAGS"
13875         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13876         cat >conftest.$ac_ext <<_ACEOF
13877 #line 13877 "configure"
13878 #include "confdefs.h"
13879
13880 int
13881 main (void)
13882 {
13883
13884 #ifdef __clang__
13885 #else
13886 make an error
13887 #endif
13888
13889   ;
13890   return 0;
13891 }
13892 _ACEOF
13893 rm -f conftest.$ac_objext
13894 if { (eval echo "$as_me:13894: \"$ac_compile\"") >&5
13895   (eval $ac_compile) 2>&5
13896   ac_status=$?
13897   echo "$as_me:13897: \$? = $ac_status" >&5
13898   (exit $ac_status); } &&
13899          { ac_try='test -s conftest.$ac_objext'
13900   { (eval echo "$as_me:13900: \"$ac_try\"") >&5
13901   (eval $ac_try) 2>&5
13902   ac_status=$?
13903   echo "$as_me:13903: \$? = $ac_status" >&5
13904   (exit $ac_status); }; }; then
13905   CLANG_CPLUSPLUS=yes
13906 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13907
13908 else
13909   echo "$as_me: failed program was:" >&5
13910 cat conftest.$ac_ext >&5
13911 fi
13912 rm -f conftest.$ac_objext conftest.$ac_ext
13913         CXXFLAGS="$cf_save_CFLAGS"
13914         echo "$as_me:13914: result: $CLANG_CPLUSPLUS" >&5
13915 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13916 fi
13917
13918 ac_ext=cc
13919 ac_cpp='$CXXCPP $CPPFLAGS'
13920 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13921 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13922 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13923 ac_main_return=return
13924
13925 cat > conftest.$ac_ext <<EOF
13926 #line 13926 "configure"
13927 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13928 EOF
13929
13930 if test "$INTEL_CPLUSPLUS" = yes
13931 then
13932 # The "-wdXXX" options suppress warnings:
13933 # remark #1419: external declaration in primary source file
13934 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13935 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13936 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13937 # remark #193: zero used for undefined preprocessing identifier
13938 # remark #593: variable "curs_sb_left_arrow" was set but never used
13939 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13940 # remark #869: parameter "tw" was never referenced
13941 # remark #981: operands are evaluated in unspecified order
13942 # warning #269: invalid format string conversion
13943
13944         { echo "$as_me:13944: checking for $CC warning options..." >&5
13945 echo "$as_me: checking for $CC warning options..." >&6;}
13946         cf_save_CXXFLAGS="$CXXFLAGS"
13947         EXTRA_CXXFLAGS="-Wall"
13948         for cf_opt in \
13949                 wd1419 \
13950                 wd1682 \
13951                 wd1683 \
13952                 wd1684 \
13953                 wd193 \
13954                 wd279 \
13955                 wd593 \
13956                 wd810 \
13957                 wd869 \
13958                 wd981
13959         do
13960                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13961                 if { (eval echo "$as_me:13961: \"$ac_compile\"") >&5
13962   (eval $ac_compile) 2>&5
13963   ac_status=$?
13964   echo "$as_me:13964: \$? = $ac_status" >&5
13965   (exit $ac_status); }; then
13966                         test -n "$verbose" && echo "$as_me:13966: result: ... -$cf_opt" >&5
13967 echo "${ECHO_T}... -$cf_opt" >&6
13968                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13969                 fi
13970         done
13971         CXXFLAGS="$cf_save_CXXFLAGS"
13972
13973 elif test "$GXX" = yes
13974 then
13975         { echo "$as_me:13975: checking for $CXX warning options..." >&5
13976 echo "$as_me: checking for $CXX warning options..." >&6;}
13977         cf_save_CXXFLAGS="$CXXFLAGS"
13978         EXTRA_CXXFLAGS="-W -Wall"
13979         cf_gxx_extra_warnings=""
13980         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13981         case "$GCC_VERSION" in
13982         ([1-2].*)
13983                 ;;
13984         (*)
13985                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13986                 ;;
13987         esac
13988         for cf_opt in \
13989                 Wabi \
13990                 fabi-version=0 \
13991                 Wextra \
13992                 Wignored-qualifiers \
13993                 Wlogical-op \
13994                 Woverloaded-virtual \
13995                 Wsign-promo \
13996                 Wsynth \
13997                 Wold-style-cast \
13998                 Wcast-align \
13999                 Wcast-qual \
14000                 Wpointer-arith \
14001                 Wshadow \
14002                 Wundef $cf_gxx_extra_warnings Wno-unused
14003         do
14004                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14005                 if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006   (eval $ac_compile) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); }; then
14010                         test -n "$verbose" && echo "$as_me:14010: result: ... -$cf_opt" >&5
14011 echo "${ECHO_T}... -$cf_opt" >&6
14012                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14013                 else
14014                         test -n "$verbose" && echo "$as_me:14014: result: ... no -$cf_opt" >&5
14015 echo "${ECHO_T}... no -$cf_opt" >&6
14016                 fi
14017         done
14018         CXXFLAGS="$cf_save_CXXFLAGS"
14019 fi
14020
14021 rm -rf conftest*
14022 ac_ext=c
14023 ac_cpp='$CPP $CPPFLAGS'
14024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14026 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14027 ac_main_return=return
14028
14029         fi
14030 fi
14031
14032 if test "$GCC" = yes
14033 then
14034 cat > conftest.i <<EOF
14035 #ifndef GCC_PRINTF
14036 #define GCC_PRINTF 0
14037 #endif
14038 #ifndef GCC_SCANF
14039 #define GCC_SCANF 0
14040 #endif
14041 #ifndef GCC_NORETURN
14042 #define GCC_NORETURN /* nothing */
14043 #endif
14044 #ifndef GCC_UNUSED
14045 #define GCC_UNUSED /* nothing */
14046 #endif
14047 EOF
14048 if test "$GCC" = yes
14049 then
14050         { echo "$as_me:14050: checking for $CC __attribute__ directives..." >&5
14051 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14052 cat > conftest.$ac_ext <<EOF
14053 #line 14053 "${as_me:-configure}"
14054 #include "confdefs.h"
14055 #include "conftest.h"
14056 #include "conftest.i"
14057 #if     GCC_PRINTF
14058 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14059 #else
14060 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14061 #endif
14062 #if     GCC_SCANF
14063 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14064 #else
14065 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14066 #endif
14067 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14068 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14069 extern void foo(void) GCC_NORETURN;
14070 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14071 EOF
14072         cf_printf_attribute=no
14073         cf_scanf_attribute=no
14074         for cf_attribute in scanf printf unused noreturn
14075         do
14076
14077 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14078
14079                 cf_directive="__attribute__(($cf_attribute))"
14080                 echo "checking for $CC $cf_directive" 1>&5
14081
14082                 case $cf_attribute in
14083                 (printf)
14084                         cf_printf_attribute=yes
14085                         cat >conftest.h <<EOF
14086 #define GCC_$cf_ATTRIBUTE 1
14087 EOF
14088                         ;;
14089                 (scanf)
14090                         cf_scanf_attribute=yes
14091                         cat >conftest.h <<EOF
14092 #define GCC_$cf_ATTRIBUTE 1
14093 EOF
14094                         ;;
14095                 (*)
14096                         cat >conftest.h <<EOF
14097 #define GCC_$cf_ATTRIBUTE $cf_directive
14098 EOF
14099                         ;;
14100                 esac
14101
14102                 if { (eval echo "$as_me:14102: \"$ac_compile\"") >&5
14103   (eval $ac_compile) 2>&5
14104   ac_status=$?
14105   echo "$as_me:14105: \$? = $ac_status" >&5
14106   (exit $ac_status); }; then
14107                         test -n "$verbose" && echo "$as_me:14107: result: ... $cf_attribute" >&5
14108 echo "${ECHO_T}... $cf_attribute" >&6
14109                         cat conftest.h >>confdefs.h
14110                         case $cf_attribute in
14111                         (noreturn)
14112
14113 cat >>confdefs.h <<EOF
14114 #define GCC_NORETURN $cf_directive
14115 EOF
14116
14117                                 ;;
14118                         (printf)
14119                                 cf_value='/* nothing */'
14120                                 if test "$cf_printf_attribute" != no ; then
14121                                         cf_value='__attribute__((format(printf,fmt,var)))'
14122
14123 cat >>confdefs.h <<\EOF
14124 #define GCC_PRINTF 1
14125 EOF
14126
14127                                 fi
14128
14129 cat >>confdefs.h <<EOF
14130 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14131 EOF
14132
14133                                 ;;
14134                         (scanf)
14135                                 cf_value='/* nothing */'
14136                                 if test "$cf_scanf_attribute" != no ; then
14137                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14138
14139 cat >>confdefs.h <<\EOF
14140 #define GCC_SCANF 1
14141 EOF
14142
14143                                 fi
14144
14145 cat >>confdefs.h <<EOF
14146 #define GCC_SCANFLIKE(fmt,var) $cf_value
14147 EOF
14148
14149                                 ;;
14150                         (unused)
14151
14152 cat >>confdefs.h <<EOF
14153 #define GCC_UNUSED $cf_directive
14154 EOF
14155
14156                                 ;;
14157                         esac
14158                 fi
14159         done
14160 else
14161         fgrep define conftest.i >>confdefs.h
14162 fi
14163 rm -rf conftest*
14164 fi
14165
14166 echo "$as_me:14166: checking if you want to work around bogus compiler/loader warnings" >&5
14167 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14168
14169 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14170 if test "${enable_string_hacks+set}" = set; then
14171   enableval="$enable_string_hacks"
14172   with_string_hacks=$enableval
14173 else
14174   with_string_hacks=no
14175 fi;
14176 echo "$as_me:14176: result: $with_string_hacks" >&5
14177 echo "${ECHO_T}$with_string_hacks" >&6
14178
14179 if test "x$with_string_hacks" = "xyes"; then
14180
14181 cat >>confdefs.h <<\EOF
14182 #define USE_STRING_HACKS 1
14183 EOF
14184
14185         { echo "$as_me:14185: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14186 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14187         echo "$as_me:14187: checking for strlcat" >&5
14188 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14189 if test "${ac_cv_func_strlcat+set}" = set; then
14190   echo $ECHO_N "(cached) $ECHO_C" >&6
14191 else
14192   cat >conftest.$ac_ext <<_ACEOF
14193 #line 14193 "configure"
14194 #include "confdefs.h"
14195 /* System header to define __stub macros and hopefully few prototypes,
14196     which can conflict with char strlcat (); below.  */
14197 #include <assert.h>
14198 /* Override any gcc2 internal prototype to avoid an error.  */
14199 #ifdef __cplusplus
14200 extern "C"
14201 #endif
14202 /* We use char because int might match the return type of a gcc2
14203    builtin and then its argument prototype would still apply.  */
14204 char strlcat ();
14205 char (*f) ();
14206
14207 int
14208 main (void)
14209 {
14210 /* The GNU C library defines this for functions which it implements
14211     to always fail with ENOSYS.  Some functions are actually named
14212     something starting with __ and the normal name is an alias.  */
14213 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14214 choke me
14215 #else
14216 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14217 #endif
14218
14219   ;
14220   return 0;
14221 }
14222 _ACEOF
14223 rm -f conftest.$ac_objext conftest$ac_exeext
14224 if { (eval echo "$as_me:14224: \"$ac_link\"") >&5
14225   (eval $ac_link) 2>&5
14226   ac_status=$?
14227   echo "$as_me:14227: \$? = $ac_status" >&5
14228   (exit $ac_status); } &&
14229          { ac_try='test -s conftest$ac_exeext'
14230   { (eval echo "$as_me:14230: \"$ac_try\"") >&5
14231   (eval $ac_try) 2>&5
14232   ac_status=$?
14233   echo "$as_me:14233: \$? = $ac_status" >&5
14234   (exit $ac_status); }; }; then
14235   ac_cv_func_strlcat=yes
14236 else
14237   echo "$as_me: failed program was:" >&5
14238 cat conftest.$ac_ext >&5
14239 ac_cv_func_strlcat=no
14240 fi
14241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14242 fi
14243 echo "$as_me:14243: result: $ac_cv_func_strlcat" >&5
14244 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14245 if test $ac_cv_func_strlcat = yes; then
14246
14247 cat >>confdefs.h <<\EOF
14248 #define HAVE_STRLCAT 1
14249 EOF
14250
14251 else
14252
14253                 echo "$as_me:14253: checking for strlcat in -lbsd" >&5
14254 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14255 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14256   echo $ECHO_N "(cached) $ECHO_C" >&6
14257 else
14258   ac_check_lib_save_LIBS=$LIBS
14259 LIBS="-lbsd  $LIBS"
14260 cat >conftest.$ac_ext <<_ACEOF
14261 #line 14261 "configure"
14262 #include "confdefs.h"
14263
14264 /* Override any gcc2 internal prototype to avoid an error.  */
14265 #ifdef __cplusplus
14266 extern "C"
14267 #endif
14268 /* We use char because int might match the return type of a gcc2
14269    builtin and then its argument prototype would still apply.  */
14270 char strlcat ();
14271 int
14272 main (void)
14273 {
14274 strlcat ();
14275   ;
14276   return 0;
14277 }
14278 _ACEOF
14279 rm -f conftest.$ac_objext conftest$ac_exeext
14280 if { (eval echo "$as_me:14280: \"$ac_link\"") >&5
14281   (eval $ac_link) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit $ac_status); } &&
14285          { ac_try='test -s conftest$ac_exeext'
14286   { (eval echo "$as_me:14286: \"$ac_try\"") >&5
14287   (eval $ac_try) 2>&5
14288   ac_status=$?
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit $ac_status); }; }; then
14291   ac_cv_lib_bsd_strlcat=yes
14292 else
14293   echo "$as_me: failed program was:" >&5
14294 cat conftest.$ac_ext >&5
14295 ac_cv_lib_bsd_strlcat=no
14296 fi
14297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14298 LIBS=$ac_check_lib_save_LIBS
14299 fi
14300 echo "$as_me:14300: result: $ac_cv_lib_bsd_strlcat" >&5
14301 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14302 if test $ac_cv_lib_bsd_strlcat = yes; then
14303
14304 cf_add_libs="-lbsd"
14305 # Filter out duplicates - this happens with badly-designed ".pc" files...
14306 for cf_add_1lib in $LIBS
14307 do
14308         for cf_add_2lib in $cf_add_libs
14309         do
14310                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14311                 then
14312                         cf_add_1lib=
14313                         break
14314                 fi
14315         done
14316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14317 done
14318 LIBS="$cf_add_libs"
14319
14320 for ac_header in bsd/string.h
14321 do
14322 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14323 echo "$as_me:14323: checking for $ac_header" >&5
14324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14326   echo $ECHO_N "(cached) $ECHO_C" >&6
14327 else
14328   cat >conftest.$ac_ext <<_ACEOF
14329 #line 14329 "configure"
14330 #include "confdefs.h"
14331 #include <$ac_header>
14332 _ACEOF
14333 if { (eval echo "$as_me:14333: \"$ac_cpp conftest.$ac_ext\"") >&5
14334   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14335   ac_status=$?
14336   egrep -v '^ *\+' conftest.er1 >conftest.err
14337   rm -f conftest.er1
14338   cat conftest.err >&5
14339   echo "$as_me:14339: \$? = $ac_status" >&5
14340   (exit $ac_status); } >/dev/null; then
14341   if test -s conftest.err; then
14342     ac_cpp_err=$ac_c_preproc_warn_flag
14343   else
14344     ac_cpp_err=
14345   fi
14346 else
14347   ac_cpp_err=yes
14348 fi
14349 if test -z "$ac_cpp_err"; then
14350   eval "$as_ac_Header=yes"
14351 else
14352   echo "$as_me: failed program was:" >&5
14353   cat conftest.$ac_ext >&5
14354   eval "$as_ac_Header=no"
14355 fi
14356 rm -f conftest.err conftest.$ac_ext
14357 fi
14358 echo "$as_me:14358: result: `eval echo '${'$as_ac_Header'}'`" >&5
14359 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14360 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14361   cat >>confdefs.h <<EOF
14362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14363 EOF
14364
14365 fi
14366 done
14367
14368 cat >>confdefs.h <<\EOF
14369 #define HAVE_STRLCAT 1
14370 EOF
14371
14372 fi
14373
14374 fi
14375
14376 for ac_func in strlcpy snprintf
14377 do
14378 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14379 echo "$as_me:14379: checking for $ac_func" >&5
14380 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14381 if eval "test \"\${$as_ac_var+set}\" = set"; then
14382   echo $ECHO_N "(cached) $ECHO_C" >&6
14383 else
14384   cat >conftest.$ac_ext <<_ACEOF
14385 #line 14385 "configure"
14386 #include "confdefs.h"
14387 /* System header to define __stub macros and hopefully few prototypes,
14388     which can conflict with char $ac_func (); below.  */
14389 #include <assert.h>
14390 /* Override any gcc2 internal prototype to avoid an error.  */
14391 #ifdef __cplusplus
14392 extern "C"
14393 #endif
14394 /* We use char because int might match the return type of a gcc2
14395    builtin and then its argument prototype would still apply.  */
14396 char $ac_func ();
14397 char (*f) ();
14398
14399 int
14400 main (void)
14401 {
14402 /* The GNU C library defines this for functions which it implements
14403     to always fail with ENOSYS.  Some functions are actually named
14404     something starting with __ and the normal name is an alias.  */
14405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14406 choke me
14407 #else
14408 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14409 #endif
14410
14411   ;
14412   return 0;
14413 }
14414 _ACEOF
14415 rm -f conftest.$ac_objext conftest$ac_exeext
14416 if { (eval echo "$as_me:14416: \"$ac_link\"") >&5
14417   (eval $ac_link) 2>&5
14418   ac_status=$?
14419   echo "$as_me:14419: \$? = $ac_status" >&5
14420   (exit $ac_status); } &&
14421          { ac_try='test -s conftest$ac_exeext'
14422   { (eval echo "$as_me:14422: \"$ac_try\"") >&5
14423   (eval $ac_try) 2>&5
14424   ac_status=$?
14425   echo "$as_me:14425: \$? = $ac_status" >&5
14426   (exit $ac_status); }; }; then
14427   eval "$as_ac_var=yes"
14428 else
14429   echo "$as_me: failed program was:" >&5
14430 cat conftest.$ac_ext >&5
14431 eval "$as_ac_var=no"
14432 fi
14433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14434 fi
14435 echo "$as_me:14435: result: `eval echo '${'$as_ac_var'}'`" >&5
14436 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14437 if test `eval echo '${'$as_ac_var'}'` = yes; then
14438   cat >>confdefs.h <<EOF
14439 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14440 EOF
14441
14442 fi
14443 done
14444
14445 fi
14446
14447 ###     use option --enable-assertions to turn on generation of assertion code
14448 echo "$as_me:14448: checking if you want to enable runtime assertions" >&5
14449 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14450
14451 # Check whether --enable-assertions or --disable-assertions was given.
14452 if test "${enable_assertions+set}" = set; then
14453   enableval="$enable_assertions"
14454   with_assertions=$enableval
14455 else
14456   with_assertions=no
14457 fi;
14458 echo "$as_me:14458: result: $with_assertions" >&5
14459 echo "${ECHO_T}$with_assertions" >&6
14460 if test -n "$GCC"
14461 then
14462         if test "$with_assertions" = no
14463         then
14464                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14465         else
14466
14467         ADAFLAGS="$ADAFLAGS -gnata"
14468
14469         fi
14470 fi
14471
14472 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14473
14474 echo "$as_me:14474: checking if you want to use dmalloc for testing" >&5
14475 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14476
14477 # Check whether --with-dmalloc or --without-dmalloc was given.
14478 if test "${with_dmalloc+set}" = set; then
14479   withval="$with_dmalloc"
14480
14481 cat >>confdefs.h <<EOF
14482 #define USE_DMALLOC 1
14483 EOF
14484
14485         : ${with_cflags:=-g}
14486         : ${with_no_leaks:=yes}
14487          with_dmalloc=yes
14488 else
14489   with_dmalloc=
14490 fi;
14491 echo "$as_me:14491: result: ${with_dmalloc:-no}" >&5
14492 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14493
14494 case .$with_cflags in
14495 (.*-g*)
14496         case .$CFLAGS in
14497         (.*-g*)
14498                 ;;
14499         (*)
14500
14501 cf_fix_cppflags=no
14502 cf_new_cflags=
14503 cf_new_cppflags=
14504 cf_new_extra_cppflags=
14505
14506 for cf_add_cflags in -g
14507 do
14508 case $cf_fix_cppflags in
14509 (no)
14510         case $cf_add_cflags in
14511         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14512                 case $cf_add_cflags in
14513                 (-D*)
14514                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14515
14516                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14517                                 && test -z "${cf_tst_cflags}" \
14518                                 && cf_fix_cppflags=yes
14519
14520                         if test $cf_fix_cppflags = yes ; then
14521
14522         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14523         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14524
14525                                 continue
14526                         elif test "${cf_tst_cflags}" = "\"'" ; then
14527
14528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14530
14531                                 continue
14532                         fi
14533                         ;;
14534                 esac
14535                 case "$CPPFLAGS" in
14536                 (*$cf_add_cflags)
14537                         ;;
14538                 (*)
14539                         case $cf_add_cflags in
14540                         (-D*)
14541                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14542
14543 CPPFLAGS=`echo "$CPPFLAGS" | \
14544         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14545                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14546
14547                                 ;;
14548                         esac
14549
14550         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14551         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14552
14553                         ;;
14554                 esac
14555                 ;;
14556         (*)
14557
14558         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14559         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14560
14561                 ;;
14562         esac
14563         ;;
14564 (yes)
14565
14566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14568
14569         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14570
14571         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14572                 && test -z "${cf_tst_cflags}" \
14573                 && cf_fix_cppflags=no
14574         ;;
14575 esac
14576 done
14577
14578 if test -n "$cf_new_cflags" ; then
14579
14580         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14581         CFLAGS="${CFLAGS}$cf_new_cflags"
14582
14583 fi
14584
14585 if test -n "$cf_new_cppflags" ; then
14586
14587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14588         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14589
14590 fi
14591
14592 if test -n "$cf_new_extra_cppflags" ; then
14593
14594         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14595         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14596
14597 fi
14598
14599                 ;;
14600         esac
14601         ;;
14602 esac
14603
14604 if test "$with_dmalloc" = yes ; then
14605         echo "$as_me:14605: checking for dmalloc.h" >&5
14606 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14607 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14608   echo $ECHO_N "(cached) $ECHO_C" >&6
14609 else
14610   cat >conftest.$ac_ext <<_ACEOF
14611 #line 14611 "configure"
14612 #include "confdefs.h"
14613 #include <dmalloc.h>
14614 _ACEOF
14615 if { (eval echo "$as_me:14615: \"$ac_cpp conftest.$ac_ext\"") >&5
14616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14617   ac_status=$?
14618   egrep -v '^ *\+' conftest.er1 >conftest.err
14619   rm -f conftest.er1
14620   cat conftest.err >&5
14621   echo "$as_me:14621: \$? = $ac_status" >&5
14622   (exit $ac_status); } >/dev/null; then
14623   if test -s conftest.err; then
14624     ac_cpp_err=$ac_c_preproc_warn_flag
14625   else
14626     ac_cpp_err=
14627   fi
14628 else
14629   ac_cpp_err=yes
14630 fi
14631 if test -z "$ac_cpp_err"; then
14632   ac_cv_header_dmalloc_h=yes
14633 else
14634   echo "$as_me: failed program was:" >&5
14635   cat conftest.$ac_ext >&5
14636   ac_cv_header_dmalloc_h=no
14637 fi
14638 rm -f conftest.err conftest.$ac_ext
14639 fi
14640 echo "$as_me:14640: result: $ac_cv_header_dmalloc_h" >&5
14641 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14642 if test $ac_cv_header_dmalloc_h = yes; then
14643
14644 echo "$as_me:14644: checking for dmalloc_debug in -ldmalloc" >&5
14645 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14646 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14647   echo $ECHO_N "(cached) $ECHO_C" >&6
14648 else
14649   ac_check_lib_save_LIBS=$LIBS
14650 LIBS="-ldmalloc  $LIBS"
14651 cat >conftest.$ac_ext <<_ACEOF
14652 #line 14652 "configure"
14653 #include "confdefs.h"
14654
14655 /* Override any gcc2 internal prototype to avoid an error.  */
14656 #ifdef __cplusplus
14657 extern "C"
14658 #endif
14659 /* We use char because int might match the return type of a gcc2
14660    builtin and then its argument prototype would still apply.  */
14661 char dmalloc_debug ();
14662 int
14663 main (void)
14664 {
14665 dmalloc_debug ();
14666   ;
14667   return 0;
14668 }
14669 _ACEOF
14670 rm -f conftest.$ac_objext conftest$ac_exeext
14671 if { (eval echo "$as_me:14671: \"$ac_link\"") >&5
14672   (eval $ac_link) 2>&5
14673   ac_status=$?
14674   echo "$as_me:14674: \$? = $ac_status" >&5
14675   (exit $ac_status); } &&
14676          { ac_try='test -s conftest$ac_exeext'
14677   { (eval echo "$as_me:14677: \"$ac_try\"") >&5
14678   (eval $ac_try) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit $ac_status); }; }; then
14682   ac_cv_lib_dmalloc_dmalloc_debug=yes
14683 else
14684   echo "$as_me: failed program was:" >&5
14685 cat conftest.$ac_ext >&5
14686 ac_cv_lib_dmalloc_dmalloc_debug=no
14687 fi
14688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14689 LIBS=$ac_check_lib_save_LIBS
14690 fi
14691 echo "$as_me:14691: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14692 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14693 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14694   cat >>confdefs.h <<EOF
14695 #define HAVE_LIBDMALLOC 1
14696 EOF
14697
14698   LIBS="-ldmalloc $LIBS"
14699
14700 fi
14701
14702 fi
14703
14704 fi
14705
14706 echo "$as_me:14706: checking if you want to use dbmalloc for testing" >&5
14707 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14708
14709 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14710 if test "${with_dbmalloc+set}" = set; then
14711   withval="$with_dbmalloc"
14712
14713 cat >>confdefs.h <<EOF
14714 #define USE_DBMALLOC 1
14715 EOF
14716
14717         : ${with_cflags:=-g}
14718         : ${with_no_leaks:=yes}
14719          with_dbmalloc=yes
14720 else
14721   with_dbmalloc=
14722 fi;
14723 echo "$as_me:14723: result: ${with_dbmalloc:-no}" >&5
14724 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14725
14726 case .$with_cflags in
14727 (.*-g*)
14728         case .$CFLAGS in
14729         (.*-g*)
14730                 ;;
14731         (*)
14732
14733 cf_fix_cppflags=no
14734 cf_new_cflags=
14735 cf_new_cppflags=
14736 cf_new_extra_cppflags=
14737
14738 for cf_add_cflags in -g
14739 do
14740 case $cf_fix_cppflags in
14741 (no)
14742         case $cf_add_cflags in
14743         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14744                 case $cf_add_cflags in
14745                 (-D*)
14746                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14747
14748                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14749                                 && test -z "${cf_tst_cflags}" \
14750                                 && cf_fix_cppflags=yes
14751
14752                         if test $cf_fix_cppflags = yes ; then
14753
14754         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14755         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14756
14757                                 continue
14758                         elif test "${cf_tst_cflags}" = "\"'" ; then
14759
14760         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14761         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14762
14763                                 continue
14764                         fi
14765                         ;;
14766                 esac
14767                 case "$CPPFLAGS" in
14768                 (*$cf_add_cflags)
14769                         ;;
14770                 (*)
14771                         case $cf_add_cflags in
14772                         (-D*)
14773                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14774
14775 CPPFLAGS=`echo "$CPPFLAGS" | \
14776         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14777                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14778
14779                                 ;;
14780                         esac
14781
14782         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14783         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14784
14785                         ;;
14786                 esac
14787                 ;;
14788         (*)
14789
14790         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14791         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14792
14793                 ;;
14794         esac
14795         ;;
14796 (yes)
14797
14798         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14799         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14800
14801         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14802
14803         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14804                 && test -z "${cf_tst_cflags}" \
14805                 && cf_fix_cppflags=no
14806         ;;
14807 esac
14808 done
14809
14810 if test -n "$cf_new_cflags" ; then
14811
14812         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14813         CFLAGS="${CFLAGS}$cf_new_cflags"
14814
14815 fi
14816
14817 if test -n "$cf_new_cppflags" ; then
14818
14819         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14820         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14821
14822 fi
14823
14824 if test -n "$cf_new_extra_cppflags" ; then
14825
14826         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14827         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14828
14829 fi
14830
14831                 ;;
14832         esac
14833         ;;
14834 esac
14835
14836 if test "$with_dbmalloc" = yes ; then
14837         echo "$as_me:14837: checking for dbmalloc.h" >&5
14838 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14839 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14840   echo $ECHO_N "(cached) $ECHO_C" >&6
14841 else
14842   cat >conftest.$ac_ext <<_ACEOF
14843 #line 14843 "configure"
14844 #include "confdefs.h"
14845 #include <dbmalloc.h>
14846 _ACEOF
14847 if { (eval echo "$as_me:14847: \"$ac_cpp conftest.$ac_ext\"") >&5
14848   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14849   ac_status=$?
14850   egrep -v '^ *\+' conftest.er1 >conftest.err
14851   rm -f conftest.er1
14852   cat conftest.err >&5
14853   echo "$as_me:14853: \$? = $ac_status" >&5
14854   (exit $ac_status); } >/dev/null; then
14855   if test -s conftest.err; then
14856     ac_cpp_err=$ac_c_preproc_warn_flag
14857   else
14858     ac_cpp_err=
14859   fi
14860 else
14861   ac_cpp_err=yes
14862 fi
14863 if test -z "$ac_cpp_err"; then
14864   ac_cv_header_dbmalloc_h=yes
14865 else
14866   echo "$as_me: failed program was:" >&5
14867   cat conftest.$ac_ext >&5
14868   ac_cv_header_dbmalloc_h=no
14869 fi
14870 rm -f conftest.err conftest.$ac_ext
14871 fi
14872 echo "$as_me:14872: result: $ac_cv_header_dbmalloc_h" >&5
14873 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14874 if test $ac_cv_header_dbmalloc_h = yes; then
14875
14876 echo "$as_me:14876: checking for debug_malloc in -ldbmalloc" >&5
14877 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14878 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14879   echo $ECHO_N "(cached) $ECHO_C" >&6
14880 else
14881   ac_check_lib_save_LIBS=$LIBS
14882 LIBS="-ldbmalloc  $LIBS"
14883 cat >conftest.$ac_ext <<_ACEOF
14884 #line 14884 "configure"
14885 #include "confdefs.h"
14886
14887 /* Override any gcc2 internal prototype to avoid an error.  */
14888 #ifdef __cplusplus
14889 extern "C"
14890 #endif
14891 /* We use char because int might match the return type of a gcc2
14892    builtin and then its argument prototype would still apply.  */
14893 char debug_malloc ();
14894 int
14895 main (void)
14896 {
14897 debug_malloc ();
14898   ;
14899   return 0;
14900 }
14901 _ACEOF
14902 rm -f conftest.$ac_objext conftest$ac_exeext
14903 if { (eval echo "$as_me:14903: \"$ac_link\"") >&5
14904   (eval $ac_link) 2>&5
14905   ac_status=$?
14906   echo "$as_me:14906: \$? = $ac_status" >&5
14907   (exit $ac_status); } &&
14908          { ac_try='test -s conftest$ac_exeext'
14909   { (eval echo "$as_me:14909: \"$ac_try\"") >&5
14910   (eval $ac_try) 2>&5
14911   ac_status=$?
14912   echo "$as_me:14912: \$? = $ac_status" >&5
14913   (exit $ac_status); }; }; then
14914   ac_cv_lib_dbmalloc_debug_malloc=yes
14915 else
14916   echo "$as_me: failed program was:" >&5
14917 cat conftest.$ac_ext >&5
14918 ac_cv_lib_dbmalloc_debug_malloc=no
14919 fi
14920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14921 LIBS=$ac_check_lib_save_LIBS
14922 fi
14923 echo "$as_me:14923: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14924 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14925 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14926   cat >>confdefs.h <<EOF
14927 #define HAVE_LIBDBMALLOC 1
14928 EOF
14929
14930   LIBS="-ldbmalloc $LIBS"
14931
14932 fi
14933
14934 fi
14935
14936 fi
14937
14938 echo "$as_me:14938: checking if you want to use valgrind for testing" >&5
14939 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14940
14941 # Check whether --with-valgrind or --without-valgrind was given.
14942 if test "${with_valgrind+set}" = set; then
14943   withval="$with_valgrind"
14944
14945 cat >>confdefs.h <<EOF
14946 #define USE_VALGRIND 1
14947 EOF
14948
14949         : ${with_cflags:=-g}
14950         : ${with_no_leaks:=yes}
14951          with_valgrind=yes
14952 else
14953   with_valgrind=
14954 fi;
14955 echo "$as_me:14955: result: ${with_valgrind:-no}" >&5
14956 echo "${ECHO_T}${with_valgrind:-no}" >&6
14957
14958 case .$with_cflags in
14959 (.*-g*)
14960         case .$CFLAGS in
14961         (.*-g*)
14962                 ;;
14963         (*)
14964
14965 cf_fix_cppflags=no
14966 cf_new_cflags=
14967 cf_new_cppflags=
14968 cf_new_extra_cppflags=
14969
14970 for cf_add_cflags in -g
14971 do
14972 case $cf_fix_cppflags in
14973 (no)
14974         case $cf_add_cflags in
14975         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14976                 case $cf_add_cflags in
14977                 (-D*)
14978                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14979
14980                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14981                                 && test -z "${cf_tst_cflags}" \
14982                                 && cf_fix_cppflags=yes
14983
14984                         if test $cf_fix_cppflags = yes ; then
14985
14986         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14987         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14988
14989                                 continue
14990                         elif test "${cf_tst_cflags}" = "\"'" ; then
14991
14992         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14993         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14994
14995                                 continue
14996                         fi
14997                         ;;
14998                 esac
14999                 case "$CPPFLAGS" in
15000                 (*$cf_add_cflags)
15001                         ;;
15002                 (*)
15003                         case $cf_add_cflags in
15004                         (-D*)
15005                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15006
15007 CPPFLAGS=`echo "$CPPFLAGS" | \
15008         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15009                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15010
15011                                 ;;
15012                         esac
15013
15014         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15015         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15016
15017                         ;;
15018                 esac
15019                 ;;
15020         (*)
15021
15022         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15023         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15024
15025                 ;;
15026         esac
15027         ;;
15028 (yes)
15029
15030         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15031         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15032
15033         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15034
15035         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15036                 && test -z "${cf_tst_cflags}" \
15037                 && cf_fix_cppflags=no
15038         ;;
15039 esac
15040 done
15041
15042 if test -n "$cf_new_cflags" ; then
15043
15044         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15045         CFLAGS="${CFLAGS}$cf_new_cflags"
15046
15047 fi
15048
15049 if test -n "$cf_new_cppflags" ; then
15050
15051         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15052         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15053
15054 fi
15055
15056 if test -n "$cf_new_extra_cppflags" ; then
15057
15058         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15059         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15060
15061 fi
15062
15063                 ;;
15064         esac
15065         ;;
15066 esac
15067
15068 echo "$as_me:15068: checking if you want to perform memory-leak testing" >&5
15069 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15070
15071 # Check whether --enable-leaks or --disable-leaks was given.
15072 if test "${enable_leaks+set}" = set; then
15073   enableval="$enable_leaks"
15074   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15075 else
15076   : ${with_no_leaks:=no}
15077 fi;
15078 echo "$as_me:15078: result: $with_no_leaks" >&5
15079 echo "${ECHO_T}$with_no_leaks" >&6
15080
15081 if test "$with_no_leaks" = yes ; then
15082
15083 cat >>confdefs.h <<\EOF
15084 #define NO_LEAKS 1
15085 EOF
15086
15087 cat >>confdefs.h <<\EOF
15088 #define YY_NO_LEAKS 1
15089 EOF
15090
15091 fi
15092
15093 cat >>confdefs.h <<\EOF
15094 #define HAVE_NC_ALLOC_H 1
15095 EOF
15096
15097 ###     use option --enable-expanded to generate certain macros as functions
15098
15099 # Check whether --enable-expanded or --disable-expanded was given.
15100 if test "${enable_expanded+set}" = set; then
15101   enableval="$enable_expanded"
15102   test "x$enableval" = xyes &&
15103 cat >>confdefs.h <<\EOF
15104 #define NCURSES_EXPANDED 1
15105 EOF
15106
15107 fi;
15108
15109 ###     use option --disable-macros to suppress macros in favor of functions
15110
15111 # Check whether --enable-macros or --disable-macros was given.
15112 if test "${enable_macros+set}" = set; then
15113   enableval="$enable_macros"
15114   test "$enableval" = no &&
15115 cat >>confdefs.h <<\EOF
15116 #define NCURSES_NOMACROS 1
15117 EOF
15118
15119 fi;
15120
15121 # Normally we only add trace() to the debug-library.  Allow this to be
15122 # extended to all models of the ncurses library:
15123 cf_all_traces=no
15124 case "$CFLAGS $CPPFLAGS" in
15125 (*-DTRACE*)
15126         cf_all_traces=yes
15127         ;;
15128 esac
15129
15130 echo "$as_me:15130: checking whether to add trace feature to all models" >&5
15131 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15132
15133 # Check whether --with-trace or --without-trace was given.
15134 if test "${with_trace+set}" = set; then
15135   withval="$with_trace"
15136   cf_with_trace=$withval
15137 else
15138   cf_with_trace=$cf_all_traces
15139 fi;
15140 echo "$as_me:15140: result: $cf_with_trace" >&5
15141 echo "${ECHO_T}$cf_with_trace" >&6
15142
15143 if test "x$cf_with_trace" = xyes ; then
15144         LIB_TRACING=all
15145         ADA_TRACE=TRUE
15146
15147 cf_fix_cppflags=no
15148 cf_new_cflags=
15149 cf_new_cppflags=
15150 cf_new_extra_cppflags=
15151
15152 for cf_add_cflags in -DTRACE
15153 do
15154 case $cf_fix_cppflags in
15155 (no)
15156         case $cf_add_cflags in
15157         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15158                 case $cf_add_cflags in
15159                 (-D*)
15160                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15161
15162                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15163                                 && test -z "${cf_tst_cflags}" \
15164                                 && cf_fix_cppflags=yes
15165
15166                         if test $cf_fix_cppflags = yes ; then
15167
15168         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15169         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15170
15171                                 continue
15172                         elif test "${cf_tst_cflags}" = "\"'" ; then
15173
15174         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15175         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15176
15177                                 continue
15178                         fi
15179                         ;;
15180                 esac
15181                 case "$CPPFLAGS" in
15182                 (*$cf_add_cflags)
15183                         ;;
15184                 (*)
15185                         case $cf_add_cflags in
15186                         (-D*)
15187                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15188
15189 CPPFLAGS=`echo "$CPPFLAGS" | \
15190         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15191                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15192
15193                                 ;;
15194                         esac
15195
15196         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15197         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15198
15199                         ;;
15200                 esac
15201                 ;;
15202         (*)
15203
15204         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15205         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15206
15207                 ;;
15208         esac
15209         ;;
15210 (yes)
15211
15212         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15213         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15214
15215         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15216
15217         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15218                 && test -z "${cf_tst_cflags}" \
15219                 && cf_fix_cppflags=no
15220         ;;
15221 esac
15222 done
15223
15224 if test -n "$cf_new_cflags" ; then
15225
15226         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15227         CFLAGS="${CFLAGS}$cf_new_cflags"
15228
15229 fi
15230
15231 if test -n "$cf_new_cppflags" ; then
15232
15233         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15234         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15235
15236 fi
15237
15238 if test -n "$cf_new_extra_cppflags" ; then
15239
15240         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15241         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15242
15243 fi
15244
15245 cat >>confdefs.h <<\EOF
15246 #define HAVE__TRACEF 1
15247 EOF
15248
15249 else
15250         LIB_TRACING=DEBUG
15251         ADA_TRACE=FALSE
15252 fi
15253
15254 echo "$as_me:15254: checking if we want to use GNAT projects" >&5
15255 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15256
15257 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15258 if test "${enable_gnat_projects+set}" = set; then
15259   enableval="$enable_gnat_projects"
15260   test "$enableval" != no && enableval=yes
15261         if test "$enableval" != "yes" ; then
15262     enable_gnat_projects=no
15263         else
15264                 enable_gnat_projects=yes
15265         fi
15266 else
15267   enableval=yes
15268         enable_gnat_projects=yes
15269
15270 fi;
15271 echo "$as_me:15271: result: $enable_gnat_projects" >&5
15272 echo "${ECHO_T}$enable_gnat_projects" >&6
15273
15274 ###     Checks for libraries.
15275 case $cf_cv_system_name in
15276 (*mingw32*|*mingw64*)
15277         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15278         LIBS=" -lpsapi $LIBS"
15279         ;;
15280 (*)
15281 echo "$as_me:15281: checking for gettimeofday" >&5
15282 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15283 if test "${ac_cv_func_gettimeofday+set}" = set; then
15284   echo $ECHO_N "(cached) $ECHO_C" >&6
15285 else
15286   cat >conftest.$ac_ext <<_ACEOF
15287 #line 15287 "configure"
15288 #include "confdefs.h"
15289 /* System header to define __stub macros and hopefully few prototypes,
15290     which can conflict with char gettimeofday (); below.  */
15291 #include <assert.h>
15292 /* Override any gcc2 internal prototype to avoid an error.  */
15293 #ifdef __cplusplus
15294 extern "C"
15295 #endif
15296 /* We use char because int might match the return type of a gcc2
15297    builtin and then its argument prototype would still apply.  */
15298 char gettimeofday ();
15299 char (*f) ();
15300
15301 int
15302 main (void)
15303 {
15304 /* The GNU C library defines this for functions which it implements
15305     to always fail with ENOSYS.  Some functions are actually named
15306     something starting with __ and the normal name is an alias.  */
15307 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15308 choke me
15309 #else
15310 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15311 #endif
15312
15313   ;
15314   return 0;
15315 }
15316 _ACEOF
15317 rm -f conftest.$ac_objext conftest$ac_exeext
15318 if { (eval echo "$as_me:15318: \"$ac_link\"") >&5
15319   (eval $ac_link) 2>&5
15320   ac_status=$?
15321   echo "$as_me:15321: \$? = $ac_status" >&5
15322   (exit $ac_status); } &&
15323          { ac_try='test -s conftest$ac_exeext'
15324   { (eval echo "$as_me:15324: \"$ac_try\"") >&5
15325   (eval $ac_try) 2>&5
15326   ac_status=$?
15327   echo "$as_me:15327: \$? = $ac_status" >&5
15328   (exit $ac_status); }; }; then
15329   ac_cv_func_gettimeofday=yes
15330 else
15331   echo "$as_me: failed program was:" >&5
15332 cat conftest.$ac_ext >&5
15333 ac_cv_func_gettimeofday=no
15334 fi
15335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15336 fi
15337 echo "$as_me:15337: result: $ac_cv_func_gettimeofday" >&5
15338 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15339 if test $ac_cv_func_gettimeofday = yes; then
15340
15341 cat >>confdefs.h <<\EOF
15342 #define HAVE_GETTIMEOFDAY 1
15343 EOF
15344
15345 else
15346
15347 echo "$as_me:15347: checking for gettimeofday in -lbsd" >&5
15348 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15349 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15350   echo $ECHO_N "(cached) $ECHO_C" >&6
15351 else
15352   ac_check_lib_save_LIBS=$LIBS
15353 LIBS="-lbsd  $LIBS"
15354 cat >conftest.$ac_ext <<_ACEOF
15355 #line 15355 "configure"
15356 #include "confdefs.h"
15357
15358 /* Override any gcc2 internal prototype to avoid an error.  */
15359 #ifdef __cplusplus
15360 extern "C"
15361 #endif
15362 /* We use char because int might match the return type of a gcc2
15363    builtin and then its argument prototype would still apply.  */
15364 char gettimeofday ();
15365 int
15366 main (void)
15367 {
15368 gettimeofday ();
15369   ;
15370   return 0;
15371 }
15372 _ACEOF
15373 rm -f conftest.$ac_objext conftest$ac_exeext
15374 if { (eval echo "$as_me:15374: \"$ac_link\"") >&5
15375   (eval $ac_link) 2>&5
15376   ac_status=$?
15377   echo "$as_me:15377: \$? = $ac_status" >&5
15378   (exit $ac_status); } &&
15379          { ac_try='test -s conftest$ac_exeext'
15380   { (eval echo "$as_me:15380: \"$ac_try\"") >&5
15381   (eval $ac_try) 2>&5
15382   ac_status=$?
15383   echo "$as_me:15383: \$? = $ac_status" >&5
15384   (exit $ac_status); }; }; then
15385   ac_cv_lib_bsd_gettimeofday=yes
15386 else
15387   echo "$as_me: failed program was:" >&5
15388 cat conftest.$ac_ext >&5
15389 ac_cv_lib_bsd_gettimeofday=no
15390 fi
15391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15392 LIBS=$ac_check_lib_save_LIBS
15393 fi
15394 echo "$as_me:15394: result: $ac_cv_lib_bsd_gettimeofday" >&5
15395 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15396 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15397
15398 cat >>confdefs.h <<\EOF
15399 #define HAVE_GETTIMEOFDAY 1
15400 EOF
15401
15402 cf_add_libs="-lbsd"
15403 # Filter out duplicates - this happens with badly-designed ".pc" files...
15404 for cf_add_1lib in $LIBS
15405 do
15406         for cf_add_2lib in $cf_add_libs
15407         do
15408                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15409                 then
15410                         cf_add_1lib=
15411                         break
15412                 fi
15413         done
15414         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15415 done
15416 LIBS="$cf_add_libs"
15417
15418 fi
15419
15420 fi
15421         ;;
15422 esac
15423
15424 echo "$as_me:15424: checking if -lm needed for math functions" >&5
15425 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15426 if test "${cf_cv_need_libm+set}" = set; then
15427   echo $ECHO_N "(cached) $ECHO_C" >&6
15428 else
15429
15430         cat >conftest.$ac_ext <<_ACEOF
15431 #line 15431 "configure"
15432 #include "confdefs.h"
15433
15434         #include <stdio.h>
15435         #include <stdlib.h>
15436         #include <math.h>
15437
15438 int
15439 main (void)
15440 {
15441 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15442   ;
15443   return 0;
15444 }
15445 _ACEOF
15446 rm -f conftest.$ac_objext conftest$ac_exeext
15447 if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
15448   (eval $ac_link) 2>&5
15449   ac_status=$?
15450   echo "$as_me:15450: \$? = $ac_status" >&5
15451   (exit $ac_status); } &&
15452          { ac_try='test -s conftest$ac_exeext'
15453   { (eval echo "$as_me:15453: \"$ac_try\"") >&5
15454   (eval $ac_try) 2>&5
15455   ac_status=$?
15456   echo "$as_me:15456: \$? = $ac_status" >&5
15457   (exit $ac_status); }; }; then
15458   cf_cv_need_libm=no
15459 else
15460   echo "$as_me: failed program was:" >&5
15461 cat conftest.$ac_ext >&5
15462 cf_cv_need_libm=yes
15463 fi
15464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15465 fi
15466 echo "$as_me:15466: result: $cf_cv_need_libm" >&5
15467 echo "${ECHO_T}$cf_cv_need_libm" >&6
15468 if test "$cf_cv_need_libm" = yes
15469 then
15470 MATH_LIB=-lm
15471 fi
15472
15473 ###     Checks for header files.
15474 echo "$as_me:15474: checking for ANSI C header files" >&5
15475 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15476 if test "${ac_cv_header_stdc+set}" = set; then
15477   echo $ECHO_N "(cached) $ECHO_C" >&6
15478 else
15479   cat >conftest.$ac_ext <<_ACEOF
15480 #line 15480 "configure"
15481 #include "confdefs.h"
15482 #include <stdlib.h>
15483 #include <stdarg.h>
15484 #include <string.h>
15485 #include <float.h>
15486
15487 _ACEOF
15488 if { (eval echo "$as_me:15488: \"$ac_cpp conftest.$ac_ext\"") >&5
15489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15490   ac_status=$?
15491   egrep -v '^ *\+' conftest.er1 >conftest.err
15492   rm -f conftest.er1
15493   cat conftest.err >&5
15494   echo "$as_me:15494: \$? = $ac_status" >&5
15495   (exit $ac_status); } >/dev/null; then
15496   if test -s conftest.err; then
15497     ac_cpp_err=$ac_c_preproc_warn_flag
15498   else
15499     ac_cpp_err=
15500   fi
15501 else
15502   ac_cpp_err=yes
15503 fi
15504 if test -z "$ac_cpp_err"; then
15505   ac_cv_header_stdc=yes
15506 else
15507   echo "$as_me: failed program was:" >&5
15508   cat conftest.$ac_ext >&5
15509   ac_cv_header_stdc=no
15510 fi
15511 rm -f conftest.err conftest.$ac_ext
15512
15513 if test $ac_cv_header_stdc = yes; then
15514   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15515   cat >conftest.$ac_ext <<_ACEOF
15516 #line 15516 "configure"
15517 #include "confdefs.h"
15518 #include <string.h>
15519
15520 _ACEOF
15521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15522   egrep "memchr" >/dev/null 2>&1; then
15523   :
15524 else
15525   ac_cv_header_stdc=no
15526 fi
15527 rm -rf conftest*
15528
15529 fi
15530
15531 if test $ac_cv_header_stdc = yes; then
15532   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15533   cat >conftest.$ac_ext <<_ACEOF
15534 #line 15534 "configure"
15535 #include "confdefs.h"
15536 #include <stdlib.h>
15537
15538 _ACEOF
15539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15540   egrep "free" >/dev/null 2>&1; then
15541   :
15542 else
15543   ac_cv_header_stdc=no
15544 fi
15545 rm -rf conftest*
15546
15547 fi
15548
15549 if test $ac_cv_header_stdc = yes; then
15550   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15551   if test "$cross_compiling" = yes; then
15552   :
15553 else
15554   cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557 #include <ctype.h>
15558 #if ((' ' & 0x0FF) == 0x020)
15559 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15560 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15561 #else
15562 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15563                      || ('j' <= (c) && (c) <= 'r') \
15564                      || ('s' <= (c) && (c) <= 'z'))
15565 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15566 #endif
15567
15568 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15569 int
15570 main (void)
15571 {
15572   int i;
15573   for (i = 0; i < 256; i++)
15574     if (XOR (islower (i), ISLOWER (i))
15575         || toupper (i) != TOUPPER (i))
15576       $ac_main_return(2);
15577   $ac_main_return (0);
15578 }
15579 _ACEOF
15580 rm -f conftest$ac_exeext
15581 if { (eval echo "$as_me:15581: \"$ac_link\"") >&5
15582   (eval $ac_link) 2>&5
15583   ac_status=$?
15584   echo "$as_me:15584: \$? = $ac_status" >&5
15585   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15586   { (eval echo "$as_me:15586: \"$ac_try\"") >&5
15587   (eval $ac_try) 2>&5
15588   ac_status=$?
15589   echo "$as_me:15589: \$? = $ac_status" >&5
15590   (exit $ac_status); }; }; then
15591   :
15592 else
15593   echo "$as_me: program exited with status $ac_status" >&5
15594 echo "$as_me: failed program was:" >&5
15595 cat conftest.$ac_ext >&5
15596 ac_cv_header_stdc=no
15597 fi
15598 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15599 fi
15600 fi
15601 fi
15602 echo "$as_me:15602: result: $ac_cv_header_stdc" >&5
15603 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15604 if test $ac_cv_header_stdc = yes; then
15605
15606 cat >>confdefs.h <<\EOF
15607 #define STDC_HEADERS 1
15608 EOF
15609
15610 fi
15611
15612 ac_header_dirent=no
15613 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15614   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15615 echo "$as_me:15615: checking for $ac_hdr that defines DIR" >&5
15616 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15617 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15618   echo $ECHO_N "(cached) $ECHO_C" >&6
15619 else
15620   cat >conftest.$ac_ext <<_ACEOF
15621 #line 15621 "configure"
15622 #include "confdefs.h"
15623 #include <sys/types.h>
15624 #include <$ac_hdr>
15625
15626 int
15627 main (void)
15628 {
15629 if ((DIR *) 0)
15630 return 0;
15631   ;
15632   return 0;
15633 }
15634 _ACEOF
15635 rm -f conftest.$ac_objext
15636 if { (eval echo "$as_me:15636: \"$ac_compile\"") >&5
15637   (eval $ac_compile) 2>&5
15638   ac_status=$?
15639   echo "$as_me:15639: \$? = $ac_status" >&5
15640   (exit $ac_status); } &&
15641          { ac_try='test -s conftest.$ac_objext'
15642   { (eval echo "$as_me:15642: \"$ac_try\"") >&5
15643   (eval $ac_try) 2>&5
15644   ac_status=$?
15645   echo "$as_me:15645: \$? = $ac_status" >&5
15646   (exit $ac_status); }; }; then
15647   eval "$as_ac_Header=yes"
15648 else
15649   echo "$as_me: failed program was:" >&5
15650 cat conftest.$ac_ext >&5
15651 eval "$as_ac_Header=no"
15652 fi
15653 rm -f conftest.$ac_objext conftest.$ac_ext
15654 fi
15655 echo "$as_me:15655: result: `eval echo '${'$as_ac_Header'}'`" >&5
15656 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15657 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15658   cat >>confdefs.h <<EOF
15659 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15660 EOF
15661
15662 ac_header_dirent=$ac_hdr; break
15663 fi
15664
15665 done
15666 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15667 if test $ac_header_dirent = dirent.h; then
15668   echo "$as_me:15668: checking for opendir in -ldir" >&5
15669 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15670 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15671   echo $ECHO_N "(cached) $ECHO_C" >&6
15672 else
15673   ac_check_lib_save_LIBS=$LIBS
15674 LIBS="-ldir  $LIBS"
15675 cat >conftest.$ac_ext <<_ACEOF
15676 #line 15676 "configure"
15677 #include "confdefs.h"
15678
15679 /* Override any gcc2 internal prototype to avoid an error.  */
15680 #ifdef __cplusplus
15681 extern "C"
15682 #endif
15683 /* We use char because int might match the return type of a gcc2
15684    builtin and then its argument prototype would still apply.  */
15685 char opendir ();
15686 int
15687 main (void)
15688 {
15689 opendir ();
15690   ;
15691   return 0;
15692 }
15693 _ACEOF
15694 rm -f conftest.$ac_objext conftest$ac_exeext
15695 if { (eval echo "$as_me:15695: \"$ac_link\"") >&5
15696   (eval $ac_link) 2>&5
15697   ac_status=$?
15698   echo "$as_me:15698: \$? = $ac_status" >&5
15699   (exit $ac_status); } &&
15700          { ac_try='test -s conftest$ac_exeext'
15701   { (eval echo "$as_me:15701: \"$ac_try\"") >&5
15702   (eval $ac_try) 2>&5
15703   ac_status=$?
15704   echo "$as_me:15704: \$? = $ac_status" >&5
15705   (exit $ac_status); }; }; then
15706   ac_cv_lib_dir_opendir=yes
15707 else
15708   echo "$as_me: failed program was:" >&5
15709 cat conftest.$ac_ext >&5
15710 ac_cv_lib_dir_opendir=no
15711 fi
15712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15713 LIBS=$ac_check_lib_save_LIBS
15714 fi
15715 echo "$as_me:15715: result: $ac_cv_lib_dir_opendir" >&5
15716 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15717 if test $ac_cv_lib_dir_opendir = yes; then
15718   LIBS="$LIBS -ldir"
15719 fi
15720
15721 else
15722   echo "$as_me:15722: checking for opendir in -lx" >&5
15723 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15724 if test "${ac_cv_lib_x_opendir+set}" = set; then
15725   echo $ECHO_N "(cached) $ECHO_C" >&6
15726 else
15727   ac_check_lib_save_LIBS=$LIBS
15728 LIBS="-lx  $LIBS"
15729 cat >conftest.$ac_ext <<_ACEOF
15730 #line 15730 "configure"
15731 #include "confdefs.h"
15732
15733 /* Override any gcc2 internal prototype to avoid an error.  */
15734 #ifdef __cplusplus
15735 extern "C"
15736 #endif
15737 /* We use char because int might match the return type of a gcc2
15738    builtin and then its argument prototype would still apply.  */
15739 char opendir ();
15740 int
15741 main (void)
15742 {
15743 opendir ();
15744   ;
15745   return 0;
15746 }
15747 _ACEOF
15748 rm -f conftest.$ac_objext conftest$ac_exeext
15749 if { (eval echo "$as_me:15749: \"$ac_link\"") >&5
15750   (eval $ac_link) 2>&5
15751   ac_status=$?
15752   echo "$as_me:15752: \$? = $ac_status" >&5
15753   (exit $ac_status); } &&
15754          { ac_try='test -s conftest$ac_exeext'
15755   { (eval echo "$as_me:15755: \"$ac_try\"") >&5
15756   (eval $ac_try) 2>&5
15757   ac_status=$?
15758   echo "$as_me:15758: \$? = $ac_status" >&5
15759   (exit $ac_status); }; }; then
15760   ac_cv_lib_x_opendir=yes
15761 else
15762   echo "$as_me: failed program was:" >&5
15763 cat conftest.$ac_ext >&5
15764 ac_cv_lib_x_opendir=no
15765 fi
15766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15767 LIBS=$ac_check_lib_save_LIBS
15768 fi
15769 echo "$as_me:15769: result: $ac_cv_lib_x_opendir" >&5
15770 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15771 if test $ac_cv_lib_x_opendir = yes; then
15772   LIBS="$LIBS -lx"
15773 fi
15774
15775 fi
15776
15777 echo "$as_me:15777: checking whether time.h and sys/time.h may both be included" >&5
15778 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15779 if test "${ac_cv_header_time+set}" = set; then
15780   echo $ECHO_N "(cached) $ECHO_C" >&6
15781 else
15782   cat >conftest.$ac_ext <<_ACEOF
15783 #line 15783 "configure"
15784 #include "confdefs.h"
15785 #include <sys/types.h>
15786 #include <sys/time.h>
15787 #include <time.h>
15788
15789 int
15790 main (void)
15791 {
15792 if ((struct tm *) 0)
15793 return 0;
15794   ;
15795   return 0;
15796 }
15797 _ACEOF
15798 rm -f conftest.$ac_objext
15799 if { (eval echo "$as_me:15799: \"$ac_compile\"") >&5
15800   (eval $ac_compile) 2>&5
15801   ac_status=$?
15802   echo "$as_me:15802: \$? = $ac_status" >&5
15803   (exit $ac_status); } &&
15804          { ac_try='test -s conftest.$ac_objext'
15805   { (eval echo "$as_me:15805: \"$ac_try\"") >&5
15806   (eval $ac_try) 2>&5
15807   ac_status=$?
15808   echo "$as_me:15808: \$? = $ac_status" >&5
15809   (exit $ac_status); }; }; then
15810   ac_cv_header_time=yes
15811 else
15812   echo "$as_me: failed program was:" >&5
15813 cat conftest.$ac_ext >&5
15814 ac_cv_header_time=no
15815 fi
15816 rm -f conftest.$ac_objext conftest.$ac_ext
15817 fi
15818 echo "$as_me:15818: result: $ac_cv_header_time" >&5
15819 echo "${ECHO_T}$ac_cv_header_time" >&6
15820 if test $ac_cv_header_time = yes; then
15821
15822 cat >>confdefs.h <<\EOF
15823 #define TIME_WITH_SYS_TIME 1
15824 EOF
15825
15826 fi
15827
15828 cf_regex_func=no
15829
15830 cf_regex_libs="regex re"
15831 case $host_os in
15832 (mingw*)
15833         cf_regex_libs="gnurx $cf_regex_libs"
15834         ;;
15835 esac
15836
15837 echo "$as_me:15837: checking for regcomp" >&5
15838 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15839 if test "${ac_cv_func_regcomp+set}" = set; then
15840   echo $ECHO_N "(cached) $ECHO_C" >&6
15841 else
15842   cat >conftest.$ac_ext <<_ACEOF
15843 #line 15843 "configure"
15844 #include "confdefs.h"
15845 /* System header to define __stub macros and hopefully few prototypes,
15846     which can conflict with char regcomp (); below.  */
15847 #include <assert.h>
15848 /* Override any gcc2 internal prototype to avoid an error.  */
15849 #ifdef __cplusplus
15850 extern "C"
15851 #endif
15852 /* We use char because int might match the return type of a gcc2
15853    builtin and then its argument prototype would still apply.  */
15854 char regcomp ();
15855 char (*f) ();
15856
15857 int
15858 main (void)
15859 {
15860 /* The GNU C library defines this for functions which it implements
15861     to always fail with ENOSYS.  Some functions are actually named
15862     something starting with __ and the normal name is an alias.  */
15863 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15864 choke me
15865 #else
15866 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15867 #endif
15868
15869   ;
15870   return 0;
15871 }
15872 _ACEOF
15873 rm -f conftest.$ac_objext conftest$ac_exeext
15874 if { (eval echo "$as_me:15874: \"$ac_link\"") >&5
15875   (eval $ac_link) 2>&5
15876   ac_status=$?
15877   echo "$as_me:15877: \$? = $ac_status" >&5
15878   (exit $ac_status); } &&
15879          { ac_try='test -s conftest$ac_exeext'
15880   { (eval echo "$as_me:15880: \"$ac_try\"") >&5
15881   (eval $ac_try) 2>&5
15882   ac_status=$?
15883   echo "$as_me:15883: \$? = $ac_status" >&5
15884   (exit $ac_status); }; }; then
15885   ac_cv_func_regcomp=yes
15886 else
15887   echo "$as_me: failed program was:" >&5
15888 cat conftest.$ac_ext >&5
15889 ac_cv_func_regcomp=no
15890 fi
15891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15892 fi
15893 echo "$as_me:15893: result: $ac_cv_func_regcomp" >&5
15894 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15895 if test $ac_cv_func_regcomp = yes; then
15896   cf_regex_func=regcomp
15897 else
15898
15899         for cf_regex_lib in $cf_regex_libs
15900         do
15901                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15902 echo "$as_me:15902: checking for regcomp in -l$cf_regex_lib" >&5
15903 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15904 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15905   echo $ECHO_N "(cached) $ECHO_C" >&6
15906 else
15907   ac_check_lib_save_LIBS=$LIBS
15908 LIBS="-l$cf_regex_lib  $LIBS"
15909 cat >conftest.$ac_ext <<_ACEOF
15910 #line 15910 "configure"
15911 #include "confdefs.h"
15912
15913 /* Override any gcc2 internal prototype to avoid an error.  */
15914 #ifdef __cplusplus
15915 extern "C"
15916 #endif
15917 /* We use char because int might match the return type of a gcc2
15918    builtin and then its argument prototype would still apply.  */
15919 char regcomp ();
15920 int
15921 main (void)
15922 {
15923 regcomp ();
15924   ;
15925   return 0;
15926 }
15927 _ACEOF
15928 rm -f conftest.$ac_objext conftest$ac_exeext
15929 if { (eval echo "$as_me:15929: \"$ac_link\"") >&5
15930   (eval $ac_link) 2>&5
15931   ac_status=$?
15932   echo "$as_me:15932: \$? = $ac_status" >&5
15933   (exit $ac_status); } &&
15934          { ac_try='test -s conftest$ac_exeext'
15935   { (eval echo "$as_me:15935: \"$ac_try\"") >&5
15936   (eval $ac_try) 2>&5
15937   ac_status=$?
15938   echo "$as_me:15938: \$? = $ac_status" >&5
15939   (exit $ac_status); }; }; then
15940   eval "$as_ac_Lib=yes"
15941 else
15942   echo "$as_me: failed program was:" >&5
15943 cat conftest.$ac_ext >&5
15944 eval "$as_ac_Lib=no"
15945 fi
15946 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15947 LIBS=$ac_check_lib_save_LIBS
15948 fi
15949 echo "$as_me:15949: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15950 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15951 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15952
15953 cf_add_libs="-l$cf_regex_lib"
15954 # Filter out duplicates - this happens with badly-designed ".pc" files...
15955 for cf_add_1lib in $LIBS
15956 do
15957         for cf_add_2lib in $cf_add_libs
15958         do
15959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15960                 then
15961                         cf_add_1lib=
15962                         break
15963                 fi
15964         done
15965         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15966 done
15967 LIBS="$cf_add_libs"
15968
15969                                 cf_regex_func=regcomp
15970                                 break
15971 fi
15972
15973         done
15974
15975 fi
15976
15977 if test "$cf_regex_func" = no ; then
15978         echo "$as_me:15978: checking for compile" >&5
15979 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15980 if test "${ac_cv_func_compile+set}" = set; then
15981   echo $ECHO_N "(cached) $ECHO_C" >&6
15982 else
15983   cat >conftest.$ac_ext <<_ACEOF
15984 #line 15984 "configure"
15985 #include "confdefs.h"
15986 /* System header to define __stub macros and hopefully few prototypes,
15987     which can conflict with char compile (); below.  */
15988 #include <assert.h>
15989 /* Override any gcc2 internal prototype to avoid an error.  */
15990 #ifdef __cplusplus
15991 extern "C"
15992 #endif
15993 /* We use char because int might match the return type of a gcc2
15994    builtin and then its argument prototype would still apply.  */
15995 char compile ();
15996 char (*f) ();
15997
15998 int
15999 main (void)
16000 {
16001 /* The GNU C library defines this for functions which it implements
16002     to always fail with ENOSYS.  Some functions are actually named
16003     something starting with __ and the normal name is an alias.  */
16004 #if defined (__stub_compile) || defined (__stub___compile)
16005 choke me
16006 #else
16007 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16008 #endif
16009
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f conftest.$ac_objext conftest$ac_exeext
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit $ac_status); } &&
16020          { ac_try='test -s conftest$ac_exeext'
16021   { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022   (eval $ac_try) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit $ac_status); }; }; then
16026   ac_cv_func_compile=yes
16027 else
16028   echo "$as_me: failed program was:" >&5
16029 cat conftest.$ac_ext >&5
16030 ac_cv_func_compile=no
16031 fi
16032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16033 fi
16034 echo "$as_me:16034: result: $ac_cv_func_compile" >&5
16035 echo "${ECHO_T}$ac_cv_func_compile" >&6
16036 if test $ac_cv_func_compile = yes; then
16037   cf_regex_func=compile
16038 else
16039
16040                 echo "$as_me:16040: checking for compile in -lgen" >&5
16041 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16042 if test "${ac_cv_lib_gen_compile+set}" = set; then
16043   echo $ECHO_N "(cached) $ECHO_C" >&6
16044 else
16045   ac_check_lib_save_LIBS=$LIBS
16046 LIBS="-lgen  $LIBS"
16047 cat >conftest.$ac_ext <<_ACEOF
16048 #line 16048 "configure"
16049 #include "confdefs.h"
16050
16051 /* Override any gcc2 internal prototype to avoid an error.  */
16052 #ifdef __cplusplus
16053 extern "C"
16054 #endif
16055 /* We use char because int might match the return type of a gcc2
16056    builtin and then its argument prototype would still apply.  */
16057 char compile ();
16058 int
16059 main (void)
16060 {
16061 compile ();
16062   ;
16063   return 0;
16064 }
16065 _ACEOF
16066 rm -f conftest.$ac_objext conftest$ac_exeext
16067 if { (eval echo "$as_me:16067: \"$ac_link\"") >&5
16068   (eval $ac_link) 2>&5
16069   ac_status=$?
16070   echo "$as_me:16070: \$? = $ac_status" >&5
16071   (exit $ac_status); } &&
16072          { ac_try='test -s conftest$ac_exeext'
16073   { (eval echo "$as_me:16073: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:16076: \$? = $ac_status" >&5
16077   (exit $ac_status); }; }; then
16078   ac_cv_lib_gen_compile=yes
16079 else
16080   echo "$as_me: failed program was:" >&5
16081 cat conftest.$ac_ext >&5
16082 ac_cv_lib_gen_compile=no
16083 fi
16084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16085 LIBS=$ac_check_lib_save_LIBS
16086 fi
16087 echo "$as_me:16087: result: $ac_cv_lib_gen_compile" >&5
16088 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16089 if test $ac_cv_lib_gen_compile = yes; then
16090
16091 cf_add_libs="-lgen"
16092 # Filter out duplicates - this happens with badly-designed ".pc" files...
16093 for cf_add_1lib in $LIBS
16094 do
16095         for cf_add_2lib in $cf_add_libs
16096         do
16097                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16098                 then
16099                         cf_add_1lib=
16100                         break
16101                 fi
16102         done
16103         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16104 done
16105 LIBS="$cf_add_libs"
16106
16107                                 cf_regex_func=compile
16108 fi
16109
16110 fi
16111
16112 fi
16113
16114 if test "$cf_regex_func" = no ; then
16115         { echo "$as_me:16115: WARNING: cannot find regular expression library" >&5
16116 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16117 fi
16118
16119 echo "$as_me:16119: checking for regular-expression headers" >&5
16120 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16121 if test "${cf_cv_regex_hdrs+set}" = set; then
16122   echo $ECHO_N "(cached) $ECHO_C" >&6
16123 else
16124
16125 cf_cv_regex_hdrs=no
16126 case $cf_regex_func in
16127 (compile)
16128         for cf_regex_hdr in regexp.h regexpr.h
16129         do
16130                 cat >conftest.$ac_ext <<_ACEOF
16131 #line 16131 "configure"
16132 #include "confdefs.h"
16133 #include <$cf_regex_hdr>
16134 int
16135 main (void)
16136 {
16137
16138                         char *p = compile("", "", "", 0);
16139                         int x = step("", "");
16140
16141   ;
16142   return 0;
16143 }
16144 _ACEOF
16145 rm -f conftest.$ac_objext conftest$ac_exeext
16146 if { (eval echo "$as_me:16146: \"$ac_link\"") >&5
16147   (eval $ac_link) 2>&5
16148   ac_status=$?
16149   echo "$as_me:16149: \$? = $ac_status" >&5
16150   (exit $ac_status); } &&
16151          { ac_try='test -s conftest$ac_exeext'
16152   { (eval echo "$as_me:16152: \"$ac_try\"") >&5
16153   (eval $ac_try) 2>&5
16154   ac_status=$?
16155   echo "$as_me:16155: \$? = $ac_status" >&5
16156   (exit $ac_status); }; }; then
16157
16158                         cf_cv_regex_hdrs=$cf_regex_hdr
16159                         break
16160
16161 else
16162   echo "$as_me: failed program was:" >&5
16163 cat conftest.$ac_ext >&5
16164 fi
16165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16166         done
16167         ;;
16168 (*)
16169         for cf_regex_hdr in regex.h
16170         do
16171                 cat >conftest.$ac_ext <<_ACEOF
16172 #line 16172 "configure"
16173 #include "confdefs.h"
16174 #include <sys/types.h>
16175 #include <$cf_regex_hdr>
16176 int
16177 main (void)
16178 {
16179
16180                         regex_t *p;
16181                         int x = regcomp(p, "", 0);
16182                         int y = regexec(p, "", 0, 0, 0);
16183                         regfree(p);
16184
16185   ;
16186   return 0;
16187 }
16188 _ACEOF
16189 rm -f conftest.$ac_objext conftest$ac_exeext
16190 if { (eval echo "$as_me:16190: \"$ac_link\"") >&5
16191   (eval $ac_link) 2>&5
16192   ac_status=$?
16193   echo "$as_me:16193: \$? = $ac_status" >&5
16194   (exit $ac_status); } &&
16195          { ac_try='test -s conftest$ac_exeext'
16196   { (eval echo "$as_me:16196: \"$ac_try\"") >&5
16197   (eval $ac_try) 2>&5
16198   ac_status=$?
16199   echo "$as_me:16199: \$? = $ac_status" >&5
16200   (exit $ac_status); }; }; then
16201
16202                         cf_cv_regex_hdrs=$cf_regex_hdr
16203                         break
16204
16205 else
16206   echo "$as_me: failed program was:" >&5
16207 cat conftest.$ac_ext >&5
16208 fi
16209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16210         done
16211         ;;
16212 esac
16213
16214 fi
16215 echo "$as_me:16215: result: $cf_cv_regex_hdrs" >&5
16216 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16217
16218 case $cf_cv_regex_hdrs in
16219         (no)            { echo "$as_me:16219: WARNING: no regular expression header found" >&5
16220 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16221         (regex.h)
16222 cat >>confdefs.h <<\EOF
16223 #define HAVE_REGEX_H_FUNCS 1
16224 EOF
16225  ;;
16226         (regexp.h)
16227 cat >>confdefs.h <<\EOF
16228 #define HAVE_REGEXP_H_FUNCS 1
16229 EOF
16230  ;;
16231         (regexpr.h)
16232 cat >>confdefs.h <<\EOF
16233 #define HAVE_REGEXPR_H_FUNCS 1
16234 EOF
16235  ;;
16236 esac
16237
16238 for ac_header in \
16239 fcntl.h \
16240 getopt.h \
16241 limits.h \
16242 locale.h \
16243 math.h \
16244 poll.h \
16245 sys/bsdtypes.h \
16246 sys/ioctl.h \
16247 sys/param.h \
16248 sys/poll.h \
16249 sys/select.h \
16250 sys/time.h \
16251 sys/times.h \
16252 ttyent.h \
16253 unistd.h \
16254 wctype.h \
16255
16256 do
16257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16258 echo "$as_me:16258: checking for $ac_header" >&5
16259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16261   echo $ECHO_N "(cached) $ECHO_C" >&6
16262 else
16263   cat >conftest.$ac_ext <<_ACEOF
16264 #line 16264 "configure"
16265 #include "confdefs.h"
16266 #include <$ac_header>
16267 _ACEOF
16268 if { (eval echo "$as_me:16268: \"$ac_cpp conftest.$ac_ext\"") >&5
16269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16270   ac_status=$?
16271   egrep -v '^ *\+' conftest.er1 >conftest.err
16272   rm -f conftest.er1
16273   cat conftest.err >&5
16274   echo "$as_me:16274: \$? = $ac_status" >&5
16275   (exit $ac_status); } >/dev/null; then
16276   if test -s conftest.err; then
16277     ac_cpp_err=$ac_c_preproc_warn_flag
16278   else
16279     ac_cpp_err=
16280   fi
16281 else
16282   ac_cpp_err=yes
16283 fi
16284 if test -z "$ac_cpp_err"; then
16285   eval "$as_ac_Header=yes"
16286 else
16287   echo "$as_me: failed program was:" >&5
16288   cat conftest.$ac_ext >&5
16289   eval "$as_ac_Header=no"
16290 fi
16291 rm -f conftest.err conftest.$ac_ext
16292 fi
16293 echo "$as_me:16293: result: `eval echo '${'$as_ac_Header'}'`" >&5
16294 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16295 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16296   cat >>confdefs.h <<EOF
16297 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16298 EOF
16299
16300 fi
16301 done
16302
16303 for ac_header in unistd.h getopt.h
16304 do
16305 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16306 echo "$as_me:16306: checking for $ac_header" >&5
16307 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16309   echo $ECHO_N "(cached) $ECHO_C" >&6
16310 else
16311   cat >conftest.$ac_ext <<_ACEOF
16312 #line 16312 "configure"
16313 #include "confdefs.h"
16314 #include <$ac_header>
16315 _ACEOF
16316 if { (eval echo "$as_me:16316: \"$ac_cpp conftest.$ac_ext\"") >&5
16317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16318   ac_status=$?
16319   egrep -v '^ *\+' conftest.er1 >conftest.err
16320   rm -f conftest.er1
16321   cat conftest.err >&5
16322   echo "$as_me:16322: \$? = $ac_status" >&5
16323   (exit $ac_status); } >/dev/null; then
16324   if test -s conftest.err; then
16325     ac_cpp_err=$ac_c_preproc_warn_flag
16326   else
16327     ac_cpp_err=
16328   fi
16329 else
16330   ac_cpp_err=yes
16331 fi
16332 if test -z "$ac_cpp_err"; then
16333   eval "$as_ac_Header=yes"
16334 else
16335   echo "$as_me: failed program was:" >&5
16336   cat conftest.$ac_ext >&5
16337   eval "$as_ac_Header=no"
16338 fi
16339 rm -f conftest.err conftest.$ac_ext
16340 fi
16341 echo "$as_me:16341: result: `eval echo '${'$as_ac_Header'}'`" >&5
16342 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16343 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16344   cat >>confdefs.h <<EOF
16345 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16346 EOF
16347
16348 fi
16349 done
16350
16351 echo "$as_me:16351: checking for header declaring getopt variables" >&5
16352 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16353 if test "${cf_cv_getopt_header+set}" = set; then
16354   echo $ECHO_N "(cached) $ECHO_C" >&6
16355 else
16356
16357 cf_cv_getopt_header=none
16358 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16359 do
16360 cat >conftest.$ac_ext <<_ACEOF
16361 #line 16361 "configure"
16362 #include "confdefs.h"
16363
16364 #include <$cf_header>
16365 int
16366 main (void)
16367 {
16368 int x = optind; char *y = optarg
16369   ;
16370   return 0;
16371 }
16372 _ACEOF
16373 rm -f conftest.$ac_objext
16374 if { (eval echo "$as_me:16374: \"$ac_compile\"") >&5
16375   (eval $ac_compile) 2>&5
16376   ac_status=$?
16377   echo "$as_me:16377: \$? = $ac_status" >&5
16378   (exit $ac_status); } &&
16379          { ac_try='test -s conftest.$ac_objext'
16380   { (eval echo "$as_me:16380: \"$ac_try\"") >&5
16381   (eval $ac_try) 2>&5
16382   ac_status=$?
16383   echo "$as_me:16383: \$? = $ac_status" >&5
16384   (exit $ac_status); }; }; then
16385   cf_cv_getopt_header=$cf_header
16386  break
16387 else
16388   echo "$as_me: failed program was:" >&5
16389 cat conftest.$ac_ext >&5
16390 fi
16391 rm -f conftest.$ac_objext conftest.$ac_ext
16392 done
16393
16394 fi
16395 echo "$as_me:16395: result: $cf_cv_getopt_header" >&5
16396 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16397 if test $cf_cv_getopt_header != none ; then
16398
16399 cat >>confdefs.h <<\EOF
16400 #define HAVE_GETOPT_HEADER 1
16401 EOF
16402
16403 fi
16404 if test $cf_cv_getopt_header = getopt.h ; then
16405
16406 cat >>confdefs.h <<\EOF
16407 #define NEED_GETOPT_H 1
16408 EOF
16409
16410 fi
16411
16412 # check for ISC (this may also define _POSIX_SOURCE)
16413 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16414 if test "x$ISC" = xyes ; then
16415
16416 echo "$as_me:16416: checking for main in -lcposix" >&5
16417 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16418 if test "${ac_cv_lib_cposix_main+set}" = set; then
16419   echo $ECHO_N "(cached) $ECHO_C" >&6
16420 else
16421   ac_check_lib_save_LIBS=$LIBS
16422 LIBS="-lcposix  $LIBS"
16423 cat >conftest.$ac_ext <<_ACEOF
16424 #line 16424 "configure"
16425 #include "confdefs.h"
16426
16427 int
16428 main (void)
16429 {
16430 main ();
16431   ;
16432   return 0;
16433 }
16434 _ACEOF
16435 rm -f conftest.$ac_objext conftest$ac_exeext
16436 if { (eval echo "$as_me:16436: \"$ac_link\"") >&5
16437   (eval $ac_link) 2>&5
16438   ac_status=$?
16439   echo "$as_me:16439: \$? = $ac_status" >&5
16440   (exit $ac_status); } &&
16441          { ac_try='test -s conftest$ac_exeext'
16442   { (eval echo "$as_me:16442: \"$ac_try\"") >&5
16443   (eval $ac_try) 2>&5
16444   ac_status=$?
16445   echo "$as_me:16445: \$? = $ac_status" >&5
16446   (exit $ac_status); }; }; then
16447   ac_cv_lib_cposix_main=yes
16448 else
16449   echo "$as_me: failed program was:" >&5
16450 cat conftest.$ac_ext >&5
16451 ac_cv_lib_cposix_main=no
16452 fi
16453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16454 LIBS=$ac_check_lib_save_LIBS
16455 fi
16456 echo "$as_me:16456: result: $ac_cv_lib_cposix_main" >&5
16457 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16458 if test $ac_cv_lib_cposix_main = yes; then
16459   cat >>confdefs.h <<EOF
16460 #define HAVE_LIBCPOSIX 1
16461 EOF
16462
16463   LIBS="-lcposix $LIBS"
16464
16465 fi
16466
16467         echo "$as_me:16467: checking for bzero in -linet" >&5
16468 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16469 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16470   echo $ECHO_N "(cached) $ECHO_C" >&6
16471 else
16472   ac_check_lib_save_LIBS=$LIBS
16473 LIBS="-linet  $LIBS"
16474 cat >conftest.$ac_ext <<_ACEOF
16475 #line 16475 "configure"
16476 #include "confdefs.h"
16477
16478 /* Override any gcc2 internal prototype to avoid an error.  */
16479 #ifdef __cplusplus
16480 extern "C"
16481 #endif
16482 /* We use char because int might match the return type of a gcc2
16483    builtin and then its argument prototype would still apply.  */
16484 char bzero ();
16485 int
16486 main (void)
16487 {
16488 bzero ();
16489   ;
16490   return 0;
16491 }
16492 _ACEOF
16493 rm -f conftest.$ac_objext conftest$ac_exeext
16494 if { (eval echo "$as_me:16494: \"$ac_link\"") >&5
16495   (eval $ac_link) 2>&5
16496   ac_status=$?
16497   echo "$as_me:16497: \$? = $ac_status" >&5
16498   (exit $ac_status); } &&
16499          { ac_try='test -s conftest$ac_exeext'
16500   { (eval echo "$as_me:16500: \"$ac_try\"") >&5
16501   (eval $ac_try) 2>&5
16502   ac_status=$?
16503   echo "$as_me:16503: \$? = $ac_status" >&5
16504   (exit $ac_status); }; }; then
16505   ac_cv_lib_inet_bzero=yes
16506 else
16507   echo "$as_me: failed program was:" >&5
16508 cat conftest.$ac_ext >&5
16509 ac_cv_lib_inet_bzero=no
16510 fi
16511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16512 LIBS=$ac_check_lib_save_LIBS
16513 fi
16514 echo "$as_me:16514: result: $ac_cv_lib_inet_bzero" >&5
16515 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16516 if test $ac_cv_lib_inet_bzero = yes; then
16517
16518 cf_add_libs="-linet"
16519 # Filter out duplicates - this happens with badly-designed ".pc" files...
16520 for cf_add_1lib in $LIBS
16521 do
16522         for cf_add_2lib in $cf_add_libs
16523         do
16524                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16525                 then
16526                         cf_add_1lib=
16527                         break
16528                 fi
16529         done
16530         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16531 done
16532 LIBS="$cf_add_libs"
16533
16534 fi
16535 fi
16536
16537 echo "$as_me:16537: checking if sys/time.h works with sys/select.h" >&5
16538 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16539 if test "${cf_cv_sys_time_select+set}" = set; then
16540   echo $ECHO_N "(cached) $ECHO_C" >&6
16541 else
16542
16543 cat >conftest.$ac_ext <<_ACEOF
16544 #line 16544 "configure"
16545 #include "confdefs.h"
16546
16547 #include <sys/types.h>
16548 #ifdef HAVE_SYS_TIME_H
16549 #include <sys/time.h>
16550 #endif
16551 #ifdef HAVE_SYS_SELECT_H
16552 #include <sys/select.h>
16553 #endif
16554
16555 int
16556 main (void)
16557 {
16558
16559   ;
16560   return 0;
16561 }
16562 _ACEOF
16563 rm -f conftest.$ac_objext
16564 if { (eval echo "$as_me:16564: \"$ac_compile\"") >&5
16565   (eval $ac_compile) 2>&5
16566   ac_status=$?
16567   echo "$as_me:16567: \$? = $ac_status" >&5
16568   (exit $ac_status); } &&
16569          { ac_try='test -s conftest.$ac_objext'
16570   { (eval echo "$as_me:16570: \"$ac_try\"") >&5
16571   (eval $ac_try) 2>&5
16572   ac_status=$?
16573   echo "$as_me:16573: \$? = $ac_status" >&5
16574   (exit $ac_status); }; }; then
16575   cf_cv_sys_time_select=yes
16576 else
16577   echo "$as_me: failed program was:" >&5
16578 cat conftest.$ac_ext >&5
16579 cf_cv_sys_time_select=no
16580 fi
16581 rm -f conftest.$ac_objext conftest.$ac_ext
16582
16583 fi
16584
16585 echo "$as_me:16585: result: $cf_cv_sys_time_select" >&5
16586 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16587 test "$cf_cv_sys_time_select" = yes &&
16588 cat >>confdefs.h <<\EOF
16589 #define HAVE_SYS_TIME_SELECT 1
16590 EOF
16591
16592 ###     checks for compiler characteristics
16593 ac_ext=c
16594 ac_cpp='$CPP $CPPFLAGS'
16595 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16596 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16597 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16598 ac_main_return=return
16599
16600 echo "$as_me:16600: checking for an ANSI C-conforming const" >&5
16601 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16602 if test "${ac_cv_c_const+set}" = set; then
16603   echo $ECHO_N "(cached) $ECHO_C" >&6
16604 else
16605   cat >conftest.$ac_ext <<_ACEOF
16606 #line 16606 "configure"
16607 #include "confdefs.h"
16608
16609 int
16610 main (void)
16611 {
16612 /* FIXME: Include the comments suggested by Paul. */
16613 #ifndef __cplusplus
16614   /* Ultrix mips cc rejects this.  */
16615   typedef int charset[2];
16616   const charset x;
16617   /* SunOS 4.1.1 cc rejects this.  */
16618   char const *const *ccp;
16619   char **p;
16620   /* NEC SVR4.0.2 mips cc rejects this.  */
16621   struct point {int x, y;};
16622   static struct point const zero = {0,0};
16623   /* AIX XL C 1.02.0.0 rejects this.
16624      It does not let you subtract one const X* pointer from another in
16625      an arm of an if-expression whose if-part is not a constant
16626      expression */
16627   const char *g = "string";
16628   ccp = &g + (g ? g-g : 0);
16629   /* HPUX 7.0 cc rejects these. */
16630   ++ccp;
16631   p = (char**) ccp;
16632   ccp = (char const *const *) p;
16633   { /* SCO 3.2v4 cc rejects this.  */
16634     char *t;
16635     char const *s = 0 ? (char *) 0 : (char const *) 0;
16636
16637     *t++ = 0;
16638   }
16639   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16640     int x[] = {25, 17};
16641     const int *foo = &x[0];
16642     ++foo;
16643   }
16644   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16645     typedef const int *iptr;
16646     iptr p = 0;
16647     ++p;
16648   }
16649   { /* AIX XL C 1.02.0.0 rejects this saying
16650        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16651     struct s { int j; const int *ap[3]; };
16652     struct s *b; b->j = 5;
16653   }
16654   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16655     const int foo = 10;
16656   }
16657 #endif
16658
16659   ;
16660   return 0;
16661 }
16662 _ACEOF
16663 rm -f conftest.$ac_objext
16664 if { (eval echo "$as_me:16664: \"$ac_compile\"") >&5
16665   (eval $ac_compile) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); } &&
16669          { ac_try='test -s conftest.$ac_objext'
16670   { (eval echo "$as_me:16670: \"$ac_try\"") >&5
16671   (eval $ac_try) 2>&5
16672   ac_status=$?
16673   echo "$as_me:16673: \$? = $ac_status" >&5
16674   (exit $ac_status); }; }; then
16675   ac_cv_c_const=yes
16676 else
16677   echo "$as_me: failed program was:" >&5
16678 cat conftest.$ac_ext >&5
16679 ac_cv_c_const=no
16680 fi
16681 rm -f conftest.$ac_objext conftest.$ac_ext
16682 fi
16683 echo "$as_me:16683: result: $ac_cv_c_const" >&5
16684 echo "${ECHO_T}$ac_cv_c_const" >&6
16685 if test $ac_cv_c_const = no; then
16686
16687 cat >>confdefs.h <<\EOF
16688 #define const
16689 EOF
16690
16691 fi
16692
16693 echo "$as_me:16693: checking for inline" >&5
16694 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16695 if test "${ac_cv_c_inline+set}" = set; then
16696   echo $ECHO_N "(cached) $ECHO_C" >&6
16697 else
16698   ac_cv_c_inline=no
16699 for ac_kw in inline __inline__ __inline; do
16700   cat >conftest.$ac_ext <<_ACEOF
16701 #line 16701 "configure"
16702 #include "confdefs.h"
16703 #ifndef __cplusplus
16704 static $ac_kw int static_foo () {return 0; }
16705 $ac_kw int foo () {return 0; }
16706 #endif
16707
16708 _ACEOF
16709 rm -f conftest.$ac_objext
16710 if { (eval echo "$as_me:16710: \"$ac_compile\"") >&5
16711   (eval $ac_compile) 2>&5
16712   ac_status=$?
16713   echo "$as_me:16713: \$? = $ac_status" >&5
16714   (exit $ac_status); } &&
16715          { ac_try='test -s conftest.$ac_objext'
16716   { (eval echo "$as_me:16716: \"$ac_try\"") >&5
16717   (eval $ac_try) 2>&5
16718   ac_status=$?
16719   echo "$as_me:16719: \$? = $ac_status" >&5
16720   (exit $ac_status); }; }; then
16721   ac_cv_c_inline=$ac_kw; break
16722 else
16723   echo "$as_me: failed program was:" >&5
16724 cat conftest.$ac_ext >&5
16725 fi
16726 rm -f conftest.$ac_objext conftest.$ac_ext
16727 done
16728
16729 fi
16730 echo "$as_me:16730: result: $ac_cv_c_inline" >&5
16731 echo "${ECHO_T}$ac_cv_c_inline" >&6
16732 case $ac_cv_c_inline in
16733   inline | yes) ;;
16734   no)
16735 cat >>confdefs.h <<\EOF
16736 #define inline
16737 EOF
16738  ;;
16739   *)  cat >>confdefs.h <<EOF
16740 #define inline $ac_cv_c_inline
16741 EOF
16742  ;;
16743 esac
16744
16745 NCURSES_INLINE=
16746 if test "$ac_cv_c_inline" != no ; then
16747         NCURSES_INLINE=inline
16748         if test "$INTEL_COMPILER" = yes
16749         then
16750                 :
16751         elif test "$CLANG_COMPILER" = yes
16752         then
16753                 :
16754         elif test "$GCC" = yes
16755         then
16756                 echo "$as_me:16756: checking if $CC supports options to tune inlining" >&5
16757 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16758 if test "${cf_cv_gcc_inline+set}" = set; then
16759   echo $ECHO_N "(cached) $ECHO_C" >&6
16760 else
16761
16762                 cf_save_CFLAGS=$CFLAGS
16763                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16764                 cat >conftest.$ac_ext <<_ACEOF
16765 #line 16765 "configure"
16766 #include "confdefs.h"
16767 inline int foo(void) { return 1; }
16768 int
16769 main (void)
16770 {
16771 ${cf_cv_main_return:-return} foo()
16772   ;
16773   return 0;
16774 }
16775 _ACEOF
16776 rm -f conftest.$ac_objext
16777 if { (eval echo "$as_me:16777: \"$ac_compile\"") >&5
16778   (eval $ac_compile) 2>&5
16779   ac_status=$?
16780   echo "$as_me:16780: \$? = $ac_status" >&5
16781   (exit $ac_status); } &&
16782          { ac_try='test -s conftest.$ac_objext'
16783   { (eval echo "$as_me:16783: \"$ac_try\"") >&5
16784   (eval $ac_try) 2>&5
16785   ac_status=$?
16786   echo "$as_me:16786: \$? = $ac_status" >&5
16787   (exit $ac_status); }; }; then
16788   cf_cv_gcc_inline=yes
16789 else
16790   echo "$as_me: failed program was:" >&5
16791 cat conftest.$ac_ext >&5
16792 cf_cv_gcc_inline=no
16793 fi
16794 rm -f conftest.$ac_objext conftest.$ac_ext
16795                 CFLAGS=$cf_save_CFLAGS
16796
16797 fi
16798 echo "$as_me:16798: result: $cf_cv_gcc_inline" >&5
16799 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16800                 if test "$cf_cv_gcc_inline" = yes ; then
16801
16802 cf_fix_cppflags=no
16803 cf_new_cflags=
16804 cf_new_cppflags=
16805 cf_new_extra_cppflags=
16806
16807 for cf_add_cflags in --param max-inline-insns-single=1200
16808 do
16809 case $cf_fix_cppflags in
16810 (no)
16811         case $cf_add_cflags in
16812         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16813                 case $cf_add_cflags in
16814                 (-D*)
16815                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16816
16817                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16818                                 && test -z "${cf_tst_cflags}" \
16819                                 && cf_fix_cppflags=yes
16820
16821                         if test $cf_fix_cppflags = yes ; then
16822
16823         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16824         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16825
16826                                 continue
16827                         elif test "${cf_tst_cflags}" = "\"'" ; then
16828
16829         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16830         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16831
16832                                 continue
16833                         fi
16834                         ;;
16835                 esac
16836                 case "$CPPFLAGS" in
16837                 (*$cf_add_cflags)
16838                         ;;
16839                 (*)
16840                         case $cf_add_cflags in
16841                         (-D*)
16842                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16843
16844 CPPFLAGS=`echo "$CPPFLAGS" | \
16845         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16846                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16847
16848                                 ;;
16849                         esac
16850
16851         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16852         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16853
16854                         ;;
16855                 esac
16856                 ;;
16857         (*)
16858
16859         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16860         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16861
16862                 ;;
16863         esac
16864         ;;
16865 (yes)
16866
16867         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16868         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16869
16870         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16871
16872         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16873                 && test -z "${cf_tst_cflags}" \
16874                 && cf_fix_cppflags=no
16875         ;;
16876 esac
16877 done
16878
16879 if test -n "$cf_new_cflags" ; then
16880
16881         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16882         CFLAGS="${CFLAGS}$cf_new_cflags"
16883
16884 fi
16885
16886 if test -n "$cf_new_cppflags" ; then
16887
16888         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16889         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16890
16891 fi
16892
16893 if test -n "$cf_new_extra_cppflags" ; then
16894
16895         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16896         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16897
16898 fi
16899
16900                 fi
16901         fi
16902 fi
16903
16904 echo "$as_me:16904: checking for signal global datatype" >&5
16905 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16906 if test "${cf_cv_sig_atomic_t+set}" = set; then
16907   echo $ECHO_N "(cached) $ECHO_C" >&6
16908 else
16909
16910         for cf_type in \
16911                 "volatile sig_atomic_t" \
16912                 "sig_atomic_t" \
16913                 "int"
16914         do
16915         cat >conftest.$ac_ext <<_ACEOF
16916 #line 16916 "configure"
16917 #include "confdefs.h"
16918
16919 #include <sys/types.h>
16920 #include <signal.h>
16921 #include <stdio.h>
16922
16923 extern $cf_type x;
16924 $cf_type x;
16925 static void handler(int sig)
16926 {
16927         x = 5;
16928 }
16929 int
16930 main (void)
16931 {
16932 signal(SIGINT, handler);
16933                  x = 1
16934   ;
16935   return 0;
16936 }
16937 _ACEOF
16938 rm -f conftest.$ac_objext
16939 if { (eval echo "$as_me:16939: \"$ac_compile\"") >&5
16940   (eval $ac_compile) 2>&5
16941   ac_status=$?
16942   echo "$as_me:16942: \$? = $ac_status" >&5
16943   (exit $ac_status); } &&
16944          { ac_try='test -s conftest.$ac_objext'
16945   { (eval echo "$as_me:16945: \"$ac_try\"") >&5
16946   (eval $ac_try) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); }; }; then
16950   cf_cv_sig_atomic_t=$cf_type
16951 else
16952   echo "$as_me: failed program was:" >&5
16953 cat conftest.$ac_ext >&5
16954 cf_cv_sig_atomic_t=no
16955 fi
16956 rm -f conftest.$ac_objext conftest.$ac_ext
16957                 test "$cf_cv_sig_atomic_t" != no && break
16958         done
16959
16960 fi
16961
16962 echo "$as_me:16962: result: $cf_cv_sig_atomic_t" >&5
16963 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16964 test "$cf_cv_sig_atomic_t" != no &&
16965 cat >>confdefs.h <<EOF
16966 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16967 EOF
16968
16969 if test $NCURSES_CHTYPE = auto ; then
16970
16971 echo "$as_me:16971: checking for type of chtype" >&5
16972 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16973 if test "${cf_cv_typeof_chtype+set}" = set; then
16974   echo $ECHO_N "(cached) $ECHO_C" >&6
16975 else
16976
16977                 if test "$cross_compiling" = yes; then
16978   cf_cv_typeof_chtype=long
16979 else
16980   cat >conftest.$ac_ext <<_ACEOF
16981 #line 16981 "configure"
16982 #include "confdefs.h"
16983
16984 #define WANT_BITS 31
16985 #include <stdio.h>
16986 int main(void)
16987 {
16988         FILE *fp = fopen("cf_test.out", "w");
16989         if (fp != 0) {
16990                 char *result = "long";
16991                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16992                         int n;
16993                         unsigned int x, y;
16994                         for (n = 0; n < WANT_BITS; n++) {
16995                                 x = (1 << n);
16996                                 y = (x >> n);
16997                                 if (y != 1 || x == 0) {
16998                                         x = 0;
16999                                         break;
17000                                 }
17001                         }
17002                         /*
17003                          * If x is nonzero, an int is big enough for the bits
17004                          * that we want.
17005                          */
17006                         result = (x != 0) ? "int" : "long";
17007                 }
17008                 fputs(result, fp);
17009                 fclose(fp);
17010         }
17011         ${cf_cv_main_return:-return}(0);
17012 }
17013
17014 _ACEOF
17015 rm -f conftest$ac_exeext
17016 if { (eval echo "$as_me:17016: \"$ac_link\"") >&5
17017   (eval $ac_link) 2>&5
17018   ac_status=$?
17019   echo "$as_me:17019: \$? = $ac_status" >&5
17020   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17021   { (eval echo "$as_me:17021: \"$ac_try\"") >&5
17022   (eval $ac_try) 2>&5
17023   ac_status=$?
17024   echo "$as_me:17024: \$? = $ac_status" >&5
17025   (exit $ac_status); }; }; then
17026   cf_cv_typeof_chtype=`cat cf_test.out`
17027 else
17028   echo "$as_me: program exited with status $ac_status" >&5
17029 echo "$as_me: failed program was:" >&5
17030 cat conftest.$ac_ext >&5
17031 cf_cv_typeof_chtype=long
17032 fi
17033 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17034 fi
17035                 rm -f cf_test.out
17036
17037 fi
17038
17039 echo "$as_me:17039: result: $cf_cv_typeof_chtype" >&5
17040 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17041
17042 cat >>confdefs.h <<EOF
17043 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17044 EOF
17045
17046 else
17047         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17048 fi
17049 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17050
17051 echo "$as_me:17051: checking if unsigned literals are legal" >&5
17052 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17053 if test "${cf_cv_unsigned_literals+set}" = set; then
17054   echo $ECHO_N "(cached) $ECHO_C" >&6
17055 else
17056
17057         cat >conftest.$ac_ext <<_ACEOF
17058 #line 17058 "configure"
17059 #include "confdefs.h"
17060
17061 int
17062 main (void)
17063 {
17064 long x = 1L + 1UL + 1U + 1
17065   ;
17066   return 0;
17067 }
17068 _ACEOF
17069 rm -f conftest.$ac_objext
17070 if { (eval echo "$as_me:17070: \"$ac_compile\"") >&5
17071   (eval $ac_compile) 2>&5
17072   ac_status=$?
17073   echo "$as_me:17073: \$? = $ac_status" >&5
17074   (exit $ac_status); } &&
17075          { ac_try='test -s conftest.$ac_objext'
17076   { (eval echo "$as_me:17076: \"$ac_try\"") >&5
17077   (eval $ac_try) 2>&5
17078   ac_status=$?
17079   echo "$as_me:17079: \$? = $ac_status" >&5
17080   (exit $ac_status); }; }; then
17081   cf_cv_unsigned_literals=yes
17082 else
17083   echo "$as_me: failed program was:" >&5
17084 cat conftest.$ac_ext >&5
17085 cf_cv_unsigned_literals=no
17086 fi
17087 rm -f conftest.$ac_objext conftest.$ac_ext
17088
17089 fi
17090
17091 echo "$as_me:17091: result: $cf_cv_unsigned_literals" >&5
17092 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17093
17094 cf_cv_1UL="1"
17095 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17096 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17097
17098 if test $NCURSES_MMASK_T = auto ; then
17099         cf_cv_typeof_mmask_t=long
17100 else
17101         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17102 fi
17103 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17104
17105 ###     Checks for external-data
17106
17107 echo "$as_me:17107: checking if external errno is declared" >&5
17108 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17109 if test "${cf_cv_dcl_errno+set}" = set; then
17110   echo $ECHO_N "(cached) $ECHO_C" >&6
17111 else
17112
17113         cat >conftest.$ac_ext <<_ACEOF
17114 #line 17114 "configure"
17115 #include "confdefs.h"
17116
17117 #ifdef HAVE_STDLIB_H
17118 #include <stdlib.h>
17119 #endif
17120 #include <stdio.h>
17121 #include <sys/types.h>
17122 #include <errno.h>
17123 int
17124 main (void)
17125 {
17126 int x = (int) errno
17127   ;
17128   return 0;
17129 }
17130 _ACEOF
17131 rm -f conftest.$ac_objext
17132 if { (eval echo "$as_me:17132: \"$ac_compile\"") >&5
17133   (eval $ac_compile) 2>&5
17134   ac_status=$?
17135   echo "$as_me:17135: \$? = $ac_status" >&5
17136   (exit $ac_status); } &&
17137          { ac_try='test -s conftest.$ac_objext'
17138   { (eval echo "$as_me:17138: \"$ac_try\"") >&5
17139   (eval $ac_try) 2>&5
17140   ac_status=$?
17141   echo "$as_me:17141: \$? = $ac_status" >&5
17142   (exit $ac_status); }; }; then
17143   cf_cv_dcl_errno=yes
17144 else
17145   echo "$as_me: failed program was:" >&5
17146 cat conftest.$ac_ext >&5
17147 cf_cv_dcl_errno=no
17148 fi
17149 rm -f conftest.$ac_objext conftest.$ac_ext
17150
17151 fi
17152 echo "$as_me:17152: result: $cf_cv_dcl_errno" >&5
17153 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17154
17155 if test "$cf_cv_dcl_errno" = no ; then
17156
17157 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17158
17159         cat >>confdefs.h <<EOF
17160 #define $cf_result 1
17161 EOF
17162
17163 fi
17164
17165 # It's possible (for near-UNIX clones) that the data doesn't exist
17166
17167 echo "$as_me:17167: checking if external errno exists" >&5
17168 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17169 if test "${cf_cv_have_errno+set}" = set; then
17170   echo $ECHO_N "(cached) $ECHO_C" >&6
17171 else
17172
17173         cat >conftest.$ac_ext <<_ACEOF
17174 #line 17174 "configure"
17175 #include "confdefs.h"
17176
17177 #undef errno
17178 extern int errno;
17179
17180 int
17181 main (void)
17182 {
17183 errno = 2
17184   ;
17185   return 0;
17186 }
17187 _ACEOF
17188 rm -f conftest.$ac_objext conftest$ac_exeext
17189 if { (eval echo "$as_me:17189: \"$ac_link\"") >&5
17190   (eval $ac_link) 2>&5
17191   ac_status=$?
17192   echo "$as_me:17192: \$? = $ac_status" >&5
17193   (exit $ac_status); } &&
17194          { ac_try='test -s conftest$ac_exeext'
17195   { (eval echo "$as_me:17195: \"$ac_try\"") >&5
17196   (eval $ac_try) 2>&5
17197   ac_status=$?
17198   echo "$as_me:17198: \$? = $ac_status" >&5
17199   (exit $ac_status); }; }; then
17200   cf_cv_have_errno=yes
17201 else
17202   echo "$as_me: failed program was:" >&5
17203 cat conftest.$ac_ext >&5
17204 cf_cv_have_errno=no
17205 fi
17206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17207
17208 fi
17209 echo "$as_me:17209: result: $cf_cv_have_errno" >&5
17210 echo "${ECHO_T}$cf_cv_have_errno" >&6
17211
17212 if test "$cf_cv_have_errno" = yes ; then
17213
17214 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17215
17216         cat >>confdefs.h <<EOF
17217 #define $cf_result 1
17218 EOF
17219
17220 fi
17221
17222 echo "$as_me:17222: checking if data-only library module links" >&5
17223 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17224 if test "${cf_cv_link_dataonly+set}" = set; then
17225   echo $ECHO_N "(cached) $ECHO_C" >&6
17226 else
17227
17228         rm -f conftest.a
17229         cat >conftest.$ac_ext <<EOF
17230 #line 17230 "configure"
17231 int     testdata[3] = { 123, 456, 789 };
17232 EOF
17233         if { (eval echo "$as_me:17233: \"$ac_compile\"") >&5
17234   (eval $ac_compile) 2>&5
17235   ac_status=$?
17236   echo "$as_me:17236: \$? = $ac_status" >&5
17237   (exit $ac_status); } ; then
17238                 mv conftest.o data.o && \
17239                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17240         fi
17241         rm -f conftest.$ac_ext data.o
17242         cat >conftest.$ac_ext <<EOF
17243 #line 17243 "configure"
17244 int     testfunc()
17245 {
17246 #if defined(NeXT)
17247         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17248 #else
17249         extern int testdata[3];
17250         return testdata[0] == 123
17251            &&  testdata[1] == 456
17252            &&  testdata[2] == 789;
17253 #endif
17254 }
17255 EOF
17256         if { (eval echo "$as_me:17256: \"$ac_compile\"") >&5
17257   (eval $ac_compile) 2>&5
17258   ac_status=$?
17259   echo "$as_me:17259: \$? = $ac_status" >&5
17260   (exit $ac_status); }; then
17261                 mv conftest.o func.o && \
17262                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17263         fi
17264         rm -f conftest.$ac_ext func.o
17265         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17266         cf_saveLIBS="$LIBS"
17267         LIBS="conftest.a $LIBS"
17268         if test "$cross_compiling" = yes; then
17269   cf_cv_link_dataonly=unknown
17270 else
17271   cat >conftest.$ac_ext <<_ACEOF
17272 #line 17272 "configure"
17273 #include "confdefs.h"
17274
17275         int main(void)
17276         {
17277                 extern int testfunc();
17278                 ${cf_cv_main_return:-return} (!testfunc());
17279         }
17280
17281 _ACEOF
17282 rm -f conftest$ac_exeext
17283 if { (eval echo "$as_me:17283: \"$ac_link\"") >&5
17284   (eval $ac_link) 2>&5
17285   ac_status=$?
17286   echo "$as_me:17286: \$? = $ac_status" >&5
17287   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17288   { (eval echo "$as_me:17288: \"$ac_try\"") >&5
17289   (eval $ac_try) 2>&5
17290   ac_status=$?
17291   echo "$as_me:17291: \$? = $ac_status" >&5
17292   (exit $ac_status); }; }; then
17293   cf_cv_link_dataonly=yes
17294 else
17295   echo "$as_me: program exited with status $ac_status" >&5
17296 echo "$as_me: failed program was:" >&5
17297 cat conftest.$ac_ext >&5
17298 cf_cv_link_dataonly=no
17299 fi
17300 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17301 fi
17302         LIBS="$cf_saveLIBS"
17303
17304 fi
17305
17306 echo "$as_me:17306: result: $cf_cv_link_dataonly" >&5
17307 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17308
17309 if test "$cf_cv_link_dataonly" = no ; then
17310
17311 cat >>confdefs.h <<\EOF
17312 #define BROKEN_LINKER 1
17313 EOF
17314
17315         BROKEN_LINKER=1
17316 fi
17317
17318 ###     Checks for library functions.
17319
17320 for ac_func in \
17321 getcwd \
17322 getegid \
17323 geteuid \
17324 getopt \
17325 getttynam \
17326 issetugid \
17327 poll \
17328 putenv \
17329 remove \
17330 select \
17331 setbuf \
17332 setbuffer \
17333 setenv \
17334 setvbuf \
17335 sigaction \
17336 sigvec \
17337 strdup \
17338 strstr \
17339 tcgetpgrp \
17340 times \
17341 vsnprintf \
17342
17343 do
17344 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17345 echo "$as_me:17345: checking for $ac_func" >&5
17346 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17347 if eval "test \"\${$as_ac_var+set}\" = set"; then
17348   echo $ECHO_N "(cached) $ECHO_C" >&6
17349 else
17350   cat >conftest.$ac_ext <<_ACEOF
17351 #line 17351 "configure"
17352 #include "confdefs.h"
17353 /* System header to define __stub macros and hopefully few prototypes,
17354     which can conflict with char $ac_func (); below.  */
17355 #include <assert.h>
17356 /* Override any gcc2 internal prototype to avoid an error.  */
17357 #ifdef __cplusplus
17358 extern "C"
17359 #endif
17360 /* We use char because int might match the return type of a gcc2
17361    builtin and then its argument prototype would still apply.  */
17362 char $ac_func ();
17363 char (*f) ();
17364
17365 int
17366 main (void)
17367 {
17368 /* The GNU C library defines this for functions which it implements
17369     to always fail with ENOSYS.  Some functions are actually named
17370     something starting with __ and the normal name is an alias.  */
17371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17372 choke me
17373 #else
17374 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17375 #endif
17376
17377   ;
17378   return 0;
17379 }
17380 _ACEOF
17381 rm -f conftest.$ac_objext conftest$ac_exeext
17382 if { (eval echo "$as_me:17382: \"$ac_link\"") >&5
17383   (eval $ac_link) 2>&5
17384   ac_status=$?
17385   echo "$as_me:17385: \$? = $ac_status" >&5
17386   (exit $ac_status); } &&
17387          { ac_try='test -s conftest$ac_exeext'
17388   { (eval echo "$as_me:17388: \"$ac_try\"") >&5
17389   (eval $ac_try) 2>&5
17390   ac_status=$?
17391   echo "$as_me:17391: \$? = $ac_status" >&5
17392   (exit $ac_status); }; }; then
17393   eval "$as_ac_var=yes"
17394 else
17395   echo "$as_me: failed program was:" >&5
17396 cat conftest.$ac_ext >&5
17397 eval "$as_ac_var=no"
17398 fi
17399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17400 fi
17401 echo "$as_me:17401: result: `eval echo '${'$as_ac_var'}'`" >&5
17402 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17403 if test `eval echo '${'$as_ac_var'}'` = yes; then
17404   cat >>confdefs.h <<EOF
17405 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17406 EOF
17407
17408 fi
17409 done
17410
17411 if test "x$ac_cv_func_getopt" = xno && \
17412    test "x$cf_with_progs$cf_with_tests" != xnono; then
17413         { { echo "$as_me:17413: error: getopt is required for building programs" >&5
17414 echo "$as_me: error: getopt is required for building programs" >&2;}
17415    { (exit 1); exit 1; }; }
17416 fi
17417
17418 if test "x$with_getcap" = "xyes" ; then
17419
17420 echo "$as_me:17420: checking for terminal-capability database functions" >&5
17421 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17422 if test "${cf_cv_cgetent+set}" = set; then
17423   echo $ECHO_N "(cached) $ECHO_C" >&6
17424 else
17425
17426 cat >conftest.$ac_ext <<_ACEOF
17427 #line 17427 "configure"
17428 #include "confdefs.h"
17429
17430 #include <stdlib.h>
17431 int
17432 main (void)
17433 {
17434
17435         char temp[128];
17436         char *buf = temp;
17437         char *db_array = temp;
17438         cgetent(&buf, &db_array, "vt100");
17439         cgetcap(buf, "tc", '=');
17440         cgetmatch(buf, "tc");
17441
17442   ;
17443   return 0;
17444 }
17445 _ACEOF
17446 rm -f conftest.$ac_objext conftest$ac_exeext
17447 if { (eval echo "$as_me:17447: \"$ac_link\"") >&5
17448   (eval $ac_link) 2>&5
17449   ac_status=$?
17450   echo "$as_me:17450: \$? = $ac_status" >&5
17451   (exit $ac_status); } &&
17452          { ac_try='test -s conftest$ac_exeext'
17453   { (eval echo "$as_me:17453: \"$ac_try\"") >&5
17454   (eval $ac_try) 2>&5
17455   ac_status=$?
17456   echo "$as_me:17456: \$? = $ac_status" >&5
17457   (exit $ac_status); }; }; then
17458   cf_cv_cgetent=yes
17459 else
17460   echo "$as_me: failed program was:" >&5
17461 cat conftest.$ac_ext >&5
17462 cf_cv_cgetent=no
17463 fi
17464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17465
17466 fi
17467 echo "$as_me:17467: result: $cf_cv_cgetent" >&5
17468 echo "${ECHO_T}$cf_cv_cgetent" >&6
17469
17470 if test "$cf_cv_cgetent" = yes
17471 then
17472
17473 cat >>confdefs.h <<\EOF
17474 #define HAVE_BSD_CGETENT 1
17475 EOF
17476
17477 echo "$as_me:17477: checking if cgetent uses const parameter" >&5
17478 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17479 if test "${cf_cv_cgetent_const+set}" = set; then
17480   echo $ECHO_N "(cached) $ECHO_C" >&6
17481 else
17482
17483 cat >conftest.$ac_ext <<_ACEOF
17484 #line 17484 "configure"
17485 #include "confdefs.h"
17486
17487 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17488 #include <stdlib.h>
17489 int
17490 main (void)
17491 {
17492
17493         char temp[128];
17494         char *buf = temp;
17495 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17496         const char *db_array = temp;
17497         cgetent(&buf, &db_array, "vt100");
17498 #endif
17499         cgetcap(buf, "tc", '=');
17500         cgetmatch(buf, "tc");
17501
17502   ;
17503   return 0;
17504 }
17505 _ACEOF
17506 rm -f conftest.$ac_objext conftest$ac_exeext
17507 if { (eval echo "$as_me:17507: \"$ac_link\"") >&5
17508   (eval $ac_link) 2>&5
17509   ac_status=$?
17510   echo "$as_me:17510: \$? = $ac_status" >&5
17511   (exit $ac_status); } &&
17512          { ac_try='test -s conftest$ac_exeext'
17513   { (eval echo "$as_me:17513: \"$ac_try\"") >&5
17514   (eval $ac_try) 2>&5
17515   ac_status=$?
17516   echo "$as_me:17516: \$? = $ac_status" >&5
17517   (exit $ac_status); }; }; then
17518   cf_cv_cgetent_const=yes
17519 else
17520   echo "$as_me: failed program was:" >&5
17521 cat conftest.$ac_ext >&5
17522 cf_cv_cgetent_const=no
17523 fi
17524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17525
17526 fi
17527 echo "$as_me:17527: result: $cf_cv_cgetent_const" >&5
17528 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17529         if test "$cf_cv_cgetent_const" = yes
17530         then
17531
17532 cat >>confdefs.h <<EOF
17533 #define CGETENT_CONST const
17534 EOF
17535
17536         fi
17537 fi
17538
17539 fi
17540
17541 echo "$as_me:17541: checking for isascii" >&5
17542 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17543 if test "${cf_cv_have_isascii+set}" = set; then
17544   echo $ECHO_N "(cached) $ECHO_C" >&6
17545 else
17546
17547         cat >conftest.$ac_ext <<_ACEOF
17548 #line 17548 "configure"
17549 #include "confdefs.h"
17550 #include <ctype.h>
17551 int
17552 main (void)
17553 {
17554 int x = isascii(' ')
17555   ;
17556   return 0;
17557 }
17558 _ACEOF
17559 rm -f conftest.$ac_objext conftest$ac_exeext
17560 if { (eval echo "$as_me:17560: \"$ac_link\"") >&5
17561   (eval $ac_link) 2>&5
17562   ac_status=$?
17563   echo "$as_me:17563: \$? = $ac_status" >&5
17564   (exit $ac_status); } &&
17565          { ac_try='test -s conftest$ac_exeext'
17566   { (eval echo "$as_me:17566: \"$ac_try\"") >&5
17567   (eval $ac_try) 2>&5
17568   ac_status=$?
17569   echo "$as_me:17569: \$? = $ac_status" >&5
17570   (exit $ac_status); }; }; then
17571   cf_cv_have_isascii=yes
17572 else
17573   echo "$as_me: failed program was:" >&5
17574 cat conftest.$ac_ext >&5
17575 cf_cv_have_isascii=no
17576 fi
17577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17578
17579 fi
17580 echo "$as_me:17580: result: $cf_cv_have_isascii" >&5
17581 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17582 test "$cf_cv_have_isascii" = yes &&
17583 cat >>confdefs.h <<\EOF
17584 #define HAVE_ISASCII 1
17585 EOF
17586
17587 if test "$ac_cv_func_sigaction" = yes; then
17588 echo "$as_me:17588: checking whether sigaction needs _POSIX_SOURCE" >&5
17589 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17590 cat >conftest.$ac_ext <<_ACEOF
17591 #line 17591 "configure"
17592 #include "confdefs.h"
17593
17594 #include <sys/types.h>
17595 #include <signal.h>
17596 int
17597 main (void)
17598 {
17599 struct sigaction act
17600   ;
17601   return 0;
17602 }
17603 _ACEOF
17604 rm -f conftest.$ac_objext
17605 if { (eval echo "$as_me:17605: \"$ac_compile\"") >&5
17606   (eval $ac_compile) 2>&5
17607   ac_status=$?
17608   echo "$as_me:17608: \$? = $ac_status" >&5
17609   (exit $ac_status); } &&
17610          { ac_try='test -s conftest.$ac_objext'
17611   { (eval echo "$as_me:17611: \"$ac_try\"") >&5
17612   (eval $ac_try) 2>&5
17613   ac_status=$?
17614   echo "$as_me:17614: \$? = $ac_status" >&5
17615   (exit $ac_status); }; }; then
17616   sigact_bad=no
17617 else
17618   echo "$as_me: failed program was:" >&5
17619 cat conftest.$ac_ext >&5
17620
17621 cat >conftest.$ac_ext <<_ACEOF
17622 #line 17622 "configure"
17623 #include "confdefs.h"
17624
17625 #define _POSIX_SOURCE
17626 #include <sys/types.h>
17627 #include <signal.h>
17628 int
17629 main (void)
17630 {
17631 struct sigaction act
17632   ;
17633   return 0;
17634 }
17635 _ACEOF
17636 rm -f conftest.$ac_objext
17637 if { (eval echo "$as_me:17637: \"$ac_compile\"") >&5
17638   (eval $ac_compile) 2>&5
17639   ac_status=$?
17640   echo "$as_me:17640: \$? = $ac_status" >&5
17641   (exit $ac_status); } &&
17642          { ac_try='test -s conftest.$ac_objext'
17643   { (eval echo "$as_me:17643: \"$ac_try\"") >&5
17644   (eval $ac_try) 2>&5
17645   ac_status=$?
17646   echo "$as_me:17646: \$? = $ac_status" >&5
17647   (exit $ac_status); }; }; then
17648   sigact_bad=yes
17649
17650 cat >>confdefs.h <<\EOF
17651 #define _POSIX_SOURCE 1
17652 EOF
17653
17654 else
17655   echo "$as_me: failed program was:" >&5
17656 cat conftest.$ac_ext >&5
17657 sigact_bad=unknown
17658 fi
17659 rm -f conftest.$ac_objext conftest.$ac_ext
17660 fi
17661 rm -f conftest.$ac_objext conftest.$ac_ext
17662 echo "$as_me:17662: result: $sigact_bad" >&5
17663 echo "${ECHO_T}$sigact_bad" >&6
17664 fi
17665
17666 echo "$as_me:17666: checking if nanosleep really works" >&5
17667 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17668 if test "${cf_cv_func_nanosleep+set}" = set; then
17669   echo $ECHO_N "(cached) $ECHO_C" >&6
17670 else
17671
17672 if test "$cross_compiling" = yes; then
17673   cf_cv_func_nanosleep=unknown
17674 else
17675   cat >conftest.$ac_ext <<_ACEOF
17676 #line 17676 "configure"
17677 #include "confdefs.h"
17678
17679 #include <stdio.h>
17680 #include <errno.h>
17681 #include <time.h>
17682
17683 #ifdef HAVE_SYS_TIME_H
17684 #include <sys/time.h>
17685 #endif
17686
17687 int main(void) {
17688         struct timespec ts1, ts2;
17689         int code;
17690         ts1.tv_sec  = 0;
17691         ts1.tv_nsec = 750000000;
17692         ts2.tv_sec  = 0;
17693         ts2.tv_nsec = 0;
17694         errno = 0;
17695         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17696         ${cf_cv_main_return:-return}(code != 0);
17697 }
17698
17699 _ACEOF
17700 rm -f conftest$ac_exeext
17701 if { (eval echo "$as_me:17701: \"$ac_link\"") >&5
17702   (eval $ac_link) 2>&5
17703   ac_status=$?
17704   echo "$as_me:17704: \$? = $ac_status" >&5
17705   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17706   { (eval echo "$as_me:17706: \"$ac_try\"") >&5
17707   (eval $ac_try) 2>&5
17708   ac_status=$?
17709   echo "$as_me:17709: \$? = $ac_status" >&5
17710   (exit $ac_status); }; }; then
17711   cf_cv_func_nanosleep=yes
17712 else
17713   echo "$as_me: program exited with status $ac_status" >&5
17714 echo "$as_me: failed program was:" >&5
17715 cat conftest.$ac_ext >&5
17716 cf_cv_func_nanosleep=no
17717 fi
17718 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17719 fi
17720 fi
17721 echo "$as_me:17721: result: $cf_cv_func_nanosleep" >&5
17722 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17723
17724 test "$cf_cv_func_nanosleep" = "yes" &&
17725 cat >>confdefs.h <<\EOF
17726 #define HAVE_NANOSLEEP 1
17727 EOF
17728
17729 for ac_header in \
17730 termio.h \
17731 termios.h \
17732 unistd.h \
17733
17734 do
17735 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17736 echo "$as_me:17736: checking for $ac_header" >&5
17737 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17738 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17739   echo $ECHO_N "(cached) $ECHO_C" >&6
17740 else
17741   cat >conftest.$ac_ext <<_ACEOF
17742 #line 17742 "configure"
17743 #include "confdefs.h"
17744 #include <$ac_header>
17745 _ACEOF
17746 if { (eval echo "$as_me:17746: \"$ac_cpp conftest.$ac_ext\"") >&5
17747   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17748   ac_status=$?
17749   egrep -v '^ *\+' conftest.er1 >conftest.err
17750   rm -f conftest.er1
17751   cat conftest.err >&5
17752   echo "$as_me:17752: \$? = $ac_status" >&5
17753   (exit $ac_status); } >/dev/null; then
17754   if test -s conftest.err; then
17755     ac_cpp_err=$ac_c_preproc_warn_flag
17756   else
17757     ac_cpp_err=
17758   fi
17759 else
17760   ac_cpp_err=yes
17761 fi
17762 if test -z "$ac_cpp_err"; then
17763   eval "$as_ac_Header=yes"
17764 else
17765   echo "$as_me: failed program was:" >&5
17766   cat conftest.$ac_ext >&5
17767   eval "$as_ac_Header=no"
17768 fi
17769 rm -f conftest.err conftest.$ac_ext
17770 fi
17771 echo "$as_me:17771: result: `eval echo '${'$as_ac_Header'}'`" >&5
17772 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17773 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17774   cat >>confdefs.h <<EOF
17775 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17776 EOF
17777
17778 fi
17779 done
17780
17781 if test "$ISC" = yes ; then
17782
17783 for ac_header in sys/termio.h
17784 do
17785 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17786 echo "$as_me:17786: checking for $ac_header" >&5
17787 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17788 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17789   echo $ECHO_N "(cached) $ECHO_C" >&6
17790 else
17791   cat >conftest.$ac_ext <<_ACEOF
17792 #line 17792 "configure"
17793 #include "confdefs.h"
17794 #include <$ac_header>
17795 _ACEOF
17796 if { (eval echo "$as_me:17796: \"$ac_cpp conftest.$ac_ext\"") >&5
17797   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17798   ac_status=$?
17799   egrep -v '^ *\+' conftest.er1 >conftest.err
17800   rm -f conftest.er1
17801   cat conftest.err >&5
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit $ac_status); } >/dev/null; then
17804   if test -s conftest.err; then
17805     ac_cpp_err=$ac_c_preproc_warn_flag
17806   else
17807     ac_cpp_err=
17808   fi
17809 else
17810   ac_cpp_err=yes
17811 fi
17812 if test -z "$ac_cpp_err"; then
17813   eval "$as_ac_Header=yes"
17814 else
17815   echo "$as_me: failed program was:" >&5
17816   cat conftest.$ac_ext >&5
17817   eval "$as_ac_Header=no"
17818 fi
17819 rm -f conftest.err conftest.$ac_ext
17820 fi
17821 echo "$as_me:17821: result: `eval echo '${'$as_ac_Header'}'`" >&5
17822 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17823 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17824   cat >>confdefs.h <<EOF
17825 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17826 EOF
17827
17828 fi
17829 done
17830
17831 fi
17832 if test "$ac_cv_header_termios_h" = yes ; then
17833         case "$CFLAGS $CPPFLAGS" in
17834         (*-D_POSIX_SOURCE*)
17835                 termios_bad=dunno ;;
17836         (*)     termios_bad=maybe ;;
17837         esac
17838         if test "$termios_bad" = maybe ; then
17839         echo "$as_me:17839: checking whether termios.h needs _POSIX_SOURCE" >&5
17840 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17841         cat >conftest.$ac_ext <<_ACEOF
17842 #line 17842 "configure"
17843 #include "confdefs.h"
17844 #include <termios.h>
17845 int
17846 main (void)
17847 {
17848 struct termios foo; int x = foo.c_iflag
17849   ;
17850   return 0;
17851 }
17852 _ACEOF
17853 rm -f conftest.$ac_objext
17854 if { (eval echo "$as_me:17854: \"$ac_compile\"") >&5
17855   (eval $ac_compile) 2>&5
17856   ac_status=$?
17857   echo "$as_me:17857: \$? = $ac_status" >&5
17858   (exit $ac_status); } &&
17859          { ac_try='test -s conftest.$ac_objext'
17860   { (eval echo "$as_me:17860: \"$ac_try\"") >&5
17861   (eval $ac_try) 2>&5
17862   ac_status=$?
17863   echo "$as_me:17863: \$? = $ac_status" >&5
17864   (exit $ac_status); }; }; then
17865   termios_bad=no
17866 else
17867   echo "$as_me: failed program was:" >&5
17868 cat conftest.$ac_ext >&5
17869
17870                 cat >conftest.$ac_ext <<_ACEOF
17871 #line 17871 "configure"
17872 #include "confdefs.h"
17873
17874 #define _POSIX_SOURCE
17875 #include <termios.h>
17876 int
17877 main (void)
17878 {
17879 struct termios foo; int x = foo.c_iflag
17880   ;
17881   return 0;
17882 }
17883 _ACEOF
17884 rm -f conftest.$ac_objext
17885 if { (eval echo "$as_me:17885: \"$ac_compile\"") >&5
17886   (eval $ac_compile) 2>&5
17887   ac_status=$?
17888   echo "$as_me:17888: \$? = $ac_status" >&5
17889   (exit $ac_status); } &&
17890          { ac_try='test -s conftest.$ac_objext'
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   termios_bad=unknown
17897 else
17898   echo "$as_me: failed program was:" >&5
17899 cat conftest.$ac_ext >&5
17900 termios_bad=yes
17901 cat >>confdefs.h <<\EOF
17902 #define _POSIX_SOURCE 1
17903 EOF
17904
17905 fi
17906 rm -f conftest.$ac_objext conftest.$ac_ext
17907
17908 fi
17909 rm -f conftest.$ac_objext conftest.$ac_ext
17910         echo "$as_me:17910: result: $termios_bad" >&5
17911 echo "${ECHO_T}$termios_bad" >&6
17912         fi
17913 fi
17914
17915 echo "$as_me:17915: checking for tcgetattr" >&5
17916 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17917 if test "${cf_cv_have_tcgetattr+set}" = set; then
17918   echo $ECHO_N "(cached) $ECHO_C" >&6
17919 else
17920
17921 cat >conftest.$ac_ext <<_ACEOF
17922 #line 17922 "configure"
17923 #include "confdefs.h"
17924
17925 #include <sys/types.h>
17926 #ifdef HAVE_UNISTD_H
17927 #include <unistd.h>
17928 #endif
17929 #ifdef HAVE_TERMIOS_H
17930 #include <termios.h>
17931 #define TTY struct termios
17932 #else
17933 #ifdef HAVE_TERMIO_H
17934 #include <termio.h>
17935 #define TTY struct termio
17936 #endif
17937 #endif
17938
17939 int
17940 main (void)
17941 {
17942
17943 TTY foo;
17944 tcgetattr(1, &foo);
17945   ;
17946   return 0;
17947 }
17948 _ACEOF
17949 rm -f conftest.$ac_objext conftest$ac_exeext
17950 if { (eval echo "$as_me:17950: \"$ac_link\"") >&5
17951   (eval $ac_link) 2>&5
17952   ac_status=$?
17953   echo "$as_me:17953: \$? = $ac_status" >&5
17954   (exit $ac_status); } &&
17955          { ac_try='test -s conftest$ac_exeext'
17956   { (eval echo "$as_me:17956: \"$ac_try\"") >&5
17957   (eval $ac_try) 2>&5
17958   ac_status=$?
17959   echo "$as_me:17959: \$? = $ac_status" >&5
17960   (exit $ac_status); }; }; then
17961   cf_cv_have_tcgetattr=yes
17962 else
17963   echo "$as_me: failed program was:" >&5
17964 cat conftest.$ac_ext >&5
17965 cf_cv_have_tcgetattr=no
17966 fi
17967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17968 fi
17969 echo "$as_me:17969: result: $cf_cv_have_tcgetattr" >&5
17970 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17971 test "$cf_cv_have_tcgetattr" = yes &&
17972 cat >>confdefs.h <<\EOF
17973 #define HAVE_TCGETATTR 1
17974 EOF
17975
17976 echo "$as_me:17976: checking for vsscanf function or workaround" >&5
17977 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17978 if test "${cf_cv_func_vsscanf+set}" = set; then
17979   echo $ECHO_N "(cached) $ECHO_C" >&6
17980 else
17981
17982 cat >conftest.$ac_ext <<_ACEOF
17983 #line 17983 "configure"
17984 #include "confdefs.h"
17985
17986 #include <stdarg.h>
17987 #include <stdio.h>
17988 int
17989 main (void)
17990 {
17991
17992         va_list ap;
17993         vsscanf("from", "%d", ap)
17994   ;
17995   return 0;
17996 }
17997 _ACEOF
17998 rm -f conftest.$ac_objext conftest$ac_exeext
17999 if { (eval echo "$as_me:17999: \"$ac_link\"") >&5
18000   (eval $ac_link) 2>&5
18001   ac_status=$?
18002   echo "$as_me:18002: \$? = $ac_status" >&5
18003   (exit $ac_status); } &&
18004          { ac_try='test -s conftest$ac_exeext'
18005   { (eval echo "$as_me:18005: \"$ac_try\"") >&5
18006   (eval $ac_try) 2>&5
18007   ac_status=$?
18008   echo "$as_me:18008: \$? = $ac_status" >&5
18009   (exit $ac_status); }; }; then
18010   cf_cv_func_vsscanf=vsscanf
18011 else
18012   echo "$as_me: failed program was:" >&5
18013 cat conftest.$ac_ext >&5
18014
18015 cat >conftest.$ac_ext <<_ACEOF
18016 #line 18016 "configure"
18017 #include "confdefs.h"
18018
18019 #include <stdarg.h>
18020 #include <stdio.h>
18021 int
18022 main (void)
18023 {
18024
18025         FILE strbuf;
18026         char *str = "from";
18027
18028         strbuf._flag = _IOREAD;
18029         strbuf._ptr = strbuf._base = (unsigned char *) str;
18030         strbuf._cnt = strlen(str);
18031         strbuf._file = _NFILE;
18032         return (vfscanf(&strbuf, "%d", ap))
18033   ;
18034   return 0;
18035 }
18036 _ACEOF
18037 rm -f conftest.$ac_objext conftest$ac_exeext
18038 if { (eval echo "$as_me:18038: \"$ac_link\"") >&5
18039   (eval $ac_link) 2>&5
18040   ac_status=$?
18041   echo "$as_me:18041: \$? = $ac_status" >&5
18042   (exit $ac_status); } &&
18043          { ac_try='test -s conftest$ac_exeext'
18044   { (eval echo "$as_me:18044: \"$ac_try\"") >&5
18045   (eval $ac_try) 2>&5
18046   ac_status=$?
18047   echo "$as_me:18047: \$? = $ac_status" >&5
18048   (exit $ac_status); }; }; then
18049   cf_cv_func_vsscanf=vfscanf
18050 else
18051   echo "$as_me: failed program was:" >&5
18052 cat conftest.$ac_ext >&5
18053
18054 cat >conftest.$ac_ext <<_ACEOF
18055 #line 18055 "configure"
18056 #include "confdefs.h"
18057
18058 #include <stdarg.h>
18059 #include <stdio.h>
18060 int
18061 main (void)
18062 {
18063
18064         FILE strbuf;
18065         char *str = "from";
18066
18067         strbuf._flag = _IOREAD;
18068         strbuf._ptr = strbuf._base = (unsigned char *) str;
18069         strbuf._cnt = strlen(str);
18070         strbuf._file = _NFILE;
18071         return (_doscan(&strbuf, "%d", ap))
18072   ;
18073   return 0;
18074 }
18075 _ACEOF
18076 rm -f conftest.$ac_objext conftest$ac_exeext
18077 if { (eval echo "$as_me:18077: \"$ac_link\"") >&5
18078   (eval $ac_link) 2>&5
18079   ac_status=$?
18080   echo "$as_me:18080: \$? = $ac_status" >&5
18081   (exit $ac_status); } &&
18082          { ac_try='test -s conftest$ac_exeext'
18083   { (eval echo "$as_me:18083: \"$ac_try\"") >&5
18084   (eval $ac_try) 2>&5
18085   ac_status=$?
18086   echo "$as_me:18086: \$? = $ac_status" >&5
18087   (exit $ac_status); }; }; then
18088   cf_cv_func_vsscanf=_doscan
18089 else
18090   echo "$as_me: failed program was:" >&5
18091 cat conftest.$ac_ext >&5
18092
18093 cf_cv_func_vsscanf=no
18094 fi
18095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18096 fi
18097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18098 fi
18099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18100 fi
18101 echo "$as_me:18101: result: $cf_cv_func_vsscanf" >&5
18102 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18103
18104 case $cf_cv_func_vsscanf in
18105 (vsscanf)
18106 cat >>confdefs.h <<\EOF
18107 #define HAVE_VSSCANF 1
18108 EOF
18109 ;;
18110 (vfscanf)
18111 cat >>confdefs.h <<\EOF
18112 #define HAVE_VFSCANF 1
18113 EOF
18114 ;;
18115 (_doscan)
18116 cat >>confdefs.h <<\EOF
18117 #define HAVE__DOSCAN 1
18118 EOF
18119 ;;
18120 esac
18121
18122 for ac_header in \
18123 unistd.h \
18124
18125 do
18126 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18127 echo "$as_me:18127: checking for $ac_header" >&5
18128 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18129 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18130   echo $ECHO_N "(cached) $ECHO_C" >&6
18131 else
18132   cat >conftest.$ac_ext <<_ACEOF
18133 #line 18133 "configure"
18134 #include "confdefs.h"
18135 #include <$ac_header>
18136 _ACEOF
18137 if { (eval echo "$as_me:18137: \"$ac_cpp conftest.$ac_ext\"") >&5
18138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18139   ac_status=$?
18140   egrep -v '^ *\+' conftest.er1 >conftest.err
18141   rm -f conftest.er1
18142   cat conftest.err >&5
18143   echo "$as_me:18143: \$? = $ac_status" >&5
18144   (exit $ac_status); } >/dev/null; then
18145   if test -s conftest.err; then
18146     ac_cpp_err=$ac_c_preproc_warn_flag
18147   else
18148     ac_cpp_err=
18149   fi
18150 else
18151   ac_cpp_err=yes
18152 fi
18153 if test -z "$ac_cpp_err"; then
18154   eval "$as_ac_Header=yes"
18155 else
18156   echo "$as_me: failed program was:" >&5
18157   cat conftest.$ac_ext >&5
18158   eval "$as_ac_Header=no"
18159 fi
18160 rm -f conftest.err conftest.$ac_ext
18161 fi
18162 echo "$as_me:18162: result: `eval echo '${'$as_ac_Header'}'`" >&5
18163 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18164 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18165   cat >>confdefs.h <<EOF
18166 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18167 EOF
18168
18169 fi
18170 done
18171
18172 echo "$as_me:18172: checking for working mkstemp" >&5
18173 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18174 if test "${cf_cv_func_mkstemp+set}" = set; then
18175   echo $ECHO_N "(cached) $ECHO_C" >&6
18176 else
18177
18178 rm -rf conftest*
18179 if test "$cross_compiling" = yes; then
18180   cf_cv_func_mkstemp=maybe
18181 else
18182   cat >conftest.$ac_ext <<_ACEOF
18183 #line 18183 "configure"
18184 #include "confdefs.h"
18185
18186 #include <sys/types.h>
18187 #ifdef HAVE_UNISTD_H
18188 #include <unistd.h>
18189 #endif
18190 #include <stdlib.h>
18191 #include <stdio.h>
18192 #include <string.h>
18193 #include <sys/stat.h>
18194 int main(void)
18195 {
18196         char *tmpl = "conftestXXXXXX";
18197         char name[2][80];
18198         int n;
18199         int result = 0;
18200         int fd;
18201         struct stat sb;
18202
18203         umask(077);
18204         for (n = 0; n < 2; ++n) {
18205                 strcpy(name[n], tmpl);
18206                 if ((fd = mkstemp(name[n])) >= 0) {
18207                         if (!strcmp(name[n], tmpl)
18208                          || stat(name[n], &sb) != 0
18209                          || (sb.st_mode & S_IFMT) != S_IFREG
18210                          || (sb.st_mode & 077) != 0) {
18211                                 result = 1;
18212                         }
18213                         close(fd);
18214                 }
18215         }
18216         if (result == 0
18217          && !strcmp(name[0], name[1]))
18218                 result = 1;
18219         ${cf_cv_main_return:-return}(result);
18220 }
18221
18222 _ACEOF
18223 rm -f conftest$ac_exeext
18224 if { (eval echo "$as_me:18224: \"$ac_link\"") >&5
18225   (eval $ac_link) 2>&5
18226   ac_status=$?
18227   echo "$as_me:18227: \$? = $ac_status" >&5
18228   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18229   { (eval echo "$as_me:18229: \"$ac_try\"") >&5
18230   (eval $ac_try) 2>&5
18231   ac_status=$?
18232   echo "$as_me:18232: \$? = $ac_status" >&5
18233   (exit $ac_status); }; }; then
18234   cf_cv_func_mkstemp=yes
18235
18236 else
18237   echo "$as_me: program exited with status $ac_status" >&5
18238 echo "$as_me: failed program was:" >&5
18239 cat conftest.$ac_ext >&5
18240 cf_cv_func_mkstemp=no
18241
18242 fi
18243 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18244 fi
18245
18246 fi
18247 echo "$as_me:18247: result: $cf_cv_func_mkstemp" >&5
18248 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18249 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18250         echo "$as_me:18250: checking for mkstemp" >&5
18251 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18252 if test "${ac_cv_func_mkstemp+set}" = set; then
18253   echo $ECHO_N "(cached) $ECHO_C" >&6
18254 else
18255   cat >conftest.$ac_ext <<_ACEOF
18256 #line 18256 "configure"
18257 #include "confdefs.h"
18258 /* System header to define __stub macros and hopefully few prototypes,
18259     which can conflict with char mkstemp (); below.  */
18260 #include <assert.h>
18261 /* Override any gcc2 internal prototype to avoid an error.  */
18262 #ifdef __cplusplus
18263 extern "C"
18264 #endif
18265 /* We use char because int might match the return type of a gcc2
18266    builtin and then its argument prototype would still apply.  */
18267 char mkstemp ();
18268 char (*f) ();
18269
18270 int
18271 main (void)
18272 {
18273 /* The GNU C library defines this for functions which it implements
18274     to always fail with ENOSYS.  Some functions are actually named
18275     something starting with __ and the normal name is an alias.  */
18276 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18277 choke me
18278 #else
18279 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18280 #endif
18281
18282   ;
18283   return 0;
18284 }
18285 _ACEOF
18286 rm -f conftest.$ac_objext conftest$ac_exeext
18287 if { (eval echo "$as_me:18287: \"$ac_link\"") >&5
18288   (eval $ac_link) 2>&5
18289   ac_status=$?
18290   echo "$as_me:18290: \$? = $ac_status" >&5
18291   (exit $ac_status); } &&
18292          { ac_try='test -s conftest$ac_exeext'
18293   { (eval echo "$as_me:18293: \"$ac_try\"") >&5
18294   (eval $ac_try) 2>&5
18295   ac_status=$?
18296   echo "$as_me:18296: \$? = $ac_status" >&5
18297   (exit $ac_status); }; }; then
18298   ac_cv_func_mkstemp=yes
18299 else
18300   echo "$as_me: failed program was:" >&5
18301 cat conftest.$ac_ext >&5
18302 ac_cv_func_mkstemp=no
18303 fi
18304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18305 fi
18306 echo "$as_me:18306: result: $ac_cv_func_mkstemp" >&5
18307 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18308
18309 fi
18310 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18311
18312 cat >>confdefs.h <<\EOF
18313 #define HAVE_MKSTEMP 1
18314 EOF
18315
18316 fi
18317
18318 # setup for prototype of fallback for vsscanf()
18319
18320 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18321         HAVE_VSSCANF=1
18322 else
18323         HAVE_VSSCANF=0
18324 fi
18325
18326 if test "x$cross_compiling" = xyes ; then
18327         { echo "$as_me:18327: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18328 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18329 else
18330         echo "$as_me:18330: checking whether setvbuf arguments are reversed" >&5
18331 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18332 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18333   echo $ECHO_N "(cached) $ECHO_C" >&6
18334 else
18335   if test "$cross_compiling" = yes; then
18336   { { echo "$as_me:18336: error: cannot run test program while cross compiling" >&5
18337 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18338    { (exit 1); exit 1; }; }
18339 else
18340   cat >conftest.$ac_ext <<_ACEOF
18341 #line 18341 "configure"
18342 #include "confdefs.h"
18343 #include <stdio.h>
18344 /* If setvbuf has the reversed format, exit 0. */
18345 int
18346 main (void)
18347 {
18348   /* This call has the arguments reversed.
18349      A reversed system may check and see that the address of main
18350      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18351   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18352     $ac_main_return(1);
18353   putc('\r', stdout);
18354   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18355 }
18356 _ACEOF
18357 rm -f conftest$ac_exeext
18358 if { (eval echo "$as_me:18358: \"$ac_link\"") >&5
18359   (eval $ac_link) 2>&5
18360   ac_status=$?
18361   echo "$as_me:18361: \$? = $ac_status" >&5
18362   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18363   { (eval echo "$as_me:18363: \"$ac_try\"") >&5
18364   (eval $ac_try) 2>&5
18365   ac_status=$?
18366   echo "$as_me:18366: \$? = $ac_status" >&5
18367   (exit $ac_status); }; }; then
18368   ac_cv_func_setvbuf_reversed=yes
18369 else
18370   echo "$as_me: program exited with status $ac_status" >&5
18371 echo "$as_me: failed program was:" >&5
18372 cat conftest.$ac_ext >&5
18373 ac_cv_func_setvbuf_reversed=no
18374 fi
18375 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18376 fi
18377 rm -f core core.* *.core
18378 fi
18379 echo "$as_me:18379: result: $ac_cv_func_setvbuf_reversed" >&5
18380 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18381 if test $ac_cv_func_setvbuf_reversed = yes; then
18382
18383 cat >>confdefs.h <<\EOF
18384 #define SETVBUF_REVERSED 1
18385 EOF
18386
18387 fi
18388
18389 fi
18390 echo "$as_me:18390: checking for intptr_t" >&5
18391 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18392 if test "${ac_cv_type_intptr_t+set}" = set; then
18393   echo $ECHO_N "(cached) $ECHO_C" >&6
18394 else
18395   cat >conftest.$ac_ext <<_ACEOF
18396 #line 18396 "configure"
18397 #include "confdefs.h"
18398 $ac_includes_default
18399 int
18400 main (void)
18401 {
18402 if ((intptr_t *) 0)
18403   return 0;
18404 if (sizeof (intptr_t))
18405   return 0;
18406   ;
18407   return 0;
18408 }
18409 _ACEOF
18410 rm -f conftest.$ac_objext
18411 if { (eval echo "$as_me:18411: \"$ac_compile\"") >&5
18412   (eval $ac_compile) 2>&5
18413   ac_status=$?
18414   echo "$as_me:18414: \$? = $ac_status" >&5
18415   (exit $ac_status); } &&
18416          { ac_try='test -s conftest.$ac_objext'
18417   { (eval echo "$as_me:18417: \"$ac_try\"") >&5
18418   (eval $ac_try) 2>&5
18419   ac_status=$?
18420   echo "$as_me:18420: \$? = $ac_status" >&5
18421   (exit $ac_status); }; }; then
18422   ac_cv_type_intptr_t=yes
18423 else
18424   echo "$as_me: failed program was:" >&5
18425 cat conftest.$ac_ext >&5
18426 ac_cv_type_intptr_t=no
18427 fi
18428 rm -f conftest.$ac_objext conftest.$ac_ext
18429 fi
18430 echo "$as_me:18430: result: $ac_cv_type_intptr_t" >&5
18431 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18432 if test $ac_cv_type_intptr_t = yes; then
18433   :
18434 else
18435
18436 cat >>confdefs.h <<EOF
18437 #define intptr_t long
18438 EOF
18439
18440 fi
18441
18442 echo "$as_me:18442: checking for ssize_t" >&5
18443 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18444 if test "${ac_cv_type_ssize_t+set}" = set; then
18445   echo $ECHO_N "(cached) $ECHO_C" >&6
18446 else
18447   cat >conftest.$ac_ext <<_ACEOF
18448 #line 18448 "configure"
18449 #include "confdefs.h"
18450 $ac_includes_default
18451 int
18452 main (void)
18453 {
18454 if ((ssize_t *) 0)
18455   return 0;
18456 if (sizeof (ssize_t))
18457   return 0;
18458   ;
18459   return 0;
18460 }
18461 _ACEOF
18462 rm -f conftest.$ac_objext
18463 if { (eval echo "$as_me:18463: \"$ac_compile\"") >&5
18464   (eval $ac_compile) 2>&5
18465   ac_status=$?
18466   echo "$as_me:18466: \$? = $ac_status" >&5
18467   (exit $ac_status); } &&
18468          { ac_try='test -s conftest.$ac_objext'
18469   { (eval echo "$as_me:18469: \"$ac_try\"") >&5
18470   (eval $ac_try) 2>&5
18471   ac_status=$?
18472   echo "$as_me:18472: \$? = $ac_status" >&5
18473   (exit $ac_status); }; }; then
18474   ac_cv_type_ssize_t=yes
18475 else
18476   echo "$as_me: failed program was:" >&5
18477 cat conftest.$ac_ext >&5
18478 ac_cv_type_ssize_t=no
18479 fi
18480 rm -f conftest.$ac_objext conftest.$ac_ext
18481 fi
18482 echo "$as_me:18482: result: $ac_cv_type_ssize_t" >&5
18483 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18484 if test $ac_cv_type_ssize_t = yes; then
18485   :
18486 else
18487
18488 cat >>confdefs.h <<EOF
18489 #define ssize_t int
18490 EOF
18491
18492 fi
18493
18494 echo "$as_me:18494: checking for type sigaction_t" >&5
18495 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18496 if test "${cf_cv_type_sigaction+set}" = set; then
18497   echo $ECHO_N "(cached) $ECHO_C" >&6
18498 else
18499
18500         cat >conftest.$ac_ext <<_ACEOF
18501 #line 18501 "configure"
18502 #include "confdefs.h"
18503
18504 #include <signal.h>
18505 int
18506 main (void)
18507 {
18508 sigaction_t x
18509   ;
18510   return 0;
18511 }
18512 _ACEOF
18513 rm -f conftest.$ac_objext
18514 if { (eval echo "$as_me:18514: \"$ac_compile\"") >&5
18515   (eval $ac_compile) 2>&5
18516   ac_status=$?
18517   echo "$as_me:18517: \$? = $ac_status" >&5
18518   (exit $ac_status); } &&
18519          { ac_try='test -s conftest.$ac_objext'
18520   { (eval echo "$as_me:18520: \"$ac_try\"") >&5
18521   (eval $ac_try) 2>&5
18522   ac_status=$?
18523   echo "$as_me:18523: \$? = $ac_status" >&5
18524   (exit $ac_status); }; }; then
18525   cf_cv_type_sigaction=yes
18526 else
18527   echo "$as_me: failed program was:" >&5
18528 cat conftest.$ac_ext >&5
18529 cf_cv_type_sigaction=no
18530 fi
18531 rm -f conftest.$ac_objext conftest.$ac_ext
18532 fi
18533
18534 echo "$as_me:18534: result: $cf_cv_type_sigaction" >&5
18535 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18536 test "$cf_cv_type_sigaction" = yes &&
18537 cat >>confdefs.h <<\EOF
18538 #define HAVE_TYPE_SIGACTION 1
18539 EOF
18540
18541 echo "$as_me:18541: checking declaration of size-change" >&5
18542 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18543 if test "${cf_cv_sizechange+set}" = set; then
18544   echo $ECHO_N "(cached) $ECHO_C" >&6
18545 else
18546
18547         cf_cv_sizechange=unknown
18548         cf_save_CPPFLAGS="$CPPFLAGS"
18549
18550 for cf_opts in "" "NEED_PTEM_H"
18551 do
18552
18553         CPPFLAGS="$cf_save_CPPFLAGS"
18554         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18555         cat >conftest.$ac_ext <<_ACEOF
18556 #line 18556 "configure"
18557 #include "confdefs.h"
18558 #include <sys/types.h>
18559 #ifdef HAVE_TERMIOS_H
18560 #include <termios.h>
18561 #else
18562 #ifdef HAVE_TERMIO_H
18563 #include <termio.h>
18564 #endif
18565 #endif
18566 #ifdef NEED_PTEM_H
18567 /* This is a workaround for SCO:  they neglected to define struct winsize in
18568  * termios.h -- it's only in termio.h and ptem.h
18569  */
18570 #include        <sys/stream.h>
18571 #include        <sys/ptem.h>
18572 #endif
18573 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18574 #include <sys/ioctl.h>
18575 #endif
18576
18577 int
18578 main (void)
18579 {
18580
18581 #ifdef TIOCGSIZE
18582         struct ttysize win;     /* FIXME: what system is this? */
18583         int y = win.ts_lines;
18584         int x = win.ts_cols;
18585 #else
18586 #ifdef TIOCGWINSZ
18587         struct winsize win;
18588         int y = win.ws_row;
18589         int x = win.ws_col;
18590 #else
18591         no TIOCGSIZE or TIOCGWINSZ
18592 #endif /* TIOCGWINSZ */
18593 #endif /* TIOCGSIZE */
18594
18595   ;
18596   return 0;
18597 }
18598 _ACEOF
18599 rm -f conftest.$ac_objext
18600 if { (eval echo "$as_me:18600: \"$ac_compile\"") >&5
18601   (eval $ac_compile) 2>&5
18602   ac_status=$?
18603   echo "$as_me:18603: \$? = $ac_status" >&5
18604   (exit $ac_status); } &&
18605          { ac_try='test -s conftest.$ac_objext'
18606   { (eval echo "$as_me:18606: \"$ac_try\"") >&5
18607   (eval $ac_try) 2>&5
18608   ac_status=$?
18609   echo "$as_me:18609: \$? = $ac_status" >&5
18610   (exit $ac_status); }; }; then
18611   cf_cv_sizechange=yes
18612 else
18613   echo "$as_me: failed program was:" >&5
18614 cat conftest.$ac_ext >&5
18615 cf_cv_sizechange=no
18616 fi
18617 rm -f conftest.$ac_objext conftest.$ac_ext
18618
18619         CPPFLAGS="$cf_save_CPPFLAGS"
18620         if test "$cf_cv_sizechange" = yes ; then
18621                 echo "size-change succeeded ($cf_opts)" >&5
18622                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18623                 break
18624         fi
18625 done
18626
18627 fi
18628 echo "$as_me:18628: result: $cf_cv_sizechange" >&5
18629 echo "${ECHO_T}$cf_cv_sizechange" >&6
18630 if test "$cf_cv_sizechange" != no ; then
18631
18632 cat >>confdefs.h <<\EOF
18633 #define HAVE_SIZECHANGE 1
18634 EOF
18635
18636         case $cf_cv_sizechange in
18637         (NEED*)
18638                 cat >>confdefs.h <<EOF
18639 #define $cf_cv_sizechange  1
18640 EOF
18641
18642                 ;;
18643         esac
18644 fi
18645
18646 echo "$as_me:18646: checking for memmove" >&5
18647 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18648 if test "${ac_cv_func_memmove+set}" = set; then
18649   echo $ECHO_N "(cached) $ECHO_C" >&6
18650 else
18651   cat >conftest.$ac_ext <<_ACEOF
18652 #line 18652 "configure"
18653 #include "confdefs.h"
18654 /* System header to define __stub macros and hopefully few prototypes,
18655     which can conflict with char memmove (); below.  */
18656 #include <assert.h>
18657 /* Override any gcc2 internal prototype to avoid an error.  */
18658 #ifdef __cplusplus
18659 extern "C"
18660 #endif
18661 /* We use char because int might match the return type of a gcc2
18662    builtin and then its argument prototype would still apply.  */
18663 char memmove ();
18664 char (*f) ();
18665
18666 int
18667 main (void)
18668 {
18669 /* The GNU C library defines this for functions which it implements
18670     to always fail with ENOSYS.  Some functions are actually named
18671     something starting with __ and the normal name is an alias.  */
18672 #if defined (__stub_memmove) || defined (__stub___memmove)
18673 choke me
18674 #else
18675 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18676 #endif
18677
18678   ;
18679   return 0;
18680 }
18681 _ACEOF
18682 rm -f conftest.$ac_objext conftest$ac_exeext
18683 if { (eval echo "$as_me:18683: \"$ac_link\"") >&5
18684   (eval $ac_link) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); } &&
18688          { ac_try='test -s conftest$ac_exeext'
18689   { (eval echo "$as_me:18689: \"$ac_try\"") >&5
18690   (eval $ac_try) 2>&5
18691   ac_status=$?
18692   echo "$as_me:18692: \$? = $ac_status" >&5
18693   (exit $ac_status); }; }; then
18694   ac_cv_func_memmove=yes
18695 else
18696   echo "$as_me: failed program was:" >&5
18697 cat conftest.$ac_ext >&5
18698 ac_cv_func_memmove=no
18699 fi
18700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18701 fi
18702 echo "$as_me:18702: result: $ac_cv_func_memmove" >&5
18703 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18704 if test $ac_cv_func_memmove = yes; then
18705   :
18706 else
18707
18708 echo "$as_me:18708: checking for bcopy" >&5
18709 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18710 if test "${ac_cv_func_bcopy+set}" = set; then
18711   echo $ECHO_N "(cached) $ECHO_C" >&6
18712 else
18713   cat >conftest.$ac_ext <<_ACEOF
18714 #line 18714 "configure"
18715 #include "confdefs.h"
18716 /* System header to define __stub macros and hopefully few prototypes,
18717     which can conflict with char bcopy (); below.  */
18718 #include <assert.h>
18719 /* Override any gcc2 internal prototype to avoid an error.  */
18720 #ifdef __cplusplus
18721 extern "C"
18722 #endif
18723 /* We use char because int might match the return type of a gcc2
18724    builtin and then its argument prototype would still apply.  */
18725 char bcopy ();
18726 char (*f) ();
18727
18728 int
18729 main (void)
18730 {
18731 /* The GNU C library defines this for functions which it implements
18732     to always fail with ENOSYS.  Some functions are actually named
18733     something starting with __ and the normal name is an alias.  */
18734 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18735 choke me
18736 #else
18737 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18738 #endif
18739
18740   ;
18741   return 0;
18742 }
18743 _ACEOF
18744 rm -f conftest.$ac_objext conftest$ac_exeext
18745 if { (eval echo "$as_me:18745: \"$ac_link\"") >&5
18746   (eval $ac_link) 2>&5
18747   ac_status=$?
18748   echo "$as_me:18748: \$? = $ac_status" >&5
18749   (exit $ac_status); } &&
18750          { ac_try='test -s conftest$ac_exeext'
18751   { (eval echo "$as_me:18751: \"$ac_try\"") >&5
18752   (eval $ac_try) 2>&5
18753   ac_status=$?
18754   echo "$as_me:18754: \$? = $ac_status" >&5
18755   (exit $ac_status); }; }; then
18756   ac_cv_func_bcopy=yes
18757 else
18758   echo "$as_me: failed program was:" >&5
18759 cat conftest.$ac_ext >&5
18760 ac_cv_func_bcopy=no
18761 fi
18762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18763 fi
18764 echo "$as_me:18764: result: $ac_cv_func_bcopy" >&5
18765 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18766 if test $ac_cv_func_bcopy = yes; then
18767
18768         echo "$as_me:18768: checking if bcopy does overlapping moves" >&5
18769 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18770 if test "${cf_cv_good_bcopy+set}" = set; then
18771   echo $ECHO_N "(cached) $ECHO_C" >&6
18772 else
18773
18774                 if test "$cross_compiling" = yes; then
18775   cf_cv_good_bcopy=unknown
18776 else
18777   cat >conftest.$ac_ext <<_ACEOF
18778 #line 18778 "configure"
18779 #include "confdefs.h"
18780
18781 int main(void) {
18782         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18783         char temp[40];
18784         bcopy(data, temp, sizeof(data));
18785         bcopy(temp+10, temp, 15);
18786         bcopy(temp+5, temp+15, 10);
18787         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18788 }
18789
18790 _ACEOF
18791 rm -f conftest$ac_exeext
18792 if { (eval echo "$as_me:18792: \"$ac_link\"") >&5
18793   (eval $ac_link) 2>&5
18794   ac_status=$?
18795   echo "$as_me:18795: \$? = $ac_status" >&5
18796   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18797   { (eval echo "$as_me:18797: \"$ac_try\"") >&5
18798   (eval $ac_try) 2>&5
18799   ac_status=$?
18800   echo "$as_me:18800: \$? = $ac_status" >&5
18801   (exit $ac_status); }; }; then
18802   cf_cv_good_bcopy=yes
18803 else
18804   echo "$as_me: program exited with status $ac_status" >&5
18805 echo "$as_me: failed program was:" >&5
18806 cat conftest.$ac_ext >&5
18807 cf_cv_good_bcopy=no
18808 fi
18809 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18810 fi
18811
18812 fi
18813 echo "$as_me:18813: result: $cf_cv_good_bcopy" >&5
18814 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18815
18816 else
18817   cf_cv_good_bcopy=no
18818 fi
18819
18820         if test "$cf_cv_good_bcopy" = yes ; then
18821
18822 cat >>confdefs.h <<\EOF
18823 #define USE_OK_BCOPY 1
18824 EOF
18825
18826         else
18827
18828 cat >>confdefs.h <<\EOF
18829 #define USE_MY_MEMMOVE 1
18830 EOF
18831
18832         fi
18833
18834 fi
18835
18836 tty 2>&1 >/dev/null || {
18837 for ac_func in posix_openpt
18838 do
18839 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18840 echo "$as_me:18840: checking for $ac_func" >&5
18841 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18842 if eval "test \"\${$as_ac_var+set}\" = set"; then
18843   echo $ECHO_N "(cached) $ECHO_C" >&6
18844 else
18845   cat >conftest.$ac_ext <<_ACEOF
18846 #line 18846 "configure"
18847 #include "confdefs.h"
18848 /* System header to define __stub macros and hopefully few prototypes,
18849     which can conflict with char $ac_func (); below.  */
18850 #include <assert.h>
18851 /* Override any gcc2 internal prototype to avoid an error.  */
18852 #ifdef __cplusplus
18853 extern "C"
18854 #endif
18855 /* We use char because int might match the return type of a gcc2
18856    builtin and then its argument prototype would still apply.  */
18857 char $ac_func ();
18858 char (*f) ();
18859
18860 int
18861 main (void)
18862 {
18863 /* The GNU C library defines this for functions which it implements
18864     to always fail with ENOSYS.  Some functions are actually named
18865     something starting with __ and the normal name is an alias.  */
18866 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18867 choke me
18868 #else
18869 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18870 #endif
18871
18872   ;
18873   return 0;
18874 }
18875 _ACEOF
18876 rm -f conftest.$ac_objext conftest$ac_exeext
18877 if { (eval echo "$as_me:18877: \"$ac_link\"") >&5
18878   (eval $ac_link) 2>&5
18879   ac_status=$?
18880   echo "$as_me:18880: \$? = $ac_status" >&5
18881   (exit $ac_status); } &&
18882          { ac_try='test -s conftest$ac_exeext'
18883   { (eval echo "$as_me:18883: \"$ac_try\"") >&5
18884   (eval $ac_try) 2>&5
18885   ac_status=$?
18886   echo "$as_me:18886: \$? = $ac_status" >&5
18887   (exit $ac_status); }; }; then
18888   eval "$as_ac_var=yes"
18889 else
18890   echo "$as_me: failed program was:" >&5
18891 cat conftest.$ac_ext >&5
18892 eval "$as_ac_var=no"
18893 fi
18894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18895 fi
18896 echo "$as_me:18896: result: `eval echo '${'$as_ac_var'}'`" >&5
18897 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18898 if test `eval echo '${'$as_ac_var'}'` = yes; then
18899   cat >>confdefs.h <<EOF
18900 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18901 EOF
18902
18903 fi
18904 done
18905  }
18906 echo "$as_me:18906: checking if poll really works" >&5
18907 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18908 if test "${cf_cv_working_poll+set}" = set; then
18909   echo $ECHO_N "(cached) $ECHO_C" >&6
18910 else
18911
18912 if test "$cross_compiling" = yes; then
18913   cf_cv_working_poll=unknown
18914 else
18915   cat >conftest.$ac_ext <<_ACEOF
18916 #line 18916 "configure"
18917 #include "confdefs.h"
18918
18919 #include <stdlib.h>
18920 #include <stdio.h>
18921 #include <unistd.h>
18922 #include <fcntl.h>
18923 #ifdef HAVE_POLL_H
18924 #include <poll.h>
18925 #else
18926 #include <sys/poll.h>
18927 #endif
18928 int main(void) {
18929         struct pollfd myfds;
18930         int ret;
18931
18932         /* check for Darwin bug with respect to "devices" */
18933         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18934         if (myfds.fd < 0)
18935                 myfds.fd = 0;
18936         myfds.events = POLLIN;
18937         myfds.revents = 0;
18938
18939         ret = poll(&myfds, 1, 100);
18940
18941         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18942                 ret = -1;
18943         } else {
18944                 int fd = 0;
18945                 if (!isatty(fd)) {
18946                         fd = open("/dev/tty", 2);       /* O_RDWR */
18947                 }
18948 #ifdef HAVE_POSIX_OPENPT
18949                 if (fd < 0) {
18950                         fd = posix_openpt(O_RDWR);
18951                 }
18952 #endif
18953
18954                 if (fd >= 0) {
18955                         /* also check with standard input */
18956                         myfds.fd = fd;
18957                         myfds.events = POLLIN;
18958                         myfds.revents = 0;
18959                         ret = poll(&myfds, 1, 100);
18960                 } else {
18961                         ret = -1;
18962                 }
18963         }
18964         ${cf_cv_main_return:-return}(ret < 0);
18965 }
18966 _ACEOF
18967 rm -f conftest$ac_exeext
18968 if { (eval echo "$as_me:18968: \"$ac_link\"") >&5
18969   (eval $ac_link) 2>&5
18970   ac_status=$?
18971   echo "$as_me:18971: \$? = $ac_status" >&5
18972   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18973   { (eval echo "$as_me:18973: \"$ac_try\"") >&5
18974   (eval $ac_try) 2>&5
18975   ac_status=$?
18976   echo "$as_me:18976: \$? = $ac_status" >&5
18977   (exit $ac_status); }; }; then
18978   cf_cv_working_poll=yes
18979 else
18980   echo "$as_me: program exited with status $ac_status" >&5
18981 echo "$as_me: failed program was:" >&5
18982 cat conftest.$ac_ext >&5
18983 cf_cv_working_poll=no
18984 fi
18985 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18986 fi
18987 fi
18988 echo "$as_me:18988: result: $cf_cv_working_poll" >&5
18989 echo "${ECHO_T}$cf_cv_working_poll" >&6
18990 test "$cf_cv_working_poll" = "yes" &&
18991 cat >>confdefs.h <<\EOF
18992 #define HAVE_WORKING_POLL 1
18993 EOF
18994
18995 echo "$as_me:18995: checking for va_copy" >&5
18996 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18997 if test "${cf_cv_have_va_copy+set}" = set; then
18998   echo $ECHO_N "(cached) $ECHO_C" >&6
18999 else
19000
19001 cat >conftest.$ac_ext <<_ACEOF
19002 #line 19002 "configure"
19003 #include "confdefs.h"
19004
19005 #include <stdarg.h>
19006
19007 int
19008 main (void)
19009 {
19010
19011         static va_list dst;
19012         static va_list src;
19013         va_copy(dst, src)
19014   ;
19015   return 0;
19016 }
19017 _ACEOF
19018 rm -f conftest.$ac_objext conftest$ac_exeext
19019 if { (eval echo "$as_me:19019: \"$ac_link\"") >&5
19020   (eval $ac_link) 2>&5
19021   ac_status=$?
19022   echo "$as_me:19022: \$? = $ac_status" >&5
19023   (exit $ac_status); } &&
19024          { ac_try='test -s conftest$ac_exeext'
19025   { (eval echo "$as_me:19025: \"$ac_try\"") >&5
19026   (eval $ac_try) 2>&5
19027   ac_status=$?
19028   echo "$as_me:19028: \$? = $ac_status" >&5
19029   (exit $ac_status); }; }; then
19030   cf_cv_have_va_copy=yes
19031 else
19032   echo "$as_me: failed program was:" >&5
19033 cat conftest.$ac_ext >&5
19034 cf_cv_have_va_copy=no
19035 fi
19036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19037 fi
19038 echo "$as_me:19038: result: $cf_cv_have_va_copy" >&5
19039 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19040
19041 test "$cf_cv_have_va_copy" = yes &&
19042 cat >>confdefs.h <<\EOF
19043 #define HAVE_VA_COPY 1
19044 EOF
19045
19046 echo "$as_me:19046: checking for __va_copy" >&5
19047 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19048 if test "${cf_cv_have___va_copy+set}" = set; then
19049   echo $ECHO_N "(cached) $ECHO_C" >&6
19050 else
19051
19052 cat >conftest.$ac_ext <<_ACEOF
19053 #line 19053 "configure"
19054 #include "confdefs.h"
19055
19056 #include <stdarg.h>
19057
19058 int
19059 main (void)
19060 {
19061
19062         static va_list dst;
19063         static va_list src;
19064         __va_copy(dst, src)
19065   ;
19066   return 0;
19067 }
19068 _ACEOF
19069 rm -f conftest.$ac_objext conftest$ac_exeext
19070 if { (eval echo "$as_me:19070: \"$ac_link\"") >&5
19071   (eval $ac_link) 2>&5
19072   ac_status=$?
19073   echo "$as_me:19073: \$? = $ac_status" >&5
19074   (exit $ac_status); } &&
19075          { ac_try='test -s conftest$ac_exeext'
19076   { (eval echo "$as_me:19076: \"$ac_try\"") >&5
19077   (eval $ac_try) 2>&5
19078   ac_status=$?
19079   echo "$as_me:19079: \$? = $ac_status" >&5
19080   (exit $ac_status); }; }; then
19081   cf_cv_have___va_copy=yes
19082 else
19083   echo "$as_me: failed program was:" >&5
19084 cat conftest.$ac_ext >&5
19085 cf_cv_have___va_copy=no
19086 fi
19087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19088 fi
19089 echo "$as_me:19089: result: $cf_cv_have___va_copy" >&5
19090 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19091
19092 test "$cf_cv_have___va_copy" = yes &&
19093 cat >>confdefs.h <<\EOF
19094 #define HAVE___VA_COPY 1
19095 EOF
19096
19097 echo "$as_me:19097: checking for pid_t" >&5
19098 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19099 if test "${ac_cv_type_pid_t+set}" = set; then
19100   echo $ECHO_N "(cached) $ECHO_C" >&6
19101 else
19102   cat >conftest.$ac_ext <<_ACEOF
19103 #line 19103 "configure"
19104 #include "confdefs.h"
19105 $ac_includes_default
19106 int
19107 main (void)
19108 {
19109 if ((pid_t *) 0)
19110   return 0;
19111 if (sizeof (pid_t))
19112   return 0;
19113   ;
19114   return 0;
19115 }
19116 _ACEOF
19117 rm -f conftest.$ac_objext
19118 if { (eval echo "$as_me:19118: \"$ac_compile\"") >&5
19119   (eval $ac_compile) 2>&5
19120   ac_status=$?
19121   echo "$as_me:19121: \$? = $ac_status" >&5
19122   (exit $ac_status); } &&
19123          { ac_try='test -s conftest.$ac_objext'
19124   { (eval echo "$as_me:19124: \"$ac_try\"") >&5
19125   (eval $ac_try) 2>&5
19126   ac_status=$?
19127   echo "$as_me:19127: \$? = $ac_status" >&5
19128   (exit $ac_status); }; }; then
19129   ac_cv_type_pid_t=yes
19130 else
19131   echo "$as_me: failed program was:" >&5
19132 cat conftest.$ac_ext >&5
19133 ac_cv_type_pid_t=no
19134 fi
19135 rm -f conftest.$ac_objext conftest.$ac_ext
19136 fi
19137 echo "$as_me:19137: result: $ac_cv_type_pid_t" >&5
19138 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19139 if test $ac_cv_type_pid_t = yes; then
19140   :
19141 else
19142
19143 cat >>confdefs.h <<EOF
19144 #define pid_t int
19145 EOF
19146
19147 fi
19148
19149 for ac_header in unistd.h vfork.h
19150 do
19151 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19152 echo "$as_me:19152: checking for $ac_header" >&5
19153 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19154 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19155   echo $ECHO_N "(cached) $ECHO_C" >&6
19156 else
19157   cat >conftest.$ac_ext <<_ACEOF
19158 #line 19158 "configure"
19159 #include "confdefs.h"
19160 #include <$ac_header>
19161 _ACEOF
19162 if { (eval echo "$as_me:19162: \"$ac_cpp conftest.$ac_ext\"") >&5
19163   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19164   ac_status=$?
19165   egrep -v '^ *\+' conftest.er1 >conftest.err
19166   rm -f conftest.er1
19167   cat conftest.err >&5
19168   echo "$as_me:19168: \$? = $ac_status" >&5
19169   (exit $ac_status); } >/dev/null; then
19170   if test -s conftest.err; then
19171     ac_cpp_err=$ac_c_preproc_warn_flag
19172   else
19173     ac_cpp_err=
19174   fi
19175 else
19176   ac_cpp_err=yes
19177 fi
19178 if test -z "$ac_cpp_err"; then
19179   eval "$as_ac_Header=yes"
19180 else
19181   echo "$as_me: failed program was:" >&5
19182   cat conftest.$ac_ext >&5
19183   eval "$as_ac_Header=no"
19184 fi
19185 rm -f conftest.err conftest.$ac_ext
19186 fi
19187 echo "$as_me:19187: result: `eval echo '${'$as_ac_Header'}'`" >&5
19188 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19189 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19190   cat >>confdefs.h <<EOF
19191 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19192 EOF
19193
19194 fi
19195 done
19196
19197 for ac_func in fork vfork
19198 do
19199 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19200 echo "$as_me:19200: checking for $ac_func" >&5
19201 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19202 if eval "test \"\${$as_ac_var+set}\" = set"; then
19203   echo $ECHO_N "(cached) $ECHO_C" >&6
19204 else
19205   cat >conftest.$ac_ext <<_ACEOF
19206 #line 19206 "configure"
19207 #include "confdefs.h"
19208 /* System header to define __stub macros and hopefully few prototypes,
19209     which can conflict with char $ac_func (); below.  */
19210 #include <assert.h>
19211 /* Override any gcc2 internal prototype to avoid an error.  */
19212 #ifdef __cplusplus
19213 extern "C"
19214 #endif
19215 /* We use char because int might match the return type of a gcc2
19216    builtin and then its argument prototype would still apply.  */
19217 char $ac_func ();
19218 char (*f) ();
19219
19220 int
19221 main (void)
19222 {
19223 /* The GNU C library defines this for functions which it implements
19224     to always fail with ENOSYS.  Some functions are actually named
19225     something starting with __ and the normal name is an alias.  */
19226 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19227 choke me
19228 #else
19229 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19230 #endif
19231
19232   ;
19233   return 0;
19234 }
19235 _ACEOF
19236 rm -f conftest.$ac_objext conftest$ac_exeext
19237 if { (eval echo "$as_me:19237: \"$ac_link\"") >&5
19238   (eval $ac_link) 2>&5
19239   ac_status=$?
19240   echo "$as_me:19240: \$? = $ac_status" >&5
19241   (exit $ac_status); } &&
19242          { ac_try='test -s conftest$ac_exeext'
19243   { (eval echo "$as_me:19243: \"$ac_try\"") >&5
19244   (eval $ac_try) 2>&5
19245   ac_status=$?
19246   echo "$as_me:19246: \$? = $ac_status" >&5
19247   (exit $ac_status); }; }; then
19248   eval "$as_ac_var=yes"
19249 else
19250   echo "$as_me: failed program was:" >&5
19251 cat conftest.$ac_ext >&5
19252 eval "$as_ac_var=no"
19253 fi
19254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19255 fi
19256 echo "$as_me:19256: result: `eval echo '${'$as_ac_var'}'`" >&5
19257 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19258 if test `eval echo '${'$as_ac_var'}'` = yes; then
19259   cat >>confdefs.h <<EOF
19260 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19261 EOF
19262
19263 fi
19264 done
19265
19266 ac_cv_func_fork_works=$ac_cv_func_fork
19267 if test "x$ac_cv_func_fork" = xyes; then
19268   echo "$as_me:19268: checking for working fork" >&5
19269 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19270 if test "${ac_cv_func_fork_works+set}" = set; then
19271   echo $ECHO_N "(cached) $ECHO_C" >&6
19272 else
19273   if test "$cross_compiling" = yes; then
19274   ac_cv_func_fork_works=cross
19275 else
19276   cat >conftest.$ac_ext <<_ACEOF
19277 /* By Rüdiger Kuhlmann. */
19278       #include <sys/types.h>
19279       #if HAVE_UNISTD_H
19280       # include <unistd.h>
19281       #endif
19282       /* Some systems only have a dummy stub for fork() */
19283       int main (void)
19284       {
19285         if (fork() < 0)
19286           $ac_main_return (1);
19287         $ac_main_return (0);
19288       }
19289 _ACEOF
19290 rm -f conftest$ac_exeext
19291 if { (eval echo "$as_me:19291: \"$ac_link\"") >&5
19292   (eval $ac_link) 2>&5
19293   ac_status=$?
19294   echo "$as_me:19294: \$? = $ac_status" >&5
19295   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19296   { (eval echo "$as_me:19296: \"$ac_try\"") >&5
19297   (eval $ac_try) 2>&5
19298   ac_status=$?
19299   echo "$as_me:19299: \$? = $ac_status" >&5
19300   (exit $ac_status); }; }; then
19301   ac_cv_func_fork_works=yes
19302 else
19303   echo "$as_me: program exited with status $ac_status" >&5
19304 echo "$as_me: failed program was:" >&5
19305 cat conftest.$ac_ext >&5
19306 ac_cv_func_fork_works=no
19307 fi
19308 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19309 fi
19310 fi
19311 echo "$as_me:19311: result: $ac_cv_func_fork_works" >&5
19312 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19313
19314 fi
19315 if test "x$ac_cv_func_fork_works" = xcross; then
19316   case $host in
19317     *-*-amigaos* | *-*-msdosdjgpp*)
19318       # Override, as these systems have only a dummy fork() stub
19319       ac_cv_func_fork_works=no
19320       ;;
19321     *)
19322       ac_cv_func_fork_works=yes
19323       ;;
19324   esac
19325   { echo "$as_me:19325: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19326 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19327 fi
19328 ac_cv_func_vfork_works=$ac_cv_func_vfork
19329 if test "x$ac_cv_func_vfork" = xyes; then
19330   echo "$as_me:19330: checking for working vfork" >&5
19331 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19332 if test "${ac_cv_func_vfork_works+set}" = set; then
19333   echo $ECHO_N "(cached) $ECHO_C" >&6
19334 else
19335   if test "$cross_compiling" = yes; then
19336   ac_cv_func_vfork_works=cross
19337 else
19338   cat >conftest.$ac_ext <<_ACEOF
19339 #line 19339 "configure"
19340 #include "confdefs.h"
19341 /* Thanks to Paul Eggert for this test.  */
19342 #include <stdio.h>
19343 #include <sys/types.h>
19344 #include <sys/stat.h>
19345 #if HAVE_UNISTD_H
19346 # include <unistd.h>
19347 #endif
19348 #if HAVE_VFORK_H
19349 # include <vfork.h>
19350 #endif
19351 /* On some sparc systems, changes by the child to local and incoming
19352    argument registers are propagated back to the parent.  The compiler
19353    is told about this with #include <vfork.h>, but some compilers
19354    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19355    static variable whose address is put into a register that is
19356    clobbered by the vfork.  */
19357 static
19358 #ifdef __cplusplus
19359 sparc_address_test (int arg)
19360 # else
19361 sparc_address_test (arg) int arg;
19362 #endif
19363 {
19364   static pid_t child;
19365   if (!child) {
19366     child = vfork ();
19367     if (child < 0) {
19368       perror ("vfork");
19369       _exit(2);
19370     }
19371     if (!child) {
19372       arg = getpid();
19373       write(-1, "", 0);
19374       _exit (arg);
19375     }
19376   }
19377 }
19378
19379 int
19380 main (void)
19381 {
19382   pid_t parent = getpid ();
19383   pid_t child;
19384
19385   sparc_address_test ();
19386
19387   child = vfork ();
19388
19389   if (child == 0) {
19390     /* Here is another test for sparc vfork register problems.  This
19391        test uses lots of local variables, at least as many local
19392        variables as main has allocated so far including compiler
19393        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19394        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19395        reuse the register of parent for one of the local variables,
19396        since it will think that parent can't possibly be used any more
19397        in this routine.  Assigning to the local variable will thus
19398        munge parent in the parent process.  */
19399     pid_t
19400       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19401       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19402     /* Convince the compiler that p..p7 are live; otherwise, it might
19403        use the same hardware register for all 8 local variables.  */
19404     if (p != p1 || p != p2 || p != p3 || p != p4
19405         || p != p5 || p != p6 || p != p7)
19406       _exit(1);
19407
19408     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19409        from child file descriptors.  If the child closes a descriptor
19410        before it execs or exits, this munges the parent's descriptor
19411        as well.  Test for this by closing stdout in the child.  */
19412     _exit(close(fileno(stdout)) != 0);
19413   } else {
19414     int status;
19415     struct stat st;
19416
19417     while (wait(&status) != child)
19418       ;
19419     $ac_main_return(
19420          /* Was there some problem with vforking?  */
19421          child < 0
19422
19423          /* Did the child fail?  (This shouldn't happen.)  */
19424          || status
19425
19426          /* Did the vfork/compiler bug occur?  */
19427          || parent != getpid()
19428
19429          /* Did the file descriptor bug occur?  */
19430          || fstat(fileno(stdout), &st) != 0
19431          );
19432   }
19433 }
19434 _ACEOF
19435 rm -f conftest$ac_exeext
19436 if { (eval echo "$as_me:19436: \"$ac_link\"") >&5
19437   (eval $ac_link) 2>&5
19438   ac_status=$?
19439   echo "$as_me:19439: \$? = $ac_status" >&5
19440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19441   { (eval echo "$as_me:19441: \"$ac_try\"") >&5
19442   (eval $ac_try) 2>&5
19443   ac_status=$?
19444   echo "$as_me:19444: \$? = $ac_status" >&5
19445   (exit $ac_status); }; }; then
19446   ac_cv_func_vfork_works=yes
19447 else
19448   echo "$as_me: program exited with status $ac_status" >&5
19449 echo "$as_me: failed program was:" >&5
19450 cat conftest.$ac_ext >&5
19451 ac_cv_func_vfork_works=no
19452 fi
19453 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19454 fi
19455 fi
19456 echo "$as_me:19456: result: $ac_cv_func_vfork_works" >&5
19457 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19458
19459 fi;
19460 if test "x$ac_cv_func_fork_works" = xcross; then
19461   ac_cv_func_vfork_works=ac_cv_func_vfork
19462   { echo "$as_me:19462: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19463 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19464 fi
19465
19466 if test "x$ac_cv_func_vfork_works" = xyes; then
19467
19468 cat >>confdefs.h <<\EOF
19469 #define HAVE_WORKING_VFORK 1
19470 EOF
19471
19472 else
19473
19474 cat >>confdefs.h <<\EOF
19475 #define vfork fork
19476 EOF
19477
19478 fi
19479 if test "x$ac_cv_func_fork_works" = xyes; then
19480
19481 cat >>confdefs.h <<\EOF
19482 #define HAVE_WORKING_FORK 1
19483 EOF
19484
19485 fi
19486
19487 # special check for test/ditto.c
19488
19489 echo "$as_me:19489: checking for openpty in -lutil" >&5
19490 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19491 if test "${ac_cv_lib_util_openpty+set}" = set; then
19492   echo $ECHO_N "(cached) $ECHO_C" >&6
19493 else
19494   ac_check_lib_save_LIBS=$LIBS
19495 LIBS="-lutil  $LIBS"
19496 cat >conftest.$ac_ext <<_ACEOF
19497 #line 19497 "configure"
19498 #include "confdefs.h"
19499
19500 /* Override any gcc2 internal prototype to avoid an error.  */
19501 #ifdef __cplusplus
19502 extern "C"
19503 #endif
19504 /* We use char because int might match the return type of a gcc2
19505    builtin and then its argument prototype would still apply.  */
19506 char openpty ();
19507 int
19508 main (void)
19509 {
19510 openpty ();
19511   ;
19512   return 0;
19513 }
19514 _ACEOF
19515 rm -f conftest.$ac_objext conftest$ac_exeext
19516 if { (eval echo "$as_me:19516: \"$ac_link\"") >&5
19517   (eval $ac_link) 2>&5
19518   ac_status=$?
19519   echo "$as_me:19519: \$? = $ac_status" >&5
19520   (exit $ac_status); } &&
19521          { ac_try='test -s conftest$ac_exeext'
19522   { (eval echo "$as_me:19522: \"$ac_try\"") >&5
19523   (eval $ac_try) 2>&5
19524   ac_status=$?
19525   echo "$as_me:19525: \$? = $ac_status" >&5
19526   (exit $ac_status); }; }; then
19527   ac_cv_lib_util_openpty=yes
19528 else
19529   echo "$as_me: failed program was:" >&5
19530 cat conftest.$ac_ext >&5
19531 ac_cv_lib_util_openpty=no
19532 fi
19533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19534 LIBS=$ac_check_lib_save_LIBS
19535 fi
19536 echo "$as_me:19536: result: $ac_cv_lib_util_openpty" >&5
19537 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19538 if test $ac_cv_lib_util_openpty = yes; then
19539   cf_cv_lib_util=yes
19540 else
19541   cf_cv_lib_util=no
19542 fi
19543
19544 echo "$as_me:19544: checking for openpty header" >&5
19545 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19546 if test "${cf_cv_func_openpty+set}" = set; then
19547   echo $ECHO_N "(cached) $ECHO_C" >&6
19548 else
19549
19550         cf_save_LIBS="$LIBS"
19551         test $cf_cv_lib_util = yes && {
19552 cf_add_libs="-lutil"
19553 # Filter out duplicates - this happens with badly-designed ".pc" files...
19554 for cf_add_1lib in $LIBS
19555 do
19556         for cf_add_2lib in $cf_add_libs
19557         do
19558                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19559                 then
19560                         cf_add_1lib=
19561                         break
19562                 fi
19563         done
19564         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19565 done
19566 LIBS="$cf_add_libs"
19567  }
19568         for cf_header in pty.h libutil.h util.h
19569         do
19570         cat >conftest.$ac_ext <<_ACEOF
19571 #line 19571 "configure"
19572 #include "confdefs.h"
19573
19574 #include <$cf_header>
19575
19576 int
19577 main (void)
19578 {
19579
19580         int x = openpty((int *)0, (int *)0, (char *)0,
19581                                    (struct termios *)0, (struct winsize *)0);
19582
19583   ;
19584   return 0;
19585 }
19586 _ACEOF
19587 rm -f conftest.$ac_objext conftest$ac_exeext
19588 if { (eval echo "$as_me:19588: \"$ac_link\"") >&5
19589   (eval $ac_link) 2>&5
19590   ac_status=$?
19591   echo "$as_me:19591: \$? = $ac_status" >&5
19592   (exit $ac_status); } &&
19593          { ac_try='test -s conftest$ac_exeext'
19594   { (eval echo "$as_me:19594: \"$ac_try\"") >&5
19595   (eval $ac_try) 2>&5
19596   ac_status=$?
19597   echo "$as_me:19597: \$? = $ac_status" >&5
19598   (exit $ac_status); }; }; then
19599
19600                 cf_cv_func_openpty=$cf_header
19601                 break
19602
19603 else
19604   echo "$as_me: failed program was:" >&5
19605 cat conftest.$ac_ext >&5
19606
19607                 cf_cv_func_openpty=no
19608
19609 fi
19610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19611         done
19612         LIBS="$cf_save_LIBS"
19613
19614 fi
19615 echo "$as_me:19615: result: $cf_cv_func_openpty" >&5
19616 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19617
19618 if test "$cf_cv_func_openpty" != no ; then
19619
19620 cat >>confdefs.h <<EOF
19621 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19622 EOF
19623
19624 cat >>confdefs.h <<\EOF
19625 #define USE_XTERM_PTY 1
19626 EOF
19627
19628         if test "x$cf_cv_lib_util" = xyes ; then
19629
19630 cf_add_libs="-lutil"
19631 # Filter out duplicates - this happens with badly-designed ".pc" files...
19632 for cf_add_1lib in $TEST_LIBS
19633 do
19634         for cf_add_2lib in $cf_add_libs
19635         do
19636                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19637                 then
19638                         cf_add_1lib=
19639                         break
19640                 fi
19641         done
19642         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19643 done
19644 TEST_LIBS="$cf_add_libs"
19645
19646         fi
19647 fi
19648
19649 if test "$with_hashed_db" != no ; then
19650
19651 cat >>confdefs.h <<\EOF
19652 #define USE_HASHED_DB 1
19653 EOF
19654
19655 case $with_hashed_db in
19656 (yes|*able*)
19657         ;;
19658 (*)
19659         if test -d "$with_hashed_db" ; then
19660
19661 if test -n "$with_hashed_db/include" ; then
19662   for cf_add_incdir in $with_hashed_db/include
19663   do
19664         while test $cf_add_incdir != /usr/include
19665         do
19666           if test -d $cf_add_incdir
19667           then
19668                 cf_have_incdir=no
19669                 if test -n "$CFLAGS$CPPFLAGS" ; then
19670                   # a loop is needed to ensure we can add subdirs of existing dirs
19671                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19672                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19673                           cf_have_incdir=yes; break
19674                         fi
19675                   done
19676                 fi
19677
19678                 if test "$cf_have_incdir" = no ; then
19679                   if test "$cf_add_incdir" = /usr/local/include ; then
19680                         if test "$GCC" = yes
19681                         then
19682                           cf_save_CPPFLAGS=$CPPFLAGS
19683                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19684                           cat >conftest.$ac_ext <<_ACEOF
19685 #line 19685 "configure"
19686 #include "confdefs.h"
19687 #include <stdio.h>
19688 int
19689 main (void)
19690 {
19691 printf("Hello")
19692   ;
19693   return 0;
19694 }
19695 _ACEOF
19696 rm -f conftest.$ac_objext
19697 if { (eval echo "$as_me:19697: \"$ac_compile\"") >&5
19698   (eval $ac_compile) 2>&5
19699   ac_status=$?
19700   echo "$as_me:19700: \$? = $ac_status" >&5
19701   (exit $ac_status); } &&
19702          { ac_try='test -s conftest.$ac_objext'
19703   { (eval echo "$as_me:19703: \"$ac_try\"") >&5
19704   (eval $ac_try) 2>&5
19705   ac_status=$?
19706   echo "$as_me:19706: \$? = $ac_status" >&5
19707   (exit $ac_status); }; }; then
19708   :
19709 else
19710   echo "$as_me: failed program was:" >&5
19711 cat conftest.$ac_ext >&5
19712 cf_have_incdir=yes
19713 fi
19714 rm -f conftest.$ac_objext conftest.$ac_ext
19715                           CPPFLAGS=$cf_save_CPPFLAGS
19716                         fi
19717                   fi
19718                 fi
19719
19720                 if test "$cf_have_incdir" = no ; then
19721                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19722
19723 echo "${as_me:-configure}:19723: testing adding $cf_add_incdir to include-path ..." 1>&5
19724
19725                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19726
19727                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19728                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19729                   cf_add_incdir="$cf_top_incdir"
19730                 else
19731                   break
19732                 fi
19733           else
19734                 break
19735           fi
19736         done
19737   done
19738 fi
19739
19740 if test -n "$with_hashed_db/lib" ; then
19741         for cf_add_libdir in $with_hashed_db/lib
19742         do
19743                 if test $cf_add_libdir = /usr/lib ; then
19744                         :
19745                 elif test -d $cf_add_libdir
19746                 then
19747                         cf_have_libdir=no
19748                         if test -n "$LDFLAGS$LIBS" ; then
19749                                 # a loop is needed to ensure we can add subdirs of existing dirs
19750                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19751                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19752                                                 cf_have_libdir=yes; break
19753                                         fi
19754                                 done
19755                         fi
19756                         if test "$cf_have_libdir" = no ; then
19757                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19758
19759 echo "${as_me:-configure}:19759: testing adding $cf_add_libdir to library-path ..." 1>&5
19760
19761                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19762                         fi
19763                 fi
19764         done
19765 fi
19766
19767         else
19768                 case "$with_hashed_db" in
19769                 (./*|../*|/*)
19770                         { echo "$as_me:19770: WARNING: no such directory $with_hashed_db" >&5
19771 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19772                         ;;
19773                 (*)
19774
19775 cf_search=
19776
19777 test "x$prefix" != "xNONE" && \
19778 test -d "$prefix" && \
19779  {
19780         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19781         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19782         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19783         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19784         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19785         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19786 }
19787
19788 for cf_subdir_prefix in \
19789         /usr \
19790         /usr/local \
19791         /usr/pkg \
19792         /opt \
19793         /opt/local \
19794         $HOME
19795 do
19796
19797 test "x$cf_subdir_prefix" != "x$prefix" && \
19798 test -d "$cf_subdir_prefix" && \
19799 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19800         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19801         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19802         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19803         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19804         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19805         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"
19806 }
19807
19808 done
19809
19810         for cf_item in $cf_search
19811         do
19812                 case $cf_item in
19813                 (*/$with_hashed_db)
19814
19815 if test -n "$cf_item" ; then
19816   for cf_add_incdir in $cf_item
19817   do
19818         while test $cf_add_incdir != /usr/include
19819         do
19820           if test -d $cf_add_incdir
19821           then
19822                 cf_have_incdir=no
19823                 if test -n "$CFLAGS$CPPFLAGS" ; then
19824                   # a loop is needed to ensure we can add subdirs of existing dirs
19825                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19826                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19827                           cf_have_incdir=yes; break
19828                         fi
19829                   done
19830                 fi
19831
19832                 if test "$cf_have_incdir" = no ; then
19833                   if test "$cf_add_incdir" = /usr/local/include ; then
19834                         if test "$GCC" = yes
19835                         then
19836                           cf_save_CPPFLAGS=$CPPFLAGS
19837                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19838                           cat >conftest.$ac_ext <<_ACEOF
19839 #line 19839 "configure"
19840 #include "confdefs.h"
19841 #include <stdio.h>
19842 int
19843 main (void)
19844 {
19845 printf("Hello")
19846   ;
19847   return 0;
19848 }
19849 _ACEOF
19850 rm -f conftest.$ac_objext
19851 if { (eval echo "$as_me:19851: \"$ac_compile\"") >&5
19852   (eval $ac_compile) 2>&5
19853   ac_status=$?
19854   echo "$as_me:19854: \$? = $ac_status" >&5
19855   (exit $ac_status); } &&
19856          { ac_try='test -s conftest.$ac_objext'
19857   { (eval echo "$as_me:19857: \"$ac_try\"") >&5
19858   (eval $ac_try) 2>&5
19859   ac_status=$?
19860   echo "$as_me:19860: \$? = $ac_status" >&5
19861   (exit $ac_status); }; }; then
19862   :
19863 else
19864   echo "$as_me: failed program was:" >&5
19865 cat conftest.$ac_ext >&5
19866 cf_have_incdir=yes
19867 fi
19868 rm -f conftest.$ac_objext conftest.$ac_ext
19869                           CPPFLAGS=$cf_save_CPPFLAGS
19870                         fi
19871                   fi
19872                 fi
19873
19874                 if test "$cf_have_incdir" = no ; then
19875                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19876
19877 echo "${as_me:-configure}:19877: testing adding $cf_add_incdir to include-path ..." 1>&5
19878
19879                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19880
19881                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19882                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19883                   cf_add_incdir="$cf_top_incdir"
19884                 else
19885                   break
19886                 fi
19887           else
19888                 break
19889           fi
19890         done
19891   done
19892 fi
19893
19894                         ;;
19895                 esac
19896         done
19897
19898 cf_search=
19899
19900 test "x$prefix" != "xNONE" && \
19901 test -d "$prefix" && \
19902  {
19903         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19904         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19905         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19906         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19907         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19908         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19909 }
19910
19911 for cf_subdir_prefix in \
19912         /usr \
19913         /usr/local \
19914         /usr/pkg \
19915         /opt \
19916         /opt/local \
19917         $HOME
19918 do
19919
19920 test "x$cf_subdir_prefix" != "x$prefix" && \
19921 test -d "$cf_subdir_prefix" && \
19922 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19923         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19924         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19925         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19926         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19927         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19928         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"
19929 }
19930
19931 done
19932
19933         for cf_item in $cf_search
19934         do
19935                 case $cf_item in
19936                 (*/$with_hashed_db)
19937
19938 if test -n "$cf_item" ; then
19939         for cf_add_libdir in $cf_item
19940         do
19941                 if test $cf_add_libdir = /usr/lib ; then
19942                         :
19943                 elif test -d $cf_add_libdir
19944                 then
19945                         cf_have_libdir=no
19946                         if test -n "$LDFLAGS$LIBS" ; then
19947                                 # a loop is needed to ensure we can add subdirs of existing dirs
19948                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19949                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19950                                                 cf_have_libdir=yes; break
19951                                         fi
19952                                 done
19953                         fi
19954                         if test "$cf_have_libdir" = no ; then
19955                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19956
19957 echo "${as_me:-configure}:19957: testing adding $cf_add_libdir to library-path ..." 1>&5
19958
19959                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19960                         fi
19961                 fi
19962         done
19963 fi
19964
19965                         ;;
19966                 esac
19967         done
19968
19969                         ;;
19970                 esac
19971         fi
19972 esac
19973
19974 echo "$as_me:19974: checking for db.h" >&5
19975 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19976 if test "${ac_cv_header_db_h+set}" = set; then
19977   echo $ECHO_N "(cached) $ECHO_C" >&6
19978 else
19979   cat >conftest.$ac_ext <<_ACEOF
19980 #line 19980 "configure"
19981 #include "confdefs.h"
19982 #include <db.h>
19983 _ACEOF
19984 if { (eval echo "$as_me:19984: \"$ac_cpp conftest.$ac_ext\"") >&5
19985   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19986   ac_status=$?
19987   egrep -v '^ *\+' conftest.er1 >conftest.err
19988   rm -f conftest.er1
19989   cat conftest.err >&5
19990   echo "$as_me:19990: \$? = $ac_status" >&5
19991   (exit $ac_status); } >/dev/null; then
19992   if test -s conftest.err; then
19993     ac_cpp_err=$ac_c_preproc_warn_flag
19994   else
19995     ac_cpp_err=
19996   fi
19997 else
19998   ac_cpp_err=yes
19999 fi
20000 if test -z "$ac_cpp_err"; then
20001   ac_cv_header_db_h=yes
20002 else
20003   echo "$as_me: failed program was:" >&5
20004   cat conftest.$ac_ext >&5
20005   ac_cv_header_db_h=no
20006 fi
20007 rm -f conftest.err conftest.$ac_ext
20008 fi
20009 echo "$as_me:20009: result: $ac_cv_header_db_h" >&5
20010 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20011 if test $ac_cv_header_db_h = yes; then
20012
20013 echo "$as_me:20013: checking for version of db" >&5
20014 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20015 if test "${cf_cv_hashed_db_version+set}" = set; then
20016   echo $ECHO_N "(cached) $ECHO_C" >&6
20017 else
20018
20019 cf_cv_hashed_db_version=unknown
20020
20021 for cf_db_version in 1 2 3 4 5 6
20022 do
20023
20024 echo "${as_me:-configure}:20024: testing checking for db version $cf_db_version ..." 1>&5
20025
20026         cat >conftest.$ac_ext <<_ACEOF
20027 #line 20027 "configure"
20028 #include "confdefs.h"
20029
20030 $ac_includes_default
20031 #include <db.h>
20032
20033 #ifdef DB_VERSION_MAJOR
20034         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20035 #if $cf_db_version == DB_VERSION_MAJOR
20036         /* ok */
20037 #else
20038         make an error
20039 #endif
20040 #else
20041 #if $cf_db_version == 1
20042         /* ok: assuming this is DB 1.8.5 */
20043 #else
20044         make an error
20045 #endif
20046 #endif
20047
20048 int
20049 main (void)
20050 {
20051 DBT *foo = 0
20052   ;
20053   return 0;
20054 }
20055 _ACEOF
20056 rm -f conftest.$ac_objext
20057 if { (eval echo "$as_me:20057: \"$ac_compile\"") >&5
20058   (eval $ac_compile) 2>&5
20059   ac_status=$?
20060   echo "$as_me:20060: \$? = $ac_status" >&5
20061   (exit $ac_status); } &&
20062          { ac_try='test -s conftest.$ac_objext'
20063   { (eval echo "$as_me:20063: \"$ac_try\"") >&5
20064   (eval $ac_try) 2>&5
20065   ac_status=$?
20066   echo "$as_me:20066: \$? = $ac_status" >&5
20067   (exit $ac_status); }; }; then
20068
20069         cf_cv_hashed_db_version=$cf_db_version
20070         break
20071
20072 else
20073   echo "$as_me: failed program was:" >&5
20074 cat conftest.$ac_ext >&5
20075 fi
20076 rm -f conftest.$ac_objext conftest.$ac_ext
20077 done
20078
20079 fi
20080 echo "$as_me:20080: result: $cf_cv_hashed_db_version" >&5
20081 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20082
20083 if test "$cf_cv_hashed_db_version" = unknown ; then
20084         { { echo "$as_me:20084: error: Cannot determine version of db" >&5
20085 echo "$as_me: error: Cannot determine version of db" >&2;}
20086    { (exit 1); exit 1; }; }
20087 else
20088
20089 echo "$as_me:20089: checking for db libraries" >&5
20090 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20091 if test "${cf_cv_hashed_db_libs+set}" = set; then
20092   echo $ECHO_N "(cached) $ECHO_C" >&6
20093 else
20094
20095 cf_cv_hashed_db_libs=unknown
20096 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20097 do
20098         cf_save_libs="$LIBS"
20099         if test -n "$cf_db_libs"; then
20100
20101 cf_add_libs="-l$cf_db_libs"
20102 # Filter out duplicates - this happens with badly-designed ".pc" files...
20103 for cf_add_1lib in $LIBS
20104 do
20105         for cf_add_2lib in $cf_add_libs
20106         do
20107                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20108                 then
20109                         cf_add_1lib=
20110                         break
20111                 fi
20112         done
20113         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20114 done
20115 LIBS="$cf_add_libs"
20116
20117         fi
20118
20119 echo "${as_me:-configure}:20119: testing checking for library "$cf_db_libs" ..." 1>&5
20120
20121         cat >conftest.$ac_ext <<_ACEOF
20122 #line 20122 "configure"
20123 #include "confdefs.h"
20124
20125 $ac_includes_default
20126 #include <db.h>
20127
20128 int
20129 main (void)
20130 {
20131
20132         char *path = "/tmp/foo";
20133 #ifdef DB_VERSION_MAJOR
20134 #if DB_VERSION_MAJOR >= 4
20135         DB *result = 0;
20136         db_create(&result, NULL, 0);
20137         result->open(result,
20138                 NULL,
20139                 path,
20140                 path,
20141                 DB_HASH,
20142                 DB_CREATE,
20143                 0644);
20144 #elif DB_VERSION_MAJOR >= 3
20145         DB *result = 0;
20146         db_create(&result, NULL, 0);
20147         result->open(result,
20148                 path,
20149                 path,
20150                 DB_HASH,
20151                 DB_CREATE,
20152                 0644);
20153 #elif DB_VERSION_MAJOR >= 2
20154         DB *result = 0;
20155         db_open(path,
20156                 DB_HASH,
20157                 DB_CREATE,
20158                 0644,
20159                 (DB_ENV *) 0,
20160                 (DB_INFO *) 0,
20161                 &result);
20162 #endif /* DB_VERSION_MAJOR */
20163 #else
20164         DB *result = dbopen(path,
20165                      2,
20166                      0644,
20167                      DB_HASH,
20168                      0);
20169 #endif
20170         ${cf_cv_main_return:-return}(result != 0)
20171
20172   ;
20173   return 0;
20174 }
20175 _ACEOF
20176 rm -f conftest.$ac_objext conftest$ac_exeext
20177 if { (eval echo "$as_me:20177: \"$ac_link\"") >&5
20178   (eval $ac_link) 2>&5
20179   ac_status=$?
20180   echo "$as_me:20180: \$? = $ac_status" >&5
20181   (exit $ac_status); } &&
20182          { ac_try='test -s conftest$ac_exeext'
20183   { (eval echo "$as_me:20183: \"$ac_try\"") >&5
20184   (eval $ac_try) 2>&5
20185   ac_status=$?
20186   echo "$as_me:20186: \$? = $ac_status" >&5
20187   (exit $ac_status); }; }; then
20188
20189         if test -n "$cf_db_libs" ; then
20190                 cf_cv_hashed_db_libs=$cf_db_libs
20191         else
20192                 cf_cv_hashed_db_libs=default
20193         fi
20194         LIBS="$cf_save_libs"
20195         break
20196
20197 else
20198   echo "$as_me: failed program was:" >&5
20199 cat conftest.$ac_ext >&5
20200 fi
20201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20202         LIBS="$cf_save_libs"
20203 done
20204
20205 fi
20206 echo "$as_me:20206: result: $cf_cv_hashed_db_libs" >&5
20207 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20208
20209         if test "$cf_cv_hashed_db_libs" = unknown ; then
20210                 { { echo "$as_me:20210: error: Cannot determine library for db" >&5
20211 echo "$as_me: error: Cannot determine library for db" >&2;}
20212    { (exit 1); exit 1; }; }
20213         elif test "$cf_cv_hashed_db_libs" != default ; then
20214
20215 cf_add_libs="-l$cf_cv_hashed_db_libs"
20216 # Filter out duplicates - this happens with badly-designed ".pc" files...
20217 for cf_add_1lib in $LIBS
20218 do
20219         for cf_add_2lib in $cf_add_libs
20220         do
20221                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20222                 then
20223                         cf_add_1lib=
20224                         break
20225                 fi
20226         done
20227         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20228 done
20229 LIBS="$cf_add_libs"
20230
20231         fi
20232 fi
20233
20234 else
20235
20236         { { echo "$as_me:20236: error: Cannot find db.h" >&5
20237 echo "$as_me: error: Cannot find db.h" >&2;}
20238    { (exit 1); exit 1; }; }
20239
20240 fi
20241
20242 fi
20243
20244 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20245         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20246         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20247 fi
20248
20249 # Just in case, check if the C compiler has a bool type.
20250
20251 echo "$as_me:20251: checking if we should include stdbool.h" >&5
20252 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20253
20254 if test "${cf_cv_header_stdbool_h+set}" = set; then
20255   echo $ECHO_N "(cached) $ECHO_C" >&6
20256 else
20257
20258         cat >conftest.$ac_ext <<_ACEOF
20259 #line 20259 "configure"
20260 #include "confdefs.h"
20261
20262 int
20263 main (void)
20264 {
20265 bool foo = false
20266   ;
20267   return 0;
20268 }
20269 _ACEOF
20270 rm -f conftest.$ac_objext
20271 if { (eval echo "$as_me:20271: \"$ac_compile\"") >&5
20272   (eval $ac_compile) 2>&5
20273   ac_status=$?
20274   echo "$as_me:20274: \$? = $ac_status" >&5
20275   (exit $ac_status); } &&
20276          { ac_try='test -s conftest.$ac_objext'
20277   { (eval echo "$as_me:20277: \"$ac_try\"") >&5
20278   (eval $ac_try) 2>&5
20279   ac_status=$?
20280   echo "$as_me:20280: \$? = $ac_status" >&5
20281   (exit $ac_status); }; }; then
20282   cf_cv_header_stdbool_h=0
20283 else
20284   echo "$as_me: failed program was:" >&5
20285 cat conftest.$ac_ext >&5
20286 cat >conftest.$ac_ext <<_ACEOF
20287 #line 20287 "configure"
20288 #include "confdefs.h"
20289
20290 #ifndef __BEOS__
20291 #include <stdbool.h>
20292 #endif
20293
20294 int
20295 main (void)
20296 {
20297 bool foo = false
20298   ;
20299   return 0;
20300 }
20301 _ACEOF
20302 rm -f conftest.$ac_objext
20303 if { (eval echo "$as_me:20303: \"$ac_compile\"") >&5
20304   (eval $ac_compile) 2>&5
20305   ac_status=$?
20306   echo "$as_me:20306: \$? = $ac_status" >&5
20307   (exit $ac_status); } &&
20308          { ac_try='test -s conftest.$ac_objext'
20309   { (eval echo "$as_me:20309: \"$ac_try\"") >&5
20310   (eval $ac_try) 2>&5
20311   ac_status=$?
20312   echo "$as_me:20312: \$? = $ac_status" >&5
20313   (exit $ac_status); }; }; then
20314   cf_cv_header_stdbool_h=1
20315 else
20316   echo "$as_me: failed program was:" >&5
20317 cat conftest.$ac_ext >&5
20318 cf_cv_header_stdbool_h=0
20319 fi
20320 rm -f conftest.$ac_objext conftest.$ac_ext
20321 fi
20322 rm -f conftest.$ac_objext conftest.$ac_ext
20323 fi
20324
20325 if test "$cf_cv_header_stdbool_h" = 1
20326 then    echo "$as_me:20326: result: yes" >&5
20327 echo "${ECHO_T}yes" >&6
20328 else    echo "$as_me:20328: result: no" >&5
20329 echo "${ECHO_T}no" >&6
20330 fi
20331
20332 echo "$as_me:20332: checking for builtin bool type" >&5
20333 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20334
20335 if test "${cf_cv_cc_bool_type+set}" = set; then
20336   echo $ECHO_N "(cached) $ECHO_C" >&6
20337 else
20338
20339         cat >conftest.$ac_ext <<_ACEOF
20340 #line 20340 "configure"
20341 #include "confdefs.h"
20342
20343 #include <stdio.h>
20344 #include <sys/types.h>
20345
20346 int
20347 main (void)
20348 {
20349 bool x = false
20350   ;
20351   return 0;
20352 }
20353 _ACEOF
20354 rm -f conftest.$ac_objext
20355 if { (eval echo "$as_me:20355: \"$ac_compile\"") >&5
20356   (eval $ac_compile) 2>&5
20357   ac_status=$?
20358   echo "$as_me:20358: \$? = $ac_status" >&5
20359   (exit $ac_status); } &&
20360          { ac_try='test -s conftest.$ac_objext'
20361   { (eval echo "$as_me:20361: \"$ac_try\"") >&5
20362   (eval $ac_try) 2>&5
20363   ac_status=$?
20364   echo "$as_me:20364: \$? = $ac_status" >&5
20365   (exit $ac_status); }; }; then
20366   cf_cv_cc_bool_type=1
20367 else
20368   echo "$as_me: failed program was:" >&5
20369 cat conftest.$ac_ext >&5
20370 cf_cv_cc_bool_type=0
20371 fi
20372 rm -f conftest.$ac_objext conftest.$ac_ext
20373
20374 fi
20375
20376 if test "$cf_cv_cc_bool_type" = 1
20377 then    echo "$as_me:20377: result: yes" >&5
20378 echo "${ECHO_T}yes" >&6
20379 else    echo "$as_me:20379: result: no" >&5
20380 echo "${ECHO_T}no" >&6
20381 fi
20382
20383 # Check for C++ compiler characteristics (and ensure that it's there!)
20384 if test -n "$CXX" ; then
20385         ac_ext=cc
20386 ac_cpp='$CXXCPP $CPPFLAGS'
20387 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20388 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20389 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20390 ac_main_return=return
20391
20392 if test -n "$GXX" ; then
20393
20394         cf_save="$LIBS"
20395         LIBS="$LIBS $CXXLIBS"
20396         echo "$as_me:20396: checking if we already have C++ library" >&5
20397 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20398         cat >conftest.$ac_ext <<_ACEOF
20399 #line 20399 "configure"
20400 #include "confdefs.h"
20401
20402                         #include <iostream>
20403 int
20404 main (void)
20405 {
20406
20407                         std::cout << "Hello World!" << std::endl;
20408   ;
20409   return 0;
20410 }
20411 _ACEOF
20412 rm -f conftest.$ac_objext conftest$ac_exeext
20413 if { (eval echo "$as_me:20413: \"$ac_link\"") >&5
20414   (eval $ac_link) 2>&5
20415   ac_status=$?
20416   echo "$as_me:20416: \$? = $ac_status" >&5
20417   (exit $ac_status); } &&
20418          { ac_try='test -s conftest$ac_exeext'
20419   { (eval echo "$as_me:20419: \"$ac_try\"") >&5
20420   (eval $ac_try) 2>&5
20421   ac_status=$?
20422   echo "$as_me:20422: \$? = $ac_status" >&5
20423   (exit $ac_status); }; }; then
20424   cf_have_libstdcpp=yes
20425 else
20426   echo "$as_me: failed program was:" >&5
20427 cat conftest.$ac_ext >&5
20428 cf_have_libstdcpp=no
20429 fi
20430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20431         echo "$as_me:20431: result: $cf_have_libstdcpp" >&5
20432 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20433         LIBS="$cf_save"
20434
20435         if test $cf_have_libstdcpp != yes
20436         then
20437                 case $cf_cv_system_name in
20438                 (os2*)
20439                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20440                                 cf_stdcpp_libname=stdcpp
20441                         else
20442                                 cf_stdcpp_libname=stdc++
20443                         fi
20444                         ;;
20445                 (*)
20446                         cf_stdcpp_libname=stdc++
20447                         ;;
20448                 esac
20449
20450                 echo "$as_me:20450: checking for library $cf_stdcpp_libname" >&5
20451 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20452 if test "${cf_cv_libstdcpp+set}" = set; then
20453   echo $ECHO_N "(cached) $ECHO_C" >&6
20454 else
20455
20456                         cf_save="$LIBS"
20457                         LIBS="$LIBS $CXXLIBS"
20458
20459 cf_add_libs="-l$cf_stdcpp_libname"
20460 # Filter out duplicates - this happens with badly-designed ".pc" files...
20461 for cf_add_1lib in $LIBS
20462 do
20463         for cf_add_2lib in $cf_add_libs
20464         do
20465                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20466                 then
20467                         cf_add_1lib=
20468                         break
20469                 fi
20470         done
20471         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20472 done
20473 LIBS="$cf_add_libs"
20474
20475                 cat >conftest.$ac_ext <<_ACEOF
20476 #line 20476 "configure"
20477 #include "confdefs.h"
20478
20479                                 #include <iostream>
20480 int
20481 main (void)
20482 {
20483
20484                                 std::cout << "Hello World!" << std::endl;
20485   ;
20486   return 0;
20487 }
20488 _ACEOF
20489 rm -f conftest.$ac_objext conftest$ac_exeext
20490 if { (eval echo "$as_me:20490: \"$ac_link\"") >&5
20491   (eval $ac_link) 2>&5
20492   ac_status=$?
20493   echo "$as_me:20493: \$? = $ac_status" >&5
20494   (exit $ac_status); } &&
20495          { ac_try='test -s conftest$ac_exeext'
20496   { (eval echo "$as_me:20496: \"$ac_try\"") >&5
20497   (eval $ac_try) 2>&5
20498   ac_status=$?
20499   echo "$as_me:20499: \$? = $ac_status" >&5
20500   (exit $ac_status); }; }; then
20501   cf_cv_libstdcpp=yes
20502 else
20503   echo "$as_me: failed program was:" >&5
20504 cat conftest.$ac_ext >&5
20505 cf_cv_libstdcpp=no
20506 fi
20507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20508                         LIBS="$cf_save"
20509
20510 fi
20511 echo "$as_me:20511: result: $cf_cv_libstdcpp" >&5
20512 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20513                 test "$cf_cv_libstdcpp" = yes && {
20514 cf_add_libs="-l$cf_stdcpp_libname"
20515 # Filter out duplicates - this happens with badly-designed ".pc" files...
20516 for cf_add_1lib in $CXXLIBS
20517 do
20518         for cf_add_2lib in $cf_add_libs
20519         do
20520                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20521                 then
20522                         cf_add_1lib=
20523                         break
20524                 fi
20525         done
20526         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20527 done
20528 CXXLIBS="$cf_add_libs"
20529  }
20530         fi
20531 fi
20532
20533         echo "$as_me:20533: checking whether $CXX understands -c and -o together" >&5
20534 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20535 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20536   echo $ECHO_N "(cached) $ECHO_C" >&6
20537 else
20538
20539 cat > conftest.$ac_ext <<CF_EOF
20540 int main(void)
20541 {
20542         ${cf_cv_main_return:-return}(0);
20543 }
20544 CF_EOF
20545 # We do the test twice because some compilers refuse to overwrite an
20546 # existing .o file with -o, though they will create one.
20547 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20548 if { (eval echo "$as_me:20548: \"$ac_try\"") >&5
20549   (eval $ac_try) 2>&5
20550   ac_status=$?
20551   echo "$as_me:20551: \$? = $ac_status" >&5
20552   (exit $ac_status); } &&
20553   test -f conftest2.$ac_objext && { (eval echo "$as_me:20553: \"$ac_try\"") >&5
20554   (eval $ac_try) 2>&5
20555   ac_status=$?
20556   echo "$as_me:20556: \$? = $ac_status" >&5
20557   (exit $ac_status); };
20558 then
20559   eval cf_cv_prog_CXX_c_o=yes
20560 else
20561   eval cf_cv_prog_CXX_c_o=no
20562 fi
20563 rm -rf conftest*
20564
20565 fi
20566 if test $cf_cv_prog_CXX_c_o = yes; then
20567   echo "$as_me:20567: result: yes" >&5
20568 echo "${ECHO_T}yes" >&6
20569 else
20570   echo "$as_me:20570: result: no" >&5
20571 echo "${ECHO_T}no" >&6
20572 fi
20573
20574         case $GXX_VERSION in
20575         (1*|2.0-6*)
20576                 cf_cxx_library=yes
20577                 ;;
20578         (*-2.7*|2.7*)
20579
20580 cf_cxx_library=unknown
20581 case $cf_cv_system_name in
20582 (os2*)
20583         cf_gpp_libname=gpp
20584         ;;
20585 (*)
20586         cf_gpp_libname=g++
20587         ;;
20588 esac
20589 if test "$GXX" = yes; then
20590         echo "$as_me:20590: checking for lib$cf_gpp_libname" >&5
20591 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20592         cf_save="$LIBS"
20593
20594 cf_add_libs="-l$cf_gpp_libname"
20595 # Filter out duplicates - this happens with badly-designed ".pc" files...
20596 for cf_add_1lib in $LIBS
20597 do
20598         for cf_add_2lib in $cf_add_libs
20599         do
20600                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20601                 then
20602                         cf_add_1lib=
20603                         break
20604                 fi
20605         done
20606         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20607 done
20608 LIBS="$cf_add_libs"
20609
20610         cat >conftest.$ac_ext <<_ACEOF
20611 #line 20611 "configure"
20612 #include "confdefs.h"
20613
20614 #include <$cf_gpp_libname/builtin.h>
20615
20616 int
20617 main (void)
20618 {
20619 two_arg_error_handler_t foo2 = lib_error_handler
20620   ;
20621   return 0;
20622 }
20623 _ACEOF
20624 rm -f conftest.$ac_objext conftest$ac_exeext
20625 if { (eval echo "$as_me:20625: \"$ac_link\"") >&5
20626   (eval $ac_link) 2>&5
20627   ac_status=$?
20628   echo "$as_me:20628: \$? = $ac_status" >&5
20629   (exit $ac_status); } &&
20630          { ac_try='test -s conftest$ac_exeext'
20631   { (eval echo "$as_me:20631: \"$ac_try\"") >&5
20632   (eval $ac_try) 2>&5
20633   ac_status=$?
20634   echo "$as_me:20634: \$? = $ac_status" >&5
20635   (exit $ac_status); }; }; then
20636   cf_cxx_library=yes
20637
20638 cf_add_libs="-l$cf_gpp_libname"
20639 # Filter out duplicates - this happens with badly-designed ".pc" files...
20640 for cf_add_1lib in $CXXLIBS
20641 do
20642         for cf_add_2lib in $cf_add_libs
20643         do
20644                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20645                 then
20646                         cf_add_1lib=
20647                         break
20648                 fi
20649         done
20650         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20651 done
20652 CXXLIBS="$cf_add_libs"
20653
20654          if test "$cf_gpp_libname" = cpp ; then
20655
20656 cat >>confdefs.h <<\EOF
20657 #define HAVE_GPP_BUILTIN_H 1
20658 EOF
20659
20660          else
20661
20662 cat >>confdefs.h <<\EOF
20663 #define HAVE_GXX_BUILTIN_H 1
20664 EOF
20665
20666          fi
20667 else
20668   echo "$as_me: failed program was:" >&5
20669 cat conftest.$ac_ext >&5
20670 cat >conftest.$ac_ext <<_ACEOF
20671 #line 20671 "configure"
20672 #include "confdefs.h"
20673
20674 #include <builtin.h>
20675
20676 int
20677 main (void)
20678 {
20679 two_arg_error_handler_t foo2 = lib_error_handler
20680   ;
20681   return 0;
20682 }
20683 _ACEOF
20684 rm -f conftest.$ac_objext conftest$ac_exeext
20685 if { (eval echo "$as_me:20685: \"$ac_link\"") >&5
20686   (eval $ac_link) 2>&5
20687   ac_status=$?
20688   echo "$as_me:20688: \$? = $ac_status" >&5
20689   (exit $ac_status); } &&
20690          { ac_try='test -s conftest$ac_exeext'
20691   { (eval echo "$as_me:20691: \"$ac_try\"") >&5
20692   (eval $ac_try) 2>&5
20693   ac_status=$?
20694   echo "$as_me:20694: \$? = $ac_status" >&5
20695   (exit $ac_status); }; }; then
20696   cf_cxx_library=yes
20697
20698 cf_add_libs="-l$cf_gpp_libname"
20699 # Filter out duplicates - this happens with badly-designed ".pc" files...
20700 for cf_add_1lib in $CXXLIBS
20701 do
20702         for cf_add_2lib in $cf_add_libs
20703         do
20704                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20705                 then
20706                         cf_add_1lib=
20707                         break
20708                 fi
20709         done
20710         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20711 done
20712 CXXLIBS="$cf_add_libs"
20713
20714 cat >>confdefs.h <<\EOF
20715 #define HAVE_BUILTIN_H 1
20716 EOF
20717
20718 else
20719   echo "$as_me: failed program was:" >&5
20720 cat conftest.$ac_ext >&5
20721 cf_cxx_library=no
20722 fi
20723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20724 fi
20725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20726         LIBS="$cf_save"
20727         echo "$as_me:20727: result: $cf_cxx_library" >&5
20728 echo "${ECHO_T}$cf_cxx_library" >&6
20729 fi
20730
20731                 ;;
20732         (*)
20733                 cf_cxx_library=no
20734                 ;;
20735         esac
20736
20737         ac_ext=cc
20738 ac_cpp='$CXXCPP $CPPFLAGS'
20739 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20740 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20741 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20742 ac_main_return=return
20743 echo "$as_me:20743: checking how to run the C++ preprocessor" >&5
20744 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20745 if test -z "$CXXCPP"; then
20746   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20747   echo $ECHO_N "(cached) $ECHO_C" >&6
20748 else
20749       # Double quotes because CXXCPP needs to be expanded
20750     for CXXCPP in "$CXX -E" "/lib/cpp"
20751     do
20752       ac_preproc_ok=false
20753 for ac_cxx_preproc_warn_flag in '' yes
20754 do
20755   # Use a header file that comes with gcc, so configuring glibc
20756   # with a fresh cross-compiler works.
20757   # On the NeXT, cc -E runs the code through the compiler's parser,
20758   # not just through cpp. "Syntax error" is here to catch this case.
20759   cat >conftest.$ac_ext <<_ACEOF
20760 #line 20760 "configure"
20761 #include "confdefs.h"
20762 #include <assert.h>
20763                      Syntax error
20764 _ACEOF
20765 if { (eval echo "$as_me:20765: \"$ac_cpp conftest.$ac_ext\"") >&5
20766   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20767   ac_status=$?
20768   egrep -v '^ *\+' conftest.er1 >conftest.err
20769   rm -f conftest.er1
20770   cat conftest.err >&5
20771   echo "$as_me:20771: \$? = $ac_status" >&5
20772   (exit $ac_status); } >/dev/null; then
20773   if test -s conftest.err; then
20774     ac_cpp_err=$ac_cxx_preproc_warn_flag
20775   else
20776     ac_cpp_err=
20777   fi
20778 else
20779   ac_cpp_err=yes
20780 fi
20781 if test -z "$ac_cpp_err"; then
20782   :
20783 else
20784   echo "$as_me: failed program was:" >&5
20785   cat conftest.$ac_ext >&5
20786   # Broken: fails on valid input.
20787 continue
20788 fi
20789 rm -f conftest.err conftest.$ac_ext
20790
20791   # OK, works on sane cases.  Now check whether non-existent headers
20792   # can be detected and how.
20793   cat >conftest.$ac_ext <<_ACEOF
20794 #line 20794 "configure"
20795 #include "confdefs.h"
20796 #include <ac_nonexistent.h>
20797 _ACEOF
20798 if { (eval echo "$as_me:20798: \"$ac_cpp conftest.$ac_ext\"") >&5
20799   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20800   ac_status=$?
20801   egrep -v '^ *\+' conftest.er1 >conftest.err
20802   rm -f conftest.er1
20803   cat conftest.err >&5
20804   echo "$as_me:20804: \$? = $ac_status" >&5
20805   (exit $ac_status); } >/dev/null; then
20806   if test -s conftest.err; then
20807     ac_cpp_err=$ac_cxx_preproc_warn_flag
20808   else
20809     ac_cpp_err=
20810   fi
20811 else
20812   ac_cpp_err=yes
20813 fi
20814 if test -z "$ac_cpp_err"; then
20815   # Broken: success on invalid input.
20816 continue
20817 else
20818   echo "$as_me: failed program was:" >&5
20819   cat conftest.$ac_ext >&5
20820   # Passes both tests.
20821 ac_preproc_ok=:
20822 break
20823 fi
20824 rm -f conftest.err conftest.$ac_ext
20825
20826 done
20827 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20828 rm -f conftest.err conftest.$ac_ext
20829 if $ac_preproc_ok; then
20830   break
20831 fi
20832
20833     done
20834     ac_cv_prog_CXXCPP=$CXXCPP
20835
20836 fi
20837   CXXCPP=$ac_cv_prog_CXXCPP
20838 else
20839   ac_cv_prog_CXXCPP=$CXXCPP
20840 fi
20841 echo "$as_me:20841: result: $CXXCPP" >&5
20842 echo "${ECHO_T}$CXXCPP" >&6
20843 ac_preproc_ok=false
20844 for ac_cxx_preproc_warn_flag in '' yes
20845 do
20846   # Use a header file that comes with gcc, so configuring glibc
20847   # with a fresh cross-compiler works.
20848   # On the NeXT, cc -E runs the code through the compiler's parser,
20849   # not just through cpp. "Syntax error" is here to catch this case.
20850   cat >conftest.$ac_ext <<_ACEOF
20851 #line 20851 "configure"
20852 #include "confdefs.h"
20853 #include <assert.h>
20854                      Syntax error
20855 _ACEOF
20856 if { (eval echo "$as_me:20856: \"$ac_cpp conftest.$ac_ext\"") >&5
20857   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20858   ac_status=$?
20859   egrep -v '^ *\+' conftest.er1 >conftest.err
20860   rm -f conftest.er1
20861   cat conftest.err >&5
20862   echo "$as_me:20862: \$? = $ac_status" >&5
20863   (exit $ac_status); } >/dev/null; then
20864   if test -s conftest.err; then
20865     ac_cpp_err=$ac_cxx_preproc_warn_flag
20866   else
20867     ac_cpp_err=
20868   fi
20869 else
20870   ac_cpp_err=yes
20871 fi
20872 if test -z "$ac_cpp_err"; then
20873   :
20874 else
20875   echo "$as_me: failed program was:" >&5
20876   cat conftest.$ac_ext >&5
20877   # Broken: fails on valid input.
20878 continue
20879 fi
20880 rm -f conftest.err conftest.$ac_ext
20881
20882   # OK, works on sane cases.  Now check whether non-existent headers
20883   # can be detected and how.
20884   cat >conftest.$ac_ext <<_ACEOF
20885 #line 20885 "configure"
20886 #include "confdefs.h"
20887 #include <ac_nonexistent.h>
20888 _ACEOF
20889 if { (eval echo "$as_me:20889: \"$ac_cpp conftest.$ac_ext\"") >&5
20890   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20891   ac_status=$?
20892   egrep -v '^ *\+' conftest.er1 >conftest.err
20893   rm -f conftest.er1
20894   cat conftest.err >&5
20895   echo "$as_me:20895: \$? = $ac_status" >&5
20896   (exit $ac_status); } >/dev/null; then
20897   if test -s conftest.err; then
20898     ac_cpp_err=$ac_cxx_preproc_warn_flag
20899   else
20900     ac_cpp_err=
20901   fi
20902 else
20903   ac_cpp_err=yes
20904 fi
20905 if test -z "$ac_cpp_err"; then
20906   # Broken: success on invalid input.
20907 continue
20908 else
20909   echo "$as_me: failed program was:" >&5
20910   cat conftest.$ac_ext >&5
20911   # Passes both tests.
20912 ac_preproc_ok=:
20913 break
20914 fi
20915 rm -f conftest.err conftest.$ac_ext
20916
20917 done
20918 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20919 rm -f conftest.err conftest.$ac_ext
20920 if $ac_preproc_ok; then
20921   :
20922 else
20923   { { echo "$as_me:20923: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20924 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20925    { (exit 1); exit 1; }; }
20926 fi
20927
20928 ac_ext=cc
20929 ac_cpp='$CXXCPP $CPPFLAGS'
20930 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20931 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20932 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20933 ac_main_return=return
20934
20935 for ac_header in typeinfo
20936 do
20937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20938 echo "$as_me:20938: checking for $ac_header" >&5
20939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20940 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20941   echo $ECHO_N "(cached) $ECHO_C" >&6
20942 else
20943   cat >conftest.$ac_ext <<_ACEOF
20944 #line 20944 "configure"
20945 #include "confdefs.h"
20946 #include <$ac_header>
20947 _ACEOF
20948 if { (eval echo "$as_me:20948: \"$ac_cpp conftest.$ac_ext\"") >&5
20949   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20950   ac_status=$?
20951   egrep -v '^ *\+' conftest.er1 >conftest.err
20952   rm -f conftest.er1
20953   cat conftest.err >&5
20954   echo "$as_me:20954: \$? = $ac_status" >&5
20955   (exit $ac_status); } >/dev/null; then
20956   if test -s conftest.err; then
20957     ac_cpp_err=$ac_cxx_preproc_warn_flag
20958   else
20959     ac_cpp_err=
20960   fi
20961 else
20962   ac_cpp_err=yes
20963 fi
20964 if test -z "$ac_cpp_err"; then
20965   eval "$as_ac_Header=yes"
20966 else
20967   echo "$as_me: failed program was:" >&5
20968   cat conftest.$ac_ext >&5
20969   eval "$as_ac_Header=no"
20970 fi
20971 rm -f conftest.err conftest.$ac_ext
20972 fi
20973 echo "$as_me:20973: result: `eval echo '${'$as_ac_Header'}'`" >&5
20974 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20975 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20976   cat >>confdefs.h <<EOF
20977 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20978 EOF
20979
20980 fi
20981 done
20982
20983 for ac_header in iostream
20984 do
20985 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20986 echo "$as_me:20986: checking for $ac_header" >&5
20987 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20988 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20989   echo $ECHO_N "(cached) $ECHO_C" >&6
20990 else
20991   cat >conftest.$ac_ext <<_ACEOF
20992 #line 20992 "configure"
20993 #include "confdefs.h"
20994 #include <$ac_header>
20995 _ACEOF
20996 if { (eval echo "$as_me:20996: \"$ac_cpp conftest.$ac_ext\"") >&5
20997   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20998   ac_status=$?
20999   egrep -v '^ *\+' conftest.er1 >conftest.err
21000   rm -f conftest.er1
21001   cat conftest.err >&5
21002   echo "$as_me:21002: \$? = $ac_status" >&5
21003   (exit $ac_status); } >/dev/null; then
21004   if test -s conftest.err; then
21005     ac_cpp_err=$ac_cxx_preproc_warn_flag
21006   else
21007     ac_cpp_err=
21008   fi
21009 else
21010   ac_cpp_err=yes
21011 fi
21012 if test -z "$ac_cpp_err"; then
21013   eval "$as_ac_Header=yes"
21014 else
21015   echo "$as_me: failed program was:" >&5
21016   cat conftest.$ac_ext >&5
21017   eval "$as_ac_Header=no"
21018 fi
21019 rm -f conftest.err conftest.$ac_ext
21020 fi
21021 echo "$as_me:21021: result: `eval echo '${'$as_ac_Header'}'`" >&5
21022 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21023 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21024   cat >>confdefs.h <<EOF
21025 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21026 EOF
21027
21028 fi
21029 done
21030
21031 if test x"$ac_cv_header_iostream" = xyes ; then
21032         echo "$as_me:21032: checking if iostream uses std-namespace" >&5
21033 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21034         cat >conftest.$ac_ext <<_ACEOF
21035 #line 21035 "configure"
21036 #include "confdefs.h"
21037
21038 #include <iostream>
21039 using std::endl;
21040 using std::cerr;
21041 int
21042 main (void)
21043 {
21044
21045 cerr << "testing" << endl;
21046
21047   ;
21048   return 0;
21049 }
21050 _ACEOF
21051 rm -f conftest.$ac_objext
21052 if { (eval echo "$as_me:21052: \"$ac_compile\"") >&5
21053   (eval $ac_compile) 2>&5
21054   ac_status=$?
21055   echo "$as_me:21055: \$? = $ac_status" >&5
21056   (exit $ac_status); } &&
21057          { ac_try='test -s conftest.$ac_objext'
21058   { (eval echo "$as_me:21058: \"$ac_try\"") >&5
21059   (eval $ac_try) 2>&5
21060   ac_status=$?
21061   echo "$as_me:21061: \$? = $ac_status" >&5
21062   (exit $ac_status); }; }; then
21063   cf_iostream_namespace=yes
21064 else
21065   echo "$as_me: failed program was:" >&5
21066 cat conftest.$ac_ext >&5
21067 cf_iostream_namespace=no
21068 fi
21069 rm -f conftest.$ac_objext conftest.$ac_ext
21070         echo "$as_me:21070: result: $cf_iostream_namespace" >&5
21071 echo "${ECHO_T}$cf_iostream_namespace" >&6
21072         if test "$cf_iostream_namespace" = yes ; then
21073
21074 cat >>confdefs.h <<\EOF
21075 #define IOSTREAM_NAMESPACE 1
21076 EOF
21077
21078         fi
21079 fi
21080
21081 echo "$as_me:21081: checking if we should include stdbool.h" >&5
21082 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21083
21084 if test "${cf_cv_header_stdbool_h+set}" = set; then
21085   echo $ECHO_N "(cached) $ECHO_C" >&6
21086 else
21087
21088         cat >conftest.$ac_ext <<_ACEOF
21089 #line 21089 "configure"
21090 #include "confdefs.h"
21091
21092 int
21093 main (void)
21094 {
21095 bool foo = false
21096   ;
21097   return 0;
21098 }
21099 _ACEOF
21100 rm -f conftest.$ac_objext
21101 if { (eval echo "$as_me:21101: \"$ac_compile\"") >&5
21102   (eval $ac_compile) 2>&5
21103   ac_status=$?
21104   echo "$as_me:21104: \$? = $ac_status" >&5
21105   (exit $ac_status); } &&
21106          { ac_try='test -s conftest.$ac_objext'
21107   { (eval echo "$as_me:21107: \"$ac_try\"") >&5
21108   (eval $ac_try) 2>&5
21109   ac_status=$?
21110   echo "$as_me:21110: \$? = $ac_status" >&5
21111   (exit $ac_status); }; }; then
21112   cf_cv_header_stdbool_h=0
21113 else
21114   echo "$as_me: failed program was:" >&5
21115 cat conftest.$ac_ext >&5
21116 cat >conftest.$ac_ext <<_ACEOF
21117 #line 21117 "configure"
21118 #include "confdefs.h"
21119
21120 #ifndef __BEOS__
21121 #include <stdbool.h>
21122 #endif
21123
21124 int
21125 main (void)
21126 {
21127 bool foo = false
21128   ;
21129   return 0;
21130 }
21131 _ACEOF
21132 rm -f conftest.$ac_objext
21133 if { (eval echo "$as_me:21133: \"$ac_compile\"") >&5
21134   (eval $ac_compile) 2>&5
21135   ac_status=$?
21136   echo "$as_me:21136: \$? = $ac_status" >&5
21137   (exit $ac_status); } &&
21138          { ac_try='test -s conftest.$ac_objext'
21139   { (eval echo "$as_me:21139: \"$ac_try\"") >&5
21140   (eval $ac_try) 2>&5
21141   ac_status=$?
21142   echo "$as_me:21142: \$? = $ac_status" >&5
21143   (exit $ac_status); }; }; then
21144   cf_cv_header_stdbool_h=1
21145 else
21146   echo "$as_me: failed program was:" >&5
21147 cat conftest.$ac_ext >&5
21148 cf_cv_header_stdbool_h=0
21149 fi
21150 rm -f conftest.$ac_objext conftest.$ac_ext
21151 fi
21152 rm -f conftest.$ac_objext conftest.$ac_ext
21153 fi
21154
21155 if test "$cf_cv_header_stdbool_h" = 1
21156 then    echo "$as_me:21156: result: yes" >&5
21157 echo "${ECHO_T}yes" >&6
21158 else    echo "$as_me:21158: result: no" >&5
21159 echo "${ECHO_T}no" >&6
21160 fi
21161
21162 echo "$as_me:21162: checking for builtin bool type" >&5
21163 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21164
21165 if test "${cf_cv_builtin_bool+set}" = set; then
21166   echo $ECHO_N "(cached) $ECHO_C" >&6
21167 else
21168
21169         cat >conftest.$ac_ext <<_ACEOF
21170 #line 21170 "configure"
21171 #include "confdefs.h"
21172
21173 #include <stdio.h>
21174 #include <sys/types.h>
21175
21176 int
21177 main (void)
21178 {
21179 bool x = false
21180   ;
21181   return 0;
21182 }
21183 _ACEOF
21184 rm -f conftest.$ac_objext
21185 if { (eval echo "$as_me:21185: \"$ac_compile\"") >&5
21186   (eval $ac_compile) 2>&5
21187   ac_status=$?
21188   echo "$as_me:21188: \$? = $ac_status" >&5
21189   (exit $ac_status); } &&
21190          { ac_try='test -s conftest.$ac_objext'
21191   { (eval echo "$as_me:21191: \"$ac_try\"") >&5
21192   (eval $ac_try) 2>&5
21193   ac_status=$?
21194   echo "$as_me:21194: \$? = $ac_status" >&5
21195   (exit $ac_status); }; }; then
21196   cf_cv_builtin_bool=1
21197 else
21198   echo "$as_me: failed program was:" >&5
21199 cat conftest.$ac_ext >&5
21200 cf_cv_builtin_bool=0
21201 fi
21202 rm -f conftest.$ac_objext conftest.$ac_ext
21203
21204 fi
21205
21206 if test "$cf_cv_builtin_bool" = 1
21207 then    echo "$as_me:21207: result: yes" >&5
21208 echo "${ECHO_T}yes" >&6
21209 else    echo "$as_me:21209: result: no" >&5
21210 echo "${ECHO_T}no" >&6
21211 fi
21212
21213 echo "$as_me:21213: checking for size of bool" >&5
21214 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21215 if test "${cf_cv_type_of_bool+set}" = set; then
21216   echo $ECHO_N "(cached) $ECHO_C" >&6
21217 else
21218
21219         rm -f cf_test.out
21220         if test "$cross_compiling" = yes; then
21221   cf_cv_type_of_bool=unknown
21222 else
21223   cat >conftest.$ac_ext <<_ACEOF
21224 #line 21224 "configure"
21225 #include "confdefs.h"
21226
21227 #include <stdlib.h>
21228 #include <stdio.h>
21229
21230 #if defined(__cplusplus)
21231
21232 #ifdef HAVE_GXX_BUILTIN_H
21233 #include <g++/builtin.h>
21234 #elif HAVE_GPP_BUILTIN_H
21235 #include <gpp/builtin.h>
21236 #elif HAVE_BUILTIN_H
21237 #include <builtin.h>
21238 #endif
21239
21240 #else
21241
21242 #if $cf_cv_header_stdbool_h
21243 #include <stdbool.h>
21244 #endif
21245
21246 #endif
21247
21248 int main(void)
21249 {
21250         FILE *fp = fopen("cf_test.out", "w");
21251         if (fp != 0) {
21252                 bool x = true;
21253                 if ((bool)(-x) >= 0)
21254                         fputs("unsigned ", fp);
21255                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21256                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21257                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21258                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21259                 fclose(fp);
21260         }
21261         ${cf_cv_main_return:-return}(0);
21262 }
21263
21264 _ACEOF
21265 rm -f conftest$ac_exeext
21266 if { (eval echo "$as_me:21266: \"$ac_link\"") >&5
21267   (eval $ac_link) 2>&5
21268   ac_status=$?
21269   echo "$as_me:21269: \$? = $ac_status" >&5
21270   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21271   { (eval echo "$as_me:21271: \"$ac_try\"") >&5
21272   (eval $ac_try) 2>&5
21273   ac_status=$?
21274   echo "$as_me:21274: \$? = $ac_status" >&5
21275   (exit $ac_status); }; }; then
21276   cf_cv_type_of_bool=`cat cf_test.out`
21277                  if test -z "$cf_cv_type_of_bool"; then
21278                    cf_cv_type_of_bool=unknown
21279                  fi
21280 else
21281   echo "$as_me: program exited with status $ac_status" >&5
21282 echo "$as_me: failed program was:" >&5
21283 cat conftest.$ac_ext >&5
21284 cf_cv_type_of_bool=unknown
21285 fi
21286 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21287 fi
21288
21289 fi
21290
21291         rm -f cf_test.out
21292 echo "$as_me:21292: result: $cf_cv_type_of_bool" >&5
21293 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21294 if test "$cf_cv_type_of_bool" = unknown ; then
21295         case .$NCURSES_BOOL in
21296         (.auto|.) NCURSES_BOOL=unsigned;;
21297         esac
21298         { echo "$as_me:21298: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21299 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21300         cf_cv_type_of_bool=$NCURSES_BOOL
21301 fi
21302
21303 echo "$as_me:21303: checking for special defines needed for etip.h" >&5
21304 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21305 cf_save_CXXFLAGS="$CXXFLAGS"
21306 cf_result="none"
21307
21308 # etip.h includes ncurses.h which includes ncurses_dll.h
21309 # But ncurses_dll.h is generated - fix here.
21310 test -d include || mkdir include
21311 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
21312
21313 for cf_math in "" MATH_H
21314 do
21315 for cf_excp in "" MATH_EXCEPTION
21316 do
21317         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21318         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21319         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21320 cat >conftest.$ac_ext <<_ACEOF
21321 #line 21321 "configure"
21322 #include "confdefs.h"
21323
21324 #include <etip.h.in>
21325
21326 int
21327 main (void)
21328 {
21329
21330   ;
21331   return 0;
21332 }
21333 _ACEOF
21334 rm -f conftest.$ac_objext
21335 if { (eval echo "$as_me:21335: \"$ac_compile\"") >&5
21336   (eval $ac_compile) 2>&5
21337   ac_status=$?
21338   echo "$as_me:21338: \$? = $ac_status" >&5
21339   (exit $ac_status); } &&
21340          { ac_try='test -s conftest.$ac_objext'
21341   { (eval echo "$as_me:21341: \"$ac_try\"") >&5
21342   (eval $ac_try) 2>&5
21343   ac_status=$?
21344   echo "$as_me:21344: \$? = $ac_status" >&5
21345   (exit $ac_status); }; }; then
21346
21347         test -n "$cf_math" && cat >>confdefs.h <<EOF
21348 #define ETIP_NEEDS_${cf_math} 1
21349 EOF
21350
21351         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21352 #define ETIP_NEEDS_${cf_excp} 1
21353 EOF
21354
21355         cf_result="$cf_math $cf_excp"
21356         break 2
21357
21358 else
21359   echo "$as_me: failed program was:" >&5
21360 cat conftest.$ac_ext >&5
21361 fi
21362 rm -f conftest.$ac_objext conftest.$ac_ext
21363 done
21364 done
21365 echo "$as_me:21365: result: $cf_result" >&5
21366 echo "${ECHO_T}$cf_result" >&6
21367 CXXFLAGS="$cf_save_CXXFLAGS"
21368
21369 if test -n "$CXX"; then
21370 echo "$as_me:21370: checking if $CXX accepts parameter initialization" >&5
21371 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21372 if test "${cf_cv_cpp_param_init+set}" = set; then
21373   echo $ECHO_N "(cached) $ECHO_C" >&6
21374 else
21375
21376         ac_ext=cc
21377 ac_cpp='$CXXCPP $CPPFLAGS'
21378 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21379 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21380 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21381 ac_main_return=return
21382
21383         if test "$cross_compiling" = yes; then
21384   cf_cv_cpp_param_init=unknown
21385 else
21386   cat >conftest.$ac_ext <<_ACEOF
21387 #line 21387 "configure"
21388 #include "confdefs.h"
21389
21390 class TEST {
21391 private:
21392         int value;
21393 public:
21394         TEST(int x = 1);
21395         ~TEST();
21396 };
21397
21398 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21399 {
21400         value = x;
21401 }
21402 int main(void) { }
21403
21404 _ACEOF
21405 rm -f conftest$ac_exeext
21406 if { (eval echo "$as_me:21406: \"$ac_link\"") >&5
21407   (eval $ac_link) 2>&5
21408   ac_status=$?
21409   echo "$as_me:21409: \$? = $ac_status" >&5
21410   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21411   { (eval echo "$as_me:21411: \"$ac_try\"") >&5
21412   (eval $ac_try) 2>&5
21413   ac_status=$?
21414   echo "$as_me:21414: \$? = $ac_status" >&5
21415   (exit $ac_status); }; }; then
21416   cf_cv_cpp_param_init=yes
21417 else
21418   echo "$as_me: program exited with status $ac_status" >&5
21419 echo "$as_me: failed program was:" >&5
21420 cat conftest.$ac_ext >&5
21421 cf_cv_cpp_param_init=no
21422 fi
21423 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21424 fi
21425         ac_ext=cc
21426 ac_cpp='$CXXCPP $CPPFLAGS'
21427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21428 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21430 ac_main_return=return
21431
21432 fi
21433 echo "$as_me:21433: result: $cf_cv_cpp_param_init" >&5
21434 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21435 fi
21436 test "$cf_cv_cpp_param_init" = yes &&
21437 cat >>confdefs.h <<\EOF
21438 #define CPP_HAS_PARAM_INIT 1
21439 EOF
21440
21441 if test -n "$CXX"; then
21442
21443 echo "$as_me:21443: checking if $CXX accepts static_cast" >&5
21444 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21445 if test "${cf_cv_cpp_static_cast+set}" = set; then
21446   echo $ECHO_N "(cached) $ECHO_C" >&6
21447 else
21448
21449         ac_ext=cc
21450 ac_cpp='$CXXCPP $CPPFLAGS'
21451 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21452 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21453 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21454 ac_main_return=return
21455
21456         cat >conftest.$ac_ext <<_ACEOF
21457 #line 21457 "configure"
21458 #include "confdefs.h"
21459
21460 class NCursesPanel
21461 {
21462 public:
21463   NCursesPanel(int nlines,
21464                int ncols,
21465                int begin_y = 0,
21466                int begin_x = 0)
21467   {
21468   }
21469   NCursesPanel();
21470   ~NCursesPanel();
21471 };
21472
21473 template<class T> class NCursesUserPanel : public NCursesPanel
21474 {
21475 public:
21476   NCursesUserPanel (int nlines,
21477                     int ncols,
21478                     int begin_y = 0,
21479                     int begin_x = 0,
21480                     const T* p_UserData = static_cast<T*>(0))
21481     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21482   {
21483   };
21484   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21485   {
21486   };
21487
21488   virtual ~NCursesUserPanel() {};
21489 };
21490
21491 int
21492 main (void)
21493 {
21494
21495         const char* p_UserData = static_cast<char*>(0)
21496   ;
21497   return 0;
21498 }
21499 _ACEOF
21500 rm -f conftest.$ac_objext
21501 if { (eval echo "$as_me:21501: \"$ac_compile\"") >&5
21502   (eval $ac_compile) 2>&5
21503   ac_status=$?
21504   echo "$as_me:21504: \$? = $ac_status" >&5
21505   (exit $ac_status); } &&
21506          { ac_try='test -s conftest.$ac_objext'
21507   { (eval echo "$as_me:21507: \"$ac_try\"") >&5
21508   (eval $ac_try) 2>&5
21509   ac_status=$?
21510   echo "$as_me:21510: \$? = $ac_status" >&5
21511   (exit $ac_status); }; }; then
21512   cf_cv_cpp_static_cast=yes
21513 else
21514   echo "$as_me: failed program was:" >&5
21515 cat conftest.$ac_ext >&5
21516 cf_cv_cpp_static_cast=no
21517 fi
21518 rm -f conftest.$ac_objext conftest.$ac_ext
21519
21520         ac_ext=cc
21521 ac_cpp='$CXXCPP $CPPFLAGS'
21522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21523 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21525 ac_main_return=return
21526
21527 fi
21528 echo "$as_me:21528: result: $cf_cv_cpp_static_cast" >&5
21529 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21530
21531 fi
21532
21533 test "$cf_cv_cpp_static_cast" = yes &&
21534 cat >>confdefs.h <<\EOF
21535 #define CPP_HAS_STATIC_CAST 1
21536 EOF
21537
21538         CXX_AR='$(AR)'
21539         CXX_ARFLAGS='$(ARFLAGS)'
21540         case $cf_cv_system_name in
21541         (irix*)
21542             if test "$GXX" != yes ; then
21543                 CXX_AR='$(CXX)'
21544                 CXX_ARFLAGS='-ar -o'
21545             fi
21546             ;;
21547         (sco3.2v5*)
21548             CXXLDFLAGS="-u main"
21549             ;;
21550         (solaris2*)
21551             if test "$GXX" != yes ; then
21552                 CXX_AR='$(CXX)'
21553                 CXX_ARFLAGS='-xar -o'
21554             fi
21555             ;;
21556         esac
21557
21558 else
21559         cf_cxx_library=no
21560         cf_cv_builtin_bool=1
21561
21562         # Just because we are not configuring against C++ right now does not
21563         # mean that a user will not want to use C++.  Some distributors disable
21564         # the C++ portion of this configuration as a shortcut (or just to avoid
21565         # compiling the demo in the c++ directory).  So we need a reasonable
21566         # default for the 'bool' type.
21567         #
21568         # Caveat: since the storage of the bool type is not standardized, it
21569         # may change.
21570
21571         if test "$NCURSES_BOOL" != auto ; then
21572                 cf_cv_type_of_bool=$NCURSES_BOOL
21573                 cf_cv_header_stdbool_h=0
21574         else
21575                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21576
21577 echo "$as_me:21577: checking for size of bool" >&5
21578 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21579 if test "${cf_cv_type_of_bool+set}" = set; then
21580   echo $ECHO_N "(cached) $ECHO_C" >&6
21581 else
21582
21583         rm -f cf_test.out
21584         if test "$cross_compiling" = yes; then
21585   cf_cv_type_of_bool=unknown
21586 else
21587   cat >conftest.$ac_ext <<_ACEOF
21588 #line 21588 "configure"
21589 #include "confdefs.h"
21590
21591 #include <stdlib.h>
21592 #include <stdio.h>
21593
21594 #if defined(__cplusplus)
21595
21596 #ifdef HAVE_GXX_BUILTIN_H
21597 #include <g++/builtin.h>
21598 #elif HAVE_GPP_BUILTIN_H
21599 #include <gpp/builtin.h>
21600 #elif HAVE_BUILTIN_H
21601 #include <builtin.h>
21602 #endif
21603
21604 #else
21605
21606 #if $cf_cv_header_stdbool_h
21607 #include <stdbool.h>
21608 #endif
21609
21610 #endif
21611
21612 int main(void)
21613 {
21614         FILE *fp = fopen("cf_test.out", "w");
21615         if (fp != 0) {
21616                 bool x = true;
21617                 if ((bool)(-x) >= 0)
21618                         fputs("unsigned ", fp);
21619                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21620                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21621                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21622                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21623                 fclose(fp);
21624         }
21625         ${cf_cv_main_return:-return}(0);
21626 }
21627
21628 _ACEOF
21629 rm -f conftest$ac_exeext
21630 if { (eval echo "$as_me:21630: \"$ac_link\"") >&5
21631   (eval $ac_link) 2>&5
21632   ac_status=$?
21633   echo "$as_me:21633: \$? = $ac_status" >&5
21634   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21635   { (eval echo "$as_me:21635: \"$ac_try\"") >&5
21636   (eval $ac_try) 2>&5
21637   ac_status=$?
21638   echo "$as_me:21638: \$? = $ac_status" >&5
21639   (exit $ac_status); }; }; then
21640   cf_cv_type_of_bool=`cat cf_test.out`
21641                  if test -z "$cf_cv_type_of_bool"; then
21642                    cf_cv_type_of_bool=unknown
21643                  fi
21644 else
21645   echo "$as_me: program exited with status $ac_status" >&5
21646 echo "$as_me: failed program was:" >&5
21647 cat conftest.$ac_ext >&5
21648 cf_cv_type_of_bool=unknown
21649 fi
21650 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21651 fi
21652
21653 fi
21654
21655         rm -f cf_test.out
21656 echo "$as_me:21656: result: $cf_cv_type_of_bool" >&5
21657 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21658 if test "$cf_cv_type_of_bool" = unknown ; then
21659         case .$NCURSES_BOOL in
21660         (.auto|.) NCURSES_BOOL=unsigned;;
21661         esac
21662         { echo "$as_me:21662: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21663 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21664         cf_cv_type_of_bool=$NCURSES_BOOL
21665 fi
21666
21667                 else
21668                         echo "$as_me:21668: checking for fallback type of bool" >&5
21669 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21670                         case "$host_cpu" in
21671                         (i?86)  cf_cv_type_of_bool=char ;;
21672                         (*)     cf_cv_type_of_bool=int  ;;
21673                         esac
21674                         echo "$as_me:21674: result: $cf_cv_type_of_bool" >&5
21675 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21676                 fi
21677         fi
21678 fi
21679
21680 # If the C compiler did not declare bool, and we did not determine that the C++
21681 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21682 # ncurses library use the same type as C++ bool.  Note that this allows one to
21683 # specify the type of bool in a configure-script option and postpone
21684 # integration with the C++ compiler provided that the types are compatible.
21685 USE_CXX_BOOL=1
21686 if test $cf_cv_cc_bool_type = 1
21687 then
21688         # oops: C has a bool.  Unlikely, but C++ could differ.
21689         USE_CXX_BOOL=0
21690 elif test $cf_cv_builtin_bool = 0
21691 then
21692         # C++ has no bool
21693         USE_CXX_BOOL=0
21694 else
21695         # this is the normal case
21696         USE_CXX_BOOL='defined(__cplusplus)'
21697 fi
21698
21699 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21700
21701         if test "$cf_with_ada" != "no" ; then
21702                 if test "$with_libtool" != "no"; then
21703                         { echo "$as_me:21703: WARNING: libtool does not support Ada - disabling feature" >&5
21704 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21705                         cf_with_ada=no
21706                 fi
21707         fi
21708
21709         if test "$cf_with_ada" != "no" ; then
21710
21711 cf_ada_make=gnatmake
21712 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21713 set dummy $cf_ada_make; ac_word=$2
21714 echo "$as_me:21714: checking for $ac_word" >&5
21715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21716 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21717   echo $ECHO_N "(cached) $ECHO_C" >&6
21718 else
21719   if test -n "$gnat_exists"; then
21720   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21721 else
21722   ac_save_IFS=$IFS; IFS=$ac_path_separator
21723 ac_dummy="$PATH"
21724 for ac_dir in $ac_dummy; do
21725   IFS=$ac_save_IFS
21726   test -z "$ac_dir" && ac_dir=.
21727   $as_executable_p "$ac_dir/$ac_word" || continue
21728 ac_cv_prog_gnat_exists="yes"
21729 echo "$as_me:21729: found $ac_dir/$ac_word" >&5
21730 break
21731 done
21732
21733   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21734 fi
21735 fi
21736 gnat_exists=$ac_cv_prog_gnat_exists
21737 if test -n "$gnat_exists"; then
21738   echo "$as_me:21738: result: $gnat_exists" >&5
21739 echo "${ECHO_T}$gnat_exists" >&6
21740 else
21741   echo "$as_me:21741: result: no" >&5
21742 echo "${ECHO_T}no" >&6
21743 fi
21744
21745 if test "$ac_cv_prog_gnat_exists" = no; then
21746         cf_ada_make=
21747         cf_cv_prog_gnat_correct=no
21748 else
21749
21750 echo "$as_me:21750: checking for gnat version" >&5
21751 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21752 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21753         grep '[0-9].[0-9][0-9]*' |\
21754         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21755 echo "$as_me:21755: result: $cf_gnat_version" >&5
21756 echo "${ECHO_T}$cf_gnat_version" >&6
21757
21758 case $cf_gnat_version in
21759 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21760         cf_cv_prog_gnat_correct=yes
21761         ;;
21762 (*)
21763         { echo "$as_me:21763: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21764 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21765         cf_cv_prog_gnat_correct=no
21766         ;;
21767 esac
21768
21769         # Extract the first word of "m4", so it can be a program name with args.
21770 set dummy m4; ac_word=$2
21771 echo "$as_me:21771: checking for $ac_word" >&5
21772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21773 if test "${ac_cv_prog_M4_exists+set}" = set; then
21774   echo $ECHO_N "(cached) $ECHO_C" >&6
21775 else
21776   if test -n "$M4_exists"; then
21777   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21778 else
21779   ac_save_IFS=$IFS; IFS=$ac_path_separator
21780 ac_dummy="$PATH"
21781 for ac_dir in $ac_dummy; do
21782   IFS=$ac_save_IFS
21783   test -z "$ac_dir" && ac_dir=.
21784   $as_executable_p "$ac_dir/$ac_word" || continue
21785 ac_cv_prog_M4_exists="yes"
21786 echo "$as_me:21786: found $ac_dir/$ac_word" >&5
21787 break
21788 done
21789
21790   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21791 fi
21792 fi
21793 M4_exists=$ac_cv_prog_M4_exists
21794 if test -n "$M4_exists"; then
21795   echo "$as_me:21795: result: $M4_exists" >&5
21796 echo "${ECHO_T}$M4_exists" >&6
21797 else
21798   echo "$as_me:21798: result: no" >&5
21799 echo "${ECHO_T}no" >&6
21800 fi
21801
21802         if test "$ac_cv_prog_M4_exists" = no; then
21803                 cf_cv_prog_gnat_correct=no
21804                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21805         fi
21806         if test "$cf_cv_prog_gnat_correct" = yes; then
21807                 echo "$as_me:21807: checking if GNAT works" >&5
21808 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21809
21810 rm -rf conftest* *~conftest*
21811 cat >>conftest.ads <<CF_EOF
21812 procedure conftest;
21813 CF_EOF
21814 cat >>conftest.adb <<CF_EOF
21815 with Text_IO;
21816 with GNAT.OS_Lib;
21817 procedure conftest is
21818 begin
21819    Text_IO.Put ("Hello World");
21820    Text_IO.New_Line;
21821    GNAT.OS_Lib.OS_Exit (0);
21822 end conftest;
21823 CF_EOF
21824 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21825    if ( ./conftest 1>&5 2>&1 ) ; then
21826       cf_cv_prog_gnat_correct=yes
21827    else
21828       cf_cv_prog_gnat_correct=no
21829    fi
21830 else
21831    cf_cv_prog_gnat_correct=no
21832 fi
21833 rm -rf conftest* *~conftest*
21834
21835                 echo "$as_me:21835: result: $cf_cv_prog_gnat_correct" >&5
21836 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21837         fi
21838 fi
21839
21840                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21841
21842         ADAFLAGS="$ADAFLAGS -gnatpn"
21843
21844         echo "$as_me:21844: checking optimization options for ADAFLAGS" >&5
21845 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21846         case "$CFLAGS" in
21847         (*-g*)
21848
21849         ADAFLAGS="$ADAFLAGS -g"
21850
21851                 ;;
21852         esac
21853         case "$CFLAGS" in
21854         (*-O*)
21855                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21856
21857         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21858
21859                 ;;
21860         esac
21861         echo "$as_me:21861: result: $ADAFLAGS" >&5
21862 echo "${ECHO_T}$ADAFLAGS" >&6
21863
21864 echo "$as_me:21864: checking if GNATPREP supports -T option" >&5
21865 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21866 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21867   echo $ECHO_N "(cached) $ECHO_C" >&6
21868 else
21869
21870 cf_cv_gnatprep_opt_t=no
21871 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21872
21873 fi
21874 echo "$as_me:21874: result: $cf_cv_gnatprep_opt_t" >&5
21875 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21876 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21877
21878 echo "$as_me:21878: checking if GNAT supports generics" >&5
21879 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21880 case $cf_gnat_version in
21881 (3.[1-9]*|[4-9].*)
21882         cf_gnat_generics=yes
21883         ;;
21884 (*)
21885         cf_gnat_generics=no
21886         ;;
21887 esac
21888 echo "$as_me:21888: result: $cf_gnat_generics" >&5
21889 echo "${ECHO_T}$cf_gnat_generics" >&6
21890
21891 if test "$cf_gnat_generics" = yes
21892 then
21893         cf_compile_generics=generics
21894         cf_generic_objects="\${GENOBJS}"
21895 else
21896         cf_compile_generics=
21897         cf_generic_objects=
21898 fi
21899
21900 echo "$as_me:21900: checking if GNAT supports SIGINT" >&5
21901 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21902 if test "${cf_cv_gnat_sigint+set}" = set; then
21903   echo $ECHO_N "(cached) $ECHO_C" >&6
21904 else
21905
21906 rm -rf conftest* *~conftest*
21907 cat >>conftest.ads <<CF_EOF
21908 with Ada.Interrupts.Names;
21909
21910 package ConfTest is
21911
21912    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21913    pragma Unreserve_All_Interrupts;
21914    pragma Warnings (On);
21915
21916    protected Process is
21917       procedure Stop;
21918       function Continue return Boolean;
21919       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21920    private
21921       Done : Boolean := False;
21922    end Process;
21923
21924 end ConfTest;
21925 CF_EOF
21926 cat >>conftest.adb <<CF_EOF
21927 package body ConfTest is
21928    protected body Process is
21929       procedure Stop is
21930       begin
21931          Done := True;
21932       end Stop;
21933       function Continue return Boolean is
21934       begin
21935          return not Done;
21936       end Continue;
21937    end Process;
21938 end ConfTest;
21939 CF_EOF
21940 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21941       cf_cv_gnat_sigint=yes
21942 else
21943    cf_cv_gnat_sigint=no
21944 fi
21945 rm -rf conftest* *~conftest*
21946
21947 fi
21948 echo "$as_me:21948: result: $cf_cv_gnat_sigint" >&5
21949 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21950
21951 if test $cf_cv_gnat_sigint = yes ; then
21952         USE_GNAT_SIGINT=""
21953 else
21954         USE_GNAT_SIGINT="#"
21955 fi
21956
21957 cf_gnat_libraries=no
21958 cf_gnat_projects=no
21959
21960 if test "$enable_gnat_projects" != no ; then
21961 echo "$as_me:21961: checking if GNAT supports project files" >&5
21962 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21963 case $cf_gnat_version in
21964 (3.[0-9]*)
21965         ;;
21966 (*)
21967         case $cf_cv_system_name in
21968         (cygwin*|msys*)
21969                 ;;
21970         (*)
21971                 mkdir conftest.src conftest.bin conftest.lib
21972                 cd conftest.src
21973                 rm -rf conftest* *~conftest*
21974                 cat >>library.gpr <<CF_EOF
21975 project Library is
21976   Kind := External ("LIB_KIND");
21977   for Library_Name use "ConfTest";
21978   for Object_Dir use ".";
21979   for Library_ALI_Dir use External("LIBRARY_DIR");
21980   for Library_Version use External ("SONAME");
21981   for Library_Kind use Kind;
21982   for Library_Dir use External("BUILD_DIR");
21983   Source_Dir := External ("SOURCE_DIR");
21984   for Source_Dirs use (Source_Dir);
21985 end Library;
21986 CF_EOF
21987                 cat >>confpackage.ads <<CF_EOF
21988 package ConfPackage is
21989    procedure conftest;
21990 end ConfPackage;
21991 CF_EOF
21992                 cat >>confpackage.adb <<CF_EOF
21993 with Text_IO;
21994 package body ConfPackage is
21995    procedure conftest is
21996    begin
21997       Text_IO.Put ("Hello World");
21998       Text_IO.New_Line;
21999    end conftest;
22000 end ConfPackage;
22001 CF_EOF
22002                 if ( $cf_ada_make $ADAFLAGS \
22003                                 -Plibrary.gpr \
22004                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22005                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22006                                 -XSOURCE_DIR=`pwd` \
22007                                 -XSONAME=libConfTest.so.1 \
22008                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
22009                         cf_gnat_projects=yes
22010                 fi
22011                 cd ..
22012                 if test -f conftest.lib/confpackage.ali
22013                 then
22014                         cf_gnat_libraries=yes
22015                 fi
22016                 rm -rf conftest* *~conftest*
22017                 ;;
22018         esac
22019         ;;
22020 esac
22021 echo "$as_me:22021: result: $cf_gnat_projects" >&5
22022 echo "${ECHO_T}$cf_gnat_projects" >&6
22023 fi # enable_gnat_projects
22024
22025 if test $cf_gnat_projects = yes
22026 then
22027         echo "$as_me:22027: checking if GNAT supports libraries" >&5
22028 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22029         echo "$as_me:22029: result: $cf_gnat_libraries" >&5
22030 echo "${ECHO_T}$cf_gnat_libraries" >&6
22031 fi
22032
22033 if test "$cf_gnat_projects" = yes
22034 then
22035         USE_OLD_MAKERULES="#"
22036         USE_GNAT_PROJECTS=""
22037 else
22038         USE_OLD_MAKERULES=""
22039         USE_GNAT_PROJECTS="#"
22040 fi
22041
22042 if test "$cf_gnat_libraries" = yes
22043 then
22044         USE_GNAT_LIBRARIES=""
22045 else
22046         USE_GNAT_LIBRARIES="#"
22047 fi
22048
22049 echo "$as_me:22049: checking for ada-compiler" >&5
22050 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22051
22052 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22053 if test "${with_ada_compiler+set}" = set; then
22054   withval="$with_ada_compiler"
22055   cf_ada_compiler=$withval
22056 else
22057   cf_ada_compiler=gnatmake
22058 fi;
22059
22060 echo "$as_me:22060: result: $cf_ada_compiler" >&5
22061 echo "${ECHO_T}$cf_ada_compiler" >&6
22062
22063                         cf_ada_package=terminal_interface
22064
22065 echo "$as_me:22065: checking for ada-include" >&5
22066 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22067
22068 # Check whether --with-ada-include or --without-ada-include was given.
22069 if test "${with_ada_include+set}" = set; then
22070   withval="$with_ada_include"
22071
22072 else
22073   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22074 fi; if test -n "$prefix/share/ada/adainclude" ; then
22075
22076 if test "x$prefix" != xNONE; then
22077         cf_path_syntax="$prefix"
22078 else
22079         cf_path_syntax="$ac_default_prefix"
22080 fi
22081
22082 case ".$withval" in
22083 (.\$\(*\)*|.\'*\'*)
22084         ;;
22085 (..|./*|.\\*)
22086         ;;
22087 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22088         ;;
22089 (.\${*prefix}*|.\${*dir}*)
22090         eval withval="$withval"
22091         case ".$withval" in
22092         (.NONE/*)
22093                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22094                 ;;
22095         esac
22096         ;;
22097 (.no|.NONE/*)
22098         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22099         ;;
22100 (*)
22101         { { echo "$as_me:22101: error: expected a pathname, not \"$withval\"" >&5
22102 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22103    { (exit 1); exit 1; }; }
22104         ;;
22105 esac
22106
22107 fi
22108 eval ADA_INCLUDE="$withval"
22109
22110 echo "$as_me:22110: result: $ADA_INCLUDE" >&5
22111 echo "${ECHO_T}$ADA_INCLUDE" >&6
22112
22113 echo "$as_me:22113: checking for ada-objects" >&5
22114 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22115
22116 # Check whether --with-ada-objects or --without-ada-objects was given.
22117 if test "${with_ada_objects+set}" = set; then
22118   withval="$with_ada_objects"
22119
22120 else
22121   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22122 fi; if test -n "$prefix/lib/ada/adalib" ; then
22123
22124 if test "x$prefix" != xNONE; then
22125         cf_path_syntax="$prefix"
22126 else
22127         cf_path_syntax="$ac_default_prefix"
22128 fi
22129
22130 case ".$withval" in
22131 (.\$\(*\)*|.\'*\'*)
22132         ;;
22133 (..|./*|.\\*)
22134         ;;
22135 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22136         ;;
22137 (.\${*prefix}*|.\${*dir}*)
22138         eval withval="$withval"
22139         case ".$withval" in
22140         (.NONE/*)
22141                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22142                 ;;
22143         esac
22144         ;;
22145 (.no|.NONE/*)
22146         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22147         ;;
22148 (*)
22149         { { echo "$as_me:22149: error: expected a pathname, not \"$withval\"" >&5
22150 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22151    { (exit 1); exit 1; }; }
22152         ;;
22153 esac
22154
22155 fi
22156 eval ADA_OBJECTS="$withval"
22157
22158 echo "$as_me:22158: result: $ADA_OBJECTS" >&5
22159 echo "${ECHO_T}$ADA_OBJECTS" >&6
22160
22161 echo "$as_me:22161: checking if an Ada95 shared-library should be built" >&5
22162 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22163
22164 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22165 if test "${with_ada_sharedlib+set}" = set; then
22166   withval="$with_ada_sharedlib"
22167   with_ada_sharedlib=$withval
22168 else
22169   with_ada_sharedlib=no
22170 fi;
22171 echo "$as_me:22171: result: $with_ada_sharedlib" >&5
22172 echo "${ECHO_T}$with_ada_sharedlib" >&6
22173
22174 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22175 MAKE_ADA_SHAREDLIB="#"
22176
22177 if test "x$with_ada_sharedlib" != xno
22178 then
22179         MAKE_ADA_SHAREDLIB=
22180         if test "x$with_ada_sharedlib" != xyes
22181         then
22182                 ADA_SHAREDLIB="$with_ada_sharedlib"
22183         fi
22184 fi
22185
22186                 fi
22187         fi
22188 else
22189         cf_with_ada=no
22190 fi
22191
22192 # do this "late" to avoid conflict with header-checks
22193 if test "x$with_widec" = xyes ; then
22194         echo "$as_me:22194: checking for wchar_t" >&5
22195 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22196 if test "${ac_cv_type_wchar_t+set}" = set; then
22197   echo $ECHO_N "(cached) $ECHO_C" >&6
22198 else
22199   cat >conftest.$ac_ext <<_ACEOF
22200 #line 22200 "configure"
22201 #include "confdefs.h"
22202 $ac_includes_default
22203 int
22204 main (void)
22205 {
22206 if ((wchar_t *) 0)
22207   return 0;
22208 if (sizeof (wchar_t))
22209   return 0;
22210   ;
22211   return 0;
22212 }
22213 _ACEOF
22214 rm -f conftest.$ac_objext
22215 if { (eval echo "$as_me:22215: \"$ac_compile\"") >&5
22216   (eval $ac_compile) 2>&5
22217   ac_status=$?
22218   echo "$as_me:22218: \$? = $ac_status" >&5
22219   (exit $ac_status); } &&
22220          { ac_try='test -s conftest.$ac_objext'
22221   { (eval echo "$as_me:22221: \"$ac_try\"") >&5
22222   (eval $ac_try) 2>&5
22223   ac_status=$?
22224   echo "$as_me:22224: \$? = $ac_status" >&5
22225   (exit $ac_status); }; }; then
22226   ac_cv_type_wchar_t=yes
22227 else
22228   echo "$as_me: failed program was:" >&5
22229 cat conftest.$ac_ext >&5
22230 ac_cv_type_wchar_t=no
22231 fi
22232 rm -f conftest.$ac_objext conftest.$ac_ext
22233 fi
22234 echo "$as_me:22234: result: $ac_cv_type_wchar_t" >&5
22235 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22236
22237 echo "$as_me:22237: checking size of wchar_t" >&5
22238 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22239 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22240   echo $ECHO_N "(cached) $ECHO_C" >&6
22241 else
22242   if test "$ac_cv_type_wchar_t" = yes; then
22243   if test "$cross_compiling" = yes; then
22244   # Depending upon the size, compute the lo and hi bounds.
22245 cat >conftest.$ac_ext <<_ACEOF
22246 #line 22246 "configure"
22247 #include "confdefs.h"
22248 $ac_includes_default
22249 int
22250 main (void)
22251 {
22252 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22253   ;
22254   return 0;
22255 }
22256 _ACEOF
22257 rm -f conftest.$ac_objext
22258 if { (eval echo "$as_me:22258: \"$ac_compile\"") >&5
22259   (eval $ac_compile) 2>&5
22260   ac_status=$?
22261   echo "$as_me:22261: \$? = $ac_status" >&5
22262   (exit $ac_status); } &&
22263          { ac_try='test -s conftest.$ac_objext'
22264   { (eval echo "$as_me:22264: \"$ac_try\"") >&5
22265   (eval $ac_try) 2>&5
22266   ac_status=$?
22267   echo "$as_me:22267: \$? = $ac_status" >&5
22268   (exit $ac_status); }; }; then
22269   ac_lo=0 ac_mid=0
22270   while :; do
22271     cat >conftest.$ac_ext <<_ACEOF
22272 #line 22272 "configure"
22273 #include "confdefs.h"
22274 $ac_includes_default
22275 int
22276 main (void)
22277 {
22278 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22279   ;
22280   return 0;
22281 }
22282 _ACEOF
22283 rm -f conftest.$ac_objext
22284 if { (eval echo "$as_me:22284: \"$ac_compile\"") >&5
22285   (eval $ac_compile) 2>&5
22286   ac_status=$?
22287   echo "$as_me:22287: \$? = $ac_status" >&5
22288   (exit $ac_status); } &&
22289          { ac_try='test -s conftest.$ac_objext'
22290   { (eval echo "$as_me:22290: \"$ac_try\"") >&5
22291   (eval $ac_try) 2>&5
22292   ac_status=$?
22293   echo "$as_me:22293: \$? = $ac_status" >&5
22294   (exit $ac_status); }; }; then
22295   ac_hi=$ac_mid; break
22296 else
22297   echo "$as_me: failed program was:" >&5
22298 cat conftest.$ac_ext >&5
22299 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22300 fi
22301 rm -f conftest.$ac_objext conftest.$ac_ext
22302   done
22303 else
22304   echo "$as_me: failed program was:" >&5
22305 cat conftest.$ac_ext >&5
22306 ac_hi=-1 ac_mid=-1
22307   while :; do
22308     cat >conftest.$ac_ext <<_ACEOF
22309 #line 22309 "configure"
22310 #include "confdefs.h"
22311 $ac_includes_default
22312 int
22313 main (void)
22314 {
22315 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22316   ;
22317   return 0;
22318 }
22319 _ACEOF
22320 rm -f conftest.$ac_objext
22321 if { (eval echo "$as_me:22321: \"$ac_compile\"") >&5
22322   (eval $ac_compile) 2>&5
22323   ac_status=$?
22324   echo "$as_me:22324: \$? = $ac_status" >&5
22325   (exit $ac_status); } &&
22326          { ac_try='test -s conftest.$ac_objext'
22327   { (eval echo "$as_me:22327: \"$ac_try\"") >&5
22328   (eval $ac_try) 2>&5
22329   ac_status=$?
22330   echo "$as_me:22330: \$? = $ac_status" >&5
22331   (exit $ac_status); }; }; then
22332   ac_lo=$ac_mid; break
22333 else
22334   echo "$as_me: failed program was:" >&5
22335 cat conftest.$ac_ext >&5
22336 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22337 fi
22338 rm -f conftest.$ac_objext conftest.$ac_ext
22339   done
22340 fi
22341 rm -f conftest.$ac_objext conftest.$ac_ext
22342 # Binary search between lo and hi bounds.
22343 while test "x$ac_lo" != "x$ac_hi"; do
22344   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22345   cat >conftest.$ac_ext <<_ACEOF
22346 #line 22346 "configure"
22347 #include "confdefs.h"
22348 $ac_includes_default
22349 int
22350 main (void)
22351 {
22352 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22353   ;
22354   return 0;
22355 }
22356 _ACEOF
22357 rm -f conftest.$ac_objext
22358 if { (eval echo "$as_me:22358: \"$ac_compile\"") >&5
22359   (eval $ac_compile) 2>&5
22360   ac_status=$?
22361   echo "$as_me:22361: \$? = $ac_status" >&5
22362   (exit $ac_status); } &&
22363          { ac_try='test -s conftest.$ac_objext'
22364   { (eval echo "$as_me:22364: \"$ac_try\"") >&5
22365   (eval $ac_try) 2>&5
22366   ac_status=$?
22367   echo "$as_me:22367: \$? = $ac_status" >&5
22368   (exit $ac_status); }; }; then
22369   ac_hi=$ac_mid
22370 else
22371   echo "$as_me: failed program was:" >&5
22372 cat conftest.$ac_ext >&5
22373 ac_lo=`expr $ac_mid + 1`
22374 fi
22375 rm -f conftest.$ac_objext conftest.$ac_ext
22376 done
22377 ac_cv_sizeof_wchar_t=$ac_lo
22378 else
22379   if test "$cross_compiling" = yes; then
22380   { { echo "$as_me:22380: error: cannot run test program while cross compiling" >&5
22381 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22382    { (exit 1); exit 1; }; }
22383 else
22384   cat >conftest.$ac_ext <<_ACEOF
22385 #line 22385 "configure"
22386 #include "confdefs.h"
22387 $ac_includes_default
22388 int
22389 main (void)
22390 {
22391 FILE *f = fopen ("conftest.val", "w");
22392 if (!f)
22393   $ac_main_return (1);
22394 fprintf (f, "%d", (sizeof (wchar_t)));
22395 fclose (f);
22396   ;
22397   return 0;
22398 }
22399 _ACEOF
22400 rm -f conftest$ac_exeext
22401 if { (eval echo "$as_me:22401: \"$ac_link\"") >&5
22402   (eval $ac_link) 2>&5
22403   ac_status=$?
22404   echo "$as_me:22404: \$? = $ac_status" >&5
22405   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22406   { (eval echo "$as_me:22406: \"$ac_try\"") >&5
22407   (eval $ac_try) 2>&5
22408   ac_status=$?
22409   echo "$as_me:22409: \$? = $ac_status" >&5
22410   (exit $ac_status); }; }; then
22411   ac_cv_sizeof_wchar_t=`cat conftest.val`
22412 else
22413   echo "$as_me: program exited with status $ac_status" >&5
22414 echo "$as_me: failed program was:" >&5
22415 cat conftest.$ac_ext >&5
22416 fi
22417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22418 fi
22419 fi
22420 rm -f conftest.val
22421 else
22422   ac_cv_sizeof_wchar_t=0
22423 fi
22424 fi
22425 echo "$as_me:22425: result: $ac_cv_sizeof_wchar_t" >&5
22426 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22427 cat >>confdefs.h <<EOF
22428 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22429 EOF
22430
22431 fi
22432
22433 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22434 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22435 ###
22436 ### ticlib modules may be a separate library, otherwise contained in termlib.
22437 ### termlib modules may be a separate library, otherwise contained in ncurses.
22438 ###
22439 ### The of "+" or " " between the tokens controls the way the script
22440 ### chooses to split module lists into libraries.
22441 ###
22442 ### (see CF_LIB_RULES).
22443 echo "$as_me:22443: checking for library subsets" >&5
22444 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22445 LIB_SUBSETS=
22446
22447 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22448         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22449         if test "$with_ticlib" != no ; then
22450                 LIB_SUBSETS="${LIB_SUBSETS} "
22451         else
22452                 LIB_SUBSETS="${LIB_SUBSETS}+"
22453         fi
22454 fi
22455
22456 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22457 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22458
22459 if test "$with_termlib" != no ; then
22460         LIB_SUBSETS="${LIB_SUBSETS} "
22461 else
22462         LIB_SUBSETS="${LIB_SUBSETS}+"
22463 fi
22464
22465 LIB_SUBSETS="${LIB_SUBSETS}base"
22466
22467 # Most term-driver calls are to tinfo, but some like init_pair are to the
22468 # base library (so it resides in base).
22469 if test "$with_term_driver" != no ; then
22470         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22471         case $cf_cv_system_name in
22472         (*mingw32*|*mingw64*)
22473                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22474                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22475                 ;;
22476         (*)
22477                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22478                 ;;
22479         esac
22480 fi
22481
22482 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22483 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22484
22485 echo "$as_me:22485: result: $LIB_SUBSETS" >&5
22486 echo "${ECHO_T}$LIB_SUBSETS" >&6
22487
22488 ### Construct the list of include-directories to be generated
22489
22490 if test "$srcdir" != "."; then
22491         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22492 fi
22493 CPPFLAGS="-I../include $CPPFLAGS"
22494 if test "$srcdir" != "."; then
22495         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22496 fi
22497 CPPFLAGS="-I. $CPPFLAGS"
22498
22499 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22500 if test "$srcdir" != "."; then
22501         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22502 fi
22503 if test "$GCC" != yes; then
22504         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22505 elif test "$includedir" != "/usr/include"; then
22506         if test "$includedir" = '${prefix}/include' ; then
22507                 if test x$prefix != x/usr ; then
22508                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22509                 fi
22510         else
22511                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22512         fi
22513 fi
22514
22515 ### Build up pieces for makefile rules
22516 echo "$as_me:22516: checking default library suffix" >&5
22517 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22518
22519         case $DFT_LWR_MODEL in
22520         (libtool) DFT_ARG_SUFFIX=''   ;;
22521         (normal)  DFT_ARG_SUFFIX=''   ;;
22522         (debug)   DFT_ARG_SUFFIX='_g' ;;
22523         (profile) DFT_ARG_SUFFIX='_p' ;;
22524         (shared)  DFT_ARG_SUFFIX=''   ;;
22525         esac
22526         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22527 echo "$as_me:22527: result: $DFT_ARG_SUFFIX" >&5
22528 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22529
22530 echo "$as_me:22530: checking default library-dependency suffix" >&5
22531 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22532
22533         case X$DFT_LWR_MODEL in
22534         (Xlibtool)
22535                 DFT_LIB_SUFFIX='.la'
22536                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22537                 ;;
22538         (Xdebug)
22539                 DFT_LIB_SUFFIX='_g.a'
22540                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22541                 ;;
22542         (Xprofile)
22543                 DFT_LIB_SUFFIX='_p.a'
22544                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22545                 ;;
22546         (Xshared)
22547                 case $cf_cv_system_name in
22548                 (aix[5-7]*)
22549                         DFT_LIB_SUFFIX='.so'
22550                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22551                         ;;
22552                 (cygwin*|msys*|mingw*)
22553                         DFT_LIB_SUFFIX='.dll'
22554                         DFT_DEP_SUFFIX='.dll.a'
22555                         ;;
22556                 (darwin*)
22557                         DFT_LIB_SUFFIX='.dylib'
22558                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22559                         ;;
22560                 (hpux*)
22561                         case $target in
22562                         (ia64*)
22563                                 DFT_LIB_SUFFIX='.so'
22564                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22565                                 ;;
22566                         (*)
22567                                 DFT_LIB_SUFFIX='.sl'
22568                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22569                                 ;;
22570                         esac
22571                         ;;
22572                 (*)
22573                         DFT_LIB_SUFFIX='.so'
22574                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22575                         ;;
22576                 esac
22577                 ;;
22578         (*)
22579                 DFT_LIB_SUFFIX='.a'
22580                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22581                 ;;
22582         esac
22583         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22584         then
22585                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22586                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22587         fi
22588 echo "$as_me:22588: result: $DFT_DEP_SUFFIX" >&5
22589 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22590
22591 echo "$as_me:22591: checking default object directory" >&5
22592 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22593
22594         case $DFT_LWR_MODEL in
22595         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22596         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22597         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22598         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22599         (shared)
22600                 case $cf_cv_system_name in
22601                 (cygwin|msys)
22602                         DFT_OBJ_SUBDIR='objects' ;;
22603                 (*)
22604                         DFT_OBJ_SUBDIR='obj_s' ;;
22605                 esac
22606         esac
22607 echo "$as_me:22607: result: $DFT_OBJ_SUBDIR" >&5
22608 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22609
22610 if test "x$cf_with_cxx" = xyes ; then
22611 echo "$as_me:22611: checking c++ library-dependency suffix" >&5
22612 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22613 if test "$with_libtool" != "no"; then
22614         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22615         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22616 elif test "$with_shared_cxx" != "no"; then
22617         # also for g++ users...
22618         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22619 else
22620         # we normally make a static library because C/C++ library rules differ
22621
22622         case Xnormal in
22623         (Xlibtool)
22624                 CXX_LIB_SUFFIX='.la'
22625                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22626                 ;;
22627         (Xdebug)
22628                 CXX_LIB_SUFFIX='_g.a'
22629                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22630                 ;;
22631         (Xprofile)
22632                 CXX_LIB_SUFFIX='_p.a'
22633                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22634                 ;;
22635         (Xshared)
22636                 case $cf_cv_system_name in
22637                 (aix[5-7]*)
22638                         CXX_LIB_SUFFIX='.so'
22639                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22640                         ;;
22641                 (cygwin*|msys*|mingw*)
22642                         CXX_LIB_SUFFIX='.dll'
22643                         CXX_DEP_SUFFIX='.dll.a'
22644                         ;;
22645                 (darwin*)
22646                         CXX_LIB_SUFFIX='.dylib'
22647                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22648                         ;;
22649                 (hpux*)
22650                         case $target in
22651                         (ia64*)
22652                                 CXX_LIB_SUFFIX='.so'
22653                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22654                                 ;;
22655                         (*)
22656                                 CXX_LIB_SUFFIX='.sl'
22657                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22658                                 ;;
22659                         esac
22660                         ;;
22661                 (*)
22662                         CXX_LIB_SUFFIX='.so'
22663                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22664                         ;;
22665                 esac
22666                 ;;
22667         (*)
22668                 CXX_LIB_SUFFIX='.a'
22669                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22670                 ;;
22671         esac
22672         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22673         then
22674                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22675                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22676         fi
22677
22678 fi
22679 echo "$as_me:22679: result: $CXX_LIB_SUFFIX" >&5
22680 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22681
22682 fi
22683
22684 # do not want -ldl in build except as needed for -lncurses dependency
22685 if test "x$with_dlsym" = xyes ; then
22686 if test $DFT_LWR_MODEL = shared || \
22687    test $DFT_LWR_MODEL = libtool ; then
22688
22689 # remove dl library from $LIBS
22690 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22691
22692 fi
22693 fi
22694 ### Set up low-level terminfo dependencies for makefiles.
22695
22696 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22697 # do not need libdl
22698 TICS_LIST=
22699 if test "x$with_dlsym" = xyes ; then
22700
22701 # remove dl library from $SHLIB_LIST
22702 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22703
22704 fi
22705
22706 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22707 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22708 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22709 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22710 then
22711         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22712 fi
22713
22714 if test "$with_ticlib" != no ; then
22715
22716         if test "x$with_ticlib" != xyes ; then
22717                 TICS_NAME=$with_ticlib
22718                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22719                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22720                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22721                 TICS_LIB_SUFFIX="${with_ticlib}"
22722         else
22723                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22724                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22725                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22726                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22727         fi
22728         TICS_LDFLAGS="-L${LIB_DIR}"
22729         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22730 else
22731         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22732         TICS_LDFLAGS="-L${LIB_DIR}"
22733         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22734 fi
22735
22736 if test "$with_termlib" != no ; then
22737
22738         if test "x$with_termlib" != xyes ; then
22739                 TINFO_NAME=$with_termlib
22740                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22741                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22742                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22743                 TINFO_LIB_SUFFIX="${with_termlib}"
22744         else
22745                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22746                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22747                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22748                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22749         fi
22750
22751         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22752         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22753         if test "$DFT_LWR_MODEL" = "libtool"; then
22754                 TEST_ARGS="${TEST_DEPS}"
22755                 TEST_ARG2="${TEST_DEP2}"
22756                 TINFO_LDFLAGS="-L${LIB_DIR}"
22757                 TINFO_LIBS="$TEST_ARGS"
22758                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22759                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22760         else
22761                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22762                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22763                 if test "x$with_term_driver" != xno ; then
22764                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22765                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22766                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22767                 else
22768                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22769                         TINFO_LIBS="$TEST_ARGS"
22770                 fi
22771                 TINFO_LDFLAGS="-L${LIB_DIR}"
22772                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22773         fi
22774 else
22775         # the next lines are needed for linking libtic over libncurses
22776         TINFO_NAME=${LIB_NAME}
22777         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22778         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22779         if test "x$with_tic_depends" = xyes ; then
22780                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22781         else
22782                 TICS_LIST="$SHLIB_LIST"
22783         fi
22784
22785         TINFO_LDFLAGS="-L${LIB_DIR}"
22786         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22787 fi
22788
22789 if test "$DFT_LWR_MODEL" = shared ; then
22790         case $cf_cv_system_name in
22791         (cygwin*|msys*)
22792                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22793                 TINFO_SUFFIX=.dll
22794                 ;;
22795         esac
22796 fi
22797
22798 if test "x$with_dlsym" = xyes ; then
22799
22800 # remove dl library from $TICS_LIST
22801 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22802
22803 fi
22804
22805 if test "$DFT_LWR_MODEL" = "libtool"; then
22806         OBJEXT=lo
22807 fi
22808
22809 # needed for Ada95
22810 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22811
22812 case $DFT_LWR_MODEL in
22813 (normal|debug|profile)
22814
22815 if test "$GCC" = yes ; then
22816         case $cf_cv_system_name in
22817         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22818                 LDFLAGS_STATIC=
22819                 LDFLAGS_SHARED=
22820                 ;;
22821         (*)     # normally, except when broken
22822                 LDFLAGS_STATIC=-static
22823                 LDFLAGS_SHARED=-dynamic
22824                 ;;
22825         esac
22826 else
22827         case $cf_cv_system_name in
22828         (aix[4-7]*)     # from ld manpage
22829                 LDFLAGS_STATIC=-bstatic
22830                 LDFLAGS_SHARED=-bdynamic
22831                 ;;
22832         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22833                 # We could also use just "archive" and "shared".
22834                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22835                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22836                 ;;
22837         (irix*)         # from ld manpage IRIX64
22838                 LDFLAGS_STATIC=-Bstatic
22839                 LDFLAGS_SHARED=-Bdynamic
22840                 ;;
22841         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22842                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22843                 LDFLAGS_STATIC=-noso
22844                 LDFLAGS_SHARED=-so_archive
22845                 ;;
22846         (solaris2*)
22847                 LDFLAGS_STATIC=-Bstatic
22848                 LDFLAGS_SHARED=-Bdynamic
22849                 ;;
22850         esac
22851 fi
22852
22853 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22854 then
22855         echo "$as_me:22855: checking if linker supports switching between static/dynamic" >&5
22856 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22857
22858         rm -f libconftest.a
22859         cat >conftest.$ac_ext <<EOF
22860 #line 22860 "configure"
22861 #include <stdio.h>
22862 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22863 EOF
22864         if { (eval echo "$as_me:22864: \"$ac_compile\"") >&5
22865   (eval $ac_compile) 2>&5
22866   ac_status=$?
22867   echo "$as_me:22867: \$? = $ac_status" >&5
22868   (exit $ac_status); } ; then
22869                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22870                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22871         fi
22872         rm -f conftest.*
22873
22874         cf_save_LIBS="$LIBS"
22875
22876         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22877         cat >conftest.$ac_ext <<_ACEOF
22878 #line 22878 "configure"
22879 #include "confdefs.h"
22880
22881 #line 22881 "configure"
22882 #include <stdio.h>
22883 int cf_ldflags_static(FILE *fp);
22884
22885 int
22886 main (void)
22887 {
22888
22889         return cf_ldflags_static(stdin);
22890
22891   ;
22892   return 0;
22893 }
22894 _ACEOF
22895 rm -f conftest.$ac_objext conftest$ac_exeext
22896 if { (eval echo "$as_me:22896: \"$ac_link\"") >&5
22897   (eval $ac_link) 2>&5
22898   ac_status=$?
22899   echo "$as_me:22899: \$? = $ac_status" >&5
22900   (exit $ac_status); } &&
22901          { ac_try='test -s conftest$ac_exeext'
22902   { (eval echo "$as_me:22902: \"$ac_try\"") >&5
22903   (eval $ac_try) 2>&5
22904   ac_status=$?
22905   echo "$as_me:22905: \$? = $ac_status" >&5
22906   (exit $ac_status); }; }; then
22907
22908         # some linkers simply ignore the -dynamic
22909         case x`file conftest$ac_exeext 2>/dev/null` in
22910         (*static*)
22911                 cf_ldflags_static=no
22912                 ;;
22913         (*)
22914                 cf_ldflags_static=yes
22915                 ;;
22916         esac
22917
22918 else
22919   echo "$as_me: failed program was:" >&5
22920 cat conftest.$ac_ext >&5
22921 cf_ldflags_static=no
22922 fi
22923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22924
22925         rm -f libconftest.*
22926         LIBS="$cf_save_LIBS"
22927
22928         echo "$as_me:22928: result: $cf_ldflags_static" >&5
22929 echo "${ECHO_T}$cf_ldflags_static" >&6
22930
22931         if test $cf_ldflags_static != yes
22932         then
22933                 LDFLAGS_STATIC=
22934                 LDFLAGS_SHARED=
22935         fi
22936 else
22937         LDFLAGS_STATIC=
22938         LDFLAGS_SHARED=
22939 fi
22940
22941         ;;
22942 esac
22943
22944 echo "$as_me:22944: checking where we will install curses.h" >&5
22945 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22946
22947 includesubdir=
22948 if test "$with_overwrite" = no && \
22949  ( test "x$includedir" = 'x${prefix}/include' || \
22950    test "x$includedir" = "x${prefix}/include" )
22951 then
22952         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22953 fi
22954 echo "$as_me:22954: result: ${includedir}${includesubdir}" >&5
22955 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22956
22957 ### Resolve a conflict between normal and wide-curses by forcing applications
22958 ### that will need libutf8 to add it to their configure script.
22959 if test "$with_overwrite" != no ; then
22960 if test "$NCURSES_LIBUTF8" = 1 ; then
22961         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22962         { echo "$as_me:22962: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22963 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22964 fi
22965 fi
22966 WITH_OVERWRITE=$with_overwrite
22967
22968 # used to separate tack out of the tree
22969 NCURSES_TREE=
22970
22971 ### predefined stuff for the test programs
22972
22973 cat >>confdefs.h <<\EOF
22974 #define HAVE_SLK_COLOR 1
22975 EOF
22976
22977 ### Construct the list of subdirectories for which we'll customize makefiles
22978 ### with the appropriate compile-rules.
22979
22980 echo "$as_me:22980: checking for src modules" >&5
22981 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22982
22983 # dependencies and linker-arguments for test-programs
22984 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22985 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22986 if test "$DFT_LWR_MODEL" = "libtool"; then
22987         TEST_ARGS="${TEST_DEPS}"
22988         TEST_ARG2="${TEST_DEP2}"
22989 else
22990         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22991         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22992 fi
22993
22994 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22995 cf_cv_src_modules=
22996 for cf_dir in $modules_to_build
22997 do
22998         if test -f $srcdir/$cf_dir/modules; then
22999
23000                 # We may/may not have tack in the distribution, though the
23001                 # makefile is.
23002                 if test $cf_dir = tack ; then
23003                         if test "x$cf_with_tack" != "xyes"; then
23004                                 continue
23005                         fi
23006                 fi
23007
23008                 if test -z "$cf_cv_src_modules"; then
23009                         cf_cv_src_modules=$cf_dir
23010                 else
23011                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23012                 fi
23013
23014                 # Make the ncurses_cfg.h file record the library interface files as
23015                 # well.  These are header files that are the same name as their
23016                 # directory.  Ncurses is the only library that does not follow
23017                 # that pattern.
23018                 if test $cf_dir = tack ; then
23019                         continue
23020                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23021
23022 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23023
23024                         cat >>confdefs.h <<EOF
23025 #define HAVE_${cf_have_include}_H 1
23026 EOF
23027
23028                         cat >>confdefs.h <<EOF
23029 #define HAVE_LIB${cf_have_include} 1
23030 EOF
23031
23032                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23033                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23034                         if test "$DFT_LWR_MODEL" = "libtool"; then
23035                                 TEST_ARGS="${TEST_DEPS}"
23036                                 TEST_ARG2="${TEST_DEP2}"
23037                         else
23038                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23039                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23040                         fi
23041                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23042                 fi
23043         fi
23044 done
23045 echo "$as_me:23045: result: $cf_cv_src_modules" >&5
23046 echo "${ECHO_T}$cf_cv_src_modules" >&6
23047
23048 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23049 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23050
23051 SRC_SUBDIRS=
23052 if test "x$cf_with_manpages" != xno ; then
23053         SRC_SUBDIRS="$SRC_SUBDIRS man"
23054 fi
23055 SRC_SUBDIRS="$SRC_SUBDIRS include"
23056 for cf_dir in $cf_cv_src_modules
23057 do
23058         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23059 done
23060 if test "x$cf_with_tests" != "xno" ; then
23061         SRC_SUBDIRS="$SRC_SUBDIRS test"
23062 fi
23063 # always make this, to install the ncurses-config script
23064 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23065 if test "$cf_with_cxx_binding" != no; then
23066         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23067         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23068 fi
23069
23070 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23071 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23072
23073 ADA_SUBDIRS=
23074 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23075         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23076         ADA_SUBDIRS="gen src"
23077         if test "x$cf_with_tests" != "xno" ; then
23078                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23079         fi
23080 fi
23081
23082 SUB_MAKEFILES=
23083 for cf_dir in $SRC_SUBDIRS
23084 do
23085         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23086 done
23087
23088 if test -n "$ADA_SUBDIRS"; then
23089         for cf_dir in $ADA_SUBDIRS
23090         do
23091                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23092         done
23093
23094 fi
23095
23096 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23097    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23098    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23099 fi
23100
23101 DIRS_TO_MAKE="lib"
23102 for cf_item in $cf_list_models
23103 do
23104
23105         case $cf_item in
23106         (libtool) cf_subdir='obj_lo'  ;;
23107         (normal)  cf_subdir='objects' ;;
23108         (debug)   cf_subdir='obj_g' ;;
23109         (profile) cf_subdir='obj_p' ;;
23110         (shared)
23111                 case $cf_cv_system_name in
23112                 (cygwin|msys)
23113                         cf_subdir='objects' ;;
23114                 (*)
23115                         cf_subdir='obj_s' ;;
23116                 esac
23117         esac
23118
23119         for cf_item2 in $DIRS_TO_MAKE
23120         do
23121                 test $cf_item2 = $cf_subdir && break
23122         done
23123         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23124 done
23125 for cf_dir in $DIRS_TO_MAKE
23126 do
23127         test ! -d $cf_dir && mkdir $cf_dir
23128 done
23129
23130 # symbols that differ when compiling Ada95 by itself.
23131 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23132
23133 # values to use as strings
23134
23135 cat >>confdefs.h <<EOF
23136 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23137 EOF
23138
23139 cat >>confdefs.h <<EOF
23140 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23141 EOF
23142
23143 ### Now that we're done running tests, add the compiler-warnings, if any
23144
23145 cf_fix_cppflags=no
23146 cf_new_cflags=
23147 cf_new_cppflags=
23148 cf_new_extra_cppflags=
23149
23150 for cf_add_cflags in $EXTRA_CFLAGS
23151 do
23152 case $cf_fix_cppflags in
23153 (no)
23154         case $cf_add_cflags in
23155         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23156                 case $cf_add_cflags in
23157                 (-D*)
23158                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23159
23160                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23161                                 && test -z "${cf_tst_cflags}" \
23162                                 && cf_fix_cppflags=yes
23163
23164                         if test $cf_fix_cppflags = yes ; then
23165
23166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23168
23169                                 continue
23170                         elif test "${cf_tst_cflags}" = "\"'" ; then
23171
23172         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23173         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23174
23175                                 continue
23176                         fi
23177                         ;;
23178                 esac
23179                 case "$CPPFLAGS" in
23180                 (*$cf_add_cflags)
23181                         ;;
23182                 (*)
23183                         case $cf_add_cflags in
23184                         (-D*)
23185                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23186
23187 CPPFLAGS=`echo "$CPPFLAGS" | \
23188         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23189                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23190
23191                                 ;;
23192                         esac
23193
23194         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23195         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23196
23197                         ;;
23198                 esac
23199                 ;;
23200         (*)
23201
23202         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23203         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23204
23205                 ;;
23206         esac
23207         ;;
23208 (yes)
23209
23210         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23211         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23212
23213         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23214
23215         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23216                 && test -z "${cf_tst_cflags}" \
23217                 && cf_fix_cppflags=no
23218         ;;
23219 esac
23220 done
23221
23222 if test -n "$cf_new_cflags" ; then
23223
23224         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23225         CFLAGS="${CFLAGS}$cf_new_cflags"
23226
23227 fi
23228
23229 if test -n "$cf_new_cppflags" ; then
23230
23231         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23232         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23233
23234 fi
23235
23236 if test -n "$cf_new_extra_cppflags" ; then
23237
23238         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23239         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23240
23241 fi
23242
23243 ### Define substitutions for header files to avoid name-pollution
23244
23245 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23246         HAVE_TCGETATTR=1
23247 else
23248         HAVE_TCGETATTR=0
23249 fi
23250
23251 if test "x$ac_cv_header_stdint_h" = xyes ; then
23252         HAVE_STDINT_H=1
23253 else
23254         HAVE_STDINT_H=0
23255 fi
23256
23257 if test "x$ac_cv_header_termio_h" = xyes ; then
23258         HAVE_TERMIO_H=1
23259 else
23260         HAVE_TERMIO_H=0
23261 fi
23262
23263 if test "x$ac_cv_header_termios_h" = xyes ; then
23264         HAVE_TERMIOS_H=1
23265 else
23266         HAVE_TERMIOS_H=0
23267 fi
23268
23269 ################################################################################
23270 test "x$use_database" = xyes && \
23271 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23272
23273 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23274 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23275
23276 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23277 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23278 fi
23279
23280 # Extract the first word of "tic", so it can be a program name with args.
23281 set dummy tic; ac_word=$2
23282 echo "$as_me:23282: checking for $ac_word" >&5
23283 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23284 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23285   echo $ECHO_N "(cached) $ECHO_C" >&6
23286 else
23287   case $TIC_PATH in
23288   [\\/]* | ?:[\\/]*)
23289   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23290   ;;
23291   *)
23292   ac_save_IFS=$IFS; IFS=$ac_path_separator
23293 ac_dummy="$PATH:/usr/local/ncurses/bin"
23294 for ac_dir in $ac_dummy; do
23295   IFS=$ac_save_IFS
23296   test -z "$ac_dir" && ac_dir=.
23297   if $as_executable_p "$ac_dir/$ac_word"; then
23298    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23299    echo "$as_me:23299: found $ac_dir/$ac_word" >&5
23300    break
23301 fi
23302 done
23303
23304   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23305   ;;
23306 esac
23307 fi
23308 TIC_PATH=$ac_cv_path_TIC_PATH
23309
23310 if test -n "$TIC_PATH"; then
23311   echo "$as_me:23311: result: $TIC_PATH" >&5
23312 echo "${ECHO_T}$TIC_PATH" >&6
23313 else
23314   echo "$as_me:23314: result: no" >&5
23315 echo "${ECHO_T}no" >&6
23316 fi
23317
23318 if test -n "$FALLBACK_LIST"
23319 then
23320         if test "$TIC_PATH" = unknown
23321         then
23322                 { echo "$as_me:23322: WARNING: no tic program found for fallbacks" >&5
23323 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23324         fi
23325 fi
23326
23327 if test "x$cf_with_tests" != xno ; then
23328         MAKE_TESTS=
23329 else
23330         MAKE_TESTS="#"
23331 fi
23332
23333 ADAHTML_DIR=../../doc/html/ada
23334
23335 # these could be configurable, but are not currently
23336 PANEL_NAME=panel
23337 MENU_NAME=menu
23338 FORM_NAME=form
23339 CXX_NAME=ncurses++
23340
23341 # workaround for OS/2 (20151017)
23342 case $cf_cv_system_name in
23343 (os2*)
23344         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23345         ;;
23346 (*)
23347         LIBTOOL_OPTS_CXX=
23348         ;;
23349 esac
23350
23351 # workaround for g++ versus Solaris (20131116)
23352 case $cf_cv_system_name in
23353 (solaris2*)
23354         case "x$CPPFLAGS" in
23355         (*-D_XOPEN_SOURCE_EXTENDED*)
23356                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23357
23358 echo "${as_me:-configure}:23358: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23359
23360                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23361                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23362                 ;;
23363         esac
23364         ;;
23365 esac
23366
23367 # Help to automatically enable the extended curses features when using either
23368 # the *-config or the ".pc" files by adding defines.
23369 echo "$as_me:23369: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23370 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23371 PKG_CFLAGS=
23372 for cf_loop1 in $CPPFLAGS_after_XOPEN
23373 do
23374         cf_found=no
23375         for cf_loop2 in $CPPFLAGS_before_XOPEN
23376         do
23377                 if test "x$cf_loop1" = "x$cf_loop2"
23378                 then
23379                         cf_found=yes
23380                         break
23381                 fi
23382         done
23383         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23384 done
23385 echo "$as_me:23385: result: $PKG_CFLAGS" >&5
23386 echo "${ECHO_T}$PKG_CFLAGS" >&6
23387
23388 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23389 case "x$NCURSES_OSPEED" in
23390 (*short*)
23391         cf_compatible=1
23392         ;;
23393 (*)
23394         cf_compatible=0
23395         ;;
23396 esac
23397
23398 cat >>confdefs.h <<EOF
23399 #define NCURSES_OSPEED_COMPAT $cf_compatible
23400 EOF
23401
23402 case "x$cf_cv_typeof_chtype" in
23403 (xshort|xint|xlong)
23404         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23405         ;;
23406 esac
23407
23408 case "x$cf_cv_typeof_mmask_t" in
23409 (xshort|xint|xlong)
23410         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23411         ;;
23412 esac
23413
23414 # substitute into misc/Makefile to suppress
23415 # (un)install.data from the
23416 # (un)install rules.
23417 if test "x$cf_with_db_install" = "xno"; then
23418         MISC_INSTALL_DATA=
23419         MISC_UNINSTALL_DATA=
23420 else
23421         MISC_INSTALL_DATA=install.data
23422         MISC_UNINSTALL_DATA=uninstall.data
23423 fi
23424
23425 SUB_SCRIPTS=
23426
23427 if test -n "$PACKAGE"
23428 then
23429         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23430         export PACKAGE
23431         echo "package: $PACKAGE"
23432 fi
23433
23434 UNALTERED_SYMS=
23435 cf_filter_syms=no
23436
23437 if test -n "$RESULTING_SYMS"
23438 then
23439         cf_filter_syms=$cf_dft_filter_syms
23440         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23441
23442 echo "${as_me:-configure}:23442: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23443
23444 fi
23445
23446 if test "x$WILDCARD_SYMS" = xno
23447 then
23448         cf_filter_syms=yes
23449 fi
23450
23451 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23452
23453 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23454 if test $cf_filter_syms = yes
23455 then
23456         RESULTING_SYMS=resulting.map
23457 fi
23458
23459 if test "x$cross_compiling" = xyes ; then
23460         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23461         CHECK_BUILD="#"
23462 else
23463         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23464         CHECK_BUILD=
23465 fi
23466
23467 cat >>confdefs.h <<\EOF
23468 #define HAVE_CURSES_DATA_BOOLNAMES 1
23469 EOF
23470
23471 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"
23472 ac_config_commands="$ac_config_commands default"
23473 cat >confcache <<\_ACEOF
23474 # This file is a shell script that caches the results of configure
23475 # tests run on this system so they can be shared between configure
23476 # scripts and configure runs, see configure's option --config-cache.
23477 # It is not useful on other systems.  If it contains results you don't
23478 # want to keep, you may remove or edit it.
23479 #
23480 # config.status only pays attention to the cache file if you give it
23481 # the --recheck option to rerun configure.
23482 #
23483 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23484 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23485 # following values.
23486
23487 _ACEOF
23488
23489 # The following way of writing the cache mishandles newlines in values,
23490 # but we know of no workaround that is simple, portable, and efficient.
23491 # So, don't put newlines in cache variables' values.
23492 # Ultrix sh set writes to stderr and can't be redirected directly,
23493 # and sets the high bit in the cache file unless we assign to the vars.
23494 {
23495   (set) 2>&1 |
23496     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23497     *ac_space=\ *)
23498       # `set' does not quote correctly, so add quotes (double-quote
23499       # substitution turns \\\\ into \\, and sed turns \\ into \).
23500       sed -n \
23501         "s/'/'\\\\''/g;
23502           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23503       ;;
23504     *)
23505       # `set' quotes correctly as required by POSIX, so do not add quotes.
23506       sed -n \
23507         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23508       ;;
23509     esac;
23510 } |
23511   sed '
23512      t clear
23513      : clear
23514      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23515      t end
23516      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23517      : end' >>confcache
23518 if cmp -s $cache_file confcache; then :; else
23519   if test -w $cache_file; then
23520     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23521     cat confcache >$cache_file
23522   else
23523     echo "not updating unwritable cache $cache_file"
23524   fi
23525 fi
23526 rm -f confcache
23527
23528 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23529 # Let make expand exec_prefix.
23530 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23531
23532 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23533 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23534 # trailing colons and then remove the whole line if VPATH becomes empty
23535 # (actually we leave an empty line to preserve line numbers).
23536 if test "x$srcdir" = x.; then
23537   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23538 s/:*\$(srcdir):*/:/;
23539 s/:*\${srcdir}:*/:/;
23540 s/:*@srcdir@:*/:/;
23541 s/^\([^=]*=[    ]*\):*/\1/;
23542 s/:*$//;
23543 s/^[^=]*=[      ]*$//;
23544 }'
23545 fi
23546
23547 DEFS=-DHAVE_CONFIG_H
23548
23549 : ${CONFIG_STATUS=./config.status}
23550 ac_clean_files_save=$ac_clean_files
23551 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23552 { echo "$as_me:23552: creating $CONFIG_STATUS" >&5
23553 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23554 cat >$CONFIG_STATUS <<_ACEOF
23555 #! $SHELL
23556 # Generated automatically by configure.
23557 # Run this file to recreate the current configuration.
23558 # Compiler output produced by configure, useful for debugging
23559 # configure, is in config.log if it exists.
23560
23561 debug=false
23562 SHELL=\${CONFIG_SHELL-$SHELL}
23563 ac_cs_invocation="\$0 \$@"
23564
23565 _ACEOF
23566
23567 cat >>$CONFIG_STATUS <<\_ACEOF
23568 # Be Bourne compatible
23569 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23570   emulate sh
23571   NULLCMD=:
23572 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23573   set -o posix
23574 fi
23575
23576 # Name of the executable.
23577 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23578
23579 if expr a : '\(a\)' >/dev/null 2>&1; then
23580   as_expr=expr
23581 else
23582   as_expr=false
23583 fi
23584
23585 rm -f conf$$ conf$$.exe conf$$.file
23586 echo >conf$$.file
23587 if ln -s conf$$.file conf$$ 2>/dev/null; then
23588   # We could just check for DJGPP; but this test a) works b) is more generic
23589   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23590   if test -f conf$$.exe; then
23591     # Don't use ln at all; we don't have any links
23592     as_ln_s='cp -p'
23593   else
23594     as_ln_s='ln -s'
23595   fi
23596 elif ln conf$$.file conf$$ 2>/dev/null; then
23597   as_ln_s=ln
23598 else
23599   as_ln_s='cp -p'
23600 fi
23601 rm -f conf$$ conf$$.exe conf$$.file
23602
23603 as_executable_p="test -f"
23604
23605 # Support unset when possible.
23606 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23607   as_unset=unset
23608 else
23609   as_unset=false
23610 fi
23611
23612 # NLS nuisances.
23613 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23614 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23615 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23616 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23617 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23618 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23619 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23620 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23621
23622 # IFS
23623 # We need space, tab and new line, in precisely that order.
23624 as_nl='
23625 '
23626 IFS="   $as_nl"
23627
23628 # CDPATH.
23629 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23630
23631 exec 6>&1
23632
23633 _ACEOF
23634
23635 # Files that config.status was made for.
23636 if test -n "$ac_config_files"; then
23637   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23638 fi
23639
23640 if test -n "$ac_config_headers"; then
23641   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23642 fi
23643
23644 if test -n "$ac_config_links"; then
23645   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23646 fi
23647
23648 if test -n "$ac_config_commands"; then
23649   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23650 fi
23651
23652 cat >>$CONFIG_STATUS <<\EOF
23653
23654 ac_cs_usage="\
23655 \`$as_me' instantiates files from templates according to the
23656 current configuration.
23657
23658 Usage: $0 [OPTIONS] [FILE]...
23659
23660   -h, --help       print this help, then exit
23661   -V, --version    print version number, then exit
23662   -d, --debug      don't remove temporary files
23663       --recheck    update $as_me by reconfiguring in the same conditions
23664   --file=FILE[:TEMPLATE]
23665                    instantiate the configuration file FILE
23666   --header=FILE[:TEMPLATE]
23667                    instantiate the configuration header FILE
23668
23669 Configuration files:
23670 $config_files
23671
23672 Configuration headers:
23673 $config_headers
23674
23675 Configuration commands:
23676 $config_commands
23677
23678 Report bugs to <dickey@invisible-island.net>."
23679 EOF
23680
23681 cat >>$CONFIG_STATUS <<EOF
23682 ac_cs_version="\\
23683 config.status
23684 configured by $0, generated by GNU Autoconf 2.52.20170501,
23685   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23686
23687 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23688 Free Software Foundation, Inc.
23689 This config.status script is free software; the Free Software Foundation
23690 gives unlimited permission to copy, distribute and modify it."
23691 srcdir=$srcdir
23692 INSTALL="$INSTALL"
23693 EOF
23694
23695 cat >>$CONFIG_STATUS <<\EOF
23696 # If no file are specified by the user, then we need to provide default
23697 # value.  By we need to know if files were specified by the user.
23698 ac_need_defaults=:
23699 while test $# != 0
23700 do
23701   case $1 in
23702   --*=*)
23703     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23704     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23705     shift
23706     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23707     shift
23708     ;;
23709   -*);;
23710   *) # This is not an option, so the user has probably given explicit
23711      # arguments.
23712      ac_need_defaults=false;;
23713   esac
23714
23715   case $1 in
23716   # Handling of the options.
23717 EOF
23718 cat >>$CONFIG_STATUS <<EOF
23719   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23720     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23721     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23722 EOF
23723 cat >>$CONFIG_STATUS <<\EOF
23724   --version | --vers* | -V )
23725     echo "$ac_cs_version"; exit 0 ;;
23726   --he | --h)
23727     # Conflict between --help and --header
23728     { { echo "$as_me:23728: error: ambiguous option: $1
23729 Try \`$0 --help' for more information." >&5
23730 echo "$as_me: error: ambiguous option: $1
23731 Try \`$0 --help' for more information." >&2;}
23732    { (exit 1); exit 1; }; };;
23733   --help | --hel | -h )
23734     echo "$ac_cs_usage"; exit 0 ;;
23735   --debug | --d* | -d )
23736     debug=: ;;
23737   --file | --fil | --fi | --f )
23738     shift
23739     CONFIG_FILES="$CONFIG_FILES $1"
23740     ac_need_defaults=false;;
23741   --header | --heade | --head | --hea )
23742     shift
23743     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23744     ac_need_defaults=false;;
23745
23746   # This is an error.
23747   -*) { { echo "$as_me:23747: error: unrecognized option: $1
23748 Try \`$0 --help' for more information." >&5
23749 echo "$as_me: error: unrecognized option: $1
23750 Try \`$0 --help' for more information." >&2;}
23751    { (exit 1); exit 1; }; } ;;
23752
23753   *) ac_config_targets="$ac_config_targets $1" ;;
23754
23755   esac
23756   shift
23757 done
23758
23759 exec 5>>config.log
23760 cat >&5 << _ACEOF
23761
23762 ## ----------------------- ##
23763 ## Running config.status.  ##
23764 ## ----------------------- ##
23765
23766 This file was extended by $as_me 2.52.20170501, executed with
23767   CONFIG_FILES    = $CONFIG_FILES
23768   CONFIG_HEADERS  = $CONFIG_HEADERS
23769   CONFIG_LINKS    = $CONFIG_LINKS
23770   CONFIG_COMMANDS = $CONFIG_COMMANDS
23771   > $ac_cs_invocation
23772 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23773
23774 _ACEOF
23775 EOF
23776
23777 cat >>$CONFIG_STATUS <<EOF
23778 #
23779 # INIT-COMMANDS section.
23780 #
23781
23782 ### Special initialization commands, used to pass information from the
23783 ### configuration-run into config.status
23784
23785 AWK="$AWK"
23786 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23787 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23788 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23789 ECHO_LD="$ECHO_LD"
23790 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23791 LDCONFIG="$LDCONFIG"
23792 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23793 LIB_NAME="$LIB_NAME"
23794 LIB_PREFIX="$LIB_PREFIX"
23795 LIB_SUBSETS="$LIB_SUBSETS"
23796 LIB_SUFFIX="$LIB_SUFFIX"
23797 LIB_TRACING="$LIB_TRACING"
23798 LN_S="$LN_S"
23799 MAKE_TERMINFO="$MAKE_TERMINFO"
23800 NCURSES_MAJOR="$NCURSES_MAJOR"
23801 NCURSES_MINOR="$NCURSES_MINOR"
23802 NCURSES_OSPEED="$NCURSES_OSPEED"
23803 NCURSES_PATCH="$NCURSES_PATCH"
23804 SRC_SUBDIRS="$SRC_SUBDIRS"
23805 TERMINFO="$TERMINFO"
23806 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23807 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23808 TICS_NAME="$TICS_NAME"
23809 TICS_SUFFIX="$TICS_SUFFIX"
23810 TIC_PATH="$TIC_PATH"
23811 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23812 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23813 TINFO_NAME="$TINFO_NAME"
23814 TINFO_SUFFIX="$TINFO_SUFFIX"
23815 UNALTERED_SYMS="$UNALTERED_SYMS"
23816 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23817 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23818 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23819 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23820 WILDCARD_SYMS="$WILDCARD_SYMS"
23821 WITH_CURSES_H="$with_curses_h"
23822 WITH_ECHO="${enable_echo:=yes}"
23823 WITH_OVERWRITE="$with_overwrite"
23824 cf_LIST_MODELS="$cf_list_models"
23825 cf_cv_abi_version="$cf_cv_abi_version"
23826 cf_cv_do_relink="$cf_cv_do_relink"
23827 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23828 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23829 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23830 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23831 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23832 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23833 cf_cv_rel_version="$cf_cv_rel_version"
23834 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23835 cf_cv_shared_soname='$cf_cv_shared_soname'
23836 cf_cv_shlib_version="$cf_cv_shlib_version"
23837 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23838 cf_cv_system_name="$cf_cv_system_name"
23839 cf_cv_term_driver="$with_term_driver"
23840 cf_with_ada="$cf_with_ada"
23841 cf_with_cxx_binding="$cf_with_cxx_binding"
23842 cf_with_db_install="$cf_with_db_install"
23843 cf_with_manpages="$cf_with_manpages"
23844 cf_with_tests="$cf_with_tests"
23845 host="$host"
23846 target="$target"
23847 with_shared_cxx="$with_shared_cxx"
23848
23849 EOF
23850
23851 cat >>$CONFIG_STATUS <<\EOF
23852 for ac_config_target in $ac_config_targets
23853 do
23854   case "$ac_config_target" in
23855   # Handling of arguments.
23856   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23857   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23858   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23859   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23860   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23861   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23862   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23863   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23864   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23865   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23866   *) { { echo "$as_me:23866: error: invalid argument: $ac_config_target" >&5
23867 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23868    { (exit 1); exit 1; }; };;
23869   esac
23870 done
23871
23872 # If the user did not use the arguments to specify the items to instantiate,
23873 # then the envvar interface is used.  Set only those that are not.
23874 # We use the long form for the default assignment because of an extremely
23875 # bizarre bug on SunOS 4.1.3.
23876 if $ac_need_defaults; then
23877   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23878   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23879   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23880 fi
23881
23882 # Create a temporary directory, and hook for its removal unless debugging.
23883 $debug ||
23884 {
23885   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23886   trap '{ (exit 1); exit 1; }' 1 2 13 15
23887 }
23888
23889 # Create a (secure) tmp directory for tmp files.
23890 : ${TMPDIR=/tmp}
23891 {
23892   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23893   test -n "$tmp" && test -d "$tmp"
23894 }  ||
23895 {
23896   tmp=$TMPDIR/cs$$-$RANDOM
23897   (umask 077 && mkdir $tmp)
23898 } ||
23899 {
23900    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23901    { (exit 1); exit 1; }
23902 }
23903
23904 EOF
23905
23906 cat >>$CONFIG_STATUS <<EOF
23907
23908 #
23909 # CONFIG_FILES section.
23910 #
23911
23912 # No need to generate the scripts if there are no CONFIG_FILES.
23913 # This happens for instance when ./config.status config.h
23914 if test -n "\$CONFIG_FILES"; then
23915   # Protect against being on the right side of a sed subst in config.status.
23916   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23917    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23918 s,@SHELL@,$SHELL,;t t
23919 s,@exec_prefix@,$exec_prefix,;t t
23920 s,@prefix@,$prefix,;t t
23921 s,@program_transform_name@,$program_transform_name,;t t
23922 s,@bindir@,$bindir,;t t
23923 s,@sbindir@,$sbindir,;t t
23924 s,@libexecdir@,$libexecdir,;t t
23925 s,@datarootdir@,$datarootdir,;t t
23926 s,@datadir@,$datadir,;t t
23927 s,@sysconfdir@,$sysconfdir,;t t
23928 s,@sharedstatedir@,$sharedstatedir,;t t
23929 s,@localstatedir@,$localstatedir,;t t
23930 s,@libdir@,$libdir,;t t
23931 s,@includedir@,$includedir,;t t
23932 s,@oldincludedir@,$oldincludedir,;t t
23933 s,@infodir@,$infodir,;t t
23934 s,@mandir@,$mandir,;t t
23935 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23936 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23937 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23938 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23939 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23940 s,@build_alias@,$build_alias,;t t
23941 s,@host_alias@,$host_alias,;t t
23942 s,@target_alias@,$target_alias,;t t
23943 s,@ECHO_C@,$ECHO_C,;t t
23944 s,@ECHO_N@,$ECHO_N,;t t
23945 s,@ECHO_T@,$ECHO_T,;t t
23946 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23947 s,@DEFS@,$DEFS,;t t
23948 s,@LIBS@,$LIBS,;t t
23949 s,@top_builddir@,$top_builddir,;t t
23950 s,@EGREP@,$EGREP,;t t
23951 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23952 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23953 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23954 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23955 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23956 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23957 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23958 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23959 s,@VERSION@,$VERSION,;t t
23960 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23961 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23962 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23963 s,@PACKAGE@,$PACKAGE,;t t
23964 s,@build@,$build,;t t
23965 s,@build_cpu@,$build_cpu,;t t
23966 s,@build_vendor@,$build_vendor,;t t
23967 s,@build_os@,$build_os,;t t
23968 s,@host@,$host,;t t
23969 s,@host_cpu@,$host_cpu,;t t
23970 s,@host_vendor@,$host_vendor,;t t
23971 s,@host_os@,$host_os,;t t
23972 s,@target@,$target,;t t
23973 s,@target_cpu@,$target_cpu,;t t
23974 s,@target_vendor@,$target_vendor,;t t
23975 s,@target_os@,$target_os,;t t
23976 s,@CC@,$CC,;t t
23977 s,@CFLAGS@,$CFLAGS,;t t
23978 s,@LDFLAGS@,$LDFLAGS,;t t
23979 s,@CPPFLAGS@,$CPPFLAGS,;t t
23980 s,@ac_ct_CC@,$ac_ct_CC,;t t
23981 s,@EXEEXT@,$EXEEXT,;t t
23982 s,@OBJEXT@,$OBJEXT,;t t
23983 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23984 s,@CPP@,$CPP,;t t
23985 s,@LDCONFIG@,$LDCONFIG,;t t
23986 s,@CXX@,$CXX,;t t
23987 s,@CXXFLAGS@,$CXXFLAGS,;t t
23988 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23989 s,@AWK@,$AWK,;t t
23990 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23991 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23992 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23993 s,@LINT@,$LINT,;t t
23994 s,@LINT_OPTS@,$LINT_OPTS,;t t
23995 s,@LN_S@,$LN_S,;t t
23996 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23997 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23998 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23999 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24000 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24001 s,@SET_MAKE@,$SET_MAKE,;t t
24002 s,@CTAGS@,$CTAGS,;t t
24003 s,@ETAGS@,$ETAGS,;t t
24004 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24005 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24006 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24007 s,@RANLIB@,$RANLIB,;t t
24008 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24009 s,@LD@,$LD,;t t
24010 s,@ac_ct_LD@,$ac_ct_LD,;t t
24011 s,@AR@,$AR,;t t
24012 s,@ac_ct_AR@,$ac_ct_AR,;t t
24013 s,@NM@,$NM,;t t
24014 s,@ac_ct_NM@,$ac_ct_NM,;t t
24015 s,@ARFLAGS@,$ARFLAGS,;t t
24016 s,@DESTDIR@,$DESTDIR,;t t
24017 s,@BUILD_CC@,$BUILD_CC,;t t
24018 s,@BUILD_CPP@,$BUILD_CPP,;t t
24019 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24020 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24021 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24022 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24023 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24024 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24025 s,@cf_list_models@,$cf_list_models,;t t
24026 s,@ABI_VERSION@,$ABI_VERSION,;t t
24027 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24028 s,@LIBTOOL@,$LIBTOOL,;t t
24029 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24030 s,@LT_UNDEF@,$LT_UNDEF,;t t
24031 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24032 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24033 s,@LIB_CREATE@,$LIB_CREATE,;t t
24034 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24035 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24036 s,@LIB_PREP@,$LIB_PREP,;t t
24037 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24038 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24039 s,@LIB_LINK@,$LIB_LINK,;t t
24040 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24041 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24042 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24043 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24044 s,@TICS_NAME@,$TICS_NAME,;t t
24045 s,@TINFO_NAME@,$TINFO_NAME,;t t
24046 s,@LIB_NAME@,$LIB_NAME,;t t
24047 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24048 s,@CC_G_OPT@,$CC_G_OPT,;t t
24049 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24050 s,@LD_MODEL@,$LD_MODEL,;t t
24051 s,@shlibdir@,$shlibdir,;t t
24052 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24053 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24054 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24055 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24056 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24057 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24058 s,@LINK_PROGS@,$LINK_PROGS,;t t
24059 s,@LINK_TESTS@,$LINK_TESTS,;t t
24060 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24061 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24062 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24063 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24064 s,@RPATH_LIST@,$RPATH_LIST,;t t
24065 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24066 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24067 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24068 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24069 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24070 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24071 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24072 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24073 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24074 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24075 s,@XTERM_KBS@,$XTERM_KBS,;t t
24076 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24077 s,@TERMINFO@,$TERMINFO,;t t
24078 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24079 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24080 s,@TERMPATH@,$TERMPATH,;t t
24081 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24082 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24083 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24084 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24085 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24086 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24087 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24088 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24089 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24090 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24091 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24092 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24093 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24094 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24095 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24096 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24097 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24098 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24099 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24100 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24101 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24102 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24103 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24104 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24105 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24106 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24107 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24108 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24109 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24110 s,@PTHREAD@,$PTHREAD,;t t
24111 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24112 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24113 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24114 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24115 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24116 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24117 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24118 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24119 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24120 s,@ECHO_LT@,$ECHO_LT,;t t
24121 s,@ECHO_LD@,$ECHO_LD,;t t
24122 s,@RULE_CC@,$RULE_CC,;t t
24123 s,@SHOW_CC@,$SHOW_CC,;t t
24124 s,@ECHO_CC@,$ECHO_CC,;t t
24125 s,@ECHO_LINK@,$ECHO_LINK,;t t
24126 s,@ADAFLAGS@,$ADAFLAGS,;t t
24127 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24128 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24129 s,@ADA_TRACE@,$ADA_TRACE,;t t
24130 s,@MATH_LIB@,$MATH_LIB,;t t
24131 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24132 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24133 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24134 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24135 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24136 s,@TEST_LIBS@,$TEST_LIBS,;t t
24137 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24138 s,@CXXCPP@,$CXXCPP,;t t
24139 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24140 s,@CXX_AR@,$CXX_AR,;t t
24141 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24142 s,@CXXLIBS@,$CXXLIBS,;t t
24143 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24144 s,@gnat_exists@,$gnat_exists,;t t
24145 s,@M4_exists@,$M4_exists,;t t
24146 s,@cf_ada_make@,$cf_ada_make,;t t
24147 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24148 s,@cf_compile_generics@,$cf_compile_generics,;t t
24149 s,@cf_generic_objects@,$cf_generic_objects,;t t
24150 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24151 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24152 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24153 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24154 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24155 s,@cf_ada_package@,$cf_ada_package,;t t
24156 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24157 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24158 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24159 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24160 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24161 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24162 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24163 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24164 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24165 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24166 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24167 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24168 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24169 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24170 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24171 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24172 s,@TICS_LIBS@,$TICS_LIBS,;t t
24173 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24174 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24175 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24176 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24177 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24178 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24179 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24180 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24181 s,@includesubdir@,$includesubdir,;t t
24182 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24183 s,@TICS_LIST@,$TICS_LIST,;t t
24184 s,@TINFO_LIST@,$TINFO_LIST,;t t
24185 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24186 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24187 s,@TEST_ARGS@,$TEST_ARGS,;t t
24188 s,@TEST_DEPS@,$TEST_DEPS,;t t
24189 s,@TEST_ARG2@,$TEST_ARG2,;t t
24190 s,@TEST_DEP2@,$TEST_DEP2,;t t
24191 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24192 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24193 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24194 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24195 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24196 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24197 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24198 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24199 s,@cross_compiling@,$cross_compiling,;t t
24200 s,@TIC_PATH@,$TIC_PATH,;t t
24201 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24202 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24203 s,@PANEL_NAME@,$PANEL_NAME,;t t
24204 s,@MENU_NAME@,$MENU_NAME,;t t
24205 s,@FORM_NAME@,$FORM_NAME,;t t
24206 s,@CXX_NAME@,$CXX_NAME,;t t
24207 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24208 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24209 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24210 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24211 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24212 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24213 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24214 CEOF
24215
24216 EOF
24217
24218   cat >>$CONFIG_STATUS <<\EOF
24219   # Split the substitutions into bite-sized pieces for seds with
24220   # small command number limits, like on Digital OSF/1 and HP-UX.
24221   ac_max_sed_lines=48
24222   ac_sed_frag=1 # Number of current file.
24223   ac_beg=1 # First line for current file.
24224   ac_end=$ac_max_sed_lines # Line after last line for current file.
24225   ac_more_lines=:
24226   ac_sed_cmds=
24227   while $ac_more_lines; do
24228     if test $ac_beg -gt 1; then
24229       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24230     else
24231       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24232     fi
24233     if test ! -s $tmp/subs.frag; then
24234       ac_more_lines=false
24235     else
24236       # The purpose of the label and of the branching condition is to
24237       # speed up the sed processing (if there are no `@' at all, there
24238       # is no need to browse any of the substitutions).
24239       # These are the two extra sed commands mentioned above.
24240       (echo ':t
24241   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24242       # It is possible to make a multiline substitution using escaped newlines.
24243       # Ensure that we do not split the substitution between script fragments.
24244       ac_BEG=$ac_end
24245       ac_END=`expr $ac_end + $ac_max_sed_lines`
24246       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24247       if test -s $tmp/subs.next; then
24248         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24249         if test ! -s $tmp/subs.edit; then
24250           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24251           if test ! -s $tmp/subs.edit; then
24252             if test $ac_beg -gt 1; then
24253               ac_end=`expr $ac_end - 1`
24254               continue
24255             fi
24256           fi
24257         fi
24258       fi
24259
24260       if test -z "$ac_sed_cmds"; then
24261         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24262       else
24263         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24264       fi
24265       ac_sed_frag=`expr $ac_sed_frag + 1`
24266       ac_beg=$ac_end
24267       ac_end=`expr $ac_end + $ac_max_sed_lines`
24268     fi
24269   done
24270   if test -z "$ac_sed_cmds"; then
24271     ac_sed_cmds=cat
24272   fi
24273 fi # test -n "$CONFIG_FILES"
24274
24275 EOF
24276 cat >>$CONFIG_STATUS <<\EOF
24277 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24278   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24279   case $ac_file in
24280   - | *:- | *:-:* ) # input from stdin
24281         cat >$tmp/stdin
24282         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24283         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24284   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24285         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24286   * )   ac_file_in=$ac_file.in ;;
24287   esac
24288
24289   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24290   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24291          X"$ac_file" : 'X\(//\)[^/]' \| \
24292          X"$ac_file" : 'X\(//\)$' \| \
24293          X"$ac_file" : 'X\(/\)' \| \
24294          .     : '\(.\)' 2>/dev/null ||
24295 echo X"$ac_file" |
24296     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24297           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24298           /^X\(\/\/\)$/{ s//\1/; q; }
24299           /^X\(\/\).*/{ s//\1/; q; }
24300           s/.*/./; q'`
24301   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24302     { case "$ac_dir" in
24303   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24304   *)                      as_incr_dir=.;;
24305 esac
24306 as_dummy="$ac_dir"
24307 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24308   case $as_mkdir_dir in
24309     # Skip DOS drivespec
24310     ?:) as_incr_dir=$as_mkdir_dir ;;
24311     *)
24312       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24313       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24314     ;;
24315   esac
24316 done; }
24317
24318     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24319     # A "../" for each directory in $ac_dir_suffix.
24320     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24321   else
24322     ac_dir_suffix= ac_dots=
24323   fi
24324
24325   case $srcdir in
24326   .)  ac_srcdir=.
24327       if test -z "$ac_dots"; then
24328          ac_top_srcdir=.
24329       else
24330          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24331       fi ;;
24332   [\\/]* | ?:[\\/]* )
24333       ac_srcdir=$srcdir$ac_dir_suffix;
24334       ac_top_srcdir=$srcdir ;;
24335   *) # Relative path.
24336     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24337     ac_top_srcdir=$ac_dots$srcdir ;;
24338   esac
24339
24340   case $INSTALL in
24341   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24342   *) ac_INSTALL=$ac_dots$INSTALL ;;
24343   esac
24344
24345   if test x"$ac_file" != x-; then
24346     { echo "$as_me:24346: creating $ac_file" >&5
24347 echo "$as_me: creating $ac_file" >&6;}
24348     rm -f "$ac_file"
24349   fi
24350   # Let's still pretend it is `configure' which instantiates (i.e., don't
24351   # use $as_me), people would be surprised to read:
24352   #    /* config.h.  Generated automatically by config.status.  */
24353   configure_input="Generated automatically from `echo $ac_file_in |
24354                                                  sed 's,.*/,,'` by configure."
24355
24356   # First look for the input files in the build tree, otherwise in the
24357   # src tree.
24358   ac_file_inputs=`IFS=:
24359     for f in $ac_file_in; do
24360       case $f in
24361       -) echo $tmp/stdin ;;
24362       [\\/$]*)
24363          # Absolute (can't be DOS-style, as IFS=:)
24364          test -f "$f" || { { echo "$as_me:24364: error: cannot find input file: $f" >&5
24365 echo "$as_me: error: cannot find input file: $f" >&2;}
24366    { (exit 1); exit 1; }; }
24367          echo $f;;
24368       *) # Relative
24369          if test -f "$f"; then
24370            # Build tree
24371            echo $f
24372          elif test -f "$srcdir/$f"; then
24373            # Source tree
24374            echo $srcdir/$f
24375          else
24376            # /dev/null tree
24377            { { echo "$as_me:24377: error: cannot find input file: $f" >&5
24378 echo "$as_me: error: cannot find input file: $f" >&2;}
24379    { (exit 1); exit 1; }; }
24380          fi;;
24381       esac
24382     done` || { (exit 1); exit 1; }
24383 EOF
24384 cat >>$CONFIG_STATUS <<\EOF
24385   ac_warn_datarootdir=no
24386   if test x"$ac_file" != x-; then
24387     for ac_item in $ac_file_inputs
24388     do
24389       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24390       if test -n "$ac_seen"; then
24391         ac_used=`grep '@datarootdir@' $ac_item`
24392         if test -z "$ac_used"; then
24393           { echo "$as_me:24393: WARNING: datarootdir was used implicitly but not set:
24394 $ac_seen" >&5
24395 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24396 $ac_seen" >&2;}
24397           ac_warn_datarootdir=yes
24398         fi
24399       fi
24400       ac_seen=`grep '${datarootdir}' $ac_item`
24401       if test -n "$ac_seen"; then
24402         { echo "$as_me:24402: WARNING: datarootdir was used explicitly but not set:
24403 $ac_seen" >&5
24404 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24405 $ac_seen" >&2;}
24406         ac_warn_datarootdir=yes
24407       fi
24408     done
24409   fi
24410
24411 if test "x$ac_warn_datarootdir" = xyes; then
24412   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24413 fi
24414
24415 EOF
24416 cat >>$CONFIG_STATUS <<EOF
24417   sed "$ac_vpsub
24418 $extrasub
24419 EOF
24420 cat >>$CONFIG_STATUS <<\EOF
24421 :t
24422 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24423 s,@configure_input@,$configure_input,;t t
24424 s,@srcdir@,$ac_srcdir,;t t
24425 s,@top_srcdir@,$ac_top_srcdir,;t t
24426 s,@INSTALL@,$ac_INSTALL,;t t
24427 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24428   rm -f $tmp/stdin
24429   if test x"$ac_file" != x-; then
24430     cp $tmp/out $ac_file
24431
24432     for ac_name in prefix exec_prefix datarootdir
24433     do
24434         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24435         if test -n "$ac_seen"; then
24436             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24437             if test -z "$ac_init"; then
24438               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24439               { echo "$as_me:24439: WARNING: Variable $ac_name is used but was not set:
24440 $ac_seen" >&5
24441 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24442 $ac_seen" >&2;}
24443             fi
24444         fi
24445     done
24446     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24447     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24448     if test -s $tmp/out; then
24449       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24450       { echo "$as_me:24450: WARNING: Some variables may not be substituted:
24451 $ac_seen" >&5
24452 echo "$as_me: WARNING: Some variables may not be substituted:
24453 $ac_seen" >&2;}
24454     fi
24455   else
24456     cat $tmp/out
24457   fi
24458   rm -f $tmp/out
24459
24460 done
24461 EOF
24462 cat >>$CONFIG_STATUS <<\EOF
24463
24464 #
24465 # CONFIG_HEADER section.
24466 #
24467
24468 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24469 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24470 #
24471 # ac_d sets the value in "#define NAME VALUE" lines.
24472 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24473 ac_dB='[        ].*$,\1#\2'
24474 ac_dC=' '
24475 ac_dD=',;t'
24476 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24477 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24478 ac_iB='\([      ]\),\1#\2define\3'
24479 ac_iC=' '
24480 ac_iD='\4,;t'
24481 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24482 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24483 ac_uB='$,\1#\2define\3'
24484 ac_uC=' '
24485 ac_uD=',;t'
24486
24487 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24488   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24489   case $ac_file in
24490   - | *:- | *:-:* ) # input from stdin
24491         cat >$tmp/stdin
24492         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24493         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24494   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24495         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24496   * )   ac_file_in=$ac_file.in ;;
24497   esac
24498
24499   test x"$ac_file" != x- && { echo "$as_me:24499: creating $ac_file" >&5
24500 echo "$as_me: creating $ac_file" >&6;}
24501
24502   # First look for the input files in the build tree, otherwise in the
24503   # src tree.
24504   ac_file_inputs=`IFS=:
24505     for f in $ac_file_in; do
24506       case $f in
24507       -) echo $tmp/stdin ;;
24508       [\\/$]*)
24509          # Absolute (can't be DOS-style, as IFS=:)
24510          test -f "$f" || { { echo "$as_me:24510: error: cannot find input file: $f" >&5
24511 echo "$as_me: error: cannot find input file: $f" >&2;}
24512    { (exit 1); exit 1; }; }
24513          echo $f;;
24514       *) # Relative
24515          if test -f "$f"; then
24516            # Build tree
24517            echo $f
24518          elif test -f "$srcdir/$f"; then
24519            # Source tree
24520            echo $srcdir/$f
24521          else
24522            # /dev/null tree
24523            { { echo "$as_me:24523: error: cannot find input file: $f" >&5
24524 echo "$as_me: error: cannot find input file: $f" >&2;}
24525    { (exit 1); exit 1; }; }
24526          fi;;
24527       esac
24528     done` || { (exit 1); exit 1; }
24529   # Remove the trailing spaces.
24530   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24531
24532 EOF
24533
24534 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24535 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24536 # be either 'cat' or 'sort'.
24537 cat confdefs.h | uniq >conftest.vals
24538
24539 # Break up conftest.vals because some shells have a limit on
24540 # the size of here documents, and old seds have small limits too.
24541
24542 rm -f conftest.tail
24543 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24544 while grep . conftest.vals >/dev/null
24545 do
24546   # Write chunks of a limited-size here document to conftest.frag.
24547   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24548   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24549   echo 'CEOF' >> $CONFIG_STATUS
24550   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24551   rm -f conftest.vals
24552   mv conftest.tail conftest.vals
24553 done
24554 rm -f conftest.vals
24555
24556 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24557 # marker @DEFS@.
24558 echo '  cat >> conftest.edit <<CEOF
24559 /@DEFS@/r conftest.frag
24560 /@DEFS@/d
24561 CEOF
24562 sed -f conftest.edit $tmp/in > $tmp/out
24563 rm -f $tmp/in
24564 mv $tmp/out $tmp/in
24565 rm -f conftest.edit conftest.frag
24566 ' >> $CONFIG_STATUS
24567
24568 cat >>$CONFIG_STATUS <<\EOF
24569   # Let's still pretend it is `configure' which instantiates (i.e., don't
24570   # use $as_me), people would be surprised to read:
24571   #    /* config.h.  Generated automatically by config.status.  */
24572   if test x"$ac_file" = x-; then
24573     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24574   else
24575     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24576   fi
24577   cat $tmp/in >>$tmp/config.h
24578   rm -f $tmp/in
24579   if test x"$ac_file" != x-; then
24580     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24581       { echo "$as_me:24581: $ac_file is unchanged" >&5
24582 echo "$as_me: $ac_file is unchanged" >&6;}
24583     else
24584       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24585          X"$ac_file" : 'X\(//\)[^/]' \| \
24586          X"$ac_file" : 'X\(//\)$' \| \
24587          X"$ac_file" : 'X\(/\)' \| \
24588          .     : '\(.\)' 2>/dev/null ||
24589 echo X"$ac_file" |
24590     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24591           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24592           /^X\(\/\/\)$/{ s//\1/; q; }
24593           /^X\(\/\).*/{ s//\1/; q; }
24594           s/.*/./; q'`
24595       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24596         { case "$ac_dir" in
24597   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24598   *)                      as_incr_dir=.;;
24599 esac
24600 as_dummy="$ac_dir"
24601 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24602   case $as_mkdir_dir in
24603     # Skip DOS drivespec
24604     ?:) as_incr_dir=$as_mkdir_dir ;;
24605     *)
24606       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24607       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24608     ;;
24609   esac
24610 done; }
24611
24612       fi
24613       rm -f $ac_file
24614       mv $tmp/config.h $ac_file
24615     fi
24616   else
24617     cat $tmp/config.h
24618     rm -f $tmp/config.h
24619   fi
24620 done
24621 EOF
24622 cat >>$CONFIG_STATUS <<\EOF
24623 #
24624 # CONFIG_COMMANDS section.
24625 #
24626 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24627   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24628   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24629
24630   case $ac_dest in
24631     default )
24632 if test "x$cf_with_tests" != xno ; then
24633
24634 for cf_dir in test
24635 do
24636         if test ! -d $srcdir/$cf_dir; then
24637                 continue
24638         elif test -f $srcdir/$cf_dir/programs; then
24639                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24640         fi
24641 done
24642
24643 fi
24644
24645 cf_prefix=$LIB_PREFIX
24646
24647 case $cf_cv_shlib_version in
24648 (cygdll|msysdll|mingw)
24649         TINFO_NAME=$TINFO_ARG_SUFFIX
24650         TINFO_SUFFIX=.dll
24651         ;;
24652 esac
24653
24654 if test -n "$TINFO_SUFFIX" ; then
24655         case $TINFO_SUFFIX in
24656         (tw*)
24657                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24658                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24659                 ;;
24660         (t*)
24661                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24662                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24663                 ;;
24664         (w*)
24665                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24666                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24667                 ;;
24668         esac
24669 fi
24670
24671 for cf_dir in $SRC_SUBDIRS
24672 do
24673         if test ! -d $srcdir/$cf_dir ; then
24674                 continue
24675         elif test -f $srcdir/$cf_dir/modules; then
24676
24677                 SHARED_LIB=
24678                 Libs_To_Make=
24679                 cf_awk_program=
24680                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24681                 then
24682                         cf_awk_program="$cf_awk_program\
24683 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24684 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24685 "
24686                 fi
24687
24688                 if test "x$WILDCARD_SYMS" = xno
24689                 then
24690                         cf_awk_program="$cf_awk_program\
24691 /[      ]_\\*;/ { skip=1; next; }\
24692 "
24693                 fi
24694
24695                 if test "x$cf_awk_program" != "x"
24696                 then
24697                         cat >>$cf_dir/Makefile <<CF_EOF
24698
24699 # Generated by CF_LIB_RULES
24700 resulting.map: $UNALTERED_SYMS
24701         $AWK 'BEGIN { skip = 1; last=""; } \
24702 $cf_awk_program \
24703 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24704  skip = 0; last = \$\$0; } \
24705 END { print last; }' < $UNALTERED_SYMS >\$@
24706
24707 distclean::
24708         rm -f resulting.map
24709 CF_EOF
24710                 fi
24711
24712                 for cf_item in $cf_LIST_MODELS
24713                 do
24714
24715         case X$cf_item in
24716         (Xlibtool)
24717                 cf_suffix='.la'
24718                 cf_depsuf=$cf_suffix
24719                 ;;
24720         (Xdebug)
24721                 cf_suffix='_g.a'
24722                 cf_depsuf=$cf_suffix
24723                 ;;
24724         (Xprofile)
24725                 cf_suffix='_p.a'
24726                 cf_depsuf=$cf_suffix
24727                 ;;
24728         (Xshared)
24729                 case $cf_cv_system_name in
24730                 (aix[5-7]*)
24731                         cf_suffix='.so'
24732                         cf_depsuf=$cf_suffix
24733                         ;;
24734                 (cygwin*|msys*|mingw*)
24735                         cf_suffix='.dll'
24736                         cf_depsuf='.dll.a'
24737                         ;;
24738                 (darwin*)
24739                         cf_suffix='.dylib'
24740                         cf_depsuf=$cf_suffix
24741                         ;;
24742                 (hpux*)
24743                         case $target in
24744                         (ia64*)
24745                                 cf_suffix='.so'
24746                                 cf_depsuf=$cf_suffix
24747                                 ;;
24748                         (*)
24749                                 cf_suffix='.sl'
24750                                 cf_depsuf=$cf_suffix
24751                                 ;;
24752                         esac
24753                         ;;
24754                 (*)
24755                         cf_suffix='.so'
24756                         cf_depsuf=$cf_suffix
24757                         ;;
24758                 esac
24759                 ;;
24760         (*)
24761                 cf_suffix='.a'
24762                 cf_depsuf=$cf_suffix
24763                 ;;
24764         esac
24765         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24766         then
24767                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24768                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24769         fi
24770
24771                         cf_libname=$cf_dir
24772                         test "$cf_dir" = c++ && cf_libname=ncurses++
24773                         if test $cf_item = shared ; then
24774                                 if test -n "${LIB_SUFFIX}"
24775                                 then
24776                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24777                                 else
24778                                         cf_shared_suffix="$cf_suffix"
24779                                 fi
24780                                 if test "$cf_cv_do_symlinks" = yes ; then
24781                                         cf_version_name=
24782
24783                                         case "$cf_cv_shlib_version" in
24784                                         (rel)
24785                                                 cf_version_name=REL_VERSION
24786                                                 ;;
24787                                         (abi)
24788                                                 cf_version_name=ABI_VERSION
24789                                                 ;;
24790                                         esac
24791
24792                                         if test -n "$cf_version_name"
24793                                         then
24794                                                 case "$cf_cv_system_name" in
24795                                                 (darwin*)
24796                                                         # "w", etc?
24797                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24798                                                         ;;
24799                                                 (*)
24800                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24801                                                         ;;
24802                                                 esac
24803                                         fi
24804                                         if test -n "${USE_LIB_SUFFIX}"
24805                                         then
24806                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24807                                         else
24808                                                 cf_shared_suffix="$cf_suffix"
24809                                         fi
24810                                 fi
24811                                 # cygwin needs import library, and has unique naming convention
24812                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24813                                 # use 'cyg' prefix for shared lib.
24814                                 case $cf_cv_shlib_version in
24815                                 (cygdll)
24816                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24817                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24818                                         ;;
24819                                 (msysdll)
24820                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24821                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24822                                         ;;
24823                                 (mingw)
24824                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24825                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24826                                         ;;
24827                                 (*)
24828                                         cf_add_lib=
24829                                         ;;
24830                                 esac
24831                                 if test -n "$cf_add_lib"
24832                                 then
24833                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24834                                         continue
24835                                 fi
24836                         fi
24837                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24838                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24839                 done
24840
24841                 if test $cf_dir = ncurses ; then
24842                         cf_subsets="$LIB_SUBSETS"
24843                         cf_r_parts="$cf_subsets"
24844                         cf_liblist="$Libs_To_Make"
24845
24846                         while test -n "$cf_r_parts"
24847                         do
24848                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24849                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24850                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24851                                         cf_add_lib=
24852                                         case $cf_l_parts in
24853                                         (*termlib*)
24854                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24855                                                 ;;
24856                                         (*ticlib*)
24857                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24858                                                 ;;
24859                                         (*)
24860                                                 break
24861                                                 ;;
24862                                         esac
24863                                         if test -n "$cf_add_lib"; then
24864                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24865                                         fi
24866                                 else
24867                                         break
24868                                 fi
24869                         done
24870                 else
24871                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24872                 fi
24873
24874                 if test $cf_dir = c++; then
24875                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24876                                 cf_list=
24877                                 for cf_item in $Libs_To_Make
24878                                 do
24879                                         case $cf_item in
24880                                         (*.a)
24881                                                 ;;
24882                                         (*)
24883                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24884                                                 ;;
24885                                         esac
24886                                         for cf_test in $cf_list
24887                                         do
24888                                                 if test "$cf_test" = "$cf_item"
24889                                                 then
24890                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24891                                                         cf_item=
24892                                                         break
24893                                                 fi
24894                                         done
24895                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24896                                 done
24897                                 Libs_To_Make="$cf_list"
24898                         fi
24899                 fi
24900
24901                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24902                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24903                         $cf_dir/Makefile >$cf_dir/Makefile.out
24904                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24905
24906                 $AWK -f $srcdir/mk-0th.awk \
24907                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24908                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24909
24910                 for cf_subset in $cf_subsets
24911                 do
24912                         cf_subdirs=
24913                         for cf_item in $cf_LIST_MODELS
24914                         do
24915
24916                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24917
24918 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24919
24920                         CXX_MODEL=$cf_ITEM
24921                         if test "$CXX_MODEL" = SHARED; then
24922                                 case $cf_cv_shlib_version in
24923                                 (cygdll|msysdll|mingw)
24924                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24925
24926 echo "${as_me:-configure}:24926: testing overriding CXX_MODEL to SHARED ..." 1>&5
24927
24928                                         with_shared_cxx=yes
24929                                         ;;
24930                                 (*)
24931                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24932                                         ;;
24933                                 esac
24934                         fi
24935
24936         case X$cf_item in
24937         (Xlibtool)
24938                 cf_suffix='.la'
24939                 cf_depsuf=$cf_suffix
24940                 ;;
24941         (Xdebug)
24942                 cf_suffix='_g.a'
24943                 cf_depsuf=$cf_suffix
24944                 ;;
24945         (Xprofile)
24946                 cf_suffix='_p.a'
24947                 cf_depsuf=$cf_suffix
24948                 ;;
24949         (Xshared)
24950                 case $cf_cv_system_name in
24951                 (aix[5-7]*)
24952                         cf_suffix='.so'
24953                         cf_depsuf=$cf_suffix
24954                         ;;
24955                 (cygwin*|msys*|mingw*)
24956                         cf_suffix='.dll'
24957                         cf_depsuf='.dll.a'
24958                         ;;
24959                 (darwin*)
24960                         cf_suffix='.dylib'
24961                         cf_depsuf=$cf_suffix
24962                         ;;
24963                 (hpux*)
24964                         case $target in
24965                         (ia64*)
24966                                 cf_suffix='.so'
24967                                 cf_depsuf=$cf_suffix
24968                                 ;;
24969                         (*)
24970                                 cf_suffix='.sl'
24971                                 cf_depsuf=$cf_suffix
24972                                 ;;
24973                         esac
24974                         ;;
24975                 (*)
24976                         cf_suffix='.so'
24977                         cf_depsuf=$cf_suffix
24978                         ;;
24979                 esac
24980                 ;;
24981         (*)
24982                 cf_suffix='.a'
24983                 cf_depsuf=$cf_suffix
24984                 ;;
24985         esac
24986         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24987         then
24988                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24989                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24990         fi
24991
24992         case $cf_item in
24993         (libtool) cf_subdir='obj_lo'  ;;
24994         (normal)  cf_subdir='objects' ;;
24995         (debug)   cf_subdir='obj_g' ;;
24996         (profile) cf_subdir='obj_p' ;;
24997         (shared)
24998                 case $cf_cv_system_name in
24999                 (cygwin|msys)
25000                         cf_subdir='objects' ;;
25001                 (*)
25002                         cf_subdir='obj_s' ;;
25003                 esac
25004         esac
25005
25006                         # Test for case where we build libtinfo with a different name.
25007                         cf_libname=$cf_dir
25008                         if test $cf_dir = ncurses ; then
25009                                 case $cf_subset in
25010                                 (*base*)
25011                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25012                                         ;;
25013                                 (*termlib*)
25014                                         cf_libname=$TINFO_LIB_SUFFIX
25015                                         ;;
25016                                 (ticlib*)
25017                                         cf_libname=$TICS_LIB_SUFFIX
25018                                         ;;
25019                                 esac
25020                         elif test $cf_dir = c++ ; then
25021                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25022                         else
25023                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25024                         fi
25025                         if test -n "${USE_ARG_SUFFIX}" ; then
25026                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25027                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25028                         fi
25029
25030                         # These dependencies really are for development, not
25031                         # builds, but they are useful in porting, too.
25032                         cf_depend="../include/ncurses_cfg.h"
25033                         if test "$srcdir" = "."; then
25034                                 cf_reldir="."
25035                         else
25036                                 cf_reldir="\${srcdir}"
25037                         fi
25038
25039                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25040                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25041                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25042                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25043                         fi
25044
25045                         cf_dir_suffix=
25046                         old_cf_suffix="$cf_suffix"
25047                         if test "$cf_cv_shlib_version_infix" = yes ; then
25048                         if test -n "$USE_LIB_SUFFIX" ; then
25049                                 case $USE_LIB_SUFFIX in
25050                                 (tw*)
25051                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25052                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25053                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25054                                         ;;
25055                                 (t*)
25056                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25057                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25058                                         cf_dir_suffix=t$EXTRA_SUFFIX
25059                                         ;;
25060                                 (w*)
25061                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25062                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25063                                         cf_dir_suffix=w$EXTRA_SUFFIX
25064                                         ;;
25065                                 (*)
25066                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25067                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25068                                         cf_dir_suffix=$EXTRA_SUFFIX
25069                                         ;;
25070                                 esac
25071                         fi
25072                         fi
25073
25074                         $AWK -f $srcdir/mk-1st.awk \
25075                                 name=${cf_libname}${cf_dir_suffix} \
25076                                 traces=$LIB_TRACING \
25077                                 MODEL=$cf_ITEM \
25078                                 CXX_MODEL=$CXX_MODEL \
25079                                 model=$cf_subdir \
25080                                 prefix=$cf_prefix \
25081                                 suffix=$cf_suffix \
25082                                 subset=$cf_subset \
25083                                 driver=$cf_cv_term_driver \
25084                                 SymLink="$LN_S" \
25085                                 TermlibRoot=$TINFO_NAME \
25086                                 TermlibSuffix=$TINFO_SUFFIX \
25087                                 ShlibVer=$cf_cv_shlib_version \
25088                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25089                                 ReLink=${cf_cv_do_relink:-no} \
25090                                 DoLinks=$cf_cv_do_symlinks \
25091                                 rmSoLocs=$cf_cv_rm_so_locs \
25092                                 ldconfig="$LDCONFIG" \
25093                                 overwrite=$WITH_OVERWRITE \
25094                                 depend="$cf_depend" \
25095                                 host="$host" \
25096                                 libtool_version="$LIBTOOL_VERSION" \
25097                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25098
25099                         cf_suffix="$old_cf_suffix"
25100
25101                         for cf_subdir2 in $cf_subdirs lib
25102                         do
25103                                 test $cf_subdir = $cf_subdir2 && break
25104                         done
25105                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25106                         $AWK -f $srcdir/mk-2nd.awk \
25107                                 name=$cf_dir \
25108                                 traces=$LIB_TRACING \
25109                                 MODEL=$cf_ITEM \
25110                                 model=$cf_subdir \
25111                                 subset=$cf_subset \
25112                                 srcdir=$srcdir \
25113                                 echo=$WITH_ECHO \
25114                                 crenames=$cf_cv_prog_CC_c_o \
25115                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25116                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25117                         cf_subdirs="$cf_subdirs $cf_subdir"
25118                         done
25119                 done
25120         fi
25121
25122         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25123 done
25124
25125 for cf_dir in $SRC_SUBDIRS
25126 do
25127         if test ! -d $srcdir/$cf_dir ; then
25128                 continue
25129         fi
25130
25131         if test -f $cf_dir/Makefile ; then
25132                 case "$cf_dir" in
25133                 (Ada95)
25134                         echo 'libs \' >> Makefile
25135                         echo 'install.libs \' >> Makefile
25136                         echo 'uninstall.libs ::' >> Makefile
25137                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25138                         ;;
25139                 esac
25140         fi
25141
25142         if test -f $srcdir/$cf_dir/modules; then
25143                 echo >> Makefile
25144                 if test -f $srcdir/$cf_dir/headers; then
25145 cat >> Makefile <<CF_EOF
25146 install.includes \\
25147 uninstall.includes \\
25148 CF_EOF
25149                 fi
25150 if test "$cf_dir" != "c++" ; then
25151 echo 'lint \' >> Makefile
25152 fi
25153 cat >> Makefile <<CF_EOF
25154 libs \\
25155 lintlib \\
25156 install.libs \\
25157 uninstall.libs \\
25158 install.$cf_dir \\
25159 uninstall.$cf_dir ::
25160         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25161 CF_EOF
25162         elif test -f $srcdir/$cf_dir/headers; then
25163 cat >> Makefile <<CF_EOF
25164
25165 libs \\
25166 install.libs \\
25167 uninstall.libs \\
25168 install.includes \\
25169 uninstall.includes ::
25170         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25171 CF_EOF
25172 fi
25173 done
25174
25175 if test "x$cf_with_db_install" = xyes; then
25176 cat >> Makefile <<CF_EOF
25177
25178 install.libs uninstall.libs \\
25179 install.data uninstall.data ::
25180 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25181 CF_EOF
25182 else
25183 cat >> Makefile <<CF_EOF
25184
25185 install.libs uninstall.libs ::
25186         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25187 CF_EOF
25188 fi
25189
25190 if test "x$cf_with_manpages" = xyes; then
25191 cat >> Makefile <<CF_EOF
25192
25193 install.man \\
25194 uninstall.man ::
25195         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25196 CF_EOF
25197 fi
25198
25199 cat >> Makefile <<CF_EOF
25200
25201 distclean ::
25202         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25203         rm -f headers.sh headers.sed mk_shared_lib.sh
25204         rm -f edit_man.* man_alias.*
25205         rm -rf \${DIRS_TO_MAKE}
25206 CF_EOF
25207
25208 # Special case: tack's manpage lives in its own directory.
25209 if test "x$cf_with_manpages" = xyes; then
25210 if test "x$cf_with_tack" = "xyes"; then
25211 cat >> Makefile <<CF_EOF
25212
25213 install.man \\
25214 uninstall.man ::
25215         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25216 CF_EOF
25217 fi
25218 fi
25219
25220 rm -f headers.sed headers.sh
25221
25222 echo creating headers.sh
25223 cat >headers.sh <<CF_EOF
25224 #! $SHELL
25225 # This shell script is generated by the 'configure' script.  It is invoked in a
25226 # subdirectory of the build tree.  It generates a sed-script in the parent
25227 # directory that is used to adjust includes for header files that reside in a
25228 # subdirectory of /usr/include, etc.
25229 PRG=""
25230 while test \$# != 3
25231 do
25232 PRG="\$PRG \$1"; shift
25233 done
25234 DST=\$1
25235 REF=\$2
25236 SRC=\$3
25237 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25238 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25239 echo installing \$SRC in \$DST
25240 CF_EOF
25241
25242 if test $WITH_CURSES_H = yes; then
25243         cat >>headers.sh <<CF_EOF
25244 case \$DST in
25245 (/*/include/*)
25246         END=\`basename \$DST\`
25247         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25248         do
25249                 NAME=\`basename \$i\`
25250                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25251         done
25252         ;;
25253 (*)
25254         echo "" >> \$TMPSED
25255         ;;
25256 esac
25257 CF_EOF
25258
25259 else
25260         cat >>headers.sh <<CF_EOF
25261 case \$DST in
25262 (/*/include/*)
25263         END=\`basename \$DST\`
25264         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25265         do
25266                 NAME=\`basename \$i\`
25267                 if test "\$NAME" = "curses.h"
25268                 then
25269                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25270                         NAME=ncurses.h
25271                 fi
25272                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25273         done
25274         ;;
25275 (*)
25276         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25277         ;;
25278 esac
25279 CF_EOF
25280 fi
25281 cat >>headers.sh <<CF_EOF
25282 rm -f \$TMPSRC
25283 sed -f \$TMPSED \$SRC > \$TMPSRC
25284 NAME=\`basename \$SRC\`
25285 CF_EOF
25286 if test $WITH_CURSES_H != yes; then
25287         cat >>headers.sh <<CF_EOF
25288 test "\$NAME" = "curses.h" && NAME=ncurses.h
25289 CF_EOF
25290 fi
25291 cat >>headers.sh <<CF_EOF
25292 # Just in case someone gzip'd manpages, remove the conflicting copy.
25293 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25294
25295 eval \$PRG \$TMPSRC \$DST/\$NAME
25296 rm -f \$TMPSRC \$TMPSED
25297 CF_EOF
25298
25299 chmod 0755 headers.sh
25300
25301 for cf_dir in $SRC_SUBDIRS
25302 do
25303         if test ! -d $srcdir/$cf_dir ; then
25304                 continue
25305         fi
25306
25307         if test -f $srcdir/$cf_dir/headers; then
25308                 $AWK -f $srcdir/mk-hdr.awk \
25309                         subset="$LIB_SUBSETS" \
25310                         compat="$WITH_CURSES_H" \
25311                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25312         fi
25313
25314         if test -f $srcdir/$cf_dir/modules; then
25315                 if test "$cf_dir" != "c++" ; then
25316                         cat >>$cf_dir/Makefile <<"CF_EOF"
25317 depend : ${AUTO_SRC}
25318         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25319
25320 # DO NOT DELETE THIS LINE -- make depend depends on it.
25321 CF_EOF
25322                 fi
25323         fi
25324 done
25325
25326 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25327 if test -z "$USE_OLD_MAKERULES" ; then
25328         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25329 fi
25330 fi
25331  ;;
25332   esac
25333 done
25334 EOF
25335
25336 cat >>$CONFIG_STATUS <<\EOF
25337
25338 { (exit 0); exit 0; }
25339 EOF
25340 chmod +x $CONFIG_STATUS
25341 ac_clean_files=$ac_clean_files_save
25342
25343 # configure is writing to config.log, and then calls config.status.
25344 # config.status does its own redirection, appending to config.log.
25345 # Unfortunately, on DOS this fails, as config.log is still kept open
25346 # by configure, so config.status won't be able to write to it; its
25347 # output is simply discarded.  So we exec the FD to /dev/null,
25348 # effectively closing config.log, so it can be properly (re)opened and
25349 # appended to by config.status.  When coming back to configure, we
25350 # need to make the FD available again.
25351 if test "$no_create" != yes; then
25352   ac_cs_success=:
25353   exec 5>/dev/null
25354   $SHELL $CONFIG_STATUS || ac_cs_success=false
25355   exec 5>>config.log
25356   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25357   # would make configure fail if this is the last instruction.
25358   $ac_cs_success || { (exit 1); exit 1; }
25359 fi
25360 ${MAKE:-make} preinstall