]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20170527
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.641 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20150926.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
777   --with-bool=TYPE        override fallback type of bool variable
778   --with-caps=alt         compile with alternate Caps file
779   --with-chtype=TYPE      override type of chtype
780   --with-ospeed=TYPE      override type of ospeed variable
781   --with-mmask-t=TYPE     override type of mmask_t
782   --with-ccharw-max=XXX   override size CCHARW_MAX
783   --with-tparm-arg=TYPE   override parameter type of tparm
784   --with-rcs-ids          compile-in RCS identifiers
785 Options to Specify How Manpages are Installed:
786   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
787                           optionally formatted/catonly, e.g., gzip,formatted
788   --with-manpage-renames  specify manpage-renaming
789   --with-manpage-aliases  specify manpage-aliases using .so
790   --with-manpage-symlinks specify manpage-aliases using symlinks
791   --with-manpage-tbl      specify manpage processing with tbl
792 Extensions:
793   --disable-ext-funcs     disable function-extensions
794   --enable-sp-funcs       enable SCREEN-extensions
795   --enable-term-driver    enable terminal-driver
796   --enable-const          compile with extra/non-standard const
797   --enable-ext-colors     compile for 256-color support
798   --enable-ext-mouse      compile for extended mouse-encoding
799   --enable-ext-putwin     compile with extended putwin/screendump
800   --enable-no-padding     compile with $NCURSES_NO_PADDING code
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --enable-sigwinch       compile with SIGWINCH handler
803   --enable-tcap-names     compile with user-definable terminal capabilities
804   --with-pthread          use POSIX thread library
805   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
806   --enable-weak-symbols   enable weak-symbols for pthreads
807   --enable-reentrant      compile with reentrant code
808   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
809   --enable-opaque-form    make form-library structures "opaque"
810   --enable-opaque-menu    make menu-library structures "opaque"
811   --enable-opaque-panel   make panel-library structures "opaque"
812   --with-wrap-prefix=XXX  override prefix used for public variables
813 Development Code:
814   --without-develop       disable development options
815   --enable-hard-tabs      compile with hard-tabs code
816   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
817 Experimental Code:
818   --disable-assumed-color do not assume anything about default-colors
819   --disable-hashmap       compile without hashmap scrolling-optimization
820   --enable-colorfgbg      compile-in experimental $COLORFGBG code
821   --enable-interop        compile-in interop bindings
822   --enable-safe-sprintf   compile with experimental safe-sprintf code
823   --disable-scroll-hints  compile without scroll-hints code
824   --enable-wgetch-events  compile with wgetch-events code
825 Testing/development Options:
826   --disable-echo          do not display "compiling" commands
827   --enable-warnings       build: turn on GCC compiler warnings
828   --enable-string-hacks   work around bogus compiler/loader warnings
829   --enable-assertions     test: turn on generation of assertion code
830   --with-dmalloc          test: use Gray Watson's dmalloc library
831   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
832   --with-valgrind         test: use valgrind
833   --disable-leaks         test: free permanent memory, analyze leaks
834   --enable-expanded       test: generate functions for certain macros
835   --disable-macros        test: use functions rather than macros
836   --with-trace            test: add trace() function to all models of ncurses
837   --disable-gnat-projects test: disable GNAT projects even if usable
838 Ada95 Binding Options:
839   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
840   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
841   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
842   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
843
844 Some influential environment variables:
845   CC          C compiler command
846   CFLAGS      C compiler flags
847   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
848               nonstandard directory <lib dir>
849   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
850               headers in a nonstandard directory <include dir>
851   CPP         C preprocessor
852   CXX         C++ compiler command
853   CXXFLAGS    C++ compiler flags
854   CXXCPP      C++ preprocessor
855
856 Use these variables to override the choices made by `configure' or to help
857 it to find libraries and programs with nonstandard names/locations.
858
859 EOF
860 fi
861
862 if test "$ac_init_help" = "recursive"; then
863   # If there are subdirs, report their specific --help.
864   ac_popdir=`pwd`
865   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
866     cd $ac_subdir
867     # A "../" for each directory in /$ac_subdir.
868     ac_dots=`echo $ac_subdir |
869              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
870
871     case $srcdir in
872     .) # No --srcdir option.  We are building in place.
873       ac_sub_srcdir=$srcdir ;;
874     [\\/]* | ?:[\\/]* ) # Absolute path.
875       ac_sub_srcdir=$srcdir/$ac_subdir ;;
876     *) # Relative path.
877       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
878     esac
879
880     # Check for guested configure; otherwise get Cygnus style configure.
881     if test -f $ac_sub_srcdir/configure.gnu; then
882       echo
883       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
884     elif test -f $ac_sub_srcdir/configure; then
885       echo
886       $SHELL $ac_sub_srcdir/configure  --help=recursive
887     elif test -f $ac_sub_srcdir/configure.ac ||
888            test -f $ac_sub_srcdir/configure.in; then
889       echo
890       $ac_configure --help
891     else
892       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
893     fi
894     cd $ac_popdir
895   done
896 fi
897
898 test -n "$ac_init_help" && exit 0
899 if $ac_init_version; then
900   cat <<\EOF
901
902 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
903 Free Software Foundation, Inc.
904 This configure script is free software; the Free Software Foundation
905 gives unlimited permission to copy, distribute and modify it.
906 EOF
907   exit 0
908 fi
909 exec 5>config.log
910 cat >&5 <<EOF
911 This file contains any messages produced by compilers while
912 running configure, to aid debugging if configure makes a mistake.
913
914 It was created by $as_me, which was
915 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
916
917   $ $0 $@
918
919 EOF
920 {
921 cat <<_ASUNAME
922 ## ---------- ##
923 ## Platform.  ##
924 ## ---------- ##
925
926 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
927 uname -m = `(uname -m) 2>/dev/null || echo unknown`
928 uname -r = `(uname -r) 2>/dev/null || echo unknown`
929 uname -s = `(uname -s) 2>/dev/null || echo unknown`
930 uname -v = `(uname -v) 2>/dev/null || echo unknown`
931
932 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
933 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
934
935 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
936 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
937 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
938 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
939 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
940 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
941 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
942
943 PATH = $PATH
944
945 _ASUNAME
946 } >&5
947
948 cat >&5 <<EOF
949 ## ------------ ##
950 ## Core tests.  ##
951 ## ------------ ##
952
953 EOF
954
955 # Keep a trace of the command line.
956 # Strip out --no-create and --no-recursion so they do not pile up.
957 # Also quote any args containing shell meta-characters.
958 ac_configure_args=
959 ac_sep=
960 for ac_arg
961 do
962   case $ac_arg in
963   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
964   | --no-cr | --no-c) ;;
965   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
966   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
967   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
968     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
969     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
970     ac_sep=" " ;;
971   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
972      ac_sep=" " ;;
973   esac
974   # Get rid of the leading space.
975 done
976
977 # When interrupted or exit'd, cleanup temporary files, and complete
978 # config.log.  We remove comments because anyway the quotes in there
979 # would cause problems or look ugly.
980 trap 'exit_status=$?
981   # Save into config.log some information that might help in debugging.
982   echo >&5
983   echo "## ----------------- ##" >&5
984   echo "## Cache variables.  ##" >&5
985   echo "## ----------------- ##" >&5
986   echo >&5
987   # The following way of writing the cache mishandles newlines in values,
988 {
989   (set) 2>&1 |
990     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
991     *ac_space=\ *)
992       sed -n \
993         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
994           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
995       ;;
996     *)
997       sed -n \
998         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
999       ;;
1000     esac;
1001 } >&5
1002   sed "/^$/d" confdefs.h >conftest.log
1003   if test -s conftest.log; then
1004     echo >&5
1005     echo "## ------------ ##" >&5
1006     echo "## confdefs.h.  ##" >&5
1007     echo "## ------------ ##" >&5
1008     echo >&5
1009     cat conftest.log >&5
1010   fi
1011   (echo; echo) >&5
1012   test "$ac_signal" != 0 &&
1013     echo "$as_me: caught signal $ac_signal" >&5
1014   echo "$as_me: exit $exit_status" >&5
1015   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1016     exit $exit_status
1017      ' 0
1018 for ac_signal in 1 2 13 15; do
1019   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1020 done
1021 ac_signal=0
1022
1023 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1024 rm -rf conftest* confdefs.h
1025 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1026 echo >confdefs.h
1027
1028 # Let the site file select an alternate cache file if it wants to.
1029 # Prefer explicitly selected file to automatically selected ones.
1030 if test -z "$CONFIG_SITE"; then
1031   if test "x$prefix" != xNONE; then
1032     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1033   else
1034     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1035   fi
1036 fi
1037 for ac_site_file in $CONFIG_SITE; do
1038   if test -r "$ac_site_file"; then
1039     { echo "$as_me:1039: loading site script $ac_site_file" >&5
1040 echo "$as_me: loading site script $ac_site_file" >&6;}
1041     cat "$ac_site_file" >&5
1042     . "$ac_site_file"
1043   fi
1044 done
1045
1046 if test -r "$cache_file"; then
1047   # Some versions of bash will fail to source /dev/null (special
1048   # files actually), so we avoid doing that.
1049   if test -f "$cache_file"; then
1050     { echo "$as_me:1050: loading cache $cache_file" >&5
1051 echo "$as_me: loading cache $cache_file" >&6;}
1052     case $cache_file in
1053       [\\/]* | ?:[\\/]* ) . $cache_file;;
1054       *)                      . ./$cache_file;;
1055     esac
1056   fi
1057 else
1058   { echo "$as_me:1058: creating cache $cache_file" >&5
1059 echo "$as_me: creating cache $cache_file" >&6;}
1060   >$cache_file
1061 fi
1062
1063 # Check that the precious variables saved in the cache have kept the same
1064 # value.
1065 ac_cache_corrupted=false
1066 for ac_var in `(set) 2>&1 |
1067                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1068   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1069   eval ac_new_set=\$ac_env_${ac_var}_set
1070   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1071   eval ac_new_val="\$ac_env_${ac_var}_value"
1072   case $ac_old_set,$ac_new_set in
1073     set,)
1074       { echo "$as_me:1074: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1075 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1076       ac_cache_corrupted=: ;;
1077     ,set)
1078       { echo "$as_me:1078: error: \`$ac_var' was not set in the previous run" >&5
1079 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1080       ac_cache_corrupted=: ;;
1081     ,);;
1082     *)
1083       if test "x$ac_old_val" != "x$ac_new_val"; then
1084         { echo "$as_me:1084: error: \`$ac_var' has changed since the previous run:" >&5
1085 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1086         { echo "$as_me:1086:   former value:  $ac_old_val" >&5
1087 echo "$as_me:   former value:  $ac_old_val" >&2;}
1088         { echo "$as_me:1088:   current value: $ac_new_val" >&5
1089 echo "$as_me:   current value: $ac_new_val" >&2;}
1090         ac_cache_corrupted=:
1091       fi;;
1092   esac
1093   # Pass precious variables to config.status.  It doesn't matter if
1094   # we pass some twice (in addition to the command line arguments).
1095   if test "$ac_new_set" = set; then
1096     case $ac_new_val in
1097     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1098       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1099       ac_configure_args="$ac_configure_args '$ac_arg'"
1100       ;;
1101     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1102        ;;
1103     esac
1104   fi
1105 done
1106 if $ac_cache_corrupted; then
1107   { echo "$as_me:1107: error: changes in the environment can compromise the build" >&5
1108 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1109   { { echo "$as_me:1109: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1110 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1111    { (exit 1); exit 1; }; }
1112 fi
1113
1114 ac_ext=c
1115 ac_cpp='$CPP $CPPFLAGS'
1116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1119 ac_main_return=return
1120
1121 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1122   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1123                    ECHO_T='     ' ;;
1124   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1125   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1126 esac
1127 echo "#! $SHELL" >conftest.sh
1128 echo  "exit 0"   >>conftest.sh
1129 chmod +x conftest.sh
1130 if { (echo "$as_me:1130: PATH=\".;.\"; conftest.sh") >&5
1131   (PATH=".;."; conftest.sh) 2>&5
1132   ac_status=$?
1133   echo "$as_me:1133: \$? = $ac_status" >&5
1134   (exit $ac_status); }; then
1135   ac_path_separator=';'
1136 else
1137   ac_path_separator=:
1138 fi
1139 PATH_SEPARATOR="$ac_path_separator"
1140 rm -f conftest.sh
1141
1142 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1143
1144 top_builddir=`pwd`
1145
1146 echo "$as_me:1146: checking for egrep" >&5
1147 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1148 if test "${ac_cv_prog_egrep+set}" = set; then
1149   echo $ECHO_N "(cached) $ECHO_C" >&6
1150 else
1151   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1152                 then ac_cv_prog_egrep='grep -E'
1153                 else ac_cv_prog_egrep='egrep'
1154         fi
1155 fi
1156 echo "$as_me:1156: result: $ac_cv_prog_egrep" >&5
1157 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1158         EGREP=$ac_cv_prog_egrep
1159
1160         test -z "$EGREP" && { { echo "$as_me:1160: error: No egrep program found" >&5
1161 echo "$as_me: error: No egrep program found" >&2;}
1162    { (exit 1); exit 1; }; }
1163
1164 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1165 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1166 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1167 cf_cv_abi_version=${NCURSES_MAJOR}
1168 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1169 cf_cv_timestamp=`date`
1170 echo "$as_me:1170: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1171 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1172
1173 if test -f $srcdir/VERSION ; then
1174         echo "$as_me:1174: checking for package version" >&5
1175 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1176
1177         # if there are not enough fields, cut returns the last one...
1178         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1179         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1180         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1181
1182         # this is how CF_BUNDLED_INTL uses $VERSION:
1183         VERSION="$cf_field1"
1184
1185         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1186         test -z "$VERSION_MAJOR" && { { echo "$as_me:1186: error: missing major-version" >&5
1187 echo "$as_me: error: missing major-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1191         test -z "$VERSION_MINOR" && { { echo "$as_me:1191: error: missing minor-version" >&5
1192 echo "$as_me: error: missing minor-version" >&2;}
1193    { (exit 1); exit 1; }; }
1194
1195         echo "$as_me:1195: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1196 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1197
1198         echo "$as_me:1198: checking for package patch date" >&5
1199 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1200         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1201         case .$VERSION_PATCH in
1202         (.)
1203                 { { echo "$as_me:1203: error: missing patch-date $VERSION_PATCH" >&5
1204 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1205    { (exit 1); exit 1; }; }
1206                 ;;
1207         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1208                 ;;
1209         (*)
1210                 { { echo "$as_me:1210: error: illegal patch-date $VERSION_PATCH" >&5
1211 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1212    { (exit 1); exit 1; }; }
1213                 ;;
1214         esac
1215         echo "$as_me:1215: result: $VERSION_PATCH" >&5
1216 echo "${ECHO_T}$VERSION_PATCH" >&6
1217 else
1218         { { echo "$as_me:1218: error: did not find $srcdir/VERSION" >&5
1219 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1220    { (exit 1); exit 1; }; }
1221 fi
1222
1223 # show the actual data that we have for versions:
1224 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1225
1226 echo "${as_me:-configure}:1226: testing ABI VERSION $VERSION ..." 1>&5
1227
1228 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1229
1230 echo "${as_me:-configure}:1230: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1231
1232 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1233
1234 echo "${as_me:-configure}:1234: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1235
1236 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1237
1238 echo "${as_me:-configure}:1238: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1239
1240         cf_PACKAGE=NCURSES
1241         PACKAGE=ncurses
1242
1243 cat >>confdefs.h <<EOF
1244 #define PACKAGE "$PACKAGE"
1245 EOF
1246
1247 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1248
1249         cat >>confdefs.h <<EOF
1250 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1251 EOF
1252
1253         cat >>confdefs.h <<EOF
1254 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1255 EOF
1256
1257 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1258
1259 # Check whether --with-rel-version or --without-rel-version was given.
1260 if test "${with_rel_version+set}" = set; then
1261   withval="$with_rel_version"
1262   { echo "$as_me:1262: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1263 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1264  cf_cv_rel_version=$withval
1265 fi;
1266
1267  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1268  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1269
1270 if test -n "$NCURSES_MAJOR" ; then
1271   case $NCURSES_MAJOR in
1272   ([0-9]*)
1273         ;;
1274   (*)
1275         { { echo "$as_me:1275: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1276 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1277    { (exit 1); exit 1; }; }
1278         ;;
1279   esac
1280 else
1281   { { echo "$as_me:1281: error: Release major-version value is empty" >&5
1282 echo "$as_me: error: Release major-version value is empty" >&2;}
1283    { (exit 1); exit 1; }; }
1284 fi
1285
1286 if test -n "$NCURSES_MINOR" ; then
1287   case $NCURSES_MINOR in
1288   ([0-9]*)
1289         ;;
1290   (*)
1291         { { echo "$as_me:1291: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1292 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1293    { (exit 1); exit 1; }; }
1294         ;;
1295   esac
1296 else
1297   { { echo "$as_me:1297: error: Release minor-version value is empty" >&5
1298 echo "$as_me: error: Release minor-version value is empty" >&2;}
1299    { (exit 1); exit 1; }; }
1300 fi
1301
1302 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1303
1304 # Check whether --with-abi-version or --without-abi-version was given.
1305 if test "${with_abi_version+set}" = set; then
1306   withval="$with_abi_version"
1307
1308         if test "x$cf_cv_abi_version" != "x$withval"
1309         then
1310                 { echo "$as_me:1310: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1311 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1312                 case $cf_cv_rel_version in
1313                 (5.*)
1314                         cf_cv_rel_version=$withval.0
1315                         ;;
1316                 (6.*)
1317                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1318                         ;;
1319                 esac
1320         fi
1321         cf_cv_abi_version=$withval
1322 fi;
1323
1324 if test -n "$cf_cv_abi_version" ; then
1325   case $cf_cv_abi_version in
1326   ([0-9]*)
1327         ;;
1328   (*)
1329         { { echo "$as_me:1329: error: ABI version is not a number: $cf_cv_abi_version" >&5
1330 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1331    { (exit 1); exit 1; }; }
1332         ;;
1333   esac
1334 else
1335   { { echo "$as_me:1335: error: ABI version value is empty" >&5
1336 echo "$as_me: error: ABI version value is empty" >&2;}
1337    { (exit 1); exit 1; }; }
1338 fi
1339
1340 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1341 then
1342         case $cf_cv_rel_version in
1343         (5.*)
1344                 cf_cv_rel_version=$with_abi_version.0
1345                 ;;
1346         esac
1347 fi
1348
1349 ac_aux_dir=
1350 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1351   if test -f $ac_dir/install-sh; then
1352     ac_aux_dir=$ac_dir
1353     ac_install_sh="$ac_aux_dir/install-sh -c"
1354     break
1355   elif test -f $ac_dir/install.sh; then
1356     ac_aux_dir=$ac_dir
1357     ac_install_sh="$ac_aux_dir/install.sh -c"
1358     break
1359   elif test -f $ac_dir/shtool; then
1360     ac_aux_dir=$ac_dir
1361     ac_install_sh="$ac_aux_dir/shtool install -c"
1362     break
1363   fi
1364 done
1365 if test -z "$ac_aux_dir"; then
1366   { { echo "$as_me:1366: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1367 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1368    { (exit 1); exit 1; }; }
1369 fi
1370 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1371 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1372 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1373
1374 # Make sure we can run config.sub.
1375 $ac_config_sub sun4 >/dev/null 2>&1 ||
1376   { { echo "$as_me:1376: error: cannot run $ac_config_sub" >&5
1377 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1378    { (exit 1); exit 1; }; }
1379
1380 echo "$as_me:1380: checking build system type" >&5
1381 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1382 if test "${ac_cv_build+set}" = set; then
1383   echo $ECHO_N "(cached) $ECHO_C" >&6
1384 else
1385   ac_cv_build_alias=$build_alias
1386 test -z "$ac_cv_build_alias" &&
1387   ac_cv_build_alias=`$ac_config_guess`
1388 test -z "$ac_cv_build_alias" &&
1389   { { echo "$as_me:1389: error: cannot guess build type; you must specify one" >&5
1390 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1391    { (exit 1); exit 1; }; }
1392 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1393   { { echo "$as_me:1393: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1394 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1395    { (exit 1); exit 1; }; }
1396
1397 fi
1398 echo "$as_me:1398: result: $ac_cv_build" >&5
1399 echo "${ECHO_T}$ac_cv_build" >&6
1400 build=$ac_cv_build
1401 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1402 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1403 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1404
1405 echo "$as_me:1405: checking host system type" >&5
1406 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1407 if test "${ac_cv_host+set}" = set; then
1408   echo $ECHO_N "(cached) $ECHO_C" >&6
1409 else
1410   ac_cv_host_alias=$host_alias
1411 test -z "$ac_cv_host_alias" &&
1412   ac_cv_host_alias=$ac_cv_build_alias
1413 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1414   { { echo "$as_me:1414: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1415 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1416    { (exit 1); exit 1; }; }
1417
1418 fi
1419 echo "$as_me:1419: result: $ac_cv_host" >&5
1420 echo "${ECHO_T}$ac_cv_host" >&6
1421 host=$ac_cv_host
1422 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1423 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1424 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1425
1426 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1427         echo "$as_me:1427: checking target system type" >&5
1428 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1429 if test "${ac_cv_target+set}" = set; then
1430   echo $ECHO_N "(cached) $ECHO_C" >&6
1431 else
1432   ac_cv_target_alias=$target_alias
1433 test "x$ac_cv_target_alias" = "x" &&
1434   ac_cv_target_alias=$ac_cv_host_alias
1435 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1436   { { echo "$as_me:1436: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1437 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1438    { (exit 1); exit 1; }; }
1439
1440 fi
1441 echo "$as_me:1441: result: $ac_cv_target" >&5
1442 echo "${ECHO_T}$ac_cv_target" >&6
1443 target=$ac_cv_target
1444 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1445 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1446 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1447
1448 # The aliases save the names the user supplied, while $host etc.
1449 # will get canonicalized.
1450 test -n "$target_alias" &&
1451   test "$program_prefix$program_suffix$program_transform_name" = \
1452     NONENONEs,x,x, &&
1453   program_prefix=${target_alias}-
1454         system_name="$host_os"
1455 else
1456         system_name="`(uname -s -r) 2>/dev/null`"
1457         if test -z "$system_name" ; then
1458                 system_name="`(hostname) 2>/dev/null`"
1459         fi
1460 fi
1461 test -n "$system_name" &&
1462 cat >>confdefs.h <<EOF
1463 #define SYSTEM_NAME "$system_name"
1464 EOF
1465
1466 if test "${cf_cv_system_name+set}" = set; then
1467   echo $ECHO_N "(cached) $ECHO_C" >&6
1468 else
1469   cf_cv_system_name="$system_name"
1470 fi
1471
1472 test -z "$system_name" && system_name="$cf_cv_system_name"
1473 test -n "$cf_cv_system_name" && echo "$as_me:1473: result: Configuring for $cf_cv_system_name" >&5
1474 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1475
1476 if test ".$system_name" != ".$cf_cv_system_name" ; then
1477         echo "$as_me:1477: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1478 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1479         { { echo "$as_me:1479: error: \"Please remove config.cache and try again.\"" >&5
1480 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1481    { (exit 1); exit 1; }; }
1482 fi
1483
1484 # Check whether --with-system-type or --without-system-type was given.
1485 if test "${with_system_type+set}" = set; then
1486   withval="$with_system_type"
1487   { echo "$as_me:1487: WARNING: overriding system type to $withval" >&5
1488 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1489         cf_cv_system_name=$withval
1490         host_os=$withval
1491
1492 fi;
1493
1494 ###     Save the given $CFLAGS to allow user-override.
1495 cf_user_CFLAGS="$CFLAGS"
1496
1497 ###     Default install-location
1498
1499 echo "$as_me:1499: checking for prefix" >&5
1500 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1501 if test "x$prefix" = "xNONE" ; then
1502         case "$cf_cv_system_name" in
1503                 # non-vendor systems don't have a conflict
1504         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1505                 prefix=/usr
1506                 ;;
1507         (*)     prefix=$ac_default_prefix
1508                 ;;
1509         esac
1510 fi
1511 echo "$as_me:1511: result: $prefix" >&5
1512 echo "${ECHO_T}$prefix" >&6
1513
1514 if test "x$prefix" = "xNONE" ; then
1515 echo "$as_me:1515: checking for default include-directory" >&5
1516 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1517 test -n "$verbose" && echo 1>&6
1518 for cf_symbol in \
1519         $includedir \
1520         $includedir/ncurses \
1521         $prefix/include \
1522         $prefix/include/ncurses \
1523         /usr/local/include \
1524         /usr/local/include/ncurses \
1525         /usr/include \
1526         /usr/include/ncurses
1527 do
1528         cf_dir=`eval echo $cf_symbol`
1529         if test -f $cf_dir/curses.h ; then
1530         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1531                 includedir="$cf_symbol"
1532                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1533                 break
1534         fi
1535         fi
1536         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1537 done
1538 echo "$as_me:1538: result: $includedir" >&5
1539 echo "${ECHO_T}$includedir" >&6
1540 fi
1541
1542 ### Defaults for ncurses ABI
1543
1544 case x$cf_cv_abi_version in
1545 (x[6789])
1546         cf_dft_ext_colors=yes
1547         cf_dft_ext_const=yes
1548         cf_dft_ext_mouse=yes
1549         cf_dft_ext_putwin=yes
1550         cf_dft_ext_spfuncs=yes
1551         cf_dft_filter_syms=yes
1552         cf_dft_chtype=uint32_t
1553         cf_dft_mmask_t=uint32_t
1554         cf_dft_interop=yes
1555         cf_dft_tparm_arg=intptr_t
1556         cf_dft_with_lp64=yes
1557         ;;
1558 (*)
1559         cf_dft_ext_colors=no
1560         cf_dft_ext_const=no
1561         cf_dft_ext_mouse=no
1562         cf_dft_ext_putwin=no
1563         cf_dft_ext_spfuncs=no
1564         cf_dft_filter_syms=no
1565         cf_dft_chtype=auto
1566         cf_dft_mmask_t=auto
1567         cf_dft_interop=no
1568         cf_dft_tparm_arg=long
1569         cf_dft_with_lp64=no
1570         ;;
1571 esac
1572
1573 ###     Checks for programs.
1574
1575 # Check whether --with-ada or --without-ada was given.
1576 if test "${with_ada+set}" = set; then
1577   withval="$with_ada"
1578   cf_with_ada=$withval
1579 else
1580   cf_with_ada=yes
1581 fi;
1582 if test "x$cf_with_ada" = xyes
1583 then
1584         cf_PROG_CC="gnatgcc gcc cc"
1585 else
1586         cf_PROG_CC="gcc cc"
1587 fi
1588
1589 ac_ext=c
1590 ac_cpp='$CPP $CPPFLAGS'
1591 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1592 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1593 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1594 ac_main_return=return
1595 if test -n "$ac_tool_prefix"; then
1596   for ac_prog in $cf_PROG_CC
1597   do
1598     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1599 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1600 echo "$as_me:1600: checking for $ac_word" >&5
1601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1602 if test "${ac_cv_prog_CC+set}" = set; then
1603   echo $ECHO_N "(cached) $ECHO_C" >&6
1604 else
1605   if test -n "$CC"; then
1606   ac_cv_prog_CC="$CC" # Let the user override the test.
1607 else
1608   ac_save_IFS=$IFS; IFS=$ac_path_separator
1609 ac_dummy="$PATH"
1610 for ac_dir in $ac_dummy; do
1611   IFS=$ac_save_IFS
1612   test -z "$ac_dir" && ac_dir=.
1613   $as_executable_p "$ac_dir/$ac_word" || continue
1614 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1615 echo "$as_me:1615: found $ac_dir/$ac_word" >&5
1616 break
1617 done
1618
1619 fi
1620 fi
1621 CC=$ac_cv_prog_CC
1622 if test -n "$CC"; then
1623   echo "$as_me:1623: result: $CC" >&5
1624 echo "${ECHO_T}$CC" >&6
1625 else
1626   echo "$as_me:1626: result: no" >&5
1627 echo "${ECHO_T}no" >&6
1628 fi
1629
1630     test -n "$CC" && break
1631   done
1632 fi
1633 if test -z "$CC"; then
1634   ac_ct_CC=$CC
1635   for ac_prog in $cf_PROG_CC
1636 do
1637   # Extract the first word of "$ac_prog", so it can be a program name with args.
1638 set dummy $ac_prog; ac_word=$2
1639 echo "$as_me:1639: checking for $ac_word" >&5
1640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1642   echo $ECHO_N "(cached) $ECHO_C" >&6
1643 else
1644   if test -n "$ac_ct_CC"; then
1645   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1646 else
1647   ac_save_IFS=$IFS; IFS=$ac_path_separator
1648 ac_dummy="$PATH"
1649 for ac_dir in $ac_dummy; do
1650   IFS=$ac_save_IFS
1651   test -z "$ac_dir" && ac_dir=.
1652   $as_executable_p "$ac_dir/$ac_word" || continue
1653 ac_cv_prog_ac_ct_CC="$ac_prog"
1654 echo "$as_me:1654: found $ac_dir/$ac_word" >&5
1655 break
1656 done
1657
1658 fi
1659 fi
1660 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1661 if test -n "$ac_ct_CC"; then
1662   echo "$as_me:1662: result: $ac_ct_CC" >&5
1663 echo "${ECHO_T}$ac_ct_CC" >&6
1664 else
1665   echo "$as_me:1665: result: no" >&5
1666 echo "${ECHO_T}no" >&6
1667 fi
1668
1669   test -n "$ac_ct_CC" && break
1670 done
1671
1672   CC=$ac_ct_CC
1673 fi
1674
1675 test -z "$CC" && { { echo "$as_me:1675: error: no acceptable cc found in \$PATH" >&5
1676 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1677    { (exit 1); exit 1; }; }
1678
1679 # Provide some information about the compiler.
1680 echo "$as_me:1680:" \
1681      "checking for C compiler version" >&5
1682 ac_compiler=`set X $ac_compile; echo $2`
1683 { (eval echo "$as_me:1683: \"$ac_compiler --version </dev/null >&5\"") >&5
1684   (eval $ac_compiler --version </dev/null >&5) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -v </dev/null >&5\"") >&5
1689   (eval $ac_compiler -v </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -V </dev/null >&5\"") >&5
1694   (eval $ac_compiler -V </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698
1699 cat >conftest.$ac_ext <<_ACEOF
1700 #line 1700 "configure"
1701 #include "confdefs.h"
1702
1703 int
1704 main ()
1705 {
1706
1707   ;
1708   return 0;
1709 }
1710 _ACEOF
1711 ac_clean_files_save=$ac_clean_files
1712 ac_clean_files="$ac_clean_files a.out a.exe"
1713 # Try to create an executable without -o first, disregard a.out.
1714 # It will help us diagnose broken compilers, and finding out an intuition
1715 # of exeext.
1716 echo "$as_me:1716: checking for C compiler default output" >&5
1717 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1718 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1719 if { (eval echo "$as_me:1719: \"$ac_link_default\"") >&5
1720   (eval $ac_link_default) 2>&5
1721   ac_status=$?
1722   echo "$as_me:1722: \$? = $ac_status" >&5
1723   (exit $ac_status); }; then
1724   # Find the output, starting from the most likely.  This scheme is
1725 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1726 # resort.
1727 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1728                 ls a.out conftest 2>/dev/null;
1729                 ls a.* conftest.* 2>/dev/null`; do
1730   case $ac_file in
1731     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1732     a.out ) # We found the default executable, but exeext='' is most
1733             # certainly right.
1734             break;;
1735     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1736           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1737           export ac_cv_exeext
1738           break;;
1739     * ) break;;
1740   esac
1741 done
1742 else
1743   echo "$as_me: failed program was:" >&5
1744 cat conftest.$ac_ext >&5
1745 { { echo "$as_me:1745: error: C compiler cannot create executables" >&5
1746 echo "$as_me: error: C compiler cannot create executables" >&2;}
1747    { (exit 77); exit 77; }; }
1748 fi
1749
1750 ac_exeext=$ac_cv_exeext
1751 echo "$as_me:1751: result: $ac_file" >&5
1752 echo "${ECHO_T}$ac_file" >&6
1753
1754 # Check the compiler produces executables we can run.  If not, either
1755 # the compiler is broken, or we cross compile.
1756 echo "$as_me:1756: checking whether the C compiler works" >&5
1757 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1758 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1759 # If not cross compiling, check that we can run a simple program.
1760 if test "$cross_compiling" != yes; then
1761   if { ac_try='./$ac_file'
1762   { (eval echo "$as_me:1762: \"$ac_try\"") >&5
1763   (eval $ac_try) 2>&5
1764   ac_status=$?
1765   echo "$as_me:1765: \$? = $ac_status" >&5
1766   (exit $ac_status); }; }; then
1767     cross_compiling=no
1768   else
1769     if test "$cross_compiling" = maybe; then
1770         cross_compiling=yes
1771     else
1772         { { echo "$as_me:1772: error: cannot run C compiled programs.
1773 If you meant to cross compile, use \`--host'." >&5
1774 echo "$as_me: error: cannot run C compiled programs.
1775 If you meant to cross compile, use \`--host'." >&2;}
1776    { (exit 1); exit 1; }; }
1777     fi
1778   fi
1779 fi
1780 echo "$as_me:1780: result: yes" >&5
1781 echo "${ECHO_T}yes" >&6
1782
1783 rm -f a.out a.exe conftest$ac_cv_exeext
1784 ac_clean_files=$ac_clean_files_save
1785 # Check the compiler produces executables we can run.  If not, either
1786 # the compiler is broken, or we cross compile.
1787 echo "$as_me:1787: checking whether we are cross compiling" >&5
1788 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1789 echo "$as_me:1789: result: $cross_compiling" >&5
1790 echo "${ECHO_T}$cross_compiling" >&6
1791
1792 echo "$as_me:1792: checking for executable suffix" >&5
1793 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1794 if { (eval echo "$as_me:1794: \"$ac_link\"") >&5
1795   (eval $ac_link) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; then
1799   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1800 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1801 # work properly (i.e., refer to `conftest.exe'), while it won't with
1802 # `rm'.
1803 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1804   case $ac_file in
1805     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1806     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1807           export ac_cv_exeext
1808           break;;
1809     * ) break;;
1810   esac
1811 done
1812 else
1813   { { echo "$as_me:1813: error: cannot compute EXEEXT: cannot compile and link" >&5
1814 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1815    { (exit 1); exit 1; }; }
1816 fi
1817
1818 rm -f conftest$ac_cv_exeext
1819 echo "$as_me:1819: result: $ac_cv_exeext" >&5
1820 echo "${ECHO_T}$ac_cv_exeext" >&6
1821
1822 rm -f conftest.$ac_ext
1823 EXEEXT=$ac_cv_exeext
1824 ac_exeext=$EXEEXT
1825 echo "$as_me:1825: checking for object suffix" >&5
1826 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1827 if test "${ac_cv_objext+set}" = set; then
1828   echo $ECHO_N "(cached) $ECHO_C" >&6
1829 else
1830   cat >conftest.$ac_ext <<_ACEOF
1831 #line 1831 "configure"
1832 #include "confdefs.h"
1833
1834 int
1835 main ()
1836 {
1837
1838   ;
1839   return 0;
1840 }
1841 _ACEOF
1842 rm -f conftest.o conftest.obj
1843 if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844   (eval $ac_compile) 2>&5
1845   ac_status=$?
1846   echo "$as_me:1846: \$? = $ac_status" >&5
1847   (exit $ac_status); }; then
1848   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1849   case $ac_file in
1850     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1851     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1852        break;;
1853   esac
1854 done
1855 else
1856   echo "$as_me: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 { { echo "$as_me:1858: error: cannot compute OBJEXT: cannot compile" >&5
1859 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1860    { (exit 1); exit 1; }; }
1861 fi
1862
1863 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1864 fi
1865 echo "$as_me:1865: result: $ac_cv_objext" >&5
1866 echo "${ECHO_T}$ac_cv_objext" >&6
1867 OBJEXT=$ac_cv_objext
1868 ac_objext=$OBJEXT
1869 echo "$as_me:1869: checking whether we are using the GNU C compiler" >&5
1870 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1871 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1872   echo $ECHO_N "(cached) $ECHO_C" >&6
1873 else
1874   cat >conftest.$ac_ext <<_ACEOF
1875 #line 1875 "configure"
1876 #include "confdefs.h"
1877
1878 int
1879 main ()
1880 {
1881 #ifndef __GNUC__
1882        choke me
1883 #endif
1884
1885   ;
1886   return 0;
1887 }
1888 _ACEOF
1889 rm -f conftest.$ac_objext
1890 if { (eval echo "$as_me:1890: \"$ac_compile\"") >&5
1891   (eval $ac_compile) 2>&5
1892   ac_status=$?
1893   echo "$as_me:1893: \$? = $ac_status" >&5
1894   (exit $ac_status); } &&
1895          { ac_try='test -s conftest.$ac_objext'
1896   { (eval echo "$as_me:1896: \"$ac_try\"") >&5
1897   (eval $ac_try) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); }; }; then
1901   ac_compiler_gnu=yes
1902 else
1903   echo "$as_me: failed program was:" >&5
1904 cat conftest.$ac_ext >&5
1905 ac_compiler_gnu=no
1906 fi
1907 rm -f conftest.$ac_objext conftest.$ac_ext
1908 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1909
1910 fi
1911 echo "$as_me:1911: result: $ac_cv_c_compiler_gnu" >&5
1912 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1913 GCC=`test $ac_compiler_gnu = yes && echo yes`
1914 ac_test_CFLAGS=${CFLAGS+set}
1915 ac_save_CFLAGS=$CFLAGS
1916 CFLAGS="-g"
1917 echo "$as_me:1917: checking whether $CC accepts -g" >&5
1918 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1919 if test "${ac_cv_prog_cc_g+set}" = set; then
1920   echo $ECHO_N "(cached) $ECHO_C" >&6
1921 else
1922   cat >conftest.$ac_ext <<_ACEOF
1923 #line 1923 "configure"
1924 #include "confdefs.h"
1925
1926 int
1927 main ()
1928 {
1929
1930   ;
1931   return 0;
1932 }
1933 _ACEOF
1934 rm -f conftest.$ac_objext
1935 if { (eval echo "$as_me:1935: \"$ac_compile\"") >&5
1936   (eval $ac_compile) 2>&5
1937   ac_status=$?
1938   echo "$as_me:1938: \$? = $ac_status" >&5
1939   (exit $ac_status); } &&
1940          { ac_try='test -s conftest.$ac_objext'
1941   { (eval echo "$as_me:1941: \"$ac_try\"") >&5
1942   (eval $ac_try) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit $ac_status); }; }; then
1946   ac_cv_prog_cc_g=yes
1947 else
1948   echo "$as_me: failed program was:" >&5
1949 cat conftest.$ac_ext >&5
1950 ac_cv_prog_cc_g=no
1951 fi
1952 rm -f conftest.$ac_objext conftest.$ac_ext
1953 fi
1954 echo "$as_me:1954: result: $ac_cv_prog_cc_g" >&5
1955 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1956 if test "$ac_test_CFLAGS" = set; then
1957   CFLAGS=$ac_save_CFLAGS
1958 elif test $ac_cv_prog_cc_g = yes; then
1959   if test "$GCC" = yes; then
1960     CFLAGS="-g -O2"
1961   else
1962     CFLAGS="-g"
1963   fi
1964 else
1965   if test "$GCC" = yes; then
1966     CFLAGS="-O2"
1967   else
1968     CFLAGS=
1969   fi
1970 fi
1971 # Some people use a C++ compiler to compile C.  Since we use `exit',
1972 # in C++ we need to declare it.  In case someone uses the same compiler
1973 # for both compiling C and C++ we need to have the C++ compiler decide
1974 # the declaration of exit, since it's the most demanding environment.
1975 cat >conftest.$ac_ext <<_ACEOF
1976 #ifndef __cplusplus
1977   choke me
1978 #endif
1979 _ACEOF
1980 rm -f conftest.$ac_objext
1981 if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5
1982   (eval $ac_compile) 2>&5
1983   ac_status=$?
1984   echo "$as_me:1984: \$? = $ac_status" >&5
1985   (exit $ac_status); } &&
1986          { ac_try='test -s conftest.$ac_objext'
1987   { (eval echo "$as_me:1987: \"$ac_try\"") >&5
1988   (eval $ac_try) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); }; }; then
1992   for ac_declaration in \
1993    ''\
1994    '#include <stdlib.h>' \
1995    'extern "C" void std::exit (int) throw (); using std::exit;' \
1996    'extern "C" void std::exit (int); using std::exit;' \
1997    'extern "C" void exit (int) throw ();' \
1998    'extern "C" void exit (int);' \
1999    'void exit (int);'
2000 do
2001   cat >conftest.$ac_ext <<_ACEOF
2002 #line 2002 "configure"
2003 #include "confdefs.h"
2004 #include <stdlib.h>
2005 $ac_declaration
2006 int
2007 main ()
2008 {
2009 exit (42);
2010   ;
2011   return 0;
2012 }
2013 _ACEOF
2014 rm -f conftest.$ac_objext
2015 if { (eval echo "$as_me:2015: \"$ac_compile\"") >&5
2016   (eval $ac_compile) 2>&5
2017   ac_status=$?
2018   echo "$as_me:2018: \$? = $ac_status" >&5
2019   (exit $ac_status); } &&
2020          { ac_try='test -s conftest.$ac_objext'
2021   { (eval echo "$as_me:2021: \"$ac_try\"") >&5
2022   (eval $ac_try) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit $ac_status); }; }; then
2026   :
2027 else
2028   echo "$as_me: failed program was:" >&5
2029 cat conftest.$ac_ext >&5
2030 continue
2031 fi
2032 rm -f conftest.$ac_objext conftest.$ac_ext
2033   cat >conftest.$ac_ext <<_ACEOF
2034 #line 2034 "configure"
2035 #include "confdefs.h"
2036 $ac_declaration
2037 int
2038 main ()
2039 {
2040 exit (42);
2041   ;
2042   return 0;
2043 }
2044 _ACEOF
2045 rm -f conftest.$ac_objext
2046 if { (eval echo "$as_me:2046: \"$ac_compile\"") >&5
2047   (eval $ac_compile) 2>&5
2048   ac_status=$?
2049   echo "$as_me:2049: \$? = $ac_status" >&5
2050   (exit $ac_status); } &&
2051          { ac_try='test -s conftest.$ac_objext'
2052   { (eval echo "$as_me:2052: \"$ac_try\"") >&5
2053   (eval $ac_try) 2>&5
2054   ac_status=$?
2055   echo "$as_me:2055: \$? = $ac_status" >&5
2056   (exit $ac_status); }; }; then
2057   break
2058 else
2059   echo "$as_me: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 fi
2062 rm -f conftest.$ac_objext conftest.$ac_ext
2063 done
2064 rm -rf conftest*
2065 if test -n "$ac_declaration"; then
2066   echo '#ifdef __cplusplus' >>confdefs.h
2067   echo $ac_declaration      >>confdefs.h
2068   echo '#endif'             >>confdefs.h
2069 fi
2070
2071 else
2072   echo "$as_me: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2074 fi
2075 rm -f conftest.$ac_objext conftest.$ac_ext
2076 ac_ext=c
2077 ac_cpp='$CPP $CPPFLAGS'
2078 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2079 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2080 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2081 ac_main_return=return
2082
2083 GCC_VERSION=none
2084 if test "$GCC" = yes ; then
2085         echo "$as_me:2085: checking version of $CC" >&5
2086 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2087         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.].*//'`"
2088         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2089         echo "$as_me:2089: result: $GCC_VERSION" >&5
2090 echo "${ECHO_T}$GCC_VERSION" >&6
2091 fi
2092
2093 echo "$as_me:2093: checking for $CC option to accept ANSI C" >&5
2094 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2095 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2096   echo $ECHO_N "(cached) $ECHO_C" >&6
2097 else
2098   ac_cv_prog_cc_stdc=no
2099 ac_save_CC=$CC
2100 cat >conftest.$ac_ext <<_ACEOF
2101 #line 2101 "configure"
2102 #include "confdefs.h"
2103 #include <stdarg.h>
2104 #include <stdio.h>
2105 #include <sys/types.h>
2106 #include <sys/stat.h>
2107 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2108 struct buf { int x; };
2109 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2110 static char *e (p, i)
2111      char **p;
2112      int i;
2113 {
2114   return p[i];
2115 }
2116 static char *f (char * (*g) (char **, int), char **p, ...)
2117 {
2118   char *s;
2119   va_list v;
2120   va_start (v,p);
2121   s = g (p, va_arg (v,int));
2122   va_end (v);
2123   return s;
2124 }
2125 int test (int i, double x);
2126 struct s1 {int (*f) (int a);};
2127 struct s2 {int (*f) (double a);};
2128 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2129 int argc;
2130 char **argv;
2131 int
2132 main ()
2133 {
2134 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2135   ;
2136   return 0;
2137 }
2138 _ACEOF
2139 # Don't try gcc -ansi; that turns off useful extensions and
2140 # breaks some systems' header files.
2141 # AIX                   -qlanglvl=ansi
2142 # Ultrix and OSF/1      -std1
2143 # HP-UX 10.20 and later -Ae
2144 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2145 # SVR4                  -Xc -D__EXTENSIONS__
2146 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2147 do
2148   CC="$ac_save_CC $ac_arg"
2149   rm -f conftest.$ac_objext
2150 if { (eval echo "$as_me:2150: \"$ac_compile\"") >&5
2151   (eval $ac_compile) 2>&5
2152   ac_status=$?
2153   echo "$as_me:2153: \$? = $ac_status" >&5
2154   (exit $ac_status); } &&
2155          { ac_try='test -s conftest.$ac_objext'
2156   { (eval echo "$as_me:2156: \"$ac_try\"") >&5
2157   (eval $ac_try) 2>&5
2158   ac_status=$?
2159   echo "$as_me:2159: \$? = $ac_status" >&5
2160   (exit $ac_status); }; }; then
2161   ac_cv_prog_cc_stdc=$ac_arg
2162 break
2163 else
2164   echo "$as_me: failed program was:" >&5
2165 cat conftest.$ac_ext >&5
2166 fi
2167 rm -f conftest.$ac_objext
2168 done
2169 rm -f conftest.$ac_ext conftest.$ac_objext
2170 CC=$ac_save_CC
2171
2172 fi
2173
2174 case "x$ac_cv_prog_cc_stdc" in
2175   x|xno)
2176     echo "$as_me:2176: result: none needed" >&5
2177 echo "${ECHO_T}none needed" >&6 ;;
2178   *)
2179     echo "$as_me:2179: result: $ac_cv_prog_cc_stdc" >&5
2180 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2181     CC="$CC $ac_cv_prog_cc_stdc" ;;
2182 esac
2183
2184 # This should have been defined by AC_PROG_CC
2185 : ${CC:=cc}
2186
2187 echo "$as_me:2187: checking \$CC variable" >&5
2188 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2189 case "$CC" in
2190 (*[\ \  ]-*)
2191         echo "$as_me:2191: result: broken" >&5
2192 echo "${ECHO_T}broken" >&6
2193         { echo "$as_me:2193: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2194 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2195         # humor him...
2196         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2197         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2198         CC="$cf_prog"
2199         for cf_arg in $cf_flags
2200         do
2201                 case "x$cf_arg" in
2202                 (x-[IUDfgOW]*)
2203
2204 cf_fix_cppflags=no
2205 cf_new_cflags=
2206 cf_new_cppflags=
2207 cf_new_extra_cppflags=
2208
2209 for cf_add_cflags in $cf_arg
2210 do
2211 case $cf_fix_cppflags in
2212 (no)
2213         case $cf_add_cflags in
2214         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2215                 case $cf_add_cflags in
2216                 (-D*)
2217                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2218
2219                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2220                                 && test -z "${cf_tst_cflags}" \
2221                                 && cf_fix_cppflags=yes
2222
2223                         if test $cf_fix_cppflags = yes ; then
2224
2225         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2226         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2227
2228                                 continue
2229                         elif test "${cf_tst_cflags}" = "\"'" ; then
2230
2231         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2232         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2233
2234                                 continue
2235                         fi
2236                         ;;
2237                 esac
2238                 case "$CPPFLAGS" in
2239                 (*$cf_add_cflags)
2240                         ;;
2241                 (*)
2242                         case $cf_add_cflags in
2243                         (-D*)
2244                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2245
2246 CPPFLAGS=`echo "$CPPFLAGS" | \
2247         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2248                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2249
2250                                 ;;
2251                         esac
2252
2253         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2254         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2255
2256                         ;;
2257                 esac
2258                 ;;
2259         (*)
2260
2261         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2262         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2263
2264                 ;;
2265         esac
2266         ;;
2267 (yes)
2268
2269         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2270         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2271
2272         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2273
2274         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2275                 && test -z "${cf_tst_cflags}" \
2276                 && cf_fix_cppflags=no
2277         ;;
2278 esac
2279 done
2280
2281 if test -n "$cf_new_cflags" ; then
2282
2283         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2284         CFLAGS="${CFLAGS}$cf_new_cflags"
2285
2286 fi
2287
2288 if test -n "$cf_new_cppflags" ; then
2289
2290         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2291         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2292
2293 fi
2294
2295 if test -n "$cf_new_extra_cppflags" ; then
2296
2297         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2298         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2299
2300 fi
2301
2302                         ;;
2303                 (*)
2304                         CC="$CC $cf_arg"
2305                         ;;
2306                 esac
2307         done
2308         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2309
2310 echo "${as_me:-configure}:2310: testing resulting CC: '$CC' ..." 1>&5
2311
2312         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2313
2314 echo "${as_me:-configure}:2314: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2315
2316         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2317
2318 echo "${as_me:-configure}:2318: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2319
2320         ;;
2321 (*)
2322         echo "$as_me:2322: result: ok" >&5
2323 echo "${ECHO_T}ok" >&6
2324         ;;
2325 esac
2326
2327 ac_ext=c
2328 ac_cpp='$CPP $CPPFLAGS'
2329 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2330 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2331 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2332 ac_main_return=return
2333 echo "$as_me:2333: checking how to run the C preprocessor" >&5
2334 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2335 # On Suns, sometimes $CPP names a directory.
2336 if test -n "$CPP" && test -d "$CPP"; then
2337   CPP=
2338 fi
2339 if test -z "$CPP"; then
2340   if test "${ac_cv_prog_CPP+set}" = set; then
2341   echo $ECHO_N "(cached) $ECHO_C" >&6
2342 else
2343       # Double quotes because CPP needs to be expanded
2344     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2345     do
2346       ac_preproc_ok=false
2347 for ac_c_preproc_warn_flag in '' yes
2348 do
2349   # Use a header file that comes with gcc, so configuring glibc
2350   # with a fresh cross-compiler works.
2351   # On the NeXT, cc -E runs the code through the compiler's parser,
2352   # not just through cpp. "Syntax error" is here to catch this case.
2353   cat >conftest.$ac_ext <<_ACEOF
2354 #line 2354 "configure"
2355 #include "confdefs.h"
2356 #include <assert.h>
2357                      Syntax error
2358 _ACEOF
2359 if { (eval echo "$as_me:2359: \"$ac_cpp conftest.$ac_ext\"") >&5
2360   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2361   ac_status=$?
2362   egrep -v '^ *\+' conftest.er1 >conftest.err
2363   rm -f conftest.er1
2364   cat conftest.err >&5
2365   echo "$as_me:2365: \$? = $ac_status" >&5
2366   (exit $ac_status); } >/dev/null; then
2367   if test -s conftest.err; then
2368     ac_cpp_err=$ac_c_preproc_warn_flag
2369   else
2370     ac_cpp_err=
2371   fi
2372 else
2373   ac_cpp_err=yes
2374 fi
2375 if test -z "$ac_cpp_err"; then
2376   :
2377 else
2378   echo "$as_me: failed program was:" >&5
2379   cat conftest.$ac_ext >&5
2380   # Broken: fails on valid input.
2381 continue
2382 fi
2383 rm -f conftest.err conftest.$ac_ext
2384
2385   # OK, works on sane cases.  Now check whether non-existent headers
2386   # can be detected and how.
2387   cat >conftest.$ac_ext <<_ACEOF
2388 #line 2388 "configure"
2389 #include "confdefs.h"
2390 #include <ac_nonexistent.h>
2391 _ACEOF
2392 if { (eval echo "$as_me:2392: \"$ac_cpp conftest.$ac_ext\"") >&5
2393   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2394   ac_status=$?
2395   egrep -v '^ *\+' conftest.er1 >conftest.err
2396   rm -f conftest.er1
2397   cat conftest.err >&5
2398   echo "$as_me:2398: \$? = $ac_status" >&5
2399   (exit $ac_status); } >/dev/null; then
2400   if test -s conftest.err; then
2401     ac_cpp_err=$ac_c_preproc_warn_flag
2402   else
2403     ac_cpp_err=
2404   fi
2405 else
2406   ac_cpp_err=yes
2407 fi
2408 if test -z "$ac_cpp_err"; then
2409   # Broken: success on invalid input.
2410 continue
2411 else
2412   echo "$as_me: failed program was:" >&5
2413   cat conftest.$ac_ext >&5
2414   # Passes both tests.
2415 ac_preproc_ok=:
2416 break
2417 fi
2418 rm -f conftest.err conftest.$ac_ext
2419
2420 done
2421 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2422 rm -f conftest.err conftest.$ac_ext
2423 if $ac_preproc_ok; then
2424   break
2425 fi
2426
2427     done
2428     ac_cv_prog_CPP=$CPP
2429
2430 fi
2431   CPP=$ac_cv_prog_CPP
2432 else
2433   ac_cv_prog_CPP=$CPP
2434 fi
2435 echo "$as_me:2435: result: $CPP" >&5
2436 echo "${ECHO_T}$CPP" >&6
2437 ac_preproc_ok=false
2438 for ac_c_preproc_warn_flag in '' yes
2439 do
2440   # Use a header file that comes with gcc, so configuring glibc
2441   # with a fresh cross-compiler works.
2442   # On the NeXT, cc -E runs the code through the compiler's parser,
2443   # not just through cpp. "Syntax error" is here to catch this case.
2444   cat >conftest.$ac_ext <<_ACEOF
2445 #line 2445 "configure"
2446 #include "confdefs.h"
2447 #include <assert.h>
2448                      Syntax error
2449 _ACEOF
2450 if { (eval echo "$as_me:2450: \"$ac_cpp conftest.$ac_ext\"") >&5
2451   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2452   ac_status=$?
2453   egrep -v '^ *\+' conftest.er1 >conftest.err
2454   rm -f conftest.er1
2455   cat conftest.err >&5
2456   echo "$as_me:2456: \$? = $ac_status" >&5
2457   (exit $ac_status); } >/dev/null; then
2458   if test -s conftest.err; then
2459     ac_cpp_err=$ac_c_preproc_warn_flag
2460   else
2461     ac_cpp_err=
2462   fi
2463 else
2464   ac_cpp_err=yes
2465 fi
2466 if test -z "$ac_cpp_err"; then
2467   :
2468 else
2469   echo "$as_me: failed program was:" >&5
2470   cat conftest.$ac_ext >&5
2471   # Broken: fails on valid input.
2472 continue
2473 fi
2474 rm -f conftest.err conftest.$ac_ext
2475
2476   # OK, works on sane cases.  Now check whether non-existent headers
2477   # can be detected and how.
2478   cat >conftest.$ac_ext <<_ACEOF
2479 #line 2479 "configure"
2480 #include "confdefs.h"
2481 #include <ac_nonexistent.h>
2482 _ACEOF
2483 if { (eval echo "$as_me:2483: \"$ac_cpp conftest.$ac_ext\"") >&5
2484   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2485   ac_status=$?
2486   egrep -v '^ *\+' conftest.er1 >conftest.err
2487   rm -f conftest.er1
2488   cat conftest.err >&5
2489   echo "$as_me:2489: \$? = $ac_status" >&5
2490   (exit $ac_status); } >/dev/null; then
2491   if test -s conftest.err; then
2492     ac_cpp_err=$ac_c_preproc_warn_flag
2493   else
2494     ac_cpp_err=
2495   fi
2496 else
2497   ac_cpp_err=yes
2498 fi
2499 if test -z "$ac_cpp_err"; then
2500   # Broken: success on invalid input.
2501 continue
2502 else
2503   echo "$as_me: failed program was:" >&5
2504   cat conftest.$ac_ext >&5
2505   # Passes both tests.
2506 ac_preproc_ok=:
2507 break
2508 fi
2509 rm -f conftest.err conftest.$ac_ext
2510
2511 done
2512 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2513 rm -f conftest.err conftest.$ac_ext
2514 if $ac_preproc_ok; then
2515   :
2516 else
2517   { { echo "$as_me:2517: error: C preprocessor \"$CPP\" fails sanity check" >&5
2518 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2519    { (exit 1); exit 1; }; }
2520 fi
2521
2522 ac_ext=c
2523 ac_cpp='$CPP $CPPFLAGS'
2524 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2525 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2526 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2527 ac_main_return=return
2528
2529 if test $ac_cv_c_compiler_gnu = yes; then
2530     echo "$as_me:2530: checking whether $CC needs -traditional" >&5
2531 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2532 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2533   echo $ECHO_N "(cached) $ECHO_C" >&6
2534 else
2535     ac_pattern="Autoconf.*'x'"
2536   cat >conftest.$ac_ext <<_ACEOF
2537 #line 2537 "configure"
2538 #include "confdefs.h"
2539 #include <sgtty.h>
2540 int Autoconf = TIOCGETP;
2541 _ACEOF
2542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2543   egrep "$ac_pattern" >/dev/null 2>&1; then
2544   ac_cv_prog_gcc_traditional=yes
2545 else
2546   ac_cv_prog_gcc_traditional=no
2547 fi
2548 rm -rf conftest*
2549
2550   if test $ac_cv_prog_gcc_traditional = no; then
2551     cat >conftest.$ac_ext <<_ACEOF
2552 #line 2552 "configure"
2553 #include "confdefs.h"
2554 #include <termio.h>
2555 int Autoconf = TCGETA;
2556 _ACEOF
2557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2558   egrep "$ac_pattern" >/dev/null 2>&1; then
2559   ac_cv_prog_gcc_traditional=yes
2560 fi
2561 rm -rf conftest*
2562
2563   fi
2564 fi
2565 echo "$as_me:2565: result: $ac_cv_prog_gcc_traditional" >&5
2566 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2567   if test $ac_cv_prog_gcc_traditional = yes; then
2568     CC="$CC -traditional"
2569   fi
2570 fi
2571
2572 echo "$as_me:2572: checking whether $CC understands -c and -o together" >&5
2573 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2574 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2575   echo $ECHO_N "(cached) $ECHO_C" >&6
2576 else
2577
2578 cat > conftest.$ac_ext <<CF_EOF
2579 int main(void)
2580 {
2581         ${cf_cv_main_return:-return}(0);
2582 }
2583 CF_EOF
2584 # We do the test twice because some compilers refuse to overwrite an
2585 # existing .o file with -o, though they will create one.
2586 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2587 if { (eval echo "$as_me:2587: \"$ac_try\"") >&5
2588   (eval $ac_try) 2>&5
2589   ac_status=$?
2590   echo "$as_me:2590: \$? = $ac_status" >&5
2591   (exit $ac_status); } &&
2592   test -f conftest2.$ac_objext && { (eval echo "$as_me:2592: \"$ac_try\"") >&5
2593   (eval $ac_try) 2>&5
2594   ac_status=$?
2595   echo "$as_me:2595: \$? = $ac_status" >&5
2596   (exit $ac_status); };
2597 then
2598   eval cf_cv_prog_CC_c_o=yes
2599 else
2600   eval cf_cv_prog_CC_c_o=no
2601 fi
2602 rm -rf conftest*
2603
2604 fi
2605 if test $cf_cv_prog_CC_c_o = yes; then
2606   echo "$as_me:2606: result: yes" >&5
2607 echo "${ECHO_T}yes" >&6
2608 else
2609   echo "$as_me:2609: result: no" >&5
2610 echo "${ECHO_T}no" >&6
2611 fi
2612
2613 if test "$cross_compiling" = yes ; then
2614         LDCONFIG=:
2615 else
2616         case "$cf_cv_system_name" in
2617         (dragonfly*|mirbsd*|freebsd*)
2618                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2619                 ;;
2620         (*) LDPATH=$PATH:/sbin:/usr/sbin
2621                 # Extract the first word of "ldconfig", so it can be a program name with args.
2622 set dummy ldconfig; ac_word=$2
2623 echo "$as_me:2623: checking for $ac_word" >&5
2624 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2625 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2626   echo $ECHO_N "(cached) $ECHO_C" >&6
2627 else
2628   case $LDCONFIG in
2629   [\\/]* | ?:[\\/]*)
2630   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2631   ;;
2632   *)
2633   ac_save_IFS=$IFS; IFS=$ac_path_separator
2634 ac_dummy="$LDPATH"
2635 for ac_dir in $ac_dummy; do
2636   IFS=$ac_save_IFS
2637   test -z "$ac_dir" && ac_dir=.
2638   if $as_executable_p "$ac_dir/$ac_word"; then
2639    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2640    echo "$as_me:2640: found $ac_dir/$ac_word" >&5
2641    break
2642 fi
2643 done
2644
2645   ;;
2646 esac
2647 fi
2648 LDCONFIG=$ac_cv_path_LDCONFIG
2649
2650 if test -n "$LDCONFIG"; then
2651   echo "$as_me:2651: result: $LDCONFIG" >&5
2652 echo "${ECHO_T}$LDCONFIG" >&6
2653 else
2654   echo "$as_me:2654: result: no" >&5
2655 echo "${ECHO_T}no" >&6
2656 fi
2657
2658                 ;;
2659         esac
2660 fi
2661
2662 echo "$as_me:2662: checking if you want to ensure bool is consistent with C++" >&5
2663 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2664
2665 # Check whether --with-cxx or --without-cxx was given.
2666 if test "${with_cxx+set}" = set; then
2667   withval="$with_cxx"
2668   cf_with_cxx=$withval
2669 else
2670   cf_with_cxx=yes
2671 fi;
2672 echo "$as_me:2672: result: $cf_with_cxx" >&5
2673 echo "${ECHO_T}$cf_with_cxx" >&6
2674 if test "X$cf_with_cxx" = Xno ; then
2675         CXX=""
2676         GXX=""
2677 else
2678         # with autoconf 2.13, we can change the error to a warning:
2679                 ac_ext=cc
2680 ac_cpp='$CXXCPP $CPPFLAGS'
2681 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2684 ac_main_return=return
2685 if test -n "$ac_tool_prefix"; then
2686   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2687   do
2688     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2689 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2690 echo "$as_me:2690: checking for $ac_word" >&5
2691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2692 if test "${ac_cv_prog_CXX+set}" = set; then
2693   echo $ECHO_N "(cached) $ECHO_C" >&6
2694 else
2695   if test -n "$CXX"; then
2696   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2697 else
2698   ac_save_IFS=$IFS; IFS=$ac_path_separator
2699 ac_dummy="$PATH"
2700 for ac_dir in $ac_dummy; do
2701   IFS=$ac_save_IFS
2702   test -z "$ac_dir" && ac_dir=.
2703   $as_executable_p "$ac_dir/$ac_word" || continue
2704 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2705 echo "$as_me:2705: found $ac_dir/$ac_word" >&5
2706 break
2707 done
2708
2709 fi
2710 fi
2711 CXX=$ac_cv_prog_CXX
2712 if test -n "$CXX"; then
2713   echo "$as_me:2713: result: $CXX" >&5
2714 echo "${ECHO_T}$CXX" >&6
2715 else
2716   echo "$as_me:2716: result: no" >&5
2717 echo "${ECHO_T}no" >&6
2718 fi
2719
2720     test -n "$CXX" && break
2721   done
2722 fi
2723 if test -z "$CXX"; then
2724   ac_ct_CXX=$CXX
2725   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2726 do
2727   # Extract the first word of "$ac_prog", so it can be a program name with args.
2728 set dummy $ac_prog; ac_word=$2
2729 echo "$as_me:2729: checking for $ac_word" >&5
2730 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2731 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2732   echo $ECHO_N "(cached) $ECHO_C" >&6
2733 else
2734   if test -n "$ac_ct_CXX"; then
2735   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2736 else
2737   ac_save_IFS=$IFS; IFS=$ac_path_separator
2738 ac_dummy="$PATH"
2739 for ac_dir in $ac_dummy; do
2740   IFS=$ac_save_IFS
2741   test -z "$ac_dir" && ac_dir=.
2742   $as_executable_p "$ac_dir/$ac_word" || continue
2743 ac_cv_prog_ac_ct_CXX="$ac_prog"
2744 echo "$as_me:2744: found $ac_dir/$ac_word" >&5
2745 break
2746 done
2747
2748 fi
2749 fi
2750 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2751 if test -n "$ac_ct_CXX"; then
2752   echo "$as_me:2752: result: $ac_ct_CXX" >&5
2753 echo "${ECHO_T}$ac_ct_CXX" >&6
2754 else
2755   echo "$as_me:2755: result: no" >&5
2756 echo "${ECHO_T}no" >&6
2757 fi
2758
2759   test -n "$ac_ct_CXX" && break
2760 done
2761 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2762
2763   CXX=$ac_ct_CXX
2764 fi
2765
2766 # Provide some information about the compiler.
2767 echo "$as_me:2767:" \
2768      "checking for C++ compiler version" >&5
2769 ac_compiler=`set X $ac_compile; echo $2`
2770 { (eval echo "$as_me:2770: \"$ac_compiler --version </dev/null >&5\"") >&5
2771   (eval $ac_compiler --version </dev/null >&5) 2>&5
2772   ac_status=$?
2773   echo "$as_me:2773: \$? = $ac_status" >&5
2774   (exit $ac_status); }
2775 { (eval echo "$as_me:2775: \"$ac_compiler -v </dev/null >&5\"") >&5
2776   (eval $ac_compiler -v </dev/null >&5) 2>&5
2777   ac_status=$?
2778   echo "$as_me:2778: \$? = $ac_status" >&5
2779   (exit $ac_status); }
2780 { (eval echo "$as_me:2780: \"$ac_compiler -V </dev/null >&5\"") >&5
2781   (eval $ac_compiler -V </dev/null >&5) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); }
2785
2786 echo "$as_me:2786: checking whether we are using the GNU C++ compiler" >&5
2787 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2788 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2789   echo $ECHO_N "(cached) $ECHO_C" >&6
2790 else
2791   cat >conftest.$ac_ext <<_ACEOF
2792 #line 2792 "configure"
2793 #include "confdefs.h"
2794
2795 int
2796 main ()
2797 {
2798 #ifndef __GNUC__
2799        choke me
2800 #endif
2801
2802   ;
2803   return 0;
2804 }
2805 _ACEOF
2806 rm -f conftest.$ac_objext
2807 if { (eval echo "$as_me:2807: \"$ac_compile\"") >&5
2808   (eval $ac_compile) 2>&5
2809   ac_status=$?
2810   echo "$as_me:2810: \$? = $ac_status" >&5
2811   (exit $ac_status); } &&
2812          { ac_try='test -s conftest.$ac_objext'
2813   { (eval echo "$as_me:2813: \"$ac_try\"") >&5
2814   (eval $ac_try) 2>&5
2815   ac_status=$?
2816   echo "$as_me:2816: \$? = $ac_status" >&5
2817   (exit $ac_status); }; }; then
2818   ac_compiler_gnu=yes
2819 else
2820   echo "$as_me: failed program was:" >&5
2821 cat conftest.$ac_ext >&5
2822 ac_compiler_gnu=no
2823 fi
2824 rm -f conftest.$ac_objext conftest.$ac_ext
2825 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2826
2827 fi
2828 echo "$as_me:2828: result: $ac_cv_cxx_compiler_gnu" >&5
2829 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2830 GXX=`test $ac_compiler_gnu = yes && echo yes`
2831 ac_test_CXXFLAGS=${CXXFLAGS+set}
2832 ac_save_CXXFLAGS=$CXXFLAGS
2833 CXXFLAGS="-g"
2834 echo "$as_me:2834: checking whether $CXX accepts -g" >&5
2835 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2836 if test "${ac_cv_prog_cxx_g+set}" = set; then
2837   echo $ECHO_N "(cached) $ECHO_C" >&6
2838 else
2839   cat >conftest.$ac_ext <<_ACEOF
2840 #line 2840 "configure"
2841 #include "confdefs.h"
2842
2843 int
2844 main ()
2845 {
2846
2847   ;
2848   return 0;
2849 }
2850 _ACEOF
2851 rm -f conftest.$ac_objext
2852 if { (eval echo "$as_me:2852: \"$ac_compile\"") >&5
2853   (eval $ac_compile) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); } &&
2857          { ac_try='test -s conftest.$ac_objext'
2858   { (eval echo "$as_me:2858: \"$ac_try\"") >&5
2859   (eval $ac_try) 2>&5
2860   ac_status=$?
2861   echo "$as_me:2861: \$? = $ac_status" >&5
2862   (exit $ac_status); }; }; then
2863   ac_cv_prog_cxx_g=yes
2864 else
2865   echo "$as_me: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
2867 ac_cv_prog_cxx_g=no
2868 fi
2869 rm -f conftest.$ac_objext conftest.$ac_ext
2870 fi
2871 echo "$as_me:2871: result: $ac_cv_prog_cxx_g" >&5
2872 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2873 if test "$ac_test_CXXFLAGS" = set; then
2874   CXXFLAGS=$ac_save_CXXFLAGS
2875 elif test $ac_cv_prog_cxx_g = yes; then
2876   if test "$GXX" = yes; then
2877     CXXFLAGS="-g -O2"
2878   else
2879     CXXFLAGS="-g"
2880   fi
2881 else
2882   if test "$GXX" = yes; then
2883     CXXFLAGS="-O2"
2884   else
2885     CXXFLAGS=
2886   fi
2887 fi
2888 for ac_declaration in \
2889    ''\
2890    '#include <stdlib.h>' \
2891    'extern "C" void std::exit (int) throw (); using std::exit;' \
2892    'extern "C" void std::exit (int); using std::exit;' \
2893    'extern "C" void exit (int) throw ();' \
2894    'extern "C" void exit (int);' \
2895    'void exit (int);'
2896 do
2897   cat >conftest.$ac_ext <<_ACEOF
2898 #line 2898 "configure"
2899 #include "confdefs.h"
2900 #include <stdlib.h>
2901 $ac_declaration
2902 int
2903 main ()
2904 {
2905 exit (42);
2906   ;
2907   return 0;
2908 }
2909 _ACEOF
2910 rm -f conftest.$ac_objext
2911 if { (eval echo "$as_me:2911: \"$ac_compile\"") >&5
2912   (eval $ac_compile) 2>&5
2913   ac_status=$?
2914   echo "$as_me:2914: \$? = $ac_status" >&5
2915   (exit $ac_status); } &&
2916          { ac_try='test -s conftest.$ac_objext'
2917   { (eval echo "$as_me:2917: \"$ac_try\"") >&5
2918   (eval $ac_try) 2>&5
2919   ac_status=$?
2920   echo "$as_me:2920: \$? = $ac_status" >&5
2921   (exit $ac_status); }; }; then
2922   :
2923 else
2924   echo "$as_me: failed program was:" >&5
2925 cat conftest.$ac_ext >&5
2926 continue
2927 fi
2928 rm -f conftest.$ac_objext conftest.$ac_ext
2929   cat >conftest.$ac_ext <<_ACEOF
2930 #line 2930 "configure"
2931 #include "confdefs.h"
2932 $ac_declaration
2933 int
2934 main ()
2935 {
2936 exit (42);
2937   ;
2938   return 0;
2939 }
2940 _ACEOF
2941 rm -f conftest.$ac_objext
2942 if { (eval echo "$as_me:2942: \"$ac_compile\"") >&5
2943   (eval $ac_compile) 2>&5
2944   ac_status=$?
2945   echo "$as_me:2945: \$? = $ac_status" >&5
2946   (exit $ac_status); } &&
2947          { ac_try='test -s conftest.$ac_objext'
2948   { (eval echo "$as_me:2948: \"$ac_try\"") >&5
2949   (eval $ac_try) 2>&5
2950   ac_status=$?
2951   echo "$as_me:2951: \$? = $ac_status" >&5
2952   (exit $ac_status); }; }; then
2953   break
2954 else
2955   echo "$as_me: failed program was:" >&5
2956 cat conftest.$ac_ext >&5
2957 fi
2958 rm -f conftest.$ac_objext conftest.$ac_ext
2959 done
2960 rm -rf conftest*
2961 if test -n "$ac_declaration"; then
2962   echo '#ifdef __cplusplus' >>confdefs.h
2963   echo $ac_declaration      >>confdefs.h
2964   echo '#endif'             >>confdefs.h
2965 fi
2966
2967 ac_ext=c
2968 ac_cpp='$CPP $CPPFLAGS'
2969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2972 ac_main_return=return
2973
2974         ac_ext=cc
2975 ac_cpp='$CXXCPP $CPPFLAGS'
2976 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2977 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2978 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2979 ac_main_return=return
2980
2981         if test "x$cf_with_cxx" != xno
2982         then
2983                 # Several of the C++ configurations do not work, particularly when
2984                 # cross-compiling (20140913 -TD)
2985                 echo "$as_me:2985: checking if $CXX works" >&5
2986 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2987
2988                 save_CPPFLAGS="$CPPFLAGS"
2989                 eval cf_includedir=${includedir}
2990                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2991
2992 cat >conftest.$ac_ext <<_ACEOF
2993 #line 2993 "configure"
2994 #include "confdefs.h"
2995
2996 #include <stdlib.h>
2997 #include <stdio.h>
2998
2999 int
3000 main ()
3001 {
3002
3003                 printf("Hello world!\n")
3004
3005   ;
3006   return 0;
3007 }
3008 _ACEOF
3009 rm -f conftest.$ac_objext
3010 if { (eval echo "$as_me:3010: \"$ac_compile\"") >&5
3011   (eval $ac_compile) 2>&5
3012   ac_status=$?
3013   echo "$as_me:3013: \$? = $ac_status" >&5
3014   (exit $ac_status); } &&
3015          { ac_try='test -s conftest.$ac_objext'
3016   { (eval echo "$as_me:3016: \"$ac_try\"") >&5
3017   (eval $ac_try) 2>&5
3018   ac_status=$?
3019   echo "$as_me:3019: \$? = $ac_status" >&5
3020   (exit $ac_status); }; }; then
3021   cf_cxx_works=yes
3022 else
3023   echo "$as_me: failed program was:" >&5
3024 cat conftest.$ac_ext >&5
3025 cf_cxx_works=no
3026 fi
3027 rm -f conftest.$ac_objext conftest.$ac_ext
3028                 CPPFLAGS="$save_CPPFLAGS"
3029
3030                 echo "$as_me:3030: result: $cf_cxx_works" >&5
3031 echo "${ECHO_T}$cf_cxx_works" >&6
3032                 if test "x$cf_cxx_works" = xno
3033                 then
3034                         { echo "$as_me:3034: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3035 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3036                         cf_with_cxx=no; CXX=""; GXX="";
3037                 fi
3038         fi
3039         ac_ext=c
3040 ac_cpp='$CPP $CPPFLAGS'
3041 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3042 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3043 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3044 ac_main_return=return
3045
3046         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3047         if test "$CXX" = "g++" ; then
3048                 # Extract the first word of "g++", so it can be a program name with args.
3049 set dummy g++; ac_word=$2
3050 echo "$as_me:3050: checking for $ac_word" >&5
3051 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3052 if test "${ac_cv_path_CXX+set}" = set; then
3053   echo $ECHO_N "(cached) $ECHO_C" >&6
3054 else
3055   case $CXX in
3056   [\\/]* | ?:[\\/]*)
3057   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3058   ;;
3059   *)
3060   ac_save_IFS=$IFS; IFS=$ac_path_separator
3061 ac_dummy="$PATH"
3062 for ac_dir in $ac_dummy; do
3063   IFS=$ac_save_IFS
3064   test -z "$ac_dir" && ac_dir=.
3065   if $as_executable_p "$ac_dir/$ac_word"; then
3066    ac_cv_path_CXX="$ac_dir/$ac_word"
3067    echo "$as_me:3067: found $ac_dir/$ac_word" >&5
3068    break
3069 fi
3070 done
3071
3072   ;;
3073 esac
3074 fi
3075 CXX=$ac_cv_path_CXX
3076
3077 if test -n "$CXX"; then
3078   echo "$as_me:3078: result: $CXX" >&5
3079 echo "${ECHO_T}$CXX" >&6
3080 else
3081   echo "$as_me:3081: result: no" >&5
3082 echo "${ECHO_T}no" >&6
3083 fi
3084
3085         fi
3086         case "x$CXX" in
3087         (x|xg++)
3088                 { echo "$as_me:3088: WARNING: You don't have any C++ compiler, too bad" >&5
3089 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3090                 cf_with_cxx=no; CXX=""; GXX="";
3091                 ;;
3092         esac
3093 fi
3094
3095 GXX_VERSION=none
3096 if test "$GXX" = yes; then
3097         echo "$as_me:3097: checking version of ${CXX:-g++}" >&5
3098 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3099         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3100         if test -z "$GXX_VERSION"
3101         then
3102                 GXX_VERSION=unknown
3103                 GXX=no
3104         fi
3105         echo "$as_me:3105: result: $GXX_VERSION" >&5
3106 echo "${ECHO_T}$GXX_VERSION" >&6
3107 fi
3108
3109 case $GXX_VERSION in
3110 (1*|2.[0-6]*)
3111         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3112         # cf_cxx_library=no
3113         { echo "$as_me:3113: WARNING: templates do not work" >&5
3114 echo "$as_me: WARNING: templates do not work" >&2;}
3115         ;;
3116 esac
3117
3118 echo "$as_me:3118: checking if you want to build C++ binding and demo" >&5
3119 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3120
3121 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3122 if test "${with_cxx_binding+set}" = set; then
3123   withval="$with_cxx_binding"
3124   cf_with_cxx_binding=$withval
3125 else
3126   cf_with_cxx_binding=$cf_with_cxx
3127 fi;
3128 echo "$as_me:3128: result: $cf_with_cxx_binding" >&5
3129 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3130
3131 echo "$as_me:3131: checking if you want to build with Ada95" >&5
3132 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3133 echo "$as_me:3133: result: $cf_with_ada" >&5
3134 echo "${ECHO_T}$cf_with_ada" >&6
3135
3136 echo "$as_me:3136: checking if you want to install terminal database" >&5
3137 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3138
3139 # Check whether --enable-db-install or --disable-db-install was given.
3140 if test "${enable_db_install+set}" = set; then
3141   enableval="$enable_db_install"
3142   cf_with_db_install=$enableval
3143 else
3144   cf_with_db_install=yes
3145 fi;
3146 echo "$as_me:3146: result: $cf_with_db_install" >&5
3147 echo "${ECHO_T}$cf_with_db_install" >&6
3148
3149 echo "$as_me:3149: checking if you want to install manpages" >&5
3150 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3151
3152 # Check whether --with-manpages or --without-manpages was given.
3153 if test "${with_manpages+set}" = set; then
3154   withval="$with_manpages"
3155   cf_with_manpages=$withval
3156 else
3157   cf_with_manpages=yes
3158 fi;
3159 echo "$as_me:3159: result: $cf_with_manpages" >&5
3160 echo "${ECHO_T}$cf_with_manpages" >&6
3161
3162 echo "$as_me:3162: checking if you want to build programs such as tic" >&5
3163 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3164
3165 # Check whether --with-progs or --without-progs was given.
3166 if test "${with_progs+set}" = set; then
3167   withval="$with_progs"
3168   cf_with_progs=$withval
3169 else
3170   cf_with_progs=yes
3171 fi;
3172 echo "$as_me:3172: result: $cf_with_progs" >&5
3173 echo "${ECHO_T}$cf_with_progs" >&6
3174
3175 echo "$as_me:3175: checking if you want to build test-programs" >&5
3176 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3177
3178 # Check whether --with-tests or --without-tests was given.
3179 if test "${with_tests+set}" = set; then
3180   withval="$with_tests"
3181   cf_with_tests=$withval
3182 else
3183   cf_with_tests=yes
3184 fi;
3185 echo "$as_me:3185: result: $cf_with_tests" >&5
3186 echo "${ECHO_T}$cf_with_tests" >&6
3187
3188 echo "$as_me:3188: checking if you wish to install curses.h" >&5
3189 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3190
3191 # Check whether --with-curses-h or --without-curses-h was given.
3192 if test "${with_curses_h+set}" = set; then
3193   withval="$with_curses_h"
3194   with_curses_h=$withval
3195 else
3196   with_curses_h=yes
3197 fi;
3198 echo "$as_me:3198: result: $with_curses_h" >&5
3199 echo "${ECHO_T}$with_curses_h" >&6
3200
3201 modules_to_build="ncurses"
3202 if test "X$cf_with_progs" != Xno ; then
3203 modules_to_build="$modules_to_build progs tack"
3204 fi
3205 modules_to_build="$modules_to_build panel menu form"
3206
3207 test "$program_prefix" != NONE &&
3208   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3209 # Use a double $ so make ignores it.
3210 test "$program_suffix" != NONE &&
3211   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3212 # Double any \ or $.  echo might interpret backslashes.
3213 # By default was `s,x,x', remove it if useless.
3214 cat <<\_ACEOF >conftest.sed
3215 s/[\\$]/&&/g;s/;s,x,x,$//
3216 _ACEOF
3217 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3218 rm conftest.sed
3219
3220 for ac_prog in mawk gawk nawk awk
3221 do
3222   # Extract the first word of "$ac_prog", so it can be a program name with args.
3223 set dummy $ac_prog; ac_word=$2
3224 echo "$as_me:3224: checking for $ac_word" >&5
3225 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3226 if test "${ac_cv_prog_AWK+set}" = set; then
3227   echo $ECHO_N "(cached) $ECHO_C" >&6
3228 else
3229   if test -n "$AWK"; then
3230   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3231 else
3232   ac_save_IFS=$IFS; IFS=$ac_path_separator
3233 ac_dummy="$PATH"
3234 for ac_dir in $ac_dummy; do
3235   IFS=$ac_save_IFS
3236   test -z "$ac_dir" && ac_dir=.
3237   $as_executable_p "$ac_dir/$ac_word" || continue
3238 ac_cv_prog_AWK="$ac_prog"
3239 echo "$as_me:3239: found $ac_dir/$ac_word" >&5
3240 break
3241 done
3242
3243 fi
3244 fi
3245 AWK=$ac_cv_prog_AWK
3246 if test -n "$AWK"; then
3247   echo "$as_me:3247: result: $AWK" >&5
3248 echo "${ECHO_T}$AWK" >&6
3249 else
3250   echo "$as_me:3250: result: no" >&5
3251 echo "${ECHO_T}no" >&6
3252 fi
3253
3254   test -n "$AWK" && break
3255 done
3256
3257 test -z "$AWK" && { { echo "$as_me:3257: error: No awk program found" >&5
3258 echo "$as_me: error: No awk program found" >&2;}
3259    { (exit 1); exit 1; }; }
3260
3261 echo "$as_me:3261: checking for egrep" >&5
3262 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3263 if test "${ac_cv_prog_egrep+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3267                 then ac_cv_prog_egrep='grep -E'
3268                 else ac_cv_prog_egrep='egrep'
3269         fi
3270 fi
3271 echo "$as_me:3271: result: $ac_cv_prog_egrep" >&5
3272 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3273         EGREP=$ac_cv_prog_egrep
3274
3275         test -z "$EGREP" && { { echo "$as_me:3275: error: No egrep program found" >&5
3276 echo "$as_me: error: No egrep program found" >&2;}
3277    { (exit 1); exit 1; }; }
3278
3279 # Find a good install program.  We prefer a C program (faster),
3280 # so one script is as good as another.  But avoid the broken or
3281 # incompatible versions:
3282 # SysV /etc/install, /usr/sbin/install
3283 # SunOS /usr/etc/install
3284 # IRIX /sbin/install
3285 # AIX /bin/install
3286 # AmigaOS /C/install, which installs bootblocks on floppy discs
3287 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3288 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3289 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3290 # ./install, which can be erroneously created by make from ./install.sh.
3291 echo "$as_me:3291: checking for a BSD compatible install" >&5
3292 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3293 if test -z "$INSTALL"; then
3294 if test "${ac_cv_path_install+set}" = set; then
3295   echo $ECHO_N "(cached) $ECHO_C" >&6
3296 else
3297     ac_save_IFS=$IFS; IFS=$ac_path_separator
3298   for ac_dir in $PATH; do
3299     IFS=$ac_save_IFS
3300     # Account for people who put trailing slashes in PATH elements.
3301     case $ac_dir/ in
3302     / | ./ | .// | /cC/* \
3303     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3304     | /usr/ucb/* ) ;;
3305     *)
3306       # OSF1 and SCO ODT 3.0 have their own names for install.
3307       # Don't use installbsd from OSF since it installs stuff as root
3308       # by default.
3309       for ac_prog in ginstall scoinst install; do
3310         if $as_executable_p "$ac_dir/$ac_prog"; then
3311           if test $ac_prog = install &&
3312             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3313             # AIX install.  It has an incompatible calling convention.
3314             :
3315           elif test $ac_prog = install &&
3316             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3317             # program-specific install script used by HP pwplus--don't use.
3318             :
3319           else
3320             ac_cv_path_install="$ac_dir/$ac_prog -c"
3321             break 2
3322           fi
3323         fi
3324       done
3325       ;;
3326     esac
3327   done
3328
3329 fi
3330   if test "${ac_cv_path_install+set}" = set; then
3331     INSTALL=$ac_cv_path_install
3332   else
3333     # As a last resort, use the slow shell script.  We don't cache a
3334     # path for INSTALL within a source directory, because that will
3335     # break other packages using the cache if that directory is
3336     # removed, or if the path is relative.
3337     INSTALL=$ac_install_sh
3338   fi
3339 fi
3340 echo "$as_me:3340: result: $INSTALL" >&5
3341 echo "${ECHO_T}$INSTALL" >&6
3342
3343 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3344 # It thinks the first close brace ends the variable substitution.
3345 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3346
3347 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3348
3349 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3350
3351 case $INSTALL in
3352 (/*)
3353         ;;
3354 (*)
3355         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3356         test -z "$cf_dir" && cf_dir=.
3357         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3358         ;;
3359 esac
3360
3361 for ac_prog in lint cppcheck splint
3362 do
3363   # Extract the first word of "$ac_prog", so it can be a program name with args.
3364 set dummy $ac_prog; ac_word=$2
3365 echo "$as_me:3365: checking for $ac_word" >&5
3366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3367 if test "${ac_cv_prog_LINT+set}" = set; then
3368   echo $ECHO_N "(cached) $ECHO_C" >&6
3369 else
3370   if test -n "$LINT"; then
3371   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3372 else
3373   ac_save_IFS=$IFS; IFS=$ac_path_separator
3374 ac_dummy="$PATH"
3375 for ac_dir in $ac_dummy; do
3376   IFS=$ac_save_IFS
3377   test -z "$ac_dir" && ac_dir=.
3378   $as_executable_p "$ac_dir/$ac_word" || continue
3379 ac_cv_prog_LINT="$ac_prog"
3380 echo "$as_me:3380: found $ac_dir/$ac_word" >&5
3381 break
3382 done
3383
3384 fi
3385 fi
3386 LINT=$ac_cv_prog_LINT
3387 if test -n "$LINT"; then
3388   echo "$as_me:3388: result: $LINT" >&5
3389 echo "${ECHO_T}$LINT" >&6
3390 else
3391   echo "$as_me:3391: result: no" >&5
3392 echo "${ECHO_T}no" >&6
3393 fi
3394
3395   test -n "$LINT" && break
3396 done
3397
3398 echo "$as_me:3398: checking whether ln -s works" >&5
3399 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3400 LN_S=$as_ln_s
3401 if test "$LN_S" = "ln -s"; then
3402   echo "$as_me:3402: result: yes" >&5
3403 echo "${ECHO_T}yes" >&6
3404 else
3405   echo "$as_me:3405: result: no, using $LN_S" >&5
3406 echo "${ECHO_T}no, using $LN_S" >&6
3407 fi
3408
3409 echo "$as_me:3409: checking if $LN_S -f options work" >&5
3410 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3411
3412 rm -f conf$$.src conf$$dst
3413 echo >conf$$.dst
3414 echo first >conf$$.src
3415 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3416         cf_prog_ln_sf=yes
3417 else
3418         cf_prog_ln_sf=no
3419 fi
3420 rm -f conf$$.dst conf$$src
3421 echo "$as_me:3421: result: $cf_prog_ln_sf" >&5
3422 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3423
3424 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3425
3426 echo "$as_me:3426: checking for long file names" >&5
3427 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3428 if test "${ac_cv_sys_long_file_names+set}" = set; then
3429   echo $ECHO_N "(cached) $ECHO_C" >&6
3430 else
3431   ac_cv_sys_long_file_names=yes
3432 # Test for long file names in all the places we know might matter:
3433 #      .                the current directory, where building will happen
3434 #      $prefix/lib      where we will be installing things
3435 #      $exec_prefix/lib likewise
3436 # eval it to expand exec_prefix.
3437 #      $TMPDIR          if set, where it might want to write temporary files
3438 # if $TMPDIR is not set:
3439 #      /tmp             where it might want to write temporary files
3440 #      /var/tmp         likewise
3441 #      /usr/tmp         likewise
3442 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3443   ac_tmpdirs=$TMPDIR
3444 else
3445   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3446 fi
3447 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3448   test -d $ac_dir || continue
3449   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3450   ac_xdir=$ac_dir/cf$$
3451   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3452   ac_tf1=$ac_xdir/conftest9012345
3453   ac_tf2=$ac_xdir/conftest9012346
3454   (echo 1 >$ac_tf1) 2>/dev/null
3455   (echo 2 >$ac_tf2) 2>/dev/null
3456   ac_val=`cat $ac_tf1 2>/dev/null`
3457   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3458     ac_cv_sys_long_file_names=no
3459     rm -rf $ac_xdir 2>/dev/null
3460     break
3461   fi
3462   rm -rf $ac_xdir 2>/dev/null
3463 done
3464 fi
3465 echo "$as_me:3465: result: $ac_cv_sys_long_file_names" >&5
3466 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3467 if test $ac_cv_sys_long_file_names = yes; then
3468
3469 cat >>confdefs.h <<\EOF
3470 #define HAVE_LONG_FILE_NAMES 1
3471 EOF
3472
3473 fi
3474
3475 # if we find pkg-config, check if we should install the ".pc" files.
3476
3477 echo "$as_me:3477: checking if you want to use pkg-config" >&5
3478 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3479
3480 # Check whether --with-pkg-config or --without-pkg-config was given.
3481 if test "${with_pkg_config+set}" = set; then
3482   withval="$with_pkg_config"
3483   cf_pkg_config=$withval
3484 else
3485   cf_pkg_config=yes
3486 fi;
3487 echo "$as_me:3487: result: $cf_pkg_config" >&5
3488 echo "${ECHO_T}$cf_pkg_config" >&6
3489
3490 case $cf_pkg_config in
3491 (no)
3492         PKG_CONFIG=none
3493         ;;
3494 (yes)
3495
3496 if test -n "$ac_tool_prefix"; then
3497   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3498 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3499 echo "$as_me:3499: checking for $ac_word" >&5
3500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3501 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3502   echo $ECHO_N "(cached) $ECHO_C" >&6
3503 else
3504   case $PKG_CONFIG in
3505   [\\/]* | ?:[\\/]*)
3506   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3507   ;;
3508   *)
3509   ac_save_IFS=$IFS; IFS=$ac_path_separator
3510 ac_dummy="$PATH"
3511 for ac_dir in $ac_dummy; do
3512   IFS=$ac_save_IFS
3513   test -z "$ac_dir" && ac_dir=.
3514   if $as_executable_p "$ac_dir/$ac_word"; then
3515    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3516    echo "$as_me:3516: found $ac_dir/$ac_word" >&5
3517    break
3518 fi
3519 done
3520
3521   ;;
3522 esac
3523 fi
3524 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3525
3526 if test -n "$PKG_CONFIG"; then
3527   echo "$as_me:3527: result: $PKG_CONFIG" >&5
3528 echo "${ECHO_T}$PKG_CONFIG" >&6
3529 else
3530   echo "$as_me:3530: result: no" >&5
3531 echo "${ECHO_T}no" >&6
3532 fi
3533
3534 fi
3535 if test -z "$ac_cv_path_PKG_CONFIG"; then
3536   ac_pt_PKG_CONFIG=$PKG_CONFIG
3537   # Extract the first word of "pkg-config", so it can be a program name with args.
3538 set dummy pkg-config; ac_word=$2
3539 echo "$as_me:3539: checking for $ac_word" >&5
3540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3541 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3542   echo $ECHO_N "(cached) $ECHO_C" >&6
3543 else
3544   case $ac_pt_PKG_CONFIG in
3545   [\\/]* | ?:[\\/]*)
3546   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3547   ;;
3548   *)
3549   ac_save_IFS=$IFS; IFS=$ac_path_separator
3550 ac_dummy="$PATH"
3551 for ac_dir in $ac_dummy; do
3552   IFS=$ac_save_IFS
3553   test -z "$ac_dir" && ac_dir=.
3554   if $as_executable_p "$ac_dir/$ac_word"; then
3555    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3556    echo "$as_me:3556: found $ac_dir/$ac_word" >&5
3557    break
3558 fi
3559 done
3560
3561   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3562   ;;
3563 esac
3564 fi
3565 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3566
3567 if test -n "$ac_pt_PKG_CONFIG"; then
3568   echo "$as_me:3568: result: $ac_pt_PKG_CONFIG" >&5
3569 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3570 else
3571   echo "$as_me:3571: result: no" >&5
3572 echo "${ECHO_T}no" >&6
3573 fi
3574
3575   PKG_CONFIG=$ac_pt_PKG_CONFIG
3576 else
3577   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3578 fi
3579
3580         ;;
3581 (*)
3582         PKG_CONFIG=$withval
3583         ;;
3584 esac
3585
3586 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3587 if test "$PKG_CONFIG" != none ; then
3588
3589 if test "x$prefix" != xNONE; then
3590         cf_path_syntax="$prefix"
3591 else
3592         cf_path_syntax="$ac_default_prefix"
3593 fi
3594
3595 case ".$PKG_CONFIG" in
3596 (.\$\(*\)*|.\'*\'*)
3597         ;;
3598 (..|./*|.\\*)
3599         ;;
3600 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3601         ;;
3602 (.\${*prefix}*|.\${*dir}*)
3603         eval PKG_CONFIG="$PKG_CONFIG"
3604         case ".$PKG_CONFIG" in
3605         (.NONE/*)
3606                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3607                 ;;
3608         esac
3609         ;;
3610 (.no|.NONE/*)
3611         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3612         ;;
3613 (*)
3614         { { echo "$as_me:3614: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3615 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3616    { (exit 1); exit 1; }; }
3617         ;;
3618 esac
3619
3620 elif test "x$cf_pkg_config" != xno ; then
3621         { echo "$as_me:3621: WARNING: pkg-config is not installed" >&5
3622 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3623 fi
3624
3625 case $PKG_CONFIG in
3626 (no|none|yes)
3627         echo "$as_me:3627: checking for pkg-config library directory" >&5
3628 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3629         ;;
3630 (*)
3631         echo "$as_me:3631: checking for $PKG_CONFIG library directory" >&5
3632 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3633         ;;
3634 esac
3635
3636 PKG_CONFIG_LIBDIR=no
3637
3638 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3639 if test "${with_pkg_config_libdir+set}" = set; then
3640   withval="$with_pkg_config_libdir"
3641   PKG_CONFIG_LIBDIR=$withval
3642 else
3643   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3644 fi;
3645
3646 case x$PKG_CONFIG_LIBDIR in
3647 (x/*)
3648         ;;
3649 (xyes)
3650         # Look for the library directory using the same prefix as the executable
3651         if test "x$PKG_CONFIG" = xnone
3652         then
3653                 cf_path=$prefix
3654         else
3655                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3656         fi
3657
3658         # If you don't like using the default architecture, you have to specify the
3659         # intended library directory and corresponding compiler/linker options.
3660         #
3661         # This case allows for Debian's 2014-flavor of multiarch, along with the
3662         # most common variations before that point.  Some other variants spell the
3663         # directory differently, e.g., "pkg-config", and put it in unusual places.
3664         # pkg-config has always been poorly standardized, which is ironic...
3665         case x`(arch) 2>/dev/null` in
3666         (*64)
3667                 cf_search_path="\
3668                         $cf_path/lib/*64-linux-gnu \
3669                         $cf_path/share \
3670                         $cf_path/lib64 \
3671                         $cf_path/lib32 \
3672                         $cf_path/lib"
3673                 ;;
3674         (*)
3675                 cf_search_path="\
3676                         $cf_path/lib/*-linux-gnu \
3677                         $cf_path/share \
3678                         $cf_path/lib32 \
3679                         $cf_path/lib \
3680                         $cf_path/libdata"
3681                 ;;
3682         esac
3683
3684         test -n "$verbose" && echo "    list..." 1>&6
3685
3686 echo "${as_me:-configure}:3686: testing list... ..." 1>&5
3687
3688         for cf_config in $cf_search_path
3689         do
3690                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3691
3692 echo "${as_me:-configure}:3692: testing checking $cf_config/pkgconfig ..." 1>&5
3693
3694                 if test -d $cf_config/pkgconfig
3695                 then
3696                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3697                         echo "$as_me:3697: checking done" >&5
3698 echo $ECHO_N "checking done... $ECHO_C" >&6
3699                         break
3700                 fi
3701         done
3702         ;;
3703 (*)
3704         ;;
3705 esac
3706
3707 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3708         echo "$as_me:3708: result: $PKG_CONFIG_LIBDIR" >&5
3709 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3710 fi
3711
3712 if test "x$PKG_CONFIG" != xnone
3713 then
3714         echo "$as_me:3714: checking if we should install .pc files for $PKG_CONFIG" >&5
3715 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3716 else
3717         echo "$as_me:3717: checking if we should install .pc files" >&5
3718 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3719 fi
3720
3721 # Check whether --enable-pc-files or --disable-pc-files was given.
3722 if test "${enable_pc_files+set}" = set; then
3723   enableval="$enable_pc_files"
3724   enable_pc_files=$enableval
3725 else
3726   enable_pc_files=no
3727 fi;
3728 echo "$as_me:3728: result: $enable_pc_files" >&5
3729 echo "${ECHO_T}$enable_pc_files" >&6
3730
3731 if test "x$enable_pc_files" != xno
3732 then
3733         MAKE_PC_FILES=
3734         case "x$PKG_CONFIG_LIBDIR" in
3735         (xno|xyes)
3736                 { echo "$as_me:3736: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3737 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3738                 ;;
3739         (*)
3740
3741 if test "x$prefix" != xNONE; then
3742         cf_path_syntax="$prefix"
3743 else
3744         cf_path_syntax="$ac_default_prefix"
3745 fi
3746
3747 case ".$PKG_CONFIG_LIBDIR" in
3748 (.\$\(*\)*|.\'*\'*)
3749         ;;
3750 (..|./*|.\\*)
3751         ;;
3752 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3753         ;;
3754 (.\${*prefix}*|.\${*dir}*)
3755         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3756         case ".$PKG_CONFIG_LIBDIR" in
3757         (.NONE/*)
3758                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3759                 ;;
3760         esac
3761         ;;
3762 (.no|.NONE/*)
3763         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3764         ;;
3765 (*)
3766         { { echo "$as_me:3766: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3767 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3768    { (exit 1); exit 1; }; }
3769         ;;
3770 esac
3771
3772                 ;;
3773         esac
3774 else
3775         MAKE_PC_FILES="#"
3776 fi
3777
3778 if test -z "$MAKE_PC_FILES"
3779 then
3780         echo "$as_me:3780: checking for suffix to add to pc-files" >&5
3781 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3782
3783 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3784 if test "${with_pc_suffix+set}" = set; then
3785   withval="$with_pc_suffix"
3786   case "x$withval" in
3787         (xyes|xno)
3788                 PC_MODULE_SUFFIX=
3789                 ;;
3790         (*)     PC_MODULE_SUFFIX="$withval"
3791                 ;;
3792         esac
3793 fi;
3794         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3795         echo "$as_me:3795: result: $PC_MODULE_SUFFIX" >&5
3796 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3797         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3798
3799 fi
3800
3801 echo "$as_me:3801: checking if we should assume mixed-case filenames" >&5
3802 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3803
3804 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3805 if test "${enable_mixed_case+set}" = set; then
3806   enableval="$enable_mixed_case"
3807   enable_mixedcase=$enableval
3808 else
3809   enable_mixedcase=auto
3810 fi;
3811 echo "$as_me:3811: result: $enable_mixedcase" >&5
3812 echo "${ECHO_T}$enable_mixedcase" >&6
3813 if test "$enable_mixedcase" = "auto" ; then
3814
3815 echo "$as_me:3815: checking if filesystem supports mixed-case filenames" >&5
3816 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3817 if test "${cf_cv_mixedcase+set}" = set; then
3818   echo $ECHO_N "(cached) $ECHO_C" >&6
3819 else
3820
3821 if test "$cross_compiling" = yes ; then
3822         case $target_alias in
3823         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3824                 cf_cv_mixedcase=no
3825                 ;;
3826         (*)
3827                 cf_cv_mixedcase=yes
3828                 ;;
3829         esac
3830 else
3831         rm -f conftest CONFTEST
3832         echo test >conftest
3833         if test -f CONFTEST ; then
3834                 cf_cv_mixedcase=no
3835         else
3836                 cf_cv_mixedcase=yes
3837         fi
3838         rm -f conftest CONFTEST
3839 fi
3840
3841 fi
3842 echo "$as_me:3842: result: $cf_cv_mixedcase" >&5
3843 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3844 test "$cf_cv_mixedcase" = yes &&
3845 cat >>confdefs.h <<\EOF
3846 #define MIXEDCASE_FILENAMES 1
3847 EOF
3848
3849 else
3850         cf_cv_mixedcase=$enable_mixedcase
3851         if test "x$enable_mixedcase" = "xyes" ; then
3852
3853 cat >>confdefs.h <<\EOF
3854 #define MIXEDCASE_FILENAMES 1
3855 EOF
3856
3857         fi
3858 fi
3859
3860 # do this after mixed-case option (tags/TAGS is not as important as tic).
3861 echo "$as_me:3861: checking whether ${MAKE-make} sets \${MAKE}" >&5
3862 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3863 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3864 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3865   echo $ECHO_N "(cached) $ECHO_C" >&6
3866 else
3867   cat >conftest.make <<\EOF
3868 all:
3869         @echo 'ac_maketemp="${MAKE}"'
3870 EOF
3871 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3872 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3873 if test -n "$ac_maketemp"; then
3874   eval ac_cv_prog_make_${ac_make}_set=yes
3875 else
3876   eval ac_cv_prog_make_${ac_make}_set=no
3877 fi
3878 rm -f conftest.make
3879 fi
3880 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3881   echo "$as_me:3881: result: yes" >&5
3882 echo "${ECHO_T}yes" >&6
3883   SET_MAKE=
3884 else
3885   echo "$as_me:3885: result: no" >&5
3886 echo "${ECHO_T}no" >&6
3887   SET_MAKE="MAKE=${MAKE-make}"
3888 fi
3889
3890 for ac_prog in exctags ctags
3891 do
3892   # Extract the first word of "$ac_prog", so it can be a program name with args.
3893 set dummy $ac_prog; ac_word=$2
3894 echo "$as_me:3894: checking for $ac_word" >&5
3895 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3896 if test "${ac_cv_prog_CTAGS+set}" = set; then
3897   echo $ECHO_N "(cached) $ECHO_C" >&6
3898 else
3899   if test -n "$CTAGS"; then
3900   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3901 else
3902   ac_save_IFS=$IFS; IFS=$ac_path_separator
3903 ac_dummy="$PATH"
3904 for ac_dir in $ac_dummy; do
3905   IFS=$ac_save_IFS
3906   test -z "$ac_dir" && ac_dir=.
3907   $as_executable_p "$ac_dir/$ac_word" || continue
3908 ac_cv_prog_CTAGS="$ac_prog"
3909 echo "$as_me:3909: found $ac_dir/$ac_word" >&5
3910 break
3911 done
3912
3913 fi
3914 fi
3915 CTAGS=$ac_cv_prog_CTAGS
3916 if test -n "$CTAGS"; then
3917   echo "$as_me:3917: result: $CTAGS" >&5
3918 echo "${ECHO_T}$CTAGS" >&6
3919 else
3920   echo "$as_me:3920: result: no" >&5
3921 echo "${ECHO_T}no" >&6
3922 fi
3923
3924   test -n "$CTAGS" && break
3925 done
3926
3927 for ac_prog in exetags etags
3928 do
3929   # Extract the first word of "$ac_prog", so it can be a program name with args.
3930 set dummy $ac_prog; ac_word=$2
3931 echo "$as_me:3931: checking for $ac_word" >&5
3932 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3933 if test "${ac_cv_prog_ETAGS+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936   if test -n "$ETAGS"; then
3937   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3938 else
3939   ac_save_IFS=$IFS; IFS=$ac_path_separator
3940 ac_dummy="$PATH"
3941 for ac_dir in $ac_dummy; do
3942   IFS=$ac_save_IFS
3943   test -z "$ac_dir" && ac_dir=.
3944   $as_executable_p "$ac_dir/$ac_word" || continue
3945 ac_cv_prog_ETAGS="$ac_prog"
3946 echo "$as_me:3946: found $ac_dir/$ac_word" >&5
3947 break
3948 done
3949
3950 fi
3951 fi
3952 ETAGS=$ac_cv_prog_ETAGS
3953 if test -n "$ETAGS"; then
3954   echo "$as_me:3954: result: $ETAGS" >&5
3955 echo "${ECHO_T}$ETAGS" >&6
3956 else
3957   echo "$as_me:3957: result: no" >&5
3958 echo "${ECHO_T}no" >&6
3959 fi
3960
3961   test -n "$ETAGS" && break
3962 done
3963
3964 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3965 set dummy ${CTAGS:-ctags}; ac_word=$2
3966 echo "$as_me:3966: checking for $ac_word" >&5
3967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3968 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3969   echo $ECHO_N "(cached) $ECHO_C" >&6
3970 else
3971   if test -n "$MAKE_LOWER_TAGS"; then
3972   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3973 else
3974   ac_save_IFS=$IFS; IFS=$ac_path_separator
3975 ac_dummy="$PATH"
3976 for ac_dir in $ac_dummy; do
3977   IFS=$ac_save_IFS
3978   test -z "$ac_dir" && ac_dir=.
3979   $as_executable_p "$ac_dir/$ac_word" || continue
3980 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3981 echo "$as_me:3981: found $ac_dir/$ac_word" >&5
3982 break
3983 done
3984
3985   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3986 fi
3987 fi
3988 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3989 if test -n "$MAKE_LOWER_TAGS"; then
3990   echo "$as_me:3990: result: $MAKE_LOWER_TAGS" >&5
3991 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3992 else
3993   echo "$as_me:3993: result: no" >&5
3994 echo "${ECHO_T}no" >&6
3995 fi
3996
3997 if test "$cf_cv_mixedcase" = yes ; then
3998         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3999 set dummy ${ETAGS:-etags}; ac_word=$2
4000 echo "$as_me:4000: checking for $ac_word" >&5
4001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4002 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4003   echo $ECHO_N "(cached) $ECHO_C" >&6
4004 else
4005   if test -n "$MAKE_UPPER_TAGS"; then
4006   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4007 else
4008   ac_save_IFS=$IFS; IFS=$ac_path_separator
4009 ac_dummy="$PATH"
4010 for ac_dir in $ac_dummy; do
4011   IFS=$ac_save_IFS
4012   test -z "$ac_dir" && ac_dir=.
4013   $as_executable_p "$ac_dir/$ac_word" || continue
4014 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4015 echo "$as_me:4015: found $ac_dir/$ac_word" >&5
4016 break
4017 done
4018
4019   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4020 fi
4021 fi
4022 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4023 if test -n "$MAKE_UPPER_TAGS"; then
4024   echo "$as_me:4024: result: $MAKE_UPPER_TAGS" >&5
4025 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4026 else
4027   echo "$as_me:4027: result: no" >&5
4028 echo "${ECHO_T}no" >&6
4029 fi
4030
4031 else
4032         MAKE_UPPER_TAGS=no
4033 fi
4034
4035 if test "$MAKE_UPPER_TAGS" = yes ; then
4036         MAKE_UPPER_TAGS=
4037 else
4038         MAKE_UPPER_TAGS="#"
4039 fi
4040
4041 if test "$MAKE_LOWER_TAGS" = yes ; then
4042         MAKE_LOWER_TAGS=
4043 else
4044         MAKE_LOWER_TAGS="#"
4045 fi
4046
4047 echo "$as_me:4047: checking for makeflags variable" >&5
4048 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4049 if test "${cf_cv_makeflags+set}" = set; then
4050   echo $ECHO_N "(cached) $ECHO_C" >&6
4051 else
4052
4053         cf_cv_makeflags=''
4054         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4055         do
4056                 cat >cf_makeflags.tmp <<CF_EOF
4057 SHELL = $SHELL
4058 all :
4059         @ echo '.$cf_option'
4060 CF_EOF
4061                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4062                 case "$cf_result" in
4063                 (.*k|.*kw)
4064                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4065                         case "$cf_result" in
4066                         (.*CC=*)        cf_cv_makeflags=
4067                                 ;;
4068                         (*)     cf_cv_makeflags=$cf_option
4069                                 ;;
4070                         esac
4071                         break
4072                         ;;
4073                 (.-)    ;;
4074                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4075                         ;;
4076                 esac
4077         done
4078         rm -f cf_makeflags.tmp
4079
4080 fi
4081 echo "$as_me:4081: result: $cf_cv_makeflags" >&5
4082 echo "${ECHO_T}$cf_cv_makeflags" >&6
4083
4084 if test -n "$ac_tool_prefix"; then
4085   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4086 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4087 echo "$as_me:4087: checking for $ac_word" >&5
4088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4089 if test "${ac_cv_prog_RANLIB+set}" = set; then
4090   echo $ECHO_N "(cached) $ECHO_C" >&6
4091 else
4092   if test -n "$RANLIB"; then
4093   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4094 else
4095   ac_save_IFS=$IFS; IFS=$ac_path_separator
4096 ac_dummy="$PATH"
4097 for ac_dir in $ac_dummy; do
4098   IFS=$ac_save_IFS
4099   test -z "$ac_dir" && ac_dir=.
4100   $as_executable_p "$ac_dir/$ac_word" || continue
4101 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4102 echo "$as_me:4102: found $ac_dir/$ac_word" >&5
4103 break
4104 done
4105
4106 fi
4107 fi
4108 RANLIB=$ac_cv_prog_RANLIB
4109 if test -n "$RANLIB"; then
4110   echo "$as_me:4110: result: $RANLIB" >&5
4111 echo "${ECHO_T}$RANLIB" >&6
4112 else
4113   echo "$as_me:4113: result: no" >&5
4114 echo "${ECHO_T}no" >&6
4115 fi
4116
4117 fi
4118 if test -z "$ac_cv_prog_RANLIB"; then
4119   ac_ct_RANLIB=$RANLIB
4120   # Extract the first word of "ranlib", so it can be a program name with args.
4121 set dummy ranlib; ac_word=$2
4122 echo "$as_me:4122: checking for $ac_word" >&5
4123 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4124 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4125   echo $ECHO_N "(cached) $ECHO_C" >&6
4126 else
4127   if test -n "$ac_ct_RANLIB"; then
4128   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4129 else
4130   ac_save_IFS=$IFS; IFS=$ac_path_separator
4131 ac_dummy="$PATH"
4132 for ac_dir in $ac_dummy; do
4133   IFS=$ac_save_IFS
4134   test -z "$ac_dir" && ac_dir=.
4135   $as_executable_p "$ac_dir/$ac_word" || continue
4136 ac_cv_prog_ac_ct_RANLIB="ranlib"
4137 echo "$as_me:4137: found $ac_dir/$ac_word" >&5
4138 break
4139 done
4140
4141   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4142 fi
4143 fi
4144 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4145 if test -n "$ac_ct_RANLIB"; then
4146   echo "$as_me:4146: result: $ac_ct_RANLIB" >&5
4147 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4148 else
4149   echo "$as_me:4149: result: no" >&5
4150 echo "${ECHO_T}no" >&6
4151 fi
4152
4153   RANLIB=$ac_ct_RANLIB
4154 else
4155   RANLIB="$ac_cv_prog_RANLIB"
4156 fi
4157
4158 if test -n "$ac_tool_prefix"; then
4159   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4160 set dummy ${ac_tool_prefix}ld; ac_word=$2
4161 echo "$as_me:4161: checking for $ac_word" >&5
4162 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4163 if test "${ac_cv_prog_LD+set}" = set; then
4164   echo $ECHO_N "(cached) $ECHO_C" >&6
4165 else
4166   if test -n "$LD"; then
4167   ac_cv_prog_LD="$LD" # Let the user override the test.
4168 else
4169   ac_save_IFS=$IFS; IFS=$ac_path_separator
4170 ac_dummy="$PATH"
4171 for ac_dir in $ac_dummy; do
4172   IFS=$ac_save_IFS
4173   test -z "$ac_dir" && ac_dir=.
4174   $as_executable_p "$ac_dir/$ac_word" || continue
4175 ac_cv_prog_LD="${ac_tool_prefix}ld"
4176 echo "$as_me:4176: found $ac_dir/$ac_word" >&5
4177 break
4178 done
4179
4180 fi
4181 fi
4182 LD=$ac_cv_prog_LD
4183 if test -n "$LD"; then
4184   echo "$as_me:4184: result: $LD" >&5
4185 echo "${ECHO_T}$LD" >&6
4186 else
4187   echo "$as_me:4187: result: no" >&5
4188 echo "${ECHO_T}no" >&6
4189 fi
4190
4191 fi
4192 if test -z "$ac_cv_prog_LD"; then
4193   ac_ct_LD=$LD
4194   # Extract the first word of "ld", so it can be a program name with args.
4195 set dummy ld; ac_word=$2
4196 echo "$as_me:4196: checking for $ac_word" >&5
4197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4198 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4199   echo $ECHO_N "(cached) $ECHO_C" >&6
4200 else
4201   if test -n "$ac_ct_LD"; then
4202   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4203 else
4204   ac_save_IFS=$IFS; IFS=$ac_path_separator
4205 ac_dummy="$PATH"
4206 for ac_dir in $ac_dummy; do
4207   IFS=$ac_save_IFS
4208   test -z "$ac_dir" && ac_dir=.
4209   $as_executable_p "$ac_dir/$ac_word" || continue
4210 ac_cv_prog_ac_ct_LD="ld"
4211 echo "$as_me:4211: found $ac_dir/$ac_word" >&5
4212 break
4213 done
4214
4215   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4216 fi
4217 fi
4218 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4219 if test -n "$ac_ct_LD"; then
4220   echo "$as_me:4220: result: $ac_ct_LD" >&5
4221 echo "${ECHO_T}$ac_ct_LD" >&6
4222 else
4223   echo "$as_me:4223: result: no" >&5
4224 echo "${ECHO_T}no" >&6
4225 fi
4226
4227   LD=$ac_ct_LD
4228 else
4229   LD="$ac_cv_prog_LD"
4230 fi
4231
4232 if test -n "$ac_tool_prefix"; then
4233   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4234 set dummy ${ac_tool_prefix}ar; ac_word=$2
4235 echo "$as_me:4235: checking for $ac_word" >&5
4236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4237 if test "${ac_cv_prog_AR+set}" = set; then
4238   echo $ECHO_N "(cached) $ECHO_C" >&6
4239 else
4240   if test -n "$AR"; then
4241   ac_cv_prog_AR="$AR" # Let the user override the test.
4242 else
4243   ac_save_IFS=$IFS; IFS=$ac_path_separator
4244 ac_dummy="$PATH"
4245 for ac_dir in $ac_dummy; do
4246   IFS=$ac_save_IFS
4247   test -z "$ac_dir" && ac_dir=.
4248   $as_executable_p "$ac_dir/$ac_word" || continue
4249 ac_cv_prog_AR="${ac_tool_prefix}ar"
4250 echo "$as_me:4250: found $ac_dir/$ac_word" >&5
4251 break
4252 done
4253
4254 fi
4255 fi
4256 AR=$ac_cv_prog_AR
4257 if test -n "$AR"; then
4258   echo "$as_me:4258: result: $AR" >&5
4259 echo "${ECHO_T}$AR" >&6
4260 else
4261   echo "$as_me:4261: result: no" >&5
4262 echo "${ECHO_T}no" >&6
4263 fi
4264
4265 fi
4266 if test -z "$ac_cv_prog_AR"; then
4267   ac_ct_AR=$AR
4268   # Extract the first word of "ar", so it can be a program name with args.
4269 set dummy ar; ac_word=$2
4270 echo "$as_me:4270: checking for $ac_word" >&5
4271 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4272 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4273   echo $ECHO_N "(cached) $ECHO_C" >&6
4274 else
4275   if test -n "$ac_ct_AR"; then
4276   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4277 else
4278   ac_save_IFS=$IFS; IFS=$ac_path_separator
4279 ac_dummy="$PATH"
4280 for ac_dir in $ac_dummy; do
4281   IFS=$ac_save_IFS
4282   test -z "$ac_dir" && ac_dir=.
4283   $as_executable_p "$ac_dir/$ac_word" || continue
4284 ac_cv_prog_ac_ct_AR="ar"
4285 echo "$as_me:4285: found $ac_dir/$ac_word" >&5
4286 break
4287 done
4288
4289   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4290 fi
4291 fi
4292 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4293 if test -n "$ac_ct_AR"; then
4294   echo "$as_me:4294: result: $ac_ct_AR" >&5
4295 echo "${ECHO_T}$ac_ct_AR" >&6
4296 else
4297   echo "$as_me:4297: result: no" >&5
4298 echo "${ECHO_T}no" >&6
4299 fi
4300
4301   AR=$ac_ct_AR
4302 else
4303   AR="$ac_cv_prog_AR"
4304 fi
4305
4306 if test -n "$ac_tool_prefix"; then
4307   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4308 set dummy ${ac_tool_prefix}nm; ac_word=$2
4309 echo "$as_me:4309: checking for $ac_word" >&5
4310 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4311 if test "${ac_cv_prog_NM+set}" = set; then
4312   echo $ECHO_N "(cached) $ECHO_C" >&6
4313 else
4314   if test -n "$NM"; then
4315   ac_cv_prog_NM="$NM" # Let the user override the test.
4316 else
4317   ac_save_IFS=$IFS; IFS=$ac_path_separator
4318 ac_dummy="$PATH"
4319 for ac_dir in $ac_dummy; do
4320   IFS=$ac_save_IFS
4321   test -z "$ac_dir" && ac_dir=.
4322   $as_executable_p "$ac_dir/$ac_word" || continue
4323 ac_cv_prog_NM="${ac_tool_prefix}nm"
4324 echo "$as_me:4324: found $ac_dir/$ac_word" >&5
4325 break
4326 done
4327
4328 fi
4329 fi
4330 NM=$ac_cv_prog_NM
4331 if test -n "$NM"; then
4332   echo "$as_me:4332: result: $NM" >&5
4333 echo "${ECHO_T}$NM" >&6
4334 else
4335   echo "$as_me:4335: result: no" >&5
4336 echo "${ECHO_T}no" >&6
4337 fi
4338
4339 fi
4340 if test -z "$ac_cv_prog_NM"; then
4341   ac_ct_NM=$NM
4342   # Extract the first word of "nm", so it can be a program name with args.
4343 set dummy nm; ac_word=$2
4344 echo "$as_me:4344: checking for $ac_word" >&5
4345 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4346 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4347   echo $ECHO_N "(cached) $ECHO_C" >&6
4348 else
4349   if test -n "$ac_ct_NM"; then
4350   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4351 else
4352   ac_save_IFS=$IFS; IFS=$ac_path_separator
4353 ac_dummy="$PATH"
4354 for ac_dir in $ac_dummy; do
4355   IFS=$ac_save_IFS
4356   test -z "$ac_dir" && ac_dir=.
4357   $as_executable_p "$ac_dir/$ac_word" || continue
4358 ac_cv_prog_ac_ct_NM="nm"
4359 echo "$as_me:4359: found $ac_dir/$ac_word" >&5
4360 break
4361 done
4362
4363   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4364 fi
4365 fi
4366 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4367 if test -n "$ac_ct_NM"; then
4368   echo "$as_me:4368: result: $ac_ct_NM" >&5
4369 echo "${ECHO_T}$ac_ct_NM" >&6
4370 else
4371   echo "$as_me:4371: result: no" >&5
4372 echo "${ECHO_T}no" >&6
4373 fi
4374
4375   NM=$ac_ct_NM
4376 else
4377   NM="$ac_cv_prog_NM"
4378 fi
4379
4380 if test -n "$ac_tool_prefix"; then
4381   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4382 set dummy ${ac_tool_prefix}ar; ac_word=$2
4383 echo "$as_me:4383: checking for $ac_word" >&5
4384 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4385 if test "${ac_cv_prog_AR+set}" = set; then
4386   echo $ECHO_N "(cached) $ECHO_C" >&6
4387 else
4388   if test -n "$AR"; then
4389   ac_cv_prog_AR="$AR" # Let the user override the test.
4390 else
4391   ac_save_IFS=$IFS; IFS=$ac_path_separator
4392 ac_dummy="$PATH"
4393 for ac_dir in $ac_dummy; do
4394   IFS=$ac_save_IFS
4395   test -z "$ac_dir" && ac_dir=.
4396   $as_executable_p "$ac_dir/$ac_word" || continue
4397 ac_cv_prog_AR="${ac_tool_prefix}ar"
4398 echo "$as_me:4398: found $ac_dir/$ac_word" >&5
4399 break
4400 done
4401
4402 fi
4403 fi
4404 AR=$ac_cv_prog_AR
4405 if test -n "$AR"; then
4406   echo "$as_me:4406: result: $AR" >&5
4407 echo "${ECHO_T}$AR" >&6
4408 else
4409   echo "$as_me:4409: result: no" >&5
4410 echo "${ECHO_T}no" >&6
4411 fi
4412
4413 fi
4414 if test -z "$ac_cv_prog_AR"; then
4415   ac_ct_AR=$AR
4416   # Extract the first word of "ar", so it can be a program name with args.
4417 set dummy ar; ac_word=$2
4418 echo "$as_me:4418: checking for $ac_word" >&5
4419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4420 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4421   echo $ECHO_N "(cached) $ECHO_C" >&6
4422 else
4423   if test -n "$ac_ct_AR"; then
4424   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4425 else
4426   ac_save_IFS=$IFS; IFS=$ac_path_separator
4427 ac_dummy="$PATH"
4428 for ac_dir in $ac_dummy; do
4429   IFS=$ac_save_IFS
4430   test -z "$ac_dir" && ac_dir=.
4431   $as_executable_p "$ac_dir/$ac_word" || continue
4432 ac_cv_prog_ac_ct_AR="ar"
4433 echo "$as_me:4433: found $ac_dir/$ac_word" >&5
4434 break
4435 done
4436
4437   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4438 fi
4439 fi
4440 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4441 if test -n "$ac_ct_AR"; then
4442   echo "$as_me:4442: result: $ac_ct_AR" >&5
4443 echo "${ECHO_T}$ac_ct_AR" >&6
4444 else
4445   echo "$as_me:4445: result: no" >&5
4446 echo "${ECHO_T}no" >&6
4447 fi
4448
4449   AR=$ac_ct_AR
4450 else
4451   AR="$ac_cv_prog_AR"
4452 fi
4453
4454 echo "$as_me:4454: checking for options to update archives" >&5
4455 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4456 if test "${cf_cv_ar_flags+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459
4460         cf_cv_ar_flags=unknown
4461         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4462         do
4463
4464                 # check if $ARFLAGS already contains this choice
4465                 if test "x$ARFLAGS" != "x" ; then
4466                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4467                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4468                                 cf_cv_ar_flags=
4469                                 break
4470                         fi
4471                 fi
4472
4473                 rm -f conftest.$ac_cv_objext
4474                 rm -f conftest.a
4475
4476                 cat >conftest.$ac_ext <<EOF
4477 #line 4477 "configure"
4478 int     testdata[3] = { 123, 456, 789 };
4479 EOF
4480                 if { (eval echo "$as_me:4480: \"$ac_compile\"") >&5
4481   (eval $ac_compile) 2>&5
4482   ac_status=$?
4483   echo "$as_me:4483: \$? = $ac_status" >&5
4484   (exit $ac_status); } ; then
4485                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4486                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4487                         if test -f conftest.a ; then
4488                                 cf_cv_ar_flags=$cf_ar_flags
4489                                 break
4490                         fi
4491                 else
4492                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4493
4494 echo "${as_me:-configure}:4494: testing cannot compile test-program ..." 1>&5
4495
4496                         break
4497                 fi
4498         done
4499         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4500
4501 fi
4502 echo "$as_me:4502: result: $cf_cv_ar_flags" >&5
4503 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4504
4505 if test -n "$ARFLAGS" ; then
4506         if test -n "$cf_cv_ar_flags" ; then
4507                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4508         fi
4509 else
4510         ARFLAGS=$cf_cv_ar_flags
4511 fi
4512
4513 echo "$as_me:4513: checking if you have specified an install-prefix" >&5
4514 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4515
4516 # Check whether --with-install-prefix or --without-install-prefix was given.
4517 if test "${with_install_prefix+set}" = set; then
4518   withval="$with_install_prefix"
4519   case "x$withval" in
4520         (xyes|xno)
4521                 ;;
4522         (*)     DESTDIR="$withval"
4523                 ;;
4524         esac
4525 fi;
4526 echo "$as_me:4526: result: $DESTDIR" >&5
4527 echo "${ECHO_T}$DESTDIR" >&6
4528
4529 ###############################################################################
4530
4531 # If we're cross-compiling, allow the user to override the tools and their
4532 # options.  The configure script is oriented toward identifying the host
4533 # compiler, etc., but we need a build compiler to generate parts of the source.
4534
4535 if test "$cross_compiling" = yes ; then
4536
4537         # defaults that we might want to override
4538         : ${BUILD_CFLAGS:=''}
4539         : ${BUILD_CPPFLAGS:=''}
4540         : ${BUILD_LDFLAGS:=''}
4541         : ${BUILD_LIBS:=''}
4542         : ${BUILD_EXEEXT:='$x'}
4543         : ${BUILD_OBJEXT:='o'}
4544
4545 # Check whether --with-build-cc or --without-build-cc was given.
4546 if test "${with_build_cc+set}" = set; then
4547   withval="$with_build_cc"
4548   BUILD_CC="$withval"
4549 else
4550   for ac_prog in gcc cc cl
4551 do
4552   # Extract the first word of "$ac_prog", so it can be a program name with args.
4553 set dummy $ac_prog; ac_word=$2
4554 echo "$as_me:4554: checking for $ac_word" >&5
4555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4556 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4557   echo $ECHO_N "(cached) $ECHO_C" >&6
4558 else
4559   if test -n "$BUILD_CC"; then
4560   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4561 else
4562   ac_save_IFS=$IFS; IFS=$ac_path_separator
4563 ac_dummy="$PATH"
4564 for ac_dir in $ac_dummy; do
4565   IFS=$ac_save_IFS
4566   test -z "$ac_dir" && ac_dir=.
4567   $as_executable_p "$ac_dir/$ac_word" || continue
4568 ac_cv_prog_BUILD_CC="$ac_prog"
4569 echo "$as_me:4569: found $ac_dir/$ac_word" >&5
4570 break
4571 done
4572
4573 fi
4574 fi
4575 BUILD_CC=$ac_cv_prog_BUILD_CC
4576 if test -n "$BUILD_CC"; then
4577   echo "$as_me:4577: result: $BUILD_CC" >&5
4578 echo "${ECHO_T}$BUILD_CC" >&6
4579 else
4580   echo "$as_me:4580: result: no" >&5
4581 echo "${ECHO_T}no" >&6
4582 fi
4583
4584   test -n "$BUILD_CC" && break
4585 done
4586
4587 fi;
4588         echo "$as_me:4588: checking for native build C compiler" >&5
4589 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4590         echo "$as_me:4590: result: $BUILD_CC" >&5
4591 echo "${ECHO_T}$BUILD_CC" >&6
4592
4593         echo "$as_me:4593: checking for native build C preprocessor" >&5
4594 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4595
4596 # Check whether --with-build-cpp or --without-build-cpp was given.
4597 if test "${with_build_cpp+set}" = set; then
4598   withval="$with_build_cpp"
4599   BUILD_CPP="$withval"
4600 else
4601   BUILD_CPP='${BUILD_CC} -E'
4602 fi;
4603         echo "$as_me:4603: result: $BUILD_CPP" >&5
4604 echo "${ECHO_T}$BUILD_CPP" >&6
4605
4606         echo "$as_me:4606: checking for native build C flags" >&5
4607 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4608
4609 # Check whether --with-build-cflags or --without-build-cflags was given.
4610 if test "${with_build_cflags+set}" = set; then
4611   withval="$with_build_cflags"
4612   BUILD_CFLAGS="$withval"
4613 fi;
4614         echo "$as_me:4614: result: $BUILD_CFLAGS" >&5
4615 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4616
4617         echo "$as_me:4617: checking for native build C preprocessor-flags" >&5
4618 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4619
4620 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4621 if test "${with_build_cppflags+set}" = set; then
4622   withval="$with_build_cppflags"
4623   BUILD_CPPFLAGS="$withval"
4624 fi;
4625         echo "$as_me:4625: result: $BUILD_CPPFLAGS" >&5
4626 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4627
4628         echo "$as_me:4628: checking for native build linker-flags" >&5
4629 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4630
4631 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4632 if test "${with_build_ldflags+set}" = set; then
4633   withval="$with_build_ldflags"
4634   BUILD_LDFLAGS="$withval"
4635 fi;
4636         echo "$as_me:4636: result: $BUILD_LDFLAGS" >&5
4637 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4638
4639         echo "$as_me:4639: checking for native build linker-libraries" >&5
4640 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4641
4642 # Check whether --with-build-libs or --without-build-libs was given.
4643 if test "${with_build_libs+set}" = set; then
4644   withval="$with_build_libs"
4645   BUILD_LIBS="$withval"
4646 fi;
4647         echo "$as_me:4647: result: $BUILD_LIBS" >&5
4648 echo "${ECHO_T}$BUILD_LIBS" >&6
4649
4650         # this assumes we're on Unix.
4651         BUILD_EXEEXT=
4652         BUILD_OBJEXT=o
4653
4654         : ${BUILD_CC:='${CC}'}
4655
4656         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4657                 { { echo "$as_me:4657: error: Cross-build requires two compilers.
4658 Use --with-build-cc to specify the native compiler." >&5
4659 echo "$as_me: error: Cross-build requires two compilers.
4660 Use --with-build-cc to specify the native compiler." >&2;}
4661    { (exit 1); exit 1; }; }
4662         fi
4663
4664 else
4665         : ${BUILD_CC:='${CC}'}
4666         : ${BUILD_CPP:='${CPP}'}
4667         : ${BUILD_CFLAGS:='${CFLAGS}'}
4668         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4669         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4670         : ${BUILD_LIBS:='${LIBS}'}
4671         : ${BUILD_EXEEXT:='$x'}
4672         : ${BUILD_OBJEXT:='o'}
4673 fi
4674
4675 ###############################################################################
4676
4677 ### Options to allow the user to specify the set of libraries which are used.
4678 ### Use "--without-normal --with-shared" to allow the default model to be
4679 ### shared, for example.
4680 cf_list_models=""
4681
4682 echo "$as_me:4682: checking if libtool -version-number should be used" >&5
4683 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4684
4685 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4686 if test "${enable_libtool_version+set}" = set; then
4687   enableval="$enable_libtool_version"
4688   test "$enableval" != no && enableval=yes
4689         if test "$enableval" != "yes" ; then
4690     cf_libtool_version=no
4691         else
4692                 cf_libtool_version=yes
4693         fi
4694 else
4695   enableval=yes
4696         cf_libtool_version=yes
4697
4698 fi;
4699 echo "$as_me:4699: result: $cf_libtool_version" >&5
4700 echo "${ECHO_T}$cf_libtool_version" >&6
4701
4702 if test "$cf_libtool_version" = yes ; then
4703         LIBTOOL_VERSION="-version-number"
4704 else
4705         LIBTOOL_VERSION="-version-info"
4706         case "x$VERSION" in
4707         (x)
4708                 { echo "$as_me:4708: WARNING: VERSION was not set" >&5
4709 echo "$as_me: WARNING: VERSION was not set" >&2;}
4710                 ;;
4711         (x*.*.*)
4712                 ABI_VERSION="$VERSION"
4713                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4714
4715 echo "${as_me:-configure}:4715: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4716
4717                 ;;
4718         (x*:*:*)
4719                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4720                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4721
4722 echo "${as_me:-configure}:4722: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4723
4724                 ;;
4725         (*)
4726                 { echo "$as_me:4726: WARNING: unexpected VERSION value: $VERSION" >&5
4727 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4728                 ;;
4729         esac
4730 fi
4731
4732 LIBTOOL=
4733
4734 # common library maintenance symbols that are convenient for libtool scripts:
4735 LIB_CREATE='${AR} -cr'
4736 LIB_OBJECT='${OBJECTS}'
4737 LIB_SUFFIX=.a
4738 LIB_PREP="$RANLIB"
4739
4740 # symbols used to prop libtool up to enable it to determine what it should be
4741 # doing:
4742 LIB_CLEAN=
4743 LIB_COMPILE=
4744 LIB_LINK='${CC}'
4745 LIB_INSTALL=
4746 LIB_UNINSTALL=
4747
4748 echo "$as_me:4748: checking if you want to build libraries with libtool" >&5
4749 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4750
4751 # Check whether --with-libtool or --without-libtool was given.
4752 if test "${with_libtool+set}" = set; then
4753   withval="$with_libtool"
4754   with_libtool=$withval
4755 else
4756   with_libtool=no
4757 fi;
4758 echo "$as_me:4758: result: $with_libtool" >&5
4759 echo "${ECHO_T}$with_libtool" >&6
4760 if test "$with_libtool" != "no"; then
4761
4762         if test "$with_libtool" != "yes" ; then
4763
4764 if test "x$prefix" != xNONE; then
4765         cf_path_syntax="$prefix"
4766 else
4767         cf_path_syntax="$ac_default_prefix"
4768 fi
4769
4770 case ".$with_libtool" in
4771 (.\$\(*\)*|.\'*\'*)
4772         ;;
4773 (..|./*|.\\*)
4774         ;;
4775 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4776         ;;
4777 (.\${*prefix}*|.\${*dir}*)
4778         eval with_libtool="$with_libtool"
4779         case ".$with_libtool" in
4780         (.NONE/*)
4781                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4782                 ;;
4783         esac
4784         ;;
4785 (.no|.NONE/*)
4786         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4787         ;;
4788 (*)
4789         { { echo "$as_me:4789: error: expected a pathname, not \"$with_libtool\"" >&5
4790 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4791    { (exit 1); exit 1; }; }
4792         ;;
4793 esac
4794
4795                 LIBTOOL=$with_libtool
4796         else
4797                 if test -n "$ac_tool_prefix"; then
4798   for ac_prog in libtool glibtool
4799   do
4800     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4801 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4802 echo "$as_me:4802: checking for $ac_word" >&5
4803 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4804 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4805   echo $ECHO_N "(cached) $ECHO_C" >&6
4806 else
4807   if test -n "$LIBTOOL"; then
4808   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4809 else
4810   ac_save_IFS=$IFS; IFS=$ac_path_separator
4811 ac_dummy="$PATH"
4812 for ac_dir in $ac_dummy; do
4813   IFS=$ac_save_IFS
4814   test -z "$ac_dir" && ac_dir=.
4815   $as_executable_p "$ac_dir/$ac_word" || continue
4816 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4817 echo "$as_me:4817: found $ac_dir/$ac_word" >&5
4818 break
4819 done
4820
4821 fi
4822 fi
4823 LIBTOOL=$ac_cv_prog_LIBTOOL
4824 if test -n "$LIBTOOL"; then
4825   echo "$as_me:4825: result: $LIBTOOL" >&5
4826 echo "${ECHO_T}$LIBTOOL" >&6
4827 else
4828   echo "$as_me:4828: result: no" >&5
4829 echo "${ECHO_T}no" >&6
4830 fi
4831
4832     test -n "$LIBTOOL" && break
4833   done
4834 fi
4835 if test -z "$LIBTOOL"; then
4836   ac_ct_LIBTOOL=$LIBTOOL
4837   for ac_prog in libtool glibtool
4838 do
4839   # Extract the first word of "$ac_prog", so it can be a program name with args.
4840 set dummy $ac_prog; ac_word=$2
4841 echo "$as_me:4841: checking for $ac_word" >&5
4842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4843 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4844   echo $ECHO_N "(cached) $ECHO_C" >&6
4845 else
4846   if test -n "$ac_ct_LIBTOOL"; then
4847   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4848 else
4849   ac_save_IFS=$IFS; IFS=$ac_path_separator
4850 ac_dummy="$PATH"
4851 for ac_dir in $ac_dummy; do
4852   IFS=$ac_save_IFS
4853   test -z "$ac_dir" && ac_dir=.
4854   $as_executable_p "$ac_dir/$ac_word" || continue
4855 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4856 echo "$as_me:4856: found $ac_dir/$ac_word" >&5
4857 break
4858 done
4859
4860 fi
4861 fi
4862 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4863 if test -n "$ac_ct_LIBTOOL"; then
4864   echo "$as_me:4864: result: $ac_ct_LIBTOOL" >&5
4865 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4866 else
4867   echo "$as_me:4867: result: no" >&5
4868 echo "${ECHO_T}no" >&6
4869 fi
4870
4871   test -n "$ac_ct_LIBTOOL" && break
4872 done
4873 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4874
4875   LIBTOOL=$ac_ct_LIBTOOL
4876 fi
4877
4878 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4879 then
4880         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.].*//'`
4881 else
4882         cf_cv_libtool_version=
4883 fi
4884 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4885
4886                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4887                 then
4888
4889 unset ac_cv_prog_ac_ct_LIBTOOL
4890 unset ac_ct_LIBTOOL
4891 unset LIBTOOL
4892
4893                         if test -n "$ac_tool_prefix"; then
4894   for ac_prog in glibtool
4895   do
4896     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4897 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4898 echo "$as_me:4898: checking for $ac_word" >&5
4899 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4900 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4901   echo $ECHO_N "(cached) $ECHO_C" >&6
4902 else
4903   if test -n "$LIBTOOL"; then
4904   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4905 else
4906   ac_save_IFS=$IFS; IFS=$ac_path_separator
4907 ac_dummy="$PATH"
4908 for ac_dir in $ac_dummy; do
4909   IFS=$ac_save_IFS
4910   test -z "$ac_dir" && ac_dir=.
4911   $as_executable_p "$ac_dir/$ac_word" || continue
4912 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4913 echo "$as_me:4913: found $ac_dir/$ac_word" >&5
4914 break
4915 done
4916
4917 fi
4918 fi
4919 LIBTOOL=$ac_cv_prog_LIBTOOL
4920 if test -n "$LIBTOOL"; then
4921   echo "$as_me:4921: result: $LIBTOOL" >&5
4922 echo "${ECHO_T}$LIBTOOL" >&6
4923 else
4924   echo "$as_me:4924: result: no" >&5
4925 echo "${ECHO_T}no" >&6
4926 fi
4927
4928     test -n "$LIBTOOL" && break
4929   done
4930 fi
4931 if test -z "$LIBTOOL"; then
4932   ac_ct_LIBTOOL=$LIBTOOL
4933   for ac_prog in glibtool
4934 do
4935   # Extract the first word of "$ac_prog", so it can be a program name with args.
4936 set dummy $ac_prog; ac_word=$2
4937 echo "$as_me:4937: checking for $ac_word" >&5
4938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4939 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4940   echo $ECHO_N "(cached) $ECHO_C" >&6
4941 else
4942   if test -n "$ac_ct_LIBTOOL"; then
4943   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4944 else
4945   ac_save_IFS=$IFS; IFS=$ac_path_separator
4946 ac_dummy="$PATH"
4947 for ac_dir in $ac_dummy; do
4948   IFS=$ac_save_IFS
4949   test -z "$ac_dir" && ac_dir=.
4950   $as_executable_p "$ac_dir/$ac_word" || continue
4951 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4952 echo "$as_me:4952: found $ac_dir/$ac_word" >&5
4953 break
4954 done
4955
4956 fi
4957 fi
4958 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4959 if test -n "$ac_ct_LIBTOOL"; then
4960   echo "$as_me:4960: result: $ac_ct_LIBTOOL" >&5
4961 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4962 else
4963   echo "$as_me:4963: result: no" >&5
4964 echo "${ECHO_T}no" >&6
4965 fi
4966
4967   test -n "$ac_ct_LIBTOOL" && break
4968 done
4969 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4970
4971   LIBTOOL=$ac_ct_LIBTOOL
4972 fi
4973
4974 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4975 then
4976         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.].*//'`
4977 else
4978         cf_cv_libtool_version=
4979 fi
4980 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4981
4982                 fi
4983         fi
4984         if test -z "$LIBTOOL" ; then
4985                 { { echo "$as_me:4985: error: Cannot find libtool" >&5
4986 echo "$as_me: error: Cannot find libtool" >&2;}
4987    { (exit 1); exit 1; }; }
4988         fi
4989         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4990         LIB_OBJECT='${OBJECTS:.o=.lo}'
4991         LIB_SUFFIX=.la
4992         LIB_CLEAN='${LIBTOOL} --mode=clean'
4993         LIB_COMPILE='${LIBTOOL} --mode=compile'
4994         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4995         LIB_INSTALL='${LIBTOOL} --mode=install'
4996         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4997         LIB_PREP=:
4998
4999 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5000 then
5001         echo "$as_me:5001: checking version of $LIBTOOL" >&5
5002 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5003
5004 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5005 then
5006         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.].*//'`
5007 else
5008         cf_cv_libtool_version=
5009 fi
5010 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5011
5012         echo "$as_me:5012: result: $cf_cv_libtool_version" >&5
5013 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5014         if test -z "$cf_cv_libtool_version" ; then
5015                 { { echo "$as_me:5015: error: This is not GNU libtool" >&5
5016 echo "$as_me: error: This is not GNU libtool" >&2;}
5017    { (exit 1); exit 1; }; }
5018         fi
5019 else
5020         { { echo "$as_me:5020: error: GNU libtool has not been found" >&5
5021 echo "$as_me: error: GNU libtool has not been found" >&2;}
5022    { (exit 1); exit 1; }; }
5023 fi
5024
5025         # special hack to add -no-undefined (which libtool should do for itself)
5026         LT_UNDEF=
5027         case "$cf_cv_system_name" in
5028         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5029                 LT_UNDEF=-no-undefined
5030                 ;;
5031         esac
5032
5033         # special hack to add --tag option for C++ compiler
5034         case $cf_cv_libtool_version in
5035         (1.[5-9]*|[2-9].[0-9.a-z]*)
5036                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5037                 LIBTOOL="$LIBTOOL --tag=CC"
5038                 ;;
5039         (*)
5040                 LIBTOOL_CXX="$LIBTOOL"
5041                 ;;
5042         esac
5043 else
5044         LIBTOOL=""
5045         LIBTOOL_CXX=""
5046 fi
5047
5048 test -z "$LIBTOOL" && ECHO_LT=
5049
5050 if test "$with_libtool" != "no" ; then
5051
5052 cf_list_models="$cf_list_models libtool"
5053
5054 else
5055
5056 echo "$as_me:5056: checking if you want to build shared libraries" >&5
5057 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5058
5059 # Check whether --with-shared or --without-shared was given.
5060 if test "${with_shared+set}" = set; then
5061   withval="$with_shared"
5062   with_shared=$withval
5063 else
5064   with_shared=no
5065 fi;
5066 echo "$as_me:5066: result: $with_shared" >&5
5067 echo "${ECHO_T}$with_shared" >&6
5068 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5069
5070 echo "$as_me:5070: checking if you want to build static libraries" >&5
5071 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5072
5073 # Check whether --with-normal or --without-normal was given.
5074 if test "${with_normal+set}" = set; then
5075   withval="$with_normal"
5076   with_normal=$withval
5077 else
5078   with_normal=yes
5079 fi;
5080 echo "$as_me:5080: result: $with_normal" >&5
5081 echo "${ECHO_T}$with_normal" >&6
5082 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5083
5084 echo "$as_me:5084: checking if you want to build debug libraries" >&5
5085 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5086
5087 # Check whether --with-debug or --without-debug was given.
5088 if test "${with_debug+set}" = set; then
5089   withval="$with_debug"
5090   with_debug=$withval
5091 else
5092   with_debug=yes
5093 fi;
5094 echo "$as_me:5094: result: $with_debug" >&5
5095 echo "${ECHO_T}$with_debug" >&6
5096 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5097
5098 echo "$as_me:5098: checking if you want to build profiling libraries" >&5
5099 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5100
5101 # Check whether --with-profile or --without-profile was given.
5102 if test "${with_profile+set}" = set; then
5103   withval="$with_profile"
5104   with_profile=$withval
5105 else
5106   with_profile=no
5107 fi;
5108 echo "$as_me:5108: result: $with_profile" >&5
5109 echo "${ECHO_T}$with_profile" >&6
5110 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5111
5112 fi
5113
5114 if test "X$cf_with_cxx_binding" != Xno; then
5115 if test "x$with_shared" = "xyes"; then
5116 echo "$as_me:5116: checking if you want to build C++ shared libraries" >&5
5117 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5118
5119 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5120 if test "${with_cxx_shared+set}" = set; then
5121   withval="$with_cxx_shared"
5122   with_shared_cxx=$withval
5123 else
5124   with_shared_cxx=no
5125 fi;
5126 echo "$as_me:5126: result: $with_shared_cxx" >&5
5127 echo "${ECHO_T}$with_shared_cxx" >&6
5128 fi
5129 fi
5130
5131 ###############################################################################
5132
5133 echo "$as_me:5133: checking for specified models" >&5
5134 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5135 test -z "$cf_list_models" && cf_list_models=normal
5136 test "$with_libtool" != "no" && cf_list_models=libtool
5137 echo "$as_me:5137: result: $cf_list_models" >&5
5138 echo "${ECHO_T}$cf_list_models" >&6
5139
5140 ### Use the first model as the default, and save its suffix for use in building
5141 ### up test-applications.
5142 echo "$as_me:5142: checking for default model" >&5
5143 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5144 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5145 echo "$as_me:5145: result: $DFT_LWR_MODEL" >&5
5146 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5147
5148 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5149
5150 TICS_NAME=tic
5151
5152 TINFO_NAME=tinfo
5153
5154 LIB_NAME=ncurses
5155
5156 LIB_DIR=../lib
5157 LIB_2ND=../../lib
5158
5159 echo "$as_me:5159: checking if you want to have a library-prefix" >&5
5160 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5161
5162 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5163 if test "${with_lib_prefix+set}" = set; then
5164   withval="$with_lib_prefix"
5165   with_lib_prefix=$withval
5166 else
5167   with_lib_prefix=auto
5168 fi;
5169 echo "$as_me:5169: result: $with_lib_prefix" >&5
5170 echo "${ECHO_T}$with_lib_prefix" >&6
5171
5172 if test $with_lib_prefix = auto
5173 then
5174
5175         case $cf_cv_system_name in
5176         (OS/2*|os2*)
5177                 if test "$DFT_LWR_MODEL" = libtool; then
5178                         LIB_PREFIX='lib'
5179                 else
5180                         LIB_PREFIX=''
5181                 fi
5182                 ;;
5183         (*)     LIB_PREFIX='lib'
5184                 ;;
5185         esac
5186 cf_prefix=$LIB_PREFIX
5187
5188 elif test $with_lib_prefix = no
5189 then
5190         LIB_PREFIX=
5191 else
5192         LIB_PREFIX=$with_lib_prefix
5193 fi
5194
5195 LIB_SUFFIX=
5196
5197         echo "$as_me:5197: checking for PATH separator" >&5
5198 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5199         case $cf_cv_system_name in
5200         (os2*)  PATH_SEPARATOR=';'  ;;
5201         (*)     ${PATH_SEPARATOR:=':'}  ;;
5202         esac
5203
5204         echo "$as_me:5204: result: $PATH_SEPARATOR" >&5
5205 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5206
5207 ###############################################################################
5208
5209 echo "$as_me:5209: checking if you want to build a separate terminfo library" >&5
5210 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5211
5212 # Check whether --with-termlib or --without-termlib was given.
5213 if test "${with_termlib+set}" = set; then
5214   withval="$with_termlib"
5215   with_termlib=$withval
5216 else
5217   with_termlib=no
5218 fi;
5219 echo "$as_me:5219: result: $with_termlib" >&5
5220 echo "${ECHO_T}$with_termlib" >&6
5221
5222 echo "$as_me:5222: checking if you want to build a separate tic library" >&5
5223 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5224
5225 # Check whether --with-ticlib or --without-ticlib was given.
5226 if test "${with_ticlib+set}" = set; then
5227   withval="$with_ticlib"
5228   with_ticlib=$withval
5229 else
5230   with_ticlib=no
5231 fi;
5232 echo "$as_me:5232: result: $with_ticlib" >&5
5233 echo "${ECHO_T}$with_ticlib" >&6
5234
5235 ### Checks for special libraries, must be done up-front.
5236 SHLIB_LIST=""
5237
5238 echo "$as_me:5238: checking if you want to link with the GPM mouse library" >&5
5239 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5240
5241 # Check whether --with-gpm or --without-gpm was given.
5242 if test "${with_gpm+set}" = set; then
5243   withval="$with_gpm"
5244   with_gpm=$withval
5245 else
5246   with_gpm=maybe
5247 fi;
5248 echo "$as_me:5248: result: $with_gpm" >&5
5249 echo "${ECHO_T}$with_gpm" >&6
5250
5251 if test "$with_gpm" != no ; then
5252         echo "$as_me:5252: checking for gpm.h" >&5
5253 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5254 if test "${ac_cv_header_gpm_h+set}" = set; then
5255   echo $ECHO_N "(cached) $ECHO_C" >&6
5256 else
5257   cat >conftest.$ac_ext <<_ACEOF
5258 #line 5258 "configure"
5259 #include "confdefs.h"
5260 #include <gpm.h>
5261 _ACEOF
5262 if { (eval echo "$as_me:5262: \"$ac_cpp conftest.$ac_ext\"") >&5
5263   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5264   ac_status=$?
5265   egrep -v '^ *\+' conftest.er1 >conftest.err
5266   rm -f conftest.er1
5267   cat conftest.err >&5
5268   echo "$as_me:5268: \$? = $ac_status" >&5
5269   (exit $ac_status); } >/dev/null; then
5270   if test -s conftest.err; then
5271     ac_cpp_err=$ac_c_preproc_warn_flag
5272   else
5273     ac_cpp_err=
5274   fi
5275 else
5276   ac_cpp_err=yes
5277 fi
5278 if test -z "$ac_cpp_err"; then
5279   ac_cv_header_gpm_h=yes
5280 else
5281   echo "$as_me: failed program was:" >&5
5282   cat conftest.$ac_ext >&5
5283   ac_cv_header_gpm_h=no
5284 fi
5285 rm -f conftest.err conftest.$ac_ext
5286 fi
5287 echo "$as_me:5287: result: $ac_cv_header_gpm_h" >&5
5288 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5289 if test $ac_cv_header_gpm_h = yes; then
5290
5291 cat >>confdefs.h <<\EOF
5292 #define HAVE_GPM_H 1
5293 EOF
5294
5295                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5296                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5297
5298 echo "${as_me:-configure}:5298: testing assuming we really have GPM library ..." 1>&5
5299
5300 cat >>confdefs.h <<\EOF
5301 #define HAVE_LIBGPM 1
5302 EOF
5303
5304                         with_gpm=yes
5305                 else
5306                         echo "$as_me:5306: checking for Gpm_Open in -lgpm" >&5
5307 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5308 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5309   echo $ECHO_N "(cached) $ECHO_C" >&6
5310 else
5311   ac_check_lib_save_LIBS=$LIBS
5312 LIBS="-lgpm  $LIBS"
5313 cat >conftest.$ac_ext <<_ACEOF
5314 #line 5314 "configure"
5315 #include "confdefs.h"
5316
5317 /* Override any gcc2 internal prototype to avoid an error.  */
5318 #ifdef __cplusplus
5319 extern "C"
5320 #endif
5321 /* We use char because int might match the return type of a gcc2
5322    builtin and then its argument prototype would still apply.  */
5323 char Gpm_Open ();
5324 int
5325 main ()
5326 {
5327 Gpm_Open ();
5328   ;
5329   return 0;
5330 }
5331 _ACEOF
5332 rm -f conftest.$ac_objext conftest$ac_exeext
5333 if { (eval echo "$as_me:5333: \"$ac_link\"") >&5
5334   (eval $ac_link) 2>&5
5335   ac_status=$?
5336   echo "$as_me:5336: \$? = $ac_status" >&5
5337   (exit $ac_status); } &&
5338          { ac_try='test -s conftest$ac_exeext'
5339   { (eval echo "$as_me:5339: \"$ac_try\"") >&5
5340   (eval $ac_try) 2>&5
5341   ac_status=$?
5342   echo "$as_me:5342: \$? = $ac_status" >&5
5343   (exit $ac_status); }; }; then
5344   ac_cv_lib_gpm_Gpm_Open=yes
5345 else
5346   echo "$as_me: failed program was:" >&5
5347 cat conftest.$ac_ext >&5
5348 ac_cv_lib_gpm_Gpm_Open=no
5349 fi
5350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5351 LIBS=$ac_check_lib_save_LIBS
5352 fi
5353 echo "$as_me:5353: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5354 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5355 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5356   with_gpm=yes
5357 else
5358
5359                                 if test "$with_gpm" = maybe; then
5360                                         { echo "$as_me:5360: WARNING: Cannot link with GPM library" >&5
5361 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5362                                         with_gpm=no
5363                                 else
5364                                         { { echo "$as_me:5364: error: Cannot link with GPM library" >&5
5365 echo "$as_me: error: Cannot link with GPM library" >&2;}
5366    { (exit 1); exit 1; }; }
5367                                 fi
5368
5369 fi
5370
5371                 fi
5372
5373 else
5374
5375                 test "$with_gpm" != maybe && { echo "$as_me:5375: WARNING: Cannot find GPM header" >&5
5376 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5377                 with_gpm=no
5378
5379 fi
5380
5381 fi
5382
5383 if test "$with_gpm" != no ; then
5384         echo "$as_me:5384: checking if you want to load GPM dynamically" >&5
5385 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5386
5387 # Check whether --with-dlsym or --without-dlsym was given.
5388 if test "${with_dlsym+set}" = set; then
5389   withval="$with_dlsym"
5390   with_dlsym=$withval
5391 else
5392   with_dlsym=yes
5393 fi;
5394         echo "$as_me:5394: result: $with_dlsym" >&5
5395 echo "${ECHO_T}$with_dlsym" >&6
5396         if test "x$with_dlsym" = xyes ; then
5397
5398 cf_have_dlsym=no
5399 echo "$as_me:5399: checking for dlsym" >&5
5400 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5401 if test "${ac_cv_func_dlsym+set}" = set; then
5402   echo $ECHO_N "(cached) $ECHO_C" >&6
5403 else
5404   cat >conftest.$ac_ext <<_ACEOF
5405 #line 5405 "configure"
5406 #include "confdefs.h"
5407 /* System header to define __stub macros and hopefully few prototypes,
5408     which can conflict with char dlsym (); below.  */
5409 #include <assert.h>
5410 /* Override any gcc2 internal prototype to avoid an error.  */
5411 #ifdef __cplusplus
5412 extern "C"
5413 #endif
5414 /* We use char because int might match the return type of a gcc2
5415    builtin and then its argument prototype would still apply.  */
5416 char dlsym ();
5417 char (*f) ();
5418
5419 int
5420 main ()
5421 {
5422 /* The GNU C library defines this for functions which it implements
5423     to always fail with ENOSYS.  Some functions are actually named
5424     something starting with __ and the normal name is an alias.  */
5425 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5426 choke me
5427 #else
5428 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5429 #endif
5430
5431   ;
5432   return 0;
5433 }
5434 _ACEOF
5435 rm -f conftest.$ac_objext conftest$ac_exeext
5436 if { (eval echo "$as_me:5436: \"$ac_link\"") >&5
5437   (eval $ac_link) 2>&5
5438   ac_status=$?
5439   echo "$as_me:5439: \$? = $ac_status" >&5
5440   (exit $ac_status); } &&
5441          { ac_try='test -s conftest$ac_exeext'
5442   { (eval echo "$as_me:5442: \"$ac_try\"") >&5
5443   (eval $ac_try) 2>&5
5444   ac_status=$?
5445   echo "$as_me:5445: \$? = $ac_status" >&5
5446   (exit $ac_status); }; }; then
5447   ac_cv_func_dlsym=yes
5448 else
5449   echo "$as_me: failed program was:" >&5
5450 cat conftest.$ac_ext >&5
5451 ac_cv_func_dlsym=no
5452 fi
5453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5454 fi
5455 echo "$as_me:5455: result: $ac_cv_func_dlsym" >&5
5456 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5457 if test $ac_cv_func_dlsym = yes; then
5458   cf_have_dlsym=yes
5459 else
5460
5461 cf_have_libdl=no
5462 echo "$as_me:5462: checking for dlsym in -ldl" >&5
5463 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5464 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5465   echo $ECHO_N "(cached) $ECHO_C" >&6
5466 else
5467   ac_check_lib_save_LIBS=$LIBS
5468 LIBS="-ldl  $LIBS"
5469 cat >conftest.$ac_ext <<_ACEOF
5470 #line 5470 "configure"
5471 #include "confdefs.h"
5472
5473 /* Override any gcc2 internal prototype to avoid an error.  */
5474 #ifdef __cplusplus
5475 extern "C"
5476 #endif
5477 /* We use char because int might match the return type of a gcc2
5478    builtin and then its argument prototype would still apply.  */
5479 char dlsym ();
5480 int
5481 main ()
5482 {
5483 dlsym ();
5484   ;
5485   return 0;
5486 }
5487 _ACEOF
5488 rm -f conftest.$ac_objext conftest$ac_exeext
5489 if { (eval echo "$as_me:5489: \"$ac_link\"") >&5
5490   (eval $ac_link) 2>&5
5491   ac_status=$?
5492   echo "$as_me:5492: \$? = $ac_status" >&5
5493   (exit $ac_status); } &&
5494          { ac_try='test -s conftest$ac_exeext'
5495   { (eval echo "$as_me:5495: \"$ac_try\"") >&5
5496   (eval $ac_try) 2>&5
5497   ac_status=$?
5498   echo "$as_me:5498: \$? = $ac_status" >&5
5499   (exit $ac_status); }; }; then
5500   ac_cv_lib_dl_dlsym=yes
5501 else
5502   echo "$as_me: failed program was:" >&5
5503 cat conftest.$ac_ext >&5
5504 ac_cv_lib_dl_dlsym=no
5505 fi
5506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5507 LIBS=$ac_check_lib_save_LIBS
5508 fi
5509 echo "$as_me:5509: result: $ac_cv_lib_dl_dlsym" >&5
5510 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5511 if test $ac_cv_lib_dl_dlsym = yes; then
5512
5513         cf_have_dlsym=yes
5514         cf_have_libdl=yes
5515 fi
5516
5517 fi
5518
5519 if test "$cf_have_dlsym" = yes ; then
5520         test "$cf_have_libdl" = yes && {
5521 cf_add_libs="-ldl"
5522 # Filter out duplicates - this happens with badly-designed ".pc" files...
5523 for cf_add_1lib in $LIBS
5524 do
5525         for cf_add_2lib in $cf_add_libs
5526         do
5527                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5528                 then
5529                         cf_add_1lib=
5530                         break
5531                 fi
5532         done
5533         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5534 done
5535 LIBS="$cf_add_libs"
5536  }
5537
5538         echo "$as_me:5538: checking whether able to link to dl*() functions" >&5
5539 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5540         cat >conftest.$ac_ext <<_ACEOF
5541 #line 5541 "configure"
5542 #include "confdefs.h"
5543 #include <dlfcn.h>
5544 int
5545 main ()
5546 {
5547
5548                 void *obj;
5549                 if ((obj = dlopen("filename", 0)) != 0) {
5550                         if (dlsym(obj, "symbolname") == 0) {
5551                         dlclose(obj);
5552                         }
5553                 }
5554   ;
5555   return 0;
5556 }
5557 _ACEOF
5558 rm -f conftest.$ac_objext conftest$ac_exeext
5559 if { (eval echo "$as_me:5559: \"$ac_link\"") >&5
5560   (eval $ac_link) 2>&5
5561   ac_status=$?
5562   echo "$as_me:5562: \$? = $ac_status" >&5
5563   (exit $ac_status); } &&
5564          { ac_try='test -s conftest$ac_exeext'
5565   { (eval echo "$as_me:5565: \"$ac_try\"") >&5
5566   (eval $ac_try) 2>&5
5567   ac_status=$?
5568   echo "$as_me:5568: \$? = $ac_status" >&5
5569   (exit $ac_status); }; }; then
5570
5571 cat >>confdefs.h <<\EOF
5572 #define HAVE_LIBDL 1
5573 EOF
5574
5575 else
5576   echo "$as_me: failed program was:" >&5
5577 cat conftest.$ac_ext >&5
5578
5579                 { { echo "$as_me:5579: error: Cannot link test program for libdl" >&5
5580 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5581    { (exit 1); exit 1; }; }
5582 fi
5583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5584         echo "$as_me:5584: result: ok" >&5
5585 echo "${ECHO_T}ok" >&6
5586 else
5587         { { echo "$as_me:5587: error: Cannot find dlsym function" >&5
5588 echo "$as_me: error: Cannot find dlsym function" >&2;}
5589    { (exit 1); exit 1; }; }
5590 fi
5591
5592                 if test "x$with_gpm" != xyes ; then
5593                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5594
5595 echo "${as_me:-configure}:5595: testing assuming soname for gpm is $with_gpm ..." 1>&5
5596
5597                         cf_cv_gpm_soname="$with_gpm"
5598                 else
5599
5600 echo "$as_me:5600: checking for soname of gpm library" >&5
5601 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5602 if test "${cf_cv_gpm_soname+set}" = set; then
5603   echo $ECHO_N "(cached) $ECHO_C" >&6
5604 else
5605
5606 cf_cv_gpm_soname=unknown
5607 if test "$cross_compiling" != yes ; then
5608 cat >conftest.$ac_ext <<CF_EOF
5609 #include <gpm.h>
5610 int main(void)
5611 {
5612 if (Gpm_Open(0,0)) Gpm_Close();
5613         ${cf_cv_main_return:-return}(0);
5614 }
5615 CF_EOF
5616 cf_save_LIBS="$LIBS"
5617
5618 cf_add_libs="-lgpm"
5619 # Filter out duplicates - this happens with badly-designed ".pc" files...
5620 for cf_add_1lib in $LIBS
5621 do
5622         for cf_add_2lib in $cf_add_libs
5623         do
5624                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5625                 then
5626                         cf_add_1lib=
5627                         break
5628                 fi
5629         done
5630         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5631 done
5632 LIBS="$cf_add_libs"
5633
5634         if { (eval echo "$as_me:5634: \"$ac_compile\"") >&5
5635   (eval $ac_compile) 2>&5
5636   ac_status=$?
5637   echo "$as_me:5637: \$? = $ac_status" >&5
5638   (exit $ac_status); } ; then
5639                 if { (eval echo "$as_me:5639: \"$ac_link\"") >&5
5640   (eval $ac_link) 2>&5
5641   ac_status=$?
5642   echo "$as_me:5642: \$? = $ac_status" >&5
5643   (exit $ac_status); } ; then
5644                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5645                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5646                 fi
5647         fi
5648 rm -rf conftest*
5649 LIBS="$cf_save_LIBS"
5650 fi
5651
5652 fi
5653 echo "$as_me:5653: result: $cf_cv_gpm_soname" >&5
5654 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5655
5656                 fi
5657                 test "$cf_cv_gpm_soname" != "unknown" &&
5658 cat >>confdefs.h <<EOF
5659 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5660 EOF
5661
5662                 SHLIB_LIST="-ldl $SHLIB_LIST"
5663         else
5664                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5665
5666 cf_add_libs="-lgpm"
5667 # Filter out duplicates - this happens with badly-designed ".pc" files...
5668 for cf_add_1lib in $TEST_LIBS
5669 do
5670         for cf_add_2lib in $cf_add_libs
5671         do
5672                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5673                 then
5674                         cf_add_1lib=
5675                         break
5676                 fi
5677         done
5678         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5679 done
5680 TEST_LIBS="$cf_add_libs"
5681
5682         fi
5683
5684 cat >>confdefs.h <<\EOF
5685 #define HAVE_LIBGPM 1
5686 EOF
5687
5688 echo "$as_me:5688: checking for Gpm_Wgetch in -lgpm" >&5
5689 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5690 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5691   echo $ECHO_N "(cached) $ECHO_C" >&6
5692 else
5693   ac_check_lib_save_LIBS=$LIBS
5694 LIBS="-lgpm  $LIBS"
5695 cat >conftest.$ac_ext <<_ACEOF
5696 #line 5696 "configure"
5697 #include "confdefs.h"
5698
5699 /* Override any gcc2 internal prototype to avoid an error.  */
5700 #ifdef __cplusplus
5701 extern "C"
5702 #endif
5703 /* We use char because int might match the return type of a gcc2
5704    builtin and then its argument prototype would still apply.  */
5705 char Gpm_Wgetch ();
5706 int
5707 main ()
5708 {
5709 Gpm_Wgetch ();
5710   ;
5711   return 0;
5712 }
5713 _ACEOF
5714 rm -f conftest.$ac_objext conftest$ac_exeext
5715 if { (eval echo "$as_me:5715: \"$ac_link\"") >&5
5716   (eval $ac_link) 2>&5
5717   ac_status=$?
5718   echo "$as_me:5718: \$? = $ac_status" >&5
5719   (exit $ac_status); } &&
5720          { ac_try='test -s conftest$ac_exeext'
5721   { (eval echo "$as_me:5721: \"$ac_try\"") >&5
5722   (eval $ac_try) 2>&5
5723   ac_status=$?
5724   echo "$as_me:5724: \$? = $ac_status" >&5
5725   (exit $ac_status); }; }; then
5726   ac_cv_lib_gpm_Gpm_Wgetch=yes
5727 else
5728   echo "$as_me: failed program was:" >&5
5729 cat conftest.$ac_ext >&5
5730 ac_cv_lib_gpm_Gpm_Wgetch=no
5731 fi
5732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5733 LIBS=$ac_check_lib_save_LIBS
5734 fi
5735 echo "$as_me:5735: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5736 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5737 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5738
5739 echo "$as_me:5739: checking if GPM is weakly bound to curses library" >&5
5740 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5741 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5742   echo $ECHO_N "(cached) $ECHO_C" >&6
5743 else
5744
5745 cf_cv_check_gpm_wgetch=unknown
5746 if test "$cross_compiling" != yes ; then
5747
5748 cat >conftest.$ac_ext <<CF_EOF
5749 #include <gpm.h>
5750 int main(void)
5751 {
5752         Gpm_Wgetch();
5753         ${cf_cv_main_return:-return}(0);
5754 }
5755 CF_EOF
5756
5757         cf_save_LIBS="$LIBS"
5758         # This only works if we can look at the symbol table.  If a shared
5759         # library is stripped for install, we cannot use that.  So we're forced
5760         # to rely on the static library, noting that some packagers may not
5761         # include it.
5762         LIBS="-static -lgpm -dynamic $LIBS"
5763         if { (eval echo "$as_me:5763: \"$ac_compile\"") >&5
5764   (eval $ac_compile) 2>&5
5765   ac_status=$?
5766   echo "$as_me:5766: \$? = $ac_status" >&5
5767   (exit $ac_status); } ; then
5768                 if { (eval echo "$as_me:5768: \"$ac_link\"") >&5
5769   (eval $ac_link) 2>&5
5770   ac_status=$?
5771   echo "$as_me:5771: \$? = $ac_status" >&5
5772   (exit $ac_status); } ; then
5773                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5774                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5775                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5776                 fi
5777         fi
5778         rm -rf conftest*
5779         LIBS="$cf_save_LIBS"
5780 fi
5781
5782 fi
5783 echo "$as_me:5783: result: $cf_cv_check_gpm_wgetch" >&5
5784 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5785
5786 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5787         { echo "$as_me:5787: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5788 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5789 fi
5790
5791 fi
5792
5793 fi
5794
5795 # not everyone has "test -c"
5796 if test -c /dev/sysmouse 2>/dev/null ; then
5797 echo "$as_me:5797: checking if you want to use sysmouse" >&5
5798 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5799
5800 # Check whether --with-sysmouse or --without-sysmouse was given.
5801 if test "${with_sysmouse+set}" = set; then
5802   withval="$with_sysmouse"
5803   cf_with_sysmouse=$withval
5804 else
5805   cf_with_sysmouse=maybe
5806 fi;
5807         if test "$cf_with_sysmouse" != no ; then
5808         cat >conftest.$ac_ext <<_ACEOF
5809 #line 5809 "configure"
5810 #include "confdefs.h"
5811
5812 #include <osreldate.h>
5813 #if (__FreeBSD_version >= 400017)
5814 #include <sys/consio.h>
5815 #include <sys/fbio.h>
5816 #else
5817 #include <machine/console.h>
5818 #endif
5819
5820 int
5821 main ()
5822 {
5823
5824         struct mouse_info the_mouse;
5825         ioctl(0, CONS_MOUSECTL, &the_mouse);
5826
5827   ;
5828   return 0;
5829 }
5830 _ACEOF
5831 rm -f conftest.$ac_objext
5832 if { (eval echo "$as_me:5832: \"$ac_compile\"") >&5
5833   (eval $ac_compile) 2>&5
5834   ac_status=$?
5835   echo "$as_me:5835: \$? = $ac_status" >&5
5836   (exit $ac_status); } &&
5837          { ac_try='test -s conftest.$ac_objext'
5838   { (eval echo "$as_me:5838: \"$ac_try\"") >&5
5839   (eval $ac_try) 2>&5
5840   ac_status=$?
5841   echo "$as_me:5841: \$? = $ac_status" >&5
5842   (exit $ac_status); }; }; then
5843   cf_with_sysmouse=yes
5844 else
5845   echo "$as_me: failed program was:" >&5
5846 cat conftest.$ac_ext >&5
5847 cf_with_sysmouse=no
5848 fi
5849 rm -f conftest.$ac_objext conftest.$ac_ext
5850         fi
5851 echo "$as_me:5851: result: $cf_with_sysmouse" >&5
5852 echo "${ECHO_T}$cf_with_sysmouse" >&6
5853 test "$cf_with_sysmouse" = yes &&
5854 cat >>confdefs.h <<\EOF
5855 #define USE_SYSMOUSE 1
5856 EOF
5857
5858 fi
5859
5860 if test X"$CC_G_OPT" = X"" ; then
5861         CC_G_OPT='-g'
5862         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5863 fi
5864
5865 if test X"$CXX_G_OPT" = X"" ; then
5866         CXX_G_OPT='-g'
5867         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5868 fi
5869
5870 echo "$as_me:5870: checking for default loader flags" >&5
5871 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5872 case $DFT_LWR_MODEL in
5873 (libtool) LD_MODEL=''   ;;
5874 (normal)  LD_MODEL=''   ;;
5875 (debug)   LD_MODEL=$CC_G_OPT ;;
5876 (profile) LD_MODEL='-pg';;
5877 (shared)  LD_MODEL=''   ;;
5878 esac
5879 echo "$as_me:5879: result: $LD_MODEL" >&5
5880 echo "${ECHO_T}$LD_MODEL" >&6
5881
5882 case $DFT_LWR_MODEL in
5883 (shared)
5884
5885 echo "$as_me:5885: checking if rpath option should be used" >&5
5886 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5887
5888 # Check whether --enable-rpath or --disable-rpath was given.
5889 if test "${enable_rpath+set}" = set; then
5890   enableval="$enable_rpath"
5891   cf_cv_enable_rpath=$enableval
5892 else
5893   cf_cv_enable_rpath=no
5894 fi;
5895 echo "$as_me:5895: result: $cf_cv_enable_rpath" >&5
5896 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5897
5898 echo "$as_me:5898: checking if shared libraries should be relinked during install" >&5
5899 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5900
5901 # Check whether --enable-relink or --disable-relink was given.
5902 if test "${enable_relink+set}" = set; then
5903   enableval="$enable_relink"
5904   cf_cv_do_relink=$enableval
5905 else
5906   cf_cv_do_relink=yes
5907 fi;
5908 echo "$as_me:5908: result: $cf_cv_do_relink" >&5
5909 echo "${ECHO_T}$cf_cv_do_relink" >&6
5910         ;;
5911 esac
5912
5913 # we will build libraries one-level down.
5914 rel_builddir=..
5915
5916 LD_RPATH_OPT=
5917 echo "$as_me:5917: checking for an rpath option" >&5
5918 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5919 case $cf_cv_system_name in
5920 (irix*)
5921         if test "$GCC" = yes; then
5922                 LD_RPATH_OPT="-Wl,-rpath,"
5923         else
5924                 LD_RPATH_OPT="-rpath "
5925         fi
5926         ;;
5927 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5928         LD_RPATH_OPT="-Wl,-rpath,"
5929         ;;
5930 (openbsd[2-9].*|mirbsd*)
5931         LD_RPATH_OPT="-Wl,-rpath,"
5932         ;;
5933 (dragonfly*)
5934         LD_RPATH_OPT="-rpath "
5935         ;;
5936 (netbsd*)
5937         LD_RPATH_OPT="-Wl,-rpath,"
5938         ;;
5939 (osf*|mls+*)
5940         LD_RPATH_OPT="-rpath "
5941         ;;
5942 (solaris2*)
5943         LD_RPATH_OPT="-R"
5944         ;;
5945 (*)
5946         ;;
5947 esac
5948 echo "$as_me:5948: result: $LD_RPATH_OPT" >&5
5949 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5950
5951 case "x$LD_RPATH_OPT" in
5952 (x-R*)
5953         echo "$as_me:5953: checking if we need a space after rpath option" >&5
5954 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5955         cf_save_LIBS="$LIBS"
5956
5957 cf_add_libs="${LD_RPATH_OPT}$libdir"
5958 # Filter out duplicates - this happens with badly-designed ".pc" files...
5959 for cf_add_1lib in $LIBS
5960 do
5961         for cf_add_2lib in $cf_add_libs
5962         do
5963                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5964                 then
5965                         cf_add_1lib=
5966                         break
5967                 fi
5968         done
5969         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5970 done
5971 LIBS="$cf_add_libs"
5972
5973         cat >conftest.$ac_ext <<_ACEOF
5974 #line 5974 "configure"
5975 #include "confdefs.h"
5976
5977 int
5978 main ()
5979 {
5980
5981   ;
5982   return 0;
5983 }
5984 _ACEOF
5985 rm -f conftest.$ac_objext conftest$ac_exeext
5986 if { (eval echo "$as_me:5986: \"$ac_link\"") >&5
5987   (eval $ac_link) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); } &&
5991          { ac_try='test -s conftest$ac_exeext'
5992   { (eval echo "$as_me:5992: \"$ac_try\"") >&5
5993   (eval $ac_try) 2>&5
5994   ac_status=$?
5995   echo "$as_me:5995: \$? = $ac_status" >&5
5996   (exit $ac_status); }; }; then
5997   cf_rpath_space=no
5998 else
5999   echo "$as_me: failed program was:" >&5
6000 cat conftest.$ac_ext >&5
6001 cf_rpath_space=yes
6002 fi
6003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6004         LIBS="$cf_save_LIBS"
6005         echo "$as_me:6005: result: $cf_rpath_space" >&5
6006 echo "${ECHO_T}$cf_rpath_space" >&6
6007         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6008         ;;
6009 esac
6010
6011         RM_SHARED_OPTS=
6012         LOCAL_LDFLAGS=
6013         LOCAL_LDFLAGS2=
6014         LD_SHARED_OPTS=
6015         INSTALL_LIB="-m 644"
6016         : ${rel_builddir:=.}
6017
6018         shlibdir=$libdir
6019
6020         MAKE_DLLS="#"
6021
6022         cf_cv_do_symlinks=no
6023         cf_ld_rpath_opt=
6024         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6025
6026         echo "$as_me:6026: checking if release/abi version should be used for shared libs" >&5
6027 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6028
6029 # Check whether --with-shlib-version or --without-shlib-version was given.
6030 if test "${with_shlib_version+set}" = set; then
6031   withval="$with_shlib_version"
6032   test -z "$withval" && withval=auto
6033         case $withval in
6034         (yes)
6035                 cf_cv_shlib_version=auto
6036                 ;;
6037         (rel|abi|auto)
6038                 cf_cv_shlib_version=$withval
6039                 ;;
6040         (*)
6041                 echo "$as_me:6041: result: $withval" >&5
6042 echo "${ECHO_T}$withval" >&6
6043                 { { echo "$as_me:6043: error: option value must be one of: rel, abi, or auto" >&5
6044 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6045    { (exit 1); exit 1; }; }
6046                 ;;
6047         esac
6048
6049 else
6050   cf_cv_shlib_version=auto
6051 fi;
6052         echo "$as_me:6052: result: $cf_cv_shlib_version" >&5
6053 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6054
6055         cf_cv_rm_so_locs=no
6056         cf_try_cflags=
6057
6058         # Some less-capable ports of gcc support only -fpic
6059         CC_SHARED_OPTS=
6060
6061         cf_try_fPIC=no
6062         if test "$GCC" = yes
6063         then
6064                 cf_try_fPIC=yes
6065         else
6066                 case $cf_cv_system_name in
6067                 (*linux*)       # e.g., PGI compiler
6068                         cf_try_fPIC=yes
6069                         ;;
6070                 esac
6071         fi
6072
6073         if test "$cf_try_fPIC" = yes
6074         then
6075                 echo "$as_me:6075: checking which $CC option to use" >&5
6076 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6077                 cf_save_CFLAGS="$CFLAGS"
6078                 for CC_SHARED_OPTS in -fPIC -fpic ''
6079                 do
6080                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6081                         cat >conftest.$ac_ext <<_ACEOF
6082 #line 6082 "configure"
6083 #include "confdefs.h"
6084 #include <stdio.h>
6085 int
6086 main ()
6087 {
6088 int x = 1
6089   ;
6090   return 0;
6091 }
6092 _ACEOF
6093 rm -f conftest.$ac_objext
6094 if { (eval echo "$as_me:6094: \"$ac_compile\"") >&5
6095   (eval $ac_compile) 2>&5
6096   ac_status=$?
6097   echo "$as_me:6097: \$? = $ac_status" >&5
6098   (exit $ac_status); } &&
6099          { ac_try='test -s conftest.$ac_objext'
6100   { (eval echo "$as_me:6100: \"$ac_try\"") >&5
6101   (eval $ac_try) 2>&5
6102   ac_status=$?
6103   echo "$as_me:6103: \$? = $ac_status" >&5
6104   (exit $ac_status); }; }; then
6105   break
6106 else
6107   echo "$as_me: failed program was:" >&5
6108 cat conftest.$ac_ext >&5
6109 fi
6110 rm -f conftest.$ac_objext conftest.$ac_ext
6111                 done
6112                 echo "$as_me:6112: result: $CC_SHARED_OPTS" >&5
6113 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6114                 CFLAGS="$cf_save_CFLAGS"
6115         fi
6116
6117         cf_cv_shlib_version_infix=no
6118
6119         case $cf_cv_system_name in
6120         (aix4.3-9*|aix[5-7]*)
6121                 if test "$GCC" = yes; then
6122                         CC_SHARED_OPTS='-Wl,-brtl'
6123                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6124                 else
6125                         CC_SHARED_OPTS='-brtl'
6126                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6127                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6128                 fi
6129                 ;;
6130         (beos*)
6131                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6132                 ;;
6133         (cygwin*)
6134                 CC_SHARED_OPTS=
6135                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6136                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6137                 cf_cv_shlib_version=cygdll
6138                 cf_cv_shlib_version_infix=cygdll
6139                 shlibdir=$bindir
6140                 MAKE_DLLS=
6141                 cat >mk_shared_lib.sh <<-CF_EOF
6142                 #!$SHELL
6143                 SHARED_LIB=\$1
6144                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6145                 shift
6146                 cat <<-EOF
6147                 Linking shared library
6148                 ** SHARED_LIB \$SHARED_LIB
6149                 ** IMPORT_LIB \$IMPORT_LIB
6150 EOF
6151                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6152 CF_EOF
6153                 chmod +x mk_shared_lib.sh
6154                 ;;
6155         (msys*)
6156                 CC_SHARED_OPTS=
6157                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6158                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6159                 cf_cv_shlib_version=msysdll
6160                 cf_cv_shlib_version_infix=msysdll
6161                 shlibdir=$bindir
6162                 MAKE_DLLS=
6163                 cat >mk_shared_lib.sh <<-CF_EOF
6164                 #!$SHELL
6165                 SHARED_LIB=\$1
6166                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6167                 shift
6168                 cat <<-EOF
6169                 Linking shared library
6170                 ** SHARED_LIB \$SHARED_LIB
6171                 ** IMPORT_LIB \$IMPORT_LIB
6172 EOF
6173                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6174 CF_EOF
6175                 chmod +x mk_shared_lib.sh
6176                 ;;
6177         (darwin*)
6178                 cf_try_cflags="no-cpp-precomp"
6179                 CC_SHARED_OPTS="-dynamic"
6180                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6181                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6182                 cf_cv_shlib_version_infix=yes
6183                 echo "$as_me:6183: checking if ld -search_paths_first works" >&5
6184 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6185 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6186   echo $ECHO_N "(cached) $ECHO_C" >&6
6187 else
6188
6189                         cf_save_LDFLAGS=$LDFLAGS
6190                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6191                         cat >conftest.$ac_ext <<_ACEOF
6192 #line 6192 "configure"
6193 #include "confdefs.h"
6194
6195 int
6196 main ()
6197 {
6198 int i;
6199   ;
6200   return 0;
6201 }
6202 _ACEOF
6203 rm -f conftest.$ac_objext conftest$ac_exeext
6204 if { (eval echo "$as_me:6204: \"$ac_link\"") >&5
6205   (eval $ac_link) 2>&5
6206   ac_status=$?
6207   echo "$as_me:6207: \$? = $ac_status" >&5
6208   (exit $ac_status); } &&
6209          { ac_try='test -s conftest$ac_exeext'
6210   { (eval echo "$as_me:6210: \"$ac_try\"") >&5
6211   (eval $ac_try) 2>&5
6212   ac_status=$?
6213   echo "$as_me:6213: \$? = $ac_status" >&5
6214   (exit $ac_status); }; }; then
6215   cf_cv_ldflags_search_paths_first=yes
6216 else
6217   echo "$as_me: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
6219 cf_cv_ldflags_search_paths_first=no
6220 fi
6221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6222                                 LDFLAGS=$cf_save_LDFLAGS
6223 fi
6224 echo "$as_me:6224: result: $cf_cv_ldflags_search_paths_first" >&5
6225 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6226                 if test $cf_cv_ldflags_search_paths_first = yes; then
6227                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6228                 fi
6229                 ;;
6230         (hpux[7-8]*)
6231                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6232                 if test "$GCC" != yes; then
6233                         CC_SHARED_OPTS='+Z'
6234                 fi
6235                 MK_SHARED_LIB='${LD} -b -o $@'
6236                 INSTALL_LIB="-m 555"
6237                 ;;
6238         (hpux*)
6239                 # (tested with gcc 2.7.2 -- I don't have c89)
6240                 if test "$GCC" = yes; then
6241                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6242                 else
6243                         CC_SHARED_OPTS='+Z'
6244                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6245                 fi
6246                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6247                 # HP-UX shared libraries must be executable, and should be
6248                 # readonly to exploit a quirk in the memory manager.
6249                 INSTALL_LIB="-m 555"
6250                 ;;
6251         (interix*)
6252                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6253                 if test "$cf_cv_shlib_version" = rel; then
6254                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6255                 else
6256                         cf_shared_soname='`basename `'
6257                 fi
6258                 CC_SHARED_OPTS=
6259                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6260                 ;;
6261         (irix*)
6262                 if test "$cf_cv_enable_rpath" = yes ; then
6263                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6264                 fi
6265                 # tested with IRIX 5.2 and 'cc'.
6266                 if test "$GCC" != yes; then
6267                         CC_SHARED_OPTS='-KPIC'
6268                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6269                 else
6270                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6271                 fi
6272                 cf_cv_rm_so_locs=yes
6273                 ;;
6274         (linux*|gnu*|k*bsd*-gnu)
6275                 if test "$DFT_LWR_MODEL" = "shared" ; then
6276                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6277                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6278                 fi
6279                 if test "$cf_cv_enable_rpath" = yes ; then
6280                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6281                 fi
6282
6283         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6284         if test "$cf_cv_shlib_version" = rel; then
6285                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6286         else
6287                 cf_cv_shared_soname='`basename $@`'
6288         fi
6289
6290                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6291                 ;;
6292         (mingw*)
6293                 cf_cv_shlib_version=mingw
6294                 cf_cv_shlib_version_infix=mingw
6295                 shlibdir=$bindir
6296                 MAKE_DLLS=
6297                 if test "$DFT_LWR_MODEL" = "shared" ; then
6298                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6299                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6300                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6301                 fi
6302                 CC_SHARED_OPTS=
6303                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6304                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6305                 cat >mk_shared_lib.sh <<-CF_EOF
6306                 #!$SHELL
6307                 SHARED_LIB=\$1
6308                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6309                 shift
6310                 cat <<-EOF
6311                 Linking shared library
6312                 ** SHARED_LIB \$SHARED_LIB
6313                 ** IMPORT_LIB \$IMPORT_LIB
6314 EOF
6315                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6316 CF_EOF
6317                 chmod +x mk_shared_lib.sh
6318                 ;;
6319         (openbsd[2-9].*|mirbsd*)
6320                 if test "$DFT_LWR_MODEL" = "shared" ; then
6321                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                 fi
6324                 if test "$cf_cv_enable_rpath" = yes ; then
6325                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6326                 fi
6327                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6328
6329         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6330         if test "$cf_cv_shlib_version" = rel; then
6331                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6332         else
6333                 cf_cv_shared_soname='`basename $@`'
6334         fi
6335
6336                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6337                 ;;
6338         (nto-qnx*|openbsd*|freebsd[12].*)
6339                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6340                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6341                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6342                 ;;
6343         (dragonfly*|freebsd*)
6344                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6345                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6346                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6347                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6348                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6349                 fi
6350
6351         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6352         if test "$cf_cv_shlib_version" = rel; then
6353                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6354         else
6355                 cf_cv_shared_soname='`basename $@`'
6356         fi
6357
6358                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6359                 ;;
6360         (netbsd*)
6361                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6362                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6363                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6364                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6365                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6366                         if test "$cf_cv_shlib_version" = auto; then
6367                         if test -f /usr/libexec/ld.elf_so; then
6368                                 cf_cv_shlib_version=abi
6369                         else
6370                                 cf_cv_shlib_version=rel
6371                         fi
6372                         fi
6373
6374         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6375         if test "$cf_cv_shlib_version" = rel; then
6376                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6377         else
6378                 cf_cv_shared_soname='`basename $@`'
6379         fi
6380
6381                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6382                 else
6383                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6384                 fi
6385                 ;;
6386         (osf*|mls+*)
6387                 # tested with OSF/1 V3.2 and 'cc'
6388                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6389                 # link with shared libs).
6390                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6391                 case $host_os in
6392                 (osf4*)
6393                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6394                         ;;
6395                 esac
6396                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6397                 if test "$DFT_LWR_MODEL" = "shared" ; then
6398                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6399                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6400                 fi
6401                 cf_cv_rm_so_locs=yes
6402                 ;;
6403         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6404                 # tested with osr5.0.5
6405                 if test "$GCC" != yes; then
6406                         CC_SHARED_OPTS='-belf -KPIC'
6407                 fi
6408                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6409                 if test "$cf_cv_enable_rpath" = yes ; then
6410                         # only way is to set LD_RUN_PATH but no switch for it
6411                         RUN_PATH=$libdir
6412                 fi
6413                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6414                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6415                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6416                 ;;
6417         (sunos4*)
6418                 # tested with SunOS 4.1.1 and gcc 2.7.0
6419                 if test "$GCC" != yes; then
6420                         CC_SHARED_OPTS='-KPIC'
6421                 fi
6422                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6423                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6424                 ;;
6425         (solaris2*)
6426                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6427                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6428                 if test "$DFT_LWR_MODEL" = "shared" ; then
6429                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6430                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6431                 fi
6432                 if test "$cf_cv_enable_rpath" = yes ; then
6433                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6434                 fi
6435
6436         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6437         if test "$cf_cv_shlib_version" = rel; then
6438                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6439         else
6440                 cf_cv_shared_soname='`basename $@`'
6441         fi
6442
6443                 if test "$GCC" != yes; then
6444                         cf_save_CFLAGS="$CFLAGS"
6445                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6446                         do
6447                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6448                                 cat >conftest.$ac_ext <<_ACEOF
6449 #line 6449 "configure"
6450 #include "confdefs.h"
6451 #include <stdio.h>
6452 int
6453 main ()
6454 {
6455 printf("Hello\n");
6456   ;
6457   return 0;
6458 }
6459 _ACEOF
6460 rm -f conftest.$ac_objext
6461 if { (eval echo "$as_me:6461: \"$ac_compile\"") >&5
6462   (eval $ac_compile) 2>&5
6463   ac_status=$?
6464   echo "$as_me:6464: \$? = $ac_status" >&5
6465   (exit $ac_status); } &&
6466          { ac_try='test -s conftest.$ac_objext'
6467   { (eval echo "$as_me:6467: \"$ac_try\"") >&5
6468   (eval $ac_try) 2>&5
6469   ac_status=$?
6470   echo "$as_me:6470: \$? = $ac_status" >&5
6471   (exit $ac_status); }; }; then
6472   break
6473 else
6474   echo "$as_me: failed program was:" >&5
6475 cat conftest.$ac_ext >&5
6476 fi
6477 rm -f conftest.$ac_objext conftest.$ac_ext
6478                         done
6479                         CFLAGS="$cf_save_CFLAGS"
6480                         CC_SHARED_OPTS=$cf_shared_opts
6481                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6482                 else
6483                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6484                 fi
6485                 ;;
6486         (sysv5uw7*|unix_sv*)
6487                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6488                 if test "$GCC" != yes; then
6489                         CC_SHARED_OPTS='-KPIC'
6490                 fi
6491                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6492                 ;;
6493         (*)
6494                 CC_SHARED_OPTS='unknown'
6495                 MK_SHARED_LIB='echo unknown'
6496                 ;;
6497         esac
6498
6499         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6500         case "$cf_cv_shlib_version" in
6501         (rel|abi)
6502                 case "$MK_SHARED_LIB" in
6503                 (*'-o $@')
6504                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6505                         ;;
6506                 (*)
6507                         { echo "$as_me:6507: WARNING: ignored --with-shlib-version" >&5
6508 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6509                         ;;
6510                 esac
6511                 ;;
6512         esac
6513
6514         if test -n "$cf_try_cflags"
6515         then
6516 cat > conftest.$ac_ext <<EOF
6517 #line 6517 "${as_me:-configure}"
6518 #include <stdio.h>
6519 int main(int argc, char *argv[])
6520 {
6521         printf("hello\n");
6522         return (argv[argc-1] == 0) ;
6523 }
6524 EOF
6525                 cf_save_CFLAGS="$CFLAGS"
6526                 for cf_opt in $cf_try_cflags
6527                 do
6528                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6529                         echo "$as_me:6529: checking if CFLAGS option -$cf_opt works" >&5
6530 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6531                         if { (eval echo "$as_me:6531: \"$ac_compile\"") >&5
6532   (eval $ac_compile) 2>&5
6533   ac_status=$?
6534   echo "$as_me:6534: \$? = $ac_status" >&5
6535   (exit $ac_status); }; then
6536                                 echo "$as_me:6536: result: yes" >&5
6537 echo "${ECHO_T}yes" >&6
6538                                 cf_save_CFLAGS="$CFLAGS"
6539                         else
6540                                 echo "$as_me:6540: result: no" >&5
6541 echo "${ECHO_T}no" >&6
6542                         fi
6543                 done
6544                 CFLAGS="$cf_save_CFLAGS"
6545         fi
6546
6547         # RPATH_LIST is a colon-separated list of directories
6548         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6549         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6550
6551         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6552
6553         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6554
6555 echo "${as_me:-configure}:6555: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6556
6557         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6558
6559 echo "${as_me:-configure}:6559: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6560
6561 for model in $cf_list_models; do
6562         case $model in
6563         (libtool)
6564
6565 echo "$as_me:6565: checking for additional libtool options" >&5
6566 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6567
6568 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6569 if test "${with_libtool_opts+set}" = set; then
6570   withval="$with_libtool_opts"
6571   with_libtool_opts=$withval
6572 else
6573   with_libtool_opts=no
6574 fi;
6575 echo "$as_me:6575: result: $with_libtool_opts" >&5
6576 echo "${ECHO_T}$with_libtool_opts" >&6
6577
6578 case .$with_libtool_opts in
6579 (.yes|.no|.)
6580         ;;
6581 (*)
6582         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6583         ;;
6584 esac
6585
6586 echo "$as_me:6586: checking if exported-symbols file should be used" >&5
6587 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6588
6589 # Check whether --with-export-syms or --without-export-syms was given.
6590 if test "${with_export_syms+set}" = set; then
6591   withval="$with_export_syms"
6592   with_export_syms=$withval
6593 else
6594   with_export_syms=no
6595 fi;
6596 if test "x$with_export_syms" = xyes
6597 then
6598         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6599
6600 fi
6601 echo "$as_me:6601: result: $with_export_syms" >&5
6602 echo "${ECHO_T}$with_export_syms" >&6
6603 if test "x$with_export_syms" != xno
6604 then
6605         EXPORT_SYMS="-export-symbols $with_export_syms"
6606
6607 fi
6608
6609                 ;;
6610         (shared)
6611                 if test "$CC_SHARED_OPTS" = "unknown"; then
6612                         { { echo "$as_me:6612: error: Shared libraries are not supported in this version" >&5
6613 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6614    { (exit 1); exit 1; }; }
6615                 fi
6616                 # workaround for inept transition to PIE vs PIC...
6617                 echo "$as_me:6617: checking if current CFLAGS link properly" >&5
6618 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6619                 cat >conftest.$ac_ext <<_ACEOF
6620 #line 6620 "configure"
6621 #include "confdefs.h"
6622 #include <stdio.h>
6623 int
6624 main ()
6625 {
6626 printf("Hello work\n");
6627   ;
6628   return 0;
6629 }
6630 _ACEOF
6631 rm -f conftest.$ac_objext conftest$ac_exeext
6632 if { (eval echo "$as_me:6632: \"$ac_link\"") >&5
6633   (eval $ac_link) 2>&5
6634   ac_status=$?
6635   echo "$as_me:6635: \$? = $ac_status" >&5
6636   (exit $ac_status); } &&
6637          { ac_try='test -s conftest$ac_exeext'
6638   { (eval echo "$as_me:6638: \"$ac_try\"") >&5
6639   (eval $ac_try) 2>&5
6640   ac_status=$?
6641   echo "$as_me:6641: \$? = $ac_status" >&5
6642   (exit $ac_status); }; }; then
6643   cf_cflags_work=yes
6644 else
6645   echo "$as_me: failed program was:" >&5
6646 cat conftest.$ac_ext >&5
6647 cf_cflags_work=no
6648 fi
6649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6650                 echo "$as_me:6650: result: $cf_cflags_work" >&5
6651 echo "${ECHO_T}$cf_cflags_work" >&6
6652                 if test "$cf_cflags_work" = no
6653                 then
6654                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6655
6656 echo "${as_me:-configure}:6656: testing try to work around by appending shared-options ..." 1>&5
6657
6658                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6659                 fi
6660
6661 echo "$as_me:6661: checking if versioned-symbols file should be used" >&5
6662 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6663
6664 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6665 if test "${with_versioned_syms+set}" = set; then
6666   withval="$with_versioned_syms"
6667   with_versioned_syms=$withval
6668 else
6669   with_versioned_syms=no
6670 fi;
6671 if test "x$with_versioned_syms" = xyes
6672 then
6673         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6674
6675 fi
6676 echo "$as_me:6676: result: $with_versioned_syms" >&5
6677 echo "${ECHO_T}$with_versioned_syms" >&6
6678
6679 RESULTING_SYMS=
6680 VERSIONED_SYMS=
6681 WILDCARD_SYMS=
6682
6683 if test "x$with_versioned_syms" != xno
6684 then
6685         RESULTING_SYMS=$with_versioned_syms
6686         case "x$MK_SHARED_LIB" in
6687         (*-Wl,*)
6688                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6689                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6690                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6691
6692 echo "${as_me:-configure}:6692: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6693
6694                 ;;
6695         (*-dy\ *)
6696                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6697                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6698                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6699
6700 echo "${as_me:-configure}:6700: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6701
6702                 ;;
6703         (*)
6704                 { echo "$as_me:6704: WARNING: this system does not support versioned-symbols" >&5
6705 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6706                 ;;
6707         esac
6708
6709         # Linux ld can selectively override scope, e.g., of symbols beginning with
6710         # "_" by first declaring some as global, and then using a wildcard to
6711         # declare the others as local.  Some other loaders cannot do this.  Check
6712         # by constructing a (very) simple shared library and inspecting its
6713         # symbols.
6714         if test "x$VERSIONED_SYMS" != "x"
6715         then
6716                 echo "$as_me:6716: checking if wildcards can be used to selectively omit symbols" >&5
6717 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6718                 WILDCARD_SYMS=no
6719
6720                 # make sources
6721                 rm -f conftest.*
6722
6723                 cat >conftest.ver <<EOF
6724 module_1.0 {
6725 global:
6726         globalf1;
6727 local:
6728         localf1;
6729 };
6730 module_2.0 {
6731 global:
6732         globalf2;
6733 local:
6734         localf2;
6735         _*;
6736 } module_1.0;
6737 submodule_1.0 {
6738 global:
6739         subglobalf1;
6740         _ismissing;
6741 local:
6742         sublocalf1;
6743 };
6744 submodule_2.0 {
6745 global:
6746         subglobalf2;
6747 local:
6748         sublocalf2;
6749         _*;
6750 } submodule_1.0;
6751 EOF
6752                 cat >conftest.$ac_ext <<EOF
6753 #line 6753 "configure"
6754 int     _ismissing(void) { return 1; }
6755 int     _localf1(void) { return 1; }
6756 int     _localf2(void) { return 2; }
6757 int     globalf1(void) { return 1; }
6758 int     globalf2(void) { return 2; }
6759 int     _sublocalf1(void) { return 1; }
6760 int     _sublocalf2(void) { return 2; }
6761 int     subglobalf1(void) { return 1; }
6762 int     subglobalf2(void) { return 2; }
6763 EOF
6764                 cat >conftest.mk <<EOF
6765 CC=${CC}
6766 CFLAGS=${CFLAGS}
6767 CPPFLAGS=${CPPFLAGS}
6768 LDFLAGS=${LDFLAGS}
6769 LIBS=${LIBS}
6770 VERSIONED_SYMS=${VERSIONED_SYMS}
6771 RESULTING_SYMS=conftest.ver
6772 MK_SHARED_LIB=${MK_SHARED_LIB}
6773 conftest.so: conftest.$ac_cv_objext
6774                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6775 EOF
6776
6777                 # compile source, make library
6778                 if make -f conftest.mk 2>&5 >/dev/null
6779                 then
6780                         # test for missing symbol in either Data or Text section
6781                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6782                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6783                 fi
6784                 echo "$as_me:6784: result: $WILDCARD_SYMS" >&5
6785 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6786                 rm -f conftest.*
6787         fi
6788 fi
6789
6790                 ;;
6791         esac
6792 done
6793
6794 # pretend that ncurses==ncursesw==ncursest
6795 echo "$as_me:6795: checking if you want to disable library suffixes" >&5
6796 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6797
6798 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6799 if test "${enable_lib_suffixes+set}" = set; then
6800   enableval="$enable_lib_suffixes"
6801   test "$enableval" != no && enableval=yes
6802         if test "$enableval" != "yes" ; then
6803     disable_lib_suffixes=yes
6804         else
6805                 disable_lib_suffixes=no
6806         fi
6807 else
6808   enableval=yes
6809         disable_lib_suffixes=no
6810
6811 fi;
6812 echo "$as_me:6812: result: $disable_lib_suffixes" >&5
6813 echo "${ECHO_T}$disable_lib_suffixes" >&6
6814
6815 ### If we're building with rpath, try to link non-standard libs that way too.
6816 if test "$DFT_LWR_MODEL" = "shared"; then
6817
6818 echo "$as_me:6818: checking if rpath-hack should be disabled" >&5
6819 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6820
6821 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6822 if test "${enable_rpath_hack+set}" = set; then
6823   enableval="$enable_rpath_hack"
6824   test "$enableval" != no && enableval=yes
6825         if test "$enableval" != "yes" ; then
6826     cf_disable_rpath_hack=yes
6827         else
6828                 cf_disable_rpath_hack=no
6829         fi
6830 else
6831   enableval=yes
6832         cf_disable_rpath_hack=no
6833
6834 fi;
6835 echo "$as_me:6835: result: $cf_disable_rpath_hack" >&5
6836 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6837 if test "$cf_disable_rpath_hack" = no ; then
6838
6839 echo "$as_me:6839: checking for updated LDFLAGS" >&5
6840 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6841 if test -n "$LD_RPATH_OPT" ; then
6842         echo "$as_me:6842: result: maybe" >&5
6843 echo "${ECHO_T}maybe" >&6
6844
6845         for ac_prog in ldd
6846 do
6847   # Extract the first word of "$ac_prog", so it can be a program name with args.
6848 set dummy $ac_prog; ac_word=$2
6849 echo "$as_me:6849: checking for $ac_word" >&5
6850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6851 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6852   echo $ECHO_N "(cached) $ECHO_C" >&6
6853 else
6854   if test -n "$cf_ldd_prog"; then
6855   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6856 else
6857   ac_save_IFS=$IFS; IFS=$ac_path_separator
6858 ac_dummy="$PATH"
6859 for ac_dir in $ac_dummy; do
6860   IFS=$ac_save_IFS
6861   test -z "$ac_dir" && ac_dir=.
6862   $as_executable_p "$ac_dir/$ac_word" || continue
6863 ac_cv_prog_cf_ldd_prog="$ac_prog"
6864 echo "$as_me:6864: found $ac_dir/$ac_word" >&5
6865 break
6866 done
6867
6868 fi
6869 fi
6870 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6871 if test -n "$cf_ldd_prog"; then
6872   echo "$as_me:6872: result: $cf_ldd_prog" >&5
6873 echo "${ECHO_T}$cf_ldd_prog" >&6
6874 else
6875   echo "$as_me:6875: result: no" >&5
6876 echo "${ECHO_T}no" >&6
6877 fi
6878
6879   test -n "$cf_ldd_prog" && break
6880 done
6881 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6882
6883         cf_rpath_list="/usr/lib /lib"
6884         if test "$cf_ldd_prog" != no
6885         then
6886                 cf_rpath_oops=
6887
6888 cat >conftest.$ac_ext <<_ACEOF
6889 #line 6889 "configure"
6890 #include "confdefs.h"
6891 #include <stdio.h>
6892 int
6893 main ()
6894 {
6895 printf("Hello");
6896   ;
6897   return 0;
6898 }
6899 _ACEOF
6900 rm -f conftest.$ac_objext conftest$ac_exeext
6901 if { (eval echo "$as_me:6901: \"$ac_link\"") >&5
6902   (eval $ac_link) 2>&5
6903   ac_status=$?
6904   echo "$as_me:6904: \$? = $ac_status" >&5
6905   (exit $ac_status); } &&
6906          { ac_try='test -s conftest$ac_exeext'
6907   { (eval echo "$as_me:6907: \"$ac_try\"") >&5
6908   (eval $ac_try) 2>&5
6909   ac_status=$?
6910   echo "$as_me:6910: \$? = $ac_status" >&5
6911   (exit $ac_status); }; }; then
6912   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6913                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6914 else
6915   echo "$as_me: failed program was:" >&5
6916 cat conftest.$ac_ext >&5
6917 fi
6918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6919
6920                 # If we passed the link-test, but get a "not found" on a given library,
6921                 # this could be due to inept reconfiguration of gcc to make it only
6922                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6923                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6924                 # /usr/local libraries.
6925                 if test -n "$cf_rpath_oops"
6926                 then
6927                         for cf_rpath_src in $cf_rpath_oops
6928                         do
6929                                 for cf_rpath_dir in \
6930                                         /usr/local \
6931                                         /usr/pkg \
6932                                         /opt/sfw
6933                                 do
6934                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6935                                         then
6936                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6937
6938 echo "${as_me:-configure}:6938: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6939
6940                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6941                                                 break
6942                                         fi
6943                                 done
6944                         done
6945                 fi
6946         fi
6947
6948         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6949
6950 echo "${as_me:-configure}:6950: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6951
6952 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6953
6954 echo "${as_me:-configure}:6954: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6955
6956 cf_rpath_dst=
6957 for cf_rpath_src in $LDFLAGS
6958 do
6959         case $cf_rpath_src in
6960         (-L*)
6961
6962                 # check if this refers to a directory which we will ignore
6963                 cf_rpath_skip=no
6964                 if test -n "$cf_rpath_list"
6965                 then
6966                         for cf_rpath_item in $cf_rpath_list
6967                         do
6968                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6969                                 then
6970                                         cf_rpath_skip=yes
6971                                         break
6972                                 fi
6973                         done
6974                 fi
6975
6976                 if test "$cf_rpath_skip" = no
6977                 then
6978                         # transform the option
6979                         if test "$LD_RPATH_OPT" = "-R " ; then
6980                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6981                         else
6982                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6983                         fi
6984
6985                         # if we have not already added this, add it now
6986                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6987                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6988                         then
6989                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6990
6991 echo "${as_me:-configure}:6991: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6992
6993                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6994                         fi
6995                 fi
6996                 ;;
6997         esac
6998         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6999 done
7000 LDFLAGS=$cf_rpath_dst
7001
7002 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7003
7004 echo "${as_me:-configure}:7004: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7005
7006 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7007
7008 echo "${as_me:-configure}:7008: testing ...checking LIBS $LIBS ..." 1>&5
7009
7010 cf_rpath_dst=
7011 for cf_rpath_src in $LIBS
7012 do
7013         case $cf_rpath_src in
7014         (-L*)
7015
7016                 # check if this refers to a directory which we will ignore
7017                 cf_rpath_skip=no
7018                 if test -n "$cf_rpath_list"
7019                 then
7020                         for cf_rpath_item in $cf_rpath_list
7021                         do
7022                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7023                                 then
7024                                         cf_rpath_skip=yes
7025                                         break
7026                                 fi
7027                         done
7028                 fi
7029
7030                 if test "$cf_rpath_skip" = no
7031                 then
7032                         # transform the option
7033                         if test "$LD_RPATH_OPT" = "-R " ; then
7034                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7035                         else
7036                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7037                         fi
7038
7039                         # if we have not already added this, add it now
7040                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7041                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7042                         then
7043                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7044
7045 echo "${as_me:-configure}:7045: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7046
7047                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7048                         fi
7049                 fi
7050                 ;;
7051         esac
7052         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7053 done
7054 LIBS=$cf_rpath_dst
7055
7056 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7057
7058 echo "${as_me:-configure}:7058: testing ...checked LIBS $LIBS ..." 1>&5
7059
7060         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7061
7062 echo "${as_me:-configure}:7062: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7063
7064 else
7065         echo "$as_me:7065: result: no" >&5
7066 echo "${ECHO_T}no" >&6
7067 fi
7068
7069 fi
7070
7071 fi
7072
7073 ###############################################################################
7074
7075 ###     use option --with-extra-suffix to append suffix to headers and libraries
7076 echo "$as_me:7076: checking if you wish to append extra suffix to header/library paths" >&5
7077 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7078 EXTRA_SUFFIX=
7079
7080 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7081 if test "${with_extra_suffix+set}" = set; then
7082   withval="$with_extra_suffix"
7083   case x$withval in
7084         (no)
7085                 ;;
7086         (xyes|x)
7087                 EXTRA_SUFFIX=$cf_cv_abi_version
7088                 ;;
7089         (*)
7090                 EXTRA_SUFFIX=$withval
7091                 ;;
7092         esac
7093
7094 fi;
7095 echo "$as_me:7095: result: $EXTRA_SUFFIX" >&5
7096 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7097
7098 ###     use option --disable-overwrite to leave out the link to -lcurses
7099 echo "$as_me:7099: checking if you wish to install ncurses overwriting curses" >&5
7100 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7101
7102 # Check whether --enable-overwrite or --disable-overwrite was given.
7103 if test "${enable_overwrite+set}" = set; then
7104   enableval="$enable_overwrite"
7105   with_overwrite=$enableval
7106 else
7107   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7108 fi;
7109 echo "$as_me:7109: result: $with_overwrite" >&5
7110 echo "${ECHO_T}$with_overwrite" >&6
7111
7112 echo "$as_me:7112: checking if external terminfo-database is used" >&5
7113 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7114
7115 # Check whether --enable-database or --disable-database was given.
7116 if test "${enable_database+set}" = set; then
7117   enableval="$enable_database"
7118   use_database=$enableval
7119 else
7120   use_database=yes
7121 fi;
7122 echo "$as_me:7122: result: $use_database" >&5
7123 echo "${ECHO_T}$use_database" >&6
7124
7125 case $host_os in
7126 (os2*)
7127         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7128         ;;
7129 (*)
7130         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7131         ;;
7132 esac
7133
7134 NCURSES_USE_DATABASE=0
7135 if test "$use_database" != no ; then
7136         NCURSES_USE_DATABASE=1
7137
7138         echo "$as_me:7138: checking which terminfo source-file will be installed" >&5
7139 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7140
7141 # Check whether --with-database or --without-database was given.
7142 if test "${with_database+set}" = set; then
7143   withval="$with_database"
7144   TERMINFO_SRC=$withval
7145 fi;
7146         echo "$as_me:7146: result: $TERMINFO_SRC" >&5
7147 echo "${ECHO_T}$TERMINFO_SRC" >&6
7148
7149         echo "$as_me:7149: checking whether to use hashed database instead of directory/tree" >&5
7150 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7151
7152 # Check whether --with-hashed-db or --without-hashed-db was given.
7153 if test "${with_hashed_db+set}" = set; then
7154   withval="$with_hashed_db"
7155
7156 else
7157   with_hashed_db=no
7158 fi;
7159         echo "$as_me:7159: result: $with_hashed_db" >&5
7160 echo "${ECHO_T}$with_hashed_db" >&6
7161 else
7162         with_hashed_db=no
7163 fi
7164
7165 echo "$as_me:7165: checking for list of fallback descriptions" >&5
7166 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7167
7168 # Check whether --with-fallbacks or --without-fallbacks was given.
7169 if test "${with_fallbacks+set}" = set; then
7170   withval="$with_fallbacks"
7171   with_fallback=$withval
7172 else
7173   with_fallback=
7174 fi;
7175 echo "$as_me:7175: result: $with_fallback" >&5
7176 echo "${ECHO_T}$with_fallback" >&6
7177 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7178
7179 echo "$as_me:7179: checking if you want modern xterm or antique" >&5
7180 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7181
7182 # Check whether --with-xterm-new or --without-xterm-new was given.
7183 if test "${with_xterm_new+set}" = set; then
7184   withval="$with_xterm_new"
7185   with_xterm_new=$withval
7186 else
7187   with_xterm_new=yes
7188 fi;
7189 case $with_xterm_new in
7190 (no) with_xterm_new=xterm-old;;
7191 (*)      with_xterm_new=xterm-new;;
7192 esac
7193 echo "$as_me:7193: result: $with_xterm_new" >&5
7194 echo "${ECHO_T}$with_xterm_new" >&6
7195 WHICH_XTERM=$with_xterm_new
7196
7197 echo "$as_me:7197: checking if xterm backspace sends BS or DEL" >&5
7198 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7199
7200 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7201 if test "${with_xterm_kbs+set}" = set; then
7202   withval="$with_xterm_kbs"
7203   with_xterm_kbs=$withval
7204 else
7205   with_xterm_kbs=BS
7206 fi;
7207 case x$with_xterm_kbs in
7208 (xyes|xno|xBS|xbs|x8)
7209         with_xterm_kbs=BS
7210         ;;
7211 (xDEL|xdel|x127)
7212         with_xterm_kbs=DEL
7213         ;;
7214 (*)
7215         with_xterm_kbs=$withval
7216         ;;
7217 esac
7218 echo "$as_me:7218: result: $with_xterm_kbs" >&5
7219 echo "${ECHO_T}$with_xterm_kbs" >&6
7220 XTERM_KBS=$with_xterm_kbs
7221
7222 MAKE_TERMINFO=
7223 if test "$use_database" = no ; then
7224         TERMINFO="${datadir}/terminfo"
7225         MAKE_TERMINFO="#"
7226 else
7227
7228 echo "$as_me:7228: checking for list of terminfo directories" >&5
7229 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7230
7231 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7232 if test "${with_terminfo_dirs+set}" = set; then
7233   withval="$with_terminfo_dirs"
7234
7235 else
7236   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7237 fi;
7238 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7239 cf_dst_path=
7240 for cf_src_path in $withval
7241 do
7242
7243 if test "x$prefix" != xNONE; then
7244         cf_path_syntax="$prefix"
7245 else
7246         cf_path_syntax="$ac_default_prefix"
7247 fi
7248
7249 case ".$cf_src_path" in
7250 (.\$\(*\)*|.\'*\'*)
7251         ;;
7252 (..|./*|.\\*)
7253         ;;
7254 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7255         ;;
7256 (.\${*prefix}*|.\${*dir}*)
7257         eval cf_src_path="$cf_src_path"
7258         case ".$cf_src_path" in
7259         (.NONE/*)
7260                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7261                 ;;
7262         esac
7263         ;;
7264 (.no|.NONE/*)
7265         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7266         ;;
7267 (*)
7268         { { echo "$as_me:7268: error: expected a pathname, not \"$cf_src_path\"" >&5
7269 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7270    { (exit 1); exit 1; }; }
7271         ;;
7272 esac
7273
7274   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7275   cf_dst_path="${cf_dst_path}${cf_src_path}"
7276 done
7277 IFS="$ac_save_ifs"
7278
7279 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7280 # so we have to check/work around.  We do prefer the result of "eval"...
7281 eval cf_dst_eval="$cf_dst_path"
7282 case "x$cf_dst_eval" in
7283 (xNONE*)
7284         TERMINFO_DIRS=$cf_dst_path
7285         ;;
7286 (*)
7287         TERMINFO_DIRS="$cf_dst_eval"
7288         ;;
7289 esac
7290
7291 echo "$as_me:7291: result: $TERMINFO_DIRS" >&5
7292 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7293 test -n "$TERMINFO_DIRS" &&
7294 cat >>confdefs.h <<EOF
7295 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7296 EOF
7297
7298 echo "$as_me:7298: checking for default terminfo directory" >&5
7299 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7300
7301 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7302 if test "${with_default_terminfo_dir+set}" = set; then
7303   withval="$with_default_terminfo_dir"
7304
7305 else
7306   withval="${TERMINFO:-${datadir}/terminfo}"
7307 fi; if test -n "${datadir}/terminfo" ; then
7308
7309 if test "x$prefix" != xNONE; then
7310         cf_path_syntax="$prefix"
7311 else
7312         cf_path_syntax="$ac_default_prefix"
7313 fi
7314
7315 case ".$withval" in
7316 (.\$\(*\)*|.\'*\'*)
7317         ;;
7318 (..|./*|.\\*)
7319         ;;
7320 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7321         ;;
7322 (.\${*prefix}*|.\${*dir}*)
7323         eval withval="$withval"
7324         case ".$withval" in
7325         (.NONE/*)
7326                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7327                 ;;
7328         esac
7329         ;;
7330 (.no|.NONE/*)
7331         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7332         ;;
7333 (*)
7334         { { echo "$as_me:7334: error: expected a pathname, not \"$withval\"" >&5
7335 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7336    { (exit 1); exit 1; }; }
7337         ;;
7338 esac
7339
7340 fi
7341 eval TERMINFO="$withval"
7342
7343 echo "$as_me:7343: result: $TERMINFO" >&5
7344 echo "${ECHO_T}$TERMINFO" >&6
7345
7346 cat >>confdefs.h <<EOF
7347 #define TERMINFO "$TERMINFO"
7348 EOF
7349
7350 fi
7351
7352 ###     use option --disable-big-core to make tic run on small machines
7353 ###     We need 4Mb, check if we can allocate 50% more than that.
7354 echo "$as_me:7354: checking if big-core option selected" >&5
7355 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7356
7357 # Check whether --enable-big-core or --disable-big-core was given.
7358 if test "${enable_big_core+set}" = set; then
7359   enableval="$enable_big_core"
7360   with_big_core=$enableval
7361 else
7362   if test "$cross_compiling" = yes; then
7363   with_big_core=no
7364 else
7365   cat >conftest.$ac_ext <<_ACEOF
7366 #line 7366 "configure"
7367 #include "confdefs.h"
7368
7369 #include <stdlib.h>
7370 #include <string.h>
7371 int main() {
7372         unsigned long n = 6000000L;
7373         char *s = malloc(n);
7374         if (s != 0)
7375                 s[0] = s[n-1] = 0;
7376         ${cf_cv_main_return:-return}(s == 0);
7377 }
7378 _ACEOF
7379 rm -f conftest$ac_exeext
7380 if { (eval echo "$as_me:7380: \"$ac_link\"") >&5
7381   (eval $ac_link) 2>&5
7382   ac_status=$?
7383   echo "$as_me:7383: \$? = $ac_status" >&5
7384   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7385   { (eval echo "$as_me:7385: \"$ac_try\"") >&5
7386   (eval $ac_try) 2>&5
7387   ac_status=$?
7388   echo "$as_me:7388: \$? = $ac_status" >&5
7389   (exit $ac_status); }; }; then
7390   with_big_core=yes
7391 else
7392   echo "$as_me: program exited with status $ac_status" >&5
7393 echo "$as_me: failed program was:" >&5
7394 cat conftest.$ac_ext >&5
7395 with_big_core=no
7396 fi
7397 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7398 fi
7399 fi;
7400 echo "$as_me:7400: result: $with_big_core" >&5
7401 echo "${ECHO_T}$with_big_core" >&6
7402 test "x$with_big_core" = "xyes" &&
7403 cat >>confdefs.h <<\EOF
7404 #define HAVE_BIG_CORE 1
7405 EOF
7406
7407 ### ISO C only guarantees 512-char strings, we have tables which load faster
7408 ### when constructed using "big" strings.  More than the C compiler, the awk
7409 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7410 echo "$as_me:7410: checking if big-strings option selected" >&5
7411 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7412
7413 # Check whether --enable-big-strings or --disable-big-strings was given.
7414 if test "${enable_big_strings+set}" = set; then
7415   enableval="$enable_big_strings"
7416   with_big_strings=$enableval
7417 else
7418
7419         case x$AWK in
7420         (x)
7421                 eval with_big_strings=no
7422                 ;;
7423         (*)
7424                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7425                         | $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
7426                         eval with_big_strings=yes
7427                 else
7428                         eval with_big_strings=no
7429                 fi
7430                 ;;
7431         esac
7432
7433 fi;
7434 echo "$as_me:7434: result: $with_big_strings" >&5
7435 echo "${ECHO_T}$with_big_strings" >&6
7436
7437 USE_BIG_STRINGS=0
7438 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7439
7440 ###     use option --enable-termcap to compile in the termcap fallback support
7441 echo "$as_me:7441: checking if you want termcap-fallback support" >&5
7442 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7443
7444 # Check whether --enable-termcap or --disable-termcap was given.
7445 if test "${enable_termcap+set}" = set; then
7446   enableval="$enable_termcap"
7447   with_termcap=$enableval
7448 else
7449   with_termcap=no
7450 fi;
7451 echo "$as_me:7451: result: $with_termcap" >&5
7452 echo "${ECHO_T}$with_termcap" >&6
7453
7454 NCURSES_USE_TERMCAP=0
7455 if test "x$with_termcap" != "xyes" ; then
7456         if test "$use_database" = no ; then
7457                 if test -z "$with_fallback" ; then
7458                         { { echo "$as_me:7458: error: You have disabled the database w/o specifying fallbacks" >&5
7459 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7460    { (exit 1); exit 1; }; }
7461                 fi
7462         fi
7463
7464 cat >>confdefs.h <<\EOF
7465 #define PURE_TERMINFO 1
7466 EOF
7467
7468 else
7469
7470         if test "$with_ticlib" != no ; then
7471                 { { echo "$as_me:7471: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7472 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7473    { (exit 1); exit 1; }; }
7474         fi
7475
7476         NCURSES_USE_TERMCAP=1
7477         echo "$as_me:7477: checking for list of termcap files" >&5
7478 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7479
7480 # Check whether --with-termpath or --without-termpath was given.
7481 if test "${with_termpath+set}" = set; then
7482   withval="$with_termpath"
7483
7484 else
7485   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7486 fi;
7487 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7488 cf_dst_path=
7489 for cf_src_path in $withval
7490 do
7491
7492 if test "x$prefix" != xNONE; then
7493         cf_path_syntax="$prefix"
7494 else
7495         cf_path_syntax="$ac_default_prefix"
7496 fi
7497
7498 case ".$cf_src_path" in
7499 (.\$\(*\)*|.\'*\'*)
7500         ;;
7501 (..|./*|.\\*)
7502         ;;
7503 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7504         ;;
7505 (.\${*prefix}*|.\${*dir}*)
7506         eval cf_src_path="$cf_src_path"
7507         case ".$cf_src_path" in
7508         (.NONE/*)
7509                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7510                 ;;
7511         esac
7512         ;;
7513 (.no|.NONE/*)
7514         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7515         ;;
7516 (*)
7517         { { echo "$as_me:7517: error: expected a pathname, not \"$cf_src_path\"" >&5
7518 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7519    { (exit 1); exit 1; }; }
7520         ;;
7521 esac
7522
7523   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7524   cf_dst_path="${cf_dst_path}${cf_src_path}"
7525 done
7526 IFS="$ac_save_ifs"
7527
7528 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7529 # so we have to check/work around.  We do prefer the result of "eval"...
7530 eval cf_dst_eval="$cf_dst_path"
7531 case "x$cf_dst_eval" in
7532 (xNONE*)
7533         TERMPATH=$cf_dst_path
7534         ;;
7535 (*)
7536         TERMPATH="$cf_dst_eval"
7537         ;;
7538 esac
7539
7540         echo "$as_me:7540: result: $TERMPATH" >&5
7541 echo "${ECHO_T}$TERMPATH" >&6
7542         test -n "$TERMPATH" &&
7543 cat >>confdefs.h <<EOF
7544 #define TERMPATH "$TERMPATH"
7545 EOF
7546
7547         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7548         echo "$as_me:7548: checking if fast termcap-loader is needed" >&5
7549 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7550
7551 # Check whether --enable-getcap or --disable-getcap was given.
7552 if test "${enable_getcap+set}" = set; then
7553   enableval="$enable_getcap"
7554   with_getcap=$enableval
7555 else
7556   with_getcap=no
7557 fi;
7558         echo "$as_me:7558: result: $with_getcap" >&5
7559 echo "${ECHO_T}$with_getcap" >&6
7560         test "x$with_getcap" = "xyes" &&
7561 cat >>confdefs.h <<\EOF
7562 #define USE_GETCAP 1
7563 EOF
7564
7565         echo "$as_me:7565: checking if translated termcaps will be cached in ~/.terminfo" >&5
7566 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7567
7568 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7569 if test "${enable_getcap_cache+set}" = set; then
7570   enableval="$enable_getcap_cache"
7571   with_getcap_cache=$enableval
7572 else
7573   with_getcap_cache=no
7574 fi;
7575         echo "$as_me:7575: result: $with_getcap_cache" >&5
7576 echo "${ECHO_T}$with_getcap_cache" >&6
7577         test "x$with_getcap_cache" = "xyes" &&
7578 cat >>confdefs.h <<\EOF
7579 #define USE_GETCAP_CACHE 1
7580 EOF
7581
7582 fi
7583
7584 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7585 echo "$as_me:7585: checking if ~/.terminfo is wanted" >&5
7586 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7587
7588 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7589 if test "${enable_home_terminfo+set}" = set; then
7590   enableval="$enable_home_terminfo"
7591   with_home_terminfo=$enableval
7592 else
7593   with_home_terminfo=yes
7594 fi;
7595 echo "$as_me:7595: result: $with_home_terminfo" >&5
7596 echo "${ECHO_T}$with_home_terminfo" >&6
7597 test "x$with_home_terminfo" = "xyes" &&
7598 cat >>confdefs.h <<\EOF
7599 #define USE_HOME_TERMINFO 1
7600 EOF
7601
7602 echo "$as_me:7602: checking if you want to use restricted environment when running as root" >&5
7603 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7604
7605 # Check whether --enable-root-environ or --disable-root-environ was given.
7606 if test "${enable_root_environ+set}" = set; then
7607   enableval="$enable_root_environ"
7608   with_root_environ=$enableval
7609 else
7610   with_root_environ=yes
7611 fi;
7612 echo "$as_me:7612: result: $with_root_environ" >&5
7613 echo "${ECHO_T}$with_root_environ" >&6
7614 test "x$with_root_environ" = xyes &&
7615 cat >>confdefs.h <<\EOF
7616 #define USE_ROOT_ENVIRON 1
7617 EOF
7618
7619 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7620 ###   to reduce storage requirements for the terminfo database.
7621
7622 for ac_header in \
7623 unistd.h \
7624
7625 do
7626 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7627 echo "$as_me:7627: checking for $ac_header" >&5
7628 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7629 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7630   echo $ECHO_N "(cached) $ECHO_C" >&6
7631 else
7632   cat >conftest.$ac_ext <<_ACEOF
7633 #line 7633 "configure"
7634 #include "confdefs.h"
7635 #include <$ac_header>
7636 _ACEOF
7637 if { (eval echo "$as_me:7637: \"$ac_cpp conftest.$ac_ext\"") >&5
7638   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7639   ac_status=$?
7640   egrep -v '^ *\+' conftest.er1 >conftest.err
7641   rm -f conftest.er1
7642   cat conftest.err >&5
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit $ac_status); } >/dev/null; then
7645   if test -s conftest.err; then
7646     ac_cpp_err=$ac_c_preproc_warn_flag
7647   else
7648     ac_cpp_err=
7649   fi
7650 else
7651   ac_cpp_err=yes
7652 fi
7653 if test -z "$ac_cpp_err"; then
7654   eval "$as_ac_Header=yes"
7655 else
7656   echo "$as_me: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   eval "$as_ac_Header=no"
7659 fi
7660 rm -f conftest.err conftest.$ac_ext
7661 fi
7662 echo "$as_me:7662: result: `eval echo '${'$as_ac_Header'}'`" >&5
7663 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7664 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7665   cat >>confdefs.h <<EOF
7666 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7667 EOF
7668
7669 fi
7670 done
7671
7672 for ac_func in \
7673         remove \
7674         unlink
7675 do
7676 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7677 echo "$as_me:7677: checking for $ac_func" >&5
7678 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7679 if eval "test \"\${$as_ac_var+set}\" = set"; then
7680   echo $ECHO_N "(cached) $ECHO_C" >&6
7681 else
7682   cat >conftest.$ac_ext <<_ACEOF
7683 #line 7683 "configure"
7684 #include "confdefs.h"
7685 /* System header to define __stub macros and hopefully few prototypes,
7686     which can conflict with char $ac_func (); below.  */
7687 #include <assert.h>
7688 /* Override any gcc2 internal prototype to avoid an error.  */
7689 #ifdef __cplusplus
7690 extern "C"
7691 #endif
7692 /* We use char because int might match the return type of a gcc2
7693    builtin and then its argument prototype would still apply.  */
7694 char $ac_func ();
7695 char (*f) ();
7696
7697 int
7698 main ()
7699 {
7700 /* The GNU C library defines this for functions which it implements
7701     to always fail with ENOSYS.  Some functions are actually named
7702     something starting with __ and the normal name is an alias.  */
7703 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7704 choke me
7705 #else
7706 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7707 #endif
7708
7709   ;
7710   return 0;
7711 }
7712 _ACEOF
7713 rm -f conftest.$ac_objext conftest$ac_exeext
7714 if { (eval echo "$as_me:7714: \"$ac_link\"") >&5
7715   (eval $ac_link) 2>&5
7716   ac_status=$?
7717   echo "$as_me:7717: \$? = $ac_status" >&5
7718   (exit $ac_status); } &&
7719          { ac_try='test -s conftest$ac_exeext'
7720   { (eval echo "$as_me:7720: \"$ac_try\"") >&5
7721   (eval $ac_try) 2>&5
7722   ac_status=$?
7723   echo "$as_me:7723: \$? = $ac_status" >&5
7724   (exit $ac_status); }; }; then
7725   eval "$as_ac_var=yes"
7726 else
7727   echo "$as_me: failed program was:" >&5
7728 cat conftest.$ac_ext >&5
7729 eval "$as_ac_var=no"
7730 fi
7731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7732 fi
7733 echo "$as_me:7733: result: `eval echo '${'$as_ac_var'}'`" >&5
7734 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7735 if test `eval echo '${'$as_ac_var'}'` = yes; then
7736   cat >>confdefs.h <<EOF
7737 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7738 EOF
7739
7740 fi
7741 done
7742
7743 if test "$cross_compiling" = yes ; then
7744
7745 for ac_func in \
7746                 link \
7747                 symlink
7748 do
7749 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7750 echo "$as_me:7750: checking for $ac_func" >&5
7751 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7752 if eval "test \"\${$as_ac_var+set}\" = set"; then
7753   echo $ECHO_N "(cached) $ECHO_C" >&6
7754 else
7755   cat >conftest.$ac_ext <<_ACEOF
7756 #line 7756 "configure"
7757 #include "confdefs.h"
7758 /* System header to define __stub macros and hopefully few prototypes,
7759     which can conflict with char $ac_func (); below.  */
7760 #include <assert.h>
7761 /* Override any gcc2 internal prototype to avoid an error.  */
7762 #ifdef __cplusplus
7763 extern "C"
7764 #endif
7765 /* We use char because int might match the return type of a gcc2
7766    builtin and then its argument prototype would still apply.  */
7767 char $ac_func ();
7768 char (*f) ();
7769
7770 int
7771 main ()
7772 {
7773 /* The GNU C library defines this for functions which it implements
7774     to always fail with ENOSYS.  Some functions are actually named
7775     something starting with __ and the normal name is an alias.  */
7776 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7777 choke me
7778 #else
7779 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7780 #endif
7781
7782   ;
7783   return 0;
7784 }
7785 _ACEOF
7786 rm -f conftest.$ac_objext conftest$ac_exeext
7787 if { (eval echo "$as_me:7787: \"$ac_link\"") >&5
7788   (eval $ac_link) 2>&5
7789   ac_status=$?
7790   echo "$as_me:7790: \$? = $ac_status" >&5
7791   (exit $ac_status); } &&
7792          { ac_try='test -s conftest$ac_exeext'
7793   { (eval echo "$as_me:7793: \"$ac_try\"") >&5
7794   (eval $ac_try) 2>&5
7795   ac_status=$?
7796   echo "$as_me:7796: \$? = $ac_status" >&5
7797   (exit $ac_status); }; }; then
7798   eval "$as_ac_var=yes"
7799 else
7800   echo "$as_me: failed program was:" >&5
7801 cat conftest.$ac_ext >&5
7802 eval "$as_ac_var=no"
7803 fi
7804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7805 fi
7806 echo "$as_me:7806: result: `eval echo '${'$as_ac_var'}'`" >&5
7807 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7808 if test `eval echo '${'$as_ac_var'}'` = yes; then
7809   cat >>confdefs.h <<EOF
7810 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7811 EOF
7812
7813 fi
7814 done
7815
7816 else
7817         echo "$as_me:7817: checking if link/symlink functions work" >&5
7818 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7819 if test "${cf_cv_link_funcs+set}" = set; then
7820   echo $ECHO_N "(cached) $ECHO_C" >&6
7821 else
7822
7823                 cf_cv_link_funcs=
7824                 for cf_func in link symlink ; do
7825                         if test "$cross_compiling" = yes; then
7826
7827                         eval 'ac_cv_func_'$cf_func'=error'
7828 else
7829   cat >conftest.$ac_ext <<_ACEOF
7830 #line 7830 "configure"
7831 #include "confdefs.h"
7832
7833 #include <sys/types.h>
7834 #include <sys/stat.h>
7835 #ifdef HAVE_UNISTD_H
7836 #include <unistd.h>
7837 #endif
7838 int main(void)
7839 {
7840         int fail = 0;
7841         char *src = "config.log";
7842         char *dst = "conftest.chk";
7843         struct stat src_sb;
7844         struct stat dst_sb;
7845
7846         stat(src, &src_sb);
7847         fail = ($cf_func("config.log", "conftest.chk") < 0)
7848             || (stat(dst, &dst_sb) < 0)
7849             || (dst_sb.st_mtime != src_sb.st_mtime);
7850 #ifdef HAVE_UNLINK
7851         unlink(dst);
7852 #else
7853         remove(dst);
7854 #endif
7855         ${cf_cv_main_return:-return} (fail);
7856 }
7857
7858 _ACEOF
7859 rm -f conftest$ac_exeext
7860 if { (eval echo "$as_me:7860: \"$ac_link\"") >&5
7861   (eval $ac_link) 2>&5
7862   ac_status=$?
7863   echo "$as_me:7863: \$? = $ac_status" >&5
7864   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7865   { (eval echo "$as_me:7865: \"$ac_try\"") >&5
7866   (eval $ac_try) 2>&5
7867   ac_status=$?
7868   echo "$as_me:7868: \$? = $ac_status" >&5
7869   (exit $ac_status); }; }; then
7870
7871                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7872                         eval 'ac_cv_func_'$cf_func'=yes'
7873 else
7874   echo "$as_me: program exited with status $ac_status" >&5
7875 echo "$as_me: failed program was:" >&5
7876 cat conftest.$ac_ext >&5
7877
7878                         eval 'ac_cv_func_'$cf_func'=no'
7879 fi
7880 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7881 fi
7882                 done
7883                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7884
7885 fi
7886 echo "$as_me:7886: result: $cf_cv_link_funcs" >&5
7887 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7888         test "$ac_cv_func_link"    = yes &&
7889 cat >>confdefs.h <<\EOF
7890 #define HAVE_LINK 1
7891 EOF
7892
7893         test "$ac_cv_func_symlink" = yes &&
7894 cat >>confdefs.h <<\EOF
7895 #define HAVE_SYMLINK 1
7896 EOF
7897
7898 fi
7899
7900 with_links=no
7901 with_symlinks=no
7902
7903 # soft links (symbolic links) are useful for some systems where hard links do
7904 # not work, or to make it simpler to copy terminfo trees around.
7905 if test "x$ac_cv_func_symlink" = xyes ; then
7906         echo "$as_me:7906: checking if tic should use symbolic links" >&5
7907 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7908
7909 # Check whether --enable-symlinks or --disable-symlinks was given.
7910 if test "${enable_symlinks+set}" = set; then
7911   enableval="$enable_symlinks"
7912   with_symlinks=$enableval
7913 else
7914   with_symlinks=no
7915 fi;
7916         echo "$as_me:7916: result: $with_symlinks" >&5
7917 echo "${ECHO_T}$with_symlinks" >&6
7918 fi
7919
7920 # If we have hard links and did not choose to use soft links instead, there is
7921 # no reason to make this choice optional - use the hard links.
7922 if test "$with_symlinks" = no ; then
7923         echo "$as_me:7923: checking if tic should use hard links" >&5
7924 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7925         if test "x$ac_cv_func_link" = xyes ; then
7926                 with_links=yes
7927         else
7928                 with_links=no
7929         fi
7930         echo "$as_me:7930: result: $with_links" >&5
7931 echo "${ECHO_T}$with_links" >&6
7932 fi
7933
7934 test "x$with_links" = xyes &&
7935 cat >>confdefs.h <<\EOF
7936 #define USE_LINKS 1
7937 EOF
7938
7939 test "x$with_symlinks" = xyes &&
7940 cat >>confdefs.h <<\EOF
7941 #define USE_SYMLINKS 1
7942 EOF
7943
7944 ###   use option --enable-broken-linker to force on use of broken-linker support
7945 echo "$as_me:7945: checking if you want broken-linker support code" >&5
7946 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7947
7948 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7949 if test "${enable_broken_linker+set}" = set; then
7950   enableval="$enable_broken_linker"
7951   with_broken_linker=$enableval
7952 else
7953   with_broken_linker=${BROKEN_LINKER:-no}
7954 fi;
7955 echo "$as_me:7955: result: $with_broken_linker" >&5
7956 echo "${ECHO_T}$with_broken_linker" >&6
7957
7958 BROKEN_LINKER=0
7959 if test "x$with_broken_linker" = xyes ; then
7960
7961 cat >>confdefs.h <<\EOF
7962 #define BROKEN_LINKER 1
7963 EOF
7964
7965         BROKEN_LINKER=1
7966 elif test "$DFT_LWR_MODEL" = shared ; then
7967         case $cf_cv_system_name in
7968         (cygwin*)
7969
7970 cat >>confdefs.h <<\EOF
7971 #define BROKEN_LINKER 1
7972 EOF
7973
7974                 BROKEN_LINKER=1
7975                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7976
7977 echo "${as_me:-configure}:7977: testing cygwin linker is broken anyway ..." 1>&5
7978
7979                 ;;
7980         esac
7981 fi
7982
7983 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7984 echo "$as_me:7984: checking if tputs should process BSD-style prefix padding" >&5
7985 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7986
7987 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7988 if test "${enable_bsdpad+set}" = set; then
7989   enableval="$enable_bsdpad"
7990   with_bsdpad=$enableval
7991 else
7992   with_bsdpad=no
7993 fi;
7994 echo "$as_me:7994: result: $with_bsdpad" >&5
7995 echo "${ECHO_T}$with_bsdpad" >&6
7996 test "x$with_bsdpad" = xyes &&
7997 cat >>confdefs.h <<\EOF
7998 #define BSD_TPUTS 1
7999 EOF
8000
8001 ###   use option --enable-widec to turn on use of wide-character support
8002 NCURSES_CH_T=chtype
8003 NCURSES_LIBUTF8=0
8004
8005 NEED_WCHAR_H=0
8006 NCURSES_MBSTATE_T=0
8007 NCURSES_WCHAR_T=0
8008 NCURSES_WINT_T=0
8009
8010 # Check to define _XOPEN_SOURCE "automatically"
8011 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8012
8013 cf_XOPEN_SOURCE=500
8014 cf_POSIX_C_SOURCE=199506L
8015 cf_xopen_source=
8016
8017 case $host_os in
8018 (aix[4-7]*)
8019         cf_xopen_source="-D_ALL_SOURCE"
8020         ;;
8021 (msys)
8022         cf_XOPEN_SOURCE=600
8023         ;;
8024 (darwin[0-8].*)
8025         cf_xopen_source="-D_APPLE_C_SOURCE"
8026         ;;
8027 (darwin*)
8028         cf_xopen_source="-D_DARWIN_C_SOURCE"
8029         cf_XOPEN_SOURCE=
8030         ;;
8031 (freebsd*|dragonfly*)
8032         # 5.x headers associate
8033         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8034         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8035         cf_POSIX_C_SOURCE=200112L
8036         cf_XOPEN_SOURCE=600
8037         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8038         ;;
8039 (hpux11*)
8040         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8041         ;;
8042 (hpux*)
8043         cf_xopen_source="-D_HPUX_SOURCE"
8044         ;;
8045 (irix[56].*)
8046         cf_xopen_source="-D_SGI_SOURCE"
8047         cf_XOPEN_SOURCE=
8048         ;;
8049 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8050
8051 echo "$as_me:8051: checking if we must define _GNU_SOURCE" >&5
8052 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8053 if test "${cf_cv_gnu_source+set}" = set; then
8054   echo $ECHO_N "(cached) $ECHO_C" >&6
8055 else
8056
8057 cat >conftest.$ac_ext <<_ACEOF
8058 #line 8058 "configure"
8059 #include "confdefs.h"
8060 #include <sys/types.h>
8061 int
8062 main ()
8063 {
8064
8065 #ifndef _XOPEN_SOURCE
8066 make an error
8067 #endif
8068   ;
8069   return 0;
8070 }
8071 _ACEOF
8072 rm -f conftest.$ac_objext
8073 if { (eval echo "$as_me:8073: \"$ac_compile\"") >&5
8074   (eval $ac_compile) 2>&5
8075   ac_status=$?
8076   echo "$as_me:8076: \$? = $ac_status" >&5
8077   (exit $ac_status); } &&
8078          { ac_try='test -s conftest.$ac_objext'
8079   { (eval echo "$as_me:8079: \"$ac_try\"") >&5
8080   (eval $ac_try) 2>&5
8081   ac_status=$?
8082   echo "$as_me:8082: \$? = $ac_status" >&5
8083   (exit $ac_status); }; }; then
8084   cf_cv_gnu_source=no
8085 else
8086   echo "$as_me: failed program was:" >&5
8087 cat conftest.$ac_ext >&5
8088 cf_save="$CPPFLAGS"
8089          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8090          cat >conftest.$ac_ext <<_ACEOF
8091 #line 8091 "configure"
8092 #include "confdefs.h"
8093 #include <sys/types.h>
8094 int
8095 main ()
8096 {
8097
8098 #ifdef _XOPEN_SOURCE
8099 make an error
8100 #endif
8101   ;
8102   return 0;
8103 }
8104 _ACEOF
8105 rm -f conftest.$ac_objext
8106 if { (eval echo "$as_me:8106: \"$ac_compile\"") >&5
8107   (eval $ac_compile) 2>&5
8108   ac_status=$?
8109   echo "$as_me:8109: \$? = $ac_status" >&5
8110   (exit $ac_status); } &&
8111          { ac_try='test -s conftest.$ac_objext'
8112   { (eval echo "$as_me:8112: \"$ac_try\"") >&5
8113   (eval $ac_try) 2>&5
8114   ac_status=$?
8115   echo "$as_me:8115: \$? = $ac_status" >&5
8116   (exit $ac_status); }; }; then
8117   cf_cv_gnu_source=no
8118 else
8119   echo "$as_me: failed program was:" >&5
8120 cat conftest.$ac_ext >&5
8121 cf_cv_gnu_source=yes
8122 fi
8123 rm -f conftest.$ac_objext conftest.$ac_ext
8124         CPPFLAGS="$cf_save"
8125
8126 fi
8127 rm -f conftest.$ac_objext conftest.$ac_ext
8128
8129 fi
8130 echo "$as_me:8130: result: $cf_cv_gnu_source" >&5
8131 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8132
8133 if test "$cf_cv_gnu_source" = yes
8134 then
8135 echo "$as_me:8135: checking if we should also define _DEFAULT_SOURCE" >&5
8136 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8137 if test "${cf_cv_default_source+set}" = set; then
8138   echo $ECHO_N "(cached) $ECHO_C" >&6
8139 else
8140
8141 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8142         cat >conftest.$ac_ext <<_ACEOF
8143 #line 8143 "configure"
8144 #include "confdefs.h"
8145 #include <sys/types.h>
8146 int
8147 main ()
8148 {
8149
8150 #ifdef _DEFAULT_SOURCE
8151 make an error
8152 #endif
8153   ;
8154   return 0;
8155 }
8156 _ACEOF
8157 rm -f conftest.$ac_objext
8158 if { (eval echo "$as_me:8158: \"$ac_compile\"") >&5
8159   (eval $ac_compile) 2>&5
8160   ac_status=$?
8161   echo "$as_me:8161: \$? = $ac_status" >&5
8162   (exit $ac_status); } &&
8163          { ac_try='test -s conftest.$ac_objext'
8164   { (eval echo "$as_me:8164: \"$ac_try\"") >&5
8165   (eval $ac_try) 2>&5
8166   ac_status=$?
8167   echo "$as_me:8167: \$? = $ac_status" >&5
8168   (exit $ac_status); }; }; then
8169   cf_cv_default_source=no
8170 else
8171   echo "$as_me: failed program was:" >&5
8172 cat conftest.$ac_ext >&5
8173 cf_cv_default_source=yes
8174 fi
8175 rm -f conftest.$ac_objext conftest.$ac_ext
8176
8177 fi
8178 echo "$as_me:8178: result: $cf_cv_default_source" >&5
8179 echo "${ECHO_T}$cf_cv_default_source" >&6
8180 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8181 fi
8182
8183         ;;
8184 (minix*)
8185         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8186         ;;
8187 (mirbsd*)
8188         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8189         cf_XOPEN_SOURCE=
8190
8191 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8192
8193 cf_save_CFLAGS="$CFLAGS"
8194 cf_save_CPPFLAGS="$CPPFLAGS"
8195
8196 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8197         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8198                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8199
8200 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8201         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8202                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8203
8204 echo "$as_me:8204: checking if we should define _POSIX_C_SOURCE" >&5
8205 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8206 if test "${cf_cv_posix_c_source+set}" = set; then
8207   echo $ECHO_N "(cached) $ECHO_C" >&6
8208 else
8209
8210 echo "${as_me:-configure}:8210: testing if the symbol is already defined go no further ..." 1>&5
8211
8212         cat >conftest.$ac_ext <<_ACEOF
8213 #line 8213 "configure"
8214 #include "confdefs.h"
8215 #include <sys/types.h>
8216 int
8217 main ()
8218 {
8219
8220 #ifndef _POSIX_C_SOURCE
8221 make an error
8222 #endif
8223   ;
8224   return 0;
8225 }
8226 _ACEOF
8227 rm -f conftest.$ac_objext
8228 if { (eval echo "$as_me:8228: \"$ac_compile\"") >&5
8229   (eval $ac_compile) 2>&5
8230   ac_status=$?
8231   echo "$as_me:8231: \$? = $ac_status" >&5
8232   (exit $ac_status); } &&
8233          { ac_try='test -s conftest.$ac_objext'
8234   { (eval echo "$as_me:8234: \"$ac_try\"") >&5
8235   (eval $ac_try) 2>&5
8236   ac_status=$?
8237   echo "$as_me:8237: \$? = $ac_status" >&5
8238   (exit $ac_status); }; }; then
8239   cf_cv_posix_c_source=no
8240 else
8241   echo "$as_me: failed program was:" >&5
8242 cat conftest.$ac_ext >&5
8243 cf_want_posix_source=no
8244          case .$cf_POSIX_C_SOURCE in
8245          (.[12]??*)
8246                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8247                 ;;
8248          (.2)
8249                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8250                 cf_want_posix_source=yes
8251                 ;;
8252          (.*)
8253                 cf_want_posix_source=yes
8254                 ;;
8255          esac
8256          if test "$cf_want_posix_source" = yes ; then
8257                 cat >conftest.$ac_ext <<_ACEOF
8258 #line 8258 "configure"
8259 #include "confdefs.h"
8260 #include <sys/types.h>
8261 int
8262 main ()
8263 {
8264
8265 #ifdef _POSIX_SOURCE
8266 make an error
8267 #endif
8268   ;
8269   return 0;
8270 }
8271 _ACEOF
8272 rm -f conftest.$ac_objext
8273 if { (eval echo "$as_me:8273: \"$ac_compile\"") >&5
8274   (eval $ac_compile) 2>&5
8275   ac_status=$?
8276   echo "$as_me:8276: \$? = $ac_status" >&5
8277   (exit $ac_status); } &&
8278          { ac_try='test -s conftest.$ac_objext'
8279   { (eval echo "$as_me:8279: \"$ac_try\"") >&5
8280   (eval $ac_try) 2>&5
8281   ac_status=$?
8282   echo "$as_me:8282: \$? = $ac_status" >&5
8283   (exit $ac_status); }; }; then
8284   :
8285 else
8286   echo "$as_me: failed program was:" >&5
8287 cat conftest.$ac_ext >&5
8288 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8289 fi
8290 rm -f conftest.$ac_objext conftest.$ac_ext
8291          fi
8292
8293 echo "${as_me:-configure}:8293: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8294
8295          CFLAGS="$cf_trim_CFLAGS"
8296          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8297
8298 echo "${as_me:-configure}:8298: testing if the second compile does not leave our definition intact error ..." 1>&5
8299
8300          cat >conftest.$ac_ext <<_ACEOF
8301 #line 8301 "configure"
8302 #include "confdefs.h"
8303 #include <sys/types.h>
8304 int
8305 main ()
8306 {
8307
8308 #ifndef _POSIX_C_SOURCE
8309 make an error
8310 #endif
8311   ;
8312   return 0;
8313 }
8314 _ACEOF
8315 rm -f conftest.$ac_objext
8316 if { (eval echo "$as_me:8316: \"$ac_compile\"") >&5
8317   (eval $ac_compile) 2>&5
8318   ac_status=$?
8319   echo "$as_me:8319: \$? = $ac_status" >&5
8320   (exit $ac_status); } &&
8321          { ac_try='test -s conftest.$ac_objext'
8322   { (eval echo "$as_me:8322: \"$ac_try\"") >&5
8323   (eval $ac_try) 2>&5
8324   ac_status=$?
8325   echo "$as_me:8325: \$? = $ac_status" >&5
8326   (exit $ac_status); }; }; then
8327   :
8328 else
8329   echo "$as_me: failed program was:" >&5
8330 cat conftest.$ac_ext >&5
8331 cf_cv_posix_c_source=no
8332 fi
8333 rm -f conftest.$ac_objext conftest.$ac_ext
8334          CFLAGS="$cf_save_CFLAGS"
8335          CPPFLAGS="$cf_save_CPPFLAGS"
8336
8337 fi
8338 rm -f conftest.$ac_objext conftest.$ac_ext
8339
8340 fi
8341 echo "$as_me:8341: result: $cf_cv_posix_c_source" >&5
8342 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8343
8344 if test "$cf_cv_posix_c_source" != no ; then
8345         CFLAGS="$cf_trim_CFLAGS"
8346         CPPFLAGS="$cf_trim_CPPFLAGS"
8347
8348 cf_fix_cppflags=no
8349 cf_new_cflags=
8350 cf_new_cppflags=
8351 cf_new_extra_cppflags=
8352
8353 for cf_add_cflags in $cf_cv_posix_c_source
8354 do
8355 case $cf_fix_cppflags in
8356 (no)
8357         case $cf_add_cflags in
8358         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8359                 case $cf_add_cflags in
8360                 (-D*)
8361                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8362
8363                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8364                                 && test -z "${cf_tst_cflags}" \
8365                                 && cf_fix_cppflags=yes
8366
8367                         if test $cf_fix_cppflags = yes ; then
8368
8369         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8370         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8371
8372                                 continue
8373                         elif test "${cf_tst_cflags}" = "\"'" ; then
8374
8375         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8376         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8377
8378                                 continue
8379                         fi
8380                         ;;
8381                 esac
8382                 case "$CPPFLAGS" in
8383                 (*$cf_add_cflags)
8384                         ;;
8385                 (*)
8386                         case $cf_add_cflags in
8387                         (-D*)
8388                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8389
8390 CPPFLAGS=`echo "$CPPFLAGS" | \
8391         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8392                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8393
8394                                 ;;
8395                         esac
8396
8397         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8398         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8399
8400                         ;;
8401                 esac
8402                 ;;
8403         (*)
8404
8405         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8406         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8407
8408                 ;;
8409         esac
8410         ;;
8411 (yes)
8412
8413         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8414         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8415
8416         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8417
8418         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8419                 && test -z "${cf_tst_cflags}" \
8420                 && cf_fix_cppflags=no
8421         ;;
8422 esac
8423 done
8424
8425 if test -n "$cf_new_cflags" ; then
8426
8427         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8428         CFLAGS="${CFLAGS}$cf_new_cflags"
8429
8430 fi
8431
8432 if test -n "$cf_new_cppflags" ; then
8433
8434         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8435         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8436
8437 fi
8438
8439 if test -n "$cf_new_extra_cppflags" ; then
8440
8441         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8442         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8443
8444 fi
8445
8446 fi
8447
8448         ;;
8449 (netbsd*)
8450         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8451         ;;
8452 (openbsd[4-9]*)
8453         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8454         cf_xopen_source="-D_BSD_SOURCE"
8455         cf_XOPEN_SOURCE=600
8456         ;;
8457 (openbsd*)
8458         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8459         ;;
8460 (osf[45]*)
8461         cf_xopen_source="-D_OSF_SOURCE"
8462         ;;
8463 (nto-qnx*)
8464         cf_xopen_source="-D_QNX_SOURCE"
8465         ;;
8466 (sco*)
8467         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8468         ;;
8469 (solaris2.*)
8470         cf_xopen_source="-D__EXTENSIONS__"
8471         cf_cv_xopen_source=broken
8472         ;;
8473 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8474         cf_XOPEN_SOURCE=
8475         cf_POSIX_C_SOURCE=
8476         ;;
8477 (*)
8478
8479 echo "$as_me:8479: checking if we should define _XOPEN_SOURCE" >&5
8480 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8481 if test "${cf_cv_xopen_source+set}" = set; then
8482   echo $ECHO_N "(cached) $ECHO_C" >&6
8483 else
8484
8485         cat >conftest.$ac_ext <<_ACEOF
8486 #line 8486 "configure"
8487 #include "confdefs.h"
8488
8489 #include <stdlib.h>
8490 #include <string.h>
8491 #include <sys/types.h>
8492
8493 int
8494 main ()
8495 {
8496
8497 #ifndef _XOPEN_SOURCE
8498 make an error
8499 #endif
8500   ;
8501   return 0;
8502 }
8503 _ACEOF
8504 rm -f conftest.$ac_objext
8505 if { (eval echo "$as_me:8505: \"$ac_compile\"") >&5
8506   (eval $ac_compile) 2>&5
8507   ac_status=$?
8508   echo "$as_me:8508: \$? = $ac_status" >&5
8509   (exit $ac_status); } &&
8510          { ac_try='test -s conftest.$ac_objext'
8511   { (eval echo "$as_me:8511: \"$ac_try\"") >&5
8512   (eval $ac_try) 2>&5
8513   ac_status=$?
8514   echo "$as_me:8514: \$? = $ac_status" >&5
8515   (exit $ac_status); }; }; then
8516   cf_cv_xopen_source=no
8517 else
8518   echo "$as_me: failed program was:" >&5
8519 cat conftest.$ac_ext >&5
8520 cf_save="$CPPFLAGS"
8521          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8522          cat >conftest.$ac_ext <<_ACEOF
8523 #line 8523 "configure"
8524 #include "confdefs.h"
8525
8526 #include <stdlib.h>
8527 #include <string.h>
8528 #include <sys/types.h>
8529
8530 int
8531 main ()
8532 {
8533
8534 #ifdef _XOPEN_SOURCE
8535 make an error
8536 #endif
8537   ;
8538   return 0;
8539 }
8540 _ACEOF
8541 rm -f conftest.$ac_objext
8542 if { (eval echo "$as_me:8542: \"$ac_compile\"") >&5
8543   (eval $ac_compile) 2>&5
8544   ac_status=$?
8545   echo "$as_me:8545: \$? = $ac_status" >&5
8546   (exit $ac_status); } &&
8547          { ac_try='test -s conftest.$ac_objext'
8548   { (eval echo "$as_me:8548: \"$ac_try\"") >&5
8549   (eval $ac_try) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); }; }; then
8553   cf_cv_xopen_source=no
8554 else
8555   echo "$as_me: failed program was:" >&5
8556 cat conftest.$ac_ext >&5
8557 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8558 fi
8559 rm -f conftest.$ac_objext conftest.$ac_ext
8560         CPPFLAGS="$cf_save"
8561
8562 fi
8563 rm -f conftest.$ac_objext conftest.$ac_ext
8564
8565 fi
8566 echo "$as_me:8566: result: $cf_cv_xopen_source" >&5
8567 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8568
8569 if test "$cf_cv_xopen_source" != no ; then
8570
8571 CFLAGS=`echo "$CFLAGS" | \
8572         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8573                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8574
8575 CPPFLAGS=`echo "$CPPFLAGS" | \
8576         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8577                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8578
8579         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8580
8581 cf_fix_cppflags=no
8582 cf_new_cflags=
8583 cf_new_cppflags=
8584 cf_new_extra_cppflags=
8585
8586 for cf_add_cflags in $cf_temp_xopen_source
8587 do
8588 case $cf_fix_cppflags in
8589 (no)
8590         case $cf_add_cflags in
8591         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8592                 case $cf_add_cflags in
8593                 (-D*)
8594                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8595
8596                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8597                                 && test -z "${cf_tst_cflags}" \
8598                                 && cf_fix_cppflags=yes
8599
8600                         if test $cf_fix_cppflags = yes ; then
8601
8602         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8603         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8604
8605                                 continue
8606                         elif test "${cf_tst_cflags}" = "\"'" ; then
8607
8608         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8609         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8610
8611                                 continue
8612                         fi
8613                         ;;
8614                 esac
8615                 case "$CPPFLAGS" in
8616                 (*$cf_add_cflags)
8617                         ;;
8618                 (*)
8619                         case $cf_add_cflags in
8620                         (-D*)
8621                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8622
8623 CPPFLAGS=`echo "$CPPFLAGS" | \
8624         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8625                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8626
8627                                 ;;
8628                         esac
8629
8630         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8631         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8632
8633                         ;;
8634                 esac
8635                 ;;
8636         (*)
8637
8638         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8639         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8640
8641                 ;;
8642         esac
8643         ;;
8644 (yes)
8645
8646         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8647         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8648
8649         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8650
8651         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8652                 && test -z "${cf_tst_cflags}" \
8653                 && cf_fix_cppflags=no
8654         ;;
8655 esac
8656 done
8657
8658 if test -n "$cf_new_cflags" ; then
8659
8660         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8661         CFLAGS="${CFLAGS}$cf_new_cflags"
8662
8663 fi
8664
8665 if test -n "$cf_new_cppflags" ; then
8666
8667         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8668         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8669
8670 fi
8671
8672 if test -n "$cf_new_extra_cppflags" ; then
8673
8674         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8675         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8676
8677 fi
8678
8679 fi
8680
8681 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8682
8683 cf_save_CFLAGS="$CFLAGS"
8684 cf_save_CPPFLAGS="$CPPFLAGS"
8685
8686 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8687         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8688                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8689
8690 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8691         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8692                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8693
8694 echo "$as_me:8694: checking if we should define _POSIX_C_SOURCE" >&5
8695 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8696 if test "${cf_cv_posix_c_source+set}" = set; then
8697   echo $ECHO_N "(cached) $ECHO_C" >&6
8698 else
8699
8700 echo "${as_me:-configure}:8700: testing if the symbol is already defined go no further ..." 1>&5
8701
8702         cat >conftest.$ac_ext <<_ACEOF
8703 #line 8703 "configure"
8704 #include "confdefs.h"
8705 #include <sys/types.h>
8706 int
8707 main ()
8708 {
8709
8710 #ifndef _POSIX_C_SOURCE
8711 make an error
8712 #endif
8713   ;
8714   return 0;
8715 }
8716 _ACEOF
8717 rm -f conftest.$ac_objext
8718 if { (eval echo "$as_me:8718: \"$ac_compile\"") >&5
8719   (eval $ac_compile) 2>&5
8720   ac_status=$?
8721   echo "$as_me:8721: \$? = $ac_status" >&5
8722   (exit $ac_status); } &&
8723          { ac_try='test -s conftest.$ac_objext'
8724   { (eval echo "$as_me:8724: \"$ac_try\"") >&5
8725   (eval $ac_try) 2>&5
8726   ac_status=$?
8727   echo "$as_me:8727: \$? = $ac_status" >&5
8728   (exit $ac_status); }; }; then
8729   cf_cv_posix_c_source=no
8730 else
8731   echo "$as_me: failed program was:" >&5
8732 cat conftest.$ac_ext >&5
8733 cf_want_posix_source=no
8734          case .$cf_POSIX_C_SOURCE in
8735          (.[12]??*)
8736                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8737                 ;;
8738          (.2)
8739                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8740                 cf_want_posix_source=yes
8741                 ;;
8742          (.*)
8743                 cf_want_posix_source=yes
8744                 ;;
8745          esac
8746          if test "$cf_want_posix_source" = yes ; then
8747                 cat >conftest.$ac_ext <<_ACEOF
8748 #line 8748 "configure"
8749 #include "confdefs.h"
8750 #include <sys/types.h>
8751 int
8752 main ()
8753 {
8754
8755 #ifdef _POSIX_SOURCE
8756 make an error
8757 #endif
8758   ;
8759   return 0;
8760 }
8761 _ACEOF
8762 rm -f conftest.$ac_objext
8763 if { (eval echo "$as_me:8763: \"$ac_compile\"") >&5
8764   (eval $ac_compile) 2>&5
8765   ac_status=$?
8766   echo "$as_me:8766: \$? = $ac_status" >&5
8767   (exit $ac_status); } &&
8768          { ac_try='test -s conftest.$ac_objext'
8769   { (eval echo "$as_me:8769: \"$ac_try\"") >&5
8770   (eval $ac_try) 2>&5
8771   ac_status=$?
8772   echo "$as_me:8772: \$? = $ac_status" >&5
8773   (exit $ac_status); }; }; then
8774   :
8775 else
8776   echo "$as_me: failed program was:" >&5
8777 cat conftest.$ac_ext >&5
8778 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8779 fi
8780 rm -f conftest.$ac_objext conftest.$ac_ext
8781          fi
8782
8783 echo "${as_me:-configure}:8783: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8784
8785          CFLAGS="$cf_trim_CFLAGS"
8786          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8787
8788 echo "${as_me:-configure}:8788: testing if the second compile does not leave our definition intact error ..." 1>&5
8789
8790          cat >conftest.$ac_ext <<_ACEOF
8791 #line 8791 "configure"
8792 #include "confdefs.h"
8793 #include <sys/types.h>
8794 int
8795 main ()
8796 {
8797
8798 #ifndef _POSIX_C_SOURCE
8799 make an error
8800 #endif
8801   ;
8802   return 0;
8803 }
8804 _ACEOF
8805 rm -f conftest.$ac_objext
8806 if { (eval echo "$as_me:8806: \"$ac_compile\"") >&5
8807   (eval $ac_compile) 2>&5
8808   ac_status=$?
8809   echo "$as_me:8809: \$? = $ac_status" >&5
8810   (exit $ac_status); } &&
8811          { ac_try='test -s conftest.$ac_objext'
8812   { (eval echo "$as_me:8812: \"$ac_try\"") >&5
8813   (eval $ac_try) 2>&5
8814   ac_status=$?
8815   echo "$as_me:8815: \$? = $ac_status" >&5
8816   (exit $ac_status); }; }; then
8817   :
8818 else
8819   echo "$as_me: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8821 cf_cv_posix_c_source=no
8822 fi
8823 rm -f conftest.$ac_objext conftest.$ac_ext
8824          CFLAGS="$cf_save_CFLAGS"
8825          CPPFLAGS="$cf_save_CPPFLAGS"
8826
8827 fi
8828 rm -f conftest.$ac_objext conftest.$ac_ext
8829
8830 fi
8831 echo "$as_me:8831: result: $cf_cv_posix_c_source" >&5
8832 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8833
8834 if test "$cf_cv_posix_c_source" != no ; then
8835         CFLAGS="$cf_trim_CFLAGS"
8836         CPPFLAGS="$cf_trim_CPPFLAGS"
8837
8838 cf_fix_cppflags=no
8839 cf_new_cflags=
8840 cf_new_cppflags=
8841 cf_new_extra_cppflags=
8842
8843 for cf_add_cflags in $cf_cv_posix_c_source
8844 do
8845 case $cf_fix_cppflags in
8846 (no)
8847         case $cf_add_cflags in
8848         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8849                 case $cf_add_cflags in
8850                 (-D*)
8851                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8852
8853                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8854                                 && test -z "${cf_tst_cflags}" \
8855                                 && cf_fix_cppflags=yes
8856
8857                         if test $cf_fix_cppflags = yes ; then
8858
8859         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8860         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8861
8862                                 continue
8863                         elif test "${cf_tst_cflags}" = "\"'" ; then
8864
8865         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8866         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8867
8868                                 continue
8869                         fi
8870                         ;;
8871                 esac
8872                 case "$CPPFLAGS" in
8873                 (*$cf_add_cflags)
8874                         ;;
8875                 (*)
8876                         case $cf_add_cflags in
8877                         (-D*)
8878                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8879
8880 CPPFLAGS=`echo "$CPPFLAGS" | \
8881         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8882                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8883
8884                                 ;;
8885                         esac
8886
8887         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8888         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8889
8890                         ;;
8891                 esac
8892                 ;;
8893         (*)
8894
8895         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8896         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8897
8898                 ;;
8899         esac
8900         ;;
8901 (yes)
8902
8903         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8904         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8905
8906         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8907
8908         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8909                 && test -z "${cf_tst_cflags}" \
8910                 && cf_fix_cppflags=no
8911         ;;
8912 esac
8913 done
8914
8915 if test -n "$cf_new_cflags" ; then
8916
8917         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8918         CFLAGS="${CFLAGS}$cf_new_cflags"
8919
8920 fi
8921
8922 if test -n "$cf_new_cppflags" ; then
8923
8924         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8925         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8926
8927 fi
8928
8929 if test -n "$cf_new_extra_cppflags" ; then
8930
8931         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8932         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8933
8934 fi
8935
8936 fi
8937
8938         ;;
8939 esac
8940
8941 if test -n "$cf_xopen_source" ; then
8942
8943 cf_fix_cppflags=no
8944 cf_new_cflags=
8945 cf_new_cppflags=
8946 cf_new_extra_cppflags=
8947
8948 for cf_add_cflags in $cf_xopen_source
8949 do
8950 case $cf_fix_cppflags in
8951 (no)
8952         case $cf_add_cflags in
8953         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8954                 case $cf_add_cflags in
8955                 (-D*)
8956                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8957
8958                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8959                                 && test -z "${cf_tst_cflags}" \
8960                                 && cf_fix_cppflags=yes
8961
8962                         if test $cf_fix_cppflags = yes ; then
8963
8964         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8965         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8966
8967                                 continue
8968                         elif test "${cf_tst_cflags}" = "\"'" ; then
8969
8970         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8971         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8972
8973                                 continue
8974                         fi
8975                         ;;
8976                 esac
8977                 case "$CPPFLAGS" in
8978                 (*$cf_add_cflags)
8979                         ;;
8980                 (*)
8981                         case $cf_add_cflags in
8982                         (-D*)
8983                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8984
8985 CPPFLAGS=`echo "$CPPFLAGS" | \
8986         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8987                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8988
8989                                 ;;
8990                         esac
8991
8992         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8993         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8994
8995                         ;;
8996                 esac
8997                 ;;
8998         (*)
8999
9000         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9001         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9002
9003                 ;;
9004         esac
9005         ;;
9006 (yes)
9007
9008         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9009         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9010
9011         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9012
9013         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9014                 && test -z "${cf_tst_cflags}" \
9015                 && cf_fix_cppflags=no
9016         ;;
9017 esac
9018 done
9019
9020 if test -n "$cf_new_cflags" ; then
9021         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9022
9023 echo "${as_me:-configure}:9023: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9024
9025         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9026         CFLAGS="${CFLAGS}$cf_new_cflags"
9027
9028 fi
9029
9030 if test -n "$cf_new_cppflags" ; then
9031         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9032
9033 echo "${as_me:-configure}:9033: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9034
9035         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9036         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9037
9038 fi
9039
9040 if test -n "$cf_new_extra_cppflags" ; then
9041         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9042
9043 echo "${as_me:-configure}:9043: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9044
9045         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9046         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9047
9048 fi
9049
9050 fi
9051
9052 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9053         echo "$as_me:9053: checking if _XOPEN_SOURCE really is set" >&5
9054 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9055         cat >conftest.$ac_ext <<_ACEOF
9056 #line 9056 "configure"
9057 #include "confdefs.h"
9058 #include <stdlib.h>
9059 int
9060 main ()
9061 {
9062
9063 #ifndef _XOPEN_SOURCE
9064 make an error
9065 #endif
9066   ;
9067   return 0;
9068 }
9069 _ACEOF
9070 rm -f conftest.$ac_objext
9071 if { (eval echo "$as_me:9071: \"$ac_compile\"") >&5
9072   (eval $ac_compile) 2>&5
9073   ac_status=$?
9074   echo "$as_me:9074: \$? = $ac_status" >&5
9075   (exit $ac_status); } &&
9076          { ac_try='test -s conftest.$ac_objext'
9077   { (eval echo "$as_me:9077: \"$ac_try\"") >&5
9078   (eval $ac_try) 2>&5
9079   ac_status=$?
9080   echo "$as_me:9080: \$? = $ac_status" >&5
9081   (exit $ac_status); }; }; then
9082   cf_XOPEN_SOURCE_set=yes
9083 else
9084   echo "$as_me: failed program was:" >&5
9085 cat conftest.$ac_ext >&5
9086 cf_XOPEN_SOURCE_set=no
9087 fi
9088 rm -f conftest.$ac_objext conftest.$ac_ext
9089         echo "$as_me:9089: result: $cf_XOPEN_SOURCE_set" >&5
9090 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9091         if test $cf_XOPEN_SOURCE_set = yes
9092         then
9093                 cat >conftest.$ac_ext <<_ACEOF
9094 #line 9094 "configure"
9095 #include "confdefs.h"
9096 #include <stdlib.h>
9097 int
9098 main ()
9099 {
9100
9101 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9102 make an error
9103 #endif
9104   ;
9105   return 0;
9106 }
9107 _ACEOF
9108 rm -f conftest.$ac_objext
9109 if { (eval echo "$as_me:9109: \"$ac_compile\"") >&5
9110   (eval $ac_compile) 2>&5
9111   ac_status=$?
9112   echo "$as_me:9112: \$? = $ac_status" >&5
9113   (exit $ac_status); } &&
9114          { ac_try='test -s conftest.$ac_objext'
9115   { (eval echo "$as_me:9115: \"$ac_try\"") >&5
9116   (eval $ac_try) 2>&5
9117   ac_status=$?
9118   echo "$as_me:9118: \$? = $ac_status" >&5
9119   (exit $ac_status); }; }; then
9120   cf_XOPEN_SOURCE_set_ok=yes
9121 else
9122   echo "$as_me: failed program was:" >&5
9123 cat conftest.$ac_ext >&5
9124 cf_XOPEN_SOURCE_set_ok=no
9125 fi
9126 rm -f conftest.$ac_objext conftest.$ac_ext
9127                 if test $cf_XOPEN_SOURCE_set_ok = no
9128                 then
9129                         { echo "$as_me:9129: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9130 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9131                 fi
9132         else
9133
9134 echo "$as_me:9134: checking if we should define _XOPEN_SOURCE" >&5
9135 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9136 if test "${cf_cv_xopen_source+set}" = set; then
9137   echo $ECHO_N "(cached) $ECHO_C" >&6
9138 else
9139
9140         cat >conftest.$ac_ext <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9143
9144 #include <stdlib.h>
9145 #include <string.h>
9146 #include <sys/types.h>
9147
9148 int
9149 main ()
9150 {
9151
9152 #ifndef _XOPEN_SOURCE
9153 make an error
9154 #endif
9155   ;
9156   return 0;
9157 }
9158 _ACEOF
9159 rm -f conftest.$ac_objext
9160 if { (eval echo "$as_me:9160: \"$ac_compile\"") >&5
9161   (eval $ac_compile) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit $ac_status); } &&
9165          { ac_try='test -s conftest.$ac_objext'
9166   { (eval echo "$as_me:9166: \"$ac_try\"") >&5
9167   (eval $ac_try) 2>&5
9168   ac_status=$?
9169   echo "$as_me:9169: \$? = $ac_status" >&5
9170   (exit $ac_status); }; }; then
9171   cf_cv_xopen_source=no
9172 else
9173   echo "$as_me: failed program was:" >&5
9174 cat conftest.$ac_ext >&5
9175 cf_save="$CPPFLAGS"
9176          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9177          cat >conftest.$ac_ext <<_ACEOF
9178 #line 9178 "configure"
9179 #include "confdefs.h"
9180
9181 #include <stdlib.h>
9182 #include <string.h>
9183 #include <sys/types.h>
9184
9185 int
9186 main ()
9187 {
9188
9189 #ifdef _XOPEN_SOURCE
9190 make an error
9191 #endif
9192   ;
9193   return 0;
9194 }
9195 _ACEOF
9196 rm -f conftest.$ac_objext
9197 if { (eval echo "$as_me:9197: \"$ac_compile\"") >&5
9198   (eval $ac_compile) 2>&5
9199   ac_status=$?
9200   echo "$as_me:9200: \$? = $ac_status" >&5
9201   (exit $ac_status); } &&
9202          { ac_try='test -s conftest.$ac_objext'
9203   { (eval echo "$as_me:9203: \"$ac_try\"") >&5
9204   (eval $ac_try) 2>&5
9205   ac_status=$?
9206   echo "$as_me:9206: \$? = $ac_status" >&5
9207   (exit $ac_status); }; }; then
9208   cf_cv_xopen_source=no
9209 else
9210   echo "$as_me: failed program was:" >&5
9211 cat conftest.$ac_ext >&5
9212 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9213 fi
9214 rm -f conftest.$ac_objext conftest.$ac_ext
9215         CPPFLAGS="$cf_save"
9216
9217 fi
9218 rm -f conftest.$ac_objext conftest.$ac_ext
9219
9220 fi
9221 echo "$as_me:9221: result: $cf_cv_xopen_source" >&5
9222 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9223
9224 if test "$cf_cv_xopen_source" != no ; then
9225
9226 CFLAGS=`echo "$CFLAGS" | \
9227         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9228                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9229
9230 CPPFLAGS=`echo "$CPPFLAGS" | \
9231         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9232                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9233
9234         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9235
9236 cf_fix_cppflags=no
9237 cf_new_cflags=
9238 cf_new_cppflags=
9239 cf_new_extra_cppflags=
9240
9241 for cf_add_cflags in $cf_temp_xopen_source
9242 do
9243 case $cf_fix_cppflags in
9244 (no)
9245         case $cf_add_cflags in
9246         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9247                 case $cf_add_cflags in
9248                 (-D*)
9249                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9250
9251                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9252                                 && test -z "${cf_tst_cflags}" \
9253                                 && cf_fix_cppflags=yes
9254
9255                         if test $cf_fix_cppflags = yes ; then
9256
9257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9259
9260                                 continue
9261                         elif test "${cf_tst_cflags}" = "\"'" ; then
9262
9263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9265
9266                                 continue
9267                         fi
9268                         ;;
9269                 esac
9270                 case "$CPPFLAGS" in
9271                 (*$cf_add_cflags)
9272                         ;;
9273                 (*)
9274                         case $cf_add_cflags in
9275                         (-D*)
9276                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9277
9278 CPPFLAGS=`echo "$CPPFLAGS" | \
9279         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9280                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9281
9282                                 ;;
9283                         esac
9284
9285         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9286         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9287
9288                         ;;
9289                 esac
9290                 ;;
9291         (*)
9292
9293         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9294         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9295
9296                 ;;
9297         esac
9298         ;;
9299 (yes)
9300
9301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9303
9304         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9305
9306         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9307                 && test -z "${cf_tst_cflags}" \
9308                 && cf_fix_cppflags=no
9309         ;;
9310 esac
9311 done
9312
9313 if test -n "$cf_new_cflags" ; then
9314
9315         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9316         CFLAGS="${CFLAGS}$cf_new_cflags"
9317
9318 fi
9319
9320 if test -n "$cf_new_cppflags" ; then
9321
9322         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9323         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9324
9325 fi
9326
9327 if test -n "$cf_new_extra_cppflags" ; then
9328
9329         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9330         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9331
9332 fi
9333
9334 fi
9335
9336         fi
9337 fi
9338
9339 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9340
9341 # Work around breakage on OS X
9342
9343 echo "$as_me:9343: checking if SIGWINCH is defined" >&5
9344 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9345 if test "${cf_cv_define_sigwinch+set}" = set; then
9346   echo $ECHO_N "(cached) $ECHO_C" >&6
9347 else
9348
9349         cat >conftest.$ac_ext <<_ACEOF
9350 #line 9350 "configure"
9351 #include "confdefs.h"
9352
9353 #include <sys/types.h>
9354 #include <sys/signal.h>
9355
9356 int
9357 main ()
9358 {
9359 int x = SIGWINCH
9360   ;
9361   return 0;
9362 }
9363 _ACEOF
9364 rm -f conftest.$ac_objext
9365 if { (eval echo "$as_me:9365: \"$ac_compile\"") >&5
9366   (eval $ac_compile) 2>&5
9367   ac_status=$?
9368   echo "$as_me:9368: \$? = $ac_status" >&5
9369   (exit $ac_status); } &&
9370          { ac_try='test -s conftest.$ac_objext'
9371   { (eval echo "$as_me:9371: \"$ac_try\"") >&5
9372   (eval $ac_try) 2>&5
9373   ac_status=$?
9374   echo "$as_me:9374: \$? = $ac_status" >&5
9375   (exit $ac_status); }; }; then
9376   cf_cv_define_sigwinch=yes
9377 else
9378   echo "$as_me: failed program was:" >&5
9379 cat conftest.$ac_ext >&5
9380 cat >conftest.$ac_ext <<_ACEOF
9381 #line 9381 "configure"
9382 #include "confdefs.h"
9383
9384 #undef _XOPEN_SOURCE
9385 #undef _POSIX_SOURCE
9386 #undef _POSIX_C_SOURCE
9387 #include <sys/types.h>
9388 #include <sys/signal.h>
9389
9390 int
9391 main ()
9392 {
9393 int x = SIGWINCH
9394   ;
9395   return 0;
9396 }
9397 _ACEOF
9398 rm -f conftest.$ac_objext
9399 if { (eval echo "$as_me:9399: \"$ac_compile\"") >&5
9400   (eval $ac_compile) 2>&5
9401   ac_status=$?
9402   echo "$as_me:9402: \$? = $ac_status" >&5
9403   (exit $ac_status); } &&
9404          { ac_try='test -s conftest.$ac_objext'
9405   { (eval echo "$as_me:9405: \"$ac_try\"") >&5
9406   (eval $ac_try) 2>&5
9407   ac_status=$?
9408   echo "$as_me:9408: \$? = $ac_status" >&5
9409   (exit $ac_status); }; }; then
9410   cf_cv_define_sigwinch=maybe
9411 else
9412   echo "$as_me: failed program was:" >&5
9413 cat conftest.$ac_ext >&5
9414 cf_cv_define_sigwinch=no
9415 fi
9416 rm -f conftest.$ac_objext conftest.$ac_ext
9417
9418 fi
9419 rm -f conftest.$ac_objext conftest.$ac_ext
9420
9421 fi
9422 echo "$as_me:9422: result: $cf_cv_define_sigwinch" >&5
9423 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9424
9425 if test "$cf_cv_define_sigwinch" = maybe ; then
9426 echo "$as_me:9426: checking for actual SIGWINCH definition" >&5
9427 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9428 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9429   echo $ECHO_N "(cached) $ECHO_C" >&6
9430 else
9431
9432 cf_cv_fixup_sigwinch=unknown
9433 cf_sigwinch=32
9434 while test $cf_sigwinch != 1
9435 do
9436         cat >conftest.$ac_ext <<_ACEOF
9437 #line 9437 "configure"
9438 #include "confdefs.h"
9439
9440 #undef _XOPEN_SOURCE
9441 #undef _POSIX_SOURCE
9442 #undef _POSIX_C_SOURCE
9443 #include <sys/types.h>
9444 #include <sys/signal.h>
9445
9446 int
9447 main ()
9448 {
9449
9450 #if SIGWINCH != $cf_sigwinch
9451 make an error
9452 #endif
9453 int x = SIGWINCH
9454   ;
9455   return 0;
9456 }
9457 _ACEOF
9458 rm -f conftest.$ac_objext
9459 if { (eval echo "$as_me:9459: \"$ac_compile\"") >&5
9460   (eval $ac_compile) 2>&5
9461   ac_status=$?
9462   echo "$as_me:9462: \$? = $ac_status" >&5
9463   (exit $ac_status); } &&
9464          { ac_try='test -s conftest.$ac_objext'
9465   { (eval echo "$as_me:9465: \"$ac_try\"") >&5
9466   (eval $ac_try) 2>&5
9467   ac_status=$?
9468   echo "$as_me:9468: \$? = $ac_status" >&5
9469   (exit $ac_status); }; }; then
9470   cf_cv_fixup_sigwinch=$cf_sigwinch
9471          break
9472 else
9473   echo "$as_me: failed program was:" >&5
9474 cat conftest.$ac_ext >&5
9475 fi
9476 rm -f conftest.$ac_objext conftest.$ac_ext
9477
9478 cf_sigwinch=`expr $cf_sigwinch - 1`
9479 done
9480
9481 fi
9482 echo "$as_me:9482: result: $cf_cv_fixup_sigwinch" >&5
9483 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9484
9485         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9486                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9487         fi
9488 fi
9489
9490 # Checks for CODESET support.
9491
9492 echo "$as_me:9492: checking for nl_langinfo and CODESET" >&5
9493 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9494 if test "${am_cv_langinfo_codeset+set}" = set; then
9495   echo $ECHO_N "(cached) $ECHO_C" >&6
9496 else
9497   cat >conftest.$ac_ext <<_ACEOF
9498 #line 9498 "configure"
9499 #include "confdefs.h"
9500 #include <langinfo.h>
9501 int
9502 main ()
9503 {
9504 char* cs = nl_langinfo(CODESET);
9505   ;
9506   return 0;
9507 }
9508 _ACEOF
9509 rm -f conftest.$ac_objext conftest$ac_exeext
9510 if { (eval echo "$as_me:9510: \"$ac_link\"") >&5
9511   (eval $ac_link) 2>&5
9512   ac_status=$?
9513   echo "$as_me:9513: \$? = $ac_status" >&5
9514   (exit $ac_status); } &&
9515          { ac_try='test -s conftest$ac_exeext'
9516   { (eval echo "$as_me:9516: \"$ac_try\"") >&5
9517   (eval $ac_try) 2>&5
9518   ac_status=$?
9519   echo "$as_me:9519: \$? = $ac_status" >&5
9520   (exit $ac_status); }; }; then
9521   am_cv_langinfo_codeset=yes
9522 else
9523   echo "$as_me: failed program was:" >&5
9524 cat conftest.$ac_ext >&5
9525 am_cv_langinfo_codeset=no
9526 fi
9527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9528
9529 fi
9530 echo "$as_me:9530: result: $am_cv_langinfo_codeset" >&5
9531 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9532         if test $am_cv_langinfo_codeset = yes; then
9533
9534 cat >>confdefs.h <<\EOF
9535 #define HAVE_LANGINFO_CODESET 1
9536 EOF
9537
9538         fi
9539
9540 # use these variables to work around a defect in gcc's fixincludes.
9541 NCURSES_OK_WCHAR_T=
9542 NCURSES_OK_WINT_T=
9543
9544 echo "$as_me:9544: checking if you want wide-character code" >&5
9545 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9546
9547 # Check whether --enable-widec or --disable-widec was given.
9548 if test "${enable_widec+set}" = set; then
9549   enableval="$enable_widec"
9550   with_widec=$enableval
9551 else
9552   with_widec=no
9553 fi;
9554 echo "$as_me:9554: result: $with_widec" >&5
9555 echo "${ECHO_T}$with_widec" >&6
9556
9557 NCURSES_WCWIDTH_GRAPHICS=1
9558
9559 if test "x$with_widec" = xyes ; then
9560         if test "x$disable_lib_suffixes" = xno ; then
9561                 LIB_SUFFIX="w${LIB_SUFFIX}"
9562         fi
9563
9564 cat >>confdefs.h <<\EOF
9565 #define USE_WIDEC_SUPPORT 1
9566 EOF
9567
9568 cat >>confdefs.h <<\EOF
9569 #define NCURSES_WIDECHAR 1
9570 EOF
9571
9572 for ac_header in \
9573 wchar.h \
9574 wctype.h \
9575
9576 do
9577 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9578 echo "$as_me:9578: checking for $ac_header" >&5
9579 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9580 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9581   echo $ECHO_N "(cached) $ECHO_C" >&6
9582 else
9583   cat >conftest.$ac_ext <<_ACEOF
9584 #line 9584 "configure"
9585 #include "confdefs.h"
9586 #include <$ac_header>
9587 _ACEOF
9588 if { (eval echo "$as_me:9588: \"$ac_cpp conftest.$ac_ext\"") >&5
9589   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9590   ac_status=$?
9591   egrep -v '^ *\+' conftest.er1 >conftest.err
9592   rm -f conftest.er1
9593   cat conftest.err >&5
9594   echo "$as_me:9594: \$? = $ac_status" >&5
9595   (exit $ac_status); } >/dev/null; then
9596   if test -s conftest.err; then
9597     ac_cpp_err=$ac_c_preproc_warn_flag
9598   else
9599     ac_cpp_err=
9600   fi
9601 else
9602   ac_cpp_err=yes
9603 fi
9604 if test -z "$ac_cpp_err"; then
9605   eval "$as_ac_Header=yes"
9606 else
9607   echo "$as_me: failed program was:" >&5
9608   cat conftest.$ac_ext >&5
9609   eval "$as_ac_Header=no"
9610 fi
9611 rm -f conftest.err conftest.$ac_ext
9612 fi
9613 echo "$as_me:9613: result: `eval echo '${'$as_ac_Header'}'`" >&5
9614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9616   cat >>confdefs.h <<EOF
9617 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9618 EOF
9619
9620 fi
9621 done
9622
9623 echo "$as_me:9623: checking if wchar.h can be used as is" >&5
9624 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9625 if test "${cf_cv_wchar_h_okay+set}" = set; then
9626   echo $ECHO_N "(cached) $ECHO_C" >&6
9627 else
9628
9629 cat >conftest.$ac_ext <<_ACEOF
9630 #line 9630 "configure"
9631 #include "confdefs.h"
9632
9633 #include <stdlib.h>
9634 #ifdef HAVE_WCHAR_H
9635 #include <wchar.h>
9636 #endif
9637 #ifdef HAVE_WCTYPE_H
9638 #include <wctype.h>
9639 #endif
9640
9641 int
9642 main ()
9643 {
9644
9645         wint_t foo = 0;
9646         int bar = iswpunct(foo)
9647   ;
9648   return 0;
9649 }
9650 _ACEOF
9651 rm -f conftest.$ac_objext
9652 if { (eval echo "$as_me:9652: \"$ac_compile\"") >&5
9653   (eval $ac_compile) 2>&5
9654   ac_status=$?
9655   echo "$as_me:9655: \$? = $ac_status" >&5
9656   (exit $ac_status); } &&
9657          { ac_try='test -s conftest.$ac_objext'
9658   { (eval echo "$as_me:9658: \"$ac_try\"") >&5
9659   (eval $ac_try) 2>&5
9660   ac_status=$?
9661   echo "$as_me:9661: \$? = $ac_status" >&5
9662   (exit $ac_status); }; }; then
9663   cf_cv_wchar_h_okay=yes
9664 else
9665   echo "$as_me: failed program was:" >&5
9666 cat conftest.$ac_ext >&5
9667 cf_cv_wchar_h_okay=no
9668 fi
9669 rm -f conftest.$ac_objext conftest.$ac_ext
9670 fi
9671 echo "$as_me:9671: result: $cf_cv_wchar_h_okay" >&5
9672 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9673
9674 if test $cf_cv_wchar_h_okay = no
9675 then
9676
9677 echo "$as_me:9677: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9678 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9679 cat >conftest.$ac_ext <<_ACEOF
9680 #line 9680 "configure"
9681 #include "confdefs.h"
9682 #include <sys/types.h>
9683
9684 int
9685 main ()
9686 {
9687
9688 #ifndef _XOPEN_SOURCE_EXTENDED
9689 make an error
9690 #endif
9691   ;
9692   return 0;
9693 }
9694 _ACEOF
9695 rm -f conftest.$ac_objext
9696 if { (eval echo "$as_me:9696: \"$ac_compile\"") >&5
9697   (eval $ac_compile) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); } &&
9701          { ac_try='test -s conftest.$ac_objext'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit $ac_status); }; }; then
9707   cf_result=no
9708 else
9709   echo "$as_me: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9711 cf_result=yes
9712 fi
9713 rm -f conftest.$ac_objext conftest.$ac_ext
9714 echo "$as_me:9714: result: $cf_result" >&5
9715 echo "${ECHO_T}$cf_result" >&6
9716
9717 if test "$cf_result" = yes ; then
9718         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9719 elif test "x" != "x" ; then
9720         echo "$as_me:9720: checking checking for compatible value versus " >&5
9721 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9722         cat >conftest.$ac_ext <<_ACEOF
9723 #line 9723 "configure"
9724 #include "confdefs.h"
9725 #include <sys/types.h>
9726
9727 int
9728 main ()
9729 {
9730
9731 #if _XOPEN_SOURCE_EXTENDED- < 0
9732 make an error
9733 #endif
9734   ;
9735   return 0;
9736 }
9737 _ACEOF
9738 rm -f conftest.$ac_objext
9739 if { (eval echo "$as_me:9739: \"$ac_compile\"") >&5
9740   (eval $ac_compile) 2>&5
9741   ac_status=$?
9742   echo "$as_me:9742: \$? = $ac_status" >&5
9743   (exit $ac_status); } &&
9744          { ac_try='test -s conftest.$ac_objext'
9745   { (eval echo "$as_me:9745: \"$ac_try\"") >&5
9746   (eval $ac_try) 2>&5
9747   ac_status=$?
9748   echo "$as_me:9748: \$? = $ac_status" >&5
9749   (exit $ac_status); }; }; then
9750   cf_result=yes
9751 else
9752   echo "$as_me: failed program was:" >&5
9753 cat conftest.$ac_ext >&5
9754 cf_result=no
9755 fi
9756 rm -f conftest.$ac_objext conftest.$ac_ext
9757         echo "$as_me:9757: result: $cf_result" >&5
9758 echo "${ECHO_T}$cf_result" >&6
9759         if test "$cf_result" = no ; then
9760                 # perhaps we can override it - try...
9761                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9762         fi
9763 fi
9764
9765 fi
9766
9767 echo "$as_me:9767: checking if wcwidth agrees graphics are single-width" >&5
9768 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9769 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9770   echo $ECHO_N "(cached) $ECHO_C" >&6
9771 else
9772
9773 cat >conftest.in <<CF_EOF
9774 -       VT100 symbols
9775 0x250c  upper left corner
9776 0x2514  lower left corner
9777 0x2510  upper right corner
9778 0x2518  lower right corner
9779 0x251c  tee pointing left
9780 0x2524  tee pointing right
9781 0x2534  tee pointing up
9782 0x252c  tee pointing down
9783 0x2500  horizontal line
9784 0x2502  vertical line
9785 0x253c  large plus or crossover
9786 0x23ba  scan line 1
9787 0x23bd  scan line 9
9788 0x25c6  diamond
9789 0x2592  checker board (stipple)
9790 0x00b0  degree symbol
9791 0x00b1  plus/minus
9792 0x00b7  bullet
9793 -       Teletype 5410v1 symbols
9794 0x2190  arrow pointing left
9795 0x2192  arrow pointing right
9796 0x2193  arrow pointing down
9797 0x2191  arrow pointing up
9798 0x2592  board of squares
9799 0x2603  lantern symbol
9800 0x25ae  solid square block
9801 -       these defaults were invented for ncurses
9802 0x23bb  scan line 3
9803 0x23bc  scan line 7
9804 0x2264  less-than-or-equal-to
9805 0x2265  greater-than-or-equal-to
9806 0x03c0  greek pi
9807 0x2260  not-equal
9808 0x00a3  pound-sterling symbol
9809 -       thick-line-drawing
9810 0x250f  upper left corner
9811 0x2517  lower left corner
9812 0x2513  upper right corner
9813 0x251b  lower right corner
9814 0x2523  tee pointing left
9815 0x252b  tee pointing right
9816 0x253b  tee pointing up
9817 0x2533  tee pointing down
9818 0x2501  horizontal line
9819 0x2503  vertical line
9820 0x254b  large plus or crossover
9821 -       double-line-drawing
9822 0x2554  upper left corner
9823 0x255a  lower left corner
9824 0x2557  upper right corner
9825 0x255d  lower right corner
9826 0x2563  tee pointing left
9827 0x2560  tee pointing right
9828 0x2569  tee pointing up
9829 0x2566  tee pointing down
9830 0x2550  horizontal line
9831 0x2551  vertical line
9832 0x256c  large plus or crossover
9833 CF_EOF
9834 if test "$cross_compiling" = yes; then
9835   cf_cv_wcwidth_graphics=unknown
9836 else
9837   cat >conftest.$ac_ext <<_ACEOF
9838 #line 9838 "configure"
9839 #include "confdefs.h"
9840
9841 #include <locale.h>
9842 #include <stdio.h>
9843 #include <wchar.h>
9844
9845 #define MY_LEN 80
9846
9847 int
9848 main(void)
9849 {
9850         FILE *fp;
9851         int value;
9852         char buffer[MY_LEN + 1];
9853         char notes[MY_LEN + 1];
9854         int totals = 0;
9855         int passed = 0;
9856
9857         if (setlocale(LC_ALL, "en_US.UTF8") ||
9858                 setlocale(LC_ALL, "en_US.UTF-8") ||
9859                 setlocale(LC_ALL, "en_US.utf8") ||
9860                 setlocale(LC_ALL, "en_US.utf-8")) {
9861                 if ((fp = fopen("conftest.in", "r")) != 0) {
9862                         while (fgets(buffer, MY_LEN, fp) != 0) {
9863                                 if (*buffer == '-') {
9864                                         fprintf(stderr, "\t%s", buffer);
9865                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9866                                         ++totals;
9867                                         if (wcwidth(value) == 1)
9868                                                 ++passed;
9869                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9870                                 } else {
9871                                         fprintf(stderr, "?\t%s", buffer);
9872                                 }
9873                         }
9874                 }
9875         }
9876         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9877         return (totals == passed) ? 0 : 1;
9878 }
9879
9880 _ACEOF
9881 rm -f conftest$ac_exeext
9882 if { (eval echo "$as_me:9882: \"$ac_link\"") >&5
9883   (eval $ac_link) 2>&5
9884   ac_status=$?
9885   echo "$as_me:9885: \$? = $ac_status" >&5
9886   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9887   { (eval echo "$as_me:9887: \"$ac_try\"") >&5
9888   (eval $ac_try) 2>&5
9889   ac_status=$?
9890   echo "$as_me:9890: \$? = $ac_status" >&5
9891   (exit $ac_status); }; }; then
9892   cf_cv_wcwidth_graphics=yes
9893 else
9894   echo "$as_me: program exited with status $ac_status" >&5
9895 echo "$as_me: failed program was:" >&5
9896 cat conftest.$ac_ext >&5
9897 cf_cv_wcwidth_graphics=no
9898 fi
9899 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9900 fi
9901
9902 fi
9903 echo "$as_me:9903: result: $cf_cv_wcwidth_graphics" >&5
9904 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9905
9906         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9907
9908         # with_overwrite=no
9909         NCURSES_CH_T=cchar_t
9910
9911 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9912 do
9913 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9914 echo "$as_me:9914: checking for $ac_func" >&5
9915 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9916 if eval "test \"\${$as_ac_var+set}\" = set"; then
9917   echo $ECHO_N "(cached) $ECHO_C" >&6
9918 else
9919   cat >conftest.$ac_ext <<_ACEOF
9920 #line 9920 "configure"
9921 #include "confdefs.h"
9922 /* System header to define __stub macros and hopefully few prototypes,
9923     which can conflict with char $ac_func (); below.  */
9924 #include <assert.h>
9925 /* Override any gcc2 internal prototype to avoid an error.  */
9926 #ifdef __cplusplus
9927 extern "C"
9928 #endif
9929 /* We use char because int might match the return type of a gcc2
9930    builtin and then its argument prototype would still apply.  */
9931 char $ac_func ();
9932 char (*f) ();
9933
9934 int
9935 main ()
9936 {
9937 /* The GNU C library defines this for functions which it implements
9938     to always fail with ENOSYS.  Some functions are actually named
9939     something starting with __ and the normal name is an alias.  */
9940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9941 choke me
9942 #else
9943 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9944 #endif
9945
9946   ;
9947   return 0;
9948 }
9949 _ACEOF
9950 rm -f conftest.$ac_objext conftest$ac_exeext
9951 if { (eval echo "$as_me:9951: \"$ac_link\"") >&5
9952   (eval $ac_link) 2>&5
9953   ac_status=$?
9954   echo "$as_me:9954: \$? = $ac_status" >&5
9955   (exit $ac_status); } &&
9956          { ac_try='test -s conftest$ac_exeext'
9957   { (eval echo "$as_me:9957: \"$ac_try\"") >&5
9958   (eval $ac_try) 2>&5
9959   ac_status=$?
9960   echo "$as_me:9960: \$? = $ac_status" >&5
9961   (exit $ac_status); }; }; then
9962   eval "$as_ac_var=yes"
9963 else
9964   echo "$as_me: failed program was:" >&5
9965 cat conftest.$ac_ext >&5
9966 eval "$as_ac_var=no"
9967 fi
9968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9969 fi
9970 echo "$as_me:9970: result: `eval echo '${'$as_ac_var'}'`" >&5
9971 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9972 if test `eval echo '${'$as_ac_var'}'` = yes; then
9973   cat >>confdefs.h <<EOF
9974 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9975 EOF
9976
9977 fi
9978 done
9979
9980         if test "x$ac_cv_func_putwc" != xyes ; then
9981
9982 echo "$as_me:9982: checking for multibyte character support" >&5
9983 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9984 if test "${cf_cv_utf8_lib+set}" = set; then
9985   echo $ECHO_N "(cached) $ECHO_C" >&6
9986 else
9987
9988         cf_save_LIBS="$LIBS"
9989         cat >conftest.$ac_ext <<_ACEOF
9990 #line 9990 "configure"
9991 #include "confdefs.h"
9992
9993 #include <stdlib.h>
9994 int
9995 main ()
9996 {
9997 putwc(0,0);
9998   ;
9999   return 0;
10000 }
10001 _ACEOF
10002 rm -f conftest.$ac_objext conftest$ac_exeext
10003 if { (eval echo "$as_me:10003: \"$ac_link\"") >&5
10004   (eval $ac_link) 2>&5
10005   ac_status=$?
10006   echo "$as_me:10006: \$? = $ac_status" >&5
10007   (exit $ac_status); } &&
10008          { ac_try='test -s conftest$ac_exeext'
10009   { (eval echo "$as_me:10009: \"$ac_try\"") >&5
10010   (eval $ac_try) 2>&5
10011   ac_status=$?
10012   echo "$as_me:10012: \$? = $ac_status" >&5
10013   (exit $ac_status); }; }; then
10014   cf_cv_utf8_lib=yes
10015 else
10016   echo "$as_me: failed program was:" >&5
10017 cat conftest.$ac_ext >&5
10018
10019 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10020 # will be set on completion of the AC_TRY_LINK below.
10021 cf_cv_header_path_utf8=
10022 cf_cv_library_path_utf8=
10023
10024 echo "${as_me:-configure}:10024: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10025
10026 cf_save_LIBS="$LIBS"
10027
10028 cat >conftest.$ac_ext <<_ACEOF
10029 #line 10029 "configure"
10030 #include "confdefs.h"
10031
10032 #include <libutf8.h>
10033 int
10034 main ()
10035 {
10036 putwc(0,0);
10037   ;
10038   return 0;
10039 }
10040 _ACEOF
10041 rm -f conftest.$ac_objext conftest$ac_exeext
10042 if { (eval echo "$as_me:10042: \"$ac_link\"") >&5
10043   (eval $ac_link) 2>&5
10044   ac_status=$?
10045   echo "$as_me:10045: \$? = $ac_status" >&5
10046   (exit $ac_status); } &&
10047          { ac_try='test -s conftest$ac_exeext'
10048   { (eval echo "$as_me:10048: \"$ac_try\"") >&5
10049   (eval $ac_try) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit $ac_status); }; }; then
10053
10054         cf_cv_find_linkage_utf8=yes
10055         cf_cv_header_path_utf8=/usr/include
10056         cf_cv_library_path_utf8=/usr/lib
10057
10058 else
10059   echo "$as_me: failed program was:" >&5
10060 cat conftest.$ac_ext >&5
10061
10062 LIBS="-lutf8  $cf_save_LIBS"
10063
10064 cat >conftest.$ac_ext <<_ACEOF
10065 #line 10065 "configure"
10066 #include "confdefs.h"
10067
10068 #include <libutf8.h>
10069 int
10070 main ()
10071 {
10072 putwc(0,0);
10073   ;
10074   return 0;
10075 }
10076 _ACEOF
10077 rm -f conftest.$ac_objext conftest$ac_exeext
10078 if { (eval echo "$as_me:10078: \"$ac_link\"") >&5
10079   (eval $ac_link) 2>&5
10080   ac_status=$?
10081   echo "$as_me:10081: \$? = $ac_status" >&5
10082   (exit $ac_status); } &&
10083          { ac_try='test -s conftest$ac_exeext'
10084   { (eval echo "$as_me:10084: \"$ac_try\"") >&5
10085   (eval $ac_try) 2>&5
10086   ac_status=$?
10087   echo "$as_me:10087: \$? = $ac_status" >&5
10088   (exit $ac_status); }; }; then
10089
10090         cf_cv_find_linkage_utf8=yes
10091         cf_cv_header_path_utf8=/usr/include
10092         cf_cv_library_path_utf8=/usr/lib
10093         cf_cv_library_file_utf8="-lutf8"
10094
10095 else
10096   echo "$as_me: failed program was:" >&5
10097 cat conftest.$ac_ext >&5
10098
10099         cf_cv_find_linkage_utf8=no
10100         LIBS="$cf_save_LIBS"
10101
10102         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10103
10104 echo "${as_me:-configure}:10104: testing find linkage for utf8 library ..." 1>&5
10105
10106 echo "${as_me:-configure}:10106: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10107
10108         cf_save_CPPFLAGS="$CPPFLAGS"
10109         cf_test_CPPFLAGS="$CPPFLAGS"
10110
10111 cf_search=
10112
10113 # collect the current set of include-directories from compiler flags
10114 cf_header_path_list=""
10115 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10116         for cf_header_path in $CPPFLAGS $CFLAGS
10117         do
10118                 case $cf_header_path in
10119                 (-I*)
10120                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10121
10122 test "x$cf_header_path" != "xNONE" && \
10123 test -d "$cf_header_path" && \
10124  {
10125         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10126         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10127         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10128         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10129         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10130         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10131 }
10132
10133                         cf_header_path_list="$cf_header_path_list $cf_search"
10134                         ;;
10135                 esac
10136         done
10137 fi
10138
10139 # add the variations for the package we are looking for
10140
10141 cf_search=
10142
10143 test "x$prefix" != "xNONE" && \
10144 test -d "$prefix" && \
10145  {
10146         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10147         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10148         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10149         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10150         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10151         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10152 }
10153
10154 for cf_subdir_prefix in \
10155         /usr \
10156         /usr/local \
10157         /usr/pkg \
10158         /opt \
10159         /opt/local \
10160         $HOME
10161 do
10162
10163 test "x$cf_subdir_prefix" != "x$prefix" && \
10164 test -d "$cf_subdir_prefix" && \
10165 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10166         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10167         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10168         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10169         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10170         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10171         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10172 }
10173
10174 done
10175
10176 test "$includedir" != NONE && \
10177 test "$includedir" != "/usr/include" && \
10178 test -d "$includedir" && {
10179         test -d $includedir &&    cf_search="$cf_search $includedir"
10180         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10181 }
10182
10183 test "$oldincludedir" != NONE && \
10184 test "$oldincludedir" != "/usr/include" && \
10185 test -d "$oldincludedir" && {
10186         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10187         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10188 }
10189
10190 cf_search="$cf_search $cf_header_path_list"
10191
10192         for cf_cv_header_path_utf8 in $cf_search
10193         do
10194                 if test -d $cf_cv_header_path_utf8 ; then
10195                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10196
10197 echo "${as_me:-configure}:10197: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10198
10199                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10200                         cat >conftest.$ac_ext <<_ACEOF
10201 #line 10201 "configure"
10202 #include "confdefs.h"
10203
10204 #include <libutf8.h>
10205 int
10206 main ()
10207 {
10208 putwc(0,0);
10209   ;
10210   return 0;
10211 }
10212 _ACEOF
10213 rm -f conftest.$ac_objext
10214 if { (eval echo "$as_me:10214: \"$ac_compile\"") >&5
10215   (eval $ac_compile) 2>&5
10216   ac_status=$?
10217   echo "$as_me:10217: \$? = $ac_status" >&5
10218   (exit $ac_status); } &&
10219          { ac_try='test -s conftest.$ac_objext'
10220   { (eval echo "$as_me:10220: \"$ac_try\"") >&5
10221   (eval $ac_try) 2>&5
10222   ac_status=$?
10223   echo "$as_me:10223: \$? = $ac_status" >&5
10224   (exit $ac_status); }; }; then
10225
10226                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10227
10228 echo "${as_me:-configure}:10228: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10229
10230                                 cf_cv_find_linkage_utf8=maybe
10231                                 cf_test_CPPFLAGS="$CPPFLAGS"
10232                                 break
10233 else
10234   echo "$as_me: failed program was:" >&5
10235 cat conftest.$ac_ext >&5
10236
10237                                 CPPFLAGS="$cf_save_CPPFLAGS"
10238
10239 fi
10240 rm -f conftest.$ac_objext conftest.$ac_ext
10241                 fi
10242         done
10243
10244         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10245
10246 echo "${as_me:-configure}:10246: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10247
10248                 cf_save_LIBS="$LIBS"
10249                 cf_save_LDFLAGS="$LDFLAGS"
10250
10251                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10252
10253 cf_search=
10254 cf_library_path_list=""
10255 if test -n "${LDFLAGS}${LIBS}" ; then
10256         for cf_library_path in $LDFLAGS $LIBS
10257         do
10258                 case $cf_library_path in
10259                 (-L*)
10260                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10261
10262 test "x$cf_library_path" != "xNONE" && \
10263 test -d "$cf_library_path" && \
10264  {
10265         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10266         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10267         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10268         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10269         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10270         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10271 }
10272
10273                         cf_library_path_list="$cf_library_path_list $cf_search"
10274                         ;;
10275                 esac
10276         done
10277 fi
10278
10279 cf_search=
10280
10281 test "x$prefix" != "xNONE" && \
10282 test -d "$prefix" && \
10283  {
10284         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10285         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10286         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10287         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10288         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10289         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10290 }
10291
10292 for cf_subdir_prefix in \
10293         /usr \
10294         /usr/local \
10295         /usr/pkg \
10296         /opt \
10297         /opt/local \
10298         $HOME
10299 do
10300
10301 test "x$cf_subdir_prefix" != "x$prefix" && \
10302 test -d "$cf_subdir_prefix" && \
10303 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10304         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10305         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10306         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10307         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10308         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10309         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10310 }
10311
10312 done
10313
10314 cf_search="$cf_library_path_list $cf_search"
10315
10316                         for cf_cv_library_path_utf8 in $cf_search
10317                         do
10318                                 if test -d $cf_cv_library_path_utf8 ; then
10319                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10320
10321 echo "${as_me:-configure}:10321: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10322
10323                                         CPPFLAGS="$cf_test_CPPFLAGS"
10324                                         LIBS="-lutf8  $cf_save_LIBS"
10325                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10326                                         cat >conftest.$ac_ext <<_ACEOF
10327 #line 10327 "configure"
10328 #include "confdefs.h"
10329
10330 #include <libutf8.h>
10331 int
10332 main ()
10333 {
10334 putwc(0,0);
10335   ;
10336   return 0;
10337 }
10338 _ACEOF
10339 rm -f conftest.$ac_objext conftest$ac_exeext
10340 if { (eval echo "$as_me:10340: \"$ac_link\"") >&5
10341   (eval $ac_link) 2>&5
10342   ac_status=$?
10343   echo "$as_me:10343: \$? = $ac_status" >&5
10344   (exit $ac_status); } &&
10345          { ac_try='test -s conftest$ac_exeext'
10346   { (eval echo "$as_me:10346: \"$ac_try\"") >&5
10347   (eval $ac_try) 2>&5
10348   ac_status=$?
10349   echo "$as_me:10349: \$? = $ac_status" >&5
10350   (exit $ac_status); }; }; then
10351
10352                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10353
10354 echo "${as_me:-configure}:10354: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10355
10356                                         cf_cv_find_linkage_utf8=yes
10357                                         cf_cv_library_file_utf8="-lutf8"
10358                                         break
10359 else
10360   echo "$as_me: failed program was:" >&5
10361 cat conftest.$ac_ext >&5
10362
10363                                         CPPFLAGS="$cf_save_CPPFLAGS"
10364                                         LIBS="$cf_save_LIBS"
10365                                         LDFLAGS="$cf_save_LDFLAGS"
10366
10367 fi
10368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10369                                 fi
10370                         done
10371                         CPPFLAGS="$cf_save_CPPFLAGS"
10372                         LDFLAGS="$cf_save_LDFLAGS"
10373                 fi
10374
10375         else
10376                 cf_cv_find_linkage_utf8=no
10377         fi
10378
10379 fi
10380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10381
10382 fi
10383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10384
10385 LIBS="$cf_save_LIBS"
10386
10387 if test "$cf_cv_find_linkage_utf8" = yes ; then
10388 cf_cv_utf8_lib=add-on
10389 else
10390 cf_cv_utf8_lib=no
10391 fi
10392
10393 fi
10394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10395 fi
10396 echo "$as_me:10396: result: $cf_cv_utf8_lib" >&5
10397 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10398
10399 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10400 # ncurses/ncursesw:
10401 if test "$cf_cv_utf8_lib" = "add-on" ; then
10402
10403 cat >>confdefs.h <<\EOF
10404 #define HAVE_LIBUTF8_H 1
10405 EOF
10406
10407 if test -n "$cf_cv_header_path_utf8" ; then
10408   for cf_add_incdir in $cf_cv_header_path_utf8
10409   do
10410         while test $cf_add_incdir != /usr/include
10411         do
10412           if test -d $cf_add_incdir
10413           then
10414                 cf_have_incdir=no
10415                 if test -n "$CFLAGS$CPPFLAGS" ; then
10416                   # a loop is needed to ensure we can add subdirs of existing dirs
10417                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10418                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10419                           cf_have_incdir=yes; break
10420                         fi
10421                   done
10422                 fi
10423
10424                 if test "$cf_have_incdir" = no ; then
10425                   if test "$cf_add_incdir" = /usr/local/include ; then
10426                         if test "$GCC" = yes
10427                         then
10428                           cf_save_CPPFLAGS=$CPPFLAGS
10429                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10430                           cat >conftest.$ac_ext <<_ACEOF
10431 #line 10431 "configure"
10432 #include "confdefs.h"
10433 #include <stdio.h>
10434 int
10435 main ()
10436 {
10437 printf("Hello")
10438   ;
10439   return 0;
10440 }
10441 _ACEOF
10442 rm -f conftest.$ac_objext
10443 if { (eval echo "$as_me:10443: \"$ac_compile\"") >&5
10444   (eval $ac_compile) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit $ac_status); } &&
10448          { ac_try='test -s conftest.$ac_objext'
10449   { (eval echo "$as_me:10449: \"$ac_try\"") >&5
10450   (eval $ac_try) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit $ac_status); }; }; then
10454   :
10455 else
10456   echo "$as_me: failed program was:" >&5
10457 cat conftest.$ac_ext >&5
10458 cf_have_incdir=yes
10459 fi
10460 rm -f conftest.$ac_objext conftest.$ac_ext
10461                           CPPFLAGS=$cf_save_CPPFLAGS
10462                         fi
10463                   fi
10464                 fi
10465
10466                 if test "$cf_have_incdir" = no ; then
10467                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10468
10469 echo "${as_me:-configure}:10469: testing adding $cf_add_incdir to include-path ..." 1>&5
10470
10471                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10472
10473                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10474                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10475                   cf_add_incdir="$cf_top_incdir"
10476                 else
10477                   break
10478                 fi
10479           else
10480                 break
10481           fi
10482         done
10483   done
10484 fi
10485
10486 if test -n "$cf_cv_library_path_utf8" ; then
10487         for cf_add_libdir in $cf_cv_library_path_utf8
10488         do
10489                 if test $cf_add_libdir = /usr/lib ; then
10490                         :
10491                 elif test -d $cf_add_libdir
10492                 then
10493                         cf_have_libdir=no
10494                         if test -n "$LDFLAGS$LIBS" ; then
10495                                 # a loop is needed to ensure we can add subdirs of existing dirs
10496                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10497                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10498                                                 cf_have_libdir=yes; break
10499                                         fi
10500                                 done
10501                         fi
10502                         if test "$cf_have_libdir" = no ; then
10503                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10504
10505 echo "${as_me:-configure}:10505: testing adding $cf_add_libdir to library-path ..." 1>&5
10506
10507                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10508                         fi
10509                 fi
10510         done
10511 fi
10512
10513 cf_add_libs="$cf_cv_library_file_utf8"
10514 # Filter out duplicates - this happens with badly-designed ".pc" files...
10515 for cf_add_1lib in $LIBS
10516 do
10517         for cf_add_2lib in $cf_add_libs
10518         do
10519                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10520                 then
10521                         cf_add_1lib=
10522                         break
10523                 fi
10524         done
10525         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10526 done
10527 LIBS="$cf_add_libs"
10528
10529 fi
10530
10531                 if test "$cf_cv_utf8_lib" != no ; then
10532                         NCURSES_LIBUTF8=1
10533                 fi
10534         fi
10535
10536 # This is needed on Tru64 5.0 to declare mbstate_t
10537 echo "$as_me:10537: checking if we must include wchar.h to declare mbstate_t" >&5
10538 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10539 if test "${cf_cv_mbstate_t+set}" = set; then
10540   echo $ECHO_N "(cached) $ECHO_C" >&6
10541 else
10542
10543 cat >conftest.$ac_ext <<_ACEOF
10544 #line 10544 "configure"
10545 #include "confdefs.h"
10546
10547 #include <stdlib.h>
10548 #include <stdarg.h>
10549 #include <stdio.h>
10550 #ifdef HAVE_LIBUTF8_H
10551 #include <libutf8.h>
10552 #endif
10553 int
10554 main ()
10555 {
10556 mbstate_t state
10557   ;
10558   return 0;
10559 }
10560 _ACEOF
10561 rm -f conftest.$ac_objext
10562 if { (eval echo "$as_me:10562: \"$ac_compile\"") >&5
10563   (eval $ac_compile) 2>&5
10564   ac_status=$?
10565   echo "$as_me:10565: \$? = $ac_status" >&5
10566   (exit $ac_status); } &&
10567          { ac_try='test -s conftest.$ac_objext'
10568   { (eval echo "$as_me:10568: \"$ac_try\"") >&5
10569   (eval $ac_try) 2>&5
10570   ac_status=$?
10571   echo "$as_me:10571: \$? = $ac_status" >&5
10572   (exit $ac_status); }; }; then
10573   cf_cv_mbstate_t=no
10574 else
10575   echo "$as_me: failed program was:" >&5
10576 cat conftest.$ac_ext >&5
10577 cat >conftest.$ac_ext <<_ACEOF
10578 #line 10578 "configure"
10579 #include "confdefs.h"
10580
10581 #include <stdlib.h>
10582 #include <stdarg.h>
10583 #include <stdio.h>
10584 #include <wchar.h>
10585 #ifdef HAVE_LIBUTF8_H
10586 #include <libutf8.h>
10587 #endif
10588 int
10589 main ()
10590 {
10591 mbstate_t value
10592   ;
10593   return 0;
10594 }
10595 _ACEOF
10596 rm -f conftest.$ac_objext
10597 if { (eval echo "$as_me:10597: \"$ac_compile\"") >&5
10598   (eval $ac_compile) 2>&5
10599   ac_status=$?
10600   echo "$as_me:10600: \$? = $ac_status" >&5
10601   (exit $ac_status); } &&
10602          { ac_try='test -s conftest.$ac_objext'
10603   { (eval echo "$as_me:10603: \"$ac_try\"") >&5
10604   (eval $ac_try) 2>&5
10605   ac_status=$?
10606   echo "$as_me:10606: \$? = $ac_status" >&5
10607   (exit $ac_status); }; }; then
10608   cf_cv_mbstate_t=yes
10609 else
10610   echo "$as_me: failed program was:" >&5
10611 cat conftest.$ac_ext >&5
10612 cf_cv_mbstate_t=unknown
10613 fi
10614 rm -f conftest.$ac_objext conftest.$ac_ext
10615 fi
10616 rm -f conftest.$ac_objext conftest.$ac_ext
10617 fi
10618 echo "$as_me:10618: result: $cf_cv_mbstate_t" >&5
10619 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10620
10621 if test "$cf_cv_mbstate_t" = yes ; then
10622
10623 cat >>confdefs.h <<\EOF
10624 #define NEED_WCHAR_H 1
10625 EOF
10626
10627         NEED_WCHAR_H=1
10628 fi
10629
10630 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10631 if test "$cf_cv_mbstate_t" = unknown ; then
10632         NCURSES_MBSTATE_T=1
10633 fi
10634
10635 # This is needed on Tru64 5.0 to declare wchar_t
10636 echo "$as_me:10636: checking if we must include wchar.h to declare wchar_t" >&5
10637 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10638 if test "${cf_cv_wchar_t+set}" = set; then
10639   echo $ECHO_N "(cached) $ECHO_C" >&6
10640 else
10641
10642 cat >conftest.$ac_ext <<_ACEOF
10643 #line 10643 "configure"
10644 #include "confdefs.h"
10645
10646 #include <stdlib.h>
10647 #include <stdarg.h>
10648 #include <stdio.h>
10649 #ifdef HAVE_LIBUTF8_H
10650 #include <libutf8.h>
10651 #endif
10652 int
10653 main ()
10654 {
10655 wchar_t state
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 rm -f conftest.$ac_objext
10661 if { (eval echo "$as_me:10661: \"$ac_compile\"") >&5
10662   (eval $ac_compile) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit $ac_status); } &&
10666          { ac_try='test -s conftest.$ac_objext'
10667   { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668   (eval $ac_try) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit $ac_status); }; }; then
10672   cf_cv_wchar_t=no
10673 else
10674   echo "$as_me: failed program was:" >&5
10675 cat conftest.$ac_ext >&5
10676 cat >conftest.$ac_ext <<_ACEOF
10677 #line 10677 "configure"
10678 #include "confdefs.h"
10679
10680 #include <stdlib.h>
10681 #include <stdarg.h>
10682 #include <stdio.h>
10683 #include <wchar.h>
10684 #ifdef HAVE_LIBUTF8_H
10685 #include <libutf8.h>
10686 #endif
10687 int
10688 main ()
10689 {
10690 wchar_t value
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 rm -f conftest.$ac_objext
10696 if { (eval echo "$as_me:10696: \"$ac_compile\"") >&5
10697   (eval $ac_compile) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); } &&
10701          { ac_try='test -s conftest.$ac_objext'
10702   { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703   (eval $ac_try) 2>&5
10704   ac_status=$?
10705   echo "$as_me:10705: \$? = $ac_status" >&5
10706   (exit $ac_status); }; }; then
10707   cf_cv_wchar_t=yes
10708 else
10709   echo "$as_me: failed program was:" >&5
10710 cat conftest.$ac_ext >&5
10711 cf_cv_wchar_t=unknown
10712 fi
10713 rm -f conftest.$ac_objext conftest.$ac_ext
10714 fi
10715 rm -f conftest.$ac_objext conftest.$ac_ext
10716 fi
10717 echo "$as_me:10717: result: $cf_cv_wchar_t" >&5
10718 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10719
10720 if test "$cf_cv_wchar_t" = yes ; then
10721
10722 cat >>confdefs.h <<\EOF
10723 #define NEED_WCHAR_H 1
10724 EOF
10725
10726         NEED_WCHAR_H=1
10727 fi
10728
10729 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10730 if test "$cf_cv_wchar_t" = unknown ; then
10731         NCURSES_WCHAR_T=1
10732 fi
10733
10734 # if we find wchar_t in either place, use substitution to provide a fallback.
10735 if test "$cf_cv_wchar_t" != unknown ; then
10736         NCURSES_OK_WCHAR_T=1
10737 fi
10738
10739 # This is needed on Tru64 5.0 to declare wint_t
10740 echo "$as_me:10740: checking if we must include wchar.h to declare wint_t" >&5
10741 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10742 if test "${cf_cv_wint_t+set}" = set; then
10743   echo $ECHO_N "(cached) $ECHO_C" >&6
10744 else
10745
10746 cat >conftest.$ac_ext <<_ACEOF
10747 #line 10747 "configure"
10748 #include "confdefs.h"
10749
10750 #include <stdlib.h>
10751 #include <stdarg.h>
10752 #include <stdio.h>
10753 #ifdef HAVE_LIBUTF8_H
10754 #include <libutf8.h>
10755 #endif
10756 int
10757 main ()
10758 {
10759 wint_t state
10760   ;
10761   return 0;
10762 }
10763 _ACEOF
10764 rm -f conftest.$ac_objext
10765 if { (eval echo "$as_me:10765: \"$ac_compile\"") >&5
10766   (eval $ac_compile) 2>&5
10767   ac_status=$?
10768   echo "$as_me:10768: \$? = $ac_status" >&5
10769   (exit $ac_status); } &&
10770          { ac_try='test -s conftest.$ac_objext'
10771   { (eval echo "$as_me:10771: \"$ac_try\"") >&5
10772   (eval $ac_try) 2>&5
10773   ac_status=$?
10774   echo "$as_me:10774: \$? = $ac_status" >&5
10775   (exit $ac_status); }; }; then
10776   cf_cv_wint_t=no
10777 else
10778   echo "$as_me: failed program was:" >&5
10779 cat conftest.$ac_ext >&5
10780 cat >conftest.$ac_ext <<_ACEOF
10781 #line 10781 "configure"
10782 #include "confdefs.h"
10783
10784 #include <stdlib.h>
10785 #include <stdarg.h>
10786 #include <stdio.h>
10787 #include <wchar.h>
10788 #ifdef HAVE_LIBUTF8_H
10789 #include <libutf8.h>
10790 #endif
10791 int
10792 main ()
10793 {
10794 wint_t value
10795   ;
10796   return 0;
10797 }
10798 _ACEOF
10799 rm -f conftest.$ac_objext
10800 if { (eval echo "$as_me:10800: \"$ac_compile\"") >&5
10801   (eval $ac_compile) 2>&5
10802   ac_status=$?
10803   echo "$as_me:10803: \$? = $ac_status" >&5
10804   (exit $ac_status); } &&
10805          { ac_try='test -s conftest.$ac_objext'
10806   { (eval echo "$as_me:10806: \"$ac_try\"") >&5
10807   (eval $ac_try) 2>&5
10808   ac_status=$?
10809   echo "$as_me:10809: \$? = $ac_status" >&5
10810   (exit $ac_status); }; }; then
10811   cf_cv_wint_t=yes
10812 else
10813   echo "$as_me: failed program was:" >&5
10814 cat conftest.$ac_ext >&5
10815 cf_cv_wint_t=unknown
10816 fi
10817 rm -f conftest.$ac_objext conftest.$ac_ext
10818 fi
10819 rm -f conftest.$ac_objext conftest.$ac_ext
10820 fi
10821 echo "$as_me:10821: result: $cf_cv_wint_t" >&5
10822 echo "${ECHO_T}$cf_cv_wint_t" >&6
10823
10824 if test "$cf_cv_wint_t" = yes ; then
10825
10826 cat >>confdefs.h <<\EOF
10827 #define NEED_WCHAR_H 1
10828 EOF
10829
10830         NEED_WCHAR_H=1
10831 fi
10832
10833 # if we do not find wint_t in either place, use substitution to provide a fallback.
10834 if test "$cf_cv_wint_t" = unknown ; then
10835         NCURSES_WINT_T=1
10836 fi
10837
10838 # if we find wint_t in either place, use substitution to provide a fallback.
10839 if test "$cf_cv_wint_t" != unknown ; then
10840         NCURSES_OK_WINT_T=1
10841 fi
10842
10843         if test "$NCURSES_MBSTATE_T" != 0; then
10844
10845 cat >>confdefs.h <<\EOF
10846 #define NEED_MBSTATE_T_DEF 1
10847 EOF
10848
10849         fi
10850 fi
10851
10852 ###   use option --disable-lp64 to allow long chtype
10853 echo "$as_me:10853: checking whether to enable _LP64 definition in curses.h" >&5
10854 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10855
10856 # Check whether --enable-lp64 or --disable-lp64 was given.
10857 if test "${enable_lp64+set}" = set; then
10858   enableval="$enable_lp64"
10859   with_lp64=$enableval
10860 else
10861   with_lp64=$cf_dft_with_lp64
10862 fi;
10863 echo "$as_me:10863: result: $with_lp64" >&5
10864 echo "${ECHO_T}$with_lp64" >&6
10865
10866 if test "x$with_lp64" = xyes ; then
10867         cf_cv_enable_lp64=1
10868 else
10869         cf_cv_enable_lp64=0
10870 fi
10871
10872 # Check whether --enable-largefile or --disable-largefile was given.
10873 if test "${enable_largefile+set}" = set; then
10874   enableval="$enable_largefile"
10875
10876 fi;
10877 if test "$enable_largefile" != no; then
10878
10879   echo "$as_me:10879: checking for special C compiler options needed for large files" >&5
10880 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10881 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10882   echo $ECHO_N "(cached) $ECHO_C" >&6
10883 else
10884   ac_cv_sys_largefile_CC=no
10885      if test "$GCC" != yes; then
10886        ac_save_CC=$CC
10887        while :; do
10888          # IRIX 6.2 and later do not support large files by default,
10889          # so use the C compiler's -n32 option if that helps.
10890          cat >conftest.$ac_ext <<_ACEOF
10891 #line 10891 "configure"
10892 #include "confdefs.h"
10893 #include <sys/types.h>
10894  /* Check that off_t can represent 2**63 - 1 correctly.
10895     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10896     since some C++ compilers masquerading as C compilers
10897     incorrectly reject 9223372036854775807.  */
10898 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10899   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10900                        && LARGE_OFF_T % 2147483647 == 1)
10901                       ? 1 : -1];
10902 int
10903 main ()
10904 {
10905
10906   ;
10907   return 0;
10908 }
10909 _ACEOF
10910          rm -f conftest.$ac_objext
10911 if { (eval echo "$as_me:10911: \"$ac_compile\"") >&5
10912   (eval $ac_compile) 2>&5
10913   ac_status=$?
10914   echo "$as_me:10914: \$? = $ac_status" >&5
10915   (exit $ac_status); } &&
10916          { ac_try='test -s conftest.$ac_objext'
10917   { (eval echo "$as_me:10917: \"$ac_try\"") >&5
10918   (eval $ac_try) 2>&5
10919   ac_status=$?
10920   echo "$as_me:10920: \$? = $ac_status" >&5
10921   (exit $ac_status); }; }; then
10922   break
10923 else
10924   echo "$as_me: failed program was:" >&5
10925 cat conftest.$ac_ext >&5
10926 fi
10927 rm -f conftest.$ac_objext
10928          CC="$CC -n32"
10929          rm -f conftest.$ac_objext
10930 if { (eval echo "$as_me:10930: \"$ac_compile\"") >&5
10931   (eval $ac_compile) 2>&5
10932   ac_status=$?
10933   echo "$as_me:10933: \$? = $ac_status" >&5
10934   (exit $ac_status); } &&
10935          { ac_try='test -s conftest.$ac_objext'
10936   { (eval echo "$as_me:10936: \"$ac_try\"") >&5
10937   (eval $ac_try) 2>&5
10938   ac_status=$?
10939   echo "$as_me:10939: \$? = $ac_status" >&5
10940   (exit $ac_status); }; }; then
10941   ac_cv_sys_largefile_CC=' -n32'; break
10942 else
10943   echo "$as_me: failed program was:" >&5
10944 cat conftest.$ac_ext >&5
10945 fi
10946 rm -f conftest.$ac_objext
10947          break
10948        done
10949        CC=$ac_save_CC
10950        rm -f conftest.$ac_ext
10951     fi
10952 fi
10953 echo "$as_me:10953: result: $ac_cv_sys_largefile_CC" >&5
10954 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10955   if test "$ac_cv_sys_largefile_CC" != no; then
10956     CC=$CC$ac_cv_sys_largefile_CC
10957   fi
10958
10959   echo "$as_me:10959: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10960 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10961 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10962   echo $ECHO_N "(cached) $ECHO_C" >&6
10963 else
10964   while :; do
10965   ac_cv_sys_file_offset_bits=no
10966   cat >conftest.$ac_ext <<_ACEOF
10967 #line 10967 "configure"
10968 #include "confdefs.h"
10969 #include <sys/types.h>
10970  /* Check that off_t can represent 2**63 - 1 correctly.
10971     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10972     since some C++ compilers masquerading as C compilers
10973     incorrectly reject 9223372036854775807.  */
10974 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10975   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10976                        && LARGE_OFF_T % 2147483647 == 1)
10977                       ? 1 : -1];
10978 int
10979 main ()
10980 {
10981
10982   ;
10983   return 0;
10984 }
10985 _ACEOF
10986 rm -f conftest.$ac_objext
10987 if { (eval echo "$as_me:10987: \"$ac_compile\"") >&5
10988   (eval $ac_compile) 2>&5
10989   ac_status=$?
10990   echo "$as_me:10990: \$? = $ac_status" >&5
10991   (exit $ac_status); } &&
10992          { ac_try='test -s conftest.$ac_objext'
10993   { (eval echo "$as_me:10993: \"$ac_try\"") >&5
10994   (eval $ac_try) 2>&5
10995   ac_status=$?
10996   echo "$as_me:10996: \$? = $ac_status" >&5
10997   (exit $ac_status); }; }; then
10998   break
10999 else
11000   echo "$as_me: failed program was:" >&5
11001 cat conftest.$ac_ext >&5
11002 fi
11003 rm -f conftest.$ac_objext conftest.$ac_ext
11004   cat >conftest.$ac_ext <<_ACEOF
11005 #line 11005 "configure"
11006 #include "confdefs.h"
11007 #define _FILE_OFFSET_BITS 64
11008 #include <sys/types.h>
11009  /* Check that off_t can represent 2**63 - 1 correctly.
11010     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11011     since some C++ compilers masquerading as C compilers
11012     incorrectly reject 9223372036854775807.  */
11013 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11014   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11015                        && LARGE_OFF_T % 2147483647 == 1)
11016                       ? 1 : -1];
11017 int
11018 main ()
11019 {
11020
11021   ;
11022   return 0;
11023 }
11024 _ACEOF
11025 rm -f conftest.$ac_objext
11026 if { (eval echo "$as_me:11026: \"$ac_compile\"") >&5
11027   (eval $ac_compile) 2>&5
11028   ac_status=$?
11029   echo "$as_me:11029: \$? = $ac_status" >&5
11030   (exit $ac_status); } &&
11031          { ac_try='test -s conftest.$ac_objext'
11032   { (eval echo "$as_me:11032: \"$ac_try\"") >&5
11033   (eval $ac_try) 2>&5
11034   ac_status=$?
11035   echo "$as_me:11035: \$? = $ac_status" >&5
11036   (exit $ac_status); }; }; then
11037   ac_cv_sys_file_offset_bits=64; break
11038 else
11039   echo "$as_me: failed program was:" >&5
11040 cat conftest.$ac_ext >&5
11041 fi
11042 rm -f conftest.$ac_objext conftest.$ac_ext
11043   break
11044 done
11045 fi
11046 echo "$as_me:11046: result: $ac_cv_sys_file_offset_bits" >&5
11047 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11048 if test "$ac_cv_sys_file_offset_bits" != no; then
11049
11050 cat >>confdefs.h <<EOF
11051 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11052 EOF
11053
11054 fi
11055 rm -rf conftest*
11056   echo "$as_me:11056: checking for _LARGE_FILES value needed for large files" >&5
11057 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11058 if test "${ac_cv_sys_large_files+set}" = set; then
11059   echo $ECHO_N "(cached) $ECHO_C" >&6
11060 else
11061   while :; do
11062   ac_cv_sys_large_files=no
11063   cat >conftest.$ac_ext <<_ACEOF
11064 #line 11064 "configure"
11065 #include "confdefs.h"
11066 #include <sys/types.h>
11067  /* Check that off_t can represent 2**63 - 1 correctly.
11068     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11069     since some C++ compilers masquerading as C compilers
11070     incorrectly reject 9223372036854775807.  */
11071 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11072   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11073                        && LARGE_OFF_T % 2147483647 == 1)
11074                       ? 1 : -1];
11075 int
11076 main ()
11077 {
11078
11079   ;
11080   return 0;
11081 }
11082 _ACEOF
11083 rm -f conftest.$ac_objext
11084 if { (eval echo "$as_me:11084: \"$ac_compile\"") >&5
11085   (eval $ac_compile) 2>&5
11086   ac_status=$?
11087   echo "$as_me:11087: \$? = $ac_status" >&5
11088   (exit $ac_status); } &&
11089          { ac_try='test -s conftest.$ac_objext'
11090   { (eval echo "$as_me:11090: \"$ac_try\"") >&5
11091   (eval $ac_try) 2>&5
11092   ac_status=$?
11093   echo "$as_me:11093: \$? = $ac_status" >&5
11094   (exit $ac_status); }; }; then
11095   break
11096 else
11097   echo "$as_me: failed program was:" >&5
11098 cat conftest.$ac_ext >&5
11099 fi
11100 rm -f conftest.$ac_objext conftest.$ac_ext
11101   cat >conftest.$ac_ext <<_ACEOF
11102 #line 11102 "configure"
11103 #include "confdefs.h"
11104 #define _LARGE_FILES 1
11105 #include <sys/types.h>
11106  /* Check that off_t can represent 2**63 - 1 correctly.
11107     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11108     since some C++ compilers masquerading as C compilers
11109     incorrectly reject 9223372036854775807.  */
11110 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11111   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11112                        && LARGE_OFF_T % 2147483647 == 1)
11113                       ? 1 : -1];
11114 int
11115 main ()
11116 {
11117
11118   ;
11119   return 0;
11120 }
11121 _ACEOF
11122 rm -f conftest.$ac_objext
11123 if { (eval echo "$as_me:11123: \"$ac_compile\"") >&5
11124   (eval $ac_compile) 2>&5
11125   ac_status=$?
11126   echo "$as_me:11126: \$? = $ac_status" >&5
11127   (exit $ac_status); } &&
11128          { ac_try='test -s conftest.$ac_objext'
11129   { (eval echo "$as_me:11129: \"$ac_try\"") >&5
11130   (eval $ac_try) 2>&5
11131   ac_status=$?
11132   echo "$as_me:11132: \$? = $ac_status" >&5
11133   (exit $ac_status); }; }; then
11134   ac_cv_sys_large_files=1; break
11135 else
11136   echo "$as_me: failed program was:" >&5
11137 cat conftest.$ac_ext >&5
11138 fi
11139 rm -f conftest.$ac_objext conftest.$ac_ext
11140   break
11141 done
11142 fi
11143 echo "$as_me:11143: result: $ac_cv_sys_large_files" >&5
11144 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11145 if test "$ac_cv_sys_large_files" != no; then
11146
11147 cat >>confdefs.h <<EOF
11148 #define _LARGE_FILES $ac_cv_sys_large_files
11149 EOF
11150
11151 fi
11152 rm -rf conftest*
11153 fi
11154
11155         if test "$enable_largefile" != no ; then
11156         echo "$as_me:11156: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11157 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11158 if test "${ac_cv_sys_largefile_source+set}" = set; then
11159   echo $ECHO_N "(cached) $ECHO_C" >&6
11160 else
11161   while :; do
11162   ac_cv_sys_largefile_source=no
11163   cat >conftest.$ac_ext <<_ACEOF
11164 #line 11164 "configure"
11165 #include "confdefs.h"
11166 #include <stdio.h>
11167 int
11168 main ()
11169 {
11170 return !fseeko;
11171   ;
11172   return 0;
11173 }
11174 _ACEOF
11175 rm -f conftest.$ac_objext
11176 if { (eval echo "$as_me:11176: \"$ac_compile\"") >&5
11177   (eval $ac_compile) 2>&5
11178   ac_status=$?
11179   echo "$as_me:11179: \$? = $ac_status" >&5
11180   (exit $ac_status); } &&
11181          { ac_try='test -s conftest.$ac_objext'
11182   { (eval echo "$as_me:11182: \"$ac_try\"") >&5
11183   (eval $ac_try) 2>&5
11184   ac_status=$?
11185   echo "$as_me:11185: \$? = $ac_status" >&5
11186   (exit $ac_status); }; }; then
11187   break
11188 else
11189   echo "$as_me: failed program was:" >&5
11190 cat conftest.$ac_ext >&5
11191 fi
11192 rm -f conftest.$ac_objext conftest.$ac_ext
11193   cat >conftest.$ac_ext <<_ACEOF
11194 #line 11194 "configure"
11195 #include "confdefs.h"
11196 #define _LARGEFILE_SOURCE 1
11197 #include <stdio.h>
11198 int
11199 main ()
11200 {
11201 return !fseeko;
11202   ;
11203   return 0;
11204 }
11205 _ACEOF
11206 rm -f conftest.$ac_objext
11207 if { (eval echo "$as_me:11207: \"$ac_compile\"") >&5
11208   (eval $ac_compile) 2>&5
11209   ac_status=$?
11210   echo "$as_me:11210: \$? = $ac_status" >&5
11211   (exit $ac_status); } &&
11212          { ac_try='test -s conftest.$ac_objext'
11213   { (eval echo "$as_me:11213: \"$ac_try\"") >&5
11214   (eval $ac_try) 2>&5
11215   ac_status=$?
11216   echo "$as_me:11216: \$? = $ac_status" >&5
11217   (exit $ac_status); }; }; then
11218   ac_cv_sys_largefile_source=1; break
11219 else
11220   echo "$as_me: failed program was:" >&5
11221 cat conftest.$ac_ext >&5
11222 fi
11223 rm -f conftest.$ac_objext conftest.$ac_ext
11224   break
11225 done
11226 fi
11227 echo "$as_me:11227: result: $ac_cv_sys_largefile_source" >&5
11228 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11229 if test "$ac_cv_sys_largefile_source" != no; then
11230
11231 cat >>confdefs.h <<EOF
11232 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11233 EOF
11234
11235 fi
11236 rm -rf conftest*
11237
11238 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11239 # in glibc 2.1.3, but that breaks too many other things.
11240 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11241 echo "$as_me:11241: checking for fseeko" >&5
11242 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11243 if test "${ac_cv_func_fseeko+set}" = set; then
11244   echo $ECHO_N "(cached) $ECHO_C" >&6
11245 else
11246   cat >conftest.$ac_ext <<_ACEOF
11247 #line 11247 "configure"
11248 #include "confdefs.h"
11249 #include <stdio.h>
11250 int
11251 main ()
11252 {
11253 return fseeko && fseeko (stdin, 0, 0);
11254   ;
11255   return 0;
11256 }
11257 _ACEOF
11258 rm -f conftest.$ac_objext conftest$ac_exeext
11259 if { (eval echo "$as_me:11259: \"$ac_link\"") >&5
11260   (eval $ac_link) 2>&5
11261   ac_status=$?
11262   echo "$as_me:11262: \$? = $ac_status" >&5
11263   (exit $ac_status); } &&
11264          { ac_try='test -s conftest$ac_exeext'
11265   { (eval echo "$as_me:11265: \"$ac_try\"") >&5
11266   (eval $ac_try) 2>&5
11267   ac_status=$?
11268   echo "$as_me:11268: \$? = $ac_status" >&5
11269   (exit $ac_status); }; }; then
11270   ac_cv_func_fseeko=yes
11271 else
11272   echo "$as_me: failed program was:" >&5
11273 cat conftest.$ac_ext >&5
11274 ac_cv_func_fseeko=no
11275 fi
11276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11277 fi
11278 echo "$as_me:11278: result: $ac_cv_func_fseeko" >&5
11279 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11280 if test $ac_cv_func_fseeko = yes; then
11281
11282 cat >>confdefs.h <<\EOF
11283 #define HAVE_FSEEKO 1
11284 EOF
11285
11286 fi
11287
11288         # Normally we would collect these definitions in the config.h,
11289         # but (like _XOPEN_SOURCE), some environments rely on having these
11290         # defined before any of the system headers are included.  Another
11291         # case comes up with C++, e.g., on AIX the compiler compiles the
11292         # header files by themselves before looking at the body files it is
11293         # told to compile.  For ncurses, those header files do not include
11294         # the config.h
11295         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11296         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11297         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11298
11299         echo "$as_me:11299: checking whether to use struct dirent64" >&5
11300 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11301 if test "${cf_cv_struct_dirent64+set}" = set; then
11302   echo $ECHO_N "(cached) $ECHO_C" >&6
11303 else
11304
11305                 cat >conftest.$ac_ext <<_ACEOF
11306 #line 11306 "configure"
11307 #include "confdefs.h"
11308
11309 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11310 #include <sys/types.h>
11311 #include <dirent.h>
11312
11313 int
11314 main ()
11315 {
11316
11317                 /* if transitional largefile support is setup, this is true */
11318                 extern struct dirent64 * readdir(DIR *);
11319                 struct dirent64 *x = readdir((DIR *)0);
11320                 struct dirent *y = readdir((DIR *)0);
11321                 int z = x - y;
11322
11323   ;
11324   return 0;
11325 }
11326 _ACEOF
11327 rm -f conftest.$ac_objext
11328 if { (eval echo "$as_me:11328: \"$ac_compile\"") >&5
11329   (eval $ac_compile) 2>&5
11330   ac_status=$?
11331   echo "$as_me:11331: \$? = $ac_status" >&5
11332   (exit $ac_status); } &&
11333          { ac_try='test -s conftest.$ac_objext'
11334   { (eval echo "$as_me:11334: \"$ac_try\"") >&5
11335   (eval $ac_try) 2>&5
11336   ac_status=$?
11337   echo "$as_me:11337: \$? = $ac_status" >&5
11338   (exit $ac_status); }; }; then
11339   cf_cv_struct_dirent64=yes
11340 else
11341   echo "$as_me: failed program was:" >&5
11342 cat conftest.$ac_ext >&5
11343 cf_cv_struct_dirent64=no
11344 fi
11345 rm -f conftest.$ac_objext conftest.$ac_ext
11346
11347 fi
11348 echo "$as_me:11348: result: $cf_cv_struct_dirent64" >&5
11349 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11350         test "$cf_cv_struct_dirent64" = yes &&
11351 cat >>confdefs.h <<\EOF
11352 #define HAVE_STRUCT_DIRENT64 1
11353 EOF
11354
11355         fi
11356
11357 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11358 echo "$as_me:11358: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11359 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11360
11361 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11362 if test "${enable_tparm_varargs+set}" = set; then
11363   enableval="$enable_tparm_varargs"
11364   with_tparm_varargs=$enableval
11365 else
11366   with_tparm_varargs=yes
11367 fi;
11368 echo "$as_me:11368: result: $with_tparm_varargs" >&5
11369 echo "${ECHO_T}$with_tparm_varargs" >&6
11370 NCURSES_TPARM_VARARGS=0
11371 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11372
11373 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11374 if test "$with_ticlib" != no ; then
11375 echo "$as_me:11375: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11376 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11377
11378 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11379 if test "${enable_tic_depends+set}" = set; then
11380   enableval="$enable_tic_depends"
11381   with_tic_depends=$enableval
11382 else
11383   with_tic_depends=yes
11384 fi;
11385 echo "$as_me:11385: result: $with_tic_depends" >&5
11386 echo "${ECHO_T}$with_tic_depends" >&6
11387 else
11388         with_tic_depends=no
11389 fi
11390
11391 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11392 echo "$as_me:11392: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11393 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11394
11395 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11396 if test "${enable_wattr_macros+set}" = set; then
11397   enableval="$enable_wattr_macros"
11398   with_wattr_macros=$enableval
11399 else
11400   with_wattr_macros=yes
11401 fi;
11402 if [ "x$with_wattr_macros" != xyes ]; then
11403         NCURSES_WATTR_MACROS=0
11404         echo "$as_me:11404: result: yes" >&5
11405 echo "${ECHO_T}yes" >&6
11406 else
11407         NCURSES_WATTR_MACROS=1
11408         echo "$as_me:11408: result: no" >&5
11409 echo "${ECHO_T}no" >&6
11410 fi
11411
11412 ###   use option --with-bool to override bool's type
11413 echo "$as_me:11413: checking for type of bool" >&5
11414 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11415
11416 # Check whether --with-bool or --without-bool was given.
11417 if test "${with_bool+set}" = set; then
11418   withval="$with_bool"
11419   NCURSES_BOOL="$withval"
11420 else
11421   NCURSES_BOOL=auto
11422 fi;
11423 echo "$as_me:11423: result: $NCURSES_BOOL" >&5
11424 echo "${ECHO_T}$NCURSES_BOOL" >&6
11425
11426 echo "$as_me:11426: checking for alternate terminal capabilities file" >&5
11427 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11428
11429 # Check whether --with-caps or --without-caps was given.
11430 if test "${with_caps+set}" = set; then
11431   withval="$with_caps"
11432   TERMINFO_CAPS=Caps.$withval
11433 else
11434   TERMINFO_CAPS=Caps
11435 fi;
11436 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11437 echo "$as_me:11437: result: $TERMINFO_CAPS" >&5
11438 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11439
11440 ###   use option --with-chtype to override chtype's type
11441 echo "$as_me:11441: checking for type of chtype" >&5
11442 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11443
11444 # Check whether --with-chtype or --without-chtype was given.
11445 if test "${with_chtype+set}" = set; then
11446   withval="$with_chtype"
11447   NCURSES_CHTYPE="$withval"
11448 else
11449   NCURSES_CHTYPE=$cf_dft_chtype
11450 fi;
11451 echo "$as_me:11451: result: $NCURSES_CHTYPE" >&5
11452 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11453
11454 ###   use option --with-ospeed to override ospeed's type
11455 echo "$as_me:11455: checking for type of ospeed" >&5
11456 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11457
11458 # Check whether --with-ospeed or --without-ospeed was given.
11459 if test "${with_ospeed+set}" = set; then
11460   withval="$with_ospeed"
11461   NCURSES_OSPEED="$withval"
11462 else
11463   NCURSES_OSPEED=short
11464 fi;
11465 echo "$as_me:11465: result: $NCURSES_OSPEED" >&5
11466 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11467
11468 ###   use option --with-mmask-t to override mmask_t's type
11469 echo "$as_me:11469: checking for type of mmask_t" >&5
11470 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11471
11472 # Check whether --with-mmask-t or --without-mmask-t was given.
11473 if test "${with_mmask_t+set}" = set; then
11474   withval="$with_mmask_t"
11475   NCURSES_MMASK_T="$withval"
11476 else
11477   NCURSES_MMASK_T=$cf_dft_mmask_t
11478 fi;
11479 echo "$as_me:11479: result: $NCURSES_MMASK_T" >&5
11480 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11481
11482 ###   use option --with-ccharw-max to override CCHARW_MAX size
11483 echo "$as_me:11483: checking for size CCHARW_MAX" >&5
11484 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11485
11486 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11487 if test "${with_ccharw_max+set}" = set; then
11488   withval="$with_ccharw_max"
11489   NCURSES_CCHARW_MAX="$withval"
11490 else
11491   NCURSES_CCHARW_MAX=5
11492 fi;
11493 echo "$as_me:11493: result: $NCURSES_CCHARW_MAX" >&5
11494 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11495
11496 ###   use option --with-tparm-arg to override tparm's argument type
11497 echo "$as_me:11497: checking for type of tparm args" >&5
11498 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11499
11500 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11501 if test "${with_tparm_arg+set}" = set; then
11502   withval="$with_tparm_arg"
11503   NCURSES_TPARM_ARG="$withval"
11504 else
11505   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11506 fi;
11507 echo "$as_me:11507: result: $NCURSES_TPARM_ARG" >&5
11508 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11509
11510 ### Enable compiling-in rcs id's
11511 echo "$as_me:11511: checking if RCS identifiers should be compiled-in" >&5
11512 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11513
11514 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11515 if test "${with_rcs_ids+set}" = set; then
11516   withval="$with_rcs_ids"
11517   with_rcs_ids=$withval
11518 else
11519   with_rcs_ids=no
11520 fi;
11521 echo "$as_me:11521: result: $with_rcs_ids" >&5
11522 echo "${ECHO_T}$with_rcs_ids" >&6
11523 test "x$with_rcs_ids" = xyes &&
11524 cat >>confdefs.h <<\EOF
11525 #define USE_RCS_IDS 1
11526 EOF
11527
11528 ###############################################################################
11529
11530 echo "$as_me:11530: checking format of man-pages" >&5
11531 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11532
11533 # Check whether --with-manpage-format or --without-manpage-format was given.
11534 if test "${with_manpage_format+set}" = set; then
11535   withval="$with_manpage_format"
11536   MANPAGE_FORMAT=$withval
11537 else
11538   MANPAGE_FORMAT=unknown
11539 fi;
11540
11541 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11542 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11543
11544 cf_unknown=
11545
11546 case $MANPAGE_FORMAT in
11547 (unknown)
11548         if test -z "$MANPATH" ; then
11549                 MANPATH="/usr/man:/usr/share/man"
11550         fi
11551
11552         # look for the 'date' man-page (it's most likely to be installed!)
11553         MANPAGE_FORMAT=
11554         cf_preform=no
11555         cf_catonly=yes
11556         cf_example=date
11557
11558         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11559         for cf_dir in $MANPATH; do
11560                 test -z "$cf_dir" && cf_dir=/usr/man
11561                 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
11562                 do
11563                         cf_test=`echo $cf_name | sed -e 's/*//'`
11564                         if test "x$cf_test" = "x$cf_name" ; then
11565
11566                                 case "$cf_name" in
11567                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11568                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11569                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11570                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11571                                 esac
11572
11573                                 case "$cf_name" in
11574                                 ($cf_dir/man*)
11575                                         cf_catonly=no
11576                                         ;;
11577                                 ($cf_dir/cat*)
11578                                         cf_preform=yes
11579                                         ;;
11580                                 esac
11581                                 break
11582                         fi
11583
11584                         # if we found a match in either man* or cat*, stop looking
11585                         if test -n "$MANPAGE_FORMAT" ; then
11586                                 cf_found=no
11587                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11588                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11589                                 case "$cf_name" in
11590                                 ($cf_dir/cat*)
11591                                         cf_found=yes
11592                                         ;;
11593                                 esac
11594                                 test $cf_found=yes && break
11595                         fi
11596                 done
11597                 # only check the first directory in $MANPATH where we find manpages
11598                 if test -n "$MANPAGE_FORMAT" ; then
11599                         break
11600                 fi
11601         done
11602         # if we did not find the example, just assume it is normal
11603         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11604         IFS="$ac_save_ifs"
11605         ;;
11606 (*)
11607         for cf_option in $MANPAGE_FORMAT; do
11608         case $cf_option in
11609         (gzip|compress|BSDI|normal|formatted|catonly)
11610                 ;;
11611         (*)
11612                 cf_unknown="$cf_unknown $cf_option"
11613                 ;;
11614         esac
11615         done
11616         ;;
11617 esac
11618
11619 echo "$as_me:11619: result: $MANPAGE_FORMAT" >&5
11620 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11621 if test -n "$cf_unknown" ; then
11622         { echo "$as_me:11622: WARNING: Unexpected manpage-format $cf_unknown" >&5
11623 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11624 fi
11625
11626 echo "$as_me:11626: checking for manpage renaming" >&5
11627 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11628
11629 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11630 if test "${with_manpage_renames+set}" = set; then
11631   withval="$with_manpage_renames"
11632   MANPAGE_RENAMES=$withval
11633 else
11634   MANPAGE_RENAMES=yes
11635 fi;
11636
11637 case ".$MANPAGE_RENAMES" in
11638 (.no)
11639         ;;
11640 (.|.yes)
11641         # Debian 'man' program?
11642         if test -f /etc/debian_version ; then
11643                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11644         else
11645                 MANPAGE_RENAMES=no
11646         fi
11647         ;;
11648 esac
11649
11650 if test "$MANPAGE_RENAMES" != no ; then
11651         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11652                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11653         elif test ! -f $MANPAGE_RENAMES ; then
11654                 { { echo "$as_me:11654: error: not a filename: $MANPAGE_RENAMES" >&5
11655 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11656    { (exit 1); exit 1; }; }
11657         fi
11658
11659         test ! -d man && mkdir man
11660
11661         # Construct a sed-script to perform renaming within man-pages
11662         if test -n "$MANPAGE_RENAMES" ; then
11663                 test ! -d man && mkdir man
11664                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11665         fi
11666 fi
11667
11668 echo "$as_me:11668: result: $MANPAGE_RENAMES" >&5
11669 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11670
11671 echo "$as_me:11671: checking if manpage aliases will be installed" >&5
11672 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11673
11674 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11675 if test "${with_manpage_aliases+set}" = set; then
11676   withval="$with_manpage_aliases"
11677   MANPAGE_ALIASES=$withval
11678 else
11679   MANPAGE_ALIASES=yes
11680 fi;
11681
11682 echo "$as_me:11682: result: $MANPAGE_ALIASES" >&5
11683 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11684
11685 case "x$LN_S" in
11686 (xln*)
11687         cf_use_symlinks=yes
11688         ;;
11689 (*)
11690         cf_use_symlinks=no
11691         ;;
11692 esac
11693
11694 MANPAGE_SYMLINKS=no
11695 if test "$MANPAGE_ALIASES" = yes ; then
11696 echo "$as_me:11696: checking if manpage symlinks should be used" >&5
11697 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11698
11699 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11700 if test "${with_manpage_symlinks+set}" = set; then
11701   withval="$with_manpage_symlinks"
11702   MANPAGE_SYMLINKS=$withval
11703 else
11704   MANPAGE_SYMLINKS=$cf_use_symlinks
11705 fi;
11706
11707 if test "$$cf_use_symlinks" = no; then
11708 if test "$MANPAGE_SYMLINKS" = yes ; then
11709         { echo "$as_me:11709: WARNING: cannot make symlinks" >&5
11710 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11711         MANPAGE_SYMLINKS=no
11712 fi
11713 fi
11714
11715 echo "$as_me:11715: result: $MANPAGE_SYMLINKS" >&5
11716 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11717 fi
11718
11719 echo "$as_me:11719: checking for manpage tbl" >&5
11720 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11721
11722 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11723 if test "${with_manpage_tbl+set}" = set; then
11724   withval="$with_manpage_tbl"
11725   MANPAGE_TBL=$withval
11726 else
11727   MANPAGE_TBL=no
11728 fi;
11729
11730 echo "$as_me:11730: result: $MANPAGE_TBL" >&5
11731 echo "${ECHO_T}$MANPAGE_TBL" >&6
11732
11733 if test "$prefix" = "NONE" ; then
11734         cf_prefix="$ac_default_prefix"
11735 else
11736         cf_prefix="$prefix"
11737 fi
11738
11739 case "$MANPAGE_FORMAT" in
11740 (*catonly*)
11741         cf_format=yes
11742         cf_inboth=no
11743         ;;
11744 (*formatted*)
11745         cf_format=yes
11746         cf_inboth=yes
11747         ;;
11748 (*)
11749         cf_format=no
11750         cf_inboth=no
11751         ;;
11752 esac
11753
11754 test ! -d man && mkdir man
11755
11756 cf_so_strip=
11757 cf_compress=
11758 case "$MANPAGE_FORMAT" in
11759 (*compress*)
11760         cf_so_strip="Z"
11761         cf_compress=compress
11762         ;;
11763 (*gzip*)
11764         cf_so_strip="gz"
11765         cf_compress=gzip
11766         ;;
11767 esac
11768
11769 cf_edit_man=./edit_man.sh
11770 cf_man_alias=`pwd`/man_alias.sed
11771
11772 cat >$cf_edit_man <<CF_EOF
11773 #! $SHELL
11774 # this script is generated by the configure-script CF_MAN_PAGES macro.
11775
11776 prefix="$cf_prefix"
11777 datarootdir="$datarootdir"
11778 datadir="$datadir"
11779
11780 NCURSES_MAJOR="$NCURSES_MAJOR"
11781 NCURSES_MINOR="$NCURSES_MINOR"
11782 NCURSES_PATCH="$NCURSES_PATCH"
11783
11784 NCURSES_OSPEED="$NCURSES_OSPEED"
11785 TERMINFO="$TERMINFO"
11786
11787 INSTALL="$INSTALL"
11788 INSTALL_DATA="$INSTALL_DATA"
11789
11790 transform="$program_transform_name"
11791
11792 TMP=\${TMPDIR:=/tmp}/man\$\$
11793 trap "rm -f \$TMP" 0 1 2 5 15
11794
11795 form=\$1
11796 shift || exit 1
11797
11798 verb=\$1
11799 shift || exit 1
11800
11801 mandir=\$1
11802 shift || exit 1
11803
11804 srcdir=\$1
11805 top_srcdir=\$srcdir/..
11806 shift || exit 1
11807
11808 if test "\$form" = normal ; then
11809         if test "$cf_format" = yes ; then
11810         if test "$cf_inboth" = no ; then
11811                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11812                 exit $?
11813         fi
11814         fi
11815         cf_subdir=\$mandir/man
11816         cf_tables=$MANPAGE_TBL
11817 else
11818         cf_subdir=\$mandir/cat
11819         cf_tables=yes
11820 fi
11821
11822 # process the list of source-files
11823 for i in \$* ; do
11824 case \$i in
11825 (*.orig|*.rej) ;;
11826 (*.[0-9]*)
11827         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11828         if test \$verb = installing ; then
11829         if test ! -d \$cf_subdir\${section} ; then
11830                 mkdir -p \$cf_subdir\$section
11831         fi
11832         fi
11833
11834         # replace variables in man page
11835         if test ! -f $cf_man_alias ; then
11836 cat >>$cf_man_alias <<-CF_EOF2
11837                 s,@DATADIR@,\$datadir,g
11838                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11839                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11840                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11841                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11842                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11843                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11844 CF_EOF
11845
11846         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11847         do
11848                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11849                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11850 cat >>$cf_edit_man <<-CF_EOF
11851                 s,@$cf_NAME@,$cf_name,g
11852 CF_EOF
11853         done
11854
11855 cat >>$cf_edit_man <<CF_EOF
11856 CF_EOF2
11857                 echo "...made $cf_man_alias"
11858         fi
11859
11860         aliases=
11861         cf_source=\`basename \$i\`
11862         inalias=\$cf_source
11863         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11864         if test ! -f \$inalias ; then
11865                 echo .. skipped \$cf_source
11866                 continue
11867         fi
11868 CF_EOF
11869
11870 if test "$MANPAGE_ALIASES" != no ; then
11871 cat >>$cf_edit_man <<CF_EOF
11872         nCurses=ignore.3x
11873         test $with_curses_h = yes && nCurses=ncurses.3x
11874         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11875 CF_EOF
11876 fi
11877
11878 if test "$MANPAGE_RENAMES" = no ; then
11879 cat >>$cf_edit_man <<CF_EOF
11880         # perform program transformations for section 1 man pages
11881         if test \$section = 1 ; then
11882                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11883         else
11884                 cf_target=\$cf_subdir\${section}/\$cf_source
11885         fi
11886 CF_EOF
11887 else
11888 cat >>$cf_edit_man <<CF_EOF
11889         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11890         if test -z "\$cf_target" ; then
11891                 echo '? missing rename for '\$cf_source
11892                 cf_target="\$cf_source"
11893         fi
11894         cf_target="\$cf_subdir\${section}/\${cf_target}"
11895
11896 CF_EOF
11897 fi
11898
11899 cat >>$cf_edit_man <<CF_EOF
11900         sed     -f $cf_man_alias \\
11901 CF_EOF
11902
11903 if test -f $MANPAGE_RENAMES ; then
11904 cat >>$cf_edit_man <<CF_EOF
11905                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11906 CF_EOF
11907 else
11908 cat >>$cf_edit_man <<CF_EOF
11909                 < \$i >\$TMP
11910 CF_EOF
11911 fi
11912
11913 cat >>$cf_edit_man <<CF_EOF
11914 if test \$cf_tables = yes ; then
11915         tbl \$TMP >\$TMP.out
11916         mv \$TMP.out \$TMP
11917 fi
11918 CF_EOF
11919
11920 if test $with_overwrite != yes ; then
11921 cat >>$cf_edit_man <<CF_EOF
11922         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11923         mv \$TMP.out \$TMP
11924 CF_EOF
11925 fi
11926
11927 if test $with_curses_h != yes ; then
11928 cat >>$cf_edit_man <<CF_EOF
11929         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11930         mv \$TMP.out \$TMP
11931 CF_EOF
11932 fi
11933
11934 cat >>$cf_edit_man <<CF_EOF
11935         if test \$form = format ; then
11936                 nroff -man \$TMP >\$TMP.out
11937                 mv \$TMP.out \$TMP
11938         fi
11939 CF_EOF
11940
11941 if test -n "$cf_compress" ; then
11942 cat >>$cf_edit_man <<CF_EOF
11943         if test \$verb = installing ; then
11944         if ( $cf_compress -f \$TMP )
11945         then
11946                 mv \$TMP.$cf_so_strip \$TMP
11947         fi
11948         fi
11949         cf_target="\$cf_target.$cf_so_strip"
11950 CF_EOF
11951 fi
11952
11953 case "$MANPAGE_FORMAT" in
11954 (*BSDI*)
11955 cat >>$cf_edit_man <<CF_EOF
11956         if test \$form = format ; then
11957                 # BSDI installs only .0 suffixes in the cat directories
11958                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11959         fi
11960 CF_EOF
11961   ;;
11962 esac
11963
11964 cat >>$cf_edit_man <<CF_EOF
11965         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11966         if test \$verb = installing ; then
11967                 echo \$verb \$cf_target
11968                 \$INSTALL_DATA \$TMP \$cf_target
11969                 test -d \$cf_subdir\${section} &&
11970                 test -n "\$aliases" && (
11971                         cd \$cf_subdir\${section} && (
11972                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11973                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11974                                 cf_target=\`basename \$cf_target\`
11975                                 for cf_alias in \$aliases
11976                                 do
11977                                         if test \$section = 1 ; then
11978                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11979                                         fi
11980
11981                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11982                                                 if test -f \$cf_alias\${suffix} ; then
11983                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11984                                                         then
11985                                                                 continue
11986                                                         fi
11987                                                 fi
11988                                                 echo .. \$verb alias \$cf_alias\${suffix}
11989 CF_EOF
11990 case "x$LN_S" in
11991 (*-f)
11992 cat >>$cf_edit_man <<CF_EOF
11993                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11994 CF_EOF
11995         ;;
11996 (*)
11997 cat >>$cf_edit_man <<CF_EOF
11998                                                 rm -f \$cf_alias\${suffix}
11999                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12000 CF_EOF
12001         ;;
12002 esac
12003 cat >>$cf_edit_man <<CF_EOF
12004                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12005                                                 echo ".so \$cf_source" >\$TMP
12006 CF_EOF
12007 if test -n "$cf_compress" ; then
12008 cat >>$cf_edit_man <<CF_EOF
12009                                                 if test -n "$cf_so_strip" ; then
12010                                                         $cf_compress -f \$TMP
12011                                                         mv \$TMP.$cf_so_strip \$TMP
12012                                                 fi
12013 CF_EOF
12014 fi
12015 cat >>$cf_edit_man <<CF_EOF
12016                                                 echo .. \$verb alias \$cf_alias\${suffix}
12017                                                 rm -f \$cf_alias\${suffix}
12018                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12019                                         fi
12020                                 done
12021                         )
12022                 )
12023         elif test \$verb = removing ; then
12024                 test -f \$cf_target && (
12025                         echo \$verb \$cf_target
12026                         rm -f \$cf_target
12027                 )
12028                 test -d \$cf_subdir\${section} &&
12029                 test -n "\$aliases" && (
12030                         cd \$cf_subdir\${section} && (
12031                                 for cf_alias in \$aliases
12032                                 do
12033                                         if test \$section = 1 ; then
12034                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12035                                         fi
12036
12037                                         echo .. \$verb alias \$cf_alias\${suffix}
12038                                         rm -f \$cf_alias\${suffix}
12039                                 done
12040                         )
12041                 )
12042         else
12043 #               echo ".hy 0"
12044                 cat \$TMP
12045         fi
12046         ;;
12047 esac
12048 done
12049
12050 if test $cf_inboth = yes ; then
12051 if test \$form != format ; then
12052         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12053 fi
12054 fi
12055
12056 exit 0
12057 CF_EOF
12058 chmod 755 $cf_edit_man
12059
12060 ###############################################################################
12061
12062 ### Note that some functions (such as const) are normally disabled anyway.
12063 echo "$as_me:12063: checking if you want to build with function extensions" >&5
12064 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12065
12066 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12067 if test "${enable_ext_funcs+set}" = set; then
12068   enableval="$enable_ext_funcs"
12069   with_ext_funcs=$enableval
12070 else
12071   with_ext_funcs=yes
12072 fi;
12073 echo "$as_me:12073: result: $with_ext_funcs" >&5
12074 echo "${ECHO_T}$with_ext_funcs" >&6
12075 if test "x$with_ext_funcs" = xyes ; then
12076         NCURSES_EXT_FUNCS=1
12077
12078 cat >>confdefs.h <<\EOF
12079 #define NCURSES_EXT_FUNCS 1
12080 EOF
12081
12082 cat >>confdefs.h <<\EOF
12083 #define HAVE_ASSUME_DEFAULT_COLORS 1
12084 EOF
12085
12086 cat >>confdefs.h <<\EOF
12087 #define HAVE_CURSES_VERSION 1
12088 EOF
12089
12090 cat >>confdefs.h <<\EOF
12091 #define HAVE_HAS_KEY 1
12092 EOF
12093
12094 cat >>confdefs.h <<\EOF
12095 #define HAVE_RESIZETERM 1
12096 EOF
12097
12098 cat >>confdefs.h <<\EOF
12099 #define HAVE_RESIZE_TERM 1
12100 EOF
12101
12102 cat >>confdefs.h <<\EOF
12103 #define HAVE_TERM_ENTRY_H 1
12104 EOF
12105
12106 cat >>confdefs.h <<\EOF
12107 #define HAVE_USE_DEFAULT_COLORS 1
12108 EOF
12109
12110 cat >>confdefs.h <<\EOF
12111 #define HAVE_USE_EXTENDED_NAMES 1
12112 EOF
12113
12114 cat >>confdefs.h <<\EOF
12115 #define HAVE_USE_SCREEN 1
12116 EOF
12117
12118 cat >>confdefs.h <<\EOF
12119 #define HAVE_USE_WINDOW 1
12120 EOF
12121
12122 cat >>confdefs.h <<\EOF
12123 #define HAVE_WRESIZE 1
12124 EOF
12125
12126         GENERATED_EXT_FUNCS=generated
12127         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12128 else
12129         NCURSES_EXT_FUNCS=0
12130         GENERATED_EXT_FUNCS=
12131 fi
12132
12133 echo "$as_me:12133: checking if you want to build with SCREEN extensions" >&5
12134 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12135
12136 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12137 if test "${enable_sp_funcs+set}" = set; then
12138   enableval="$enable_sp_funcs"
12139   with_sp_funcs=$enableval
12140 else
12141   with_sp_funcs=$cf_dft_ext_spfuncs
12142 fi;
12143 echo "$as_me:12143: result: $with_sp_funcs" >&5
12144 echo "${ECHO_T}$with_sp_funcs" >&6
12145 if test "x$with_sp_funcs" = xyes ; then
12146         NCURSES_SP_FUNCS=1
12147
12148 cat >>confdefs.h <<\EOF
12149 #define NCURSES_SP_FUNCS 1
12150 EOF
12151
12152 cat >>confdefs.h <<\EOF
12153 #define HAVE_TPUTS_SP 1
12154 EOF
12155
12156         GENERATED_SP_FUNCS=generated
12157 else
12158         NCURSES_SP_FUNCS=0
12159         GENERATED_SP_FUNCS=
12160 fi
12161
12162 echo "$as_me:12162: checking if you want to build with terminal-driver" >&5
12163 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12164
12165 # Check whether --enable-term-driver or --disable-term-driver was given.
12166 if test "${enable_term_driver+set}" = set; then
12167   enableval="$enable_term_driver"
12168   with_term_driver=$enableval
12169 else
12170   with_term_driver=no
12171 fi;
12172 echo "$as_me:12172: result: $with_term_driver" >&5
12173 echo "${ECHO_T}$with_term_driver" >&6
12174 if test "x$with_term_driver" = xyes ; then
12175
12176 cat >>confdefs.h <<\EOF
12177 #define USE_TERM_DRIVER 1
12178 EOF
12179
12180         if test "x$with_termlib" != xno ; then
12181                 { { echo "$as_me:12181: error: The term-driver option conflicts with the termlib option" >&5
12182 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12183    { (exit 1); exit 1; }; }
12184         fi
12185         if test "x$with_sp_funcs" != xyes ; then
12186                 { { echo "$as_me:12186: error: The term-driver option relies upon sp-funcs" >&5
12187 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12188    { (exit 1); exit 1; }; }
12189         fi
12190 fi
12191
12192 ###   use option --enable-const to turn on use of const beyond that in XSI.
12193 echo "$as_me:12193: checking for extended use of const keyword" >&5
12194 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12195
12196 # Check whether --enable-const or --disable-const was given.
12197 if test "${enable_const+set}" = set; then
12198   enableval="$enable_const"
12199   with_ext_const=$enableval
12200 else
12201   with_ext_const=$cf_dft_ext_const
12202 fi;
12203 echo "$as_me:12203: result: $with_ext_const" >&5
12204 echo "${ECHO_T}$with_ext_const" >&6
12205 NCURSES_CONST='/*nothing*/'
12206 if test "x$with_ext_const" = xyes ; then
12207         NCURSES_CONST=const
12208 fi
12209
12210 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12211 echo "$as_me:12211: checking if you want to use extended colors" >&5
12212 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12213
12214 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12215 if test "${enable_ext_colors+set}" = set; then
12216   enableval="$enable_ext_colors"
12217   with_ext_colors=$enableval
12218 else
12219   with_ext_colors=$cf_dft_ext_colors
12220 fi;
12221 echo "$as_me:12221: result: $with_ext_colors" >&5
12222 echo "${ECHO_T}$with_ext_colors" >&6
12223 NCURSES_EXT_COLORS=0
12224 if test "x$with_ext_colors" = xyes ; then
12225         if test "x$with_widec" != xyes ; then
12226                 { echo "$as_me:12226: WARNING: This option applies only to wide-character library" >&5
12227 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12228         else
12229                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12230
12231 if test "${with_abi_version+set}" != set; then
12232         case $cf_cv_rel_version in
12233         (5.*)
12234                 cf_cv_rel_version=6.0
12235                 cf_cv_abi_version=6
12236                 { echo "$as_me:12236: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12237 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12238                 ;;
12239         esac
12240 fi
12241
12242                 NCURSES_EXT_COLORS=1
12243
12244 cat >>confdefs.h <<\EOF
12245 #define NCURSES_EXT_COLORS 1
12246 EOF
12247
12248 cat >>confdefs.h <<\EOF
12249 #define HAVE_ALLOC_PAIR 1
12250 EOF
12251
12252 cat >>confdefs.h <<\EOF
12253 #define HAVE_INIT_EXTENDED_COLOR 1
12254 EOF
12255
12256         fi
12257 fi
12258
12259 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12260 echo "$as_me:12260: checking if you want to use extended mouse encoding" >&5
12261 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12262
12263 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12264 if test "${enable_ext_mouse+set}" = set; then
12265   enableval="$enable_ext_mouse"
12266   with_ext_mouse=$enableval
12267 else
12268   with_ext_mouse=$cf_dft_ext_mouse
12269 fi;
12270 echo "$as_me:12270: result: $with_ext_mouse" >&5
12271 echo "${ECHO_T}$with_ext_mouse" >&6
12272 NCURSES_MOUSE_VERSION=1
12273 if test "x$with_ext_mouse" = xyes ; then
12274         NCURSES_MOUSE_VERSION=2
12275
12276 if test "${with_abi_version+set}" != set; then
12277         case $cf_cv_rel_version in
12278         (5.*)
12279                 cf_cv_rel_version=6.0
12280                 cf_cv_abi_version=6
12281                 { echo "$as_me:12281: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12282 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12283                 ;;
12284         esac
12285 fi
12286
12287 fi
12288
12289 ###   use option --enable-ext-putwin to turn on extended screendumps
12290 echo "$as_me:12290: checking if you want to use extended putwin/screendump" >&5
12291 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12292
12293 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12294 if test "${enable_ext_putwin+set}" = set; then
12295   enableval="$enable_ext_putwin"
12296   with_ext_putwin=$enableval
12297 else
12298   with_ext_putwin=$cf_dft_ext_putwin
12299 fi;
12300 echo "$as_me:12300: result: $with_ext_putwin" >&5
12301 echo "${ECHO_T}$with_ext_putwin" >&6
12302 if test "x$with_ext_putwin" = xyes ; then
12303
12304 cat >>confdefs.h <<\EOF
12305 #define NCURSES_EXT_PUTWIN 1
12306 EOF
12307
12308 fi
12309
12310 echo "$as_me:12310: checking if you want \$NCURSES_NO_PADDING code" >&5
12311 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12312
12313 # Check whether --enable-no-padding or --disable-no-padding was given.
12314 if test "${enable_no_padding+set}" = set; then
12315   enableval="$enable_no_padding"
12316   with_no_padding=$enableval
12317 else
12318   with_no_padding=$with_ext_funcs
12319 fi;
12320 echo "$as_me:12320: result: $with_no_padding" >&5
12321 echo "${ECHO_T}$with_no_padding" >&6
12322 test "x$with_no_padding" = xyes &&
12323 cat >>confdefs.h <<\EOF
12324 #define NCURSES_NO_PADDING 1
12325 EOF
12326
12327 echo "$as_me:12327: checking for ANSI C header files" >&5
12328 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12329 if test "${ac_cv_header_stdc+set}" = set; then
12330   echo $ECHO_N "(cached) $ECHO_C" >&6
12331 else
12332   cat >conftest.$ac_ext <<_ACEOF
12333 #line 12333 "configure"
12334 #include "confdefs.h"
12335 #include <stdlib.h>
12336 #include <stdarg.h>
12337 #include <string.h>
12338 #include <float.h>
12339
12340 _ACEOF
12341 if { (eval echo "$as_me:12341: \"$ac_cpp conftest.$ac_ext\"") >&5
12342   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12343   ac_status=$?
12344   egrep -v '^ *\+' conftest.er1 >conftest.err
12345   rm -f conftest.er1
12346   cat conftest.err >&5
12347   echo "$as_me:12347: \$? = $ac_status" >&5
12348   (exit $ac_status); } >/dev/null; then
12349   if test -s conftest.err; then
12350     ac_cpp_err=$ac_c_preproc_warn_flag
12351   else
12352     ac_cpp_err=
12353   fi
12354 else
12355   ac_cpp_err=yes
12356 fi
12357 if test -z "$ac_cpp_err"; then
12358   ac_cv_header_stdc=yes
12359 else
12360   echo "$as_me: failed program was:" >&5
12361   cat conftest.$ac_ext >&5
12362   ac_cv_header_stdc=no
12363 fi
12364 rm -f conftest.err conftest.$ac_ext
12365
12366 if test $ac_cv_header_stdc = yes; then
12367   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12368   cat >conftest.$ac_ext <<_ACEOF
12369 #line 12369 "configure"
12370 #include "confdefs.h"
12371 #include <string.h>
12372
12373 _ACEOF
12374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12375   egrep "memchr" >/dev/null 2>&1; then
12376   :
12377 else
12378   ac_cv_header_stdc=no
12379 fi
12380 rm -rf conftest*
12381
12382 fi
12383
12384 if test $ac_cv_header_stdc = yes; then
12385   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12386   cat >conftest.$ac_ext <<_ACEOF
12387 #line 12387 "configure"
12388 #include "confdefs.h"
12389 #include <stdlib.h>
12390
12391 _ACEOF
12392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12393   egrep "free" >/dev/null 2>&1; then
12394   :
12395 else
12396   ac_cv_header_stdc=no
12397 fi
12398 rm -rf conftest*
12399
12400 fi
12401
12402 if test $ac_cv_header_stdc = yes; then
12403   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12404   if test "$cross_compiling" = yes; then
12405   :
12406 else
12407   cat >conftest.$ac_ext <<_ACEOF
12408 #line 12408 "configure"
12409 #include "confdefs.h"
12410 #include <ctype.h>
12411 #if ((' ' & 0x0FF) == 0x020)
12412 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12413 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12414 #else
12415 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12416                      || ('j' <= (c) && (c) <= 'r') \
12417                      || ('s' <= (c) && (c) <= 'z'))
12418 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12419 #endif
12420
12421 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12422 int
12423 main ()
12424 {
12425   int i;
12426   for (i = 0; i < 256; i++)
12427     if (XOR (islower (i), ISLOWER (i))
12428         || toupper (i) != TOUPPER (i))
12429       $ac_main_return(2);
12430   $ac_main_return (0);
12431 }
12432 _ACEOF
12433 rm -f conftest$ac_exeext
12434 if { (eval echo "$as_me:12434: \"$ac_link\"") >&5
12435   (eval $ac_link) 2>&5
12436   ac_status=$?
12437   echo "$as_me:12437: \$? = $ac_status" >&5
12438   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12439   { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440   (eval $ac_try) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); }; }; then
12444   :
12445 else
12446   echo "$as_me: program exited with status $ac_status" >&5
12447 echo "$as_me: failed program was:" >&5
12448 cat conftest.$ac_ext >&5
12449 ac_cv_header_stdc=no
12450 fi
12451 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12452 fi
12453 fi
12454 fi
12455 echo "$as_me:12455: result: $ac_cv_header_stdc" >&5
12456 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12457 if test $ac_cv_header_stdc = yes; then
12458
12459 cat >>confdefs.h <<\EOF
12460 #define STDC_HEADERS 1
12461 EOF
12462
12463 fi
12464
12465 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12466
12467 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12468                   inttypes.h stdint.h unistd.h
12469 do
12470 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12471 echo "$as_me:12471: checking for $ac_header" >&5
12472 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12473 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12474   echo $ECHO_N "(cached) $ECHO_C" >&6
12475 else
12476   cat >conftest.$ac_ext <<_ACEOF
12477 #line 12477 "configure"
12478 #include "confdefs.h"
12479 $ac_includes_default
12480 #include <$ac_header>
12481 _ACEOF
12482 rm -f conftest.$ac_objext
12483 if { (eval echo "$as_me:12483: \"$ac_compile\"") >&5
12484   (eval $ac_compile) 2>&5
12485   ac_status=$?
12486   echo "$as_me:12486: \$? = $ac_status" >&5
12487   (exit $ac_status); } &&
12488          { ac_try='test -s conftest.$ac_objext'
12489   { (eval echo "$as_me:12489: \"$ac_try\"") >&5
12490   (eval $ac_try) 2>&5
12491   ac_status=$?
12492   echo "$as_me:12492: \$? = $ac_status" >&5
12493   (exit $ac_status); }; }; then
12494   eval "$as_ac_Header=yes"
12495 else
12496   echo "$as_me: failed program was:" >&5
12497 cat conftest.$ac_ext >&5
12498 eval "$as_ac_Header=no"
12499 fi
12500 rm -f conftest.$ac_objext conftest.$ac_ext
12501 fi
12502 echo "$as_me:12502: result: `eval echo '${'$as_ac_Header'}'`" >&5
12503 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12504 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12505   cat >>confdefs.h <<EOF
12506 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12507 EOF
12508
12509 fi
12510 done
12511
12512 echo "$as_me:12512: checking for signed char" >&5
12513 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12514 if test "${ac_cv_type_signed_char+set}" = set; then
12515   echo $ECHO_N "(cached) $ECHO_C" >&6
12516 else
12517   cat >conftest.$ac_ext <<_ACEOF
12518 #line 12518 "configure"
12519 #include "confdefs.h"
12520 $ac_includes_default
12521 int
12522 main ()
12523 {
12524 if ((signed char *) 0)
12525   return 0;
12526 if (sizeof (signed char))
12527   return 0;
12528   ;
12529   return 0;
12530 }
12531 _ACEOF
12532 rm -f conftest.$ac_objext
12533 if { (eval echo "$as_me:12533: \"$ac_compile\"") >&5
12534   (eval $ac_compile) 2>&5
12535   ac_status=$?
12536   echo "$as_me:12536: \$? = $ac_status" >&5
12537   (exit $ac_status); } &&
12538          { ac_try='test -s conftest.$ac_objext'
12539   { (eval echo "$as_me:12539: \"$ac_try\"") >&5
12540   (eval $ac_try) 2>&5
12541   ac_status=$?
12542   echo "$as_me:12542: \$? = $ac_status" >&5
12543   (exit $ac_status); }; }; then
12544   ac_cv_type_signed_char=yes
12545 else
12546   echo "$as_me: failed program was:" >&5
12547 cat conftest.$ac_ext >&5
12548 ac_cv_type_signed_char=no
12549 fi
12550 rm -f conftest.$ac_objext conftest.$ac_ext
12551 fi
12552 echo "$as_me:12552: result: $ac_cv_type_signed_char" >&5
12553 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12554
12555 echo "$as_me:12555: checking size of signed char" >&5
12556 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12557 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12558   echo $ECHO_N "(cached) $ECHO_C" >&6
12559 else
12560   if test "$ac_cv_type_signed_char" = yes; then
12561   if test "$cross_compiling" = yes; then
12562   # Depending upon the size, compute the lo and hi bounds.
12563 cat >conftest.$ac_ext <<_ACEOF
12564 #line 12564 "configure"
12565 #include "confdefs.h"
12566 $ac_includes_default
12567 int
12568 main ()
12569 {
12570 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12571   ;
12572   return 0;
12573 }
12574 _ACEOF
12575 rm -f conftest.$ac_objext
12576 if { (eval echo "$as_me:12576: \"$ac_compile\"") >&5
12577   (eval $ac_compile) 2>&5
12578   ac_status=$?
12579   echo "$as_me:12579: \$? = $ac_status" >&5
12580   (exit $ac_status); } &&
12581          { ac_try='test -s conftest.$ac_objext'
12582   { (eval echo "$as_me:12582: \"$ac_try\"") >&5
12583   (eval $ac_try) 2>&5
12584   ac_status=$?
12585   echo "$as_me:12585: \$? = $ac_status" >&5
12586   (exit $ac_status); }; }; then
12587   ac_lo=0 ac_mid=0
12588   while :; do
12589     cat >conftest.$ac_ext <<_ACEOF
12590 #line 12590 "configure"
12591 #include "confdefs.h"
12592 $ac_includes_default
12593 int
12594 main ()
12595 {
12596 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12597   ;
12598   return 0;
12599 }
12600 _ACEOF
12601 rm -f conftest.$ac_objext
12602 if { (eval echo "$as_me:12602: \"$ac_compile\"") >&5
12603   (eval $ac_compile) 2>&5
12604   ac_status=$?
12605   echo "$as_me:12605: \$? = $ac_status" >&5
12606   (exit $ac_status); } &&
12607          { ac_try='test -s conftest.$ac_objext'
12608   { (eval echo "$as_me:12608: \"$ac_try\"") >&5
12609   (eval $ac_try) 2>&5
12610   ac_status=$?
12611   echo "$as_me:12611: \$? = $ac_status" >&5
12612   (exit $ac_status); }; }; then
12613   ac_hi=$ac_mid; break
12614 else
12615   echo "$as_me: failed program was:" >&5
12616 cat conftest.$ac_ext >&5
12617 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12618 fi
12619 rm -f conftest.$ac_objext conftest.$ac_ext
12620   done
12621 else
12622   echo "$as_me: failed program was:" >&5
12623 cat conftest.$ac_ext >&5
12624 ac_hi=-1 ac_mid=-1
12625   while :; do
12626     cat >conftest.$ac_ext <<_ACEOF
12627 #line 12627 "configure"
12628 #include "confdefs.h"
12629 $ac_includes_default
12630 int
12631 main ()
12632 {
12633 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12634   ;
12635   return 0;
12636 }
12637 _ACEOF
12638 rm -f conftest.$ac_objext
12639 if { (eval echo "$as_me:12639: \"$ac_compile\"") >&5
12640   (eval $ac_compile) 2>&5
12641   ac_status=$?
12642   echo "$as_me:12642: \$? = $ac_status" >&5
12643   (exit $ac_status); } &&
12644          { ac_try='test -s conftest.$ac_objext'
12645   { (eval echo "$as_me:12645: \"$ac_try\"") >&5
12646   (eval $ac_try) 2>&5
12647   ac_status=$?
12648   echo "$as_me:12648: \$? = $ac_status" >&5
12649   (exit $ac_status); }; }; then
12650   ac_lo=$ac_mid; break
12651 else
12652   echo "$as_me: failed program was:" >&5
12653 cat conftest.$ac_ext >&5
12654 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12655 fi
12656 rm -f conftest.$ac_objext conftest.$ac_ext
12657   done
12658 fi
12659 rm -f conftest.$ac_objext conftest.$ac_ext
12660 # Binary search between lo and hi bounds.
12661 while test "x$ac_lo" != "x$ac_hi"; do
12662   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12663   cat >conftest.$ac_ext <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12666 $ac_includes_default
12667 int
12668 main ()
12669 {
12670 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12671   ;
12672   return 0;
12673 }
12674 _ACEOF
12675 rm -f conftest.$ac_objext
12676 if { (eval echo "$as_me:12676: \"$ac_compile\"") >&5
12677   (eval $ac_compile) 2>&5
12678   ac_status=$?
12679   echo "$as_me:12679: \$? = $ac_status" >&5
12680   (exit $ac_status); } &&
12681          { ac_try='test -s conftest.$ac_objext'
12682   { (eval echo "$as_me:12682: \"$ac_try\"") >&5
12683   (eval $ac_try) 2>&5
12684   ac_status=$?
12685   echo "$as_me:12685: \$? = $ac_status" >&5
12686   (exit $ac_status); }; }; then
12687   ac_hi=$ac_mid
12688 else
12689   echo "$as_me: failed program was:" >&5
12690 cat conftest.$ac_ext >&5
12691 ac_lo=`expr $ac_mid + 1`
12692 fi
12693 rm -f conftest.$ac_objext conftest.$ac_ext
12694 done
12695 ac_cv_sizeof_signed_char=$ac_lo
12696 else
12697   if test "$cross_compiling" = yes; then
12698   { { echo "$as_me:12698: error: cannot run test program while cross compiling" >&5
12699 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12700    { (exit 1); exit 1; }; }
12701 else
12702   cat >conftest.$ac_ext <<_ACEOF
12703 #line 12703 "configure"
12704 #include "confdefs.h"
12705 $ac_includes_default
12706 int
12707 main ()
12708 {
12709 FILE *f = fopen ("conftest.val", "w");
12710 if (!f)
12711   $ac_main_return (1);
12712 fprintf (f, "%d", (sizeof (signed char)));
12713 fclose (f);
12714   ;
12715   return 0;
12716 }
12717 _ACEOF
12718 rm -f conftest$ac_exeext
12719 if { (eval echo "$as_me:12719: \"$ac_link\"") >&5
12720   (eval $ac_link) 2>&5
12721   ac_status=$?
12722   echo "$as_me:12722: \$? = $ac_status" >&5
12723   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12724   { (eval echo "$as_me:12724: \"$ac_try\"") >&5
12725   (eval $ac_try) 2>&5
12726   ac_status=$?
12727   echo "$as_me:12727: \$? = $ac_status" >&5
12728   (exit $ac_status); }; }; then
12729   ac_cv_sizeof_signed_char=`cat conftest.val`
12730 else
12731   echo "$as_me: program exited with status $ac_status" >&5
12732 echo "$as_me: failed program was:" >&5
12733 cat conftest.$ac_ext >&5
12734 fi
12735 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12736 fi
12737 fi
12738 rm -f conftest.val
12739 else
12740   ac_cv_sizeof_signed_char=0
12741 fi
12742 fi
12743 echo "$as_me:12743: result: $ac_cv_sizeof_signed_char" >&5
12744 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12745 cat >>confdefs.h <<EOF
12746 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12747 EOF
12748
12749 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12750         NCURSES_SBOOL="signed char"
12751 else
12752         NCURSES_SBOOL="char"
12753 fi
12754 echo "$as_me:12754: checking if you want to use signed Boolean array in term.h" >&5
12755 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12756
12757 # Check whether --enable-signed-char or --disable-signed-char was given.
12758 if test "${enable_signed_char+set}" = set; then
12759   enableval="$enable_signed_char"
12760   with_signed_char=$enableval
12761 else
12762   with_signed_char=no
12763 fi;
12764 echo "$as_me:12764: result: $with_signed_char" >&5
12765 echo "${ECHO_T}$with_signed_char" >&6
12766 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12767
12768 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12769 echo "$as_me:12769: checking if you want SIGWINCH handler" >&5
12770 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12771
12772 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12773 if test "${enable_sigwinch+set}" = set; then
12774   enableval="$enable_sigwinch"
12775   with_sigwinch=$enableval
12776 else
12777   with_sigwinch=$with_ext_funcs
12778 fi;
12779 echo "$as_me:12779: result: $with_sigwinch" >&5
12780 echo "${ECHO_T}$with_sigwinch" >&6
12781 test "x$with_sigwinch" = xyes &&
12782 cat >>confdefs.h <<\EOF
12783 #define USE_SIGWINCH 1
12784 EOF
12785
12786 ###   use option --enable-tcap-names to allow user to define new capabilities
12787 echo "$as_me:12787: checking if you want user-definable terminal capabilities like termcap" >&5
12788 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12789
12790 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12791 if test "${enable_tcap_names+set}" = set; then
12792   enableval="$enable_tcap_names"
12793   with_tcap_names=$enableval
12794 else
12795   with_tcap_names=$with_ext_funcs
12796 fi;
12797 echo "$as_me:12797: result: $with_tcap_names" >&5
12798 echo "${ECHO_T}$with_tcap_names" >&6
12799 NCURSES_XNAMES=0
12800 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12801
12802 ##############################################################################
12803
12804 echo "$as_me:12804: checking if you want to link with the pthread library" >&5
12805 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12806
12807 # Check whether --with-pthread or --without-pthread was given.
12808 if test "${with_pthread+set}" = set; then
12809   withval="$with_pthread"
12810   with_pthread=$withval
12811 else
12812   with_pthread=no
12813 fi;
12814 echo "$as_me:12814: result: $with_pthread" >&5
12815 echo "${ECHO_T}$with_pthread" >&6
12816
12817 if test "$with_pthread" != no ; then
12818         echo "$as_me:12818: checking for pthread.h" >&5
12819 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12820 if test "${ac_cv_header_pthread_h+set}" = set; then
12821   echo $ECHO_N "(cached) $ECHO_C" >&6
12822 else
12823   cat >conftest.$ac_ext <<_ACEOF
12824 #line 12824 "configure"
12825 #include "confdefs.h"
12826 #include <pthread.h>
12827 _ACEOF
12828 if { (eval echo "$as_me:12828: \"$ac_cpp conftest.$ac_ext\"") >&5
12829   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12830   ac_status=$?
12831   egrep -v '^ *\+' conftest.er1 >conftest.err
12832   rm -f conftest.er1
12833   cat conftest.err >&5
12834   echo "$as_me:12834: \$? = $ac_status" >&5
12835   (exit $ac_status); } >/dev/null; then
12836   if test -s conftest.err; then
12837     ac_cpp_err=$ac_c_preproc_warn_flag
12838   else
12839     ac_cpp_err=
12840   fi
12841 else
12842   ac_cpp_err=yes
12843 fi
12844 if test -z "$ac_cpp_err"; then
12845   ac_cv_header_pthread_h=yes
12846 else
12847   echo "$as_me: failed program was:" >&5
12848   cat conftest.$ac_ext >&5
12849   ac_cv_header_pthread_h=no
12850 fi
12851 rm -f conftest.err conftest.$ac_ext
12852 fi
12853 echo "$as_me:12853: result: $ac_cv_header_pthread_h" >&5
12854 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12855 if test $ac_cv_header_pthread_h = yes; then
12856
12857 cat >>confdefs.h <<\EOF
12858 #define HAVE_PTHREADS_H 1
12859 EOF
12860
12861         for cf_lib_pthread in pthread c_r
12862         do
12863             echo "$as_me:12863: checking if we can link with the $cf_lib_pthread library" >&5
12864 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12865             cf_save_LIBS="$LIBS"
12866
12867 cf_add_libs="-l$cf_lib_pthread"
12868 # Filter out duplicates - this happens with badly-designed ".pc" files...
12869 for cf_add_1lib in $LIBS
12870 do
12871         for cf_add_2lib in $cf_add_libs
12872         do
12873                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12874                 then
12875                         cf_add_1lib=
12876                         break
12877                 fi
12878         done
12879         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12880 done
12881 LIBS="$cf_add_libs"
12882
12883             cat >conftest.$ac_ext <<_ACEOF
12884 #line 12884 "configure"
12885 #include "confdefs.h"
12886
12887 #include <pthread.h>
12888
12889 int
12890 main ()
12891 {
12892
12893                 int rc = pthread_create(0,0,0,0);
12894                 int r2 = pthread_mutexattr_settype(0, 0);
12895
12896   ;
12897   return 0;
12898 }
12899 _ACEOF
12900 rm -f conftest.$ac_objext conftest$ac_exeext
12901 if { (eval echo "$as_me:12901: \"$ac_link\"") >&5
12902   (eval $ac_link) 2>&5
12903   ac_status=$?
12904   echo "$as_me:12904: \$? = $ac_status" >&5
12905   (exit $ac_status); } &&
12906          { ac_try='test -s conftest$ac_exeext'
12907   { (eval echo "$as_me:12907: \"$ac_try\"") >&5
12908   (eval $ac_try) 2>&5
12909   ac_status=$?
12910   echo "$as_me:12910: \$? = $ac_status" >&5
12911   (exit $ac_status); }; }; then
12912   with_pthread=yes
12913 else
12914   echo "$as_me: failed program was:" >&5
12915 cat conftest.$ac_ext >&5
12916 with_pthread=no
12917 fi
12918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12919             LIBS="$cf_save_LIBS"
12920             echo "$as_me:12920: result: $with_pthread" >&5
12921 echo "${ECHO_T}$with_pthread" >&6
12922             test "$with_pthread" = yes && break
12923         done
12924
12925         if test "$with_pthread" = yes ; then
12926
12927 cf_add_libs="-l$cf_lib_pthread"
12928 # Filter out duplicates - this happens with badly-designed ".pc" files...
12929 for cf_add_1lib in $LIBS
12930 do
12931         for cf_add_2lib in $cf_add_libs
12932         do
12933                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12934                 then
12935                         cf_add_1lib=
12936                         break
12937                 fi
12938         done
12939         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12940 done
12941 LIBS="$cf_add_libs"
12942
12943 cat >>confdefs.h <<\EOF
12944 #define HAVE_LIBPTHREADS 1
12945 EOF
12946
12947         else
12948             { { echo "$as_me:12948: error: Cannot link with pthread library" >&5
12949 echo "$as_me: error: Cannot link with pthread library" >&2;}
12950    { (exit 1); exit 1; }; }
12951         fi
12952
12953 fi
12954
12955 fi
12956
12957 if test "x$with_pthread" != xno; then
12958         echo "$as_me:12958: checking for pthread_kill" >&5
12959 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12960 if test "${ac_cv_func_pthread_kill+set}" = set; then
12961   echo $ECHO_N "(cached) $ECHO_C" >&6
12962 else
12963   cat >conftest.$ac_ext <<_ACEOF
12964 #line 12964 "configure"
12965 #include "confdefs.h"
12966 /* System header to define __stub macros and hopefully few prototypes,
12967     which can conflict with char pthread_kill (); below.  */
12968 #include <assert.h>
12969 /* Override any gcc2 internal prototype to avoid an error.  */
12970 #ifdef __cplusplus
12971 extern "C"
12972 #endif
12973 /* We use char because int might match the return type of a gcc2
12974    builtin and then its argument prototype would still apply.  */
12975 char pthread_kill ();
12976 char (*f) ();
12977
12978 int
12979 main ()
12980 {
12981 /* The GNU C library defines this for functions which it implements
12982     to always fail with ENOSYS.  Some functions are actually named
12983     something starting with __ and the normal name is an alias.  */
12984 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12985 choke me
12986 #else
12987 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12988 #endif
12989
12990   ;
12991   return 0;
12992 }
12993 _ACEOF
12994 rm -f conftest.$ac_objext conftest$ac_exeext
12995 if { (eval echo "$as_me:12995: \"$ac_link\"") >&5
12996   (eval $ac_link) 2>&5
12997   ac_status=$?
12998   echo "$as_me:12998: \$? = $ac_status" >&5
12999   (exit $ac_status); } &&
13000          { ac_try='test -s conftest$ac_exeext'
13001   { (eval echo "$as_me:13001: \"$ac_try\"") >&5
13002   (eval $ac_try) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit $ac_status); }; }; then
13006   ac_cv_func_pthread_kill=yes
13007 else
13008   echo "$as_me: failed program was:" >&5
13009 cat conftest.$ac_ext >&5
13010 ac_cv_func_pthread_kill=no
13011 fi
13012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13013 fi
13014 echo "$as_me:13014: result: $ac_cv_func_pthread_kill" >&5
13015 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13016 if test $ac_cv_func_pthread_kill = yes; then
13017
13018                 echo "$as_me:13018: checking if you want to allow EINTR in wgetch with pthreads" >&5
13019 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13020
13021 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13022 if test "${enable_pthreads_eintr+set}" = set; then
13023   enableval="$enable_pthreads_eintr"
13024   use_pthreads_eintr=$enableval
13025 else
13026   use_pthreads_eintr=no
13027 fi;
13028                 echo "$as_me:13028: result: $use_pthreads_eintr" >&5
13029 echo "${ECHO_T}$use_pthreads_eintr" >&6
13030                 if test "x$use_pthreads_eintr" = xyes ; then
13031
13032 cat >>confdefs.h <<\EOF
13033 #define USE_PTHREADS_EINTR 1
13034 EOF
13035
13036                 fi
13037 fi
13038
13039         echo "$as_me:13039: checking if you want to use weak-symbols for pthreads" >&5
13040 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13041
13042 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13043 if test "${enable_weak_symbols+set}" = set; then
13044   enableval="$enable_weak_symbols"
13045   use_weak_symbols=$enableval
13046 else
13047   use_weak_symbols=no
13048 fi;
13049         echo "$as_me:13049: result: $use_weak_symbols" >&5
13050 echo "${ECHO_T}$use_weak_symbols" >&6
13051         if test "x$use_weak_symbols" = xyes ; then
13052
13053 echo "$as_me:13053: checking if $CC supports weak symbols" >&5
13054 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13055 if test "${cf_cv_weak_symbols+set}" = set; then
13056   echo $ECHO_N "(cached) $ECHO_C" >&6
13057 else
13058
13059 cat >conftest.$ac_ext <<_ACEOF
13060 #line 13060 "configure"
13061 #include "confdefs.h"
13062
13063 #include <stdio.h>
13064 int
13065 main ()
13066 {
13067
13068 #if defined(__GNUC__)
13069 #  if defined __USE_ISOC99
13070 #    define _cat_pragma(exp)    _Pragma(#exp)
13071 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13072 #  else
13073 #    define _weak_pragma(exp)
13074 #  endif
13075 #  define _declare(name)        __extension__ extern __typeof__(name) name
13076 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13077 #endif
13078
13079 weak_symbol(fopen);
13080
13081   ;
13082   return 0;
13083 }
13084 _ACEOF
13085 rm -f conftest.$ac_objext
13086 if { (eval echo "$as_me:13086: \"$ac_compile\"") >&5
13087   (eval $ac_compile) 2>&5
13088   ac_status=$?
13089   echo "$as_me:13089: \$? = $ac_status" >&5
13090   (exit $ac_status); } &&
13091          { ac_try='test -s conftest.$ac_objext'
13092   { (eval echo "$as_me:13092: \"$ac_try\"") >&5
13093   (eval $ac_try) 2>&5
13094   ac_status=$?
13095   echo "$as_me:13095: \$? = $ac_status" >&5
13096   (exit $ac_status); }; }; then
13097   cf_cv_weak_symbols=yes
13098 else
13099   echo "$as_me: failed program was:" >&5
13100 cat conftest.$ac_ext >&5
13101 cf_cv_weak_symbols=no
13102 fi
13103 rm -f conftest.$ac_objext conftest.$ac_ext
13104
13105 fi
13106 echo "$as_me:13106: result: $cf_cv_weak_symbols" >&5
13107 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13108
13109         else
13110                 cf_cv_weak_symbols=no
13111         fi
13112
13113         if test "x$cf_cv_weak_symbols" = xyes ; then
13114
13115 cat >>confdefs.h <<\EOF
13116 #define USE_WEAK_SYMBOLS 1
13117 EOF
13118
13119         fi
13120 fi
13121
13122 PTHREAD=
13123 if test "x$with_pthread" = "xyes" ; then
13124
13125 cat >>confdefs.h <<\EOF
13126 #define USE_PTHREADS 1
13127 EOF
13128
13129         enable_reentrant=yes
13130         if test "x$cf_cv_weak_symbols" = xyes ; then
13131                 PTHREAD=-lpthread
13132         fi
13133 fi
13134
13135 # Reentrant code has to be opaque; there's little advantage to making ncurses
13136 # opaque outside of that, so there is no --enable-opaque option.  We can use
13137 # this option without --with-pthreads, but this will be always set for
13138 # pthreads.
13139 echo "$as_me:13139: checking if you want reentrant code" >&5
13140 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13141
13142 # Check whether --enable-reentrant or --disable-reentrant was given.
13143 if test "${enable_reentrant+set}" = set; then
13144   enableval="$enable_reentrant"
13145   with_reentrant=$enableval
13146 else
13147   with_reentrant=no
13148 fi;
13149 echo "$as_me:13149: result: $with_reentrant" >&5
13150 echo "${ECHO_T}$with_reentrant" >&6
13151 if test "x$with_reentrant" = xyes ; then
13152         cf_cv_enable_reentrant=1
13153         cf_cv_enable_opaque="NCURSES_INTERNALS"
13154         NCURSES_SIZE_T=int
13155         if test "x$cf_cv_weak_symbols" = xyes ; then
13156
13157 # remove pthread library from $LIBS
13158 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13159
13160 cf_add_libs="-lpthread"
13161 # Filter out duplicates - this happens with badly-designed ".pc" files...
13162 for cf_add_1lib in $TEST_LIBS
13163 do
13164         for cf_add_2lib in $cf_add_libs
13165         do
13166                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13167                 then
13168                         cf_add_1lib=
13169                         break
13170                 fi
13171         done
13172         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13173 done
13174 TEST_LIBS="$cf_add_libs"
13175
13176 cf_add_libs="-lpthread"
13177 # Filter out duplicates - this happens with badly-designed ".pc" files...
13178 for cf_add_1lib in $TEST_LIBS2
13179 do
13180         for cf_add_2lib in $cf_add_libs
13181         do
13182                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13183                 then
13184                         cf_add_1lib=
13185                         break
13186                 fi
13187         done
13188         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13189 done
13190 TEST_LIBS2="$cf_add_libs"
13191
13192         else
13193                 # when not using weak symbols but with_reentrant,
13194                 # add 't' to the library suffix on all platforms
13195                 # except cygwin, where we only do that if ALSO
13196                 # compiling with full thread support.
13197                 case "$host" in
13198                 (*cygwin* | *msys*)
13199                         if test "$with_pthread" = "yes" ; then
13200                                 if test "x$disable_lib_suffixes" = "xno" ; then
13201                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13202                                 fi
13203                         fi ;;
13204                 (*)
13205                         if test "x$disable_lib_suffixes" = "xno" ; then
13206                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13207                         fi
13208                         ;;
13209                 esac
13210         fi
13211
13212 cat >>confdefs.h <<\EOF
13213 #define USE_REENTRANT 1
13214 EOF
13215
13216 if test "${with_abi_version+set}" != set; then
13217         case $cf_cv_rel_version in
13218         (5.*)
13219                 cf_cv_rel_version=6.0
13220                 cf_cv_abi_version=6
13221                 { echo "$as_me:13221: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13222 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13223                 ;;
13224         esac
13225 fi
13226
13227 else
13228         cf_cv_enable_reentrant=0
13229         cf_cv_enable_opaque="NCURSES_OPAQUE"
13230         NCURSES_SIZE_T=short
13231 fi
13232
13233 echo "$as_me:13233: checking if you want opaque curses-library structures" >&5
13234 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13235
13236 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13237 if test "${enable_opaque_curses+set}" = set; then
13238   enableval="$enable_opaque_curses"
13239   test "$enableval" != yes && enableval=no
13240         if test "$enableval" != "no" ; then
13241     enable_opaque_curses=yes
13242         else
13243
13244          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13245          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13246
13247         fi
13248 else
13249   enableval=no
13250
13251          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13252          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13253
13254 fi;
13255 echo "$as_me:13255: result: $enable_opaque_curses" >&5
13256 echo "${ECHO_T}$enable_opaque_curses" >&6
13257
13258 test "$cf_cv_enable_reentrant" = 1 && \
13259 test "$enable_opaque_curses" = no && \
13260 { { echo "$as_me:13260: error: reentrant configuration requires opaque library" >&5
13261 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13262    { (exit 1); exit 1; }; }
13263
13264 echo "$as_me:13264: checking if you want opaque form-library structures" >&5
13265 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13266
13267 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13268 if test "${enable_opaque_form+set}" = set; then
13269   enableval="$enable_opaque_form"
13270   enable_opaque_form=yes
13271 else
13272   enable_opaque_form=no
13273 fi;
13274 echo "$as_me:13274: result: $enable_opaque_form" >&5
13275 echo "${ECHO_T}$enable_opaque_form" >&6
13276
13277 echo "$as_me:13277: checking if you want opaque menu-library structures" >&5
13278 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13279
13280 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13281 if test "${enable_opaque_menu+set}" = set; then
13282   enableval="$enable_opaque_menu"
13283   enable_opaque_menu=yes
13284 else
13285   enable_opaque_menu=no
13286 fi;
13287 echo "$as_me:13287: result: $enable_opaque_menu" >&5
13288 echo "${ECHO_T}$enable_opaque_menu" >&6
13289
13290 echo "$as_me:13290: checking if you want opaque panel-library structures" >&5
13291 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13292
13293 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13294 if test "${enable_opaque_panel+set}" = set; then
13295   enableval="$enable_opaque_panel"
13296   enable_opaque_panel=yes
13297 else
13298   enable_opaque_panel=no
13299 fi;
13300 echo "$as_me:13300: result: $enable_opaque_panel" >&5
13301 echo "${ECHO_T}$enable_opaque_panel" >&6
13302
13303 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13304 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13305 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13306 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13307
13308 ### Allow using a different wrap-prefix
13309 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13310         echo "$as_me:13310: checking for prefix used to wrap public variables" >&5
13311 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13312
13313 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13314 if test "${with_wrap_prefix+set}" = set; then
13315   withval="$with_wrap_prefix"
13316   NCURSES_WRAP_PREFIX=$withval
13317 else
13318   NCURSES_WRAP_PREFIX=_nc_
13319 fi;
13320         echo "$as_me:13320: result: $NCURSES_WRAP_PREFIX" >&5
13321 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13322 else
13323         NCURSES_WRAP_PREFIX=_nc_
13324 fi
13325
13326 cat >>confdefs.h <<EOF
13327 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13328 EOF
13329
13330 ###############################################################################
13331 # These options are relatively safe to experiment with.
13332
13333 echo "$as_me:13333: checking if you want all development code" >&5
13334 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13335
13336 # Check whether --with-develop or --without-develop was given.
13337 if test "${with_develop+set}" = set; then
13338   withval="$with_develop"
13339   with_develop=$withval
13340 else
13341   with_develop=no
13342 fi;
13343 echo "$as_me:13343: result: $with_develop" >&5
13344 echo "${ECHO_T}$with_develop" >&6
13345
13346 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13347 echo "$as_me:13347: checking if you want hard-tabs code" >&5
13348 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13349
13350 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13351 if test "${enable_hard_tabs+set}" = set; then
13352   enableval="$enable_hard_tabs"
13353
13354 else
13355   enable_hard_tabs=$with_develop
13356 fi;
13357 echo "$as_me:13357: result: $enable_hard_tabs" >&5
13358 echo "${ECHO_T}$enable_hard_tabs" >&6
13359 test "x$enable_hard_tabs" = xyes &&
13360 cat >>confdefs.h <<\EOF
13361 #define USE_HARD_TABS 1
13362 EOF
13363
13364 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13365 echo "$as_me:13365: checking if you want limited support for xmc" >&5
13366 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13367
13368 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13369 if test "${enable_xmc_glitch+set}" = set; then
13370   enableval="$enable_xmc_glitch"
13371
13372 else
13373   enable_xmc_glitch=$with_develop
13374 fi;
13375 echo "$as_me:13375: result: $enable_xmc_glitch" >&5
13376 echo "${ECHO_T}$enable_xmc_glitch" >&6
13377 test "x$enable_xmc_glitch" = xyes &&
13378 cat >>confdefs.h <<\EOF
13379 #define USE_XMC_SUPPORT 1
13380 EOF
13381
13382 ###############################################################################
13383 # These are just experimental, probably should not be in a package:
13384
13385 echo "$as_me:13385: checking if you do not want to assume colors are white-on-black" >&5
13386 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13387
13388 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13389 if test "${enable_assumed_color+set}" = set; then
13390   enableval="$enable_assumed_color"
13391   with_assumed_color=$enableval
13392 else
13393   with_assumed_color=yes
13394 fi;
13395 echo "$as_me:13395: result: $with_assumed_color" >&5
13396 echo "${ECHO_T}$with_assumed_color" >&6
13397 test "x$with_assumed_color" = xyes &&
13398 cat >>confdefs.h <<\EOF
13399 #define USE_ASSUMED_COLOR 1
13400 EOF
13401
13402 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13403 echo "$as_me:13403: checking if you want hashmap scrolling-optimization code" >&5
13404 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13405
13406 # Check whether --enable-hashmap or --disable-hashmap was given.
13407 if test "${enable_hashmap+set}" = set; then
13408   enableval="$enable_hashmap"
13409   with_hashmap=$enableval
13410 else
13411   with_hashmap=yes
13412 fi;
13413 echo "$as_me:13413: result: $with_hashmap" >&5
13414 echo "${ECHO_T}$with_hashmap" >&6
13415 test "x$with_hashmap" = xyes &&
13416 cat >>confdefs.h <<\EOF
13417 #define USE_HASHMAP 1
13418 EOF
13419
13420 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13421 echo "$as_me:13421: checking if you want colorfgbg code" >&5
13422 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13423
13424 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13425 if test "${enable_colorfgbg+set}" = set; then
13426   enableval="$enable_colorfgbg"
13427   with_colorfgbg=$enableval
13428 else
13429   with_colorfgbg=no
13430 fi;
13431 echo "$as_me:13431: result: $with_colorfgbg" >&5
13432 echo "${ECHO_T}$with_colorfgbg" >&6
13433 test "x$with_colorfgbg" = xyes &&
13434 cat >>confdefs.h <<\EOF
13435 #define USE_COLORFGBG 1
13436 EOF
13437
13438 ###   use option --enable-interop to turn on use of bindings used for interop
13439 echo "$as_me:13439: checking if you want interop bindings" >&5
13440 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13441
13442 # Check whether --enable-interop or --disable-interop was given.
13443 if test "${enable_interop+set}" = set; then
13444   enableval="$enable_interop"
13445   with_exp_interop=$enableval
13446 else
13447   with_exp_interop=$cf_dft_interop
13448 fi;
13449 echo "$as_me:13449: result: $with_exp_interop" >&5
13450 echo "${ECHO_T}$with_exp_interop" >&6
13451
13452 NCURSES_INTEROP_FUNCS=0
13453 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13454
13455 echo "$as_me:13455: checking if you want experimental safe-sprintf code" >&5
13456 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13457
13458 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13459 if test "${enable_safe_sprintf+set}" = set; then
13460   enableval="$enable_safe_sprintf"
13461   with_safe_sprintf=$enableval
13462 else
13463   with_safe_sprintf=no
13464 fi;
13465 echo "$as_me:13465: result: $with_safe_sprintf" >&5
13466 echo "${ECHO_T}$with_safe_sprintf" >&6
13467 test "x$with_safe_sprintf" = xyes &&
13468 cat >>confdefs.h <<\EOF
13469 #define USE_SAFE_SPRINTF 1
13470 EOF
13471
13472 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13473 # when hashmap is used scroll hints are useless
13474 if test "$with_hashmap" = no ; then
13475 echo "$as_me:13475: checking if you want to experiment without scrolling-hints code" >&5
13476 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13477
13478 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13479 if test "${enable_scroll_hints+set}" = set; then
13480   enableval="$enable_scroll_hints"
13481   with_scroll_hints=$enableval
13482 else
13483   with_scroll_hints=yes
13484 fi;
13485 echo "$as_me:13485: result: $with_scroll_hints" >&5
13486 echo "${ECHO_T}$with_scroll_hints" >&6
13487 test "x$with_scroll_hints" = xyes &&
13488 cat >>confdefs.h <<\EOF
13489 #define USE_SCROLL_HINTS 1
13490 EOF
13491
13492 fi
13493
13494 echo "$as_me:13494: checking if you want wgetch-events code" >&5
13495 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13496
13497 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13498 if test "${enable_wgetch_events+set}" = set; then
13499   enableval="$enable_wgetch_events"
13500   with_wgetch_events=$enableval
13501 else
13502   with_wgetch_events=no
13503 fi;
13504 echo "$as_me:13504: result: $with_wgetch_events" >&5
13505 echo "${ECHO_T}$with_wgetch_events" >&6
13506 test "x$with_wgetch_events" = xyes &&
13507 cat >>confdefs.h <<\EOF
13508 #define NCURSES_WGETCH_EVENTS 1
13509 EOF
13510
13511 ###############################################################################
13512
13513 ###     use option --disable-echo to suppress full display compiling commands
13514
13515 echo "$as_me:13515: checking if you want to see long compiling messages" >&5
13516 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13517
13518 # Check whether --enable-echo or --disable-echo was given.
13519 if test "${enable_echo+set}" = set; then
13520   enableval="$enable_echo"
13521   test "$enableval" != no && enableval=yes
13522         if test "$enableval" != "yes" ; then
13523
13524         ECHO_LT='--silent'
13525         ECHO_LD='@echo linking $@;'
13526         RULE_CC='@echo compiling $<'
13527         SHOW_CC='@echo compiling $@'
13528         ECHO_CC='@'
13529
13530         else
13531
13532         ECHO_LT=''
13533         ECHO_LD=''
13534         RULE_CC=''
13535         SHOW_CC=''
13536         ECHO_CC=''
13537
13538         fi
13539 else
13540   enableval=yes
13541
13542         ECHO_LT=''
13543         ECHO_LD=''
13544         RULE_CC=''
13545         SHOW_CC=''
13546         ECHO_CC=''
13547
13548 fi;
13549 echo "$as_me:13549: result: $enableval" >&5
13550 echo "${ECHO_T}$enableval" >&6
13551
13552 if test "x$enable_echo" = xyes; then
13553         ECHO_LINK=
13554 else
13555         ECHO_LINK='@ echo linking $@ ... ;'
13556         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13557         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13558 fi
13559
13560 ###     use option --enable-warnings to turn on all gcc warnings
13561 echo "$as_me:13561: checking if you want to see compiler warnings" >&5
13562 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13563
13564 # Check whether --enable-warnings or --disable-warnings was given.
13565 if test "${enable_warnings+set}" = set; then
13566   enableval="$enable_warnings"
13567   with_warnings=$enableval
13568 fi;
13569 echo "$as_me:13569: result: $with_warnings" >&5
13570 echo "${ECHO_T}$with_warnings" >&6
13571
13572 if test "x$with_warnings" = "xyes"; then
13573
13574         ADAFLAGS="$ADAFLAGS -gnatg"
13575
13576 INTEL_COMPILER=no
13577
13578 if test "$GCC" = yes ; then
13579         case $host_os in
13580         (linux*|gnu*)
13581                 echo "$as_me:13581: checking if this is really Intel C compiler" >&5
13582 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13583                 cf_save_CFLAGS="$CFLAGS"
13584                 CFLAGS="$CFLAGS -no-gcc"
13585                 cat >conftest.$ac_ext <<_ACEOF
13586 #line 13586 "configure"
13587 #include "confdefs.h"
13588
13589 int
13590 main ()
13591 {
13592
13593 #ifdef __INTEL_COMPILER
13594 #else
13595 make an error
13596 #endif
13597
13598   ;
13599   return 0;
13600 }
13601 _ACEOF
13602 rm -f conftest.$ac_objext
13603 if { (eval echo "$as_me:13603: \"$ac_compile\"") >&5
13604   (eval $ac_compile) 2>&5
13605   ac_status=$?
13606   echo "$as_me:13606: \$? = $ac_status" >&5
13607   (exit $ac_status); } &&
13608          { ac_try='test -s conftest.$ac_objext'
13609   { (eval echo "$as_me:13609: \"$ac_try\"") >&5
13610   (eval $ac_try) 2>&5
13611   ac_status=$?
13612   echo "$as_me:13612: \$? = $ac_status" >&5
13613   (exit $ac_status); }; }; then
13614   INTEL_COMPILER=yes
13615 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13616
13617 else
13618   echo "$as_me: failed program was:" >&5
13619 cat conftest.$ac_ext >&5
13620 fi
13621 rm -f conftest.$ac_objext conftest.$ac_ext
13622                 CFLAGS="$cf_save_CFLAGS"
13623                 echo "$as_me:13623: result: $INTEL_COMPILER" >&5
13624 echo "${ECHO_T}$INTEL_COMPILER" >&6
13625                 ;;
13626         esac
13627 fi
13628
13629 CLANG_COMPILER=no
13630
13631 if test "$GCC" = yes ; then
13632         echo "$as_me:13632: checking if this is really Clang C compiler" >&5
13633 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13634         cf_save_CFLAGS="$CFLAGS"
13635         CFLAGS="$CFLAGS -Qunused-arguments"
13636         cat >conftest.$ac_ext <<_ACEOF
13637 #line 13637 "configure"
13638 #include "confdefs.h"
13639
13640 int
13641 main ()
13642 {
13643
13644 #ifdef __clang__
13645 #else
13646 make an error
13647 #endif
13648
13649   ;
13650   return 0;
13651 }
13652 _ACEOF
13653 rm -f conftest.$ac_objext
13654 if { (eval echo "$as_me:13654: \"$ac_compile\"") >&5
13655   (eval $ac_compile) 2>&5
13656   ac_status=$?
13657   echo "$as_me:13657: \$? = $ac_status" >&5
13658   (exit $ac_status); } &&
13659          { ac_try='test -s conftest.$ac_objext'
13660   { (eval echo "$as_me:13660: \"$ac_try\"") >&5
13661   (eval $ac_try) 2>&5
13662   ac_status=$?
13663   echo "$as_me:13663: \$? = $ac_status" >&5
13664   (exit $ac_status); }; }; then
13665   CLANG_COMPILER=yes
13666 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13667
13668 else
13669   echo "$as_me: failed program was:" >&5
13670 cat conftest.$ac_ext >&5
13671 fi
13672 rm -f conftest.$ac_objext conftest.$ac_ext
13673         CFLAGS="$cf_save_CFLAGS"
13674         echo "$as_me:13674: result: $CLANG_COMPILER" >&5
13675 echo "${ECHO_T}$CLANG_COMPILER" >&6
13676 fi
13677
13678 cat > conftest.$ac_ext <<EOF
13679 #line 13679 "${as_me:-configure}"
13680 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13681 EOF
13682
13683 if test "$INTEL_COMPILER" = yes
13684 then
13685 # The "-wdXXX" options suppress warnings:
13686 # remark #1419: external declaration in primary source file
13687 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13688 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13689 # remark #193: zero used for undefined preprocessing identifier
13690 # remark #593: variable "curs_sb_left_arrow" was set but never used
13691 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13692 # remark #869: parameter "tw" was never referenced
13693 # remark #981: operands are evaluated in unspecified order
13694 # warning #279: controlling expression is constant
13695
13696         { echo "$as_me:13696: checking for $CC warning options..." >&5
13697 echo "$as_me: checking for $CC warning options..." >&6;}
13698         cf_save_CFLAGS="$CFLAGS"
13699         EXTRA_CFLAGS="-Wall"
13700         for cf_opt in \
13701                 wd1419 \
13702                 wd1683 \
13703                 wd1684 \
13704                 wd193 \
13705                 wd593 \
13706                 wd279 \
13707                 wd810 \
13708                 wd869 \
13709                 wd981
13710         do
13711                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13712                 if { (eval echo "$as_me:13712: \"$ac_compile\"") >&5
13713   (eval $ac_compile) 2>&5
13714   ac_status=$?
13715   echo "$as_me:13715: \$? = $ac_status" >&5
13716   (exit $ac_status); }; then
13717                         test -n "$verbose" && echo "$as_me:13717: result: ... -$cf_opt" >&5
13718 echo "${ECHO_T}... -$cf_opt" >&6
13719                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13720                 fi
13721         done
13722         CFLAGS="$cf_save_CFLAGS"
13723
13724 elif test "$GCC" = yes
13725 then
13726         { echo "$as_me:13726: checking for $CC warning options..." >&5
13727 echo "$as_me: checking for $CC warning options..." >&6;}
13728         cf_save_CFLAGS="$CFLAGS"
13729         EXTRA_CFLAGS=
13730         cf_warn_CONST=""
13731         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13732         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13733         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13734         for cf_opt in W Wall \
13735                 Wbad-function-cast \
13736                 Wcast-align \
13737                 Wcast-qual \
13738                 Wdeclaration-after-statement \
13739                 Wextra \
13740                 Winline \
13741                 Wmissing-declarations \
13742                 Wmissing-prototypes \
13743                 Wnested-externs \
13744                 Wpointer-arith \
13745                 Wshadow \
13746                 Wstrict-prototypes \
13747                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13748         do
13749                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13750                 if { (eval echo "$as_me:13750: \"$ac_compile\"") >&5
13751   (eval $ac_compile) 2>&5
13752   ac_status=$?
13753   echo "$as_me:13753: \$? = $ac_status" >&5
13754   (exit $ac_status); }; then
13755                         test -n "$verbose" && echo "$as_me:13755: result: ... -$cf_opt" >&5
13756 echo "${ECHO_T}... -$cf_opt" >&6
13757                         case $cf_opt in
13758                         (Wcast-qual)
13759                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13760                                 ;;
13761                         (Winline)
13762                                 case $GCC_VERSION in
13763                                 ([34].*)
13764                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13765
13766 echo "${as_me:-configure}:13766: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13767
13768                                         continue;;
13769                                 esac
13770                                 ;;
13771                         (Wpointer-arith)
13772                                 case $GCC_VERSION in
13773                                 ([12].*)
13774                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13775
13776 echo "${as_me:-configure}:13776: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13777
13778                                         continue;;
13779                                 esac
13780                                 ;;
13781                         esac
13782                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13783                 fi
13784         done
13785         CFLAGS="$cf_save_CFLAGS"
13786 fi
13787 rm -rf conftest*
13788
13789         if test "x$cf_with_cxx" = xyes ; then
13790
13791 INTEL_CPLUSPLUS=no
13792
13793 if test "$GCC" = yes ; then
13794         case $host_os in
13795         (linux*|gnu*)
13796                 echo "$as_me:13796: checking if this is really Intel C++ compiler" >&5
13797 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13798                 cf_save_CFLAGS="$CXXFLAGS"
13799                 CXXFLAGS="$CXXFLAGS -no-gcc"
13800                 cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803
13804 int
13805 main ()
13806 {
13807
13808 #ifdef __INTEL_COMPILER
13809 #else
13810 make an error
13811 #endif
13812
13813   ;
13814   return 0;
13815 }
13816 _ACEOF
13817 rm -f conftest.$ac_objext
13818 if { (eval echo "$as_me:13818: \"$ac_compile\"") >&5
13819   (eval $ac_compile) 2>&5
13820   ac_status=$?
13821   echo "$as_me:13821: \$? = $ac_status" >&5
13822   (exit $ac_status); } &&
13823          { ac_try='test -s conftest.$ac_objext'
13824   { (eval echo "$as_me:13824: \"$ac_try\"") >&5
13825   (eval $ac_try) 2>&5
13826   ac_status=$?
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); }; }; then
13829   INTEL_CPLUSPLUS=yes
13830 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13831
13832 else
13833   echo "$as_me: failed program was:" >&5
13834 cat conftest.$ac_ext >&5
13835 fi
13836 rm -f conftest.$ac_objext conftest.$ac_ext
13837                 CXXFLAGS="$cf_save_CFLAGS"
13838                 echo "$as_me:13838: result: $INTEL_CPLUSPLUS" >&5
13839 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13840                 ;;
13841         esac
13842 fi
13843
13844 CLANG_CPLUSPLUS=no
13845
13846 if test "$GCC" = yes ; then
13847         echo "$as_me:13847: checking if this is really Clang C++ compiler" >&5
13848 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13849         cf_save_CFLAGS="$CXXFLAGS"
13850         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13851         cat >conftest.$ac_ext <<_ACEOF
13852 #line 13852 "configure"
13853 #include "confdefs.h"
13854
13855 int
13856 main ()
13857 {
13858
13859 #ifdef __clang__
13860 #else
13861 make an error
13862 #endif
13863
13864   ;
13865   return 0;
13866 }
13867 _ACEOF
13868 rm -f conftest.$ac_objext
13869 if { (eval echo "$as_me:13869: \"$ac_compile\"") >&5
13870   (eval $ac_compile) 2>&5
13871   ac_status=$?
13872   echo "$as_me:13872: \$? = $ac_status" >&5
13873   (exit $ac_status); } &&
13874          { ac_try='test -s conftest.$ac_objext'
13875   { (eval echo "$as_me:13875: \"$ac_try\"") >&5
13876   (eval $ac_try) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit $ac_status); }; }; then
13880   CLANG_CPLUSPLUS=yes
13881 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13882
13883 else
13884   echo "$as_me: failed program was:" >&5
13885 cat conftest.$ac_ext >&5
13886 fi
13887 rm -f conftest.$ac_objext conftest.$ac_ext
13888         CXXFLAGS="$cf_save_CFLAGS"
13889         echo "$as_me:13889: result: $CLANG_CPLUSPLUS" >&5
13890 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13891 fi
13892
13893 ac_ext=cc
13894 ac_cpp='$CXXCPP $CPPFLAGS'
13895 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13896 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13897 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13898 ac_main_return=return
13899
13900 cat > conftest.$ac_ext <<EOF
13901 #line 13901 "configure"
13902 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13903 EOF
13904
13905 if test "$INTEL_CPLUSPLUS" = yes
13906 then
13907 # The "-wdXXX" options suppress warnings:
13908 # remark #1419: external declaration in primary source file
13909 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13910 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13911 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13912 # remark #193: zero used for undefined preprocessing identifier
13913 # remark #593: variable "curs_sb_left_arrow" was set but never used
13914 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13915 # remark #869: parameter "tw" was never referenced
13916 # remark #981: operands are evaluated in unspecified order
13917 # warning #269: invalid format string conversion
13918
13919         { echo "$as_me:13919: checking for $CC warning options..." >&5
13920 echo "$as_me: checking for $CC warning options..." >&6;}
13921         cf_save_CXXFLAGS="$CXXFLAGS"
13922         EXTRA_CXXFLAGS="-Wall"
13923         for cf_opt in \
13924                 wd1419 \
13925                 wd1682 \
13926                 wd1683 \
13927                 wd1684 \
13928                 wd193 \
13929                 wd279 \
13930                 wd593 \
13931                 wd810 \
13932                 wd869 \
13933                 wd981
13934         do
13935                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13936                 if { (eval echo "$as_me:13936: \"$ac_compile\"") >&5
13937   (eval $ac_compile) 2>&5
13938   ac_status=$?
13939   echo "$as_me:13939: \$? = $ac_status" >&5
13940   (exit $ac_status); }; then
13941                         test -n "$verbose" && echo "$as_me:13941: result: ... -$cf_opt" >&5
13942 echo "${ECHO_T}... -$cf_opt" >&6
13943                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13944                 fi
13945         done
13946         CXXFLAGS="$cf_save_CXXFLAGS"
13947
13948 elif test "$GXX" = yes
13949 then
13950         { echo "$as_me:13950: checking for $CXX warning options..." >&5
13951 echo "$as_me: checking for $CXX warning options..." >&6;}
13952         cf_save_CXXFLAGS="$CXXFLAGS"
13953         EXTRA_CXXFLAGS="-W -Wall"
13954         cf_gxx_extra_warnings=""
13955         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13956         case "$GCC_VERSION" in
13957         ([1-2].*)
13958                 ;;
13959         (*)
13960                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13961                 ;;
13962         esac
13963         for cf_opt in \
13964                 Wabi \
13965                 fabi-version=0 \
13966                 Wextra \
13967                 Wignored-qualifiers \
13968                 Wlogical-op \
13969                 Woverloaded-virtual \
13970                 Wsign-promo \
13971                 Wsynth \
13972                 Wold-style-cast \
13973                 Wcast-align \
13974                 Wcast-qual \
13975                 Wpointer-arith \
13976                 Wshadow \
13977                 Wundef $cf_gxx_extra_warnings Wno-unused
13978         do
13979                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13980                 if { (eval echo "$as_me:13980: \"$ac_compile\"") >&5
13981   (eval $ac_compile) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit $ac_status); }; then
13985                         test -n "$verbose" && echo "$as_me:13985: result: ... -$cf_opt" >&5
13986 echo "${ECHO_T}... -$cf_opt" >&6
13987                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13988                 else
13989                         test -n "$verbose" && echo "$as_me:13989: result: ... no -$cf_opt" >&5
13990 echo "${ECHO_T}... no -$cf_opt" >&6
13991                 fi
13992         done
13993         CXXFLAGS="$cf_save_CXXFLAGS"
13994 fi
13995
13996 rm -rf conftest*
13997 ac_ext=c
13998 ac_cpp='$CPP $CPPFLAGS'
13999 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14000 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14001 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14002 ac_main_return=return
14003
14004         fi
14005 fi
14006
14007 if test "$GCC" = yes
14008 then
14009 cat > conftest.i <<EOF
14010 #ifndef GCC_PRINTF
14011 #define GCC_PRINTF 0
14012 #endif
14013 #ifndef GCC_SCANF
14014 #define GCC_SCANF 0
14015 #endif
14016 #ifndef GCC_NORETURN
14017 #define GCC_NORETURN /* nothing */
14018 #endif
14019 #ifndef GCC_UNUSED
14020 #define GCC_UNUSED /* nothing */
14021 #endif
14022 EOF
14023 if test "$GCC" = yes
14024 then
14025         { echo "$as_me:14025: checking for $CC __attribute__ directives..." >&5
14026 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14027 cat > conftest.$ac_ext <<EOF
14028 #line 14028 "${as_me:-configure}"
14029 #include "confdefs.h"
14030 #include "conftest.h"
14031 #include "conftest.i"
14032 #if     GCC_PRINTF
14033 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14034 #else
14035 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14036 #endif
14037 #if     GCC_SCANF
14038 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14039 #else
14040 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14041 #endif
14042 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14043 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14044 extern void foo(void) GCC_NORETURN;
14045 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14046 EOF
14047         cf_printf_attribute=no
14048         cf_scanf_attribute=no
14049         for cf_attribute in scanf printf unused noreturn
14050         do
14051
14052 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14053
14054                 cf_directive="__attribute__(($cf_attribute))"
14055                 echo "checking for $CC $cf_directive" 1>&5
14056
14057                 case $cf_attribute in
14058                 (printf)
14059                         cf_printf_attribute=yes
14060                         cat >conftest.h <<EOF
14061 #define GCC_$cf_ATTRIBUTE 1
14062 EOF
14063                         ;;
14064                 (scanf)
14065                         cf_scanf_attribute=yes
14066                         cat >conftest.h <<EOF
14067 #define GCC_$cf_ATTRIBUTE 1
14068 EOF
14069                         ;;
14070                 (*)
14071                         cat >conftest.h <<EOF
14072 #define GCC_$cf_ATTRIBUTE $cf_directive
14073 EOF
14074                         ;;
14075                 esac
14076
14077                 if { (eval echo "$as_me:14077: \"$ac_compile\"") >&5
14078   (eval $ac_compile) 2>&5
14079   ac_status=$?
14080   echo "$as_me:14080: \$? = $ac_status" >&5
14081   (exit $ac_status); }; then
14082                         test -n "$verbose" && echo "$as_me:14082: result: ... $cf_attribute" >&5
14083 echo "${ECHO_T}... $cf_attribute" >&6
14084                         cat conftest.h >>confdefs.h
14085                         case $cf_attribute in
14086                         (noreturn)
14087
14088 cat >>confdefs.h <<EOF
14089 #define GCC_NORETURN $cf_directive
14090 EOF
14091
14092                                 ;;
14093                         (printf)
14094                                 cf_value='/* nothing */'
14095                                 if test "$cf_printf_attribute" != no ; then
14096                                         cf_value='__attribute__((format(printf,fmt,var)))'
14097
14098 cat >>confdefs.h <<\EOF
14099 #define GCC_PRINTF 1
14100 EOF
14101
14102                                 fi
14103
14104 cat >>confdefs.h <<EOF
14105 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14106 EOF
14107
14108                                 ;;
14109                         (scanf)
14110                                 cf_value='/* nothing */'
14111                                 if test "$cf_scanf_attribute" != no ; then
14112                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14113
14114 cat >>confdefs.h <<\EOF
14115 #define GCC_SCANF 1
14116 EOF
14117
14118                                 fi
14119
14120 cat >>confdefs.h <<EOF
14121 #define GCC_SCANFLIKE(fmt,var) $cf_value
14122 EOF
14123
14124                                 ;;
14125                         (unused)
14126
14127 cat >>confdefs.h <<EOF
14128 #define GCC_UNUSED $cf_directive
14129 EOF
14130
14131                                 ;;
14132                         esac
14133                 fi
14134         done
14135 else
14136         fgrep define conftest.i >>confdefs.h
14137 fi
14138 rm -rf conftest*
14139 fi
14140
14141 echo "$as_me:14141: checking if you want to work around bogus compiler/loader warnings" >&5
14142 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14143
14144 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14145 if test "${enable_string_hacks+set}" = set; then
14146   enableval="$enable_string_hacks"
14147   with_string_hacks=$enableval
14148 else
14149   with_string_hacks=no
14150 fi;
14151 echo "$as_me:14151: result: $with_string_hacks" >&5
14152 echo "${ECHO_T}$with_string_hacks" >&6
14153
14154 if test "x$with_string_hacks" = "xyes"; then
14155
14156 cat >>confdefs.h <<\EOF
14157 #define USE_STRING_HACKS 1
14158 EOF
14159
14160         { echo "$as_me:14160: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14161 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14162         echo "$as_me:14162: checking for strlcat" >&5
14163 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14164 if test "${ac_cv_func_strlcat+set}" = set; then
14165   echo $ECHO_N "(cached) $ECHO_C" >&6
14166 else
14167   cat >conftest.$ac_ext <<_ACEOF
14168 #line 14168 "configure"
14169 #include "confdefs.h"
14170 /* System header to define __stub macros and hopefully few prototypes,
14171     which can conflict with char strlcat (); below.  */
14172 #include <assert.h>
14173 /* Override any gcc2 internal prototype to avoid an error.  */
14174 #ifdef __cplusplus
14175 extern "C"
14176 #endif
14177 /* We use char because int might match the return type of a gcc2
14178    builtin and then its argument prototype would still apply.  */
14179 char strlcat ();
14180 char (*f) ();
14181
14182 int
14183 main ()
14184 {
14185 /* The GNU C library defines this for functions which it implements
14186     to always fail with ENOSYS.  Some functions are actually named
14187     something starting with __ and the normal name is an alias.  */
14188 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14189 choke me
14190 #else
14191 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14192 #endif
14193
14194   ;
14195   return 0;
14196 }
14197 _ACEOF
14198 rm -f conftest.$ac_objext conftest$ac_exeext
14199 if { (eval echo "$as_me:14199: \"$ac_link\"") >&5
14200   (eval $ac_link) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit $ac_status); } &&
14204          { ac_try='test -s conftest$ac_exeext'
14205   { (eval echo "$as_me:14205: \"$ac_try\"") >&5
14206   (eval $ac_try) 2>&5
14207   ac_status=$?
14208   echo "$as_me:14208: \$? = $ac_status" >&5
14209   (exit $ac_status); }; }; then
14210   ac_cv_func_strlcat=yes
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 cat conftest.$ac_ext >&5
14214 ac_cv_func_strlcat=no
14215 fi
14216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14217 fi
14218 echo "$as_me:14218: result: $ac_cv_func_strlcat" >&5
14219 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14220 if test $ac_cv_func_strlcat = yes; then
14221
14222 cat >>confdefs.h <<\EOF
14223 #define HAVE_STRLCAT 1
14224 EOF
14225
14226 else
14227
14228                 echo "$as_me:14228: checking for strlcat in -lbsd" >&5
14229 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14230 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14231   echo $ECHO_N "(cached) $ECHO_C" >&6
14232 else
14233   ac_check_lib_save_LIBS=$LIBS
14234 LIBS="-lbsd  $LIBS"
14235 cat >conftest.$ac_ext <<_ACEOF
14236 #line 14236 "configure"
14237 #include "confdefs.h"
14238
14239 /* Override any gcc2 internal prototype to avoid an error.  */
14240 #ifdef __cplusplus
14241 extern "C"
14242 #endif
14243 /* We use char because int might match the return type of a gcc2
14244    builtin and then its argument prototype would still apply.  */
14245 char strlcat ();
14246 int
14247 main ()
14248 {
14249 strlcat ();
14250   ;
14251   return 0;
14252 }
14253 _ACEOF
14254 rm -f conftest.$ac_objext conftest$ac_exeext
14255 if { (eval echo "$as_me:14255: \"$ac_link\"") >&5
14256   (eval $ac_link) 2>&5
14257   ac_status=$?
14258   echo "$as_me:14258: \$? = $ac_status" >&5
14259   (exit $ac_status); } &&
14260          { ac_try='test -s conftest$ac_exeext'
14261   { (eval echo "$as_me:14261: \"$ac_try\"") >&5
14262   (eval $ac_try) 2>&5
14263   ac_status=$?
14264   echo "$as_me:14264: \$? = $ac_status" >&5
14265   (exit $ac_status); }; }; then
14266   ac_cv_lib_bsd_strlcat=yes
14267 else
14268   echo "$as_me: failed program was:" >&5
14269 cat conftest.$ac_ext >&5
14270 ac_cv_lib_bsd_strlcat=no
14271 fi
14272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14273 LIBS=$ac_check_lib_save_LIBS
14274 fi
14275 echo "$as_me:14275: result: $ac_cv_lib_bsd_strlcat" >&5
14276 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14277 if test $ac_cv_lib_bsd_strlcat = yes; then
14278
14279 cf_add_libs="-lbsd"
14280 # Filter out duplicates - this happens with badly-designed ".pc" files...
14281 for cf_add_1lib in $LIBS
14282 do
14283         for cf_add_2lib in $cf_add_libs
14284         do
14285                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14286                 then
14287                         cf_add_1lib=
14288                         break
14289                 fi
14290         done
14291         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14292 done
14293 LIBS="$cf_add_libs"
14294
14295 for ac_header in bsd/string.h
14296 do
14297 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14298 echo "$as_me:14298: checking for $ac_header" >&5
14299 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14300 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303   cat >conftest.$ac_ext <<_ACEOF
14304 #line 14304 "configure"
14305 #include "confdefs.h"
14306 #include <$ac_header>
14307 _ACEOF
14308 if { (eval echo "$as_me:14308: \"$ac_cpp conftest.$ac_ext\"") >&5
14309   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14310   ac_status=$?
14311   egrep -v '^ *\+' conftest.er1 >conftest.err
14312   rm -f conftest.er1
14313   cat conftest.err >&5
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit $ac_status); } >/dev/null; then
14316   if test -s conftest.err; then
14317     ac_cpp_err=$ac_c_preproc_warn_flag
14318   else
14319     ac_cpp_err=
14320   fi
14321 else
14322   ac_cpp_err=yes
14323 fi
14324 if test -z "$ac_cpp_err"; then
14325   eval "$as_ac_Header=yes"
14326 else
14327   echo "$as_me: failed program was:" >&5
14328   cat conftest.$ac_ext >&5
14329   eval "$as_ac_Header=no"
14330 fi
14331 rm -f conftest.err conftest.$ac_ext
14332 fi
14333 echo "$as_me:14333: result: `eval echo '${'$as_ac_Header'}'`" >&5
14334 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14335 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14336   cat >>confdefs.h <<EOF
14337 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14338 EOF
14339
14340 fi
14341 done
14342
14343 cat >>confdefs.h <<\EOF
14344 #define HAVE_STRLCAT 1
14345 EOF
14346
14347 fi
14348
14349 fi
14350
14351 for ac_func in strlcpy snprintf
14352 do
14353 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14354 echo "$as_me:14354: checking for $ac_func" >&5
14355 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14356 if eval "test \"\${$as_ac_var+set}\" = set"; then
14357   echo $ECHO_N "(cached) $ECHO_C" >&6
14358 else
14359   cat >conftest.$ac_ext <<_ACEOF
14360 #line 14360 "configure"
14361 #include "confdefs.h"
14362 /* System header to define __stub macros and hopefully few prototypes,
14363     which can conflict with char $ac_func (); below.  */
14364 #include <assert.h>
14365 /* Override any gcc2 internal prototype to avoid an error.  */
14366 #ifdef __cplusplus
14367 extern "C"
14368 #endif
14369 /* We use char because int might match the return type of a gcc2
14370    builtin and then its argument prototype would still apply.  */
14371 char $ac_func ();
14372 char (*f) ();
14373
14374 int
14375 main ()
14376 {
14377 /* The GNU C library defines this for functions which it implements
14378     to always fail with ENOSYS.  Some functions are actually named
14379     something starting with __ and the normal name is an alias.  */
14380 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14381 choke me
14382 #else
14383 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14384 #endif
14385
14386   ;
14387   return 0;
14388 }
14389 _ACEOF
14390 rm -f conftest.$ac_objext conftest$ac_exeext
14391 if { (eval echo "$as_me:14391: \"$ac_link\"") >&5
14392   (eval $ac_link) 2>&5
14393   ac_status=$?
14394   echo "$as_me:14394: \$? = $ac_status" >&5
14395   (exit $ac_status); } &&
14396          { ac_try='test -s conftest$ac_exeext'
14397   { (eval echo "$as_me:14397: \"$ac_try\"") >&5
14398   (eval $ac_try) 2>&5
14399   ac_status=$?
14400   echo "$as_me:14400: \$? = $ac_status" >&5
14401   (exit $ac_status); }; }; then
14402   eval "$as_ac_var=yes"
14403 else
14404   echo "$as_me: failed program was:" >&5
14405 cat conftest.$ac_ext >&5
14406 eval "$as_ac_var=no"
14407 fi
14408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14409 fi
14410 echo "$as_me:14410: result: `eval echo '${'$as_ac_var'}'`" >&5
14411 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14412 if test `eval echo '${'$as_ac_var'}'` = yes; then
14413   cat >>confdefs.h <<EOF
14414 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14415 EOF
14416
14417 fi
14418 done
14419
14420 fi
14421
14422 ###     use option --enable-assertions to turn on generation of assertion code
14423 echo "$as_me:14423: checking if you want to enable runtime assertions" >&5
14424 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14425
14426 # Check whether --enable-assertions or --disable-assertions was given.
14427 if test "${enable_assertions+set}" = set; then
14428   enableval="$enable_assertions"
14429   with_assertions=$enableval
14430 else
14431   with_assertions=no
14432 fi;
14433 echo "$as_me:14433: result: $with_assertions" >&5
14434 echo "${ECHO_T}$with_assertions" >&6
14435 if test -n "$GCC"
14436 then
14437         if test "$with_assertions" = no
14438         then
14439                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14440         else
14441
14442         ADAFLAGS="$ADAFLAGS -gnata"
14443
14444         fi
14445 fi
14446
14447 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14448
14449 echo "$as_me:14449: checking if you want to use dmalloc for testing" >&5
14450 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14451
14452 # Check whether --with-dmalloc or --without-dmalloc was given.
14453 if test "${with_dmalloc+set}" = set; then
14454   withval="$with_dmalloc"
14455
14456 cat >>confdefs.h <<EOF
14457 #define USE_DMALLOC 1
14458 EOF
14459
14460         : ${with_cflags:=-g}
14461         : ${with_no_leaks:=yes}
14462          with_dmalloc=yes
14463 else
14464   with_dmalloc=
14465 fi;
14466 echo "$as_me:14466: result: ${with_dmalloc:-no}" >&5
14467 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14468
14469 case .$with_cflags in
14470 (.*-g*)
14471         case .$CFLAGS in
14472         (.*-g*)
14473                 ;;
14474         (*)
14475
14476 cf_fix_cppflags=no
14477 cf_new_cflags=
14478 cf_new_cppflags=
14479 cf_new_extra_cppflags=
14480
14481 for cf_add_cflags in -g
14482 do
14483 case $cf_fix_cppflags in
14484 (no)
14485         case $cf_add_cflags in
14486         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14487                 case $cf_add_cflags in
14488                 (-D*)
14489                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14490
14491                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14492                                 && test -z "${cf_tst_cflags}" \
14493                                 && cf_fix_cppflags=yes
14494
14495                         if test $cf_fix_cppflags = yes ; then
14496
14497         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14498         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14499
14500                                 continue
14501                         elif test "${cf_tst_cflags}" = "\"'" ; then
14502
14503         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14504         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14505
14506                                 continue
14507                         fi
14508                         ;;
14509                 esac
14510                 case "$CPPFLAGS" in
14511                 (*$cf_add_cflags)
14512                         ;;
14513                 (*)
14514                         case $cf_add_cflags in
14515                         (-D*)
14516                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14517
14518 CPPFLAGS=`echo "$CPPFLAGS" | \
14519         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14520                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14521
14522                                 ;;
14523                         esac
14524
14525         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14526         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14527
14528                         ;;
14529                 esac
14530                 ;;
14531         (*)
14532
14533         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14534         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14535
14536                 ;;
14537         esac
14538         ;;
14539 (yes)
14540
14541         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14542         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14543
14544         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14545
14546         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14547                 && test -z "${cf_tst_cflags}" \
14548                 && cf_fix_cppflags=no
14549         ;;
14550 esac
14551 done
14552
14553 if test -n "$cf_new_cflags" ; then
14554
14555         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14556         CFLAGS="${CFLAGS}$cf_new_cflags"
14557
14558 fi
14559
14560 if test -n "$cf_new_cppflags" ; then
14561
14562         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14563         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14564
14565 fi
14566
14567 if test -n "$cf_new_extra_cppflags" ; then
14568
14569         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14570         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14571
14572 fi
14573
14574                 ;;
14575         esac
14576         ;;
14577 esac
14578
14579 if test "$with_dmalloc" = yes ; then
14580         echo "$as_me:14580: checking for dmalloc.h" >&5
14581 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14582 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14583   echo $ECHO_N "(cached) $ECHO_C" >&6
14584 else
14585   cat >conftest.$ac_ext <<_ACEOF
14586 #line 14586 "configure"
14587 #include "confdefs.h"
14588 #include <dmalloc.h>
14589 _ACEOF
14590 if { (eval echo "$as_me:14590: \"$ac_cpp conftest.$ac_ext\"") >&5
14591   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14592   ac_status=$?
14593   egrep -v '^ *\+' conftest.er1 >conftest.err
14594   rm -f conftest.er1
14595   cat conftest.err >&5
14596   echo "$as_me:14596: \$? = $ac_status" >&5
14597   (exit $ac_status); } >/dev/null; then
14598   if test -s conftest.err; then
14599     ac_cpp_err=$ac_c_preproc_warn_flag
14600   else
14601     ac_cpp_err=
14602   fi
14603 else
14604   ac_cpp_err=yes
14605 fi
14606 if test -z "$ac_cpp_err"; then
14607   ac_cv_header_dmalloc_h=yes
14608 else
14609   echo "$as_me: failed program was:" >&5
14610   cat conftest.$ac_ext >&5
14611   ac_cv_header_dmalloc_h=no
14612 fi
14613 rm -f conftest.err conftest.$ac_ext
14614 fi
14615 echo "$as_me:14615: result: $ac_cv_header_dmalloc_h" >&5
14616 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14617 if test $ac_cv_header_dmalloc_h = yes; then
14618
14619 echo "$as_me:14619: checking for dmalloc_debug in -ldmalloc" >&5
14620 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14621 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14622   echo $ECHO_N "(cached) $ECHO_C" >&6
14623 else
14624   ac_check_lib_save_LIBS=$LIBS
14625 LIBS="-ldmalloc  $LIBS"
14626 cat >conftest.$ac_ext <<_ACEOF
14627 #line 14627 "configure"
14628 #include "confdefs.h"
14629
14630 /* Override any gcc2 internal prototype to avoid an error.  */
14631 #ifdef __cplusplus
14632 extern "C"
14633 #endif
14634 /* We use char because int might match the return type of a gcc2
14635    builtin and then its argument prototype would still apply.  */
14636 char dmalloc_debug ();
14637 int
14638 main ()
14639 {
14640 dmalloc_debug ();
14641   ;
14642   return 0;
14643 }
14644 _ACEOF
14645 rm -f conftest.$ac_objext conftest$ac_exeext
14646 if { (eval echo "$as_me:14646: \"$ac_link\"") >&5
14647   (eval $ac_link) 2>&5
14648   ac_status=$?
14649   echo "$as_me:14649: \$? = $ac_status" >&5
14650   (exit $ac_status); } &&
14651          { ac_try='test -s conftest$ac_exeext'
14652   { (eval echo "$as_me:14652: \"$ac_try\"") >&5
14653   (eval $ac_try) 2>&5
14654   ac_status=$?
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit $ac_status); }; }; then
14657   ac_cv_lib_dmalloc_dmalloc_debug=yes
14658 else
14659   echo "$as_me: failed program was:" >&5
14660 cat conftest.$ac_ext >&5
14661 ac_cv_lib_dmalloc_dmalloc_debug=no
14662 fi
14663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14664 LIBS=$ac_check_lib_save_LIBS
14665 fi
14666 echo "$as_me:14666: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14667 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14668 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14669   cat >>confdefs.h <<EOF
14670 #define HAVE_LIBDMALLOC 1
14671 EOF
14672
14673   LIBS="-ldmalloc $LIBS"
14674
14675 fi
14676
14677 fi
14678
14679 fi
14680
14681 echo "$as_me:14681: checking if you want to use dbmalloc for testing" >&5
14682 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14683
14684 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14685 if test "${with_dbmalloc+set}" = set; then
14686   withval="$with_dbmalloc"
14687
14688 cat >>confdefs.h <<EOF
14689 #define USE_DBMALLOC 1
14690 EOF
14691
14692         : ${with_cflags:=-g}
14693         : ${with_no_leaks:=yes}
14694          with_dbmalloc=yes
14695 else
14696   with_dbmalloc=
14697 fi;
14698 echo "$as_me:14698: result: ${with_dbmalloc:-no}" >&5
14699 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14700
14701 case .$with_cflags in
14702 (.*-g*)
14703         case .$CFLAGS in
14704         (.*-g*)
14705                 ;;
14706         (*)
14707
14708 cf_fix_cppflags=no
14709 cf_new_cflags=
14710 cf_new_cppflags=
14711 cf_new_extra_cppflags=
14712
14713 for cf_add_cflags in -g
14714 do
14715 case $cf_fix_cppflags in
14716 (no)
14717         case $cf_add_cflags in
14718         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14719                 case $cf_add_cflags in
14720                 (-D*)
14721                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14722
14723                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14724                                 && test -z "${cf_tst_cflags}" \
14725                                 && cf_fix_cppflags=yes
14726
14727                         if test $cf_fix_cppflags = yes ; then
14728
14729         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14730         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14731
14732                                 continue
14733                         elif test "${cf_tst_cflags}" = "\"'" ; then
14734
14735         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14736         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14737
14738                                 continue
14739                         fi
14740                         ;;
14741                 esac
14742                 case "$CPPFLAGS" in
14743                 (*$cf_add_cflags)
14744                         ;;
14745                 (*)
14746                         case $cf_add_cflags in
14747                         (-D*)
14748                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14749
14750 CPPFLAGS=`echo "$CPPFLAGS" | \
14751         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14752                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14753
14754                                 ;;
14755                         esac
14756
14757         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14758         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14759
14760                         ;;
14761                 esac
14762                 ;;
14763         (*)
14764
14765         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14766         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14767
14768                 ;;
14769         esac
14770         ;;
14771 (yes)
14772
14773         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14774         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14775
14776         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14777
14778         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14779                 && test -z "${cf_tst_cflags}" \
14780                 && cf_fix_cppflags=no
14781         ;;
14782 esac
14783 done
14784
14785 if test -n "$cf_new_cflags" ; then
14786
14787         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14788         CFLAGS="${CFLAGS}$cf_new_cflags"
14789
14790 fi
14791
14792 if test -n "$cf_new_cppflags" ; then
14793
14794         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14795         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14796
14797 fi
14798
14799 if test -n "$cf_new_extra_cppflags" ; then
14800
14801         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14802         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14803
14804 fi
14805
14806                 ;;
14807         esac
14808         ;;
14809 esac
14810
14811 if test "$with_dbmalloc" = yes ; then
14812         echo "$as_me:14812: checking for dbmalloc.h" >&5
14813 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14814 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14815   echo $ECHO_N "(cached) $ECHO_C" >&6
14816 else
14817   cat >conftest.$ac_ext <<_ACEOF
14818 #line 14818 "configure"
14819 #include "confdefs.h"
14820 #include <dbmalloc.h>
14821 _ACEOF
14822 if { (eval echo "$as_me:14822: \"$ac_cpp conftest.$ac_ext\"") >&5
14823   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14824   ac_status=$?
14825   egrep -v '^ *\+' conftest.er1 >conftest.err
14826   rm -f conftest.er1
14827   cat conftest.err >&5
14828   echo "$as_me:14828: \$? = $ac_status" >&5
14829   (exit $ac_status); } >/dev/null; then
14830   if test -s conftest.err; then
14831     ac_cpp_err=$ac_c_preproc_warn_flag
14832   else
14833     ac_cpp_err=
14834   fi
14835 else
14836   ac_cpp_err=yes
14837 fi
14838 if test -z "$ac_cpp_err"; then
14839   ac_cv_header_dbmalloc_h=yes
14840 else
14841   echo "$as_me: failed program was:" >&5
14842   cat conftest.$ac_ext >&5
14843   ac_cv_header_dbmalloc_h=no
14844 fi
14845 rm -f conftest.err conftest.$ac_ext
14846 fi
14847 echo "$as_me:14847: result: $ac_cv_header_dbmalloc_h" >&5
14848 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14849 if test $ac_cv_header_dbmalloc_h = yes; then
14850
14851 echo "$as_me:14851: checking for debug_malloc in -ldbmalloc" >&5
14852 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14853 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14854   echo $ECHO_N "(cached) $ECHO_C" >&6
14855 else
14856   ac_check_lib_save_LIBS=$LIBS
14857 LIBS="-ldbmalloc  $LIBS"
14858 cat >conftest.$ac_ext <<_ACEOF
14859 #line 14859 "configure"
14860 #include "confdefs.h"
14861
14862 /* Override any gcc2 internal prototype to avoid an error.  */
14863 #ifdef __cplusplus
14864 extern "C"
14865 #endif
14866 /* We use char because int might match the return type of a gcc2
14867    builtin and then its argument prototype would still apply.  */
14868 char debug_malloc ();
14869 int
14870 main ()
14871 {
14872 debug_malloc ();
14873   ;
14874   return 0;
14875 }
14876 _ACEOF
14877 rm -f conftest.$ac_objext conftest$ac_exeext
14878 if { (eval echo "$as_me:14878: \"$ac_link\"") >&5
14879   (eval $ac_link) 2>&5
14880   ac_status=$?
14881   echo "$as_me:14881: \$? = $ac_status" >&5
14882   (exit $ac_status); } &&
14883          { ac_try='test -s conftest$ac_exeext'
14884   { (eval echo "$as_me:14884: \"$ac_try\"") >&5
14885   (eval $ac_try) 2>&5
14886   ac_status=$?
14887   echo "$as_me:14887: \$? = $ac_status" >&5
14888   (exit $ac_status); }; }; then
14889   ac_cv_lib_dbmalloc_debug_malloc=yes
14890 else
14891   echo "$as_me: failed program was:" >&5
14892 cat conftest.$ac_ext >&5
14893 ac_cv_lib_dbmalloc_debug_malloc=no
14894 fi
14895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14896 LIBS=$ac_check_lib_save_LIBS
14897 fi
14898 echo "$as_me:14898: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14899 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14900 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14901   cat >>confdefs.h <<EOF
14902 #define HAVE_LIBDBMALLOC 1
14903 EOF
14904
14905   LIBS="-ldbmalloc $LIBS"
14906
14907 fi
14908
14909 fi
14910
14911 fi
14912
14913 echo "$as_me:14913: checking if you want to use valgrind for testing" >&5
14914 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14915
14916 # Check whether --with-valgrind or --without-valgrind was given.
14917 if test "${with_valgrind+set}" = set; then
14918   withval="$with_valgrind"
14919
14920 cat >>confdefs.h <<EOF
14921 #define USE_VALGRIND 1
14922 EOF
14923
14924         : ${with_cflags:=-g}
14925         : ${with_no_leaks:=yes}
14926          with_valgrind=yes
14927 else
14928   with_valgrind=
14929 fi;
14930 echo "$as_me:14930: result: ${with_valgrind:-no}" >&5
14931 echo "${ECHO_T}${with_valgrind:-no}" >&6
14932
14933 case .$with_cflags in
14934 (.*-g*)
14935         case .$CFLAGS in
14936         (.*-g*)
14937                 ;;
14938         (*)
14939
14940 cf_fix_cppflags=no
14941 cf_new_cflags=
14942 cf_new_cppflags=
14943 cf_new_extra_cppflags=
14944
14945 for cf_add_cflags in -g
14946 do
14947 case $cf_fix_cppflags in
14948 (no)
14949         case $cf_add_cflags in
14950         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14951                 case $cf_add_cflags in
14952                 (-D*)
14953                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14954
14955                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14956                                 && test -z "${cf_tst_cflags}" \
14957                                 && cf_fix_cppflags=yes
14958
14959                         if test $cf_fix_cppflags = yes ; then
14960
14961         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14962         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14963
14964                                 continue
14965                         elif test "${cf_tst_cflags}" = "\"'" ; then
14966
14967         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14968         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14969
14970                                 continue
14971                         fi
14972                         ;;
14973                 esac
14974                 case "$CPPFLAGS" in
14975                 (*$cf_add_cflags)
14976                         ;;
14977                 (*)
14978                         case $cf_add_cflags in
14979                         (-D*)
14980                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14981
14982 CPPFLAGS=`echo "$CPPFLAGS" | \
14983         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14984                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14985
14986                                 ;;
14987                         esac
14988
14989         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14990         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14991
14992                         ;;
14993                 esac
14994                 ;;
14995         (*)
14996
14997         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14998         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14999
15000                 ;;
15001         esac
15002         ;;
15003 (yes)
15004
15005         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15006         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15007
15008         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15009
15010         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15011                 && test -z "${cf_tst_cflags}" \
15012                 && cf_fix_cppflags=no
15013         ;;
15014 esac
15015 done
15016
15017 if test -n "$cf_new_cflags" ; then
15018
15019         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15020         CFLAGS="${CFLAGS}$cf_new_cflags"
15021
15022 fi
15023
15024 if test -n "$cf_new_cppflags" ; then
15025
15026         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15027         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15028
15029 fi
15030
15031 if test -n "$cf_new_extra_cppflags" ; then
15032
15033         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15034         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15035
15036 fi
15037
15038                 ;;
15039         esac
15040         ;;
15041 esac
15042
15043 echo "$as_me:15043: checking if you want to perform memory-leak testing" >&5
15044 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15045
15046 # Check whether --enable-leaks or --disable-leaks was given.
15047 if test "${enable_leaks+set}" = set; then
15048   enableval="$enable_leaks"
15049   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15050 else
15051   : ${with_no_leaks:=no}
15052 fi;
15053 echo "$as_me:15053: result: $with_no_leaks" >&5
15054 echo "${ECHO_T}$with_no_leaks" >&6
15055
15056 if test "$with_no_leaks" = yes ; then
15057
15058 cat >>confdefs.h <<\EOF
15059 #define NO_LEAKS 1
15060 EOF
15061
15062 cat >>confdefs.h <<\EOF
15063 #define YY_NO_LEAKS 1
15064 EOF
15065
15066 fi
15067
15068 cat >>confdefs.h <<\EOF
15069 #define HAVE_NC_ALLOC_H 1
15070 EOF
15071
15072 ###     use option --enable-expanded to generate certain macros as functions
15073
15074 # Check whether --enable-expanded or --disable-expanded was given.
15075 if test "${enable_expanded+set}" = set; then
15076   enableval="$enable_expanded"
15077   test "x$enableval" = xyes &&
15078 cat >>confdefs.h <<\EOF
15079 #define NCURSES_EXPANDED 1
15080 EOF
15081
15082 fi;
15083
15084 ###     use option --disable-macros to suppress macros in favor of functions
15085
15086 # Check whether --enable-macros or --disable-macros was given.
15087 if test "${enable_macros+set}" = set; then
15088   enableval="$enable_macros"
15089   test "$enableval" = no &&
15090 cat >>confdefs.h <<\EOF
15091 #define NCURSES_NOMACROS 1
15092 EOF
15093
15094 fi;
15095
15096 # Normally we only add trace() to the debug-library.  Allow this to be
15097 # extended to all models of the ncurses library:
15098 cf_all_traces=no
15099 case "$CFLAGS $CPPFLAGS" in
15100 (*-DTRACE*)
15101         cf_all_traces=yes
15102         ;;
15103 esac
15104
15105 echo "$as_me:15105: checking whether to add trace feature to all models" >&5
15106 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15107
15108 # Check whether --with-trace or --without-trace was given.
15109 if test "${with_trace+set}" = set; then
15110   withval="$with_trace"
15111   cf_with_trace=$withval
15112 else
15113   cf_with_trace=$cf_all_traces
15114 fi;
15115 echo "$as_me:15115: result: $cf_with_trace" >&5
15116 echo "${ECHO_T}$cf_with_trace" >&6
15117
15118 if test "x$cf_with_trace" = xyes ; then
15119         LIB_TRACING=all
15120         ADA_TRACE=TRUE
15121
15122 cf_fix_cppflags=no
15123 cf_new_cflags=
15124 cf_new_cppflags=
15125 cf_new_extra_cppflags=
15126
15127 for cf_add_cflags in -DTRACE
15128 do
15129 case $cf_fix_cppflags in
15130 (no)
15131         case $cf_add_cflags in
15132         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15133                 case $cf_add_cflags in
15134                 (-D*)
15135                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15136
15137                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15138                                 && test -z "${cf_tst_cflags}" \
15139                                 && cf_fix_cppflags=yes
15140
15141                         if test $cf_fix_cppflags = yes ; then
15142
15143         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15144         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15145
15146                                 continue
15147                         elif test "${cf_tst_cflags}" = "\"'" ; then
15148
15149         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15150         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15151
15152                                 continue
15153                         fi
15154                         ;;
15155                 esac
15156                 case "$CPPFLAGS" in
15157                 (*$cf_add_cflags)
15158                         ;;
15159                 (*)
15160                         case $cf_add_cflags in
15161                         (-D*)
15162                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15163
15164 CPPFLAGS=`echo "$CPPFLAGS" | \
15165         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15166                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15167
15168                                 ;;
15169                         esac
15170
15171         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15172         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15173
15174                         ;;
15175                 esac
15176                 ;;
15177         (*)
15178
15179         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15180         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15181
15182                 ;;
15183         esac
15184         ;;
15185 (yes)
15186
15187         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15188         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15189
15190         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15191
15192         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15193                 && test -z "${cf_tst_cflags}" \
15194                 && cf_fix_cppflags=no
15195         ;;
15196 esac
15197 done
15198
15199 if test -n "$cf_new_cflags" ; then
15200
15201         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15202         CFLAGS="${CFLAGS}$cf_new_cflags"
15203
15204 fi
15205
15206 if test -n "$cf_new_cppflags" ; then
15207
15208         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15209         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15210
15211 fi
15212
15213 if test -n "$cf_new_extra_cppflags" ; then
15214
15215         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15216         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15217
15218 fi
15219
15220 else
15221         LIB_TRACING=DEBUG
15222         ADA_TRACE=FALSE
15223 fi
15224
15225 echo "$as_me:15225: checking if we want to use GNAT projects" >&5
15226 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15227
15228 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15229 if test "${enable_gnat_projects+set}" = set; then
15230   enableval="$enable_gnat_projects"
15231   test "$enableval" != no && enableval=yes
15232         if test "$enableval" != "yes" ; then
15233     enable_gnat_projects=no
15234         else
15235                 enable_gnat_projects=yes
15236         fi
15237 else
15238   enableval=yes
15239         enable_gnat_projects=yes
15240
15241 fi;
15242 echo "$as_me:15242: result: $enable_gnat_projects" >&5
15243 echo "${ECHO_T}$enable_gnat_projects" >&6
15244
15245 ###     Checks for libraries.
15246 case $cf_cv_system_name in
15247 (*mingw32*|*mingw64*)
15248         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15249         LIBS=" -lpsapi $LIBS"
15250         ;;
15251 (*)
15252 echo "$as_me:15252: checking for gettimeofday" >&5
15253 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15254 if test "${ac_cv_func_gettimeofday+set}" = set; then
15255   echo $ECHO_N "(cached) $ECHO_C" >&6
15256 else
15257   cat >conftest.$ac_ext <<_ACEOF
15258 #line 15258 "configure"
15259 #include "confdefs.h"
15260 /* System header to define __stub macros and hopefully few prototypes,
15261     which can conflict with char gettimeofday (); below.  */
15262 #include <assert.h>
15263 /* Override any gcc2 internal prototype to avoid an error.  */
15264 #ifdef __cplusplus
15265 extern "C"
15266 #endif
15267 /* We use char because int might match the return type of a gcc2
15268    builtin and then its argument prototype would still apply.  */
15269 char gettimeofday ();
15270 char (*f) ();
15271
15272 int
15273 main ()
15274 {
15275 /* The GNU C library defines this for functions which it implements
15276     to always fail with ENOSYS.  Some functions are actually named
15277     something starting with __ and the normal name is an alias.  */
15278 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15279 choke me
15280 #else
15281 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15282 #endif
15283
15284   ;
15285   return 0;
15286 }
15287 _ACEOF
15288 rm -f conftest.$ac_objext conftest$ac_exeext
15289 if { (eval echo "$as_me:15289: \"$ac_link\"") >&5
15290   (eval $ac_link) 2>&5
15291   ac_status=$?
15292   echo "$as_me:15292: \$? = $ac_status" >&5
15293   (exit $ac_status); } &&
15294          { ac_try='test -s conftest$ac_exeext'
15295   { (eval echo "$as_me:15295: \"$ac_try\"") >&5
15296   (eval $ac_try) 2>&5
15297   ac_status=$?
15298   echo "$as_me:15298: \$? = $ac_status" >&5
15299   (exit $ac_status); }; }; then
15300   ac_cv_func_gettimeofday=yes
15301 else
15302   echo "$as_me: failed program was:" >&5
15303 cat conftest.$ac_ext >&5
15304 ac_cv_func_gettimeofday=no
15305 fi
15306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15307 fi
15308 echo "$as_me:15308: result: $ac_cv_func_gettimeofday" >&5
15309 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15310 if test $ac_cv_func_gettimeofday = yes; then
15311
15312 cat >>confdefs.h <<\EOF
15313 #define HAVE_GETTIMEOFDAY 1
15314 EOF
15315
15316 else
15317
15318 echo "$as_me:15318: checking for gettimeofday in -lbsd" >&5
15319 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15320 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15321   echo $ECHO_N "(cached) $ECHO_C" >&6
15322 else
15323   ac_check_lib_save_LIBS=$LIBS
15324 LIBS="-lbsd  $LIBS"
15325 cat >conftest.$ac_ext <<_ACEOF
15326 #line 15326 "configure"
15327 #include "confdefs.h"
15328
15329 /* Override any gcc2 internal prototype to avoid an error.  */
15330 #ifdef __cplusplus
15331 extern "C"
15332 #endif
15333 /* We use char because int might match the return type of a gcc2
15334    builtin and then its argument prototype would still apply.  */
15335 char gettimeofday ();
15336 int
15337 main ()
15338 {
15339 gettimeofday ();
15340   ;
15341   return 0;
15342 }
15343 _ACEOF
15344 rm -f conftest.$ac_objext conftest$ac_exeext
15345 if { (eval echo "$as_me:15345: \"$ac_link\"") >&5
15346   (eval $ac_link) 2>&5
15347   ac_status=$?
15348   echo "$as_me:15348: \$? = $ac_status" >&5
15349   (exit $ac_status); } &&
15350          { ac_try='test -s conftest$ac_exeext'
15351   { (eval echo "$as_me:15351: \"$ac_try\"") >&5
15352   (eval $ac_try) 2>&5
15353   ac_status=$?
15354   echo "$as_me:15354: \$? = $ac_status" >&5
15355   (exit $ac_status); }; }; then
15356   ac_cv_lib_bsd_gettimeofday=yes
15357 else
15358   echo "$as_me: failed program was:" >&5
15359 cat conftest.$ac_ext >&5
15360 ac_cv_lib_bsd_gettimeofday=no
15361 fi
15362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15363 LIBS=$ac_check_lib_save_LIBS
15364 fi
15365 echo "$as_me:15365: result: $ac_cv_lib_bsd_gettimeofday" >&5
15366 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15367 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15368
15369 cat >>confdefs.h <<\EOF
15370 #define HAVE_GETTIMEOFDAY 1
15371 EOF
15372
15373 cf_add_libs="-lbsd"
15374 # Filter out duplicates - this happens with badly-designed ".pc" files...
15375 for cf_add_1lib in $LIBS
15376 do
15377         for cf_add_2lib in $cf_add_libs
15378         do
15379                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15380                 then
15381                         cf_add_1lib=
15382                         break
15383                 fi
15384         done
15385         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15386 done
15387 LIBS="$cf_add_libs"
15388
15389 fi
15390
15391 fi
15392         ;;
15393 esac
15394
15395 echo "$as_me:15395: checking if -lm needed for math functions" >&5
15396 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15397 if test "${cf_cv_need_libm+set}" = set; then
15398   echo $ECHO_N "(cached) $ECHO_C" >&6
15399 else
15400
15401         cat >conftest.$ac_ext <<_ACEOF
15402 #line 15402 "configure"
15403 #include "confdefs.h"
15404
15405         #include <stdio.h>
15406         #include <stdlib.h>
15407         #include <math.h>
15408
15409 int
15410 main ()
15411 {
15412 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15413   ;
15414   return 0;
15415 }
15416 _ACEOF
15417 rm -f conftest.$ac_objext conftest$ac_exeext
15418 if { (eval echo "$as_me:15418: \"$ac_link\"") >&5
15419   (eval $ac_link) 2>&5
15420   ac_status=$?
15421   echo "$as_me:15421: \$? = $ac_status" >&5
15422   (exit $ac_status); } &&
15423          { ac_try='test -s conftest$ac_exeext'
15424   { (eval echo "$as_me:15424: \"$ac_try\"") >&5
15425   (eval $ac_try) 2>&5
15426   ac_status=$?
15427   echo "$as_me:15427: \$? = $ac_status" >&5
15428   (exit $ac_status); }; }; then
15429   cf_cv_need_libm=no
15430 else
15431   echo "$as_me: failed program was:" >&5
15432 cat conftest.$ac_ext >&5
15433 cf_cv_need_libm=yes
15434 fi
15435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15436 fi
15437 echo "$as_me:15437: result: $cf_cv_need_libm" >&5
15438 echo "${ECHO_T}$cf_cv_need_libm" >&6
15439 if test "$cf_cv_need_libm" = yes
15440 then
15441 MATH_LIB=-lm
15442 fi
15443
15444 ###     Checks for header files.
15445 echo "$as_me:15445: checking for ANSI C header files" >&5
15446 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15447 if test "${ac_cv_header_stdc+set}" = set; then
15448   echo $ECHO_N "(cached) $ECHO_C" >&6
15449 else
15450   cat >conftest.$ac_ext <<_ACEOF
15451 #line 15451 "configure"
15452 #include "confdefs.h"
15453 #include <stdlib.h>
15454 #include <stdarg.h>
15455 #include <string.h>
15456 #include <float.h>
15457
15458 _ACEOF
15459 if { (eval echo "$as_me:15459: \"$ac_cpp conftest.$ac_ext\"") >&5
15460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15461   ac_status=$?
15462   egrep -v '^ *\+' conftest.er1 >conftest.err
15463   rm -f conftest.er1
15464   cat conftest.err >&5
15465   echo "$as_me:15465: \$? = $ac_status" >&5
15466   (exit $ac_status); } >/dev/null; then
15467   if test -s conftest.err; then
15468     ac_cpp_err=$ac_c_preproc_warn_flag
15469   else
15470     ac_cpp_err=
15471   fi
15472 else
15473   ac_cpp_err=yes
15474 fi
15475 if test -z "$ac_cpp_err"; then
15476   ac_cv_header_stdc=yes
15477 else
15478   echo "$as_me: failed program was:" >&5
15479   cat conftest.$ac_ext >&5
15480   ac_cv_header_stdc=no
15481 fi
15482 rm -f conftest.err conftest.$ac_ext
15483
15484 if test $ac_cv_header_stdc = yes; then
15485   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15486   cat >conftest.$ac_ext <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15489 #include <string.h>
15490
15491 _ACEOF
15492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15493   egrep "memchr" >/dev/null 2>&1; then
15494   :
15495 else
15496   ac_cv_header_stdc=no
15497 fi
15498 rm -rf conftest*
15499
15500 fi
15501
15502 if test $ac_cv_header_stdc = yes; then
15503   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15504   cat >conftest.$ac_ext <<_ACEOF
15505 #line 15505 "configure"
15506 #include "confdefs.h"
15507 #include <stdlib.h>
15508
15509 _ACEOF
15510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15511   egrep "free" >/dev/null 2>&1; then
15512   :
15513 else
15514   ac_cv_header_stdc=no
15515 fi
15516 rm -rf conftest*
15517
15518 fi
15519
15520 if test $ac_cv_header_stdc = yes; then
15521   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15522   if test "$cross_compiling" = yes; then
15523   :
15524 else
15525   cat >conftest.$ac_ext <<_ACEOF
15526 #line 15526 "configure"
15527 #include "confdefs.h"
15528 #include <ctype.h>
15529 #if ((' ' & 0x0FF) == 0x020)
15530 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15531 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15532 #else
15533 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15534                      || ('j' <= (c) && (c) <= 'r') \
15535                      || ('s' <= (c) && (c) <= 'z'))
15536 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15537 #endif
15538
15539 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15540 int
15541 main ()
15542 {
15543   int i;
15544   for (i = 0; i < 256; i++)
15545     if (XOR (islower (i), ISLOWER (i))
15546         || toupper (i) != TOUPPER (i))
15547       $ac_main_return(2);
15548   $ac_main_return (0);
15549 }
15550 _ACEOF
15551 rm -f conftest$ac_exeext
15552 if { (eval echo "$as_me:15552: \"$ac_link\"") >&5
15553   (eval $ac_link) 2>&5
15554   ac_status=$?
15555   echo "$as_me:15555: \$? = $ac_status" >&5
15556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15557   { (eval echo "$as_me:15557: \"$ac_try\"") >&5
15558   (eval $ac_try) 2>&5
15559   ac_status=$?
15560   echo "$as_me:15560: \$? = $ac_status" >&5
15561   (exit $ac_status); }; }; then
15562   :
15563 else
15564   echo "$as_me: program exited with status $ac_status" >&5
15565 echo "$as_me: failed program was:" >&5
15566 cat conftest.$ac_ext >&5
15567 ac_cv_header_stdc=no
15568 fi
15569 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15570 fi
15571 fi
15572 fi
15573 echo "$as_me:15573: result: $ac_cv_header_stdc" >&5
15574 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15575 if test $ac_cv_header_stdc = yes; then
15576
15577 cat >>confdefs.h <<\EOF
15578 #define STDC_HEADERS 1
15579 EOF
15580
15581 fi
15582
15583 ac_header_dirent=no
15584 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15585   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15586 echo "$as_me:15586: checking for $ac_hdr that defines DIR" >&5
15587 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15588 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15589   echo $ECHO_N "(cached) $ECHO_C" >&6
15590 else
15591   cat >conftest.$ac_ext <<_ACEOF
15592 #line 15592 "configure"
15593 #include "confdefs.h"
15594 #include <sys/types.h>
15595 #include <$ac_hdr>
15596
15597 int
15598 main ()
15599 {
15600 if ((DIR *) 0)
15601 return 0;
15602   ;
15603   return 0;
15604 }
15605 _ACEOF
15606 rm -f conftest.$ac_objext
15607 if { (eval echo "$as_me:15607: \"$ac_compile\"") >&5
15608   (eval $ac_compile) 2>&5
15609   ac_status=$?
15610   echo "$as_me:15610: \$? = $ac_status" >&5
15611   (exit $ac_status); } &&
15612          { ac_try='test -s conftest.$ac_objext'
15613   { (eval echo "$as_me:15613: \"$ac_try\"") >&5
15614   (eval $ac_try) 2>&5
15615   ac_status=$?
15616   echo "$as_me:15616: \$? = $ac_status" >&5
15617   (exit $ac_status); }; }; then
15618   eval "$as_ac_Header=yes"
15619 else
15620   echo "$as_me: failed program was:" >&5
15621 cat conftest.$ac_ext >&5
15622 eval "$as_ac_Header=no"
15623 fi
15624 rm -f conftest.$ac_objext conftest.$ac_ext
15625 fi
15626 echo "$as_me:15626: result: `eval echo '${'$as_ac_Header'}'`" >&5
15627 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15628 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15629   cat >>confdefs.h <<EOF
15630 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15631 EOF
15632
15633 ac_header_dirent=$ac_hdr; break
15634 fi
15635
15636 done
15637 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15638 if test $ac_header_dirent = dirent.h; then
15639   echo "$as_me:15639: checking for opendir in -ldir" >&5
15640 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15641 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15642   echo $ECHO_N "(cached) $ECHO_C" >&6
15643 else
15644   ac_check_lib_save_LIBS=$LIBS
15645 LIBS="-ldir  $LIBS"
15646 cat >conftest.$ac_ext <<_ACEOF
15647 #line 15647 "configure"
15648 #include "confdefs.h"
15649
15650 /* Override any gcc2 internal prototype to avoid an error.  */
15651 #ifdef __cplusplus
15652 extern "C"
15653 #endif
15654 /* We use char because int might match the return type of a gcc2
15655    builtin and then its argument prototype would still apply.  */
15656 char opendir ();
15657 int
15658 main ()
15659 {
15660 opendir ();
15661   ;
15662   return 0;
15663 }
15664 _ACEOF
15665 rm -f conftest.$ac_objext conftest$ac_exeext
15666 if { (eval echo "$as_me:15666: \"$ac_link\"") >&5
15667   (eval $ac_link) 2>&5
15668   ac_status=$?
15669   echo "$as_me:15669: \$? = $ac_status" >&5
15670   (exit $ac_status); } &&
15671          { ac_try='test -s conftest$ac_exeext'
15672   { (eval echo "$as_me:15672: \"$ac_try\"") >&5
15673   (eval $ac_try) 2>&5
15674   ac_status=$?
15675   echo "$as_me:15675: \$? = $ac_status" >&5
15676   (exit $ac_status); }; }; then
15677   ac_cv_lib_dir_opendir=yes
15678 else
15679   echo "$as_me: failed program was:" >&5
15680 cat conftest.$ac_ext >&5
15681 ac_cv_lib_dir_opendir=no
15682 fi
15683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15684 LIBS=$ac_check_lib_save_LIBS
15685 fi
15686 echo "$as_me:15686: result: $ac_cv_lib_dir_opendir" >&5
15687 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15688 if test $ac_cv_lib_dir_opendir = yes; then
15689   LIBS="$LIBS -ldir"
15690 fi
15691
15692 else
15693   echo "$as_me:15693: checking for opendir in -lx" >&5
15694 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15695 if test "${ac_cv_lib_x_opendir+set}" = set; then
15696   echo $ECHO_N "(cached) $ECHO_C" >&6
15697 else
15698   ac_check_lib_save_LIBS=$LIBS
15699 LIBS="-lx  $LIBS"
15700 cat >conftest.$ac_ext <<_ACEOF
15701 #line 15701 "configure"
15702 #include "confdefs.h"
15703
15704 /* Override any gcc2 internal prototype to avoid an error.  */
15705 #ifdef __cplusplus
15706 extern "C"
15707 #endif
15708 /* We use char because int might match the return type of a gcc2
15709    builtin and then its argument prototype would still apply.  */
15710 char opendir ();
15711 int
15712 main ()
15713 {
15714 opendir ();
15715   ;
15716   return 0;
15717 }
15718 _ACEOF
15719 rm -f conftest.$ac_objext conftest$ac_exeext
15720 if { (eval echo "$as_me:15720: \"$ac_link\"") >&5
15721   (eval $ac_link) 2>&5
15722   ac_status=$?
15723   echo "$as_me:15723: \$? = $ac_status" >&5
15724   (exit $ac_status); } &&
15725          { ac_try='test -s conftest$ac_exeext'
15726   { (eval echo "$as_me:15726: \"$ac_try\"") >&5
15727   (eval $ac_try) 2>&5
15728   ac_status=$?
15729   echo "$as_me:15729: \$? = $ac_status" >&5
15730   (exit $ac_status); }; }; then
15731   ac_cv_lib_x_opendir=yes
15732 else
15733   echo "$as_me: failed program was:" >&5
15734 cat conftest.$ac_ext >&5
15735 ac_cv_lib_x_opendir=no
15736 fi
15737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15738 LIBS=$ac_check_lib_save_LIBS
15739 fi
15740 echo "$as_me:15740: result: $ac_cv_lib_x_opendir" >&5
15741 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15742 if test $ac_cv_lib_x_opendir = yes; then
15743   LIBS="$LIBS -lx"
15744 fi
15745
15746 fi
15747
15748 echo "$as_me:15748: checking whether time.h and sys/time.h may both be included" >&5
15749 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15750 if test "${ac_cv_header_time+set}" = set; then
15751   echo $ECHO_N "(cached) $ECHO_C" >&6
15752 else
15753   cat >conftest.$ac_ext <<_ACEOF
15754 #line 15754 "configure"
15755 #include "confdefs.h"
15756 #include <sys/types.h>
15757 #include <sys/time.h>
15758 #include <time.h>
15759
15760 int
15761 main ()
15762 {
15763 if ((struct tm *) 0)
15764 return 0;
15765   ;
15766   return 0;
15767 }
15768 _ACEOF
15769 rm -f conftest.$ac_objext
15770 if { (eval echo "$as_me:15770: \"$ac_compile\"") >&5
15771   (eval $ac_compile) 2>&5
15772   ac_status=$?
15773   echo "$as_me:15773: \$? = $ac_status" >&5
15774   (exit $ac_status); } &&
15775          { ac_try='test -s conftest.$ac_objext'
15776   { (eval echo "$as_me:15776: \"$ac_try\"") >&5
15777   (eval $ac_try) 2>&5
15778   ac_status=$?
15779   echo "$as_me:15779: \$? = $ac_status" >&5
15780   (exit $ac_status); }; }; then
15781   ac_cv_header_time=yes
15782 else
15783   echo "$as_me: failed program was:" >&5
15784 cat conftest.$ac_ext >&5
15785 ac_cv_header_time=no
15786 fi
15787 rm -f conftest.$ac_objext conftest.$ac_ext
15788 fi
15789 echo "$as_me:15789: result: $ac_cv_header_time" >&5
15790 echo "${ECHO_T}$ac_cv_header_time" >&6
15791 if test $ac_cv_header_time = yes; then
15792
15793 cat >>confdefs.h <<\EOF
15794 #define TIME_WITH_SYS_TIME 1
15795 EOF
15796
15797 fi
15798
15799 cf_regex_func=no
15800
15801 cf_regex_libs="regex re"
15802 case $host_os in
15803 (mingw*)
15804         cf_regex_libs="gnurx $cf_regex_libs"
15805         ;;
15806 esac
15807
15808 echo "$as_me:15808: checking for regcomp" >&5
15809 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15810 if test "${ac_cv_func_regcomp+set}" = set; then
15811   echo $ECHO_N "(cached) $ECHO_C" >&6
15812 else
15813   cat >conftest.$ac_ext <<_ACEOF
15814 #line 15814 "configure"
15815 #include "confdefs.h"
15816 /* System header to define __stub macros and hopefully few prototypes,
15817     which can conflict with char regcomp (); below.  */
15818 #include <assert.h>
15819 /* Override any gcc2 internal prototype to avoid an error.  */
15820 #ifdef __cplusplus
15821 extern "C"
15822 #endif
15823 /* We use char because int might match the return type of a gcc2
15824    builtin and then its argument prototype would still apply.  */
15825 char regcomp ();
15826 char (*f) ();
15827
15828 int
15829 main ()
15830 {
15831 /* The GNU C library defines this for functions which it implements
15832     to always fail with ENOSYS.  Some functions are actually named
15833     something starting with __ and the normal name is an alias.  */
15834 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15835 choke me
15836 #else
15837 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15838 #endif
15839
15840   ;
15841   return 0;
15842 }
15843 _ACEOF
15844 rm -f conftest.$ac_objext conftest$ac_exeext
15845 if { (eval echo "$as_me:15845: \"$ac_link\"") >&5
15846   (eval $ac_link) 2>&5
15847   ac_status=$?
15848   echo "$as_me:15848: \$? = $ac_status" >&5
15849   (exit $ac_status); } &&
15850          { ac_try='test -s conftest$ac_exeext'
15851   { (eval echo "$as_me:15851: \"$ac_try\"") >&5
15852   (eval $ac_try) 2>&5
15853   ac_status=$?
15854   echo "$as_me:15854: \$? = $ac_status" >&5
15855   (exit $ac_status); }; }; then
15856   ac_cv_func_regcomp=yes
15857 else
15858   echo "$as_me: failed program was:" >&5
15859 cat conftest.$ac_ext >&5
15860 ac_cv_func_regcomp=no
15861 fi
15862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15863 fi
15864 echo "$as_me:15864: result: $ac_cv_func_regcomp" >&5
15865 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15866 if test $ac_cv_func_regcomp = yes; then
15867   cf_regex_func=regcomp
15868 else
15869
15870         for cf_regex_lib in $cf_regex_libs
15871         do
15872                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15873 echo "$as_me:15873: checking for regcomp in -l$cf_regex_lib" >&5
15874 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15875 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15876   echo $ECHO_N "(cached) $ECHO_C" >&6
15877 else
15878   ac_check_lib_save_LIBS=$LIBS
15879 LIBS="-l$cf_regex_lib  $LIBS"
15880 cat >conftest.$ac_ext <<_ACEOF
15881 #line 15881 "configure"
15882 #include "confdefs.h"
15883
15884 /* Override any gcc2 internal prototype to avoid an error.  */
15885 #ifdef __cplusplus
15886 extern "C"
15887 #endif
15888 /* We use char because int might match the return type of a gcc2
15889    builtin and then its argument prototype would still apply.  */
15890 char regcomp ();
15891 int
15892 main ()
15893 {
15894 regcomp ();
15895   ;
15896   return 0;
15897 }
15898 _ACEOF
15899 rm -f conftest.$ac_objext conftest$ac_exeext
15900 if { (eval echo "$as_me:15900: \"$ac_link\"") >&5
15901   (eval $ac_link) 2>&5
15902   ac_status=$?
15903   echo "$as_me:15903: \$? = $ac_status" >&5
15904   (exit $ac_status); } &&
15905          { ac_try='test -s conftest$ac_exeext'
15906   { (eval echo "$as_me:15906: \"$ac_try\"") >&5
15907   (eval $ac_try) 2>&5
15908   ac_status=$?
15909   echo "$as_me:15909: \$? = $ac_status" >&5
15910   (exit $ac_status); }; }; then
15911   eval "$as_ac_Lib=yes"
15912 else
15913   echo "$as_me: failed program was:" >&5
15914 cat conftest.$ac_ext >&5
15915 eval "$as_ac_Lib=no"
15916 fi
15917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15918 LIBS=$ac_check_lib_save_LIBS
15919 fi
15920 echo "$as_me:15920: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15921 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15922 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15923
15924 cf_add_libs="-l$cf_regex_lib"
15925 # Filter out duplicates - this happens with badly-designed ".pc" files...
15926 for cf_add_1lib in $LIBS
15927 do
15928         for cf_add_2lib in $cf_add_libs
15929         do
15930                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15931                 then
15932                         cf_add_1lib=
15933                         break
15934                 fi
15935         done
15936         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15937 done
15938 LIBS="$cf_add_libs"
15939
15940                                 cf_regex_func=regcomp
15941                                 break
15942 fi
15943
15944         done
15945
15946 fi
15947
15948 if test "$cf_regex_func" = no ; then
15949         echo "$as_me:15949: checking for compile" >&5
15950 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15951 if test "${ac_cv_func_compile+set}" = set; then
15952   echo $ECHO_N "(cached) $ECHO_C" >&6
15953 else
15954   cat >conftest.$ac_ext <<_ACEOF
15955 #line 15955 "configure"
15956 #include "confdefs.h"
15957 /* System header to define __stub macros and hopefully few prototypes,
15958     which can conflict with char compile (); below.  */
15959 #include <assert.h>
15960 /* Override any gcc2 internal prototype to avoid an error.  */
15961 #ifdef __cplusplus
15962 extern "C"
15963 #endif
15964 /* We use char because int might match the return type of a gcc2
15965    builtin and then its argument prototype would still apply.  */
15966 char compile ();
15967 char (*f) ();
15968
15969 int
15970 main ()
15971 {
15972 /* The GNU C library defines this for functions which it implements
15973     to always fail with ENOSYS.  Some functions are actually named
15974     something starting with __ and the normal name is an alias.  */
15975 #if defined (__stub_compile) || defined (__stub___compile)
15976 choke me
15977 #else
15978 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15979 #endif
15980
15981   ;
15982   return 0;
15983 }
15984 _ACEOF
15985 rm -f conftest.$ac_objext conftest$ac_exeext
15986 if { (eval echo "$as_me:15986: \"$ac_link\"") >&5
15987   (eval $ac_link) 2>&5
15988   ac_status=$?
15989   echo "$as_me:15989: \$? = $ac_status" >&5
15990   (exit $ac_status); } &&
15991          { ac_try='test -s conftest$ac_exeext'
15992   { (eval echo "$as_me:15992: \"$ac_try\"") >&5
15993   (eval $ac_try) 2>&5
15994   ac_status=$?
15995   echo "$as_me:15995: \$? = $ac_status" >&5
15996   (exit $ac_status); }; }; then
15997   ac_cv_func_compile=yes
15998 else
15999   echo "$as_me: failed program was:" >&5
16000 cat conftest.$ac_ext >&5
16001 ac_cv_func_compile=no
16002 fi
16003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16004 fi
16005 echo "$as_me:16005: result: $ac_cv_func_compile" >&5
16006 echo "${ECHO_T}$ac_cv_func_compile" >&6
16007 if test $ac_cv_func_compile = yes; then
16008   cf_regex_func=compile
16009 else
16010
16011                 echo "$as_me:16011: checking for compile in -lgen" >&5
16012 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16013 if test "${ac_cv_lib_gen_compile+set}" = set; then
16014   echo $ECHO_N "(cached) $ECHO_C" >&6
16015 else
16016   ac_check_lib_save_LIBS=$LIBS
16017 LIBS="-lgen  $LIBS"
16018 cat >conftest.$ac_ext <<_ACEOF
16019 #line 16019 "configure"
16020 #include "confdefs.h"
16021
16022 /* Override any gcc2 internal prototype to avoid an error.  */
16023 #ifdef __cplusplus
16024 extern "C"
16025 #endif
16026 /* We use char because int might match the return type of a gcc2
16027    builtin and then its argument prototype would still apply.  */
16028 char compile ();
16029 int
16030 main ()
16031 {
16032 compile ();
16033   ;
16034   return 0;
16035 }
16036 _ACEOF
16037 rm -f conftest.$ac_objext conftest$ac_exeext
16038 if { (eval echo "$as_me:16038: \"$ac_link\"") >&5
16039   (eval $ac_link) 2>&5
16040   ac_status=$?
16041   echo "$as_me:16041: \$? = $ac_status" >&5
16042   (exit $ac_status); } &&
16043          { ac_try='test -s conftest$ac_exeext'
16044   { (eval echo "$as_me:16044: \"$ac_try\"") >&5
16045   (eval $ac_try) 2>&5
16046   ac_status=$?
16047   echo "$as_me:16047: \$? = $ac_status" >&5
16048   (exit $ac_status); }; }; then
16049   ac_cv_lib_gen_compile=yes
16050 else
16051   echo "$as_me: failed program was:" >&5
16052 cat conftest.$ac_ext >&5
16053 ac_cv_lib_gen_compile=no
16054 fi
16055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16056 LIBS=$ac_check_lib_save_LIBS
16057 fi
16058 echo "$as_me:16058: result: $ac_cv_lib_gen_compile" >&5
16059 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16060 if test $ac_cv_lib_gen_compile = yes; then
16061
16062 cf_add_libs="-lgen"
16063 # Filter out duplicates - this happens with badly-designed ".pc" files...
16064 for cf_add_1lib in $LIBS
16065 do
16066         for cf_add_2lib in $cf_add_libs
16067         do
16068                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16069                 then
16070                         cf_add_1lib=
16071                         break
16072                 fi
16073         done
16074         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16075 done
16076 LIBS="$cf_add_libs"
16077
16078                                 cf_regex_func=compile
16079 fi
16080
16081 fi
16082
16083 fi
16084
16085 if test "$cf_regex_func" = no ; then
16086         { echo "$as_me:16086: WARNING: cannot find regular expression library" >&5
16087 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16088 fi
16089
16090 echo "$as_me:16090: checking for regular-expression headers" >&5
16091 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16092 if test "${cf_cv_regex_hdrs+set}" = set; then
16093   echo $ECHO_N "(cached) $ECHO_C" >&6
16094 else
16095
16096 cf_cv_regex_hdrs=no
16097 case $cf_regex_func in
16098 (compile)
16099         for cf_regex_hdr in regexp.h regexpr.h
16100         do
16101                 cat >conftest.$ac_ext <<_ACEOF
16102 #line 16102 "configure"
16103 #include "confdefs.h"
16104 #include <$cf_regex_hdr>
16105 int
16106 main ()
16107 {
16108
16109                         char *p = compile("", "", "", 0);
16110                         int x = step("", "");
16111
16112   ;
16113   return 0;
16114 }
16115 _ACEOF
16116 rm -f conftest.$ac_objext conftest$ac_exeext
16117 if { (eval echo "$as_me:16117: \"$ac_link\"") >&5
16118   (eval $ac_link) 2>&5
16119   ac_status=$?
16120   echo "$as_me:16120: \$? = $ac_status" >&5
16121   (exit $ac_status); } &&
16122          { ac_try='test -s conftest$ac_exeext'
16123   { (eval echo "$as_me:16123: \"$ac_try\"") >&5
16124   (eval $ac_try) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); }; }; then
16128
16129                         cf_cv_regex_hdrs=$cf_regex_hdr
16130                         break
16131
16132 else
16133   echo "$as_me: failed program was:" >&5
16134 cat conftest.$ac_ext >&5
16135 fi
16136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16137         done
16138         ;;
16139 (*)
16140         for cf_regex_hdr in regex.h
16141         do
16142                 cat >conftest.$ac_ext <<_ACEOF
16143 #line 16143 "configure"
16144 #include "confdefs.h"
16145 #include <sys/types.h>
16146 #include <$cf_regex_hdr>
16147 int
16148 main ()
16149 {
16150
16151                         regex_t *p;
16152                         int x = regcomp(p, "", 0);
16153                         int y = regexec(p, "", 0, 0, 0);
16154                         regfree(p);
16155
16156   ;
16157   return 0;
16158 }
16159 _ACEOF
16160 rm -f conftest.$ac_objext conftest$ac_exeext
16161 if { (eval echo "$as_me:16161: \"$ac_link\"") >&5
16162   (eval $ac_link) 2>&5
16163   ac_status=$?
16164   echo "$as_me:16164: \$? = $ac_status" >&5
16165   (exit $ac_status); } &&
16166          { ac_try='test -s conftest$ac_exeext'
16167   { (eval echo "$as_me:16167: \"$ac_try\"") >&5
16168   (eval $ac_try) 2>&5
16169   ac_status=$?
16170   echo "$as_me:16170: \$? = $ac_status" >&5
16171   (exit $ac_status); }; }; then
16172
16173                         cf_cv_regex_hdrs=$cf_regex_hdr
16174                         break
16175
16176 else
16177   echo "$as_me: failed program was:" >&5
16178 cat conftest.$ac_ext >&5
16179 fi
16180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16181         done
16182         ;;
16183 esac
16184
16185 fi
16186 echo "$as_me:16186: result: $cf_cv_regex_hdrs" >&5
16187 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16188
16189 case $cf_cv_regex_hdrs in
16190         (no)            { echo "$as_me:16190: WARNING: no regular expression header found" >&5
16191 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16192         (regex.h)
16193 cat >>confdefs.h <<\EOF
16194 #define HAVE_REGEX_H_FUNCS 1
16195 EOF
16196  ;;
16197         (regexp.h)
16198 cat >>confdefs.h <<\EOF
16199 #define HAVE_REGEXP_H_FUNCS 1
16200 EOF
16201  ;;
16202         (regexpr.h)
16203 cat >>confdefs.h <<\EOF
16204 #define HAVE_REGEXPR_H_FUNCS 1
16205 EOF
16206  ;;
16207 esac
16208
16209 for ac_header in \
16210 fcntl.h \
16211 getopt.h \
16212 limits.h \
16213 locale.h \
16214 math.h \
16215 poll.h \
16216 sys/bsdtypes.h \
16217 sys/ioctl.h \
16218 sys/param.h \
16219 sys/poll.h \
16220 sys/select.h \
16221 sys/time.h \
16222 sys/times.h \
16223 ttyent.h \
16224 unistd.h \
16225 wctype.h \
16226
16227 do
16228 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16229 echo "$as_me:16229: checking for $ac_header" >&5
16230 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16232   echo $ECHO_N "(cached) $ECHO_C" >&6
16233 else
16234   cat >conftest.$ac_ext <<_ACEOF
16235 #line 16235 "configure"
16236 #include "confdefs.h"
16237 #include <$ac_header>
16238 _ACEOF
16239 if { (eval echo "$as_me:16239: \"$ac_cpp conftest.$ac_ext\"") >&5
16240   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16241   ac_status=$?
16242   egrep -v '^ *\+' conftest.er1 >conftest.err
16243   rm -f conftest.er1
16244   cat conftest.err >&5
16245   echo "$as_me:16245: \$? = $ac_status" >&5
16246   (exit $ac_status); } >/dev/null; then
16247   if test -s conftest.err; then
16248     ac_cpp_err=$ac_c_preproc_warn_flag
16249   else
16250     ac_cpp_err=
16251   fi
16252 else
16253   ac_cpp_err=yes
16254 fi
16255 if test -z "$ac_cpp_err"; then
16256   eval "$as_ac_Header=yes"
16257 else
16258   echo "$as_me: failed program was:" >&5
16259   cat conftest.$ac_ext >&5
16260   eval "$as_ac_Header=no"
16261 fi
16262 rm -f conftest.err conftest.$ac_ext
16263 fi
16264 echo "$as_me:16264: result: `eval echo '${'$as_ac_Header'}'`" >&5
16265 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16266 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16267   cat >>confdefs.h <<EOF
16268 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16269 EOF
16270
16271 fi
16272 done
16273
16274 for ac_header in unistd.h getopt.h
16275 do
16276 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16277 echo "$as_me:16277: checking for $ac_header" >&5
16278 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16279 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16280   echo $ECHO_N "(cached) $ECHO_C" >&6
16281 else
16282   cat >conftest.$ac_ext <<_ACEOF
16283 #line 16283 "configure"
16284 #include "confdefs.h"
16285 #include <$ac_header>
16286 _ACEOF
16287 if { (eval echo "$as_me:16287: \"$ac_cpp conftest.$ac_ext\"") >&5
16288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16289   ac_status=$?
16290   egrep -v '^ *\+' conftest.er1 >conftest.err
16291   rm -f conftest.er1
16292   cat conftest.err >&5
16293   echo "$as_me:16293: \$? = $ac_status" >&5
16294   (exit $ac_status); } >/dev/null; then
16295   if test -s conftest.err; then
16296     ac_cpp_err=$ac_c_preproc_warn_flag
16297   else
16298     ac_cpp_err=
16299   fi
16300 else
16301   ac_cpp_err=yes
16302 fi
16303 if test -z "$ac_cpp_err"; then
16304   eval "$as_ac_Header=yes"
16305 else
16306   echo "$as_me: failed program was:" >&5
16307   cat conftest.$ac_ext >&5
16308   eval "$as_ac_Header=no"
16309 fi
16310 rm -f conftest.err conftest.$ac_ext
16311 fi
16312 echo "$as_me:16312: result: `eval echo '${'$as_ac_Header'}'`" >&5
16313 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16314 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16315   cat >>confdefs.h <<EOF
16316 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16317 EOF
16318
16319 fi
16320 done
16321
16322 echo "$as_me:16322: checking for header declaring getopt variables" >&5
16323 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16324 if test "${cf_cv_getopt_header+set}" = set; then
16325   echo $ECHO_N "(cached) $ECHO_C" >&6
16326 else
16327
16328 cf_cv_getopt_header=none
16329 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16330 do
16331 cat >conftest.$ac_ext <<_ACEOF
16332 #line 16332 "configure"
16333 #include "confdefs.h"
16334
16335 #include <$cf_header>
16336 int
16337 main ()
16338 {
16339 int x = optind; char *y = optarg
16340   ;
16341   return 0;
16342 }
16343 _ACEOF
16344 rm -f conftest.$ac_objext
16345 if { (eval echo "$as_me:16345: \"$ac_compile\"") >&5
16346   (eval $ac_compile) 2>&5
16347   ac_status=$?
16348   echo "$as_me:16348: \$? = $ac_status" >&5
16349   (exit $ac_status); } &&
16350          { ac_try='test -s conftest.$ac_objext'
16351   { (eval echo "$as_me:16351: \"$ac_try\"") >&5
16352   (eval $ac_try) 2>&5
16353   ac_status=$?
16354   echo "$as_me:16354: \$? = $ac_status" >&5
16355   (exit $ac_status); }; }; then
16356   cf_cv_getopt_header=$cf_header
16357  break
16358 else
16359   echo "$as_me: failed program was:" >&5
16360 cat conftest.$ac_ext >&5
16361 fi
16362 rm -f conftest.$ac_objext conftest.$ac_ext
16363 done
16364
16365 fi
16366 echo "$as_me:16366: result: $cf_cv_getopt_header" >&5
16367 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16368 if test $cf_cv_getopt_header != none ; then
16369
16370 cat >>confdefs.h <<\EOF
16371 #define HAVE_GETOPT_HEADER 1
16372 EOF
16373
16374 fi
16375 if test $cf_cv_getopt_header = getopt.h ; then
16376
16377 cat >>confdefs.h <<\EOF
16378 #define NEED_GETOPT_H 1
16379 EOF
16380
16381 fi
16382
16383 # check for ISC (this may also define _POSIX_SOURCE)
16384 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16385 if test "x$ISC" = xyes ; then
16386
16387 echo "$as_me:16387: checking for main in -lcposix" >&5
16388 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16389 if test "${ac_cv_lib_cposix_main+set}" = set; then
16390   echo $ECHO_N "(cached) $ECHO_C" >&6
16391 else
16392   ac_check_lib_save_LIBS=$LIBS
16393 LIBS="-lcposix  $LIBS"
16394 cat >conftest.$ac_ext <<_ACEOF
16395 #line 16395 "configure"
16396 #include "confdefs.h"
16397
16398 int
16399 main ()
16400 {
16401 main ();
16402   ;
16403   return 0;
16404 }
16405 _ACEOF
16406 rm -f conftest.$ac_objext conftest$ac_exeext
16407 if { (eval echo "$as_me:16407: \"$ac_link\"") >&5
16408   (eval $ac_link) 2>&5
16409   ac_status=$?
16410   echo "$as_me:16410: \$? = $ac_status" >&5
16411   (exit $ac_status); } &&
16412          { ac_try='test -s conftest$ac_exeext'
16413   { (eval echo "$as_me:16413: \"$ac_try\"") >&5
16414   (eval $ac_try) 2>&5
16415   ac_status=$?
16416   echo "$as_me:16416: \$? = $ac_status" >&5
16417   (exit $ac_status); }; }; then
16418   ac_cv_lib_cposix_main=yes
16419 else
16420   echo "$as_me: failed program was:" >&5
16421 cat conftest.$ac_ext >&5
16422 ac_cv_lib_cposix_main=no
16423 fi
16424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16425 LIBS=$ac_check_lib_save_LIBS
16426 fi
16427 echo "$as_me:16427: result: $ac_cv_lib_cposix_main" >&5
16428 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16429 if test $ac_cv_lib_cposix_main = yes; then
16430   cat >>confdefs.h <<EOF
16431 #define HAVE_LIBCPOSIX 1
16432 EOF
16433
16434   LIBS="-lcposix $LIBS"
16435
16436 fi
16437
16438         echo "$as_me:16438: checking for bzero in -linet" >&5
16439 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16440 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16441   echo $ECHO_N "(cached) $ECHO_C" >&6
16442 else
16443   ac_check_lib_save_LIBS=$LIBS
16444 LIBS="-linet  $LIBS"
16445 cat >conftest.$ac_ext <<_ACEOF
16446 #line 16446 "configure"
16447 #include "confdefs.h"
16448
16449 /* Override any gcc2 internal prototype to avoid an error.  */
16450 #ifdef __cplusplus
16451 extern "C"
16452 #endif
16453 /* We use char because int might match the return type of a gcc2
16454    builtin and then its argument prototype would still apply.  */
16455 char bzero ();
16456 int
16457 main ()
16458 {
16459 bzero ();
16460   ;
16461   return 0;
16462 }
16463 _ACEOF
16464 rm -f conftest.$ac_objext conftest$ac_exeext
16465 if { (eval echo "$as_me:16465: \"$ac_link\"") >&5
16466   (eval $ac_link) 2>&5
16467   ac_status=$?
16468   echo "$as_me:16468: \$? = $ac_status" >&5
16469   (exit $ac_status); } &&
16470          { ac_try='test -s conftest$ac_exeext'
16471   { (eval echo "$as_me:16471: \"$ac_try\"") >&5
16472   (eval $ac_try) 2>&5
16473   ac_status=$?
16474   echo "$as_me:16474: \$? = $ac_status" >&5
16475   (exit $ac_status); }; }; then
16476   ac_cv_lib_inet_bzero=yes
16477 else
16478   echo "$as_me: failed program was:" >&5
16479 cat conftest.$ac_ext >&5
16480 ac_cv_lib_inet_bzero=no
16481 fi
16482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16483 LIBS=$ac_check_lib_save_LIBS
16484 fi
16485 echo "$as_me:16485: result: $ac_cv_lib_inet_bzero" >&5
16486 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16487 if test $ac_cv_lib_inet_bzero = yes; then
16488
16489 cf_add_libs="-linet"
16490 # Filter out duplicates - this happens with badly-designed ".pc" files...
16491 for cf_add_1lib in $LIBS
16492 do
16493         for cf_add_2lib in $cf_add_libs
16494         do
16495                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16496                 then
16497                         cf_add_1lib=
16498                         break
16499                 fi
16500         done
16501         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16502 done
16503 LIBS="$cf_add_libs"
16504
16505 fi
16506 fi
16507
16508 echo "$as_me:16508: checking if sys/time.h works with sys/select.h" >&5
16509 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16510 if test "${cf_cv_sys_time_select+set}" = set; then
16511   echo $ECHO_N "(cached) $ECHO_C" >&6
16512 else
16513
16514 cat >conftest.$ac_ext <<_ACEOF
16515 #line 16515 "configure"
16516 #include "confdefs.h"
16517
16518 #include <sys/types.h>
16519 #ifdef HAVE_SYS_TIME_H
16520 #include <sys/time.h>
16521 #endif
16522 #ifdef HAVE_SYS_SELECT_H
16523 #include <sys/select.h>
16524 #endif
16525
16526 int
16527 main ()
16528 {
16529
16530   ;
16531   return 0;
16532 }
16533 _ACEOF
16534 rm -f conftest.$ac_objext
16535 if { (eval echo "$as_me:16535: \"$ac_compile\"") >&5
16536   (eval $ac_compile) 2>&5
16537   ac_status=$?
16538   echo "$as_me:16538: \$? = $ac_status" >&5
16539   (exit $ac_status); } &&
16540          { ac_try='test -s conftest.$ac_objext'
16541   { (eval echo "$as_me:16541: \"$ac_try\"") >&5
16542   (eval $ac_try) 2>&5
16543   ac_status=$?
16544   echo "$as_me:16544: \$? = $ac_status" >&5
16545   (exit $ac_status); }; }; then
16546   cf_cv_sys_time_select=yes
16547 else
16548   echo "$as_me: failed program was:" >&5
16549 cat conftest.$ac_ext >&5
16550 cf_cv_sys_time_select=no
16551 fi
16552 rm -f conftest.$ac_objext conftest.$ac_ext
16553
16554 fi
16555
16556 echo "$as_me:16556: result: $cf_cv_sys_time_select" >&5
16557 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16558 test "$cf_cv_sys_time_select" = yes &&
16559 cat >>confdefs.h <<\EOF
16560 #define HAVE_SYS_TIME_SELECT 1
16561 EOF
16562
16563 ###     checks for compiler characteristics
16564 ac_ext=c
16565 ac_cpp='$CPP $CPPFLAGS'
16566 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16567 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16568 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16569 ac_main_return=return
16570
16571 echo "$as_me:16571: checking for an ANSI C-conforming const" >&5
16572 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16573 if test "${ac_cv_c_const+set}" = set; then
16574   echo $ECHO_N "(cached) $ECHO_C" >&6
16575 else
16576   cat >conftest.$ac_ext <<_ACEOF
16577 #line 16577 "configure"
16578 #include "confdefs.h"
16579
16580 int
16581 main ()
16582 {
16583 /* FIXME: Include the comments suggested by Paul. */
16584 #ifndef __cplusplus
16585   /* Ultrix mips cc rejects this.  */
16586   typedef int charset[2];
16587   const charset x;
16588   /* SunOS 4.1.1 cc rejects this.  */
16589   char const *const *ccp;
16590   char **p;
16591   /* NEC SVR4.0.2 mips cc rejects this.  */
16592   struct point {int x, y;};
16593   static struct point const zero = {0,0};
16594   /* AIX XL C 1.02.0.0 rejects this.
16595      It does not let you subtract one const X* pointer from another in
16596      an arm of an if-expression whose if-part is not a constant
16597      expression */
16598   const char *g = "string";
16599   ccp = &g + (g ? g-g : 0);
16600   /* HPUX 7.0 cc rejects these. */
16601   ++ccp;
16602   p = (char**) ccp;
16603   ccp = (char const *const *) p;
16604   { /* SCO 3.2v4 cc rejects this.  */
16605     char *t;
16606     char const *s = 0 ? (char *) 0 : (char const *) 0;
16607
16608     *t++ = 0;
16609   }
16610   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16611     int x[] = {25, 17};
16612     const int *foo = &x[0];
16613     ++foo;
16614   }
16615   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16616     typedef const int *iptr;
16617     iptr p = 0;
16618     ++p;
16619   }
16620   { /* AIX XL C 1.02.0.0 rejects this saying
16621        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16622     struct s { int j; const int *ap[3]; };
16623     struct s *b; b->j = 5;
16624   }
16625   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16626     const int foo = 10;
16627   }
16628 #endif
16629
16630   ;
16631   return 0;
16632 }
16633 _ACEOF
16634 rm -f conftest.$ac_objext
16635 if { (eval echo "$as_me:16635: \"$ac_compile\"") >&5
16636   (eval $ac_compile) 2>&5
16637   ac_status=$?
16638   echo "$as_me:16638: \$? = $ac_status" >&5
16639   (exit $ac_status); } &&
16640          { ac_try='test -s conftest.$ac_objext'
16641   { (eval echo "$as_me:16641: \"$ac_try\"") >&5
16642   (eval $ac_try) 2>&5
16643   ac_status=$?
16644   echo "$as_me:16644: \$? = $ac_status" >&5
16645   (exit $ac_status); }; }; then
16646   ac_cv_c_const=yes
16647 else
16648   echo "$as_me: failed program was:" >&5
16649 cat conftest.$ac_ext >&5
16650 ac_cv_c_const=no
16651 fi
16652 rm -f conftest.$ac_objext conftest.$ac_ext
16653 fi
16654 echo "$as_me:16654: result: $ac_cv_c_const" >&5
16655 echo "${ECHO_T}$ac_cv_c_const" >&6
16656 if test $ac_cv_c_const = no; then
16657
16658 cat >>confdefs.h <<\EOF
16659 #define const
16660 EOF
16661
16662 fi
16663
16664 echo "$as_me:16664: checking for inline" >&5
16665 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16666 if test "${ac_cv_c_inline+set}" = set; then
16667   echo $ECHO_N "(cached) $ECHO_C" >&6
16668 else
16669   ac_cv_c_inline=no
16670 for ac_kw in inline __inline__ __inline; do
16671   cat >conftest.$ac_ext <<_ACEOF
16672 #line 16672 "configure"
16673 #include "confdefs.h"
16674 #ifndef __cplusplus
16675 static $ac_kw int static_foo () {return 0; }
16676 $ac_kw int foo () {return 0; }
16677 #endif
16678
16679 _ACEOF
16680 rm -f conftest.$ac_objext
16681 if { (eval echo "$as_me:16681: \"$ac_compile\"") >&5
16682   (eval $ac_compile) 2>&5
16683   ac_status=$?
16684   echo "$as_me:16684: \$? = $ac_status" >&5
16685   (exit $ac_status); } &&
16686          { ac_try='test -s conftest.$ac_objext'
16687   { (eval echo "$as_me:16687: \"$ac_try\"") >&5
16688   (eval $ac_try) 2>&5
16689   ac_status=$?
16690   echo "$as_me:16690: \$? = $ac_status" >&5
16691   (exit $ac_status); }; }; then
16692   ac_cv_c_inline=$ac_kw; break
16693 else
16694   echo "$as_me: failed program was:" >&5
16695 cat conftest.$ac_ext >&5
16696 fi
16697 rm -f conftest.$ac_objext conftest.$ac_ext
16698 done
16699
16700 fi
16701 echo "$as_me:16701: result: $ac_cv_c_inline" >&5
16702 echo "${ECHO_T}$ac_cv_c_inline" >&6
16703 case $ac_cv_c_inline in
16704   inline | yes) ;;
16705   no)
16706 cat >>confdefs.h <<\EOF
16707 #define inline
16708 EOF
16709  ;;
16710   *)  cat >>confdefs.h <<EOF
16711 #define inline $ac_cv_c_inline
16712 EOF
16713  ;;
16714 esac
16715
16716 NCURSES_INLINE=
16717 if test "$ac_cv_c_inline" != no ; then
16718         NCURSES_INLINE=inline
16719         if test "$INTEL_COMPILER" = yes
16720         then
16721                 :
16722         elif test "$CLANG_COMPILER" = yes
16723         then
16724                 :
16725         elif test "$GCC" = yes
16726         then
16727                 echo "$as_me:16727: checking if $CC supports options to tune inlining" >&5
16728 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16729 if test "${cf_cv_gcc_inline+set}" = set; then
16730   echo $ECHO_N "(cached) $ECHO_C" >&6
16731 else
16732
16733                 cf_save_CFLAGS=$CFLAGS
16734                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16735                 cat >conftest.$ac_ext <<_ACEOF
16736 #line 16736 "configure"
16737 #include "confdefs.h"
16738 inline int foo(void) { return 1; }
16739 int
16740 main ()
16741 {
16742 ${cf_cv_main_return:-return} foo()
16743   ;
16744   return 0;
16745 }
16746 _ACEOF
16747 rm -f conftest.$ac_objext
16748 if { (eval echo "$as_me:16748: \"$ac_compile\"") >&5
16749   (eval $ac_compile) 2>&5
16750   ac_status=$?
16751   echo "$as_me:16751: \$? = $ac_status" >&5
16752   (exit $ac_status); } &&
16753          { ac_try='test -s conftest.$ac_objext'
16754   { (eval echo "$as_me:16754: \"$ac_try\"") >&5
16755   (eval $ac_try) 2>&5
16756   ac_status=$?
16757   echo "$as_me:16757: \$? = $ac_status" >&5
16758   (exit $ac_status); }; }; then
16759   cf_cv_gcc_inline=yes
16760 else
16761   echo "$as_me: failed program was:" >&5
16762 cat conftest.$ac_ext >&5
16763 cf_cv_gcc_inline=no
16764 fi
16765 rm -f conftest.$ac_objext conftest.$ac_ext
16766                 CFLAGS=$cf_save_CFLAGS
16767
16768 fi
16769 echo "$as_me:16769: result: $cf_cv_gcc_inline" >&5
16770 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16771                 if test "$cf_cv_gcc_inline" = yes ; then
16772
16773 cf_fix_cppflags=no
16774 cf_new_cflags=
16775 cf_new_cppflags=
16776 cf_new_extra_cppflags=
16777
16778 for cf_add_cflags in --param max-inline-insns-single=1200
16779 do
16780 case $cf_fix_cppflags in
16781 (no)
16782         case $cf_add_cflags in
16783         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16784                 case $cf_add_cflags in
16785                 (-D*)
16786                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16787
16788                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16789                                 && test -z "${cf_tst_cflags}" \
16790                                 && cf_fix_cppflags=yes
16791
16792                         if test $cf_fix_cppflags = yes ; then
16793
16794         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16795         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16796
16797                                 continue
16798                         elif test "${cf_tst_cflags}" = "\"'" ; then
16799
16800         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16801         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16802
16803                                 continue
16804                         fi
16805                         ;;
16806                 esac
16807                 case "$CPPFLAGS" in
16808                 (*$cf_add_cflags)
16809                         ;;
16810                 (*)
16811                         case $cf_add_cflags in
16812                         (-D*)
16813                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16814
16815 CPPFLAGS=`echo "$CPPFLAGS" | \
16816         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16817                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16818
16819                                 ;;
16820                         esac
16821
16822         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16823         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16824
16825                         ;;
16826                 esac
16827                 ;;
16828         (*)
16829
16830         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16831         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16832
16833                 ;;
16834         esac
16835         ;;
16836 (yes)
16837
16838         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16839         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16840
16841         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16842
16843         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16844                 && test -z "${cf_tst_cflags}" \
16845                 && cf_fix_cppflags=no
16846         ;;
16847 esac
16848 done
16849
16850 if test -n "$cf_new_cflags" ; then
16851
16852         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16853         CFLAGS="${CFLAGS}$cf_new_cflags"
16854
16855 fi
16856
16857 if test -n "$cf_new_cppflags" ; then
16858
16859         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16860         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16861
16862 fi
16863
16864 if test -n "$cf_new_extra_cppflags" ; then
16865
16866         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16867         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16868
16869 fi
16870
16871                 fi
16872         fi
16873 fi
16874
16875 echo "$as_me:16875: checking for signal global datatype" >&5
16876 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16877 if test "${cf_cv_sig_atomic_t+set}" = set; then
16878   echo $ECHO_N "(cached) $ECHO_C" >&6
16879 else
16880
16881         for cf_type in \
16882                 "volatile sig_atomic_t" \
16883                 "sig_atomic_t" \
16884                 "int"
16885         do
16886         cat >conftest.$ac_ext <<_ACEOF
16887 #line 16887 "configure"
16888 #include "confdefs.h"
16889
16890 #include <sys/types.h>
16891 #include <signal.h>
16892 #include <stdio.h>
16893
16894 extern $cf_type x;
16895 $cf_type x;
16896 static void handler(int sig)
16897 {
16898         x = 5;
16899 }
16900 int
16901 main ()
16902 {
16903 signal(SIGINT, handler);
16904                  x = 1
16905   ;
16906   return 0;
16907 }
16908 _ACEOF
16909 rm -f conftest.$ac_objext
16910 if { (eval echo "$as_me:16910: \"$ac_compile\"") >&5
16911   (eval $ac_compile) 2>&5
16912   ac_status=$?
16913   echo "$as_me:16913: \$? = $ac_status" >&5
16914   (exit $ac_status); } &&
16915          { ac_try='test -s conftest.$ac_objext'
16916   { (eval echo "$as_me:16916: \"$ac_try\"") >&5
16917   (eval $ac_try) 2>&5
16918   ac_status=$?
16919   echo "$as_me:16919: \$? = $ac_status" >&5
16920   (exit $ac_status); }; }; then
16921   cf_cv_sig_atomic_t=$cf_type
16922 else
16923   echo "$as_me: failed program was:" >&5
16924 cat conftest.$ac_ext >&5
16925 cf_cv_sig_atomic_t=no
16926 fi
16927 rm -f conftest.$ac_objext conftest.$ac_ext
16928                 test "$cf_cv_sig_atomic_t" != no && break
16929         done
16930
16931 fi
16932
16933 echo "$as_me:16933: result: $cf_cv_sig_atomic_t" >&5
16934 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16935 test "$cf_cv_sig_atomic_t" != no &&
16936 cat >>confdefs.h <<EOF
16937 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16938 EOF
16939
16940 if test $NCURSES_CHTYPE = auto ; then
16941
16942 echo "$as_me:16942: checking for type of chtype" >&5
16943 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16944 if test "${cf_cv_typeof_chtype+set}" = set; then
16945   echo $ECHO_N "(cached) $ECHO_C" >&6
16946 else
16947
16948                 if test "$cross_compiling" = yes; then
16949   cf_cv_typeof_chtype=long
16950 else
16951   cat >conftest.$ac_ext <<_ACEOF
16952 #line 16952 "configure"
16953 #include "confdefs.h"
16954
16955 #define WANT_BITS 31
16956 #include <stdio.h>
16957 int main(void)
16958 {
16959         FILE *fp = fopen("cf_test.out", "w");
16960         if (fp != 0) {
16961                 char *result = "long";
16962                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16963                         int n;
16964                         unsigned int x, y;
16965                         for (n = 0; n < WANT_BITS; n++) {
16966                                 x = (1 << n);
16967                                 y = (x >> n);
16968                                 if (y != 1 || x == 0) {
16969                                         x = 0;
16970                                         break;
16971                                 }
16972                         }
16973                         /*
16974                          * If x is nonzero, an int is big enough for the bits
16975                          * that we want.
16976                          */
16977                         result = (x != 0) ? "int" : "long";
16978                 }
16979                 fputs(result, fp);
16980                 fclose(fp);
16981         }
16982         ${cf_cv_main_return:-return}(0);
16983 }
16984
16985 _ACEOF
16986 rm -f conftest$ac_exeext
16987 if { (eval echo "$as_me:16987: \"$ac_link\"") >&5
16988   (eval $ac_link) 2>&5
16989   ac_status=$?
16990   echo "$as_me:16990: \$? = $ac_status" >&5
16991   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16992   { (eval echo "$as_me:16992: \"$ac_try\"") >&5
16993   (eval $ac_try) 2>&5
16994   ac_status=$?
16995   echo "$as_me:16995: \$? = $ac_status" >&5
16996   (exit $ac_status); }; }; then
16997   cf_cv_typeof_chtype=`cat cf_test.out`
16998 else
16999   echo "$as_me: program exited with status $ac_status" >&5
17000 echo "$as_me: failed program was:" >&5
17001 cat conftest.$ac_ext >&5
17002 cf_cv_typeof_chtype=long
17003 fi
17004 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17005 fi
17006                 rm -f cf_test.out
17007
17008 fi
17009
17010 echo "$as_me:17010: result: $cf_cv_typeof_chtype" >&5
17011 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17012
17013 cat >>confdefs.h <<EOF
17014 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17015 EOF
17016
17017 else
17018         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17019 fi
17020 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17021
17022 echo "$as_me:17022: checking if unsigned literals are legal" >&5
17023 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17024 if test "${cf_cv_unsigned_literals+set}" = set; then
17025   echo $ECHO_N "(cached) $ECHO_C" >&6
17026 else
17027
17028         cat >conftest.$ac_ext <<_ACEOF
17029 #line 17029 "configure"
17030 #include "confdefs.h"
17031
17032 int
17033 main ()
17034 {
17035 long x = 1L + 1UL + 1U + 1
17036   ;
17037   return 0;
17038 }
17039 _ACEOF
17040 rm -f conftest.$ac_objext
17041 if { (eval echo "$as_me:17041: \"$ac_compile\"") >&5
17042   (eval $ac_compile) 2>&5
17043   ac_status=$?
17044   echo "$as_me:17044: \$? = $ac_status" >&5
17045   (exit $ac_status); } &&
17046          { ac_try='test -s conftest.$ac_objext'
17047   { (eval echo "$as_me:17047: \"$ac_try\"") >&5
17048   (eval $ac_try) 2>&5
17049   ac_status=$?
17050   echo "$as_me:17050: \$? = $ac_status" >&5
17051   (exit $ac_status); }; }; then
17052   cf_cv_unsigned_literals=yes
17053 else
17054   echo "$as_me: failed program was:" >&5
17055 cat conftest.$ac_ext >&5
17056 cf_cv_unsigned_literals=no
17057 fi
17058 rm -f conftest.$ac_objext conftest.$ac_ext
17059
17060 fi
17061
17062 echo "$as_me:17062: result: $cf_cv_unsigned_literals" >&5
17063 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17064
17065 cf_cv_1UL="1"
17066 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17067 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17068
17069 if test $NCURSES_MMASK_T = auto ; then
17070         cf_cv_typeof_mmask_t=long
17071 else
17072         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17073 fi
17074 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17075
17076 ###     Checks for external-data
17077
17078 echo "$as_me:17078: checking if external errno is declared" >&5
17079 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17080 if test "${cf_cv_dcl_errno+set}" = set; then
17081   echo $ECHO_N "(cached) $ECHO_C" >&6
17082 else
17083
17084         cat >conftest.$ac_ext <<_ACEOF
17085 #line 17085 "configure"
17086 #include "confdefs.h"
17087
17088 #ifdef HAVE_STDLIB_H
17089 #include <stdlib.h>
17090 #endif
17091 #include <stdio.h>
17092 #include <sys/types.h>
17093 #include <errno.h>
17094 int
17095 main ()
17096 {
17097 int x = (int) errno
17098   ;
17099   return 0;
17100 }
17101 _ACEOF
17102 rm -f conftest.$ac_objext
17103 if { (eval echo "$as_me:17103: \"$ac_compile\"") >&5
17104   (eval $ac_compile) 2>&5
17105   ac_status=$?
17106   echo "$as_me:17106: \$? = $ac_status" >&5
17107   (exit $ac_status); } &&
17108          { ac_try='test -s conftest.$ac_objext'
17109   { (eval echo "$as_me:17109: \"$ac_try\"") >&5
17110   (eval $ac_try) 2>&5
17111   ac_status=$?
17112   echo "$as_me:17112: \$? = $ac_status" >&5
17113   (exit $ac_status); }; }; then
17114   cf_cv_dcl_errno=yes
17115 else
17116   echo "$as_me: failed program was:" >&5
17117 cat conftest.$ac_ext >&5
17118 cf_cv_dcl_errno=no
17119 fi
17120 rm -f conftest.$ac_objext conftest.$ac_ext
17121
17122 fi
17123 echo "$as_me:17123: result: $cf_cv_dcl_errno" >&5
17124 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17125
17126 if test "$cf_cv_dcl_errno" = no ; then
17127
17128 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17129
17130         cat >>confdefs.h <<EOF
17131 #define $cf_result 1
17132 EOF
17133
17134 fi
17135
17136 # It's possible (for near-UNIX clones) that the data doesn't exist
17137
17138 echo "$as_me:17138: checking if external errno exists" >&5
17139 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17140 if test "${cf_cv_have_errno+set}" = set; then
17141   echo $ECHO_N "(cached) $ECHO_C" >&6
17142 else
17143
17144         cat >conftest.$ac_ext <<_ACEOF
17145 #line 17145 "configure"
17146 #include "confdefs.h"
17147
17148 #undef errno
17149 extern int errno;
17150
17151 int
17152 main ()
17153 {
17154 errno = 2
17155   ;
17156   return 0;
17157 }
17158 _ACEOF
17159 rm -f conftest.$ac_objext conftest$ac_exeext
17160 if { (eval echo "$as_me:17160: \"$ac_link\"") >&5
17161   (eval $ac_link) 2>&5
17162   ac_status=$?
17163   echo "$as_me:17163: \$? = $ac_status" >&5
17164   (exit $ac_status); } &&
17165          { ac_try='test -s conftest$ac_exeext'
17166   { (eval echo "$as_me:17166: \"$ac_try\"") >&5
17167   (eval $ac_try) 2>&5
17168   ac_status=$?
17169   echo "$as_me:17169: \$? = $ac_status" >&5
17170   (exit $ac_status); }; }; then
17171   cf_cv_have_errno=yes
17172 else
17173   echo "$as_me: failed program was:" >&5
17174 cat conftest.$ac_ext >&5
17175 cf_cv_have_errno=no
17176 fi
17177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17178
17179 fi
17180 echo "$as_me:17180: result: $cf_cv_have_errno" >&5
17181 echo "${ECHO_T}$cf_cv_have_errno" >&6
17182
17183 if test "$cf_cv_have_errno" = yes ; then
17184
17185 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17186
17187         cat >>confdefs.h <<EOF
17188 #define $cf_result 1
17189 EOF
17190
17191 fi
17192
17193 echo "$as_me:17193: checking if data-only library module links" >&5
17194 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17195 if test "${cf_cv_link_dataonly+set}" = set; then
17196   echo $ECHO_N "(cached) $ECHO_C" >&6
17197 else
17198
17199         rm -f conftest.a
17200         cat >conftest.$ac_ext <<EOF
17201 #line 17201 "configure"
17202 int     testdata[3] = { 123, 456, 789 };
17203 EOF
17204         if { (eval echo "$as_me:17204: \"$ac_compile\"") >&5
17205   (eval $ac_compile) 2>&5
17206   ac_status=$?
17207   echo "$as_me:17207: \$? = $ac_status" >&5
17208   (exit $ac_status); } ; then
17209                 mv conftest.o data.o && \
17210                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17211         fi
17212         rm -f conftest.$ac_ext data.o
17213         cat >conftest.$ac_ext <<EOF
17214 #line 17214 "configure"
17215 int     testfunc()
17216 {
17217 #if defined(NeXT)
17218         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17219 #else
17220         extern int testdata[3];
17221         return testdata[0] == 123
17222            &&  testdata[1] == 456
17223            &&  testdata[2] == 789;
17224 #endif
17225 }
17226 EOF
17227         if { (eval echo "$as_me:17227: \"$ac_compile\"") >&5
17228   (eval $ac_compile) 2>&5
17229   ac_status=$?
17230   echo "$as_me:17230: \$? = $ac_status" >&5
17231   (exit $ac_status); }; then
17232                 mv conftest.o func.o && \
17233                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17234         fi
17235         rm -f conftest.$ac_ext func.o
17236         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17237         cf_saveLIBS="$LIBS"
17238         LIBS="conftest.a $LIBS"
17239         if test "$cross_compiling" = yes; then
17240   cf_cv_link_dataonly=unknown
17241 else
17242   cat >conftest.$ac_ext <<_ACEOF
17243 #line 17243 "configure"
17244 #include "confdefs.h"
17245
17246         int main(void)
17247         {
17248                 extern int testfunc();
17249                 ${cf_cv_main_return:-return} (!testfunc());
17250         }
17251
17252 _ACEOF
17253 rm -f conftest$ac_exeext
17254 if { (eval echo "$as_me:17254: \"$ac_link\"") >&5
17255   (eval $ac_link) 2>&5
17256   ac_status=$?
17257   echo "$as_me:17257: \$? = $ac_status" >&5
17258   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17259   { (eval echo "$as_me:17259: \"$ac_try\"") >&5
17260   (eval $ac_try) 2>&5
17261   ac_status=$?
17262   echo "$as_me:17262: \$? = $ac_status" >&5
17263   (exit $ac_status); }; }; then
17264   cf_cv_link_dataonly=yes
17265 else
17266   echo "$as_me: program exited with status $ac_status" >&5
17267 echo "$as_me: failed program was:" >&5
17268 cat conftest.$ac_ext >&5
17269 cf_cv_link_dataonly=no
17270 fi
17271 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17272 fi
17273         LIBS="$cf_saveLIBS"
17274
17275 fi
17276
17277 echo "$as_me:17277: result: $cf_cv_link_dataonly" >&5
17278 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17279
17280 if test "$cf_cv_link_dataonly" = no ; then
17281
17282 cat >>confdefs.h <<\EOF
17283 #define BROKEN_LINKER 1
17284 EOF
17285
17286         BROKEN_LINKER=1
17287 fi
17288
17289 ###     Checks for library functions.
17290
17291 for ac_func in \
17292 getcwd \
17293 getegid \
17294 geteuid \
17295 getopt \
17296 getttynam \
17297 issetugid \
17298 poll \
17299 putenv \
17300 remove \
17301 select \
17302 setbuf \
17303 setbuffer \
17304 setenv \
17305 setvbuf \
17306 sigaction \
17307 sigvec \
17308 strdup \
17309 strstr \
17310 tcgetpgrp \
17311 times \
17312 vsnprintf \
17313
17314 do
17315 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17316 echo "$as_me:17316: checking for $ac_func" >&5
17317 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17318 if eval "test \"\${$as_ac_var+set}\" = set"; then
17319   echo $ECHO_N "(cached) $ECHO_C" >&6
17320 else
17321   cat >conftest.$ac_ext <<_ACEOF
17322 #line 17322 "configure"
17323 #include "confdefs.h"
17324 /* System header to define __stub macros and hopefully few prototypes,
17325     which can conflict with char $ac_func (); below.  */
17326 #include <assert.h>
17327 /* Override any gcc2 internal prototype to avoid an error.  */
17328 #ifdef __cplusplus
17329 extern "C"
17330 #endif
17331 /* We use char because int might match the return type of a gcc2
17332    builtin and then its argument prototype would still apply.  */
17333 char $ac_func ();
17334 char (*f) ();
17335
17336 int
17337 main ()
17338 {
17339 /* The GNU C library defines this for functions which it implements
17340     to always fail with ENOSYS.  Some functions are actually named
17341     something starting with __ and the normal name is an alias.  */
17342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17343 choke me
17344 #else
17345 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17346 #endif
17347
17348   ;
17349   return 0;
17350 }
17351 _ACEOF
17352 rm -f conftest.$ac_objext conftest$ac_exeext
17353 if { (eval echo "$as_me:17353: \"$ac_link\"") >&5
17354   (eval $ac_link) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); } &&
17358          { ac_try='test -s conftest$ac_exeext'
17359   { (eval echo "$as_me:17359: \"$ac_try\"") >&5
17360   (eval $ac_try) 2>&5
17361   ac_status=$?
17362   echo "$as_me:17362: \$? = $ac_status" >&5
17363   (exit $ac_status); }; }; then
17364   eval "$as_ac_var=yes"
17365 else
17366   echo "$as_me: failed program was:" >&5
17367 cat conftest.$ac_ext >&5
17368 eval "$as_ac_var=no"
17369 fi
17370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17371 fi
17372 echo "$as_me:17372: result: `eval echo '${'$as_ac_var'}'`" >&5
17373 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17374 if test `eval echo '${'$as_ac_var'}'` = yes; then
17375   cat >>confdefs.h <<EOF
17376 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17377 EOF
17378
17379 fi
17380 done
17381
17382 if test "x$ac_cv_func_getopt" = xno && \
17383    test "x$cf_with_progs$cf_with_tests" != xnono; then
17384         { { echo "$as_me:17384: error: getopt is required for building programs" >&5
17385 echo "$as_me: error: getopt is required for building programs" >&2;}
17386    { (exit 1); exit 1; }; }
17387 fi
17388
17389 if test "x$with_getcap" = "xyes" ; then
17390
17391 echo "$as_me:17391: checking for terminal-capability database functions" >&5
17392 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17393 if test "${cf_cv_cgetent+set}" = set; then
17394   echo $ECHO_N "(cached) $ECHO_C" >&6
17395 else
17396
17397 cat >conftest.$ac_ext <<_ACEOF
17398 #line 17398 "configure"
17399 #include "confdefs.h"
17400
17401 #include <stdlib.h>
17402 int
17403 main ()
17404 {
17405
17406         char temp[128];
17407         char *buf = temp;
17408         char *db_array = temp;
17409         cgetent(&buf, &db_array, "vt100");
17410         cgetcap(buf, "tc", '=');
17411         cgetmatch(buf, "tc");
17412
17413   ;
17414   return 0;
17415 }
17416 _ACEOF
17417 rm -f conftest.$ac_objext conftest$ac_exeext
17418 if { (eval echo "$as_me:17418: \"$ac_link\"") >&5
17419   (eval $ac_link) 2>&5
17420   ac_status=$?
17421   echo "$as_me:17421: \$? = $ac_status" >&5
17422   (exit $ac_status); } &&
17423          { ac_try='test -s conftest$ac_exeext'
17424   { (eval echo "$as_me:17424: \"$ac_try\"") >&5
17425   (eval $ac_try) 2>&5
17426   ac_status=$?
17427   echo "$as_me:17427: \$? = $ac_status" >&5
17428   (exit $ac_status); }; }; then
17429   cf_cv_cgetent=yes
17430 else
17431   echo "$as_me: failed program was:" >&5
17432 cat conftest.$ac_ext >&5
17433 cf_cv_cgetent=no
17434 fi
17435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17436
17437 fi
17438 echo "$as_me:17438: result: $cf_cv_cgetent" >&5
17439 echo "${ECHO_T}$cf_cv_cgetent" >&6
17440
17441 if test "$cf_cv_cgetent" = yes
17442 then
17443
17444 cat >>confdefs.h <<\EOF
17445 #define HAVE_BSD_CGETENT 1
17446 EOF
17447
17448 echo "$as_me:17448: checking if cgetent uses const parameter" >&5
17449 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17450 if test "${cf_cv_cgetent_const+set}" = set; then
17451   echo $ECHO_N "(cached) $ECHO_C" >&6
17452 else
17453
17454 cat >conftest.$ac_ext <<_ACEOF
17455 #line 17455 "configure"
17456 #include "confdefs.h"
17457
17458 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17459 #include <stdlib.h>
17460 int
17461 main ()
17462 {
17463
17464         char temp[128];
17465         char *buf = temp;
17466 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17467         const char *db_array = temp;
17468         cgetent(&buf, &db_array, "vt100");
17469 #endif
17470         cgetcap(buf, "tc", '=');
17471         cgetmatch(buf, "tc");
17472
17473   ;
17474   return 0;
17475 }
17476 _ACEOF
17477 rm -f conftest.$ac_objext conftest$ac_exeext
17478 if { (eval echo "$as_me:17478: \"$ac_link\"") >&5
17479   (eval $ac_link) 2>&5
17480   ac_status=$?
17481   echo "$as_me:17481: \$? = $ac_status" >&5
17482   (exit $ac_status); } &&
17483          { ac_try='test -s conftest$ac_exeext'
17484   { (eval echo "$as_me:17484: \"$ac_try\"") >&5
17485   (eval $ac_try) 2>&5
17486   ac_status=$?
17487   echo "$as_me:17487: \$? = $ac_status" >&5
17488   (exit $ac_status); }; }; then
17489   cf_cv_cgetent_const=yes
17490 else
17491   echo "$as_me: failed program was:" >&5
17492 cat conftest.$ac_ext >&5
17493 cf_cv_cgetent_const=no
17494 fi
17495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17496
17497 fi
17498 echo "$as_me:17498: result: $cf_cv_cgetent_const" >&5
17499 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17500         if test "$cf_cv_cgetent_const" = yes
17501         then
17502
17503 cat >>confdefs.h <<EOF
17504 #define CGETENT_CONST const
17505 EOF
17506
17507         fi
17508 fi
17509
17510 fi
17511
17512 echo "$as_me:17512: checking for isascii" >&5
17513 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17514 if test "${cf_cv_have_isascii+set}" = set; then
17515   echo $ECHO_N "(cached) $ECHO_C" >&6
17516 else
17517
17518         cat >conftest.$ac_ext <<_ACEOF
17519 #line 17519 "configure"
17520 #include "confdefs.h"
17521 #include <ctype.h>
17522 int
17523 main ()
17524 {
17525 int x = isascii(' ')
17526   ;
17527   return 0;
17528 }
17529 _ACEOF
17530 rm -f conftest.$ac_objext conftest$ac_exeext
17531 if { (eval echo "$as_me:17531: \"$ac_link\"") >&5
17532   (eval $ac_link) 2>&5
17533   ac_status=$?
17534   echo "$as_me:17534: \$? = $ac_status" >&5
17535   (exit $ac_status); } &&
17536          { ac_try='test -s conftest$ac_exeext'
17537   { (eval echo "$as_me:17537: \"$ac_try\"") >&5
17538   (eval $ac_try) 2>&5
17539   ac_status=$?
17540   echo "$as_me:17540: \$? = $ac_status" >&5
17541   (exit $ac_status); }; }; then
17542   cf_cv_have_isascii=yes
17543 else
17544   echo "$as_me: failed program was:" >&5
17545 cat conftest.$ac_ext >&5
17546 cf_cv_have_isascii=no
17547 fi
17548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17549
17550 fi
17551 echo "$as_me:17551: result: $cf_cv_have_isascii" >&5
17552 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17553 test "$cf_cv_have_isascii" = yes &&
17554 cat >>confdefs.h <<\EOF
17555 #define HAVE_ISASCII 1
17556 EOF
17557
17558 if test "$ac_cv_func_sigaction" = yes; then
17559 echo "$as_me:17559: checking whether sigaction needs _POSIX_SOURCE" >&5
17560 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17561 cat >conftest.$ac_ext <<_ACEOF
17562 #line 17562 "configure"
17563 #include "confdefs.h"
17564
17565 #include <sys/types.h>
17566 #include <signal.h>
17567 int
17568 main ()
17569 {
17570 struct sigaction act
17571   ;
17572   return 0;
17573 }
17574 _ACEOF
17575 rm -f conftest.$ac_objext
17576 if { (eval echo "$as_me:17576: \"$ac_compile\"") >&5
17577   (eval $ac_compile) 2>&5
17578   ac_status=$?
17579   echo "$as_me:17579: \$? = $ac_status" >&5
17580   (exit $ac_status); } &&
17581          { ac_try='test -s conftest.$ac_objext'
17582   { (eval echo "$as_me:17582: \"$ac_try\"") >&5
17583   (eval $ac_try) 2>&5
17584   ac_status=$?
17585   echo "$as_me:17585: \$? = $ac_status" >&5
17586   (exit $ac_status); }; }; then
17587   sigact_bad=no
17588 else
17589   echo "$as_me: failed program was:" >&5
17590 cat conftest.$ac_ext >&5
17591
17592 cat >conftest.$ac_ext <<_ACEOF
17593 #line 17593 "configure"
17594 #include "confdefs.h"
17595
17596 #define _POSIX_SOURCE
17597 #include <sys/types.h>
17598 #include <signal.h>
17599 int
17600 main ()
17601 {
17602 struct sigaction act
17603   ;
17604   return 0;
17605 }
17606 _ACEOF
17607 rm -f conftest.$ac_objext
17608 if { (eval echo "$as_me:17608: \"$ac_compile\"") >&5
17609   (eval $ac_compile) 2>&5
17610   ac_status=$?
17611   echo "$as_me:17611: \$? = $ac_status" >&5
17612   (exit $ac_status); } &&
17613          { ac_try='test -s conftest.$ac_objext'
17614   { (eval echo "$as_me:17614: \"$ac_try\"") >&5
17615   (eval $ac_try) 2>&5
17616   ac_status=$?
17617   echo "$as_me:17617: \$? = $ac_status" >&5
17618   (exit $ac_status); }; }; then
17619   sigact_bad=yes
17620
17621 cat >>confdefs.h <<\EOF
17622 #define _POSIX_SOURCE 1
17623 EOF
17624
17625 else
17626   echo "$as_me: failed program was:" >&5
17627 cat conftest.$ac_ext >&5
17628 sigact_bad=unknown
17629 fi
17630 rm -f conftest.$ac_objext conftest.$ac_ext
17631 fi
17632 rm -f conftest.$ac_objext conftest.$ac_ext
17633 echo "$as_me:17633: result: $sigact_bad" >&5
17634 echo "${ECHO_T}$sigact_bad" >&6
17635 fi
17636
17637 echo "$as_me:17637: checking if nanosleep really works" >&5
17638 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17639 if test "${cf_cv_func_nanosleep+set}" = set; then
17640   echo $ECHO_N "(cached) $ECHO_C" >&6
17641 else
17642
17643 if test "$cross_compiling" = yes; then
17644   cf_cv_func_nanosleep=unknown
17645 else
17646   cat >conftest.$ac_ext <<_ACEOF
17647 #line 17647 "configure"
17648 #include "confdefs.h"
17649
17650 #include <stdio.h>
17651 #include <errno.h>
17652 #include <time.h>
17653
17654 #ifdef HAVE_SYS_TIME_H
17655 #include <sys/time.h>
17656 #endif
17657
17658 int main(void) {
17659         struct timespec ts1, ts2;
17660         int code;
17661         ts1.tv_sec  = 0;
17662         ts1.tv_nsec = 750000000;
17663         ts2.tv_sec  = 0;
17664         ts2.tv_nsec = 0;
17665         errno = 0;
17666         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17667         ${cf_cv_main_return:-return}(code != 0);
17668 }
17669
17670 _ACEOF
17671 rm -f conftest$ac_exeext
17672 if { (eval echo "$as_me:17672: \"$ac_link\"") >&5
17673   (eval $ac_link) 2>&5
17674   ac_status=$?
17675   echo "$as_me:17675: \$? = $ac_status" >&5
17676   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17677   { (eval echo "$as_me:17677: \"$ac_try\"") >&5
17678   (eval $ac_try) 2>&5
17679   ac_status=$?
17680   echo "$as_me:17680: \$? = $ac_status" >&5
17681   (exit $ac_status); }; }; then
17682   cf_cv_func_nanosleep=yes
17683 else
17684   echo "$as_me: program exited with status $ac_status" >&5
17685 echo "$as_me: failed program was:" >&5
17686 cat conftest.$ac_ext >&5
17687 cf_cv_func_nanosleep=no
17688 fi
17689 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17690 fi
17691 fi
17692 echo "$as_me:17692: result: $cf_cv_func_nanosleep" >&5
17693 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17694
17695 test "$cf_cv_func_nanosleep" = "yes" &&
17696 cat >>confdefs.h <<\EOF
17697 #define HAVE_NANOSLEEP 1
17698 EOF
17699
17700 for ac_header in \
17701 termio.h \
17702 termios.h \
17703 unistd.h \
17704
17705 do
17706 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17707 echo "$as_me:17707: checking for $ac_header" >&5
17708 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17709 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712   cat >conftest.$ac_ext <<_ACEOF
17713 #line 17713 "configure"
17714 #include "confdefs.h"
17715 #include <$ac_header>
17716 _ACEOF
17717 if { (eval echo "$as_me:17717: \"$ac_cpp conftest.$ac_ext\"") >&5
17718   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17719   ac_status=$?
17720   egrep -v '^ *\+' conftest.er1 >conftest.err
17721   rm -f conftest.er1
17722   cat conftest.err >&5
17723   echo "$as_me:17723: \$? = $ac_status" >&5
17724   (exit $ac_status); } >/dev/null; then
17725   if test -s conftest.err; then
17726     ac_cpp_err=$ac_c_preproc_warn_flag
17727   else
17728     ac_cpp_err=
17729   fi
17730 else
17731   ac_cpp_err=yes
17732 fi
17733 if test -z "$ac_cpp_err"; then
17734   eval "$as_ac_Header=yes"
17735 else
17736   echo "$as_me: failed program was:" >&5
17737   cat conftest.$ac_ext >&5
17738   eval "$as_ac_Header=no"
17739 fi
17740 rm -f conftest.err conftest.$ac_ext
17741 fi
17742 echo "$as_me:17742: result: `eval echo '${'$as_ac_Header'}'`" >&5
17743 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17744 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17745   cat >>confdefs.h <<EOF
17746 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17747 EOF
17748
17749 fi
17750 done
17751
17752 if test "$ISC" = yes ; then
17753
17754 for ac_header in sys/termio.h
17755 do
17756 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17757 echo "$as_me:17757: checking for $ac_header" >&5
17758 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17759 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17760   echo $ECHO_N "(cached) $ECHO_C" >&6
17761 else
17762   cat >conftest.$ac_ext <<_ACEOF
17763 #line 17763 "configure"
17764 #include "confdefs.h"
17765 #include <$ac_header>
17766 _ACEOF
17767 if { (eval echo "$as_me:17767: \"$ac_cpp conftest.$ac_ext\"") >&5
17768   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17769   ac_status=$?
17770   egrep -v '^ *\+' conftest.er1 >conftest.err
17771   rm -f conftest.er1
17772   cat conftest.err >&5
17773   echo "$as_me:17773: \$? = $ac_status" >&5
17774   (exit $ac_status); } >/dev/null; then
17775   if test -s conftest.err; then
17776     ac_cpp_err=$ac_c_preproc_warn_flag
17777   else
17778     ac_cpp_err=
17779   fi
17780 else
17781   ac_cpp_err=yes
17782 fi
17783 if test -z "$ac_cpp_err"; then
17784   eval "$as_ac_Header=yes"
17785 else
17786   echo "$as_me: failed program was:" >&5
17787   cat conftest.$ac_ext >&5
17788   eval "$as_ac_Header=no"
17789 fi
17790 rm -f conftest.err conftest.$ac_ext
17791 fi
17792 echo "$as_me:17792: result: `eval echo '${'$as_ac_Header'}'`" >&5
17793 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17794 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17795   cat >>confdefs.h <<EOF
17796 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17797 EOF
17798
17799 fi
17800 done
17801
17802 fi
17803 if test "$ac_cv_header_termios_h" = yes ; then
17804         case "$CFLAGS $CPPFLAGS" in
17805         (*-D_POSIX_SOURCE*)
17806                 termios_bad=dunno ;;
17807         (*)     termios_bad=maybe ;;
17808         esac
17809         if test "$termios_bad" = maybe ; then
17810         echo "$as_me:17810: checking whether termios.h needs _POSIX_SOURCE" >&5
17811 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17812         cat >conftest.$ac_ext <<_ACEOF
17813 #line 17813 "configure"
17814 #include "confdefs.h"
17815 #include <termios.h>
17816 int
17817 main ()
17818 {
17819 struct termios foo; int x = foo.c_iflag
17820   ;
17821   return 0;
17822 }
17823 _ACEOF
17824 rm -f conftest.$ac_objext
17825 if { (eval echo "$as_me:17825: \"$ac_compile\"") >&5
17826   (eval $ac_compile) 2>&5
17827   ac_status=$?
17828   echo "$as_me:17828: \$? = $ac_status" >&5
17829   (exit $ac_status); } &&
17830          { ac_try='test -s conftest.$ac_objext'
17831   { (eval echo "$as_me:17831: \"$ac_try\"") >&5
17832   (eval $ac_try) 2>&5
17833   ac_status=$?
17834   echo "$as_me:17834: \$? = $ac_status" >&5
17835   (exit $ac_status); }; }; then
17836   termios_bad=no
17837 else
17838   echo "$as_me: failed program was:" >&5
17839 cat conftest.$ac_ext >&5
17840
17841                 cat >conftest.$ac_ext <<_ACEOF
17842 #line 17842 "configure"
17843 #include "confdefs.h"
17844
17845 #define _POSIX_SOURCE
17846 #include <termios.h>
17847 int
17848 main ()
17849 {
17850 struct termios foo; int x = foo.c_iflag
17851   ;
17852   return 0;
17853 }
17854 _ACEOF
17855 rm -f conftest.$ac_objext
17856 if { (eval echo "$as_me:17856: \"$ac_compile\"") >&5
17857   (eval $ac_compile) 2>&5
17858   ac_status=$?
17859   echo "$as_me:17859: \$? = $ac_status" >&5
17860   (exit $ac_status); } &&
17861          { ac_try='test -s conftest.$ac_objext'
17862   { (eval echo "$as_me:17862: \"$ac_try\"") >&5
17863   (eval $ac_try) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit $ac_status); }; }; then
17867   termios_bad=unknown
17868 else
17869   echo "$as_me: failed program was:" >&5
17870 cat conftest.$ac_ext >&5
17871 termios_bad=yes
17872 cat >>confdefs.h <<\EOF
17873 #define _POSIX_SOURCE 1
17874 EOF
17875
17876 fi
17877 rm -f conftest.$ac_objext conftest.$ac_ext
17878
17879 fi
17880 rm -f conftest.$ac_objext conftest.$ac_ext
17881         echo "$as_me:17881: result: $termios_bad" >&5
17882 echo "${ECHO_T}$termios_bad" >&6
17883         fi
17884 fi
17885
17886 echo "$as_me:17886: checking for tcgetattr" >&5
17887 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17888 if test "${cf_cv_have_tcgetattr+set}" = set; then
17889   echo $ECHO_N "(cached) $ECHO_C" >&6
17890 else
17891
17892 cat >conftest.$ac_ext <<_ACEOF
17893 #line 17893 "configure"
17894 #include "confdefs.h"
17895
17896 #include <sys/types.h>
17897 #ifdef HAVE_UNISTD_H
17898 #include <unistd.h>
17899 #endif
17900 #ifdef HAVE_TERMIOS_H
17901 #include <termios.h>
17902 #define TTY struct termios
17903 #else
17904 #ifdef HAVE_TERMIO_H
17905 #include <termio.h>
17906 #define TTY struct termio
17907 #endif
17908 #endif
17909
17910 int
17911 main ()
17912 {
17913
17914 TTY foo;
17915 tcgetattr(1, &foo);
17916   ;
17917   return 0;
17918 }
17919 _ACEOF
17920 rm -f conftest.$ac_objext conftest$ac_exeext
17921 if { (eval echo "$as_me:17921: \"$ac_link\"") >&5
17922   (eval $ac_link) 2>&5
17923   ac_status=$?
17924   echo "$as_me:17924: \$? = $ac_status" >&5
17925   (exit $ac_status); } &&
17926          { ac_try='test -s conftest$ac_exeext'
17927   { (eval echo "$as_me:17927: \"$ac_try\"") >&5
17928   (eval $ac_try) 2>&5
17929   ac_status=$?
17930   echo "$as_me:17930: \$? = $ac_status" >&5
17931   (exit $ac_status); }; }; then
17932   cf_cv_have_tcgetattr=yes
17933 else
17934   echo "$as_me: failed program was:" >&5
17935 cat conftest.$ac_ext >&5
17936 cf_cv_have_tcgetattr=no
17937 fi
17938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17939 fi
17940 echo "$as_me:17940: result: $cf_cv_have_tcgetattr" >&5
17941 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17942 test "$cf_cv_have_tcgetattr" = yes &&
17943 cat >>confdefs.h <<\EOF
17944 #define HAVE_TCGETATTR 1
17945 EOF
17946
17947 echo "$as_me:17947: checking for vsscanf function or workaround" >&5
17948 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17949 if test "${cf_cv_func_vsscanf+set}" = set; then
17950   echo $ECHO_N "(cached) $ECHO_C" >&6
17951 else
17952
17953 cat >conftest.$ac_ext <<_ACEOF
17954 #line 17954 "configure"
17955 #include "confdefs.h"
17956
17957 #include <stdarg.h>
17958 #include <stdio.h>
17959 int
17960 main ()
17961 {
17962
17963         va_list ap;
17964         vsscanf("from", "%d", ap)
17965   ;
17966   return 0;
17967 }
17968 _ACEOF
17969 rm -f conftest.$ac_objext conftest$ac_exeext
17970 if { (eval echo "$as_me:17970: \"$ac_link\"") >&5
17971   (eval $ac_link) 2>&5
17972   ac_status=$?
17973   echo "$as_me:17973: \$? = $ac_status" >&5
17974   (exit $ac_status); } &&
17975          { ac_try='test -s conftest$ac_exeext'
17976   { (eval echo "$as_me:17976: \"$ac_try\"") >&5
17977   (eval $ac_try) 2>&5
17978   ac_status=$?
17979   echo "$as_me:17979: \$? = $ac_status" >&5
17980   (exit $ac_status); }; }; then
17981   cf_cv_func_vsscanf=vsscanf
17982 else
17983   echo "$as_me: failed program was:" >&5
17984 cat conftest.$ac_ext >&5
17985
17986 cat >conftest.$ac_ext <<_ACEOF
17987 #line 17987 "configure"
17988 #include "confdefs.h"
17989
17990 #include <stdarg.h>
17991 #include <stdio.h>
17992 int
17993 main ()
17994 {
17995
17996         FILE strbuf;
17997         char *str = "from";
17998
17999         strbuf._flag = _IOREAD;
18000         strbuf._ptr = strbuf._base = (unsigned char *) str;
18001         strbuf._cnt = strlen(str);
18002         strbuf._file = _NFILE;
18003         return (vfscanf(&strbuf, "%d", ap))
18004   ;
18005   return 0;
18006 }
18007 _ACEOF
18008 rm -f conftest.$ac_objext conftest$ac_exeext
18009 if { (eval echo "$as_me:18009: \"$ac_link\"") >&5
18010   (eval $ac_link) 2>&5
18011   ac_status=$?
18012   echo "$as_me:18012: \$? = $ac_status" >&5
18013   (exit $ac_status); } &&
18014          { ac_try='test -s conftest$ac_exeext'
18015   { (eval echo "$as_me:18015: \"$ac_try\"") >&5
18016   (eval $ac_try) 2>&5
18017   ac_status=$?
18018   echo "$as_me:18018: \$? = $ac_status" >&5
18019   (exit $ac_status); }; }; then
18020   cf_cv_func_vsscanf=vfscanf
18021 else
18022   echo "$as_me: failed program was:" >&5
18023 cat conftest.$ac_ext >&5
18024
18025 cat >conftest.$ac_ext <<_ACEOF
18026 #line 18026 "configure"
18027 #include "confdefs.h"
18028
18029 #include <stdarg.h>
18030 #include <stdio.h>
18031 int
18032 main ()
18033 {
18034
18035         FILE strbuf;
18036         char *str = "from";
18037
18038         strbuf._flag = _IOREAD;
18039         strbuf._ptr = strbuf._base = (unsigned char *) str;
18040         strbuf._cnt = strlen(str);
18041         strbuf._file = _NFILE;
18042         return (_doscan(&strbuf, "%d", ap))
18043   ;
18044   return 0;
18045 }
18046 _ACEOF
18047 rm -f conftest.$ac_objext conftest$ac_exeext
18048 if { (eval echo "$as_me:18048: \"$ac_link\"") >&5
18049   (eval $ac_link) 2>&5
18050   ac_status=$?
18051   echo "$as_me:18051: \$? = $ac_status" >&5
18052   (exit $ac_status); } &&
18053          { ac_try='test -s conftest$ac_exeext'
18054   { (eval echo "$as_me:18054: \"$ac_try\"") >&5
18055   (eval $ac_try) 2>&5
18056   ac_status=$?
18057   echo "$as_me:18057: \$? = $ac_status" >&5
18058   (exit $ac_status); }; }; then
18059   cf_cv_func_vsscanf=_doscan
18060 else
18061   echo "$as_me: failed program was:" >&5
18062 cat conftest.$ac_ext >&5
18063
18064 cf_cv_func_vsscanf=no
18065 fi
18066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18067 fi
18068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18069 fi
18070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18071 fi
18072 echo "$as_me:18072: result: $cf_cv_func_vsscanf" >&5
18073 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18074
18075 case $cf_cv_func_vsscanf in
18076 (vsscanf)
18077 cat >>confdefs.h <<\EOF
18078 #define HAVE_VSSCANF 1
18079 EOF
18080 ;;
18081 (vfscanf)
18082 cat >>confdefs.h <<\EOF
18083 #define HAVE_VFSCANF 1
18084 EOF
18085 ;;
18086 (_doscan)
18087 cat >>confdefs.h <<\EOF
18088 #define HAVE__DOSCAN 1
18089 EOF
18090 ;;
18091 esac
18092
18093 for ac_header in \
18094 unistd.h \
18095
18096 do
18097 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18098 echo "$as_me:18098: checking for $ac_header" >&5
18099 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18100 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18101   echo $ECHO_N "(cached) $ECHO_C" >&6
18102 else
18103   cat >conftest.$ac_ext <<_ACEOF
18104 #line 18104 "configure"
18105 #include "confdefs.h"
18106 #include <$ac_header>
18107 _ACEOF
18108 if { (eval echo "$as_me:18108: \"$ac_cpp conftest.$ac_ext\"") >&5
18109   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18110   ac_status=$?
18111   egrep -v '^ *\+' conftest.er1 >conftest.err
18112   rm -f conftest.er1
18113   cat conftest.err >&5
18114   echo "$as_me:18114: \$? = $ac_status" >&5
18115   (exit $ac_status); } >/dev/null; then
18116   if test -s conftest.err; then
18117     ac_cpp_err=$ac_c_preproc_warn_flag
18118   else
18119     ac_cpp_err=
18120   fi
18121 else
18122   ac_cpp_err=yes
18123 fi
18124 if test -z "$ac_cpp_err"; then
18125   eval "$as_ac_Header=yes"
18126 else
18127   echo "$as_me: failed program was:" >&5
18128   cat conftest.$ac_ext >&5
18129   eval "$as_ac_Header=no"
18130 fi
18131 rm -f conftest.err conftest.$ac_ext
18132 fi
18133 echo "$as_me:18133: result: `eval echo '${'$as_ac_Header'}'`" >&5
18134 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18135 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18136   cat >>confdefs.h <<EOF
18137 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18138 EOF
18139
18140 fi
18141 done
18142
18143 echo "$as_me:18143: checking for working mkstemp" >&5
18144 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18145 if test "${cf_cv_func_mkstemp+set}" = set; then
18146   echo $ECHO_N "(cached) $ECHO_C" >&6
18147 else
18148
18149 rm -rf conftest*
18150 if test "$cross_compiling" = yes; then
18151   cf_cv_func_mkstemp=maybe
18152 else
18153   cat >conftest.$ac_ext <<_ACEOF
18154 #line 18154 "configure"
18155 #include "confdefs.h"
18156
18157 #include <sys/types.h>
18158 #ifdef HAVE_UNISTD_H
18159 #include <unistd.h>
18160 #endif
18161 #include <stdlib.h>
18162 #include <stdio.h>
18163 #include <string.h>
18164 #include <sys/stat.h>
18165 int main(void)
18166 {
18167         char *tmpl = "conftestXXXXXX";
18168         char name[2][80];
18169         int n;
18170         int result = 0;
18171         int fd;
18172         struct stat sb;
18173
18174         umask(077);
18175         for (n = 0; n < 2; ++n) {
18176                 strcpy(name[n], tmpl);
18177                 if ((fd = mkstemp(name[n])) >= 0) {
18178                         if (!strcmp(name[n], tmpl)
18179                          || stat(name[n], &sb) != 0
18180                          || (sb.st_mode & S_IFMT) != S_IFREG
18181                          || (sb.st_mode & 077) != 0) {
18182                                 result = 1;
18183                         }
18184                         close(fd);
18185                 }
18186         }
18187         if (result == 0
18188          && !strcmp(name[0], name[1]))
18189                 result = 1;
18190         ${cf_cv_main_return:-return}(result);
18191 }
18192
18193 _ACEOF
18194 rm -f conftest$ac_exeext
18195 if { (eval echo "$as_me:18195: \"$ac_link\"") >&5
18196   (eval $ac_link) 2>&5
18197   ac_status=$?
18198   echo "$as_me:18198: \$? = $ac_status" >&5
18199   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18200   { (eval echo "$as_me:18200: \"$ac_try\"") >&5
18201   (eval $ac_try) 2>&5
18202   ac_status=$?
18203   echo "$as_me:18203: \$? = $ac_status" >&5
18204   (exit $ac_status); }; }; then
18205   cf_cv_func_mkstemp=yes
18206
18207 else
18208   echo "$as_me: program exited with status $ac_status" >&5
18209 echo "$as_me: failed program was:" >&5
18210 cat conftest.$ac_ext >&5
18211 cf_cv_func_mkstemp=no
18212
18213 fi
18214 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18215 fi
18216
18217 fi
18218 echo "$as_me:18218: result: $cf_cv_func_mkstemp" >&5
18219 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18220 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18221         echo "$as_me:18221: checking for mkstemp" >&5
18222 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18223 if test "${ac_cv_func_mkstemp+set}" = set; then
18224   echo $ECHO_N "(cached) $ECHO_C" >&6
18225 else
18226   cat >conftest.$ac_ext <<_ACEOF
18227 #line 18227 "configure"
18228 #include "confdefs.h"
18229 /* System header to define __stub macros and hopefully few prototypes,
18230     which can conflict with char mkstemp (); below.  */
18231 #include <assert.h>
18232 /* Override any gcc2 internal prototype to avoid an error.  */
18233 #ifdef __cplusplus
18234 extern "C"
18235 #endif
18236 /* We use char because int might match the return type of a gcc2
18237    builtin and then its argument prototype would still apply.  */
18238 char mkstemp ();
18239 char (*f) ();
18240
18241 int
18242 main ()
18243 {
18244 /* The GNU C library defines this for functions which it implements
18245     to always fail with ENOSYS.  Some functions are actually named
18246     something starting with __ and the normal name is an alias.  */
18247 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18248 choke me
18249 #else
18250 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18251 #endif
18252
18253   ;
18254   return 0;
18255 }
18256 _ACEOF
18257 rm -f conftest.$ac_objext conftest$ac_exeext
18258 if { (eval echo "$as_me:18258: \"$ac_link\"") >&5
18259   (eval $ac_link) 2>&5
18260   ac_status=$?
18261   echo "$as_me:18261: \$? = $ac_status" >&5
18262   (exit $ac_status); } &&
18263          { ac_try='test -s conftest$ac_exeext'
18264   { (eval echo "$as_me:18264: \"$ac_try\"") >&5
18265   (eval $ac_try) 2>&5
18266   ac_status=$?
18267   echo "$as_me:18267: \$? = $ac_status" >&5
18268   (exit $ac_status); }; }; then
18269   ac_cv_func_mkstemp=yes
18270 else
18271   echo "$as_me: failed program was:" >&5
18272 cat conftest.$ac_ext >&5
18273 ac_cv_func_mkstemp=no
18274 fi
18275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18276 fi
18277 echo "$as_me:18277: result: $ac_cv_func_mkstemp" >&5
18278 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18279
18280 fi
18281 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18282
18283 cat >>confdefs.h <<\EOF
18284 #define HAVE_MKSTEMP 1
18285 EOF
18286
18287 fi
18288
18289 # setup for prototype of fallback for vsscanf()
18290
18291 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18292         HAVE_VSSCANF=1
18293 else
18294         HAVE_VSSCANF=0
18295 fi
18296
18297 if test "x$cross_compiling" = xyes ; then
18298         { echo "$as_me:18298: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18299 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18300 else
18301         echo "$as_me:18301: checking whether setvbuf arguments are reversed" >&5
18302 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18303 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18304   echo $ECHO_N "(cached) $ECHO_C" >&6
18305 else
18306   if test "$cross_compiling" = yes; then
18307   { { echo "$as_me:18307: error: cannot run test program while cross compiling" >&5
18308 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18309    { (exit 1); exit 1; }; }
18310 else
18311   cat >conftest.$ac_ext <<_ACEOF
18312 #line 18312 "configure"
18313 #include "confdefs.h"
18314 #include <stdio.h>
18315 /* If setvbuf has the reversed format, exit 0. */
18316 int
18317 main ()
18318 {
18319   /* This call has the arguments reversed.
18320      A reversed system may check and see that the address of main
18321      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18322   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18323     $ac_main_return(1);
18324   putc('\r', stdout);
18325   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18326 }
18327 _ACEOF
18328 rm -f conftest$ac_exeext
18329 if { (eval echo "$as_me:18329: \"$ac_link\"") >&5
18330   (eval $ac_link) 2>&5
18331   ac_status=$?
18332   echo "$as_me:18332: \$? = $ac_status" >&5
18333   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18334   { (eval echo "$as_me:18334: \"$ac_try\"") >&5
18335   (eval $ac_try) 2>&5
18336   ac_status=$?
18337   echo "$as_me:18337: \$? = $ac_status" >&5
18338   (exit $ac_status); }; }; then
18339   ac_cv_func_setvbuf_reversed=yes
18340 else
18341   echo "$as_me: program exited with status $ac_status" >&5
18342 echo "$as_me: failed program was:" >&5
18343 cat conftest.$ac_ext >&5
18344 ac_cv_func_setvbuf_reversed=no
18345 fi
18346 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18347 fi
18348 rm -f core core.* *.core
18349 fi
18350 echo "$as_me:18350: result: $ac_cv_func_setvbuf_reversed" >&5
18351 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18352 if test $ac_cv_func_setvbuf_reversed = yes; then
18353
18354 cat >>confdefs.h <<\EOF
18355 #define SETVBUF_REVERSED 1
18356 EOF
18357
18358 fi
18359
18360 fi
18361 echo "$as_me:18361: checking for intptr_t" >&5
18362 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18363 if test "${ac_cv_type_intptr_t+set}" = set; then
18364   echo $ECHO_N "(cached) $ECHO_C" >&6
18365 else
18366   cat >conftest.$ac_ext <<_ACEOF
18367 #line 18367 "configure"
18368 #include "confdefs.h"
18369 $ac_includes_default
18370 int
18371 main ()
18372 {
18373 if ((intptr_t *) 0)
18374   return 0;
18375 if (sizeof (intptr_t))
18376   return 0;
18377   ;
18378   return 0;
18379 }
18380 _ACEOF
18381 rm -f conftest.$ac_objext
18382 if { (eval echo "$as_me:18382: \"$ac_compile\"") >&5
18383   (eval $ac_compile) 2>&5
18384   ac_status=$?
18385   echo "$as_me:18385: \$? = $ac_status" >&5
18386   (exit $ac_status); } &&
18387          { ac_try='test -s conftest.$ac_objext'
18388   { (eval echo "$as_me:18388: \"$ac_try\"") >&5
18389   (eval $ac_try) 2>&5
18390   ac_status=$?
18391   echo "$as_me:18391: \$? = $ac_status" >&5
18392   (exit $ac_status); }; }; then
18393   ac_cv_type_intptr_t=yes
18394 else
18395   echo "$as_me: failed program was:" >&5
18396 cat conftest.$ac_ext >&5
18397 ac_cv_type_intptr_t=no
18398 fi
18399 rm -f conftest.$ac_objext conftest.$ac_ext
18400 fi
18401 echo "$as_me:18401: result: $ac_cv_type_intptr_t" >&5
18402 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18403 if test $ac_cv_type_intptr_t = yes; then
18404   :
18405 else
18406
18407 cat >>confdefs.h <<EOF
18408 #define intptr_t long
18409 EOF
18410
18411 fi
18412
18413 echo "$as_me:18413: checking for ssize_t" >&5
18414 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18415 if test "${ac_cv_type_ssize_t+set}" = set; then
18416   echo $ECHO_N "(cached) $ECHO_C" >&6
18417 else
18418   cat >conftest.$ac_ext <<_ACEOF
18419 #line 18419 "configure"
18420 #include "confdefs.h"
18421 $ac_includes_default
18422 int
18423 main ()
18424 {
18425 if ((ssize_t *) 0)
18426   return 0;
18427 if (sizeof (ssize_t))
18428   return 0;
18429   ;
18430   return 0;
18431 }
18432 _ACEOF
18433 rm -f conftest.$ac_objext
18434 if { (eval echo "$as_me:18434: \"$ac_compile\"") >&5
18435   (eval $ac_compile) 2>&5
18436   ac_status=$?
18437   echo "$as_me:18437: \$? = $ac_status" >&5
18438   (exit $ac_status); } &&
18439          { ac_try='test -s conftest.$ac_objext'
18440   { (eval echo "$as_me:18440: \"$ac_try\"") >&5
18441   (eval $ac_try) 2>&5
18442   ac_status=$?
18443   echo "$as_me:18443: \$? = $ac_status" >&5
18444   (exit $ac_status); }; }; then
18445   ac_cv_type_ssize_t=yes
18446 else
18447   echo "$as_me: failed program was:" >&5
18448 cat conftest.$ac_ext >&5
18449 ac_cv_type_ssize_t=no
18450 fi
18451 rm -f conftest.$ac_objext conftest.$ac_ext
18452 fi
18453 echo "$as_me:18453: result: $ac_cv_type_ssize_t" >&5
18454 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18455 if test $ac_cv_type_ssize_t = yes; then
18456   :
18457 else
18458
18459 cat >>confdefs.h <<EOF
18460 #define ssize_t int
18461 EOF
18462
18463 fi
18464
18465 echo "$as_me:18465: checking for type sigaction_t" >&5
18466 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18467 if test "${cf_cv_type_sigaction+set}" = set; then
18468   echo $ECHO_N "(cached) $ECHO_C" >&6
18469 else
18470
18471         cat >conftest.$ac_ext <<_ACEOF
18472 #line 18472 "configure"
18473 #include "confdefs.h"
18474
18475 #include <signal.h>
18476 int
18477 main ()
18478 {
18479 sigaction_t x
18480   ;
18481   return 0;
18482 }
18483 _ACEOF
18484 rm -f conftest.$ac_objext
18485 if { (eval echo "$as_me:18485: \"$ac_compile\"") >&5
18486   (eval $ac_compile) 2>&5
18487   ac_status=$?
18488   echo "$as_me:18488: \$? = $ac_status" >&5
18489   (exit $ac_status); } &&
18490          { ac_try='test -s conftest.$ac_objext'
18491   { (eval echo "$as_me:18491: \"$ac_try\"") >&5
18492   (eval $ac_try) 2>&5
18493   ac_status=$?
18494   echo "$as_me:18494: \$? = $ac_status" >&5
18495   (exit $ac_status); }; }; then
18496   cf_cv_type_sigaction=yes
18497 else
18498   echo "$as_me: failed program was:" >&5
18499 cat conftest.$ac_ext >&5
18500 cf_cv_type_sigaction=no
18501 fi
18502 rm -f conftest.$ac_objext conftest.$ac_ext
18503 fi
18504
18505 echo "$as_me:18505: result: $cf_cv_type_sigaction" >&5
18506 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18507 test "$cf_cv_type_sigaction" = yes &&
18508 cat >>confdefs.h <<\EOF
18509 #define HAVE_TYPE_SIGACTION 1
18510 EOF
18511
18512 echo "$as_me:18512: checking declaration of size-change" >&5
18513 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18514 if test "${cf_cv_sizechange+set}" = set; then
18515   echo $ECHO_N "(cached) $ECHO_C" >&6
18516 else
18517
18518         cf_cv_sizechange=unknown
18519         cf_save_CPPFLAGS="$CPPFLAGS"
18520
18521 for cf_opts in "" "NEED_PTEM_H"
18522 do
18523
18524         CPPFLAGS="$cf_save_CPPFLAGS"
18525         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18526         cat >conftest.$ac_ext <<_ACEOF
18527 #line 18527 "configure"
18528 #include "confdefs.h"
18529 #include <sys/types.h>
18530 #ifdef HAVE_TERMIOS_H
18531 #include <termios.h>
18532 #else
18533 #ifdef HAVE_TERMIO_H
18534 #include <termio.h>
18535 #endif
18536 #endif
18537 #ifdef NEED_PTEM_H
18538 /* This is a workaround for SCO:  they neglected to define struct winsize in
18539  * termios.h -- it's only in termio.h and ptem.h
18540  */
18541 #include        <sys/stream.h>
18542 #include        <sys/ptem.h>
18543 #endif
18544 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18545 #include <sys/ioctl.h>
18546 #endif
18547
18548 int
18549 main ()
18550 {
18551
18552 #ifdef TIOCGSIZE
18553         struct ttysize win;     /* FIXME: what system is this? */
18554         int y = win.ts_lines;
18555         int x = win.ts_cols;
18556 #else
18557 #ifdef TIOCGWINSZ
18558         struct winsize win;
18559         int y = win.ws_row;
18560         int x = win.ws_col;
18561 #else
18562         no TIOCGSIZE or TIOCGWINSZ
18563 #endif /* TIOCGWINSZ */
18564 #endif /* TIOCGSIZE */
18565
18566   ;
18567   return 0;
18568 }
18569 _ACEOF
18570 rm -f conftest.$ac_objext
18571 if { (eval echo "$as_me:18571: \"$ac_compile\"") >&5
18572   (eval $ac_compile) 2>&5
18573   ac_status=$?
18574   echo "$as_me:18574: \$? = $ac_status" >&5
18575   (exit $ac_status); } &&
18576          { ac_try='test -s conftest.$ac_objext'
18577   { (eval echo "$as_me:18577: \"$ac_try\"") >&5
18578   (eval $ac_try) 2>&5
18579   ac_status=$?
18580   echo "$as_me:18580: \$? = $ac_status" >&5
18581   (exit $ac_status); }; }; then
18582   cf_cv_sizechange=yes
18583 else
18584   echo "$as_me: failed program was:" >&5
18585 cat conftest.$ac_ext >&5
18586 cf_cv_sizechange=no
18587 fi
18588 rm -f conftest.$ac_objext conftest.$ac_ext
18589
18590         CPPFLAGS="$cf_save_CPPFLAGS"
18591         if test "$cf_cv_sizechange" = yes ; then
18592                 echo "size-change succeeded ($cf_opts)" >&5
18593                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18594                 break
18595         fi
18596 done
18597
18598 fi
18599 echo "$as_me:18599: result: $cf_cv_sizechange" >&5
18600 echo "${ECHO_T}$cf_cv_sizechange" >&6
18601 if test "$cf_cv_sizechange" != no ; then
18602
18603 cat >>confdefs.h <<\EOF
18604 #define HAVE_SIZECHANGE 1
18605 EOF
18606
18607         case $cf_cv_sizechange in
18608         (NEED*)
18609                 cat >>confdefs.h <<EOF
18610 #define $cf_cv_sizechange  1
18611 EOF
18612
18613                 ;;
18614         esac
18615 fi
18616
18617 echo "$as_me:18617: checking for memmove" >&5
18618 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18619 if test "${ac_cv_func_memmove+set}" = set; then
18620   echo $ECHO_N "(cached) $ECHO_C" >&6
18621 else
18622   cat >conftest.$ac_ext <<_ACEOF
18623 #line 18623 "configure"
18624 #include "confdefs.h"
18625 /* System header to define __stub macros and hopefully few prototypes,
18626     which can conflict with char memmove (); below.  */
18627 #include <assert.h>
18628 /* Override any gcc2 internal prototype to avoid an error.  */
18629 #ifdef __cplusplus
18630 extern "C"
18631 #endif
18632 /* We use char because int might match the return type of a gcc2
18633    builtin and then its argument prototype would still apply.  */
18634 char memmove ();
18635 char (*f) ();
18636
18637 int
18638 main ()
18639 {
18640 /* The GNU C library defines this for functions which it implements
18641     to always fail with ENOSYS.  Some functions are actually named
18642     something starting with __ and the normal name is an alias.  */
18643 #if defined (__stub_memmove) || defined (__stub___memmove)
18644 choke me
18645 #else
18646 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18647 #endif
18648
18649   ;
18650   return 0;
18651 }
18652 _ACEOF
18653 rm -f conftest.$ac_objext conftest$ac_exeext
18654 if { (eval echo "$as_me:18654: \"$ac_link\"") >&5
18655   (eval $ac_link) 2>&5
18656   ac_status=$?
18657   echo "$as_me:18657: \$? = $ac_status" >&5
18658   (exit $ac_status); } &&
18659          { ac_try='test -s conftest$ac_exeext'
18660   { (eval echo "$as_me:18660: \"$ac_try\"") >&5
18661   (eval $ac_try) 2>&5
18662   ac_status=$?
18663   echo "$as_me:18663: \$? = $ac_status" >&5
18664   (exit $ac_status); }; }; then
18665   ac_cv_func_memmove=yes
18666 else
18667   echo "$as_me: failed program was:" >&5
18668 cat conftest.$ac_ext >&5
18669 ac_cv_func_memmove=no
18670 fi
18671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18672 fi
18673 echo "$as_me:18673: result: $ac_cv_func_memmove" >&5
18674 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18675 if test $ac_cv_func_memmove = yes; then
18676   :
18677 else
18678
18679 echo "$as_me:18679: checking for bcopy" >&5
18680 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18681 if test "${ac_cv_func_bcopy+set}" = set; then
18682   echo $ECHO_N "(cached) $ECHO_C" >&6
18683 else
18684   cat >conftest.$ac_ext <<_ACEOF
18685 #line 18685 "configure"
18686 #include "confdefs.h"
18687 /* System header to define __stub macros and hopefully few prototypes,
18688     which can conflict with char bcopy (); below.  */
18689 #include <assert.h>
18690 /* Override any gcc2 internal prototype to avoid an error.  */
18691 #ifdef __cplusplus
18692 extern "C"
18693 #endif
18694 /* We use char because int might match the return type of a gcc2
18695    builtin and then its argument prototype would still apply.  */
18696 char bcopy ();
18697 char (*f) ();
18698
18699 int
18700 main ()
18701 {
18702 /* The GNU C library defines this for functions which it implements
18703     to always fail with ENOSYS.  Some functions are actually named
18704     something starting with __ and the normal name is an alias.  */
18705 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18706 choke me
18707 #else
18708 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18709 #endif
18710
18711   ;
18712   return 0;
18713 }
18714 _ACEOF
18715 rm -f conftest.$ac_objext conftest$ac_exeext
18716 if { (eval echo "$as_me:18716: \"$ac_link\"") >&5
18717   (eval $ac_link) 2>&5
18718   ac_status=$?
18719   echo "$as_me:18719: \$? = $ac_status" >&5
18720   (exit $ac_status); } &&
18721          { ac_try='test -s conftest$ac_exeext'
18722   { (eval echo "$as_me:18722: \"$ac_try\"") >&5
18723   (eval $ac_try) 2>&5
18724   ac_status=$?
18725   echo "$as_me:18725: \$? = $ac_status" >&5
18726   (exit $ac_status); }; }; then
18727   ac_cv_func_bcopy=yes
18728 else
18729   echo "$as_me: failed program was:" >&5
18730 cat conftest.$ac_ext >&5
18731 ac_cv_func_bcopy=no
18732 fi
18733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18734 fi
18735 echo "$as_me:18735: result: $ac_cv_func_bcopy" >&5
18736 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18737 if test $ac_cv_func_bcopy = yes; then
18738
18739         echo "$as_me:18739: checking if bcopy does overlapping moves" >&5
18740 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18741 if test "${cf_cv_good_bcopy+set}" = set; then
18742   echo $ECHO_N "(cached) $ECHO_C" >&6
18743 else
18744
18745                 if test "$cross_compiling" = yes; then
18746   cf_cv_good_bcopy=unknown
18747 else
18748   cat >conftest.$ac_ext <<_ACEOF
18749 #line 18749 "configure"
18750 #include "confdefs.h"
18751
18752 int main(void) {
18753         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18754         char temp[40];
18755         bcopy(data, temp, sizeof(data));
18756         bcopy(temp+10, temp, 15);
18757         bcopy(temp+5, temp+15, 10);
18758         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18759 }
18760
18761 _ACEOF
18762 rm -f conftest$ac_exeext
18763 if { (eval echo "$as_me:18763: \"$ac_link\"") >&5
18764   (eval $ac_link) 2>&5
18765   ac_status=$?
18766   echo "$as_me:18766: \$? = $ac_status" >&5
18767   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18768   { (eval echo "$as_me:18768: \"$ac_try\"") >&5
18769   (eval $ac_try) 2>&5
18770   ac_status=$?
18771   echo "$as_me:18771: \$? = $ac_status" >&5
18772   (exit $ac_status); }; }; then
18773   cf_cv_good_bcopy=yes
18774 else
18775   echo "$as_me: program exited with status $ac_status" >&5
18776 echo "$as_me: failed program was:" >&5
18777 cat conftest.$ac_ext >&5
18778 cf_cv_good_bcopy=no
18779 fi
18780 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18781 fi
18782
18783 fi
18784 echo "$as_me:18784: result: $cf_cv_good_bcopy" >&5
18785 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18786
18787 else
18788   cf_cv_good_bcopy=no
18789 fi
18790
18791         if test "$cf_cv_good_bcopy" = yes ; then
18792
18793 cat >>confdefs.h <<\EOF
18794 #define USE_OK_BCOPY 1
18795 EOF
18796
18797         else
18798
18799 cat >>confdefs.h <<\EOF
18800 #define USE_MY_MEMMOVE 1
18801 EOF
18802
18803         fi
18804
18805 fi
18806
18807 tty 2>&1 >/dev/null || {
18808 for ac_func in posix_openpt
18809 do
18810 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18811 echo "$as_me:18811: checking for $ac_func" >&5
18812 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18813 if eval "test \"\${$as_ac_var+set}\" = set"; then
18814   echo $ECHO_N "(cached) $ECHO_C" >&6
18815 else
18816   cat >conftest.$ac_ext <<_ACEOF
18817 #line 18817 "configure"
18818 #include "confdefs.h"
18819 /* System header to define __stub macros and hopefully few prototypes,
18820     which can conflict with char $ac_func (); below.  */
18821 #include <assert.h>
18822 /* Override any gcc2 internal prototype to avoid an error.  */
18823 #ifdef __cplusplus
18824 extern "C"
18825 #endif
18826 /* We use char because int might match the return type of a gcc2
18827    builtin and then its argument prototype would still apply.  */
18828 char $ac_func ();
18829 char (*f) ();
18830
18831 int
18832 main ()
18833 {
18834 /* The GNU C library defines this for functions which it implements
18835     to always fail with ENOSYS.  Some functions are actually named
18836     something starting with __ and the normal name is an alias.  */
18837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18838 choke me
18839 #else
18840 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18841 #endif
18842
18843   ;
18844   return 0;
18845 }
18846 _ACEOF
18847 rm -f conftest.$ac_objext conftest$ac_exeext
18848 if { (eval echo "$as_me:18848: \"$ac_link\"") >&5
18849   (eval $ac_link) 2>&5
18850   ac_status=$?
18851   echo "$as_me:18851: \$? = $ac_status" >&5
18852   (exit $ac_status); } &&
18853          { ac_try='test -s conftest$ac_exeext'
18854   { (eval echo "$as_me:18854: \"$ac_try\"") >&5
18855   (eval $ac_try) 2>&5
18856   ac_status=$?
18857   echo "$as_me:18857: \$? = $ac_status" >&5
18858   (exit $ac_status); }; }; then
18859   eval "$as_ac_var=yes"
18860 else
18861   echo "$as_me: failed program was:" >&5
18862 cat conftest.$ac_ext >&5
18863 eval "$as_ac_var=no"
18864 fi
18865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18866 fi
18867 echo "$as_me:18867: result: `eval echo '${'$as_ac_var'}'`" >&5
18868 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18869 if test `eval echo '${'$as_ac_var'}'` = yes; then
18870   cat >>confdefs.h <<EOF
18871 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18872 EOF
18873
18874 fi
18875 done
18876  }
18877 echo "$as_me:18877: checking if poll really works" >&5
18878 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18879 if test "${cf_cv_working_poll+set}" = set; then
18880   echo $ECHO_N "(cached) $ECHO_C" >&6
18881 else
18882
18883 if test "$cross_compiling" = yes; then
18884   cf_cv_working_poll=unknown
18885 else
18886   cat >conftest.$ac_ext <<_ACEOF
18887 #line 18887 "configure"
18888 #include "confdefs.h"
18889
18890 #include <stdlib.h>
18891 #include <stdio.h>
18892 #include <unistd.h>
18893 #include <fcntl.h>
18894 #ifdef HAVE_POLL_H
18895 #include <poll.h>
18896 #else
18897 #include <sys/poll.h>
18898 #endif
18899 int main(void) {
18900         struct pollfd myfds;
18901         int ret;
18902
18903         /* check for Darwin bug with respect to "devices" */
18904         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18905         if (myfds.fd < 0)
18906                 myfds.fd = 0;
18907         myfds.events = POLLIN;
18908         myfds.revents = 0;
18909
18910         ret = poll(&myfds, 1, 100);
18911
18912         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18913                 ret = -1;
18914         } else {
18915                 int fd = 0;
18916                 if (!isatty(fd)) {
18917                         fd = open("/dev/tty", 2);       /* O_RDWR */
18918                 }
18919 #ifdef HAVE_POSIX_OPENPT
18920                 if (fd < 0) {
18921                         fd = posix_openpt(O_RDWR);
18922                 }
18923 #endif
18924
18925                 if (fd >= 0) {
18926                         /* also check with standard input */
18927                         myfds.fd = fd;
18928                         myfds.events = POLLIN;
18929                         myfds.revents = 0;
18930                         ret = poll(&myfds, 1, 100);
18931                 } else {
18932                         ret = -1;
18933                 }
18934         }
18935         ${cf_cv_main_return:-return}(ret < 0);
18936 }
18937 _ACEOF
18938 rm -f conftest$ac_exeext
18939 if { (eval echo "$as_me:18939: \"$ac_link\"") >&5
18940   (eval $ac_link) 2>&5
18941   ac_status=$?
18942   echo "$as_me:18942: \$? = $ac_status" >&5
18943   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18944   { (eval echo "$as_me:18944: \"$ac_try\"") >&5
18945   (eval $ac_try) 2>&5
18946   ac_status=$?
18947   echo "$as_me:18947: \$? = $ac_status" >&5
18948   (exit $ac_status); }; }; then
18949   cf_cv_working_poll=yes
18950 else
18951   echo "$as_me: program exited with status $ac_status" >&5
18952 echo "$as_me: failed program was:" >&5
18953 cat conftest.$ac_ext >&5
18954 cf_cv_working_poll=no
18955 fi
18956 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18957 fi
18958 fi
18959 echo "$as_me:18959: result: $cf_cv_working_poll" >&5
18960 echo "${ECHO_T}$cf_cv_working_poll" >&6
18961 test "$cf_cv_working_poll" = "yes" &&
18962 cat >>confdefs.h <<\EOF
18963 #define HAVE_WORKING_POLL 1
18964 EOF
18965
18966 echo "$as_me:18966: checking for va_copy" >&5
18967 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18968 if test "${cf_cv_have_va_copy+set}" = set; then
18969   echo $ECHO_N "(cached) $ECHO_C" >&6
18970 else
18971
18972 cat >conftest.$ac_ext <<_ACEOF
18973 #line 18973 "configure"
18974 #include "confdefs.h"
18975
18976 #include <stdarg.h>
18977
18978 int
18979 main ()
18980 {
18981
18982         static va_list dst;
18983         static va_list src;
18984         va_copy(dst, src)
18985   ;
18986   return 0;
18987 }
18988 _ACEOF
18989 rm -f conftest.$ac_objext conftest$ac_exeext
18990 if { (eval echo "$as_me:18990: \"$ac_link\"") >&5
18991   (eval $ac_link) 2>&5
18992   ac_status=$?
18993   echo "$as_me:18993: \$? = $ac_status" >&5
18994   (exit $ac_status); } &&
18995          { ac_try='test -s conftest$ac_exeext'
18996   { (eval echo "$as_me:18996: \"$ac_try\"") >&5
18997   (eval $ac_try) 2>&5
18998   ac_status=$?
18999   echo "$as_me:18999: \$? = $ac_status" >&5
19000   (exit $ac_status); }; }; then
19001   cf_cv_have_va_copy=yes
19002 else
19003   echo "$as_me: failed program was:" >&5
19004 cat conftest.$ac_ext >&5
19005 cf_cv_have_va_copy=no
19006 fi
19007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19008 fi
19009 echo "$as_me:19009: result: $cf_cv_have_va_copy" >&5
19010 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19011
19012 test "$cf_cv_have_va_copy" = yes &&
19013 cat >>confdefs.h <<\EOF
19014 #define HAVE_VA_COPY 1
19015 EOF
19016
19017 echo "$as_me:19017: checking for __va_copy" >&5
19018 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19019 if test "${cf_cv_have___va_copy+set}" = set; then
19020   echo $ECHO_N "(cached) $ECHO_C" >&6
19021 else
19022
19023 cat >conftest.$ac_ext <<_ACEOF
19024 #line 19024 "configure"
19025 #include "confdefs.h"
19026
19027 #include <stdarg.h>
19028
19029 int
19030 main ()
19031 {
19032
19033         static va_list dst;
19034         static va_list src;
19035         __va_copy(dst, src)
19036   ;
19037   return 0;
19038 }
19039 _ACEOF
19040 rm -f conftest.$ac_objext conftest$ac_exeext
19041 if { (eval echo "$as_me:19041: \"$ac_link\"") >&5
19042   (eval $ac_link) 2>&5
19043   ac_status=$?
19044   echo "$as_me:19044: \$? = $ac_status" >&5
19045   (exit $ac_status); } &&
19046          { ac_try='test -s conftest$ac_exeext'
19047   { (eval echo "$as_me:19047: \"$ac_try\"") >&5
19048   (eval $ac_try) 2>&5
19049   ac_status=$?
19050   echo "$as_me:19050: \$? = $ac_status" >&5
19051   (exit $ac_status); }; }; then
19052   cf_cv_have___va_copy=yes
19053 else
19054   echo "$as_me: failed program was:" >&5
19055 cat conftest.$ac_ext >&5
19056 cf_cv_have___va_copy=no
19057 fi
19058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19059 fi
19060 echo "$as_me:19060: result: $cf_cv_have___va_copy" >&5
19061 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19062
19063 test "$cf_cv_have___va_copy" = yes &&
19064 cat >>confdefs.h <<\EOF
19065 #define HAVE___VA_COPY 1
19066 EOF
19067
19068 echo "$as_me:19068: checking for pid_t" >&5
19069 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19070 if test "${ac_cv_type_pid_t+set}" = set; then
19071   echo $ECHO_N "(cached) $ECHO_C" >&6
19072 else
19073   cat >conftest.$ac_ext <<_ACEOF
19074 #line 19074 "configure"
19075 #include "confdefs.h"
19076 $ac_includes_default
19077 int
19078 main ()
19079 {
19080 if ((pid_t *) 0)
19081   return 0;
19082 if (sizeof (pid_t))
19083   return 0;
19084   ;
19085   return 0;
19086 }
19087 _ACEOF
19088 rm -f conftest.$ac_objext
19089 if { (eval echo "$as_me:19089: \"$ac_compile\"") >&5
19090   (eval $ac_compile) 2>&5
19091   ac_status=$?
19092   echo "$as_me:19092: \$? = $ac_status" >&5
19093   (exit $ac_status); } &&
19094          { ac_try='test -s conftest.$ac_objext'
19095   { (eval echo "$as_me:19095: \"$ac_try\"") >&5
19096   (eval $ac_try) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit $ac_status); }; }; then
19100   ac_cv_type_pid_t=yes
19101 else
19102   echo "$as_me: failed program was:" >&5
19103 cat conftest.$ac_ext >&5
19104 ac_cv_type_pid_t=no
19105 fi
19106 rm -f conftest.$ac_objext conftest.$ac_ext
19107 fi
19108 echo "$as_me:19108: result: $ac_cv_type_pid_t" >&5
19109 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19110 if test $ac_cv_type_pid_t = yes; then
19111   :
19112 else
19113
19114 cat >>confdefs.h <<EOF
19115 #define pid_t int
19116 EOF
19117
19118 fi
19119
19120 for ac_header in unistd.h vfork.h
19121 do
19122 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19123 echo "$as_me:19123: checking for $ac_header" >&5
19124 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19125 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19126   echo $ECHO_N "(cached) $ECHO_C" >&6
19127 else
19128   cat >conftest.$ac_ext <<_ACEOF
19129 #line 19129 "configure"
19130 #include "confdefs.h"
19131 #include <$ac_header>
19132 _ACEOF
19133 if { (eval echo "$as_me:19133: \"$ac_cpp conftest.$ac_ext\"") >&5
19134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19135   ac_status=$?
19136   egrep -v '^ *\+' conftest.er1 >conftest.err
19137   rm -f conftest.er1
19138   cat conftest.err >&5
19139   echo "$as_me:19139: \$? = $ac_status" >&5
19140   (exit $ac_status); } >/dev/null; then
19141   if test -s conftest.err; then
19142     ac_cpp_err=$ac_c_preproc_warn_flag
19143   else
19144     ac_cpp_err=
19145   fi
19146 else
19147   ac_cpp_err=yes
19148 fi
19149 if test -z "$ac_cpp_err"; then
19150   eval "$as_ac_Header=yes"
19151 else
19152   echo "$as_me: failed program was:" >&5
19153   cat conftest.$ac_ext >&5
19154   eval "$as_ac_Header=no"
19155 fi
19156 rm -f conftest.err conftest.$ac_ext
19157 fi
19158 echo "$as_me:19158: result: `eval echo '${'$as_ac_Header'}'`" >&5
19159 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19160 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19161   cat >>confdefs.h <<EOF
19162 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19163 EOF
19164
19165 fi
19166 done
19167
19168 for ac_func in fork vfork
19169 do
19170 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19171 echo "$as_me:19171: checking for $ac_func" >&5
19172 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19173 if eval "test \"\${$as_ac_var+set}\" = set"; then
19174   echo $ECHO_N "(cached) $ECHO_C" >&6
19175 else
19176   cat >conftest.$ac_ext <<_ACEOF
19177 #line 19177 "configure"
19178 #include "confdefs.h"
19179 /* System header to define __stub macros and hopefully few prototypes,
19180     which can conflict with char $ac_func (); below.  */
19181 #include <assert.h>
19182 /* Override any gcc2 internal prototype to avoid an error.  */
19183 #ifdef __cplusplus
19184 extern "C"
19185 #endif
19186 /* We use char because int might match the return type of a gcc2
19187    builtin and then its argument prototype would still apply.  */
19188 char $ac_func ();
19189 char (*f) ();
19190
19191 int
19192 main ()
19193 {
19194 /* The GNU C library defines this for functions which it implements
19195     to always fail with ENOSYS.  Some functions are actually named
19196     something starting with __ and the normal name is an alias.  */
19197 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19198 choke me
19199 #else
19200 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19201 #endif
19202
19203   ;
19204   return 0;
19205 }
19206 _ACEOF
19207 rm -f conftest.$ac_objext conftest$ac_exeext
19208 if { (eval echo "$as_me:19208: \"$ac_link\"") >&5
19209   (eval $ac_link) 2>&5
19210   ac_status=$?
19211   echo "$as_me:19211: \$? = $ac_status" >&5
19212   (exit $ac_status); } &&
19213          { ac_try='test -s conftest$ac_exeext'
19214   { (eval echo "$as_me:19214: \"$ac_try\"") >&5
19215   (eval $ac_try) 2>&5
19216   ac_status=$?
19217   echo "$as_me:19217: \$? = $ac_status" >&5
19218   (exit $ac_status); }; }; then
19219   eval "$as_ac_var=yes"
19220 else
19221   echo "$as_me: failed program was:" >&5
19222 cat conftest.$ac_ext >&5
19223 eval "$as_ac_var=no"
19224 fi
19225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19226 fi
19227 echo "$as_me:19227: result: `eval echo '${'$as_ac_var'}'`" >&5
19228 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19229 if test `eval echo '${'$as_ac_var'}'` = yes; then
19230   cat >>confdefs.h <<EOF
19231 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19232 EOF
19233
19234 fi
19235 done
19236
19237 ac_cv_func_fork_works=$ac_cv_func_fork
19238 if test "x$ac_cv_func_fork" = xyes; then
19239   echo "$as_me:19239: checking for working fork" >&5
19240 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19241 if test "${ac_cv_func_fork_works+set}" = set; then
19242   echo $ECHO_N "(cached) $ECHO_C" >&6
19243 else
19244   if test "$cross_compiling" = yes; then
19245   ac_cv_func_fork_works=cross
19246 else
19247   cat >conftest.$ac_ext <<_ACEOF
19248 /* By Rüdiger Kuhlmann. */
19249       #include <sys/types.h>
19250       #if HAVE_UNISTD_H
19251       # include <unistd.h>
19252       #endif
19253       /* Some systems only have a dummy stub for fork() */
19254       int main ()
19255       {
19256         if (fork() < 0)
19257           $ac_main_return (1);
19258         $ac_main_return (0);
19259       }
19260 _ACEOF
19261 rm -f conftest$ac_exeext
19262 if { (eval echo "$as_me:19262: \"$ac_link\"") >&5
19263   (eval $ac_link) 2>&5
19264   ac_status=$?
19265   echo "$as_me:19265: \$? = $ac_status" >&5
19266   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19267   { (eval echo "$as_me:19267: \"$ac_try\"") >&5
19268   (eval $ac_try) 2>&5
19269   ac_status=$?
19270   echo "$as_me:19270: \$? = $ac_status" >&5
19271   (exit $ac_status); }; }; then
19272   ac_cv_func_fork_works=yes
19273 else
19274   echo "$as_me: program exited with status $ac_status" >&5
19275 echo "$as_me: failed program was:" >&5
19276 cat conftest.$ac_ext >&5
19277 ac_cv_func_fork_works=no
19278 fi
19279 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19280 fi
19281 fi
19282 echo "$as_me:19282: result: $ac_cv_func_fork_works" >&5
19283 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19284
19285 fi
19286 if test "x$ac_cv_func_fork_works" = xcross; then
19287   case $host in
19288     *-*-amigaos* | *-*-msdosdjgpp*)
19289       # Override, as these systems have only a dummy fork() stub
19290       ac_cv_func_fork_works=no
19291       ;;
19292     *)
19293       ac_cv_func_fork_works=yes
19294       ;;
19295   esac
19296   { echo "$as_me:19296: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19297 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19298 fi
19299 ac_cv_func_vfork_works=$ac_cv_func_vfork
19300 if test "x$ac_cv_func_vfork" = xyes; then
19301   echo "$as_me:19301: checking for working vfork" >&5
19302 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19303 if test "${ac_cv_func_vfork_works+set}" = set; then
19304   echo $ECHO_N "(cached) $ECHO_C" >&6
19305 else
19306   if test "$cross_compiling" = yes; then
19307   ac_cv_func_vfork_works=cross
19308 else
19309   cat >conftest.$ac_ext <<_ACEOF
19310 #line 19310 "configure"
19311 #include "confdefs.h"
19312 /* Thanks to Paul Eggert for this test.  */
19313 #include <stdio.h>
19314 #include <sys/types.h>
19315 #include <sys/stat.h>
19316 #if HAVE_UNISTD_H
19317 # include <unistd.h>
19318 #endif
19319 #if HAVE_VFORK_H
19320 # include <vfork.h>
19321 #endif
19322 /* On some sparc systems, changes by the child to local and incoming
19323    argument registers are propagated back to the parent.  The compiler
19324    is told about this with #include <vfork.h>, but some compilers
19325    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19326    static variable whose address is put into a register that is
19327    clobbered by the vfork.  */
19328 static
19329 #ifdef __cplusplus
19330 sparc_address_test (int arg)
19331 # else
19332 sparc_address_test (arg) int arg;
19333 #endif
19334 {
19335   static pid_t child;
19336   if (!child) {
19337     child = vfork ();
19338     if (child < 0) {
19339       perror ("vfork");
19340       _exit(2);
19341     }
19342     if (!child) {
19343       arg = getpid();
19344       write(-1, "", 0);
19345       _exit (arg);
19346     }
19347   }
19348 }
19349
19350 int
19351 main ()
19352 {
19353   pid_t parent = getpid ();
19354   pid_t child;
19355
19356   sparc_address_test ();
19357
19358   child = vfork ();
19359
19360   if (child == 0) {
19361     /* Here is another test for sparc vfork register problems.  This
19362        test uses lots of local variables, at least as many local
19363        variables as main has allocated so far including compiler
19364        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19365        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19366        reuse the register of parent for one of the local variables,
19367        since it will think that parent can't possibly be used any more
19368        in this routine.  Assigning to the local variable will thus
19369        munge parent in the parent process.  */
19370     pid_t
19371       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19372       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19373     /* Convince the compiler that p..p7 are live; otherwise, it might
19374        use the same hardware register for all 8 local variables.  */
19375     if (p != p1 || p != p2 || p != p3 || p != p4
19376         || p != p5 || p != p6 || p != p7)
19377       _exit(1);
19378
19379     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19380        from child file descriptors.  If the child closes a descriptor
19381        before it execs or exits, this munges the parent's descriptor
19382        as well.  Test for this by closing stdout in the child.  */
19383     _exit(close(fileno(stdout)) != 0);
19384   } else {
19385     int status;
19386     struct stat st;
19387
19388     while (wait(&status) != child)
19389       ;
19390     $ac_main_return(
19391          /* Was there some problem with vforking?  */
19392          child < 0
19393
19394          /* Did the child fail?  (This shouldn't happen.)  */
19395          || status
19396
19397          /* Did the vfork/compiler bug occur?  */
19398          || parent != getpid()
19399
19400          /* Did the file descriptor bug occur?  */
19401          || fstat(fileno(stdout), &st) != 0
19402          );
19403   }
19404 }
19405 _ACEOF
19406 rm -f conftest$ac_exeext
19407 if { (eval echo "$as_me:19407: \"$ac_link\"") >&5
19408   (eval $ac_link) 2>&5
19409   ac_status=$?
19410   echo "$as_me:19410: \$? = $ac_status" >&5
19411   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19412   { (eval echo "$as_me:19412: \"$ac_try\"") >&5
19413   (eval $ac_try) 2>&5
19414   ac_status=$?
19415   echo "$as_me:19415: \$? = $ac_status" >&5
19416   (exit $ac_status); }; }; then
19417   ac_cv_func_vfork_works=yes
19418 else
19419   echo "$as_me: program exited with status $ac_status" >&5
19420 echo "$as_me: failed program was:" >&5
19421 cat conftest.$ac_ext >&5
19422 ac_cv_func_vfork_works=no
19423 fi
19424 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19425 fi
19426 fi
19427 echo "$as_me:19427: result: $ac_cv_func_vfork_works" >&5
19428 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19429
19430 fi;
19431 if test "x$ac_cv_func_fork_works" = xcross; then
19432   ac_cv_func_vfork_works=ac_cv_func_vfork
19433   { echo "$as_me:19433: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19434 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19435 fi
19436
19437 if test "x$ac_cv_func_vfork_works" = xyes; then
19438
19439 cat >>confdefs.h <<\EOF
19440 #define HAVE_WORKING_VFORK 1
19441 EOF
19442
19443 else
19444
19445 cat >>confdefs.h <<\EOF
19446 #define vfork fork
19447 EOF
19448
19449 fi
19450 if test "x$ac_cv_func_fork_works" = xyes; then
19451
19452 cat >>confdefs.h <<\EOF
19453 #define HAVE_WORKING_FORK 1
19454 EOF
19455
19456 fi
19457
19458 # special check for test/ditto.c
19459
19460 echo "$as_me:19460: checking for openpty in -lutil" >&5
19461 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19462 if test "${ac_cv_lib_util_openpty+set}" = set; then
19463   echo $ECHO_N "(cached) $ECHO_C" >&6
19464 else
19465   ac_check_lib_save_LIBS=$LIBS
19466 LIBS="-lutil  $LIBS"
19467 cat >conftest.$ac_ext <<_ACEOF
19468 #line 19468 "configure"
19469 #include "confdefs.h"
19470
19471 /* Override any gcc2 internal prototype to avoid an error.  */
19472 #ifdef __cplusplus
19473 extern "C"
19474 #endif
19475 /* We use char because int might match the return type of a gcc2
19476    builtin and then its argument prototype would still apply.  */
19477 char openpty ();
19478 int
19479 main ()
19480 {
19481 openpty ();
19482   ;
19483   return 0;
19484 }
19485 _ACEOF
19486 rm -f conftest.$ac_objext conftest$ac_exeext
19487 if { (eval echo "$as_me:19487: \"$ac_link\"") >&5
19488   (eval $ac_link) 2>&5
19489   ac_status=$?
19490   echo "$as_me:19490: \$? = $ac_status" >&5
19491   (exit $ac_status); } &&
19492          { ac_try='test -s conftest$ac_exeext'
19493   { (eval echo "$as_me:19493: \"$ac_try\"") >&5
19494   (eval $ac_try) 2>&5
19495   ac_status=$?
19496   echo "$as_me:19496: \$? = $ac_status" >&5
19497   (exit $ac_status); }; }; then
19498   ac_cv_lib_util_openpty=yes
19499 else
19500   echo "$as_me: failed program was:" >&5
19501 cat conftest.$ac_ext >&5
19502 ac_cv_lib_util_openpty=no
19503 fi
19504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19505 LIBS=$ac_check_lib_save_LIBS
19506 fi
19507 echo "$as_me:19507: result: $ac_cv_lib_util_openpty" >&5
19508 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19509 if test $ac_cv_lib_util_openpty = yes; then
19510   cf_cv_lib_util=yes
19511 else
19512   cf_cv_lib_util=no
19513 fi
19514
19515 echo "$as_me:19515: checking for openpty header" >&5
19516 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19517 if test "${cf_cv_func_openpty+set}" = set; then
19518   echo $ECHO_N "(cached) $ECHO_C" >&6
19519 else
19520
19521         cf_save_LIBS="$LIBS"
19522         test $cf_cv_lib_util = yes && {
19523 cf_add_libs="-lutil"
19524 # Filter out duplicates - this happens with badly-designed ".pc" files...
19525 for cf_add_1lib in $LIBS
19526 do
19527         for cf_add_2lib in $cf_add_libs
19528         do
19529                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19530                 then
19531                         cf_add_1lib=
19532                         break
19533                 fi
19534         done
19535         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19536 done
19537 LIBS="$cf_add_libs"
19538  }
19539         for cf_header in pty.h libutil.h util.h
19540         do
19541         cat >conftest.$ac_ext <<_ACEOF
19542 #line 19542 "configure"
19543 #include "confdefs.h"
19544
19545 #include <$cf_header>
19546
19547 int
19548 main ()
19549 {
19550
19551         int x = openpty((int *)0, (int *)0, (char *)0,
19552                                    (struct termios *)0, (struct winsize *)0);
19553
19554   ;
19555   return 0;
19556 }
19557 _ACEOF
19558 rm -f conftest.$ac_objext conftest$ac_exeext
19559 if { (eval echo "$as_me:19559: \"$ac_link\"") >&5
19560   (eval $ac_link) 2>&5
19561   ac_status=$?
19562   echo "$as_me:19562: \$? = $ac_status" >&5
19563   (exit $ac_status); } &&
19564          { ac_try='test -s conftest$ac_exeext'
19565   { (eval echo "$as_me:19565: \"$ac_try\"") >&5
19566   (eval $ac_try) 2>&5
19567   ac_status=$?
19568   echo "$as_me:19568: \$? = $ac_status" >&5
19569   (exit $ac_status); }; }; then
19570
19571                 cf_cv_func_openpty=$cf_header
19572                 break
19573
19574 else
19575   echo "$as_me: failed program was:" >&5
19576 cat conftest.$ac_ext >&5
19577
19578                 cf_cv_func_openpty=no
19579
19580 fi
19581 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19582         done
19583         LIBS="$cf_save_LIBS"
19584
19585 fi
19586 echo "$as_me:19586: result: $cf_cv_func_openpty" >&5
19587 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19588
19589 if test "$cf_cv_func_openpty" != no ; then
19590
19591 cat >>confdefs.h <<EOF
19592 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19593 EOF
19594
19595 cat >>confdefs.h <<\EOF
19596 #define USE_XTERM_PTY 1
19597 EOF
19598
19599         if test "x$cf_cv_lib_util" = xyes ; then
19600
19601 cf_add_libs="-lutil"
19602 # Filter out duplicates - this happens with badly-designed ".pc" files...
19603 for cf_add_1lib in $TEST_LIBS
19604 do
19605         for cf_add_2lib in $cf_add_libs
19606         do
19607                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19608                 then
19609                         cf_add_1lib=
19610                         break
19611                 fi
19612         done
19613         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19614 done
19615 TEST_LIBS="$cf_add_libs"
19616
19617         fi
19618 fi
19619
19620 if test "$with_hashed_db" != no ; then
19621
19622 cat >>confdefs.h <<\EOF
19623 #define USE_HASHED_DB 1
19624 EOF
19625
19626 case $with_hashed_db in
19627 (yes|*able*)
19628         ;;
19629 (*)
19630         if test -d "$with_hashed_db" ; then
19631
19632 if test -n "$with_hashed_db/include" ; then
19633   for cf_add_incdir in $with_hashed_db/include
19634   do
19635         while test $cf_add_incdir != /usr/include
19636         do
19637           if test -d $cf_add_incdir
19638           then
19639                 cf_have_incdir=no
19640                 if test -n "$CFLAGS$CPPFLAGS" ; then
19641                   # a loop is needed to ensure we can add subdirs of existing dirs
19642                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19643                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19644                           cf_have_incdir=yes; break
19645                         fi
19646                   done
19647                 fi
19648
19649                 if test "$cf_have_incdir" = no ; then
19650                   if test "$cf_add_incdir" = /usr/local/include ; then
19651                         if test "$GCC" = yes
19652                         then
19653                           cf_save_CPPFLAGS=$CPPFLAGS
19654                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19655                           cat >conftest.$ac_ext <<_ACEOF
19656 #line 19656 "configure"
19657 #include "confdefs.h"
19658 #include <stdio.h>
19659 int
19660 main ()
19661 {
19662 printf("Hello")
19663   ;
19664   return 0;
19665 }
19666 _ACEOF
19667 rm -f conftest.$ac_objext
19668 if { (eval echo "$as_me:19668: \"$ac_compile\"") >&5
19669   (eval $ac_compile) 2>&5
19670   ac_status=$?
19671   echo "$as_me:19671: \$? = $ac_status" >&5
19672   (exit $ac_status); } &&
19673          { ac_try='test -s conftest.$ac_objext'
19674   { (eval echo "$as_me:19674: \"$ac_try\"") >&5
19675   (eval $ac_try) 2>&5
19676   ac_status=$?
19677   echo "$as_me:19677: \$? = $ac_status" >&5
19678   (exit $ac_status); }; }; then
19679   :
19680 else
19681   echo "$as_me: failed program was:" >&5
19682 cat conftest.$ac_ext >&5
19683 cf_have_incdir=yes
19684 fi
19685 rm -f conftest.$ac_objext conftest.$ac_ext
19686                           CPPFLAGS=$cf_save_CPPFLAGS
19687                         fi
19688                   fi
19689                 fi
19690
19691                 if test "$cf_have_incdir" = no ; then
19692                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19693
19694 echo "${as_me:-configure}:19694: testing adding $cf_add_incdir to include-path ..." 1>&5
19695
19696                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19697
19698                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19699                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19700                   cf_add_incdir="$cf_top_incdir"
19701                 else
19702                   break
19703                 fi
19704           else
19705                 break
19706           fi
19707         done
19708   done
19709 fi
19710
19711 if test -n "$with_hashed_db/lib" ; then
19712         for cf_add_libdir in $with_hashed_db/lib
19713         do
19714                 if test $cf_add_libdir = /usr/lib ; then
19715                         :
19716                 elif test -d $cf_add_libdir
19717                 then
19718                         cf_have_libdir=no
19719                         if test -n "$LDFLAGS$LIBS" ; then
19720                                 # a loop is needed to ensure we can add subdirs of existing dirs
19721                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19722                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19723                                                 cf_have_libdir=yes; break
19724                                         fi
19725                                 done
19726                         fi
19727                         if test "$cf_have_libdir" = no ; then
19728                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19729
19730 echo "${as_me:-configure}:19730: testing adding $cf_add_libdir to library-path ..." 1>&5
19731
19732                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19733                         fi
19734                 fi
19735         done
19736 fi
19737
19738         else
19739                 case "$with_hashed_db" in
19740                 (./*|../*|/*)
19741                         { echo "$as_me:19741: WARNING: no such directory $with_hashed_db" >&5
19742 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19743                         ;;
19744                 (*)
19745
19746 cf_search=
19747
19748 test "x$prefix" != "xNONE" && \
19749 test -d "$prefix" && \
19750  {
19751         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19752         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19753         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19754         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19755         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19756         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19757 }
19758
19759 for cf_subdir_prefix in \
19760         /usr \
19761         /usr/local \
19762         /usr/pkg \
19763         /opt \
19764         /opt/local \
19765         $HOME
19766 do
19767
19768 test "x$cf_subdir_prefix" != "x$prefix" && \
19769 test -d "$cf_subdir_prefix" && \
19770 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19771         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19772         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19773         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19774         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19775         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19776         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"
19777 }
19778
19779 done
19780
19781         for cf_item in $cf_search
19782         do
19783                 case $cf_item in
19784                 (*/$with_hashed_db)
19785
19786 if test -n "$cf_item" ; then
19787   for cf_add_incdir in $cf_item
19788   do
19789         while test $cf_add_incdir != /usr/include
19790         do
19791           if test -d $cf_add_incdir
19792           then
19793                 cf_have_incdir=no
19794                 if test -n "$CFLAGS$CPPFLAGS" ; then
19795                   # a loop is needed to ensure we can add subdirs of existing dirs
19796                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19797                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19798                           cf_have_incdir=yes; break
19799                         fi
19800                   done
19801                 fi
19802
19803                 if test "$cf_have_incdir" = no ; then
19804                   if test "$cf_add_incdir" = /usr/local/include ; then
19805                         if test "$GCC" = yes
19806                         then
19807                           cf_save_CPPFLAGS=$CPPFLAGS
19808                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19809                           cat >conftest.$ac_ext <<_ACEOF
19810 #line 19810 "configure"
19811 #include "confdefs.h"
19812 #include <stdio.h>
19813 int
19814 main ()
19815 {
19816 printf("Hello")
19817   ;
19818   return 0;
19819 }
19820 _ACEOF
19821 rm -f conftest.$ac_objext
19822 if { (eval echo "$as_me:19822: \"$ac_compile\"") >&5
19823   (eval $ac_compile) 2>&5
19824   ac_status=$?
19825   echo "$as_me:19825: \$? = $ac_status" >&5
19826   (exit $ac_status); } &&
19827          { ac_try='test -s conftest.$ac_objext'
19828   { (eval echo "$as_me:19828: \"$ac_try\"") >&5
19829   (eval $ac_try) 2>&5
19830   ac_status=$?
19831   echo "$as_me:19831: \$? = $ac_status" >&5
19832   (exit $ac_status); }; }; then
19833   :
19834 else
19835   echo "$as_me: failed program was:" >&5
19836 cat conftest.$ac_ext >&5
19837 cf_have_incdir=yes
19838 fi
19839 rm -f conftest.$ac_objext conftest.$ac_ext
19840                           CPPFLAGS=$cf_save_CPPFLAGS
19841                         fi
19842                   fi
19843                 fi
19844
19845                 if test "$cf_have_incdir" = no ; then
19846                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19847
19848 echo "${as_me:-configure}:19848: testing adding $cf_add_incdir to include-path ..." 1>&5
19849
19850                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19851
19852                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19853                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19854                   cf_add_incdir="$cf_top_incdir"
19855                 else
19856                   break
19857                 fi
19858           else
19859                 break
19860           fi
19861         done
19862   done
19863 fi
19864
19865                         ;;
19866                 esac
19867         done
19868
19869 cf_search=
19870
19871 test "x$prefix" != "xNONE" && \
19872 test -d "$prefix" && \
19873  {
19874         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19875         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19876         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19877         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19878         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19879         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19880 }
19881
19882 for cf_subdir_prefix in \
19883         /usr \
19884         /usr/local \
19885         /usr/pkg \
19886         /opt \
19887         /opt/local \
19888         $HOME
19889 do
19890
19891 test "x$cf_subdir_prefix" != "x$prefix" && \
19892 test -d "$cf_subdir_prefix" && \
19893 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19894         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19895         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19896         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19897         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19898         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19899         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"
19900 }
19901
19902 done
19903
19904         for cf_item in $cf_search
19905         do
19906                 case $cf_item in
19907                 (*/$with_hashed_db)
19908
19909 if test -n "$cf_item" ; then
19910         for cf_add_libdir in $cf_item
19911         do
19912                 if test $cf_add_libdir = /usr/lib ; then
19913                         :
19914                 elif test -d $cf_add_libdir
19915                 then
19916                         cf_have_libdir=no
19917                         if test -n "$LDFLAGS$LIBS" ; then
19918                                 # a loop is needed to ensure we can add subdirs of existing dirs
19919                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19920                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19921                                                 cf_have_libdir=yes; break
19922                                         fi
19923                                 done
19924                         fi
19925                         if test "$cf_have_libdir" = no ; then
19926                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19927
19928 echo "${as_me:-configure}:19928: testing adding $cf_add_libdir to library-path ..." 1>&5
19929
19930                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19931                         fi
19932                 fi
19933         done
19934 fi
19935
19936                         ;;
19937                 esac
19938         done
19939
19940                         ;;
19941                 esac
19942         fi
19943 esac
19944
19945 echo "$as_me:19945: checking for db.h" >&5
19946 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19947 if test "${ac_cv_header_db_h+set}" = set; then
19948   echo $ECHO_N "(cached) $ECHO_C" >&6
19949 else
19950   cat >conftest.$ac_ext <<_ACEOF
19951 #line 19951 "configure"
19952 #include "confdefs.h"
19953 #include <db.h>
19954 _ACEOF
19955 if { (eval echo "$as_me:19955: \"$ac_cpp conftest.$ac_ext\"") >&5
19956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19957   ac_status=$?
19958   egrep -v '^ *\+' conftest.er1 >conftest.err
19959   rm -f conftest.er1
19960   cat conftest.err >&5
19961   echo "$as_me:19961: \$? = $ac_status" >&5
19962   (exit $ac_status); } >/dev/null; then
19963   if test -s conftest.err; then
19964     ac_cpp_err=$ac_c_preproc_warn_flag
19965   else
19966     ac_cpp_err=
19967   fi
19968 else
19969   ac_cpp_err=yes
19970 fi
19971 if test -z "$ac_cpp_err"; then
19972   ac_cv_header_db_h=yes
19973 else
19974   echo "$as_me: failed program was:" >&5
19975   cat conftest.$ac_ext >&5
19976   ac_cv_header_db_h=no
19977 fi
19978 rm -f conftest.err conftest.$ac_ext
19979 fi
19980 echo "$as_me:19980: result: $ac_cv_header_db_h" >&5
19981 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19982 if test $ac_cv_header_db_h = yes; then
19983
19984 echo "$as_me:19984: checking for version of db" >&5
19985 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19986 if test "${cf_cv_hashed_db_version+set}" = set; then
19987   echo $ECHO_N "(cached) $ECHO_C" >&6
19988 else
19989
19990 cf_cv_hashed_db_version=unknown
19991
19992 for cf_db_version in 1 2 3 4 5 6
19993 do
19994
19995 echo "${as_me:-configure}:19995: testing checking for db version $cf_db_version ..." 1>&5
19996
19997         cat >conftest.$ac_ext <<_ACEOF
19998 #line 19998 "configure"
19999 #include "confdefs.h"
20000
20001 $ac_includes_default
20002 #include <db.h>
20003
20004 #ifdef DB_VERSION_MAJOR
20005         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20006 #if $cf_db_version == DB_VERSION_MAJOR
20007         /* ok */
20008 #else
20009         make an error
20010 #endif
20011 #else
20012 #if $cf_db_version == 1
20013         /* ok: assuming this is DB 1.8.5 */
20014 #else
20015         make an error
20016 #endif
20017 #endif
20018
20019 int
20020 main ()
20021 {
20022 DBT *foo = 0
20023   ;
20024   return 0;
20025 }
20026 _ACEOF
20027 rm -f conftest.$ac_objext
20028 if { (eval echo "$as_me:20028: \"$ac_compile\"") >&5
20029   (eval $ac_compile) 2>&5
20030   ac_status=$?
20031   echo "$as_me:20031: \$? = $ac_status" >&5
20032   (exit $ac_status); } &&
20033          { ac_try='test -s conftest.$ac_objext'
20034   { (eval echo "$as_me:20034: \"$ac_try\"") >&5
20035   (eval $ac_try) 2>&5
20036   ac_status=$?
20037   echo "$as_me:20037: \$? = $ac_status" >&5
20038   (exit $ac_status); }; }; then
20039
20040         cf_cv_hashed_db_version=$cf_db_version
20041         break
20042
20043 else
20044   echo "$as_me: failed program was:" >&5
20045 cat conftest.$ac_ext >&5
20046 fi
20047 rm -f conftest.$ac_objext conftest.$ac_ext
20048 done
20049
20050 fi
20051 echo "$as_me:20051: result: $cf_cv_hashed_db_version" >&5
20052 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20053
20054 if test "$cf_cv_hashed_db_version" = unknown ; then
20055         { { echo "$as_me:20055: error: Cannot determine version of db" >&5
20056 echo "$as_me: error: Cannot determine version of db" >&2;}
20057    { (exit 1); exit 1; }; }
20058 else
20059
20060 echo "$as_me:20060: checking for db libraries" >&5
20061 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20062 if test "${cf_cv_hashed_db_libs+set}" = set; then
20063   echo $ECHO_N "(cached) $ECHO_C" >&6
20064 else
20065
20066 cf_cv_hashed_db_libs=unknown
20067 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20068 do
20069         cf_save_libs="$LIBS"
20070         if test -n "$cf_db_libs"; then
20071
20072 cf_add_libs="-l$cf_db_libs"
20073 # Filter out duplicates - this happens with badly-designed ".pc" files...
20074 for cf_add_1lib in $LIBS
20075 do
20076         for cf_add_2lib in $cf_add_libs
20077         do
20078                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20079                 then
20080                         cf_add_1lib=
20081                         break
20082                 fi
20083         done
20084         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20085 done
20086 LIBS="$cf_add_libs"
20087
20088         fi
20089
20090 echo "${as_me:-configure}:20090: testing checking for library "$cf_db_libs" ..." 1>&5
20091
20092         cat >conftest.$ac_ext <<_ACEOF
20093 #line 20093 "configure"
20094 #include "confdefs.h"
20095
20096 $ac_includes_default
20097 #include <db.h>
20098
20099 int
20100 main ()
20101 {
20102
20103         char *path = "/tmp/foo";
20104 #ifdef DB_VERSION_MAJOR
20105 #if DB_VERSION_MAJOR >= 4
20106         DB *result = 0;
20107         db_create(&result, NULL, 0);
20108         result->open(result,
20109                 NULL,
20110                 path,
20111                 path,
20112                 DB_HASH,
20113                 DB_CREATE,
20114                 0644);
20115 #elif DB_VERSION_MAJOR >= 3
20116         DB *result = 0;
20117         db_create(&result, NULL, 0);
20118         result->open(result,
20119                 path,
20120                 path,
20121                 DB_HASH,
20122                 DB_CREATE,
20123                 0644);
20124 #elif DB_VERSION_MAJOR >= 2
20125         DB *result = 0;
20126         db_open(path,
20127                 DB_HASH,
20128                 DB_CREATE,
20129                 0644,
20130                 (DB_ENV *) 0,
20131                 (DB_INFO *) 0,
20132                 &result);
20133 #endif /* DB_VERSION_MAJOR */
20134 #else
20135         DB *result = dbopen(path,
20136                      2,
20137                      0644,
20138                      DB_HASH,
20139                      0);
20140 #endif
20141         ${cf_cv_main_return:-return}(result != 0)
20142
20143   ;
20144   return 0;
20145 }
20146 _ACEOF
20147 rm -f conftest.$ac_objext conftest$ac_exeext
20148 if { (eval echo "$as_me:20148: \"$ac_link\"") >&5
20149   (eval $ac_link) 2>&5
20150   ac_status=$?
20151   echo "$as_me:20151: \$? = $ac_status" >&5
20152   (exit $ac_status); } &&
20153          { ac_try='test -s conftest$ac_exeext'
20154   { (eval echo "$as_me:20154: \"$ac_try\"") >&5
20155   (eval $ac_try) 2>&5
20156   ac_status=$?
20157   echo "$as_me:20157: \$? = $ac_status" >&5
20158   (exit $ac_status); }; }; then
20159
20160         if test -n "$cf_db_libs" ; then
20161                 cf_cv_hashed_db_libs=$cf_db_libs
20162         else
20163                 cf_cv_hashed_db_libs=default
20164         fi
20165         LIBS="$cf_save_libs"
20166         break
20167
20168 else
20169   echo "$as_me: failed program was:" >&5
20170 cat conftest.$ac_ext >&5
20171 fi
20172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20173         LIBS="$cf_save_libs"
20174 done
20175
20176 fi
20177 echo "$as_me:20177: result: $cf_cv_hashed_db_libs" >&5
20178 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20179
20180         if test "$cf_cv_hashed_db_libs" = unknown ; then
20181                 { { echo "$as_me:20181: error: Cannot determine library for db" >&5
20182 echo "$as_me: error: Cannot determine library for db" >&2;}
20183    { (exit 1); exit 1; }; }
20184         elif test "$cf_cv_hashed_db_libs" != default ; then
20185
20186 cf_add_libs="-l$cf_cv_hashed_db_libs"
20187 # Filter out duplicates - this happens with badly-designed ".pc" files...
20188 for cf_add_1lib in $LIBS
20189 do
20190         for cf_add_2lib in $cf_add_libs
20191         do
20192                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20193                 then
20194                         cf_add_1lib=
20195                         break
20196                 fi
20197         done
20198         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20199 done
20200 LIBS="$cf_add_libs"
20201
20202         fi
20203 fi
20204
20205 else
20206
20207         { { echo "$as_me:20207: error: Cannot find db.h" >&5
20208 echo "$as_me: error: Cannot find db.h" >&2;}
20209    { (exit 1); exit 1; }; }
20210
20211 fi
20212
20213 fi
20214
20215 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20216         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20217         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20218 fi
20219
20220 # Just in case, check if the C compiler has a bool type.
20221
20222 echo "$as_me:20222: checking if we should include stdbool.h" >&5
20223 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20224
20225 if test "${cf_cv_header_stdbool_h+set}" = set; then
20226   echo $ECHO_N "(cached) $ECHO_C" >&6
20227 else
20228
20229         cat >conftest.$ac_ext <<_ACEOF
20230 #line 20230 "configure"
20231 #include "confdefs.h"
20232
20233 int
20234 main ()
20235 {
20236 bool foo = false
20237   ;
20238   return 0;
20239 }
20240 _ACEOF
20241 rm -f conftest.$ac_objext
20242 if { (eval echo "$as_me:20242: \"$ac_compile\"") >&5
20243   (eval $ac_compile) 2>&5
20244   ac_status=$?
20245   echo "$as_me:20245: \$? = $ac_status" >&5
20246   (exit $ac_status); } &&
20247          { ac_try='test -s conftest.$ac_objext'
20248   { (eval echo "$as_me:20248: \"$ac_try\"") >&5
20249   (eval $ac_try) 2>&5
20250   ac_status=$?
20251   echo "$as_me:20251: \$? = $ac_status" >&5
20252   (exit $ac_status); }; }; then
20253   cf_cv_header_stdbool_h=0
20254 else
20255   echo "$as_me: failed program was:" >&5
20256 cat conftest.$ac_ext >&5
20257 cat >conftest.$ac_ext <<_ACEOF
20258 #line 20258 "configure"
20259 #include "confdefs.h"
20260
20261 #ifndef __BEOS__
20262 #include <stdbool.h>
20263 #endif
20264
20265 int
20266 main ()
20267 {
20268 bool foo = false
20269   ;
20270   return 0;
20271 }
20272 _ACEOF
20273 rm -f conftest.$ac_objext
20274 if { (eval echo "$as_me:20274: \"$ac_compile\"") >&5
20275   (eval $ac_compile) 2>&5
20276   ac_status=$?
20277   echo "$as_me:20277: \$? = $ac_status" >&5
20278   (exit $ac_status); } &&
20279          { ac_try='test -s conftest.$ac_objext'
20280   { (eval echo "$as_me:20280: \"$ac_try\"") >&5
20281   (eval $ac_try) 2>&5
20282   ac_status=$?
20283   echo "$as_me:20283: \$? = $ac_status" >&5
20284   (exit $ac_status); }; }; then
20285   cf_cv_header_stdbool_h=1
20286 else
20287   echo "$as_me: failed program was:" >&5
20288 cat conftest.$ac_ext >&5
20289 cf_cv_header_stdbool_h=0
20290 fi
20291 rm -f conftest.$ac_objext conftest.$ac_ext
20292 fi
20293 rm -f conftest.$ac_objext conftest.$ac_ext
20294 fi
20295
20296 if test "$cf_cv_header_stdbool_h" = 1
20297 then    echo "$as_me:20297: result: yes" >&5
20298 echo "${ECHO_T}yes" >&6
20299 else    echo "$as_me:20299: result: no" >&5
20300 echo "${ECHO_T}no" >&6
20301 fi
20302
20303 echo "$as_me:20303: checking for builtin bool type" >&5
20304 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20305
20306 if test "${cf_cv_cc_bool_type+set}" = set; then
20307   echo $ECHO_N "(cached) $ECHO_C" >&6
20308 else
20309
20310         cat >conftest.$ac_ext <<_ACEOF
20311 #line 20311 "configure"
20312 #include "confdefs.h"
20313
20314 #include <stdio.h>
20315 #include <sys/types.h>
20316
20317 int
20318 main ()
20319 {
20320 bool x = false
20321   ;
20322   return 0;
20323 }
20324 _ACEOF
20325 rm -f conftest.$ac_objext
20326 if { (eval echo "$as_me:20326: \"$ac_compile\"") >&5
20327   (eval $ac_compile) 2>&5
20328   ac_status=$?
20329   echo "$as_me:20329: \$? = $ac_status" >&5
20330   (exit $ac_status); } &&
20331          { ac_try='test -s conftest.$ac_objext'
20332   { (eval echo "$as_me:20332: \"$ac_try\"") >&5
20333   (eval $ac_try) 2>&5
20334   ac_status=$?
20335   echo "$as_me:20335: \$? = $ac_status" >&5
20336   (exit $ac_status); }; }; then
20337   cf_cv_cc_bool_type=1
20338 else
20339   echo "$as_me: failed program was:" >&5
20340 cat conftest.$ac_ext >&5
20341 cf_cv_cc_bool_type=0
20342 fi
20343 rm -f conftest.$ac_objext conftest.$ac_ext
20344
20345 fi
20346
20347 if test "$cf_cv_cc_bool_type" = 1
20348 then    echo "$as_me:20348: result: yes" >&5
20349 echo "${ECHO_T}yes" >&6
20350 else    echo "$as_me:20350: result: no" >&5
20351 echo "${ECHO_T}no" >&6
20352 fi
20353
20354 # Check for C++ compiler characteristics (and ensure that it's there!)
20355 if test -n "$CXX" ; then
20356         ac_ext=cc
20357 ac_cpp='$CXXCPP $CPPFLAGS'
20358 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20359 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20360 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20361 ac_main_return=return
20362
20363 if test -n "$GXX" ; then
20364
20365         cf_save="$LIBS"
20366         LIBS="$LIBS $CXXLIBS"
20367         echo "$as_me:20367: checking if we already have C++ library" >&5
20368 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20369         cat >conftest.$ac_ext <<_ACEOF
20370 #line 20370 "configure"
20371 #include "confdefs.h"
20372
20373                         #include <iostream>
20374 int
20375 main ()
20376 {
20377
20378                         std::cout << "Hello World!" << std::endl;
20379   ;
20380   return 0;
20381 }
20382 _ACEOF
20383 rm -f conftest.$ac_objext conftest$ac_exeext
20384 if { (eval echo "$as_me:20384: \"$ac_link\"") >&5
20385   (eval $ac_link) 2>&5
20386   ac_status=$?
20387   echo "$as_me:20387: \$? = $ac_status" >&5
20388   (exit $ac_status); } &&
20389          { ac_try='test -s conftest$ac_exeext'
20390   { (eval echo "$as_me:20390: \"$ac_try\"") >&5
20391   (eval $ac_try) 2>&5
20392   ac_status=$?
20393   echo "$as_me:20393: \$? = $ac_status" >&5
20394   (exit $ac_status); }; }; then
20395   cf_have_libstdcpp=yes
20396 else
20397   echo "$as_me: failed program was:" >&5
20398 cat conftest.$ac_ext >&5
20399 cf_have_libstdcpp=no
20400 fi
20401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20402         echo "$as_me:20402: result: $cf_have_libstdcpp" >&5
20403 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20404         LIBS="$cf_save"
20405
20406         if test $cf_have_libstdcpp != yes
20407         then
20408                 case $cf_cv_system_name in
20409                 (os2*)
20410                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20411                                 cf_stdcpp_libname=stdcpp
20412                         else
20413                                 cf_stdcpp_libname=stdc++
20414                         fi
20415                         ;;
20416                 (*)
20417                         cf_stdcpp_libname=stdc++
20418                         ;;
20419                 esac
20420
20421                 echo "$as_me:20421: checking for library $cf_stdcpp_libname" >&5
20422 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20423 if test "${cf_cv_libstdcpp+set}" = set; then
20424   echo $ECHO_N "(cached) $ECHO_C" >&6
20425 else
20426
20427                         cf_save="$LIBS"
20428                         LIBS="$LIBS $CXXLIBS"
20429
20430 cf_add_libs="-l$cf_stdcpp_libname"
20431 # Filter out duplicates - this happens with badly-designed ".pc" files...
20432 for cf_add_1lib in $LIBS
20433 do
20434         for cf_add_2lib in $cf_add_libs
20435         do
20436                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20437                 then
20438                         cf_add_1lib=
20439                         break
20440                 fi
20441         done
20442         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20443 done
20444 LIBS="$cf_add_libs"
20445
20446                 cat >conftest.$ac_ext <<_ACEOF
20447 #line 20447 "configure"
20448 #include "confdefs.h"
20449
20450                                 #include <iostream>
20451 int
20452 main ()
20453 {
20454
20455                                 std::cout << "Hello World!" << std::endl;
20456   ;
20457   return 0;
20458 }
20459 _ACEOF
20460 rm -f conftest.$ac_objext conftest$ac_exeext
20461 if { (eval echo "$as_me:20461: \"$ac_link\"") >&5
20462   (eval $ac_link) 2>&5
20463   ac_status=$?
20464   echo "$as_me:20464: \$? = $ac_status" >&5
20465   (exit $ac_status); } &&
20466          { ac_try='test -s conftest$ac_exeext'
20467   { (eval echo "$as_me:20467: \"$ac_try\"") >&5
20468   (eval $ac_try) 2>&5
20469   ac_status=$?
20470   echo "$as_me:20470: \$? = $ac_status" >&5
20471   (exit $ac_status); }; }; then
20472   cf_cv_libstdcpp=yes
20473 else
20474   echo "$as_me: failed program was:" >&5
20475 cat conftest.$ac_ext >&5
20476 cf_cv_libstdcpp=no
20477 fi
20478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20479                         LIBS="$cf_save"
20480
20481 fi
20482 echo "$as_me:20482: result: $cf_cv_libstdcpp" >&5
20483 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20484                 test "$cf_cv_libstdcpp" = yes && {
20485 cf_add_libs="-l$cf_stdcpp_libname"
20486 # Filter out duplicates - this happens with badly-designed ".pc" files...
20487 for cf_add_1lib in $CXXLIBS
20488 do
20489         for cf_add_2lib in $cf_add_libs
20490         do
20491                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20492                 then
20493                         cf_add_1lib=
20494                         break
20495                 fi
20496         done
20497         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20498 done
20499 CXXLIBS="$cf_add_libs"
20500  }
20501         fi
20502 fi
20503
20504         echo "$as_me:20504: checking whether $CXX understands -c and -o together" >&5
20505 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20506 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20507   echo $ECHO_N "(cached) $ECHO_C" >&6
20508 else
20509
20510 cat > conftest.$ac_ext <<CF_EOF
20511 int main(void)
20512 {
20513         ${cf_cv_main_return:-return}(0);
20514 }
20515 CF_EOF
20516 # We do the test twice because some compilers refuse to overwrite an
20517 # existing .o file with -o, though they will create one.
20518 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20519 if { (eval echo "$as_me:20519: \"$ac_try\"") >&5
20520   (eval $ac_try) 2>&5
20521   ac_status=$?
20522   echo "$as_me:20522: \$? = $ac_status" >&5
20523   (exit $ac_status); } &&
20524   test -f conftest2.$ac_objext && { (eval echo "$as_me:20524: \"$ac_try\"") >&5
20525   (eval $ac_try) 2>&5
20526   ac_status=$?
20527   echo "$as_me:20527: \$? = $ac_status" >&5
20528   (exit $ac_status); };
20529 then
20530   eval cf_cv_prog_CXX_c_o=yes
20531 else
20532   eval cf_cv_prog_CXX_c_o=no
20533 fi
20534 rm -rf conftest*
20535
20536 fi
20537 if test $cf_cv_prog_CXX_c_o = yes; then
20538   echo "$as_me:20538: result: yes" >&5
20539 echo "${ECHO_T}yes" >&6
20540 else
20541   echo "$as_me:20541: result: no" >&5
20542 echo "${ECHO_T}no" >&6
20543 fi
20544
20545         case $GXX_VERSION in
20546         (1*|2.0-6*)
20547                 cf_cxx_library=yes
20548                 ;;
20549         (*-2.7*|2.7*)
20550
20551 cf_cxx_library=unknown
20552 case $cf_cv_system_name in
20553 (os2*)
20554         cf_gpp_libname=gpp
20555         ;;
20556 (*)
20557         cf_gpp_libname=g++
20558         ;;
20559 esac
20560 if test "$GXX" = yes; then
20561         echo "$as_me:20561: checking for lib$cf_gpp_libname" >&5
20562 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20563         cf_save="$LIBS"
20564
20565 cf_add_libs="-l$cf_gpp_libname"
20566 # Filter out duplicates - this happens with badly-designed ".pc" files...
20567 for cf_add_1lib in $LIBS
20568 do
20569         for cf_add_2lib in $cf_add_libs
20570         do
20571                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20572                 then
20573                         cf_add_1lib=
20574                         break
20575                 fi
20576         done
20577         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20578 done
20579 LIBS="$cf_add_libs"
20580
20581         cat >conftest.$ac_ext <<_ACEOF
20582 #line 20582 "configure"
20583 #include "confdefs.h"
20584
20585 #include <$cf_gpp_libname/builtin.h>
20586
20587 int
20588 main ()
20589 {
20590 two_arg_error_handler_t foo2 = lib_error_handler
20591   ;
20592   return 0;
20593 }
20594 _ACEOF
20595 rm -f conftest.$ac_objext conftest$ac_exeext
20596 if { (eval echo "$as_me:20596: \"$ac_link\"") >&5
20597   (eval $ac_link) 2>&5
20598   ac_status=$?
20599   echo "$as_me:20599: \$? = $ac_status" >&5
20600   (exit $ac_status); } &&
20601          { ac_try='test -s conftest$ac_exeext'
20602   { (eval echo "$as_me:20602: \"$ac_try\"") >&5
20603   (eval $ac_try) 2>&5
20604   ac_status=$?
20605   echo "$as_me:20605: \$? = $ac_status" >&5
20606   (exit $ac_status); }; }; then
20607   cf_cxx_library=yes
20608
20609 cf_add_libs="-l$cf_gpp_libname"
20610 # Filter out duplicates - this happens with badly-designed ".pc" files...
20611 for cf_add_1lib in $CXXLIBS
20612 do
20613         for cf_add_2lib in $cf_add_libs
20614         do
20615                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20616                 then
20617                         cf_add_1lib=
20618                         break
20619                 fi
20620         done
20621         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20622 done
20623 CXXLIBS="$cf_add_libs"
20624
20625          if test "$cf_gpp_libname" = cpp ; then
20626
20627 cat >>confdefs.h <<\EOF
20628 #define HAVE_GPP_BUILTIN_H 1
20629 EOF
20630
20631          else
20632
20633 cat >>confdefs.h <<\EOF
20634 #define HAVE_GXX_BUILTIN_H 1
20635 EOF
20636
20637          fi
20638 else
20639   echo "$as_me: failed program was:" >&5
20640 cat conftest.$ac_ext >&5
20641 cat >conftest.$ac_ext <<_ACEOF
20642 #line 20642 "configure"
20643 #include "confdefs.h"
20644
20645 #include <builtin.h>
20646
20647 int
20648 main ()
20649 {
20650 two_arg_error_handler_t foo2 = lib_error_handler
20651   ;
20652   return 0;
20653 }
20654 _ACEOF
20655 rm -f conftest.$ac_objext conftest$ac_exeext
20656 if { (eval echo "$as_me:20656: \"$ac_link\"") >&5
20657   (eval $ac_link) 2>&5
20658   ac_status=$?
20659   echo "$as_me:20659: \$? = $ac_status" >&5
20660   (exit $ac_status); } &&
20661          { ac_try='test -s conftest$ac_exeext'
20662   { (eval echo "$as_me:20662: \"$ac_try\"") >&5
20663   (eval $ac_try) 2>&5
20664   ac_status=$?
20665   echo "$as_me:20665: \$? = $ac_status" >&5
20666   (exit $ac_status); }; }; then
20667   cf_cxx_library=yes
20668
20669 cf_add_libs="-l$cf_gpp_libname"
20670 # Filter out duplicates - this happens with badly-designed ".pc" files...
20671 for cf_add_1lib in $CXXLIBS
20672 do
20673         for cf_add_2lib in $cf_add_libs
20674         do
20675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20676                 then
20677                         cf_add_1lib=
20678                         break
20679                 fi
20680         done
20681         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20682 done
20683 CXXLIBS="$cf_add_libs"
20684
20685 cat >>confdefs.h <<\EOF
20686 #define HAVE_BUILTIN_H 1
20687 EOF
20688
20689 else
20690   echo "$as_me: failed program was:" >&5
20691 cat conftest.$ac_ext >&5
20692 cf_cxx_library=no
20693 fi
20694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20695 fi
20696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20697         LIBS="$cf_save"
20698         echo "$as_me:20698: result: $cf_cxx_library" >&5
20699 echo "${ECHO_T}$cf_cxx_library" >&6
20700 fi
20701
20702                 ;;
20703         (*)
20704                 cf_cxx_library=no
20705                 ;;
20706         esac
20707
20708         ac_ext=cc
20709 ac_cpp='$CXXCPP $CPPFLAGS'
20710 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20711 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20712 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20713 ac_main_return=return
20714 echo "$as_me:20714: checking how to run the C++ preprocessor" >&5
20715 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20716 if test -z "$CXXCPP"; then
20717   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20718   echo $ECHO_N "(cached) $ECHO_C" >&6
20719 else
20720       # Double quotes because CXXCPP needs to be expanded
20721     for CXXCPP in "$CXX -E" "/lib/cpp"
20722     do
20723       ac_preproc_ok=false
20724 for ac_cxx_preproc_warn_flag in '' yes
20725 do
20726   # Use a header file that comes with gcc, so configuring glibc
20727   # with a fresh cross-compiler works.
20728   # On the NeXT, cc -E runs the code through the compiler's parser,
20729   # not just through cpp. "Syntax error" is here to catch this case.
20730   cat >conftest.$ac_ext <<_ACEOF
20731 #line 20731 "configure"
20732 #include "confdefs.h"
20733 #include <assert.h>
20734                      Syntax error
20735 _ACEOF
20736 if { (eval echo "$as_me:20736: \"$ac_cpp conftest.$ac_ext\"") >&5
20737   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20738   ac_status=$?
20739   egrep -v '^ *\+' conftest.er1 >conftest.err
20740   rm -f conftest.er1
20741   cat conftest.err >&5
20742   echo "$as_me:20742: \$? = $ac_status" >&5
20743   (exit $ac_status); } >/dev/null; then
20744   if test -s conftest.err; then
20745     ac_cpp_err=$ac_cxx_preproc_warn_flag
20746   else
20747     ac_cpp_err=
20748   fi
20749 else
20750   ac_cpp_err=yes
20751 fi
20752 if test -z "$ac_cpp_err"; then
20753   :
20754 else
20755   echo "$as_me: failed program was:" >&5
20756   cat conftest.$ac_ext >&5
20757   # Broken: fails on valid input.
20758 continue
20759 fi
20760 rm -f conftest.err conftest.$ac_ext
20761
20762   # OK, works on sane cases.  Now check whether non-existent headers
20763   # can be detected and how.
20764   cat >conftest.$ac_ext <<_ACEOF
20765 #line 20765 "configure"
20766 #include "confdefs.h"
20767 #include <ac_nonexistent.h>
20768 _ACEOF
20769 if { (eval echo "$as_me:20769: \"$ac_cpp conftest.$ac_ext\"") >&5
20770   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20771   ac_status=$?
20772   egrep -v '^ *\+' conftest.er1 >conftest.err
20773   rm -f conftest.er1
20774   cat conftest.err >&5
20775   echo "$as_me:20775: \$? = $ac_status" >&5
20776   (exit $ac_status); } >/dev/null; then
20777   if test -s conftest.err; then
20778     ac_cpp_err=$ac_cxx_preproc_warn_flag
20779   else
20780     ac_cpp_err=
20781   fi
20782 else
20783   ac_cpp_err=yes
20784 fi
20785 if test -z "$ac_cpp_err"; then
20786   # Broken: success on invalid input.
20787 continue
20788 else
20789   echo "$as_me: failed program was:" >&5
20790   cat conftest.$ac_ext >&5
20791   # Passes both tests.
20792 ac_preproc_ok=:
20793 break
20794 fi
20795 rm -f conftest.err conftest.$ac_ext
20796
20797 done
20798 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20799 rm -f conftest.err conftest.$ac_ext
20800 if $ac_preproc_ok; then
20801   break
20802 fi
20803
20804     done
20805     ac_cv_prog_CXXCPP=$CXXCPP
20806
20807 fi
20808   CXXCPP=$ac_cv_prog_CXXCPP
20809 else
20810   ac_cv_prog_CXXCPP=$CXXCPP
20811 fi
20812 echo "$as_me:20812: result: $CXXCPP" >&5
20813 echo "${ECHO_T}$CXXCPP" >&6
20814 ac_preproc_ok=false
20815 for ac_cxx_preproc_warn_flag in '' yes
20816 do
20817   # Use a header file that comes with gcc, so configuring glibc
20818   # with a fresh cross-compiler works.
20819   # On the NeXT, cc -E runs the code through the compiler's parser,
20820   # not just through cpp. "Syntax error" is here to catch this case.
20821   cat >conftest.$ac_ext <<_ACEOF
20822 #line 20822 "configure"
20823 #include "confdefs.h"
20824 #include <assert.h>
20825                      Syntax error
20826 _ACEOF
20827 if { (eval echo "$as_me:20827: \"$ac_cpp conftest.$ac_ext\"") >&5
20828   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20829   ac_status=$?
20830   egrep -v '^ *\+' conftest.er1 >conftest.err
20831   rm -f conftest.er1
20832   cat conftest.err >&5
20833   echo "$as_me:20833: \$? = $ac_status" >&5
20834   (exit $ac_status); } >/dev/null; then
20835   if test -s conftest.err; then
20836     ac_cpp_err=$ac_cxx_preproc_warn_flag
20837   else
20838     ac_cpp_err=
20839   fi
20840 else
20841   ac_cpp_err=yes
20842 fi
20843 if test -z "$ac_cpp_err"; then
20844   :
20845 else
20846   echo "$as_me: failed program was:" >&5
20847   cat conftest.$ac_ext >&5
20848   # Broken: fails on valid input.
20849 continue
20850 fi
20851 rm -f conftest.err conftest.$ac_ext
20852
20853   # OK, works on sane cases.  Now check whether non-existent headers
20854   # can be detected and how.
20855   cat >conftest.$ac_ext <<_ACEOF
20856 #line 20856 "configure"
20857 #include "confdefs.h"
20858 #include <ac_nonexistent.h>
20859 _ACEOF
20860 if { (eval echo "$as_me:20860: \"$ac_cpp conftest.$ac_ext\"") >&5
20861   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20862   ac_status=$?
20863   egrep -v '^ *\+' conftest.er1 >conftest.err
20864   rm -f conftest.er1
20865   cat conftest.err >&5
20866   echo "$as_me:20866: \$? = $ac_status" >&5
20867   (exit $ac_status); } >/dev/null; then
20868   if test -s conftest.err; then
20869     ac_cpp_err=$ac_cxx_preproc_warn_flag
20870   else
20871     ac_cpp_err=
20872   fi
20873 else
20874   ac_cpp_err=yes
20875 fi
20876 if test -z "$ac_cpp_err"; then
20877   # Broken: success on invalid input.
20878 continue
20879 else
20880   echo "$as_me: failed program was:" >&5
20881   cat conftest.$ac_ext >&5
20882   # Passes both tests.
20883 ac_preproc_ok=:
20884 break
20885 fi
20886 rm -f conftest.err conftest.$ac_ext
20887
20888 done
20889 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20890 rm -f conftest.err conftest.$ac_ext
20891 if $ac_preproc_ok; then
20892   :
20893 else
20894   { { echo "$as_me:20894: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20895 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20896    { (exit 1); exit 1; }; }
20897 fi
20898
20899 ac_ext=cc
20900 ac_cpp='$CXXCPP $CPPFLAGS'
20901 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20902 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20903 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20904 ac_main_return=return
20905
20906 for ac_header in typeinfo
20907 do
20908 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20909 echo "$as_me:20909: checking for $ac_header" >&5
20910 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20911 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20912   echo $ECHO_N "(cached) $ECHO_C" >&6
20913 else
20914   cat >conftest.$ac_ext <<_ACEOF
20915 #line 20915 "configure"
20916 #include "confdefs.h"
20917 #include <$ac_header>
20918 _ACEOF
20919 if { (eval echo "$as_me:20919: \"$ac_cpp conftest.$ac_ext\"") >&5
20920   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20921   ac_status=$?
20922   egrep -v '^ *\+' conftest.er1 >conftest.err
20923   rm -f conftest.er1
20924   cat conftest.err >&5
20925   echo "$as_me:20925: \$? = $ac_status" >&5
20926   (exit $ac_status); } >/dev/null; then
20927   if test -s conftest.err; then
20928     ac_cpp_err=$ac_cxx_preproc_warn_flag
20929   else
20930     ac_cpp_err=
20931   fi
20932 else
20933   ac_cpp_err=yes
20934 fi
20935 if test -z "$ac_cpp_err"; then
20936   eval "$as_ac_Header=yes"
20937 else
20938   echo "$as_me: failed program was:" >&5
20939   cat conftest.$ac_ext >&5
20940   eval "$as_ac_Header=no"
20941 fi
20942 rm -f conftest.err conftest.$ac_ext
20943 fi
20944 echo "$as_me:20944: result: `eval echo '${'$as_ac_Header'}'`" >&5
20945 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20946 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20947   cat >>confdefs.h <<EOF
20948 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20949 EOF
20950
20951 fi
20952 done
20953
20954 for ac_header in iostream
20955 do
20956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20957 echo "$as_me:20957: checking for $ac_header" >&5
20958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20960   echo $ECHO_N "(cached) $ECHO_C" >&6
20961 else
20962   cat >conftest.$ac_ext <<_ACEOF
20963 #line 20963 "configure"
20964 #include "confdefs.h"
20965 #include <$ac_header>
20966 _ACEOF
20967 if { (eval echo "$as_me:20967: \"$ac_cpp conftest.$ac_ext\"") >&5
20968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20969   ac_status=$?
20970   egrep -v '^ *\+' conftest.er1 >conftest.err
20971   rm -f conftest.er1
20972   cat conftest.err >&5
20973   echo "$as_me:20973: \$? = $ac_status" >&5
20974   (exit $ac_status); } >/dev/null; then
20975   if test -s conftest.err; then
20976     ac_cpp_err=$ac_cxx_preproc_warn_flag
20977   else
20978     ac_cpp_err=
20979   fi
20980 else
20981   ac_cpp_err=yes
20982 fi
20983 if test -z "$ac_cpp_err"; then
20984   eval "$as_ac_Header=yes"
20985 else
20986   echo "$as_me: failed program was:" >&5
20987   cat conftest.$ac_ext >&5
20988   eval "$as_ac_Header=no"
20989 fi
20990 rm -f conftest.err conftest.$ac_ext
20991 fi
20992 echo "$as_me:20992: result: `eval echo '${'$as_ac_Header'}'`" >&5
20993 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20994 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20995   cat >>confdefs.h <<EOF
20996 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20997 EOF
20998
20999 fi
21000 done
21001
21002 if test x"$ac_cv_header_iostream" = xyes ; then
21003         echo "$as_me:21003: checking if iostream uses std-namespace" >&5
21004 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21005         cat >conftest.$ac_ext <<_ACEOF
21006 #line 21006 "configure"
21007 #include "confdefs.h"
21008
21009 #include <iostream>
21010 using std::endl;
21011 using std::cerr;
21012 int
21013 main ()
21014 {
21015
21016 cerr << "testing" << endl;
21017
21018   ;
21019   return 0;
21020 }
21021 _ACEOF
21022 rm -f conftest.$ac_objext
21023 if { (eval echo "$as_me:21023: \"$ac_compile\"") >&5
21024   (eval $ac_compile) 2>&5
21025   ac_status=$?
21026   echo "$as_me:21026: \$? = $ac_status" >&5
21027   (exit $ac_status); } &&
21028          { ac_try='test -s conftest.$ac_objext'
21029   { (eval echo "$as_me:21029: \"$ac_try\"") >&5
21030   (eval $ac_try) 2>&5
21031   ac_status=$?
21032   echo "$as_me:21032: \$? = $ac_status" >&5
21033   (exit $ac_status); }; }; then
21034   cf_iostream_namespace=yes
21035 else
21036   echo "$as_me: failed program was:" >&5
21037 cat conftest.$ac_ext >&5
21038 cf_iostream_namespace=no
21039 fi
21040 rm -f conftest.$ac_objext conftest.$ac_ext
21041         echo "$as_me:21041: result: $cf_iostream_namespace" >&5
21042 echo "${ECHO_T}$cf_iostream_namespace" >&6
21043         if test "$cf_iostream_namespace" = yes ; then
21044
21045 cat >>confdefs.h <<\EOF
21046 #define IOSTREAM_NAMESPACE 1
21047 EOF
21048
21049         fi
21050 fi
21051
21052 echo "$as_me:21052: checking if we should include stdbool.h" >&5
21053 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21054
21055 if test "${cf_cv_header_stdbool_h+set}" = set; then
21056   echo $ECHO_N "(cached) $ECHO_C" >&6
21057 else
21058
21059         cat >conftest.$ac_ext <<_ACEOF
21060 #line 21060 "configure"
21061 #include "confdefs.h"
21062
21063 int
21064 main ()
21065 {
21066 bool foo = false
21067   ;
21068   return 0;
21069 }
21070 _ACEOF
21071 rm -f conftest.$ac_objext
21072 if { (eval echo "$as_me:21072: \"$ac_compile\"") >&5
21073   (eval $ac_compile) 2>&5
21074   ac_status=$?
21075   echo "$as_me:21075: \$? = $ac_status" >&5
21076   (exit $ac_status); } &&
21077          { ac_try='test -s conftest.$ac_objext'
21078   { (eval echo "$as_me:21078: \"$ac_try\"") >&5
21079   (eval $ac_try) 2>&5
21080   ac_status=$?
21081   echo "$as_me:21081: \$? = $ac_status" >&5
21082   (exit $ac_status); }; }; then
21083   cf_cv_header_stdbool_h=0
21084 else
21085   echo "$as_me: failed program was:" >&5
21086 cat conftest.$ac_ext >&5
21087 cat >conftest.$ac_ext <<_ACEOF
21088 #line 21088 "configure"
21089 #include "confdefs.h"
21090
21091 #ifndef __BEOS__
21092 #include <stdbool.h>
21093 #endif
21094
21095 int
21096 main ()
21097 {
21098 bool foo = false
21099   ;
21100   return 0;
21101 }
21102 _ACEOF
21103 rm -f conftest.$ac_objext
21104 if { (eval echo "$as_me:21104: \"$ac_compile\"") >&5
21105   (eval $ac_compile) 2>&5
21106   ac_status=$?
21107   echo "$as_me:21107: \$? = $ac_status" >&5
21108   (exit $ac_status); } &&
21109          { ac_try='test -s conftest.$ac_objext'
21110   { (eval echo "$as_me:21110: \"$ac_try\"") >&5
21111   (eval $ac_try) 2>&5
21112   ac_status=$?
21113   echo "$as_me:21113: \$? = $ac_status" >&5
21114   (exit $ac_status); }; }; then
21115   cf_cv_header_stdbool_h=1
21116 else
21117   echo "$as_me: failed program was:" >&5
21118 cat conftest.$ac_ext >&5
21119 cf_cv_header_stdbool_h=0
21120 fi
21121 rm -f conftest.$ac_objext conftest.$ac_ext
21122 fi
21123 rm -f conftest.$ac_objext conftest.$ac_ext
21124 fi
21125
21126 if test "$cf_cv_header_stdbool_h" = 1
21127 then    echo "$as_me:21127: result: yes" >&5
21128 echo "${ECHO_T}yes" >&6
21129 else    echo "$as_me:21129: result: no" >&5
21130 echo "${ECHO_T}no" >&6
21131 fi
21132
21133 echo "$as_me:21133: checking for builtin bool type" >&5
21134 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21135
21136 if test "${cf_cv_builtin_bool+set}" = set; then
21137   echo $ECHO_N "(cached) $ECHO_C" >&6
21138 else
21139
21140         cat >conftest.$ac_ext <<_ACEOF
21141 #line 21141 "configure"
21142 #include "confdefs.h"
21143
21144 #include <stdio.h>
21145 #include <sys/types.h>
21146
21147 int
21148 main ()
21149 {
21150 bool x = false
21151   ;
21152   return 0;
21153 }
21154 _ACEOF
21155 rm -f conftest.$ac_objext
21156 if { (eval echo "$as_me:21156: \"$ac_compile\"") >&5
21157   (eval $ac_compile) 2>&5
21158   ac_status=$?
21159   echo "$as_me:21159: \$? = $ac_status" >&5
21160   (exit $ac_status); } &&
21161          { ac_try='test -s conftest.$ac_objext'
21162   { (eval echo "$as_me:21162: \"$ac_try\"") >&5
21163   (eval $ac_try) 2>&5
21164   ac_status=$?
21165   echo "$as_me:21165: \$? = $ac_status" >&5
21166   (exit $ac_status); }; }; then
21167   cf_cv_builtin_bool=1
21168 else
21169   echo "$as_me: failed program was:" >&5
21170 cat conftest.$ac_ext >&5
21171 cf_cv_builtin_bool=0
21172 fi
21173 rm -f conftest.$ac_objext conftest.$ac_ext
21174
21175 fi
21176
21177 if test "$cf_cv_builtin_bool" = 1
21178 then    echo "$as_me:21178: result: yes" >&5
21179 echo "${ECHO_T}yes" >&6
21180 else    echo "$as_me:21180: result: no" >&5
21181 echo "${ECHO_T}no" >&6
21182 fi
21183
21184 echo "$as_me:21184: checking for size of bool" >&5
21185 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21186 if test "${cf_cv_type_of_bool+set}" = set; then
21187   echo $ECHO_N "(cached) $ECHO_C" >&6
21188 else
21189
21190         rm -f cf_test.out
21191         if test "$cross_compiling" = yes; then
21192   cf_cv_type_of_bool=unknown
21193 else
21194   cat >conftest.$ac_ext <<_ACEOF
21195 #line 21195 "configure"
21196 #include "confdefs.h"
21197
21198 #include <stdlib.h>
21199 #include <stdio.h>
21200
21201 #if defined(__cplusplus)
21202
21203 #ifdef HAVE_GXX_BUILTIN_H
21204 #include <g++/builtin.h>
21205 #elif HAVE_GPP_BUILTIN_H
21206 #include <gpp/builtin.h>
21207 #elif HAVE_BUILTIN_H
21208 #include <builtin.h>
21209 #endif
21210
21211 #else
21212
21213 #if $cf_cv_header_stdbool_h
21214 #include <stdbool.h>
21215 #endif
21216
21217 #endif
21218
21219 int main(void)
21220 {
21221         FILE *fp = fopen("cf_test.out", "w");
21222         if (fp != 0) {
21223                 bool x = true;
21224                 if ((bool)(-x) >= 0)
21225                         fputs("unsigned ", fp);
21226                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21227                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21228                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21229                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21230                 fclose(fp);
21231         }
21232         ${cf_cv_main_return:-return}(0);
21233 }
21234
21235 _ACEOF
21236 rm -f conftest$ac_exeext
21237 if { (eval echo "$as_me:21237: \"$ac_link\"") >&5
21238   (eval $ac_link) 2>&5
21239   ac_status=$?
21240   echo "$as_me:21240: \$? = $ac_status" >&5
21241   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21242   { (eval echo "$as_me:21242: \"$ac_try\"") >&5
21243   (eval $ac_try) 2>&5
21244   ac_status=$?
21245   echo "$as_me:21245: \$? = $ac_status" >&5
21246   (exit $ac_status); }; }; then
21247   cf_cv_type_of_bool=`cat cf_test.out`
21248                  if test -z "$cf_cv_type_of_bool"; then
21249                    cf_cv_type_of_bool=unknown
21250                  fi
21251 else
21252   echo "$as_me: program exited with status $ac_status" >&5
21253 echo "$as_me: failed program was:" >&5
21254 cat conftest.$ac_ext >&5
21255 cf_cv_type_of_bool=unknown
21256 fi
21257 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21258 fi
21259
21260 fi
21261
21262         rm -f cf_test.out
21263 echo "$as_me:21263: result: $cf_cv_type_of_bool" >&5
21264 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21265 if test "$cf_cv_type_of_bool" = unknown ; then
21266         case .$NCURSES_BOOL in
21267         (.auto|.) NCURSES_BOOL=unsigned;;
21268         esac
21269         { echo "$as_me:21269: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21270 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21271         cf_cv_type_of_bool=$NCURSES_BOOL
21272 fi
21273
21274 echo "$as_me:21274: checking for special defines needed for etip.h" >&5
21275 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21276 cf_save_CXXFLAGS="$CXXFLAGS"
21277 cf_result="none"
21278
21279 # etip.h includes ncurses.h which includes ncurses_dll.h
21280 # But ncurses_dll.h is generated - fix here.
21281 test -d include || mkdir include
21282 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
21283
21284 for cf_math in "" MATH_H
21285 do
21286 for cf_excp in "" MATH_EXCEPTION
21287 do
21288         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21289         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21290         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21291 cat >conftest.$ac_ext <<_ACEOF
21292 #line 21292 "configure"
21293 #include "confdefs.h"
21294
21295 #include <etip.h.in>
21296
21297 int
21298 main ()
21299 {
21300
21301   ;
21302   return 0;
21303 }
21304 _ACEOF
21305 rm -f conftest.$ac_objext
21306 if { (eval echo "$as_me:21306: \"$ac_compile\"") >&5
21307   (eval $ac_compile) 2>&5
21308   ac_status=$?
21309   echo "$as_me:21309: \$? = $ac_status" >&5
21310   (exit $ac_status); } &&
21311          { ac_try='test -s conftest.$ac_objext'
21312   { (eval echo "$as_me:21312: \"$ac_try\"") >&5
21313   (eval $ac_try) 2>&5
21314   ac_status=$?
21315   echo "$as_me:21315: \$? = $ac_status" >&5
21316   (exit $ac_status); }; }; then
21317
21318         test -n "$cf_math" && cat >>confdefs.h <<EOF
21319 #define ETIP_NEEDS_${cf_math} 1
21320 EOF
21321
21322         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21323 #define ETIP_NEEDS_${cf_excp} 1
21324 EOF
21325
21326         cf_result="$cf_math $cf_excp"
21327         break 2
21328
21329 else
21330   echo "$as_me: failed program was:" >&5
21331 cat conftest.$ac_ext >&5
21332 fi
21333 rm -f conftest.$ac_objext conftest.$ac_ext
21334 done
21335 done
21336 echo "$as_me:21336: result: $cf_result" >&5
21337 echo "${ECHO_T}$cf_result" >&6
21338 CXXFLAGS="$cf_save_CXXFLAGS"
21339
21340 if test -n "$CXX"; then
21341 echo "$as_me:21341: checking if $CXX accepts parameter initialization" >&5
21342 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21343 if test "${cf_cv_cpp_param_init+set}" = set; then
21344   echo $ECHO_N "(cached) $ECHO_C" >&6
21345 else
21346
21347         ac_ext=cc
21348 ac_cpp='$CXXCPP $CPPFLAGS'
21349 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21350 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21351 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21352 ac_main_return=return
21353
21354         if test "$cross_compiling" = yes; then
21355   cf_cv_cpp_param_init=unknown
21356 else
21357   cat >conftest.$ac_ext <<_ACEOF
21358 #line 21358 "configure"
21359 #include "confdefs.h"
21360
21361 class TEST {
21362 private:
21363         int value;
21364 public:
21365         TEST(int x = 1);
21366         ~TEST();
21367 };
21368
21369 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21370 {
21371         value = x;
21372 }
21373 int main(void) { }
21374
21375 _ACEOF
21376 rm -f conftest$ac_exeext
21377 if { (eval echo "$as_me:21377: \"$ac_link\"") >&5
21378   (eval $ac_link) 2>&5
21379   ac_status=$?
21380   echo "$as_me:21380: \$? = $ac_status" >&5
21381   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21382   { (eval echo "$as_me:21382: \"$ac_try\"") >&5
21383   (eval $ac_try) 2>&5
21384   ac_status=$?
21385   echo "$as_me:21385: \$? = $ac_status" >&5
21386   (exit $ac_status); }; }; then
21387   cf_cv_cpp_param_init=yes
21388 else
21389   echo "$as_me: program exited with status $ac_status" >&5
21390 echo "$as_me: failed program was:" >&5
21391 cat conftest.$ac_ext >&5
21392 cf_cv_cpp_param_init=no
21393 fi
21394 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21395 fi
21396         ac_ext=cc
21397 ac_cpp='$CXXCPP $CPPFLAGS'
21398 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21399 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21400 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21401 ac_main_return=return
21402
21403 fi
21404 echo "$as_me:21404: result: $cf_cv_cpp_param_init" >&5
21405 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21406 fi
21407 test "$cf_cv_cpp_param_init" = yes &&
21408 cat >>confdefs.h <<\EOF
21409 #define CPP_HAS_PARAM_INIT 1
21410 EOF
21411
21412 if test -n "$CXX"; then
21413
21414 echo "$as_me:21414: checking if $CXX accepts static_cast" >&5
21415 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21416 if test "${cf_cv_cpp_static_cast+set}" = set; then
21417   echo $ECHO_N "(cached) $ECHO_C" >&6
21418 else
21419
21420         ac_ext=cc
21421 ac_cpp='$CXXCPP $CPPFLAGS'
21422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21423 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21425 ac_main_return=return
21426
21427         cat >conftest.$ac_ext <<_ACEOF
21428 #line 21428 "configure"
21429 #include "confdefs.h"
21430
21431 class NCursesPanel
21432 {
21433 public:
21434   NCursesPanel(int nlines,
21435                int ncols,
21436                int begin_y = 0,
21437                int begin_x = 0)
21438   {
21439   }
21440   NCursesPanel();
21441   ~NCursesPanel();
21442 };
21443
21444 template<class T> class NCursesUserPanel : public NCursesPanel
21445 {
21446 public:
21447   NCursesUserPanel (int nlines,
21448                     int ncols,
21449                     int begin_y = 0,
21450                     int begin_x = 0,
21451                     const T* p_UserData = static_cast<T*>(0))
21452     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21453   {
21454   };
21455   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21456   {
21457   };
21458
21459   virtual ~NCursesUserPanel() {};
21460 };
21461
21462 int
21463 main ()
21464 {
21465
21466         const char* p_UserData = static_cast<char*>(0)
21467   ;
21468   return 0;
21469 }
21470 _ACEOF
21471 rm -f conftest.$ac_objext
21472 if { (eval echo "$as_me:21472: \"$ac_compile\"") >&5
21473   (eval $ac_compile) 2>&5
21474   ac_status=$?
21475   echo "$as_me:21475: \$? = $ac_status" >&5
21476   (exit $ac_status); } &&
21477          { ac_try='test -s conftest.$ac_objext'
21478   { (eval echo "$as_me:21478: \"$ac_try\"") >&5
21479   (eval $ac_try) 2>&5
21480   ac_status=$?
21481   echo "$as_me:21481: \$? = $ac_status" >&5
21482   (exit $ac_status); }; }; then
21483   cf_cv_cpp_static_cast=yes
21484 else
21485   echo "$as_me: failed program was:" >&5
21486 cat conftest.$ac_ext >&5
21487 cf_cv_cpp_static_cast=no
21488 fi
21489 rm -f conftest.$ac_objext conftest.$ac_ext
21490
21491         ac_ext=cc
21492 ac_cpp='$CXXCPP $CPPFLAGS'
21493 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21494 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21495 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21496 ac_main_return=return
21497
21498 fi
21499 echo "$as_me:21499: result: $cf_cv_cpp_static_cast" >&5
21500 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21501
21502 fi
21503
21504 test "$cf_cv_cpp_static_cast" = yes &&
21505 cat >>confdefs.h <<\EOF
21506 #define CPP_HAS_STATIC_CAST 1
21507 EOF
21508
21509         CXX_AR='$(AR)'
21510         CXX_ARFLAGS='$(ARFLAGS)'
21511         case $cf_cv_system_name in
21512         (irix*)
21513             if test "$GXX" != yes ; then
21514                 CXX_AR='$(CXX)'
21515                 CXX_ARFLAGS='-ar -o'
21516             fi
21517             ;;
21518         (sco3.2v5*)
21519             CXXLDFLAGS="-u main"
21520             ;;
21521         (solaris2*)
21522             if test "$GXX" != yes ; then
21523                 CXX_AR='$(CXX)'
21524                 CXX_ARFLAGS='-xar -o'
21525             fi
21526             ;;
21527         esac
21528
21529 else
21530         cf_cxx_library=no
21531         cf_cv_builtin_bool=1
21532
21533         # Just because we are not configuring against C++ right now does not
21534         # mean that a user will not want to use C++.  Some distributors disable
21535         # the C++ portion of this configuration as a shortcut (or just to avoid
21536         # compiling the demo in the c++ directory).  So we need a reasonable
21537         # default for the 'bool' type.
21538         #
21539         # Caveat: since the storage of the bool type is not standardized, it
21540         # may change.
21541
21542         if test "$NCURSES_BOOL" != auto ; then
21543                 cf_cv_type_of_bool=$NCURSES_BOOL
21544                 cf_cv_header_stdbool_h=0
21545         else
21546                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21547
21548 echo "$as_me:21548: checking for size of bool" >&5
21549 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21550 if test "${cf_cv_type_of_bool+set}" = set; then
21551   echo $ECHO_N "(cached) $ECHO_C" >&6
21552 else
21553
21554         rm -f cf_test.out
21555         if test "$cross_compiling" = yes; then
21556   cf_cv_type_of_bool=unknown
21557 else
21558   cat >conftest.$ac_ext <<_ACEOF
21559 #line 21559 "configure"
21560 #include "confdefs.h"
21561
21562 #include <stdlib.h>
21563 #include <stdio.h>
21564
21565 #if defined(__cplusplus)
21566
21567 #ifdef HAVE_GXX_BUILTIN_H
21568 #include <g++/builtin.h>
21569 #elif HAVE_GPP_BUILTIN_H
21570 #include <gpp/builtin.h>
21571 #elif HAVE_BUILTIN_H
21572 #include <builtin.h>
21573 #endif
21574
21575 #else
21576
21577 #if $cf_cv_header_stdbool_h
21578 #include <stdbool.h>
21579 #endif
21580
21581 #endif
21582
21583 int main(void)
21584 {
21585         FILE *fp = fopen("cf_test.out", "w");
21586         if (fp != 0) {
21587                 bool x = true;
21588                 if ((bool)(-x) >= 0)
21589                         fputs("unsigned ", fp);
21590                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21591                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21592                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21593                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21594                 fclose(fp);
21595         }
21596         ${cf_cv_main_return:-return}(0);
21597 }
21598
21599 _ACEOF
21600 rm -f conftest$ac_exeext
21601 if { (eval echo "$as_me:21601: \"$ac_link\"") >&5
21602   (eval $ac_link) 2>&5
21603   ac_status=$?
21604   echo "$as_me:21604: \$? = $ac_status" >&5
21605   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21606   { (eval echo "$as_me:21606: \"$ac_try\"") >&5
21607   (eval $ac_try) 2>&5
21608   ac_status=$?
21609   echo "$as_me:21609: \$? = $ac_status" >&5
21610   (exit $ac_status); }; }; then
21611   cf_cv_type_of_bool=`cat cf_test.out`
21612                  if test -z "$cf_cv_type_of_bool"; then
21613                    cf_cv_type_of_bool=unknown
21614                  fi
21615 else
21616   echo "$as_me: program exited with status $ac_status" >&5
21617 echo "$as_me: failed program was:" >&5
21618 cat conftest.$ac_ext >&5
21619 cf_cv_type_of_bool=unknown
21620 fi
21621 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21622 fi
21623
21624 fi
21625
21626         rm -f cf_test.out
21627 echo "$as_me:21627: result: $cf_cv_type_of_bool" >&5
21628 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21629 if test "$cf_cv_type_of_bool" = unknown ; then
21630         case .$NCURSES_BOOL in
21631         (.auto|.) NCURSES_BOOL=unsigned;;
21632         esac
21633         { echo "$as_me:21633: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21634 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21635         cf_cv_type_of_bool=$NCURSES_BOOL
21636 fi
21637
21638                 else
21639                         echo "$as_me:21639: checking for fallback type of bool" >&5
21640 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21641                         case "$host_cpu" in
21642                         (i?86)  cf_cv_type_of_bool=char ;;
21643                         (*)     cf_cv_type_of_bool=int  ;;
21644                         esac
21645                         echo "$as_me:21645: result: $cf_cv_type_of_bool" >&5
21646 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21647                 fi
21648         fi
21649 fi
21650
21651 # If the C compiler did not declare bool, and we did not determine that the C++
21652 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21653 # ncurses library use the same type as C++ bool.  Note that this allows one to
21654 # specify the type of bool in a configure-script option and postpone
21655 # integration with the C++ compiler provided that the types are compatible.
21656 USE_CXX_BOOL=1
21657 if test $cf_cv_cc_bool_type = 1
21658 then
21659         # oops: C has a bool.  Unlikely, but C++ could differ.
21660         USE_CXX_BOOL=0
21661 elif test $cf_cv_builtin_bool = 0
21662 then
21663         # C++ has no bool
21664         USE_CXX_BOOL=0
21665 else
21666         # this is the normal case
21667         USE_CXX_BOOL='defined(__cplusplus)'
21668 fi
21669
21670 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21671
21672         if test "$cf_with_ada" != "no" ; then
21673                 if test "$with_libtool" != "no"; then
21674                         { echo "$as_me:21674: WARNING: libtool does not support Ada - disabling feature" >&5
21675 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21676                         cf_with_ada=no
21677                 fi
21678         fi
21679
21680         if test "$cf_with_ada" != "no" ; then
21681
21682 cf_ada_make=gnatmake
21683 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21684 set dummy $cf_ada_make; ac_word=$2
21685 echo "$as_me:21685: checking for $ac_word" >&5
21686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21687 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21688   echo $ECHO_N "(cached) $ECHO_C" >&6
21689 else
21690   if test -n "$gnat_exists"; then
21691   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21692 else
21693   ac_save_IFS=$IFS; IFS=$ac_path_separator
21694 ac_dummy="$PATH"
21695 for ac_dir in $ac_dummy; do
21696   IFS=$ac_save_IFS
21697   test -z "$ac_dir" && ac_dir=.
21698   $as_executable_p "$ac_dir/$ac_word" || continue
21699 ac_cv_prog_gnat_exists="yes"
21700 echo "$as_me:21700: found $ac_dir/$ac_word" >&5
21701 break
21702 done
21703
21704   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21705 fi
21706 fi
21707 gnat_exists=$ac_cv_prog_gnat_exists
21708 if test -n "$gnat_exists"; then
21709   echo "$as_me:21709: result: $gnat_exists" >&5
21710 echo "${ECHO_T}$gnat_exists" >&6
21711 else
21712   echo "$as_me:21712: result: no" >&5
21713 echo "${ECHO_T}no" >&6
21714 fi
21715
21716 if test "$ac_cv_prog_gnat_exists" = no; then
21717         cf_ada_make=
21718         cf_cv_prog_gnat_correct=no
21719 else
21720
21721 echo "$as_me:21721: checking for gnat version" >&5
21722 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21723 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21724         grep '[0-9].[0-9][0-9]*' |\
21725         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21726 echo "$as_me:21726: result: $cf_gnat_version" >&5
21727 echo "${ECHO_T}$cf_gnat_version" >&6
21728
21729 case $cf_gnat_version in
21730 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21731         cf_cv_prog_gnat_correct=yes
21732         ;;
21733 (*)
21734         { echo "$as_me:21734: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21735 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21736         cf_cv_prog_gnat_correct=no
21737         ;;
21738 esac
21739
21740         # Extract the first word of "m4", so it can be a program name with args.
21741 set dummy m4; ac_word=$2
21742 echo "$as_me:21742: checking for $ac_word" >&5
21743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21744 if test "${ac_cv_prog_M4_exists+set}" = set; then
21745   echo $ECHO_N "(cached) $ECHO_C" >&6
21746 else
21747   if test -n "$M4_exists"; then
21748   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21749 else
21750   ac_save_IFS=$IFS; IFS=$ac_path_separator
21751 ac_dummy="$PATH"
21752 for ac_dir in $ac_dummy; do
21753   IFS=$ac_save_IFS
21754   test -z "$ac_dir" && ac_dir=.
21755   $as_executable_p "$ac_dir/$ac_word" || continue
21756 ac_cv_prog_M4_exists="yes"
21757 echo "$as_me:21757: found $ac_dir/$ac_word" >&5
21758 break
21759 done
21760
21761   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21762 fi
21763 fi
21764 M4_exists=$ac_cv_prog_M4_exists
21765 if test -n "$M4_exists"; then
21766   echo "$as_me:21766: result: $M4_exists" >&5
21767 echo "${ECHO_T}$M4_exists" >&6
21768 else
21769   echo "$as_me:21769: result: no" >&5
21770 echo "${ECHO_T}no" >&6
21771 fi
21772
21773         if test "$ac_cv_prog_M4_exists" = no; then
21774                 cf_cv_prog_gnat_correct=no
21775                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21776         fi
21777         if test "$cf_cv_prog_gnat_correct" = yes; then
21778                 echo "$as_me:21778: checking if GNAT works" >&5
21779 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21780
21781 rm -rf conftest* *~conftest*
21782 cat >>conftest.ads <<CF_EOF
21783 procedure conftest;
21784 CF_EOF
21785 cat >>conftest.adb <<CF_EOF
21786 with Text_IO;
21787 with GNAT.OS_Lib;
21788 procedure conftest is
21789 begin
21790    Text_IO.Put ("Hello World");
21791    Text_IO.New_Line;
21792    GNAT.OS_Lib.OS_Exit (0);
21793 end conftest;
21794 CF_EOF
21795 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21796    if ( ./conftest 1>&5 2>&1 ) ; then
21797       cf_cv_prog_gnat_correct=yes
21798    else
21799       cf_cv_prog_gnat_correct=no
21800    fi
21801 else
21802    cf_cv_prog_gnat_correct=no
21803 fi
21804 rm -rf conftest* *~conftest*
21805
21806                 echo "$as_me:21806: result: $cf_cv_prog_gnat_correct" >&5
21807 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21808         fi
21809 fi
21810
21811                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21812
21813         ADAFLAGS="$ADAFLAGS -gnatpn"
21814
21815         echo "$as_me:21815: checking optimization options for ADAFLAGS" >&5
21816 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21817         case "$CFLAGS" in
21818         (*-g*)
21819
21820         ADAFLAGS="$ADAFLAGS -g"
21821
21822                 ;;
21823         esac
21824         case "$CFLAGS" in
21825         (*-O*)
21826                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21827
21828         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21829
21830                 ;;
21831         esac
21832         echo "$as_me:21832: result: $ADAFLAGS" >&5
21833 echo "${ECHO_T}$ADAFLAGS" >&6
21834
21835 echo "$as_me:21835: checking if GNATPREP supports -T option" >&5
21836 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21837 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21838   echo $ECHO_N "(cached) $ECHO_C" >&6
21839 else
21840
21841 cf_cv_gnatprep_opt_t=no
21842 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21843
21844 fi
21845 echo "$as_me:21845: result: $cf_cv_gnatprep_opt_t" >&5
21846 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21847 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21848
21849 echo "$as_me:21849: checking if GNAT supports generics" >&5
21850 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21851 case $cf_gnat_version in
21852 (3.[1-9]*|[4-9].*)
21853         cf_gnat_generics=yes
21854         ;;
21855 (*)
21856         cf_gnat_generics=no
21857         ;;
21858 esac
21859 echo "$as_me:21859: result: $cf_gnat_generics" >&5
21860 echo "${ECHO_T}$cf_gnat_generics" >&6
21861
21862 if test "$cf_gnat_generics" = yes
21863 then
21864         cf_compile_generics=generics
21865         cf_generic_objects="\${GENOBJS}"
21866 else
21867         cf_compile_generics=
21868         cf_generic_objects=
21869 fi
21870
21871 echo "$as_me:21871: checking if GNAT supports SIGINT" >&5
21872 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21873 if test "${cf_cv_gnat_sigint+set}" = set; then
21874   echo $ECHO_N "(cached) $ECHO_C" >&6
21875 else
21876
21877 rm -rf conftest* *~conftest*
21878 cat >>conftest.ads <<CF_EOF
21879 with Ada.Interrupts.Names;
21880
21881 package ConfTest is
21882
21883    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21884    pragma Unreserve_All_Interrupts;
21885    pragma Warnings (On);
21886
21887    protected Process is
21888       procedure Stop;
21889       function Continue return Boolean;
21890       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21891    private
21892       Done : Boolean := False;
21893    end Process;
21894
21895 end ConfTest;
21896 CF_EOF
21897 cat >>conftest.adb <<CF_EOF
21898 package body ConfTest is
21899    protected body Process is
21900       procedure Stop is
21901       begin
21902          Done := True;
21903       end Stop;
21904       function Continue return Boolean is
21905       begin
21906          return not Done;
21907       end Continue;
21908    end Process;
21909 end ConfTest;
21910 CF_EOF
21911 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21912       cf_cv_gnat_sigint=yes
21913 else
21914    cf_cv_gnat_sigint=no
21915 fi
21916 rm -rf conftest* *~conftest*
21917
21918 fi
21919 echo "$as_me:21919: result: $cf_cv_gnat_sigint" >&5
21920 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21921
21922 if test $cf_cv_gnat_sigint = yes ; then
21923         USE_GNAT_SIGINT=""
21924 else
21925         USE_GNAT_SIGINT="#"
21926 fi
21927
21928 cf_gnat_libraries=no
21929 cf_gnat_projects=no
21930
21931 if test "$enable_gnat_projects" != no ; then
21932 echo "$as_me:21932: checking if GNAT supports project files" >&5
21933 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21934 case $cf_gnat_version in
21935 (3.[0-9]*)
21936         ;;
21937 (*)
21938         case $cf_cv_system_name in
21939         (cygwin*|msys*)
21940                 ;;
21941         (*)
21942                 mkdir conftest.src conftest.bin conftest.lib
21943                 cd conftest.src
21944                 rm -rf conftest* *~conftest*
21945                 cat >>library.gpr <<CF_EOF
21946 project Library is
21947   Kind := External ("LIB_KIND");
21948   for Library_Name use "ConfTest";
21949   for Object_Dir use ".";
21950   for Library_ALI_Dir use External("LIBRARY_DIR");
21951   for Library_Version use External ("SONAME");
21952   for Library_Kind use Kind;
21953   for Library_Dir use External("BUILD_DIR");
21954   Source_Dir := External ("SOURCE_DIR");
21955   for Source_Dirs use (Source_Dir);
21956 end Library;
21957 CF_EOF
21958                 cat >>confpackage.ads <<CF_EOF
21959 package ConfPackage is
21960    procedure conftest;
21961 end ConfPackage;
21962 CF_EOF
21963                 cat >>confpackage.adb <<CF_EOF
21964 with Text_IO;
21965 package body ConfPackage is
21966    procedure conftest is
21967    begin
21968       Text_IO.Put ("Hello World");
21969       Text_IO.New_Line;
21970    end conftest;
21971 end ConfPackage;
21972 CF_EOF
21973                 if ( $cf_ada_make $ADAFLAGS \
21974                                 -Plibrary.gpr \
21975                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21976                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21977                                 -XSOURCE_DIR=`pwd` \
21978                                 -XSONAME=libConfTest.so.1 \
21979                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21980                         cf_gnat_projects=yes
21981                 fi
21982                 cd ..
21983                 if test -f conftest.lib/confpackage.ali
21984                 then
21985                         cf_gnat_libraries=yes
21986                 fi
21987                 rm -rf conftest* *~conftest*
21988                 ;;
21989         esac
21990         ;;
21991 esac
21992 echo "$as_me:21992: result: $cf_gnat_projects" >&5
21993 echo "${ECHO_T}$cf_gnat_projects" >&6
21994 fi # enable_gnat_projects
21995
21996 if test $cf_gnat_projects = yes
21997 then
21998         echo "$as_me:21998: checking if GNAT supports libraries" >&5
21999 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22000         echo "$as_me:22000: result: $cf_gnat_libraries" >&5
22001 echo "${ECHO_T}$cf_gnat_libraries" >&6
22002 fi
22003
22004 if test "$cf_gnat_projects" = yes
22005 then
22006         USE_OLD_MAKERULES="#"
22007         USE_GNAT_PROJECTS=""
22008 else
22009         USE_OLD_MAKERULES=""
22010         USE_GNAT_PROJECTS="#"
22011 fi
22012
22013 if test "$cf_gnat_libraries" = yes
22014 then
22015         USE_GNAT_LIBRARIES=""
22016 else
22017         USE_GNAT_LIBRARIES="#"
22018 fi
22019
22020 echo "$as_me:22020: checking for ada-compiler" >&5
22021 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22022
22023 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22024 if test "${with_ada_compiler+set}" = set; then
22025   withval="$with_ada_compiler"
22026   cf_ada_compiler=$withval
22027 else
22028   cf_ada_compiler=gnatmake
22029 fi;
22030
22031 echo "$as_me:22031: result: $cf_ada_compiler" >&5
22032 echo "${ECHO_T}$cf_ada_compiler" >&6
22033
22034                         cf_ada_package=terminal_interface
22035
22036 echo "$as_me:22036: checking for ada-include" >&5
22037 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22038
22039 # Check whether --with-ada-include or --without-ada-include was given.
22040 if test "${with_ada_include+set}" = set; then
22041   withval="$with_ada_include"
22042
22043 else
22044   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22045 fi; if test -n "$prefix/share/ada/adainclude" ; then
22046
22047 if test "x$prefix" != xNONE; then
22048         cf_path_syntax="$prefix"
22049 else
22050         cf_path_syntax="$ac_default_prefix"
22051 fi
22052
22053 case ".$withval" in
22054 (.\$\(*\)*|.\'*\'*)
22055         ;;
22056 (..|./*|.\\*)
22057         ;;
22058 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22059         ;;
22060 (.\${*prefix}*|.\${*dir}*)
22061         eval withval="$withval"
22062         case ".$withval" in
22063         (.NONE/*)
22064                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22065                 ;;
22066         esac
22067         ;;
22068 (.no|.NONE/*)
22069         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22070         ;;
22071 (*)
22072         { { echo "$as_me:22072: error: expected a pathname, not \"$withval\"" >&5
22073 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22074    { (exit 1); exit 1; }; }
22075         ;;
22076 esac
22077
22078 fi
22079 eval ADA_INCLUDE="$withval"
22080
22081 echo "$as_me:22081: result: $ADA_INCLUDE" >&5
22082 echo "${ECHO_T}$ADA_INCLUDE" >&6
22083
22084 echo "$as_me:22084: checking for ada-objects" >&5
22085 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22086
22087 # Check whether --with-ada-objects or --without-ada-objects was given.
22088 if test "${with_ada_objects+set}" = set; then
22089   withval="$with_ada_objects"
22090
22091 else
22092   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22093 fi; if test -n "$prefix/lib/ada/adalib" ; then
22094
22095 if test "x$prefix" != xNONE; then
22096         cf_path_syntax="$prefix"
22097 else
22098         cf_path_syntax="$ac_default_prefix"
22099 fi
22100
22101 case ".$withval" in
22102 (.\$\(*\)*|.\'*\'*)
22103         ;;
22104 (..|./*|.\\*)
22105         ;;
22106 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22107         ;;
22108 (.\${*prefix}*|.\${*dir}*)
22109         eval withval="$withval"
22110         case ".$withval" in
22111         (.NONE/*)
22112                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22113                 ;;
22114         esac
22115         ;;
22116 (.no|.NONE/*)
22117         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22118         ;;
22119 (*)
22120         { { echo "$as_me:22120: error: expected a pathname, not \"$withval\"" >&5
22121 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22122    { (exit 1); exit 1; }; }
22123         ;;
22124 esac
22125
22126 fi
22127 eval ADA_OBJECTS="$withval"
22128
22129 echo "$as_me:22129: result: $ADA_OBJECTS" >&5
22130 echo "${ECHO_T}$ADA_OBJECTS" >&6
22131
22132 echo "$as_me:22132: checking if an Ada95 shared-library should be built" >&5
22133 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22134
22135 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22136 if test "${with_ada_sharedlib+set}" = set; then
22137   withval="$with_ada_sharedlib"
22138   with_ada_sharedlib=$withval
22139 else
22140   with_ada_sharedlib=no
22141 fi;
22142 echo "$as_me:22142: result: $with_ada_sharedlib" >&5
22143 echo "${ECHO_T}$with_ada_sharedlib" >&6
22144
22145 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22146 MAKE_ADA_SHAREDLIB="#"
22147
22148 if test "x$with_ada_sharedlib" != xno
22149 then
22150         MAKE_ADA_SHAREDLIB=
22151         if test "x$with_ada_sharedlib" != xyes
22152         then
22153                 ADA_SHAREDLIB="$with_ada_sharedlib"
22154         fi
22155 fi
22156
22157                 fi
22158         fi
22159 else
22160         cf_with_ada=no
22161 fi
22162
22163 # do this "late" to avoid conflict with header-checks
22164 if test "x$with_widec" = xyes ; then
22165         echo "$as_me:22165: checking for wchar_t" >&5
22166 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22167 if test "${ac_cv_type_wchar_t+set}" = set; then
22168   echo $ECHO_N "(cached) $ECHO_C" >&6
22169 else
22170   cat >conftest.$ac_ext <<_ACEOF
22171 #line 22171 "configure"
22172 #include "confdefs.h"
22173 $ac_includes_default
22174 int
22175 main ()
22176 {
22177 if ((wchar_t *) 0)
22178   return 0;
22179 if (sizeof (wchar_t))
22180   return 0;
22181   ;
22182   return 0;
22183 }
22184 _ACEOF
22185 rm -f conftest.$ac_objext
22186 if { (eval echo "$as_me:22186: \"$ac_compile\"") >&5
22187   (eval $ac_compile) 2>&5
22188   ac_status=$?
22189   echo "$as_me:22189: \$? = $ac_status" >&5
22190   (exit $ac_status); } &&
22191          { ac_try='test -s conftest.$ac_objext'
22192   { (eval echo "$as_me:22192: \"$ac_try\"") >&5
22193   (eval $ac_try) 2>&5
22194   ac_status=$?
22195   echo "$as_me:22195: \$? = $ac_status" >&5
22196   (exit $ac_status); }; }; then
22197   ac_cv_type_wchar_t=yes
22198 else
22199   echo "$as_me: failed program was:" >&5
22200 cat conftest.$ac_ext >&5
22201 ac_cv_type_wchar_t=no
22202 fi
22203 rm -f conftest.$ac_objext conftest.$ac_ext
22204 fi
22205 echo "$as_me:22205: result: $ac_cv_type_wchar_t" >&5
22206 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22207
22208 echo "$as_me:22208: checking size of wchar_t" >&5
22209 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22210 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22211   echo $ECHO_N "(cached) $ECHO_C" >&6
22212 else
22213   if test "$ac_cv_type_wchar_t" = yes; then
22214   if test "$cross_compiling" = yes; then
22215   # Depending upon the size, compute the lo and hi bounds.
22216 cat >conftest.$ac_ext <<_ACEOF
22217 #line 22217 "configure"
22218 #include "confdefs.h"
22219 $ac_includes_default
22220 int
22221 main ()
22222 {
22223 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22224   ;
22225   return 0;
22226 }
22227 _ACEOF
22228 rm -f conftest.$ac_objext
22229 if { (eval echo "$as_me:22229: \"$ac_compile\"") >&5
22230   (eval $ac_compile) 2>&5
22231   ac_status=$?
22232   echo "$as_me:22232: \$? = $ac_status" >&5
22233   (exit $ac_status); } &&
22234          { ac_try='test -s conftest.$ac_objext'
22235   { (eval echo "$as_me:22235: \"$ac_try\"") >&5
22236   (eval $ac_try) 2>&5
22237   ac_status=$?
22238   echo "$as_me:22238: \$? = $ac_status" >&5
22239   (exit $ac_status); }; }; then
22240   ac_lo=0 ac_mid=0
22241   while :; do
22242     cat >conftest.$ac_ext <<_ACEOF
22243 #line 22243 "configure"
22244 #include "confdefs.h"
22245 $ac_includes_default
22246 int
22247 main ()
22248 {
22249 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22250   ;
22251   return 0;
22252 }
22253 _ACEOF
22254 rm -f conftest.$ac_objext
22255 if { (eval echo "$as_me:22255: \"$ac_compile\"") >&5
22256   (eval $ac_compile) 2>&5
22257   ac_status=$?
22258   echo "$as_me:22258: \$? = $ac_status" >&5
22259   (exit $ac_status); } &&
22260          { ac_try='test -s conftest.$ac_objext'
22261   { (eval echo "$as_me:22261: \"$ac_try\"") >&5
22262   (eval $ac_try) 2>&5
22263   ac_status=$?
22264   echo "$as_me:22264: \$? = $ac_status" >&5
22265   (exit $ac_status); }; }; then
22266   ac_hi=$ac_mid; break
22267 else
22268   echo "$as_me: failed program was:" >&5
22269 cat conftest.$ac_ext >&5
22270 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22271 fi
22272 rm -f conftest.$ac_objext conftest.$ac_ext
22273   done
22274 else
22275   echo "$as_me: failed program was:" >&5
22276 cat conftest.$ac_ext >&5
22277 ac_hi=-1 ac_mid=-1
22278   while :; do
22279     cat >conftest.$ac_ext <<_ACEOF
22280 #line 22280 "configure"
22281 #include "confdefs.h"
22282 $ac_includes_default
22283 int
22284 main ()
22285 {
22286 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22287   ;
22288   return 0;
22289 }
22290 _ACEOF
22291 rm -f conftest.$ac_objext
22292 if { (eval echo "$as_me:22292: \"$ac_compile\"") >&5
22293   (eval $ac_compile) 2>&5
22294   ac_status=$?
22295   echo "$as_me:22295: \$? = $ac_status" >&5
22296   (exit $ac_status); } &&
22297          { ac_try='test -s conftest.$ac_objext'
22298   { (eval echo "$as_me:22298: \"$ac_try\"") >&5
22299   (eval $ac_try) 2>&5
22300   ac_status=$?
22301   echo "$as_me:22301: \$? = $ac_status" >&5
22302   (exit $ac_status); }; }; then
22303   ac_lo=$ac_mid; break
22304 else
22305   echo "$as_me: failed program was:" >&5
22306 cat conftest.$ac_ext >&5
22307 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22308 fi
22309 rm -f conftest.$ac_objext conftest.$ac_ext
22310   done
22311 fi
22312 rm -f conftest.$ac_objext conftest.$ac_ext
22313 # Binary search between lo and hi bounds.
22314 while test "x$ac_lo" != "x$ac_hi"; do
22315   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22316   cat >conftest.$ac_ext <<_ACEOF
22317 #line 22317 "configure"
22318 #include "confdefs.h"
22319 $ac_includes_default
22320 int
22321 main ()
22322 {
22323 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22324   ;
22325   return 0;
22326 }
22327 _ACEOF
22328 rm -f conftest.$ac_objext
22329 if { (eval echo "$as_me:22329: \"$ac_compile\"") >&5
22330   (eval $ac_compile) 2>&5
22331   ac_status=$?
22332   echo "$as_me:22332: \$? = $ac_status" >&5
22333   (exit $ac_status); } &&
22334          { ac_try='test -s conftest.$ac_objext'
22335   { (eval echo "$as_me:22335: \"$ac_try\"") >&5
22336   (eval $ac_try) 2>&5
22337   ac_status=$?
22338   echo "$as_me:22338: \$? = $ac_status" >&5
22339   (exit $ac_status); }; }; then
22340   ac_hi=$ac_mid
22341 else
22342   echo "$as_me: failed program was:" >&5
22343 cat conftest.$ac_ext >&5
22344 ac_lo=`expr $ac_mid + 1`
22345 fi
22346 rm -f conftest.$ac_objext conftest.$ac_ext
22347 done
22348 ac_cv_sizeof_wchar_t=$ac_lo
22349 else
22350   if test "$cross_compiling" = yes; then
22351   { { echo "$as_me:22351: error: cannot run test program while cross compiling" >&5
22352 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22353    { (exit 1); exit 1; }; }
22354 else
22355   cat >conftest.$ac_ext <<_ACEOF
22356 #line 22356 "configure"
22357 #include "confdefs.h"
22358 $ac_includes_default
22359 int
22360 main ()
22361 {
22362 FILE *f = fopen ("conftest.val", "w");
22363 if (!f)
22364   $ac_main_return (1);
22365 fprintf (f, "%d", (sizeof (wchar_t)));
22366 fclose (f);
22367   ;
22368   return 0;
22369 }
22370 _ACEOF
22371 rm -f conftest$ac_exeext
22372 if { (eval echo "$as_me:22372: \"$ac_link\"") >&5
22373   (eval $ac_link) 2>&5
22374   ac_status=$?
22375   echo "$as_me:22375: \$? = $ac_status" >&5
22376   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22377   { (eval echo "$as_me:22377: \"$ac_try\"") >&5
22378   (eval $ac_try) 2>&5
22379   ac_status=$?
22380   echo "$as_me:22380: \$? = $ac_status" >&5
22381   (exit $ac_status); }; }; then
22382   ac_cv_sizeof_wchar_t=`cat conftest.val`
22383 else
22384   echo "$as_me: program exited with status $ac_status" >&5
22385 echo "$as_me: failed program was:" >&5
22386 cat conftest.$ac_ext >&5
22387 fi
22388 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22389 fi
22390 fi
22391 rm -f conftest.val
22392 else
22393   ac_cv_sizeof_wchar_t=0
22394 fi
22395 fi
22396 echo "$as_me:22396: result: $ac_cv_sizeof_wchar_t" >&5
22397 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22398 cat >>confdefs.h <<EOF
22399 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22400 EOF
22401
22402 fi
22403
22404 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22405 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22406 ###
22407 ### ticlib modules may be a separate library, otherwise contained in termlib.
22408 ### termlib modules may be a separate library, otherwise contained in ncurses.
22409 ###
22410 ### The of "+" or " " between the tokens controls the way the script
22411 ### chooses to split module lists into libraries.
22412 ###
22413 ### (see CF_LIB_RULES).
22414 echo "$as_me:22414: checking for library subsets" >&5
22415 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22416 LIB_SUBSETS=
22417
22418 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22419         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22420         if test "$with_ticlib" != no ; then
22421                 LIB_SUBSETS="${LIB_SUBSETS} "
22422         else
22423                 LIB_SUBSETS="${LIB_SUBSETS}+"
22424         fi
22425 fi
22426
22427 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22428 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22429
22430 if test "$with_termlib" != no ; then
22431         LIB_SUBSETS="${LIB_SUBSETS} "
22432 else
22433         LIB_SUBSETS="${LIB_SUBSETS}+"
22434 fi
22435
22436 LIB_SUBSETS="${LIB_SUBSETS}base"
22437
22438 # Most term-driver calls are to tinfo, but some like init_pair are to the
22439 # base library (so it resides in base).
22440 if test "$with_term_driver" != no ; then
22441         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22442         case $cf_cv_system_name in
22443         (*mingw32*|*mingw64*)
22444                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22445                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22446                 ;;
22447         (*)
22448                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22449                 ;;
22450         esac
22451 fi
22452
22453 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22454 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22455
22456 echo "$as_me:22456: result: $LIB_SUBSETS" >&5
22457 echo "${ECHO_T}$LIB_SUBSETS" >&6
22458
22459 ### Construct the list of include-directories to be generated
22460
22461 if test "$srcdir" != "."; then
22462         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22463 fi
22464 CPPFLAGS="-I../include $CPPFLAGS"
22465 if test "$srcdir" != "."; then
22466         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22467 fi
22468 CPPFLAGS="-I. $CPPFLAGS"
22469
22470 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22471 if test "$srcdir" != "."; then
22472         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22473 fi
22474 if test "$GCC" != yes; then
22475         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22476 elif test "$includedir" != "/usr/include"; then
22477         if test "$includedir" = '${prefix}/include' ; then
22478                 if test x$prefix != x/usr ; then
22479                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22480                 fi
22481         else
22482                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22483         fi
22484 fi
22485
22486 ### Build up pieces for makefile rules
22487 echo "$as_me:22487: checking default library suffix" >&5
22488 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22489
22490         case $DFT_LWR_MODEL in
22491         (libtool) DFT_ARG_SUFFIX=''   ;;
22492         (normal)  DFT_ARG_SUFFIX=''   ;;
22493         (debug)   DFT_ARG_SUFFIX='_g' ;;
22494         (profile) DFT_ARG_SUFFIX='_p' ;;
22495         (shared)  DFT_ARG_SUFFIX=''   ;;
22496         esac
22497         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22498 echo "$as_me:22498: result: $DFT_ARG_SUFFIX" >&5
22499 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22500
22501 echo "$as_me:22501: checking default library-dependency suffix" >&5
22502 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22503
22504         case X$DFT_LWR_MODEL in
22505         (Xlibtool)
22506                 DFT_LIB_SUFFIX='.la'
22507                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22508                 ;;
22509         (Xdebug)
22510                 DFT_LIB_SUFFIX='_g.a'
22511                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22512                 ;;
22513         (Xprofile)
22514                 DFT_LIB_SUFFIX='_p.a'
22515                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22516                 ;;
22517         (Xshared)
22518                 case $cf_cv_system_name in
22519                 (aix[5-7]*)
22520                         DFT_LIB_SUFFIX='.so'
22521                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22522                         ;;
22523                 (cygwin*|msys*|mingw*)
22524                         DFT_LIB_SUFFIX='.dll'
22525                         DFT_DEP_SUFFIX='.dll.a'
22526                         ;;
22527                 (darwin*)
22528                         DFT_LIB_SUFFIX='.dylib'
22529                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22530                         ;;
22531                 (hpux*)
22532                         case $target in
22533                         (ia64*)
22534                                 DFT_LIB_SUFFIX='.so'
22535                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22536                                 ;;
22537                         (*)
22538                                 DFT_LIB_SUFFIX='.sl'
22539                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22540                                 ;;
22541                         esac
22542                         ;;
22543                 (*)
22544                         DFT_LIB_SUFFIX='.so'
22545                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22546                         ;;
22547                 esac
22548                 ;;
22549         (*)
22550                 DFT_LIB_SUFFIX='.a'
22551                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22552                 ;;
22553         esac
22554         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22555         then
22556                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22557                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22558         fi
22559 echo "$as_me:22559: result: $DFT_DEP_SUFFIX" >&5
22560 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22561
22562 echo "$as_me:22562: checking default object directory" >&5
22563 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22564
22565         case $DFT_LWR_MODEL in
22566         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22567         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22568         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22569         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22570         (shared)
22571                 case $cf_cv_system_name in
22572                 (cygwin|msys)
22573                         DFT_OBJ_SUBDIR='objects' ;;
22574                 (*)
22575                         DFT_OBJ_SUBDIR='obj_s' ;;
22576                 esac
22577         esac
22578 echo "$as_me:22578: result: $DFT_OBJ_SUBDIR" >&5
22579 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22580
22581 if test "x$cf_with_cxx" = xyes ; then
22582 echo "$as_me:22582: checking c++ library-dependency suffix" >&5
22583 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22584 if test "$with_libtool" != "no"; then
22585         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22586         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22587 elif test "$with_shared_cxx" != "no"; then
22588         # also for g++ users...
22589         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22590 else
22591         # we normally make a static library because C/C++ library rules differ
22592
22593         case Xnormal in
22594         (Xlibtool)
22595                 CXX_LIB_SUFFIX='.la'
22596                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22597                 ;;
22598         (Xdebug)
22599                 CXX_LIB_SUFFIX='_g.a'
22600                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22601                 ;;
22602         (Xprofile)
22603                 CXX_LIB_SUFFIX='_p.a'
22604                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22605                 ;;
22606         (Xshared)
22607                 case $cf_cv_system_name in
22608                 (aix[5-7]*)
22609                         CXX_LIB_SUFFIX='.so'
22610                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22611                         ;;
22612                 (cygwin*|msys*|mingw*)
22613                         CXX_LIB_SUFFIX='.dll'
22614                         CXX_DEP_SUFFIX='.dll.a'
22615                         ;;
22616                 (darwin*)
22617                         CXX_LIB_SUFFIX='.dylib'
22618                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22619                         ;;
22620                 (hpux*)
22621                         case $target in
22622                         (ia64*)
22623                                 CXX_LIB_SUFFIX='.so'
22624                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22625                                 ;;
22626                         (*)
22627                                 CXX_LIB_SUFFIX='.sl'
22628                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22629                                 ;;
22630                         esac
22631                         ;;
22632                 (*)
22633                         CXX_LIB_SUFFIX='.so'
22634                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22635                         ;;
22636                 esac
22637                 ;;
22638         (*)
22639                 CXX_LIB_SUFFIX='.a'
22640                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22641                 ;;
22642         esac
22643         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22644         then
22645                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22646                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22647         fi
22648
22649 fi
22650 echo "$as_me:22650: result: $CXX_LIB_SUFFIX" >&5
22651 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22652
22653 fi
22654
22655 # do not want -ldl in build except as needed for -lncurses dependency
22656 if test "x$with_dlsym" = xyes ; then
22657 if test $DFT_LWR_MODEL = shared || \
22658    test $DFT_LWR_MODEL = libtool ; then
22659
22660 # remove dl library from $LIBS
22661 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22662
22663 fi
22664 fi
22665 ### Set up low-level terminfo dependencies for makefiles.
22666
22667 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22668 # do not need libdl
22669 TICS_LIST=
22670 if test "x$with_dlsym" = xyes ; then
22671
22672 # remove dl library from $SHLIB_LIST
22673 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22674
22675 fi
22676
22677 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22678 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22679 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22680 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22681 then
22682         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22683 fi
22684
22685 if test "$with_ticlib" != no ; then
22686
22687         if test "x$with_ticlib" != xyes ; then
22688                 TICS_NAME=$with_ticlib
22689                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22690                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22691                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22692                 TICS_LIB_SUFFIX="${with_ticlib}"
22693         else
22694                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22695                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22696                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22697                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22698         fi
22699         TICS_LDFLAGS="-L${LIB_DIR}"
22700         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22701 else
22702         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22703         TICS_LDFLAGS="-L${LIB_DIR}"
22704         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22705 fi
22706
22707 if test "$with_termlib" != no ; then
22708
22709         if test "x$with_termlib" != xyes ; then
22710                 TINFO_NAME=$with_termlib
22711                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22712                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22713                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22714                 TINFO_LIB_SUFFIX="${with_termlib}"
22715         else
22716                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22717                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22718                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22719                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22720         fi
22721
22722         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22723         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22724         if test "$DFT_LWR_MODEL" = "libtool"; then
22725                 TEST_ARGS="${TEST_DEPS}"
22726                 TEST_ARG2="${TEST_DEP2}"
22727                 TINFO_LDFLAGS="-L${LIB_DIR}"
22728                 TINFO_LIBS="$TEST_ARGS"
22729                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22730                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22731         else
22732                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22733                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22734                 if test "x$with_term_driver" != xno ; then
22735                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22736                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22737                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22738                 else
22739                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22740                         TINFO_LIBS="$TEST_ARGS"
22741                 fi
22742                 TINFO_LDFLAGS="-L${LIB_DIR}"
22743                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22744         fi
22745 else
22746         # the next lines are needed for linking libtic over libncurses
22747         TINFO_NAME=${LIB_NAME}
22748         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22749         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22750         if test "x$with_tic_depends" = xyes ; then
22751                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22752         else
22753                 TICS_LIST="$SHLIB_LIST"
22754         fi
22755
22756         TINFO_LDFLAGS="-L${LIB_DIR}"
22757         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22758 fi
22759
22760 if test "$DFT_LWR_MODEL" = shared ; then
22761         case $cf_cv_system_name in
22762         (cygwin*|msys*)
22763                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22764                 TINFO_SUFFIX=.dll
22765                 ;;
22766         esac
22767 fi
22768
22769 if test "x$with_dlsym" = xyes ; then
22770
22771 # remove dl library from $TICS_LIST
22772 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22773
22774 fi
22775
22776 if test "$DFT_LWR_MODEL" = "libtool"; then
22777         OBJEXT=lo
22778 fi
22779
22780 # needed for Ada95
22781 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22782
22783 case $DFT_LWR_MODEL in
22784 (normal|debug|profile)
22785
22786 if test "$GCC" = yes ; then
22787         case $cf_cv_system_name in
22788         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22789                 LDFLAGS_STATIC=
22790                 LDFLAGS_SHARED=
22791                 ;;
22792         (*)     # normally, except when broken
22793                 LDFLAGS_STATIC=-static
22794                 LDFLAGS_SHARED=-dynamic
22795                 ;;
22796         esac
22797 else
22798         case $cf_cv_system_name in
22799         (aix[4-7]*)     # from ld manpage
22800                 LDFLAGS_STATIC=-bstatic
22801                 LDFLAGS_SHARED=-bdynamic
22802                 ;;
22803         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22804                 # We could also use just "archive" and "shared".
22805                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22806                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22807                 ;;
22808         (irix*)         # from ld manpage IRIX64
22809                 LDFLAGS_STATIC=-Bstatic
22810                 LDFLAGS_SHARED=-Bdynamic
22811                 ;;
22812         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22813                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22814                 LDFLAGS_STATIC=-noso
22815                 LDFLAGS_SHARED=-so_archive
22816                 ;;
22817         (solaris2*)
22818                 LDFLAGS_STATIC=-Bstatic
22819                 LDFLAGS_SHARED=-Bdynamic
22820                 ;;
22821         esac
22822 fi
22823
22824 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22825 then
22826         echo "$as_me:22826: checking if linker supports switching between static/dynamic" >&5
22827 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22828
22829         rm -f libconftest.a
22830         cat >conftest.$ac_ext <<EOF
22831 #line 22831 "configure"
22832 #include <stdio.h>
22833 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22834 EOF
22835         if { (eval echo "$as_me:22835: \"$ac_compile\"") >&5
22836   (eval $ac_compile) 2>&5
22837   ac_status=$?
22838   echo "$as_me:22838: \$? = $ac_status" >&5
22839   (exit $ac_status); } ; then
22840                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22841                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22842         fi
22843         rm -f conftest.*
22844
22845         cf_save_LIBS="$LIBS"
22846
22847         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22848         cat >conftest.$ac_ext <<_ACEOF
22849 #line 22849 "configure"
22850 #include "confdefs.h"
22851
22852 #line 22852 "configure"
22853 #include <stdio.h>
22854 int cf_ldflags_static(FILE *fp);
22855
22856 int
22857 main ()
22858 {
22859
22860         return cf_ldflags_static(stdin);
22861
22862   ;
22863   return 0;
22864 }
22865 _ACEOF
22866 rm -f conftest.$ac_objext conftest$ac_exeext
22867 if { (eval echo "$as_me:22867: \"$ac_link\"") >&5
22868   (eval $ac_link) 2>&5
22869   ac_status=$?
22870   echo "$as_me:22870: \$? = $ac_status" >&5
22871   (exit $ac_status); } &&
22872          { ac_try='test -s conftest$ac_exeext'
22873   { (eval echo "$as_me:22873: \"$ac_try\"") >&5
22874   (eval $ac_try) 2>&5
22875   ac_status=$?
22876   echo "$as_me:22876: \$? = $ac_status" >&5
22877   (exit $ac_status); }; }; then
22878
22879         # some linkers simply ignore the -dynamic
22880         case x`file conftest$ac_exeext 2>/dev/null` in
22881         (*static*)
22882                 cf_ldflags_static=no
22883                 ;;
22884         (*)
22885                 cf_ldflags_static=yes
22886                 ;;
22887         esac
22888
22889 else
22890   echo "$as_me: failed program was:" >&5
22891 cat conftest.$ac_ext >&5
22892 cf_ldflags_static=no
22893 fi
22894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22895
22896         rm -f libconftest.*
22897         LIBS="$cf_save_LIBS"
22898
22899         echo "$as_me:22899: result: $cf_ldflags_static" >&5
22900 echo "${ECHO_T}$cf_ldflags_static" >&6
22901
22902         if test $cf_ldflags_static != yes
22903         then
22904                 LDFLAGS_STATIC=
22905                 LDFLAGS_SHARED=
22906         fi
22907 else
22908         LDFLAGS_STATIC=
22909         LDFLAGS_SHARED=
22910 fi
22911
22912         ;;
22913 esac
22914
22915 echo "$as_me:22915: checking where we will install curses.h" >&5
22916 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22917
22918 includesubdir=
22919 if test "$with_overwrite" = no && \
22920  ( test "x$includedir" = 'x${prefix}/include' || \
22921    test "x$includedir" = "x${prefix}/include" )
22922 then
22923         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22924 fi
22925 echo "$as_me:22925: result: ${includedir}${includesubdir}" >&5
22926 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22927
22928 ### Resolve a conflict between normal and wide-curses by forcing applications
22929 ### that will need libutf8 to add it to their configure script.
22930 if test "$with_overwrite" != no ; then
22931 if test "$NCURSES_LIBUTF8" = 1 ; then
22932         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22933         { echo "$as_me:22933: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22934 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22935 fi
22936 fi
22937 WITH_OVERWRITE=$with_overwrite
22938
22939 # used to separate tack out of the tree
22940 NCURSES_TREE=
22941
22942 ### predefined stuff for the test programs
22943
22944 cat >>confdefs.h <<\EOF
22945 #define HAVE_SLK_COLOR 1
22946 EOF
22947
22948 ### Construct the list of subdirectories for which we'll customize makefiles
22949 ### with the appropriate compile-rules.
22950
22951 echo "$as_me:22951: checking for src modules" >&5
22952 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22953
22954 # dependencies and linker-arguments for test-programs
22955 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22956 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22957 if test "$DFT_LWR_MODEL" = "libtool"; then
22958         TEST_ARGS="${TEST_DEPS}"
22959         TEST_ARG2="${TEST_DEP2}"
22960 else
22961         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22962         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22963 fi
22964
22965 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22966 cf_cv_src_modules=
22967 for cf_dir in $modules_to_build
22968 do
22969         if test -f $srcdir/$cf_dir/modules; then
22970
22971                 # We may/may not have tack in the distribution, though the
22972                 # makefile is.
22973                 if test $cf_dir = tack ; then
22974                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22975                                 continue
22976                         fi
22977                 fi
22978
22979                 if test -z "$cf_cv_src_modules"; then
22980                         cf_cv_src_modules=$cf_dir
22981                 else
22982                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22983                 fi
22984
22985                 # Make the ncurses_cfg.h file record the library interface files as
22986                 # well.  These are header files that are the same name as their
22987                 # directory.  Ncurses is the only library that does not follow
22988                 # that pattern.
22989                 if test $cf_dir = tack ; then
22990                         continue
22991                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22992
22993 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22994
22995                         cat >>confdefs.h <<EOF
22996 #define HAVE_${cf_have_include}_H 1
22997 EOF
22998
22999                         cat >>confdefs.h <<EOF
23000 #define HAVE_LIB${cf_have_include} 1
23001 EOF
23002
23003                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23004                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23005                         if test "$DFT_LWR_MODEL" = "libtool"; then
23006                                 TEST_ARGS="${TEST_DEPS}"
23007                                 TEST_ARG2="${TEST_DEP2}"
23008                         else
23009                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23010                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23011                         fi
23012                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23013                 fi
23014         fi
23015 done
23016 echo "$as_me:23016: result: $cf_cv_src_modules" >&5
23017 echo "${ECHO_T}$cf_cv_src_modules" >&6
23018
23019 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23020 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23021
23022 SRC_SUBDIRS=
23023 if test "x$cf_with_manpages" != xno ; then
23024         SRC_SUBDIRS="$SRC_SUBDIRS man"
23025 fi
23026 SRC_SUBDIRS="$SRC_SUBDIRS include"
23027 for cf_dir in $cf_cv_src_modules
23028 do
23029         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23030 done
23031 if test "x$cf_with_tests" != "xno" ; then
23032         SRC_SUBDIRS="$SRC_SUBDIRS test"
23033 fi
23034 # always make this, to install the ncurses-config script
23035 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23036 if test "$cf_with_cxx_binding" != no; then
23037         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23038         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23039 fi
23040
23041 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23042 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23043
23044 ADA_SUBDIRS=
23045 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23046         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23047         ADA_SUBDIRS="gen src"
23048         if test "x$cf_with_tests" != "xno" ; then
23049                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23050         fi
23051 fi
23052
23053 SUB_MAKEFILES=
23054 for cf_dir in $SRC_SUBDIRS
23055 do
23056         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23057 done
23058
23059 if test -n "$ADA_SUBDIRS"; then
23060         for cf_dir in $ADA_SUBDIRS
23061         do
23062                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23063         done
23064
23065 fi
23066
23067 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23068    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23069    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23070 fi
23071
23072 DIRS_TO_MAKE="lib"
23073 for cf_item in $cf_list_models
23074 do
23075
23076         case $cf_item in
23077         (libtool) cf_subdir='obj_lo'  ;;
23078         (normal)  cf_subdir='objects' ;;
23079         (debug)   cf_subdir='obj_g' ;;
23080         (profile) cf_subdir='obj_p' ;;
23081         (shared)
23082                 case $cf_cv_system_name in
23083                 (cygwin|msys)
23084                         cf_subdir='objects' ;;
23085                 (*)
23086                         cf_subdir='obj_s' ;;
23087                 esac
23088         esac
23089
23090         for cf_item2 in $DIRS_TO_MAKE
23091         do
23092                 test $cf_item2 = $cf_subdir && break
23093         done
23094         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23095 done
23096 for cf_dir in $DIRS_TO_MAKE
23097 do
23098         test ! -d $cf_dir && mkdir $cf_dir
23099 done
23100
23101 # symbols that differ when compiling Ada95 by itself.
23102 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23103
23104 # values to use as strings
23105
23106 cat >>confdefs.h <<EOF
23107 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23108 EOF
23109
23110 cat >>confdefs.h <<EOF
23111 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23112 EOF
23113
23114 ### Now that we're done running tests, add the compiler-warnings, if any
23115
23116 cf_fix_cppflags=no
23117 cf_new_cflags=
23118 cf_new_cppflags=
23119 cf_new_extra_cppflags=
23120
23121 for cf_add_cflags in $EXTRA_CFLAGS
23122 do
23123 case $cf_fix_cppflags in
23124 (no)
23125         case $cf_add_cflags in
23126         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23127                 case $cf_add_cflags in
23128                 (-D*)
23129                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23130
23131                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23132                                 && test -z "${cf_tst_cflags}" \
23133                                 && cf_fix_cppflags=yes
23134
23135                         if test $cf_fix_cppflags = yes ; then
23136
23137         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23138         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23139
23140                                 continue
23141                         elif test "${cf_tst_cflags}" = "\"'" ; then
23142
23143         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23144         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23145
23146                                 continue
23147                         fi
23148                         ;;
23149                 esac
23150                 case "$CPPFLAGS" in
23151                 (*$cf_add_cflags)
23152                         ;;
23153                 (*)
23154                         case $cf_add_cflags in
23155                         (-D*)
23156                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23157
23158 CPPFLAGS=`echo "$CPPFLAGS" | \
23159         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23160                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23161
23162                                 ;;
23163                         esac
23164
23165         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23166         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23167
23168                         ;;
23169                 esac
23170                 ;;
23171         (*)
23172
23173         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23174         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23175
23176                 ;;
23177         esac
23178         ;;
23179 (yes)
23180
23181         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23182         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23183
23184         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23185
23186         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23187                 && test -z "${cf_tst_cflags}" \
23188                 && cf_fix_cppflags=no
23189         ;;
23190 esac
23191 done
23192
23193 if test -n "$cf_new_cflags" ; then
23194
23195         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23196         CFLAGS="${CFLAGS}$cf_new_cflags"
23197
23198 fi
23199
23200 if test -n "$cf_new_cppflags" ; then
23201
23202         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23203         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23204
23205 fi
23206
23207 if test -n "$cf_new_extra_cppflags" ; then
23208
23209         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23210         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23211
23212 fi
23213
23214 ### Define substitutions for header files to avoid name-pollution
23215
23216 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23217         HAVE_TCGETATTR=1
23218 else
23219         HAVE_TCGETATTR=0
23220 fi
23221
23222 if test "x$ac_cv_header_stdint_h" = xyes ; then
23223         HAVE_STDINT_H=1
23224 else
23225         HAVE_STDINT_H=0
23226 fi
23227
23228 if test "x$ac_cv_header_termio_h" = xyes ; then
23229         HAVE_TERMIO_H=1
23230 else
23231         HAVE_TERMIO_H=0
23232 fi
23233
23234 if test "x$ac_cv_header_termios_h" = xyes ; then
23235         HAVE_TERMIOS_H=1
23236 else
23237         HAVE_TERMIOS_H=0
23238 fi
23239
23240 ################################################################################
23241 test "x$use_database" = xyes && \
23242 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23243
23244 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23245 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23246
23247 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23248 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23249 fi
23250
23251 # Extract the first word of "tic", so it can be a program name with args.
23252 set dummy tic; ac_word=$2
23253 echo "$as_me:23253: checking for $ac_word" >&5
23254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23255 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23256   echo $ECHO_N "(cached) $ECHO_C" >&6
23257 else
23258   case $TIC_PATH in
23259   [\\/]* | ?:[\\/]*)
23260   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23261   ;;
23262   *)
23263   ac_save_IFS=$IFS; IFS=$ac_path_separator
23264 ac_dummy="$PATH:/usr/local/ncurses/bin"
23265 for ac_dir in $ac_dummy; do
23266   IFS=$ac_save_IFS
23267   test -z "$ac_dir" && ac_dir=.
23268   if $as_executable_p "$ac_dir/$ac_word"; then
23269    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23270    echo "$as_me:23270: found $ac_dir/$ac_word" >&5
23271    break
23272 fi
23273 done
23274
23275   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23276   ;;
23277 esac
23278 fi
23279 TIC_PATH=$ac_cv_path_TIC_PATH
23280
23281 if test -n "$TIC_PATH"; then
23282   echo "$as_me:23282: result: $TIC_PATH" >&5
23283 echo "${ECHO_T}$TIC_PATH" >&6
23284 else
23285   echo "$as_me:23285: result: no" >&5
23286 echo "${ECHO_T}no" >&6
23287 fi
23288
23289 if test -n "$FALLBACK_LIST"
23290 then
23291         if test "$TIC_PATH" = unknown
23292         then
23293                 { echo "$as_me:23293: WARNING: no tic program found for fallbacks" >&5
23294 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23295         fi
23296 fi
23297
23298 if test "x$cf_with_tests" != xno ; then
23299         MAKE_TESTS=
23300 else
23301         MAKE_TESTS="#"
23302 fi
23303
23304 ADAHTML_DIR=../../doc/html/ada
23305
23306 # these could be configurable, but are not currently
23307 PANEL_NAME=panel
23308 MENU_NAME=menu
23309 FORM_NAME=form
23310 CXX_NAME=ncurses++
23311
23312 # workaround for OS/2 (20151017)
23313 case $cf_cv_system_name in
23314 (os2*)
23315         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23316         ;;
23317 (*)
23318         LIBTOOL_OPTS_CXX=
23319         ;;
23320 esac
23321
23322 # workaround for g++ versus Solaris (20131116)
23323 case $cf_cv_system_name in
23324 (solaris2*)
23325         case "x$CPPFLAGS" in
23326         (*-D_XOPEN_SOURCE_EXTENDED*)
23327                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23328
23329 echo "${as_me:-configure}:23329: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23330
23331                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23332                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23333                 ;;
23334         esac
23335         ;;
23336 esac
23337
23338 # Help to automatically enable the extended curses features when using either
23339 # the *-config or the ".pc" files by adding defines.
23340 echo "$as_me:23340: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23341 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23342 PKG_CFLAGS=
23343 for cf_loop1 in $CPPFLAGS_after_XOPEN
23344 do
23345         cf_found=no
23346         for cf_loop2 in $CPPFLAGS_before_XOPEN
23347         do
23348                 if test "x$cf_loop1" = "x$cf_loop2"
23349                 then
23350                         cf_found=yes
23351                         break
23352                 fi
23353         done
23354         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23355 done
23356 echo "$as_me:23356: result: $PKG_CFLAGS" >&5
23357 echo "${ECHO_T}$PKG_CFLAGS" >&6
23358
23359 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23360 case "x$NCURSES_OSPEED" in
23361 (*short*)
23362         cf_compatible=1
23363         ;;
23364 (*)
23365         cf_compatible=0
23366         ;;
23367 esac
23368
23369 cat >>confdefs.h <<EOF
23370 #define NCURSES_OSPEED_COMPAT $cf_compatible
23371 EOF
23372
23373 case "x$cf_cv_typeof_chtype" in
23374 (xshort|xint|xlong)
23375         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23376         ;;
23377 esac
23378
23379 case "x$cf_cv_typeof_mmask_t" in
23380 (xshort|xint|xlong)
23381         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23382         ;;
23383 esac
23384
23385 # substitute into misc/Makefile to suppress
23386 # (un)install.data from the
23387 # (un)install rules.
23388 if test "x$cf_with_db_install" = "xno"; then
23389         MISC_INSTALL_DATA=
23390         MISC_UNINSTALL_DATA=
23391 else
23392         MISC_INSTALL_DATA=install.data
23393         MISC_UNINSTALL_DATA=uninstall.data
23394 fi
23395
23396 SUB_SCRIPTS=
23397
23398 if test -n "$PACKAGE"
23399 then
23400         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23401         export PACKAGE
23402         echo "package: $PACKAGE"
23403 fi
23404
23405 UNALTERED_SYMS=
23406 cf_filter_syms=no
23407
23408 if test -n "$RESULTING_SYMS"
23409 then
23410         cf_filter_syms=$cf_dft_filter_syms
23411         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23412
23413 echo "${as_me:-configure}:23413: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23414
23415 fi
23416
23417 if test "x$WILDCARD_SYMS" = xno
23418 then
23419         cf_filter_syms=yes
23420 fi
23421
23422 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23423
23424 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23425 if test $cf_filter_syms = yes
23426 then
23427         RESULTING_SYMS=resulting.map
23428 fi
23429
23430 if test "x$cross_compiling" = xyes ; then
23431         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23432 else
23433         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23434 fi
23435
23436 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"
23437 ac_config_commands="$ac_config_commands default"
23438 cat >confcache <<\_ACEOF
23439 # This file is a shell script that caches the results of configure
23440 # tests run on this system so they can be shared between configure
23441 # scripts and configure runs, see configure's option --config-cache.
23442 # It is not useful on other systems.  If it contains results you don't
23443 # want to keep, you may remove or edit it.
23444 #
23445 # config.status only pays attention to the cache file if you give it
23446 # the --recheck option to rerun configure.
23447 #
23448 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23449 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23450 # following values.
23451
23452 _ACEOF
23453
23454 # The following way of writing the cache mishandles newlines in values,
23455 # but we know of no workaround that is simple, portable, and efficient.
23456 # So, don't put newlines in cache variables' values.
23457 # Ultrix sh set writes to stderr and can't be redirected directly,
23458 # and sets the high bit in the cache file unless we assign to the vars.
23459 {
23460   (set) 2>&1 |
23461     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23462     *ac_space=\ *)
23463       # `set' does not quote correctly, so add quotes (double-quote
23464       # substitution turns \\\\ into \\, and sed turns \\ into \).
23465       sed -n \
23466         "s/'/'\\\\''/g;
23467           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23468       ;;
23469     *)
23470       # `set' quotes correctly as required by POSIX, so do not add quotes.
23471       sed -n \
23472         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23473       ;;
23474     esac;
23475 } |
23476   sed '
23477      t clear
23478      : clear
23479      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23480      t end
23481      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23482      : end' >>confcache
23483 if cmp -s $cache_file confcache; then :; else
23484   if test -w $cache_file; then
23485     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23486     cat confcache >$cache_file
23487   else
23488     echo "not updating unwritable cache $cache_file"
23489   fi
23490 fi
23491 rm -f confcache
23492
23493 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23494 # Let make expand exec_prefix.
23495 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23496
23497 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23498 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23499 # trailing colons and then remove the whole line if VPATH becomes empty
23500 # (actually we leave an empty line to preserve line numbers).
23501 if test "x$srcdir" = x.; then
23502   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23503 s/:*\$(srcdir):*/:/;
23504 s/:*\${srcdir}:*/:/;
23505 s/:*@srcdir@:*/:/;
23506 s/^\([^=]*=[    ]*\):*/\1/;
23507 s/:*$//;
23508 s/^[^=]*=[      ]*$//;
23509 }'
23510 fi
23511
23512 DEFS=-DHAVE_CONFIG_H
23513
23514 : ${CONFIG_STATUS=./config.status}
23515 ac_clean_files_save=$ac_clean_files
23516 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23517 { echo "$as_me:23517: creating $CONFIG_STATUS" >&5
23518 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23519 cat >$CONFIG_STATUS <<_ACEOF
23520 #! $SHELL
23521 # Generated automatically by configure.
23522 # Run this file to recreate the current configuration.
23523 # Compiler output produced by configure, useful for debugging
23524 # configure, is in config.log if it exists.
23525
23526 debug=false
23527 SHELL=\${CONFIG_SHELL-$SHELL}
23528 ac_cs_invocation="\$0 \$@"
23529
23530 _ACEOF
23531
23532 cat >>$CONFIG_STATUS <<\_ACEOF
23533 # Be Bourne compatible
23534 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23535   emulate sh
23536   NULLCMD=:
23537 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23538   set -o posix
23539 fi
23540
23541 # Name of the executable.
23542 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23543
23544 if expr a : '\(a\)' >/dev/null 2>&1; then
23545   as_expr=expr
23546 else
23547   as_expr=false
23548 fi
23549
23550 rm -f conf$$ conf$$.exe conf$$.file
23551 echo >conf$$.file
23552 if ln -s conf$$.file conf$$ 2>/dev/null; then
23553   # We could just check for DJGPP; but this test a) works b) is more generic
23554   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23555   if test -f conf$$.exe; then
23556     # Don't use ln at all; we don't have any links
23557     as_ln_s='cp -p'
23558   else
23559     as_ln_s='ln -s'
23560   fi
23561 elif ln conf$$.file conf$$ 2>/dev/null; then
23562   as_ln_s=ln
23563 else
23564   as_ln_s='cp -p'
23565 fi
23566 rm -f conf$$ conf$$.exe conf$$.file
23567
23568 as_executable_p="test -f"
23569
23570 # Support unset when possible.
23571 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23572   as_unset=unset
23573 else
23574   as_unset=false
23575 fi
23576
23577 # NLS nuisances.
23578 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23579 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23580 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23581 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23582 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23583 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23584 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23585 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23586
23587 # IFS
23588 # We need space, tab and new line, in precisely that order.
23589 as_nl='
23590 '
23591 IFS="   $as_nl"
23592
23593 # CDPATH.
23594 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23595
23596 exec 6>&1
23597
23598 _ACEOF
23599
23600 # Files that config.status was made for.
23601 if test -n "$ac_config_files"; then
23602   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23603 fi
23604
23605 if test -n "$ac_config_headers"; then
23606   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23607 fi
23608
23609 if test -n "$ac_config_links"; then
23610   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23611 fi
23612
23613 if test -n "$ac_config_commands"; then
23614   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23615 fi
23616
23617 cat >>$CONFIG_STATUS <<\EOF
23618
23619 ac_cs_usage="\
23620 \`$as_me' instantiates files from templates according to the
23621 current configuration.
23622
23623 Usage: $0 [OPTIONS] [FILE]...
23624
23625   -h, --help       print this help, then exit
23626   -V, --version    print version number, then exit
23627   -d, --debug      don't remove temporary files
23628       --recheck    update $as_me by reconfiguring in the same conditions
23629   --file=FILE[:TEMPLATE]
23630                    instantiate the configuration file FILE
23631   --header=FILE[:TEMPLATE]
23632                    instantiate the configuration header FILE
23633
23634 Configuration files:
23635 $config_files
23636
23637 Configuration headers:
23638 $config_headers
23639
23640 Configuration commands:
23641 $config_commands
23642
23643 Report bugs to <dickey@invisible-island.net>."
23644 EOF
23645
23646 cat >>$CONFIG_STATUS <<EOF
23647 ac_cs_version="\\
23648 config.status
23649 configured by $0, generated by GNU Autoconf 2.52.20150926,
23650   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23651
23652 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23653 Free Software Foundation, Inc.
23654 This config.status script is free software; the Free Software Foundation
23655 gives unlimited permission to copy, distribute and modify it."
23656 srcdir=$srcdir
23657 INSTALL="$INSTALL"
23658 EOF
23659
23660 cat >>$CONFIG_STATUS <<\EOF
23661 # If no file are specified by the user, then we need to provide default
23662 # value.  By we need to know if files were specified by the user.
23663 ac_need_defaults=:
23664 while test $# != 0
23665 do
23666   case $1 in
23667   --*=*)
23668     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23669     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23670     shift
23671     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23672     shift
23673     ;;
23674   -*);;
23675   *) # This is not an option, so the user has probably given explicit
23676      # arguments.
23677      ac_need_defaults=false;;
23678   esac
23679
23680   case $1 in
23681   # Handling of the options.
23682 EOF
23683 cat >>$CONFIG_STATUS <<EOF
23684   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23685     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23686     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23687 EOF
23688 cat >>$CONFIG_STATUS <<\EOF
23689   --version | --vers* | -V )
23690     echo "$ac_cs_version"; exit 0 ;;
23691   --he | --h)
23692     # Conflict between --help and --header
23693     { { echo "$as_me:23693: error: ambiguous option: $1
23694 Try \`$0 --help' for more information." >&5
23695 echo "$as_me: error: ambiguous option: $1
23696 Try \`$0 --help' for more information." >&2;}
23697    { (exit 1); exit 1; }; };;
23698   --help | --hel | -h )
23699     echo "$ac_cs_usage"; exit 0 ;;
23700   --debug | --d* | -d )
23701     debug=: ;;
23702   --file | --fil | --fi | --f )
23703     shift
23704     CONFIG_FILES="$CONFIG_FILES $1"
23705     ac_need_defaults=false;;
23706   --header | --heade | --head | --hea )
23707     shift
23708     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23709     ac_need_defaults=false;;
23710
23711   # This is an error.
23712   -*) { { echo "$as_me:23712: error: unrecognized option: $1
23713 Try \`$0 --help' for more information." >&5
23714 echo "$as_me: error: unrecognized option: $1
23715 Try \`$0 --help' for more information." >&2;}
23716    { (exit 1); exit 1; }; } ;;
23717
23718   *) ac_config_targets="$ac_config_targets $1" ;;
23719
23720   esac
23721   shift
23722 done
23723
23724 exec 5>>config.log
23725 cat >&5 << _ACEOF
23726
23727 ## ----------------------- ##
23728 ## Running config.status.  ##
23729 ## ----------------------- ##
23730
23731 This file was extended by $as_me 2.52.20150926, executed with
23732   CONFIG_FILES    = $CONFIG_FILES
23733   CONFIG_HEADERS  = $CONFIG_HEADERS
23734   CONFIG_LINKS    = $CONFIG_LINKS
23735   CONFIG_COMMANDS = $CONFIG_COMMANDS
23736   > $ac_cs_invocation
23737 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23738
23739 _ACEOF
23740 EOF
23741
23742 cat >>$CONFIG_STATUS <<EOF
23743 #
23744 # INIT-COMMANDS section.
23745 #
23746
23747 ### Special initialization commands, used to pass information from the
23748 ### configuration-run into config.status
23749
23750 AWK="$AWK"
23751 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23752 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23753 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23754 ECHO_LD="$ECHO_LD"
23755 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23756 LDCONFIG="$LDCONFIG"
23757 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23758 LIB_NAME="$LIB_NAME"
23759 LIB_PREFIX="$LIB_PREFIX"
23760 LIB_SUBSETS="$LIB_SUBSETS"
23761 LIB_SUFFIX="$LIB_SUFFIX"
23762 LIB_TRACING="$LIB_TRACING"
23763 LN_S="$LN_S"
23764 MAKE_TERMINFO="$MAKE_TERMINFO"
23765 NCURSES_MAJOR="$NCURSES_MAJOR"
23766 NCURSES_MINOR="$NCURSES_MINOR"
23767 NCURSES_OSPEED="$NCURSES_OSPEED"
23768 NCURSES_PATCH="$NCURSES_PATCH"
23769 SRC_SUBDIRS="$SRC_SUBDIRS"
23770 TERMINFO="$TERMINFO"
23771 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23772 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23773 TICS_NAME="$TICS_NAME"
23774 TICS_SUFFIX="$TICS_SUFFIX"
23775 TIC_PATH="$TIC_PATH"
23776 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23777 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23778 TINFO_NAME="$TINFO_NAME"
23779 TINFO_SUFFIX="$TINFO_SUFFIX"
23780 UNALTERED_SYMS="$UNALTERED_SYMS"
23781 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23782 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23783 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23784 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23785 WILDCARD_SYMS="$WILDCARD_SYMS"
23786 WITH_CURSES_H="$with_curses_h"
23787 WITH_ECHO="${enable_echo:=yes}"
23788 WITH_OVERWRITE="$with_overwrite"
23789 cf_LIST_MODELS="$cf_list_models"
23790 cf_cv_abi_version="$cf_cv_abi_version"
23791 cf_cv_do_relink="$cf_cv_do_relink"
23792 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23793 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23794 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23795 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23796 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23797 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23798 cf_cv_rel_version="$cf_cv_rel_version"
23799 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23800 cf_cv_shared_soname='$cf_cv_shared_soname'
23801 cf_cv_shlib_version="$cf_cv_shlib_version"
23802 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23803 cf_cv_system_name="$cf_cv_system_name"
23804 cf_cv_term_driver="$with_term_driver"
23805 cf_with_ada="$cf_with_ada"
23806 cf_with_cxx_binding="$cf_with_cxx_binding"
23807 cf_with_db_install="$cf_with_db_install"
23808 cf_with_manpages="$cf_with_manpages"
23809 cf_with_tests="$cf_with_tests"
23810 host="$host"
23811 target="$target"
23812 with_shared_cxx="$with_shared_cxx"
23813
23814 EOF
23815
23816 cat >>$CONFIG_STATUS <<\EOF
23817 for ac_config_target in $ac_config_targets
23818 do
23819   case "$ac_config_target" in
23820   # Handling of arguments.
23821   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23822   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23823   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23824   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23825   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23826   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23827   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23828   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23829   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23830   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23831   *) { { echo "$as_me:23831: error: invalid argument: $ac_config_target" >&5
23832 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23833    { (exit 1); exit 1; }; };;
23834   esac
23835 done
23836
23837 # If the user did not use the arguments to specify the items to instantiate,
23838 # then the envvar interface is used.  Set only those that are not.
23839 # We use the long form for the default assignment because of an extremely
23840 # bizarre bug on SunOS 4.1.3.
23841 if $ac_need_defaults; then
23842   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23843   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23844   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23845 fi
23846
23847 # Create a temporary directory, and hook for its removal unless debugging.
23848 $debug ||
23849 {
23850   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23851   trap '{ (exit 1); exit 1; }' 1 2 13 15
23852 }
23853
23854 # Create a (secure) tmp directory for tmp files.
23855 : ${TMPDIR=/tmp}
23856 {
23857   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23858   test -n "$tmp" && test -d "$tmp"
23859 }  ||
23860 {
23861   tmp=$TMPDIR/cs$$-$RANDOM
23862   (umask 077 && mkdir $tmp)
23863 } ||
23864 {
23865    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23866    { (exit 1); exit 1; }
23867 }
23868
23869 EOF
23870
23871 cat >>$CONFIG_STATUS <<EOF
23872
23873 #
23874 # CONFIG_FILES section.
23875 #
23876
23877 # No need to generate the scripts if there are no CONFIG_FILES.
23878 # This happens for instance when ./config.status config.h
23879 if test -n "\$CONFIG_FILES"; then
23880   # Protect against being on the right side of a sed subst in config.status.
23881   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23882    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23883 s,@SHELL@,$SHELL,;t t
23884 s,@exec_prefix@,$exec_prefix,;t t
23885 s,@prefix@,$prefix,;t t
23886 s,@program_transform_name@,$program_transform_name,;t t
23887 s,@bindir@,$bindir,;t t
23888 s,@sbindir@,$sbindir,;t t
23889 s,@libexecdir@,$libexecdir,;t t
23890 s,@datarootdir@,$datarootdir,;t t
23891 s,@datadir@,$datadir,;t t
23892 s,@sysconfdir@,$sysconfdir,;t t
23893 s,@sharedstatedir@,$sharedstatedir,;t t
23894 s,@localstatedir@,$localstatedir,;t t
23895 s,@libdir@,$libdir,;t t
23896 s,@includedir@,$includedir,;t t
23897 s,@oldincludedir@,$oldincludedir,;t t
23898 s,@infodir@,$infodir,;t t
23899 s,@mandir@,$mandir,;t t
23900 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23901 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23902 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23903 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23904 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23905 s,@build_alias@,$build_alias,;t t
23906 s,@host_alias@,$host_alias,;t t
23907 s,@target_alias@,$target_alias,;t t
23908 s,@ECHO_C@,$ECHO_C,;t t
23909 s,@ECHO_N@,$ECHO_N,;t t
23910 s,@ECHO_T@,$ECHO_T,;t t
23911 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23912 s,@DEFS@,$DEFS,;t t
23913 s,@LIBS@,$LIBS,;t t
23914 s,@top_builddir@,$top_builddir,;t t
23915 s,@EGREP@,$EGREP,;t t
23916 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23917 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23918 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23919 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23920 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23921 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23922 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23923 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23924 s,@VERSION@,$VERSION,;t t
23925 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23926 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23927 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23928 s,@PACKAGE@,$PACKAGE,;t t
23929 s,@build@,$build,;t t
23930 s,@build_cpu@,$build_cpu,;t t
23931 s,@build_vendor@,$build_vendor,;t t
23932 s,@build_os@,$build_os,;t t
23933 s,@host@,$host,;t t
23934 s,@host_cpu@,$host_cpu,;t t
23935 s,@host_vendor@,$host_vendor,;t t
23936 s,@host_os@,$host_os,;t t
23937 s,@target@,$target,;t t
23938 s,@target_cpu@,$target_cpu,;t t
23939 s,@target_vendor@,$target_vendor,;t t
23940 s,@target_os@,$target_os,;t t
23941 s,@CC@,$CC,;t t
23942 s,@CFLAGS@,$CFLAGS,;t t
23943 s,@LDFLAGS@,$LDFLAGS,;t t
23944 s,@CPPFLAGS@,$CPPFLAGS,;t t
23945 s,@ac_ct_CC@,$ac_ct_CC,;t t
23946 s,@EXEEXT@,$EXEEXT,;t t
23947 s,@OBJEXT@,$OBJEXT,;t t
23948 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23949 s,@CPP@,$CPP,;t t
23950 s,@LDCONFIG@,$LDCONFIG,;t t
23951 s,@CXX@,$CXX,;t t
23952 s,@CXXFLAGS@,$CXXFLAGS,;t t
23953 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23954 s,@AWK@,$AWK,;t t
23955 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23956 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23957 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23958 s,@LINT@,$LINT,;t t
23959 s,@LINT_OPTS@,$LINT_OPTS,;t t
23960 s,@LN_S@,$LN_S,;t t
23961 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23962 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23963 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23964 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23965 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23966 s,@SET_MAKE@,$SET_MAKE,;t t
23967 s,@CTAGS@,$CTAGS,;t t
23968 s,@ETAGS@,$ETAGS,;t t
23969 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23970 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23971 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23972 s,@RANLIB@,$RANLIB,;t t
23973 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23974 s,@LD@,$LD,;t t
23975 s,@ac_ct_LD@,$ac_ct_LD,;t t
23976 s,@AR@,$AR,;t t
23977 s,@ac_ct_AR@,$ac_ct_AR,;t t
23978 s,@NM@,$NM,;t t
23979 s,@ac_ct_NM@,$ac_ct_NM,;t t
23980 s,@ARFLAGS@,$ARFLAGS,;t t
23981 s,@DESTDIR@,$DESTDIR,;t t
23982 s,@BUILD_CC@,$BUILD_CC,;t t
23983 s,@BUILD_CPP@,$BUILD_CPP,;t t
23984 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23985 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23986 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23987 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23988 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23989 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23990 s,@cf_list_models@,$cf_list_models,;t t
23991 s,@ABI_VERSION@,$ABI_VERSION,;t t
23992 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23993 s,@LIBTOOL@,$LIBTOOL,;t t
23994 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23995 s,@LT_UNDEF@,$LT_UNDEF,;t t
23996 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23997 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23998 s,@LIB_CREATE@,$LIB_CREATE,;t t
23999 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24000 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24001 s,@LIB_PREP@,$LIB_PREP,;t t
24002 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24003 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24004 s,@LIB_LINK@,$LIB_LINK,;t t
24005 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24006 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24007 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24008 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24009 s,@TICS_NAME@,$TICS_NAME,;t t
24010 s,@TINFO_NAME@,$TINFO_NAME,;t t
24011 s,@LIB_NAME@,$LIB_NAME,;t t
24012 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24013 s,@CC_G_OPT@,$CC_G_OPT,;t t
24014 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24015 s,@LD_MODEL@,$LD_MODEL,;t t
24016 s,@shlibdir@,$shlibdir,;t t
24017 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24018 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24019 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24020 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24021 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24022 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24023 s,@LINK_PROGS@,$LINK_PROGS,;t t
24024 s,@LINK_TESTS@,$LINK_TESTS,;t t
24025 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24026 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24027 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24028 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24029 s,@RPATH_LIST@,$RPATH_LIST,;t t
24030 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24031 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24032 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24033 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24034 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24035 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24036 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24037 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24038 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24039 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24040 s,@XTERM_KBS@,$XTERM_KBS,;t t
24041 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24042 s,@TERMINFO@,$TERMINFO,;t t
24043 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24044 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24045 s,@TERMPATH@,$TERMPATH,;t t
24046 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24047 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24048 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24049 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24050 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24051 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24052 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24053 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24054 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24055 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24056 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24057 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24058 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24059 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24060 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24061 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24062 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24063 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24064 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24065 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24066 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24067 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24068 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24069 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24070 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24071 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24072 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24073 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24074 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24075 s,@PTHREAD@,$PTHREAD,;t t
24076 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24077 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24078 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24079 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24080 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24081 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24082 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24083 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24084 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24085 s,@ECHO_LT@,$ECHO_LT,;t t
24086 s,@ECHO_LD@,$ECHO_LD,;t t
24087 s,@RULE_CC@,$RULE_CC,;t t
24088 s,@SHOW_CC@,$SHOW_CC,;t t
24089 s,@ECHO_CC@,$ECHO_CC,;t t
24090 s,@ECHO_LINK@,$ECHO_LINK,;t t
24091 s,@ADAFLAGS@,$ADAFLAGS,;t t
24092 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24093 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24094 s,@ADA_TRACE@,$ADA_TRACE,;t t
24095 s,@MATH_LIB@,$MATH_LIB,;t t
24096 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24097 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24098 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24099 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24100 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24101 s,@TEST_LIBS@,$TEST_LIBS,;t t
24102 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24103 s,@CXXCPP@,$CXXCPP,;t t
24104 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24105 s,@CXX_AR@,$CXX_AR,;t t
24106 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24107 s,@CXXLIBS@,$CXXLIBS,;t t
24108 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24109 s,@gnat_exists@,$gnat_exists,;t t
24110 s,@M4_exists@,$M4_exists,;t t
24111 s,@cf_ada_make@,$cf_ada_make,;t t
24112 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24113 s,@cf_compile_generics@,$cf_compile_generics,;t t
24114 s,@cf_generic_objects@,$cf_generic_objects,;t t
24115 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24116 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24117 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24118 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24119 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24120 s,@cf_ada_package@,$cf_ada_package,;t t
24121 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24122 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24123 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24124 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24125 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24126 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24127 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24128 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24129 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24130 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24131 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24132 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24133 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24134 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24135 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24136 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24137 s,@TICS_LIBS@,$TICS_LIBS,;t t
24138 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24139 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24140 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24141 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24142 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24143 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24144 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24145 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24146 s,@includesubdir@,$includesubdir,;t t
24147 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24148 s,@TICS_LIST@,$TICS_LIST,;t t
24149 s,@TINFO_LIST@,$TINFO_LIST,;t t
24150 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24151 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24152 s,@TEST_ARGS@,$TEST_ARGS,;t t
24153 s,@TEST_DEPS@,$TEST_DEPS,;t t
24154 s,@TEST_ARG2@,$TEST_ARG2,;t t
24155 s,@TEST_DEP2@,$TEST_DEP2,;t t
24156 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24157 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24158 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24159 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24160 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24161 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24162 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24163 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24164 s,@cross_compiling@,$cross_compiling,;t t
24165 s,@TIC_PATH@,$TIC_PATH,;t t
24166 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24167 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24168 s,@PANEL_NAME@,$PANEL_NAME,;t t
24169 s,@MENU_NAME@,$MENU_NAME,;t t
24170 s,@FORM_NAME@,$FORM_NAME,;t t
24171 s,@CXX_NAME@,$CXX_NAME,;t t
24172 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24173 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24174 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24175 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24176 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24177 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24178 CEOF
24179
24180 EOF
24181
24182   cat >>$CONFIG_STATUS <<\EOF
24183   # Split the substitutions into bite-sized pieces for seds with
24184   # small command number limits, like on Digital OSF/1 and HP-UX.
24185   ac_max_sed_lines=48
24186   ac_sed_frag=1 # Number of current file.
24187   ac_beg=1 # First line for current file.
24188   ac_end=$ac_max_sed_lines # Line after last line for current file.
24189   ac_more_lines=:
24190   ac_sed_cmds=
24191   while $ac_more_lines; do
24192     if test $ac_beg -gt 1; then
24193       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24194     else
24195       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24196     fi
24197     if test ! -s $tmp/subs.frag; then
24198       ac_more_lines=false
24199     else
24200       # The purpose of the label and of the branching condition is to
24201       # speed up the sed processing (if there are no `@' at all, there
24202       # is no need to browse any of the substitutions).
24203       # These are the two extra sed commands mentioned above.
24204       (echo ':t
24205   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24206       # It is possible to make a multiline substitution using escaped newlines.
24207       # Ensure that we do not split the substitution between script fragments.
24208       ac_BEG=$ac_end
24209       ac_END=`expr $ac_end + $ac_max_sed_lines`
24210       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24211       if test -s $tmp/subs.next; then
24212         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24213         if test ! -s $tmp/subs.edit; then
24214           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24215           if test ! -s $tmp/subs.edit; then
24216             if test $ac_beg -gt 1; then
24217               ac_end=`expr $ac_end - 1`
24218               continue
24219             fi
24220           fi
24221         fi
24222       fi
24223
24224       if test -z "$ac_sed_cmds"; then
24225         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24226       else
24227         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24228       fi
24229       ac_sed_frag=`expr $ac_sed_frag + 1`
24230       ac_beg=$ac_end
24231       ac_end=`expr $ac_end + $ac_max_sed_lines`
24232     fi
24233   done
24234   if test -z "$ac_sed_cmds"; then
24235     ac_sed_cmds=cat
24236   fi
24237 fi # test -n "$CONFIG_FILES"
24238
24239 EOF
24240 cat >>$CONFIG_STATUS <<\EOF
24241 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24242   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24243   case $ac_file in
24244   - | *:- | *:-:* ) # input from stdin
24245         cat >$tmp/stdin
24246         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24247         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24248   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24249         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24250   * )   ac_file_in=$ac_file.in ;;
24251   esac
24252
24253   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24254   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24255          X"$ac_file" : 'X\(//\)[^/]' \| \
24256          X"$ac_file" : 'X\(//\)$' \| \
24257          X"$ac_file" : 'X\(/\)' \| \
24258          .     : '\(.\)' 2>/dev/null ||
24259 echo X"$ac_file" |
24260     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24261           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24262           /^X\(\/\/\)$/{ s//\1/; q; }
24263           /^X\(\/\).*/{ s//\1/; q; }
24264           s/.*/./; q'`
24265   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24266     { case "$ac_dir" in
24267   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24268   *)                      as_incr_dir=.;;
24269 esac
24270 as_dummy="$ac_dir"
24271 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24272   case $as_mkdir_dir in
24273     # Skip DOS drivespec
24274     ?:) as_incr_dir=$as_mkdir_dir ;;
24275     *)
24276       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24277       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24278     ;;
24279   esac
24280 done; }
24281
24282     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24283     # A "../" for each directory in $ac_dir_suffix.
24284     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24285   else
24286     ac_dir_suffix= ac_dots=
24287   fi
24288
24289   case $srcdir in
24290   .)  ac_srcdir=.
24291       if test -z "$ac_dots"; then
24292          ac_top_srcdir=.
24293       else
24294          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24295       fi ;;
24296   [\\/]* | ?:[\\/]* )
24297       ac_srcdir=$srcdir$ac_dir_suffix;
24298       ac_top_srcdir=$srcdir ;;
24299   *) # Relative path.
24300     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24301     ac_top_srcdir=$ac_dots$srcdir ;;
24302   esac
24303
24304   case $INSTALL in
24305   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24306   *) ac_INSTALL=$ac_dots$INSTALL ;;
24307   esac
24308
24309   if test x"$ac_file" != x-; then
24310     { echo "$as_me:24310: creating $ac_file" >&5
24311 echo "$as_me: creating $ac_file" >&6;}
24312     rm -f "$ac_file"
24313   fi
24314   # Let's still pretend it is `configure' which instantiates (i.e., don't
24315   # use $as_me), people would be surprised to read:
24316   #    /* config.h.  Generated automatically by config.status.  */
24317   configure_input="Generated automatically from `echo $ac_file_in |
24318                                                  sed 's,.*/,,'` by configure."
24319
24320   # First look for the input files in the build tree, otherwise in the
24321   # src tree.
24322   ac_file_inputs=`IFS=:
24323     for f in $ac_file_in; do
24324       case $f in
24325       -) echo $tmp/stdin ;;
24326       [\\/$]*)
24327          # Absolute (can't be DOS-style, as IFS=:)
24328          test -f "$f" || { { echo "$as_me:24328: error: cannot find input file: $f" >&5
24329 echo "$as_me: error: cannot find input file: $f" >&2;}
24330    { (exit 1); exit 1; }; }
24331          echo $f;;
24332       *) # Relative
24333          if test -f "$f"; then
24334            # Build tree
24335            echo $f
24336          elif test -f "$srcdir/$f"; then
24337            # Source tree
24338            echo $srcdir/$f
24339          else
24340            # /dev/null tree
24341            { { echo "$as_me:24341: error: cannot find input file: $f" >&5
24342 echo "$as_me: error: cannot find input file: $f" >&2;}
24343    { (exit 1); exit 1; }; }
24344          fi;;
24345       esac
24346     done` || { (exit 1); exit 1; }
24347 EOF
24348 cat >>$CONFIG_STATUS <<\EOF
24349   ac_warn_datarootdir=no
24350   if test x"$ac_file" != x-; then
24351     for ac_item in $ac_file_inputs
24352     do
24353       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24354       if test -n "$ac_seen"; then
24355         ac_used=`grep '@datarootdir@' $ac_item`
24356         if test -z "$ac_used"; then
24357           { echo "$as_me:24357: WARNING: datarootdir was used implicitly but not set:
24358 $ac_seen" >&5
24359 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24360 $ac_seen" >&2;}
24361           ac_warn_datarootdir=yes
24362         fi
24363       fi
24364       ac_seen=`grep '${datarootdir}' $ac_item`
24365       if test -n "$ac_seen"; then
24366         { echo "$as_me:24366: WARNING: datarootdir was used explicitly but not set:
24367 $ac_seen" >&5
24368 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24369 $ac_seen" >&2;}
24370         ac_warn_datarootdir=yes
24371       fi
24372     done
24373   fi
24374
24375 if test "x$ac_warn_datarootdir" = xyes; then
24376   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24377 fi
24378
24379 EOF
24380 cat >>$CONFIG_STATUS <<EOF
24381   sed "$ac_vpsub
24382 $extrasub
24383 EOF
24384 cat >>$CONFIG_STATUS <<\EOF
24385 :t
24386 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24387 s,@configure_input@,$configure_input,;t t
24388 s,@srcdir@,$ac_srcdir,;t t
24389 s,@top_srcdir@,$ac_top_srcdir,;t t
24390 s,@INSTALL@,$ac_INSTALL,;t t
24391 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24392   rm -f $tmp/stdin
24393   if test x"$ac_file" != x-; then
24394     cp $tmp/out $ac_file
24395
24396     for ac_name in prefix exec_prefix datarootdir
24397     do
24398         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24399         if test -n "$ac_seen"; then
24400             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24401             if test -z "$ac_init"; then
24402               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24403               { echo "$as_me:24403: WARNING: Variable $ac_name is used but was not set:
24404 $ac_seen" >&5
24405 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24406 $ac_seen" >&2;}
24407             fi
24408         fi
24409     done
24410     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24411     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24412     if test -s $tmp/out; then
24413       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24414       { echo "$as_me:24414: WARNING: Some variables may not be substituted:
24415 $ac_seen" >&5
24416 echo "$as_me: WARNING: Some variables may not be substituted:
24417 $ac_seen" >&2;}
24418     fi
24419   else
24420     cat $tmp/out
24421   fi
24422   rm -f $tmp/out
24423
24424 done
24425 EOF
24426 cat >>$CONFIG_STATUS <<\EOF
24427
24428 #
24429 # CONFIG_HEADER section.
24430 #
24431
24432 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24433 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24434 #
24435 # ac_d sets the value in "#define NAME VALUE" lines.
24436 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24437 ac_dB='[        ].*$,\1#\2'
24438 ac_dC=' '
24439 ac_dD=',;t'
24440 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24441 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24442 ac_iB='\([      ]\),\1#\2define\3'
24443 ac_iC=' '
24444 ac_iD='\4,;t'
24445 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24446 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24447 ac_uB='$,\1#\2define\3'
24448 ac_uC=' '
24449 ac_uD=',;t'
24450
24451 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24452   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24453   case $ac_file in
24454   - | *:- | *:-:* ) # input from stdin
24455         cat >$tmp/stdin
24456         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24457         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24458   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24459         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24460   * )   ac_file_in=$ac_file.in ;;
24461   esac
24462
24463   test x"$ac_file" != x- && { echo "$as_me:24463: creating $ac_file" >&5
24464 echo "$as_me: creating $ac_file" >&6;}
24465
24466   # First look for the input files in the build tree, otherwise in the
24467   # src tree.
24468   ac_file_inputs=`IFS=:
24469     for f in $ac_file_in; do
24470       case $f in
24471       -) echo $tmp/stdin ;;
24472       [\\/$]*)
24473          # Absolute (can't be DOS-style, as IFS=:)
24474          test -f "$f" || { { echo "$as_me:24474: error: cannot find input file: $f" >&5
24475 echo "$as_me: error: cannot find input file: $f" >&2;}
24476    { (exit 1); exit 1; }; }
24477          echo $f;;
24478       *) # Relative
24479          if test -f "$f"; then
24480            # Build tree
24481            echo $f
24482          elif test -f "$srcdir/$f"; then
24483            # Source tree
24484            echo $srcdir/$f
24485          else
24486            # /dev/null tree
24487            { { echo "$as_me:24487: error: cannot find input file: $f" >&5
24488 echo "$as_me: error: cannot find input file: $f" >&2;}
24489    { (exit 1); exit 1; }; }
24490          fi;;
24491       esac
24492     done` || { (exit 1); exit 1; }
24493   # Remove the trailing spaces.
24494   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24495
24496 EOF
24497
24498 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24499 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24500 # be either 'cat' or 'sort'.
24501 cat confdefs.h | uniq >conftest.vals
24502
24503 # Break up conftest.vals because some shells have a limit on
24504 # the size of here documents, and old seds have small limits too.
24505
24506 rm -f conftest.tail
24507 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24508 while grep . conftest.vals >/dev/null
24509 do
24510   # Write chunks of a limited-size here document to conftest.frag.
24511   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24512   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24513   echo 'CEOF' >> $CONFIG_STATUS
24514   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24515   rm -f conftest.vals
24516   mv conftest.tail conftest.vals
24517 done
24518 rm -f conftest.vals
24519
24520 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24521 # marker @DEFS@.
24522 echo '  cat >> conftest.edit <<CEOF
24523 /@DEFS@/r conftest.frag
24524 /@DEFS@/d
24525 CEOF
24526 sed -f conftest.edit $tmp/in > $tmp/out
24527 rm -f $tmp/in
24528 mv $tmp/out $tmp/in
24529 rm -f conftest.edit conftest.frag
24530 ' >> $CONFIG_STATUS
24531
24532 cat >>$CONFIG_STATUS <<\EOF
24533   # Let's still pretend it is `configure' which instantiates (i.e., don't
24534   # use $as_me), people would be surprised to read:
24535   #    /* config.h.  Generated automatically by config.status.  */
24536   if test x"$ac_file" = x-; then
24537     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24538   else
24539     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24540   fi
24541   cat $tmp/in >>$tmp/config.h
24542   rm -f $tmp/in
24543   if test x"$ac_file" != x-; then
24544     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24545       { echo "$as_me:24545: $ac_file is unchanged" >&5
24546 echo "$as_me: $ac_file is unchanged" >&6;}
24547     else
24548       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24549          X"$ac_file" : 'X\(//\)[^/]' \| \
24550          X"$ac_file" : 'X\(//\)$' \| \
24551          X"$ac_file" : 'X\(/\)' \| \
24552          .     : '\(.\)' 2>/dev/null ||
24553 echo X"$ac_file" |
24554     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24555           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24556           /^X\(\/\/\)$/{ s//\1/; q; }
24557           /^X\(\/\).*/{ s//\1/; q; }
24558           s/.*/./; q'`
24559       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24560         { case "$ac_dir" in
24561   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24562   *)                      as_incr_dir=.;;
24563 esac
24564 as_dummy="$ac_dir"
24565 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24566   case $as_mkdir_dir in
24567     # Skip DOS drivespec
24568     ?:) as_incr_dir=$as_mkdir_dir ;;
24569     *)
24570       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24571       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24572     ;;
24573   esac
24574 done; }
24575
24576       fi
24577       rm -f $ac_file
24578       mv $tmp/config.h $ac_file
24579     fi
24580   else
24581     cat $tmp/config.h
24582     rm -f $tmp/config.h
24583   fi
24584 done
24585 EOF
24586 cat >>$CONFIG_STATUS <<\EOF
24587 #
24588 # CONFIG_COMMANDS section.
24589 #
24590 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24591   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24592   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24593
24594   case $ac_dest in
24595     default )
24596 if test "x$cf_with_tests" != xno ; then
24597
24598 for cf_dir in test
24599 do
24600         if test ! -d $srcdir/$cf_dir; then
24601                 continue
24602         elif test -f $srcdir/$cf_dir/programs; then
24603                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24604         fi
24605 done
24606
24607 fi
24608
24609 cf_prefix=$LIB_PREFIX
24610
24611 case $cf_cv_shlib_version in
24612 (cygdll|msysdll|mingw)
24613         TINFO_NAME=$TINFO_ARG_SUFFIX
24614         TINFO_SUFFIX=.dll
24615         ;;
24616 esac
24617
24618 if test -n "$TINFO_SUFFIX" ; then
24619         case $TINFO_SUFFIX in
24620         (tw*)
24621                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24622                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24623                 ;;
24624         (t*)
24625                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24626                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24627                 ;;
24628         (w*)
24629                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24630                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24631                 ;;
24632         esac
24633 fi
24634
24635 for cf_dir in $SRC_SUBDIRS
24636 do
24637         if test ! -d $srcdir/$cf_dir ; then
24638                 continue
24639         elif test -f $srcdir/$cf_dir/modules; then
24640
24641                 SHARED_LIB=
24642                 Libs_To_Make=
24643                 cf_awk_program=
24644                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24645                 then
24646                         cf_awk_program="$cf_awk_program\
24647 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24648 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24649 "
24650                 fi
24651
24652                 if test "x$WILDCARD_SYMS" = xno
24653                 then
24654                         cf_awk_program="$cf_awk_program\
24655 /[      ]_\\*;/ { skip=1; next; }\
24656 "
24657                 fi
24658
24659                 if test "x$cf_awk_program" != "x"
24660                 then
24661                         cat >>$cf_dir/Makefile <<CF_EOF
24662
24663 # Generated by CF_LIB_RULES
24664 resulting.map: $UNALTERED_SYMS
24665         $AWK 'BEGIN { skip = 1; last=""; } \
24666 $cf_awk_program \
24667 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24668  skip = 0; last = \$\$0; } \
24669 END { print last; }' < $UNALTERED_SYMS >\$@
24670
24671 distclean::
24672         rm -f resulting.map
24673 CF_EOF
24674                 fi
24675
24676                 for cf_item in $cf_LIST_MODELS
24677                 do
24678
24679         case X$cf_item in
24680         (Xlibtool)
24681                 cf_suffix='.la'
24682                 cf_depsuf=$cf_suffix
24683                 ;;
24684         (Xdebug)
24685                 cf_suffix='_g.a'
24686                 cf_depsuf=$cf_suffix
24687                 ;;
24688         (Xprofile)
24689                 cf_suffix='_p.a'
24690                 cf_depsuf=$cf_suffix
24691                 ;;
24692         (Xshared)
24693                 case $cf_cv_system_name in
24694                 (aix[5-7]*)
24695                         cf_suffix='.so'
24696                         cf_depsuf=$cf_suffix
24697                         ;;
24698                 (cygwin*|msys*|mingw*)
24699                         cf_suffix='.dll'
24700                         cf_depsuf='.dll.a'
24701                         ;;
24702                 (darwin*)
24703                         cf_suffix='.dylib'
24704                         cf_depsuf=$cf_suffix
24705                         ;;
24706                 (hpux*)
24707                         case $target in
24708                         (ia64*)
24709                                 cf_suffix='.so'
24710                                 cf_depsuf=$cf_suffix
24711                                 ;;
24712                         (*)
24713                                 cf_suffix='.sl'
24714                                 cf_depsuf=$cf_suffix
24715                                 ;;
24716                         esac
24717                         ;;
24718                 (*)
24719                         cf_suffix='.so'
24720                         cf_depsuf=$cf_suffix
24721                         ;;
24722                 esac
24723                 ;;
24724         (*)
24725                 cf_suffix='.a'
24726                 cf_depsuf=$cf_suffix
24727                 ;;
24728         esac
24729         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24730         then
24731                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24732                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24733         fi
24734
24735                         cf_libname=$cf_dir
24736                         test "$cf_dir" = c++ && cf_libname=ncurses++
24737                         if test $cf_item = shared ; then
24738                                 if test -n "${LIB_SUFFIX}"
24739                                 then
24740                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24741                                 else
24742                                         cf_shared_suffix="$cf_suffix"
24743                                 fi
24744                                 if test "$cf_cv_do_symlinks" = yes ; then
24745                                         cf_version_name=
24746
24747                                         case "$cf_cv_shlib_version" in
24748                                         (rel)
24749                                                 cf_version_name=REL_VERSION
24750                                                 ;;
24751                                         (abi)
24752                                                 cf_version_name=ABI_VERSION
24753                                                 ;;
24754                                         esac
24755
24756                                         if test -n "$cf_version_name"
24757                                         then
24758                                                 case "$cf_cv_system_name" in
24759                                                 (darwin*)
24760                                                         # "w", etc?
24761                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24762                                                         ;;
24763                                                 (*)
24764                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24765                                                         ;;
24766                                                 esac
24767                                         fi
24768                                         if test -n "${USE_LIB_SUFFIX}"
24769                                         then
24770                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24771                                         else
24772                                                 cf_shared_suffix="$cf_suffix"
24773                                         fi
24774                                 fi
24775                                 # cygwin needs import library, and has unique naming convention
24776                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24777                                 # use 'cyg' prefix for shared lib.
24778                                 case $cf_cv_shlib_version in
24779                                 (cygdll)
24780                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24781                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24782                                         ;;
24783                                 (msysdll)
24784                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24785                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24786                                         ;;
24787                                 (mingw)
24788                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24789                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24790                                         ;;
24791                                 (*)
24792                                         cf_add_lib=
24793                                         ;;
24794                                 esac
24795                                 if test -n "$cf_add_lib"
24796                                 then
24797                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24798                                         continue
24799                                 fi
24800                         fi
24801                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24802                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24803                 done
24804
24805                 if test $cf_dir = ncurses ; then
24806                         cf_subsets="$LIB_SUBSETS"
24807                         cf_r_parts="$cf_subsets"
24808                         cf_liblist="$Libs_To_Make"
24809
24810                         while test -n "$cf_r_parts"
24811                         do
24812                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24813                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24814                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24815                                         cf_add_lib=
24816                                         case $cf_l_parts in
24817                                         (*termlib*)
24818                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24819                                                 ;;
24820                                         (*ticlib*)
24821                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24822                                                 ;;
24823                                         (*)
24824                                                 break
24825                                                 ;;
24826                                         esac
24827                                         if test -n "$cf_add_lib"; then
24828                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24829                                         fi
24830                                 else
24831                                         break
24832                                 fi
24833                         done
24834                 else
24835                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24836                 fi
24837
24838                 if test $cf_dir = c++; then
24839                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24840                                 cf_list=
24841                                 for cf_item in $Libs_To_Make
24842                                 do
24843                                         case $cf_item in
24844                                         (*.a)
24845                                                 ;;
24846                                         (*)
24847                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24848                                                 ;;
24849                                         esac
24850                                         for cf_test in $cf_list
24851                                         do
24852                                                 if test "$cf_test" = "$cf_item"
24853                                                 then
24854                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24855                                                         cf_item=
24856                                                         break
24857                                                 fi
24858                                         done
24859                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24860                                 done
24861                                 Libs_To_Make="$cf_list"
24862                         fi
24863                 fi
24864
24865                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24866                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24867                         $cf_dir/Makefile >$cf_dir/Makefile.out
24868                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24869
24870                 $AWK -f $srcdir/mk-0th.awk \
24871                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24872                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24873
24874                 for cf_subset in $cf_subsets
24875                 do
24876                         cf_subdirs=
24877                         for cf_item in $cf_LIST_MODELS
24878                         do
24879
24880                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24881
24882 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24883
24884                         CXX_MODEL=$cf_ITEM
24885                         if test "$CXX_MODEL" = SHARED; then
24886                                 case $cf_cv_shlib_version in
24887                                 (cygdll|msysdll|mingw)
24888                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24889
24890 echo "${as_me:-configure}:24890: testing overriding CXX_MODEL to SHARED ..." 1>&5
24891
24892                                         with_shared_cxx=yes
24893                                         ;;
24894                                 (*)
24895                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24896                                         ;;
24897                                 esac
24898                         fi
24899
24900         case X$cf_item in
24901         (Xlibtool)
24902                 cf_suffix='.la'
24903                 cf_depsuf=$cf_suffix
24904                 ;;
24905         (Xdebug)
24906                 cf_suffix='_g.a'
24907                 cf_depsuf=$cf_suffix
24908                 ;;
24909         (Xprofile)
24910                 cf_suffix='_p.a'
24911                 cf_depsuf=$cf_suffix
24912                 ;;
24913         (Xshared)
24914                 case $cf_cv_system_name in
24915                 (aix[5-7]*)
24916                         cf_suffix='.so'
24917                         cf_depsuf=$cf_suffix
24918                         ;;
24919                 (cygwin*|msys*|mingw*)
24920                         cf_suffix='.dll'
24921                         cf_depsuf='.dll.a'
24922                         ;;
24923                 (darwin*)
24924                         cf_suffix='.dylib'
24925                         cf_depsuf=$cf_suffix
24926                         ;;
24927                 (hpux*)
24928                         case $target in
24929                         (ia64*)
24930                                 cf_suffix='.so'
24931                                 cf_depsuf=$cf_suffix
24932                                 ;;
24933                         (*)
24934                                 cf_suffix='.sl'
24935                                 cf_depsuf=$cf_suffix
24936                                 ;;
24937                         esac
24938                         ;;
24939                 (*)
24940                         cf_suffix='.so'
24941                         cf_depsuf=$cf_suffix
24942                         ;;
24943                 esac
24944                 ;;
24945         (*)
24946                 cf_suffix='.a'
24947                 cf_depsuf=$cf_suffix
24948                 ;;
24949         esac
24950         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24951         then
24952                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24953                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24954         fi
24955
24956         case $cf_item in
24957         (libtool) cf_subdir='obj_lo'  ;;
24958         (normal)  cf_subdir='objects' ;;
24959         (debug)   cf_subdir='obj_g' ;;
24960         (profile) cf_subdir='obj_p' ;;
24961         (shared)
24962                 case $cf_cv_system_name in
24963                 (cygwin|msys)
24964                         cf_subdir='objects' ;;
24965                 (*)
24966                         cf_subdir='obj_s' ;;
24967                 esac
24968         esac
24969
24970                         # Test for case where we build libtinfo with a different name.
24971                         cf_libname=$cf_dir
24972                         if test $cf_dir = ncurses ; then
24973                                 case $cf_subset in
24974                                 (*base*)
24975                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24976                                         ;;
24977                                 (*termlib*)
24978                                         cf_libname=$TINFO_LIB_SUFFIX
24979                                         ;;
24980                                 (ticlib*)
24981                                         cf_libname=$TICS_LIB_SUFFIX
24982                                         ;;
24983                                 esac
24984                         elif test $cf_dir = c++ ; then
24985                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24986                         else
24987                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24988                         fi
24989                         if test -n "${USE_ARG_SUFFIX}" ; then
24990                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24991                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24992                         fi
24993
24994                         # These dependencies really are for development, not
24995                         # builds, but they are useful in porting, too.
24996                         cf_depend="../include/ncurses_cfg.h"
24997                         if test "$srcdir" = "."; then
24998                                 cf_reldir="."
24999                         else
25000                                 cf_reldir="\${srcdir}"
25001                         fi
25002
25003                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25004                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25005                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25006                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25007                         fi
25008
25009                         cf_dir_suffix=
25010                         old_cf_suffix="$cf_suffix"
25011                         if test "$cf_cv_shlib_version_infix" = yes ; then
25012                         if test -n "$USE_LIB_SUFFIX" ; then
25013                                 case $USE_LIB_SUFFIX in
25014                                 (tw*)
25015                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25016                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25017                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25018                                         ;;
25019                                 (t*)
25020                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25021                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25022                                         cf_dir_suffix=t$EXTRA_SUFFIX
25023                                         ;;
25024                                 (w*)
25025                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25026                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25027                                         cf_dir_suffix=w$EXTRA_SUFFIX
25028                                         ;;
25029                                 (*)
25030                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25031                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25032                                         cf_dir_suffix=$EXTRA_SUFFIX
25033                                         ;;
25034                                 esac
25035                         fi
25036                         fi
25037
25038                         $AWK -f $srcdir/mk-1st.awk \
25039                                 name=${cf_libname}${cf_dir_suffix} \
25040                                 traces=$LIB_TRACING \
25041                                 MODEL=$cf_ITEM \
25042                                 CXX_MODEL=$CXX_MODEL \
25043                                 model=$cf_subdir \
25044                                 prefix=$cf_prefix \
25045                                 suffix=$cf_suffix \
25046                                 subset=$cf_subset \
25047                                 driver=$cf_cv_term_driver \
25048                                 SymLink="$LN_S" \
25049                                 TermlibRoot=$TINFO_NAME \
25050                                 TermlibSuffix=$TINFO_SUFFIX \
25051                                 ShlibVer=$cf_cv_shlib_version \
25052                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25053                                 ReLink=${cf_cv_do_relink:-no} \
25054                                 DoLinks=$cf_cv_do_symlinks \
25055                                 rmSoLocs=$cf_cv_rm_so_locs \
25056                                 ldconfig="$LDCONFIG" \
25057                                 overwrite=$WITH_OVERWRITE \
25058                                 depend="$cf_depend" \
25059                                 host="$host" \
25060                                 libtool_version="$LIBTOOL_VERSION" \
25061                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25062
25063                         cf_suffix="$old_cf_suffix"
25064
25065                         for cf_subdir2 in $cf_subdirs lib
25066                         do
25067                                 test $cf_subdir = $cf_subdir2 && break
25068                         done
25069                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25070                         $AWK -f $srcdir/mk-2nd.awk \
25071                                 name=$cf_dir \
25072                                 traces=$LIB_TRACING \
25073                                 MODEL=$cf_ITEM \
25074                                 model=$cf_subdir \
25075                                 subset=$cf_subset \
25076                                 srcdir=$srcdir \
25077                                 echo=$WITH_ECHO \
25078                                 crenames=$cf_cv_prog_CC_c_o \
25079                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25080                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25081                         cf_subdirs="$cf_subdirs $cf_subdir"
25082                         done
25083                 done
25084         fi
25085
25086         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25087 done
25088
25089 for cf_dir in $SRC_SUBDIRS
25090 do
25091         if test ! -d $srcdir/$cf_dir ; then
25092                 continue
25093         fi
25094
25095         if test -f $cf_dir/Makefile ; then
25096                 case "$cf_dir" in
25097                 (Ada95)
25098                         echo 'libs \' >> Makefile
25099                         echo 'install.libs \' >> Makefile
25100                         echo 'uninstall.libs ::' >> Makefile
25101                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25102                         ;;
25103                 esac
25104         fi
25105
25106         if test -f $srcdir/$cf_dir/modules; then
25107                 echo >> Makefile
25108                 if test -f $srcdir/$cf_dir/headers; then
25109 cat >> Makefile <<CF_EOF
25110 install.includes \\
25111 uninstall.includes \\
25112 CF_EOF
25113                 fi
25114 if test "$cf_dir" != "c++" ; then
25115 echo 'lint \' >> Makefile
25116 fi
25117 cat >> Makefile <<CF_EOF
25118 libs \\
25119 lintlib \\
25120 install.libs \\
25121 uninstall.libs \\
25122 install.$cf_dir \\
25123 uninstall.$cf_dir ::
25124         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25125 CF_EOF
25126         elif test -f $srcdir/$cf_dir/headers; then
25127 cat >> Makefile <<CF_EOF
25128
25129 libs \\
25130 install.libs \\
25131 uninstall.libs \\
25132 install.includes \\
25133 uninstall.includes ::
25134         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25135 CF_EOF
25136 fi
25137 done
25138
25139 if test "x$cf_with_db_install" = xyes; then
25140 cat >> Makefile <<CF_EOF
25141
25142 install.libs uninstall.libs \\
25143 install.data uninstall.data ::
25144 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25145 CF_EOF
25146 else
25147 cat >> Makefile <<CF_EOF
25148
25149 install.libs uninstall.libs ::
25150         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25151 CF_EOF
25152 fi
25153
25154 if test "x$cf_with_manpages" = xyes; then
25155 cat >> Makefile <<CF_EOF
25156
25157 install.man \\
25158 uninstall.man ::
25159         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25160 CF_EOF
25161 fi
25162
25163 cat >> Makefile <<CF_EOF
25164
25165 distclean ::
25166         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25167         rm -f headers.sh headers.sed mk_shared_lib.sh
25168         rm -f edit_man.* man_alias.*
25169         rm -rf \${DIRS_TO_MAKE}
25170 CF_EOF
25171
25172 # Special case: tack's manpage lives in its own directory.
25173 if test "x$cf_with_manpages" = xyes; then
25174 if test -d tack ; then
25175 if test -f $srcdir/$tack.h; then
25176 cat >> Makefile <<CF_EOF
25177
25178 install.man \\
25179 uninstall.man ::
25180         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25181 CF_EOF
25182 fi
25183 fi
25184 fi
25185
25186 rm -f headers.sed headers.sh
25187
25188 echo creating headers.sh
25189 cat >headers.sh <<CF_EOF
25190 #! $SHELL
25191 # This shell script is generated by the 'configure' script.  It is invoked in a
25192 # subdirectory of the build tree.  It generates a sed-script in the parent
25193 # directory that is used to adjust includes for header files that reside in a
25194 # subdirectory of /usr/include, etc.
25195 PRG=""
25196 while test \$# != 3
25197 do
25198 PRG="\$PRG \$1"; shift
25199 done
25200 DST=\$1
25201 REF=\$2
25202 SRC=\$3
25203 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25204 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25205 echo installing \$SRC in \$DST
25206 CF_EOF
25207
25208 if test $WITH_CURSES_H = yes; then
25209         cat >>headers.sh <<CF_EOF
25210 case \$DST in
25211 (/*/include/*)
25212         END=\`basename \$DST\`
25213         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25214         do
25215                 NAME=\`basename \$i\`
25216                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25217         done
25218         ;;
25219 (*)
25220         echo "" >> \$TMPSED
25221         ;;
25222 esac
25223 CF_EOF
25224
25225 else
25226         cat >>headers.sh <<CF_EOF
25227 case \$DST in
25228 (/*/include/*)
25229         END=\`basename \$DST\`
25230         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25231         do
25232                 NAME=\`basename \$i\`
25233                 if test "\$NAME" = "curses.h"
25234                 then
25235                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25236                         NAME=ncurses.h
25237                 fi
25238                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25239         done
25240         ;;
25241 (*)
25242         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25243         ;;
25244 esac
25245 CF_EOF
25246 fi
25247 cat >>headers.sh <<CF_EOF
25248 rm -f \$TMPSRC
25249 sed -f \$TMPSED \$SRC > \$TMPSRC
25250 NAME=\`basename \$SRC\`
25251 CF_EOF
25252 if test $WITH_CURSES_H != yes; then
25253         cat >>headers.sh <<CF_EOF
25254 test "\$NAME" = "curses.h" && NAME=ncurses.h
25255 CF_EOF
25256 fi
25257 cat >>headers.sh <<CF_EOF
25258 # Just in case someone gzip'd manpages, remove the conflicting copy.
25259 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25260
25261 eval \$PRG \$TMPSRC \$DST/\$NAME
25262 rm -f \$TMPSRC \$TMPSED
25263 CF_EOF
25264
25265 chmod 0755 headers.sh
25266
25267 for cf_dir in $SRC_SUBDIRS
25268 do
25269         if test ! -d $srcdir/$cf_dir ; then
25270                 continue
25271         fi
25272
25273         if test -f $srcdir/$cf_dir/headers; then
25274                 $AWK -f $srcdir/mk-hdr.awk \
25275                         subset="$LIB_SUBSETS" \
25276                         compat="$WITH_CURSES_H" \
25277                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25278         fi
25279
25280         if test -f $srcdir/$cf_dir/modules; then
25281                 if test "$cf_dir" != "c++" ; then
25282                         cat >>$cf_dir/Makefile <<"CF_EOF"
25283 depend : ${AUTO_SRC}
25284         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25285
25286 # DO NOT DELETE THIS LINE -- make depend depends on it.
25287 CF_EOF
25288                 fi
25289         fi
25290 done
25291
25292 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25293 if test -z "$USE_OLD_MAKERULES" ; then
25294         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25295 fi
25296 fi
25297  ;;
25298   esac
25299 done
25300 EOF
25301
25302 cat >>$CONFIG_STATUS <<\EOF
25303
25304 { (exit 0); exit 0; }
25305 EOF
25306 chmod +x $CONFIG_STATUS
25307 ac_clean_files=$ac_clean_files_save
25308
25309 # configure is writing to config.log, and then calls config.status.
25310 # config.status does its own redirection, appending to config.log.
25311 # Unfortunately, on DOS this fails, as config.log is still kept open
25312 # by configure, so config.status won't be able to write to it; its
25313 # output is simply discarded.  So we exec the FD to /dev/null,
25314 # effectively closing config.log, so it can be properly (re)opened and
25315 # appended to by config.status.  When coming back to configure, we
25316 # need to make the FD available again.
25317 if test "$no_create" != yes; then
25318   ac_cs_success=:
25319   exec 5>/dev/null
25320   $SHELL $CONFIG_STATUS || ac_cs_success=false
25321   exec 5>>config.log
25322   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25323   # would make configure fail if this is the last instruction.
25324   $ac_cs_success || { (exit 1); exit 1; }
25325 fi
25326 ${MAKE:-make} preinstall