]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
dc0b8d9063ccbddc90aa51077ee5bcbd74b2157e
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.631 .
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   --with-bool=TYPE        override fallback type of bool variable
777   --with-caps=alt         compile with alternate Caps file
778   --with-chtype=TYPE      override type of chtype
779   --with-ospeed=TYPE      override type of ospeed variable
780   --with-mmask-t=TYPE     override type of mmask_t
781   --with-ccharw-max=XXX   override size CCHARW_MAX
782   --with-tparm-arg=TYPE   override parameter type of tparm
783   --with-rcs-ids          compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
786                           optionally formatted/catonly, e.g., gzip,formatted
787   --with-manpage-renames  specify manpage-renaming
788   --with-manpage-aliases  specify manpage-aliases using .so
789   --with-manpage-symlinks specify manpage-aliases using symlinks
790   --with-manpage-tbl      specify manpage processing with tbl
791 Extensions:
792   --disable-ext-funcs     disable function-extensions
793   --enable-sp-funcs       enable SCREEN-extensions
794   --enable-term-driver    enable terminal-driver
795   --enable-const          compile with extra/non-standard const
796   --enable-ext-colors     compile for 256-color support
797   --enable-ext-mouse      compile for extended mouse-encoding
798   --enable-ext-putwin     compile with extended putwin/screendump
799   --enable-no-padding     compile with $NCURSES_NO_PADDING code
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --enable-sigwinch       compile with SIGWINCH handler
802   --enable-tcap-names     compile with user-definable terminal capabilities
803 Development Code:
804   --without-develop       disable development options
805   --enable-hard-tabs      compile with hard-tabs code
806   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
807 Experimental Code:
808   --disable-assumed-color do not assume anything about default-colors
809   --disable-hashmap       compile without hashmap scrolling-optimization
810   --enable-colorfgbg      compile-in experimental $COLORFGBG code
811   --enable-interop        compile-in interop bindings
812   --with-pthread          use POSIX thread library
813   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814   --enable-weak-symbols   enable weak-symbols for pthreads
815   --enable-reentrant      compile with reentrant code
816   --with-wrap-prefix=XXX  override prefix used for public variables
817   --enable-safe-sprintf   compile with experimental safe-sprintf code
818   --disable-scroll-hints  compile without scroll-hints code
819   --enable-wgetch-events  compile with wgetch-events code
820 Testing/development Options:
821   --disable-echo          do not display "compiling" commands
822   --enable-warnings       build: turn on GCC compiler warnings
823   --enable-string-hacks   work around bogus compiler/loader warnings
824   --enable-assertions     test: turn on generation of assertion code
825   --with-dmalloc          test: use Gray Watson's dmalloc library
826   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
827   --with-valgrind         test: use valgrind
828   --disable-leaks         test: free permanent memory, analyze leaks
829   --enable-expanded       test: generate functions for certain macros
830   --disable-macros        test: use functions rather than macros
831   --with-trace            test: add trace() function to all models of ncurses
832   --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
838
839 Some influential environment variables:
840   CC          C compiler command
841   CFLAGS      C compiler flags
842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
843               nonstandard directory <lib dir>
844   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
845               headers in a nonstandard directory <include dir>
846   CPP         C preprocessor
847   CXX         C++ compiler command
848   CXXFLAGS    C++ compiler flags
849   CXXCPP      C++ preprocessor
850
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
853
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
901 EOF
902   exit 0
903 fi
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
908
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
911
912   $ $0 $@
913
914 EOF
915 {
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform.  ##
919 ## ---------- ##
920
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
929
930 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
931 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
934 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
935 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
936 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
937
938 PATH = $PATH
939
940 _ASUNAME
941 } >&5
942
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests.  ##
946 ## ------------ ##
947
948 EOF
949
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
956 do
957   case $ac_arg in
958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959   | --no-cr | --no-c) ;;
960   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965     ac_sep=" " ;;
966   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967      ac_sep=" " ;;
968   esac
969   # Get rid of the leading space.
970 done
971
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log.  We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976   # Save into config.log some information that might help in debugging.
977   echo >&5
978   echo "## ----------------- ##" >&5
979   echo "## Cache variables.  ##" >&5
980   echo "## ----------------- ##" >&5
981   echo >&5
982   # The following way of writing the cache mishandles newlines in values,
983 {
984   (set) 2>&1 |
985     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986     *ac_space=\ *)
987       sed -n \
988         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
990       ;;
991     *)
992       sed -n \
993         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994       ;;
995     esac;
996 } >&5
997   sed "/^$/d" confdefs.h >conftest.log
998   if test -s conftest.log; then
999     echo >&5
1000     echo "## ------------ ##" >&5
1001     echo "## confdefs.h.  ##" >&5
1002     echo "## ------------ ##" >&5
1003     echo >&5
1004     cat conftest.log >&5
1005   fi
1006   (echo; echo) >&5
1007   test "$ac_signal" != 0 &&
1008     echo "$as_me: caught signal $ac_signal" >&5
1009   echo "$as_me: exit $exit_status" >&5
1010   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011     exit $exit_status
1012      ' 0
1013 for ac_signal in 1 2 13 15; do
1014   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1017
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1022
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026   if test "x$prefix" != xNONE; then
1027     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028   else
1029     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1030   fi
1031 fi
1032 for ac_site_file in $CONFIG_SITE; do
1033   if test -r "$ac_site_file"; then
1034     { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036     cat "$ac_site_file" >&5
1037     . "$ac_site_file"
1038   fi
1039 done
1040
1041 if test -r "$cache_file"; then
1042   # Some versions of bash will fail to source /dev/null (special
1043   # files actually), so we avoid doing that.
1044   if test -f "$cache_file"; then
1045     { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047     case $cache_file in
1048       [\\/]* | ?:[\\/]* ) . $cache_file;;
1049       *)                      . ./$cache_file;;
1050     esac
1051   fi
1052 else
1053   { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055   >$cache_file
1056 fi
1057
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064   eval ac_new_set=\$ac_env_${ac_var}_set
1065   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066   eval ac_new_val="\$ac_env_${ac_var}_value"
1067   case $ac_old_set,$ac_new_set in
1068     set,)
1069       { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071       ac_cache_corrupted=: ;;
1072     ,set)
1073       { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075       ac_cache_corrupted=: ;;
1076     ,);;
1077     *)
1078       if test "x$ac_old_val" != "x$ac_new_val"; then
1079         { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081         { echo "$as_me:1081:   former value:  $ac_old_val" >&5
1082 echo "$as_me:   former value:  $ac_old_val" >&2;}
1083         { echo "$as_me:1083:   current value: $ac_new_val" >&5
1084 echo "$as_me:   current value: $ac_new_val" >&2;}
1085         ac_cache_corrupted=:
1086       fi;;
1087   esac
1088   # Pass precious variables to config.status.  It doesn't matter if
1089   # we pass some twice (in addition to the command line arguments).
1090   if test "$ac_new_set" = set; then
1091     case $ac_new_val in
1092     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094       ac_configure_args="$ac_configure_args '$ac_arg'"
1095       ;;
1096     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097        ;;
1098     esac
1099   fi
1100 done
1101 if $ac_cache_corrupted; then
1102   { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104   { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106    { (exit 1); exit 1; }; }
1107 fi
1108
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1115
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1118                    ECHO_T='     ' ;;
1119   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo  "exit 0"   >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126   (PATH=".;."; conftest.sh) 2>&5
1127   ac_status=$?
1128   echo "$as_me:1128: \$? = $ac_status" >&5
1129   (exit $ac_status); }; then
1130   ac_path_separator=';'
1131 else
1132   ac_path_separator=:
1133 fi
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1136
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139 top_builddir=`pwd`
1140
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144   echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147                 then ac_cv_prog_egrep='grep -E'
1148                 else ac_cv_prog_egrep='egrep'
1149         fi
1150 fi
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153         EGREP=$ac_cv_prog_egrep
1154
1155         test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157    { (exit 1); exit 1; }; }
1158
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
1168 if test -f $srcdir/VERSION ; then
1169         echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
1172         # if there are not enough fields, cut returns the last one...
1173         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1176
1177         # this is how CF_BUNDLED_INTL uses $VERSION:
1178         VERSION="$cf_field1"
1179
1180         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181         test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183    { (exit 1); exit 1; }; }
1184
1185         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186         test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193         echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196         case .$VERSION_PATCH in
1197         (.)
1198                 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200    { (exit 1); exit 1; }; }
1201                 ;;
1202         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203                 ;;
1204         (*)
1205                 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         esac
1210         echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213         { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1220
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235         cf_PACKAGE=NCURSES
1236         PACKAGE=ncurses
1237
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1240 EOF
1241
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244         cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246 EOF
1247
1248         cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250 EOF
1251
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256   withval="$with_rel_version"
1257   { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259  cf_cv_rel_version=$withval
1260 fi;
1261
1262  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1264
1265 if test -n "$NCURSES_MAJOR" ; then
1266   case $NCURSES_MAJOR in
1267   ([0-9]*)
1268         ;;
1269   (*)
1270         { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272    { (exit 1); exit 1; }; }
1273         ;;
1274   esac
1275 else
1276   { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$NCURSES_MINOR" ; then
1282   case $NCURSES_MINOR in
1283   ([0-9]*)
1284         ;;
1285   (*)
1286         { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288    { (exit 1); exit 1; }; }
1289         ;;
1290   esac
1291 else
1292   { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294    { (exit 1); exit 1; }; }
1295 fi
1296
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301   withval="$with_abi_version"
1302
1303         if test "x$cf_cv_abi_version" != "x$withval"
1304         then
1305                 { echo "$as_me:1305: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1306 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1307                 case $cf_cv_rel_version in
1308                 (5.*)
1309                         cf_cv_rel_version=$withval.0
1310                         ;;
1311                 (6.*)
1312                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1313                         ;;
1314                 esac
1315         fi
1316         cf_cv_abi_version=$withval
1317 fi;
1318
1319 if test -n "$cf_cv_abi_version" ; then
1320   case $cf_cv_abi_version in
1321   ([0-9]*)
1322         ;;
1323   (*)
1324         { { echo "$as_me:1324: error: ABI version is not a number: $cf_cv_abi_version" >&5
1325 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1326    { (exit 1); exit 1; }; }
1327         ;;
1328   esac
1329 else
1330   { { echo "$as_me:1330: error: ABI version value is empty" >&5
1331 echo "$as_me: error: ABI version value is empty" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1336 then
1337         case $cf_cv_rel_version in
1338         (5.*)
1339                 cf_cv_rel_version=$with_abi_version.0
1340                 ;;
1341         esac
1342 fi
1343
1344 ac_aux_dir=
1345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1346   if test -f $ac_dir/install-sh; then
1347     ac_aux_dir=$ac_dir
1348     ac_install_sh="$ac_aux_dir/install-sh -c"
1349     break
1350   elif test -f $ac_dir/install.sh; then
1351     ac_aux_dir=$ac_dir
1352     ac_install_sh="$ac_aux_dir/install.sh -c"
1353     break
1354   elif test -f $ac_dir/shtool; then
1355     ac_aux_dir=$ac_dir
1356     ac_install_sh="$ac_aux_dir/shtool install -c"
1357     break
1358   fi
1359 done
1360 if test -z "$ac_aux_dir"; then
1361   { { echo "$as_me:1361: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1362 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1366 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1367 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1368
1369 # Make sure we can run config.sub.
1370 $ac_config_sub sun4 >/dev/null 2>&1 ||
1371   { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
1372 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373    { (exit 1); exit 1; }; }
1374
1375 echo "$as_me:1375: checking build system type" >&5
1376 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377 if test "${ac_cv_build+set}" = set; then
1378   echo $ECHO_N "(cached) $ECHO_C" >&6
1379 else
1380   ac_cv_build_alias=$build_alias
1381 test -z "$ac_cv_build_alias" &&
1382   ac_cv_build_alias=`$ac_config_guess`
1383 test -z "$ac_cv_build_alias" &&
1384   { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
1385 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386    { (exit 1); exit 1; }; }
1387 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_build" >&5
1394 echo "${ECHO_T}$ac_cv_build" >&6
1395 build=$ac_cv_build
1396 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 echo "$as_me:1400: checking host system type" >&5
1401 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402 if test "${ac_cv_host+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_host_alias=$host_alias
1406 test -z "$ac_cv_host_alias" &&
1407   ac_cv_host_alias=$ac_cv_build_alias
1408 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1409   { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 fi
1414 echo "$as_me:1414: result: $ac_cv_host" >&5
1415 echo "${ECHO_T}$ac_cv_host" >&6
1416 host=$ac_cv_host
1417 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1422         echo "$as_me:1422: checking target system type" >&5
1423 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1424 if test "${ac_cv_target+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_target_alias=$target_alias
1428 test "x$ac_cv_target_alias" = "x" &&
1429   ac_cv_target_alias=$ac_cv_host_alias
1430 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_target" >&5
1437 echo "${ECHO_T}$ac_cv_target" >&6
1438 target=$ac_cv_target
1439 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 # The aliases save the names the user supplied, while $host etc.
1444 # will get canonicalized.
1445 test -n "$target_alias" &&
1446   test "$program_prefix$program_suffix$program_transform_name" = \
1447     NONENONEs,x,x, &&
1448   program_prefix=${target_alias}-
1449         system_name="$host_os"
1450 else
1451         system_name="`(uname -s -r) 2>/dev/null`"
1452         if test -z "$system_name" ; then
1453                 system_name="`(hostname) 2>/dev/null`"
1454         fi
1455 fi
1456 test -n "$system_name" &&
1457 cat >>confdefs.h <<EOF
1458 #define SYSTEM_NAME "$system_name"
1459 EOF
1460
1461 if test "${cf_cv_system_name+set}" = set; then
1462   echo $ECHO_N "(cached) $ECHO_C" >&6
1463 else
1464   cf_cv_system_name="$system_name"
1465 fi
1466
1467 test -z "$system_name" && system_name="$cf_cv_system_name"
1468 test -n "$cf_cv_system_name" && echo "$as_me:1468: result: Configuring for $cf_cv_system_name" >&5
1469 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1470
1471 if test ".$system_name" != ".$cf_cv_system_name" ; then
1472         echo "$as_me:1472: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1473 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1474         { { echo "$as_me:1474: error: \"Please remove config.cache and try again.\"" >&5
1475 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1476    { (exit 1); exit 1; }; }
1477 fi
1478
1479 # Check whether --with-system-type or --without-system-type was given.
1480 if test "${with_system_type+set}" = set; then
1481   withval="$with_system_type"
1482   { echo "$as_me:1482: WARNING: overriding system type to $withval" >&5
1483 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1484         cf_cv_system_name=$withval
1485         host_os=$withval
1486
1487 fi;
1488
1489 ###     Save the given $CFLAGS to allow user-override.
1490 cf_user_CFLAGS="$CFLAGS"
1491
1492 ###     Default install-location
1493
1494 echo "$as_me:1494: checking for prefix" >&5
1495 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1496 if test "x$prefix" = "xNONE" ; then
1497         case "$cf_cv_system_name" in
1498                 # non-vendor systems don't have a conflict
1499         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1500                 prefix=/usr
1501                 ;;
1502         (*)     prefix=$ac_default_prefix
1503                 ;;
1504         esac
1505 fi
1506 echo "$as_me:1506: result: $prefix" >&5
1507 echo "${ECHO_T}$prefix" >&6
1508
1509 if test "x$prefix" = "xNONE" ; then
1510 echo "$as_me:1510: checking for default include-directory" >&5
1511 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1512 test -n "$verbose" && echo 1>&6
1513 for cf_symbol in \
1514         $includedir \
1515         $includedir/ncurses \
1516         $prefix/include \
1517         $prefix/include/ncurses \
1518         /usr/local/include \
1519         /usr/local/include/ncurses \
1520         /usr/include \
1521         /usr/include/ncurses
1522 do
1523         cf_dir=`eval echo $cf_symbol`
1524         if test -f $cf_dir/curses.h ; then
1525         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1526                 includedir="$cf_symbol"
1527                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1528                 break
1529         fi
1530         fi
1531         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1532 done
1533 echo "$as_me:1533: result: $includedir" >&5
1534 echo "${ECHO_T}$includedir" >&6
1535 fi
1536
1537 ### Defaults for ncurses ABI
1538
1539 case x$cf_cv_abi_version in
1540 (x[6789])
1541         cf_dft_ext_colors=yes
1542         cf_dft_ext_const=yes
1543         cf_dft_ext_mouse=yes
1544         cf_dft_ext_putwin=yes
1545         cf_dft_ext_spfuncs=yes
1546         cf_dft_filter_syms=yes
1547         cf_dft_chtype=uint32_t
1548         cf_dft_mmask_t=uint32_t
1549         cf_dft_interop=yes
1550         cf_dft_tparm_arg=intptr_t
1551         cf_dft_with_lp64=yes
1552         ;;
1553 (*)
1554         cf_dft_ext_colors=no
1555         cf_dft_ext_const=no
1556         cf_dft_ext_mouse=no
1557         cf_dft_ext_putwin=no
1558         cf_dft_ext_spfuncs=no
1559         cf_dft_filter_syms=no
1560         cf_dft_chtype=auto
1561         cf_dft_mmask_t=auto
1562         cf_dft_interop=no
1563         cf_dft_tparm_arg=long
1564         cf_dft_with_lp64=no
1565         ;;
1566 esac
1567
1568 ###     Checks for programs.
1569
1570 # Check whether --with-ada or --without-ada was given.
1571 if test "${with_ada+set}" = set; then
1572   withval="$with_ada"
1573   cf_with_ada=$withval
1574 else
1575   cf_with_ada=yes
1576 fi;
1577 if test "x$cf_with_ada" = xyes
1578 then
1579         cf_PROG_CC="gnatgcc gcc cc"
1580 else
1581         cf_PROG_CC="gcc cc"
1582 fi
1583
1584 ac_ext=c
1585 ac_cpp='$CPP $CPPFLAGS'
1586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1589 ac_main_return=return
1590 if test -n "$ac_tool_prefix"; then
1591   for ac_prog in $cf_PROG_CC
1592   do
1593     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1594 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1595 echo "$as_me:1595: checking for $ac_word" >&5
1596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1597 if test "${ac_cv_prog_CC+set}" = set; then
1598   echo $ECHO_N "(cached) $ECHO_C" >&6
1599 else
1600   if test -n "$CC"; then
1601   ac_cv_prog_CC="$CC" # Let the user override the test.
1602 else
1603   ac_save_IFS=$IFS; IFS=$ac_path_separator
1604 ac_dummy="$PATH"
1605 for ac_dir in $ac_dummy; do
1606   IFS=$ac_save_IFS
1607   test -z "$ac_dir" && ac_dir=.
1608   $as_executable_p "$ac_dir/$ac_word" || continue
1609 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1610 echo "$as_me:1610: found $ac_dir/$ac_word" >&5
1611 break
1612 done
1613
1614 fi
1615 fi
1616 CC=$ac_cv_prog_CC
1617 if test -n "$CC"; then
1618   echo "$as_me:1618: result: $CC" >&5
1619 echo "${ECHO_T}$CC" >&6
1620 else
1621   echo "$as_me:1621: result: no" >&5
1622 echo "${ECHO_T}no" >&6
1623 fi
1624
1625     test -n "$CC" && break
1626   done
1627 fi
1628 if test -z "$CC"; then
1629   ac_ct_CC=$CC
1630   for ac_prog in $cf_PROG_CC
1631 do
1632   # Extract the first word of "$ac_prog", so it can be a program name with args.
1633 set dummy $ac_prog; ac_word=$2
1634 echo "$as_me:1634: checking for $ac_word" >&5
1635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1637   echo $ECHO_N "(cached) $ECHO_C" >&6
1638 else
1639   if test -n "$ac_ct_CC"; then
1640   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1641 else
1642   ac_save_IFS=$IFS; IFS=$ac_path_separator
1643 ac_dummy="$PATH"
1644 for ac_dir in $ac_dummy; do
1645   IFS=$ac_save_IFS
1646   test -z "$ac_dir" && ac_dir=.
1647   $as_executable_p "$ac_dir/$ac_word" || continue
1648 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:1649: found $ac_dir/$ac_word" >&5
1650 break
1651 done
1652
1653 fi
1654 fi
1655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1656 if test -n "$ac_ct_CC"; then
1657   echo "$as_me:1657: result: $ac_ct_CC" >&5
1658 echo "${ECHO_T}$ac_ct_CC" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$ac_ct_CC" && break
1665 done
1666
1667   CC=$ac_ct_CC
1668 fi
1669
1670 test -z "$CC" && { { echo "$as_me:1670: error: no acceptable cc found in \$PATH" >&5
1671 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1672    { (exit 1); exit 1; }; }
1673
1674 # Provide some information about the compiler.
1675 echo "$as_me:1675:" \
1676      "checking for C compiler version" >&5
1677 ac_compiler=`set X $ac_compile; echo $2`
1678 { (eval echo "$as_me:1678: \"$ac_compiler --version </dev/null >&5\"") >&5
1679   (eval $ac_compiler --version </dev/null >&5) 2>&5
1680   ac_status=$?
1681   echo "$as_me:1681: \$? = $ac_status" >&5
1682   (exit $ac_status); }
1683 { (eval echo "$as_me:1683: \"$ac_compiler -v </dev/null >&5\"") >&5
1684   (eval $ac_compiler -v </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
1694 cat >conftest.$ac_ext <<_ACEOF
1695 #line 1695 "configure"
1696 #include "confdefs.h"
1697
1698 int
1699 main ()
1700 {
1701
1702   ;
1703   return 0;
1704 }
1705 _ACEOF
1706 ac_clean_files_save=$ac_clean_files
1707 ac_clean_files="$ac_clean_files a.out a.exe"
1708 # Try to create an executable without -o first, disregard a.out.
1709 # It will help us diagnose broken compilers, and finding out an intuition
1710 # of exeext.
1711 echo "$as_me:1711: checking for C compiler default output" >&5
1712 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1713 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1714 if { (eval echo "$as_me:1714: \"$ac_link_default\"") >&5
1715   (eval $ac_link_default) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }; then
1719   # Find the output, starting from the most likely.  This scheme is
1720 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1721 # resort.
1722 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1723                 ls a.out conftest 2>/dev/null;
1724                 ls a.* conftest.* 2>/dev/null`; do
1725   case $ac_file in
1726     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1727     a.out ) # We found the default executable, but exeext='' is most
1728             # certainly right.
1729             break;;
1730     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1731           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1732           export ac_cv_exeext
1733           break;;
1734     * ) break;;
1735   esac
1736 done
1737 else
1738   echo "$as_me: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 { { echo "$as_me:1740: error: C compiler cannot create executables" >&5
1741 echo "$as_me: error: C compiler cannot create executables" >&2;}
1742    { (exit 77); exit 77; }; }
1743 fi
1744
1745 ac_exeext=$ac_cv_exeext
1746 echo "$as_me:1746: result: $ac_file" >&5
1747 echo "${ECHO_T}$ac_file" >&6
1748
1749 # Check the compiler produces executables we can run.  If not, either
1750 # the compiler is broken, or we cross compile.
1751 echo "$as_me:1751: checking whether the C compiler works" >&5
1752 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1753 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1754 # If not cross compiling, check that we can run a simple program.
1755 if test "$cross_compiling" != yes; then
1756   if { ac_try='./$ac_file'
1757   { (eval echo "$as_me:1757: \"$ac_try\"") >&5
1758   (eval $ac_try) 2>&5
1759   ac_status=$?
1760   echo "$as_me:1760: \$? = $ac_status" >&5
1761   (exit $ac_status); }; }; then
1762     cross_compiling=no
1763   else
1764     if test "$cross_compiling" = maybe; then
1765         cross_compiling=yes
1766     else
1767         { { echo "$as_me:1767: error: cannot run C compiled programs.
1768 If you meant to cross compile, use \`--host'." >&5
1769 echo "$as_me: error: cannot run C compiled programs.
1770 If you meant to cross compile, use \`--host'." >&2;}
1771    { (exit 1); exit 1; }; }
1772     fi
1773   fi
1774 fi
1775 echo "$as_me:1775: result: yes" >&5
1776 echo "${ECHO_T}yes" >&6
1777
1778 rm -f a.out a.exe conftest$ac_cv_exeext
1779 ac_clean_files=$ac_clean_files_save
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether we are cross compiling" >&5
1783 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1784 echo "$as_me:1784: result: $cross_compiling" >&5
1785 echo "${ECHO_T}$cross_compiling" >&6
1786
1787 echo "$as_me:1787: checking for executable suffix" >&5
1788 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1789 if { (eval echo "$as_me:1789: \"$ac_link\"") >&5
1790   (eval $ac_link) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; then
1794   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1795 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1796 # work properly (i.e., refer to `conftest.exe'), while it won't with
1797 # `rm'.
1798 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1799   case $ac_file in
1800     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1801     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802           export ac_cv_exeext
1803           break;;
1804     * ) break;;
1805   esac
1806 done
1807 else
1808   { { echo "$as_me:1808: error: cannot compute EXEEXT: cannot compile and link" >&5
1809 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1810    { (exit 1); exit 1; }; }
1811 fi
1812
1813 rm -f conftest$ac_cv_exeext
1814 echo "$as_me:1814: result: $ac_cv_exeext" >&5
1815 echo "${ECHO_T}$ac_cv_exeext" >&6
1816
1817 rm -f conftest.$ac_ext
1818 EXEEXT=$ac_cv_exeext
1819 ac_exeext=$EXEEXT
1820 echo "$as_me:1820: checking for object suffix" >&5
1821 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1822 if test "${ac_cv_objext+set}" = set; then
1823   echo $ECHO_N "(cached) $ECHO_C" >&6
1824 else
1825   cat >conftest.$ac_ext <<_ACEOF
1826 #line 1826 "configure"
1827 #include "confdefs.h"
1828
1829 int
1830 main ()
1831 {
1832
1833   ;
1834   return 0;
1835 }
1836 _ACEOF
1837 rm -f conftest.o conftest.obj
1838 if { (eval echo "$as_me:1838: \"$ac_compile\"") >&5
1839   (eval $ac_compile) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; then
1843   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1844   case $ac_file in
1845     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1846     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847        break;;
1848   esac
1849 done
1850 else
1851   echo "$as_me: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 { { echo "$as_me:1853: error: cannot compute OBJEXT: cannot compile" >&5
1854 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1855    { (exit 1); exit 1; }; }
1856 fi
1857
1858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1859 fi
1860 echo "$as_me:1860: result: $ac_cv_objext" >&5
1861 echo "${ECHO_T}$ac_cv_objext" >&6
1862 OBJEXT=$ac_cv_objext
1863 ac_objext=$OBJEXT
1864 echo "$as_me:1864: checking whether we are using the GNU C compiler" >&5
1865 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867   echo $ECHO_N "(cached) $ECHO_C" >&6
1868 else
1869   cat >conftest.$ac_ext <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1872
1873 int
1874 main ()
1875 {
1876 #ifndef __GNUC__
1877        choke me
1878 #endif
1879
1880   ;
1881   return 0;
1882 }
1883 _ACEOF
1884 rm -f conftest.$ac_objext
1885 if { (eval echo "$as_me:1885: \"$ac_compile\"") >&5
1886   (eval $ac_compile) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit $ac_status); } &&
1890          { ac_try='test -s conftest.$ac_objext'
1891   { (eval echo "$as_me:1891: \"$ac_try\"") >&5
1892   (eval $ac_try) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); }; }; then
1896   ac_compiler_gnu=yes
1897 else
1898   echo "$as_me: failed program was:" >&5
1899 cat conftest.$ac_ext >&5
1900 ac_compiler_gnu=no
1901 fi
1902 rm -f conftest.$ac_objext conftest.$ac_ext
1903 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1904
1905 fi
1906 echo "$as_me:1906: result: $ac_cv_c_compiler_gnu" >&5
1907 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908 GCC=`test $ac_compiler_gnu = yes && echo yes`
1909 ac_test_CFLAGS=${CFLAGS+set}
1910 ac_save_CFLAGS=$CFLAGS
1911 CFLAGS="-g"
1912 echo "$as_me:1912: checking whether $CC accepts -g" >&5
1913 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914 if test "${ac_cv_prog_cc_g+set}" = set; then
1915   echo $ECHO_N "(cached) $ECHO_C" >&6
1916 else
1917   cat >conftest.$ac_ext <<_ACEOF
1918 #line 1918 "configure"
1919 #include "confdefs.h"
1920
1921 int
1922 main ()
1923 {
1924
1925   ;
1926   return 0;
1927 }
1928 _ACEOF
1929 rm -f conftest.$ac_objext
1930 if { (eval echo "$as_me:1930: \"$ac_compile\"") >&5
1931   (eval $ac_compile) 2>&5
1932   ac_status=$?
1933   echo "$as_me:1933: \$? = $ac_status" >&5
1934   (exit $ac_status); } &&
1935          { ac_try='test -s conftest.$ac_objext'
1936   { (eval echo "$as_me:1936: \"$ac_try\"") >&5
1937   (eval $ac_try) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); }; }; then
1941   ac_cv_prog_cc_g=yes
1942 else
1943   echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 ac_cv_prog_cc_g=no
1946 fi
1947 rm -f conftest.$ac_objext conftest.$ac_ext
1948 fi
1949 echo "$as_me:1949: result: $ac_cv_prog_cc_g" >&5
1950 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951 if test "$ac_test_CFLAGS" = set; then
1952   CFLAGS=$ac_save_CFLAGS
1953 elif test $ac_cv_prog_cc_g = yes; then
1954   if test "$GCC" = yes; then
1955     CFLAGS="-g -O2"
1956   else
1957     CFLAGS="-g"
1958   fi
1959 else
1960   if test "$GCC" = yes; then
1961     CFLAGS="-O2"
1962   else
1963     CFLAGS=
1964   fi
1965 fi
1966 # Some people use a C++ compiler to compile C.  Since we use `exit',
1967 # in C++ we need to declare it.  In case someone uses the same compiler
1968 # for both compiling C and C++ we need to have the C++ compiler decide
1969 # the declaration of exit, since it's the most demanding environment.
1970 cat >conftest.$ac_ext <<_ACEOF
1971 #ifndef __cplusplus
1972   choke me
1973 #endif
1974 _ACEOF
1975 rm -f conftest.$ac_objext
1976 if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
1977   (eval $ac_compile) 2>&5
1978   ac_status=$?
1979   echo "$as_me:1979: \$? = $ac_status" >&5
1980   (exit $ac_status); } &&
1981          { ac_try='test -s conftest.$ac_objext'
1982   { (eval echo "$as_me:1982: \"$ac_try\"") >&5
1983   (eval $ac_try) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); }; }; then
1987   for ac_declaration in \
1988    ''\
1989    '#include <stdlib.h>' \
1990    'extern "C" void std::exit (int) throw (); using std::exit;' \
1991    'extern "C" void std::exit (int); using std::exit;' \
1992    'extern "C" void exit (int) throw ();' \
1993    'extern "C" void exit (int);' \
1994    'void exit (int);'
1995 do
1996   cat >conftest.$ac_ext <<_ACEOF
1997 #line 1997 "configure"
1998 #include "confdefs.h"
1999 #include <stdlib.h>
2000 $ac_declaration
2001 int
2002 main ()
2003 {
2004 exit (42);
2005   ;
2006   return 0;
2007 }
2008 _ACEOF
2009 rm -f conftest.$ac_objext
2010 if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5
2011   (eval $ac_compile) 2>&5
2012   ac_status=$?
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit $ac_status); } &&
2015          { ac_try='test -s conftest.$ac_objext'
2016   { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017   (eval $ac_try) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); }; }; then
2021   :
2022 else
2023   echo "$as_me: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 continue
2026 fi
2027 rm -f conftest.$ac_objext conftest.$ac_ext
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 $ac_declaration
2032 int
2033 main ()
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   break
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 fi
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058 done
2059 rm -rf conftest*
2060 if test -n "$ac_declaration"; then
2061   echo '#ifdef __cplusplus' >>confdefs.h
2062   echo $ac_declaration      >>confdefs.h
2063   echo '#endif'             >>confdefs.h
2064 fi
2065
2066 else
2067   echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 fi
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 ac_main_return=return
2077
2078 GCC_VERSION=none
2079 if test "$GCC" = yes ; then
2080         echo "$as_me:2080: checking version of $CC" >&5
2081 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2082         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.].*//'`"
2083         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2084         echo "$as_me:2084: result: $GCC_VERSION" >&5
2085 echo "${ECHO_T}$GCC_VERSION" >&6
2086 fi
2087
2088 echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5
2089 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2091   echo $ECHO_N "(cached) $ECHO_C" >&6
2092 else
2093   ac_cv_prog_cc_stdc=no
2094 ac_save_CC=$CC
2095 cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <stdarg.h>
2099 #include <stdio.h>
2100 #include <sys/types.h>
2101 #include <sys/stat.h>
2102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2103 struct buf { int x; };
2104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2105 static char *e (p, i)
2106      char **p;
2107      int i;
2108 {
2109   return p[i];
2110 }
2111 static char *f (char * (*g) (char **, int), char **p, ...)
2112 {
2113   char *s;
2114   va_list v;
2115   va_start (v,p);
2116   s = g (p, va_arg (v,int));
2117   va_end (v);
2118   return s;
2119 }
2120 int test (int i, double x);
2121 struct s1 {int (*f) (int a);};
2122 struct s2 {int (*f) (double a);};
2123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124 int argc;
2125 char **argv;
2126 int
2127 main ()
2128 {
2129 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 # Don't try gcc -ansi; that turns off useful extensions and
2135 # breaks some systems' header files.
2136 # AIX                   -qlanglvl=ansi
2137 # Ultrix and OSF/1      -std1
2138 # HP-UX 10.20 and later -Ae
2139 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2140 # SVR4                  -Xc -D__EXTENSIONS__
2141 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2142 do
2143   CC="$ac_save_CC $ac_arg"
2144   rm -f conftest.$ac_objext
2145 if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
2146   (eval $ac_compile) 2>&5
2147   ac_status=$?
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } &&
2150          { ac_try='test -s conftest.$ac_objext'
2151   { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); }; }; then
2156   ac_cv_prog_cc_stdc=$ac_arg
2157 break
2158 else
2159   echo "$as_me: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 fi
2162 rm -f conftest.$ac_objext
2163 done
2164 rm -f conftest.$ac_ext conftest.$ac_objext
2165 CC=$ac_save_CC
2166
2167 fi
2168
2169 case "x$ac_cv_prog_cc_stdc" in
2170   x|xno)
2171     echo "$as_me:2171: result: none needed" >&5
2172 echo "${ECHO_T}none needed" >&6 ;;
2173   *)
2174     echo "$as_me:2174: result: $ac_cv_prog_cc_stdc" >&5
2175 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2176     CC="$CC $ac_cv_prog_cc_stdc" ;;
2177 esac
2178
2179 # This should have been defined by AC_PROG_CC
2180 : ${CC:=cc}
2181
2182 echo "$as_me:2182: checking \$CC variable" >&5
2183 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2184 case "$CC" in
2185 (*[\ \  ]-*)
2186         echo "$as_me:2186: result: broken" >&5
2187 echo "${ECHO_T}broken" >&6
2188         { echo "$as_me:2188: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2189 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2190         # humor him...
2191         cf_flags=`echo "$CC" | sed -e 's/^.*[   ]\(-[^  ]\)/\1/'`
2192         CC=`echo "$CC " | sed -e 's/[   ]-[^    ].*$//' -e 's/[         ]*$//'`
2193         for cf_arg in $cf_flags
2194         do
2195                 case "x$cf_arg" in
2196                 (x-[IUDfgOW]*)
2197
2198 cf_fix_cppflags=no
2199 cf_new_cflags=
2200 cf_new_cppflags=
2201 cf_new_extra_cppflags=
2202
2203 for cf_add_cflags in $cf_flags
2204 do
2205 case $cf_fix_cppflags in
2206 (no)
2207         case $cf_add_cflags in
2208         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2209                 case $cf_add_cflags in
2210                 (-D*)
2211                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2212
2213                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2214                                 && test -z "${cf_tst_cflags}" \
2215                                 && cf_fix_cppflags=yes
2216
2217                         if test $cf_fix_cppflags = yes ; then
2218                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2219                                 continue
2220                         elif test "${cf_tst_cflags}" = "\"'" ; then
2221                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2222                                 continue
2223                         fi
2224                         ;;
2225                 esac
2226                 case "$CPPFLAGS" in
2227                 (*$cf_add_cflags)
2228                         ;;
2229                 (*)
2230                         case $cf_add_cflags in
2231                         (-D*)
2232                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2233
2234 CPPFLAGS=`echo "$CPPFLAGS" | \
2235         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2236                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2237
2238                                 ;;
2239                         esac
2240                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2241                         ;;
2242                 esac
2243                 ;;
2244         (*)
2245                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2246                 ;;
2247         esac
2248         ;;
2249 (yes)
2250         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2251
2252         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2253
2254         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2255                 && test -z "${cf_tst_cflags}" \
2256                 && cf_fix_cppflags=no
2257         ;;
2258 esac
2259 done
2260
2261 if test -n "$cf_new_cflags" ; then
2262
2263         CFLAGS="$CFLAGS $cf_new_cflags"
2264 fi
2265
2266 if test -n "$cf_new_cppflags" ; then
2267
2268         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2269 fi
2270
2271 if test -n "$cf_new_extra_cppflags" ; then
2272
2273         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2274 fi
2275
2276                         ;;
2277                 (*)
2278                         CC="$CC $cf_arg"
2279                         ;;
2280                 esac
2281         done
2282         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2283
2284 echo "${as_me:-configure}:2284: testing resulting CC: '$CC' ..." 1>&5
2285
2286         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2287
2288 echo "${as_me:-configure}:2288: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2289
2290         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2291
2292 echo "${as_me:-configure}:2292: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2293
2294         ;;
2295 (*)
2296         echo "$as_me:2296: result: ok" >&5
2297 echo "${ECHO_T}ok" >&6
2298         ;;
2299 esac
2300
2301 ac_ext=c
2302 ac_cpp='$CPP $CPPFLAGS'
2303 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2304 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2305 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2306 ac_main_return=return
2307 echo "$as_me:2307: checking how to run the C preprocessor" >&5
2308 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2309 # On Suns, sometimes $CPP names a directory.
2310 if test -n "$CPP" && test -d "$CPP"; then
2311   CPP=
2312 fi
2313 if test -z "$CPP"; then
2314   if test "${ac_cv_prog_CPP+set}" = set; then
2315   echo $ECHO_N "(cached) $ECHO_C" >&6
2316 else
2317       # Double quotes because CPP needs to be expanded
2318     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2319     do
2320       ac_preproc_ok=false
2321 for ac_c_preproc_warn_flag in '' yes
2322 do
2323   # Use a header file that comes with gcc, so configuring glibc
2324   # with a fresh cross-compiler works.
2325   # On the NeXT, cc -E runs the code through the compiler's parser,
2326   # not just through cpp. "Syntax error" is here to catch this case.
2327   cat >conftest.$ac_ext <<_ACEOF
2328 #line 2328 "configure"
2329 #include "confdefs.h"
2330 #include <assert.h>
2331                      Syntax error
2332 _ACEOF
2333 if { (eval echo "$as_me:2333: \"$ac_cpp conftest.$ac_ext\"") >&5
2334   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2335   ac_status=$?
2336   egrep -v '^ *\+' conftest.er1 >conftest.err
2337   rm -f conftest.er1
2338   cat conftest.err >&5
2339   echo "$as_me:2339: \$? = $ac_status" >&5
2340   (exit $ac_status); } >/dev/null; then
2341   if test -s conftest.err; then
2342     ac_cpp_err=$ac_c_preproc_warn_flag
2343   else
2344     ac_cpp_err=
2345   fi
2346 else
2347   ac_cpp_err=yes
2348 fi
2349 if test -z "$ac_cpp_err"; then
2350   :
2351 else
2352   echo "$as_me: failed program was:" >&5
2353   cat conftest.$ac_ext >&5
2354   # Broken: fails on valid input.
2355 continue
2356 fi
2357 rm -f conftest.err conftest.$ac_ext
2358
2359   # OK, works on sane cases.  Now check whether non-existent headers
2360   # can be detected and how.
2361   cat >conftest.$ac_ext <<_ACEOF
2362 #line 2362 "configure"
2363 #include "confdefs.h"
2364 #include <ac_nonexistent.h>
2365 _ACEOF
2366 if { (eval echo "$as_me:2366: \"$ac_cpp conftest.$ac_ext\"") >&5
2367   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2368   ac_status=$?
2369   egrep -v '^ *\+' conftest.er1 >conftest.err
2370   rm -f conftest.er1
2371   cat conftest.err >&5
2372   echo "$as_me:2372: \$? = $ac_status" >&5
2373   (exit $ac_status); } >/dev/null; then
2374   if test -s conftest.err; then
2375     ac_cpp_err=$ac_c_preproc_warn_flag
2376   else
2377     ac_cpp_err=
2378   fi
2379 else
2380   ac_cpp_err=yes
2381 fi
2382 if test -z "$ac_cpp_err"; then
2383   # Broken: success on invalid input.
2384 continue
2385 else
2386   echo "$as_me: failed program was:" >&5
2387   cat conftest.$ac_ext >&5
2388   # Passes both tests.
2389 ac_preproc_ok=:
2390 break
2391 fi
2392 rm -f conftest.err conftest.$ac_ext
2393
2394 done
2395 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2396 rm -f conftest.err conftest.$ac_ext
2397 if $ac_preproc_ok; then
2398   break
2399 fi
2400
2401     done
2402     ac_cv_prog_CPP=$CPP
2403
2404 fi
2405   CPP=$ac_cv_prog_CPP
2406 else
2407   ac_cv_prog_CPP=$CPP
2408 fi
2409 echo "$as_me:2409: result: $CPP" >&5
2410 echo "${ECHO_T}$CPP" >&6
2411 ac_preproc_ok=false
2412 for ac_c_preproc_warn_flag in '' yes
2413 do
2414   # Use a header file that comes with gcc, so configuring glibc
2415   # with a fresh cross-compiler works.
2416   # On the NeXT, cc -E runs the code through the compiler's parser,
2417   # not just through cpp. "Syntax error" is here to catch this case.
2418   cat >conftest.$ac_ext <<_ACEOF
2419 #line 2419 "configure"
2420 #include "confdefs.h"
2421 #include <assert.h>
2422                      Syntax error
2423 _ACEOF
2424 if { (eval echo "$as_me:2424: \"$ac_cpp conftest.$ac_ext\"") >&5
2425   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2426   ac_status=$?
2427   egrep -v '^ *\+' conftest.er1 >conftest.err
2428   rm -f conftest.er1
2429   cat conftest.err >&5
2430   echo "$as_me:2430: \$? = $ac_status" >&5
2431   (exit $ac_status); } >/dev/null; then
2432   if test -s conftest.err; then
2433     ac_cpp_err=$ac_c_preproc_warn_flag
2434   else
2435     ac_cpp_err=
2436   fi
2437 else
2438   ac_cpp_err=yes
2439 fi
2440 if test -z "$ac_cpp_err"; then
2441   :
2442 else
2443   echo "$as_me: failed program was:" >&5
2444   cat conftest.$ac_ext >&5
2445   # Broken: fails on valid input.
2446 continue
2447 fi
2448 rm -f conftest.err conftest.$ac_ext
2449
2450   # OK, works on sane cases.  Now check whether non-existent headers
2451   # can be detected and how.
2452   cat >conftest.$ac_ext <<_ACEOF
2453 #line 2453 "configure"
2454 #include "confdefs.h"
2455 #include <ac_nonexistent.h>
2456 _ACEOF
2457 if { (eval echo "$as_me:2457: \"$ac_cpp conftest.$ac_ext\"") >&5
2458   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2459   ac_status=$?
2460   egrep -v '^ *\+' conftest.er1 >conftest.err
2461   rm -f conftest.er1
2462   cat conftest.err >&5
2463   echo "$as_me:2463: \$? = $ac_status" >&5
2464   (exit $ac_status); } >/dev/null; then
2465   if test -s conftest.err; then
2466     ac_cpp_err=$ac_c_preproc_warn_flag
2467   else
2468     ac_cpp_err=
2469   fi
2470 else
2471   ac_cpp_err=yes
2472 fi
2473 if test -z "$ac_cpp_err"; then
2474   # Broken: success on invalid input.
2475 continue
2476 else
2477   echo "$as_me: failed program was:" >&5
2478   cat conftest.$ac_ext >&5
2479   # Passes both tests.
2480 ac_preproc_ok=:
2481 break
2482 fi
2483 rm -f conftest.err conftest.$ac_ext
2484
2485 done
2486 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2487 rm -f conftest.err conftest.$ac_ext
2488 if $ac_preproc_ok; then
2489   :
2490 else
2491   { { echo "$as_me:2491: error: C preprocessor \"$CPP\" fails sanity check" >&5
2492 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2493    { (exit 1); exit 1; }; }
2494 fi
2495
2496 ac_ext=c
2497 ac_cpp='$CPP $CPPFLAGS'
2498 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2499 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2501 ac_main_return=return
2502
2503 if test $ac_cv_c_compiler_gnu = yes; then
2504     echo "$as_me:2504: checking whether $CC needs -traditional" >&5
2505 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2506 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2507   echo $ECHO_N "(cached) $ECHO_C" >&6
2508 else
2509     ac_pattern="Autoconf.*'x'"
2510   cat >conftest.$ac_ext <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <sgtty.h>
2514 int Autoconf = TIOCGETP;
2515 _ACEOF
2516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2517   egrep "$ac_pattern" >/dev/null 2>&1; then
2518   ac_cv_prog_gcc_traditional=yes
2519 else
2520   ac_cv_prog_gcc_traditional=no
2521 fi
2522 rm -rf conftest*
2523
2524   if test $ac_cv_prog_gcc_traditional = no; then
2525     cat >conftest.$ac_ext <<_ACEOF
2526 #line 2526 "configure"
2527 #include "confdefs.h"
2528 #include <termio.h>
2529 int Autoconf = TCGETA;
2530 _ACEOF
2531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2532   egrep "$ac_pattern" >/dev/null 2>&1; then
2533   ac_cv_prog_gcc_traditional=yes
2534 fi
2535 rm -rf conftest*
2536
2537   fi
2538 fi
2539 echo "$as_me:2539: result: $ac_cv_prog_gcc_traditional" >&5
2540 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2541   if test $ac_cv_prog_gcc_traditional = yes; then
2542     CC="$CC -traditional"
2543   fi
2544 fi
2545
2546 echo "$as_me:2546: checking whether $CC understands -c and -o together" >&5
2547 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2548 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2549   echo $ECHO_N "(cached) $ECHO_C" >&6
2550 else
2551
2552 cat > conftest.$ac_ext <<CF_EOF
2553 int main()
2554 {
2555         ${cf_cv_main_return:-return}(0);
2556 }
2557 CF_EOF
2558 # We do the test twice because some compilers refuse to overwrite an
2559 # existing .o file with -o, though they will create one.
2560 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2561 if { (eval echo "$as_me:2561: \"$ac_try\"") >&5
2562   (eval $ac_try) 2>&5
2563   ac_status=$?
2564   echo "$as_me:2564: \$? = $ac_status" >&5
2565   (exit $ac_status); } &&
2566   test -f conftest2.$ac_objext && { (eval echo "$as_me:2566: \"$ac_try\"") >&5
2567   (eval $ac_try) 2>&5
2568   ac_status=$?
2569   echo "$as_me:2569: \$? = $ac_status" >&5
2570   (exit $ac_status); };
2571 then
2572   eval cf_cv_prog_CC_c_o=yes
2573 else
2574   eval cf_cv_prog_CC_c_o=no
2575 fi
2576 rm -rf conftest*
2577
2578 fi
2579 if test $cf_cv_prog_CC_c_o = yes; then
2580   echo "$as_me:2580: result: yes" >&5
2581 echo "${ECHO_T}yes" >&6
2582 else
2583   echo "$as_me:2583: result: no" >&5
2584 echo "${ECHO_T}no" >&6
2585 fi
2586
2587 if test "$cross_compiling" = yes ; then
2588         LDCONFIG=:
2589 else
2590         case "$cf_cv_system_name" in
2591         (dragonfly*|mirbsd*|freebsd*)
2592                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2593                 ;;
2594         (*) LDPATH=$PATH:/sbin:/usr/sbin
2595                 # Extract the first word of "ldconfig", so it can be a program name with args.
2596 set dummy ldconfig; ac_word=$2
2597 echo "$as_me:2597: checking for $ac_word" >&5
2598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2599 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   case $LDCONFIG in
2603   [\\/]* | ?:[\\/]*)
2604   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2605   ;;
2606   *)
2607   ac_save_IFS=$IFS; IFS=$ac_path_separator
2608 ac_dummy="$LDPATH"
2609 for ac_dir in $ac_dummy; do
2610   IFS=$ac_save_IFS
2611   test -z "$ac_dir" && ac_dir=.
2612   if $as_executable_p "$ac_dir/$ac_word"; then
2613    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2614    echo "$as_me:2614: found $ac_dir/$ac_word" >&5
2615    break
2616 fi
2617 done
2618
2619   ;;
2620 esac
2621 fi
2622 LDCONFIG=$ac_cv_path_LDCONFIG
2623
2624 if test -n "$LDCONFIG"; then
2625   echo "$as_me:2625: result: $LDCONFIG" >&5
2626 echo "${ECHO_T}$LDCONFIG" >&6
2627 else
2628   echo "$as_me:2628: result: no" >&5
2629 echo "${ECHO_T}no" >&6
2630 fi
2631
2632                 ;;
2633         esac
2634 fi
2635
2636 echo "$as_me:2636: checking if you want to ensure bool is consistent with C++" >&5
2637 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2638
2639 # Check whether --with-cxx or --without-cxx was given.
2640 if test "${with_cxx+set}" = set; then
2641   withval="$with_cxx"
2642   cf_with_cxx=$withval
2643 else
2644   cf_with_cxx=yes
2645 fi;
2646 echo "$as_me:2646: result: $cf_with_cxx" >&5
2647 echo "${ECHO_T}$cf_with_cxx" >&6
2648 if test "X$cf_with_cxx" = Xno ; then
2649         CXX=""
2650         GXX=""
2651 else
2652         # with autoconf 2.13, we can change the error to a warning:
2653                 ac_ext=cc
2654 ac_cpp='$CXXCPP $CPPFLAGS'
2655 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2656 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2657 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2658 ac_main_return=return
2659 if test -n "$ac_tool_prefix"; then
2660   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2661   do
2662     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2663 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2664 echo "$as_me:2664: checking for $ac_word" >&5
2665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2666 if test "${ac_cv_prog_CXX+set}" = set; then
2667   echo $ECHO_N "(cached) $ECHO_C" >&6
2668 else
2669   if test -n "$CXX"; then
2670   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2671 else
2672   ac_save_IFS=$IFS; IFS=$ac_path_separator
2673 ac_dummy="$PATH"
2674 for ac_dir in $ac_dummy; do
2675   IFS=$ac_save_IFS
2676   test -z "$ac_dir" && ac_dir=.
2677   $as_executable_p "$ac_dir/$ac_word" || continue
2678 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2679 echo "$as_me:2679: found $ac_dir/$ac_word" >&5
2680 break
2681 done
2682
2683 fi
2684 fi
2685 CXX=$ac_cv_prog_CXX
2686 if test -n "$CXX"; then
2687   echo "$as_me:2687: result: $CXX" >&5
2688 echo "${ECHO_T}$CXX" >&6
2689 else
2690   echo "$as_me:2690: result: no" >&5
2691 echo "${ECHO_T}no" >&6
2692 fi
2693
2694     test -n "$CXX" && break
2695   done
2696 fi
2697 if test -z "$CXX"; then
2698   ac_ct_CXX=$CXX
2699   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2700 do
2701   # Extract the first word of "$ac_prog", so it can be a program name with args.
2702 set dummy $ac_prog; ac_word=$2
2703 echo "$as_me:2703: checking for $ac_word" >&5
2704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2705 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2706   echo $ECHO_N "(cached) $ECHO_C" >&6
2707 else
2708   if test -n "$ac_ct_CXX"; then
2709   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2710 else
2711   ac_save_IFS=$IFS; IFS=$ac_path_separator
2712 ac_dummy="$PATH"
2713 for ac_dir in $ac_dummy; do
2714   IFS=$ac_save_IFS
2715   test -z "$ac_dir" && ac_dir=.
2716   $as_executable_p "$ac_dir/$ac_word" || continue
2717 ac_cv_prog_ac_ct_CXX="$ac_prog"
2718 echo "$as_me:2718: found $ac_dir/$ac_word" >&5
2719 break
2720 done
2721
2722 fi
2723 fi
2724 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2725 if test -n "$ac_ct_CXX"; then
2726   echo "$as_me:2726: result: $ac_ct_CXX" >&5
2727 echo "${ECHO_T}$ac_ct_CXX" >&6
2728 else
2729   echo "$as_me:2729: result: no" >&5
2730 echo "${ECHO_T}no" >&6
2731 fi
2732
2733   test -n "$ac_ct_CXX" && break
2734 done
2735 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2736
2737   CXX=$ac_ct_CXX
2738 fi
2739
2740 # Provide some information about the compiler.
2741 echo "$as_me:2741:" \
2742      "checking for C++ compiler version" >&5
2743 ac_compiler=`set X $ac_compile; echo $2`
2744 { (eval echo "$as_me:2744: \"$ac_compiler --version </dev/null >&5\"") >&5
2745   (eval $ac_compiler --version </dev/null >&5) 2>&5
2746   ac_status=$?
2747   echo "$as_me:2747: \$? = $ac_status" >&5
2748   (exit $ac_status); }
2749 { (eval echo "$as_me:2749: \"$ac_compiler -v </dev/null >&5\"") >&5
2750   (eval $ac_compiler -v </dev/null >&5) 2>&5
2751   ac_status=$?
2752   echo "$as_me:2752: \$? = $ac_status" >&5
2753   (exit $ac_status); }
2754 { (eval echo "$as_me:2754: \"$ac_compiler -V </dev/null >&5\"") >&5
2755   (eval $ac_compiler -V </dev/null >&5) 2>&5
2756   ac_status=$?
2757   echo "$as_me:2757: \$? = $ac_status" >&5
2758   (exit $ac_status); }
2759
2760 echo "$as_me:2760: checking whether we are using the GNU C++ compiler" >&5
2761 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2762 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2763   echo $ECHO_N "(cached) $ECHO_C" >&6
2764 else
2765   cat >conftest.$ac_ext <<_ACEOF
2766 #line 2766 "configure"
2767 #include "confdefs.h"
2768
2769 int
2770 main ()
2771 {
2772 #ifndef __GNUC__
2773        choke me
2774 #endif
2775
2776   ;
2777   return 0;
2778 }
2779 _ACEOF
2780 rm -f conftest.$ac_objext
2781 if { (eval echo "$as_me:2781: \"$ac_compile\"") >&5
2782   (eval $ac_compile) 2>&5
2783   ac_status=$?
2784   echo "$as_me:2784: \$? = $ac_status" >&5
2785   (exit $ac_status); } &&
2786          { ac_try='test -s conftest.$ac_objext'
2787   { (eval echo "$as_me:2787: \"$ac_try\"") >&5
2788   (eval $ac_try) 2>&5
2789   ac_status=$?
2790   echo "$as_me:2790: \$? = $ac_status" >&5
2791   (exit $ac_status); }; }; then
2792   ac_compiler_gnu=yes
2793 else
2794   echo "$as_me: failed program was:" >&5
2795 cat conftest.$ac_ext >&5
2796 ac_compiler_gnu=no
2797 fi
2798 rm -f conftest.$ac_objext conftest.$ac_ext
2799 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2800
2801 fi
2802 echo "$as_me:2802: result: $ac_cv_cxx_compiler_gnu" >&5
2803 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2804 GXX=`test $ac_compiler_gnu = yes && echo yes`
2805 ac_test_CXXFLAGS=${CXXFLAGS+set}
2806 ac_save_CXXFLAGS=$CXXFLAGS
2807 CXXFLAGS="-g"
2808 echo "$as_me:2808: checking whether $CXX accepts -g" >&5
2809 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2810 if test "${ac_cv_prog_cxx_g+set}" = set; then
2811   echo $ECHO_N "(cached) $ECHO_C" >&6
2812 else
2813   cat >conftest.$ac_ext <<_ACEOF
2814 #line 2814 "configure"
2815 #include "confdefs.h"
2816
2817 int
2818 main ()
2819 {
2820
2821   ;
2822   return 0;
2823 }
2824 _ACEOF
2825 rm -f conftest.$ac_objext
2826 if { (eval echo "$as_me:2826: \"$ac_compile\"") >&5
2827   (eval $ac_compile) 2>&5
2828   ac_status=$?
2829   echo "$as_me:2829: \$? = $ac_status" >&5
2830   (exit $ac_status); } &&
2831          { ac_try='test -s conftest.$ac_objext'
2832   { (eval echo "$as_me:2832: \"$ac_try\"") >&5
2833   (eval $ac_try) 2>&5
2834   ac_status=$?
2835   echo "$as_me:2835: \$? = $ac_status" >&5
2836   (exit $ac_status); }; }; then
2837   ac_cv_prog_cxx_g=yes
2838 else
2839   echo "$as_me: failed program was:" >&5
2840 cat conftest.$ac_ext >&5
2841 ac_cv_prog_cxx_g=no
2842 fi
2843 rm -f conftest.$ac_objext conftest.$ac_ext
2844 fi
2845 echo "$as_me:2845: result: $ac_cv_prog_cxx_g" >&5
2846 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2847 if test "$ac_test_CXXFLAGS" = set; then
2848   CXXFLAGS=$ac_save_CXXFLAGS
2849 elif test $ac_cv_prog_cxx_g = yes; then
2850   if test "$GXX" = yes; then
2851     CXXFLAGS="-g -O2"
2852   else
2853     CXXFLAGS="-g"
2854   fi
2855 else
2856   if test "$GXX" = yes; then
2857     CXXFLAGS="-O2"
2858   else
2859     CXXFLAGS=
2860   fi
2861 fi
2862 for ac_declaration in \
2863    ''\
2864    '#include <stdlib.h>' \
2865    'extern "C" void std::exit (int) throw (); using std::exit;' \
2866    'extern "C" void std::exit (int); using std::exit;' \
2867    'extern "C" void exit (int) throw ();' \
2868    'extern "C" void exit (int);' \
2869    'void exit (int);'
2870 do
2871   cat >conftest.$ac_ext <<_ACEOF
2872 #line 2872 "configure"
2873 #include "confdefs.h"
2874 #include <stdlib.h>
2875 $ac_declaration
2876 int
2877 main ()
2878 {
2879 exit (42);
2880   ;
2881   return 0;
2882 }
2883 _ACEOF
2884 rm -f conftest.$ac_objext
2885 if { (eval echo "$as_me:2885: \"$ac_compile\"") >&5
2886   (eval $ac_compile) 2>&5
2887   ac_status=$?
2888   echo "$as_me:2888: \$? = $ac_status" >&5
2889   (exit $ac_status); } &&
2890          { ac_try='test -s conftest.$ac_objext'
2891   { (eval echo "$as_me:2891: \"$ac_try\"") >&5
2892   (eval $ac_try) 2>&5
2893   ac_status=$?
2894   echo "$as_me:2894: \$? = $ac_status" >&5
2895   (exit $ac_status); }; }; then
2896   :
2897 else
2898   echo "$as_me: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
2900 continue
2901 fi
2902 rm -f conftest.$ac_objext conftest.$ac_ext
2903   cat >conftest.$ac_ext <<_ACEOF
2904 #line 2904 "configure"
2905 #include "confdefs.h"
2906 $ac_declaration
2907 int
2908 main ()
2909 {
2910 exit (42);
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 rm -f conftest.$ac_objext
2916 if { (eval echo "$as_me:2916: \"$ac_compile\"") >&5
2917   (eval $ac_compile) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); } &&
2921          { ac_try='test -s conftest.$ac_objext'
2922   { (eval echo "$as_me:2922: \"$ac_try\"") >&5
2923   (eval $ac_try) 2>&5
2924   ac_status=$?
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit $ac_status); }; }; then
2927   break
2928 else
2929   echo "$as_me: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 fi
2932 rm -f conftest.$ac_objext conftest.$ac_ext
2933 done
2934 rm -rf conftest*
2935 if test -n "$ac_declaration"; then
2936   echo '#ifdef __cplusplus' >>confdefs.h
2937   echo $ac_declaration      >>confdefs.h
2938   echo '#endif'             >>confdefs.h
2939 fi
2940
2941 ac_ext=c
2942 ac_cpp='$CPP $CPPFLAGS'
2943 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2944 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2945 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2946 ac_main_return=return
2947
2948         ac_ext=cc
2949 ac_cpp='$CXXCPP $CPPFLAGS'
2950 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2951 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2952 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2953 ac_main_return=return
2954
2955         if test "x$cf_with_cxx" != xno
2956         then
2957                 # Several of the C++ configurations do not work, particularly when
2958                 # cross-compiling (20140913 -TD)
2959                 echo "$as_me:2959: checking if $CXX works" >&5
2960 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2961
2962                 save_CPPFLAGS="$CPPFLAGS"
2963                 eval cf_includedir=${includedir}
2964                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2965
2966 cat >conftest.$ac_ext <<_ACEOF
2967 #line 2967 "configure"
2968 #include "confdefs.h"
2969
2970 #include <stdlib.h>
2971 #include <stdio.h>
2972
2973 int
2974 main ()
2975 {
2976
2977                 printf("Hello world!\n")
2978
2979   ;
2980   return 0;
2981 }
2982 _ACEOF
2983 rm -f conftest.$ac_objext
2984 if { (eval echo "$as_me:2984: \"$ac_compile\"") >&5
2985   (eval $ac_compile) 2>&5
2986   ac_status=$?
2987   echo "$as_me:2987: \$? = $ac_status" >&5
2988   (exit $ac_status); } &&
2989          { ac_try='test -s conftest.$ac_objext'
2990   { (eval echo "$as_me:2990: \"$ac_try\"") >&5
2991   (eval $ac_try) 2>&5
2992   ac_status=$?
2993   echo "$as_me:2993: \$? = $ac_status" >&5
2994   (exit $ac_status); }; }; then
2995   cf_cxx_works=yes
2996 else
2997   echo "$as_me: failed program was:" >&5
2998 cat conftest.$ac_ext >&5
2999 cf_cxx_works=no
3000 fi
3001 rm -f conftest.$ac_objext conftest.$ac_ext
3002                 CPPFLAGS="$save_CPPFLAGS"
3003
3004                 echo "$as_me:3004: result: $cf_cxx_works" >&5
3005 echo "${ECHO_T}$cf_cxx_works" >&6
3006                 if test "x$cf_cxx_works" = xno
3007                 then
3008                         { echo "$as_me:3008: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3009 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3010                         cf_with_cxx=no; CXX=""; GXX="";
3011                 fi
3012         fi
3013         ac_ext=c
3014 ac_cpp='$CPP $CPPFLAGS'
3015 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3016 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3017 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3018 ac_main_return=return
3019
3020         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3021         if test "$CXX" = "g++" ; then
3022                 # Extract the first word of "g++", so it can be a program name with args.
3023 set dummy g++; ac_word=$2
3024 echo "$as_me:3024: checking for $ac_word" >&5
3025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3026 if test "${ac_cv_path_CXX+set}" = set; then
3027   echo $ECHO_N "(cached) $ECHO_C" >&6
3028 else
3029   case $CXX in
3030   [\\/]* | ?:[\\/]*)
3031   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3032   ;;
3033   *)
3034   ac_save_IFS=$IFS; IFS=$ac_path_separator
3035 ac_dummy="$PATH"
3036 for ac_dir in $ac_dummy; do
3037   IFS=$ac_save_IFS
3038   test -z "$ac_dir" && ac_dir=.
3039   if $as_executable_p "$ac_dir/$ac_word"; then
3040    ac_cv_path_CXX="$ac_dir/$ac_word"
3041    echo "$as_me:3041: found $ac_dir/$ac_word" >&5
3042    break
3043 fi
3044 done
3045
3046   ;;
3047 esac
3048 fi
3049 CXX=$ac_cv_path_CXX
3050
3051 if test -n "$CXX"; then
3052   echo "$as_me:3052: result: $CXX" >&5
3053 echo "${ECHO_T}$CXX" >&6
3054 else
3055   echo "$as_me:3055: result: no" >&5
3056 echo "${ECHO_T}no" >&6
3057 fi
3058
3059         fi
3060         case "x$CXX" in
3061         (x|xg++)
3062                 { echo "$as_me:3062: WARNING: You don't have any C++ compiler, too bad" >&5
3063 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3064                 cf_with_cxx=no; CXX=""; GXX="";
3065                 ;;
3066         esac
3067 fi
3068
3069 GXX_VERSION=none
3070 if test "$GXX" = yes; then
3071         echo "$as_me:3071: checking version of ${CXX:-g++}" >&5
3072 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3073         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3074         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3075         echo "$as_me:3075: result: $GXX_VERSION" >&5
3076 echo "${ECHO_T}$GXX_VERSION" >&6
3077 fi
3078
3079 case $GXX_VERSION in
3080 (1*|2.[0-6]*)
3081         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3082         # cf_cxx_library=no
3083         { echo "$as_me:3083: WARNING: templates do not work" >&5
3084 echo "$as_me: WARNING: templates do not work" >&2;}
3085         ;;
3086 esac
3087
3088 echo "$as_me:3088: checking if you want to build C++ binding and demo" >&5
3089 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3090
3091 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3092 if test "${with_cxx_binding+set}" = set; then
3093   withval="$with_cxx_binding"
3094   cf_with_cxx_binding=$withval
3095 else
3096   cf_with_cxx_binding=$cf_with_cxx
3097 fi;
3098 echo "$as_me:3098: result: $cf_with_cxx_binding" >&5
3099 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3100
3101 echo "$as_me:3101: checking if you want to build with Ada95" >&5
3102 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3103 echo "$as_me:3103: result: $cf_with_ada" >&5
3104 echo "${ECHO_T}$cf_with_ada" >&6
3105
3106 echo "$as_me:3106: checking if you want to install terminal database" >&5
3107 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3108
3109 # Check whether --enable-db-install or --disable-db-install was given.
3110 if test "${enable_db_install+set}" = set; then
3111   enableval="$enable_db_install"
3112   cf_with_db_install=$enableval
3113 else
3114   cf_with_db_install=yes
3115 fi;
3116 echo "$as_me:3116: result: $cf_with_db_install" >&5
3117 echo "${ECHO_T}$cf_with_db_install" >&6
3118
3119 echo "$as_me:3119: checking if you want to install manpages" >&5
3120 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3121
3122 # Check whether --with-manpages or --without-manpages was given.
3123 if test "${with_manpages+set}" = set; then
3124   withval="$with_manpages"
3125   cf_with_manpages=$withval
3126 else
3127   cf_with_manpages=yes
3128 fi;
3129 echo "$as_me:3129: result: $cf_with_manpages" >&5
3130 echo "${ECHO_T}$cf_with_manpages" >&6
3131
3132 echo "$as_me:3132: checking if you want to build programs such as tic" >&5
3133 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3134
3135 # Check whether --with-progs or --without-progs was given.
3136 if test "${with_progs+set}" = set; then
3137   withval="$with_progs"
3138   cf_with_progs=$withval
3139 else
3140   cf_with_progs=yes
3141 fi;
3142 echo "$as_me:3142: result: $cf_with_progs" >&5
3143 echo "${ECHO_T}$cf_with_progs" >&6
3144
3145 echo "$as_me:3145: checking if you want to build test-programs" >&5
3146 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3147
3148 # Check whether --with-tests or --without-tests was given.
3149 if test "${with_tests+set}" = set; then
3150   withval="$with_tests"
3151   cf_with_tests=$withval
3152 else
3153   cf_with_tests=yes
3154 fi;
3155 echo "$as_me:3155: result: $cf_with_tests" >&5
3156 echo "${ECHO_T}$cf_with_tests" >&6
3157
3158 echo "$as_me:3158: checking if you wish to install curses.h" >&5
3159 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3160
3161 # Check whether --with-curses-h or --without-curses-h was given.
3162 if test "${with_curses_h+set}" = set; then
3163   withval="$with_curses_h"
3164   with_curses_h=$withval
3165 else
3166   with_curses_h=yes
3167 fi;
3168 echo "$as_me:3168: result: $with_curses_h" >&5
3169 echo "${ECHO_T}$with_curses_h" >&6
3170
3171 modules_to_build="ncurses"
3172 if test "X$cf_with_progs" != Xno ; then
3173 modules_to_build="$modules_to_build progs tack"
3174 fi
3175 modules_to_build="$modules_to_build panel menu form"
3176
3177 test "$program_prefix" != NONE &&
3178   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3179 # Use a double $ so make ignores it.
3180 test "$program_suffix" != NONE &&
3181   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3182 # Double any \ or $.  echo might interpret backslashes.
3183 # By default was `s,x,x', remove it if useless.
3184 cat <<\_ACEOF >conftest.sed
3185 s/[\\$]/&&/g;s/;s,x,x,$//
3186 _ACEOF
3187 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3188 rm conftest.sed
3189
3190 for ac_prog in mawk gawk nawk awk
3191 do
3192   # Extract the first word of "$ac_prog", so it can be a program name with args.
3193 set dummy $ac_prog; ac_word=$2
3194 echo "$as_me:3194: checking for $ac_word" >&5
3195 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3196 if test "${ac_cv_prog_AWK+set}" = set; then
3197   echo $ECHO_N "(cached) $ECHO_C" >&6
3198 else
3199   if test -n "$AWK"; then
3200   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3201 else
3202   ac_save_IFS=$IFS; IFS=$ac_path_separator
3203 ac_dummy="$PATH"
3204 for ac_dir in $ac_dummy; do
3205   IFS=$ac_save_IFS
3206   test -z "$ac_dir" && ac_dir=.
3207   $as_executable_p "$ac_dir/$ac_word" || continue
3208 ac_cv_prog_AWK="$ac_prog"
3209 echo "$as_me:3209: found $ac_dir/$ac_word" >&5
3210 break
3211 done
3212
3213 fi
3214 fi
3215 AWK=$ac_cv_prog_AWK
3216 if test -n "$AWK"; then
3217   echo "$as_me:3217: result: $AWK" >&5
3218 echo "${ECHO_T}$AWK" >&6
3219 else
3220   echo "$as_me:3220: result: no" >&5
3221 echo "${ECHO_T}no" >&6
3222 fi
3223
3224   test -n "$AWK" && break
3225 done
3226
3227 test -z "$AWK" && { { echo "$as_me:3227: error: No awk program found" >&5
3228 echo "$as_me: error: No awk program found" >&2;}
3229    { (exit 1); exit 1; }; }
3230
3231 echo "$as_me:3231: checking for egrep" >&5
3232 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3233 if test "${ac_cv_prog_egrep+set}" = set; then
3234   echo $ECHO_N "(cached) $ECHO_C" >&6
3235 else
3236   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3237                 then ac_cv_prog_egrep='grep -E'
3238                 else ac_cv_prog_egrep='egrep'
3239         fi
3240 fi
3241 echo "$as_me:3241: result: $ac_cv_prog_egrep" >&5
3242 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3243         EGREP=$ac_cv_prog_egrep
3244
3245         test -z "$EGREP" && { { echo "$as_me:3245: error: No egrep program found" >&5
3246 echo "$as_me: error: No egrep program found" >&2;}
3247    { (exit 1); exit 1; }; }
3248
3249 # Find a good install program.  We prefer a C program (faster),
3250 # so one script is as good as another.  But avoid the broken or
3251 # incompatible versions:
3252 # SysV /etc/install, /usr/sbin/install
3253 # SunOS /usr/etc/install
3254 # IRIX /sbin/install
3255 # AIX /bin/install
3256 # AmigaOS /C/install, which installs bootblocks on floppy discs
3257 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3258 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3259 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3260 # ./install, which can be erroneously created by make from ./install.sh.
3261 echo "$as_me:3261: checking for a BSD compatible install" >&5
3262 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3263 if test -z "$INSTALL"; then
3264 if test "${ac_cv_path_install+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267     ac_save_IFS=$IFS; IFS=$ac_path_separator
3268   for ac_dir in $PATH; do
3269     IFS=$ac_save_IFS
3270     # Account for people who put trailing slashes in PATH elements.
3271     case $ac_dir/ in
3272     / | ./ | .// | /cC/* \
3273     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3274     | /usr/ucb/* ) ;;
3275     *)
3276       # OSF1 and SCO ODT 3.0 have their own names for install.
3277       # Don't use installbsd from OSF since it installs stuff as root
3278       # by default.
3279       for ac_prog in ginstall scoinst install; do
3280         if $as_executable_p "$ac_dir/$ac_prog"; then
3281           if test $ac_prog = install &&
3282             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3283             # AIX install.  It has an incompatible calling convention.
3284             :
3285           elif test $ac_prog = install &&
3286             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3287             # program-specific install script used by HP pwplus--don't use.
3288             :
3289           else
3290             ac_cv_path_install="$ac_dir/$ac_prog -c"
3291             break 2
3292           fi
3293         fi
3294       done
3295       ;;
3296     esac
3297   done
3298
3299 fi
3300   if test "${ac_cv_path_install+set}" = set; then
3301     INSTALL=$ac_cv_path_install
3302   else
3303     # As a last resort, use the slow shell script.  We don't cache a
3304     # path for INSTALL within a source directory, because that will
3305     # break other packages using the cache if that directory is
3306     # removed, or if the path is relative.
3307     INSTALL=$ac_install_sh
3308   fi
3309 fi
3310 echo "$as_me:3310: result: $INSTALL" >&5
3311 echo "${ECHO_T}$INSTALL" >&6
3312
3313 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3314 # It thinks the first close brace ends the variable substitution.
3315 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3316
3317 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3318
3319 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3320
3321 case $INSTALL in
3322 (/*)
3323         ;;
3324 (*)
3325         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3326         test -z "$cf_dir" && cf_dir=.
3327         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3328         ;;
3329 esac
3330
3331 for ac_prog in lint cppcheck splint
3332 do
3333   # Extract the first word of "$ac_prog", so it can be a program name with args.
3334 set dummy $ac_prog; ac_word=$2
3335 echo "$as_me:3335: checking for $ac_word" >&5
3336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3337 if test "${ac_cv_prog_LINT+set}" = set; then
3338   echo $ECHO_N "(cached) $ECHO_C" >&6
3339 else
3340   if test -n "$LINT"; then
3341   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3342 else
3343   ac_save_IFS=$IFS; IFS=$ac_path_separator
3344 ac_dummy="$PATH"
3345 for ac_dir in $ac_dummy; do
3346   IFS=$ac_save_IFS
3347   test -z "$ac_dir" && ac_dir=.
3348   $as_executable_p "$ac_dir/$ac_word" || continue
3349 ac_cv_prog_LINT="$ac_prog"
3350 echo "$as_me:3350: found $ac_dir/$ac_word" >&5
3351 break
3352 done
3353
3354 fi
3355 fi
3356 LINT=$ac_cv_prog_LINT
3357 if test -n "$LINT"; then
3358   echo "$as_me:3358: result: $LINT" >&5
3359 echo "${ECHO_T}$LINT" >&6
3360 else
3361   echo "$as_me:3361: result: no" >&5
3362 echo "${ECHO_T}no" >&6
3363 fi
3364
3365   test -n "$LINT" && break
3366 done
3367
3368 echo "$as_me:3368: checking whether ln -s works" >&5
3369 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3370 LN_S=$as_ln_s
3371 if test "$LN_S" = "ln -s"; then
3372   echo "$as_me:3372: result: yes" >&5
3373 echo "${ECHO_T}yes" >&6
3374 else
3375   echo "$as_me:3375: result: no, using $LN_S" >&5
3376 echo "${ECHO_T}no, using $LN_S" >&6
3377 fi
3378
3379 echo "$as_me:3379: checking if $LN_S -f options work" >&5
3380 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3381
3382 rm -f conf$$.src conf$$dst
3383 echo >conf$$.dst
3384 echo first >conf$$.src
3385 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3386         cf_prog_ln_sf=yes
3387 else
3388         cf_prog_ln_sf=no
3389 fi
3390 rm -f conf$$.dst conf$$src
3391 echo "$as_me:3391: result: $cf_prog_ln_sf" >&5
3392 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3393
3394 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3395
3396 echo "$as_me:3396: checking for long file names" >&5
3397 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3398 if test "${ac_cv_sys_long_file_names+set}" = set; then
3399   echo $ECHO_N "(cached) $ECHO_C" >&6
3400 else
3401   ac_cv_sys_long_file_names=yes
3402 # Test for long file names in all the places we know might matter:
3403 #      .                the current directory, where building will happen
3404 #      $prefix/lib      where we will be installing things
3405 #      $exec_prefix/lib likewise
3406 # eval it to expand exec_prefix.
3407 #      $TMPDIR          if set, where it might want to write temporary files
3408 # if $TMPDIR is not set:
3409 #      /tmp             where it might want to write temporary files
3410 #      /var/tmp         likewise
3411 #      /usr/tmp         likewise
3412 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3413   ac_tmpdirs=$TMPDIR
3414 else
3415   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3416 fi
3417 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3418   test -d $ac_dir || continue
3419   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3420   ac_xdir=$ac_dir/cf$$
3421   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3422   ac_tf1=$ac_xdir/conftest9012345
3423   ac_tf2=$ac_xdir/conftest9012346
3424   (echo 1 >$ac_tf1) 2>/dev/null
3425   (echo 2 >$ac_tf2) 2>/dev/null
3426   ac_val=`cat $ac_tf1 2>/dev/null`
3427   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3428     ac_cv_sys_long_file_names=no
3429     rm -rf $ac_xdir 2>/dev/null
3430     break
3431   fi
3432   rm -rf $ac_xdir 2>/dev/null
3433 done
3434 fi
3435 echo "$as_me:3435: result: $ac_cv_sys_long_file_names" >&5
3436 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3437 if test $ac_cv_sys_long_file_names = yes; then
3438
3439 cat >>confdefs.h <<\EOF
3440 #define HAVE_LONG_FILE_NAMES 1
3441 EOF
3442
3443 fi
3444
3445 # if we find pkg-config, check if we should install the ".pc" files.
3446
3447 echo "$as_me:3447: checking if you want to use pkg-config" >&5
3448 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3449
3450 # Check whether --with-pkg-config or --without-pkg-config was given.
3451 if test "${with_pkg_config+set}" = set; then
3452   withval="$with_pkg_config"
3453   cf_pkg_config=$withval
3454 else
3455   cf_pkg_config=yes
3456 fi;
3457 echo "$as_me:3457: result: $cf_pkg_config" >&5
3458 echo "${ECHO_T}$cf_pkg_config" >&6
3459
3460 case $cf_pkg_config in
3461 (no)
3462         PKG_CONFIG=none
3463         ;;
3464 (yes)
3465
3466 if test -n "$ac_tool_prefix"; then
3467   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3468 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3469 echo "$as_me:3469: checking for $ac_word" >&5
3470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3471 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3472   echo $ECHO_N "(cached) $ECHO_C" >&6
3473 else
3474   case $PKG_CONFIG in
3475   [\\/]* | ?:[\\/]*)
3476   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3477   ;;
3478   *)
3479   ac_save_IFS=$IFS; IFS=$ac_path_separator
3480 ac_dummy="$PATH"
3481 for ac_dir in $ac_dummy; do
3482   IFS=$ac_save_IFS
3483   test -z "$ac_dir" && ac_dir=.
3484   if $as_executable_p "$ac_dir/$ac_word"; then
3485    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3486    echo "$as_me:3486: found $ac_dir/$ac_word" >&5
3487    break
3488 fi
3489 done
3490
3491   ;;
3492 esac
3493 fi
3494 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3495
3496 if test -n "$PKG_CONFIG"; then
3497   echo "$as_me:3497: result: $PKG_CONFIG" >&5
3498 echo "${ECHO_T}$PKG_CONFIG" >&6
3499 else
3500   echo "$as_me:3500: result: no" >&5
3501 echo "${ECHO_T}no" >&6
3502 fi
3503
3504 fi
3505 if test -z "$ac_cv_path_PKG_CONFIG"; then
3506   ac_pt_PKG_CONFIG=$PKG_CONFIG
3507   # Extract the first word of "pkg-config", so it can be a program name with args.
3508 set dummy pkg-config; ac_word=$2
3509 echo "$as_me:3509: checking for $ac_word" >&5
3510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3511 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3512   echo $ECHO_N "(cached) $ECHO_C" >&6
3513 else
3514   case $ac_pt_PKG_CONFIG in
3515   [\\/]* | ?:[\\/]*)
3516   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3517   ;;
3518   *)
3519   ac_save_IFS=$IFS; IFS=$ac_path_separator
3520 ac_dummy="$PATH"
3521 for ac_dir in $ac_dummy; do
3522   IFS=$ac_save_IFS
3523   test -z "$ac_dir" && ac_dir=.
3524   if $as_executable_p "$ac_dir/$ac_word"; then
3525    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3526    echo "$as_me:3526: found $ac_dir/$ac_word" >&5
3527    break
3528 fi
3529 done
3530
3531   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3532   ;;
3533 esac
3534 fi
3535 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3536
3537 if test -n "$ac_pt_PKG_CONFIG"; then
3538   echo "$as_me:3538: result: $ac_pt_PKG_CONFIG" >&5
3539 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3540 else
3541   echo "$as_me:3541: result: no" >&5
3542 echo "${ECHO_T}no" >&6
3543 fi
3544
3545   PKG_CONFIG=$ac_pt_PKG_CONFIG
3546 else
3547   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3548 fi
3549
3550         ;;
3551 (*)
3552         PKG_CONFIG=$withval
3553         ;;
3554 esac
3555
3556 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3557 if test "$PKG_CONFIG" != none ; then
3558
3559 if test "x$prefix" != xNONE; then
3560         cf_path_syntax="$prefix"
3561 else
3562         cf_path_syntax="$ac_default_prefix"
3563 fi
3564
3565 case ".$PKG_CONFIG" in
3566 (.\$\(*\)*|.\'*\'*)
3567         ;;
3568 (..|./*|.\\*)
3569         ;;
3570 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3571         ;;
3572 (.\${*prefix}*|.\${*dir}*)
3573         eval PKG_CONFIG="$PKG_CONFIG"
3574         case ".$PKG_CONFIG" in
3575         (.NONE/*)
3576                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3577                 ;;
3578         esac
3579         ;;
3580 (.no|.NONE/*)
3581         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3582         ;;
3583 (*)
3584         { { echo "$as_me:3584: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3585 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3586    { (exit 1); exit 1; }; }
3587         ;;
3588 esac
3589
3590 elif test "x$cf_pkg_config" != xno ; then
3591         { echo "$as_me:3591: WARNING: pkg-config is not installed" >&5
3592 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3593 fi
3594
3595 case $PKG_CONFIG in
3596 (no|none|yes)
3597         echo "$as_me:3597: checking for pkg-config library directory" >&5
3598 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3599         ;;
3600 (*)
3601         echo "$as_me:3601: checking for $PKG_CONFIG library directory" >&5
3602 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3603         ;;
3604 esac
3605
3606 PKG_CONFIG_LIBDIR=no
3607
3608 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3609 if test "${with_pkg_config_libdir+set}" = set; then
3610   withval="$with_pkg_config_libdir"
3611   PKG_CONFIG_LIBDIR=$withval
3612 else
3613   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3614 fi;
3615
3616 case x$PKG_CONFIG_LIBDIR in
3617 (x/*)
3618         ;;
3619 (xyes)
3620         # Look for the library directory using the same prefix as the executable
3621         if test "x$PKG_CONFIG" = xnone
3622         then
3623                 cf_path=$prefix
3624         else
3625                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3626         fi
3627
3628         # If you don't like using the default architecture, you have to specify the
3629         # intended library directory and corresponding compiler/linker options.
3630         #
3631         # This case allows for Debian's 2014-flavor of multiarch, along with the
3632         # most common variations before that point.  Some other variants spell the
3633         # directory differently, e.g., "pkg-config", and put it in unusual places.
3634         # pkg-config has always been poorly standardized, which is ironic...
3635         case x`(arch) 2>/dev/null` in
3636         (*64)
3637                 cf_search_path="\
3638                         $cf_path/lib/*64-linux-gnu \
3639                         $cf_path/share \
3640                         $cf_path/lib64 \
3641                         $cf_path/lib32 \
3642                         $cf_path/lib"
3643                 ;;
3644         (*)
3645                 cf_search_path="\
3646                         $cf_path/lib/*-linux-gnu \
3647                         $cf_path/share \
3648                         $cf_path/lib32 \
3649                         $cf_path/lib \
3650                         $cf_path/libdata"
3651                 ;;
3652         esac
3653
3654         test -n "$verbose" && echo "    list..." 1>&6
3655
3656 echo "${as_me:-configure}:3656: testing list... ..." 1>&5
3657
3658         for cf_config in $cf_search_path
3659         do
3660                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3661
3662 echo "${as_me:-configure}:3662: testing checking $cf_config/pkgconfig ..." 1>&5
3663
3664                 if test -d $cf_config/pkgconfig
3665                 then
3666                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3667                         echo "$as_me:3667: checking done" >&5
3668 echo $ECHO_N "checking done... $ECHO_C" >&6
3669                         break
3670                 fi
3671         done
3672         ;;
3673 (*)
3674         ;;
3675 esac
3676
3677 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3678         echo "$as_me:3678: result: $PKG_CONFIG_LIBDIR" >&5
3679 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3680 fi
3681
3682 if test "x$PKG_CONFIG" != xnone
3683 then
3684         echo "$as_me:3684: checking if we should install .pc files for $PKG_CONFIG" >&5
3685 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3686 else
3687         echo "$as_me:3687: checking if we should install .pc files" >&5
3688 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3689 fi
3690
3691 # Check whether --enable-pc-files or --disable-pc-files was given.
3692 if test "${enable_pc_files+set}" = set; then
3693   enableval="$enable_pc_files"
3694   enable_pc_files=$enableval
3695 else
3696   enable_pc_files=no
3697 fi;
3698 echo "$as_me:3698: result: $enable_pc_files" >&5
3699 echo "${ECHO_T}$enable_pc_files" >&6
3700
3701 if test "x$enable_pc_files" != xno
3702 then
3703         MAKE_PC_FILES=
3704         case "x$PKG_CONFIG_LIBDIR" in
3705         (xno|xyes)
3706                 { echo "$as_me:3706: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3707 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3708                 ;;
3709         (*)
3710
3711 if test "x$prefix" != xNONE; then
3712         cf_path_syntax="$prefix"
3713 else
3714         cf_path_syntax="$ac_default_prefix"
3715 fi
3716
3717 case ".$PKG_CONFIG_LIBDIR" in
3718 (.\$\(*\)*|.\'*\'*)
3719         ;;
3720 (..|./*|.\\*)
3721         ;;
3722 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3723         ;;
3724 (.\${*prefix}*|.\${*dir}*)
3725         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3726         case ".$PKG_CONFIG_LIBDIR" in
3727         (.NONE/*)
3728                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3729                 ;;
3730         esac
3731         ;;
3732 (.no|.NONE/*)
3733         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3734         ;;
3735 (*)
3736         { { echo "$as_me:3736: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3737 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3738    { (exit 1); exit 1; }; }
3739         ;;
3740 esac
3741
3742                 ;;
3743         esac
3744 else
3745         MAKE_PC_FILES="#"
3746 fi
3747
3748 if test -z "$MAKE_PC_FILES"
3749 then
3750         echo "$as_me:3750: checking for suffix to add to pc-files" >&5
3751 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3752
3753 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3754 if test "${with_pc_suffix+set}" = set; then
3755   withval="$with_pc_suffix"
3756   case "x$withval" in
3757         (xyes|xno)
3758                 PC_MODULE_SUFFIX=
3759                 ;;
3760         (*)     PC_MODULE_SUFFIX="$withval"
3761                 ;;
3762         esac
3763 fi;
3764         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3765         echo "$as_me:3765: result: $PC_MODULE_SUFFIX" >&5
3766 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3767         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3768
3769 fi
3770
3771 echo "$as_me:3771: checking if we should assume mixed-case filenames" >&5
3772 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3773
3774 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3775 if test "${enable_mixed_case+set}" = set; then
3776   enableval="$enable_mixed_case"
3777   enable_mixedcase=$enableval
3778 else
3779   enable_mixedcase=auto
3780 fi;
3781 echo "$as_me:3781: result: $enable_mixedcase" >&5
3782 echo "${ECHO_T}$enable_mixedcase" >&6
3783 if test "$enable_mixedcase" = "auto" ; then
3784
3785 echo "$as_me:3785: checking if filesystem supports mixed-case filenames" >&5
3786 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3787 if test "${cf_cv_mixedcase+set}" = set; then
3788   echo $ECHO_N "(cached) $ECHO_C" >&6
3789 else
3790
3791 if test "$cross_compiling" = yes ; then
3792         case $target_alias in
3793         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3794                 cf_cv_mixedcase=no
3795                 ;;
3796         (*)
3797                 cf_cv_mixedcase=yes
3798                 ;;
3799         esac
3800 else
3801         rm -f conftest CONFTEST
3802         echo test >conftest
3803         if test -f CONFTEST ; then
3804                 cf_cv_mixedcase=no
3805         else
3806                 cf_cv_mixedcase=yes
3807         fi
3808         rm -f conftest CONFTEST
3809 fi
3810
3811 fi
3812 echo "$as_me:3812: result: $cf_cv_mixedcase" >&5
3813 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3814 test "$cf_cv_mixedcase" = yes &&
3815 cat >>confdefs.h <<\EOF
3816 #define MIXEDCASE_FILENAMES 1
3817 EOF
3818
3819 else
3820         cf_cv_mixedcase=$enable_mixedcase
3821         if test "x$enable_mixedcase" = "xyes" ; then
3822
3823 cat >>confdefs.h <<\EOF
3824 #define MIXEDCASE_FILENAMES 1
3825 EOF
3826
3827         fi
3828 fi
3829
3830 # do this after mixed-case option (tags/TAGS is not as important as tic).
3831 echo "$as_me:3831: checking whether ${MAKE-make} sets \${MAKE}" >&5
3832 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3833 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3834 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3835   echo $ECHO_N "(cached) $ECHO_C" >&6
3836 else
3837   cat >conftest.make <<\EOF
3838 all:
3839         @echo 'ac_maketemp="${MAKE}"'
3840 EOF
3841 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3842 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3843 if test -n "$ac_maketemp"; then
3844   eval ac_cv_prog_make_${ac_make}_set=yes
3845 else
3846   eval ac_cv_prog_make_${ac_make}_set=no
3847 fi
3848 rm -f conftest.make
3849 fi
3850 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3851   echo "$as_me:3851: result: yes" >&5
3852 echo "${ECHO_T}yes" >&6
3853   SET_MAKE=
3854 else
3855   echo "$as_me:3855: result: no" >&5
3856 echo "${ECHO_T}no" >&6
3857   SET_MAKE="MAKE=${MAKE-make}"
3858 fi
3859
3860 for ac_prog in exctags ctags
3861 do
3862   # Extract the first word of "$ac_prog", so it can be a program name with args.
3863 set dummy $ac_prog; ac_word=$2
3864 echo "$as_me:3864: checking for $ac_word" >&5
3865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3866 if test "${ac_cv_prog_CTAGS+set}" = set; then
3867   echo $ECHO_N "(cached) $ECHO_C" >&6
3868 else
3869   if test -n "$CTAGS"; then
3870   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3871 else
3872   ac_save_IFS=$IFS; IFS=$ac_path_separator
3873 ac_dummy="$PATH"
3874 for ac_dir in $ac_dummy; do
3875   IFS=$ac_save_IFS
3876   test -z "$ac_dir" && ac_dir=.
3877   $as_executable_p "$ac_dir/$ac_word" || continue
3878 ac_cv_prog_CTAGS="$ac_prog"
3879 echo "$as_me:3879: found $ac_dir/$ac_word" >&5
3880 break
3881 done
3882
3883 fi
3884 fi
3885 CTAGS=$ac_cv_prog_CTAGS
3886 if test -n "$CTAGS"; then
3887   echo "$as_me:3887: result: $CTAGS" >&5
3888 echo "${ECHO_T}$CTAGS" >&6
3889 else
3890   echo "$as_me:3890: result: no" >&5
3891 echo "${ECHO_T}no" >&6
3892 fi
3893
3894   test -n "$CTAGS" && break
3895 done
3896
3897 for ac_prog in exetags etags
3898 do
3899   # Extract the first word of "$ac_prog", so it can be a program name with args.
3900 set dummy $ac_prog; ac_word=$2
3901 echo "$as_me:3901: checking for $ac_word" >&5
3902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3903 if test "${ac_cv_prog_ETAGS+set}" = set; then
3904   echo $ECHO_N "(cached) $ECHO_C" >&6
3905 else
3906   if test -n "$ETAGS"; then
3907   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3908 else
3909   ac_save_IFS=$IFS; IFS=$ac_path_separator
3910 ac_dummy="$PATH"
3911 for ac_dir in $ac_dummy; do
3912   IFS=$ac_save_IFS
3913   test -z "$ac_dir" && ac_dir=.
3914   $as_executable_p "$ac_dir/$ac_word" || continue
3915 ac_cv_prog_ETAGS="$ac_prog"
3916 echo "$as_me:3916: found $ac_dir/$ac_word" >&5
3917 break
3918 done
3919
3920 fi
3921 fi
3922 ETAGS=$ac_cv_prog_ETAGS
3923 if test -n "$ETAGS"; then
3924   echo "$as_me:3924: result: $ETAGS" >&5
3925 echo "${ECHO_T}$ETAGS" >&6
3926 else
3927   echo "$as_me:3927: result: no" >&5
3928 echo "${ECHO_T}no" >&6
3929 fi
3930
3931   test -n "$ETAGS" && break
3932 done
3933
3934 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3935 set dummy ${CTAGS:-ctags}; ac_word=$2
3936 echo "$as_me:3936: checking for $ac_word" >&5
3937 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3938 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3939   echo $ECHO_N "(cached) $ECHO_C" >&6
3940 else
3941   if test -n "$MAKE_LOWER_TAGS"; then
3942   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3943 else
3944   ac_save_IFS=$IFS; IFS=$ac_path_separator
3945 ac_dummy="$PATH"
3946 for ac_dir in $ac_dummy; do
3947   IFS=$ac_save_IFS
3948   test -z "$ac_dir" && ac_dir=.
3949   $as_executable_p "$ac_dir/$ac_word" || continue
3950 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3951 echo "$as_me:3951: found $ac_dir/$ac_word" >&5
3952 break
3953 done
3954
3955   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3956 fi
3957 fi
3958 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3959 if test -n "$MAKE_LOWER_TAGS"; then
3960   echo "$as_me:3960: result: $MAKE_LOWER_TAGS" >&5
3961 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3962 else
3963   echo "$as_me:3963: result: no" >&5
3964 echo "${ECHO_T}no" >&6
3965 fi
3966
3967 if test "$cf_cv_mixedcase" = yes ; then
3968         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3969 set dummy ${ETAGS:-etags}; ac_word=$2
3970 echo "$as_me:3970: checking for $ac_word" >&5
3971 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3972 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3973   echo $ECHO_N "(cached) $ECHO_C" >&6
3974 else
3975   if test -n "$MAKE_UPPER_TAGS"; then
3976   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3977 else
3978   ac_save_IFS=$IFS; IFS=$ac_path_separator
3979 ac_dummy="$PATH"
3980 for ac_dir in $ac_dummy; do
3981   IFS=$ac_save_IFS
3982   test -z "$ac_dir" && ac_dir=.
3983   $as_executable_p "$ac_dir/$ac_word" || continue
3984 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3985 echo "$as_me:3985: found $ac_dir/$ac_word" >&5
3986 break
3987 done
3988
3989   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3990 fi
3991 fi
3992 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3993 if test -n "$MAKE_UPPER_TAGS"; then
3994   echo "$as_me:3994: result: $MAKE_UPPER_TAGS" >&5
3995 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3996 else
3997   echo "$as_me:3997: result: no" >&5
3998 echo "${ECHO_T}no" >&6
3999 fi
4000
4001 else
4002         MAKE_UPPER_TAGS=no
4003 fi
4004
4005 if test "$MAKE_UPPER_TAGS" = yes ; then
4006         MAKE_UPPER_TAGS=
4007 else
4008         MAKE_UPPER_TAGS="#"
4009 fi
4010
4011 if test "$MAKE_LOWER_TAGS" = yes ; then
4012         MAKE_LOWER_TAGS=
4013 else
4014         MAKE_LOWER_TAGS="#"
4015 fi
4016
4017 echo "$as_me:4017: checking for makeflags variable" >&5
4018 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4019 if test "${cf_cv_makeflags+set}" = set; then
4020   echo $ECHO_N "(cached) $ECHO_C" >&6
4021 else
4022
4023         cf_cv_makeflags=''
4024         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4025         do
4026                 cat >cf_makeflags.tmp <<CF_EOF
4027 SHELL = $SHELL
4028 all :
4029         @ echo '.$cf_option'
4030 CF_EOF
4031                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4032                 case "$cf_result" in
4033                 (.*k|.*kw)
4034                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4035                         case "$cf_result" in
4036                         (.*CC=*)        cf_cv_makeflags=
4037                                 ;;
4038                         (*)     cf_cv_makeflags=$cf_option
4039                                 ;;
4040                         esac
4041                         break
4042                         ;;
4043                 (.-)    ;;
4044                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4045                         ;;
4046                 esac
4047         done
4048         rm -f cf_makeflags.tmp
4049
4050 fi
4051 echo "$as_me:4051: result: $cf_cv_makeflags" >&5
4052 echo "${ECHO_T}$cf_cv_makeflags" >&6
4053
4054 if test -n "$ac_tool_prefix"; then
4055   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4056 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4057 echo "$as_me:4057: checking for $ac_word" >&5
4058 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4059 if test "${ac_cv_prog_RANLIB+set}" = set; then
4060   echo $ECHO_N "(cached) $ECHO_C" >&6
4061 else
4062   if test -n "$RANLIB"; then
4063   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4064 else
4065   ac_save_IFS=$IFS; IFS=$ac_path_separator
4066 ac_dummy="$PATH"
4067 for ac_dir in $ac_dummy; do
4068   IFS=$ac_save_IFS
4069   test -z "$ac_dir" && ac_dir=.
4070   $as_executable_p "$ac_dir/$ac_word" || continue
4071 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4072 echo "$as_me:4072: found $ac_dir/$ac_word" >&5
4073 break
4074 done
4075
4076 fi
4077 fi
4078 RANLIB=$ac_cv_prog_RANLIB
4079 if test -n "$RANLIB"; then
4080   echo "$as_me:4080: result: $RANLIB" >&5
4081 echo "${ECHO_T}$RANLIB" >&6
4082 else
4083   echo "$as_me:4083: result: no" >&5
4084 echo "${ECHO_T}no" >&6
4085 fi
4086
4087 fi
4088 if test -z "$ac_cv_prog_RANLIB"; then
4089   ac_ct_RANLIB=$RANLIB
4090   # Extract the first word of "ranlib", so it can be a program name with args.
4091 set dummy ranlib; ac_word=$2
4092 echo "$as_me:4092: checking for $ac_word" >&5
4093 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4094 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4095   echo $ECHO_N "(cached) $ECHO_C" >&6
4096 else
4097   if test -n "$ac_ct_RANLIB"; then
4098   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4099 else
4100   ac_save_IFS=$IFS; IFS=$ac_path_separator
4101 ac_dummy="$PATH"
4102 for ac_dir in $ac_dummy; do
4103   IFS=$ac_save_IFS
4104   test -z "$ac_dir" && ac_dir=.
4105   $as_executable_p "$ac_dir/$ac_word" || continue
4106 ac_cv_prog_ac_ct_RANLIB="ranlib"
4107 echo "$as_me:4107: found $ac_dir/$ac_word" >&5
4108 break
4109 done
4110
4111   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4112 fi
4113 fi
4114 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4115 if test -n "$ac_ct_RANLIB"; then
4116   echo "$as_me:4116: result: $ac_ct_RANLIB" >&5
4117 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4118 else
4119   echo "$as_me:4119: result: no" >&5
4120 echo "${ECHO_T}no" >&6
4121 fi
4122
4123   RANLIB=$ac_ct_RANLIB
4124 else
4125   RANLIB="$ac_cv_prog_RANLIB"
4126 fi
4127
4128 if test -n "$ac_tool_prefix"; then
4129   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4130 set dummy ${ac_tool_prefix}ld; ac_word=$2
4131 echo "$as_me:4131: checking for $ac_word" >&5
4132 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4133 if test "${ac_cv_prog_LD+set}" = set; then
4134   echo $ECHO_N "(cached) $ECHO_C" >&6
4135 else
4136   if test -n "$LD"; then
4137   ac_cv_prog_LD="$LD" # Let the user override the test.
4138 else
4139   ac_save_IFS=$IFS; IFS=$ac_path_separator
4140 ac_dummy="$PATH"
4141 for ac_dir in $ac_dummy; do
4142   IFS=$ac_save_IFS
4143   test -z "$ac_dir" && ac_dir=.
4144   $as_executable_p "$ac_dir/$ac_word" || continue
4145 ac_cv_prog_LD="${ac_tool_prefix}ld"
4146 echo "$as_me:4146: found $ac_dir/$ac_word" >&5
4147 break
4148 done
4149
4150 fi
4151 fi
4152 LD=$ac_cv_prog_LD
4153 if test -n "$LD"; then
4154   echo "$as_me:4154: result: $LD" >&5
4155 echo "${ECHO_T}$LD" >&6
4156 else
4157   echo "$as_me:4157: result: no" >&5
4158 echo "${ECHO_T}no" >&6
4159 fi
4160
4161 fi
4162 if test -z "$ac_cv_prog_LD"; then
4163   ac_ct_LD=$LD
4164   # Extract the first word of "ld", so it can be a program name with args.
4165 set dummy ld; ac_word=$2
4166 echo "$as_me:4166: checking for $ac_word" >&5
4167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4168 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4169   echo $ECHO_N "(cached) $ECHO_C" >&6
4170 else
4171   if test -n "$ac_ct_LD"; then
4172   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4173 else
4174   ac_save_IFS=$IFS; IFS=$ac_path_separator
4175 ac_dummy="$PATH"
4176 for ac_dir in $ac_dummy; do
4177   IFS=$ac_save_IFS
4178   test -z "$ac_dir" && ac_dir=.
4179   $as_executable_p "$ac_dir/$ac_word" || continue
4180 ac_cv_prog_ac_ct_LD="ld"
4181 echo "$as_me:4181: found $ac_dir/$ac_word" >&5
4182 break
4183 done
4184
4185   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4186 fi
4187 fi
4188 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4189 if test -n "$ac_ct_LD"; then
4190   echo "$as_me:4190: result: $ac_ct_LD" >&5
4191 echo "${ECHO_T}$ac_ct_LD" >&6
4192 else
4193   echo "$as_me:4193: result: no" >&5
4194 echo "${ECHO_T}no" >&6
4195 fi
4196
4197   LD=$ac_ct_LD
4198 else
4199   LD="$ac_cv_prog_LD"
4200 fi
4201
4202 if test -n "$ac_tool_prefix"; then
4203   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4204 set dummy ${ac_tool_prefix}ar; ac_word=$2
4205 echo "$as_me:4205: checking for $ac_word" >&5
4206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4207 if test "${ac_cv_prog_AR+set}" = set; then
4208   echo $ECHO_N "(cached) $ECHO_C" >&6
4209 else
4210   if test -n "$AR"; then
4211   ac_cv_prog_AR="$AR" # Let the user override the test.
4212 else
4213   ac_save_IFS=$IFS; IFS=$ac_path_separator
4214 ac_dummy="$PATH"
4215 for ac_dir in $ac_dummy; do
4216   IFS=$ac_save_IFS
4217   test -z "$ac_dir" && ac_dir=.
4218   $as_executable_p "$ac_dir/$ac_word" || continue
4219 ac_cv_prog_AR="${ac_tool_prefix}ar"
4220 echo "$as_me:4220: found $ac_dir/$ac_word" >&5
4221 break
4222 done
4223
4224 fi
4225 fi
4226 AR=$ac_cv_prog_AR
4227 if test -n "$AR"; then
4228   echo "$as_me:4228: result: $AR" >&5
4229 echo "${ECHO_T}$AR" >&6
4230 else
4231   echo "$as_me:4231: result: no" >&5
4232 echo "${ECHO_T}no" >&6
4233 fi
4234
4235 fi
4236 if test -z "$ac_cv_prog_AR"; then
4237   ac_ct_AR=$AR
4238   # Extract the first word of "ar", so it can be a program name with args.
4239 set dummy ar; ac_word=$2
4240 echo "$as_me:4240: checking for $ac_word" >&5
4241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4242 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4243   echo $ECHO_N "(cached) $ECHO_C" >&6
4244 else
4245   if test -n "$ac_ct_AR"; then
4246   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4247 else
4248   ac_save_IFS=$IFS; IFS=$ac_path_separator
4249 ac_dummy="$PATH"
4250 for ac_dir in $ac_dummy; do
4251   IFS=$ac_save_IFS
4252   test -z "$ac_dir" && ac_dir=.
4253   $as_executable_p "$ac_dir/$ac_word" || continue
4254 ac_cv_prog_ac_ct_AR="ar"
4255 echo "$as_me:4255: found $ac_dir/$ac_word" >&5
4256 break
4257 done
4258
4259   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4260 fi
4261 fi
4262 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4263 if test -n "$ac_ct_AR"; then
4264   echo "$as_me:4264: result: $ac_ct_AR" >&5
4265 echo "${ECHO_T}$ac_ct_AR" >&6
4266 else
4267   echo "$as_me:4267: result: no" >&5
4268 echo "${ECHO_T}no" >&6
4269 fi
4270
4271   AR=$ac_ct_AR
4272 else
4273   AR="$ac_cv_prog_AR"
4274 fi
4275
4276 if test -n "$ac_tool_prefix"; then
4277   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4278 set dummy ${ac_tool_prefix}nm; ac_word=$2
4279 echo "$as_me:4279: checking for $ac_word" >&5
4280 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4281 if test "${ac_cv_prog_NM+set}" = set; then
4282   echo $ECHO_N "(cached) $ECHO_C" >&6
4283 else
4284   if test -n "$NM"; then
4285   ac_cv_prog_NM="$NM" # Let the user override the test.
4286 else
4287   ac_save_IFS=$IFS; IFS=$ac_path_separator
4288 ac_dummy="$PATH"
4289 for ac_dir in $ac_dummy; do
4290   IFS=$ac_save_IFS
4291   test -z "$ac_dir" && ac_dir=.
4292   $as_executable_p "$ac_dir/$ac_word" || continue
4293 ac_cv_prog_NM="${ac_tool_prefix}nm"
4294 echo "$as_me:4294: found $ac_dir/$ac_word" >&5
4295 break
4296 done
4297
4298 fi
4299 fi
4300 NM=$ac_cv_prog_NM
4301 if test -n "$NM"; then
4302   echo "$as_me:4302: result: $NM" >&5
4303 echo "${ECHO_T}$NM" >&6
4304 else
4305   echo "$as_me:4305: result: no" >&5
4306 echo "${ECHO_T}no" >&6
4307 fi
4308
4309 fi
4310 if test -z "$ac_cv_prog_NM"; then
4311   ac_ct_NM=$NM
4312   # Extract the first word of "nm", so it can be a program name with args.
4313 set dummy nm; ac_word=$2
4314 echo "$as_me:4314: checking for $ac_word" >&5
4315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4316 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4317   echo $ECHO_N "(cached) $ECHO_C" >&6
4318 else
4319   if test -n "$ac_ct_NM"; then
4320   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4321 else
4322   ac_save_IFS=$IFS; IFS=$ac_path_separator
4323 ac_dummy="$PATH"
4324 for ac_dir in $ac_dummy; do
4325   IFS=$ac_save_IFS
4326   test -z "$ac_dir" && ac_dir=.
4327   $as_executable_p "$ac_dir/$ac_word" || continue
4328 ac_cv_prog_ac_ct_NM="nm"
4329 echo "$as_me:4329: found $ac_dir/$ac_word" >&5
4330 break
4331 done
4332
4333   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4334 fi
4335 fi
4336 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4337 if test -n "$ac_ct_NM"; then
4338   echo "$as_me:4338: result: $ac_ct_NM" >&5
4339 echo "${ECHO_T}$ac_ct_NM" >&6
4340 else
4341   echo "$as_me:4341: result: no" >&5
4342 echo "${ECHO_T}no" >&6
4343 fi
4344
4345   NM=$ac_ct_NM
4346 else
4347   NM="$ac_cv_prog_NM"
4348 fi
4349
4350 if test -n "$ac_tool_prefix"; then
4351   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4352 set dummy ${ac_tool_prefix}ar; ac_word=$2
4353 echo "$as_me:4353: checking for $ac_word" >&5
4354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4355 if test "${ac_cv_prog_AR+set}" = set; then
4356   echo $ECHO_N "(cached) $ECHO_C" >&6
4357 else
4358   if test -n "$AR"; then
4359   ac_cv_prog_AR="$AR" # Let the user override the test.
4360 else
4361   ac_save_IFS=$IFS; IFS=$ac_path_separator
4362 ac_dummy="$PATH"
4363 for ac_dir in $ac_dummy; do
4364   IFS=$ac_save_IFS
4365   test -z "$ac_dir" && ac_dir=.
4366   $as_executable_p "$ac_dir/$ac_word" || continue
4367 ac_cv_prog_AR="${ac_tool_prefix}ar"
4368 echo "$as_me:4368: found $ac_dir/$ac_word" >&5
4369 break
4370 done
4371
4372 fi
4373 fi
4374 AR=$ac_cv_prog_AR
4375 if test -n "$AR"; then
4376   echo "$as_me:4376: result: $AR" >&5
4377 echo "${ECHO_T}$AR" >&6
4378 else
4379   echo "$as_me:4379: result: no" >&5
4380 echo "${ECHO_T}no" >&6
4381 fi
4382
4383 fi
4384 if test -z "$ac_cv_prog_AR"; then
4385   ac_ct_AR=$AR
4386   # Extract the first word of "ar", so it can be a program name with args.
4387 set dummy ar; ac_word=$2
4388 echo "$as_me:4388: checking for $ac_word" >&5
4389 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4390 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4391   echo $ECHO_N "(cached) $ECHO_C" >&6
4392 else
4393   if test -n "$ac_ct_AR"; then
4394   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4395 else
4396   ac_save_IFS=$IFS; IFS=$ac_path_separator
4397 ac_dummy="$PATH"
4398 for ac_dir in $ac_dummy; do
4399   IFS=$ac_save_IFS
4400   test -z "$ac_dir" && ac_dir=.
4401   $as_executable_p "$ac_dir/$ac_word" || continue
4402 ac_cv_prog_ac_ct_AR="ar"
4403 echo "$as_me:4403: found $ac_dir/$ac_word" >&5
4404 break
4405 done
4406
4407   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4408 fi
4409 fi
4410 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4411 if test -n "$ac_ct_AR"; then
4412   echo "$as_me:4412: result: $ac_ct_AR" >&5
4413 echo "${ECHO_T}$ac_ct_AR" >&6
4414 else
4415   echo "$as_me:4415: result: no" >&5
4416 echo "${ECHO_T}no" >&6
4417 fi
4418
4419   AR=$ac_ct_AR
4420 else
4421   AR="$ac_cv_prog_AR"
4422 fi
4423
4424 echo "$as_me:4424: checking for options to update archives" >&5
4425 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4426 if test "${cf_cv_ar_flags+set}" = set; then
4427   echo $ECHO_N "(cached) $ECHO_C" >&6
4428 else
4429
4430         cf_cv_ar_flags=unknown
4431         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4432         do
4433
4434                 # check if $ARFLAGS already contains this choice
4435                 if test "x$ARFLAGS" != "x" ; then
4436                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4437                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4438                                 cf_cv_ar_flags=
4439                                 break
4440                         fi
4441                 fi
4442
4443                 rm -f conftest.$ac_cv_objext
4444                 rm -f conftest.a
4445
4446                 cat >conftest.$ac_ext <<EOF
4447 #line 4447 "configure"
4448 int     testdata[3] = { 123, 456, 789 };
4449 EOF
4450                 if { (eval echo "$as_me:4450: \"$ac_compile\"") >&5
4451   (eval $ac_compile) 2>&5
4452   ac_status=$?
4453   echo "$as_me:4453: \$? = $ac_status" >&5
4454   (exit $ac_status); } ; then
4455                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4456                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4457                         if test -f conftest.a ; then
4458                                 cf_cv_ar_flags=$cf_ar_flags
4459                                 break
4460                         fi
4461                 else
4462                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4463
4464 echo "${as_me:-configure}:4464: testing cannot compile test-program ..." 1>&5
4465
4466                         break
4467                 fi
4468         done
4469         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4470
4471 fi
4472 echo "$as_me:4472: result: $cf_cv_ar_flags" >&5
4473 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4474
4475 if test -n "$ARFLAGS" ; then
4476         if test -n "$cf_cv_ar_flags" ; then
4477                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4478         fi
4479 else
4480         ARFLAGS=$cf_cv_ar_flags
4481 fi
4482
4483 echo "$as_me:4483: checking if you have specified an install-prefix" >&5
4484 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4485
4486 # Check whether --with-install-prefix or --without-install-prefix was given.
4487 if test "${with_install_prefix+set}" = set; then
4488   withval="$with_install_prefix"
4489   case "x$withval" in
4490         (xyes|xno)
4491                 ;;
4492         (*)     DESTDIR="$withval"
4493                 ;;
4494         esac
4495 fi;
4496 echo "$as_me:4496: result: $DESTDIR" >&5
4497 echo "${ECHO_T}$DESTDIR" >&6
4498
4499 ###############################################################################
4500
4501 # If we're cross-compiling, allow the user to override the tools and their
4502 # options.  The configure script is oriented toward identifying the host
4503 # compiler, etc., but we need a build compiler to generate parts of the source.
4504
4505 if test "$cross_compiling" = yes ; then
4506
4507         # defaults that we might want to override
4508         : ${BUILD_CFLAGS:=''}
4509         : ${BUILD_CPPFLAGS:=''}
4510         : ${BUILD_LDFLAGS:=''}
4511         : ${BUILD_LIBS:=''}
4512         : ${BUILD_EXEEXT:='$x'}
4513         : ${BUILD_OBJEXT:='o'}
4514
4515 # Check whether --with-build-cc or --without-build-cc was given.
4516 if test "${with_build_cc+set}" = set; then
4517   withval="$with_build_cc"
4518   BUILD_CC="$withval"
4519 else
4520   for ac_prog in gcc cc cl
4521 do
4522   # Extract the first word of "$ac_prog", so it can be a program name with args.
4523 set dummy $ac_prog; ac_word=$2
4524 echo "$as_me:4524: checking for $ac_word" >&5
4525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4526 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4527   echo $ECHO_N "(cached) $ECHO_C" >&6
4528 else
4529   if test -n "$BUILD_CC"; then
4530   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4531 else
4532   ac_save_IFS=$IFS; IFS=$ac_path_separator
4533 ac_dummy="$PATH"
4534 for ac_dir in $ac_dummy; do
4535   IFS=$ac_save_IFS
4536   test -z "$ac_dir" && ac_dir=.
4537   $as_executable_p "$ac_dir/$ac_word" || continue
4538 ac_cv_prog_BUILD_CC="$ac_prog"
4539 echo "$as_me:4539: found $ac_dir/$ac_word" >&5
4540 break
4541 done
4542
4543 fi
4544 fi
4545 BUILD_CC=$ac_cv_prog_BUILD_CC
4546 if test -n "$BUILD_CC"; then
4547   echo "$as_me:4547: result: $BUILD_CC" >&5
4548 echo "${ECHO_T}$BUILD_CC" >&6
4549 else
4550   echo "$as_me:4550: result: no" >&5
4551 echo "${ECHO_T}no" >&6
4552 fi
4553
4554   test -n "$BUILD_CC" && break
4555 done
4556
4557 fi;
4558         echo "$as_me:4558: checking for native build C compiler" >&5
4559 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4560         echo "$as_me:4560: result: $BUILD_CC" >&5
4561 echo "${ECHO_T}$BUILD_CC" >&6
4562
4563         echo "$as_me:4563: checking for native build C preprocessor" >&5
4564 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4565
4566 # Check whether --with-build-cpp or --without-build-cpp was given.
4567 if test "${with_build_cpp+set}" = set; then
4568   withval="$with_build_cpp"
4569   BUILD_CPP="$withval"
4570 else
4571   BUILD_CPP='${BUILD_CC} -E'
4572 fi;
4573         echo "$as_me:4573: result: $BUILD_CPP" >&5
4574 echo "${ECHO_T}$BUILD_CPP" >&6
4575
4576         echo "$as_me:4576: checking for native build C flags" >&5
4577 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4578
4579 # Check whether --with-build-cflags or --without-build-cflags was given.
4580 if test "${with_build_cflags+set}" = set; then
4581   withval="$with_build_cflags"
4582   BUILD_CFLAGS="$withval"
4583 fi;
4584         echo "$as_me:4584: result: $BUILD_CFLAGS" >&5
4585 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4586
4587         echo "$as_me:4587: checking for native build C preprocessor-flags" >&5
4588 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4589
4590 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4591 if test "${with_build_cppflags+set}" = set; then
4592   withval="$with_build_cppflags"
4593   BUILD_CPPFLAGS="$withval"
4594 fi;
4595         echo "$as_me:4595: result: $BUILD_CPPFLAGS" >&5
4596 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4597
4598         echo "$as_me:4598: checking for native build linker-flags" >&5
4599 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4600
4601 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4602 if test "${with_build_ldflags+set}" = set; then
4603   withval="$with_build_ldflags"
4604   BUILD_LDFLAGS="$withval"
4605 fi;
4606         echo "$as_me:4606: result: $BUILD_LDFLAGS" >&5
4607 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4608
4609         echo "$as_me:4609: checking for native build linker-libraries" >&5
4610 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4611
4612 # Check whether --with-build-libs or --without-build-libs was given.
4613 if test "${with_build_libs+set}" = set; then
4614   withval="$with_build_libs"
4615   BUILD_LIBS="$withval"
4616 fi;
4617         echo "$as_me:4617: result: $BUILD_LIBS" >&5
4618 echo "${ECHO_T}$BUILD_LIBS" >&6
4619
4620         # this assumes we're on Unix.
4621         BUILD_EXEEXT=
4622         BUILD_OBJEXT=o
4623
4624         : ${BUILD_CC:='${CC}'}
4625
4626         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4627                 { { echo "$as_me:4627: error: Cross-build requires two compilers.
4628 Use --with-build-cc to specify the native compiler." >&5
4629 echo "$as_me: error: Cross-build requires two compilers.
4630 Use --with-build-cc to specify the native compiler." >&2;}
4631    { (exit 1); exit 1; }; }
4632         fi
4633
4634 else
4635         : ${BUILD_CC:='${CC}'}
4636         : ${BUILD_CPP:='${CPP}'}
4637         : ${BUILD_CFLAGS:='${CFLAGS}'}
4638         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4639         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4640         : ${BUILD_LIBS:='${LIBS}'}
4641         : ${BUILD_EXEEXT:='$x'}
4642         : ${BUILD_OBJEXT:='o'}
4643 fi
4644
4645 ###############################################################################
4646
4647 ### Options to allow the user to specify the set of libraries which are used.
4648 ### Use "--without-normal --with-shared" to allow the default model to be
4649 ### shared, for example.
4650 cf_list_models=""
4651
4652 echo "$as_me:4652: checking if libtool -version-number should be used" >&5
4653 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4654
4655 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4656 if test "${enable_libtool_version+set}" = set; then
4657   enableval="$enable_libtool_version"
4658   test "$enableval" != no && enableval=yes
4659         if test "$enableval" != "yes" ; then
4660     cf_libtool_version=no
4661         else
4662                 cf_libtool_version=yes
4663         fi
4664 else
4665   enableval=yes
4666         cf_libtool_version=yes
4667
4668 fi;
4669 echo "$as_me:4669: result: $cf_libtool_version" >&5
4670 echo "${ECHO_T}$cf_libtool_version" >&6
4671
4672 if test "$cf_libtool_version" = yes ; then
4673         LIBTOOL_VERSION="-version-number"
4674 else
4675         LIBTOOL_VERSION="-version-info"
4676         case "x$VERSION" in
4677         (x)
4678                 { echo "$as_me:4678: WARNING: VERSION was not set" >&5
4679 echo "$as_me: WARNING: VERSION was not set" >&2;}
4680                 ;;
4681         (x*.*.*)
4682                 ABI_VERSION="$VERSION"
4683                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4684
4685 echo "${as_me:-configure}:4685: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4686
4687                 ;;
4688         (x*:*:*)
4689                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4690                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4691
4692 echo "${as_me:-configure}:4692: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4693
4694                 ;;
4695         (*)
4696                 { echo "$as_me:4696: WARNING: unexpected VERSION value: $VERSION" >&5
4697 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4698                 ;;
4699         esac
4700 fi
4701
4702 LIBTOOL=
4703
4704 # common library maintenance symbols that are convenient for libtool scripts:
4705 LIB_CREATE='${AR} -cr'
4706 LIB_OBJECT='${OBJECTS}'
4707 LIB_SUFFIX=.a
4708 LIB_PREP="$RANLIB"
4709
4710 # symbols used to prop libtool up to enable it to determine what it should be
4711 # doing:
4712 LIB_CLEAN=
4713 LIB_COMPILE=
4714 LIB_LINK='${CC}'
4715 LIB_INSTALL=
4716 LIB_UNINSTALL=
4717
4718 echo "$as_me:4718: checking if you want to build libraries with libtool" >&5
4719 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4720
4721 # Check whether --with-libtool or --without-libtool was given.
4722 if test "${with_libtool+set}" = set; then
4723   withval="$with_libtool"
4724   with_libtool=$withval
4725 else
4726   with_libtool=no
4727 fi;
4728 echo "$as_me:4728: result: $with_libtool" >&5
4729 echo "${ECHO_T}$with_libtool" >&6
4730 if test "$with_libtool" != "no"; then
4731
4732         if test "$with_libtool" != "yes" ; then
4733
4734 if test "x$prefix" != xNONE; then
4735         cf_path_syntax="$prefix"
4736 else
4737         cf_path_syntax="$ac_default_prefix"
4738 fi
4739
4740 case ".$with_libtool" in
4741 (.\$\(*\)*|.\'*\'*)
4742         ;;
4743 (..|./*|.\\*)
4744         ;;
4745 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4746         ;;
4747 (.\${*prefix}*|.\${*dir}*)
4748         eval with_libtool="$with_libtool"
4749         case ".$with_libtool" in
4750         (.NONE/*)
4751                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4752                 ;;
4753         esac
4754         ;;
4755 (.no|.NONE/*)
4756         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4757         ;;
4758 (*)
4759         { { echo "$as_me:4759: error: expected a pathname, not \"$with_libtool\"" >&5
4760 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4761    { (exit 1); exit 1; }; }
4762         ;;
4763 esac
4764
4765                 LIBTOOL=$with_libtool
4766         else
4767                 if test -n "$ac_tool_prefix"; then
4768   for ac_prog in libtool glibtool
4769   do
4770     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4771 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4772 echo "$as_me:4772: checking for $ac_word" >&5
4773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4774 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4775   echo $ECHO_N "(cached) $ECHO_C" >&6
4776 else
4777   if test -n "$LIBTOOL"; then
4778   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4779 else
4780   ac_save_IFS=$IFS; IFS=$ac_path_separator
4781 ac_dummy="$PATH"
4782 for ac_dir in $ac_dummy; do
4783   IFS=$ac_save_IFS
4784   test -z "$ac_dir" && ac_dir=.
4785   $as_executable_p "$ac_dir/$ac_word" || continue
4786 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4787 echo "$as_me:4787: found $ac_dir/$ac_word" >&5
4788 break
4789 done
4790
4791 fi
4792 fi
4793 LIBTOOL=$ac_cv_prog_LIBTOOL
4794 if test -n "$LIBTOOL"; then
4795   echo "$as_me:4795: result: $LIBTOOL" >&5
4796 echo "${ECHO_T}$LIBTOOL" >&6
4797 else
4798   echo "$as_me:4798: result: no" >&5
4799 echo "${ECHO_T}no" >&6
4800 fi
4801
4802     test -n "$LIBTOOL" && break
4803   done
4804 fi
4805 if test -z "$LIBTOOL"; then
4806   ac_ct_LIBTOOL=$LIBTOOL
4807   for ac_prog in libtool glibtool
4808 do
4809   # Extract the first word of "$ac_prog", so it can be a program name with args.
4810 set dummy $ac_prog; ac_word=$2
4811 echo "$as_me:4811: checking for $ac_word" >&5
4812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4813 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4814   echo $ECHO_N "(cached) $ECHO_C" >&6
4815 else
4816   if test -n "$ac_ct_LIBTOOL"; then
4817   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4818 else
4819   ac_save_IFS=$IFS; IFS=$ac_path_separator
4820 ac_dummy="$PATH"
4821 for ac_dir in $ac_dummy; do
4822   IFS=$ac_save_IFS
4823   test -z "$ac_dir" && ac_dir=.
4824   $as_executable_p "$ac_dir/$ac_word" || continue
4825 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4826 echo "$as_me:4826: found $ac_dir/$ac_word" >&5
4827 break
4828 done
4829
4830 fi
4831 fi
4832 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4833 if test -n "$ac_ct_LIBTOOL"; then
4834   echo "$as_me:4834: result: $ac_ct_LIBTOOL" >&5
4835 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4836 else
4837   echo "$as_me:4837: result: no" >&5
4838 echo "${ECHO_T}no" >&6
4839 fi
4840
4841   test -n "$ac_ct_LIBTOOL" && break
4842 done
4843 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4844
4845   LIBTOOL=$ac_ct_LIBTOOL
4846 fi
4847
4848 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4849 then
4850         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.].*//'`
4851 else
4852         cf_cv_libtool_version=
4853 fi
4854 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4855
4856                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4857                 then
4858
4859 unset ac_cv_prog_ac_ct_LIBTOOL
4860 unset ac_ct_LIBTOOL
4861 unset LIBTOOL
4862
4863                         if test -n "$ac_tool_prefix"; then
4864   for ac_prog in glibtool
4865   do
4866     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4867 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4868 echo "$as_me:4868: checking for $ac_word" >&5
4869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4870 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4871   echo $ECHO_N "(cached) $ECHO_C" >&6
4872 else
4873   if test -n "$LIBTOOL"; then
4874   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4875 else
4876   ac_save_IFS=$IFS; IFS=$ac_path_separator
4877 ac_dummy="$PATH"
4878 for ac_dir in $ac_dummy; do
4879   IFS=$ac_save_IFS
4880   test -z "$ac_dir" && ac_dir=.
4881   $as_executable_p "$ac_dir/$ac_word" || continue
4882 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4883 echo "$as_me:4883: found $ac_dir/$ac_word" >&5
4884 break
4885 done
4886
4887 fi
4888 fi
4889 LIBTOOL=$ac_cv_prog_LIBTOOL
4890 if test -n "$LIBTOOL"; then
4891   echo "$as_me:4891: result: $LIBTOOL" >&5
4892 echo "${ECHO_T}$LIBTOOL" >&6
4893 else
4894   echo "$as_me:4894: result: no" >&5
4895 echo "${ECHO_T}no" >&6
4896 fi
4897
4898     test -n "$LIBTOOL" && break
4899   done
4900 fi
4901 if test -z "$LIBTOOL"; then
4902   ac_ct_LIBTOOL=$LIBTOOL
4903   for ac_prog in glibtool
4904 do
4905   # Extract the first word of "$ac_prog", so it can be a program name with args.
4906 set dummy $ac_prog; ac_word=$2
4907 echo "$as_me:4907: checking for $ac_word" >&5
4908 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4909 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4910   echo $ECHO_N "(cached) $ECHO_C" >&6
4911 else
4912   if test -n "$ac_ct_LIBTOOL"; then
4913   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4914 else
4915   ac_save_IFS=$IFS; IFS=$ac_path_separator
4916 ac_dummy="$PATH"
4917 for ac_dir in $ac_dummy; do
4918   IFS=$ac_save_IFS
4919   test -z "$ac_dir" && ac_dir=.
4920   $as_executable_p "$ac_dir/$ac_word" || continue
4921 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4922 echo "$as_me:4922: found $ac_dir/$ac_word" >&5
4923 break
4924 done
4925
4926 fi
4927 fi
4928 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4929 if test -n "$ac_ct_LIBTOOL"; then
4930   echo "$as_me:4930: result: $ac_ct_LIBTOOL" >&5
4931 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4932 else
4933   echo "$as_me:4933: result: no" >&5
4934 echo "${ECHO_T}no" >&6
4935 fi
4936
4937   test -n "$ac_ct_LIBTOOL" && break
4938 done
4939 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4940
4941   LIBTOOL=$ac_ct_LIBTOOL
4942 fi
4943
4944 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4945 then
4946         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.].*//'`
4947 else
4948         cf_cv_libtool_version=
4949 fi
4950 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4951
4952                 fi
4953         fi
4954         if test -z "$LIBTOOL" ; then
4955                 { { echo "$as_me:4955: error: Cannot find libtool" >&5
4956 echo "$as_me: error: Cannot find libtool" >&2;}
4957    { (exit 1); exit 1; }; }
4958         fi
4959         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4960         LIB_OBJECT='${OBJECTS:.o=.lo}'
4961         LIB_SUFFIX=.la
4962         LIB_CLEAN='${LIBTOOL} --mode=clean'
4963         LIB_COMPILE='${LIBTOOL} --mode=compile'
4964         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4965         LIB_INSTALL='${LIBTOOL} --mode=install'
4966         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4967         LIB_PREP=:
4968
4969 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4970 then
4971         echo "$as_me:4971: checking version of $LIBTOOL" >&5
4972 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
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         echo "$as_me:4982: result: $cf_cv_libtool_version" >&5
4983 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4984         if test -z "$cf_cv_libtool_version" ; then
4985                 { { echo "$as_me:4985: error: This is not GNU libtool" >&5
4986 echo "$as_me: error: This is not GNU libtool" >&2;}
4987    { (exit 1); exit 1; }; }
4988         fi
4989 else
4990         { { echo "$as_me:4990: error: GNU libtool has not been found" >&5
4991 echo "$as_me: error: GNU libtool has not been found" >&2;}
4992    { (exit 1); exit 1; }; }
4993 fi
4994
4995         # special hack to add -no-undefined (which libtool should do for itself)
4996         LT_UNDEF=
4997         case "$cf_cv_system_name" in
4998         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
4999                 LT_UNDEF=-no-undefined
5000                 ;;
5001         esac
5002
5003         # special hack to add --tag option for C++ compiler
5004         case $cf_cv_libtool_version in
5005         (1.[5-9]*|[2-9].[0-9.a-z]*)
5006                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5007                 LIBTOOL="$LIBTOOL --tag=CC"
5008                 ;;
5009         (*)
5010                 LIBTOOL_CXX="$LIBTOOL"
5011                 ;;
5012         esac
5013 else
5014         LIBTOOL=""
5015         LIBTOOL_CXX=""
5016 fi
5017
5018 test -z "$LIBTOOL" && ECHO_LT=
5019
5020 if test "$with_libtool" != "no" ; then
5021
5022 cf_list_models="$cf_list_models libtool"
5023
5024 else
5025
5026 echo "$as_me:5026: checking if you want to build shared libraries" >&5
5027 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5028
5029 # Check whether --with-shared or --without-shared was given.
5030 if test "${with_shared+set}" = set; then
5031   withval="$with_shared"
5032   with_shared=$withval
5033 else
5034   with_shared=no
5035 fi;
5036 echo "$as_me:5036: result: $with_shared" >&5
5037 echo "${ECHO_T}$with_shared" >&6
5038 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5039
5040 echo "$as_me:5040: checking if you want to build static libraries" >&5
5041 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5042
5043 # Check whether --with-normal or --without-normal was given.
5044 if test "${with_normal+set}" = set; then
5045   withval="$with_normal"
5046   with_normal=$withval
5047 else
5048   with_normal=yes
5049 fi;
5050 echo "$as_me:5050: result: $with_normal" >&5
5051 echo "${ECHO_T}$with_normal" >&6
5052 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5053
5054 echo "$as_me:5054: checking if you want to build debug libraries" >&5
5055 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5056
5057 # Check whether --with-debug or --without-debug was given.
5058 if test "${with_debug+set}" = set; then
5059   withval="$with_debug"
5060   with_debug=$withval
5061 else
5062   with_debug=yes
5063 fi;
5064 echo "$as_me:5064: result: $with_debug" >&5
5065 echo "${ECHO_T}$with_debug" >&6
5066 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5067
5068 echo "$as_me:5068: checking if you want to build profiling libraries" >&5
5069 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5070
5071 # Check whether --with-profile or --without-profile was given.
5072 if test "${with_profile+set}" = set; then
5073   withval="$with_profile"
5074   with_profile=$withval
5075 else
5076   with_profile=no
5077 fi;
5078 echo "$as_me:5078: result: $with_profile" >&5
5079 echo "${ECHO_T}$with_profile" >&6
5080 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5081
5082 fi
5083
5084 if test "X$cf_with_cxx_binding" != Xno; then
5085 if test "x$with_shared" = "xyes"; then
5086 echo "$as_me:5086: checking if you want to build C++ shared libraries" >&5
5087 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5088
5089 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5090 if test "${with_cxx_shared+set}" = set; then
5091   withval="$with_cxx_shared"
5092   with_shared_cxx=$withval
5093 else
5094   with_shared_cxx=no
5095 fi;
5096 echo "$as_me:5096: result: $with_shared_cxx" >&5
5097 echo "${ECHO_T}$with_shared_cxx" >&6
5098 fi
5099 fi
5100
5101 ###############################################################################
5102
5103 echo "$as_me:5103: checking for specified models" >&5
5104 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5105 test -z "$cf_list_models" && cf_list_models=normal
5106 test "$with_libtool" != "no" && cf_list_models=libtool
5107 echo "$as_me:5107: result: $cf_list_models" >&5
5108 echo "${ECHO_T}$cf_list_models" >&6
5109
5110 ### Use the first model as the default, and save its suffix for use in building
5111 ### up test-applications.
5112 echo "$as_me:5112: checking for default model" >&5
5113 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5114 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5115 echo "$as_me:5115: result: $DFT_LWR_MODEL" >&5
5116 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5117
5118 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5119
5120 TICS_NAME=tic
5121
5122 TINFO_NAME=tinfo
5123
5124 LIB_NAME=ncurses
5125
5126 LIB_DIR=../lib
5127 LIB_2ND=../../lib
5128
5129 echo "$as_me:5129: checking if you want to have a library-prefix" >&5
5130 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5131
5132 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5133 if test "${with_lib_prefix+set}" = set; then
5134   withval="$with_lib_prefix"
5135   with_lib_prefix=$withval
5136 else
5137   with_lib_prefix=auto
5138 fi;
5139 echo "$as_me:5139: result: $with_lib_prefix" >&5
5140 echo "${ECHO_T}$with_lib_prefix" >&6
5141
5142 if test $with_lib_prefix = auto
5143 then
5144
5145         case $cf_cv_system_name in
5146         (OS/2*|os2*)
5147                 if test "$DFT_LWR_MODEL" = libtool; then
5148                         LIB_PREFIX='lib'
5149                 else
5150                         LIB_PREFIX=''
5151                 fi
5152                 ;;
5153         (*)     LIB_PREFIX='lib'
5154                 ;;
5155         esac
5156 cf_prefix=$LIB_PREFIX
5157
5158 elif test $with_lib_prefix = no
5159 then
5160         LIB_PREFIX=
5161 else
5162         LIB_PREFIX=$with_lib_prefix
5163 fi
5164
5165 LIB_SUFFIX=
5166
5167         echo "$as_me:5167: checking for PATH separator" >&5
5168 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5169         case $cf_cv_system_name in
5170         (os2*)  PATH_SEPARATOR=';'  ;;
5171         (*)     ${PATH_SEPARATOR:=':'}  ;;
5172         esac
5173
5174         echo "$as_me:5174: result: $PATH_SEPARATOR" >&5
5175 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5176
5177 ###############################################################################
5178
5179 echo "$as_me:5179: checking if you want to build a separate terminfo library" >&5
5180 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5181
5182 # Check whether --with-termlib or --without-termlib was given.
5183 if test "${with_termlib+set}" = set; then
5184   withval="$with_termlib"
5185   with_termlib=$withval
5186 else
5187   with_termlib=no
5188 fi;
5189 echo "$as_me:5189: result: $with_termlib" >&5
5190 echo "${ECHO_T}$with_termlib" >&6
5191
5192 echo "$as_me:5192: checking if you want to build a separate tic library" >&5
5193 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5194
5195 # Check whether --with-ticlib or --without-ticlib was given.
5196 if test "${with_ticlib+set}" = set; then
5197   withval="$with_ticlib"
5198   with_ticlib=$withval
5199 else
5200   with_ticlib=no
5201 fi;
5202 echo "$as_me:5202: result: $with_ticlib" >&5
5203 echo "${ECHO_T}$with_ticlib" >&6
5204
5205 ### Checks for special libraries, must be done up-front.
5206 SHLIB_LIST=""
5207
5208 echo "$as_me:5208: checking if you want to link with the GPM mouse library" >&5
5209 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5210
5211 # Check whether --with-gpm or --without-gpm was given.
5212 if test "${with_gpm+set}" = set; then
5213   withval="$with_gpm"
5214   with_gpm=$withval
5215 else
5216   with_gpm=maybe
5217 fi;
5218 echo "$as_me:5218: result: $with_gpm" >&5
5219 echo "${ECHO_T}$with_gpm" >&6
5220
5221 if test "$with_gpm" != no ; then
5222         echo "$as_me:5222: checking for gpm.h" >&5
5223 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5224 if test "${ac_cv_header_gpm_h+set}" = set; then
5225   echo $ECHO_N "(cached) $ECHO_C" >&6
5226 else
5227   cat >conftest.$ac_ext <<_ACEOF
5228 #line 5228 "configure"
5229 #include "confdefs.h"
5230 #include <gpm.h>
5231 _ACEOF
5232 if { (eval echo "$as_me:5232: \"$ac_cpp conftest.$ac_ext\"") >&5
5233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5234   ac_status=$?
5235   egrep -v '^ *\+' conftest.er1 >conftest.err
5236   rm -f conftest.er1
5237   cat conftest.err >&5
5238   echo "$as_me:5238: \$? = $ac_status" >&5
5239   (exit $ac_status); } >/dev/null; then
5240   if test -s conftest.err; then
5241     ac_cpp_err=$ac_c_preproc_warn_flag
5242   else
5243     ac_cpp_err=
5244   fi
5245 else
5246   ac_cpp_err=yes
5247 fi
5248 if test -z "$ac_cpp_err"; then
5249   ac_cv_header_gpm_h=yes
5250 else
5251   echo "$as_me: failed program was:" >&5
5252   cat conftest.$ac_ext >&5
5253   ac_cv_header_gpm_h=no
5254 fi
5255 rm -f conftest.err conftest.$ac_ext
5256 fi
5257 echo "$as_me:5257: result: $ac_cv_header_gpm_h" >&5
5258 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5259 if test $ac_cv_header_gpm_h = yes; then
5260
5261 cat >>confdefs.h <<\EOF
5262 #define HAVE_GPM_H 1
5263 EOF
5264
5265                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5266                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5267
5268 echo "${as_me:-configure}:5268: testing assuming we really have GPM library ..." 1>&5
5269
5270 cat >>confdefs.h <<\EOF
5271 #define HAVE_LIBGPM 1
5272 EOF
5273
5274                         with_gpm=yes
5275                 else
5276                         echo "$as_me:5276: checking for Gpm_Open in -lgpm" >&5
5277 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5278 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5279   echo $ECHO_N "(cached) $ECHO_C" >&6
5280 else
5281   ac_check_lib_save_LIBS=$LIBS
5282 LIBS="-lgpm  $LIBS"
5283 cat >conftest.$ac_ext <<_ACEOF
5284 #line 5284 "configure"
5285 #include "confdefs.h"
5286
5287 /* Override any gcc2 internal prototype to avoid an error.  */
5288 #ifdef __cplusplus
5289 extern "C"
5290 #endif
5291 /* We use char because int might match the return type of a gcc2
5292    builtin and then its argument prototype would still apply.  */
5293 char Gpm_Open ();
5294 int
5295 main ()
5296 {
5297 Gpm_Open ();
5298   ;
5299   return 0;
5300 }
5301 _ACEOF
5302 rm -f conftest.$ac_objext conftest$ac_exeext
5303 if { (eval echo "$as_me:5303: \"$ac_link\"") >&5
5304   (eval $ac_link) 2>&5
5305   ac_status=$?
5306   echo "$as_me:5306: \$? = $ac_status" >&5
5307   (exit $ac_status); } &&
5308          { ac_try='test -s conftest$ac_exeext'
5309   { (eval echo "$as_me:5309: \"$ac_try\"") >&5
5310   (eval $ac_try) 2>&5
5311   ac_status=$?
5312   echo "$as_me:5312: \$? = $ac_status" >&5
5313   (exit $ac_status); }; }; then
5314   ac_cv_lib_gpm_Gpm_Open=yes
5315 else
5316   echo "$as_me: failed program was:" >&5
5317 cat conftest.$ac_ext >&5
5318 ac_cv_lib_gpm_Gpm_Open=no
5319 fi
5320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5321 LIBS=$ac_check_lib_save_LIBS
5322 fi
5323 echo "$as_me:5323: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5324 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5325 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5326   :
5327 else
5328
5329                                 if test "$with_gpm" = maybe; then
5330                                         { echo "$as_me:5330: WARNING: Cannot link with GPM library" >&5
5331 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5332                                         with_gpm=no
5333                                 else
5334                                         { { echo "$as_me:5334: error: Cannot link with GPM library" >&5
5335 echo "$as_me: error: Cannot link with GPM library" >&2;}
5336    { (exit 1); exit 1; }; }
5337                                 fi
5338
5339 fi
5340
5341                 fi
5342
5343 else
5344
5345                 test "$with_gpm" != maybe && { echo "$as_me:5345: WARNING: Cannot find GPM header" >&5
5346 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5347                 with_gpm=no
5348
5349 fi
5350
5351 fi
5352
5353 if test "$with_gpm" != no ; then
5354         echo "$as_me:5354: checking if you want to load GPM dynamically" >&5
5355 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5356
5357 # Check whether --with-dlsym or --without-dlsym was given.
5358 if test "${with_dlsym+set}" = set; then
5359   withval="$with_dlsym"
5360   with_dlsym=$withval
5361 else
5362   with_dlsym=yes
5363 fi;
5364         echo "$as_me:5364: result: $with_dlsym" >&5
5365 echo "${ECHO_T}$with_dlsym" >&6
5366         if test "x$with_dlsym" = xyes ; then
5367
5368 cf_have_dlsym=no
5369 echo "$as_me:5369: checking for dlsym" >&5
5370 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5371 if test "${ac_cv_func_dlsym+set}" = set; then
5372   echo $ECHO_N "(cached) $ECHO_C" >&6
5373 else
5374   cat >conftest.$ac_ext <<_ACEOF
5375 #line 5375 "configure"
5376 #include "confdefs.h"
5377 /* System header to define __stub macros and hopefully few prototypes,
5378     which can conflict with char dlsym (); below.  */
5379 #include <assert.h>
5380 /* Override any gcc2 internal prototype to avoid an error.  */
5381 #ifdef __cplusplus
5382 extern "C"
5383 #endif
5384 /* We use char because int might match the return type of a gcc2
5385    builtin and then its argument prototype would still apply.  */
5386 char dlsym ();
5387 char (*f) ();
5388
5389 int
5390 main ()
5391 {
5392 /* The GNU C library defines this for functions which it implements
5393     to always fail with ENOSYS.  Some functions are actually named
5394     something starting with __ and the normal name is an alias.  */
5395 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5396 choke me
5397 #else
5398 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5399 #endif
5400
5401   ;
5402   return 0;
5403 }
5404 _ACEOF
5405 rm -f conftest.$ac_objext conftest$ac_exeext
5406 if { (eval echo "$as_me:5406: \"$ac_link\"") >&5
5407   (eval $ac_link) 2>&5
5408   ac_status=$?
5409   echo "$as_me:5409: \$? = $ac_status" >&5
5410   (exit $ac_status); } &&
5411          { ac_try='test -s conftest$ac_exeext'
5412   { (eval echo "$as_me:5412: \"$ac_try\"") >&5
5413   (eval $ac_try) 2>&5
5414   ac_status=$?
5415   echo "$as_me:5415: \$? = $ac_status" >&5
5416   (exit $ac_status); }; }; then
5417   ac_cv_func_dlsym=yes
5418 else
5419   echo "$as_me: failed program was:" >&5
5420 cat conftest.$ac_ext >&5
5421 ac_cv_func_dlsym=no
5422 fi
5423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5424 fi
5425 echo "$as_me:5425: result: $ac_cv_func_dlsym" >&5
5426 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5427 if test $ac_cv_func_dlsym = yes; then
5428   cf_have_dlsym=yes
5429 else
5430
5431 cf_have_libdl=no
5432 echo "$as_me:5432: checking for dlsym in -ldl" >&5
5433 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5434 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5435   echo $ECHO_N "(cached) $ECHO_C" >&6
5436 else
5437   ac_check_lib_save_LIBS=$LIBS
5438 LIBS="-ldl  $LIBS"
5439 cat >conftest.$ac_ext <<_ACEOF
5440 #line 5440 "configure"
5441 #include "confdefs.h"
5442
5443 /* Override any gcc2 internal prototype to avoid an error.  */
5444 #ifdef __cplusplus
5445 extern "C"
5446 #endif
5447 /* We use char because int might match the return type of a gcc2
5448    builtin and then its argument prototype would still apply.  */
5449 char dlsym ();
5450 int
5451 main ()
5452 {
5453 dlsym ();
5454   ;
5455   return 0;
5456 }
5457 _ACEOF
5458 rm -f conftest.$ac_objext conftest$ac_exeext
5459 if { (eval echo "$as_me:5459: \"$ac_link\"") >&5
5460   (eval $ac_link) 2>&5
5461   ac_status=$?
5462   echo "$as_me:5462: \$? = $ac_status" >&5
5463   (exit $ac_status); } &&
5464          { ac_try='test -s conftest$ac_exeext'
5465   { (eval echo "$as_me:5465: \"$ac_try\"") >&5
5466   (eval $ac_try) 2>&5
5467   ac_status=$?
5468   echo "$as_me:5468: \$? = $ac_status" >&5
5469   (exit $ac_status); }; }; then
5470   ac_cv_lib_dl_dlsym=yes
5471 else
5472   echo "$as_me: failed program was:" >&5
5473 cat conftest.$ac_ext >&5
5474 ac_cv_lib_dl_dlsym=no
5475 fi
5476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5477 LIBS=$ac_check_lib_save_LIBS
5478 fi
5479 echo "$as_me:5479: result: $ac_cv_lib_dl_dlsym" >&5
5480 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5481 if test $ac_cv_lib_dl_dlsym = yes; then
5482
5483         cf_have_dlsym=yes
5484         cf_have_libdl=yes
5485 fi
5486
5487 fi
5488
5489 if test "$cf_have_dlsym" = yes ; then
5490         test "$cf_have_libdl" = yes && {
5491 cf_add_libs="-ldl"
5492 # Filter out duplicates - this happens with badly-designed ".pc" files...
5493 for cf_add_1lib in $LIBS
5494 do
5495         for cf_add_2lib in $cf_add_libs
5496         do
5497                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5498                 then
5499                         cf_add_1lib=
5500                         break
5501                 fi
5502         done
5503         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5504 done
5505 LIBS="$cf_add_libs"
5506  }
5507
5508         echo "$as_me:5508: checking whether able to link to dl*() functions" >&5
5509 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5510         cat >conftest.$ac_ext <<_ACEOF
5511 #line 5511 "configure"
5512 #include "confdefs.h"
5513 #include <dlfcn.h>
5514 int
5515 main ()
5516 {
5517
5518                 void *obj;
5519                 if ((obj = dlopen("filename", 0)) != 0) {
5520                         if (dlsym(obj, "symbolname") == 0) {
5521                         dlclose(obj);
5522                         }
5523                 }
5524   ;
5525   return 0;
5526 }
5527 _ACEOF
5528 rm -f conftest.$ac_objext conftest$ac_exeext
5529 if { (eval echo "$as_me:5529: \"$ac_link\"") >&5
5530   (eval $ac_link) 2>&5
5531   ac_status=$?
5532   echo "$as_me:5532: \$? = $ac_status" >&5
5533   (exit $ac_status); } &&
5534          { ac_try='test -s conftest$ac_exeext'
5535   { (eval echo "$as_me:5535: \"$ac_try\"") >&5
5536   (eval $ac_try) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); }; }; then
5540
5541 cat >>confdefs.h <<\EOF
5542 #define HAVE_LIBDL 1
5543 EOF
5544
5545 else
5546   echo "$as_me: failed program was:" >&5
5547 cat conftest.$ac_ext >&5
5548
5549                 { { echo "$as_me:5549: error: Cannot link test program for libdl" >&5
5550 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5551    { (exit 1); exit 1; }; }
5552 fi
5553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5554         echo "$as_me:5554: result: ok" >&5
5555 echo "${ECHO_T}ok" >&6
5556 else
5557         { { echo "$as_me:5557: error: Cannot find dlsym function" >&5
5558 echo "$as_me: error: Cannot find dlsym function" >&2;}
5559    { (exit 1); exit 1; }; }
5560 fi
5561
5562                 if test "x$with_gpm" != xyes ; then
5563                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5564
5565 echo "${as_me:-configure}:5565: testing assuming soname for gpm is $with_gpm ..." 1>&5
5566
5567                         cf_cv_gpm_soname="$with_gpm"
5568                 else
5569
5570 echo "$as_me:5570: checking for soname of gpm library" >&5
5571 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5572 if test "${cf_cv_gpm_soname+set}" = set; then
5573   echo $ECHO_N "(cached) $ECHO_C" >&6
5574 else
5575
5576 cf_cv_gpm_soname=unknown
5577 if test "$cross_compiling" != yes ; then
5578 cat >conftest.$ac_ext <<CF_EOF
5579 #include <gpm.h>
5580 int main()
5581 {
5582 if (Gpm_Open(0,0)) Gpm_Close();
5583         ${cf_cv_main_return:-return}(0);
5584 }
5585 CF_EOF
5586 cf_save_LIBS="$LIBS"
5587
5588 cf_add_libs="-lgpm"
5589 # Filter out duplicates - this happens with badly-designed ".pc" files...
5590 for cf_add_1lib in $LIBS
5591 do
5592         for cf_add_2lib in $cf_add_libs
5593         do
5594                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5595                 then
5596                         cf_add_1lib=
5597                         break
5598                 fi
5599         done
5600         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5601 done
5602 LIBS="$cf_add_libs"
5603
5604         if { (eval echo "$as_me:5604: \"$ac_compile\"") >&5
5605   (eval $ac_compile) 2>&5
5606   ac_status=$?
5607   echo "$as_me:5607: \$? = $ac_status" >&5
5608   (exit $ac_status); } ; then
5609                 if { (eval echo "$as_me:5609: \"$ac_link\"") >&5
5610   (eval $ac_link) 2>&5
5611   ac_status=$?
5612   echo "$as_me:5612: \$? = $ac_status" >&5
5613   (exit $ac_status); } ; then
5614                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5615                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5616                 fi
5617         fi
5618 rm -rf conftest*
5619 LIBS="$cf_save_LIBS"
5620 fi
5621
5622 fi
5623 echo "$as_me:5623: result: $cf_cv_gpm_soname" >&5
5624 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5625
5626                 fi
5627                 test "$cf_cv_gpm_soname" != "unknown" &&
5628 cat >>confdefs.h <<EOF
5629 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5630 EOF
5631
5632                 SHLIB_LIST="-ldl $SHLIB_LIST"
5633         else
5634                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5635
5636 cf_add_libs="-lgpm"
5637 # Filter out duplicates - this happens with badly-designed ".pc" files...
5638 for cf_add_1lib in $TEST_LIBS
5639 do
5640         for cf_add_2lib in $cf_add_libs
5641         do
5642                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5643                 then
5644                         cf_add_1lib=
5645                         break
5646                 fi
5647         done
5648         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5649 done
5650 TEST_LIBS="$cf_add_libs"
5651
5652         fi
5653
5654 cat >>confdefs.h <<\EOF
5655 #define HAVE_LIBGPM 1
5656 EOF
5657
5658 echo "$as_me:5658: checking for Gpm_Wgetch in -lgpm" >&5
5659 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5660 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5661   echo $ECHO_N "(cached) $ECHO_C" >&6
5662 else
5663   ac_check_lib_save_LIBS=$LIBS
5664 LIBS="-lgpm  $LIBS"
5665 cat >conftest.$ac_ext <<_ACEOF
5666 #line 5666 "configure"
5667 #include "confdefs.h"
5668
5669 /* Override any gcc2 internal prototype to avoid an error.  */
5670 #ifdef __cplusplus
5671 extern "C"
5672 #endif
5673 /* We use char because int might match the return type of a gcc2
5674    builtin and then its argument prototype would still apply.  */
5675 char Gpm_Wgetch ();
5676 int
5677 main ()
5678 {
5679 Gpm_Wgetch ();
5680   ;
5681   return 0;
5682 }
5683 _ACEOF
5684 rm -f conftest.$ac_objext conftest$ac_exeext
5685 if { (eval echo "$as_me:5685: \"$ac_link\"") >&5
5686   (eval $ac_link) 2>&5
5687   ac_status=$?
5688   echo "$as_me:5688: \$? = $ac_status" >&5
5689   (exit $ac_status); } &&
5690          { ac_try='test -s conftest$ac_exeext'
5691   { (eval echo "$as_me:5691: \"$ac_try\"") >&5
5692   (eval $ac_try) 2>&5
5693   ac_status=$?
5694   echo "$as_me:5694: \$? = $ac_status" >&5
5695   (exit $ac_status); }; }; then
5696   ac_cv_lib_gpm_Gpm_Wgetch=yes
5697 else
5698   echo "$as_me: failed program was:" >&5
5699 cat conftest.$ac_ext >&5
5700 ac_cv_lib_gpm_Gpm_Wgetch=no
5701 fi
5702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5703 LIBS=$ac_check_lib_save_LIBS
5704 fi
5705 echo "$as_me:5705: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5706 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5707 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5708
5709 echo "$as_me:5709: checking if GPM is weakly bound to curses library" >&5
5710 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5711 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5712   echo $ECHO_N "(cached) $ECHO_C" >&6
5713 else
5714
5715 cf_cv_check_gpm_wgetch=unknown
5716 if test "$cross_compiling" != yes ; then
5717
5718 cat >conftest.$ac_ext <<CF_EOF
5719 #include <gpm.h>
5720 int main()
5721 {
5722         Gpm_Wgetch();
5723         ${cf_cv_main_return:-return}(0);
5724 }
5725 CF_EOF
5726
5727         cf_save_LIBS="$LIBS"
5728         # This only works if we can look at the symbol table.  If a shared
5729         # library is stripped for install, we cannot use that.  So we're forced
5730         # to rely on the static library, noting that some packagers may not
5731         # include it.
5732         LIBS="-static -lgpm -dynamic $LIBS"
5733         if { (eval echo "$as_me:5733: \"$ac_compile\"") >&5
5734   (eval $ac_compile) 2>&5
5735   ac_status=$?
5736   echo "$as_me:5736: \$? = $ac_status" >&5
5737   (exit $ac_status); } ; then
5738                 if { (eval echo "$as_me:5738: \"$ac_link\"") >&5
5739   (eval $ac_link) 2>&5
5740   ac_status=$?
5741   echo "$as_me:5741: \$? = $ac_status" >&5
5742   (exit $ac_status); } ; then
5743                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5744                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5745                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5746                 fi
5747         fi
5748         rm -rf conftest*
5749         LIBS="$cf_save_LIBS"
5750 fi
5751
5752 fi
5753 echo "$as_me:5753: result: $cf_cv_check_gpm_wgetch" >&5
5754 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5755
5756 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5757         { echo "$as_me:5757: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5758 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5759 fi
5760
5761 fi
5762
5763 fi
5764
5765 # not everyone has "test -c"
5766 if test -c /dev/sysmouse 2>/dev/null ; then
5767 echo "$as_me:5767: checking if you want to use sysmouse" >&5
5768 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5769
5770 # Check whether --with-sysmouse or --without-sysmouse was given.
5771 if test "${with_sysmouse+set}" = set; then
5772   withval="$with_sysmouse"
5773   cf_with_sysmouse=$withval
5774 else
5775   cf_with_sysmouse=maybe
5776 fi;
5777         if test "$cf_with_sysmouse" != no ; then
5778         cat >conftest.$ac_ext <<_ACEOF
5779 #line 5779 "configure"
5780 #include "confdefs.h"
5781
5782 #include <osreldate.h>
5783 #if (__FreeBSD_version >= 400017)
5784 #include <sys/consio.h>
5785 #include <sys/fbio.h>
5786 #else
5787 #include <machine/console.h>
5788 #endif
5789
5790 int
5791 main ()
5792 {
5793
5794         struct mouse_info the_mouse;
5795         ioctl(0, CONS_MOUSECTL, &the_mouse);
5796
5797   ;
5798   return 0;
5799 }
5800 _ACEOF
5801 rm -f conftest.$ac_objext
5802 if { (eval echo "$as_me:5802: \"$ac_compile\"") >&5
5803   (eval $ac_compile) 2>&5
5804   ac_status=$?
5805   echo "$as_me:5805: \$? = $ac_status" >&5
5806   (exit $ac_status); } &&
5807          { ac_try='test -s conftest.$ac_objext'
5808   { (eval echo "$as_me:5808: \"$ac_try\"") >&5
5809   (eval $ac_try) 2>&5
5810   ac_status=$?
5811   echo "$as_me:5811: \$? = $ac_status" >&5
5812   (exit $ac_status); }; }; then
5813   cf_with_sysmouse=yes
5814 else
5815   echo "$as_me: failed program was:" >&5
5816 cat conftest.$ac_ext >&5
5817 cf_with_sysmouse=no
5818 fi
5819 rm -f conftest.$ac_objext conftest.$ac_ext
5820         fi
5821 echo "$as_me:5821: result: $cf_with_sysmouse" >&5
5822 echo "${ECHO_T}$cf_with_sysmouse" >&6
5823 test "$cf_with_sysmouse" = yes &&
5824 cat >>confdefs.h <<\EOF
5825 #define USE_SYSMOUSE 1
5826 EOF
5827
5828 fi
5829
5830 if test X"$CC_G_OPT" = X"" ; then
5831         CC_G_OPT='-g'
5832         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5833 fi
5834
5835 if test X"$CXX_G_OPT" = X"" ; then
5836         CXX_G_OPT='-g'
5837         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5838 fi
5839
5840 echo "$as_me:5840: checking for default loader flags" >&5
5841 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5842 case $DFT_LWR_MODEL in
5843 (libtool) LD_MODEL=''   ;;
5844 (normal)  LD_MODEL=''   ;;
5845 (debug)   LD_MODEL=$CC_G_OPT ;;
5846 (profile) LD_MODEL='-pg';;
5847 (shared)  LD_MODEL=''   ;;
5848 esac
5849 echo "$as_me:5849: result: $LD_MODEL" >&5
5850 echo "${ECHO_T}$LD_MODEL" >&6
5851
5852 case $DFT_LWR_MODEL in
5853 (shared)
5854
5855 echo "$as_me:5855: checking if rpath option should be used" >&5
5856 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5857
5858 # Check whether --enable-rpath or --disable-rpath was given.
5859 if test "${enable_rpath+set}" = set; then
5860   enableval="$enable_rpath"
5861   cf_cv_enable_rpath=$enableval
5862 else
5863   cf_cv_enable_rpath=no
5864 fi;
5865 echo "$as_me:5865: result: $cf_cv_enable_rpath" >&5
5866 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5867
5868 echo "$as_me:5868: checking if shared libraries should be relinked during install" >&5
5869 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5870
5871 # Check whether --enable-relink or --disable-relink was given.
5872 if test "${enable_relink+set}" = set; then
5873   enableval="$enable_relink"
5874   cf_cv_do_relink=$enableval
5875 else
5876   cf_cv_do_relink=yes
5877 fi;
5878 echo "$as_me:5878: result: $cf_cv_do_relink" >&5
5879 echo "${ECHO_T}$cf_cv_do_relink" >&6
5880         ;;
5881 esac
5882
5883 # we will build libraries one-level down.
5884 rel_builddir=..
5885
5886 LD_RPATH_OPT=
5887 echo "$as_me:5887: checking for an rpath option" >&5
5888 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5889 case $cf_cv_system_name in
5890 (irix*)
5891         if test "$GCC" = yes; then
5892                 LD_RPATH_OPT="-Wl,-rpath,"
5893         else
5894                 LD_RPATH_OPT="-rpath "
5895         fi
5896         ;;
5897 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5898         LD_RPATH_OPT="-Wl,-rpath,"
5899         ;;
5900 (openbsd[2-9].*|mirbsd*)
5901         LD_RPATH_OPT="-Wl,-rpath,"
5902         ;;
5903 (dragonfly*)
5904         LD_RPATH_OPT="-rpath "
5905         ;;
5906 (netbsd*)
5907         LD_RPATH_OPT="-Wl,-rpath,"
5908         ;;
5909 (osf*|mls+*)
5910         LD_RPATH_OPT="-rpath "
5911         ;;
5912 (solaris2*)
5913         LD_RPATH_OPT="-R"
5914         ;;
5915 (*)
5916         ;;
5917 esac
5918 echo "$as_me:5918: result: $LD_RPATH_OPT" >&5
5919 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5920
5921 case "x$LD_RPATH_OPT" in
5922 (x-R*)
5923         echo "$as_me:5923: checking if we need a space after rpath option" >&5
5924 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5925         cf_save_LIBS="$LIBS"
5926
5927 cf_add_libs="${LD_RPATH_OPT}$libdir"
5928 # Filter out duplicates - this happens with badly-designed ".pc" files...
5929 for cf_add_1lib in $LIBS
5930 do
5931         for cf_add_2lib in $cf_add_libs
5932         do
5933                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5934                 then
5935                         cf_add_1lib=
5936                         break
5937                 fi
5938         done
5939         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5940 done
5941 LIBS="$cf_add_libs"
5942
5943         cat >conftest.$ac_ext <<_ACEOF
5944 #line 5944 "configure"
5945 #include "confdefs.h"
5946
5947 int
5948 main ()
5949 {
5950
5951   ;
5952   return 0;
5953 }
5954 _ACEOF
5955 rm -f conftest.$ac_objext conftest$ac_exeext
5956 if { (eval echo "$as_me:5956: \"$ac_link\"") >&5
5957   (eval $ac_link) 2>&5
5958   ac_status=$?
5959   echo "$as_me:5959: \$? = $ac_status" >&5
5960   (exit $ac_status); } &&
5961          { ac_try='test -s conftest$ac_exeext'
5962   { (eval echo "$as_me:5962: \"$ac_try\"") >&5
5963   (eval $ac_try) 2>&5
5964   ac_status=$?
5965   echo "$as_me:5965: \$? = $ac_status" >&5
5966   (exit $ac_status); }; }; then
5967   cf_rpath_space=no
5968 else
5969   echo "$as_me: failed program was:" >&5
5970 cat conftest.$ac_ext >&5
5971 cf_rpath_space=yes
5972 fi
5973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5974         LIBS="$cf_save_LIBS"
5975         echo "$as_me:5975: result: $cf_rpath_space" >&5
5976 echo "${ECHO_T}$cf_rpath_space" >&6
5977         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5978         ;;
5979 esac
5980
5981         RM_SHARED_OPTS=
5982         LOCAL_LDFLAGS=
5983         LOCAL_LDFLAGS2=
5984         LD_SHARED_OPTS=
5985         INSTALL_LIB="-m 644"
5986         : ${rel_builddir:=.}
5987
5988         shlibdir=$libdir
5989
5990         MAKE_DLLS="#"
5991
5992         cf_cv_do_symlinks=no
5993         cf_ld_rpath_opt=
5994         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5995
5996         echo "$as_me:5996: checking if release/abi version should be used for shared libs" >&5
5997 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5998
5999 # Check whether --with-shlib-version or --without-shlib-version was given.
6000 if test "${with_shlib_version+set}" = set; then
6001   withval="$with_shlib_version"
6002   test -z "$withval" && withval=auto
6003         case $withval in
6004         (yes)
6005                 cf_cv_shlib_version=auto
6006                 ;;
6007         (rel|abi|auto)
6008                 cf_cv_shlib_version=$withval
6009                 ;;
6010         (*)
6011                 echo "$as_me:6011: result: $withval" >&5
6012 echo "${ECHO_T}$withval" >&6
6013                 { { echo "$as_me:6013: error: option value must be one of: rel, abi, or auto" >&5
6014 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6015    { (exit 1); exit 1; }; }
6016                 ;;
6017         esac
6018
6019 else
6020   cf_cv_shlib_version=auto
6021 fi;
6022         echo "$as_me:6022: result: $cf_cv_shlib_version" >&5
6023 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6024
6025         cf_cv_rm_so_locs=no
6026         cf_try_cflags=
6027
6028         # Some less-capable ports of gcc support only -fpic
6029         CC_SHARED_OPTS=
6030         if test "$GCC" = yes
6031         then
6032                 echo "$as_me:6032: checking which $CC option to use" >&5
6033 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6034                 cf_save_CFLAGS="$CFLAGS"
6035                 for CC_SHARED_OPTS in -fPIC -fpic ''
6036                 do
6037                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6038                         cat >conftest.$ac_ext <<_ACEOF
6039 #line 6039 "configure"
6040 #include "confdefs.h"
6041 #include <stdio.h>
6042 int
6043 main ()
6044 {
6045 int x = 1
6046   ;
6047   return 0;
6048 }
6049 _ACEOF
6050 rm -f conftest.$ac_objext
6051 if { (eval echo "$as_me:6051: \"$ac_compile\"") >&5
6052   (eval $ac_compile) 2>&5
6053   ac_status=$?
6054   echo "$as_me:6054: \$? = $ac_status" >&5
6055   (exit $ac_status); } &&
6056          { ac_try='test -s conftest.$ac_objext'
6057   { (eval echo "$as_me:6057: \"$ac_try\"") >&5
6058   (eval $ac_try) 2>&5
6059   ac_status=$?
6060   echo "$as_me:6060: \$? = $ac_status" >&5
6061   (exit $ac_status); }; }; then
6062   break
6063 else
6064   echo "$as_me: failed program was:" >&5
6065 cat conftest.$ac_ext >&5
6066 fi
6067 rm -f conftest.$ac_objext conftest.$ac_ext
6068                 done
6069                 echo "$as_me:6069: result: $CC_SHARED_OPTS" >&5
6070 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6071                 CFLAGS="$cf_save_CFLAGS"
6072         fi
6073
6074         cf_cv_shlib_version_infix=no
6075
6076         case $cf_cv_system_name in
6077         (aix4.3-9*|aix[5-7]*)
6078                 if test "$GCC" = yes; then
6079                         CC_SHARED_OPTS='-Wl,-brtl'
6080                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6081                 else
6082                         CC_SHARED_OPTS='-brtl'
6083                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6084                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6085                 fi
6086                 ;;
6087         (beos*)
6088                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6089                 ;;
6090         (cygwin*)
6091                 CC_SHARED_OPTS=
6092                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6093                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6094                 cf_cv_shlib_version=cygdll
6095                 cf_cv_shlib_version_infix=cygdll
6096                 shlibdir=$bindir
6097                 MAKE_DLLS=
6098                 cat >mk_shared_lib.sh <<-CF_EOF
6099                 #!$SHELL
6100                 SHARED_LIB=\$1
6101                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6102                 shift
6103                 cat <<-EOF
6104                 Linking shared library
6105                 ** SHARED_LIB \$SHARED_LIB
6106                 ** IMPORT_LIB \$IMPORT_LIB
6107 EOF
6108                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6109 CF_EOF
6110                 chmod +x mk_shared_lib.sh
6111                 ;;
6112         (msys*)
6113                 CC_SHARED_OPTS=
6114                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6115                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6116                 cf_cv_shlib_version=msysdll
6117                 cf_cv_shlib_version_infix=msysdll
6118                 shlibdir=$bindir
6119                 MAKE_DLLS=
6120                 cat >mk_shared_lib.sh <<-CF_EOF
6121                 #!$SHELL
6122                 SHARED_LIB=\$1
6123                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6124                 shift
6125                 cat <<-EOF
6126                 Linking shared library
6127                 ** SHARED_LIB \$SHARED_LIB
6128                 ** IMPORT_LIB \$IMPORT_LIB
6129 EOF
6130                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6131 CF_EOF
6132                 chmod +x mk_shared_lib.sh
6133                 ;;
6134         (darwin*)
6135                 cf_try_cflags="no-cpp-precomp"
6136                 CC_SHARED_OPTS="-dynamic"
6137                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6138                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6139                 cf_cv_shlib_version_infix=yes
6140                 echo "$as_me:6140: checking if ld -search_paths_first works" >&5
6141 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6142 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6143   echo $ECHO_N "(cached) $ECHO_C" >&6
6144 else
6145
6146                         cf_save_LDFLAGS=$LDFLAGS
6147                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6148                         cat >conftest.$ac_ext <<_ACEOF
6149 #line 6149 "configure"
6150 #include "confdefs.h"
6151
6152 int
6153 main ()
6154 {
6155 int i;
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 rm -f conftest.$ac_objext conftest$ac_exeext
6161 if { (eval echo "$as_me:6161: \"$ac_link\"") >&5
6162   (eval $ac_link) 2>&5
6163   ac_status=$?
6164   echo "$as_me:6164: \$? = $ac_status" >&5
6165   (exit $ac_status); } &&
6166          { ac_try='test -s conftest$ac_exeext'
6167   { (eval echo "$as_me:6167: \"$ac_try\"") >&5
6168   (eval $ac_try) 2>&5
6169   ac_status=$?
6170   echo "$as_me:6170: \$? = $ac_status" >&5
6171   (exit $ac_status); }; }; then
6172   cf_cv_ldflags_search_paths_first=yes
6173 else
6174   echo "$as_me: failed program was:" >&5
6175 cat conftest.$ac_ext >&5
6176 cf_cv_ldflags_search_paths_first=no
6177 fi
6178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6179                                 LDFLAGS=$cf_save_LDFLAGS
6180 fi
6181 echo "$as_me:6181: result: $cf_cv_ldflags_search_paths_first" >&5
6182 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6183                 if test $cf_cv_ldflags_search_paths_first = yes; then
6184                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6185                 fi
6186                 ;;
6187         (hpux[7-8]*)
6188                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6189                 if test "$GCC" != yes; then
6190                         CC_SHARED_OPTS='+Z'
6191                 fi
6192                 MK_SHARED_LIB='${LD} -b -o $@'
6193                 INSTALL_LIB="-m 555"
6194                 ;;
6195         (hpux*)
6196                 # (tested with gcc 2.7.2 -- I don't have c89)
6197                 if test "$GCC" = yes; then
6198                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6199                 else
6200                         CC_SHARED_OPTS='+Z'
6201                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6202                 fi
6203                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6204                 # HP-UX shared libraries must be executable, and should be
6205                 # readonly to exploit a quirk in the memory manager.
6206                 INSTALL_LIB="-m 555"
6207                 ;;
6208         (interix*)
6209                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6210                 if test "$cf_cv_shlib_version" = rel; then
6211                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6212                 else
6213                         cf_shared_soname='`basename `'
6214                 fi
6215                 CC_SHARED_OPTS=
6216                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6217                 ;;
6218         (irix*)
6219                 if test "$cf_cv_enable_rpath" = yes ; then
6220                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6221                 fi
6222                 # tested with IRIX 5.2 and 'cc'.
6223                 if test "$GCC" != yes; then
6224                         CC_SHARED_OPTS='-KPIC'
6225                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6226                 else
6227                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6228                 fi
6229                 cf_cv_rm_so_locs=yes
6230                 ;;
6231         (linux*|gnu*|k*bsd*-gnu)
6232                 if test "$DFT_LWR_MODEL" = "shared" ; then
6233                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6234                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6235                 fi
6236                 if test "$cf_cv_enable_rpath" = yes ; then
6237                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6238                 fi
6239
6240         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6241         if test "$cf_cv_shlib_version" = rel; then
6242                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6243         else
6244                 cf_cv_shared_soname='`basename $@`'
6245         fi
6246
6247                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6248                 ;;
6249         (mingw*)
6250                 cf_cv_shlib_version=mingw
6251                 cf_cv_shlib_version_infix=mingw
6252                 shlibdir=$bindir
6253                 MAKE_DLLS=
6254                 if test "$DFT_LWR_MODEL" = "shared" ; then
6255                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6257                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6258                 fi
6259                 CC_SHARED_OPTS=
6260                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6261                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6262                 cat >mk_shared_lib.sh <<-CF_EOF
6263                 #!$SHELL
6264                 SHARED_LIB=\$1
6265                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6266                 shift
6267                 cat <<-EOF
6268                 Linking shared library
6269                 ** SHARED_LIB \$SHARED_LIB
6270                 ** IMPORT_LIB \$IMPORT_LIB
6271 EOF
6272                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6273 CF_EOF
6274                 chmod +x mk_shared_lib.sh
6275                 ;;
6276         (openbsd[2-9].*|mirbsd*)
6277                 if test "$DFT_LWR_MODEL" = "shared" ; then
6278                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6279                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6280                 fi
6281                 if test "$cf_cv_enable_rpath" = yes ; then
6282                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6283                 fi
6284                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6285
6286         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6287         if test "$cf_cv_shlib_version" = rel; then
6288                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6289         else
6290                 cf_cv_shared_soname='`basename $@`'
6291         fi
6292
6293                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6294                 ;;
6295         (nto-qnx*|openbsd*|freebsd[12].*)
6296                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6297                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6298                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6299                 ;;
6300         (dragonfly*|freebsd*)
6301                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6302                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6303                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6304                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6305                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6306                 fi
6307
6308         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6309         if test "$cf_cv_shlib_version" = rel; then
6310                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6311         else
6312                 cf_cv_shared_soname='`basename $@`'
6313         fi
6314
6315                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6316                 ;;
6317         (netbsd*)
6318                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6319                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6320                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6321                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6322                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6323                         if test "$cf_cv_shlib_version" = auto; then
6324                         if test -f /usr/libexec/ld.elf_so; then
6325                                 cf_cv_shlib_version=abi
6326                         else
6327                                 cf_cv_shlib_version=rel
6328                         fi
6329                         fi
6330
6331         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6332         if test "$cf_cv_shlib_version" = rel; then
6333                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6334         else
6335                 cf_cv_shared_soname='`basename $@`'
6336         fi
6337
6338                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6339                 else
6340                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6341                 fi
6342                 ;;
6343         (osf*|mls+*)
6344                 # tested with OSF/1 V3.2 and 'cc'
6345                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6346                 # link with shared libs).
6347                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6348                 case $host_os in
6349                 (osf4*)
6350                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6351                         ;;
6352                 esac
6353                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6354                 if test "$DFT_LWR_MODEL" = "shared" ; then
6355                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6356                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6357                 fi
6358                 cf_cv_rm_so_locs=yes
6359                 ;;
6360         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6361                 # tested with osr5.0.5
6362                 if test "$GCC" != yes; then
6363                         CC_SHARED_OPTS='-belf -KPIC'
6364                 fi
6365                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6366                 if test "$cf_cv_enable_rpath" = yes ; then
6367                         # only way is to set LD_RUN_PATH but no switch for it
6368                         RUN_PATH=$libdir
6369                 fi
6370                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6371                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6372                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6373                 ;;
6374         (sunos4*)
6375                 # tested with SunOS 4.1.1 and gcc 2.7.0
6376                 if test "$GCC" != yes; then
6377                         CC_SHARED_OPTS='-KPIC'
6378                 fi
6379                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6380                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6381                 ;;
6382         (solaris2*)
6383                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6384                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6385                 if test "$DFT_LWR_MODEL" = "shared" ; then
6386                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6387                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6388                 fi
6389                 if test "$cf_cv_enable_rpath" = yes ; then
6390                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6391                 fi
6392
6393         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6394         if test "$cf_cv_shlib_version" = rel; then
6395                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6396         else
6397                 cf_cv_shared_soname='`basename $@`'
6398         fi
6399
6400                 if test "$GCC" != yes; then
6401                         cf_save_CFLAGS="$CFLAGS"
6402                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6403                         do
6404                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6405                                 cat >conftest.$ac_ext <<_ACEOF
6406 #line 6406 "configure"
6407 #include "confdefs.h"
6408 #include <stdio.h>
6409 int
6410 main ()
6411 {
6412 printf("Hello\n");
6413   ;
6414   return 0;
6415 }
6416 _ACEOF
6417 rm -f conftest.$ac_objext
6418 if { (eval echo "$as_me:6418: \"$ac_compile\"") >&5
6419   (eval $ac_compile) 2>&5
6420   ac_status=$?
6421   echo "$as_me:6421: \$? = $ac_status" >&5
6422   (exit $ac_status); } &&
6423          { ac_try='test -s conftest.$ac_objext'
6424   { (eval echo "$as_me:6424: \"$ac_try\"") >&5
6425   (eval $ac_try) 2>&5
6426   ac_status=$?
6427   echo "$as_me:6427: \$? = $ac_status" >&5
6428   (exit $ac_status); }; }; then
6429   break
6430 else
6431   echo "$as_me: failed program was:" >&5
6432 cat conftest.$ac_ext >&5
6433 fi
6434 rm -f conftest.$ac_objext conftest.$ac_ext
6435                         done
6436                         CFLAGS="$cf_save_CFLAGS"
6437                         CC_SHARED_OPTS=$cf_shared_opts
6438                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6439                 else
6440                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6441                 fi
6442                 ;;
6443         (sysv5uw7*|unix_sv*)
6444                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6445                 if test "$GCC" != yes; then
6446                         CC_SHARED_OPTS='-KPIC'
6447                 fi
6448                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6449                 ;;
6450         (*)
6451                 CC_SHARED_OPTS='unknown'
6452                 MK_SHARED_LIB='echo unknown'
6453                 ;;
6454         esac
6455
6456         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6457         case "$cf_cv_shlib_version" in
6458         (rel|abi)
6459                 case "$MK_SHARED_LIB" in
6460                 (*'-o $@')
6461                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6462                         ;;
6463                 (*)
6464                         { echo "$as_me:6464: WARNING: ignored --with-shlib-version" >&5
6465 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6466                         ;;
6467                 esac
6468                 ;;
6469         esac
6470
6471         if test -n "$cf_try_cflags"
6472         then
6473 cat > conftest.$ac_ext <<EOF
6474 #line 6474 "${as_me:-configure}"
6475 #include <stdio.h>
6476 int main(int argc, char *argv[])
6477 {
6478         printf("hello\n");
6479         return (argv[argc-1] == 0) ;
6480 }
6481 EOF
6482                 cf_save_CFLAGS="$CFLAGS"
6483                 for cf_opt in $cf_try_cflags
6484                 do
6485                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6486                         echo "$as_me:6486: checking if CFLAGS option -$cf_opt works" >&5
6487 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6488                         if { (eval echo "$as_me:6488: \"$ac_compile\"") >&5
6489   (eval $ac_compile) 2>&5
6490   ac_status=$?
6491   echo "$as_me:6491: \$? = $ac_status" >&5
6492   (exit $ac_status); }; then
6493                                 echo "$as_me:6493: result: yes" >&5
6494 echo "${ECHO_T}yes" >&6
6495                                 cf_save_CFLAGS="$CFLAGS"
6496                         else
6497                                 echo "$as_me:6497: result: no" >&5
6498 echo "${ECHO_T}no" >&6
6499                         fi
6500                 done
6501                 CFLAGS="$cf_save_CFLAGS"
6502         fi
6503
6504         # RPATH_LIST is a colon-separated list of directories
6505         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6506         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6507
6508         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6509
6510         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6511
6512 echo "${as_me:-configure}:6512: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6513
6514         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6515
6516 echo "${as_me:-configure}:6516: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6517
6518 for model in $cf_list_models; do
6519         case $model in
6520         (libtool)
6521
6522 echo "$as_me:6522: checking for additional libtool options" >&5
6523 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6524
6525 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6526 if test "${with_libtool_opts+set}" = set; then
6527   withval="$with_libtool_opts"
6528   with_libtool_opts=$withval
6529 else
6530   with_libtool_opts=no
6531 fi;
6532 echo "$as_me:6532: result: $with_libtool_opts" >&5
6533 echo "${ECHO_T}$with_libtool_opts" >&6
6534
6535 case .$with_libtool_opts in
6536 (.yes|.no|.)
6537         ;;
6538 (*)
6539         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6540         ;;
6541 esac
6542
6543 echo "$as_me:6543: checking if exported-symbols file should be used" >&5
6544 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6545
6546 # Check whether --with-export-syms or --without-export-syms was given.
6547 if test "${with_export_syms+set}" = set; then
6548   withval="$with_export_syms"
6549   with_export_syms=$withval
6550 else
6551   with_export_syms=no
6552 fi;
6553 if test "x$with_export_syms" = xyes
6554 then
6555         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6556
6557 fi
6558 echo "$as_me:6558: result: $with_export_syms" >&5
6559 echo "${ECHO_T}$with_export_syms" >&6
6560 if test "x$with_export_syms" != xno
6561 then
6562         EXPORT_SYMS="-export-symbols $with_export_syms"
6563
6564 fi
6565
6566                 ;;
6567         (shared)
6568                 if test "$CC_SHARED_OPTS" = "unknown"; then
6569                         { { echo "$as_me:6569: error: Shared libraries are not supported in this version" >&5
6570 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6571    { (exit 1); exit 1; }; }
6572                 fi
6573                 # workaround for inept transition to PIE vs PIC...
6574                 echo "$as_me:6574: checking if current CFLAGS link properly" >&5
6575 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6576                 cat >conftest.$ac_ext <<_ACEOF
6577 #line 6577 "configure"
6578 #include "confdefs.h"
6579 #include <stdio.h>
6580 int
6581 main ()
6582 {
6583 printf("Hello work\n");
6584   ;
6585   return 0;
6586 }
6587 _ACEOF
6588 rm -f conftest.$ac_objext conftest$ac_exeext
6589 if { (eval echo "$as_me:6589: \"$ac_link\"") >&5
6590   (eval $ac_link) 2>&5
6591   ac_status=$?
6592   echo "$as_me:6592: \$? = $ac_status" >&5
6593   (exit $ac_status); } &&
6594          { ac_try='test -s conftest$ac_exeext'
6595   { (eval echo "$as_me:6595: \"$ac_try\"") >&5
6596   (eval $ac_try) 2>&5
6597   ac_status=$?
6598   echo "$as_me:6598: \$? = $ac_status" >&5
6599   (exit $ac_status); }; }; then
6600   cf_cflags_work=yes
6601 else
6602   echo "$as_me: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 cf_cflags_work=no
6605 fi
6606 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6607                 echo "$as_me:6607: result: $cf_cflags_work" >&5
6608 echo "${ECHO_T}$cf_cflags_work" >&6
6609                 if test "$cf_cflags_work" = no
6610                 then
6611                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6612
6613 echo "${as_me:-configure}:6613: testing try to work around by appending shared-options ..." 1>&5
6614
6615                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6616                 fi
6617
6618 echo "$as_me:6618: checking if versioned-symbols file should be used" >&5
6619 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6620
6621 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6622 if test "${with_versioned_syms+set}" = set; then
6623   withval="$with_versioned_syms"
6624   with_versioned_syms=$withval
6625 else
6626   with_versioned_syms=no
6627 fi;
6628 if test "x$with_versioned_syms" = xyes
6629 then
6630         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6631
6632 fi
6633 echo "$as_me:6633: result: $with_versioned_syms" >&5
6634 echo "${ECHO_T}$with_versioned_syms" >&6
6635
6636 RESULTING_SYMS=
6637 VERSIONED_SYMS=
6638 WILDCARD_SYMS=
6639
6640 if test "x$with_versioned_syms" != xno
6641 then
6642         RESULTING_SYMS=$with_versioned_syms
6643         case "x$MK_SHARED_LIB" in
6644         (*-Wl,*)
6645                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6646                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6647                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6648
6649 echo "${as_me:-configure}:6649: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6650
6651                 ;;
6652         (*-dy\ *)
6653                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6654                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6655                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6656
6657 echo "${as_me:-configure}:6657: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6658
6659                 ;;
6660         (*)
6661                 { echo "$as_me:6661: WARNING: this system does not support versioned-symbols" >&5
6662 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6663                 ;;
6664         esac
6665
6666         # Linux ld can selectively override scope, e.g., of symbols beginning with
6667         # "_" by first declaring some as global, and then using a wildcard to
6668         # declare the others as local.  Some other loaders cannot do this.  Check
6669         # by constructing a (very) simple shared library and inspecting its
6670         # symbols.
6671         if test "x$VERSIONED_SYMS" != "x"
6672         then
6673                 echo "$as_me:6673: checking if wildcards can be used to selectively omit symbols" >&5
6674 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6675                 WILDCARD_SYMS=no
6676
6677                 # make sources
6678                 rm -f conftest.*
6679
6680                 cat >conftest.ver <<EOF
6681 module_1.0 {
6682 global:
6683         globalf1;
6684 local:
6685         localf1;
6686 };
6687 module_2.0 {
6688 global:
6689         globalf2;
6690 local:
6691         localf2;
6692         _*;
6693 } module_1.0;
6694 submodule_1.0 {
6695 global:
6696         subglobalf1;
6697         _ismissing;
6698 local:
6699         sublocalf1;
6700 };
6701 submodule_2.0 {
6702 global:
6703         subglobalf2;
6704 local:
6705         sublocalf2;
6706         _*;
6707 } submodule_1.0;
6708 EOF
6709                 cat >conftest.$ac_ext <<EOF
6710 #line 6710 "configure"
6711 int     _ismissing(void) { return 1; }
6712 int     _localf1(void) { return 1; }
6713 int     _localf2(void) { return 2; }
6714 int     globalf1(void) { return 1; }
6715 int     globalf2(void) { return 2; }
6716 int     _sublocalf1(void) { return 1; }
6717 int     _sublocalf2(void) { return 2; }
6718 int     subglobalf1(void) { return 1; }
6719 int     subglobalf2(void) { return 2; }
6720 EOF
6721                 cat >conftest.mk <<EOF
6722 CC=${CC}
6723 CFLAGS=${CFLAGS}
6724 CPPFLAGS=${CPPFLAGS}
6725 LDFLAGS=${LDFLAGS}
6726 LIBS=${LIBS}
6727 VERSIONED_SYMS=${VERSIONED_SYMS}
6728 RESULTING_SYMS=conftest.ver
6729 MK_SHARED_LIB=${MK_SHARED_LIB}
6730 conftest.so: conftest.$ac_cv_objext
6731                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6732 EOF
6733
6734                 # compile source, make library
6735                 if make -f conftest.mk 2>&5 >/dev/null
6736                 then
6737                         # test for missing symbol in either Data or Text section
6738                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6739                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6740                 fi
6741                 echo "$as_me:6741: result: $WILDCARD_SYMS" >&5
6742 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6743                 rm -f conftest.*
6744         fi
6745 fi
6746
6747                 ;;
6748         esac
6749 done
6750
6751 # pretend that ncurses==ncursesw==ncursest
6752 echo "$as_me:6752: checking if you want to disable library suffixes" >&5
6753 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6754
6755 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6756 if test "${enable_lib_suffixes+set}" = set; then
6757   enableval="$enable_lib_suffixes"
6758   test "$enableval" != no && enableval=yes
6759         if test "$enableval" != "yes" ; then
6760     disable_lib_suffixes=yes
6761         else
6762                 disable_lib_suffixes=no
6763         fi
6764 else
6765   enableval=yes
6766         disable_lib_suffixes=no
6767
6768 fi;
6769 echo "$as_me:6769: result: $disable_lib_suffixes" >&5
6770 echo "${ECHO_T}$disable_lib_suffixes" >&6
6771
6772 ### If we're building with rpath, try to link non-standard libs that way too.
6773 if test "$DFT_LWR_MODEL" = "shared"; then
6774
6775 echo "$as_me:6775: checking if rpath-hack should be disabled" >&5
6776 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6777
6778 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6779 if test "${enable_rpath_hack+set}" = set; then
6780   enableval="$enable_rpath_hack"
6781   test "$enableval" != no && enableval=yes
6782         if test "$enableval" != "yes" ; then
6783     cf_disable_rpath_hack=yes
6784         else
6785                 cf_disable_rpath_hack=no
6786         fi
6787 else
6788   enableval=yes
6789         cf_disable_rpath_hack=no
6790
6791 fi;
6792 echo "$as_me:6792: result: $cf_disable_rpath_hack" >&5
6793 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6794 if test "$cf_disable_rpath_hack" = no ; then
6795
6796 echo "$as_me:6796: checking for updated LDFLAGS" >&5
6797 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6798 if test -n "$LD_RPATH_OPT" ; then
6799         echo "$as_me:6799: result: maybe" >&5
6800 echo "${ECHO_T}maybe" >&6
6801
6802         for ac_prog in ldd
6803 do
6804   # Extract the first word of "$ac_prog", so it can be a program name with args.
6805 set dummy $ac_prog; ac_word=$2
6806 echo "$as_me:6806: checking for $ac_word" >&5
6807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6808 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6809   echo $ECHO_N "(cached) $ECHO_C" >&6
6810 else
6811   if test -n "$cf_ldd_prog"; then
6812   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6813 else
6814   ac_save_IFS=$IFS; IFS=$ac_path_separator
6815 ac_dummy="$PATH"
6816 for ac_dir in $ac_dummy; do
6817   IFS=$ac_save_IFS
6818   test -z "$ac_dir" && ac_dir=.
6819   $as_executable_p "$ac_dir/$ac_word" || continue
6820 ac_cv_prog_cf_ldd_prog="$ac_prog"
6821 echo "$as_me:6821: found $ac_dir/$ac_word" >&5
6822 break
6823 done
6824
6825 fi
6826 fi
6827 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6828 if test -n "$cf_ldd_prog"; then
6829   echo "$as_me:6829: result: $cf_ldd_prog" >&5
6830 echo "${ECHO_T}$cf_ldd_prog" >&6
6831 else
6832   echo "$as_me:6832: result: no" >&5
6833 echo "${ECHO_T}no" >&6
6834 fi
6835
6836   test -n "$cf_ldd_prog" && break
6837 done
6838 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6839
6840         cf_rpath_list="/usr/lib /lib"
6841         if test "$cf_ldd_prog" != no
6842         then
6843                 cf_rpath_oops=
6844
6845 cat >conftest.$ac_ext <<_ACEOF
6846 #line 6846 "configure"
6847 #include "confdefs.h"
6848 #include <stdio.h>
6849 int
6850 main ()
6851 {
6852 printf("Hello");
6853   ;
6854   return 0;
6855 }
6856 _ACEOF
6857 rm -f conftest.$ac_objext conftest$ac_exeext
6858 if { (eval echo "$as_me:6858: \"$ac_link\"") >&5
6859   (eval $ac_link) 2>&5
6860   ac_status=$?
6861   echo "$as_me:6861: \$? = $ac_status" >&5
6862   (exit $ac_status); } &&
6863          { ac_try='test -s conftest$ac_exeext'
6864   { (eval echo "$as_me:6864: \"$ac_try\"") >&5
6865   (eval $ac_try) 2>&5
6866   ac_status=$?
6867   echo "$as_me:6867: \$? = $ac_status" >&5
6868   (exit $ac_status); }; }; then
6869   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6870                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6871 else
6872   echo "$as_me: failed program was:" >&5
6873 cat conftest.$ac_ext >&5
6874 fi
6875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6876
6877                 # If we passed the link-test, but get a "not found" on a given library,
6878                 # this could be due to inept reconfiguration of gcc to make it only
6879                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6880                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6881                 # /usr/local libraries.
6882                 if test -n "$cf_rpath_oops"
6883                 then
6884                         for cf_rpath_src in $cf_rpath_oops
6885                         do
6886                                 for cf_rpath_dir in \
6887                                         /usr/local \
6888                                         /usr/pkg \
6889                                         /opt/sfw
6890                                 do
6891                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6892                                         then
6893                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6894
6895 echo "${as_me:-configure}:6895: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6896
6897                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6898                                                 break
6899                                         fi
6900                                 done
6901                         done
6902                 fi
6903         fi
6904
6905         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6906
6907 echo "${as_me:-configure}:6907: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6908
6909 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6910
6911 echo "${as_me:-configure}:6911: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6912
6913 cf_rpath_dst=
6914 for cf_rpath_src in $LDFLAGS
6915 do
6916         case $cf_rpath_src in
6917         (-L*)
6918
6919                 # check if this refers to a directory which we will ignore
6920                 cf_rpath_skip=no
6921                 if test -n "$cf_rpath_list"
6922                 then
6923                         for cf_rpath_item in $cf_rpath_list
6924                         do
6925                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6926                                 then
6927                                         cf_rpath_skip=yes
6928                                         break
6929                                 fi
6930                         done
6931                 fi
6932
6933                 if test "$cf_rpath_skip" = no
6934                 then
6935                         # transform the option
6936                         if test "$LD_RPATH_OPT" = "-R " ; then
6937                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6938                         else
6939                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6940                         fi
6941
6942                         # if we have not already added this, add it now
6943                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6944                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6945                         then
6946                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6947
6948 echo "${as_me:-configure}:6948: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6949
6950                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6951                         fi
6952                 fi
6953                 ;;
6954         esac
6955         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6956 done
6957 LDFLAGS=$cf_rpath_dst
6958
6959 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6960
6961 echo "${as_me:-configure}:6961: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6962
6963 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6964
6965 echo "${as_me:-configure}:6965: testing ...checking LIBS $LIBS ..." 1>&5
6966
6967 cf_rpath_dst=
6968 for cf_rpath_src in $LIBS
6969 do
6970         case $cf_rpath_src in
6971         (-L*)
6972
6973                 # check if this refers to a directory which we will ignore
6974                 cf_rpath_skip=no
6975                 if test -n "$cf_rpath_list"
6976                 then
6977                         for cf_rpath_item in $cf_rpath_list
6978                         do
6979                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6980                                 then
6981                                         cf_rpath_skip=yes
6982                                         break
6983                                 fi
6984                         done
6985                 fi
6986
6987                 if test "$cf_rpath_skip" = no
6988                 then
6989                         # transform the option
6990                         if test "$LD_RPATH_OPT" = "-R " ; then
6991                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6992                         else
6993                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6994                         fi
6995
6996                         # if we have not already added this, add it now
6997                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6998                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6999                         then
7000                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7001
7002 echo "${as_me:-configure}:7002: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7003
7004                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7005                         fi
7006                 fi
7007                 ;;
7008         esac
7009         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7010 done
7011 LIBS=$cf_rpath_dst
7012
7013 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7014
7015 echo "${as_me:-configure}:7015: testing ...checked LIBS $LIBS ..." 1>&5
7016
7017         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7018
7019 echo "${as_me:-configure}:7019: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7020
7021 else
7022         echo "$as_me:7022: result: no" >&5
7023 echo "${ECHO_T}no" >&6
7024 fi
7025
7026 fi
7027
7028 fi
7029
7030 ###############################################################################
7031
7032 ###     use option --with-extra-suffix to append suffix to headers and libraries
7033 echo "$as_me:7033: checking if you wish to append extra suffix to header/library paths" >&5
7034 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7035 EXTRA_SUFFIX=
7036
7037 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7038 if test "${with_extra_suffix+set}" = set; then
7039   withval="$with_extra_suffix"
7040   case x$withval in
7041         (no)
7042                 ;;
7043         (xyes|x)
7044                 EXTRA_SUFFIX=$cf_cv_abi_version
7045                 ;;
7046         (*)
7047                 EXTRA_SUFFIX=$withval
7048                 ;;
7049         esac
7050
7051 fi;
7052 echo "$as_me:7052: result: $EXTRA_SUFFIX" >&5
7053 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7054
7055 ###     use option --disable-overwrite to leave out the link to -lcurses
7056 echo "$as_me:7056: checking if you wish to install ncurses overwriting curses" >&5
7057 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7058
7059 # Check whether --enable-overwrite or --disable-overwrite was given.
7060 if test "${enable_overwrite+set}" = set; then
7061   enableval="$enable_overwrite"
7062   with_overwrite=$enableval
7063 else
7064   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7065 fi;
7066 echo "$as_me:7066: result: $with_overwrite" >&5
7067 echo "${ECHO_T}$with_overwrite" >&6
7068
7069 echo "$as_me:7069: checking if external terminfo-database is used" >&5
7070 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7071
7072 # Check whether --enable-database or --disable-database was given.
7073 if test "${enable_database+set}" = set; then
7074   enableval="$enable_database"
7075   use_database=$enableval
7076 else
7077   use_database=yes
7078 fi;
7079 echo "$as_me:7079: result: $use_database" >&5
7080 echo "${ECHO_T}$use_database" >&6
7081
7082 case $host_os in
7083 (os2*)
7084         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7085         ;;
7086 (*)
7087         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7088         ;;
7089 esac
7090
7091 NCURSES_USE_DATABASE=0
7092 if test "$use_database" != no ; then
7093         NCURSES_USE_DATABASE=1
7094
7095         echo "$as_me:7095: checking which terminfo source-file will be installed" >&5
7096 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7097
7098 # Check whether --with-database or --without-database was given.
7099 if test "${with_database+set}" = set; then
7100   withval="$with_database"
7101   TERMINFO_SRC=$withval
7102 fi;
7103         echo "$as_me:7103: result: $TERMINFO_SRC" >&5
7104 echo "${ECHO_T}$TERMINFO_SRC" >&6
7105
7106         echo "$as_me:7106: checking whether to use hashed database instead of directory/tree" >&5
7107 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7108
7109 # Check whether --with-hashed-db or --without-hashed-db was given.
7110 if test "${with_hashed_db+set}" = set; then
7111   withval="$with_hashed_db"
7112
7113 else
7114   with_hashed_db=no
7115 fi;
7116         echo "$as_me:7116: result: $with_hashed_db" >&5
7117 echo "${ECHO_T}$with_hashed_db" >&6
7118 else
7119         with_hashed_db=no
7120 fi
7121
7122 echo "$as_me:7122: checking for list of fallback descriptions" >&5
7123 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7124
7125 # Check whether --with-fallbacks or --without-fallbacks was given.
7126 if test "${with_fallbacks+set}" = set; then
7127   withval="$with_fallbacks"
7128   with_fallback=$withval
7129 else
7130   with_fallback=
7131 fi;
7132 echo "$as_me:7132: result: $with_fallback" >&5
7133 echo "${ECHO_T}$with_fallback" >&6
7134 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7135
7136 echo "$as_me:7136: checking if you want modern xterm or antique" >&5
7137 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7138
7139 # Check whether --with-xterm-new or --without-xterm-new was given.
7140 if test "${with_xterm_new+set}" = set; then
7141   withval="$with_xterm_new"
7142   with_xterm_new=$withval
7143 else
7144   with_xterm_new=yes
7145 fi;
7146 case $with_xterm_new in
7147 (no) with_xterm_new=xterm-old;;
7148 (*)      with_xterm_new=xterm-new;;
7149 esac
7150 echo "$as_me:7150: result: $with_xterm_new" >&5
7151 echo "${ECHO_T}$with_xterm_new" >&6
7152 WHICH_XTERM=$with_xterm_new
7153
7154 echo "$as_me:7154: checking if xterm backspace sends BS or DEL" >&5
7155 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7156
7157 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7158 if test "${with_xterm_kbs+set}" = set; then
7159   withval="$with_xterm_kbs"
7160   with_xterm_kbs=$withval
7161 else
7162   with_xterm_kbs=BS
7163 fi;
7164 case x$with_xterm_kbs in
7165 (xyes|xno|xBS|xbs|x8)
7166         with_xterm_kbs=BS
7167         ;;
7168 (xDEL|xdel|x127)
7169         with_xterm_kbs=DEL
7170         ;;
7171 (*)
7172         with_xterm_kbs=$withval
7173         ;;
7174 esac
7175 echo "$as_me:7175: result: $with_xterm_kbs" >&5
7176 echo "${ECHO_T}$with_xterm_kbs" >&6
7177 XTERM_KBS=$with_xterm_kbs
7178
7179 MAKE_TERMINFO=
7180 if test "$use_database" = no ; then
7181         TERMINFO="${datadir}/terminfo"
7182         MAKE_TERMINFO="#"
7183 else
7184
7185 echo "$as_me:7185: checking for list of terminfo directories" >&5
7186 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7187
7188 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7189 if test "${with_terminfo_dirs+set}" = set; then
7190   withval="$with_terminfo_dirs"
7191
7192 else
7193   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7194 fi;
7195 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7196 cf_dst_path=
7197 for cf_src_path in $withval
7198 do
7199
7200 if test "x$prefix" != xNONE; then
7201         cf_path_syntax="$prefix"
7202 else
7203         cf_path_syntax="$ac_default_prefix"
7204 fi
7205
7206 case ".$cf_src_path" in
7207 (.\$\(*\)*|.\'*\'*)
7208         ;;
7209 (..|./*|.\\*)
7210         ;;
7211 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7212         ;;
7213 (.\${*prefix}*|.\${*dir}*)
7214         eval cf_src_path="$cf_src_path"
7215         case ".$cf_src_path" in
7216         (.NONE/*)
7217                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7218                 ;;
7219         esac
7220         ;;
7221 (.no|.NONE/*)
7222         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7223         ;;
7224 (*)
7225         { { echo "$as_me:7225: error: expected a pathname, not \"$cf_src_path\"" >&5
7226 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7227    { (exit 1); exit 1; }; }
7228         ;;
7229 esac
7230
7231   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7232   cf_dst_path="${cf_dst_path}${cf_src_path}"
7233 done
7234 IFS="$ac_save_ifs"
7235
7236 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7237 # so we have to check/work around.  We do prefer the result of "eval"...
7238 eval cf_dst_eval="$cf_dst_path"
7239 case "x$cf_dst_eval" in
7240 (xNONE*)
7241         TERMINFO_DIRS=$cf_dst_path
7242         ;;
7243 (*)
7244         TERMINFO_DIRS="$cf_dst_eval"
7245         ;;
7246 esac
7247
7248 echo "$as_me:7248: result: $TERMINFO_DIRS" >&5
7249 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7250 test -n "$TERMINFO_DIRS" &&
7251 cat >>confdefs.h <<EOF
7252 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7253 EOF
7254
7255 echo "$as_me:7255: checking for default terminfo directory" >&5
7256 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7257
7258 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7259 if test "${with_default_terminfo_dir+set}" = set; then
7260   withval="$with_default_terminfo_dir"
7261
7262 else
7263   withval="${TERMINFO:-${datadir}/terminfo}"
7264 fi; if test -n "${datadir}/terminfo" ; then
7265
7266 if test "x$prefix" != xNONE; then
7267         cf_path_syntax="$prefix"
7268 else
7269         cf_path_syntax="$ac_default_prefix"
7270 fi
7271
7272 case ".$withval" in
7273 (.\$\(*\)*|.\'*\'*)
7274         ;;
7275 (..|./*|.\\*)
7276         ;;
7277 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7278         ;;
7279 (.\${*prefix}*|.\${*dir}*)
7280         eval withval="$withval"
7281         case ".$withval" in
7282         (.NONE/*)
7283                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7284                 ;;
7285         esac
7286         ;;
7287 (.no|.NONE/*)
7288         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7289         ;;
7290 (*)
7291         { { echo "$as_me:7291: error: expected a pathname, not \"$withval\"" >&5
7292 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7293    { (exit 1); exit 1; }; }
7294         ;;
7295 esac
7296
7297 fi
7298 eval TERMINFO="$withval"
7299
7300 echo "$as_me:7300: result: $TERMINFO" >&5
7301 echo "${ECHO_T}$TERMINFO" >&6
7302
7303 cat >>confdefs.h <<EOF
7304 #define TERMINFO "$TERMINFO"
7305 EOF
7306
7307 fi
7308
7309 ###     use option --disable-big-core to make tic run on small machines
7310 ###     We need 4Mb, check if we can allocate 50% more than that.
7311 echo "$as_me:7311: checking if big-core option selected" >&5
7312 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7313
7314 # Check whether --enable-big-core or --disable-big-core was given.
7315 if test "${enable_big_core+set}" = set; then
7316   enableval="$enable_big_core"
7317   with_big_core=$enableval
7318 else
7319   if test "$cross_compiling" = yes; then
7320   with_big_core=no
7321 else
7322   cat >conftest.$ac_ext <<_ACEOF
7323 #line 7323 "configure"
7324 #include "confdefs.h"
7325
7326 #include <stdlib.h>
7327 #include <string.h>
7328 int main() {
7329         unsigned long n = 6000000L;
7330         char *s = malloc(n);
7331         if (s != 0)
7332                 s[0] = s[n-1] = 0;
7333         ${cf_cv_main_return:-return}(s == 0);
7334 }
7335 _ACEOF
7336 rm -f conftest$ac_exeext
7337 if { (eval echo "$as_me:7337: \"$ac_link\"") >&5
7338   (eval $ac_link) 2>&5
7339   ac_status=$?
7340   echo "$as_me:7340: \$? = $ac_status" >&5
7341   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7342   { (eval echo "$as_me:7342: \"$ac_try\"") >&5
7343   (eval $ac_try) 2>&5
7344   ac_status=$?
7345   echo "$as_me:7345: \$? = $ac_status" >&5
7346   (exit $ac_status); }; }; then
7347   with_big_core=yes
7348 else
7349   echo "$as_me: program exited with status $ac_status" >&5
7350 echo "$as_me: failed program was:" >&5
7351 cat conftest.$ac_ext >&5
7352 with_big_core=no
7353 fi
7354 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7355 fi
7356 fi;
7357 echo "$as_me:7357: result: $with_big_core" >&5
7358 echo "${ECHO_T}$with_big_core" >&6
7359 test "x$with_big_core" = "xyes" &&
7360 cat >>confdefs.h <<\EOF
7361 #define HAVE_BIG_CORE 1
7362 EOF
7363
7364 ### ISO C only guarantees 512-char strings, we have tables which load faster
7365 ### when constructed using "big" strings.  More than the C compiler, the awk
7366 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7367 echo "$as_me:7367: checking if big-strings option selected" >&5
7368 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7369
7370 # Check whether --enable-big-strings or --disable-big-strings was given.
7371 if test "${enable_big_strings+set}" = set; then
7372   enableval="$enable_big_strings"
7373   with_big_strings=$enableval
7374 else
7375
7376         case x$AWK in
7377         (x)
7378                 eval with_big_strings=no
7379                 ;;
7380         (*)
7381                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7382                         | $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
7383                         eval with_big_strings=yes
7384                 else
7385                         eval with_big_strings=no
7386                 fi
7387                 ;;
7388         esac
7389
7390 fi;
7391 echo "$as_me:7391: result: $with_big_strings" >&5
7392 echo "${ECHO_T}$with_big_strings" >&6
7393
7394 USE_BIG_STRINGS=0
7395 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7396
7397 ###     use option --enable-termcap to compile in the termcap fallback support
7398 echo "$as_me:7398: checking if you want termcap-fallback support" >&5
7399 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7400
7401 # Check whether --enable-termcap or --disable-termcap was given.
7402 if test "${enable_termcap+set}" = set; then
7403   enableval="$enable_termcap"
7404   with_termcap=$enableval
7405 else
7406   with_termcap=no
7407 fi;
7408 echo "$as_me:7408: result: $with_termcap" >&5
7409 echo "${ECHO_T}$with_termcap" >&6
7410
7411 NCURSES_USE_TERMCAP=0
7412 if test "x$with_termcap" != "xyes" ; then
7413         if test "$use_database" = no ; then
7414                 if test -z "$with_fallback" ; then
7415                         { { echo "$as_me:7415: error: You have disabled the database w/o specifying fallbacks" >&5
7416 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7417    { (exit 1); exit 1; }; }
7418                 fi
7419         fi
7420
7421 cat >>confdefs.h <<\EOF
7422 #define PURE_TERMINFO 1
7423 EOF
7424
7425 else
7426
7427         if test "$with_ticlib" != no ; then
7428                 { { echo "$as_me:7428: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7429 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7430    { (exit 1); exit 1; }; }
7431         fi
7432
7433         NCURSES_USE_TERMCAP=1
7434         echo "$as_me:7434: checking for list of termcap files" >&5
7435 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7436
7437 # Check whether --with-termpath or --without-termpath was given.
7438 if test "${with_termpath+set}" = set; then
7439   withval="$with_termpath"
7440
7441 else
7442   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7443 fi;
7444 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7445 cf_dst_path=
7446 for cf_src_path in $withval
7447 do
7448
7449 if test "x$prefix" != xNONE; then
7450         cf_path_syntax="$prefix"
7451 else
7452         cf_path_syntax="$ac_default_prefix"
7453 fi
7454
7455 case ".$cf_src_path" in
7456 (.\$\(*\)*|.\'*\'*)
7457         ;;
7458 (..|./*|.\\*)
7459         ;;
7460 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7461         ;;
7462 (.\${*prefix}*|.\${*dir}*)
7463         eval cf_src_path="$cf_src_path"
7464         case ".$cf_src_path" in
7465         (.NONE/*)
7466                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7467                 ;;
7468         esac
7469         ;;
7470 (.no|.NONE/*)
7471         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7472         ;;
7473 (*)
7474         { { echo "$as_me:7474: error: expected a pathname, not \"$cf_src_path\"" >&5
7475 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7476    { (exit 1); exit 1; }; }
7477         ;;
7478 esac
7479
7480   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7481   cf_dst_path="${cf_dst_path}${cf_src_path}"
7482 done
7483 IFS="$ac_save_ifs"
7484
7485 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7486 # so we have to check/work around.  We do prefer the result of "eval"...
7487 eval cf_dst_eval="$cf_dst_path"
7488 case "x$cf_dst_eval" in
7489 (xNONE*)
7490         TERMPATH=$cf_dst_path
7491         ;;
7492 (*)
7493         TERMPATH="$cf_dst_eval"
7494         ;;
7495 esac
7496
7497         echo "$as_me:7497: result: $TERMPATH" >&5
7498 echo "${ECHO_T}$TERMPATH" >&6
7499         test -n "$TERMPATH" &&
7500 cat >>confdefs.h <<EOF
7501 #define TERMPATH "$TERMPATH"
7502 EOF
7503
7504         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7505         echo "$as_me:7505: checking if fast termcap-loader is needed" >&5
7506 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7507
7508 # Check whether --enable-getcap or --disable-getcap was given.
7509 if test "${enable_getcap+set}" = set; then
7510   enableval="$enable_getcap"
7511   with_getcap=$enableval
7512 else
7513   with_getcap=no
7514 fi;
7515         echo "$as_me:7515: result: $with_getcap" >&5
7516 echo "${ECHO_T}$with_getcap" >&6
7517         test "x$with_getcap" = "xyes" &&
7518 cat >>confdefs.h <<\EOF
7519 #define USE_GETCAP 1
7520 EOF
7521
7522         echo "$as_me:7522: checking if translated termcaps will be cached in ~/.terminfo" >&5
7523 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7524
7525 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7526 if test "${enable_getcap_cache+set}" = set; then
7527   enableval="$enable_getcap_cache"
7528   with_getcap_cache=$enableval
7529 else
7530   with_getcap_cache=no
7531 fi;
7532         echo "$as_me:7532: result: $with_getcap_cache" >&5
7533 echo "${ECHO_T}$with_getcap_cache" >&6
7534         test "x$with_getcap_cache" = "xyes" &&
7535 cat >>confdefs.h <<\EOF
7536 #define USE_GETCAP_CACHE 1
7537 EOF
7538
7539 fi
7540
7541 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7542 echo "$as_me:7542: checking if ~/.terminfo is wanted" >&5
7543 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7544
7545 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7546 if test "${enable_home_terminfo+set}" = set; then
7547   enableval="$enable_home_terminfo"
7548   with_home_terminfo=$enableval
7549 else
7550   with_home_terminfo=yes
7551 fi;
7552 echo "$as_me:7552: result: $with_home_terminfo" >&5
7553 echo "${ECHO_T}$with_home_terminfo" >&6
7554 test "x$with_home_terminfo" = "xyes" &&
7555 cat >>confdefs.h <<\EOF
7556 #define USE_HOME_TERMINFO 1
7557 EOF
7558
7559 echo "$as_me:7559: checking if you want to use restricted environment when running as root" >&5
7560 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7561
7562 # Check whether --enable-root-environ or --disable-root-environ was given.
7563 if test "${enable_root_environ+set}" = set; then
7564   enableval="$enable_root_environ"
7565   with_root_environ=$enableval
7566 else
7567   with_root_environ=yes
7568 fi;
7569 echo "$as_me:7569: result: $with_root_environ" >&5
7570 echo "${ECHO_T}$with_root_environ" >&6
7571 test "x$with_root_environ" = xyes &&
7572 cat >>confdefs.h <<\EOF
7573 #define USE_ROOT_ENVIRON 1
7574 EOF
7575
7576 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7577 ###   to reduce storage requirements for the terminfo database.
7578
7579 for ac_func in \
7580         remove \
7581         unlink
7582 do
7583 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7584 echo "$as_me:7584: checking for $ac_func" >&5
7585 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7586 if eval "test \"\${$as_ac_var+set}\" = set"; then
7587   echo $ECHO_N "(cached) $ECHO_C" >&6
7588 else
7589   cat >conftest.$ac_ext <<_ACEOF
7590 #line 7590 "configure"
7591 #include "confdefs.h"
7592 /* System header to define __stub macros and hopefully few prototypes,
7593     which can conflict with char $ac_func (); below.  */
7594 #include <assert.h>
7595 /* Override any gcc2 internal prototype to avoid an error.  */
7596 #ifdef __cplusplus
7597 extern "C"
7598 #endif
7599 /* We use char because int might match the return type of a gcc2
7600    builtin and then its argument prototype would still apply.  */
7601 char $ac_func ();
7602 char (*f) ();
7603
7604 int
7605 main ()
7606 {
7607 /* The GNU C library defines this for functions which it implements
7608     to always fail with ENOSYS.  Some functions are actually named
7609     something starting with __ and the normal name is an alias.  */
7610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7611 choke me
7612 #else
7613 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7614 #endif
7615
7616   ;
7617   return 0;
7618 }
7619 _ACEOF
7620 rm -f conftest.$ac_objext conftest$ac_exeext
7621 if { (eval echo "$as_me:7621: \"$ac_link\"") >&5
7622   (eval $ac_link) 2>&5
7623   ac_status=$?
7624   echo "$as_me:7624: \$? = $ac_status" >&5
7625   (exit $ac_status); } &&
7626          { ac_try='test -s conftest$ac_exeext'
7627   { (eval echo "$as_me:7627: \"$ac_try\"") >&5
7628   (eval $ac_try) 2>&5
7629   ac_status=$?
7630   echo "$as_me:7630: \$? = $ac_status" >&5
7631   (exit $ac_status); }; }; then
7632   eval "$as_ac_var=yes"
7633 else
7634   echo "$as_me: failed program was:" >&5
7635 cat conftest.$ac_ext >&5
7636 eval "$as_ac_var=no"
7637 fi
7638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7639 fi
7640 echo "$as_me:7640: result: `eval echo '${'$as_ac_var'}'`" >&5
7641 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7642 if test `eval echo '${'$as_ac_var'}'` = yes; then
7643   cat >>confdefs.h <<EOF
7644 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7645 EOF
7646
7647 fi
7648 done
7649
7650 if test "$cross_compiling" = yes ; then
7651
7652 for ac_func in \
7653                 link \
7654                 symlink
7655 do
7656 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7657 echo "$as_me:7657: checking for $ac_func" >&5
7658 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7659 if eval "test \"\${$as_ac_var+set}\" = set"; then
7660   echo $ECHO_N "(cached) $ECHO_C" >&6
7661 else
7662   cat >conftest.$ac_ext <<_ACEOF
7663 #line 7663 "configure"
7664 #include "confdefs.h"
7665 /* System header to define __stub macros and hopefully few prototypes,
7666     which can conflict with char $ac_func (); below.  */
7667 #include <assert.h>
7668 /* Override any gcc2 internal prototype to avoid an error.  */
7669 #ifdef __cplusplus
7670 extern "C"
7671 #endif
7672 /* We use char because int might match the return type of a gcc2
7673    builtin and then its argument prototype would still apply.  */
7674 char $ac_func ();
7675 char (*f) ();
7676
7677 int
7678 main ()
7679 {
7680 /* The GNU C library defines this for functions which it implements
7681     to always fail with ENOSYS.  Some functions are actually named
7682     something starting with __ and the normal name is an alias.  */
7683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7684 choke me
7685 #else
7686 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7687 #endif
7688
7689   ;
7690   return 0;
7691 }
7692 _ACEOF
7693 rm -f conftest.$ac_objext conftest$ac_exeext
7694 if { (eval echo "$as_me:7694: \"$ac_link\"") >&5
7695   (eval $ac_link) 2>&5
7696   ac_status=$?
7697   echo "$as_me:7697: \$? = $ac_status" >&5
7698   (exit $ac_status); } &&
7699          { ac_try='test -s conftest$ac_exeext'
7700   { (eval echo "$as_me:7700: \"$ac_try\"") >&5
7701   (eval $ac_try) 2>&5
7702   ac_status=$?
7703   echo "$as_me:7703: \$? = $ac_status" >&5
7704   (exit $ac_status); }; }; then
7705   eval "$as_ac_var=yes"
7706 else
7707   echo "$as_me: failed program was:" >&5
7708 cat conftest.$ac_ext >&5
7709 eval "$as_ac_var=no"
7710 fi
7711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7712 fi
7713 echo "$as_me:7713: result: `eval echo '${'$as_ac_var'}'`" >&5
7714 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7715 if test `eval echo '${'$as_ac_var'}'` = yes; then
7716   cat >>confdefs.h <<EOF
7717 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7718 EOF
7719
7720 fi
7721 done
7722
7723 else
7724         echo "$as_me:7724: checking if link/symlink functions work" >&5
7725 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7726 if test "${cf_cv_link_funcs+set}" = set; then
7727   echo $ECHO_N "(cached) $ECHO_C" >&6
7728 else
7729
7730                 cf_cv_link_funcs=
7731                 for cf_func in link symlink ; do
7732                         if test "$cross_compiling" = yes; then
7733
7734                         eval 'ac_cv_func_'$cf_func'=error'
7735 else
7736   cat >conftest.$ac_ext <<_ACEOF
7737 #line 7737 "configure"
7738 #include "confdefs.h"
7739
7740 #include <sys/types.h>
7741 #include <sys/stat.h>
7742 #ifdef HAVE_UNISTD_H
7743 #include <unistd.h>
7744 #endif
7745 int main()
7746 {
7747         int fail = 0;
7748         char *src = "config.log";
7749         char *dst = "conftest.chk";
7750         struct stat src_sb;
7751         struct stat dst_sb;
7752
7753         stat(src, &src_sb);
7754         fail = ($cf_func("config.log", "conftest.chk") < 0)
7755             || (stat(dst, &dst_sb) < 0)
7756             || (dst_sb.st_mtime != src_sb.st_mtime);
7757 #ifdef HAVE_UNLINK
7758         unlink(dst);
7759 #else
7760         remove(dst);
7761 #endif
7762         ${cf_cv_main_return:-return} (fail);
7763 }
7764
7765 _ACEOF
7766 rm -f conftest$ac_exeext
7767 if { (eval echo "$as_me:7767: \"$ac_link\"") >&5
7768   (eval $ac_link) 2>&5
7769   ac_status=$?
7770   echo "$as_me:7770: \$? = $ac_status" >&5
7771   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7772   { (eval echo "$as_me:7772: \"$ac_try\"") >&5
7773   (eval $ac_try) 2>&5
7774   ac_status=$?
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit $ac_status); }; }; then
7777
7778                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7779                         eval 'ac_cv_func_'$cf_func'=yes'
7780 else
7781   echo "$as_me: program exited with status $ac_status" >&5
7782 echo "$as_me: failed program was:" >&5
7783 cat conftest.$ac_ext >&5
7784
7785                         eval 'ac_cv_func_'$cf_func'=no'
7786 fi
7787 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7788 fi
7789                 done
7790                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7791
7792 fi
7793 echo "$as_me:7793: result: $cf_cv_link_funcs" >&5
7794 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7795         test "$ac_cv_func_link"    = yes &&
7796 cat >>confdefs.h <<\EOF
7797 #define HAVE_LINK 1
7798 EOF
7799
7800         test "$ac_cv_func_symlink" = yes &&
7801 cat >>confdefs.h <<\EOF
7802 #define HAVE_SYMLINK 1
7803 EOF
7804
7805 fi
7806
7807 with_links=no
7808 with_symlinks=no
7809
7810 # soft links (symbolic links) are useful for some systems where hard links do
7811 # not work, or to make it simpler to copy terminfo trees around.
7812 if test "x$ac_cv_func_symlink" = xyes ; then
7813         echo "$as_me:7813: checking if tic should use symbolic links" >&5
7814 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7815
7816 # Check whether --enable-symlinks or --disable-symlinks was given.
7817 if test "${enable_symlinks+set}" = set; then
7818   enableval="$enable_symlinks"
7819   with_symlinks=$enableval
7820 else
7821   with_symlinks=no
7822 fi;
7823         echo "$as_me:7823: result: $with_symlinks" >&5
7824 echo "${ECHO_T}$with_symlinks" >&6
7825 fi
7826
7827 # If we have hard links and did not choose to use soft links instead, there is
7828 # no reason to make this choice optional - use the hard links.
7829 if test "$with_symlinks" = no ; then
7830         echo "$as_me:7830: checking if tic should use hard links" >&5
7831 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7832         if test "x$ac_cv_func_link" = xyes ; then
7833                 with_links=yes
7834         else
7835                 with_links=no
7836         fi
7837         echo "$as_me:7837: result: $with_links" >&5
7838 echo "${ECHO_T}$with_links" >&6
7839 fi
7840
7841 test "x$with_links" = xyes &&
7842 cat >>confdefs.h <<\EOF
7843 #define USE_LINKS 1
7844 EOF
7845
7846 test "x$with_symlinks" = xyes &&
7847 cat >>confdefs.h <<\EOF
7848 #define USE_SYMLINKS 1
7849 EOF
7850
7851 ###   use option --enable-broken-linker to force on use of broken-linker support
7852 echo "$as_me:7852: checking if you want broken-linker support code" >&5
7853 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7854
7855 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7856 if test "${enable_broken_linker+set}" = set; then
7857   enableval="$enable_broken_linker"
7858   with_broken_linker=$enableval
7859 else
7860   with_broken_linker=${BROKEN_LINKER:-no}
7861 fi;
7862 echo "$as_me:7862: result: $with_broken_linker" >&5
7863 echo "${ECHO_T}$with_broken_linker" >&6
7864
7865 BROKEN_LINKER=0
7866 if test "x$with_broken_linker" = xyes ; then
7867
7868 cat >>confdefs.h <<\EOF
7869 #define BROKEN_LINKER 1
7870 EOF
7871
7872         BROKEN_LINKER=1
7873 elif test "$DFT_LWR_MODEL" = shared ; then
7874         case $cf_cv_system_name in
7875         (cygwin*)
7876
7877 cat >>confdefs.h <<\EOF
7878 #define BROKEN_LINKER 1
7879 EOF
7880
7881                 BROKEN_LINKER=1
7882                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7883
7884 echo "${as_me:-configure}:7884: testing cygwin linker is broken anyway ..." 1>&5
7885
7886                 ;;
7887         esac
7888 fi
7889
7890 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7891 echo "$as_me:7891: checking if tputs should process BSD-style prefix padding" >&5
7892 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7893
7894 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7895 if test "${enable_bsdpad+set}" = set; then
7896   enableval="$enable_bsdpad"
7897   with_bsdpad=$enableval
7898 else
7899   with_bsdpad=no
7900 fi;
7901 echo "$as_me:7901: result: $with_bsdpad" >&5
7902 echo "${ECHO_T}$with_bsdpad" >&6
7903 test "x$with_bsdpad" = xyes &&
7904 cat >>confdefs.h <<\EOF
7905 #define BSD_TPUTS 1
7906 EOF
7907
7908 ###   use option --enable-widec to turn on use of wide-character support
7909 NCURSES_CH_T=chtype
7910 NCURSES_LIBUTF8=0
7911
7912 NEED_WCHAR_H=0
7913 NCURSES_MBSTATE_T=0
7914 NCURSES_WCHAR_T=0
7915 NCURSES_WINT_T=0
7916
7917 # Check to define _XOPEN_SOURCE "automatically"
7918 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7919
7920 cf_XOPEN_SOURCE=500
7921 cf_POSIX_C_SOURCE=199506L
7922 cf_xopen_source=
7923
7924 case $host_os in
7925 (aix[4-7]*)
7926         cf_xopen_source="-D_ALL_SOURCE"
7927         ;;
7928 (msys)
7929         cf_XOPEN_SOURCE=600
7930         ;;
7931 (darwin[0-8].*)
7932         cf_xopen_source="-D_APPLE_C_SOURCE"
7933         ;;
7934 (darwin*)
7935         cf_xopen_source="-D_DARWIN_C_SOURCE"
7936         cf_XOPEN_SOURCE=
7937         ;;
7938 (freebsd*|dragonfly*)
7939         # 5.x headers associate
7940         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7941         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7942         cf_POSIX_C_SOURCE=200112L
7943         cf_XOPEN_SOURCE=600
7944         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7945         ;;
7946 (hpux11*)
7947         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7948         ;;
7949 (hpux*)
7950         cf_xopen_source="-D_HPUX_SOURCE"
7951         ;;
7952 (irix[56].*)
7953         cf_xopen_source="-D_SGI_SOURCE"
7954         cf_XOPEN_SOURCE=
7955         ;;
7956 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
7957
7958 echo "$as_me:7958: checking if we must define _GNU_SOURCE" >&5
7959 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7960 if test "${cf_cv_gnu_source+set}" = set; then
7961   echo $ECHO_N "(cached) $ECHO_C" >&6
7962 else
7963
7964 cat >conftest.$ac_ext <<_ACEOF
7965 #line 7965 "configure"
7966 #include "confdefs.h"
7967 #include <sys/types.h>
7968 int
7969 main ()
7970 {
7971
7972 #ifndef _XOPEN_SOURCE
7973 make an error
7974 #endif
7975   ;
7976   return 0;
7977 }
7978 _ACEOF
7979 rm -f conftest.$ac_objext
7980 if { (eval echo "$as_me:7980: \"$ac_compile\"") >&5
7981   (eval $ac_compile) 2>&5
7982   ac_status=$?
7983   echo "$as_me:7983: \$? = $ac_status" >&5
7984   (exit $ac_status); } &&
7985          { ac_try='test -s conftest.$ac_objext'
7986   { (eval echo "$as_me:7986: \"$ac_try\"") >&5
7987   (eval $ac_try) 2>&5
7988   ac_status=$?
7989   echo "$as_me:7989: \$? = $ac_status" >&5
7990   (exit $ac_status); }; }; then
7991   cf_cv_gnu_source=no
7992 else
7993   echo "$as_me: failed program was:" >&5
7994 cat conftest.$ac_ext >&5
7995 cf_save="$CPPFLAGS"
7996          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7997          cat >conftest.$ac_ext <<_ACEOF
7998 #line 7998 "configure"
7999 #include "confdefs.h"
8000 #include <sys/types.h>
8001 int
8002 main ()
8003 {
8004
8005 #ifdef _XOPEN_SOURCE
8006 make an error
8007 #endif
8008   ;
8009   return 0;
8010 }
8011 _ACEOF
8012 rm -f conftest.$ac_objext
8013 if { (eval echo "$as_me:8013: \"$ac_compile\"") >&5
8014   (eval $ac_compile) 2>&5
8015   ac_status=$?
8016   echo "$as_me:8016: \$? = $ac_status" >&5
8017   (exit $ac_status); } &&
8018          { ac_try='test -s conftest.$ac_objext'
8019   { (eval echo "$as_me:8019: \"$ac_try\"") >&5
8020   (eval $ac_try) 2>&5
8021   ac_status=$?
8022   echo "$as_me:8022: \$? = $ac_status" >&5
8023   (exit $ac_status); }; }; then
8024   cf_cv_gnu_source=no
8025 else
8026   echo "$as_me: failed program was:" >&5
8027 cat conftest.$ac_ext >&5
8028 cf_cv_gnu_source=yes
8029 fi
8030 rm -f conftest.$ac_objext conftest.$ac_ext
8031         CPPFLAGS="$cf_save"
8032
8033 fi
8034 rm -f conftest.$ac_objext conftest.$ac_ext
8035
8036 fi
8037 echo "$as_me:8037: result: $cf_cv_gnu_source" >&5
8038 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8039
8040 if test "$cf_cv_gnu_source" = yes
8041 then
8042 echo "$as_me:8042: checking if we should also define _DEFAULT_SOURCE" >&5
8043 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8044 if test "${cf_cv_default_source+set}" = set; then
8045   echo $ECHO_N "(cached) $ECHO_C" >&6
8046 else
8047
8048 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8049         cat >conftest.$ac_ext <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052 #include <sys/types.h>
8053 int
8054 main ()
8055 {
8056
8057 #ifdef _DEFAULT_SOURCE
8058 make an error
8059 #endif
8060   ;
8061   return 0;
8062 }
8063 _ACEOF
8064 rm -f conftest.$ac_objext
8065 if { (eval echo "$as_me:8065: \"$ac_compile\"") >&5
8066   (eval $ac_compile) 2>&5
8067   ac_status=$?
8068   echo "$as_me:8068: \$? = $ac_status" >&5
8069   (exit $ac_status); } &&
8070          { ac_try='test -s conftest.$ac_objext'
8071   { (eval echo "$as_me:8071: \"$ac_try\"") >&5
8072   (eval $ac_try) 2>&5
8073   ac_status=$?
8074   echo "$as_me:8074: \$? = $ac_status" >&5
8075   (exit $ac_status); }; }; then
8076   cf_cv_default_source=no
8077 else
8078   echo "$as_me: failed program was:" >&5
8079 cat conftest.$ac_ext >&5
8080 cf_cv_default_source=yes
8081 fi
8082 rm -f conftest.$ac_objext conftest.$ac_ext
8083
8084 fi
8085 echo "$as_me:8085: result: $cf_cv_default_source" >&5
8086 echo "${ECHO_T}$cf_cv_default_source" >&6
8087 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8088 fi
8089
8090         ;;
8091 (minix*)
8092         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8093         ;;
8094 (mirbsd*)
8095         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8096         cf_XOPEN_SOURCE=
8097
8098 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8099
8100 cf_save_CFLAGS="$CFLAGS"
8101 cf_save_CPPFLAGS="$CPPFLAGS"
8102
8103 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8104         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8105                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8106
8107 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8108         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8109                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8110
8111 echo "$as_me:8111: checking if we should define _POSIX_C_SOURCE" >&5
8112 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8113 if test "${cf_cv_posix_c_source+set}" = set; then
8114   echo $ECHO_N "(cached) $ECHO_C" >&6
8115 else
8116
8117 echo "${as_me:-configure}:8117: testing if the symbol is already defined go no further ..." 1>&5
8118
8119         cat >conftest.$ac_ext <<_ACEOF
8120 #line 8120 "configure"
8121 #include "confdefs.h"
8122 #include <sys/types.h>
8123 int
8124 main ()
8125 {
8126
8127 #ifndef _POSIX_C_SOURCE
8128 make an error
8129 #endif
8130   ;
8131   return 0;
8132 }
8133 _ACEOF
8134 rm -f conftest.$ac_objext
8135 if { (eval echo "$as_me:8135: \"$ac_compile\"") >&5
8136   (eval $ac_compile) 2>&5
8137   ac_status=$?
8138   echo "$as_me:8138: \$? = $ac_status" >&5
8139   (exit $ac_status); } &&
8140          { ac_try='test -s conftest.$ac_objext'
8141   { (eval echo "$as_me:8141: \"$ac_try\"") >&5
8142   (eval $ac_try) 2>&5
8143   ac_status=$?
8144   echo "$as_me:8144: \$? = $ac_status" >&5
8145   (exit $ac_status); }; }; then
8146   cf_cv_posix_c_source=no
8147 else
8148   echo "$as_me: failed program was:" >&5
8149 cat conftest.$ac_ext >&5
8150 cf_want_posix_source=no
8151          case .$cf_POSIX_C_SOURCE in
8152          (.[12]??*)
8153                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8154                 ;;
8155          (.2)
8156                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8157                 cf_want_posix_source=yes
8158                 ;;
8159          (.*)
8160                 cf_want_posix_source=yes
8161                 ;;
8162          esac
8163          if test "$cf_want_posix_source" = yes ; then
8164                 cat >conftest.$ac_ext <<_ACEOF
8165 #line 8165 "configure"
8166 #include "confdefs.h"
8167 #include <sys/types.h>
8168 int
8169 main ()
8170 {
8171
8172 #ifdef _POSIX_SOURCE
8173 make an error
8174 #endif
8175   ;
8176   return 0;
8177 }
8178 _ACEOF
8179 rm -f conftest.$ac_objext
8180 if { (eval echo "$as_me:8180: \"$ac_compile\"") >&5
8181   (eval $ac_compile) 2>&5
8182   ac_status=$?
8183   echo "$as_me:8183: \$? = $ac_status" >&5
8184   (exit $ac_status); } &&
8185          { ac_try='test -s conftest.$ac_objext'
8186   { (eval echo "$as_me:8186: \"$ac_try\"") >&5
8187   (eval $ac_try) 2>&5
8188   ac_status=$?
8189   echo "$as_me:8189: \$? = $ac_status" >&5
8190   (exit $ac_status); }; }; then
8191   :
8192 else
8193   echo "$as_me: failed program was:" >&5
8194 cat conftest.$ac_ext >&5
8195 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8196 fi
8197 rm -f conftest.$ac_objext conftest.$ac_ext
8198          fi
8199
8200 echo "${as_me:-configure}:8200: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8201
8202          CFLAGS="$cf_trim_CFLAGS"
8203          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8204
8205 echo "${as_me:-configure}:8205: testing if the second compile does not leave our definition intact error ..." 1>&5
8206
8207          cat >conftest.$ac_ext <<_ACEOF
8208 #line 8208 "configure"
8209 #include "confdefs.h"
8210 #include <sys/types.h>
8211 int
8212 main ()
8213 {
8214
8215 #ifndef _POSIX_C_SOURCE
8216 make an error
8217 #endif
8218   ;
8219   return 0;
8220 }
8221 _ACEOF
8222 rm -f conftest.$ac_objext
8223 if { (eval echo "$as_me:8223: \"$ac_compile\"") >&5
8224   (eval $ac_compile) 2>&5
8225   ac_status=$?
8226   echo "$as_me:8226: \$? = $ac_status" >&5
8227   (exit $ac_status); } &&
8228          { ac_try='test -s conftest.$ac_objext'
8229   { (eval echo "$as_me:8229: \"$ac_try\"") >&5
8230   (eval $ac_try) 2>&5
8231   ac_status=$?
8232   echo "$as_me:8232: \$? = $ac_status" >&5
8233   (exit $ac_status); }; }; then
8234   :
8235 else
8236   echo "$as_me: failed program was:" >&5
8237 cat conftest.$ac_ext >&5
8238 cf_cv_posix_c_source=no
8239 fi
8240 rm -f conftest.$ac_objext conftest.$ac_ext
8241          CFLAGS="$cf_save_CFLAGS"
8242          CPPFLAGS="$cf_save_CPPFLAGS"
8243
8244 fi
8245 rm -f conftest.$ac_objext conftest.$ac_ext
8246
8247 fi
8248 echo "$as_me:8248: result: $cf_cv_posix_c_source" >&5
8249 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8250
8251 if test "$cf_cv_posix_c_source" != no ; then
8252         CFLAGS="$cf_trim_CFLAGS"
8253         CPPFLAGS="$cf_trim_CPPFLAGS"
8254
8255 cf_fix_cppflags=no
8256 cf_new_cflags=
8257 cf_new_cppflags=
8258 cf_new_extra_cppflags=
8259
8260 for cf_add_cflags in $cf_cv_posix_c_source
8261 do
8262 case $cf_fix_cppflags in
8263 (no)
8264         case $cf_add_cflags in
8265         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8266                 case $cf_add_cflags in
8267                 (-D*)
8268                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8269
8270                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8271                                 && test -z "${cf_tst_cflags}" \
8272                                 && cf_fix_cppflags=yes
8273
8274                         if test $cf_fix_cppflags = yes ; then
8275                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8276                                 continue
8277                         elif test "${cf_tst_cflags}" = "\"'" ; then
8278                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8279                                 continue
8280                         fi
8281                         ;;
8282                 esac
8283                 case "$CPPFLAGS" in
8284                 (*$cf_add_cflags)
8285                         ;;
8286                 (*)
8287                         case $cf_add_cflags in
8288                         (-D*)
8289                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8290
8291 CPPFLAGS=`echo "$CPPFLAGS" | \
8292         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8293                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8294
8295                                 ;;
8296                         esac
8297                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8298                         ;;
8299                 esac
8300                 ;;
8301         (*)
8302                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8303                 ;;
8304         esac
8305         ;;
8306 (yes)
8307         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8308
8309         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8310
8311         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8312                 && test -z "${cf_tst_cflags}" \
8313                 && cf_fix_cppflags=no
8314         ;;
8315 esac
8316 done
8317
8318 if test -n "$cf_new_cflags" ; then
8319
8320         CFLAGS="$CFLAGS $cf_new_cflags"
8321 fi
8322
8323 if test -n "$cf_new_cppflags" ; then
8324
8325         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8326 fi
8327
8328 if test -n "$cf_new_extra_cppflags" ; then
8329
8330         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8331 fi
8332
8333 fi
8334
8335         ;;
8336 (netbsd*)
8337         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8338         ;;
8339 (openbsd[4-9]*)
8340         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8341         cf_xopen_source="-D_BSD_SOURCE"
8342         cf_XOPEN_SOURCE=600
8343         ;;
8344 (openbsd*)
8345         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8346         ;;
8347 (osf[45]*)
8348         cf_xopen_source="-D_OSF_SOURCE"
8349         ;;
8350 (nto-qnx*)
8351         cf_xopen_source="-D_QNX_SOURCE"
8352         ;;
8353 (sco*)
8354         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8355         ;;
8356 (solaris2.*)
8357         cf_xopen_source="-D__EXTENSIONS__"
8358         cf_cv_xopen_source=broken
8359         ;;
8360 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8361         cf_XOPEN_SOURCE=
8362         cf_POSIX_C_SOURCE=
8363         ;;
8364 (*)
8365
8366 echo "$as_me:8366: checking if we should define _XOPEN_SOURCE" >&5
8367 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8368 if test "${cf_cv_xopen_source+set}" = set; then
8369   echo $ECHO_N "(cached) $ECHO_C" >&6
8370 else
8371
8372         cat >conftest.$ac_ext <<_ACEOF
8373 #line 8373 "configure"
8374 #include "confdefs.h"
8375
8376 #include <stdlib.h>
8377 #include <string.h>
8378 #include <sys/types.h>
8379
8380 int
8381 main ()
8382 {
8383
8384 #ifndef _XOPEN_SOURCE
8385 make an error
8386 #endif
8387   ;
8388   return 0;
8389 }
8390 _ACEOF
8391 rm -f conftest.$ac_objext
8392 if { (eval echo "$as_me:8392: \"$ac_compile\"") >&5
8393   (eval $ac_compile) 2>&5
8394   ac_status=$?
8395   echo "$as_me:8395: \$? = $ac_status" >&5
8396   (exit $ac_status); } &&
8397          { ac_try='test -s conftest.$ac_objext'
8398   { (eval echo "$as_me:8398: \"$ac_try\"") >&5
8399   (eval $ac_try) 2>&5
8400   ac_status=$?
8401   echo "$as_me:8401: \$? = $ac_status" >&5
8402   (exit $ac_status); }; }; then
8403   cf_cv_xopen_source=no
8404 else
8405   echo "$as_me: failed program was:" >&5
8406 cat conftest.$ac_ext >&5
8407 cf_save="$CPPFLAGS"
8408          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8409          cat >conftest.$ac_ext <<_ACEOF
8410 #line 8410 "configure"
8411 #include "confdefs.h"
8412
8413 #include <stdlib.h>
8414 #include <string.h>
8415 #include <sys/types.h>
8416
8417 int
8418 main ()
8419 {
8420
8421 #ifdef _XOPEN_SOURCE
8422 make an error
8423 #endif
8424   ;
8425   return 0;
8426 }
8427 _ACEOF
8428 rm -f conftest.$ac_objext
8429 if { (eval echo "$as_me:8429: \"$ac_compile\"") >&5
8430   (eval $ac_compile) 2>&5
8431   ac_status=$?
8432   echo "$as_me:8432: \$? = $ac_status" >&5
8433   (exit $ac_status); } &&
8434          { ac_try='test -s conftest.$ac_objext'
8435   { (eval echo "$as_me:8435: \"$ac_try\"") >&5
8436   (eval $ac_try) 2>&5
8437   ac_status=$?
8438   echo "$as_me:8438: \$? = $ac_status" >&5
8439   (exit $ac_status); }; }; then
8440   cf_cv_xopen_source=no
8441 else
8442   echo "$as_me: failed program was:" >&5
8443 cat conftest.$ac_ext >&5
8444 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8445 fi
8446 rm -f conftest.$ac_objext conftest.$ac_ext
8447         CPPFLAGS="$cf_save"
8448
8449 fi
8450 rm -f conftest.$ac_objext conftest.$ac_ext
8451
8452 fi
8453 echo "$as_me:8453: result: $cf_cv_xopen_source" >&5
8454 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8455
8456 if test "$cf_cv_xopen_source" != no ; then
8457
8458 CFLAGS=`echo "$CFLAGS" | \
8459         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8460                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8461
8462 CPPFLAGS=`echo "$CPPFLAGS" | \
8463         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8464                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8465
8466         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8467
8468 cf_fix_cppflags=no
8469 cf_new_cflags=
8470 cf_new_cppflags=
8471 cf_new_extra_cppflags=
8472
8473 for cf_add_cflags in $cf_temp_xopen_source
8474 do
8475 case $cf_fix_cppflags in
8476 (no)
8477         case $cf_add_cflags in
8478         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8479                 case $cf_add_cflags in
8480                 (-D*)
8481                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8482
8483                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8484                                 && test -z "${cf_tst_cflags}" \
8485                                 && cf_fix_cppflags=yes
8486
8487                         if test $cf_fix_cppflags = yes ; then
8488                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8489                                 continue
8490                         elif test "${cf_tst_cflags}" = "\"'" ; then
8491                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8492                                 continue
8493                         fi
8494                         ;;
8495                 esac
8496                 case "$CPPFLAGS" in
8497                 (*$cf_add_cflags)
8498                         ;;
8499                 (*)
8500                         case $cf_add_cflags in
8501                         (-D*)
8502                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8503
8504 CPPFLAGS=`echo "$CPPFLAGS" | \
8505         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8506                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8507
8508                                 ;;
8509                         esac
8510                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8511                         ;;
8512                 esac
8513                 ;;
8514         (*)
8515                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8516                 ;;
8517         esac
8518         ;;
8519 (yes)
8520         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8521
8522         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8523
8524         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8525                 && test -z "${cf_tst_cflags}" \
8526                 && cf_fix_cppflags=no
8527         ;;
8528 esac
8529 done
8530
8531 if test -n "$cf_new_cflags" ; then
8532
8533         CFLAGS="$CFLAGS $cf_new_cflags"
8534 fi
8535
8536 if test -n "$cf_new_cppflags" ; then
8537
8538         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8539 fi
8540
8541 if test -n "$cf_new_extra_cppflags" ; then
8542
8543         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8544 fi
8545
8546 fi
8547
8548 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8549
8550 cf_save_CFLAGS="$CFLAGS"
8551 cf_save_CPPFLAGS="$CPPFLAGS"
8552
8553 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8554         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8555                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8556
8557 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8558         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8559                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8560
8561 echo "$as_me:8561: checking if we should define _POSIX_C_SOURCE" >&5
8562 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8563 if test "${cf_cv_posix_c_source+set}" = set; then
8564   echo $ECHO_N "(cached) $ECHO_C" >&6
8565 else
8566
8567 echo "${as_me:-configure}:8567: testing if the symbol is already defined go no further ..." 1>&5
8568
8569         cat >conftest.$ac_ext <<_ACEOF
8570 #line 8570 "configure"
8571 #include "confdefs.h"
8572 #include <sys/types.h>
8573 int
8574 main ()
8575 {
8576
8577 #ifndef _POSIX_C_SOURCE
8578 make an error
8579 #endif
8580   ;
8581   return 0;
8582 }
8583 _ACEOF
8584 rm -f conftest.$ac_objext
8585 if { (eval echo "$as_me:8585: \"$ac_compile\"") >&5
8586   (eval $ac_compile) 2>&5
8587   ac_status=$?
8588   echo "$as_me:8588: \$? = $ac_status" >&5
8589   (exit $ac_status); } &&
8590          { ac_try='test -s conftest.$ac_objext'
8591   { (eval echo "$as_me:8591: \"$ac_try\"") >&5
8592   (eval $ac_try) 2>&5
8593   ac_status=$?
8594   echo "$as_me:8594: \$? = $ac_status" >&5
8595   (exit $ac_status); }; }; then
8596   cf_cv_posix_c_source=no
8597 else
8598   echo "$as_me: failed program was:" >&5
8599 cat conftest.$ac_ext >&5
8600 cf_want_posix_source=no
8601          case .$cf_POSIX_C_SOURCE in
8602          (.[12]??*)
8603                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8604                 ;;
8605          (.2)
8606                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8607                 cf_want_posix_source=yes
8608                 ;;
8609          (.*)
8610                 cf_want_posix_source=yes
8611                 ;;
8612          esac
8613          if test "$cf_want_posix_source" = yes ; then
8614                 cat >conftest.$ac_ext <<_ACEOF
8615 #line 8615 "configure"
8616 #include "confdefs.h"
8617 #include <sys/types.h>
8618 int
8619 main ()
8620 {
8621
8622 #ifdef _POSIX_SOURCE
8623 make an error
8624 #endif
8625   ;
8626   return 0;
8627 }
8628 _ACEOF
8629 rm -f conftest.$ac_objext
8630 if { (eval echo "$as_me:8630: \"$ac_compile\"") >&5
8631   (eval $ac_compile) 2>&5
8632   ac_status=$?
8633   echo "$as_me:8633: \$? = $ac_status" >&5
8634   (exit $ac_status); } &&
8635          { ac_try='test -s conftest.$ac_objext'
8636   { (eval echo "$as_me:8636: \"$ac_try\"") >&5
8637   (eval $ac_try) 2>&5
8638   ac_status=$?
8639   echo "$as_me:8639: \$? = $ac_status" >&5
8640   (exit $ac_status); }; }; then
8641   :
8642 else
8643   echo "$as_me: failed program was:" >&5
8644 cat conftest.$ac_ext >&5
8645 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8646 fi
8647 rm -f conftest.$ac_objext conftest.$ac_ext
8648          fi
8649
8650 echo "${as_me:-configure}:8650: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8651
8652          CFLAGS="$cf_trim_CFLAGS"
8653          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8654
8655 echo "${as_me:-configure}:8655: testing if the second compile does not leave our definition intact error ..." 1>&5
8656
8657          cat >conftest.$ac_ext <<_ACEOF
8658 #line 8658 "configure"
8659 #include "confdefs.h"
8660 #include <sys/types.h>
8661 int
8662 main ()
8663 {
8664
8665 #ifndef _POSIX_C_SOURCE
8666 make an error
8667 #endif
8668   ;
8669   return 0;
8670 }
8671 _ACEOF
8672 rm -f conftest.$ac_objext
8673 if { (eval echo "$as_me:8673: \"$ac_compile\"") >&5
8674   (eval $ac_compile) 2>&5
8675   ac_status=$?
8676   echo "$as_me:8676: \$? = $ac_status" >&5
8677   (exit $ac_status); } &&
8678          { ac_try='test -s conftest.$ac_objext'
8679   { (eval echo "$as_me:8679: \"$ac_try\"") >&5
8680   (eval $ac_try) 2>&5
8681   ac_status=$?
8682   echo "$as_me:8682: \$? = $ac_status" >&5
8683   (exit $ac_status); }; }; then
8684   :
8685 else
8686   echo "$as_me: failed program was:" >&5
8687 cat conftest.$ac_ext >&5
8688 cf_cv_posix_c_source=no
8689 fi
8690 rm -f conftest.$ac_objext conftest.$ac_ext
8691          CFLAGS="$cf_save_CFLAGS"
8692          CPPFLAGS="$cf_save_CPPFLAGS"
8693
8694 fi
8695 rm -f conftest.$ac_objext conftest.$ac_ext
8696
8697 fi
8698 echo "$as_me:8698: result: $cf_cv_posix_c_source" >&5
8699 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8700
8701 if test "$cf_cv_posix_c_source" != no ; then
8702         CFLAGS="$cf_trim_CFLAGS"
8703         CPPFLAGS="$cf_trim_CPPFLAGS"
8704
8705 cf_fix_cppflags=no
8706 cf_new_cflags=
8707 cf_new_cppflags=
8708 cf_new_extra_cppflags=
8709
8710 for cf_add_cflags in $cf_cv_posix_c_source
8711 do
8712 case $cf_fix_cppflags in
8713 (no)
8714         case $cf_add_cflags in
8715         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8716                 case $cf_add_cflags in
8717                 (-D*)
8718                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8719
8720                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8721                                 && test -z "${cf_tst_cflags}" \
8722                                 && cf_fix_cppflags=yes
8723
8724                         if test $cf_fix_cppflags = yes ; then
8725                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8726                                 continue
8727                         elif test "${cf_tst_cflags}" = "\"'" ; then
8728                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8729                                 continue
8730                         fi
8731                         ;;
8732                 esac
8733                 case "$CPPFLAGS" in
8734                 (*$cf_add_cflags)
8735                         ;;
8736                 (*)
8737                         case $cf_add_cflags in
8738                         (-D*)
8739                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8740
8741 CPPFLAGS=`echo "$CPPFLAGS" | \
8742         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8743                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8744
8745                                 ;;
8746                         esac
8747                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8748                         ;;
8749                 esac
8750                 ;;
8751         (*)
8752                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8753                 ;;
8754         esac
8755         ;;
8756 (yes)
8757         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8758
8759         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8760
8761         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8762                 && test -z "${cf_tst_cflags}" \
8763                 && cf_fix_cppflags=no
8764         ;;
8765 esac
8766 done
8767
8768 if test -n "$cf_new_cflags" ; then
8769
8770         CFLAGS="$CFLAGS $cf_new_cflags"
8771 fi
8772
8773 if test -n "$cf_new_cppflags" ; then
8774
8775         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8776 fi
8777
8778 if test -n "$cf_new_extra_cppflags" ; then
8779
8780         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8781 fi
8782
8783 fi
8784
8785         ;;
8786 esac
8787
8788 if test -n "$cf_xopen_source" ; then
8789
8790 cf_fix_cppflags=no
8791 cf_new_cflags=
8792 cf_new_cppflags=
8793 cf_new_extra_cppflags=
8794
8795 for cf_add_cflags in $cf_xopen_source
8796 do
8797 case $cf_fix_cppflags in
8798 (no)
8799         case $cf_add_cflags in
8800         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8801                 case $cf_add_cflags in
8802                 (-D*)
8803                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8804
8805                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8806                                 && test -z "${cf_tst_cflags}" \
8807                                 && cf_fix_cppflags=yes
8808
8809                         if test $cf_fix_cppflags = yes ; then
8810                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8811                                 continue
8812                         elif test "${cf_tst_cflags}" = "\"'" ; then
8813                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8814                                 continue
8815                         fi
8816                         ;;
8817                 esac
8818                 case "$CPPFLAGS" in
8819                 (*$cf_add_cflags)
8820                         ;;
8821                 (*)
8822                         case $cf_add_cflags in
8823                         (-D*)
8824                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8825
8826 CPPFLAGS=`echo "$CPPFLAGS" | \
8827         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8828                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8829
8830                                 ;;
8831                         esac
8832                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8833                         ;;
8834                 esac
8835                 ;;
8836         (*)
8837                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8838                 ;;
8839         esac
8840         ;;
8841 (yes)
8842         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8843
8844         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8845
8846         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8847                 && test -z "${cf_tst_cflags}" \
8848                 && cf_fix_cppflags=no
8849         ;;
8850 esac
8851 done
8852
8853 if test -n "$cf_new_cflags" ; then
8854         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8855
8856 echo "${as_me:-configure}:8856: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8857
8858         CFLAGS="$CFLAGS $cf_new_cflags"
8859 fi
8860
8861 if test -n "$cf_new_cppflags" ; then
8862         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8863
8864 echo "${as_me:-configure}:8864: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8865
8866         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8867 fi
8868
8869 if test -n "$cf_new_extra_cppflags" ; then
8870         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8871
8872 echo "${as_me:-configure}:8872: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8873
8874         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8875 fi
8876
8877 fi
8878
8879 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8880         echo "$as_me:8880: checking if _XOPEN_SOURCE really is set" >&5
8881 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8882         cat >conftest.$ac_ext <<_ACEOF
8883 #line 8883 "configure"
8884 #include "confdefs.h"
8885 #include <stdlib.h>
8886 int
8887 main ()
8888 {
8889
8890 #ifndef _XOPEN_SOURCE
8891 make an error
8892 #endif
8893   ;
8894   return 0;
8895 }
8896 _ACEOF
8897 rm -f conftest.$ac_objext
8898 if { (eval echo "$as_me:8898: \"$ac_compile\"") >&5
8899   (eval $ac_compile) 2>&5
8900   ac_status=$?
8901   echo "$as_me:8901: \$? = $ac_status" >&5
8902   (exit $ac_status); } &&
8903          { ac_try='test -s conftest.$ac_objext'
8904   { (eval echo "$as_me:8904: \"$ac_try\"") >&5
8905   (eval $ac_try) 2>&5
8906   ac_status=$?
8907   echo "$as_me:8907: \$? = $ac_status" >&5
8908   (exit $ac_status); }; }; then
8909   cf_XOPEN_SOURCE_set=yes
8910 else
8911   echo "$as_me: failed program was:" >&5
8912 cat conftest.$ac_ext >&5
8913 cf_XOPEN_SOURCE_set=no
8914 fi
8915 rm -f conftest.$ac_objext conftest.$ac_ext
8916         echo "$as_me:8916: result: $cf_XOPEN_SOURCE_set" >&5
8917 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8918         if test $cf_XOPEN_SOURCE_set = yes
8919         then
8920                 cat >conftest.$ac_ext <<_ACEOF
8921 #line 8921 "configure"
8922 #include "confdefs.h"
8923 #include <stdlib.h>
8924 int
8925 main ()
8926 {
8927
8928 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8929 make an error
8930 #endif
8931   ;
8932   return 0;
8933 }
8934 _ACEOF
8935 rm -f conftest.$ac_objext
8936 if { (eval echo "$as_me:8936: \"$ac_compile\"") >&5
8937   (eval $ac_compile) 2>&5
8938   ac_status=$?
8939   echo "$as_me:8939: \$? = $ac_status" >&5
8940   (exit $ac_status); } &&
8941          { ac_try='test -s conftest.$ac_objext'
8942   { (eval echo "$as_me:8942: \"$ac_try\"") >&5
8943   (eval $ac_try) 2>&5
8944   ac_status=$?
8945   echo "$as_me:8945: \$? = $ac_status" >&5
8946   (exit $ac_status); }; }; then
8947   cf_XOPEN_SOURCE_set_ok=yes
8948 else
8949   echo "$as_me: failed program was:" >&5
8950 cat conftest.$ac_ext >&5
8951 cf_XOPEN_SOURCE_set_ok=no
8952 fi
8953 rm -f conftest.$ac_objext conftest.$ac_ext
8954                 if test $cf_XOPEN_SOURCE_set_ok = no
8955                 then
8956                         { echo "$as_me:8956: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8957 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8958                 fi
8959         else
8960
8961 echo "$as_me:8961: checking if we should define _XOPEN_SOURCE" >&5
8962 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8963 if test "${cf_cv_xopen_source+set}" = set; then
8964   echo $ECHO_N "(cached) $ECHO_C" >&6
8965 else
8966
8967         cat >conftest.$ac_ext <<_ACEOF
8968 #line 8968 "configure"
8969 #include "confdefs.h"
8970
8971 #include <stdlib.h>
8972 #include <string.h>
8973 #include <sys/types.h>
8974
8975 int
8976 main ()
8977 {
8978
8979 #ifndef _XOPEN_SOURCE
8980 make an error
8981 #endif
8982   ;
8983   return 0;
8984 }
8985 _ACEOF
8986 rm -f conftest.$ac_objext
8987 if { (eval echo "$as_me:8987: \"$ac_compile\"") >&5
8988   (eval $ac_compile) 2>&5
8989   ac_status=$?
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); } &&
8992          { ac_try='test -s conftest.$ac_objext'
8993   { (eval echo "$as_me:8993: \"$ac_try\"") >&5
8994   (eval $ac_try) 2>&5
8995   ac_status=$?
8996   echo "$as_me:8996: \$? = $ac_status" >&5
8997   (exit $ac_status); }; }; then
8998   cf_cv_xopen_source=no
8999 else
9000   echo "$as_me: failed program was:" >&5
9001 cat conftest.$ac_ext >&5
9002 cf_save="$CPPFLAGS"
9003          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9004          cat >conftest.$ac_ext <<_ACEOF
9005 #line 9005 "configure"
9006 #include "confdefs.h"
9007
9008 #include <stdlib.h>
9009 #include <string.h>
9010 #include <sys/types.h>
9011
9012 int
9013 main ()
9014 {
9015
9016 #ifdef _XOPEN_SOURCE
9017 make an error
9018 #endif
9019   ;
9020   return 0;
9021 }
9022 _ACEOF
9023 rm -f conftest.$ac_objext
9024 if { (eval echo "$as_me:9024: \"$ac_compile\"") >&5
9025   (eval $ac_compile) 2>&5
9026   ac_status=$?
9027   echo "$as_me:9027: \$? = $ac_status" >&5
9028   (exit $ac_status); } &&
9029          { ac_try='test -s conftest.$ac_objext'
9030   { (eval echo "$as_me:9030: \"$ac_try\"") >&5
9031   (eval $ac_try) 2>&5
9032   ac_status=$?
9033   echo "$as_me:9033: \$? = $ac_status" >&5
9034   (exit $ac_status); }; }; then
9035   cf_cv_xopen_source=no
9036 else
9037   echo "$as_me: failed program was:" >&5
9038 cat conftest.$ac_ext >&5
9039 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9040 fi
9041 rm -f conftest.$ac_objext conftest.$ac_ext
9042         CPPFLAGS="$cf_save"
9043
9044 fi
9045 rm -f conftest.$ac_objext conftest.$ac_ext
9046
9047 fi
9048 echo "$as_me:9048: result: $cf_cv_xopen_source" >&5
9049 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9050
9051 if test "$cf_cv_xopen_source" != no ; then
9052
9053 CFLAGS=`echo "$CFLAGS" | \
9054         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9055                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9056
9057 CPPFLAGS=`echo "$CPPFLAGS" | \
9058         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9059                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9060
9061         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9062
9063 cf_fix_cppflags=no
9064 cf_new_cflags=
9065 cf_new_cppflags=
9066 cf_new_extra_cppflags=
9067
9068 for cf_add_cflags in $cf_temp_xopen_source
9069 do
9070 case $cf_fix_cppflags in
9071 (no)
9072         case $cf_add_cflags in
9073         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9074                 case $cf_add_cflags in
9075                 (-D*)
9076                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9077
9078                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9079                                 && test -z "${cf_tst_cflags}" \
9080                                 && cf_fix_cppflags=yes
9081
9082                         if test $cf_fix_cppflags = yes ; then
9083                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9084                                 continue
9085                         elif test "${cf_tst_cflags}" = "\"'" ; then
9086                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9087                                 continue
9088                         fi
9089                         ;;
9090                 esac
9091                 case "$CPPFLAGS" in
9092                 (*$cf_add_cflags)
9093                         ;;
9094                 (*)
9095                         case $cf_add_cflags in
9096                         (-D*)
9097                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9098
9099 CPPFLAGS=`echo "$CPPFLAGS" | \
9100         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9101                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9102
9103                                 ;;
9104                         esac
9105                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9106                         ;;
9107                 esac
9108                 ;;
9109         (*)
9110                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9111                 ;;
9112         esac
9113         ;;
9114 (yes)
9115         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9116
9117         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9118
9119         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9120                 && test -z "${cf_tst_cflags}" \
9121                 && cf_fix_cppflags=no
9122         ;;
9123 esac
9124 done
9125
9126 if test -n "$cf_new_cflags" ; then
9127
9128         CFLAGS="$CFLAGS $cf_new_cflags"
9129 fi
9130
9131 if test -n "$cf_new_cppflags" ; then
9132
9133         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9134 fi
9135
9136 if test -n "$cf_new_extra_cppflags" ; then
9137
9138         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9139 fi
9140
9141 fi
9142
9143         fi
9144 fi
9145
9146 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9147
9148 # Work around breakage on OS X
9149
9150 echo "$as_me:9150: checking if SIGWINCH is defined" >&5
9151 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9152 if test "${cf_cv_define_sigwinch+set}" = set; then
9153   echo $ECHO_N "(cached) $ECHO_C" >&6
9154 else
9155
9156         cat >conftest.$ac_ext <<_ACEOF
9157 #line 9157 "configure"
9158 #include "confdefs.h"
9159
9160 #include <sys/types.h>
9161 #include <sys/signal.h>
9162
9163 int
9164 main ()
9165 {
9166 int x = SIGWINCH
9167   ;
9168   return 0;
9169 }
9170 _ACEOF
9171 rm -f conftest.$ac_objext
9172 if { (eval echo "$as_me:9172: \"$ac_compile\"") >&5
9173   (eval $ac_compile) 2>&5
9174   ac_status=$?
9175   echo "$as_me:9175: \$? = $ac_status" >&5
9176   (exit $ac_status); } &&
9177          { ac_try='test -s conftest.$ac_objext'
9178   { (eval echo "$as_me:9178: \"$ac_try\"") >&5
9179   (eval $ac_try) 2>&5
9180   ac_status=$?
9181   echo "$as_me:9181: \$? = $ac_status" >&5
9182   (exit $ac_status); }; }; then
9183   cf_cv_define_sigwinch=yes
9184 else
9185   echo "$as_me: failed program was:" >&5
9186 cat conftest.$ac_ext >&5
9187 cat >conftest.$ac_ext <<_ACEOF
9188 #line 9188 "configure"
9189 #include "confdefs.h"
9190
9191 #undef _XOPEN_SOURCE
9192 #undef _POSIX_SOURCE
9193 #undef _POSIX_C_SOURCE
9194 #include <sys/types.h>
9195 #include <sys/signal.h>
9196
9197 int
9198 main ()
9199 {
9200 int x = SIGWINCH
9201   ;
9202   return 0;
9203 }
9204 _ACEOF
9205 rm -f conftest.$ac_objext
9206 if { (eval echo "$as_me:9206: \"$ac_compile\"") >&5
9207   (eval $ac_compile) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); } &&
9211          { ac_try='test -s conftest.$ac_objext'
9212   { (eval echo "$as_me:9212: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217   cf_cv_define_sigwinch=maybe
9218 else
9219   echo "$as_me: failed program was:" >&5
9220 cat conftest.$ac_ext >&5
9221 cf_cv_define_sigwinch=no
9222 fi
9223 rm -f conftest.$ac_objext conftest.$ac_ext
9224
9225 fi
9226 rm -f conftest.$ac_objext conftest.$ac_ext
9227
9228 fi
9229 echo "$as_me:9229: result: $cf_cv_define_sigwinch" >&5
9230 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9231
9232 if test "$cf_cv_define_sigwinch" = maybe ; then
9233 echo "$as_me:9233: checking for actual SIGWINCH definition" >&5
9234 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9235 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9236   echo $ECHO_N "(cached) $ECHO_C" >&6
9237 else
9238
9239 cf_cv_fixup_sigwinch=unknown
9240 cf_sigwinch=32
9241 while test $cf_sigwinch != 1
9242 do
9243         cat >conftest.$ac_ext <<_ACEOF
9244 #line 9244 "configure"
9245 #include "confdefs.h"
9246
9247 #undef _XOPEN_SOURCE
9248 #undef _POSIX_SOURCE
9249 #undef _POSIX_C_SOURCE
9250 #include <sys/types.h>
9251 #include <sys/signal.h>
9252
9253 int
9254 main ()
9255 {
9256
9257 #if SIGWINCH != $cf_sigwinch
9258 make an error
9259 #endif
9260 int x = SIGWINCH
9261   ;
9262   return 0;
9263 }
9264 _ACEOF
9265 rm -f conftest.$ac_objext
9266 if { (eval echo "$as_me:9266: \"$ac_compile\"") >&5
9267   (eval $ac_compile) 2>&5
9268   ac_status=$?
9269   echo "$as_me:9269: \$? = $ac_status" >&5
9270   (exit $ac_status); } &&
9271          { ac_try='test -s conftest.$ac_objext'
9272   { (eval echo "$as_me:9272: \"$ac_try\"") >&5
9273   (eval $ac_try) 2>&5
9274   ac_status=$?
9275   echo "$as_me:9275: \$? = $ac_status" >&5
9276   (exit $ac_status); }; }; then
9277   cf_cv_fixup_sigwinch=$cf_sigwinch
9278          break
9279 else
9280   echo "$as_me: failed program was:" >&5
9281 cat conftest.$ac_ext >&5
9282 fi
9283 rm -f conftest.$ac_objext conftest.$ac_ext
9284
9285 cf_sigwinch=`expr $cf_sigwinch - 1`
9286 done
9287
9288 fi
9289 echo "$as_me:9289: result: $cf_cv_fixup_sigwinch" >&5
9290 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9291
9292         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9293                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9294         fi
9295 fi
9296
9297 # Checks for CODESET support.
9298
9299 echo "$as_me:9299: checking for nl_langinfo and CODESET" >&5
9300 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9301 if test "${am_cv_langinfo_codeset+set}" = set; then
9302   echo $ECHO_N "(cached) $ECHO_C" >&6
9303 else
9304   cat >conftest.$ac_ext <<_ACEOF
9305 #line 9305 "configure"
9306 #include "confdefs.h"
9307 #include <langinfo.h>
9308 int
9309 main ()
9310 {
9311 char* cs = nl_langinfo(CODESET);
9312   ;
9313   return 0;
9314 }
9315 _ACEOF
9316 rm -f conftest.$ac_objext conftest$ac_exeext
9317 if { (eval echo "$as_me:9317: \"$ac_link\"") >&5
9318   (eval $ac_link) 2>&5
9319   ac_status=$?
9320   echo "$as_me:9320: \$? = $ac_status" >&5
9321   (exit $ac_status); } &&
9322          { ac_try='test -s conftest$ac_exeext'
9323   { (eval echo "$as_me:9323: \"$ac_try\"") >&5
9324   (eval $ac_try) 2>&5
9325   ac_status=$?
9326   echo "$as_me:9326: \$? = $ac_status" >&5
9327   (exit $ac_status); }; }; then
9328   am_cv_langinfo_codeset=yes
9329 else
9330   echo "$as_me: failed program was:" >&5
9331 cat conftest.$ac_ext >&5
9332 am_cv_langinfo_codeset=no
9333 fi
9334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9335
9336 fi
9337 echo "$as_me:9337: result: $am_cv_langinfo_codeset" >&5
9338 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9339         if test $am_cv_langinfo_codeset = yes; then
9340
9341 cat >>confdefs.h <<\EOF
9342 #define HAVE_LANGINFO_CODESET 1
9343 EOF
9344
9345         fi
9346
9347 # use these variables to work around a defect in gcc's fixincludes.
9348 NCURSES_OK_WCHAR_T=
9349 NCURSES_OK_WINT_T=
9350
9351 echo "$as_me:9351: checking if you want wide-character code" >&5
9352 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9353
9354 # Check whether --enable-widec or --disable-widec was given.
9355 if test "${enable_widec+set}" = set; then
9356   enableval="$enable_widec"
9357   with_widec=$enableval
9358 else
9359   with_widec=no
9360 fi;
9361 echo "$as_me:9361: result: $with_widec" >&5
9362 echo "${ECHO_T}$with_widec" >&6
9363
9364 NCURSES_WCWIDTH_GRAPHICS=1
9365
9366 if test "x$with_widec" = xyes ; then
9367         if test "x$disable_lib_suffixes" = xno ; then
9368                 LIB_SUFFIX="w${LIB_SUFFIX}"
9369         fi
9370
9371 cat >>confdefs.h <<\EOF
9372 #define USE_WIDEC_SUPPORT 1
9373 EOF
9374
9375 cat >>confdefs.h <<\EOF
9376 #define NCURSES_WIDECHAR 1
9377 EOF
9378
9379 echo "$as_me:9379: checking if wchar.h can be used as is" >&5
9380 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9381 if test "${cf_cv_wchar_h_okay+set}" = set; then
9382   echo $ECHO_N "(cached) $ECHO_C" >&6
9383 else
9384
9385 cat >conftest.$ac_ext <<_ACEOF
9386 #line 9386 "configure"
9387 #include "confdefs.h"
9388
9389 #include <stdlib.h>
9390 #include <wchar.h>
9391
9392 int
9393 main ()
9394 {
9395
9396         wint_t foo = 0;
9397         int bar = iswpunct(foo)
9398   ;
9399   return 0;
9400 }
9401 _ACEOF
9402 rm -f conftest.$ac_objext
9403 if { (eval echo "$as_me:9403: \"$ac_compile\"") >&5
9404   (eval $ac_compile) 2>&5
9405   ac_status=$?
9406   echo "$as_me:9406: \$? = $ac_status" >&5
9407   (exit $ac_status); } &&
9408          { ac_try='test -s conftest.$ac_objext'
9409   { (eval echo "$as_me:9409: \"$ac_try\"") >&5
9410   (eval $ac_try) 2>&5
9411   ac_status=$?
9412   echo "$as_me:9412: \$? = $ac_status" >&5
9413   (exit $ac_status); }; }; then
9414   cf_cv_wchar_h_okay=yes
9415 else
9416   echo "$as_me: failed program was:" >&5
9417 cat conftest.$ac_ext >&5
9418 cf_cv_wchar_h_okay=no
9419 fi
9420 rm -f conftest.$ac_objext conftest.$ac_ext
9421 fi
9422 echo "$as_me:9422: result: $cf_cv_wchar_h_okay" >&5
9423 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9424
9425 if test $cf_cv_wchar_h_okay = no
9426 then
9427
9428 echo "$as_me:9428: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9429 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9430 cat >conftest.$ac_ext <<_ACEOF
9431 #line 9431 "configure"
9432 #include "confdefs.h"
9433 #include <sys/types.h>
9434
9435 int
9436 main ()
9437 {
9438
9439 #ifndef _XOPEN_SOURCE_EXTENDED
9440 make an error
9441 #endif
9442   ;
9443   return 0;
9444 }
9445 _ACEOF
9446 rm -f conftest.$ac_objext
9447 if { (eval echo "$as_me:9447: \"$ac_compile\"") >&5
9448   (eval $ac_compile) 2>&5
9449   ac_status=$?
9450   echo "$as_me:9450: \$? = $ac_status" >&5
9451   (exit $ac_status); } &&
9452          { ac_try='test -s conftest.$ac_objext'
9453   { (eval echo "$as_me:9453: \"$ac_try\"") >&5
9454   (eval $ac_try) 2>&5
9455   ac_status=$?
9456   echo "$as_me:9456: \$? = $ac_status" >&5
9457   (exit $ac_status); }; }; then
9458   cf_result=no
9459 else
9460   echo "$as_me: failed program was:" >&5
9461 cat conftest.$ac_ext >&5
9462 cf_result=yes
9463 fi
9464 rm -f conftest.$ac_objext conftest.$ac_ext
9465 echo "$as_me:9465: result: $cf_result" >&5
9466 echo "${ECHO_T}$cf_result" >&6
9467
9468 if test "$cf_result" = yes ; then
9469         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9470 elif test "x" != "x" ; then
9471         echo "$as_me:9471: checking checking for compatible value versus " >&5
9472 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9473         cat >conftest.$ac_ext <<_ACEOF
9474 #line 9474 "configure"
9475 #include "confdefs.h"
9476 #include <sys/types.h>
9477
9478 int
9479 main ()
9480 {
9481
9482 #if _XOPEN_SOURCE_EXTENDED- < 0
9483 make an error
9484 #endif
9485   ;
9486   return 0;
9487 }
9488 _ACEOF
9489 rm -f conftest.$ac_objext
9490 if { (eval echo "$as_me:9490: \"$ac_compile\"") >&5
9491   (eval $ac_compile) 2>&5
9492   ac_status=$?
9493   echo "$as_me:9493: \$? = $ac_status" >&5
9494   (exit $ac_status); } &&
9495          { ac_try='test -s conftest.$ac_objext'
9496   { (eval echo "$as_me:9496: \"$ac_try\"") >&5
9497   (eval $ac_try) 2>&5
9498   ac_status=$?
9499   echo "$as_me:9499: \$? = $ac_status" >&5
9500   (exit $ac_status); }; }; then
9501   cf_result=yes
9502 else
9503   echo "$as_me: failed program was:" >&5
9504 cat conftest.$ac_ext >&5
9505 cf_result=no
9506 fi
9507 rm -f conftest.$ac_objext conftest.$ac_ext
9508         echo "$as_me:9508: result: $cf_result" >&5
9509 echo "${ECHO_T}$cf_result" >&6
9510         if test "$cf_result" = no ; then
9511                 # perhaps we can override it - try...
9512                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9513         fi
9514 fi
9515
9516 fi
9517
9518 echo "$as_me:9518: checking if wcwidth agrees graphics are single-width" >&5
9519 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9520 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9521   echo $ECHO_N "(cached) $ECHO_C" >&6
9522 else
9523
9524 cat >conftest.in <<CF_EOF
9525 -       VT100 symbols
9526 0x250c  upper left corner
9527 0x2514  lower left corner
9528 0x2510  upper right corner
9529 0x2518  lower right corner
9530 0x251c  tee pointing left
9531 0x2524  tee pointing right
9532 0x2534  tee pointing up
9533 0x252c  tee pointing down
9534 0x2500  horizontal line
9535 0x2502  vertical line
9536 0x253c  large plus or crossover
9537 0x23ba  scan line 1
9538 0x23bd  scan line 9
9539 0x25c6  diamond
9540 0x2592  checker board (stipple)
9541 0x00b0  degree symbol
9542 0x00b1  plus/minus
9543 0x00b7  bullet
9544 -       Teletype 5410v1 symbols
9545 0x2190  arrow pointing left
9546 0x2192  arrow pointing right
9547 0x2193  arrow pointing down
9548 0x2191  arrow pointing up
9549 0x2592  board of squares
9550 0x2603  lantern symbol
9551 0x25ae  solid square block
9552 -       these defaults were invented for ncurses
9553 0x23bb  scan line 3
9554 0x23bc  scan line 7
9555 0x2264  less-than-or-equal-to
9556 0x2265  greater-than-or-equal-to
9557 0x03c0  greek pi
9558 0x2260  not-equal
9559 0x00a3  pound-sterling symbol
9560 -       thick-line-drawing
9561 0x250f  upper left corner
9562 0x2517  lower left corner
9563 0x2513  upper right corner
9564 0x251b  lower right corner
9565 0x2523  tee pointing left
9566 0x252b  tee pointing right
9567 0x253b  tee pointing up
9568 0x2533  tee pointing down
9569 0x2501  horizontal line
9570 0x2503  vertical line
9571 0x254b  large plus or crossover
9572 -       double-line-drawing
9573 0x2554  upper left corner
9574 0x255a  lower left corner
9575 0x2557  upper right corner
9576 0x255d  lower right corner
9577 0x2563  tee pointing left
9578 0x2560  tee pointing right
9579 0x2569  tee pointing up
9580 0x2566  tee pointing down
9581 0x2550  horizontal line
9582 0x2551  vertical line
9583 0x256c  large plus or crossover
9584 CF_EOF
9585 if test "$cross_compiling" = yes; then
9586   cf_cv_wcwidth_graphics=unknown
9587 else
9588   cat >conftest.$ac_ext <<_ACEOF
9589 #line 9589 "configure"
9590 #include "confdefs.h"
9591
9592 #include <locale.h>
9593 #include <stdio.h>
9594 #include <wchar.h>
9595
9596 #define MY_LEN 80
9597
9598 int
9599 main(void)
9600 {
9601         FILE *fp;
9602         int value;
9603         char buffer[MY_LEN + 1];
9604         char notes[MY_LEN + 1];
9605         int totals = 0;
9606         int passed = 0;
9607
9608         if (setlocale(LC_ALL, "en_US.UTF8") ||
9609                 setlocale(LC_ALL, "en_US.UTF-8") ||
9610                 setlocale(LC_ALL, "en_US.utf8") ||
9611                 setlocale(LC_ALL, "en_US.utf-8")) {
9612                 if ((fp = fopen("conftest.in", "r")) != 0) {
9613                         while (fgets(buffer, MY_LEN, fp) != 0) {
9614                                 if (*buffer == '-') {
9615                                         fprintf(stderr, "\t%s", buffer);
9616                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9617                                         ++totals;
9618                                         if (wcwidth(value) == 1)
9619                                                 ++passed;
9620                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9621                                 } else {
9622                                         fprintf(stderr, "?\t%s", buffer);
9623                                 }
9624                         }
9625                 }
9626         }
9627         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9628         return (totals == passed) ? 0 : 1;
9629 }
9630
9631 _ACEOF
9632 rm -f conftest$ac_exeext
9633 if { (eval echo "$as_me:9633: \"$ac_link\"") >&5
9634   (eval $ac_link) 2>&5
9635   ac_status=$?
9636   echo "$as_me:9636: \$? = $ac_status" >&5
9637   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9638   { (eval echo "$as_me:9638: \"$ac_try\"") >&5
9639   (eval $ac_try) 2>&5
9640   ac_status=$?
9641   echo "$as_me:9641: \$? = $ac_status" >&5
9642   (exit $ac_status); }; }; then
9643   cf_cv_wcwidth_graphics=yes
9644 else
9645   echo "$as_me: program exited with status $ac_status" >&5
9646 echo "$as_me: failed program was:" >&5
9647 cat conftest.$ac_ext >&5
9648 cf_cv_wcwidth_graphics=no
9649 fi
9650 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9651 fi
9652
9653 fi
9654 echo "$as_me:9654: result: $cf_cv_wcwidth_graphics" >&5
9655 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9656
9657         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9658
9659         # with_overwrite=no
9660         NCURSES_CH_T=cchar_t
9661
9662 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9663 do
9664 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9665 echo "$as_me:9665: checking for $ac_func" >&5
9666 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9667 if eval "test \"\${$as_ac_var+set}\" = set"; then
9668   echo $ECHO_N "(cached) $ECHO_C" >&6
9669 else
9670   cat >conftest.$ac_ext <<_ACEOF
9671 #line 9671 "configure"
9672 #include "confdefs.h"
9673 /* System header to define __stub macros and hopefully few prototypes,
9674     which can conflict with char $ac_func (); below.  */
9675 #include <assert.h>
9676 /* Override any gcc2 internal prototype to avoid an error.  */
9677 #ifdef __cplusplus
9678 extern "C"
9679 #endif
9680 /* We use char because int might match the return type of a gcc2
9681    builtin and then its argument prototype would still apply.  */
9682 char $ac_func ();
9683 char (*f) ();
9684
9685 int
9686 main ()
9687 {
9688 /* The GNU C library defines this for functions which it implements
9689     to always fail with ENOSYS.  Some functions are actually named
9690     something starting with __ and the normal name is an alias.  */
9691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9692 choke me
9693 #else
9694 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9695 #endif
9696
9697   ;
9698   return 0;
9699 }
9700 _ACEOF
9701 rm -f conftest.$ac_objext conftest$ac_exeext
9702 if { (eval echo "$as_me:9702: \"$ac_link\"") >&5
9703   (eval $ac_link) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit $ac_status); } &&
9707          { ac_try='test -s conftest$ac_exeext'
9708   { (eval echo "$as_me:9708: \"$ac_try\"") >&5
9709   (eval $ac_try) 2>&5
9710   ac_status=$?
9711   echo "$as_me:9711: \$? = $ac_status" >&5
9712   (exit $ac_status); }; }; then
9713   eval "$as_ac_var=yes"
9714 else
9715   echo "$as_me: failed program was:" >&5
9716 cat conftest.$ac_ext >&5
9717 eval "$as_ac_var=no"
9718 fi
9719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9720 fi
9721 echo "$as_me:9721: result: `eval echo '${'$as_ac_var'}'`" >&5
9722 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9723 if test `eval echo '${'$as_ac_var'}'` = yes; then
9724   cat >>confdefs.h <<EOF
9725 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9726 EOF
9727
9728 fi
9729 done
9730
9731         if test "x$ac_cv_func_putwc" != xyes ; then
9732
9733 echo "$as_me:9733: checking for multibyte character support" >&5
9734 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9735 if test "${cf_cv_utf8_lib+set}" = set; then
9736   echo $ECHO_N "(cached) $ECHO_C" >&6
9737 else
9738
9739         cf_save_LIBS="$LIBS"
9740         cat >conftest.$ac_ext <<_ACEOF
9741 #line 9741 "configure"
9742 #include "confdefs.h"
9743
9744 #include <stdlib.h>
9745 int
9746 main ()
9747 {
9748 putwc(0,0);
9749   ;
9750   return 0;
9751 }
9752 _ACEOF
9753 rm -f conftest.$ac_objext conftest$ac_exeext
9754 if { (eval echo "$as_me:9754: \"$ac_link\"") >&5
9755   (eval $ac_link) 2>&5
9756   ac_status=$?
9757   echo "$as_me:9757: \$? = $ac_status" >&5
9758   (exit $ac_status); } &&
9759          { ac_try='test -s conftest$ac_exeext'
9760   { (eval echo "$as_me:9760: \"$ac_try\"") >&5
9761   (eval $ac_try) 2>&5
9762   ac_status=$?
9763   echo "$as_me:9763: \$? = $ac_status" >&5
9764   (exit $ac_status); }; }; then
9765   cf_cv_utf8_lib=yes
9766 else
9767   echo "$as_me: failed program was:" >&5
9768 cat conftest.$ac_ext >&5
9769
9770 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9771 # will be set on completion of the AC_TRY_LINK below.
9772 cf_cv_header_path_utf8=
9773 cf_cv_library_path_utf8=
9774
9775 echo "${as_me:-configure}:9775: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9776
9777 cf_save_LIBS="$LIBS"
9778
9779 cat >conftest.$ac_ext <<_ACEOF
9780 #line 9780 "configure"
9781 #include "confdefs.h"
9782
9783 #include <libutf8.h>
9784 int
9785 main ()
9786 {
9787 putwc(0,0);
9788   ;
9789   return 0;
9790 }
9791 _ACEOF
9792 rm -f conftest.$ac_objext conftest$ac_exeext
9793 if { (eval echo "$as_me:9793: \"$ac_link\"") >&5
9794   (eval $ac_link) 2>&5
9795   ac_status=$?
9796   echo "$as_me:9796: \$? = $ac_status" >&5
9797   (exit $ac_status); } &&
9798          { ac_try='test -s conftest$ac_exeext'
9799   { (eval echo "$as_me:9799: \"$ac_try\"") >&5
9800   (eval $ac_try) 2>&5
9801   ac_status=$?
9802   echo "$as_me:9802: \$? = $ac_status" >&5
9803   (exit $ac_status); }; }; then
9804
9805         cf_cv_find_linkage_utf8=yes
9806         cf_cv_header_path_utf8=/usr/include
9807         cf_cv_library_path_utf8=/usr/lib
9808
9809 else
9810   echo "$as_me: failed program was:" >&5
9811 cat conftest.$ac_ext >&5
9812
9813 LIBS="-lutf8  $cf_save_LIBS"
9814
9815 cat >conftest.$ac_ext <<_ACEOF
9816 #line 9816 "configure"
9817 #include "confdefs.h"
9818
9819 #include <libutf8.h>
9820 int
9821 main ()
9822 {
9823 putwc(0,0);
9824   ;
9825   return 0;
9826 }
9827 _ACEOF
9828 rm -f conftest.$ac_objext conftest$ac_exeext
9829 if { (eval echo "$as_me:9829: \"$ac_link\"") >&5
9830   (eval $ac_link) 2>&5
9831   ac_status=$?
9832   echo "$as_me:9832: \$? = $ac_status" >&5
9833   (exit $ac_status); } &&
9834          { ac_try='test -s conftest$ac_exeext'
9835   { (eval echo "$as_me:9835: \"$ac_try\"") >&5
9836   (eval $ac_try) 2>&5
9837   ac_status=$?
9838   echo "$as_me:9838: \$? = $ac_status" >&5
9839   (exit $ac_status); }; }; then
9840
9841         cf_cv_find_linkage_utf8=yes
9842         cf_cv_header_path_utf8=/usr/include
9843         cf_cv_library_path_utf8=/usr/lib
9844         cf_cv_library_file_utf8="-lutf8"
9845
9846 else
9847   echo "$as_me: failed program was:" >&5
9848 cat conftest.$ac_ext >&5
9849
9850         cf_cv_find_linkage_utf8=no
9851         LIBS="$cf_save_LIBS"
9852
9853         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9854
9855 echo "${as_me:-configure}:9855: testing find linkage for utf8 library ..." 1>&5
9856
9857 echo "${as_me:-configure}:9857: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9858
9859         cf_save_CPPFLAGS="$CPPFLAGS"
9860         cf_test_CPPFLAGS="$CPPFLAGS"
9861
9862 cf_search=
9863
9864 # collect the current set of include-directories from compiler flags
9865 cf_header_path_list=""
9866 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9867         for cf_header_path in $CPPFLAGS $CFLAGS
9868         do
9869                 case $cf_header_path in
9870                 (-I*)
9871                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9872
9873 test "x$cf_header_path" != "xNONE" && \
9874 test -d "$cf_header_path" && \
9875  {
9876         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9877         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9878         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9879         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9880         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9881         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9882 }
9883
9884                         cf_header_path_list="$cf_header_path_list $cf_search"
9885                         ;;
9886                 esac
9887         done
9888 fi
9889
9890 # add the variations for the package we are looking for
9891
9892 cf_search=
9893
9894 test "x$prefix" != "xNONE" && \
9895 test -d "$prefix" && \
9896  {
9897         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9898         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9899         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9900         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9901         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9902         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9903 }
9904
9905 for cf_subdir_prefix in \
9906         /usr \
9907         /usr/local \
9908         /usr/pkg \
9909         /opt \
9910         /opt/local \
9911         $HOME
9912 do
9913
9914 test "x$cf_subdir_prefix" != "x$prefix" && \
9915 test -d "$cf_subdir_prefix" && \
9916 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9917         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9918         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9919         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9920         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9921         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9922         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9923 }
9924
9925 done
9926
9927 test "$includedir" != NONE && \
9928 test "$includedir" != "/usr/include" && \
9929 test -d "$includedir" && {
9930         test -d $includedir &&    cf_search="$cf_search $includedir"
9931         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9932 }
9933
9934 test "$oldincludedir" != NONE && \
9935 test "$oldincludedir" != "/usr/include" && \
9936 test -d "$oldincludedir" && {
9937         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9938         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9939 }
9940
9941 cf_search="$cf_search $cf_header_path_list"
9942
9943         for cf_cv_header_path_utf8 in $cf_search
9944         do
9945                 if test -d $cf_cv_header_path_utf8 ; then
9946                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9947
9948 echo "${as_me:-configure}:9948: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9949
9950                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9951                         cat >conftest.$ac_ext <<_ACEOF
9952 #line 9952 "configure"
9953 #include "confdefs.h"
9954
9955 #include <libutf8.h>
9956 int
9957 main ()
9958 {
9959 putwc(0,0);
9960   ;
9961   return 0;
9962 }
9963 _ACEOF
9964 rm -f conftest.$ac_objext
9965 if { (eval echo "$as_me:9965: \"$ac_compile\"") >&5
9966   (eval $ac_compile) 2>&5
9967   ac_status=$?
9968   echo "$as_me:9968: \$? = $ac_status" >&5
9969   (exit $ac_status); } &&
9970          { ac_try='test -s conftest.$ac_objext'
9971   { (eval echo "$as_me:9971: \"$ac_try\"") >&5
9972   (eval $ac_try) 2>&5
9973   ac_status=$?
9974   echo "$as_me:9974: \$? = $ac_status" >&5
9975   (exit $ac_status); }; }; then
9976
9977                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9978
9979 echo "${as_me:-configure}:9979: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9980
9981                                 cf_cv_find_linkage_utf8=maybe
9982                                 cf_test_CPPFLAGS="$CPPFLAGS"
9983                                 break
9984 else
9985   echo "$as_me: failed program was:" >&5
9986 cat conftest.$ac_ext >&5
9987
9988                                 CPPFLAGS="$cf_save_CPPFLAGS"
9989
9990 fi
9991 rm -f conftest.$ac_objext conftest.$ac_ext
9992                 fi
9993         done
9994
9995         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9996
9997 echo "${as_me:-configure}:9997: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9998
9999                 cf_save_LIBS="$LIBS"
10000                 cf_save_LDFLAGS="$LDFLAGS"
10001
10002                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10003
10004 cf_search=
10005 cf_library_path_list=""
10006 if test -n "${LDFLAGS}${LIBS}" ; then
10007         for cf_library_path in $LDFLAGS $LIBS
10008         do
10009                 case $cf_library_path in
10010                 (-L*)
10011                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10012
10013 test "x$cf_library_path" != "xNONE" && \
10014 test -d "$cf_library_path" && \
10015  {
10016         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10017         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10018         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10019         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10020         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10021         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10022 }
10023
10024                         cf_library_path_list="$cf_library_path_list $cf_search"
10025                         ;;
10026                 esac
10027         done
10028 fi
10029
10030 cf_search=
10031
10032 test "x$prefix" != "xNONE" && \
10033 test -d "$prefix" && \
10034  {
10035         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10036         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10037         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10038         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10039         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10040         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10041 }
10042
10043 for cf_subdir_prefix in \
10044         /usr \
10045         /usr/local \
10046         /usr/pkg \
10047         /opt \
10048         /opt/local \
10049         $HOME
10050 do
10051
10052 test "x$cf_subdir_prefix" != "x$prefix" && \
10053 test -d "$cf_subdir_prefix" && \
10054 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10055         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10056         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10057         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10058         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10059         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10060         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10061 }
10062
10063 done
10064
10065 cf_search="$cf_library_path_list $cf_search"
10066
10067                         for cf_cv_library_path_utf8 in $cf_search
10068                         do
10069                                 if test -d $cf_cv_library_path_utf8 ; then
10070                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10071
10072 echo "${as_me:-configure}:10072: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10073
10074                                         CPPFLAGS="$cf_test_CPPFLAGS"
10075                                         LIBS="-lutf8  $cf_save_LIBS"
10076                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10077                                         cat >conftest.$ac_ext <<_ACEOF
10078 #line 10078 "configure"
10079 #include "confdefs.h"
10080
10081 #include <libutf8.h>
10082 int
10083 main ()
10084 {
10085 putwc(0,0);
10086   ;
10087   return 0;
10088 }
10089 _ACEOF
10090 rm -f conftest.$ac_objext conftest$ac_exeext
10091 if { (eval echo "$as_me:10091: \"$ac_link\"") >&5
10092   (eval $ac_link) 2>&5
10093   ac_status=$?
10094   echo "$as_me:10094: \$? = $ac_status" >&5
10095   (exit $ac_status); } &&
10096          { ac_try='test -s conftest$ac_exeext'
10097   { (eval echo "$as_me:10097: \"$ac_try\"") >&5
10098   (eval $ac_try) 2>&5
10099   ac_status=$?
10100   echo "$as_me:10100: \$? = $ac_status" >&5
10101   (exit $ac_status); }; }; then
10102
10103                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10104
10105 echo "${as_me:-configure}:10105: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10106
10107                                         cf_cv_find_linkage_utf8=yes
10108                                         cf_cv_library_file_utf8="-lutf8"
10109                                         break
10110 else
10111   echo "$as_me: failed program was:" >&5
10112 cat conftest.$ac_ext >&5
10113
10114                                         CPPFLAGS="$cf_save_CPPFLAGS"
10115                                         LIBS="$cf_save_LIBS"
10116                                         LDFLAGS="$cf_save_LDFLAGS"
10117
10118 fi
10119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10120                                 fi
10121                         done
10122                         CPPFLAGS="$cf_save_CPPFLAGS"
10123                         LDFLAGS="$cf_save_LDFLAGS"
10124                 fi
10125
10126         else
10127                 cf_cv_find_linkage_utf8=no
10128         fi
10129
10130 fi
10131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10132
10133 fi
10134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10135
10136 LIBS="$cf_save_LIBS"
10137
10138 if test "$cf_cv_find_linkage_utf8" = yes ; then
10139 cf_cv_utf8_lib=add-on
10140 else
10141 cf_cv_utf8_lib=no
10142 fi
10143
10144 fi
10145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10146 fi
10147 echo "$as_me:10147: result: $cf_cv_utf8_lib" >&5
10148 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10149
10150 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10151 # ncurses/ncursesw:
10152 if test "$cf_cv_utf8_lib" = "add-on" ; then
10153
10154 cat >>confdefs.h <<\EOF
10155 #define HAVE_LIBUTF8_H 1
10156 EOF
10157
10158 if test -n "$cf_cv_header_path_utf8" ; then
10159   for cf_add_incdir in $cf_cv_header_path_utf8
10160   do
10161         while test $cf_add_incdir != /usr/include
10162         do
10163           if test -d $cf_add_incdir
10164           then
10165                 cf_have_incdir=no
10166                 if test -n "$CFLAGS$CPPFLAGS" ; then
10167                   # a loop is needed to ensure we can add subdirs of existing dirs
10168                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10169                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10170                           cf_have_incdir=yes; break
10171                         fi
10172                   done
10173                 fi
10174
10175                 if test "$cf_have_incdir" = no ; then
10176                   if test "$cf_add_incdir" = /usr/local/include ; then
10177                         if test "$GCC" = yes
10178                         then
10179                           cf_save_CPPFLAGS=$CPPFLAGS
10180                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10181                           cat >conftest.$ac_ext <<_ACEOF
10182 #line 10182 "configure"
10183 #include "confdefs.h"
10184 #include <stdio.h>
10185 int
10186 main ()
10187 {
10188 printf("Hello")
10189   ;
10190   return 0;
10191 }
10192 _ACEOF
10193 rm -f conftest.$ac_objext
10194 if { (eval echo "$as_me:10194: \"$ac_compile\"") >&5
10195   (eval $ac_compile) 2>&5
10196   ac_status=$?
10197   echo "$as_me:10197: \$? = $ac_status" >&5
10198   (exit $ac_status); } &&
10199          { ac_try='test -s conftest.$ac_objext'
10200   { (eval echo "$as_me:10200: \"$ac_try\"") >&5
10201   (eval $ac_try) 2>&5
10202   ac_status=$?
10203   echo "$as_me:10203: \$? = $ac_status" >&5
10204   (exit $ac_status); }; }; then
10205   :
10206 else
10207   echo "$as_me: failed program was:" >&5
10208 cat conftest.$ac_ext >&5
10209 cf_have_incdir=yes
10210 fi
10211 rm -f conftest.$ac_objext conftest.$ac_ext
10212                           CPPFLAGS=$cf_save_CPPFLAGS
10213                         fi
10214                   fi
10215                 fi
10216
10217                 if test "$cf_have_incdir" = no ; then
10218                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10219
10220 echo "${as_me:-configure}:10220: testing adding $cf_add_incdir to include-path ..." 1>&5
10221
10222                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10223
10224                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10225                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10226                   cf_add_incdir="$cf_top_incdir"
10227                 else
10228                   break
10229                 fi
10230           else
10231                 break
10232           fi
10233         done
10234   done
10235 fi
10236
10237 if test -n "$cf_cv_library_path_utf8" ; then
10238         for cf_add_libdir in $cf_cv_library_path_utf8
10239         do
10240                 if test $cf_add_libdir = /usr/lib ; then
10241                         :
10242                 elif test -d $cf_add_libdir
10243                 then
10244                         cf_have_libdir=no
10245                         if test -n "$LDFLAGS$LIBS" ; then
10246                                 # a loop is needed to ensure we can add subdirs of existing dirs
10247                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10248                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10249                                                 cf_have_libdir=yes; break
10250                                         fi
10251                                 done
10252                         fi
10253                         if test "$cf_have_libdir" = no ; then
10254                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10255
10256 echo "${as_me:-configure}:10256: testing adding $cf_add_libdir to library-path ..." 1>&5
10257
10258                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10259                         fi
10260                 fi
10261         done
10262 fi
10263
10264 cf_add_libs="$cf_cv_library_file_utf8"
10265 # Filter out duplicates - this happens with badly-designed ".pc" files...
10266 for cf_add_1lib in $LIBS
10267 do
10268         for cf_add_2lib in $cf_add_libs
10269         do
10270                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10271                 then
10272                         cf_add_1lib=
10273                         break
10274                 fi
10275         done
10276         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10277 done
10278 LIBS="$cf_add_libs"
10279
10280 fi
10281
10282                 if test "$cf_cv_utf8_lib" != no ; then
10283                         NCURSES_LIBUTF8=1
10284                 fi
10285         fi
10286
10287 # This is needed on Tru64 5.0 to declare mbstate_t
10288 echo "$as_me:10288: checking if we must include wchar.h to declare mbstate_t" >&5
10289 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10290 if test "${cf_cv_mbstate_t+set}" = set; then
10291   echo $ECHO_N "(cached) $ECHO_C" >&6
10292 else
10293
10294 cat >conftest.$ac_ext <<_ACEOF
10295 #line 10295 "configure"
10296 #include "confdefs.h"
10297
10298 #include <stdlib.h>
10299 #include <stdarg.h>
10300 #include <stdio.h>
10301 #ifdef HAVE_LIBUTF8_H
10302 #include <libutf8.h>
10303 #endif
10304 int
10305 main ()
10306 {
10307 mbstate_t state
10308   ;
10309   return 0;
10310 }
10311 _ACEOF
10312 rm -f conftest.$ac_objext
10313 if { (eval echo "$as_me:10313: \"$ac_compile\"") >&5
10314   (eval $ac_compile) 2>&5
10315   ac_status=$?
10316   echo "$as_me:10316: \$? = $ac_status" >&5
10317   (exit $ac_status); } &&
10318          { ac_try='test -s conftest.$ac_objext'
10319   { (eval echo "$as_me:10319: \"$ac_try\"") >&5
10320   (eval $ac_try) 2>&5
10321   ac_status=$?
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit $ac_status); }; }; then
10324   cf_cv_mbstate_t=no
10325 else
10326   echo "$as_me: failed program was:" >&5
10327 cat conftest.$ac_ext >&5
10328 cat >conftest.$ac_ext <<_ACEOF
10329 #line 10329 "configure"
10330 #include "confdefs.h"
10331
10332 #include <stdlib.h>
10333 #include <stdarg.h>
10334 #include <stdio.h>
10335 #include <wchar.h>
10336 #ifdef HAVE_LIBUTF8_H
10337 #include <libutf8.h>
10338 #endif
10339 int
10340 main ()
10341 {
10342 mbstate_t value
10343   ;
10344   return 0;
10345 }
10346 _ACEOF
10347 rm -f conftest.$ac_objext
10348 if { (eval echo "$as_me:10348: \"$ac_compile\"") >&5
10349   (eval $ac_compile) 2>&5
10350   ac_status=$?
10351   echo "$as_me:10351: \$? = $ac_status" >&5
10352   (exit $ac_status); } &&
10353          { ac_try='test -s conftest.$ac_objext'
10354   { (eval echo "$as_me:10354: \"$ac_try\"") >&5
10355   (eval $ac_try) 2>&5
10356   ac_status=$?
10357   echo "$as_me:10357: \$? = $ac_status" >&5
10358   (exit $ac_status); }; }; then
10359   cf_cv_mbstate_t=yes
10360 else
10361   echo "$as_me: failed program was:" >&5
10362 cat conftest.$ac_ext >&5
10363 cf_cv_mbstate_t=unknown
10364 fi
10365 rm -f conftest.$ac_objext conftest.$ac_ext
10366 fi
10367 rm -f conftest.$ac_objext conftest.$ac_ext
10368 fi
10369 echo "$as_me:10369: result: $cf_cv_mbstate_t" >&5
10370 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10371
10372 if test "$cf_cv_mbstate_t" = yes ; then
10373
10374 cat >>confdefs.h <<\EOF
10375 #define NEED_WCHAR_H 1
10376 EOF
10377
10378         NEED_WCHAR_H=1
10379 fi
10380
10381 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10382 if test "$cf_cv_mbstate_t" = unknown ; then
10383         NCURSES_MBSTATE_T=1
10384 fi
10385
10386 # This is needed on Tru64 5.0 to declare wchar_t
10387 echo "$as_me:10387: checking if we must include wchar.h to declare wchar_t" >&5
10388 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10389 if test "${cf_cv_wchar_t+set}" = set; then
10390   echo $ECHO_N "(cached) $ECHO_C" >&6
10391 else
10392
10393 cat >conftest.$ac_ext <<_ACEOF
10394 #line 10394 "configure"
10395 #include "confdefs.h"
10396
10397 #include <stdlib.h>
10398 #include <stdarg.h>
10399 #include <stdio.h>
10400 #ifdef HAVE_LIBUTF8_H
10401 #include <libutf8.h>
10402 #endif
10403 int
10404 main ()
10405 {
10406 wchar_t state
10407   ;
10408   return 0;
10409 }
10410 _ACEOF
10411 rm -f conftest.$ac_objext
10412 if { (eval echo "$as_me:10412: \"$ac_compile\"") >&5
10413   (eval $ac_compile) 2>&5
10414   ac_status=$?
10415   echo "$as_me:10415: \$? = $ac_status" >&5
10416   (exit $ac_status); } &&
10417          { ac_try='test -s conftest.$ac_objext'
10418   { (eval echo "$as_me:10418: \"$ac_try\"") >&5
10419   (eval $ac_try) 2>&5
10420   ac_status=$?
10421   echo "$as_me:10421: \$? = $ac_status" >&5
10422   (exit $ac_status); }; }; then
10423   cf_cv_wchar_t=no
10424 else
10425   echo "$as_me: failed program was:" >&5
10426 cat conftest.$ac_ext >&5
10427 cat >conftest.$ac_ext <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430
10431 #include <stdlib.h>
10432 #include <stdarg.h>
10433 #include <stdio.h>
10434 #include <wchar.h>
10435 #ifdef HAVE_LIBUTF8_H
10436 #include <libutf8.h>
10437 #endif
10438 int
10439 main ()
10440 {
10441 wchar_t value
10442   ;
10443   return 0;
10444 }
10445 _ACEOF
10446 rm -f conftest.$ac_objext
10447 if { (eval echo "$as_me:10447: \"$ac_compile\"") >&5
10448   (eval $ac_compile) 2>&5
10449   ac_status=$?
10450   echo "$as_me:10450: \$? = $ac_status" >&5
10451   (exit $ac_status); } &&
10452          { ac_try='test -s conftest.$ac_objext'
10453   { (eval echo "$as_me:10453: \"$ac_try\"") >&5
10454   (eval $ac_try) 2>&5
10455   ac_status=$?
10456   echo "$as_me:10456: \$? = $ac_status" >&5
10457   (exit $ac_status); }; }; then
10458   cf_cv_wchar_t=yes
10459 else
10460   echo "$as_me: failed program was:" >&5
10461 cat conftest.$ac_ext >&5
10462 cf_cv_wchar_t=unknown
10463 fi
10464 rm -f conftest.$ac_objext conftest.$ac_ext
10465 fi
10466 rm -f conftest.$ac_objext conftest.$ac_ext
10467 fi
10468 echo "$as_me:10468: result: $cf_cv_wchar_t" >&5
10469 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10470
10471 if test "$cf_cv_wchar_t" = yes ; then
10472
10473 cat >>confdefs.h <<\EOF
10474 #define NEED_WCHAR_H 1
10475 EOF
10476
10477         NEED_WCHAR_H=1
10478 fi
10479
10480 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10481 if test "$cf_cv_wchar_t" = unknown ; then
10482         NCURSES_WCHAR_T=1
10483 fi
10484
10485 # if we find wchar_t in either place, use substitution to provide a fallback.
10486 if test "$cf_cv_wchar_t" != unknown ; then
10487         NCURSES_OK_WCHAR_T=1
10488 fi
10489
10490 # This is needed on Tru64 5.0 to declare wint_t
10491 echo "$as_me:10491: checking if we must include wchar.h to declare wint_t" >&5
10492 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10493 if test "${cf_cv_wint_t+set}" = set; then
10494   echo $ECHO_N "(cached) $ECHO_C" >&6
10495 else
10496
10497 cat >conftest.$ac_ext <<_ACEOF
10498 #line 10498 "configure"
10499 #include "confdefs.h"
10500
10501 #include <stdlib.h>
10502 #include <stdarg.h>
10503 #include <stdio.h>
10504 #ifdef HAVE_LIBUTF8_H
10505 #include <libutf8.h>
10506 #endif
10507 int
10508 main ()
10509 {
10510 wint_t state
10511   ;
10512   return 0;
10513 }
10514 _ACEOF
10515 rm -f conftest.$ac_objext
10516 if { (eval echo "$as_me:10516: \"$ac_compile\"") >&5
10517   (eval $ac_compile) 2>&5
10518   ac_status=$?
10519   echo "$as_me:10519: \$? = $ac_status" >&5
10520   (exit $ac_status); } &&
10521          { ac_try='test -s conftest.$ac_objext'
10522   { (eval echo "$as_me:10522: \"$ac_try\"") >&5
10523   (eval $ac_try) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); }; }; then
10527   cf_cv_wint_t=no
10528 else
10529   echo "$as_me: failed program was:" >&5
10530 cat conftest.$ac_ext >&5
10531 cat >conftest.$ac_ext <<_ACEOF
10532 #line 10532 "configure"
10533 #include "confdefs.h"
10534
10535 #include <stdlib.h>
10536 #include <stdarg.h>
10537 #include <stdio.h>
10538 #include <wchar.h>
10539 #ifdef HAVE_LIBUTF8_H
10540 #include <libutf8.h>
10541 #endif
10542 int
10543 main ()
10544 {
10545 wint_t value
10546   ;
10547   return 0;
10548 }
10549 _ACEOF
10550 rm -f conftest.$ac_objext
10551 if { (eval echo "$as_me:10551: \"$ac_compile\"") >&5
10552   (eval $ac_compile) 2>&5
10553   ac_status=$?
10554   echo "$as_me:10554: \$? = $ac_status" >&5
10555   (exit $ac_status); } &&
10556          { ac_try='test -s conftest.$ac_objext'
10557   { (eval echo "$as_me:10557: \"$ac_try\"") >&5
10558   (eval $ac_try) 2>&5
10559   ac_status=$?
10560   echo "$as_me:10560: \$? = $ac_status" >&5
10561   (exit $ac_status); }; }; then
10562   cf_cv_wint_t=yes
10563 else
10564   echo "$as_me: failed program was:" >&5
10565 cat conftest.$ac_ext >&5
10566 cf_cv_wint_t=unknown
10567 fi
10568 rm -f conftest.$ac_objext conftest.$ac_ext
10569 fi
10570 rm -f conftest.$ac_objext conftest.$ac_ext
10571 fi
10572 echo "$as_me:10572: result: $cf_cv_wint_t" >&5
10573 echo "${ECHO_T}$cf_cv_wint_t" >&6
10574
10575 if test "$cf_cv_wint_t" = yes ; then
10576
10577 cat >>confdefs.h <<\EOF
10578 #define NEED_WCHAR_H 1
10579 EOF
10580
10581         NEED_WCHAR_H=1
10582 fi
10583
10584 # if we do not find wint_t in either place, use substitution to provide a fallback.
10585 if test "$cf_cv_wint_t" = unknown ; then
10586         NCURSES_WINT_T=1
10587 fi
10588
10589 # if we find wint_t in either place, use substitution to provide a fallback.
10590 if test "$cf_cv_wint_t" != unknown ; then
10591         NCURSES_OK_WINT_T=1
10592 fi
10593
10594         if test "$NCURSES_MBSTATE_T" != 0; then
10595
10596 cat >>confdefs.h <<\EOF
10597 #define NEED_MBSTATE_T_DEF 1
10598 EOF
10599
10600         fi
10601 fi
10602
10603 ###   use option --disable-lp64 to allow long chtype
10604 echo "$as_me:10604: checking whether to enable _LP64 definition in curses.h" >&5
10605 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10606
10607 # Check whether --enable-lp64 or --disable-lp64 was given.
10608 if test "${enable_lp64+set}" = set; then
10609   enableval="$enable_lp64"
10610   with_lp64=$enableval
10611 else
10612   with_lp64=$cf_dft_with_lp64
10613 fi;
10614 echo "$as_me:10614: result: $with_lp64" >&5
10615 echo "${ECHO_T}$with_lp64" >&6
10616
10617 if test "x$with_lp64" = xyes ; then
10618         cf_cv_enable_lp64=1
10619 else
10620         cf_cv_enable_lp64=0
10621 fi
10622
10623 # Check whether --enable-largefile or --disable-largefile was given.
10624 if test "${enable_largefile+set}" = set; then
10625   enableval="$enable_largefile"
10626
10627 fi;
10628 if test "$enable_largefile" != no; then
10629
10630   echo "$as_me:10630: checking for special C compiler options needed for large files" >&5
10631 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10632 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10633   echo $ECHO_N "(cached) $ECHO_C" >&6
10634 else
10635   ac_cv_sys_largefile_CC=no
10636      if test "$GCC" != yes; then
10637        ac_save_CC=$CC
10638        while :; do
10639          # IRIX 6.2 and later do not support large files by default,
10640          # so use the C compiler's -n32 option if that helps.
10641          cat >conftest.$ac_ext <<_ACEOF
10642 #line 10642 "configure"
10643 #include "confdefs.h"
10644 #include <sys/types.h>
10645  /* Check that off_t can represent 2**63 - 1 correctly.
10646     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10647     since some C++ compilers masquerading as C compilers
10648     incorrectly reject 9223372036854775807.  */
10649 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10650   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10651                        && LARGE_OFF_T % 2147483647 == 1)
10652                       ? 1 : -1];
10653 int
10654 main ()
10655 {
10656
10657   ;
10658   return 0;
10659 }
10660 _ACEOF
10661          rm -f conftest.$ac_objext
10662 if { (eval echo "$as_me:10662: \"$ac_compile\"") >&5
10663   (eval $ac_compile) 2>&5
10664   ac_status=$?
10665   echo "$as_me:10665: \$? = $ac_status" >&5
10666   (exit $ac_status); } &&
10667          { ac_try='test -s conftest.$ac_objext'
10668   { (eval echo "$as_me:10668: \"$ac_try\"") >&5
10669   (eval $ac_try) 2>&5
10670   ac_status=$?
10671   echo "$as_me:10671: \$? = $ac_status" >&5
10672   (exit $ac_status); }; }; then
10673   break
10674 else
10675   echo "$as_me: failed program was:" >&5
10676 cat conftest.$ac_ext >&5
10677 fi
10678 rm -f conftest.$ac_objext
10679          CC="$CC -n32"
10680          rm -f conftest.$ac_objext
10681 if { (eval echo "$as_me:10681: \"$ac_compile\"") >&5
10682   (eval $ac_compile) 2>&5
10683   ac_status=$?
10684   echo "$as_me:10684: \$? = $ac_status" >&5
10685   (exit $ac_status); } &&
10686          { ac_try='test -s conftest.$ac_objext'
10687   { (eval echo "$as_me:10687: \"$ac_try\"") >&5
10688   (eval $ac_try) 2>&5
10689   ac_status=$?
10690   echo "$as_me:10690: \$? = $ac_status" >&5
10691   (exit $ac_status); }; }; then
10692   ac_cv_sys_largefile_CC=' -n32'; break
10693 else
10694   echo "$as_me: failed program was:" >&5
10695 cat conftest.$ac_ext >&5
10696 fi
10697 rm -f conftest.$ac_objext
10698          break
10699        done
10700        CC=$ac_save_CC
10701        rm -f conftest.$ac_ext
10702     fi
10703 fi
10704 echo "$as_me:10704: result: $ac_cv_sys_largefile_CC" >&5
10705 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10706   if test "$ac_cv_sys_largefile_CC" != no; then
10707     CC=$CC$ac_cv_sys_largefile_CC
10708   fi
10709
10710   echo "$as_me:10710: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10711 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10712 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10713   echo $ECHO_N "(cached) $ECHO_C" >&6
10714 else
10715   while :; do
10716   ac_cv_sys_file_offset_bits=no
10717   cat >conftest.$ac_ext <<_ACEOF
10718 #line 10718 "configure"
10719 #include "confdefs.h"
10720 #include <sys/types.h>
10721  /* Check that off_t can represent 2**63 - 1 correctly.
10722     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10723     since some C++ compilers masquerading as C compilers
10724     incorrectly reject 9223372036854775807.  */
10725 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10726   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10727                        && LARGE_OFF_T % 2147483647 == 1)
10728                       ? 1 : -1];
10729 int
10730 main ()
10731 {
10732
10733   ;
10734   return 0;
10735 }
10736 _ACEOF
10737 rm -f conftest.$ac_objext
10738 if { (eval echo "$as_me:10738: \"$ac_compile\"") >&5
10739   (eval $ac_compile) 2>&5
10740   ac_status=$?
10741   echo "$as_me:10741: \$? = $ac_status" >&5
10742   (exit $ac_status); } &&
10743          { ac_try='test -s conftest.$ac_objext'
10744   { (eval echo "$as_me:10744: \"$ac_try\"") >&5
10745   (eval $ac_try) 2>&5
10746   ac_status=$?
10747   echo "$as_me:10747: \$? = $ac_status" >&5
10748   (exit $ac_status); }; }; then
10749   break
10750 else
10751   echo "$as_me: failed program was:" >&5
10752 cat conftest.$ac_ext >&5
10753 fi
10754 rm -f conftest.$ac_objext conftest.$ac_ext
10755   cat >conftest.$ac_ext <<_ACEOF
10756 #line 10756 "configure"
10757 #include "confdefs.h"
10758 #define _FILE_OFFSET_BITS 64
10759 #include <sys/types.h>
10760  /* Check that off_t can represent 2**63 - 1 correctly.
10761     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10762     since some C++ compilers masquerading as C compilers
10763     incorrectly reject 9223372036854775807.  */
10764 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10765   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10766                        && LARGE_OFF_T % 2147483647 == 1)
10767                       ? 1 : -1];
10768 int
10769 main ()
10770 {
10771
10772   ;
10773   return 0;
10774 }
10775 _ACEOF
10776 rm -f conftest.$ac_objext
10777 if { (eval echo "$as_me:10777: \"$ac_compile\"") >&5
10778   (eval $ac_compile) 2>&5
10779   ac_status=$?
10780   echo "$as_me:10780: \$? = $ac_status" >&5
10781   (exit $ac_status); } &&
10782          { ac_try='test -s conftest.$ac_objext'
10783   { (eval echo "$as_me:10783: \"$ac_try\"") >&5
10784   (eval $ac_try) 2>&5
10785   ac_status=$?
10786   echo "$as_me:10786: \$? = $ac_status" >&5
10787   (exit $ac_status); }; }; then
10788   ac_cv_sys_file_offset_bits=64; break
10789 else
10790   echo "$as_me: failed program was:" >&5
10791 cat conftest.$ac_ext >&5
10792 fi
10793 rm -f conftest.$ac_objext conftest.$ac_ext
10794   break
10795 done
10796 fi
10797 echo "$as_me:10797: result: $ac_cv_sys_file_offset_bits" >&5
10798 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10799 if test "$ac_cv_sys_file_offset_bits" != no; then
10800
10801 cat >>confdefs.h <<EOF
10802 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10803 EOF
10804
10805 fi
10806 rm -rf conftest*
10807   echo "$as_me:10807: checking for _LARGE_FILES value needed for large files" >&5
10808 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10809 if test "${ac_cv_sys_large_files+set}" = set; then
10810   echo $ECHO_N "(cached) $ECHO_C" >&6
10811 else
10812   while :; do
10813   ac_cv_sys_large_files=no
10814   cat >conftest.$ac_ext <<_ACEOF
10815 #line 10815 "configure"
10816 #include "confdefs.h"
10817 #include <sys/types.h>
10818  /* Check that off_t can represent 2**63 - 1 correctly.
10819     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10820     since some C++ compilers masquerading as C compilers
10821     incorrectly reject 9223372036854775807.  */
10822 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10823   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10824                        && LARGE_OFF_T % 2147483647 == 1)
10825                       ? 1 : -1];
10826 int
10827 main ()
10828 {
10829
10830   ;
10831   return 0;
10832 }
10833 _ACEOF
10834 rm -f conftest.$ac_objext
10835 if { (eval echo "$as_me:10835: \"$ac_compile\"") >&5
10836   (eval $ac_compile) 2>&5
10837   ac_status=$?
10838   echo "$as_me:10838: \$? = $ac_status" >&5
10839   (exit $ac_status); } &&
10840          { ac_try='test -s conftest.$ac_objext'
10841   { (eval echo "$as_me:10841: \"$ac_try\"") >&5
10842   (eval $ac_try) 2>&5
10843   ac_status=$?
10844   echo "$as_me:10844: \$? = $ac_status" >&5
10845   (exit $ac_status); }; }; then
10846   break
10847 else
10848   echo "$as_me: failed program was:" >&5
10849 cat conftest.$ac_ext >&5
10850 fi
10851 rm -f conftest.$ac_objext conftest.$ac_ext
10852   cat >conftest.$ac_ext <<_ACEOF
10853 #line 10853 "configure"
10854 #include "confdefs.h"
10855 #define _LARGE_FILES 1
10856 #include <sys/types.h>
10857  /* Check that off_t can represent 2**63 - 1 correctly.
10858     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10859     since some C++ compilers masquerading as C compilers
10860     incorrectly reject 9223372036854775807.  */
10861 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10862   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10863                        && LARGE_OFF_T % 2147483647 == 1)
10864                       ? 1 : -1];
10865 int
10866 main ()
10867 {
10868
10869   ;
10870   return 0;
10871 }
10872 _ACEOF
10873 rm -f conftest.$ac_objext
10874 if { (eval echo "$as_me:10874: \"$ac_compile\"") >&5
10875   (eval $ac_compile) 2>&5
10876   ac_status=$?
10877   echo "$as_me:10877: \$? = $ac_status" >&5
10878   (exit $ac_status); } &&
10879          { ac_try='test -s conftest.$ac_objext'
10880   { (eval echo "$as_me:10880: \"$ac_try\"") >&5
10881   (eval $ac_try) 2>&5
10882   ac_status=$?
10883   echo "$as_me:10883: \$? = $ac_status" >&5
10884   (exit $ac_status); }; }; then
10885   ac_cv_sys_large_files=1; break
10886 else
10887   echo "$as_me: failed program was:" >&5
10888 cat conftest.$ac_ext >&5
10889 fi
10890 rm -f conftest.$ac_objext conftest.$ac_ext
10891   break
10892 done
10893 fi
10894 echo "$as_me:10894: result: $ac_cv_sys_large_files" >&5
10895 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10896 if test "$ac_cv_sys_large_files" != no; then
10897
10898 cat >>confdefs.h <<EOF
10899 #define _LARGE_FILES $ac_cv_sys_large_files
10900 EOF
10901
10902 fi
10903 rm -rf conftest*
10904 fi
10905
10906         if test "$enable_largefile" != no ; then
10907         echo "$as_me:10907: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10908 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10909 if test "${ac_cv_sys_largefile_source+set}" = set; then
10910   echo $ECHO_N "(cached) $ECHO_C" >&6
10911 else
10912   while :; do
10913   ac_cv_sys_largefile_source=no
10914   cat >conftest.$ac_ext <<_ACEOF
10915 #line 10915 "configure"
10916 #include "confdefs.h"
10917 #include <stdio.h>
10918 int
10919 main ()
10920 {
10921 return !fseeko;
10922   ;
10923   return 0;
10924 }
10925 _ACEOF
10926 rm -f conftest.$ac_objext
10927 if { (eval echo "$as_me:10927: \"$ac_compile\"") >&5
10928   (eval $ac_compile) 2>&5
10929   ac_status=$?
10930   echo "$as_me:10930: \$? = $ac_status" >&5
10931   (exit $ac_status); } &&
10932          { ac_try='test -s conftest.$ac_objext'
10933   { (eval echo "$as_me:10933: \"$ac_try\"") >&5
10934   (eval $ac_try) 2>&5
10935   ac_status=$?
10936   echo "$as_me:10936: \$? = $ac_status" >&5
10937   (exit $ac_status); }; }; then
10938   break
10939 else
10940   echo "$as_me: failed program was:" >&5
10941 cat conftest.$ac_ext >&5
10942 fi
10943 rm -f conftest.$ac_objext conftest.$ac_ext
10944   cat >conftest.$ac_ext <<_ACEOF
10945 #line 10945 "configure"
10946 #include "confdefs.h"
10947 #define _LARGEFILE_SOURCE 1
10948 #include <stdio.h>
10949 int
10950 main ()
10951 {
10952 return !fseeko;
10953   ;
10954   return 0;
10955 }
10956 _ACEOF
10957 rm -f conftest.$ac_objext
10958 if { (eval echo "$as_me:10958: \"$ac_compile\"") >&5
10959   (eval $ac_compile) 2>&5
10960   ac_status=$?
10961   echo "$as_me:10961: \$? = $ac_status" >&5
10962   (exit $ac_status); } &&
10963          { ac_try='test -s conftest.$ac_objext'
10964   { (eval echo "$as_me:10964: \"$ac_try\"") >&5
10965   (eval $ac_try) 2>&5
10966   ac_status=$?
10967   echo "$as_me:10967: \$? = $ac_status" >&5
10968   (exit $ac_status); }; }; then
10969   ac_cv_sys_largefile_source=1; break
10970 else
10971   echo "$as_me: failed program was:" >&5
10972 cat conftest.$ac_ext >&5
10973 fi
10974 rm -f conftest.$ac_objext conftest.$ac_ext
10975   break
10976 done
10977 fi
10978 echo "$as_me:10978: result: $ac_cv_sys_largefile_source" >&5
10979 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10980 if test "$ac_cv_sys_largefile_source" != no; then
10981
10982 cat >>confdefs.h <<EOF
10983 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10984 EOF
10985
10986 fi
10987 rm -rf conftest*
10988
10989 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10990 # in glibc 2.1.3, but that breaks too many other things.
10991 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10992 echo "$as_me:10992: checking for fseeko" >&5
10993 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10994 if test "${ac_cv_func_fseeko+set}" = set; then
10995   echo $ECHO_N "(cached) $ECHO_C" >&6
10996 else
10997   cat >conftest.$ac_ext <<_ACEOF
10998 #line 10998 "configure"
10999 #include "confdefs.h"
11000 #include <stdio.h>
11001 int
11002 main ()
11003 {
11004 return fseeko && fseeko (stdin, 0, 0);
11005   ;
11006   return 0;
11007 }
11008 _ACEOF
11009 rm -f conftest.$ac_objext conftest$ac_exeext
11010 if { (eval echo "$as_me:11010: \"$ac_link\"") >&5
11011   (eval $ac_link) 2>&5
11012   ac_status=$?
11013   echo "$as_me:11013: \$? = $ac_status" >&5
11014   (exit $ac_status); } &&
11015          { ac_try='test -s conftest$ac_exeext'
11016   { (eval echo "$as_me:11016: \"$ac_try\"") >&5
11017   (eval $ac_try) 2>&5
11018   ac_status=$?
11019   echo "$as_me:11019: \$? = $ac_status" >&5
11020   (exit $ac_status); }; }; then
11021   ac_cv_func_fseeko=yes
11022 else
11023   echo "$as_me: failed program was:" >&5
11024 cat conftest.$ac_ext >&5
11025 ac_cv_func_fseeko=no
11026 fi
11027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11028 fi
11029 echo "$as_me:11029: result: $ac_cv_func_fseeko" >&5
11030 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11031 if test $ac_cv_func_fseeko = yes; then
11032
11033 cat >>confdefs.h <<\EOF
11034 #define HAVE_FSEEKO 1
11035 EOF
11036
11037 fi
11038
11039         # Normally we would collect these definitions in the config.h,
11040         # but (like _XOPEN_SOURCE), some environments rely on having these
11041         # defined before any of the system headers are included.  Another
11042         # case comes up with C++, e.g., on AIX the compiler compiles the
11043         # header files by themselves before looking at the body files it is
11044         # told to compile.  For ncurses, those header files do not include
11045         # the config.h
11046         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11047         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11048         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11049
11050         echo "$as_me:11050: checking whether to use struct dirent64" >&5
11051 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11052 if test "${cf_cv_struct_dirent64+set}" = set; then
11053   echo $ECHO_N "(cached) $ECHO_C" >&6
11054 else
11055
11056                 cat >conftest.$ac_ext <<_ACEOF
11057 #line 11057 "configure"
11058 #include "confdefs.h"
11059
11060 #include <sys/types.h>
11061 #include <dirent.h>
11062
11063 int
11064 main ()
11065 {
11066
11067                 /* if transitional largefile support is setup, this is true */
11068                 extern struct dirent64 * readdir(DIR *);
11069                 struct dirent64 *x = readdir((DIR *)0);
11070                 struct dirent *y = readdir((DIR *)0);
11071                 int z = x - y;
11072
11073   ;
11074   return 0;
11075 }
11076 _ACEOF
11077 rm -f conftest.$ac_objext
11078 if { (eval echo "$as_me:11078: \"$ac_compile\"") >&5
11079   (eval $ac_compile) 2>&5
11080   ac_status=$?
11081   echo "$as_me:11081: \$? = $ac_status" >&5
11082   (exit $ac_status); } &&
11083          { ac_try='test -s conftest.$ac_objext'
11084   { (eval echo "$as_me:11084: \"$ac_try\"") >&5
11085   (eval $ac_try) 2>&5
11086   ac_status=$?
11087   echo "$as_me:11087: \$? = $ac_status" >&5
11088   (exit $ac_status); }; }; then
11089   cf_cv_struct_dirent64=yes
11090 else
11091   echo "$as_me: failed program was:" >&5
11092 cat conftest.$ac_ext >&5
11093 cf_cv_struct_dirent64=no
11094 fi
11095 rm -f conftest.$ac_objext conftest.$ac_ext
11096
11097 fi
11098 echo "$as_me:11098: result: $cf_cv_struct_dirent64" >&5
11099 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11100         test "$cf_cv_struct_dirent64" = yes &&
11101 cat >>confdefs.h <<\EOF
11102 #define HAVE_STRUCT_DIRENT64 1
11103 EOF
11104
11105         fi
11106
11107 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11108 echo "$as_me:11108: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11109 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11110
11111 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11112 if test "${enable_tparm_varargs+set}" = set; then
11113   enableval="$enable_tparm_varargs"
11114   with_tparm_varargs=$enableval
11115 else
11116   with_tparm_varargs=yes
11117 fi;
11118 echo "$as_me:11118: result: $with_tparm_varargs" >&5
11119 echo "${ECHO_T}$with_tparm_varargs" >&6
11120 NCURSES_TPARM_VARARGS=0
11121 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11122
11123 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11124 if test "$with_ticlib" != no ; then
11125 echo "$as_me:11125: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11126 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11127
11128 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11129 if test "${enable_tic_depends+set}" = set; then
11130   enableval="$enable_tic_depends"
11131   with_tic_depends=$enableval
11132 else
11133   with_tic_depends=yes
11134 fi;
11135 echo "$as_me:11135: result: $with_tic_depends" >&5
11136 echo "${ECHO_T}$with_tic_depends" >&6
11137 else
11138         with_tic_depends=no
11139 fi
11140
11141 ###   use option --with-bool to override bool's type
11142 echo "$as_me:11142: checking for type of bool" >&5
11143 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11144
11145 # Check whether --with-bool or --without-bool was given.
11146 if test "${with_bool+set}" = set; then
11147   withval="$with_bool"
11148   NCURSES_BOOL="$withval"
11149 else
11150   NCURSES_BOOL=auto
11151 fi;
11152 echo "$as_me:11152: result: $NCURSES_BOOL" >&5
11153 echo "${ECHO_T}$NCURSES_BOOL" >&6
11154
11155 echo "$as_me:11155: checking for alternate terminal capabilities file" >&5
11156 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11157
11158 # Check whether --with-caps or --without-caps was given.
11159 if test "${with_caps+set}" = set; then
11160   withval="$with_caps"
11161   TERMINFO_CAPS=Caps.$withval
11162 else
11163   TERMINFO_CAPS=Caps
11164 fi;
11165 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11166 echo "$as_me:11166: result: $TERMINFO_CAPS" >&5
11167 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11168
11169 ###   use option --with-chtype to override chtype's type
11170 echo "$as_me:11170: checking for type of chtype" >&5
11171 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11172
11173 # Check whether --with-chtype or --without-chtype was given.
11174 if test "${with_chtype+set}" = set; then
11175   withval="$with_chtype"
11176   NCURSES_CHTYPE="$withval"
11177 else
11178   NCURSES_CHTYPE=$cf_dft_chtype
11179 fi;
11180 echo "$as_me:11180: result: $NCURSES_CHTYPE" >&5
11181 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11182
11183 ###   use option --with-ospeed to override ospeed's type
11184 echo "$as_me:11184: checking for type of ospeed" >&5
11185 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11186
11187 # Check whether --with-ospeed or --without-ospeed was given.
11188 if test "${with_ospeed+set}" = set; then
11189   withval="$with_ospeed"
11190   NCURSES_OSPEED="$withval"
11191 else
11192   NCURSES_OSPEED=short
11193 fi;
11194 echo "$as_me:11194: result: $NCURSES_OSPEED" >&5
11195 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11196
11197 ###   use option --with-mmask-t to override mmask_t's type
11198 echo "$as_me:11198: checking for type of mmask_t" >&5
11199 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11200
11201 # Check whether --with-mmask-t or --without-mmask-t was given.
11202 if test "${with_mmask_t+set}" = set; then
11203   withval="$with_mmask_t"
11204   NCURSES_MMASK_T="$withval"
11205 else
11206   NCURSES_MMASK_T=$cf_dft_mmask_t
11207 fi;
11208 echo "$as_me:11208: result: $NCURSES_MMASK_T" >&5
11209 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11210
11211 ###   use option --with-ccharw-max to override CCHARW_MAX size
11212 echo "$as_me:11212: checking for size CCHARW_MAX" >&5
11213 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11214
11215 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11216 if test "${with_ccharw_max+set}" = set; then
11217   withval="$with_ccharw_max"
11218   NCURSES_CCHARW_MAX="$withval"
11219 else
11220   NCURSES_CCHARW_MAX=5
11221 fi;
11222 echo "$as_me:11222: result: $NCURSES_CCHARW_MAX" >&5
11223 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11224
11225 ###   use option --with-tparm-arg to override tparm's argument type
11226 echo "$as_me:11226: checking for type of tparm args" >&5
11227 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11228
11229 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11230 if test "${with_tparm_arg+set}" = set; then
11231   withval="$with_tparm_arg"
11232   NCURSES_TPARM_ARG="$withval"
11233 else
11234   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11235 fi;
11236 echo "$as_me:11236: result: $NCURSES_TPARM_ARG" >&5
11237 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11238
11239 ### Enable compiling-in rcs id's
11240 echo "$as_me:11240: checking if RCS identifiers should be compiled-in" >&5
11241 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11242
11243 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11244 if test "${with_rcs_ids+set}" = set; then
11245   withval="$with_rcs_ids"
11246   with_rcs_ids=$withval
11247 else
11248   with_rcs_ids=no
11249 fi;
11250 echo "$as_me:11250: result: $with_rcs_ids" >&5
11251 echo "${ECHO_T}$with_rcs_ids" >&6
11252 test "x$with_rcs_ids" = xyes &&
11253 cat >>confdefs.h <<\EOF
11254 #define USE_RCS_IDS 1
11255 EOF
11256
11257 ###############################################################################
11258
11259 echo "$as_me:11259: checking format of man-pages" >&5
11260 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11261
11262 # Check whether --with-manpage-format or --without-manpage-format was given.
11263 if test "${with_manpage_format+set}" = set; then
11264   withval="$with_manpage_format"
11265   MANPAGE_FORMAT=$withval
11266 else
11267   MANPAGE_FORMAT=unknown
11268 fi;
11269
11270 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11271 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11272
11273 cf_unknown=
11274
11275 case $MANPAGE_FORMAT in
11276 (unknown)
11277         if test -z "$MANPATH" ; then
11278                 MANPATH="/usr/man:/usr/share/man"
11279         fi
11280
11281         # look for the 'date' man-page (it's most likely to be installed!)
11282         MANPAGE_FORMAT=
11283         cf_preform=no
11284         cf_catonly=yes
11285         cf_example=date
11286
11287         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11288         for cf_dir in $MANPATH; do
11289                 test -z "$cf_dir" && cf_dir=/usr/man
11290                 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
11291                 do
11292                         cf_test=`echo $cf_name | sed -e 's/*//'`
11293                         if test "x$cf_test" = "x$cf_name" ; then
11294
11295                                 case "$cf_name" in
11296                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11297                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11298                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11299                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11300                                 esac
11301
11302                                 case "$cf_name" in
11303                                 ($cf_dir/man*)
11304                                         cf_catonly=no
11305                                         ;;
11306                                 ($cf_dir/cat*)
11307                                         cf_preform=yes
11308                                         ;;
11309                                 esac
11310                                 break
11311                         fi
11312
11313                         # if we found a match in either man* or cat*, stop looking
11314                         if test -n "$MANPAGE_FORMAT" ; then
11315                                 cf_found=no
11316                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11317                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11318                                 case "$cf_name" in
11319                                 ($cf_dir/cat*)
11320                                         cf_found=yes
11321                                         ;;
11322                                 esac
11323                                 test $cf_found=yes && break
11324                         fi
11325                 done
11326                 # only check the first directory in $MANPATH where we find manpages
11327                 if test -n "$MANPAGE_FORMAT" ; then
11328                         break
11329                 fi
11330         done
11331         # if we did not find the example, just assume it is normal
11332         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11333         IFS="$ac_save_ifs"
11334         ;;
11335 (*)
11336         for cf_option in $MANPAGE_FORMAT; do
11337         case $cf_option in
11338         (gzip|compress|BSDI|normal|formatted|catonly)
11339                 ;;
11340         (*)
11341                 cf_unknown="$cf_unknown $cf_option"
11342                 ;;
11343         esac
11344         done
11345         ;;
11346 esac
11347
11348 echo "$as_me:11348: result: $MANPAGE_FORMAT" >&5
11349 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11350 if test -n "$cf_unknown" ; then
11351         { echo "$as_me:11351: WARNING: Unexpected manpage-format $cf_unknown" >&5
11352 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11353 fi
11354
11355 echo "$as_me:11355: checking for manpage renaming" >&5
11356 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11357
11358 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11359 if test "${with_manpage_renames+set}" = set; then
11360   withval="$with_manpage_renames"
11361   MANPAGE_RENAMES=$withval
11362 else
11363   MANPAGE_RENAMES=yes
11364 fi;
11365
11366 case ".$MANPAGE_RENAMES" in
11367 (.no)
11368         ;;
11369 (.|.yes)
11370         # Debian 'man' program?
11371         if test -f /etc/debian_version ; then
11372                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11373         else
11374                 MANPAGE_RENAMES=no
11375         fi
11376         ;;
11377 esac
11378
11379 if test "$MANPAGE_RENAMES" != no ; then
11380         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11381                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11382         elif test ! -f $MANPAGE_RENAMES ; then
11383                 { { echo "$as_me:11383: error: not a filename: $MANPAGE_RENAMES" >&5
11384 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11385    { (exit 1); exit 1; }; }
11386         fi
11387
11388         test ! -d man && mkdir man
11389
11390         # Construct a sed-script to perform renaming within man-pages
11391         if test -n "$MANPAGE_RENAMES" ; then
11392                 test ! -d man && mkdir man
11393                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11394         fi
11395 fi
11396
11397 echo "$as_me:11397: result: $MANPAGE_RENAMES" >&5
11398 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11399
11400 echo "$as_me:11400: checking if manpage aliases will be installed" >&5
11401 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11402
11403 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11404 if test "${with_manpage_aliases+set}" = set; then
11405   withval="$with_manpage_aliases"
11406   MANPAGE_ALIASES=$withval
11407 else
11408   MANPAGE_ALIASES=yes
11409 fi;
11410
11411 echo "$as_me:11411: result: $MANPAGE_ALIASES" >&5
11412 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11413
11414 case "x$LN_S" in
11415 (xln*)
11416         cf_use_symlinks=yes
11417         ;;
11418 (*)
11419         cf_use_symlinks=no
11420         ;;
11421 esac
11422
11423 MANPAGE_SYMLINKS=no
11424 if test "$MANPAGE_ALIASES" = yes ; then
11425 echo "$as_me:11425: checking if manpage symlinks should be used" >&5
11426 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11427
11428 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11429 if test "${with_manpage_symlinks+set}" = set; then
11430   withval="$with_manpage_symlinks"
11431   MANPAGE_SYMLINKS=$withval
11432 else
11433   MANPAGE_SYMLINKS=$cf_use_symlinks
11434 fi;
11435
11436 if test "$$cf_use_symlinks" = no; then
11437 if test "$MANPAGE_SYMLINKS" = yes ; then
11438         { echo "$as_me:11438: WARNING: cannot make symlinks" >&5
11439 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11440         MANPAGE_SYMLINKS=no
11441 fi
11442 fi
11443
11444 echo "$as_me:11444: result: $MANPAGE_SYMLINKS" >&5
11445 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11446 fi
11447
11448 echo "$as_me:11448: checking for manpage tbl" >&5
11449 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11450
11451 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11452 if test "${with_manpage_tbl+set}" = set; then
11453   withval="$with_manpage_tbl"
11454   MANPAGE_TBL=$withval
11455 else
11456   MANPAGE_TBL=no
11457 fi;
11458
11459 echo "$as_me:11459: result: $MANPAGE_TBL" >&5
11460 echo "${ECHO_T}$MANPAGE_TBL" >&6
11461
11462 if test "$prefix" = "NONE" ; then
11463         cf_prefix="$ac_default_prefix"
11464 else
11465         cf_prefix="$prefix"
11466 fi
11467
11468 case "$MANPAGE_FORMAT" in
11469 (*catonly*)
11470         cf_format=yes
11471         cf_inboth=no
11472         ;;
11473 (*formatted*)
11474         cf_format=yes
11475         cf_inboth=yes
11476         ;;
11477 (*)
11478         cf_format=no
11479         cf_inboth=no
11480         ;;
11481 esac
11482
11483 test ! -d man && mkdir man
11484
11485 cf_so_strip=
11486 cf_compress=
11487 case "$MANPAGE_FORMAT" in
11488 (*compress*)
11489         cf_so_strip="Z"
11490         cf_compress=compress
11491         ;;
11492 (*gzip*)
11493         cf_so_strip="gz"
11494         cf_compress=gzip
11495         ;;
11496 esac
11497
11498 cf_edit_man=./edit_man.sh
11499 cf_man_alias=`pwd`/man_alias.sed
11500
11501 cat >$cf_edit_man <<CF_EOF
11502 #! $SHELL
11503 # this script is generated by the configure-script CF_MAN_PAGES macro.
11504
11505 prefix="$cf_prefix"
11506 datarootdir="$datarootdir"
11507 datadir="$datadir"
11508
11509 NCURSES_MAJOR="$NCURSES_MAJOR"
11510 NCURSES_MINOR="$NCURSES_MINOR"
11511 NCURSES_PATCH="$NCURSES_PATCH"
11512
11513 NCURSES_OSPEED="$NCURSES_OSPEED"
11514 TERMINFO="$TERMINFO"
11515
11516 INSTALL="$INSTALL"
11517 INSTALL_DATA="$INSTALL_DATA"
11518
11519 transform="$program_transform_name"
11520
11521 TMP=\${TMPDIR:=/tmp}/man\$\$
11522 trap "rm -f \$TMP" 0 1 2 5 15
11523
11524 form=\$1
11525 shift || exit 1
11526
11527 verb=\$1
11528 shift || exit 1
11529
11530 mandir=\$1
11531 shift || exit 1
11532
11533 srcdir=\$1
11534 top_srcdir=\$srcdir/..
11535 shift || exit 1
11536
11537 if test "\$form" = normal ; then
11538         if test "$cf_format" = yes ; then
11539         if test "$cf_inboth" = no ; then
11540                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11541                 exit $?
11542         fi
11543         fi
11544         cf_subdir=\$mandir/man
11545         cf_tables=$MANPAGE_TBL
11546 else
11547         cf_subdir=\$mandir/cat
11548         cf_tables=yes
11549 fi
11550
11551 # process the list of source-files
11552 for i in \$* ; do
11553 case \$i in
11554 (*.orig|*.rej) ;;
11555 (*.[0-9]*)
11556         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11557         if test \$verb = installing ; then
11558         if test ! -d \$cf_subdir\${section} ; then
11559                 mkdir -p \$cf_subdir\$section
11560         fi
11561         fi
11562
11563         # replace variables in man page
11564         if test ! -f $cf_man_alias ; then
11565 cat >>$cf_man_alias <<-CF_EOF2
11566                 s,@DATADIR@,\$datadir,g
11567                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11568                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11569                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11570                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11571                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11572                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11573 CF_EOF
11574
11575         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11576         do
11577                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11578                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11579 cat >>$cf_edit_man <<-CF_EOF
11580                 s,@$cf_NAME@,$cf_name,g
11581 CF_EOF
11582         done
11583
11584 cat >>$cf_edit_man <<CF_EOF
11585 CF_EOF2
11586                 echo "...made $cf_man_alias"
11587         fi
11588
11589         aliases=
11590         cf_source=\`basename \$i\`
11591         inalias=\$cf_source
11592         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11593         if test ! -f \$inalias ; then
11594                 echo .. skipped \$cf_source
11595                 continue
11596         fi
11597 CF_EOF
11598
11599 if test "$MANPAGE_ALIASES" != no ; then
11600 cat >>$cf_edit_man <<CF_EOF
11601         nCurses=ignore.3x
11602         test $with_curses_h = yes && nCurses=ncurses.3x
11603         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11604 CF_EOF
11605 fi
11606
11607 if test "$MANPAGE_RENAMES" = no ; then
11608 cat >>$cf_edit_man <<CF_EOF
11609         # perform program transformations for section 1 man pages
11610         if test \$section = 1 ; then
11611                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11612         else
11613                 cf_target=\$cf_subdir\${section}/\$cf_source
11614         fi
11615 CF_EOF
11616 else
11617 cat >>$cf_edit_man <<CF_EOF
11618         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11619         if test -z "\$cf_target" ; then
11620                 echo '? missing rename for '\$cf_source
11621                 cf_target="\$cf_source"
11622         fi
11623         cf_target="\$cf_subdir\${section}/\${cf_target}"
11624
11625 CF_EOF
11626 fi
11627
11628 cat >>$cf_edit_man <<CF_EOF
11629         sed     -f $cf_man_alias \\
11630 CF_EOF
11631
11632 if test -f $MANPAGE_RENAMES ; then
11633 cat >>$cf_edit_man <<CF_EOF
11634                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11635 CF_EOF
11636 else
11637 cat >>$cf_edit_man <<CF_EOF
11638                 < \$i >\$TMP
11639 CF_EOF
11640 fi
11641
11642 cat >>$cf_edit_man <<CF_EOF
11643 if test \$cf_tables = yes ; then
11644         tbl \$TMP >\$TMP.out
11645         mv \$TMP.out \$TMP
11646 fi
11647 CF_EOF
11648
11649 if test $with_overwrite != yes ; then
11650 cat >>$cf_edit_man <<CF_EOF
11651         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11652         mv \$TMP.out \$TMP
11653 CF_EOF
11654 fi
11655
11656 if test $with_curses_h != yes ; then
11657 cat >>$cf_edit_man <<CF_EOF
11658         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11659         mv \$TMP.out \$TMP
11660 CF_EOF
11661 fi
11662
11663 cat >>$cf_edit_man <<CF_EOF
11664         if test \$form = format ; then
11665                 nroff -man \$TMP >\$TMP.out
11666                 mv \$TMP.out \$TMP
11667         fi
11668 CF_EOF
11669
11670 if test -n "$cf_compress" ; then
11671 cat >>$cf_edit_man <<CF_EOF
11672         if test \$verb = installing ; then
11673         if ( $cf_compress -f \$TMP )
11674         then
11675                 mv \$TMP.$cf_so_strip \$TMP
11676         fi
11677         fi
11678         cf_target="\$cf_target.$cf_so_strip"
11679 CF_EOF
11680 fi
11681
11682 case "$MANPAGE_FORMAT" in
11683 (*BSDI*)
11684 cat >>$cf_edit_man <<CF_EOF
11685         if test \$form = format ; then
11686                 # BSDI installs only .0 suffixes in the cat directories
11687                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11688         fi
11689 CF_EOF
11690   ;;
11691 esac
11692
11693 cat >>$cf_edit_man <<CF_EOF
11694         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11695         if test \$verb = installing ; then
11696                 echo \$verb \$cf_target
11697                 \$INSTALL_DATA \$TMP \$cf_target
11698                 test -d \$cf_subdir\${section} &&
11699                 test -n "\$aliases" && (
11700                         cd \$cf_subdir\${section} && (
11701                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11702                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11703                                 cf_target=\`basename \$cf_target\`
11704                                 for cf_alias in \$aliases
11705                                 do
11706                                         if test \$section = 1 ; then
11707                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11708                                         fi
11709
11710                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11711                                                 if test -f \$cf_alias\${suffix} ; then
11712                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11713                                                         then
11714                                                                 continue
11715                                                         fi
11716                                                 fi
11717                                                 echo .. \$verb alias \$cf_alias\${suffix}
11718 CF_EOF
11719 case "x$LN_S" in
11720 (*-f)
11721 cat >>$cf_edit_man <<CF_EOF
11722                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11723 CF_EOF
11724         ;;
11725 (*)
11726 cat >>$cf_edit_man <<CF_EOF
11727                                                 rm -f \$cf_alias\${suffix}
11728                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11729 CF_EOF
11730         ;;
11731 esac
11732 cat >>$cf_edit_man <<CF_EOF
11733                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11734                                                 echo ".so \$cf_source" >\$TMP
11735 CF_EOF
11736 if test -n "$cf_compress" ; then
11737 cat >>$cf_edit_man <<CF_EOF
11738                                                 if test -n "$cf_so_strip" ; then
11739                                                         $cf_compress -f \$TMP
11740                                                         mv \$TMP.$cf_so_strip \$TMP
11741                                                 fi
11742 CF_EOF
11743 fi
11744 cat >>$cf_edit_man <<CF_EOF
11745                                                 echo .. \$verb alias \$cf_alias\${suffix}
11746                                                 rm -f \$cf_alias\${suffix}
11747                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11748                                         fi
11749                                 done
11750                         )
11751                 )
11752         elif test \$verb = removing ; then
11753                 test -f \$cf_target && (
11754                         echo \$verb \$cf_target
11755                         rm -f \$cf_target
11756                 )
11757                 test -d \$cf_subdir\${section} &&
11758                 test -n "\$aliases" && (
11759                         cd \$cf_subdir\${section} && (
11760                                 for cf_alias in \$aliases
11761                                 do
11762                                         if test \$section = 1 ; then
11763                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11764                                         fi
11765
11766                                         echo .. \$verb alias \$cf_alias\${suffix}
11767                                         rm -f \$cf_alias\${suffix}
11768                                 done
11769                         )
11770                 )
11771         else
11772 #               echo ".hy 0"
11773                 cat \$TMP
11774         fi
11775         ;;
11776 esac
11777 done
11778
11779 if test $cf_inboth = yes ; then
11780 if test \$form != format ; then
11781         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11782 fi
11783 fi
11784
11785 exit 0
11786 CF_EOF
11787 chmod 755 $cf_edit_man
11788
11789 ###############################################################################
11790
11791 ### Note that some functions (such as const) are normally disabled anyway.
11792 echo "$as_me:11792: checking if you want to build with function extensions" >&5
11793 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11794
11795 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11796 if test "${enable_ext_funcs+set}" = set; then
11797   enableval="$enable_ext_funcs"
11798   with_ext_funcs=$enableval
11799 else
11800   with_ext_funcs=yes
11801 fi;
11802 echo "$as_me:11802: result: $with_ext_funcs" >&5
11803 echo "${ECHO_T}$with_ext_funcs" >&6
11804 if test "x$with_ext_funcs" = xyes ; then
11805         NCURSES_EXT_FUNCS=1
11806
11807 cat >>confdefs.h <<\EOF
11808 #define HAVE_ASSUME_DEFAULT_COLORS 1
11809 EOF
11810
11811 cat >>confdefs.h <<\EOF
11812 #define HAVE_CURSES_VERSION 1
11813 EOF
11814
11815 cat >>confdefs.h <<\EOF
11816 #define HAVE_HAS_KEY 1
11817 EOF
11818
11819 cat >>confdefs.h <<\EOF
11820 #define HAVE_RESIZETERM 1
11821 EOF
11822
11823 cat >>confdefs.h <<\EOF
11824 #define HAVE_RESIZE_TERM 1
11825 EOF
11826
11827 cat >>confdefs.h <<\EOF
11828 #define HAVE_TERM_ENTRY_H 1
11829 EOF
11830
11831 cat >>confdefs.h <<\EOF
11832 #define HAVE_USE_DEFAULT_COLORS 1
11833 EOF
11834
11835 cat >>confdefs.h <<\EOF
11836 #define HAVE_USE_EXTENDED_NAMES 1
11837 EOF
11838
11839 cat >>confdefs.h <<\EOF
11840 #define HAVE_USE_SCREEN 1
11841 EOF
11842
11843 cat >>confdefs.h <<\EOF
11844 #define HAVE_USE_WINDOW 1
11845 EOF
11846
11847 cat >>confdefs.h <<\EOF
11848 #define HAVE_WRESIZE 1
11849 EOF
11850
11851 cat >>confdefs.h <<\EOF
11852 #define NCURSES_EXT_FUNCS 1
11853 EOF
11854
11855         GENERATED_EXT_FUNCS=generated
11856 else
11857         NCURSES_EXT_FUNCS=0
11858         GENERATED_EXT_FUNCS=
11859 fi
11860
11861 echo "$as_me:11861: checking if you want to build with SCREEN extensions" >&5
11862 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11863
11864 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11865 if test "${enable_sp_funcs+set}" = set; then
11866   enableval="$enable_sp_funcs"
11867   with_sp_funcs=$enableval
11868 else
11869   with_sp_funcs=$cf_dft_ext_spfuncs
11870 fi;
11871 echo "$as_me:11871: result: $with_sp_funcs" >&5
11872 echo "${ECHO_T}$with_sp_funcs" >&6
11873 if test "x$with_sp_funcs" = xyes ; then
11874         NCURSES_SP_FUNCS=1
11875
11876 cat >>confdefs.h <<\EOF
11877 #define NCURSES_SP_FUNCS 1
11878 EOF
11879
11880         GENERATED_SP_FUNCS=generated
11881 else
11882         NCURSES_SP_FUNCS=0
11883         GENERATED_SP_FUNCS=
11884 fi
11885
11886 echo "$as_me:11886: checking if you want to build with terminal-driver" >&5
11887 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11888
11889 # Check whether --enable-term-driver or --disable-term-driver was given.
11890 if test "${enable_term_driver+set}" = set; then
11891   enableval="$enable_term_driver"
11892   with_term_driver=$enableval
11893 else
11894   with_term_driver=no
11895 fi;
11896 echo "$as_me:11896: result: $with_term_driver" >&5
11897 echo "${ECHO_T}$with_term_driver" >&6
11898 if test "x$with_term_driver" = xyes ; then
11899
11900 cat >>confdefs.h <<\EOF
11901 #define USE_TERM_DRIVER 1
11902 EOF
11903
11904         if test "x$with_termlib" != xno ; then
11905                 { { echo "$as_me:11905: error: The term-driver option conflicts with the termlib option" >&5
11906 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11907    { (exit 1); exit 1; }; }
11908         fi
11909         if test "x$with_sp_funcs" != xyes ; then
11910                 { { echo "$as_me:11910: error: The term-driver option relies upon sp-funcs" >&5
11911 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11912    { (exit 1); exit 1; }; }
11913         fi
11914 fi
11915
11916 ###   use option --enable-const to turn on use of const beyond that in XSI.
11917 echo "$as_me:11917: checking for extended use of const keyword" >&5
11918 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11919
11920 # Check whether --enable-const or --disable-const was given.
11921 if test "${enable_const+set}" = set; then
11922   enableval="$enable_const"
11923   with_ext_const=$enableval
11924 else
11925   with_ext_const=$cf_dft_ext_const
11926 fi;
11927 echo "$as_me:11927: result: $with_ext_const" >&5
11928 echo "${ECHO_T}$with_ext_const" >&6
11929 NCURSES_CONST='/*nothing*/'
11930 if test "x$with_ext_const" = xyes ; then
11931         NCURSES_CONST=const
11932 fi
11933
11934 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11935 echo "$as_me:11935: checking if you want to use extended colors" >&5
11936 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11937
11938 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11939 if test "${enable_ext_colors+set}" = set; then
11940   enableval="$enable_ext_colors"
11941   with_ext_colors=$enableval
11942 else
11943   with_ext_colors=$cf_dft_ext_colors
11944 fi;
11945 echo "$as_me:11945: result: $with_ext_colors" >&5
11946 echo "${ECHO_T}$with_ext_colors" >&6
11947 NCURSES_EXT_COLORS=0
11948 if test "x$with_ext_colors" = xyes ; then
11949         if test "x$with_widec" != xyes ; then
11950                 { echo "$as_me:11950: WARNING: This option applies only to wide-character library" >&5
11951 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11952         else
11953                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11954
11955 if test "${with_abi_version+set}" != set; then
11956         case $cf_cv_rel_version in
11957         (5.*)
11958                 cf_cv_rel_version=6.0
11959                 cf_cv_abi_version=6
11960                 { echo "$as_me:11960: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11961 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11962                 ;;
11963         esac
11964 fi
11965
11966                 NCURSES_EXT_COLORS=1
11967
11968 cat >>confdefs.h <<\EOF
11969 #define NCURSES_EXT_COLORS 1
11970 EOF
11971
11972         fi
11973 fi
11974
11975 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11976 echo "$as_me:11976: checking if you want to use extended mouse encoding" >&5
11977 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11978
11979 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11980 if test "${enable_ext_mouse+set}" = set; then
11981   enableval="$enable_ext_mouse"
11982   with_ext_mouse=$enableval
11983 else
11984   with_ext_mouse=$cf_dft_ext_mouse
11985 fi;
11986 echo "$as_me:11986: result: $with_ext_mouse" >&5
11987 echo "${ECHO_T}$with_ext_mouse" >&6
11988 NCURSES_MOUSE_VERSION=1
11989 if test "x$with_ext_mouse" = xyes ; then
11990         NCURSES_MOUSE_VERSION=2
11991
11992 if test "${with_abi_version+set}" != set; then
11993         case $cf_cv_rel_version in
11994         (5.*)
11995                 cf_cv_rel_version=6.0
11996                 cf_cv_abi_version=6
11997                 { echo "$as_me:11997: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11998 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11999                 ;;
12000         esac
12001 fi
12002
12003 fi
12004
12005 ###   use option --enable-ext-putwin to turn on extended screendumps
12006 echo "$as_me:12006: checking if you want to use extended putwin/screendump" >&5
12007 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12008
12009 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12010 if test "${enable_ext_putwin+set}" = set; then
12011   enableval="$enable_ext_putwin"
12012   with_ext_putwin=$enableval
12013 else
12014   with_ext_putwin=$cf_dft_ext_putwin
12015 fi;
12016 echo "$as_me:12016: result: $with_ext_putwin" >&5
12017 echo "${ECHO_T}$with_ext_putwin" >&6
12018 if test "x$with_ext_putwin" = xyes ; then
12019
12020 cat >>confdefs.h <<\EOF
12021 #define NCURSES_EXT_PUTWIN 1
12022 EOF
12023
12024 fi
12025
12026 echo "$as_me:12026: checking if you want \$NCURSES_NO_PADDING code" >&5
12027 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12028
12029 # Check whether --enable-no-padding or --disable-no-padding was given.
12030 if test "${enable_no_padding+set}" = set; then
12031   enableval="$enable_no_padding"
12032   with_no_padding=$enableval
12033 else
12034   with_no_padding=$with_ext_funcs
12035 fi;
12036 echo "$as_me:12036: result: $with_no_padding" >&5
12037 echo "${ECHO_T}$with_no_padding" >&6
12038 test "x$with_no_padding" = xyes &&
12039 cat >>confdefs.h <<\EOF
12040 #define NCURSES_NO_PADDING 1
12041 EOF
12042
12043 echo "$as_me:12043: checking for ANSI C header files" >&5
12044 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12045 if test "${ac_cv_header_stdc+set}" = set; then
12046   echo $ECHO_N "(cached) $ECHO_C" >&6
12047 else
12048   cat >conftest.$ac_ext <<_ACEOF
12049 #line 12049 "configure"
12050 #include "confdefs.h"
12051 #include <stdlib.h>
12052 #include <stdarg.h>
12053 #include <string.h>
12054 #include <float.h>
12055
12056 _ACEOF
12057 if { (eval echo "$as_me:12057: \"$ac_cpp conftest.$ac_ext\"") >&5
12058   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12059   ac_status=$?
12060   egrep -v '^ *\+' conftest.er1 >conftest.err
12061   rm -f conftest.er1
12062   cat conftest.err >&5
12063   echo "$as_me:12063: \$? = $ac_status" >&5
12064   (exit $ac_status); } >/dev/null; then
12065   if test -s conftest.err; then
12066     ac_cpp_err=$ac_c_preproc_warn_flag
12067   else
12068     ac_cpp_err=
12069   fi
12070 else
12071   ac_cpp_err=yes
12072 fi
12073 if test -z "$ac_cpp_err"; then
12074   ac_cv_header_stdc=yes
12075 else
12076   echo "$as_me: failed program was:" >&5
12077   cat conftest.$ac_ext >&5
12078   ac_cv_header_stdc=no
12079 fi
12080 rm -f conftest.err conftest.$ac_ext
12081
12082 if test $ac_cv_header_stdc = yes; then
12083   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12084   cat >conftest.$ac_ext <<_ACEOF
12085 #line 12085 "configure"
12086 #include "confdefs.h"
12087 #include <string.h>
12088
12089 _ACEOF
12090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12091   egrep "memchr" >/dev/null 2>&1; then
12092   :
12093 else
12094   ac_cv_header_stdc=no
12095 fi
12096 rm -rf conftest*
12097
12098 fi
12099
12100 if test $ac_cv_header_stdc = yes; then
12101   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12102   cat >conftest.$ac_ext <<_ACEOF
12103 #line 12103 "configure"
12104 #include "confdefs.h"
12105 #include <stdlib.h>
12106
12107 _ACEOF
12108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12109   egrep "free" >/dev/null 2>&1; then
12110   :
12111 else
12112   ac_cv_header_stdc=no
12113 fi
12114 rm -rf conftest*
12115
12116 fi
12117
12118 if test $ac_cv_header_stdc = yes; then
12119   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12120   if test "$cross_compiling" = yes; then
12121   :
12122 else
12123   cat >conftest.$ac_ext <<_ACEOF
12124 #line 12124 "configure"
12125 #include "confdefs.h"
12126 #include <ctype.h>
12127 #if ((' ' & 0x0FF) == 0x020)
12128 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12129 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12130 #else
12131 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12132                      || ('j' <= (c) && (c) <= 'r') \
12133                      || ('s' <= (c) && (c) <= 'z'))
12134 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12135 #endif
12136
12137 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12138 int
12139 main ()
12140 {
12141   int i;
12142   for (i = 0; i < 256; i++)
12143     if (XOR (islower (i), ISLOWER (i))
12144         || toupper (i) != TOUPPER (i))
12145       $ac_main_return(2);
12146   $ac_main_return (0);
12147 }
12148 _ACEOF
12149 rm -f conftest$ac_exeext
12150 if { (eval echo "$as_me:12150: \"$ac_link\"") >&5
12151   (eval $ac_link) 2>&5
12152   ac_status=$?
12153   echo "$as_me:12153: \$? = $ac_status" >&5
12154   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12155   { (eval echo "$as_me:12155: \"$ac_try\"") >&5
12156   (eval $ac_try) 2>&5
12157   ac_status=$?
12158   echo "$as_me:12158: \$? = $ac_status" >&5
12159   (exit $ac_status); }; }; then
12160   :
12161 else
12162   echo "$as_me: program exited with status $ac_status" >&5
12163 echo "$as_me: failed program was:" >&5
12164 cat conftest.$ac_ext >&5
12165 ac_cv_header_stdc=no
12166 fi
12167 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12168 fi
12169 fi
12170 fi
12171 echo "$as_me:12171: result: $ac_cv_header_stdc" >&5
12172 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12173 if test $ac_cv_header_stdc = yes; then
12174
12175 cat >>confdefs.h <<\EOF
12176 #define STDC_HEADERS 1
12177 EOF
12178
12179 fi
12180
12181 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12182
12183 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12184                   inttypes.h stdint.h unistd.h
12185 do
12186 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12187 echo "$as_me:12187: checking for $ac_header" >&5
12188 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12189 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12190   echo $ECHO_N "(cached) $ECHO_C" >&6
12191 else
12192   cat >conftest.$ac_ext <<_ACEOF
12193 #line 12193 "configure"
12194 #include "confdefs.h"
12195 $ac_includes_default
12196 #include <$ac_header>
12197 _ACEOF
12198 rm -f conftest.$ac_objext
12199 if { (eval echo "$as_me:12199: \"$ac_compile\"") >&5
12200   (eval $ac_compile) 2>&5
12201   ac_status=$?
12202   echo "$as_me:12202: \$? = $ac_status" >&5
12203   (exit $ac_status); } &&
12204          { ac_try='test -s conftest.$ac_objext'
12205   { (eval echo "$as_me:12205: \"$ac_try\"") >&5
12206   (eval $ac_try) 2>&5
12207   ac_status=$?
12208   echo "$as_me:12208: \$? = $ac_status" >&5
12209   (exit $ac_status); }; }; then
12210   eval "$as_ac_Header=yes"
12211 else
12212   echo "$as_me: failed program was:" >&5
12213 cat conftest.$ac_ext >&5
12214 eval "$as_ac_Header=no"
12215 fi
12216 rm -f conftest.$ac_objext conftest.$ac_ext
12217 fi
12218 echo "$as_me:12218: result: `eval echo '${'$as_ac_Header'}'`" >&5
12219 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12220 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12221   cat >>confdefs.h <<EOF
12222 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12223 EOF
12224
12225 fi
12226 done
12227
12228 echo "$as_me:12228: checking for signed char" >&5
12229 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12230 if test "${ac_cv_type_signed_char+set}" = set; then
12231   echo $ECHO_N "(cached) $ECHO_C" >&6
12232 else
12233   cat >conftest.$ac_ext <<_ACEOF
12234 #line 12234 "configure"
12235 #include "confdefs.h"
12236 $ac_includes_default
12237 int
12238 main ()
12239 {
12240 if ((signed char *) 0)
12241   return 0;
12242 if (sizeof (signed char))
12243   return 0;
12244   ;
12245   return 0;
12246 }
12247 _ACEOF
12248 rm -f conftest.$ac_objext
12249 if { (eval echo "$as_me:12249: \"$ac_compile\"") >&5
12250   (eval $ac_compile) 2>&5
12251   ac_status=$?
12252   echo "$as_me:12252: \$? = $ac_status" >&5
12253   (exit $ac_status); } &&
12254          { ac_try='test -s conftest.$ac_objext'
12255   { (eval echo "$as_me:12255: \"$ac_try\"") >&5
12256   (eval $ac_try) 2>&5
12257   ac_status=$?
12258   echo "$as_me:12258: \$? = $ac_status" >&5
12259   (exit $ac_status); }; }; then
12260   ac_cv_type_signed_char=yes
12261 else
12262   echo "$as_me: failed program was:" >&5
12263 cat conftest.$ac_ext >&5
12264 ac_cv_type_signed_char=no
12265 fi
12266 rm -f conftest.$ac_objext conftest.$ac_ext
12267 fi
12268 echo "$as_me:12268: result: $ac_cv_type_signed_char" >&5
12269 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12270
12271 echo "$as_me:12271: checking size of signed char" >&5
12272 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12273 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12274   echo $ECHO_N "(cached) $ECHO_C" >&6
12275 else
12276   if test "$ac_cv_type_signed_char" = yes; then
12277   if test "$cross_compiling" = yes; then
12278   # Depending upon the size, compute the lo and hi bounds.
12279 cat >conftest.$ac_ext <<_ACEOF
12280 #line 12280 "configure"
12281 #include "confdefs.h"
12282 $ac_includes_default
12283 int
12284 main ()
12285 {
12286 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12287   ;
12288   return 0;
12289 }
12290 _ACEOF
12291 rm -f conftest.$ac_objext
12292 if { (eval echo "$as_me:12292: \"$ac_compile\"") >&5
12293   (eval $ac_compile) 2>&5
12294   ac_status=$?
12295   echo "$as_me:12295: \$? = $ac_status" >&5
12296   (exit $ac_status); } &&
12297          { ac_try='test -s conftest.$ac_objext'
12298   { (eval echo "$as_me:12298: \"$ac_try\"") >&5
12299   (eval $ac_try) 2>&5
12300   ac_status=$?
12301   echo "$as_me:12301: \$? = $ac_status" >&5
12302   (exit $ac_status); }; }; then
12303   ac_lo=0 ac_mid=0
12304   while :; do
12305     cat >conftest.$ac_ext <<_ACEOF
12306 #line 12306 "configure"
12307 #include "confdefs.h"
12308 $ac_includes_default
12309 int
12310 main ()
12311 {
12312 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12313   ;
12314   return 0;
12315 }
12316 _ACEOF
12317 rm -f conftest.$ac_objext
12318 if { (eval echo "$as_me:12318: \"$ac_compile\"") >&5
12319   (eval $ac_compile) 2>&5
12320   ac_status=$?
12321   echo "$as_me:12321: \$? = $ac_status" >&5
12322   (exit $ac_status); } &&
12323          { ac_try='test -s conftest.$ac_objext'
12324   { (eval echo "$as_me:12324: \"$ac_try\"") >&5
12325   (eval $ac_try) 2>&5
12326   ac_status=$?
12327   echo "$as_me:12327: \$? = $ac_status" >&5
12328   (exit $ac_status); }; }; then
12329   ac_hi=$ac_mid; break
12330 else
12331   echo "$as_me: failed program was:" >&5
12332 cat conftest.$ac_ext >&5
12333 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12334 fi
12335 rm -f conftest.$ac_objext conftest.$ac_ext
12336   done
12337 else
12338   echo "$as_me: failed program was:" >&5
12339 cat conftest.$ac_ext >&5
12340 ac_hi=-1 ac_mid=-1
12341   while :; do
12342     cat >conftest.$ac_ext <<_ACEOF
12343 #line 12343 "configure"
12344 #include "confdefs.h"
12345 $ac_includes_default
12346 int
12347 main ()
12348 {
12349 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12350   ;
12351   return 0;
12352 }
12353 _ACEOF
12354 rm -f conftest.$ac_objext
12355 if { (eval echo "$as_me:12355: \"$ac_compile\"") >&5
12356   (eval $ac_compile) 2>&5
12357   ac_status=$?
12358   echo "$as_me:12358: \$? = $ac_status" >&5
12359   (exit $ac_status); } &&
12360          { ac_try='test -s conftest.$ac_objext'
12361   { (eval echo "$as_me:12361: \"$ac_try\"") >&5
12362   (eval $ac_try) 2>&5
12363   ac_status=$?
12364   echo "$as_me:12364: \$? = $ac_status" >&5
12365   (exit $ac_status); }; }; then
12366   ac_lo=$ac_mid; break
12367 else
12368   echo "$as_me: failed program was:" >&5
12369 cat conftest.$ac_ext >&5
12370 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12371 fi
12372 rm -f conftest.$ac_objext conftest.$ac_ext
12373   done
12374 fi
12375 rm -f conftest.$ac_objext conftest.$ac_ext
12376 # Binary search between lo and hi bounds.
12377 while test "x$ac_lo" != "x$ac_hi"; do
12378   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12379   cat >conftest.$ac_ext <<_ACEOF
12380 #line 12380 "configure"
12381 #include "confdefs.h"
12382 $ac_includes_default
12383 int
12384 main ()
12385 {
12386 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12387   ;
12388   return 0;
12389 }
12390 _ACEOF
12391 rm -f conftest.$ac_objext
12392 if { (eval echo "$as_me:12392: \"$ac_compile\"") >&5
12393   (eval $ac_compile) 2>&5
12394   ac_status=$?
12395   echo "$as_me:12395: \$? = $ac_status" >&5
12396   (exit $ac_status); } &&
12397          { ac_try='test -s conftest.$ac_objext'
12398   { (eval echo "$as_me:12398: \"$ac_try\"") >&5
12399   (eval $ac_try) 2>&5
12400   ac_status=$?
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); }; }; then
12403   ac_hi=$ac_mid
12404 else
12405   echo "$as_me: failed program was:" >&5
12406 cat conftest.$ac_ext >&5
12407 ac_lo=`expr $ac_mid + 1`
12408 fi
12409 rm -f conftest.$ac_objext conftest.$ac_ext
12410 done
12411 ac_cv_sizeof_signed_char=$ac_lo
12412 else
12413   if test "$cross_compiling" = yes; then
12414   { { echo "$as_me:12414: error: cannot run test program while cross compiling" >&5
12415 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12416    { (exit 1); exit 1; }; }
12417 else
12418   cat >conftest.$ac_ext <<_ACEOF
12419 #line 12419 "configure"
12420 #include "confdefs.h"
12421 $ac_includes_default
12422 int
12423 main ()
12424 {
12425 FILE *f = fopen ("conftest.val", "w");
12426 if (!f)
12427   $ac_main_return (1);
12428 fprintf (f, "%d", (sizeof (signed char)));
12429 fclose (f);
12430   ;
12431   return 0;
12432 }
12433 _ACEOF
12434 rm -f conftest$ac_exeext
12435 if { (eval echo "$as_me:12435: \"$ac_link\"") >&5
12436   (eval $ac_link) 2>&5
12437   ac_status=$?
12438   echo "$as_me:12438: \$? = $ac_status" >&5
12439   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12440   { (eval echo "$as_me:12440: \"$ac_try\"") >&5
12441   (eval $ac_try) 2>&5
12442   ac_status=$?
12443   echo "$as_me:12443: \$? = $ac_status" >&5
12444   (exit $ac_status); }; }; then
12445   ac_cv_sizeof_signed_char=`cat conftest.val`
12446 else
12447   echo "$as_me: program exited with status $ac_status" >&5
12448 echo "$as_me: failed program was:" >&5
12449 cat conftest.$ac_ext >&5
12450 fi
12451 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12452 fi
12453 fi
12454 rm -f conftest.val
12455 else
12456   ac_cv_sizeof_signed_char=0
12457 fi
12458 fi
12459 echo "$as_me:12459: result: $ac_cv_sizeof_signed_char" >&5
12460 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12461 cat >>confdefs.h <<EOF
12462 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12463 EOF
12464
12465 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12466         NCURSES_SBOOL="signed char"
12467 else
12468         NCURSES_SBOOL="char"
12469 fi
12470 echo "$as_me:12470: checking if you want to use signed Boolean array in term.h" >&5
12471 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12472
12473 # Check whether --enable-signed-char or --disable-signed-char was given.
12474 if test "${enable_signed_char+set}" = set; then
12475   enableval="$enable_signed_char"
12476   with_signed_char=$enableval
12477 else
12478   with_signed_char=no
12479 fi;
12480 echo "$as_me:12480: result: $with_signed_char" >&5
12481 echo "${ECHO_T}$with_signed_char" >&6
12482 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12483
12484 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12485 echo "$as_me:12485: checking if you want SIGWINCH handler" >&5
12486 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12487
12488 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12489 if test "${enable_sigwinch+set}" = set; then
12490   enableval="$enable_sigwinch"
12491   with_sigwinch=$enableval
12492 else
12493   with_sigwinch=$with_ext_funcs
12494 fi;
12495 echo "$as_me:12495: result: $with_sigwinch" >&5
12496 echo "${ECHO_T}$with_sigwinch" >&6
12497 test "x$with_sigwinch" = xyes &&
12498 cat >>confdefs.h <<\EOF
12499 #define USE_SIGWINCH 1
12500 EOF
12501
12502 ###   use option --enable-tcap-names to allow user to define new capabilities
12503 echo "$as_me:12503: checking if you want user-definable terminal capabilities like termcap" >&5
12504 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12505
12506 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12507 if test "${enable_tcap_names+set}" = set; then
12508   enableval="$enable_tcap_names"
12509   with_tcap_names=$enableval
12510 else
12511   with_tcap_names=$with_ext_funcs
12512 fi;
12513 echo "$as_me:12513: result: $with_tcap_names" >&5
12514 echo "${ECHO_T}$with_tcap_names" >&6
12515 NCURSES_XNAMES=0
12516 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12517
12518 ###############################################################################
12519 # These options are relatively safe to experiment with.
12520
12521 echo "$as_me:12521: checking if you want all development code" >&5
12522 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12523
12524 # Check whether --with-develop or --without-develop was given.
12525 if test "${with_develop+set}" = set; then
12526   withval="$with_develop"
12527   with_develop=$withval
12528 else
12529   with_develop=no
12530 fi;
12531 echo "$as_me:12531: result: $with_develop" >&5
12532 echo "${ECHO_T}$with_develop" >&6
12533
12534 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12535 echo "$as_me:12535: checking if you want hard-tabs code" >&5
12536 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12537
12538 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12539 if test "${enable_hard_tabs+set}" = set; then
12540   enableval="$enable_hard_tabs"
12541
12542 else
12543   enable_hard_tabs=$with_develop
12544 fi;
12545 echo "$as_me:12545: result: $enable_hard_tabs" >&5
12546 echo "${ECHO_T}$enable_hard_tabs" >&6
12547 test "x$enable_hard_tabs" = xyes &&
12548 cat >>confdefs.h <<\EOF
12549 #define USE_HARD_TABS 1
12550 EOF
12551
12552 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12553 echo "$as_me:12553: checking if you want limited support for xmc" >&5
12554 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12555
12556 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12557 if test "${enable_xmc_glitch+set}" = set; then
12558   enableval="$enable_xmc_glitch"
12559
12560 else
12561   enable_xmc_glitch=$with_develop
12562 fi;
12563 echo "$as_me:12563: result: $enable_xmc_glitch" >&5
12564 echo "${ECHO_T}$enable_xmc_glitch" >&6
12565 test "x$enable_xmc_glitch" = xyes &&
12566 cat >>confdefs.h <<\EOF
12567 #define USE_XMC_SUPPORT 1
12568 EOF
12569
12570 ###############################################################################
12571 # These are just experimental, probably should not be in a package:
12572
12573 echo "$as_me:12573: checking if you do not want to assume colors are white-on-black" >&5
12574 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12575
12576 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12577 if test "${enable_assumed_color+set}" = set; then
12578   enableval="$enable_assumed_color"
12579   with_assumed_color=$enableval
12580 else
12581   with_assumed_color=yes
12582 fi;
12583 echo "$as_me:12583: result: $with_assumed_color" >&5
12584 echo "${ECHO_T}$with_assumed_color" >&6
12585 test "x$with_assumed_color" = xyes &&
12586 cat >>confdefs.h <<\EOF
12587 #define USE_ASSUMED_COLOR 1
12588 EOF
12589
12590 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12591 echo "$as_me:12591: checking if you want hashmap scrolling-optimization code" >&5
12592 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12593
12594 # Check whether --enable-hashmap or --disable-hashmap was given.
12595 if test "${enable_hashmap+set}" = set; then
12596   enableval="$enable_hashmap"
12597   with_hashmap=$enableval
12598 else
12599   with_hashmap=yes
12600 fi;
12601 echo "$as_me:12601: result: $with_hashmap" >&5
12602 echo "${ECHO_T}$with_hashmap" >&6
12603 test "x$with_hashmap" = xyes &&
12604 cat >>confdefs.h <<\EOF
12605 #define USE_HASHMAP 1
12606 EOF
12607
12608 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12609 echo "$as_me:12609: checking if you want colorfgbg code" >&5
12610 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12611
12612 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12613 if test "${enable_colorfgbg+set}" = set; then
12614   enableval="$enable_colorfgbg"
12615   with_colorfgbg=$enableval
12616 else
12617   with_colorfgbg=no
12618 fi;
12619 echo "$as_me:12619: result: $with_colorfgbg" >&5
12620 echo "${ECHO_T}$with_colorfgbg" >&6
12621 test "x$with_colorfgbg" = xyes &&
12622 cat >>confdefs.h <<\EOF
12623 #define USE_COLORFGBG 1
12624 EOF
12625
12626 ###   use option --enable-interop to turn on use of bindings used for interop
12627 echo "$as_me:12627: checking if you want interop bindings" >&5
12628 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12629
12630 # Check whether --enable-interop or --disable-interop was given.
12631 if test "${enable_interop+set}" = set; then
12632   enableval="$enable_interop"
12633   with_exp_interop=$enableval
12634 else
12635   with_exp_interop=$cf_dft_interop
12636 fi;
12637 echo "$as_me:12637: result: $with_exp_interop" >&5
12638 echo "${ECHO_T}$with_exp_interop" >&6
12639
12640 NCURSES_INTEROP_FUNCS=0
12641 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12642
12643 # This is still experimental (20080329), but should ultimately be moved to
12644 # the script-block --with-normal, etc.
12645
12646 echo "$as_me:12646: checking if you want to link with the pthread library" >&5
12647 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12648
12649 # Check whether --with-pthread or --without-pthread was given.
12650 if test "${with_pthread+set}" = set; then
12651   withval="$with_pthread"
12652   with_pthread=$withval
12653 else
12654   with_pthread=no
12655 fi;
12656 echo "$as_me:12656: result: $with_pthread" >&5
12657 echo "${ECHO_T}$with_pthread" >&6
12658
12659 if test "$with_pthread" != no ; then
12660         echo "$as_me:12660: checking for pthread.h" >&5
12661 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12662 if test "${ac_cv_header_pthread_h+set}" = set; then
12663   echo $ECHO_N "(cached) $ECHO_C" >&6
12664 else
12665   cat >conftest.$ac_ext <<_ACEOF
12666 #line 12666 "configure"
12667 #include "confdefs.h"
12668 #include <pthread.h>
12669 _ACEOF
12670 if { (eval echo "$as_me:12670: \"$ac_cpp conftest.$ac_ext\"") >&5
12671   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12672   ac_status=$?
12673   egrep -v '^ *\+' conftest.er1 >conftest.err
12674   rm -f conftest.er1
12675   cat conftest.err >&5
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); } >/dev/null; then
12678   if test -s conftest.err; then
12679     ac_cpp_err=$ac_c_preproc_warn_flag
12680   else
12681     ac_cpp_err=
12682   fi
12683 else
12684   ac_cpp_err=yes
12685 fi
12686 if test -z "$ac_cpp_err"; then
12687   ac_cv_header_pthread_h=yes
12688 else
12689   echo "$as_me: failed program was:" >&5
12690   cat conftest.$ac_ext >&5
12691   ac_cv_header_pthread_h=no
12692 fi
12693 rm -f conftest.err conftest.$ac_ext
12694 fi
12695 echo "$as_me:12695: result: $ac_cv_header_pthread_h" >&5
12696 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12697 if test $ac_cv_header_pthread_h = yes; then
12698
12699 cat >>confdefs.h <<\EOF
12700 #define HAVE_PTHREADS_H 1
12701 EOF
12702
12703         for cf_lib_pthread in pthread c_r
12704         do
12705             echo "$as_me:12705: checking if we can link with the $cf_lib_pthread library" >&5
12706 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12707             cf_save_LIBS="$LIBS"
12708
12709 cf_add_libs="-l$cf_lib_pthread"
12710 # Filter out duplicates - this happens with badly-designed ".pc" files...
12711 for cf_add_1lib in $LIBS
12712 do
12713         for cf_add_2lib in $cf_add_libs
12714         do
12715                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12716                 then
12717                         cf_add_1lib=
12718                         break
12719                 fi
12720         done
12721         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12722 done
12723 LIBS="$cf_add_libs"
12724
12725             cat >conftest.$ac_ext <<_ACEOF
12726 #line 12726 "configure"
12727 #include "confdefs.h"
12728
12729 #include <pthread.h>
12730
12731 int
12732 main ()
12733 {
12734
12735                 int rc = pthread_create(0,0,0,0);
12736                 int r2 = pthread_mutexattr_settype(0, 0);
12737
12738   ;
12739   return 0;
12740 }
12741 _ACEOF
12742 rm -f conftest.$ac_objext conftest$ac_exeext
12743 if { (eval echo "$as_me:12743: \"$ac_link\"") >&5
12744   (eval $ac_link) 2>&5
12745   ac_status=$?
12746   echo "$as_me:12746: \$? = $ac_status" >&5
12747   (exit $ac_status); } &&
12748          { ac_try='test -s conftest$ac_exeext'
12749   { (eval echo "$as_me:12749: \"$ac_try\"") >&5
12750   (eval $ac_try) 2>&5
12751   ac_status=$?
12752   echo "$as_me:12752: \$? = $ac_status" >&5
12753   (exit $ac_status); }; }; then
12754   with_pthread=yes
12755 else
12756   echo "$as_me: failed program was:" >&5
12757 cat conftest.$ac_ext >&5
12758 with_pthread=no
12759 fi
12760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12761             LIBS="$cf_save_LIBS"
12762             echo "$as_me:12762: result: $with_pthread" >&5
12763 echo "${ECHO_T}$with_pthread" >&6
12764             test "$with_pthread" = yes && break
12765         done
12766
12767         if test "$with_pthread" = yes ; then
12768
12769 cf_add_libs="-l$cf_lib_pthread"
12770 # Filter out duplicates - this happens with badly-designed ".pc" files...
12771 for cf_add_1lib in $LIBS
12772 do
12773         for cf_add_2lib in $cf_add_libs
12774         do
12775                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12776                 then
12777                         cf_add_1lib=
12778                         break
12779                 fi
12780         done
12781         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12782 done
12783 LIBS="$cf_add_libs"
12784
12785 cat >>confdefs.h <<\EOF
12786 #define HAVE_LIBPTHREADS 1
12787 EOF
12788
12789         else
12790             { { echo "$as_me:12790: error: Cannot link with pthread library" >&5
12791 echo "$as_me: error: Cannot link with pthread library" >&2;}
12792    { (exit 1); exit 1; }; }
12793         fi
12794
12795 fi
12796
12797 fi
12798
12799 if test "x$with_pthread" != xno; then
12800         echo "$as_me:12800: checking for pthread_kill" >&5
12801 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12802 if test "${ac_cv_func_pthread_kill+set}" = set; then
12803   echo $ECHO_N "(cached) $ECHO_C" >&6
12804 else
12805   cat >conftest.$ac_ext <<_ACEOF
12806 #line 12806 "configure"
12807 #include "confdefs.h"
12808 /* System header to define __stub macros and hopefully few prototypes,
12809     which can conflict with char pthread_kill (); below.  */
12810 #include <assert.h>
12811 /* Override any gcc2 internal prototype to avoid an error.  */
12812 #ifdef __cplusplus
12813 extern "C"
12814 #endif
12815 /* We use char because int might match the return type of a gcc2
12816    builtin and then its argument prototype would still apply.  */
12817 char pthread_kill ();
12818 char (*f) ();
12819
12820 int
12821 main ()
12822 {
12823 /* The GNU C library defines this for functions which it implements
12824     to always fail with ENOSYS.  Some functions are actually named
12825     something starting with __ and the normal name is an alias.  */
12826 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12827 choke me
12828 #else
12829 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12830 #endif
12831
12832   ;
12833   return 0;
12834 }
12835 _ACEOF
12836 rm -f conftest.$ac_objext conftest$ac_exeext
12837 if { (eval echo "$as_me:12837: \"$ac_link\"") >&5
12838   (eval $ac_link) 2>&5
12839   ac_status=$?
12840   echo "$as_me:12840: \$? = $ac_status" >&5
12841   (exit $ac_status); } &&
12842          { ac_try='test -s conftest$ac_exeext'
12843   { (eval echo "$as_me:12843: \"$ac_try\"") >&5
12844   (eval $ac_try) 2>&5
12845   ac_status=$?
12846   echo "$as_me:12846: \$? = $ac_status" >&5
12847   (exit $ac_status); }; }; then
12848   ac_cv_func_pthread_kill=yes
12849 else
12850   echo "$as_me: failed program was:" >&5
12851 cat conftest.$ac_ext >&5
12852 ac_cv_func_pthread_kill=no
12853 fi
12854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12855 fi
12856 echo "$as_me:12856: result: $ac_cv_func_pthread_kill" >&5
12857 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12858 if test $ac_cv_func_pthread_kill = yes; then
12859
12860                 echo "$as_me:12860: checking if you want to allow EINTR in wgetch with pthreads" >&5
12861 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12862
12863 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12864 if test "${enable_pthreads_eintr+set}" = set; then
12865   enableval="$enable_pthreads_eintr"
12866   use_pthreads_eintr=$enableval
12867 else
12868   use_pthreads_eintr=no
12869 fi;
12870                 echo "$as_me:12870: result: $use_pthreads_eintr" >&5
12871 echo "${ECHO_T}$use_pthreads_eintr" >&6
12872                 if test "x$use_pthreads_eintr" = xyes ; then
12873
12874 cat >>confdefs.h <<\EOF
12875 #define USE_PTHREADS_EINTR 1
12876 EOF
12877
12878                 fi
12879 fi
12880
12881         echo "$as_me:12881: checking if you want to use weak-symbols for pthreads" >&5
12882 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12883
12884 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12885 if test "${enable_weak_symbols+set}" = set; then
12886   enableval="$enable_weak_symbols"
12887   use_weak_symbols=$enableval
12888 else
12889   use_weak_symbols=no
12890 fi;
12891         echo "$as_me:12891: result: $use_weak_symbols" >&5
12892 echo "${ECHO_T}$use_weak_symbols" >&6
12893         if test "x$use_weak_symbols" = xyes ; then
12894
12895 echo "$as_me:12895: checking if $CC supports weak symbols" >&5
12896 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12897 if test "${cf_cv_weak_symbols+set}" = set; then
12898   echo $ECHO_N "(cached) $ECHO_C" >&6
12899 else
12900
12901 cat >conftest.$ac_ext <<_ACEOF
12902 #line 12902 "configure"
12903 #include "confdefs.h"
12904
12905 #include <stdio.h>
12906 int
12907 main ()
12908 {
12909
12910 #if defined(__GNUC__)
12911 #  if defined __USE_ISOC99
12912 #    define _cat_pragma(exp)    _Pragma(#exp)
12913 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12914 #  else
12915 #    define _weak_pragma(exp)
12916 #  endif
12917 #  define _declare(name)        __extension__ extern __typeof__(name) name
12918 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12919 #endif
12920
12921 weak_symbol(fopen);
12922
12923   ;
12924   return 0;
12925 }
12926 _ACEOF
12927 rm -f conftest.$ac_objext
12928 if { (eval echo "$as_me:12928: \"$ac_compile\"") >&5
12929   (eval $ac_compile) 2>&5
12930   ac_status=$?
12931   echo "$as_me:12931: \$? = $ac_status" >&5
12932   (exit $ac_status); } &&
12933          { ac_try='test -s conftest.$ac_objext'
12934   { (eval echo "$as_me:12934: \"$ac_try\"") >&5
12935   (eval $ac_try) 2>&5
12936   ac_status=$?
12937   echo "$as_me:12937: \$? = $ac_status" >&5
12938   (exit $ac_status); }; }; then
12939   cf_cv_weak_symbols=yes
12940 else
12941   echo "$as_me: failed program was:" >&5
12942 cat conftest.$ac_ext >&5
12943 cf_cv_weak_symbols=no
12944 fi
12945 rm -f conftest.$ac_objext conftest.$ac_ext
12946
12947 fi
12948 echo "$as_me:12948: result: $cf_cv_weak_symbols" >&5
12949 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12950
12951         else
12952                 cf_cv_weak_symbols=no
12953         fi
12954
12955         if test "x$cf_cv_weak_symbols" = xyes ; then
12956
12957 cat >>confdefs.h <<\EOF
12958 #define USE_WEAK_SYMBOLS 1
12959 EOF
12960
12961         fi
12962 fi
12963
12964 PTHREAD=
12965 if test "x$with_pthread" = "xyes" ; then
12966
12967 cat >>confdefs.h <<\EOF
12968 #define USE_PTHREADS 1
12969 EOF
12970
12971         enable_reentrant=yes
12972         if test "x$cf_cv_weak_symbols" = xyes ; then
12973                 PTHREAD=-lpthread
12974         fi
12975 fi
12976
12977 # Reentrant code has to be opaque; there's little advantage to making ncurses
12978 # opaque outside of that, so there is no --enable-opaque option.  We can use
12979 # this option without --with-pthreads, but this will be always set for
12980 # pthreads.
12981 echo "$as_me:12981: checking if you want reentrant code" >&5
12982 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12983
12984 # Check whether --enable-reentrant or --disable-reentrant was given.
12985 if test "${enable_reentrant+set}" = set; then
12986   enableval="$enable_reentrant"
12987   with_reentrant=$enableval
12988 else
12989   with_reentrant=no
12990 fi;
12991 echo "$as_me:12991: result: $with_reentrant" >&5
12992 echo "${ECHO_T}$with_reentrant" >&6
12993 if test "x$with_reentrant" = xyes ; then
12994         cf_cv_enable_reentrant=1
12995         cf_cv_enable_opaque="NCURSES_INTERNALS"
12996         NCURSES_OPAQUE=1
12997         NCURSES_SIZE_T=int
12998         if test "x$cf_cv_weak_symbols" = xyes ; then
12999
13000 # remove pthread library from $LIBS
13001 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13002
13003 cf_add_libs="-lpthread"
13004 # Filter out duplicates - this happens with badly-designed ".pc" files...
13005 for cf_add_1lib in $TEST_LIBS
13006 do
13007         for cf_add_2lib in $cf_add_libs
13008         do
13009                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13010                 then
13011                         cf_add_1lib=
13012                         break
13013                 fi
13014         done
13015         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13016 done
13017 TEST_LIBS="$cf_add_libs"
13018
13019 cf_add_libs="-lpthread"
13020 # Filter out duplicates - this happens with badly-designed ".pc" files...
13021 for cf_add_1lib in $TEST_LIBS2
13022 do
13023         for cf_add_2lib in $cf_add_libs
13024         do
13025                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13026                 then
13027                         cf_add_1lib=
13028                         break
13029                 fi
13030         done
13031         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13032 done
13033 TEST_LIBS2="$cf_add_libs"
13034
13035         else
13036                 # when not using weak symbols but with_reentrant,
13037                 # add 't' to the library suffix on all platforms
13038                 # except cygwin, where we only do that if ALSO
13039                 # compiling with full thread support.
13040                 case "$host" in
13041                 (*cygwin* | *msys*)
13042                         if test "$with_pthread" = "yes" ; then
13043                                 if test "x$disable_lib_suffixes" = "xno" ; then
13044                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13045                                 fi
13046                         fi ;;
13047                 (*)
13048                         if test "x$disable_lib_suffixes" = "xno" ; then
13049                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13050                         fi
13051                         ;;
13052                 esac
13053         fi
13054
13055 cat >>confdefs.h <<\EOF
13056 #define USE_REENTRANT 1
13057 EOF
13058
13059 if test "${with_abi_version+set}" != set; then
13060         case $cf_cv_rel_version in
13061         (5.*)
13062                 cf_cv_rel_version=6.0
13063                 cf_cv_abi_version=6
13064                 { echo "$as_me:13064: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13065 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13066                 ;;
13067         esac
13068 fi
13069
13070 else
13071         cf_cv_enable_reentrant=0
13072         cf_cv_enable_opaque="NCURSES_OPAQUE"
13073         NCURSES_OPAQUE=0
13074         NCURSES_SIZE_T=short
13075 fi
13076
13077 ### Allow using a different wrap-prefix
13078 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13079         echo "$as_me:13079: checking for prefix used to wrap public variables" >&5
13080 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13081
13082 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13083 if test "${with_wrap_prefix+set}" = set; then
13084   withval="$with_wrap_prefix"
13085   NCURSES_WRAP_PREFIX=$withval
13086 else
13087   NCURSES_WRAP_PREFIX=_nc_
13088 fi;
13089         echo "$as_me:13089: result: $NCURSES_WRAP_PREFIX" >&5
13090 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13091 else
13092         NCURSES_WRAP_PREFIX=_nc_
13093 fi
13094
13095 cat >>confdefs.h <<EOF
13096 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13097 EOF
13098
13099 echo "$as_me:13099: checking if you want experimental safe-sprintf code" >&5
13100 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13101
13102 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13103 if test "${enable_safe_sprintf+set}" = set; then
13104   enableval="$enable_safe_sprintf"
13105   with_safe_sprintf=$enableval
13106 else
13107   with_safe_sprintf=no
13108 fi;
13109 echo "$as_me:13109: result: $with_safe_sprintf" >&5
13110 echo "${ECHO_T}$with_safe_sprintf" >&6
13111 test "x$with_safe_sprintf" = xyes &&
13112 cat >>confdefs.h <<\EOF
13113 #define USE_SAFE_SPRINTF 1
13114 EOF
13115
13116 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13117 # when hashmap is used scroll hints are useless
13118 if test "$with_hashmap" = no ; then
13119 echo "$as_me:13119: checking if you want to experiment without scrolling-hints code" >&5
13120 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13121
13122 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13123 if test "${enable_scroll_hints+set}" = set; then
13124   enableval="$enable_scroll_hints"
13125   with_scroll_hints=$enableval
13126 else
13127   with_scroll_hints=yes
13128 fi;
13129 echo "$as_me:13129: result: $with_scroll_hints" >&5
13130 echo "${ECHO_T}$with_scroll_hints" >&6
13131 test "x$with_scroll_hints" = xyes &&
13132 cat >>confdefs.h <<\EOF
13133 #define USE_SCROLL_HINTS 1
13134 EOF
13135
13136 fi
13137
13138 echo "$as_me:13138: checking if you want wgetch-events code" >&5
13139 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13140
13141 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13142 if test "${enable_wgetch_events+set}" = set; then
13143   enableval="$enable_wgetch_events"
13144   with_wgetch_events=$enableval
13145 else
13146   with_wgetch_events=no
13147 fi;
13148 echo "$as_me:13148: result: $with_wgetch_events" >&5
13149 echo "${ECHO_T}$with_wgetch_events" >&6
13150 test "x$with_wgetch_events" = xyes &&
13151 cat >>confdefs.h <<\EOF
13152 #define NCURSES_WGETCH_EVENTS 1
13153 EOF
13154
13155 ###############################################################################
13156
13157 ###     use option --disable-echo to suppress full display compiling commands
13158
13159 echo "$as_me:13159: checking if you want to see long compiling messages" >&5
13160 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13161
13162 # Check whether --enable-echo or --disable-echo was given.
13163 if test "${enable_echo+set}" = set; then
13164   enableval="$enable_echo"
13165   test "$enableval" != no && enableval=yes
13166         if test "$enableval" != "yes" ; then
13167
13168         ECHO_LT='--silent'
13169         ECHO_LD='@echo linking $@;'
13170         RULE_CC='@echo compiling $<'
13171         SHOW_CC='@echo compiling $@'
13172         ECHO_CC='@'
13173
13174         else
13175
13176         ECHO_LT=''
13177         ECHO_LD=''
13178         RULE_CC=''
13179         SHOW_CC=''
13180         ECHO_CC=''
13181
13182         fi
13183 else
13184   enableval=yes
13185
13186         ECHO_LT=''
13187         ECHO_LD=''
13188         RULE_CC=''
13189         SHOW_CC=''
13190         ECHO_CC=''
13191
13192 fi;
13193 echo "$as_me:13193: result: $enableval" >&5
13194 echo "${ECHO_T}$enableval" >&6
13195
13196 if test "x$enable_echo" = xyes; then
13197         ECHO_LINK=
13198 else
13199         ECHO_LINK='@ echo linking $@ ... ;'
13200         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13201         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13202 fi
13203
13204 ###     use option --enable-warnings to turn on all gcc warnings
13205 echo "$as_me:13205: checking if you want to see compiler warnings" >&5
13206 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13207
13208 # Check whether --enable-warnings or --disable-warnings was given.
13209 if test "${enable_warnings+set}" = set; then
13210   enableval="$enable_warnings"
13211   with_warnings=$enableval
13212 fi;
13213 echo "$as_me:13213: result: $with_warnings" >&5
13214 echo "${ECHO_T}$with_warnings" >&6
13215
13216 if test "x$with_warnings" = "xyes"; then
13217
13218         ADAFLAGS="$ADAFLAGS -gnatg"
13219
13220 INTEL_COMPILER=no
13221
13222 if test "$GCC" = yes ; then
13223         case $host_os in
13224         (linux*|gnu*)
13225                 echo "$as_me:13225: checking if this is really Intel C compiler" >&5
13226 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13227                 cf_save_CFLAGS="$CFLAGS"
13228                 CFLAGS="$CFLAGS -no-gcc"
13229                 cat >conftest.$ac_ext <<_ACEOF
13230 #line 13230 "configure"
13231 #include "confdefs.h"
13232
13233 int
13234 main ()
13235 {
13236
13237 #ifdef __INTEL_COMPILER
13238 #else
13239 make an error
13240 #endif
13241
13242   ;
13243   return 0;
13244 }
13245 _ACEOF
13246 rm -f conftest.$ac_objext
13247 if { (eval echo "$as_me:13247: \"$ac_compile\"") >&5
13248   (eval $ac_compile) 2>&5
13249   ac_status=$?
13250   echo "$as_me:13250: \$? = $ac_status" >&5
13251   (exit $ac_status); } &&
13252          { ac_try='test -s conftest.$ac_objext'
13253   { (eval echo "$as_me:13253: \"$ac_try\"") >&5
13254   (eval $ac_try) 2>&5
13255   ac_status=$?
13256   echo "$as_me:13256: \$? = $ac_status" >&5
13257   (exit $ac_status); }; }; then
13258   INTEL_COMPILER=yes
13259 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13260
13261 else
13262   echo "$as_me: failed program was:" >&5
13263 cat conftest.$ac_ext >&5
13264 fi
13265 rm -f conftest.$ac_objext conftest.$ac_ext
13266                 CFLAGS="$cf_save_CFLAGS"
13267                 echo "$as_me:13267: result: $INTEL_COMPILER" >&5
13268 echo "${ECHO_T}$INTEL_COMPILER" >&6
13269                 ;;
13270         esac
13271 fi
13272
13273 CLANG_COMPILER=no
13274
13275 if test "$GCC" = yes ; then
13276         echo "$as_me:13276: checking if this is really Clang C compiler" >&5
13277 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13278         cf_save_CFLAGS="$CFLAGS"
13279         CFLAGS="$CFLAGS -Qunused-arguments"
13280         cat >conftest.$ac_ext <<_ACEOF
13281 #line 13281 "configure"
13282 #include "confdefs.h"
13283
13284 int
13285 main ()
13286 {
13287
13288 #ifdef __clang__
13289 #else
13290 make an error
13291 #endif
13292
13293   ;
13294   return 0;
13295 }
13296 _ACEOF
13297 rm -f conftest.$ac_objext
13298 if { (eval echo "$as_me:13298: \"$ac_compile\"") >&5
13299   (eval $ac_compile) 2>&5
13300   ac_status=$?
13301   echo "$as_me:13301: \$? = $ac_status" >&5
13302   (exit $ac_status); } &&
13303          { ac_try='test -s conftest.$ac_objext'
13304   { (eval echo "$as_me:13304: \"$ac_try\"") >&5
13305   (eval $ac_try) 2>&5
13306   ac_status=$?
13307   echo "$as_me:13307: \$? = $ac_status" >&5
13308   (exit $ac_status); }; }; then
13309   CLANG_COMPILER=yes
13310 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13311
13312 else
13313   echo "$as_me: failed program was:" >&5
13314 cat conftest.$ac_ext >&5
13315 fi
13316 rm -f conftest.$ac_objext conftest.$ac_ext
13317         CFLAGS="$cf_save_CFLAGS"
13318         echo "$as_me:13318: result: $CLANG_COMPILER" >&5
13319 echo "${ECHO_T}$CLANG_COMPILER" >&6
13320 fi
13321
13322 cat > conftest.$ac_ext <<EOF
13323 #line 13323 "${as_me:-configure}"
13324 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13325 EOF
13326
13327 if test "$INTEL_COMPILER" = yes
13328 then
13329 # The "-wdXXX" options suppress warnings:
13330 # remark #1419: external declaration in primary source file
13331 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13332 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13333 # remark #193: zero used for undefined preprocessing identifier
13334 # remark #593: variable "curs_sb_left_arrow" was set but never used
13335 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13336 # remark #869: parameter "tw" was never referenced
13337 # remark #981: operands are evaluated in unspecified order
13338 # warning #279: controlling expression is constant
13339
13340         { echo "$as_me:13340: checking for $CC warning options..." >&5
13341 echo "$as_me: checking for $CC warning options..." >&6;}
13342         cf_save_CFLAGS="$CFLAGS"
13343         EXTRA_CFLAGS="-Wall"
13344         for cf_opt in \
13345                 wd1419 \
13346                 wd1683 \
13347                 wd1684 \
13348                 wd193 \
13349                 wd593 \
13350                 wd279 \
13351                 wd810 \
13352                 wd869 \
13353                 wd981
13354         do
13355                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13356                 if { (eval echo "$as_me:13356: \"$ac_compile\"") >&5
13357   (eval $ac_compile) 2>&5
13358   ac_status=$?
13359   echo "$as_me:13359: \$? = $ac_status" >&5
13360   (exit $ac_status); }; then
13361                         test -n "$verbose" && echo "$as_me:13361: result: ... -$cf_opt" >&5
13362 echo "${ECHO_T}... -$cf_opt" >&6
13363                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13364                 fi
13365         done
13366         CFLAGS="$cf_save_CFLAGS"
13367
13368 elif test "$GCC" = yes
13369 then
13370         { echo "$as_me:13370: checking for $CC warning options..." >&5
13371 echo "$as_me: checking for $CC warning options..." >&6;}
13372         cf_save_CFLAGS="$CFLAGS"
13373         EXTRA_CFLAGS=
13374         cf_warn_CONST=""
13375         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13376         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13377         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13378         for cf_opt in W Wall \
13379                 Wbad-function-cast \
13380                 Wcast-align \
13381                 Wcast-qual \
13382                 Wdeclaration-after-statement \
13383                 Wextra \
13384                 Winline \
13385                 Wmissing-declarations \
13386                 Wmissing-prototypes \
13387                 Wnested-externs \
13388                 Wpointer-arith \
13389                 Wshadow \
13390                 Wstrict-prototypes \
13391                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13392         do
13393                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13394                 if { (eval echo "$as_me:13394: \"$ac_compile\"") >&5
13395   (eval $ac_compile) 2>&5
13396   ac_status=$?
13397   echo "$as_me:13397: \$? = $ac_status" >&5
13398   (exit $ac_status); }; then
13399                         test -n "$verbose" && echo "$as_me:13399: result: ... -$cf_opt" >&5
13400 echo "${ECHO_T}... -$cf_opt" >&6
13401                         case $cf_opt in
13402                         (Wcast-qual)
13403                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13404                                 ;;
13405                         (Winline)
13406                                 case $GCC_VERSION in
13407                                 ([34].*)
13408                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13409
13410 echo "${as_me:-configure}:13410: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13411
13412                                         continue;;
13413                                 esac
13414                                 ;;
13415                         (Wpointer-arith)
13416                                 case $GCC_VERSION in
13417                                 ([12].*)
13418                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13419
13420 echo "${as_me:-configure}:13420: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13421
13422                                         continue;;
13423                                 esac
13424                                 ;;
13425                         esac
13426                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13427                 fi
13428         done
13429         CFLAGS="$cf_save_CFLAGS"
13430 fi
13431 rm -rf conftest*
13432
13433         if test "x$cf_with_cxx" = xyes ; then
13434
13435 INTEL_CPLUSPLUS=no
13436
13437 if test "$GCC" = yes ; then
13438         case $host_os in
13439         (linux*|gnu*)
13440                 echo "$as_me:13440: checking if this is really Intel C++ compiler" >&5
13441 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13442                 cf_save_CFLAGS="$CXXFLAGS"
13443                 CXXFLAGS="$CXXFLAGS -no-gcc"
13444                 cat >conftest.$ac_ext <<_ACEOF
13445 #line 13445 "configure"
13446 #include "confdefs.h"
13447
13448 int
13449 main ()
13450 {
13451
13452 #ifdef __INTEL_COMPILER
13453 #else
13454 make an error
13455 #endif
13456
13457   ;
13458   return 0;
13459 }
13460 _ACEOF
13461 rm -f conftest.$ac_objext
13462 if { (eval echo "$as_me:13462: \"$ac_compile\"") >&5
13463   (eval $ac_compile) 2>&5
13464   ac_status=$?
13465   echo "$as_me:13465: \$? = $ac_status" >&5
13466   (exit $ac_status); } &&
13467          { ac_try='test -s conftest.$ac_objext'
13468   { (eval echo "$as_me:13468: \"$ac_try\"") >&5
13469   (eval $ac_try) 2>&5
13470   ac_status=$?
13471   echo "$as_me:13471: \$? = $ac_status" >&5
13472   (exit $ac_status); }; }; then
13473   INTEL_CPLUSPLUS=yes
13474 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13475
13476 else
13477   echo "$as_me: failed program was:" >&5
13478 cat conftest.$ac_ext >&5
13479 fi
13480 rm -f conftest.$ac_objext conftest.$ac_ext
13481                 CXXFLAGS="$cf_save_CFLAGS"
13482                 echo "$as_me:13482: result: $INTEL_CPLUSPLUS" >&5
13483 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13484                 ;;
13485         esac
13486 fi
13487
13488 CLANG_CPLUSPLUS=no
13489
13490 if test "$GCC" = yes ; then
13491         echo "$as_me:13491: checking if this is really Clang C++ compiler" >&5
13492 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13493         cf_save_CFLAGS="$CXXFLAGS"
13494         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13495         cat >conftest.$ac_ext <<_ACEOF
13496 #line 13496 "configure"
13497 #include "confdefs.h"
13498
13499 int
13500 main ()
13501 {
13502
13503 #ifdef __clang__
13504 #else
13505 make an error
13506 #endif
13507
13508   ;
13509   return 0;
13510 }
13511 _ACEOF
13512 rm -f conftest.$ac_objext
13513 if { (eval echo "$as_me:13513: \"$ac_compile\"") >&5
13514   (eval $ac_compile) 2>&5
13515   ac_status=$?
13516   echo "$as_me:13516: \$? = $ac_status" >&5
13517   (exit $ac_status); } &&
13518          { ac_try='test -s conftest.$ac_objext'
13519   { (eval echo "$as_me:13519: \"$ac_try\"") >&5
13520   (eval $ac_try) 2>&5
13521   ac_status=$?
13522   echo "$as_me:13522: \$? = $ac_status" >&5
13523   (exit $ac_status); }; }; then
13524   CLANG_CPLUSPLUS=yes
13525 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13526
13527 else
13528   echo "$as_me: failed program was:" >&5
13529 cat conftest.$ac_ext >&5
13530 fi
13531 rm -f conftest.$ac_objext conftest.$ac_ext
13532         CXXFLAGS="$cf_save_CFLAGS"
13533         echo "$as_me:13533: result: $CLANG_CPLUSPLUS" >&5
13534 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13535 fi
13536
13537 ac_ext=cc
13538 ac_cpp='$CXXCPP $CPPFLAGS'
13539 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13540 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13541 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13542 ac_main_return=return
13543
13544 cat > conftest.$ac_ext <<EOF
13545 #line 13545 "configure"
13546 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13547 EOF
13548
13549 if test "$INTEL_CPLUSPLUS" = yes
13550 then
13551 # The "-wdXXX" options suppress warnings:
13552 # remark #1419: external declaration in primary source file
13553 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13554 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13555 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13556 # remark #193: zero used for undefined preprocessing identifier
13557 # remark #593: variable "curs_sb_left_arrow" was set but never used
13558 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13559 # remark #869: parameter "tw" was never referenced
13560 # remark #981: operands are evaluated in unspecified order
13561 # warning #269: invalid format string conversion
13562
13563         { echo "$as_me:13563: checking for $CC warning options..." >&5
13564 echo "$as_me: checking for $CC warning options..." >&6;}
13565         cf_save_CXXFLAGS="$CXXFLAGS"
13566         EXTRA_CXXFLAGS="-Wall"
13567         for cf_opt in \
13568                 wd1419 \
13569                 wd1682 \
13570                 wd1683 \
13571                 wd1684 \
13572                 wd193 \
13573                 wd279 \
13574                 wd593 \
13575                 wd810 \
13576                 wd869 \
13577                 wd981
13578         do
13579                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13580                 if { (eval echo "$as_me:13580: \"$ac_compile\"") >&5
13581   (eval $ac_compile) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit $ac_status); }; then
13585                         test -n "$verbose" && echo "$as_me:13585: result: ... -$cf_opt" >&5
13586 echo "${ECHO_T}... -$cf_opt" >&6
13587                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13588                 fi
13589         done
13590         CXXFLAGS="$cf_save_CXXFLAGS"
13591
13592 elif test "$GXX" = yes
13593 then
13594         { echo "$as_me:13594: checking for $CXX warning options..." >&5
13595 echo "$as_me: checking for $CXX warning options..." >&6;}
13596         cf_save_CXXFLAGS="$CXXFLAGS"
13597         EXTRA_CXXFLAGS="-W -Wall"
13598         cf_gxx_extra_warnings=""
13599         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13600         case "$GCC_VERSION" in
13601         ([1-2].*)
13602                 ;;
13603         (*)
13604                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13605                 ;;
13606         esac
13607         for cf_opt in \
13608                 Wabi \
13609                 fabi-version=0 \
13610                 Wextra \
13611                 Wignored-qualifiers \
13612                 Wlogical-op \
13613                 Woverloaded-virtual \
13614                 Wsign-promo \
13615                 Wsynth \
13616                 Wold-style-cast \
13617                 Wcast-align \
13618                 Wcast-qual \
13619                 Wpointer-arith \
13620                 Wshadow \
13621                 Wundef $cf_gxx_extra_warnings Wno-unused
13622         do
13623                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13624                 if { (eval echo "$as_me:13624: \"$ac_compile\"") >&5
13625   (eval $ac_compile) 2>&5
13626   ac_status=$?
13627   echo "$as_me:13627: \$? = $ac_status" >&5
13628   (exit $ac_status); }; then
13629                         test -n "$verbose" && echo "$as_me:13629: result: ... -$cf_opt" >&5
13630 echo "${ECHO_T}... -$cf_opt" >&6
13631                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13632                 else
13633                         test -n "$verbose" && echo "$as_me:13633: result: ... no -$cf_opt" >&5
13634 echo "${ECHO_T}... no -$cf_opt" >&6
13635                 fi
13636         done
13637         CXXFLAGS="$cf_save_CXXFLAGS"
13638 fi
13639
13640 rm -rf conftest*
13641 ac_ext=c
13642 ac_cpp='$CPP $CPPFLAGS'
13643 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13644 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13645 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13646 ac_main_return=return
13647
13648         fi
13649 fi
13650
13651 if test "$GCC" = yes
13652 then
13653 cat > conftest.i <<EOF
13654 #ifndef GCC_PRINTF
13655 #define GCC_PRINTF 0
13656 #endif
13657 #ifndef GCC_SCANF
13658 #define GCC_SCANF 0
13659 #endif
13660 #ifndef GCC_NORETURN
13661 #define GCC_NORETURN /* nothing */
13662 #endif
13663 #ifndef GCC_UNUSED
13664 #define GCC_UNUSED /* nothing */
13665 #endif
13666 EOF
13667 if test "$GCC" = yes
13668 then
13669         { echo "$as_me:13669: checking for $CC __attribute__ directives..." >&5
13670 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13671 cat > conftest.$ac_ext <<EOF
13672 #line 13672 "${as_me:-configure}"
13673 #include "confdefs.h"
13674 #include "conftest.h"
13675 #include "conftest.i"
13676 #if     GCC_PRINTF
13677 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13678 #else
13679 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13680 #endif
13681 #if     GCC_SCANF
13682 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13683 #else
13684 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13685 #endif
13686 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13687 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13688 extern void foo(void) GCC_NORETURN;
13689 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13690 EOF
13691         cf_printf_attribute=no
13692         cf_scanf_attribute=no
13693         for cf_attribute in scanf printf unused noreturn
13694         do
13695
13696 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13697
13698                 cf_directive="__attribute__(($cf_attribute))"
13699                 echo "checking for $CC $cf_directive" 1>&5
13700
13701                 case $cf_attribute in
13702                 (printf)
13703                         cf_printf_attribute=yes
13704                         cat >conftest.h <<EOF
13705 #define GCC_$cf_ATTRIBUTE 1
13706 EOF
13707                         ;;
13708                 (scanf)
13709                         cf_scanf_attribute=yes
13710                         cat >conftest.h <<EOF
13711 #define GCC_$cf_ATTRIBUTE 1
13712 EOF
13713                         ;;
13714                 (*)
13715                         cat >conftest.h <<EOF
13716 #define GCC_$cf_ATTRIBUTE $cf_directive
13717 EOF
13718                         ;;
13719                 esac
13720
13721                 if { (eval echo "$as_me:13721: \"$ac_compile\"") >&5
13722   (eval $ac_compile) 2>&5
13723   ac_status=$?
13724   echo "$as_me:13724: \$? = $ac_status" >&5
13725   (exit $ac_status); }; then
13726                         test -n "$verbose" && echo "$as_me:13726: result: ... $cf_attribute" >&5
13727 echo "${ECHO_T}... $cf_attribute" >&6
13728                         cat conftest.h >>confdefs.h
13729                         case $cf_attribute in
13730                         (noreturn)
13731
13732 cat >>confdefs.h <<EOF
13733 #define GCC_NORETURN $cf_directive
13734 EOF
13735
13736                                 ;;
13737                         (printf)
13738                                 cf_value='/* nothing */'
13739                                 if test "$cf_printf_attribute" != no ; then
13740                                         cf_value='__attribute__((format(printf,fmt,var)))'
13741
13742 cat >>confdefs.h <<\EOF
13743 #define GCC_PRINTF 1
13744 EOF
13745
13746                                 fi
13747
13748 cat >>confdefs.h <<EOF
13749 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13750 EOF
13751
13752                                 ;;
13753                         (scanf)
13754                                 cf_value='/* nothing */'
13755                                 if test "$cf_scanf_attribute" != no ; then
13756                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13757
13758 cat >>confdefs.h <<\EOF
13759 #define GCC_SCANF 1
13760 EOF
13761
13762                                 fi
13763
13764 cat >>confdefs.h <<EOF
13765 #define GCC_SCANFLIKE(fmt,var) $cf_value
13766 EOF
13767
13768                                 ;;
13769                         (unused)
13770
13771 cat >>confdefs.h <<EOF
13772 #define GCC_UNUSED $cf_directive
13773 EOF
13774
13775                                 ;;
13776                         esac
13777                 fi
13778         done
13779 else
13780         fgrep define conftest.i >>confdefs.h
13781 fi
13782 rm -rf conftest*
13783 fi
13784
13785 echo "$as_me:13785: checking if you want to work around bogus compiler/loader warnings" >&5
13786 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13787
13788 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13789 if test "${enable_string_hacks+set}" = set; then
13790   enableval="$enable_string_hacks"
13791   with_string_hacks=$enableval
13792 else
13793   with_string_hacks=no
13794 fi;
13795 echo "$as_me:13795: result: $with_string_hacks" >&5
13796 echo "${ECHO_T}$with_string_hacks" >&6
13797
13798 if test "x$with_string_hacks" = "xyes"; then
13799
13800 cat >>confdefs.h <<\EOF
13801 #define USE_STRING_HACKS 1
13802 EOF
13803
13804         { echo "$as_me:13804: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13805 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13806
13807 for ac_func in strlcat strlcpy snprintf
13808 do
13809 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13810 echo "$as_me:13810: checking for $ac_func" >&5
13811 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13812 if eval "test \"\${$as_ac_var+set}\" = set"; then
13813   echo $ECHO_N "(cached) $ECHO_C" >&6
13814 else
13815   cat >conftest.$ac_ext <<_ACEOF
13816 #line 13816 "configure"
13817 #include "confdefs.h"
13818 /* System header to define __stub macros and hopefully few prototypes,
13819     which can conflict with char $ac_func (); below.  */
13820 #include <assert.h>
13821 /* Override any gcc2 internal prototype to avoid an error.  */
13822 #ifdef __cplusplus
13823 extern "C"
13824 #endif
13825 /* We use char because int might match the return type of a gcc2
13826    builtin and then its argument prototype would still apply.  */
13827 char $ac_func ();
13828 char (*f) ();
13829
13830 int
13831 main ()
13832 {
13833 /* The GNU C library defines this for functions which it implements
13834     to always fail with ENOSYS.  Some functions are actually named
13835     something starting with __ and the normal name is an alias.  */
13836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13837 choke me
13838 #else
13839 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13840 #endif
13841
13842   ;
13843   return 0;
13844 }
13845 _ACEOF
13846 rm -f conftest.$ac_objext conftest$ac_exeext
13847 if { (eval echo "$as_me:13847: \"$ac_link\"") >&5
13848   (eval $ac_link) 2>&5
13849   ac_status=$?
13850   echo "$as_me:13850: \$? = $ac_status" >&5
13851   (exit $ac_status); } &&
13852          { ac_try='test -s conftest$ac_exeext'
13853   { (eval echo "$as_me:13853: \"$ac_try\"") >&5
13854   (eval $ac_try) 2>&5
13855   ac_status=$?
13856   echo "$as_me:13856: \$? = $ac_status" >&5
13857   (exit $ac_status); }; }; then
13858   eval "$as_ac_var=yes"
13859 else
13860   echo "$as_me: failed program was:" >&5
13861 cat conftest.$ac_ext >&5
13862 eval "$as_ac_var=no"
13863 fi
13864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13865 fi
13866 echo "$as_me:13866: result: `eval echo '${'$as_ac_var'}'`" >&5
13867 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13868 if test `eval echo '${'$as_ac_var'}'` = yes; then
13869   cat >>confdefs.h <<EOF
13870 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13871 EOF
13872
13873 fi
13874 done
13875
13876 fi
13877
13878 ###     use option --enable-assertions to turn on generation of assertion code
13879 echo "$as_me:13879: checking if you want to enable runtime assertions" >&5
13880 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13881
13882 # Check whether --enable-assertions or --disable-assertions was given.
13883 if test "${enable_assertions+set}" = set; then
13884   enableval="$enable_assertions"
13885   with_assertions=$enableval
13886 else
13887   with_assertions=no
13888 fi;
13889 echo "$as_me:13889: result: $with_assertions" >&5
13890 echo "${ECHO_T}$with_assertions" >&6
13891 if test -n "$GCC"
13892 then
13893         if test "$with_assertions" = no
13894         then
13895                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13896         else
13897
13898         ADAFLAGS="$ADAFLAGS -gnata"
13899
13900         fi
13901 fi
13902
13903 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13904
13905 echo "$as_me:13905: checking if you want to use dmalloc for testing" >&5
13906 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13907
13908 # Check whether --with-dmalloc or --without-dmalloc was given.
13909 if test "${with_dmalloc+set}" = set; then
13910   withval="$with_dmalloc"
13911
13912 cat >>confdefs.h <<EOF
13913 #define USE_DMALLOC 1
13914 EOF
13915
13916         : ${with_cflags:=-g}
13917         : ${with_no_leaks:=yes}
13918          with_dmalloc=yes
13919 else
13920   with_dmalloc=
13921 fi;
13922 echo "$as_me:13922: result: ${with_dmalloc:-no}" >&5
13923 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13924
13925 case .$with_cflags in
13926 (.*-g*)
13927         case .$CFLAGS in
13928         (.*-g*)
13929                 ;;
13930         (*)
13931
13932 cf_fix_cppflags=no
13933 cf_new_cflags=
13934 cf_new_cppflags=
13935 cf_new_extra_cppflags=
13936
13937 for cf_add_cflags in -g
13938 do
13939 case $cf_fix_cppflags in
13940 (no)
13941         case $cf_add_cflags in
13942         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13943                 case $cf_add_cflags in
13944                 (-D*)
13945                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13946
13947                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13948                                 && test -z "${cf_tst_cflags}" \
13949                                 && cf_fix_cppflags=yes
13950
13951                         if test $cf_fix_cppflags = yes ; then
13952                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13953                                 continue
13954                         elif test "${cf_tst_cflags}" = "\"'" ; then
13955                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13956                                 continue
13957                         fi
13958                         ;;
13959                 esac
13960                 case "$CPPFLAGS" in
13961                 (*$cf_add_cflags)
13962                         ;;
13963                 (*)
13964                         case $cf_add_cflags in
13965                         (-D*)
13966                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13967
13968 CPPFLAGS=`echo "$CPPFLAGS" | \
13969         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13970                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13971
13972                                 ;;
13973                         esac
13974                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13975                         ;;
13976                 esac
13977                 ;;
13978         (*)
13979                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13980                 ;;
13981         esac
13982         ;;
13983 (yes)
13984         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13985
13986         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13987
13988         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13989                 && test -z "${cf_tst_cflags}" \
13990                 && cf_fix_cppflags=no
13991         ;;
13992 esac
13993 done
13994
13995 if test -n "$cf_new_cflags" ; then
13996
13997         CFLAGS="$CFLAGS $cf_new_cflags"
13998 fi
13999
14000 if test -n "$cf_new_cppflags" ; then
14001
14002         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14003 fi
14004
14005 if test -n "$cf_new_extra_cppflags" ; then
14006
14007         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14008 fi
14009
14010                 ;;
14011         esac
14012         ;;
14013 esac
14014
14015 if test "$with_dmalloc" = yes ; then
14016         echo "$as_me:14016: checking for dmalloc.h" >&5
14017 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14018 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14019   echo $ECHO_N "(cached) $ECHO_C" >&6
14020 else
14021   cat >conftest.$ac_ext <<_ACEOF
14022 #line 14022 "configure"
14023 #include "confdefs.h"
14024 #include <dmalloc.h>
14025 _ACEOF
14026 if { (eval echo "$as_me:14026: \"$ac_cpp conftest.$ac_ext\"") >&5
14027   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14028   ac_status=$?
14029   egrep -v '^ *\+' conftest.er1 >conftest.err
14030   rm -f conftest.er1
14031   cat conftest.err >&5
14032   echo "$as_me:14032: \$? = $ac_status" >&5
14033   (exit $ac_status); } >/dev/null; then
14034   if test -s conftest.err; then
14035     ac_cpp_err=$ac_c_preproc_warn_flag
14036   else
14037     ac_cpp_err=
14038   fi
14039 else
14040   ac_cpp_err=yes
14041 fi
14042 if test -z "$ac_cpp_err"; then
14043   ac_cv_header_dmalloc_h=yes
14044 else
14045   echo "$as_me: failed program was:" >&5
14046   cat conftest.$ac_ext >&5
14047   ac_cv_header_dmalloc_h=no
14048 fi
14049 rm -f conftest.err conftest.$ac_ext
14050 fi
14051 echo "$as_me:14051: result: $ac_cv_header_dmalloc_h" >&5
14052 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14053 if test $ac_cv_header_dmalloc_h = yes; then
14054
14055 echo "$as_me:14055: checking for dmalloc_debug in -ldmalloc" >&5
14056 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14057 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14058   echo $ECHO_N "(cached) $ECHO_C" >&6
14059 else
14060   ac_check_lib_save_LIBS=$LIBS
14061 LIBS="-ldmalloc  $LIBS"
14062 cat >conftest.$ac_ext <<_ACEOF
14063 #line 14063 "configure"
14064 #include "confdefs.h"
14065
14066 /* Override any gcc2 internal prototype to avoid an error.  */
14067 #ifdef __cplusplus
14068 extern "C"
14069 #endif
14070 /* We use char because int might match the return type of a gcc2
14071    builtin and then its argument prototype would still apply.  */
14072 char dmalloc_debug ();
14073 int
14074 main ()
14075 {
14076 dmalloc_debug ();
14077   ;
14078   return 0;
14079 }
14080 _ACEOF
14081 rm -f conftest.$ac_objext conftest$ac_exeext
14082 if { (eval echo "$as_me:14082: \"$ac_link\"") >&5
14083   (eval $ac_link) 2>&5
14084   ac_status=$?
14085   echo "$as_me:14085: \$? = $ac_status" >&5
14086   (exit $ac_status); } &&
14087          { ac_try='test -s conftest$ac_exeext'
14088   { (eval echo "$as_me:14088: \"$ac_try\"") >&5
14089   (eval $ac_try) 2>&5
14090   ac_status=$?
14091   echo "$as_me:14091: \$? = $ac_status" >&5
14092   (exit $ac_status); }; }; then
14093   ac_cv_lib_dmalloc_dmalloc_debug=yes
14094 else
14095   echo "$as_me: failed program was:" >&5
14096 cat conftest.$ac_ext >&5
14097 ac_cv_lib_dmalloc_dmalloc_debug=no
14098 fi
14099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14100 LIBS=$ac_check_lib_save_LIBS
14101 fi
14102 echo "$as_me:14102: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14103 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14104 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14105   cat >>confdefs.h <<EOF
14106 #define HAVE_LIBDMALLOC 1
14107 EOF
14108
14109   LIBS="-ldmalloc $LIBS"
14110
14111 fi
14112
14113 fi
14114
14115 fi
14116
14117 echo "$as_me:14117: checking if you want to use dbmalloc for testing" >&5
14118 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14119
14120 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14121 if test "${with_dbmalloc+set}" = set; then
14122   withval="$with_dbmalloc"
14123
14124 cat >>confdefs.h <<EOF
14125 #define USE_DBMALLOC 1
14126 EOF
14127
14128         : ${with_cflags:=-g}
14129         : ${with_no_leaks:=yes}
14130          with_dbmalloc=yes
14131 else
14132   with_dbmalloc=
14133 fi;
14134 echo "$as_me:14134: result: ${with_dbmalloc:-no}" >&5
14135 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14136
14137 case .$with_cflags in
14138 (.*-g*)
14139         case .$CFLAGS in
14140         (.*-g*)
14141                 ;;
14142         (*)
14143
14144 cf_fix_cppflags=no
14145 cf_new_cflags=
14146 cf_new_cppflags=
14147 cf_new_extra_cppflags=
14148
14149 for cf_add_cflags in -g
14150 do
14151 case $cf_fix_cppflags in
14152 (no)
14153         case $cf_add_cflags in
14154         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14155                 case $cf_add_cflags in
14156                 (-D*)
14157                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14158
14159                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14160                                 && test -z "${cf_tst_cflags}" \
14161                                 && cf_fix_cppflags=yes
14162
14163                         if test $cf_fix_cppflags = yes ; then
14164                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14165                                 continue
14166                         elif test "${cf_tst_cflags}" = "\"'" ; then
14167                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14168                                 continue
14169                         fi
14170                         ;;
14171                 esac
14172                 case "$CPPFLAGS" in
14173                 (*$cf_add_cflags)
14174                         ;;
14175                 (*)
14176                         case $cf_add_cflags in
14177                         (-D*)
14178                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14179
14180 CPPFLAGS=`echo "$CPPFLAGS" | \
14181         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14182                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14183
14184                                 ;;
14185                         esac
14186                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14187                         ;;
14188                 esac
14189                 ;;
14190         (*)
14191                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14192                 ;;
14193         esac
14194         ;;
14195 (yes)
14196         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14197
14198         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14199
14200         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14201                 && test -z "${cf_tst_cflags}" \
14202                 && cf_fix_cppflags=no
14203         ;;
14204 esac
14205 done
14206
14207 if test -n "$cf_new_cflags" ; then
14208
14209         CFLAGS="$CFLAGS $cf_new_cflags"
14210 fi
14211
14212 if test -n "$cf_new_cppflags" ; then
14213
14214         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14215 fi
14216
14217 if test -n "$cf_new_extra_cppflags" ; then
14218
14219         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14220 fi
14221
14222                 ;;
14223         esac
14224         ;;
14225 esac
14226
14227 if test "$with_dbmalloc" = yes ; then
14228         echo "$as_me:14228: checking for dbmalloc.h" >&5
14229 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14230 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14231   echo $ECHO_N "(cached) $ECHO_C" >&6
14232 else
14233   cat >conftest.$ac_ext <<_ACEOF
14234 #line 14234 "configure"
14235 #include "confdefs.h"
14236 #include <dbmalloc.h>
14237 _ACEOF
14238 if { (eval echo "$as_me:14238: \"$ac_cpp conftest.$ac_ext\"") >&5
14239   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14240   ac_status=$?
14241   egrep -v '^ *\+' conftest.er1 >conftest.err
14242   rm -f conftest.er1
14243   cat conftest.err >&5
14244   echo "$as_me:14244: \$? = $ac_status" >&5
14245   (exit $ac_status); } >/dev/null; then
14246   if test -s conftest.err; then
14247     ac_cpp_err=$ac_c_preproc_warn_flag
14248   else
14249     ac_cpp_err=
14250   fi
14251 else
14252   ac_cpp_err=yes
14253 fi
14254 if test -z "$ac_cpp_err"; then
14255   ac_cv_header_dbmalloc_h=yes
14256 else
14257   echo "$as_me: failed program was:" >&5
14258   cat conftest.$ac_ext >&5
14259   ac_cv_header_dbmalloc_h=no
14260 fi
14261 rm -f conftest.err conftest.$ac_ext
14262 fi
14263 echo "$as_me:14263: result: $ac_cv_header_dbmalloc_h" >&5
14264 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14265 if test $ac_cv_header_dbmalloc_h = yes; then
14266
14267 echo "$as_me:14267: checking for debug_malloc in -ldbmalloc" >&5
14268 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14269 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14270   echo $ECHO_N "(cached) $ECHO_C" >&6
14271 else
14272   ac_check_lib_save_LIBS=$LIBS
14273 LIBS="-ldbmalloc  $LIBS"
14274 cat >conftest.$ac_ext <<_ACEOF
14275 #line 14275 "configure"
14276 #include "confdefs.h"
14277
14278 /* Override any gcc2 internal prototype to avoid an error.  */
14279 #ifdef __cplusplus
14280 extern "C"
14281 #endif
14282 /* We use char because int might match the return type of a gcc2
14283    builtin and then its argument prototype would still apply.  */
14284 char debug_malloc ();
14285 int
14286 main ()
14287 {
14288 debug_malloc ();
14289   ;
14290   return 0;
14291 }
14292 _ACEOF
14293 rm -f conftest.$ac_objext conftest$ac_exeext
14294 if { (eval echo "$as_me:14294: \"$ac_link\"") >&5
14295   (eval $ac_link) 2>&5
14296   ac_status=$?
14297   echo "$as_me:14297: \$? = $ac_status" >&5
14298   (exit $ac_status); } &&
14299          { ac_try='test -s conftest$ac_exeext'
14300   { (eval echo "$as_me:14300: \"$ac_try\"") >&5
14301   (eval $ac_try) 2>&5
14302   ac_status=$?
14303   echo "$as_me:14303: \$? = $ac_status" >&5
14304   (exit $ac_status); }; }; then
14305   ac_cv_lib_dbmalloc_debug_malloc=yes
14306 else
14307   echo "$as_me: failed program was:" >&5
14308 cat conftest.$ac_ext >&5
14309 ac_cv_lib_dbmalloc_debug_malloc=no
14310 fi
14311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14312 LIBS=$ac_check_lib_save_LIBS
14313 fi
14314 echo "$as_me:14314: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14315 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14316 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14317   cat >>confdefs.h <<EOF
14318 #define HAVE_LIBDBMALLOC 1
14319 EOF
14320
14321   LIBS="-ldbmalloc $LIBS"
14322
14323 fi
14324
14325 fi
14326
14327 fi
14328
14329 echo "$as_me:14329: checking if you want to use valgrind for testing" >&5
14330 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14331
14332 # Check whether --with-valgrind or --without-valgrind was given.
14333 if test "${with_valgrind+set}" = set; then
14334   withval="$with_valgrind"
14335
14336 cat >>confdefs.h <<EOF
14337 #define USE_VALGRIND 1
14338 EOF
14339
14340         : ${with_cflags:=-g}
14341         : ${with_no_leaks:=yes}
14342          with_valgrind=yes
14343 else
14344   with_valgrind=
14345 fi;
14346 echo "$as_me:14346: result: ${with_valgrind:-no}" >&5
14347 echo "${ECHO_T}${with_valgrind:-no}" >&6
14348
14349 case .$with_cflags in
14350 (.*-g*)
14351         case .$CFLAGS in
14352         (.*-g*)
14353                 ;;
14354         (*)
14355
14356 cf_fix_cppflags=no
14357 cf_new_cflags=
14358 cf_new_cppflags=
14359 cf_new_extra_cppflags=
14360
14361 for cf_add_cflags in -g
14362 do
14363 case $cf_fix_cppflags in
14364 (no)
14365         case $cf_add_cflags in
14366         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14367                 case $cf_add_cflags in
14368                 (-D*)
14369                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14370
14371                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14372                                 && test -z "${cf_tst_cflags}" \
14373                                 && cf_fix_cppflags=yes
14374
14375                         if test $cf_fix_cppflags = yes ; then
14376                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14377                                 continue
14378                         elif test "${cf_tst_cflags}" = "\"'" ; then
14379                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14380                                 continue
14381                         fi
14382                         ;;
14383                 esac
14384                 case "$CPPFLAGS" in
14385                 (*$cf_add_cflags)
14386                         ;;
14387                 (*)
14388                         case $cf_add_cflags in
14389                         (-D*)
14390                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14391
14392 CPPFLAGS=`echo "$CPPFLAGS" | \
14393         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14394                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14395
14396                                 ;;
14397                         esac
14398                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14399                         ;;
14400                 esac
14401                 ;;
14402         (*)
14403                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14404                 ;;
14405         esac
14406         ;;
14407 (yes)
14408         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14409
14410         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14411
14412         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14413                 && test -z "${cf_tst_cflags}" \
14414                 && cf_fix_cppflags=no
14415         ;;
14416 esac
14417 done
14418
14419 if test -n "$cf_new_cflags" ; then
14420
14421         CFLAGS="$CFLAGS $cf_new_cflags"
14422 fi
14423
14424 if test -n "$cf_new_cppflags" ; then
14425
14426         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14427 fi
14428
14429 if test -n "$cf_new_extra_cppflags" ; then
14430
14431         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14432 fi
14433
14434                 ;;
14435         esac
14436         ;;
14437 esac
14438
14439 echo "$as_me:14439: checking if you want to perform memory-leak testing" >&5
14440 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14441
14442 # Check whether --enable-leaks or --disable-leaks was given.
14443 if test "${enable_leaks+set}" = set; then
14444   enableval="$enable_leaks"
14445   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14446 else
14447   : ${with_no_leaks:=no}
14448 fi;
14449 echo "$as_me:14449: result: $with_no_leaks" >&5
14450 echo "${ECHO_T}$with_no_leaks" >&6
14451
14452 if test "$with_no_leaks" = yes ; then
14453
14454 cat >>confdefs.h <<\EOF
14455 #define NO_LEAKS 1
14456 EOF
14457
14458 cat >>confdefs.h <<\EOF
14459 #define YY_NO_LEAKS 1
14460 EOF
14461
14462 fi
14463
14464 cat >>confdefs.h <<\EOF
14465 #define HAVE_NC_ALLOC_H 1
14466 EOF
14467
14468 ###     use option --enable-expanded to generate certain macros as functions
14469
14470 # Check whether --enable-expanded or --disable-expanded was given.
14471 if test "${enable_expanded+set}" = set; then
14472   enableval="$enable_expanded"
14473   test "x$enableval" = xyes &&
14474 cat >>confdefs.h <<\EOF
14475 #define NCURSES_EXPANDED 1
14476 EOF
14477
14478 fi;
14479
14480 ###     use option --disable-macros to suppress macros in favor of functions
14481
14482 # Check whether --enable-macros or --disable-macros was given.
14483 if test "${enable_macros+set}" = set; then
14484   enableval="$enable_macros"
14485   test "$enableval" = no &&
14486 cat >>confdefs.h <<\EOF
14487 #define NCURSES_NOMACROS 1
14488 EOF
14489
14490 fi;
14491
14492 # Normally we only add trace() to the debug-library.  Allow this to be
14493 # extended to all models of the ncurses library:
14494 cf_all_traces=no
14495 case "$CFLAGS $CPPFLAGS" in
14496 (*-DTRACE*)
14497         cf_all_traces=yes
14498         ;;
14499 esac
14500
14501 echo "$as_me:14501: checking whether to add trace feature to all models" >&5
14502 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14503
14504 # Check whether --with-trace or --without-trace was given.
14505 if test "${with_trace+set}" = set; then
14506   withval="$with_trace"
14507   cf_with_trace=$withval
14508 else
14509   cf_with_trace=$cf_all_traces
14510 fi;
14511 echo "$as_me:14511: result: $cf_with_trace" >&5
14512 echo "${ECHO_T}$cf_with_trace" >&6
14513
14514 if test "x$cf_with_trace" = xyes ; then
14515         LIB_TRACING=all
14516         ADA_TRACE=TRUE
14517
14518 cf_fix_cppflags=no
14519 cf_new_cflags=
14520 cf_new_cppflags=
14521 cf_new_extra_cppflags=
14522
14523 for cf_add_cflags in -DTRACE
14524 do
14525 case $cf_fix_cppflags in
14526 (no)
14527         case $cf_add_cflags in
14528         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14529                 case $cf_add_cflags in
14530                 (-D*)
14531                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14532
14533                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14534                                 && test -z "${cf_tst_cflags}" \
14535                                 && cf_fix_cppflags=yes
14536
14537                         if test $cf_fix_cppflags = yes ; then
14538                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14539                                 continue
14540                         elif test "${cf_tst_cflags}" = "\"'" ; then
14541                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14542                                 continue
14543                         fi
14544                         ;;
14545                 esac
14546                 case "$CPPFLAGS" in
14547                 (*$cf_add_cflags)
14548                         ;;
14549                 (*)
14550                         case $cf_add_cflags in
14551                         (-D*)
14552                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14553
14554 CPPFLAGS=`echo "$CPPFLAGS" | \
14555         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14556                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14557
14558                                 ;;
14559                         esac
14560                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14561                         ;;
14562                 esac
14563                 ;;
14564         (*)
14565                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14566                 ;;
14567         esac
14568         ;;
14569 (yes)
14570         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14571
14572         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14573
14574         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14575                 && test -z "${cf_tst_cflags}" \
14576                 && cf_fix_cppflags=no
14577         ;;
14578 esac
14579 done
14580
14581 if test -n "$cf_new_cflags" ; then
14582
14583         CFLAGS="$CFLAGS $cf_new_cflags"
14584 fi
14585
14586 if test -n "$cf_new_cppflags" ; then
14587
14588         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14589 fi
14590
14591 if test -n "$cf_new_extra_cppflags" ; then
14592
14593         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14594 fi
14595
14596 else
14597         LIB_TRACING=DEBUG
14598         ADA_TRACE=FALSE
14599 fi
14600
14601 echo "$as_me:14601: checking if we want to use GNAT projects" >&5
14602 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14603
14604 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14605 if test "${enable_gnat_projects+set}" = set; then
14606   enableval="$enable_gnat_projects"
14607   test "$enableval" != no && enableval=yes
14608         if test "$enableval" != "yes" ; then
14609     enable_gnat_projects=no
14610         else
14611                 enable_gnat_projects=yes
14612         fi
14613 else
14614   enableval=yes
14615         enable_gnat_projects=yes
14616
14617 fi;
14618 echo "$as_me:14618: result: $enable_gnat_projects" >&5
14619 echo "${ECHO_T}$enable_gnat_projects" >&6
14620
14621 ###     Checks for libraries.
14622 case $cf_cv_system_name in
14623 (*mingw32*|*mingw64*)
14624         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14625         LIBS=" -lpsapi $LIBS"
14626         ;;
14627 (*)
14628 echo "$as_me:14628: checking for gettimeofday" >&5
14629 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14630 if test "${ac_cv_func_gettimeofday+set}" = set; then
14631   echo $ECHO_N "(cached) $ECHO_C" >&6
14632 else
14633   cat >conftest.$ac_ext <<_ACEOF
14634 #line 14634 "configure"
14635 #include "confdefs.h"
14636 /* System header to define __stub macros and hopefully few prototypes,
14637     which can conflict with char gettimeofday (); below.  */
14638 #include <assert.h>
14639 /* Override any gcc2 internal prototype to avoid an error.  */
14640 #ifdef __cplusplus
14641 extern "C"
14642 #endif
14643 /* We use char because int might match the return type of a gcc2
14644    builtin and then its argument prototype would still apply.  */
14645 char gettimeofday ();
14646 char (*f) ();
14647
14648 int
14649 main ()
14650 {
14651 /* The GNU C library defines this for functions which it implements
14652     to always fail with ENOSYS.  Some functions are actually named
14653     something starting with __ and the normal name is an alias.  */
14654 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14655 choke me
14656 #else
14657 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14658 #endif
14659
14660   ;
14661   return 0;
14662 }
14663 _ACEOF
14664 rm -f conftest.$ac_objext conftest$ac_exeext
14665 if { (eval echo "$as_me:14665: \"$ac_link\"") >&5
14666   (eval $ac_link) 2>&5
14667   ac_status=$?
14668   echo "$as_me:14668: \$? = $ac_status" >&5
14669   (exit $ac_status); } &&
14670          { ac_try='test -s conftest$ac_exeext'
14671   { (eval echo "$as_me:14671: \"$ac_try\"") >&5
14672   (eval $ac_try) 2>&5
14673   ac_status=$?
14674   echo "$as_me:14674: \$? = $ac_status" >&5
14675   (exit $ac_status); }; }; then
14676   ac_cv_func_gettimeofday=yes
14677 else
14678   echo "$as_me: failed program was:" >&5
14679 cat conftest.$ac_ext >&5
14680 ac_cv_func_gettimeofday=no
14681 fi
14682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14683 fi
14684 echo "$as_me:14684: result: $ac_cv_func_gettimeofday" >&5
14685 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14686 if test $ac_cv_func_gettimeofday = yes; then
14687
14688 cat >>confdefs.h <<\EOF
14689 #define HAVE_GETTIMEOFDAY 1
14690 EOF
14691
14692 else
14693
14694 echo "$as_me:14694: checking for gettimeofday in -lbsd" >&5
14695 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14696 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14697   echo $ECHO_N "(cached) $ECHO_C" >&6
14698 else
14699   ac_check_lib_save_LIBS=$LIBS
14700 LIBS="-lbsd  $LIBS"
14701 cat >conftest.$ac_ext <<_ACEOF
14702 #line 14702 "configure"
14703 #include "confdefs.h"
14704
14705 /* Override any gcc2 internal prototype to avoid an error.  */
14706 #ifdef __cplusplus
14707 extern "C"
14708 #endif
14709 /* We use char because int might match the return type of a gcc2
14710    builtin and then its argument prototype would still apply.  */
14711 char gettimeofday ();
14712 int
14713 main ()
14714 {
14715 gettimeofday ();
14716   ;
14717   return 0;
14718 }
14719 _ACEOF
14720 rm -f conftest.$ac_objext conftest$ac_exeext
14721 if { (eval echo "$as_me:14721: \"$ac_link\"") >&5
14722   (eval $ac_link) 2>&5
14723   ac_status=$?
14724   echo "$as_me:14724: \$? = $ac_status" >&5
14725   (exit $ac_status); } &&
14726          { ac_try='test -s conftest$ac_exeext'
14727   { (eval echo "$as_me:14727: \"$ac_try\"") >&5
14728   (eval $ac_try) 2>&5
14729   ac_status=$?
14730   echo "$as_me:14730: \$? = $ac_status" >&5
14731   (exit $ac_status); }; }; then
14732   ac_cv_lib_bsd_gettimeofday=yes
14733 else
14734   echo "$as_me: failed program was:" >&5
14735 cat conftest.$ac_ext >&5
14736 ac_cv_lib_bsd_gettimeofday=no
14737 fi
14738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14739 LIBS=$ac_check_lib_save_LIBS
14740 fi
14741 echo "$as_me:14741: result: $ac_cv_lib_bsd_gettimeofday" >&5
14742 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14743 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14744
14745 cat >>confdefs.h <<\EOF
14746 #define HAVE_GETTIMEOFDAY 1
14747 EOF
14748
14749 cf_add_libs="-lbsd"
14750 # Filter out duplicates - this happens with badly-designed ".pc" files...
14751 for cf_add_1lib in $LIBS
14752 do
14753         for cf_add_2lib in $cf_add_libs
14754         do
14755                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14756                 then
14757                         cf_add_1lib=
14758                         break
14759                 fi
14760         done
14761         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14762 done
14763 LIBS="$cf_add_libs"
14764
14765 fi
14766
14767 fi
14768         ;;
14769 esac
14770
14771 echo "$as_me:14771: checking if -lm needed for math functions" >&5
14772 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14773 if test "${cf_cv_need_libm+set}" = set; then
14774   echo $ECHO_N "(cached) $ECHO_C" >&6
14775 else
14776
14777         cat >conftest.$ac_ext <<_ACEOF
14778 #line 14778 "configure"
14779 #include "confdefs.h"
14780
14781         #include <stdio.h>
14782         #include <math.h>
14783
14784 int
14785 main ()
14786 {
14787 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14788   ;
14789   return 0;
14790 }
14791 _ACEOF
14792 rm -f conftest.$ac_objext conftest$ac_exeext
14793 if { (eval echo "$as_me:14793: \"$ac_link\"") >&5
14794   (eval $ac_link) 2>&5
14795   ac_status=$?
14796   echo "$as_me:14796: \$? = $ac_status" >&5
14797   (exit $ac_status); } &&
14798          { ac_try='test -s conftest$ac_exeext'
14799   { (eval echo "$as_me:14799: \"$ac_try\"") >&5
14800   (eval $ac_try) 2>&5
14801   ac_status=$?
14802   echo "$as_me:14802: \$? = $ac_status" >&5
14803   (exit $ac_status); }; }; then
14804   cf_cv_need_libm=no
14805 else
14806   echo "$as_me: failed program was:" >&5
14807 cat conftest.$ac_ext >&5
14808 cf_cv_need_libm=yes
14809 fi
14810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14811 fi
14812 echo "$as_me:14812: result: $cf_cv_need_libm" >&5
14813 echo "${ECHO_T}$cf_cv_need_libm" >&6
14814 if test "$cf_cv_need_libm" = yes
14815 then
14816 MATH_LIB=-lm
14817 fi
14818
14819 ###     Checks for header files.
14820 echo "$as_me:14820: checking for ANSI C header files" >&5
14821 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14822 if test "${ac_cv_header_stdc+set}" = set; then
14823   echo $ECHO_N "(cached) $ECHO_C" >&6
14824 else
14825   cat >conftest.$ac_ext <<_ACEOF
14826 #line 14826 "configure"
14827 #include "confdefs.h"
14828 #include <stdlib.h>
14829 #include <stdarg.h>
14830 #include <string.h>
14831 #include <float.h>
14832
14833 _ACEOF
14834 if { (eval echo "$as_me:14834: \"$ac_cpp conftest.$ac_ext\"") >&5
14835   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14836   ac_status=$?
14837   egrep -v '^ *\+' conftest.er1 >conftest.err
14838   rm -f conftest.er1
14839   cat conftest.err >&5
14840   echo "$as_me:14840: \$? = $ac_status" >&5
14841   (exit $ac_status); } >/dev/null; then
14842   if test -s conftest.err; then
14843     ac_cpp_err=$ac_c_preproc_warn_flag
14844   else
14845     ac_cpp_err=
14846   fi
14847 else
14848   ac_cpp_err=yes
14849 fi
14850 if test -z "$ac_cpp_err"; then
14851   ac_cv_header_stdc=yes
14852 else
14853   echo "$as_me: failed program was:" >&5
14854   cat conftest.$ac_ext >&5
14855   ac_cv_header_stdc=no
14856 fi
14857 rm -f conftest.err conftest.$ac_ext
14858
14859 if test $ac_cv_header_stdc = yes; then
14860   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14861   cat >conftest.$ac_ext <<_ACEOF
14862 #line 14862 "configure"
14863 #include "confdefs.h"
14864 #include <string.h>
14865
14866 _ACEOF
14867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14868   egrep "memchr" >/dev/null 2>&1; then
14869   :
14870 else
14871   ac_cv_header_stdc=no
14872 fi
14873 rm -rf conftest*
14874
14875 fi
14876
14877 if test $ac_cv_header_stdc = yes; then
14878   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14879   cat >conftest.$ac_ext <<_ACEOF
14880 #line 14880 "configure"
14881 #include "confdefs.h"
14882 #include <stdlib.h>
14883
14884 _ACEOF
14885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14886   egrep "free" >/dev/null 2>&1; then
14887   :
14888 else
14889   ac_cv_header_stdc=no
14890 fi
14891 rm -rf conftest*
14892
14893 fi
14894
14895 if test $ac_cv_header_stdc = yes; then
14896   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14897   if test "$cross_compiling" = yes; then
14898   :
14899 else
14900   cat >conftest.$ac_ext <<_ACEOF
14901 #line 14901 "configure"
14902 #include "confdefs.h"
14903 #include <ctype.h>
14904 #if ((' ' & 0x0FF) == 0x020)
14905 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14906 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14907 #else
14908 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14909                      || ('j' <= (c) && (c) <= 'r') \
14910                      || ('s' <= (c) && (c) <= 'z'))
14911 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14912 #endif
14913
14914 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14915 int
14916 main ()
14917 {
14918   int i;
14919   for (i = 0; i < 256; i++)
14920     if (XOR (islower (i), ISLOWER (i))
14921         || toupper (i) != TOUPPER (i))
14922       $ac_main_return(2);
14923   $ac_main_return (0);
14924 }
14925 _ACEOF
14926 rm -f conftest$ac_exeext
14927 if { (eval echo "$as_me:14927: \"$ac_link\"") >&5
14928   (eval $ac_link) 2>&5
14929   ac_status=$?
14930   echo "$as_me:14930: \$? = $ac_status" >&5
14931   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14932   { (eval echo "$as_me:14932: \"$ac_try\"") >&5
14933   (eval $ac_try) 2>&5
14934   ac_status=$?
14935   echo "$as_me:14935: \$? = $ac_status" >&5
14936   (exit $ac_status); }; }; then
14937   :
14938 else
14939   echo "$as_me: program exited with status $ac_status" >&5
14940 echo "$as_me: failed program was:" >&5
14941 cat conftest.$ac_ext >&5
14942 ac_cv_header_stdc=no
14943 fi
14944 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14945 fi
14946 fi
14947 fi
14948 echo "$as_me:14948: result: $ac_cv_header_stdc" >&5
14949 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14950 if test $ac_cv_header_stdc = yes; then
14951
14952 cat >>confdefs.h <<\EOF
14953 #define STDC_HEADERS 1
14954 EOF
14955
14956 fi
14957
14958 ac_header_dirent=no
14959 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14960   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14961 echo "$as_me:14961: checking for $ac_hdr that defines DIR" >&5
14962 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14963 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14964   echo $ECHO_N "(cached) $ECHO_C" >&6
14965 else
14966   cat >conftest.$ac_ext <<_ACEOF
14967 #line 14967 "configure"
14968 #include "confdefs.h"
14969 #include <sys/types.h>
14970 #include <$ac_hdr>
14971
14972 int
14973 main ()
14974 {
14975 if ((DIR *) 0)
14976 return 0;
14977   ;
14978   return 0;
14979 }
14980 _ACEOF
14981 rm -f conftest.$ac_objext
14982 if { (eval echo "$as_me:14982: \"$ac_compile\"") >&5
14983   (eval $ac_compile) 2>&5
14984   ac_status=$?
14985   echo "$as_me:14985: \$? = $ac_status" >&5
14986   (exit $ac_status); } &&
14987          { ac_try='test -s conftest.$ac_objext'
14988   { (eval echo "$as_me:14988: \"$ac_try\"") >&5
14989   (eval $ac_try) 2>&5
14990   ac_status=$?
14991   echo "$as_me:14991: \$? = $ac_status" >&5
14992   (exit $ac_status); }; }; then
14993   eval "$as_ac_Header=yes"
14994 else
14995   echo "$as_me: failed program was:" >&5
14996 cat conftest.$ac_ext >&5
14997 eval "$as_ac_Header=no"
14998 fi
14999 rm -f conftest.$ac_objext conftest.$ac_ext
15000 fi
15001 echo "$as_me:15001: result: `eval echo '${'$as_ac_Header'}'`" >&5
15002 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15003 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15004   cat >>confdefs.h <<EOF
15005 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15006 EOF
15007
15008 ac_header_dirent=$ac_hdr; break
15009 fi
15010
15011 done
15012 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15013 if test $ac_header_dirent = dirent.h; then
15014   echo "$as_me:15014: checking for opendir in -ldir" >&5
15015 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15016 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15017   echo $ECHO_N "(cached) $ECHO_C" >&6
15018 else
15019   ac_check_lib_save_LIBS=$LIBS
15020 LIBS="-ldir  $LIBS"
15021 cat >conftest.$ac_ext <<_ACEOF
15022 #line 15022 "configure"
15023 #include "confdefs.h"
15024
15025 /* Override any gcc2 internal prototype to avoid an error.  */
15026 #ifdef __cplusplus
15027 extern "C"
15028 #endif
15029 /* We use char because int might match the return type of a gcc2
15030    builtin and then its argument prototype would still apply.  */
15031 char opendir ();
15032 int
15033 main ()
15034 {
15035 opendir ();
15036   ;
15037   return 0;
15038 }
15039 _ACEOF
15040 rm -f conftest.$ac_objext conftest$ac_exeext
15041 if { (eval echo "$as_me:15041: \"$ac_link\"") >&5
15042   (eval $ac_link) 2>&5
15043   ac_status=$?
15044   echo "$as_me:15044: \$? = $ac_status" >&5
15045   (exit $ac_status); } &&
15046          { ac_try='test -s conftest$ac_exeext'
15047   { (eval echo "$as_me:15047: \"$ac_try\"") >&5
15048   (eval $ac_try) 2>&5
15049   ac_status=$?
15050   echo "$as_me:15050: \$? = $ac_status" >&5
15051   (exit $ac_status); }; }; then
15052   ac_cv_lib_dir_opendir=yes
15053 else
15054   echo "$as_me: failed program was:" >&5
15055 cat conftest.$ac_ext >&5
15056 ac_cv_lib_dir_opendir=no
15057 fi
15058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15059 LIBS=$ac_check_lib_save_LIBS
15060 fi
15061 echo "$as_me:15061: result: $ac_cv_lib_dir_opendir" >&5
15062 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15063 if test $ac_cv_lib_dir_opendir = yes; then
15064   LIBS="$LIBS -ldir"
15065 fi
15066
15067 else
15068   echo "$as_me:15068: checking for opendir in -lx" >&5
15069 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15070 if test "${ac_cv_lib_x_opendir+set}" = set; then
15071   echo $ECHO_N "(cached) $ECHO_C" >&6
15072 else
15073   ac_check_lib_save_LIBS=$LIBS
15074 LIBS="-lx  $LIBS"
15075 cat >conftest.$ac_ext <<_ACEOF
15076 #line 15076 "configure"
15077 #include "confdefs.h"
15078
15079 /* Override any gcc2 internal prototype to avoid an error.  */
15080 #ifdef __cplusplus
15081 extern "C"
15082 #endif
15083 /* We use char because int might match the return type of a gcc2
15084    builtin and then its argument prototype would still apply.  */
15085 char opendir ();
15086 int
15087 main ()
15088 {
15089 opendir ();
15090   ;
15091   return 0;
15092 }
15093 _ACEOF
15094 rm -f conftest.$ac_objext conftest$ac_exeext
15095 if { (eval echo "$as_me:15095: \"$ac_link\"") >&5
15096   (eval $ac_link) 2>&5
15097   ac_status=$?
15098   echo "$as_me:15098: \$? = $ac_status" >&5
15099   (exit $ac_status); } &&
15100          { ac_try='test -s conftest$ac_exeext'
15101   { (eval echo "$as_me:15101: \"$ac_try\"") >&5
15102   (eval $ac_try) 2>&5
15103   ac_status=$?
15104   echo "$as_me:15104: \$? = $ac_status" >&5
15105   (exit $ac_status); }; }; then
15106   ac_cv_lib_x_opendir=yes
15107 else
15108   echo "$as_me: failed program was:" >&5
15109 cat conftest.$ac_ext >&5
15110 ac_cv_lib_x_opendir=no
15111 fi
15112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15113 LIBS=$ac_check_lib_save_LIBS
15114 fi
15115 echo "$as_me:15115: result: $ac_cv_lib_x_opendir" >&5
15116 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15117 if test $ac_cv_lib_x_opendir = yes; then
15118   LIBS="$LIBS -lx"
15119 fi
15120
15121 fi
15122
15123 echo "$as_me:15123: checking whether time.h and sys/time.h may both be included" >&5
15124 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15125 if test "${ac_cv_header_time+set}" = set; then
15126   echo $ECHO_N "(cached) $ECHO_C" >&6
15127 else
15128   cat >conftest.$ac_ext <<_ACEOF
15129 #line 15129 "configure"
15130 #include "confdefs.h"
15131 #include <sys/types.h>
15132 #include <sys/time.h>
15133 #include <time.h>
15134
15135 int
15136 main ()
15137 {
15138 if ((struct tm *) 0)
15139 return 0;
15140   ;
15141   return 0;
15142 }
15143 _ACEOF
15144 rm -f conftest.$ac_objext
15145 if { (eval echo "$as_me:15145: \"$ac_compile\"") >&5
15146   (eval $ac_compile) 2>&5
15147   ac_status=$?
15148   echo "$as_me:15148: \$? = $ac_status" >&5
15149   (exit $ac_status); } &&
15150          { ac_try='test -s conftest.$ac_objext'
15151   { (eval echo "$as_me:15151: \"$ac_try\"") >&5
15152   (eval $ac_try) 2>&5
15153   ac_status=$?
15154   echo "$as_me:15154: \$? = $ac_status" >&5
15155   (exit $ac_status); }; }; then
15156   ac_cv_header_time=yes
15157 else
15158   echo "$as_me: failed program was:" >&5
15159 cat conftest.$ac_ext >&5
15160 ac_cv_header_time=no
15161 fi
15162 rm -f conftest.$ac_objext conftest.$ac_ext
15163 fi
15164 echo "$as_me:15164: result: $ac_cv_header_time" >&5
15165 echo "${ECHO_T}$ac_cv_header_time" >&6
15166 if test $ac_cv_header_time = yes; then
15167
15168 cat >>confdefs.h <<\EOF
15169 #define TIME_WITH_SYS_TIME 1
15170 EOF
15171
15172 fi
15173
15174 cf_regex_func=no
15175
15176 cf_regex_libs="regex re"
15177 case $host_os in
15178 (mingw*)
15179         cf_regex_libs="gnurx $cf_regex_libs"
15180         ;;
15181 esac
15182
15183 echo "$as_me:15183: checking for regcomp" >&5
15184 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15185 if test "${ac_cv_func_regcomp+set}" = set; then
15186   echo $ECHO_N "(cached) $ECHO_C" >&6
15187 else
15188   cat >conftest.$ac_ext <<_ACEOF
15189 #line 15189 "configure"
15190 #include "confdefs.h"
15191 /* System header to define __stub macros and hopefully few prototypes,
15192     which can conflict with char regcomp (); below.  */
15193 #include <assert.h>
15194 /* Override any gcc2 internal prototype to avoid an error.  */
15195 #ifdef __cplusplus
15196 extern "C"
15197 #endif
15198 /* We use char because int might match the return type of a gcc2
15199    builtin and then its argument prototype would still apply.  */
15200 char regcomp ();
15201 char (*f) ();
15202
15203 int
15204 main ()
15205 {
15206 /* The GNU C library defines this for functions which it implements
15207     to always fail with ENOSYS.  Some functions are actually named
15208     something starting with __ and the normal name is an alias.  */
15209 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15210 choke me
15211 #else
15212 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15213 #endif
15214
15215   ;
15216   return 0;
15217 }
15218 _ACEOF
15219 rm -f conftest.$ac_objext conftest$ac_exeext
15220 if { (eval echo "$as_me:15220: \"$ac_link\"") >&5
15221   (eval $ac_link) 2>&5
15222   ac_status=$?
15223   echo "$as_me:15223: \$? = $ac_status" >&5
15224   (exit $ac_status); } &&
15225          { ac_try='test -s conftest$ac_exeext'
15226   { (eval echo "$as_me:15226: \"$ac_try\"") >&5
15227   (eval $ac_try) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); }; }; then
15231   ac_cv_func_regcomp=yes
15232 else
15233   echo "$as_me: failed program was:" >&5
15234 cat conftest.$ac_ext >&5
15235 ac_cv_func_regcomp=no
15236 fi
15237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15238 fi
15239 echo "$as_me:15239: result: $ac_cv_func_regcomp" >&5
15240 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15241 if test $ac_cv_func_regcomp = yes; then
15242   cf_regex_func=regcomp
15243 else
15244
15245         for cf_regex_lib in $cf_regex_libs
15246         do
15247                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15248 echo "$as_me:15248: checking for regcomp in -l$cf_regex_lib" >&5
15249 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15250 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15251   echo $ECHO_N "(cached) $ECHO_C" >&6
15252 else
15253   ac_check_lib_save_LIBS=$LIBS
15254 LIBS="-l$cf_regex_lib  $LIBS"
15255 cat >conftest.$ac_ext <<_ACEOF
15256 #line 15256 "configure"
15257 #include "confdefs.h"
15258
15259 /* Override any gcc2 internal prototype to avoid an error.  */
15260 #ifdef __cplusplus
15261 extern "C"
15262 #endif
15263 /* We use char because int might match the return type of a gcc2
15264    builtin and then its argument prototype would still apply.  */
15265 char regcomp ();
15266 int
15267 main ()
15268 {
15269 regcomp ();
15270   ;
15271   return 0;
15272 }
15273 _ACEOF
15274 rm -f conftest.$ac_objext conftest$ac_exeext
15275 if { (eval echo "$as_me:15275: \"$ac_link\"") >&5
15276   (eval $ac_link) 2>&5
15277   ac_status=$?
15278   echo "$as_me:15278: \$? = $ac_status" >&5
15279   (exit $ac_status); } &&
15280          { ac_try='test -s conftest$ac_exeext'
15281   { (eval echo "$as_me:15281: \"$ac_try\"") >&5
15282   (eval $ac_try) 2>&5
15283   ac_status=$?
15284   echo "$as_me:15284: \$? = $ac_status" >&5
15285   (exit $ac_status); }; }; then
15286   eval "$as_ac_Lib=yes"
15287 else
15288   echo "$as_me: failed program was:" >&5
15289 cat conftest.$ac_ext >&5
15290 eval "$as_ac_Lib=no"
15291 fi
15292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15293 LIBS=$ac_check_lib_save_LIBS
15294 fi
15295 echo "$as_me:15295: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15296 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15297 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15298
15299 cf_add_libs="-l$cf_regex_lib"
15300 # Filter out duplicates - this happens with badly-designed ".pc" files...
15301 for cf_add_1lib in $LIBS
15302 do
15303         for cf_add_2lib in $cf_add_libs
15304         do
15305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15306                 then
15307                         cf_add_1lib=
15308                         break
15309                 fi
15310         done
15311         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15312 done
15313 LIBS="$cf_add_libs"
15314
15315                                 cf_regex_func=regcomp
15316                                 break
15317 fi
15318
15319         done
15320
15321 fi
15322
15323 if test "$cf_regex_func" = no ; then
15324         echo "$as_me:15324: checking for compile" >&5
15325 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15326 if test "${ac_cv_func_compile+set}" = set; then
15327   echo $ECHO_N "(cached) $ECHO_C" >&6
15328 else
15329   cat >conftest.$ac_ext <<_ACEOF
15330 #line 15330 "configure"
15331 #include "confdefs.h"
15332 /* System header to define __stub macros and hopefully few prototypes,
15333     which can conflict with char compile (); below.  */
15334 #include <assert.h>
15335 /* Override any gcc2 internal prototype to avoid an error.  */
15336 #ifdef __cplusplus
15337 extern "C"
15338 #endif
15339 /* We use char because int might match the return type of a gcc2
15340    builtin and then its argument prototype would still apply.  */
15341 char compile ();
15342 char (*f) ();
15343
15344 int
15345 main ()
15346 {
15347 /* The GNU C library defines this for functions which it implements
15348     to always fail with ENOSYS.  Some functions are actually named
15349     something starting with __ and the normal name is an alias.  */
15350 #if defined (__stub_compile) || defined (__stub___compile)
15351 choke me
15352 #else
15353 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15354 #endif
15355
15356   ;
15357   return 0;
15358 }
15359 _ACEOF
15360 rm -f conftest.$ac_objext conftest$ac_exeext
15361 if { (eval echo "$as_me:15361: \"$ac_link\"") >&5
15362   (eval $ac_link) 2>&5
15363   ac_status=$?
15364   echo "$as_me:15364: \$? = $ac_status" >&5
15365   (exit $ac_status); } &&
15366          { ac_try='test -s conftest$ac_exeext'
15367   { (eval echo "$as_me:15367: \"$ac_try\"") >&5
15368   (eval $ac_try) 2>&5
15369   ac_status=$?
15370   echo "$as_me:15370: \$? = $ac_status" >&5
15371   (exit $ac_status); }; }; then
15372   ac_cv_func_compile=yes
15373 else
15374   echo "$as_me: failed program was:" >&5
15375 cat conftest.$ac_ext >&5
15376 ac_cv_func_compile=no
15377 fi
15378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15379 fi
15380 echo "$as_me:15380: result: $ac_cv_func_compile" >&5
15381 echo "${ECHO_T}$ac_cv_func_compile" >&6
15382 if test $ac_cv_func_compile = yes; then
15383   cf_regex_func=compile
15384 else
15385
15386                 echo "$as_me:15386: checking for compile in -lgen" >&5
15387 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15388 if test "${ac_cv_lib_gen_compile+set}" = set; then
15389   echo $ECHO_N "(cached) $ECHO_C" >&6
15390 else
15391   ac_check_lib_save_LIBS=$LIBS
15392 LIBS="-lgen  $LIBS"
15393 cat >conftest.$ac_ext <<_ACEOF
15394 #line 15394 "configure"
15395 #include "confdefs.h"
15396
15397 /* Override any gcc2 internal prototype to avoid an error.  */
15398 #ifdef __cplusplus
15399 extern "C"
15400 #endif
15401 /* We use char because int might match the return type of a gcc2
15402    builtin and then its argument prototype would still apply.  */
15403 char compile ();
15404 int
15405 main ()
15406 {
15407 compile ();
15408   ;
15409   return 0;
15410 }
15411 _ACEOF
15412 rm -f conftest.$ac_objext conftest$ac_exeext
15413 if { (eval echo "$as_me:15413: \"$ac_link\"") >&5
15414   (eval $ac_link) 2>&5
15415   ac_status=$?
15416   echo "$as_me:15416: \$? = $ac_status" >&5
15417   (exit $ac_status); } &&
15418          { ac_try='test -s conftest$ac_exeext'
15419   { (eval echo "$as_me:15419: \"$ac_try\"") >&5
15420   (eval $ac_try) 2>&5
15421   ac_status=$?
15422   echo "$as_me:15422: \$? = $ac_status" >&5
15423   (exit $ac_status); }; }; then
15424   ac_cv_lib_gen_compile=yes
15425 else
15426   echo "$as_me: failed program was:" >&5
15427 cat conftest.$ac_ext >&5
15428 ac_cv_lib_gen_compile=no
15429 fi
15430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15431 LIBS=$ac_check_lib_save_LIBS
15432 fi
15433 echo "$as_me:15433: result: $ac_cv_lib_gen_compile" >&5
15434 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15435 if test $ac_cv_lib_gen_compile = yes; then
15436
15437 cf_add_libs="-lgen"
15438 # Filter out duplicates - this happens with badly-designed ".pc" files...
15439 for cf_add_1lib in $LIBS
15440 do
15441         for cf_add_2lib in $cf_add_libs
15442         do
15443                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15444                 then
15445                         cf_add_1lib=
15446                         break
15447                 fi
15448         done
15449         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15450 done
15451 LIBS="$cf_add_libs"
15452
15453                                 cf_regex_func=compile
15454 fi
15455
15456 fi
15457
15458 fi
15459
15460 if test "$cf_regex_func" = no ; then
15461         { echo "$as_me:15461: WARNING: cannot find regular expression library" >&5
15462 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15463 fi
15464
15465 echo "$as_me:15465: checking for regular-expression headers" >&5
15466 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15467 if test "${cf_cv_regex_hdrs+set}" = set; then
15468   echo $ECHO_N "(cached) $ECHO_C" >&6
15469 else
15470
15471 cf_cv_regex_hdrs=no
15472 case $cf_regex_func in
15473 (compile)
15474         for cf_regex_hdr in regexp.h regexpr.h
15475         do
15476                 cat >conftest.$ac_ext <<_ACEOF
15477 #line 15477 "configure"
15478 #include "confdefs.h"
15479 #include <$cf_regex_hdr>
15480 int
15481 main ()
15482 {
15483
15484                         char *p = compile("", "", "", 0);
15485                         int x = step("", "");
15486
15487   ;
15488   return 0;
15489 }
15490 _ACEOF
15491 rm -f conftest.$ac_objext conftest$ac_exeext
15492 if { (eval echo "$as_me:15492: \"$ac_link\"") >&5
15493   (eval $ac_link) 2>&5
15494   ac_status=$?
15495   echo "$as_me:15495: \$? = $ac_status" >&5
15496   (exit $ac_status); } &&
15497          { ac_try='test -s conftest$ac_exeext'
15498   { (eval echo "$as_me:15498: \"$ac_try\"") >&5
15499   (eval $ac_try) 2>&5
15500   ac_status=$?
15501   echo "$as_me:15501: \$? = $ac_status" >&5
15502   (exit $ac_status); }; }; then
15503
15504                         cf_cv_regex_hdrs=$cf_regex_hdr
15505                         break
15506
15507 else
15508   echo "$as_me: failed program was:" >&5
15509 cat conftest.$ac_ext >&5
15510 fi
15511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15512         done
15513         ;;
15514 (*)
15515         for cf_regex_hdr in regex.h
15516         do
15517                 cat >conftest.$ac_ext <<_ACEOF
15518 #line 15518 "configure"
15519 #include "confdefs.h"
15520 #include <sys/types.h>
15521 #include <$cf_regex_hdr>
15522 int
15523 main ()
15524 {
15525
15526                         regex_t *p;
15527                         int x = regcomp(p, "", 0);
15528                         int y = regexec(p, "", 0, 0, 0);
15529                         regfree(p);
15530
15531   ;
15532   return 0;
15533 }
15534 _ACEOF
15535 rm -f conftest.$ac_objext conftest$ac_exeext
15536 if { (eval echo "$as_me:15536: \"$ac_link\"") >&5
15537   (eval $ac_link) 2>&5
15538   ac_status=$?
15539   echo "$as_me:15539: \$? = $ac_status" >&5
15540   (exit $ac_status); } &&
15541          { ac_try='test -s conftest$ac_exeext'
15542   { (eval echo "$as_me:15542: \"$ac_try\"") >&5
15543   (eval $ac_try) 2>&5
15544   ac_status=$?
15545   echo "$as_me:15545: \$? = $ac_status" >&5
15546   (exit $ac_status); }; }; then
15547
15548                         cf_cv_regex_hdrs=$cf_regex_hdr
15549                         break
15550
15551 else
15552   echo "$as_me: failed program was:" >&5
15553 cat conftest.$ac_ext >&5
15554 fi
15555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15556         done
15557         ;;
15558 esac
15559
15560 fi
15561 echo "$as_me:15561: result: $cf_cv_regex_hdrs" >&5
15562 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15563
15564 case $cf_cv_regex_hdrs in
15565         (no)            { echo "$as_me:15565: WARNING: no regular expression header found" >&5
15566 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15567         (regex.h)
15568 cat >>confdefs.h <<\EOF
15569 #define HAVE_REGEX_H_FUNCS 1
15570 EOF
15571  ;;
15572         (regexp.h)
15573 cat >>confdefs.h <<\EOF
15574 #define HAVE_REGEXP_H_FUNCS 1
15575 EOF
15576  ;;
15577         (regexpr.h)
15578 cat >>confdefs.h <<\EOF
15579 #define HAVE_REGEXPR_H_FUNCS 1
15580 EOF
15581  ;;
15582 esac
15583
15584 for ac_header in \
15585 fcntl.h \
15586 getopt.h \
15587 limits.h \
15588 locale.h \
15589 math.h \
15590 poll.h \
15591 sys/bsdtypes.h \
15592 sys/ioctl.h \
15593 sys/param.h \
15594 sys/poll.h \
15595 sys/select.h \
15596 sys/time.h \
15597 sys/times.h \
15598 ttyent.h \
15599 unistd.h \
15600 wctype.h \
15601
15602 do
15603 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15604 echo "$as_me:15604: checking for $ac_header" >&5
15605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15607   echo $ECHO_N "(cached) $ECHO_C" >&6
15608 else
15609   cat >conftest.$ac_ext <<_ACEOF
15610 #line 15610 "configure"
15611 #include "confdefs.h"
15612 #include <$ac_header>
15613 _ACEOF
15614 if { (eval echo "$as_me:15614: \"$ac_cpp conftest.$ac_ext\"") >&5
15615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15616   ac_status=$?
15617   egrep -v '^ *\+' conftest.er1 >conftest.err
15618   rm -f conftest.er1
15619   cat conftest.err >&5
15620   echo "$as_me:15620: \$? = $ac_status" >&5
15621   (exit $ac_status); } >/dev/null; then
15622   if test -s conftest.err; then
15623     ac_cpp_err=$ac_c_preproc_warn_flag
15624   else
15625     ac_cpp_err=
15626   fi
15627 else
15628   ac_cpp_err=yes
15629 fi
15630 if test -z "$ac_cpp_err"; then
15631   eval "$as_ac_Header=yes"
15632 else
15633   echo "$as_me: failed program was:" >&5
15634   cat conftest.$ac_ext >&5
15635   eval "$as_ac_Header=no"
15636 fi
15637 rm -f conftest.err conftest.$ac_ext
15638 fi
15639 echo "$as_me:15639: result: `eval echo '${'$as_ac_Header'}'`" >&5
15640 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15641 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15642   cat >>confdefs.h <<EOF
15643 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15644 EOF
15645
15646 fi
15647 done
15648
15649 for ac_header in unistd.h getopt.h
15650 do
15651 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15652 echo "$as_me:15652: checking for $ac_header" >&5
15653 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15654 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15655   echo $ECHO_N "(cached) $ECHO_C" >&6
15656 else
15657   cat >conftest.$ac_ext <<_ACEOF
15658 #line 15658 "configure"
15659 #include "confdefs.h"
15660 #include <$ac_header>
15661 _ACEOF
15662 if { (eval echo "$as_me:15662: \"$ac_cpp conftest.$ac_ext\"") >&5
15663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15664   ac_status=$?
15665   egrep -v '^ *\+' conftest.er1 >conftest.err
15666   rm -f conftest.er1
15667   cat conftest.err >&5
15668   echo "$as_me:15668: \$? = $ac_status" >&5
15669   (exit $ac_status); } >/dev/null; then
15670   if test -s conftest.err; then
15671     ac_cpp_err=$ac_c_preproc_warn_flag
15672   else
15673     ac_cpp_err=
15674   fi
15675 else
15676   ac_cpp_err=yes
15677 fi
15678 if test -z "$ac_cpp_err"; then
15679   eval "$as_ac_Header=yes"
15680 else
15681   echo "$as_me: failed program was:" >&5
15682   cat conftest.$ac_ext >&5
15683   eval "$as_ac_Header=no"
15684 fi
15685 rm -f conftest.err conftest.$ac_ext
15686 fi
15687 echo "$as_me:15687: result: `eval echo '${'$as_ac_Header'}'`" >&5
15688 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15689 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15690   cat >>confdefs.h <<EOF
15691 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15692 EOF
15693
15694 fi
15695 done
15696
15697 echo "$as_me:15697: checking for header declaring getopt variables" >&5
15698 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15699 if test "${cf_cv_getopt_header+set}" = set; then
15700   echo $ECHO_N "(cached) $ECHO_C" >&6
15701 else
15702
15703 cf_cv_getopt_header=none
15704 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15705 do
15706 cat >conftest.$ac_ext <<_ACEOF
15707 #line 15707 "configure"
15708 #include "confdefs.h"
15709
15710 #include <$cf_header>
15711 int
15712 main ()
15713 {
15714 int x = optind; char *y = optarg
15715   ;
15716   return 0;
15717 }
15718 _ACEOF
15719 rm -f conftest.$ac_objext
15720 if { (eval echo "$as_me:15720: \"$ac_compile\"") >&5
15721   (eval $ac_compile) 2>&5
15722   ac_status=$?
15723   echo "$as_me:15723: \$? = $ac_status" >&5
15724   (exit $ac_status); } &&
15725          { ac_try='test -s conftest.$ac_objext'
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   cf_cv_getopt_header=$cf_header
15732  break
15733 else
15734   echo "$as_me: failed program was:" >&5
15735 cat conftest.$ac_ext >&5
15736 fi
15737 rm -f conftest.$ac_objext conftest.$ac_ext
15738 done
15739
15740 fi
15741 echo "$as_me:15741: result: $cf_cv_getopt_header" >&5
15742 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15743 if test $cf_cv_getopt_header != none ; then
15744
15745 cat >>confdefs.h <<\EOF
15746 #define HAVE_GETOPT_HEADER 1
15747 EOF
15748
15749 fi
15750 if test $cf_cv_getopt_header = getopt.h ; then
15751
15752 cat >>confdefs.h <<\EOF
15753 #define NEED_GETOPT_H 1
15754 EOF
15755
15756 fi
15757
15758 # check for ISC (this may also define _POSIX_SOURCE)
15759 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15760 if test "x$ISC" = xyes ; then
15761
15762 echo "$as_me:15762: checking for main in -lcposix" >&5
15763 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15764 if test "${ac_cv_lib_cposix_main+set}" = set; then
15765   echo $ECHO_N "(cached) $ECHO_C" >&6
15766 else
15767   ac_check_lib_save_LIBS=$LIBS
15768 LIBS="-lcposix  $LIBS"
15769 cat >conftest.$ac_ext <<_ACEOF
15770 #line 15770 "configure"
15771 #include "confdefs.h"
15772
15773 int
15774 main ()
15775 {
15776 main ();
15777   ;
15778   return 0;
15779 }
15780 _ACEOF
15781 rm -f conftest.$ac_objext conftest$ac_exeext
15782 if { (eval echo "$as_me:15782: \"$ac_link\"") >&5
15783   (eval $ac_link) 2>&5
15784   ac_status=$?
15785   echo "$as_me:15785: \$? = $ac_status" >&5
15786   (exit $ac_status); } &&
15787          { ac_try='test -s conftest$ac_exeext'
15788   { (eval echo "$as_me:15788: \"$ac_try\"") >&5
15789   (eval $ac_try) 2>&5
15790   ac_status=$?
15791   echo "$as_me:15791: \$? = $ac_status" >&5
15792   (exit $ac_status); }; }; then
15793   ac_cv_lib_cposix_main=yes
15794 else
15795   echo "$as_me: failed program was:" >&5
15796 cat conftest.$ac_ext >&5
15797 ac_cv_lib_cposix_main=no
15798 fi
15799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15800 LIBS=$ac_check_lib_save_LIBS
15801 fi
15802 echo "$as_me:15802: result: $ac_cv_lib_cposix_main" >&5
15803 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15804 if test $ac_cv_lib_cposix_main = yes; then
15805   cat >>confdefs.h <<EOF
15806 #define HAVE_LIBCPOSIX 1
15807 EOF
15808
15809   LIBS="-lcposix $LIBS"
15810
15811 fi
15812
15813         echo "$as_me:15813: checking for bzero in -linet" >&5
15814 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15815 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15816   echo $ECHO_N "(cached) $ECHO_C" >&6
15817 else
15818   ac_check_lib_save_LIBS=$LIBS
15819 LIBS="-linet  $LIBS"
15820 cat >conftest.$ac_ext <<_ACEOF
15821 #line 15821 "configure"
15822 #include "confdefs.h"
15823
15824 /* Override any gcc2 internal prototype to avoid an error.  */
15825 #ifdef __cplusplus
15826 extern "C"
15827 #endif
15828 /* We use char because int might match the return type of a gcc2
15829    builtin and then its argument prototype would still apply.  */
15830 char bzero ();
15831 int
15832 main ()
15833 {
15834 bzero ();
15835   ;
15836   return 0;
15837 }
15838 _ACEOF
15839 rm -f conftest.$ac_objext conftest$ac_exeext
15840 if { (eval echo "$as_me:15840: \"$ac_link\"") >&5
15841   (eval $ac_link) 2>&5
15842   ac_status=$?
15843   echo "$as_me:15843: \$? = $ac_status" >&5
15844   (exit $ac_status); } &&
15845          { ac_try='test -s conftest$ac_exeext'
15846   { (eval echo "$as_me:15846: \"$ac_try\"") >&5
15847   (eval $ac_try) 2>&5
15848   ac_status=$?
15849   echo "$as_me:15849: \$? = $ac_status" >&5
15850   (exit $ac_status); }; }; then
15851   ac_cv_lib_inet_bzero=yes
15852 else
15853   echo "$as_me: failed program was:" >&5
15854 cat conftest.$ac_ext >&5
15855 ac_cv_lib_inet_bzero=no
15856 fi
15857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15858 LIBS=$ac_check_lib_save_LIBS
15859 fi
15860 echo "$as_me:15860: result: $ac_cv_lib_inet_bzero" >&5
15861 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15862 if test $ac_cv_lib_inet_bzero = yes; then
15863
15864 cf_add_libs="-linet"
15865 # Filter out duplicates - this happens with badly-designed ".pc" files...
15866 for cf_add_1lib in $LIBS
15867 do
15868         for cf_add_2lib in $cf_add_libs
15869         do
15870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15871                 then
15872                         cf_add_1lib=
15873                         break
15874                 fi
15875         done
15876         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15877 done
15878 LIBS="$cf_add_libs"
15879
15880 fi
15881 fi
15882
15883 echo "$as_me:15883: checking if sys/time.h works with sys/select.h" >&5
15884 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15885 if test "${cf_cv_sys_time_select+set}" = set; then
15886   echo $ECHO_N "(cached) $ECHO_C" >&6
15887 else
15888
15889 cat >conftest.$ac_ext <<_ACEOF
15890 #line 15890 "configure"
15891 #include "confdefs.h"
15892
15893 #include <sys/types.h>
15894 #ifdef HAVE_SYS_TIME_H
15895 #include <sys/time.h>
15896 #endif
15897 #ifdef HAVE_SYS_SELECT_H
15898 #include <sys/select.h>
15899 #endif
15900
15901 int
15902 main ()
15903 {
15904
15905   ;
15906   return 0;
15907 }
15908 _ACEOF
15909 rm -f conftest.$ac_objext
15910 if { (eval echo "$as_me:15910: \"$ac_compile\"") >&5
15911   (eval $ac_compile) 2>&5
15912   ac_status=$?
15913   echo "$as_me:15913: \$? = $ac_status" >&5
15914   (exit $ac_status); } &&
15915          { ac_try='test -s conftest.$ac_objext'
15916   { (eval echo "$as_me:15916: \"$ac_try\"") >&5
15917   (eval $ac_try) 2>&5
15918   ac_status=$?
15919   echo "$as_me:15919: \$? = $ac_status" >&5
15920   (exit $ac_status); }; }; then
15921   cf_cv_sys_time_select=yes
15922 else
15923   echo "$as_me: failed program was:" >&5
15924 cat conftest.$ac_ext >&5
15925 cf_cv_sys_time_select=no
15926 fi
15927 rm -f conftest.$ac_objext conftest.$ac_ext
15928
15929 fi
15930
15931 echo "$as_me:15931: result: $cf_cv_sys_time_select" >&5
15932 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15933 test "$cf_cv_sys_time_select" = yes &&
15934 cat >>confdefs.h <<\EOF
15935 #define HAVE_SYS_TIME_SELECT 1
15936 EOF
15937
15938 ###     checks for compiler characteristics
15939 ac_ext=c
15940 ac_cpp='$CPP $CPPFLAGS'
15941 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15942 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15943 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15944 ac_main_return=return
15945
15946 echo "$as_me:15946: checking for an ANSI C-conforming const" >&5
15947 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15948 if test "${ac_cv_c_const+set}" = set; then
15949   echo $ECHO_N "(cached) $ECHO_C" >&6
15950 else
15951   cat >conftest.$ac_ext <<_ACEOF
15952 #line 15952 "configure"
15953 #include "confdefs.h"
15954
15955 int
15956 main ()
15957 {
15958 /* FIXME: Include the comments suggested by Paul. */
15959 #ifndef __cplusplus
15960   /* Ultrix mips cc rejects this.  */
15961   typedef int charset[2];
15962   const charset x;
15963   /* SunOS 4.1.1 cc rejects this.  */
15964   char const *const *ccp;
15965   char **p;
15966   /* NEC SVR4.0.2 mips cc rejects this.  */
15967   struct point {int x, y;};
15968   static struct point const zero = {0,0};
15969   /* AIX XL C 1.02.0.0 rejects this.
15970      It does not let you subtract one const X* pointer from another in
15971      an arm of an if-expression whose if-part is not a constant
15972      expression */
15973   const char *g = "string";
15974   ccp = &g + (g ? g-g : 0);
15975   /* HPUX 7.0 cc rejects these. */
15976   ++ccp;
15977   p = (char**) ccp;
15978   ccp = (char const *const *) p;
15979   { /* SCO 3.2v4 cc rejects this.  */
15980     char *t;
15981     char const *s = 0 ? (char *) 0 : (char const *) 0;
15982
15983     *t++ = 0;
15984   }
15985   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15986     int x[] = {25, 17};
15987     const int *foo = &x[0];
15988     ++foo;
15989   }
15990   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15991     typedef const int *iptr;
15992     iptr p = 0;
15993     ++p;
15994   }
15995   { /* AIX XL C 1.02.0.0 rejects this saying
15996        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15997     struct s { int j; const int *ap[3]; };
15998     struct s *b; b->j = 5;
15999   }
16000   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16001     const int foo = 10;
16002   }
16003 #endif
16004
16005   ;
16006   return 0;
16007 }
16008 _ACEOF
16009 rm -f conftest.$ac_objext
16010 if { (eval echo "$as_me:16010: \"$ac_compile\"") >&5
16011   (eval $ac_compile) 2>&5
16012   ac_status=$?
16013   echo "$as_me:16013: \$? = $ac_status" >&5
16014   (exit $ac_status); } &&
16015          { ac_try='test -s conftest.$ac_objext'
16016   { (eval echo "$as_me:16016: \"$ac_try\"") >&5
16017   (eval $ac_try) 2>&5
16018   ac_status=$?
16019   echo "$as_me:16019: \$? = $ac_status" >&5
16020   (exit $ac_status); }; }; then
16021   ac_cv_c_const=yes
16022 else
16023   echo "$as_me: failed program was:" >&5
16024 cat conftest.$ac_ext >&5
16025 ac_cv_c_const=no
16026 fi
16027 rm -f conftest.$ac_objext conftest.$ac_ext
16028 fi
16029 echo "$as_me:16029: result: $ac_cv_c_const" >&5
16030 echo "${ECHO_T}$ac_cv_c_const" >&6
16031 if test $ac_cv_c_const = no; then
16032
16033 cat >>confdefs.h <<\EOF
16034 #define const
16035 EOF
16036
16037 fi
16038
16039 echo "$as_me:16039: checking for inline" >&5
16040 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16041 if test "${ac_cv_c_inline+set}" = set; then
16042   echo $ECHO_N "(cached) $ECHO_C" >&6
16043 else
16044   ac_cv_c_inline=no
16045 for ac_kw in inline __inline__ __inline; do
16046   cat >conftest.$ac_ext <<_ACEOF
16047 #line 16047 "configure"
16048 #include "confdefs.h"
16049 #ifndef __cplusplus
16050 static $ac_kw int static_foo () {return 0; }
16051 $ac_kw int foo () {return 0; }
16052 #endif
16053
16054 _ACEOF
16055 rm -f conftest.$ac_objext
16056 if { (eval echo "$as_me:16056: \"$ac_compile\"") >&5
16057   (eval $ac_compile) 2>&5
16058   ac_status=$?
16059   echo "$as_me:16059: \$? = $ac_status" >&5
16060   (exit $ac_status); } &&
16061          { ac_try='test -s conftest.$ac_objext'
16062   { (eval echo "$as_me:16062: \"$ac_try\"") >&5
16063   (eval $ac_try) 2>&5
16064   ac_status=$?
16065   echo "$as_me:16065: \$? = $ac_status" >&5
16066   (exit $ac_status); }; }; then
16067   ac_cv_c_inline=$ac_kw; break
16068 else
16069   echo "$as_me: failed program was:" >&5
16070 cat conftest.$ac_ext >&5
16071 fi
16072 rm -f conftest.$ac_objext conftest.$ac_ext
16073 done
16074
16075 fi
16076 echo "$as_me:16076: result: $ac_cv_c_inline" >&5
16077 echo "${ECHO_T}$ac_cv_c_inline" >&6
16078 case $ac_cv_c_inline in
16079   inline | yes) ;;
16080   no)
16081 cat >>confdefs.h <<\EOF
16082 #define inline
16083 EOF
16084  ;;
16085   *)  cat >>confdefs.h <<EOF
16086 #define inline $ac_cv_c_inline
16087 EOF
16088  ;;
16089 esac
16090
16091 NCURSES_INLINE=
16092 if test "$ac_cv_c_inline" != no ; then
16093         NCURSES_INLINE=inline
16094         if test "$INTEL_COMPILER" = yes
16095         then
16096                 :
16097         elif test "$CLANG_COMPILER" = yes
16098         then
16099                 :
16100         elif test "$GCC" = yes
16101         then
16102                 echo "$as_me:16102: checking if $CC supports options to tune inlining" >&5
16103 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16104 if test "${cf_cv_gcc_inline+set}" = set; then
16105   echo $ECHO_N "(cached) $ECHO_C" >&6
16106 else
16107
16108                 cf_save_CFLAGS=$CFLAGS
16109                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16110                 cat >conftest.$ac_ext <<_ACEOF
16111 #line 16111 "configure"
16112 #include "confdefs.h"
16113 inline int foo(void) { return 1; }
16114 int
16115 main ()
16116 {
16117 ${cf_cv_main_return:-return} foo()
16118   ;
16119   return 0;
16120 }
16121 _ACEOF
16122 rm -f conftest.$ac_objext
16123 if { (eval echo "$as_me:16123: \"$ac_compile\"") >&5
16124   (eval $ac_compile) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); } &&
16128          { ac_try='test -s conftest.$ac_objext'
16129   { (eval echo "$as_me:16129: \"$ac_try\"") >&5
16130   (eval $ac_try) 2>&5
16131   ac_status=$?
16132   echo "$as_me:16132: \$? = $ac_status" >&5
16133   (exit $ac_status); }; }; then
16134   cf_cv_gcc_inline=yes
16135 else
16136   echo "$as_me: failed program was:" >&5
16137 cat conftest.$ac_ext >&5
16138 cf_cv_gcc_inline=no
16139 fi
16140 rm -f conftest.$ac_objext conftest.$ac_ext
16141                 CFLAGS=$cf_save_CFLAGS
16142
16143 fi
16144 echo "$as_me:16144: result: $cf_cv_gcc_inline" >&5
16145 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16146                 if test "$cf_cv_gcc_inline" = yes ; then
16147
16148 cf_fix_cppflags=no
16149 cf_new_cflags=
16150 cf_new_cppflags=
16151 cf_new_extra_cppflags=
16152
16153 for cf_add_cflags in --param max-inline-insns-single=1200
16154 do
16155 case $cf_fix_cppflags in
16156 (no)
16157         case $cf_add_cflags in
16158         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16159                 case $cf_add_cflags in
16160                 (-D*)
16161                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16162
16163                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16164                                 && test -z "${cf_tst_cflags}" \
16165                                 && cf_fix_cppflags=yes
16166
16167                         if test $cf_fix_cppflags = yes ; then
16168                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16169                                 continue
16170                         elif test "${cf_tst_cflags}" = "\"'" ; then
16171                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16172                                 continue
16173                         fi
16174                         ;;
16175                 esac
16176                 case "$CPPFLAGS" in
16177                 (*$cf_add_cflags)
16178                         ;;
16179                 (*)
16180                         case $cf_add_cflags in
16181                         (-D*)
16182                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16183
16184 CPPFLAGS=`echo "$CPPFLAGS" | \
16185         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16186                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16187
16188                                 ;;
16189                         esac
16190                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16191                         ;;
16192                 esac
16193                 ;;
16194         (*)
16195                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16196                 ;;
16197         esac
16198         ;;
16199 (yes)
16200         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16201
16202         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16203
16204         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16205                 && test -z "${cf_tst_cflags}" \
16206                 && cf_fix_cppflags=no
16207         ;;
16208 esac
16209 done
16210
16211 if test -n "$cf_new_cflags" ; then
16212
16213         CFLAGS="$CFLAGS $cf_new_cflags"
16214 fi
16215
16216 if test -n "$cf_new_cppflags" ; then
16217
16218         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16219 fi
16220
16221 if test -n "$cf_new_extra_cppflags" ; then
16222
16223         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16224 fi
16225
16226                 fi
16227         fi
16228 fi
16229
16230 echo "$as_me:16230: checking for signal global datatype" >&5
16231 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16232 if test "${cf_cv_sig_atomic_t+set}" = set; then
16233   echo $ECHO_N "(cached) $ECHO_C" >&6
16234 else
16235
16236         for cf_type in \
16237                 "volatile sig_atomic_t" \
16238                 "sig_atomic_t" \
16239                 "int"
16240         do
16241         cat >conftest.$ac_ext <<_ACEOF
16242 #line 16242 "configure"
16243 #include "confdefs.h"
16244
16245 #include <sys/types.h>
16246 #include <signal.h>
16247 #include <stdio.h>
16248
16249 extern $cf_type x;
16250 $cf_type x;
16251 static void handler(int sig)
16252 {
16253         x = 5;
16254 }
16255 int
16256 main ()
16257 {
16258 signal(SIGINT, handler);
16259                  x = 1
16260   ;
16261   return 0;
16262 }
16263 _ACEOF
16264 rm -f conftest.$ac_objext
16265 if { (eval echo "$as_me:16265: \"$ac_compile\"") >&5
16266   (eval $ac_compile) 2>&5
16267   ac_status=$?
16268   echo "$as_me:16268: \$? = $ac_status" >&5
16269   (exit $ac_status); } &&
16270          { ac_try='test -s conftest.$ac_objext'
16271   { (eval echo "$as_me:16271: \"$ac_try\"") >&5
16272   (eval $ac_try) 2>&5
16273   ac_status=$?
16274   echo "$as_me:16274: \$? = $ac_status" >&5
16275   (exit $ac_status); }; }; then
16276   cf_cv_sig_atomic_t=$cf_type
16277 else
16278   echo "$as_me: failed program was:" >&5
16279 cat conftest.$ac_ext >&5
16280 cf_cv_sig_atomic_t=no
16281 fi
16282 rm -f conftest.$ac_objext conftest.$ac_ext
16283                 test "$cf_cv_sig_atomic_t" != no && break
16284         done
16285
16286 fi
16287
16288 echo "$as_me:16288: result: $cf_cv_sig_atomic_t" >&5
16289 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16290 test "$cf_cv_sig_atomic_t" != no &&
16291 cat >>confdefs.h <<EOF
16292 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16293 EOF
16294
16295 if test $NCURSES_CHTYPE = auto ; then
16296
16297 echo "$as_me:16297: checking for type of chtype" >&5
16298 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16299 if test "${cf_cv_typeof_chtype+set}" = set; then
16300   echo $ECHO_N "(cached) $ECHO_C" >&6
16301 else
16302
16303                 if test "$cross_compiling" = yes; then
16304   cf_cv_typeof_chtype=long
16305 else
16306   cat >conftest.$ac_ext <<_ACEOF
16307 #line 16307 "configure"
16308 #include "confdefs.h"
16309
16310 #define WANT_BITS 31
16311 #include <stdio.h>
16312 int main()
16313 {
16314         FILE *fp = fopen("cf_test.out", "w");
16315         if (fp != 0) {
16316                 char *result = "long";
16317                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16318                         int n;
16319                         unsigned int x, y;
16320                         for (n = 0; n < WANT_BITS; n++) {
16321                                 x = (1 << n);
16322                                 y = (x >> n);
16323                                 if (y != 1 || x == 0) {
16324                                         x = 0;
16325                                         break;
16326                                 }
16327                         }
16328                         /*
16329                          * If x is nonzero, an int is big enough for the bits
16330                          * that we want.
16331                          */
16332                         result = (x != 0) ? "int" : "long";
16333                 }
16334                 fputs(result, fp);
16335                 fclose(fp);
16336         }
16337         ${cf_cv_main_return:-return}(0);
16338 }
16339
16340 _ACEOF
16341 rm -f conftest$ac_exeext
16342 if { (eval echo "$as_me:16342: \"$ac_link\"") >&5
16343   (eval $ac_link) 2>&5
16344   ac_status=$?
16345   echo "$as_me:16345: \$? = $ac_status" >&5
16346   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16347   { (eval echo "$as_me:16347: \"$ac_try\"") >&5
16348   (eval $ac_try) 2>&5
16349   ac_status=$?
16350   echo "$as_me:16350: \$? = $ac_status" >&5
16351   (exit $ac_status); }; }; then
16352   cf_cv_typeof_chtype=`cat cf_test.out`
16353 else
16354   echo "$as_me: program exited with status $ac_status" >&5
16355 echo "$as_me: failed program was:" >&5
16356 cat conftest.$ac_ext >&5
16357 cf_cv_typeof_chtype=long
16358 fi
16359 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16360 fi
16361                 rm -f cf_test.out
16362
16363 fi
16364
16365 echo "$as_me:16365: result: $cf_cv_typeof_chtype" >&5
16366 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16367
16368 cat >>confdefs.h <<EOF
16369 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16370 EOF
16371
16372 else
16373         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16374 fi
16375 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16376
16377 echo "$as_me:16377: checking if unsigned literals are legal" >&5
16378 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16379 if test "${cf_cv_unsigned_literals+set}" = set; then
16380   echo $ECHO_N "(cached) $ECHO_C" >&6
16381 else
16382
16383         cat >conftest.$ac_ext <<_ACEOF
16384 #line 16384 "configure"
16385 #include "confdefs.h"
16386
16387 int
16388 main ()
16389 {
16390 long x = 1L + 1UL + 1U + 1
16391   ;
16392   return 0;
16393 }
16394 _ACEOF
16395 rm -f conftest.$ac_objext
16396 if { (eval echo "$as_me:16396: \"$ac_compile\"") >&5
16397   (eval $ac_compile) 2>&5
16398   ac_status=$?
16399   echo "$as_me:16399: \$? = $ac_status" >&5
16400   (exit $ac_status); } &&
16401          { ac_try='test -s conftest.$ac_objext'
16402   { (eval echo "$as_me:16402: \"$ac_try\"") >&5
16403   (eval $ac_try) 2>&5
16404   ac_status=$?
16405   echo "$as_me:16405: \$? = $ac_status" >&5
16406   (exit $ac_status); }; }; then
16407   cf_cv_unsigned_literals=yes
16408 else
16409   echo "$as_me: failed program was:" >&5
16410 cat conftest.$ac_ext >&5
16411 cf_cv_unsigned_literals=no
16412 fi
16413 rm -f conftest.$ac_objext conftest.$ac_ext
16414
16415 fi
16416
16417 echo "$as_me:16417: result: $cf_cv_unsigned_literals" >&5
16418 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16419
16420 cf_cv_1UL="1"
16421 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16422 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16423
16424 if test $NCURSES_MMASK_T = auto ; then
16425         cf_cv_typeof_mmask_t=long
16426 else
16427         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16428 fi
16429 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16430
16431 ###     Checks for external-data
16432
16433 echo "$as_me:16433: checking if external errno is declared" >&5
16434 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16435 if test "${cf_cv_dcl_errno+set}" = set; then
16436   echo $ECHO_N "(cached) $ECHO_C" >&6
16437 else
16438
16439         cat >conftest.$ac_ext <<_ACEOF
16440 #line 16440 "configure"
16441 #include "confdefs.h"
16442
16443 #ifdef HAVE_STDLIB_H
16444 #include <stdlib.h>
16445 #endif
16446 #include <stdio.h>
16447 #include <sys/types.h>
16448 #include <errno.h>
16449 int
16450 main ()
16451 {
16452 int x = (int) errno
16453   ;
16454   return 0;
16455 }
16456 _ACEOF
16457 rm -f conftest.$ac_objext
16458 if { (eval echo "$as_me:16458: \"$ac_compile\"") >&5
16459   (eval $ac_compile) 2>&5
16460   ac_status=$?
16461   echo "$as_me:16461: \$? = $ac_status" >&5
16462   (exit $ac_status); } &&
16463          { ac_try='test -s conftest.$ac_objext'
16464   { (eval echo "$as_me:16464: \"$ac_try\"") >&5
16465   (eval $ac_try) 2>&5
16466   ac_status=$?
16467   echo "$as_me:16467: \$? = $ac_status" >&5
16468   (exit $ac_status); }; }; then
16469   cf_cv_dcl_errno=yes
16470 else
16471   echo "$as_me: failed program was:" >&5
16472 cat conftest.$ac_ext >&5
16473 cf_cv_dcl_errno=no
16474 fi
16475 rm -f conftest.$ac_objext conftest.$ac_ext
16476
16477 fi
16478 echo "$as_me:16478: result: $cf_cv_dcl_errno" >&5
16479 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16480
16481 if test "$cf_cv_dcl_errno" = no ; then
16482
16483 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16484
16485         cat >>confdefs.h <<EOF
16486 #define $cf_result 1
16487 EOF
16488
16489 fi
16490
16491 # It's possible (for near-UNIX clones) that the data doesn't exist
16492
16493 echo "$as_me:16493: checking if external errno exists" >&5
16494 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16495 if test "${cf_cv_have_errno+set}" = set; then
16496   echo $ECHO_N "(cached) $ECHO_C" >&6
16497 else
16498
16499         cat >conftest.$ac_ext <<_ACEOF
16500 #line 16500 "configure"
16501 #include "confdefs.h"
16502
16503 #undef errno
16504 extern int errno;
16505
16506 int
16507 main ()
16508 {
16509 errno = 2
16510   ;
16511   return 0;
16512 }
16513 _ACEOF
16514 rm -f conftest.$ac_objext conftest$ac_exeext
16515 if { (eval echo "$as_me:16515: \"$ac_link\"") >&5
16516   (eval $ac_link) 2>&5
16517   ac_status=$?
16518   echo "$as_me:16518: \$? = $ac_status" >&5
16519   (exit $ac_status); } &&
16520          { ac_try='test -s conftest$ac_exeext'
16521   { (eval echo "$as_me:16521: \"$ac_try\"") >&5
16522   (eval $ac_try) 2>&5
16523   ac_status=$?
16524   echo "$as_me:16524: \$? = $ac_status" >&5
16525   (exit $ac_status); }; }; then
16526   cf_cv_have_errno=yes
16527 else
16528   echo "$as_me: failed program was:" >&5
16529 cat conftest.$ac_ext >&5
16530 cf_cv_have_errno=no
16531 fi
16532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16533
16534 fi
16535 echo "$as_me:16535: result: $cf_cv_have_errno" >&5
16536 echo "${ECHO_T}$cf_cv_have_errno" >&6
16537
16538 if test "$cf_cv_have_errno" = yes ; then
16539
16540 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16541
16542         cat >>confdefs.h <<EOF
16543 #define $cf_result 1
16544 EOF
16545
16546 fi
16547
16548 echo "$as_me:16548: checking if data-only library module links" >&5
16549 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16550 if test "${cf_cv_link_dataonly+set}" = set; then
16551   echo $ECHO_N "(cached) $ECHO_C" >&6
16552 else
16553
16554         rm -f conftest.a
16555         cat >conftest.$ac_ext <<EOF
16556 #line 16556 "configure"
16557 int     testdata[3] = { 123, 456, 789 };
16558 EOF
16559         if { (eval echo "$as_me:16559: \"$ac_compile\"") >&5
16560   (eval $ac_compile) 2>&5
16561   ac_status=$?
16562   echo "$as_me:16562: \$? = $ac_status" >&5
16563   (exit $ac_status); } ; then
16564                 mv conftest.o data.o && \
16565                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16566         fi
16567         rm -f conftest.$ac_ext data.o
16568         cat >conftest.$ac_ext <<EOF
16569 #line 16569 "configure"
16570 int     testfunc()
16571 {
16572 #if defined(NeXT)
16573         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16574 #else
16575         extern int testdata[3];
16576         return testdata[0] == 123
16577            &&  testdata[1] == 456
16578            &&  testdata[2] == 789;
16579 #endif
16580 }
16581 EOF
16582         if { (eval echo "$as_me:16582: \"$ac_compile\"") >&5
16583   (eval $ac_compile) 2>&5
16584   ac_status=$?
16585   echo "$as_me:16585: \$? = $ac_status" >&5
16586   (exit $ac_status); }; then
16587                 mv conftest.o func.o && \
16588                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16589         fi
16590         rm -f conftest.$ac_ext func.o
16591         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16592         cf_saveLIBS="$LIBS"
16593         LIBS="conftest.a $LIBS"
16594         if test "$cross_compiling" = yes; then
16595   cf_cv_link_dataonly=unknown
16596 else
16597   cat >conftest.$ac_ext <<_ACEOF
16598 #line 16598 "configure"
16599 #include "confdefs.h"
16600
16601         int main()
16602         {
16603                 extern int testfunc();
16604                 ${cf_cv_main_return:-return} (!testfunc());
16605         }
16606
16607 _ACEOF
16608 rm -f conftest$ac_exeext
16609 if { (eval echo "$as_me:16609: \"$ac_link\"") >&5
16610   (eval $ac_link) 2>&5
16611   ac_status=$?
16612   echo "$as_me:16612: \$? = $ac_status" >&5
16613   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16614   { (eval echo "$as_me:16614: \"$ac_try\"") >&5
16615   (eval $ac_try) 2>&5
16616   ac_status=$?
16617   echo "$as_me:16617: \$? = $ac_status" >&5
16618   (exit $ac_status); }; }; then
16619   cf_cv_link_dataonly=yes
16620 else
16621   echo "$as_me: program exited with status $ac_status" >&5
16622 echo "$as_me: failed program was:" >&5
16623 cat conftest.$ac_ext >&5
16624 cf_cv_link_dataonly=no
16625 fi
16626 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16627 fi
16628         LIBS="$cf_saveLIBS"
16629
16630 fi
16631
16632 echo "$as_me:16632: result: $cf_cv_link_dataonly" >&5
16633 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16634
16635 if test "$cf_cv_link_dataonly" = no ; then
16636
16637 cat >>confdefs.h <<\EOF
16638 #define BROKEN_LINKER 1
16639 EOF
16640
16641         BROKEN_LINKER=1
16642 fi
16643
16644 ###     Checks for library functions.
16645
16646 for ac_func in \
16647 getcwd \
16648 getegid \
16649 geteuid \
16650 getopt \
16651 getttynam \
16652 issetugid \
16653 poll \
16654 putenv \
16655 remove \
16656 select \
16657 setbuf \
16658 setbuffer \
16659 setenv \
16660 setvbuf \
16661 sigaction \
16662 sigvec \
16663 strdup \
16664 strstr \
16665 tcgetpgrp \
16666 times \
16667 vsnprintf \
16668
16669 do
16670 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16671 echo "$as_me:16671: checking for $ac_func" >&5
16672 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16673 if eval "test \"\${$as_ac_var+set}\" = set"; then
16674   echo $ECHO_N "(cached) $ECHO_C" >&6
16675 else
16676   cat >conftest.$ac_ext <<_ACEOF
16677 #line 16677 "configure"
16678 #include "confdefs.h"
16679 /* System header to define __stub macros and hopefully few prototypes,
16680     which can conflict with char $ac_func (); below.  */
16681 #include <assert.h>
16682 /* Override any gcc2 internal prototype to avoid an error.  */
16683 #ifdef __cplusplus
16684 extern "C"
16685 #endif
16686 /* We use char because int might match the return type of a gcc2
16687    builtin and then its argument prototype would still apply.  */
16688 char $ac_func ();
16689 char (*f) ();
16690
16691 int
16692 main ()
16693 {
16694 /* The GNU C library defines this for functions which it implements
16695     to always fail with ENOSYS.  Some functions are actually named
16696     something starting with __ and the normal name is an alias.  */
16697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16698 choke me
16699 #else
16700 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16701 #endif
16702
16703   ;
16704   return 0;
16705 }
16706 _ACEOF
16707 rm -f conftest.$ac_objext conftest$ac_exeext
16708 if { (eval echo "$as_me:16708: \"$ac_link\"") >&5
16709   (eval $ac_link) 2>&5
16710   ac_status=$?
16711   echo "$as_me:16711: \$? = $ac_status" >&5
16712   (exit $ac_status); } &&
16713          { ac_try='test -s conftest$ac_exeext'
16714   { (eval echo "$as_me:16714: \"$ac_try\"") >&5
16715   (eval $ac_try) 2>&5
16716   ac_status=$?
16717   echo "$as_me:16717: \$? = $ac_status" >&5
16718   (exit $ac_status); }; }; then
16719   eval "$as_ac_var=yes"
16720 else
16721   echo "$as_me: failed program was:" >&5
16722 cat conftest.$ac_ext >&5
16723 eval "$as_ac_var=no"
16724 fi
16725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16726 fi
16727 echo "$as_me:16727: result: `eval echo '${'$as_ac_var'}'`" >&5
16728 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16729 if test `eval echo '${'$as_ac_var'}'` = yes; then
16730   cat >>confdefs.h <<EOF
16731 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16732 EOF
16733
16734 fi
16735 done
16736
16737 if test "x$ac_cv_func_getopt" = xno &&
16738    test "x$cf_with_progs$cf_with_tests" != xnono; then
16739         { { echo "$as_me:16739: error: getopt is required for building programs" >&5
16740 echo "$as_me: error: getopt is required for building programs" >&2;}
16741    { (exit 1); exit 1; }; }
16742 fi
16743
16744 if test "x$with_getcap" = "xyes" ; then
16745
16746 echo "$as_me:16746: checking for terminal-capability database functions" >&5
16747 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16748 if test "${cf_cv_cgetent+set}" = set; then
16749   echo $ECHO_N "(cached) $ECHO_C" >&6
16750 else
16751
16752 cat >conftest.$ac_ext <<_ACEOF
16753 #line 16753 "configure"
16754 #include "confdefs.h"
16755
16756 #include <stdlib.h>
16757 int
16758 main ()
16759 {
16760
16761         char temp[128];
16762         char *buf = temp;
16763         char *db_array = temp;
16764         cgetent(&buf, &db_array, "vt100");
16765         cgetcap(buf, "tc", '=');
16766         cgetmatch(buf, "tc");
16767
16768   ;
16769   return 0;
16770 }
16771 _ACEOF
16772 rm -f conftest.$ac_objext conftest$ac_exeext
16773 if { (eval echo "$as_me:16773: \"$ac_link\"") >&5
16774   (eval $ac_link) 2>&5
16775   ac_status=$?
16776   echo "$as_me:16776: \$? = $ac_status" >&5
16777   (exit $ac_status); } &&
16778          { ac_try='test -s conftest$ac_exeext'
16779   { (eval echo "$as_me:16779: \"$ac_try\"") >&5
16780   (eval $ac_try) 2>&5
16781   ac_status=$?
16782   echo "$as_me:16782: \$? = $ac_status" >&5
16783   (exit $ac_status); }; }; then
16784   cf_cv_cgetent=yes
16785 else
16786   echo "$as_me: failed program was:" >&5
16787 cat conftest.$ac_ext >&5
16788 cf_cv_cgetent=no
16789 fi
16790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16791
16792 fi
16793 echo "$as_me:16793: result: $cf_cv_cgetent" >&5
16794 echo "${ECHO_T}$cf_cv_cgetent" >&6
16795
16796 if test "$cf_cv_cgetent" = yes
16797 then
16798
16799 cat >>confdefs.h <<\EOF
16800 #define HAVE_BSD_CGETENT 1
16801 EOF
16802
16803 echo "$as_me:16803: checking if cgetent uses const parameter" >&5
16804 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16805 if test "${cf_cv_cgetent_const+set}" = set; then
16806   echo $ECHO_N "(cached) $ECHO_C" >&6
16807 else
16808
16809 cat >conftest.$ac_ext <<_ACEOF
16810 #line 16810 "configure"
16811 #include "confdefs.h"
16812
16813 #include <stdlib.h>
16814 int
16815 main ()
16816 {
16817
16818         char temp[128];
16819         char *buf = temp;
16820 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16821         const char *db_array = temp;
16822         cgetent(&buf, &db_array, "vt100");
16823 #endif
16824         cgetcap(buf, "tc", '=');
16825         cgetmatch(buf, "tc");
16826
16827   ;
16828   return 0;
16829 }
16830 _ACEOF
16831 rm -f conftest.$ac_objext conftest$ac_exeext
16832 if { (eval echo "$as_me:16832: \"$ac_link\"") >&5
16833   (eval $ac_link) 2>&5
16834   ac_status=$?
16835   echo "$as_me:16835: \$? = $ac_status" >&5
16836   (exit $ac_status); } &&
16837          { ac_try='test -s conftest$ac_exeext'
16838   { (eval echo "$as_me:16838: \"$ac_try\"") >&5
16839   (eval $ac_try) 2>&5
16840   ac_status=$?
16841   echo "$as_me:16841: \$? = $ac_status" >&5
16842   (exit $ac_status); }; }; then
16843   cf_cv_cgetent_const=yes
16844 else
16845   echo "$as_me: failed program was:" >&5
16846 cat conftest.$ac_ext >&5
16847 cf_cv_cgetent_const=no
16848 fi
16849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16850
16851 fi
16852 echo "$as_me:16852: result: $cf_cv_cgetent_const" >&5
16853 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16854         if test "$cf_cv_cgetent_const" = yes
16855         then
16856
16857 cat >>confdefs.h <<EOF
16858 #define CGETENT_CONST const
16859 EOF
16860
16861         fi
16862 fi
16863
16864 fi
16865
16866 echo "$as_me:16866: checking for isascii" >&5
16867 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16868 if test "${cf_cv_have_isascii+set}" = set; then
16869   echo $ECHO_N "(cached) $ECHO_C" >&6
16870 else
16871
16872         cat >conftest.$ac_ext <<_ACEOF
16873 #line 16873 "configure"
16874 #include "confdefs.h"
16875 #include <ctype.h>
16876 int
16877 main ()
16878 {
16879 int x = isascii(' ')
16880   ;
16881   return 0;
16882 }
16883 _ACEOF
16884 rm -f conftest.$ac_objext conftest$ac_exeext
16885 if { (eval echo "$as_me:16885: \"$ac_link\"") >&5
16886   (eval $ac_link) 2>&5
16887   ac_status=$?
16888   echo "$as_me:16888: \$? = $ac_status" >&5
16889   (exit $ac_status); } &&
16890          { ac_try='test -s conftest$ac_exeext'
16891   { (eval echo "$as_me:16891: \"$ac_try\"") >&5
16892   (eval $ac_try) 2>&5
16893   ac_status=$?
16894   echo "$as_me:16894: \$? = $ac_status" >&5
16895   (exit $ac_status); }; }; then
16896   cf_cv_have_isascii=yes
16897 else
16898   echo "$as_me: failed program was:" >&5
16899 cat conftest.$ac_ext >&5
16900 cf_cv_have_isascii=no
16901 fi
16902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16903
16904 fi
16905 echo "$as_me:16905: result: $cf_cv_have_isascii" >&5
16906 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16907 test "$cf_cv_have_isascii" = yes &&
16908 cat >>confdefs.h <<\EOF
16909 #define HAVE_ISASCII 1
16910 EOF
16911
16912 if test "$ac_cv_func_sigaction" = yes; then
16913 echo "$as_me:16913: checking whether sigaction needs _POSIX_SOURCE" >&5
16914 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16915 cat >conftest.$ac_ext <<_ACEOF
16916 #line 16916 "configure"
16917 #include "confdefs.h"
16918
16919 #include <sys/types.h>
16920 #include <signal.h>
16921 int
16922 main ()
16923 {
16924 struct sigaction act
16925   ;
16926   return 0;
16927 }
16928 _ACEOF
16929 rm -f conftest.$ac_objext
16930 if { (eval echo "$as_me:16930: \"$ac_compile\"") >&5
16931   (eval $ac_compile) 2>&5
16932   ac_status=$?
16933   echo "$as_me:16933: \$? = $ac_status" >&5
16934   (exit $ac_status); } &&
16935          { ac_try='test -s conftest.$ac_objext'
16936   { (eval echo "$as_me:16936: \"$ac_try\"") >&5
16937   (eval $ac_try) 2>&5
16938   ac_status=$?
16939   echo "$as_me:16939: \$? = $ac_status" >&5
16940   (exit $ac_status); }; }; then
16941   sigact_bad=no
16942 else
16943   echo "$as_me: failed program was:" >&5
16944 cat conftest.$ac_ext >&5
16945
16946 cat >conftest.$ac_ext <<_ACEOF
16947 #line 16947 "configure"
16948 #include "confdefs.h"
16949
16950 #define _POSIX_SOURCE
16951 #include <sys/types.h>
16952 #include <signal.h>
16953 int
16954 main ()
16955 {
16956 struct sigaction act
16957   ;
16958   return 0;
16959 }
16960 _ACEOF
16961 rm -f conftest.$ac_objext
16962 if { (eval echo "$as_me:16962: \"$ac_compile\"") >&5
16963   (eval $ac_compile) 2>&5
16964   ac_status=$?
16965   echo "$as_me:16965: \$? = $ac_status" >&5
16966   (exit $ac_status); } &&
16967          { ac_try='test -s conftest.$ac_objext'
16968   { (eval echo "$as_me:16968: \"$ac_try\"") >&5
16969   (eval $ac_try) 2>&5
16970   ac_status=$?
16971   echo "$as_me:16971: \$? = $ac_status" >&5
16972   (exit $ac_status); }; }; then
16973   sigact_bad=yes
16974
16975 cat >>confdefs.h <<\EOF
16976 #define _POSIX_SOURCE 1
16977 EOF
16978
16979 else
16980   echo "$as_me: failed program was:" >&5
16981 cat conftest.$ac_ext >&5
16982 sigact_bad=unknown
16983 fi
16984 rm -f conftest.$ac_objext conftest.$ac_ext
16985 fi
16986 rm -f conftest.$ac_objext conftest.$ac_ext
16987 echo "$as_me:16987: result: $sigact_bad" >&5
16988 echo "${ECHO_T}$sigact_bad" >&6
16989 fi
16990
16991 echo "$as_me:16991: checking if nanosleep really works" >&5
16992 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16993 if test "${cf_cv_func_nanosleep+set}" = set; then
16994   echo $ECHO_N "(cached) $ECHO_C" >&6
16995 else
16996
16997 if test "$cross_compiling" = yes; then
16998   cf_cv_func_nanosleep=unknown
16999 else
17000   cat >conftest.$ac_ext <<_ACEOF
17001 #line 17001 "configure"
17002 #include "confdefs.h"
17003
17004 #include <stdio.h>
17005 #include <errno.h>
17006 #include <time.h>
17007
17008 #ifdef HAVE_SYS_TIME_H
17009 #include <sys/time.h>
17010 #endif
17011
17012 int main() {
17013         struct timespec ts1, ts2;
17014         int code;
17015         ts1.tv_sec  = 0;
17016         ts1.tv_nsec = 750000000;
17017         ts2.tv_sec  = 0;
17018         ts2.tv_nsec = 0;
17019         errno = 0;
17020         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17021         ${cf_cv_main_return:-return}(code != 0);
17022 }
17023
17024 _ACEOF
17025 rm -f conftest$ac_exeext
17026 if { (eval echo "$as_me:17026: \"$ac_link\"") >&5
17027   (eval $ac_link) 2>&5
17028   ac_status=$?
17029   echo "$as_me:17029: \$? = $ac_status" >&5
17030   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17031   { (eval echo "$as_me:17031: \"$ac_try\"") >&5
17032   (eval $ac_try) 2>&5
17033   ac_status=$?
17034   echo "$as_me:17034: \$? = $ac_status" >&5
17035   (exit $ac_status); }; }; then
17036   cf_cv_func_nanosleep=yes
17037 else
17038   echo "$as_me: program exited with status $ac_status" >&5
17039 echo "$as_me: failed program was:" >&5
17040 cat conftest.$ac_ext >&5
17041 cf_cv_func_nanosleep=no
17042 fi
17043 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17044 fi
17045 fi
17046 echo "$as_me:17046: result: $cf_cv_func_nanosleep" >&5
17047 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17048
17049 test "$cf_cv_func_nanosleep" = "yes" &&
17050 cat >>confdefs.h <<\EOF
17051 #define HAVE_NANOSLEEP 1
17052 EOF
17053
17054 for ac_header in \
17055 termio.h \
17056 termios.h \
17057 unistd.h \
17058
17059 do
17060 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17061 echo "$as_me:17061: checking for $ac_header" >&5
17062 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17063 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17064   echo $ECHO_N "(cached) $ECHO_C" >&6
17065 else
17066   cat >conftest.$ac_ext <<_ACEOF
17067 #line 17067 "configure"
17068 #include "confdefs.h"
17069 #include <$ac_header>
17070 _ACEOF
17071 if { (eval echo "$as_me:17071: \"$ac_cpp conftest.$ac_ext\"") >&5
17072   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17073   ac_status=$?
17074   egrep -v '^ *\+' conftest.er1 >conftest.err
17075   rm -f conftest.er1
17076   cat conftest.err >&5
17077   echo "$as_me:17077: \$? = $ac_status" >&5
17078   (exit $ac_status); } >/dev/null; then
17079   if test -s conftest.err; then
17080     ac_cpp_err=$ac_c_preproc_warn_flag
17081   else
17082     ac_cpp_err=
17083   fi
17084 else
17085   ac_cpp_err=yes
17086 fi
17087 if test -z "$ac_cpp_err"; then
17088   eval "$as_ac_Header=yes"
17089 else
17090   echo "$as_me: failed program was:" >&5
17091   cat conftest.$ac_ext >&5
17092   eval "$as_ac_Header=no"
17093 fi
17094 rm -f conftest.err conftest.$ac_ext
17095 fi
17096 echo "$as_me:17096: result: `eval echo '${'$as_ac_Header'}'`" >&5
17097 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17098 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17099   cat >>confdefs.h <<EOF
17100 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17101 EOF
17102
17103 fi
17104 done
17105
17106 if test "$ISC" = yes ; then
17107
17108 for ac_header in sys/termio.h
17109 do
17110 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17111 echo "$as_me:17111: checking for $ac_header" >&5
17112 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17114   echo $ECHO_N "(cached) $ECHO_C" >&6
17115 else
17116   cat >conftest.$ac_ext <<_ACEOF
17117 #line 17117 "configure"
17118 #include "confdefs.h"
17119 #include <$ac_header>
17120 _ACEOF
17121 if { (eval echo "$as_me:17121: \"$ac_cpp conftest.$ac_ext\"") >&5
17122   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17123   ac_status=$?
17124   egrep -v '^ *\+' conftest.er1 >conftest.err
17125   rm -f conftest.er1
17126   cat conftest.err >&5
17127   echo "$as_me:17127: \$? = $ac_status" >&5
17128   (exit $ac_status); } >/dev/null; then
17129   if test -s conftest.err; then
17130     ac_cpp_err=$ac_c_preproc_warn_flag
17131   else
17132     ac_cpp_err=
17133   fi
17134 else
17135   ac_cpp_err=yes
17136 fi
17137 if test -z "$ac_cpp_err"; then
17138   eval "$as_ac_Header=yes"
17139 else
17140   echo "$as_me: failed program was:" >&5
17141   cat conftest.$ac_ext >&5
17142   eval "$as_ac_Header=no"
17143 fi
17144 rm -f conftest.err conftest.$ac_ext
17145 fi
17146 echo "$as_me:17146: result: `eval echo '${'$as_ac_Header'}'`" >&5
17147 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17148 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17149   cat >>confdefs.h <<EOF
17150 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17151 EOF
17152
17153 fi
17154 done
17155
17156 fi
17157 if test "$ac_cv_header_termios_h" = yes ; then
17158         case "$CFLAGS $CPPFLAGS" in
17159         (*-D_POSIX_SOURCE*)
17160                 termios_bad=dunno ;;
17161         (*)     termios_bad=maybe ;;
17162         esac
17163         if test "$termios_bad" = maybe ; then
17164         echo "$as_me:17164: checking whether termios.h needs _POSIX_SOURCE" >&5
17165 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17166         cat >conftest.$ac_ext <<_ACEOF
17167 #line 17167 "configure"
17168 #include "confdefs.h"
17169 #include <termios.h>
17170 int
17171 main ()
17172 {
17173 struct termios foo; int x = foo.c_iflag
17174   ;
17175   return 0;
17176 }
17177 _ACEOF
17178 rm -f conftest.$ac_objext
17179 if { (eval echo "$as_me:17179: \"$ac_compile\"") >&5
17180   (eval $ac_compile) 2>&5
17181   ac_status=$?
17182   echo "$as_me:17182: \$? = $ac_status" >&5
17183   (exit $ac_status); } &&
17184          { ac_try='test -s conftest.$ac_objext'
17185   { (eval echo "$as_me:17185: \"$ac_try\"") >&5
17186   (eval $ac_try) 2>&5
17187   ac_status=$?
17188   echo "$as_me:17188: \$? = $ac_status" >&5
17189   (exit $ac_status); }; }; then
17190   termios_bad=no
17191 else
17192   echo "$as_me: failed program was:" >&5
17193 cat conftest.$ac_ext >&5
17194
17195                 cat >conftest.$ac_ext <<_ACEOF
17196 #line 17196 "configure"
17197 #include "confdefs.h"
17198
17199 #define _POSIX_SOURCE
17200 #include <termios.h>
17201 int
17202 main ()
17203 {
17204 struct termios foo; int x = foo.c_iflag
17205   ;
17206   return 0;
17207 }
17208 _ACEOF
17209 rm -f conftest.$ac_objext
17210 if { (eval echo "$as_me:17210: \"$ac_compile\"") >&5
17211   (eval $ac_compile) 2>&5
17212   ac_status=$?
17213   echo "$as_me:17213: \$? = $ac_status" >&5
17214   (exit $ac_status); } &&
17215          { ac_try='test -s conftest.$ac_objext'
17216   { (eval echo "$as_me:17216: \"$ac_try\"") >&5
17217   (eval $ac_try) 2>&5
17218   ac_status=$?
17219   echo "$as_me:17219: \$? = $ac_status" >&5
17220   (exit $ac_status); }; }; then
17221   termios_bad=unknown
17222 else
17223   echo "$as_me: failed program was:" >&5
17224 cat conftest.$ac_ext >&5
17225 termios_bad=yes
17226 cat >>confdefs.h <<\EOF
17227 #define _POSIX_SOURCE 1
17228 EOF
17229
17230 fi
17231 rm -f conftest.$ac_objext conftest.$ac_ext
17232
17233 fi
17234 rm -f conftest.$ac_objext conftest.$ac_ext
17235         echo "$as_me:17235: result: $termios_bad" >&5
17236 echo "${ECHO_T}$termios_bad" >&6
17237         fi
17238 fi
17239
17240 echo "$as_me:17240: checking for tcgetattr" >&5
17241 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17242 if test "${cf_cv_have_tcgetattr+set}" = set; then
17243   echo $ECHO_N "(cached) $ECHO_C" >&6
17244 else
17245
17246 cat >conftest.$ac_ext <<_ACEOF
17247 #line 17247 "configure"
17248 #include "confdefs.h"
17249
17250 #include <sys/types.h>
17251 #ifdef HAVE_UNISTD_H
17252 #include <unistd.h>
17253 #endif
17254 #ifdef HAVE_TERMIOS_H
17255 #include <termios.h>
17256 #define TTY struct termios
17257 #else
17258 #ifdef HAVE_TERMIO_H
17259 #include <termio.h>
17260 #define TTY struct termio
17261 #endif
17262 #endif
17263
17264 int
17265 main ()
17266 {
17267
17268 TTY foo;
17269 tcgetattr(1, &foo);
17270   ;
17271   return 0;
17272 }
17273 _ACEOF
17274 rm -f conftest.$ac_objext conftest$ac_exeext
17275 if { (eval echo "$as_me:17275: \"$ac_link\"") >&5
17276   (eval $ac_link) 2>&5
17277   ac_status=$?
17278   echo "$as_me:17278: \$? = $ac_status" >&5
17279   (exit $ac_status); } &&
17280          { ac_try='test -s conftest$ac_exeext'
17281   { (eval echo "$as_me:17281: \"$ac_try\"") >&5
17282   (eval $ac_try) 2>&5
17283   ac_status=$?
17284   echo "$as_me:17284: \$? = $ac_status" >&5
17285   (exit $ac_status); }; }; then
17286   cf_cv_have_tcgetattr=yes
17287 else
17288   echo "$as_me: failed program was:" >&5
17289 cat conftest.$ac_ext >&5
17290 cf_cv_have_tcgetattr=no
17291 fi
17292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17293 fi
17294 echo "$as_me:17294: result: $cf_cv_have_tcgetattr" >&5
17295 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17296 test "$cf_cv_have_tcgetattr" = yes &&
17297 cat >>confdefs.h <<\EOF
17298 #define HAVE_TCGETATTR 1
17299 EOF
17300
17301 echo "$as_me:17301: checking for vsscanf function or workaround" >&5
17302 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17303 if test "${cf_cv_func_vsscanf+set}" = set; then
17304   echo $ECHO_N "(cached) $ECHO_C" >&6
17305 else
17306
17307 cat >conftest.$ac_ext <<_ACEOF
17308 #line 17308 "configure"
17309 #include "confdefs.h"
17310
17311 #include <stdarg.h>
17312 #include <stdio.h>
17313 int
17314 main ()
17315 {
17316
17317         va_list ap;
17318         vsscanf("from", "%d", ap)
17319   ;
17320   return 0;
17321 }
17322 _ACEOF
17323 rm -f conftest.$ac_objext conftest$ac_exeext
17324 if { (eval echo "$as_me:17324: \"$ac_link\"") >&5
17325   (eval $ac_link) 2>&5
17326   ac_status=$?
17327   echo "$as_me:17327: \$? = $ac_status" >&5
17328   (exit $ac_status); } &&
17329          { ac_try='test -s conftest$ac_exeext'
17330   { (eval echo "$as_me:17330: \"$ac_try\"") >&5
17331   (eval $ac_try) 2>&5
17332   ac_status=$?
17333   echo "$as_me:17333: \$? = $ac_status" >&5
17334   (exit $ac_status); }; }; then
17335   cf_cv_func_vsscanf=vsscanf
17336 else
17337   echo "$as_me: failed program was:" >&5
17338 cat conftest.$ac_ext >&5
17339
17340 cat >conftest.$ac_ext <<_ACEOF
17341 #line 17341 "configure"
17342 #include "confdefs.h"
17343
17344 #include <stdarg.h>
17345 #include <stdio.h>
17346 int
17347 main ()
17348 {
17349
17350         FILE strbuf;
17351         char *str = "from";
17352
17353         strbuf._flag = _IOREAD;
17354         strbuf._ptr = strbuf._base = (unsigned char *) str;
17355         strbuf._cnt = strlen(str);
17356         strbuf._file = _NFILE;
17357         return (vfscanf(&strbuf, "%d", ap))
17358   ;
17359   return 0;
17360 }
17361 _ACEOF
17362 rm -f conftest.$ac_objext conftest$ac_exeext
17363 if { (eval echo "$as_me:17363: \"$ac_link\"") >&5
17364   (eval $ac_link) 2>&5
17365   ac_status=$?
17366   echo "$as_me:17366: \$? = $ac_status" >&5
17367   (exit $ac_status); } &&
17368          { ac_try='test -s conftest$ac_exeext'
17369   { (eval echo "$as_me:17369: \"$ac_try\"") >&5
17370   (eval $ac_try) 2>&5
17371   ac_status=$?
17372   echo "$as_me:17372: \$? = $ac_status" >&5
17373   (exit $ac_status); }; }; then
17374   cf_cv_func_vsscanf=vfscanf
17375 else
17376   echo "$as_me: failed program was:" >&5
17377 cat conftest.$ac_ext >&5
17378
17379 cat >conftest.$ac_ext <<_ACEOF
17380 #line 17380 "configure"
17381 #include "confdefs.h"
17382
17383 #include <stdarg.h>
17384 #include <stdio.h>
17385 int
17386 main ()
17387 {
17388
17389         FILE strbuf;
17390         char *str = "from";
17391
17392         strbuf._flag = _IOREAD;
17393         strbuf._ptr = strbuf._base = (unsigned char *) str;
17394         strbuf._cnt = strlen(str);
17395         strbuf._file = _NFILE;
17396         return (_doscan(&strbuf, "%d", ap))
17397   ;
17398   return 0;
17399 }
17400 _ACEOF
17401 rm -f conftest.$ac_objext conftest$ac_exeext
17402 if { (eval echo "$as_me:17402: \"$ac_link\"") >&5
17403   (eval $ac_link) 2>&5
17404   ac_status=$?
17405   echo "$as_me:17405: \$? = $ac_status" >&5
17406   (exit $ac_status); } &&
17407          { ac_try='test -s conftest$ac_exeext'
17408   { (eval echo "$as_me:17408: \"$ac_try\"") >&5
17409   (eval $ac_try) 2>&5
17410   ac_status=$?
17411   echo "$as_me:17411: \$? = $ac_status" >&5
17412   (exit $ac_status); }; }; then
17413   cf_cv_func_vsscanf=_doscan
17414 else
17415   echo "$as_me: failed program was:" >&5
17416 cat conftest.$ac_ext >&5
17417
17418 cf_cv_func_vsscanf=no
17419 fi
17420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17421 fi
17422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17423 fi
17424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17425 fi
17426 echo "$as_me:17426: result: $cf_cv_func_vsscanf" >&5
17427 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17428
17429 case $cf_cv_func_vsscanf in
17430 (vsscanf)
17431 cat >>confdefs.h <<\EOF
17432 #define HAVE_VSSCANF 1
17433 EOF
17434 ;;
17435 (vfscanf)
17436 cat >>confdefs.h <<\EOF
17437 #define HAVE_VFSCANF 1
17438 EOF
17439 ;;
17440 (_doscan)
17441 cat >>confdefs.h <<\EOF
17442 #define HAVE__DOSCAN 1
17443 EOF
17444 ;;
17445 esac
17446
17447 echo "$as_me:17447: checking for working mkstemp" >&5
17448 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17449 if test "${cf_cv_func_mkstemp+set}" = set; then
17450   echo $ECHO_N "(cached) $ECHO_C" >&6
17451 else
17452
17453 rm -rf conftest*
17454 if test "$cross_compiling" = yes; then
17455   cf_cv_func_mkstemp=maybe
17456 else
17457   cat >conftest.$ac_ext <<_ACEOF
17458 #line 17458 "configure"
17459 #include "confdefs.h"
17460
17461 #include <sys/types.h>
17462 #include <stdlib.h>
17463 #include <stdio.h>
17464 #include <string.h>
17465 #include <sys/stat.h>
17466 int main()
17467 {
17468         char *tmpl = "conftestXXXXXX";
17469         char name[2][80];
17470         int n;
17471         int result = 0;
17472         int fd;
17473         struct stat sb;
17474
17475         umask(077);
17476         for (n = 0; n < 2; ++n) {
17477                 strcpy(name[n], tmpl);
17478                 if ((fd = mkstemp(name[n])) >= 0) {
17479                         if (!strcmp(name[n], tmpl)
17480                          || stat(name[n], &sb) != 0
17481                          || (sb.st_mode & S_IFMT) != S_IFREG
17482                          || (sb.st_mode & 077) != 0) {
17483                                 result = 1;
17484                         }
17485                         close(fd);
17486                 }
17487         }
17488         if (result == 0
17489          && !strcmp(name[0], name[1]))
17490                 result = 1;
17491         ${cf_cv_main_return:-return}(result);
17492 }
17493
17494 _ACEOF
17495 rm -f conftest$ac_exeext
17496 if { (eval echo "$as_me:17496: \"$ac_link\"") >&5
17497   (eval $ac_link) 2>&5
17498   ac_status=$?
17499   echo "$as_me:17499: \$? = $ac_status" >&5
17500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17501   { (eval echo "$as_me:17501: \"$ac_try\"") >&5
17502   (eval $ac_try) 2>&5
17503   ac_status=$?
17504   echo "$as_me:17504: \$? = $ac_status" >&5
17505   (exit $ac_status); }; }; then
17506   cf_cv_func_mkstemp=yes
17507
17508 else
17509   echo "$as_me: program exited with status $ac_status" >&5
17510 echo "$as_me: failed program was:" >&5
17511 cat conftest.$ac_ext >&5
17512 cf_cv_func_mkstemp=no
17513
17514 fi
17515 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17516 fi
17517
17518 fi
17519 echo "$as_me:17519: result: $cf_cv_func_mkstemp" >&5
17520 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17521 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17522         echo "$as_me:17522: checking for mkstemp" >&5
17523 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17524 if test "${ac_cv_func_mkstemp+set}" = set; then
17525   echo $ECHO_N "(cached) $ECHO_C" >&6
17526 else
17527   cat >conftest.$ac_ext <<_ACEOF
17528 #line 17528 "configure"
17529 #include "confdefs.h"
17530 /* System header to define __stub macros and hopefully few prototypes,
17531     which can conflict with char mkstemp (); below.  */
17532 #include <assert.h>
17533 /* Override any gcc2 internal prototype to avoid an error.  */
17534 #ifdef __cplusplus
17535 extern "C"
17536 #endif
17537 /* We use char because int might match the return type of a gcc2
17538    builtin and then its argument prototype would still apply.  */
17539 char mkstemp ();
17540 char (*f) ();
17541
17542 int
17543 main ()
17544 {
17545 /* The GNU C library defines this for functions which it implements
17546     to always fail with ENOSYS.  Some functions are actually named
17547     something starting with __ and the normal name is an alias.  */
17548 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17549 choke me
17550 #else
17551 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17552 #endif
17553
17554   ;
17555   return 0;
17556 }
17557 _ACEOF
17558 rm -f conftest.$ac_objext conftest$ac_exeext
17559 if { (eval echo "$as_me:17559: \"$ac_link\"") >&5
17560   (eval $ac_link) 2>&5
17561   ac_status=$?
17562   echo "$as_me:17562: \$? = $ac_status" >&5
17563   (exit $ac_status); } &&
17564          { ac_try='test -s conftest$ac_exeext'
17565   { (eval echo "$as_me:17565: \"$ac_try\"") >&5
17566   (eval $ac_try) 2>&5
17567   ac_status=$?
17568   echo "$as_me:17568: \$? = $ac_status" >&5
17569   (exit $ac_status); }; }; then
17570   ac_cv_func_mkstemp=yes
17571 else
17572   echo "$as_me: failed program was:" >&5
17573 cat conftest.$ac_ext >&5
17574 ac_cv_func_mkstemp=no
17575 fi
17576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17577 fi
17578 echo "$as_me:17578: result: $ac_cv_func_mkstemp" >&5
17579 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17580
17581 fi
17582 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17583
17584 cat >>confdefs.h <<\EOF
17585 #define HAVE_MKSTEMP 1
17586 EOF
17587
17588 fi
17589
17590 # setup for prototype of fallback for vsscanf()
17591
17592 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17593         HAVE_VSSCANF=1
17594 else
17595         HAVE_VSSCANF=0
17596 fi
17597
17598 if test "x$cross_compiling" = xyes ; then
17599         { echo "$as_me:17599: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17600 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17601 else
17602         echo "$as_me:17602: checking whether setvbuf arguments are reversed" >&5
17603 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17604 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17605   echo $ECHO_N "(cached) $ECHO_C" >&6
17606 else
17607   if test "$cross_compiling" = yes; then
17608   { { echo "$as_me:17608: error: cannot run test program while cross compiling" >&5
17609 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17610    { (exit 1); exit 1; }; }
17611 else
17612   cat >conftest.$ac_ext <<_ACEOF
17613 #line 17613 "configure"
17614 #include "confdefs.h"
17615 #include <stdio.h>
17616 /* If setvbuf has the reversed format, exit 0. */
17617 int
17618 main ()
17619 {
17620   /* This call has the arguments reversed.
17621      A reversed system may check and see that the address of main
17622      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17623   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17624     $ac_main_return(1);
17625   putc('\r', stdout);
17626   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17627 }
17628 _ACEOF
17629 rm -f conftest$ac_exeext
17630 if { (eval echo "$as_me:17630: \"$ac_link\"") >&5
17631   (eval $ac_link) 2>&5
17632   ac_status=$?
17633   echo "$as_me:17633: \$? = $ac_status" >&5
17634   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17635   { (eval echo "$as_me:17635: \"$ac_try\"") >&5
17636   (eval $ac_try) 2>&5
17637   ac_status=$?
17638   echo "$as_me:17638: \$? = $ac_status" >&5
17639   (exit $ac_status); }; }; then
17640   ac_cv_func_setvbuf_reversed=yes
17641 else
17642   echo "$as_me: program exited with status $ac_status" >&5
17643 echo "$as_me: failed program was:" >&5
17644 cat conftest.$ac_ext >&5
17645 ac_cv_func_setvbuf_reversed=no
17646 fi
17647 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17648 fi
17649 rm -f core core.* *.core
17650 fi
17651 echo "$as_me:17651: result: $ac_cv_func_setvbuf_reversed" >&5
17652 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17653 if test $ac_cv_func_setvbuf_reversed = yes; then
17654
17655 cat >>confdefs.h <<\EOF
17656 #define SETVBUF_REVERSED 1
17657 EOF
17658
17659 fi
17660
17661 fi
17662 echo "$as_me:17662: checking for intptr_t" >&5
17663 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17664 if test "${ac_cv_type_intptr_t+set}" = set; then
17665   echo $ECHO_N "(cached) $ECHO_C" >&6
17666 else
17667   cat >conftest.$ac_ext <<_ACEOF
17668 #line 17668 "configure"
17669 #include "confdefs.h"
17670 $ac_includes_default
17671 int
17672 main ()
17673 {
17674 if ((intptr_t *) 0)
17675   return 0;
17676 if (sizeof (intptr_t))
17677   return 0;
17678   ;
17679   return 0;
17680 }
17681 _ACEOF
17682 rm -f conftest.$ac_objext
17683 if { (eval echo "$as_me:17683: \"$ac_compile\"") >&5
17684   (eval $ac_compile) 2>&5
17685   ac_status=$?
17686   echo "$as_me:17686: \$? = $ac_status" >&5
17687   (exit $ac_status); } &&
17688          { ac_try='test -s conftest.$ac_objext'
17689   { (eval echo "$as_me:17689: \"$ac_try\"") >&5
17690   (eval $ac_try) 2>&5
17691   ac_status=$?
17692   echo "$as_me:17692: \$? = $ac_status" >&5
17693   (exit $ac_status); }; }; then
17694   ac_cv_type_intptr_t=yes
17695 else
17696   echo "$as_me: failed program was:" >&5
17697 cat conftest.$ac_ext >&5
17698 ac_cv_type_intptr_t=no
17699 fi
17700 rm -f conftest.$ac_objext conftest.$ac_ext
17701 fi
17702 echo "$as_me:17702: result: $ac_cv_type_intptr_t" >&5
17703 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17704 if test $ac_cv_type_intptr_t = yes; then
17705   :
17706 else
17707
17708 cat >>confdefs.h <<EOF
17709 #define intptr_t long
17710 EOF
17711
17712 fi
17713
17714 echo "$as_me:17714: checking for ssize_t" >&5
17715 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17716 if test "${ac_cv_type_ssize_t+set}" = set; then
17717   echo $ECHO_N "(cached) $ECHO_C" >&6
17718 else
17719   cat >conftest.$ac_ext <<_ACEOF
17720 #line 17720 "configure"
17721 #include "confdefs.h"
17722 $ac_includes_default
17723 int
17724 main ()
17725 {
17726 if ((ssize_t *) 0)
17727   return 0;
17728 if (sizeof (ssize_t))
17729   return 0;
17730   ;
17731   return 0;
17732 }
17733 _ACEOF
17734 rm -f conftest.$ac_objext
17735 if { (eval echo "$as_me:17735: \"$ac_compile\"") >&5
17736   (eval $ac_compile) 2>&5
17737   ac_status=$?
17738   echo "$as_me:17738: \$? = $ac_status" >&5
17739   (exit $ac_status); } &&
17740          { ac_try='test -s conftest.$ac_objext'
17741   { (eval echo "$as_me:17741: \"$ac_try\"") >&5
17742   (eval $ac_try) 2>&5
17743   ac_status=$?
17744   echo "$as_me:17744: \$? = $ac_status" >&5
17745   (exit $ac_status); }; }; then
17746   ac_cv_type_ssize_t=yes
17747 else
17748   echo "$as_me: failed program was:" >&5
17749 cat conftest.$ac_ext >&5
17750 ac_cv_type_ssize_t=no
17751 fi
17752 rm -f conftest.$ac_objext conftest.$ac_ext
17753 fi
17754 echo "$as_me:17754: result: $ac_cv_type_ssize_t" >&5
17755 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17756 if test $ac_cv_type_ssize_t = yes; then
17757   :
17758 else
17759
17760 cat >>confdefs.h <<EOF
17761 #define ssize_t int
17762 EOF
17763
17764 fi
17765
17766 echo "$as_me:17766: checking for type sigaction_t" >&5
17767 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17768 if test "${cf_cv_type_sigaction+set}" = set; then
17769   echo $ECHO_N "(cached) $ECHO_C" >&6
17770 else
17771
17772         cat >conftest.$ac_ext <<_ACEOF
17773 #line 17773 "configure"
17774 #include "confdefs.h"
17775
17776 #include <signal.h>
17777 int
17778 main ()
17779 {
17780 sigaction_t x
17781   ;
17782   return 0;
17783 }
17784 _ACEOF
17785 rm -f conftest.$ac_objext
17786 if { (eval echo "$as_me:17786: \"$ac_compile\"") >&5
17787   (eval $ac_compile) 2>&5
17788   ac_status=$?
17789   echo "$as_me:17789: \$? = $ac_status" >&5
17790   (exit $ac_status); } &&
17791          { ac_try='test -s conftest.$ac_objext'
17792   { (eval echo "$as_me:17792: \"$ac_try\"") >&5
17793   (eval $ac_try) 2>&5
17794   ac_status=$?
17795   echo "$as_me:17795: \$? = $ac_status" >&5
17796   (exit $ac_status); }; }; then
17797   cf_cv_type_sigaction=yes
17798 else
17799   echo "$as_me: failed program was:" >&5
17800 cat conftest.$ac_ext >&5
17801 cf_cv_type_sigaction=no
17802 fi
17803 rm -f conftest.$ac_objext conftest.$ac_ext
17804 fi
17805
17806 echo "$as_me:17806: result: $cf_cv_type_sigaction" >&5
17807 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17808 test "$cf_cv_type_sigaction" = yes &&
17809 cat >>confdefs.h <<\EOF
17810 #define HAVE_TYPE_SIGACTION 1
17811 EOF
17812
17813 echo "$as_me:17813: checking declaration of size-change" >&5
17814 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17815 if test "${cf_cv_sizechange+set}" = set; then
17816   echo $ECHO_N "(cached) $ECHO_C" >&6
17817 else
17818
17819         cf_cv_sizechange=unknown
17820         cf_save_CPPFLAGS="$CPPFLAGS"
17821
17822 for cf_opts in "" "NEED_PTEM_H"
17823 do
17824
17825         CPPFLAGS="$cf_save_CPPFLAGS"
17826         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17827         cat >conftest.$ac_ext <<_ACEOF
17828 #line 17828 "configure"
17829 #include "confdefs.h"
17830 #include <sys/types.h>
17831 #ifdef HAVE_TERMIOS_H
17832 #include <termios.h>
17833 #else
17834 #ifdef HAVE_TERMIO_H
17835 #include <termio.h>
17836 #endif
17837 #endif
17838 #ifdef NEED_PTEM_H
17839 /* This is a workaround for SCO:  they neglected to define struct winsize in
17840  * termios.h -- it's only in termio.h and ptem.h
17841  */
17842 #include        <sys/stream.h>
17843 #include        <sys/ptem.h>
17844 #endif
17845 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17846 #include <sys/ioctl.h>
17847 #endif
17848
17849 int
17850 main ()
17851 {
17852
17853 #ifdef TIOCGSIZE
17854         struct ttysize win;     /* FIXME: what system is this? */
17855         int y = win.ts_lines;
17856         int x = win.ts_cols;
17857 #else
17858 #ifdef TIOCGWINSZ
17859         struct winsize win;
17860         int y = win.ws_row;
17861         int x = win.ws_col;
17862 #else
17863         no TIOCGSIZE or TIOCGWINSZ
17864 #endif /* TIOCGWINSZ */
17865 #endif /* TIOCGSIZE */
17866
17867   ;
17868   return 0;
17869 }
17870 _ACEOF
17871 rm -f conftest.$ac_objext
17872 if { (eval echo "$as_me:17872: \"$ac_compile\"") >&5
17873   (eval $ac_compile) 2>&5
17874   ac_status=$?
17875   echo "$as_me:17875: \$? = $ac_status" >&5
17876   (exit $ac_status); } &&
17877          { ac_try='test -s conftest.$ac_objext'
17878   { (eval echo "$as_me:17878: \"$ac_try\"") >&5
17879   (eval $ac_try) 2>&5
17880   ac_status=$?
17881   echo "$as_me:17881: \$? = $ac_status" >&5
17882   (exit $ac_status); }; }; then
17883   cf_cv_sizechange=yes
17884 else
17885   echo "$as_me: failed program was:" >&5
17886 cat conftest.$ac_ext >&5
17887 cf_cv_sizechange=no
17888 fi
17889 rm -f conftest.$ac_objext conftest.$ac_ext
17890
17891         CPPFLAGS="$cf_save_CPPFLAGS"
17892         if test "$cf_cv_sizechange" = yes ; then
17893                 echo "size-change succeeded ($cf_opts)" >&5
17894                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17895                 break
17896         fi
17897 done
17898
17899 fi
17900 echo "$as_me:17900: result: $cf_cv_sizechange" >&5
17901 echo "${ECHO_T}$cf_cv_sizechange" >&6
17902 if test "$cf_cv_sizechange" != no ; then
17903
17904 cat >>confdefs.h <<\EOF
17905 #define HAVE_SIZECHANGE 1
17906 EOF
17907
17908         case $cf_cv_sizechange in
17909         (NEED*)
17910                 cat >>confdefs.h <<EOF
17911 #define $cf_cv_sizechange  1
17912 EOF
17913
17914                 ;;
17915         esac
17916 fi
17917
17918 echo "$as_me:17918: checking for memmove" >&5
17919 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17920 if test "${ac_cv_func_memmove+set}" = set; then
17921   echo $ECHO_N "(cached) $ECHO_C" >&6
17922 else
17923   cat >conftest.$ac_ext <<_ACEOF
17924 #line 17924 "configure"
17925 #include "confdefs.h"
17926 /* System header to define __stub macros and hopefully few prototypes,
17927     which can conflict with char memmove (); below.  */
17928 #include <assert.h>
17929 /* Override any gcc2 internal prototype to avoid an error.  */
17930 #ifdef __cplusplus
17931 extern "C"
17932 #endif
17933 /* We use char because int might match the return type of a gcc2
17934    builtin and then its argument prototype would still apply.  */
17935 char memmove ();
17936 char (*f) ();
17937
17938 int
17939 main ()
17940 {
17941 /* The GNU C library defines this for functions which it implements
17942     to always fail with ENOSYS.  Some functions are actually named
17943     something starting with __ and the normal name is an alias.  */
17944 #if defined (__stub_memmove) || defined (__stub___memmove)
17945 choke me
17946 #else
17947 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17948 #endif
17949
17950   ;
17951   return 0;
17952 }
17953 _ACEOF
17954 rm -f conftest.$ac_objext conftest$ac_exeext
17955 if { (eval echo "$as_me:17955: \"$ac_link\"") >&5
17956   (eval $ac_link) 2>&5
17957   ac_status=$?
17958   echo "$as_me:17958: \$? = $ac_status" >&5
17959   (exit $ac_status); } &&
17960          { ac_try='test -s conftest$ac_exeext'
17961   { (eval echo "$as_me:17961: \"$ac_try\"") >&5
17962   (eval $ac_try) 2>&5
17963   ac_status=$?
17964   echo "$as_me:17964: \$? = $ac_status" >&5
17965   (exit $ac_status); }; }; then
17966   ac_cv_func_memmove=yes
17967 else
17968   echo "$as_me: failed program was:" >&5
17969 cat conftest.$ac_ext >&5
17970 ac_cv_func_memmove=no
17971 fi
17972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17973 fi
17974 echo "$as_me:17974: result: $ac_cv_func_memmove" >&5
17975 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17976 if test $ac_cv_func_memmove = yes; then
17977   :
17978 else
17979
17980 echo "$as_me:17980: checking for bcopy" >&5
17981 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17982 if test "${ac_cv_func_bcopy+set}" = set; then
17983   echo $ECHO_N "(cached) $ECHO_C" >&6
17984 else
17985   cat >conftest.$ac_ext <<_ACEOF
17986 #line 17986 "configure"
17987 #include "confdefs.h"
17988 /* System header to define __stub macros and hopefully few prototypes,
17989     which can conflict with char bcopy (); below.  */
17990 #include <assert.h>
17991 /* Override any gcc2 internal prototype to avoid an error.  */
17992 #ifdef __cplusplus
17993 extern "C"
17994 #endif
17995 /* We use char because int might match the return type of a gcc2
17996    builtin and then its argument prototype would still apply.  */
17997 char bcopy ();
17998 char (*f) ();
17999
18000 int
18001 main ()
18002 {
18003 /* The GNU C library defines this for functions which it implements
18004     to always fail with ENOSYS.  Some functions are actually named
18005     something starting with __ and the normal name is an alias.  */
18006 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18007 choke me
18008 #else
18009 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18010 #endif
18011
18012   ;
18013   return 0;
18014 }
18015 _ACEOF
18016 rm -f conftest.$ac_objext conftest$ac_exeext
18017 if { (eval echo "$as_me:18017: \"$ac_link\"") >&5
18018   (eval $ac_link) 2>&5
18019   ac_status=$?
18020   echo "$as_me:18020: \$? = $ac_status" >&5
18021   (exit $ac_status); } &&
18022          { ac_try='test -s conftest$ac_exeext'
18023   { (eval echo "$as_me:18023: \"$ac_try\"") >&5
18024   (eval $ac_try) 2>&5
18025   ac_status=$?
18026   echo "$as_me:18026: \$? = $ac_status" >&5
18027   (exit $ac_status); }; }; then
18028   ac_cv_func_bcopy=yes
18029 else
18030   echo "$as_me: failed program was:" >&5
18031 cat conftest.$ac_ext >&5
18032 ac_cv_func_bcopy=no
18033 fi
18034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18035 fi
18036 echo "$as_me:18036: result: $ac_cv_func_bcopy" >&5
18037 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18038 if test $ac_cv_func_bcopy = yes; then
18039
18040         echo "$as_me:18040: checking if bcopy does overlapping moves" >&5
18041 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18042 if test "${cf_cv_good_bcopy+set}" = set; then
18043   echo $ECHO_N "(cached) $ECHO_C" >&6
18044 else
18045
18046                 if test "$cross_compiling" = yes; then
18047   cf_cv_good_bcopy=unknown
18048 else
18049   cat >conftest.$ac_ext <<_ACEOF
18050 #line 18050 "configure"
18051 #include "confdefs.h"
18052
18053 int main() {
18054         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18055         char temp[40];
18056         bcopy(data, temp, sizeof(data));
18057         bcopy(temp+10, temp, 15);
18058         bcopy(temp+5, temp+15, 10);
18059         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18060 }
18061
18062 _ACEOF
18063 rm -f conftest$ac_exeext
18064 if { (eval echo "$as_me:18064: \"$ac_link\"") >&5
18065   (eval $ac_link) 2>&5
18066   ac_status=$?
18067   echo "$as_me:18067: \$? = $ac_status" >&5
18068   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18069   { (eval echo "$as_me:18069: \"$ac_try\"") >&5
18070   (eval $ac_try) 2>&5
18071   ac_status=$?
18072   echo "$as_me:18072: \$? = $ac_status" >&5
18073   (exit $ac_status); }; }; then
18074   cf_cv_good_bcopy=yes
18075 else
18076   echo "$as_me: program exited with status $ac_status" >&5
18077 echo "$as_me: failed program was:" >&5
18078 cat conftest.$ac_ext >&5
18079 cf_cv_good_bcopy=no
18080 fi
18081 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18082 fi
18083
18084 fi
18085 echo "$as_me:18085: result: $cf_cv_good_bcopy" >&5
18086 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18087
18088 else
18089   cf_cv_good_bcopy=no
18090 fi
18091
18092         if test "$cf_cv_good_bcopy" = yes ; then
18093
18094 cat >>confdefs.h <<\EOF
18095 #define USE_OK_BCOPY 1
18096 EOF
18097
18098         else
18099
18100 cat >>confdefs.h <<\EOF
18101 #define USE_MY_MEMMOVE 1
18102 EOF
18103
18104         fi
18105
18106 fi
18107
18108 tty 2>&1 >/dev/null || {
18109 for ac_func in posix_openpt
18110 do
18111 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18112 echo "$as_me:18112: checking for $ac_func" >&5
18113 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18114 if eval "test \"\${$as_ac_var+set}\" = set"; then
18115   echo $ECHO_N "(cached) $ECHO_C" >&6
18116 else
18117   cat >conftest.$ac_ext <<_ACEOF
18118 #line 18118 "configure"
18119 #include "confdefs.h"
18120 /* System header to define __stub macros and hopefully few prototypes,
18121     which can conflict with char $ac_func (); below.  */
18122 #include <assert.h>
18123 /* Override any gcc2 internal prototype to avoid an error.  */
18124 #ifdef __cplusplus
18125 extern "C"
18126 #endif
18127 /* We use char because int might match the return type of a gcc2
18128    builtin and then its argument prototype would still apply.  */
18129 char $ac_func ();
18130 char (*f) ();
18131
18132 int
18133 main ()
18134 {
18135 /* The GNU C library defines this for functions which it implements
18136     to always fail with ENOSYS.  Some functions are actually named
18137     something starting with __ and the normal name is an alias.  */
18138 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18139 choke me
18140 #else
18141 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18142 #endif
18143
18144   ;
18145   return 0;
18146 }
18147 _ACEOF
18148 rm -f conftest.$ac_objext conftest$ac_exeext
18149 if { (eval echo "$as_me:18149: \"$ac_link\"") >&5
18150   (eval $ac_link) 2>&5
18151   ac_status=$?
18152   echo "$as_me:18152: \$? = $ac_status" >&5
18153   (exit $ac_status); } &&
18154          { ac_try='test -s conftest$ac_exeext'
18155   { (eval echo "$as_me:18155: \"$ac_try\"") >&5
18156   (eval $ac_try) 2>&5
18157   ac_status=$?
18158   echo "$as_me:18158: \$? = $ac_status" >&5
18159   (exit $ac_status); }; }; then
18160   eval "$as_ac_var=yes"
18161 else
18162   echo "$as_me: failed program was:" >&5
18163 cat conftest.$ac_ext >&5
18164 eval "$as_ac_var=no"
18165 fi
18166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18167 fi
18168 echo "$as_me:18168: result: `eval echo '${'$as_ac_var'}'`" >&5
18169 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18170 if test `eval echo '${'$as_ac_var'}'` = yes; then
18171   cat >>confdefs.h <<EOF
18172 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18173 EOF
18174
18175 fi
18176 done
18177  }
18178 echo "$as_me:18178: checking if poll really works" >&5
18179 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18180 if test "${cf_cv_working_poll+set}" = set; then
18181   echo $ECHO_N "(cached) $ECHO_C" >&6
18182 else
18183
18184 if test "$cross_compiling" = yes; then
18185   cf_cv_working_poll=unknown
18186 else
18187   cat >conftest.$ac_ext <<_ACEOF
18188 #line 18188 "configure"
18189 #include "confdefs.h"
18190
18191 #include <stdlib.h>
18192 #include <stdio.h>
18193 #include <unistd.h>
18194 #include <fcntl.h>
18195 #ifdef HAVE_POLL_H
18196 #include <poll.h>
18197 #else
18198 #include <sys/poll.h>
18199 #endif
18200 int main(void) {
18201         struct pollfd myfds;
18202         int ret;
18203
18204         /* check for Darwin bug with respect to "devices" */
18205         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18206         if (myfds.fd < 0)
18207                 myfds.fd = 0;
18208         myfds.events = POLLIN;
18209         myfds.revents = 0;
18210
18211         ret = poll(&myfds, 1, 100);
18212
18213         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18214                 ret = -1;
18215         } else {
18216                 int fd = 0;
18217                 if (!isatty(fd)) {
18218                         fd = open("/dev/tty", 2);       /* O_RDWR */
18219                 }
18220 #ifdef HAVE_POSIX_OPENPT
18221                 if (fd < 0) {
18222                         fd = posix_openpt(O_RDWR);
18223                 }
18224 #endif
18225
18226                 if (fd >= 0) {
18227                         /* also check with standard input */
18228                         myfds.fd = fd;
18229                         myfds.events = POLLIN;
18230                         myfds.revents = 0;
18231                         ret = poll(&myfds, 1, 100);
18232                 } else {
18233                         ret = -1;
18234                 }
18235         }
18236         ${cf_cv_main_return:-return}(ret < 0);
18237 }
18238 _ACEOF
18239 rm -f conftest$ac_exeext
18240 if { (eval echo "$as_me:18240: \"$ac_link\"") >&5
18241   (eval $ac_link) 2>&5
18242   ac_status=$?
18243   echo "$as_me:18243: \$? = $ac_status" >&5
18244   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18245   { (eval echo "$as_me:18245: \"$ac_try\"") >&5
18246   (eval $ac_try) 2>&5
18247   ac_status=$?
18248   echo "$as_me:18248: \$? = $ac_status" >&5
18249   (exit $ac_status); }; }; then
18250   cf_cv_working_poll=yes
18251 else
18252   echo "$as_me: program exited with status $ac_status" >&5
18253 echo "$as_me: failed program was:" >&5
18254 cat conftest.$ac_ext >&5
18255 cf_cv_working_poll=no
18256 fi
18257 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18258 fi
18259 fi
18260 echo "$as_me:18260: result: $cf_cv_working_poll" >&5
18261 echo "${ECHO_T}$cf_cv_working_poll" >&6
18262 test "$cf_cv_working_poll" = "yes" &&
18263 cat >>confdefs.h <<\EOF
18264 #define HAVE_WORKING_POLL 1
18265 EOF
18266
18267 echo "$as_me:18267: checking for va_copy" >&5
18268 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18269 if test "${cf_cv_have_va_copy+set}" = set; then
18270   echo $ECHO_N "(cached) $ECHO_C" >&6
18271 else
18272
18273 cat >conftest.$ac_ext <<_ACEOF
18274 #line 18274 "configure"
18275 #include "confdefs.h"
18276
18277 #include <stdarg.h>
18278
18279 int
18280 main ()
18281 {
18282
18283         static va_list dst;
18284         static va_list src;
18285         va_copy(dst, src)
18286   ;
18287   return 0;
18288 }
18289 _ACEOF
18290 rm -f conftest.$ac_objext conftest$ac_exeext
18291 if { (eval echo "$as_me:18291: \"$ac_link\"") >&5
18292   (eval $ac_link) 2>&5
18293   ac_status=$?
18294   echo "$as_me:18294: \$? = $ac_status" >&5
18295   (exit $ac_status); } &&
18296          { ac_try='test -s conftest$ac_exeext'
18297   { (eval echo "$as_me:18297: \"$ac_try\"") >&5
18298   (eval $ac_try) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit $ac_status); }; }; then
18302   cf_cv_have_va_copy=yes
18303 else
18304   echo "$as_me: failed program was:" >&5
18305 cat conftest.$ac_ext >&5
18306 cf_cv_have_va_copy=no
18307 fi
18308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18309 fi
18310 echo "$as_me:18310: result: $cf_cv_have_va_copy" >&5
18311 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18312
18313 test "$cf_cv_have_va_copy" = yes &&
18314 cat >>confdefs.h <<\EOF
18315 #define HAVE_VA_COPY 1
18316 EOF
18317
18318 echo "$as_me:18318: checking for __va_copy" >&5
18319 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18320 if test "${cf_cv_have___va_copy+set}" = set; then
18321   echo $ECHO_N "(cached) $ECHO_C" >&6
18322 else
18323
18324 cat >conftest.$ac_ext <<_ACEOF
18325 #line 18325 "configure"
18326 #include "confdefs.h"
18327
18328 #include <stdarg.h>
18329
18330 int
18331 main ()
18332 {
18333
18334         static va_list dst;
18335         static va_list src;
18336         __va_copy(dst, src)
18337   ;
18338   return 0;
18339 }
18340 _ACEOF
18341 rm -f conftest.$ac_objext conftest$ac_exeext
18342 if { (eval echo "$as_me:18342: \"$ac_link\"") >&5
18343   (eval $ac_link) 2>&5
18344   ac_status=$?
18345   echo "$as_me:18345: \$? = $ac_status" >&5
18346   (exit $ac_status); } &&
18347          { ac_try='test -s conftest$ac_exeext'
18348   { (eval echo "$as_me:18348: \"$ac_try\"") >&5
18349   (eval $ac_try) 2>&5
18350   ac_status=$?
18351   echo "$as_me:18351: \$? = $ac_status" >&5
18352   (exit $ac_status); }; }; then
18353   cf_cv_have___va_copy=yes
18354 else
18355   echo "$as_me: failed program was:" >&5
18356 cat conftest.$ac_ext >&5
18357 cf_cv_have___va_copy=no
18358 fi
18359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18360 fi
18361 echo "$as_me:18361: result: $cf_cv_have___va_copy" >&5
18362 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18363
18364 test "$cf_cv_have___va_copy" = yes &&
18365 cat >>confdefs.h <<\EOF
18366 #define HAVE___VA_COPY 1
18367 EOF
18368
18369 echo "$as_me:18369: checking for pid_t" >&5
18370 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18371 if test "${ac_cv_type_pid_t+set}" = set; then
18372   echo $ECHO_N "(cached) $ECHO_C" >&6
18373 else
18374   cat >conftest.$ac_ext <<_ACEOF
18375 #line 18375 "configure"
18376 #include "confdefs.h"
18377 $ac_includes_default
18378 int
18379 main ()
18380 {
18381 if ((pid_t *) 0)
18382   return 0;
18383 if (sizeof (pid_t))
18384   return 0;
18385   ;
18386   return 0;
18387 }
18388 _ACEOF
18389 rm -f conftest.$ac_objext
18390 if { (eval echo "$as_me:18390: \"$ac_compile\"") >&5
18391   (eval $ac_compile) 2>&5
18392   ac_status=$?
18393   echo "$as_me:18393: \$? = $ac_status" >&5
18394   (exit $ac_status); } &&
18395          { ac_try='test -s conftest.$ac_objext'
18396   { (eval echo "$as_me:18396: \"$ac_try\"") >&5
18397   (eval $ac_try) 2>&5
18398   ac_status=$?
18399   echo "$as_me:18399: \$? = $ac_status" >&5
18400   (exit $ac_status); }; }; then
18401   ac_cv_type_pid_t=yes
18402 else
18403   echo "$as_me: failed program was:" >&5
18404 cat conftest.$ac_ext >&5
18405 ac_cv_type_pid_t=no
18406 fi
18407 rm -f conftest.$ac_objext conftest.$ac_ext
18408 fi
18409 echo "$as_me:18409: result: $ac_cv_type_pid_t" >&5
18410 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18411 if test $ac_cv_type_pid_t = yes; then
18412   :
18413 else
18414
18415 cat >>confdefs.h <<EOF
18416 #define pid_t int
18417 EOF
18418
18419 fi
18420
18421 for ac_header in unistd.h vfork.h
18422 do
18423 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18424 echo "$as_me:18424: checking for $ac_header" >&5
18425 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18426 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18427   echo $ECHO_N "(cached) $ECHO_C" >&6
18428 else
18429   cat >conftest.$ac_ext <<_ACEOF
18430 #line 18430 "configure"
18431 #include "confdefs.h"
18432 #include <$ac_header>
18433 _ACEOF
18434 if { (eval echo "$as_me:18434: \"$ac_cpp conftest.$ac_ext\"") >&5
18435   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18436   ac_status=$?
18437   egrep -v '^ *\+' conftest.er1 >conftest.err
18438   rm -f conftest.er1
18439   cat conftest.err >&5
18440   echo "$as_me:18440: \$? = $ac_status" >&5
18441   (exit $ac_status); } >/dev/null; then
18442   if test -s conftest.err; then
18443     ac_cpp_err=$ac_c_preproc_warn_flag
18444   else
18445     ac_cpp_err=
18446   fi
18447 else
18448   ac_cpp_err=yes
18449 fi
18450 if test -z "$ac_cpp_err"; then
18451   eval "$as_ac_Header=yes"
18452 else
18453   echo "$as_me: failed program was:" >&5
18454   cat conftest.$ac_ext >&5
18455   eval "$as_ac_Header=no"
18456 fi
18457 rm -f conftest.err conftest.$ac_ext
18458 fi
18459 echo "$as_me:18459: result: `eval echo '${'$as_ac_Header'}'`" >&5
18460 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18461 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18462   cat >>confdefs.h <<EOF
18463 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18464 EOF
18465
18466 fi
18467 done
18468
18469 for ac_func in fork vfork
18470 do
18471 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18472 echo "$as_me:18472: checking for $ac_func" >&5
18473 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18474 if eval "test \"\${$as_ac_var+set}\" = set"; then
18475   echo $ECHO_N "(cached) $ECHO_C" >&6
18476 else
18477   cat >conftest.$ac_ext <<_ACEOF
18478 #line 18478 "configure"
18479 #include "confdefs.h"
18480 /* System header to define __stub macros and hopefully few prototypes,
18481     which can conflict with char $ac_func (); below.  */
18482 #include <assert.h>
18483 /* Override any gcc2 internal prototype to avoid an error.  */
18484 #ifdef __cplusplus
18485 extern "C"
18486 #endif
18487 /* We use char because int might match the return type of a gcc2
18488    builtin and then its argument prototype would still apply.  */
18489 char $ac_func ();
18490 char (*f) ();
18491
18492 int
18493 main ()
18494 {
18495 /* The GNU C library defines this for functions which it implements
18496     to always fail with ENOSYS.  Some functions are actually named
18497     something starting with __ and the normal name is an alias.  */
18498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18499 choke me
18500 #else
18501 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18502 #endif
18503
18504   ;
18505   return 0;
18506 }
18507 _ACEOF
18508 rm -f conftest.$ac_objext conftest$ac_exeext
18509 if { (eval echo "$as_me:18509: \"$ac_link\"") >&5
18510   (eval $ac_link) 2>&5
18511   ac_status=$?
18512   echo "$as_me:18512: \$? = $ac_status" >&5
18513   (exit $ac_status); } &&
18514          { ac_try='test -s conftest$ac_exeext'
18515   { (eval echo "$as_me:18515: \"$ac_try\"") >&5
18516   (eval $ac_try) 2>&5
18517   ac_status=$?
18518   echo "$as_me:18518: \$? = $ac_status" >&5
18519   (exit $ac_status); }; }; then
18520   eval "$as_ac_var=yes"
18521 else
18522   echo "$as_me: failed program was:" >&5
18523 cat conftest.$ac_ext >&5
18524 eval "$as_ac_var=no"
18525 fi
18526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18527 fi
18528 echo "$as_me:18528: result: `eval echo '${'$as_ac_var'}'`" >&5
18529 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18530 if test `eval echo '${'$as_ac_var'}'` = yes; then
18531   cat >>confdefs.h <<EOF
18532 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18533 EOF
18534
18535 fi
18536 done
18537
18538 ac_cv_func_fork_works=$ac_cv_func_fork
18539 if test "x$ac_cv_func_fork" = xyes; then
18540   echo "$as_me:18540: checking for working fork" >&5
18541 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18542 if test "${ac_cv_func_fork_works+set}" = set; then
18543   echo $ECHO_N "(cached) $ECHO_C" >&6
18544 else
18545   if test "$cross_compiling" = yes; then
18546   ac_cv_func_fork_works=cross
18547 else
18548   cat >conftest.$ac_ext <<_ACEOF
18549 /* By Rüdiger Kuhlmann. */
18550       #include <sys/types.h>
18551       #if HAVE_UNISTD_H
18552       # include <unistd.h>
18553       #endif
18554       /* Some systems only have a dummy stub for fork() */
18555       int main ()
18556       {
18557         if (fork() < 0)
18558           $ac_main_return (1);
18559         $ac_main_return (0);
18560       }
18561 _ACEOF
18562 rm -f conftest$ac_exeext
18563 if { (eval echo "$as_me:18563: \"$ac_link\"") >&5
18564   (eval $ac_link) 2>&5
18565   ac_status=$?
18566   echo "$as_me:18566: \$? = $ac_status" >&5
18567   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18568   { (eval echo "$as_me:18568: \"$ac_try\"") >&5
18569   (eval $ac_try) 2>&5
18570   ac_status=$?
18571   echo "$as_me:18571: \$? = $ac_status" >&5
18572   (exit $ac_status); }; }; then
18573   ac_cv_func_fork_works=yes
18574 else
18575   echo "$as_me: program exited with status $ac_status" >&5
18576 echo "$as_me: failed program was:" >&5
18577 cat conftest.$ac_ext >&5
18578 ac_cv_func_fork_works=no
18579 fi
18580 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18581 fi
18582 fi
18583 echo "$as_me:18583: result: $ac_cv_func_fork_works" >&5
18584 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18585
18586 fi
18587 if test "x$ac_cv_func_fork_works" = xcross; then
18588   case $host in
18589     *-*-amigaos* | *-*-msdosdjgpp*)
18590       # Override, as these systems have only a dummy fork() stub
18591       ac_cv_func_fork_works=no
18592       ;;
18593     *)
18594       ac_cv_func_fork_works=yes
18595       ;;
18596   esac
18597   { echo "$as_me:18597: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18598 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18599 fi
18600 ac_cv_func_vfork_works=$ac_cv_func_vfork
18601 if test "x$ac_cv_func_vfork" = xyes; then
18602   echo "$as_me:18602: checking for working vfork" >&5
18603 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18604 if test "${ac_cv_func_vfork_works+set}" = set; then
18605   echo $ECHO_N "(cached) $ECHO_C" >&6
18606 else
18607   if test "$cross_compiling" = yes; then
18608   ac_cv_func_vfork_works=cross
18609 else
18610   cat >conftest.$ac_ext <<_ACEOF
18611 #line 18611 "configure"
18612 #include "confdefs.h"
18613 /* Thanks to Paul Eggert for this test.  */
18614 #include <stdio.h>
18615 #include <sys/types.h>
18616 #include <sys/stat.h>
18617 #if HAVE_UNISTD_H
18618 # include <unistd.h>
18619 #endif
18620 #if HAVE_VFORK_H
18621 # include <vfork.h>
18622 #endif
18623 /* On some sparc systems, changes by the child to local and incoming
18624    argument registers are propagated back to the parent.  The compiler
18625    is told about this with #include <vfork.h>, but some compilers
18626    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18627    static variable whose address is put into a register that is
18628    clobbered by the vfork.  */
18629 static
18630 #ifdef __cplusplus
18631 sparc_address_test (int arg)
18632 # else
18633 sparc_address_test (arg) int arg;
18634 #endif
18635 {
18636   static pid_t child;
18637   if (!child) {
18638     child = vfork ();
18639     if (child < 0) {
18640       perror ("vfork");
18641       _exit(2);
18642     }
18643     if (!child) {
18644       arg = getpid();
18645       write(-1, "", 0);
18646       _exit (arg);
18647     }
18648   }
18649 }
18650
18651 int
18652 main ()
18653 {
18654   pid_t parent = getpid ();
18655   pid_t child;
18656
18657   sparc_address_test ();
18658
18659   child = vfork ();
18660
18661   if (child == 0) {
18662     /* Here is another test for sparc vfork register problems.  This
18663        test uses lots of local variables, at least as many local
18664        variables as main has allocated so far including compiler
18665        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18666        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18667        reuse the register of parent for one of the local variables,
18668        since it will think that parent can't possibly be used any more
18669        in this routine.  Assigning to the local variable will thus
18670        munge parent in the parent process.  */
18671     pid_t
18672       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18673       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18674     /* Convince the compiler that p..p7 are live; otherwise, it might
18675        use the same hardware register for all 8 local variables.  */
18676     if (p != p1 || p != p2 || p != p3 || p != p4
18677         || p != p5 || p != p6 || p != p7)
18678       _exit(1);
18679
18680     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18681        from child file descriptors.  If the child closes a descriptor
18682        before it execs or exits, this munges the parent's descriptor
18683        as well.  Test for this by closing stdout in the child.  */
18684     _exit(close(fileno(stdout)) != 0);
18685   } else {
18686     int status;
18687     struct stat st;
18688
18689     while (wait(&status) != child)
18690       ;
18691     $ac_main_return(
18692          /* Was there some problem with vforking?  */
18693          child < 0
18694
18695          /* Did the child fail?  (This shouldn't happen.)  */
18696          || status
18697
18698          /* Did the vfork/compiler bug occur?  */
18699          || parent != getpid()
18700
18701          /* Did the file descriptor bug occur?  */
18702          || fstat(fileno(stdout), &st) != 0
18703          );
18704   }
18705 }
18706 _ACEOF
18707 rm -f conftest$ac_exeext
18708 if { (eval echo "$as_me:18708: \"$ac_link\"") >&5
18709   (eval $ac_link) 2>&5
18710   ac_status=$?
18711   echo "$as_me:18711: \$? = $ac_status" >&5
18712   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18713   { (eval echo "$as_me:18713: \"$ac_try\"") >&5
18714   (eval $ac_try) 2>&5
18715   ac_status=$?
18716   echo "$as_me:18716: \$? = $ac_status" >&5
18717   (exit $ac_status); }; }; then
18718   ac_cv_func_vfork_works=yes
18719 else
18720   echo "$as_me: program exited with status $ac_status" >&5
18721 echo "$as_me: failed program was:" >&5
18722 cat conftest.$ac_ext >&5
18723 ac_cv_func_vfork_works=no
18724 fi
18725 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18726 fi
18727 fi
18728 echo "$as_me:18728: result: $ac_cv_func_vfork_works" >&5
18729 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18730
18731 fi;
18732 if test "x$ac_cv_func_fork_works" = xcross; then
18733   ac_cv_func_vfork_works=ac_cv_func_vfork
18734   { echo "$as_me:18734: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18735 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18736 fi
18737
18738 if test "x$ac_cv_func_vfork_works" = xyes; then
18739
18740 cat >>confdefs.h <<\EOF
18741 #define HAVE_WORKING_VFORK 1
18742 EOF
18743
18744 else
18745
18746 cat >>confdefs.h <<\EOF
18747 #define vfork fork
18748 EOF
18749
18750 fi
18751 if test "x$ac_cv_func_fork_works" = xyes; then
18752
18753 cat >>confdefs.h <<\EOF
18754 #define HAVE_WORKING_FORK 1
18755 EOF
18756
18757 fi
18758
18759 # special check for test/ditto.c
18760
18761 echo "$as_me:18761: checking for openpty in -lutil" >&5
18762 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18763 if test "${ac_cv_lib_util_openpty+set}" = set; then
18764   echo $ECHO_N "(cached) $ECHO_C" >&6
18765 else
18766   ac_check_lib_save_LIBS=$LIBS
18767 LIBS="-lutil  $LIBS"
18768 cat >conftest.$ac_ext <<_ACEOF
18769 #line 18769 "configure"
18770 #include "confdefs.h"
18771
18772 /* Override any gcc2 internal prototype to avoid an error.  */
18773 #ifdef __cplusplus
18774 extern "C"
18775 #endif
18776 /* We use char because int might match the return type of a gcc2
18777    builtin and then its argument prototype would still apply.  */
18778 char openpty ();
18779 int
18780 main ()
18781 {
18782 openpty ();
18783   ;
18784   return 0;
18785 }
18786 _ACEOF
18787 rm -f conftest.$ac_objext conftest$ac_exeext
18788 if { (eval echo "$as_me:18788: \"$ac_link\"") >&5
18789   (eval $ac_link) 2>&5
18790   ac_status=$?
18791   echo "$as_me:18791: \$? = $ac_status" >&5
18792   (exit $ac_status); } &&
18793          { ac_try='test -s conftest$ac_exeext'
18794   { (eval echo "$as_me:18794: \"$ac_try\"") >&5
18795   (eval $ac_try) 2>&5
18796   ac_status=$?
18797   echo "$as_me:18797: \$? = $ac_status" >&5
18798   (exit $ac_status); }; }; then
18799   ac_cv_lib_util_openpty=yes
18800 else
18801   echo "$as_me: failed program was:" >&5
18802 cat conftest.$ac_ext >&5
18803 ac_cv_lib_util_openpty=no
18804 fi
18805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18806 LIBS=$ac_check_lib_save_LIBS
18807 fi
18808 echo "$as_me:18808: result: $ac_cv_lib_util_openpty" >&5
18809 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18810 if test $ac_cv_lib_util_openpty = yes; then
18811   cf_cv_lib_util=yes
18812 else
18813   cf_cv_lib_util=no
18814 fi
18815
18816 echo "$as_me:18816: checking for openpty header" >&5
18817 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18818 if test "${cf_cv_func_openpty+set}" = set; then
18819   echo $ECHO_N "(cached) $ECHO_C" >&6
18820 else
18821
18822         cf_save_LIBS="$LIBS"
18823         test $cf_cv_lib_util = yes && {
18824 cf_add_libs="-lutil"
18825 # Filter out duplicates - this happens with badly-designed ".pc" files...
18826 for cf_add_1lib in $LIBS
18827 do
18828         for cf_add_2lib in $cf_add_libs
18829         do
18830                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18831                 then
18832                         cf_add_1lib=
18833                         break
18834                 fi
18835         done
18836         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18837 done
18838 LIBS="$cf_add_libs"
18839  }
18840         for cf_header in pty.h libutil.h util.h
18841         do
18842         cat >conftest.$ac_ext <<_ACEOF
18843 #line 18843 "configure"
18844 #include "confdefs.h"
18845
18846 #include <$cf_header>
18847
18848 int
18849 main ()
18850 {
18851
18852         int x = openpty((int *)0, (int *)0, (char *)0,
18853                                    (struct termios *)0, (struct winsize *)0);
18854
18855   ;
18856   return 0;
18857 }
18858 _ACEOF
18859 rm -f conftest.$ac_objext conftest$ac_exeext
18860 if { (eval echo "$as_me:18860: \"$ac_link\"") >&5
18861   (eval $ac_link) 2>&5
18862   ac_status=$?
18863   echo "$as_me:18863: \$? = $ac_status" >&5
18864   (exit $ac_status); } &&
18865          { ac_try='test -s conftest$ac_exeext'
18866   { (eval echo "$as_me:18866: \"$ac_try\"") >&5
18867   (eval $ac_try) 2>&5
18868   ac_status=$?
18869   echo "$as_me:18869: \$? = $ac_status" >&5
18870   (exit $ac_status); }; }; then
18871
18872                 cf_cv_func_openpty=$cf_header
18873                 break
18874
18875 else
18876   echo "$as_me: failed program was:" >&5
18877 cat conftest.$ac_ext >&5
18878
18879                 cf_cv_func_openpty=no
18880
18881 fi
18882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18883         done
18884         LIBS="$cf_save_LIBS"
18885
18886 fi
18887 echo "$as_me:18887: result: $cf_cv_func_openpty" >&5
18888 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18889
18890 if test "$cf_cv_func_openpty" != no ; then
18891
18892 cat >>confdefs.h <<EOF
18893 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18894 EOF
18895
18896 cat >>confdefs.h <<\EOF
18897 #define USE_XTERM_PTY 1
18898 EOF
18899
18900         if test "x$cf_cv_lib_util" = xyes ; then
18901
18902 cf_add_libs="-lutil"
18903 # Filter out duplicates - this happens with badly-designed ".pc" files...
18904 for cf_add_1lib in $TEST_LIBS
18905 do
18906         for cf_add_2lib in $cf_add_libs
18907         do
18908                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18909                 then
18910                         cf_add_1lib=
18911                         break
18912                 fi
18913         done
18914         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18915 done
18916 TEST_LIBS="$cf_add_libs"
18917
18918         fi
18919 fi
18920
18921 if test "$with_hashed_db" != no ; then
18922
18923 cat >>confdefs.h <<\EOF
18924 #define USE_HASHED_DB 1
18925 EOF
18926
18927 case $with_hashed_db in
18928 (yes|*able*)
18929         ;;
18930 (*)
18931         if test -d "$with_hashed_db" ; then
18932
18933 if test -n "$with_hashed_db/include" ; then
18934   for cf_add_incdir in $with_hashed_db/include
18935   do
18936         while test $cf_add_incdir != /usr/include
18937         do
18938           if test -d $cf_add_incdir
18939           then
18940                 cf_have_incdir=no
18941                 if test -n "$CFLAGS$CPPFLAGS" ; then
18942                   # a loop is needed to ensure we can add subdirs of existing dirs
18943                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18944                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18945                           cf_have_incdir=yes; break
18946                         fi
18947                   done
18948                 fi
18949
18950                 if test "$cf_have_incdir" = no ; then
18951                   if test "$cf_add_incdir" = /usr/local/include ; then
18952                         if test "$GCC" = yes
18953                         then
18954                           cf_save_CPPFLAGS=$CPPFLAGS
18955                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18956                           cat >conftest.$ac_ext <<_ACEOF
18957 #line 18957 "configure"
18958 #include "confdefs.h"
18959 #include <stdio.h>
18960 int
18961 main ()
18962 {
18963 printf("Hello")
18964   ;
18965   return 0;
18966 }
18967 _ACEOF
18968 rm -f conftest.$ac_objext
18969 if { (eval echo "$as_me:18969: \"$ac_compile\"") >&5
18970   (eval $ac_compile) 2>&5
18971   ac_status=$?
18972   echo "$as_me:18972: \$? = $ac_status" >&5
18973   (exit $ac_status); } &&
18974          { ac_try='test -s conftest.$ac_objext'
18975   { (eval echo "$as_me:18975: \"$ac_try\"") >&5
18976   (eval $ac_try) 2>&5
18977   ac_status=$?
18978   echo "$as_me:18978: \$? = $ac_status" >&5
18979   (exit $ac_status); }; }; then
18980   :
18981 else
18982   echo "$as_me: failed program was:" >&5
18983 cat conftest.$ac_ext >&5
18984 cf_have_incdir=yes
18985 fi
18986 rm -f conftest.$ac_objext conftest.$ac_ext
18987                           CPPFLAGS=$cf_save_CPPFLAGS
18988                         fi
18989                   fi
18990                 fi
18991
18992                 if test "$cf_have_incdir" = no ; then
18993                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18994
18995 echo "${as_me:-configure}:18995: testing adding $cf_add_incdir to include-path ..." 1>&5
18996
18997                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18998
18999                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19000                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19001                   cf_add_incdir="$cf_top_incdir"
19002                 else
19003                   break
19004                 fi
19005           else
19006                 break
19007           fi
19008         done
19009   done
19010 fi
19011
19012 if test -n "$with_hashed_db/lib" ; then
19013         for cf_add_libdir in $with_hashed_db/lib
19014         do
19015                 if test $cf_add_libdir = /usr/lib ; then
19016                         :
19017                 elif test -d $cf_add_libdir
19018                 then
19019                         cf_have_libdir=no
19020                         if test -n "$LDFLAGS$LIBS" ; then
19021                                 # a loop is needed to ensure we can add subdirs of existing dirs
19022                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19023                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19024                                                 cf_have_libdir=yes; break
19025                                         fi
19026                                 done
19027                         fi
19028                         if test "$cf_have_libdir" = no ; then
19029                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19030
19031 echo "${as_me:-configure}:19031: testing adding $cf_add_libdir to library-path ..." 1>&5
19032
19033                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19034                         fi
19035                 fi
19036         done
19037 fi
19038
19039         else
19040                 case "$with_hashed_db" in
19041                 (./*|../*|/*)
19042                         { echo "$as_me:19042: WARNING: no such directory $with_hashed_db" >&5
19043 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19044                         ;;
19045                 (*)
19046
19047 cf_search=
19048
19049 test "x$prefix" != "xNONE" && \
19050 test -d "$prefix" && \
19051  {
19052         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19053         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19054         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19055         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19056         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19057         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19058 }
19059
19060 for cf_subdir_prefix in \
19061         /usr \
19062         /usr/local \
19063         /usr/pkg \
19064         /opt \
19065         /opt/local \
19066         $HOME
19067 do
19068
19069 test "x$cf_subdir_prefix" != "x$prefix" && \
19070 test -d "$cf_subdir_prefix" && \
19071 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19072         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19073         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19074         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19075         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19076         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19077         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"
19078 }
19079
19080 done
19081
19082         for cf_item in $cf_search
19083         do
19084                 case $cf_item in
19085                 (*/$with_hashed_db)
19086
19087 if test -n "$cf_item" ; then
19088   for cf_add_incdir in $cf_item
19089   do
19090         while test $cf_add_incdir != /usr/include
19091         do
19092           if test -d $cf_add_incdir
19093           then
19094                 cf_have_incdir=no
19095                 if test -n "$CFLAGS$CPPFLAGS" ; then
19096                   # a loop is needed to ensure we can add subdirs of existing dirs
19097                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19098                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19099                           cf_have_incdir=yes; break
19100                         fi
19101                   done
19102                 fi
19103
19104                 if test "$cf_have_incdir" = no ; then
19105                   if test "$cf_add_incdir" = /usr/local/include ; then
19106                         if test "$GCC" = yes
19107                         then
19108                           cf_save_CPPFLAGS=$CPPFLAGS
19109                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19110                           cat >conftest.$ac_ext <<_ACEOF
19111 #line 19111 "configure"
19112 #include "confdefs.h"
19113 #include <stdio.h>
19114 int
19115 main ()
19116 {
19117 printf("Hello")
19118   ;
19119   return 0;
19120 }
19121 _ACEOF
19122 rm -f conftest.$ac_objext
19123 if { (eval echo "$as_me:19123: \"$ac_compile\"") >&5
19124   (eval $ac_compile) 2>&5
19125   ac_status=$?
19126   echo "$as_me:19126: \$? = $ac_status" >&5
19127   (exit $ac_status); } &&
19128          { ac_try='test -s conftest.$ac_objext'
19129   { (eval echo "$as_me:19129: \"$ac_try\"") >&5
19130   (eval $ac_try) 2>&5
19131   ac_status=$?
19132   echo "$as_me:19132: \$? = $ac_status" >&5
19133   (exit $ac_status); }; }; then
19134   :
19135 else
19136   echo "$as_me: failed program was:" >&5
19137 cat conftest.$ac_ext >&5
19138 cf_have_incdir=yes
19139 fi
19140 rm -f conftest.$ac_objext conftest.$ac_ext
19141                           CPPFLAGS=$cf_save_CPPFLAGS
19142                         fi
19143                   fi
19144                 fi
19145
19146                 if test "$cf_have_incdir" = no ; then
19147                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19148
19149 echo "${as_me:-configure}:19149: testing adding $cf_add_incdir to include-path ..." 1>&5
19150
19151                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19152
19153                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19154                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19155                   cf_add_incdir="$cf_top_incdir"
19156                 else
19157                   break
19158                 fi
19159           else
19160                 break
19161           fi
19162         done
19163   done
19164 fi
19165
19166                         ;;
19167                 esac
19168         done
19169
19170 cf_search=
19171
19172 test "x$prefix" != "xNONE" && \
19173 test -d "$prefix" && \
19174  {
19175         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19176         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19177         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19178         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19179         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19180         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19181 }
19182
19183 for cf_subdir_prefix in \
19184         /usr \
19185         /usr/local \
19186         /usr/pkg \
19187         /opt \
19188         /opt/local \
19189         $HOME
19190 do
19191
19192 test "x$cf_subdir_prefix" != "x$prefix" && \
19193 test -d "$cf_subdir_prefix" && \
19194 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19195         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19196         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19197         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19198         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19199         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19200         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"
19201 }
19202
19203 done
19204
19205         for cf_item in $cf_search
19206         do
19207                 case $cf_item in
19208                 (*/$with_hashed_db)
19209
19210 if test -n "$cf_item" ; then
19211         for cf_add_libdir in $cf_item
19212         do
19213                 if test $cf_add_libdir = /usr/lib ; then
19214                         :
19215                 elif test -d $cf_add_libdir
19216                 then
19217                         cf_have_libdir=no
19218                         if test -n "$LDFLAGS$LIBS" ; then
19219                                 # a loop is needed to ensure we can add subdirs of existing dirs
19220                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19221                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19222                                                 cf_have_libdir=yes; break
19223                                         fi
19224                                 done
19225                         fi
19226                         if test "$cf_have_libdir" = no ; then
19227                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19228
19229 echo "${as_me:-configure}:19229: testing adding $cf_add_libdir to library-path ..." 1>&5
19230
19231                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19232                         fi
19233                 fi
19234         done
19235 fi
19236
19237                         ;;
19238                 esac
19239         done
19240
19241                         ;;
19242                 esac
19243         fi
19244 esac
19245
19246 echo "$as_me:19246: checking for db.h" >&5
19247 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19248 if test "${ac_cv_header_db_h+set}" = set; then
19249   echo $ECHO_N "(cached) $ECHO_C" >&6
19250 else
19251   cat >conftest.$ac_ext <<_ACEOF
19252 #line 19252 "configure"
19253 #include "confdefs.h"
19254 #include <db.h>
19255 _ACEOF
19256 if { (eval echo "$as_me:19256: \"$ac_cpp conftest.$ac_ext\"") >&5
19257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19258   ac_status=$?
19259   egrep -v '^ *\+' conftest.er1 >conftest.err
19260   rm -f conftest.er1
19261   cat conftest.err >&5
19262   echo "$as_me:19262: \$? = $ac_status" >&5
19263   (exit $ac_status); } >/dev/null; then
19264   if test -s conftest.err; then
19265     ac_cpp_err=$ac_c_preproc_warn_flag
19266   else
19267     ac_cpp_err=
19268   fi
19269 else
19270   ac_cpp_err=yes
19271 fi
19272 if test -z "$ac_cpp_err"; then
19273   ac_cv_header_db_h=yes
19274 else
19275   echo "$as_me: failed program was:" >&5
19276   cat conftest.$ac_ext >&5
19277   ac_cv_header_db_h=no
19278 fi
19279 rm -f conftest.err conftest.$ac_ext
19280 fi
19281 echo "$as_me:19281: result: $ac_cv_header_db_h" >&5
19282 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19283 if test $ac_cv_header_db_h = yes; then
19284
19285 echo "$as_me:19285: checking for version of db" >&5
19286 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19287 if test "${cf_cv_hashed_db_version+set}" = set; then
19288   echo $ECHO_N "(cached) $ECHO_C" >&6
19289 else
19290
19291 cf_cv_hashed_db_version=unknown
19292
19293 for cf_db_version in 1 2 3 4 5 6
19294 do
19295
19296 echo "${as_me:-configure}:19296: testing checking for db version $cf_db_version ..." 1>&5
19297
19298         cat >conftest.$ac_ext <<_ACEOF
19299 #line 19299 "configure"
19300 #include "confdefs.h"
19301
19302 $ac_includes_default
19303 #include <db.h>
19304
19305 #ifdef DB_VERSION_MAJOR
19306         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19307 #if $cf_db_version == DB_VERSION_MAJOR
19308         /* ok */
19309 #else
19310         make an error
19311 #endif
19312 #else
19313 #if $cf_db_version == 1
19314         /* ok: assuming this is DB 1.8.5 */
19315 #else
19316         make an error
19317 #endif
19318 #endif
19319
19320 int
19321 main ()
19322 {
19323 DBT *foo = 0
19324   ;
19325   return 0;
19326 }
19327 _ACEOF
19328 rm -f conftest.$ac_objext
19329 if { (eval echo "$as_me:19329: \"$ac_compile\"") >&5
19330   (eval $ac_compile) 2>&5
19331   ac_status=$?
19332   echo "$as_me:19332: \$? = $ac_status" >&5
19333   (exit $ac_status); } &&
19334          { ac_try='test -s conftest.$ac_objext'
19335   { (eval echo "$as_me:19335: \"$ac_try\"") >&5
19336   (eval $ac_try) 2>&5
19337   ac_status=$?
19338   echo "$as_me:19338: \$? = $ac_status" >&5
19339   (exit $ac_status); }; }; then
19340
19341         cf_cv_hashed_db_version=$cf_db_version
19342         break
19343
19344 else
19345   echo "$as_me: failed program was:" >&5
19346 cat conftest.$ac_ext >&5
19347 fi
19348 rm -f conftest.$ac_objext conftest.$ac_ext
19349 done
19350
19351 fi
19352 echo "$as_me:19352: result: $cf_cv_hashed_db_version" >&5
19353 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19354
19355 if test "$cf_cv_hashed_db_version" = unknown ; then
19356         { { echo "$as_me:19356: error: Cannot determine version of db" >&5
19357 echo "$as_me: error: Cannot determine version of db" >&2;}
19358    { (exit 1); exit 1; }; }
19359 else
19360
19361 echo "$as_me:19361: checking for db libraries" >&5
19362 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19363 if test "${cf_cv_hashed_db_libs+set}" = set; then
19364   echo $ECHO_N "(cached) $ECHO_C" >&6
19365 else
19366
19367 cf_cv_hashed_db_libs=unknown
19368 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19369 do
19370         cf_save_libs="$LIBS"
19371         if test -n "$cf_db_libs"; then
19372
19373 cf_add_libs="-l$cf_db_libs"
19374 # Filter out duplicates - this happens with badly-designed ".pc" files...
19375 for cf_add_1lib in $LIBS
19376 do
19377         for cf_add_2lib in $cf_add_libs
19378         do
19379                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19380                 then
19381                         cf_add_1lib=
19382                         break
19383                 fi
19384         done
19385         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19386 done
19387 LIBS="$cf_add_libs"
19388
19389         fi
19390
19391 echo "${as_me:-configure}:19391: testing checking for library "$cf_db_libs" ..." 1>&5
19392
19393         cat >conftest.$ac_ext <<_ACEOF
19394 #line 19394 "configure"
19395 #include "confdefs.h"
19396
19397 $ac_includes_default
19398 #include <db.h>
19399
19400 int
19401 main ()
19402 {
19403
19404         char *path = "/tmp/foo";
19405 #ifdef DB_VERSION_MAJOR
19406 #if DB_VERSION_MAJOR >= 4
19407         DB *result = 0;
19408         db_create(&result, NULL, 0);
19409         result->open(result,
19410                 NULL,
19411                 path,
19412                 path,
19413                 DB_HASH,
19414                 DB_CREATE,
19415                 0644);
19416 #elif DB_VERSION_MAJOR >= 3
19417         DB *result = 0;
19418         db_create(&result, NULL, 0);
19419         result->open(result,
19420                 path,
19421                 path,
19422                 DB_HASH,
19423                 DB_CREATE,
19424                 0644);
19425 #elif DB_VERSION_MAJOR >= 2
19426         DB *result = 0;
19427         db_open(path,
19428                 DB_HASH,
19429                 DB_CREATE,
19430                 0644,
19431                 (DB_ENV *) 0,
19432                 (DB_INFO *) 0,
19433                 &result);
19434 #endif /* DB_VERSION_MAJOR */
19435 #else
19436         DB *result = dbopen(path,
19437                      2,
19438                      0644,
19439                      DB_HASH,
19440                      0);
19441 #endif
19442         ${cf_cv_main_return:-return}(result != 0)
19443
19444   ;
19445   return 0;
19446 }
19447 _ACEOF
19448 rm -f conftest.$ac_objext conftest$ac_exeext
19449 if { (eval echo "$as_me:19449: \"$ac_link\"") >&5
19450   (eval $ac_link) 2>&5
19451   ac_status=$?
19452   echo "$as_me:19452: \$? = $ac_status" >&5
19453   (exit $ac_status); } &&
19454          { ac_try='test -s conftest$ac_exeext'
19455   { (eval echo "$as_me:19455: \"$ac_try\"") >&5
19456   (eval $ac_try) 2>&5
19457   ac_status=$?
19458   echo "$as_me:19458: \$? = $ac_status" >&5
19459   (exit $ac_status); }; }; then
19460
19461         if test -n "$cf_db_libs" ; then
19462                 cf_cv_hashed_db_libs=$cf_db_libs
19463         else
19464                 cf_cv_hashed_db_libs=default
19465         fi
19466         LIBS="$cf_save_libs"
19467         break
19468
19469 else
19470   echo "$as_me: failed program was:" >&5
19471 cat conftest.$ac_ext >&5
19472 fi
19473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19474         LIBS="$cf_save_libs"
19475 done
19476
19477 fi
19478 echo "$as_me:19478: result: $cf_cv_hashed_db_libs" >&5
19479 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19480
19481         if test "$cf_cv_hashed_db_libs" = unknown ; then
19482                 { { echo "$as_me:19482: error: Cannot determine library for db" >&5
19483 echo "$as_me: error: Cannot determine library for db" >&2;}
19484    { (exit 1); exit 1; }; }
19485         elif test "$cf_cv_hashed_db_libs" != default ; then
19486
19487 cf_add_libs="-l$cf_cv_hashed_db_libs"
19488 # Filter out duplicates - this happens with badly-designed ".pc" files...
19489 for cf_add_1lib in $LIBS
19490 do
19491         for cf_add_2lib in $cf_add_libs
19492         do
19493                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19494                 then
19495                         cf_add_1lib=
19496                         break
19497                 fi
19498         done
19499         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19500 done
19501 LIBS="$cf_add_libs"
19502
19503         fi
19504 fi
19505
19506 else
19507
19508         { { echo "$as_me:19508: error: Cannot find db.h" >&5
19509 echo "$as_me: error: Cannot find db.h" >&2;}
19510    { (exit 1); exit 1; }; }
19511
19512 fi
19513
19514 fi
19515
19516 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19517         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19518         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19519 fi
19520
19521 # Just in case, check if the C compiler has a bool type.
19522
19523 echo "$as_me:19523: checking if we should include stdbool.h" >&5
19524 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19525
19526 if test "${cf_cv_header_stdbool_h+set}" = set; then
19527   echo $ECHO_N "(cached) $ECHO_C" >&6
19528 else
19529
19530         cat >conftest.$ac_ext <<_ACEOF
19531 #line 19531 "configure"
19532 #include "confdefs.h"
19533
19534 int
19535 main ()
19536 {
19537 bool foo = false
19538   ;
19539   return 0;
19540 }
19541 _ACEOF
19542 rm -f conftest.$ac_objext
19543 if { (eval echo "$as_me:19543: \"$ac_compile\"") >&5
19544   (eval $ac_compile) 2>&5
19545   ac_status=$?
19546   echo "$as_me:19546: \$? = $ac_status" >&5
19547   (exit $ac_status); } &&
19548          { ac_try='test -s conftest.$ac_objext'
19549   { (eval echo "$as_me:19549: \"$ac_try\"") >&5
19550   (eval $ac_try) 2>&5
19551   ac_status=$?
19552   echo "$as_me:19552: \$? = $ac_status" >&5
19553   (exit $ac_status); }; }; then
19554   cf_cv_header_stdbool_h=0
19555 else
19556   echo "$as_me: failed program was:" >&5
19557 cat conftest.$ac_ext >&5
19558 cat >conftest.$ac_ext <<_ACEOF
19559 #line 19559 "configure"
19560 #include "confdefs.h"
19561
19562 #ifndef __BEOS__
19563 #include <stdbool.h>
19564 #endif
19565
19566 int
19567 main ()
19568 {
19569 bool foo = false
19570   ;
19571   return 0;
19572 }
19573 _ACEOF
19574 rm -f conftest.$ac_objext
19575 if { (eval echo "$as_me:19575: \"$ac_compile\"") >&5
19576   (eval $ac_compile) 2>&5
19577   ac_status=$?
19578   echo "$as_me:19578: \$? = $ac_status" >&5
19579   (exit $ac_status); } &&
19580          { ac_try='test -s conftest.$ac_objext'
19581   { (eval echo "$as_me:19581: \"$ac_try\"") >&5
19582   (eval $ac_try) 2>&5
19583   ac_status=$?
19584   echo "$as_me:19584: \$? = $ac_status" >&5
19585   (exit $ac_status); }; }; then
19586   cf_cv_header_stdbool_h=1
19587 else
19588   echo "$as_me: failed program was:" >&5
19589 cat conftest.$ac_ext >&5
19590 cf_cv_header_stdbool_h=0
19591 fi
19592 rm -f conftest.$ac_objext conftest.$ac_ext
19593 fi
19594 rm -f conftest.$ac_objext conftest.$ac_ext
19595 fi
19596
19597 if test "$cf_cv_header_stdbool_h" = 1
19598 then    echo "$as_me:19598: result: yes" >&5
19599 echo "${ECHO_T}yes" >&6
19600 else    echo "$as_me:19600: result: no" >&5
19601 echo "${ECHO_T}no" >&6
19602 fi
19603
19604 echo "$as_me:19604: checking for builtin bool type" >&5
19605 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19606
19607 if test "${cf_cv_cc_bool_type+set}" = set; then
19608   echo $ECHO_N "(cached) $ECHO_C" >&6
19609 else
19610
19611         cat >conftest.$ac_ext <<_ACEOF
19612 #line 19612 "configure"
19613 #include "confdefs.h"
19614
19615 #include <stdio.h>
19616 #include <sys/types.h>
19617
19618 int
19619 main ()
19620 {
19621 bool x = false
19622   ;
19623   return 0;
19624 }
19625 _ACEOF
19626 rm -f conftest.$ac_objext
19627 if { (eval echo "$as_me:19627: \"$ac_compile\"") >&5
19628   (eval $ac_compile) 2>&5
19629   ac_status=$?
19630   echo "$as_me:19630: \$? = $ac_status" >&5
19631   (exit $ac_status); } &&
19632          { ac_try='test -s conftest.$ac_objext'
19633   { (eval echo "$as_me:19633: \"$ac_try\"") >&5
19634   (eval $ac_try) 2>&5
19635   ac_status=$?
19636   echo "$as_me:19636: \$? = $ac_status" >&5
19637   (exit $ac_status); }; }; then
19638   cf_cv_cc_bool_type=1
19639 else
19640   echo "$as_me: failed program was:" >&5
19641 cat conftest.$ac_ext >&5
19642 cf_cv_cc_bool_type=0
19643 fi
19644 rm -f conftest.$ac_objext conftest.$ac_ext
19645
19646 fi
19647
19648 if test "$cf_cv_cc_bool_type" = 1
19649 then    echo "$as_me:19649: result: yes" >&5
19650 echo "${ECHO_T}yes" >&6
19651 else    echo "$as_me:19651: result: no" >&5
19652 echo "${ECHO_T}no" >&6
19653 fi
19654
19655 # Check for C++ compiler characteristics (and ensure that it's there!)
19656 if test -n "$CXX" ; then
19657         ac_ext=cc
19658 ac_cpp='$CXXCPP $CPPFLAGS'
19659 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19660 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19661 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19662 ac_main_return=return
19663
19664 if test -n "$GXX" ; then
19665
19666         cf_save="$LIBS"
19667         LIBS="$LIBS $CXXLIBS"
19668         echo "$as_me:19668: checking if we already have C++ library" >&5
19669 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19670         cat >conftest.$ac_ext <<_ACEOF
19671 #line 19671 "configure"
19672 #include "confdefs.h"
19673
19674                         #include <iostream>
19675 int
19676 main ()
19677 {
19678
19679                         std::cout << "Hello World!" << std::endl;
19680   ;
19681   return 0;
19682 }
19683 _ACEOF
19684 rm -f conftest.$ac_objext conftest$ac_exeext
19685 if { (eval echo "$as_me:19685: \"$ac_link\"") >&5
19686   (eval $ac_link) 2>&5
19687   ac_status=$?
19688   echo "$as_me:19688: \$? = $ac_status" >&5
19689   (exit $ac_status); } &&
19690          { ac_try='test -s conftest$ac_exeext'
19691   { (eval echo "$as_me:19691: \"$ac_try\"") >&5
19692   (eval $ac_try) 2>&5
19693   ac_status=$?
19694   echo "$as_me:19694: \$? = $ac_status" >&5
19695   (exit $ac_status); }; }; then
19696   cf_have_libstdcpp=yes
19697 else
19698   echo "$as_me: failed program was:" >&5
19699 cat conftest.$ac_ext >&5
19700 cf_have_libstdcpp=no
19701 fi
19702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19703         echo "$as_me:19703: result: $cf_have_libstdcpp" >&5
19704 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19705         LIBS="$cf_save"
19706
19707         if test $cf_have_libstdcpp != yes
19708         then
19709                 case $cf_cv_system_name in
19710                 (os2*)
19711                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19712                                 cf_stdcpp_libname=stdcpp
19713                         else
19714                                 cf_stdcpp_libname=stdc++
19715                         fi
19716                         ;;
19717                 (*)
19718                         cf_stdcpp_libname=stdc++
19719                         ;;
19720                 esac
19721
19722                 echo "$as_me:19722: checking for library $cf_stdcpp_libname" >&5
19723 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19724 if test "${cf_cv_libstdcpp+set}" = set; then
19725   echo $ECHO_N "(cached) $ECHO_C" >&6
19726 else
19727
19728                         cf_save="$LIBS"
19729                         LIBS="$LIBS $CXXLIBS"
19730
19731 cf_add_libs="-l$cf_stdcpp_libname"
19732 # Filter out duplicates - this happens with badly-designed ".pc" files...
19733 for cf_add_1lib in $LIBS
19734 do
19735         for cf_add_2lib in $cf_add_libs
19736         do
19737                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19738                 then
19739                         cf_add_1lib=
19740                         break
19741                 fi
19742         done
19743         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19744 done
19745 LIBS="$cf_add_libs"
19746
19747                 cat >conftest.$ac_ext <<_ACEOF
19748 #line 19748 "configure"
19749 #include "confdefs.h"
19750
19751                                 #include <iostream>
19752 int
19753 main ()
19754 {
19755
19756                                 std::cout << "Hello World!" << std::endl;
19757   ;
19758   return 0;
19759 }
19760 _ACEOF
19761 rm -f conftest.$ac_objext conftest$ac_exeext
19762 if { (eval echo "$as_me:19762: \"$ac_link\"") >&5
19763   (eval $ac_link) 2>&5
19764   ac_status=$?
19765   echo "$as_me:19765: \$? = $ac_status" >&5
19766   (exit $ac_status); } &&
19767          { ac_try='test -s conftest$ac_exeext'
19768   { (eval echo "$as_me:19768: \"$ac_try\"") >&5
19769   (eval $ac_try) 2>&5
19770   ac_status=$?
19771   echo "$as_me:19771: \$? = $ac_status" >&5
19772   (exit $ac_status); }; }; then
19773   cf_cv_libstdcpp=yes
19774 else
19775   echo "$as_me: failed program was:" >&5
19776 cat conftest.$ac_ext >&5
19777 cf_cv_libstdcpp=no
19778 fi
19779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19780                         LIBS="$cf_save"
19781
19782 fi
19783 echo "$as_me:19783: result: $cf_cv_libstdcpp" >&5
19784 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19785                 test "$cf_cv_libstdcpp" = yes && {
19786 cf_add_libs="-l$cf_stdcpp_libname"
19787 # Filter out duplicates - this happens with badly-designed ".pc" files...
19788 for cf_add_1lib in $CXXLIBS
19789 do
19790         for cf_add_2lib in $cf_add_libs
19791         do
19792                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19793                 then
19794                         cf_add_1lib=
19795                         break
19796                 fi
19797         done
19798         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19799 done
19800 CXXLIBS="$cf_add_libs"
19801  }
19802         fi
19803 fi
19804
19805         echo "$as_me:19805: checking whether $CXX understands -c and -o together" >&5
19806 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19807 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19808   echo $ECHO_N "(cached) $ECHO_C" >&6
19809 else
19810
19811 cat > conftest.$ac_ext <<CF_EOF
19812 int main()
19813 {
19814         ${cf_cv_main_return:-return}(0);
19815 }
19816 CF_EOF
19817 # We do the test twice because some compilers refuse to overwrite an
19818 # existing .o file with -o, though they will create one.
19819 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19820 if { (eval echo "$as_me:19820: \"$ac_try\"") >&5
19821   (eval $ac_try) 2>&5
19822   ac_status=$?
19823   echo "$as_me:19823: \$? = $ac_status" >&5
19824   (exit $ac_status); } &&
19825   test -f conftest2.$ac_objext && { (eval echo "$as_me:19825: \"$ac_try\"") >&5
19826   (eval $ac_try) 2>&5
19827   ac_status=$?
19828   echo "$as_me:19828: \$? = $ac_status" >&5
19829   (exit $ac_status); };
19830 then
19831   eval cf_cv_prog_CXX_c_o=yes
19832 else
19833   eval cf_cv_prog_CXX_c_o=no
19834 fi
19835 rm -rf conftest*
19836
19837 fi
19838 if test $cf_cv_prog_CXX_c_o = yes; then
19839   echo "$as_me:19839: result: yes" >&5
19840 echo "${ECHO_T}yes" >&6
19841 else
19842   echo "$as_me:19842: result: no" >&5
19843 echo "${ECHO_T}no" >&6
19844 fi
19845
19846         case $GXX_VERSION in
19847         (1*|2.0-6*)
19848                 cf_cxx_library=yes
19849                 ;;
19850         (*-2.7*|2.7*)
19851
19852 cf_cxx_library=unknown
19853 case $cf_cv_system_name in
19854 (os2*)
19855         cf_gpp_libname=gpp
19856         ;;
19857 (*)
19858         cf_gpp_libname=g++
19859         ;;
19860 esac
19861 if test "$GXX" = yes; then
19862         echo "$as_me:19862: checking for lib$cf_gpp_libname" >&5
19863 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19864         cf_save="$LIBS"
19865
19866 cf_add_libs="-l$cf_gpp_libname"
19867 # Filter out duplicates - this happens with badly-designed ".pc" files...
19868 for cf_add_1lib in $LIBS
19869 do
19870         for cf_add_2lib in $cf_add_libs
19871         do
19872                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19873                 then
19874                         cf_add_1lib=
19875                         break
19876                 fi
19877         done
19878         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19879 done
19880 LIBS="$cf_add_libs"
19881
19882         cat >conftest.$ac_ext <<_ACEOF
19883 #line 19883 "configure"
19884 #include "confdefs.h"
19885
19886 #include <$cf_gpp_libname/builtin.h>
19887
19888 int
19889 main ()
19890 {
19891 two_arg_error_handler_t foo2 = lib_error_handler
19892   ;
19893   return 0;
19894 }
19895 _ACEOF
19896 rm -f conftest.$ac_objext conftest$ac_exeext
19897 if { (eval echo "$as_me:19897: \"$ac_link\"") >&5
19898   (eval $ac_link) 2>&5
19899   ac_status=$?
19900   echo "$as_me:19900: \$? = $ac_status" >&5
19901   (exit $ac_status); } &&
19902          { ac_try='test -s conftest$ac_exeext'
19903   { (eval echo "$as_me:19903: \"$ac_try\"") >&5
19904   (eval $ac_try) 2>&5
19905   ac_status=$?
19906   echo "$as_me:19906: \$? = $ac_status" >&5
19907   (exit $ac_status); }; }; then
19908   cf_cxx_library=yes
19909
19910 cf_add_libs="-l$cf_gpp_libname"
19911 # Filter out duplicates - this happens with badly-designed ".pc" files...
19912 for cf_add_1lib in $CXXLIBS
19913 do
19914         for cf_add_2lib in $cf_add_libs
19915         do
19916                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19917                 then
19918                         cf_add_1lib=
19919                         break
19920                 fi
19921         done
19922         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19923 done
19924 CXXLIBS="$cf_add_libs"
19925
19926          if test "$cf_gpp_libname" = cpp ; then
19927
19928 cat >>confdefs.h <<\EOF
19929 #define HAVE_GPP_BUILTIN_H 1
19930 EOF
19931
19932          else
19933
19934 cat >>confdefs.h <<\EOF
19935 #define HAVE_GXX_BUILTIN_H 1
19936 EOF
19937
19938          fi
19939 else
19940   echo "$as_me: failed program was:" >&5
19941 cat conftest.$ac_ext >&5
19942 cat >conftest.$ac_ext <<_ACEOF
19943 #line 19943 "configure"
19944 #include "confdefs.h"
19945
19946 #include <builtin.h>
19947
19948 int
19949 main ()
19950 {
19951 two_arg_error_handler_t foo2 = lib_error_handler
19952   ;
19953   return 0;
19954 }
19955 _ACEOF
19956 rm -f conftest.$ac_objext conftest$ac_exeext
19957 if { (eval echo "$as_me:19957: \"$ac_link\"") >&5
19958   (eval $ac_link) 2>&5
19959   ac_status=$?
19960   echo "$as_me:19960: \$? = $ac_status" >&5
19961   (exit $ac_status); } &&
19962          { ac_try='test -s conftest$ac_exeext'
19963   { (eval echo "$as_me:19963: \"$ac_try\"") >&5
19964   (eval $ac_try) 2>&5
19965   ac_status=$?
19966   echo "$as_me:19966: \$? = $ac_status" >&5
19967   (exit $ac_status); }; }; then
19968   cf_cxx_library=yes
19969
19970 cf_add_libs="-l$cf_gpp_libname"
19971 # Filter out duplicates - this happens with badly-designed ".pc" files...
19972 for cf_add_1lib in $CXXLIBS
19973 do
19974         for cf_add_2lib in $cf_add_libs
19975         do
19976                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19977                 then
19978                         cf_add_1lib=
19979                         break
19980                 fi
19981         done
19982         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19983 done
19984 CXXLIBS="$cf_add_libs"
19985
19986 cat >>confdefs.h <<\EOF
19987 #define HAVE_BUILTIN_H 1
19988 EOF
19989
19990 else
19991   echo "$as_me: failed program was:" >&5
19992 cat conftest.$ac_ext >&5
19993 cf_cxx_library=no
19994 fi
19995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19996 fi
19997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19998         LIBS="$cf_save"
19999         echo "$as_me:19999: result: $cf_cxx_library" >&5
20000 echo "${ECHO_T}$cf_cxx_library" >&6
20001 fi
20002
20003                 ;;
20004         (*)
20005                 cf_cxx_library=no
20006                 ;;
20007         esac
20008
20009         ac_ext=cc
20010 ac_cpp='$CXXCPP $CPPFLAGS'
20011 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20012 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20013 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20014 ac_main_return=return
20015 echo "$as_me:20015: checking how to run the C++ preprocessor" >&5
20016 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20017 if test -z "$CXXCPP"; then
20018   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20019   echo $ECHO_N "(cached) $ECHO_C" >&6
20020 else
20021       # Double quotes because CXXCPP needs to be expanded
20022     for CXXCPP in "$CXX -E" "/lib/cpp"
20023     do
20024       ac_preproc_ok=false
20025 for ac_cxx_preproc_warn_flag in '' yes
20026 do
20027   # Use a header file that comes with gcc, so configuring glibc
20028   # with a fresh cross-compiler works.
20029   # On the NeXT, cc -E runs the code through the compiler's parser,
20030   # not just through cpp. "Syntax error" is here to catch this case.
20031   cat >conftest.$ac_ext <<_ACEOF
20032 #line 20032 "configure"
20033 #include "confdefs.h"
20034 #include <assert.h>
20035                      Syntax error
20036 _ACEOF
20037 if { (eval echo "$as_me:20037: \"$ac_cpp conftest.$ac_ext\"") >&5
20038   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20039   ac_status=$?
20040   egrep -v '^ *\+' conftest.er1 >conftest.err
20041   rm -f conftest.er1
20042   cat conftest.err >&5
20043   echo "$as_me:20043: \$? = $ac_status" >&5
20044   (exit $ac_status); } >/dev/null; then
20045   if test -s conftest.err; then
20046     ac_cpp_err=$ac_cxx_preproc_warn_flag
20047   else
20048     ac_cpp_err=
20049   fi
20050 else
20051   ac_cpp_err=yes
20052 fi
20053 if test -z "$ac_cpp_err"; then
20054   :
20055 else
20056   echo "$as_me: failed program was:" >&5
20057   cat conftest.$ac_ext >&5
20058   # Broken: fails on valid input.
20059 continue
20060 fi
20061 rm -f conftest.err conftest.$ac_ext
20062
20063   # OK, works on sane cases.  Now check whether non-existent headers
20064   # can be detected and how.
20065   cat >conftest.$ac_ext <<_ACEOF
20066 #line 20066 "configure"
20067 #include "confdefs.h"
20068 #include <ac_nonexistent.h>
20069 _ACEOF
20070 if { (eval echo "$as_me:20070: \"$ac_cpp conftest.$ac_ext\"") >&5
20071   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20072   ac_status=$?
20073   egrep -v '^ *\+' conftest.er1 >conftest.err
20074   rm -f conftest.er1
20075   cat conftest.err >&5
20076   echo "$as_me:20076: \$? = $ac_status" >&5
20077   (exit $ac_status); } >/dev/null; then
20078   if test -s conftest.err; then
20079     ac_cpp_err=$ac_cxx_preproc_warn_flag
20080   else
20081     ac_cpp_err=
20082   fi
20083 else
20084   ac_cpp_err=yes
20085 fi
20086 if test -z "$ac_cpp_err"; then
20087   # Broken: success on invalid input.
20088 continue
20089 else
20090   echo "$as_me: failed program was:" >&5
20091   cat conftest.$ac_ext >&5
20092   # Passes both tests.
20093 ac_preproc_ok=:
20094 break
20095 fi
20096 rm -f conftest.err conftest.$ac_ext
20097
20098 done
20099 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20100 rm -f conftest.err conftest.$ac_ext
20101 if $ac_preproc_ok; then
20102   break
20103 fi
20104
20105     done
20106     ac_cv_prog_CXXCPP=$CXXCPP
20107
20108 fi
20109   CXXCPP=$ac_cv_prog_CXXCPP
20110 else
20111   ac_cv_prog_CXXCPP=$CXXCPP
20112 fi
20113 echo "$as_me:20113: result: $CXXCPP" >&5
20114 echo "${ECHO_T}$CXXCPP" >&6
20115 ac_preproc_ok=false
20116 for ac_cxx_preproc_warn_flag in '' yes
20117 do
20118   # Use a header file that comes with gcc, so configuring glibc
20119   # with a fresh cross-compiler works.
20120   # On the NeXT, cc -E runs the code through the compiler's parser,
20121   # not just through cpp. "Syntax error" is here to catch this case.
20122   cat >conftest.$ac_ext <<_ACEOF
20123 #line 20123 "configure"
20124 #include "confdefs.h"
20125 #include <assert.h>
20126                      Syntax error
20127 _ACEOF
20128 if { (eval echo "$as_me:20128: \"$ac_cpp conftest.$ac_ext\"") >&5
20129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20130   ac_status=$?
20131   egrep -v '^ *\+' conftest.er1 >conftest.err
20132   rm -f conftest.er1
20133   cat conftest.err >&5
20134   echo "$as_me:20134: \$? = $ac_status" >&5
20135   (exit $ac_status); } >/dev/null; then
20136   if test -s conftest.err; then
20137     ac_cpp_err=$ac_cxx_preproc_warn_flag
20138   else
20139     ac_cpp_err=
20140   fi
20141 else
20142   ac_cpp_err=yes
20143 fi
20144 if test -z "$ac_cpp_err"; then
20145   :
20146 else
20147   echo "$as_me: failed program was:" >&5
20148   cat conftest.$ac_ext >&5
20149   # Broken: fails on valid input.
20150 continue
20151 fi
20152 rm -f conftest.err conftest.$ac_ext
20153
20154   # OK, works on sane cases.  Now check whether non-existent headers
20155   # can be detected and how.
20156   cat >conftest.$ac_ext <<_ACEOF
20157 #line 20157 "configure"
20158 #include "confdefs.h"
20159 #include <ac_nonexistent.h>
20160 _ACEOF
20161 if { (eval echo "$as_me:20161: \"$ac_cpp conftest.$ac_ext\"") >&5
20162   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20163   ac_status=$?
20164   egrep -v '^ *\+' conftest.er1 >conftest.err
20165   rm -f conftest.er1
20166   cat conftest.err >&5
20167   echo "$as_me:20167: \$? = $ac_status" >&5
20168   (exit $ac_status); } >/dev/null; then
20169   if test -s conftest.err; then
20170     ac_cpp_err=$ac_cxx_preproc_warn_flag
20171   else
20172     ac_cpp_err=
20173   fi
20174 else
20175   ac_cpp_err=yes
20176 fi
20177 if test -z "$ac_cpp_err"; then
20178   # Broken: success on invalid input.
20179 continue
20180 else
20181   echo "$as_me: failed program was:" >&5
20182   cat conftest.$ac_ext >&5
20183   # Passes both tests.
20184 ac_preproc_ok=:
20185 break
20186 fi
20187 rm -f conftest.err conftest.$ac_ext
20188
20189 done
20190 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20191 rm -f conftest.err conftest.$ac_ext
20192 if $ac_preproc_ok; then
20193   :
20194 else
20195   { { echo "$as_me:20195: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20196 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20197    { (exit 1); exit 1; }; }
20198 fi
20199
20200 ac_ext=cc
20201 ac_cpp='$CXXCPP $CPPFLAGS'
20202 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20203 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20204 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20205 ac_main_return=return
20206
20207 for ac_header in typeinfo
20208 do
20209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20210 echo "$as_me:20210: checking for $ac_header" >&5
20211 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20213   echo $ECHO_N "(cached) $ECHO_C" >&6
20214 else
20215   cat >conftest.$ac_ext <<_ACEOF
20216 #line 20216 "configure"
20217 #include "confdefs.h"
20218 #include <$ac_header>
20219 _ACEOF
20220 if { (eval echo "$as_me:20220: \"$ac_cpp conftest.$ac_ext\"") >&5
20221   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20222   ac_status=$?
20223   egrep -v '^ *\+' conftest.er1 >conftest.err
20224   rm -f conftest.er1
20225   cat conftest.err >&5
20226   echo "$as_me:20226: \$? = $ac_status" >&5
20227   (exit $ac_status); } >/dev/null; then
20228   if test -s conftest.err; then
20229     ac_cpp_err=$ac_cxx_preproc_warn_flag
20230   else
20231     ac_cpp_err=
20232   fi
20233 else
20234   ac_cpp_err=yes
20235 fi
20236 if test -z "$ac_cpp_err"; then
20237   eval "$as_ac_Header=yes"
20238 else
20239   echo "$as_me: failed program was:" >&5
20240   cat conftest.$ac_ext >&5
20241   eval "$as_ac_Header=no"
20242 fi
20243 rm -f conftest.err conftest.$ac_ext
20244 fi
20245 echo "$as_me:20245: result: `eval echo '${'$as_ac_Header'}'`" >&5
20246 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20247 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20248   cat >>confdefs.h <<EOF
20249 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20250 EOF
20251
20252 fi
20253 done
20254
20255 for ac_header in iostream
20256 do
20257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20258 echo "$as_me:20258: checking for $ac_header" >&5
20259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20261   echo $ECHO_N "(cached) $ECHO_C" >&6
20262 else
20263   cat >conftest.$ac_ext <<_ACEOF
20264 #line 20264 "configure"
20265 #include "confdefs.h"
20266 #include <$ac_header>
20267 _ACEOF
20268 if { (eval echo "$as_me:20268: \"$ac_cpp conftest.$ac_ext\"") >&5
20269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20270   ac_status=$?
20271   egrep -v '^ *\+' conftest.er1 >conftest.err
20272   rm -f conftest.er1
20273   cat conftest.err >&5
20274   echo "$as_me:20274: \$? = $ac_status" >&5
20275   (exit $ac_status); } >/dev/null; then
20276   if test -s conftest.err; then
20277     ac_cpp_err=$ac_cxx_preproc_warn_flag
20278   else
20279     ac_cpp_err=
20280   fi
20281 else
20282   ac_cpp_err=yes
20283 fi
20284 if test -z "$ac_cpp_err"; then
20285   eval "$as_ac_Header=yes"
20286 else
20287   echo "$as_me: failed program was:" >&5
20288   cat conftest.$ac_ext >&5
20289   eval "$as_ac_Header=no"
20290 fi
20291 rm -f conftest.err conftest.$ac_ext
20292 fi
20293 echo "$as_me:20293: result: `eval echo '${'$as_ac_Header'}'`" >&5
20294 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20295 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20296   cat >>confdefs.h <<EOF
20297 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20298 EOF
20299
20300 fi
20301 done
20302
20303 if test x"$ac_cv_header_iostream" = xyes ; then
20304         echo "$as_me:20304: checking if iostream uses std-namespace" >&5
20305 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20306         cat >conftest.$ac_ext <<_ACEOF
20307 #line 20307 "configure"
20308 #include "confdefs.h"
20309
20310 #include <iostream>
20311 using std::endl;
20312 using std::cerr;
20313 int
20314 main ()
20315 {
20316
20317 cerr << "testing" << endl;
20318
20319   ;
20320   return 0;
20321 }
20322 _ACEOF
20323 rm -f conftest.$ac_objext
20324 if { (eval echo "$as_me:20324: \"$ac_compile\"") >&5
20325   (eval $ac_compile) 2>&5
20326   ac_status=$?
20327   echo "$as_me:20327: \$? = $ac_status" >&5
20328   (exit $ac_status); } &&
20329          { ac_try='test -s conftest.$ac_objext'
20330   { (eval echo "$as_me:20330: \"$ac_try\"") >&5
20331   (eval $ac_try) 2>&5
20332   ac_status=$?
20333   echo "$as_me:20333: \$? = $ac_status" >&5
20334   (exit $ac_status); }; }; then
20335   cf_iostream_namespace=yes
20336 else
20337   echo "$as_me: failed program was:" >&5
20338 cat conftest.$ac_ext >&5
20339 cf_iostream_namespace=no
20340 fi
20341 rm -f conftest.$ac_objext conftest.$ac_ext
20342         echo "$as_me:20342: result: $cf_iostream_namespace" >&5
20343 echo "${ECHO_T}$cf_iostream_namespace" >&6
20344         if test "$cf_iostream_namespace" = yes ; then
20345
20346 cat >>confdefs.h <<\EOF
20347 #define IOSTREAM_NAMESPACE 1
20348 EOF
20349
20350         fi
20351 fi
20352
20353 echo "$as_me:20353: checking if we should include stdbool.h" >&5
20354 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20355
20356 if test "${cf_cv_header_stdbool_h+set}" = set; then
20357   echo $ECHO_N "(cached) $ECHO_C" >&6
20358 else
20359
20360         cat >conftest.$ac_ext <<_ACEOF
20361 #line 20361 "configure"
20362 #include "confdefs.h"
20363
20364 int
20365 main ()
20366 {
20367 bool foo = false
20368   ;
20369   return 0;
20370 }
20371 _ACEOF
20372 rm -f conftest.$ac_objext
20373 if { (eval echo "$as_me:20373: \"$ac_compile\"") >&5
20374   (eval $ac_compile) 2>&5
20375   ac_status=$?
20376   echo "$as_me:20376: \$? = $ac_status" >&5
20377   (exit $ac_status); } &&
20378          { ac_try='test -s conftest.$ac_objext'
20379   { (eval echo "$as_me:20379: \"$ac_try\"") >&5
20380   (eval $ac_try) 2>&5
20381   ac_status=$?
20382   echo "$as_me:20382: \$? = $ac_status" >&5
20383   (exit $ac_status); }; }; then
20384   cf_cv_header_stdbool_h=0
20385 else
20386   echo "$as_me: failed program was:" >&5
20387 cat conftest.$ac_ext >&5
20388 cat >conftest.$ac_ext <<_ACEOF
20389 #line 20389 "configure"
20390 #include "confdefs.h"
20391
20392 #ifndef __BEOS__
20393 #include <stdbool.h>
20394 #endif
20395
20396 int
20397 main ()
20398 {
20399 bool foo = false
20400   ;
20401   return 0;
20402 }
20403 _ACEOF
20404 rm -f conftest.$ac_objext
20405 if { (eval echo "$as_me:20405: \"$ac_compile\"") >&5
20406   (eval $ac_compile) 2>&5
20407   ac_status=$?
20408   echo "$as_me:20408: \$? = $ac_status" >&5
20409   (exit $ac_status); } &&
20410          { ac_try='test -s conftest.$ac_objext'
20411   { (eval echo "$as_me:20411: \"$ac_try\"") >&5
20412   (eval $ac_try) 2>&5
20413   ac_status=$?
20414   echo "$as_me:20414: \$? = $ac_status" >&5
20415   (exit $ac_status); }; }; then
20416   cf_cv_header_stdbool_h=1
20417 else
20418   echo "$as_me: failed program was:" >&5
20419 cat conftest.$ac_ext >&5
20420 cf_cv_header_stdbool_h=0
20421 fi
20422 rm -f conftest.$ac_objext conftest.$ac_ext
20423 fi
20424 rm -f conftest.$ac_objext conftest.$ac_ext
20425 fi
20426
20427 if test "$cf_cv_header_stdbool_h" = 1
20428 then    echo "$as_me:20428: result: yes" >&5
20429 echo "${ECHO_T}yes" >&6
20430 else    echo "$as_me:20430: result: no" >&5
20431 echo "${ECHO_T}no" >&6
20432 fi
20433
20434 echo "$as_me:20434: checking for builtin bool type" >&5
20435 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20436
20437 if test "${cf_cv_builtin_bool+set}" = set; then
20438   echo $ECHO_N "(cached) $ECHO_C" >&6
20439 else
20440
20441         cat >conftest.$ac_ext <<_ACEOF
20442 #line 20442 "configure"
20443 #include "confdefs.h"
20444
20445 #include <stdio.h>
20446 #include <sys/types.h>
20447
20448 int
20449 main ()
20450 {
20451 bool x = false
20452   ;
20453   return 0;
20454 }
20455 _ACEOF
20456 rm -f conftest.$ac_objext
20457 if { (eval echo "$as_me:20457: \"$ac_compile\"") >&5
20458   (eval $ac_compile) 2>&5
20459   ac_status=$?
20460   echo "$as_me:20460: \$? = $ac_status" >&5
20461   (exit $ac_status); } &&
20462          { ac_try='test -s conftest.$ac_objext'
20463   { (eval echo "$as_me:20463: \"$ac_try\"") >&5
20464   (eval $ac_try) 2>&5
20465   ac_status=$?
20466   echo "$as_me:20466: \$? = $ac_status" >&5
20467   (exit $ac_status); }; }; then
20468   cf_cv_builtin_bool=1
20469 else
20470   echo "$as_me: failed program was:" >&5
20471 cat conftest.$ac_ext >&5
20472 cf_cv_builtin_bool=0
20473 fi
20474 rm -f conftest.$ac_objext conftest.$ac_ext
20475
20476 fi
20477
20478 if test "$cf_cv_builtin_bool" = 1
20479 then    echo "$as_me:20479: result: yes" >&5
20480 echo "${ECHO_T}yes" >&6
20481 else    echo "$as_me:20481: result: no" >&5
20482 echo "${ECHO_T}no" >&6
20483 fi
20484
20485 echo "$as_me:20485: checking for size of bool" >&5
20486 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20487 if test "${cf_cv_type_of_bool+set}" = set; then
20488   echo $ECHO_N "(cached) $ECHO_C" >&6
20489 else
20490
20491         rm -f cf_test.out
20492         if test "$cross_compiling" = yes; then
20493   cf_cv_type_of_bool=unknown
20494 else
20495   cat >conftest.$ac_ext <<_ACEOF
20496 #line 20496 "configure"
20497 #include "confdefs.h"
20498
20499 #include <stdlib.h>
20500 #include <stdio.h>
20501
20502 #if defined(__cplusplus)
20503
20504 #ifdef HAVE_GXX_BUILTIN_H
20505 #include <g++/builtin.h>
20506 #elif HAVE_GPP_BUILTIN_H
20507 #include <gpp/builtin.h>
20508 #elif HAVE_BUILTIN_H
20509 #include <builtin.h>
20510 #endif
20511
20512 #else
20513
20514 #if $cf_cv_header_stdbool_h
20515 #include <stdbool.h>
20516 #endif
20517
20518 #endif
20519
20520 int main()
20521 {
20522         FILE *fp = fopen("cf_test.out", "w");
20523         if (fp != 0) {
20524                 bool x = true;
20525                 if ((bool)(-x) >= 0)
20526                         fputs("unsigned ", fp);
20527                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20528                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20529                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20530                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20531                 fclose(fp);
20532         }
20533         ${cf_cv_main_return:-return}(0);
20534 }
20535
20536 _ACEOF
20537 rm -f conftest$ac_exeext
20538 if { (eval echo "$as_me:20538: \"$ac_link\"") >&5
20539   (eval $ac_link) 2>&5
20540   ac_status=$?
20541   echo "$as_me:20541: \$? = $ac_status" >&5
20542   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20543   { (eval echo "$as_me:20543: \"$ac_try\"") >&5
20544   (eval $ac_try) 2>&5
20545   ac_status=$?
20546   echo "$as_me:20546: \$? = $ac_status" >&5
20547   (exit $ac_status); }; }; then
20548   cf_cv_type_of_bool=`cat cf_test.out`
20549                  if test -z "$cf_cv_type_of_bool"; then
20550                    cf_cv_type_of_bool=unknown
20551                  fi
20552 else
20553   echo "$as_me: program exited with status $ac_status" >&5
20554 echo "$as_me: failed program was:" >&5
20555 cat conftest.$ac_ext >&5
20556 cf_cv_type_of_bool=unknown
20557 fi
20558 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20559 fi
20560
20561 fi
20562
20563         rm -f cf_test.out
20564 echo "$as_me:20564: result: $cf_cv_type_of_bool" >&5
20565 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20566 if test "$cf_cv_type_of_bool" = unknown ; then
20567         case .$NCURSES_BOOL in
20568         (.auto|.) NCURSES_BOOL=unsigned;;
20569         esac
20570         { echo "$as_me:20570: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20571 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20572         cf_cv_type_of_bool=$NCURSES_BOOL
20573 fi
20574
20575 echo "$as_me:20575: checking for special defines needed for etip.h" >&5
20576 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20577 cf_save_CXXFLAGS="$CXXFLAGS"
20578 cf_result="none"
20579
20580 # etip.h includes ncurses.h which includes ncurses_dll.h
20581 # But ncurses_dll.h is generated - fix here.
20582 test -d include || mkdir include
20583 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
20584
20585 for cf_math in "" MATH_H
20586 do
20587 for cf_excp in "" MATH_EXCEPTION
20588 do
20589         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20590         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20591         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20592 cat >conftest.$ac_ext <<_ACEOF
20593 #line 20593 "configure"
20594 #include "confdefs.h"
20595
20596 #include <etip.h.in>
20597
20598 int
20599 main ()
20600 {
20601
20602   ;
20603   return 0;
20604 }
20605 _ACEOF
20606 rm -f conftest.$ac_objext
20607 if { (eval echo "$as_me:20607: \"$ac_compile\"") >&5
20608   (eval $ac_compile) 2>&5
20609   ac_status=$?
20610   echo "$as_me:20610: \$? = $ac_status" >&5
20611   (exit $ac_status); } &&
20612          { ac_try='test -s conftest.$ac_objext'
20613   { (eval echo "$as_me:20613: \"$ac_try\"") >&5
20614   (eval $ac_try) 2>&5
20615   ac_status=$?
20616   echo "$as_me:20616: \$? = $ac_status" >&5
20617   (exit $ac_status); }; }; then
20618
20619         test -n "$cf_math" && cat >>confdefs.h <<EOF
20620 #define ETIP_NEEDS_${cf_math} 1
20621 EOF
20622
20623         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20624 #define ETIP_NEEDS_${cf_excp} 1
20625 EOF
20626
20627         cf_result="$cf_math $cf_excp"
20628         break 2
20629
20630 else
20631   echo "$as_me: failed program was:" >&5
20632 cat conftest.$ac_ext >&5
20633 fi
20634 rm -f conftest.$ac_objext conftest.$ac_ext
20635 done
20636 done
20637 echo "$as_me:20637: result: $cf_result" >&5
20638 echo "${ECHO_T}$cf_result" >&6
20639 CXXFLAGS="$cf_save_CXXFLAGS"
20640
20641 if test -n "$CXX"; then
20642 echo "$as_me:20642: checking if $CXX accepts parameter initialization" >&5
20643 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20644 if test "${cf_cv_cpp_param_init+set}" = set; then
20645   echo $ECHO_N "(cached) $ECHO_C" >&6
20646 else
20647
20648         ac_ext=cc
20649 ac_cpp='$CXXCPP $CPPFLAGS'
20650 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20651 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20652 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20653 ac_main_return=return
20654
20655         if test "$cross_compiling" = yes; then
20656   cf_cv_cpp_param_init=unknown
20657 else
20658   cat >conftest.$ac_ext <<_ACEOF
20659 #line 20659 "configure"
20660 #include "confdefs.h"
20661
20662 class TEST {
20663 private:
20664         int value;
20665 public:
20666         TEST(int x = 1);
20667         ~TEST();
20668 };
20669
20670 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20671 {
20672         value = x;
20673 }
20674 int main() { }
20675
20676 _ACEOF
20677 rm -f conftest$ac_exeext
20678 if { (eval echo "$as_me:20678: \"$ac_link\"") >&5
20679   (eval $ac_link) 2>&5
20680   ac_status=$?
20681   echo "$as_me:20681: \$? = $ac_status" >&5
20682   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20683   { (eval echo "$as_me:20683: \"$ac_try\"") >&5
20684   (eval $ac_try) 2>&5
20685   ac_status=$?
20686   echo "$as_me:20686: \$? = $ac_status" >&5
20687   (exit $ac_status); }; }; then
20688   cf_cv_cpp_param_init=yes
20689 else
20690   echo "$as_me: program exited with status $ac_status" >&5
20691 echo "$as_me: failed program was:" >&5
20692 cat conftest.$ac_ext >&5
20693 cf_cv_cpp_param_init=no
20694 fi
20695 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20696 fi
20697         ac_ext=cc
20698 ac_cpp='$CXXCPP $CPPFLAGS'
20699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20700 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20702 ac_main_return=return
20703
20704 fi
20705 echo "$as_me:20705: result: $cf_cv_cpp_param_init" >&5
20706 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20707 fi
20708 test "$cf_cv_cpp_param_init" = yes &&
20709 cat >>confdefs.h <<\EOF
20710 #define CPP_HAS_PARAM_INIT 1
20711 EOF
20712
20713 if test -n "$CXX"; then
20714
20715 echo "$as_me:20715: checking if $CXX accepts static_cast" >&5
20716 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20717 if test "${cf_cv_cpp_static_cast+set}" = set; then
20718   echo $ECHO_N "(cached) $ECHO_C" >&6
20719 else
20720
20721         ac_ext=cc
20722 ac_cpp='$CXXCPP $CPPFLAGS'
20723 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20724 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20725 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20726 ac_main_return=return
20727
20728         cat >conftest.$ac_ext <<_ACEOF
20729 #line 20729 "configure"
20730 #include "confdefs.h"
20731
20732 class NCursesPanel
20733 {
20734 public:
20735   NCursesPanel(int nlines,
20736                int ncols,
20737                int begin_y = 0,
20738                int begin_x = 0)
20739   {
20740   }
20741   NCursesPanel();
20742   ~NCursesPanel();
20743 };
20744
20745 template<class T> class NCursesUserPanel : public NCursesPanel
20746 {
20747 public:
20748   NCursesUserPanel (int nlines,
20749                     int ncols,
20750                     int begin_y = 0,
20751                     int begin_x = 0,
20752                     const T* p_UserData = static_cast<T*>(0))
20753     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20754   {
20755   };
20756   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20757   {
20758   };
20759
20760   virtual ~NCursesUserPanel() {};
20761 };
20762
20763 int
20764 main ()
20765 {
20766
20767         const char* p_UserData = static_cast<char*>(0)
20768   ;
20769   return 0;
20770 }
20771 _ACEOF
20772 rm -f conftest.$ac_objext
20773 if { (eval echo "$as_me:20773: \"$ac_compile\"") >&5
20774   (eval $ac_compile) 2>&5
20775   ac_status=$?
20776   echo "$as_me:20776: \$? = $ac_status" >&5
20777   (exit $ac_status); } &&
20778          { ac_try='test -s conftest.$ac_objext'
20779   { (eval echo "$as_me:20779: \"$ac_try\"") >&5
20780   (eval $ac_try) 2>&5
20781   ac_status=$?
20782   echo "$as_me:20782: \$? = $ac_status" >&5
20783   (exit $ac_status); }; }; then
20784   cf_cv_cpp_static_cast=yes
20785 else
20786   echo "$as_me: failed program was:" >&5
20787 cat conftest.$ac_ext >&5
20788 cf_cv_cpp_static_cast=no
20789 fi
20790 rm -f conftest.$ac_objext conftest.$ac_ext
20791
20792         ac_ext=cc
20793 ac_cpp='$CXXCPP $CPPFLAGS'
20794 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20795 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20796 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20797 ac_main_return=return
20798
20799 fi
20800 echo "$as_me:20800: result: $cf_cv_cpp_static_cast" >&5
20801 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20802
20803 fi
20804
20805 test "$cf_cv_cpp_static_cast" = yes &&
20806 cat >>confdefs.h <<\EOF
20807 #define CPP_HAS_STATIC_CAST 1
20808 EOF
20809
20810         CXX_AR='$(AR)'
20811         CXX_ARFLAGS='$(ARFLAGS)'
20812         case $cf_cv_system_name in
20813         (irix*)
20814             if test "$GXX" != yes ; then
20815                 CXX_AR='$(CXX)'
20816                 CXX_ARFLAGS='-ar -o'
20817             fi
20818             ;;
20819         (sco3.2v5*)
20820             CXXLDFLAGS="-u main"
20821             ;;
20822         (solaris2*)
20823             if test "$GXX" != yes ; then
20824                 CXX_AR='$(CXX)'
20825                 CXX_ARFLAGS='-xar -o'
20826             fi
20827             ;;
20828         esac
20829
20830 else
20831         cf_cxx_library=no
20832         cf_cv_builtin_bool=1
20833
20834         # Just because we are not configuring against C++ right now does not
20835         # mean that a user will not want to use C++.  Some distributors disable
20836         # the C++ portion of this configuration as a shortcut (or just to avoid
20837         # compiling the demo in the c++ directory).  So we need a reasonable
20838         # default for the 'bool' type.
20839         #
20840         # Caveat: since the storage of the bool type is not standardized, it
20841         # may change.
20842
20843         if test "$NCURSES_BOOL" != auto ; then
20844                 cf_cv_type_of_bool=$NCURSES_BOOL
20845                 cf_cv_header_stdbool_h=0
20846         else
20847                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20848
20849 echo "$as_me:20849: checking for size of bool" >&5
20850 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20851 if test "${cf_cv_type_of_bool+set}" = set; then
20852   echo $ECHO_N "(cached) $ECHO_C" >&6
20853 else
20854
20855         rm -f cf_test.out
20856         if test "$cross_compiling" = yes; then
20857   cf_cv_type_of_bool=unknown
20858 else
20859   cat >conftest.$ac_ext <<_ACEOF
20860 #line 20860 "configure"
20861 #include "confdefs.h"
20862
20863 #include <stdlib.h>
20864 #include <stdio.h>
20865
20866 #if defined(__cplusplus)
20867
20868 #ifdef HAVE_GXX_BUILTIN_H
20869 #include <g++/builtin.h>
20870 #elif HAVE_GPP_BUILTIN_H
20871 #include <gpp/builtin.h>
20872 #elif HAVE_BUILTIN_H
20873 #include <builtin.h>
20874 #endif
20875
20876 #else
20877
20878 #if $cf_cv_header_stdbool_h
20879 #include <stdbool.h>
20880 #endif
20881
20882 #endif
20883
20884 int main()
20885 {
20886         FILE *fp = fopen("cf_test.out", "w");
20887         if (fp != 0) {
20888                 bool x = true;
20889                 if ((bool)(-x) >= 0)
20890                         fputs("unsigned ", fp);
20891                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20892                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20893                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20894                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20895                 fclose(fp);
20896         }
20897         ${cf_cv_main_return:-return}(0);
20898 }
20899
20900 _ACEOF
20901 rm -f conftest$ac_exeext
20902 if { (eval echo "$as_me:20902: \"$ac_link\"") >&5
20903   (eval $ac_link) 2>&5
20904   ac_status=$?
20905   echo "$as_me:20905: \$? = $ac_status" >&5
20906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20907   { (eval echo "$as_me:20907: \"$ac_try\"") >&5
20908   (eval $ac_try) 2>&5
20909   ac_status=$?
20910   echo "$as_me:20910: \$? = $ac_status" >&5
20911   (exit $ac_status); }; }; then
20912   cf_cv_type_of_bool=`cat cf_test.out`
20913                  if test -z "$cf_cv_type_of_bool"; then
20914                    cf_cv_type_of_bool=unknown
20915                  fi
20916 else
20917   echo "$as_me: program exited with status $ac_status" >&5
20918 echo "$as_me: failed program was:" >&5
20919 cat conftest.$ac_ext >&5
20920 cf_cv_type_of_bool=unknown
20921 fi
20922 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20923 fi
20924
20925 fi
20926
20927         rm -f cf_test.out
20928 echo "$as_me:20928: result: $cf_cv_type_of_bool" >&5
20929 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20930 if test "$cf_cv_type_of_bool" = unknown ; then
20931         case .$NCURSES_BOOL in
20932         (.auto|.) NCURSES_BOOL=unsigned;;
20933         esac
20934         { echo "$as_me:20934: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20935 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20936         cf_cv_type_of_bool=$NCURSES_BOOL
20937 fi
20938
20939                 else
20940                         echo "$as_me:20940: checking for fallback type of bool" >&5
20941 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20942                         case "$host_cpu" in
20943                         (i?86)  cf_cv_type_of_bool=char ;;
20944                         (*)     cf_cv_type_of_bool=int  ;;
20945                         esac
20946                         echo "$as_me:20946: result: $cf_cv_type_of_bool" >&5
20947 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20948                 fi
20949         fi
20950 fi
20951
20952 # If the C compiler did not declare bool, and we did not determine that the C++
20953 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20954 # ncurses library use the same type as C++ bool.  Note that this allows one to
20955 # specify the type of bool in a configure-script option and postpone
20956 # integration with the C++ compiler provided that the types are compatible.
20957 USE_CXX_BOOL=1
20958 if test $cf_cv_cc_bool_type = 1
20959 then
20960         # oops: C has a bool.  Unlikely, but C++ could differ.
20961         USE_CXX_BOOL=0
20962 elif test $cf_cv_builtin_bool = 0
20963 then
20964         # C++ has no bool
20965         USE_CXX_BOOL=0
20966 else
20967         # this is the normal case
20968         USE_CXX_BOOL='defined(__cplusplus)'
20969 fi
20970
20971 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20972
20973         if test "$cf_with_ada" != "no" ; then
20974                 if test "$with_libtool" != "no"; then
20975                         { echo "$as_me:20975: WARNING: libtool does not support Ada - disabling feature" >&5
20976 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20977                         cf_with_ada=no
20978                 fi
20979         fi
20980
20981         if test "$cf_with_ada" != "no" ; then
20982
20983 cf_ada_make=gnatmake
20984 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20985 set dummy $cf_ada_make; ac_word=$2
20986 echo "$as_me:20986: checking for $ac_word" >&5
20987 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20988 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20989   echo $ECHO_N "(cached) $ECHO_C" >&6
20990 else
20991   if test -n "$gnat_exists"; then
20992   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20993 else
20994   ac_save_IFS=$IFS; IFS=$ac_path_separator
20995 ac_dummy="$PATH"
20996 for ac_dir in $ac_dummy; do
20997   IFS=$ac_save_IFS
20998   test -z "$ac_dir" && ac_dir=.
20999   $as_executable_p "$ac_dir/$ac_word" || continue
21000 ac_cv_prog_gnat_exists="yes"
21001 echo "$as_me:21001: found $ac_dir/$ac_word" >&5
21002 break
21003 done
21004
21005   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21006 fi
21007 fi
21008 gnat_exists=$ac_cv_prog_gnat_exists
21009 if test -n "$gnat_exists"; then
21010   echo "$as_me:21010: result: $gnat_exists" >&5
21011 echo "${ECHO_T}$gnat_exists" >&6
21012 else
21013   echo "$as_me:21013: result: no" >&5
21014 echo "${ECHO_T}no" >&6
21015 fi
21016
21017 if test "$ac_cv_prog_gnat_exists" = no; then
21018         cf_ada_make=
21019         cf_cv_prog_gnat_correct=no
21020 else
21021
21022 echo "$as_me:21022: checking for gnat version" >&5
21023 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21024 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21025         grep '[0-9].[0-9][0-9]*' |\
21026         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21027 echo "$as_me:21027: result: $cf_gnat_version" >&5
21028 echo "${ECHO_T}$cf_gnat_version" >&6
21029
21030 case $cf_gnat_version in
21031 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21032         cf_cv_prog_gnat_correct=yes
21033         ;;
21034 (*)
21035         { echo "$as_me:21035: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21036 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21037         cf_cv_prog_gnat_correct=no
21038         ;;
21039 esac
21040
21041         # Extract the first word of "m4", so it can be a program name with args.
21042 set dummy m4; ac_word=$2
21043 echo "$as_me:21043: checking for $ac_word" >&5
21044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21045 if test "${ac_cv_prog_M4_exists+set}" = set; then
21046   echo $ECHO_N "(cached) $ECHO_C" >&6
21047 else
21048   if test -n "$M4_exists"; then
21049   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21050 else
21051   ac_save_IFS=$IFS; IFS=$ac_path_separator
21052 ac_dummy="$PATH"
21053 for ac_dir in $ac_dummy; do
21054   IFS=$ac_save_IFS
21055   test -z "$ac_dir" && ac_dir=.
21056   $as_executable_p "$ac_dir/$ac_word" || continue
21057 ac_cv_prog_M4_exists="yes"
21058 echo "$as_me:21058: found $ac_dir/$ac_word" >&5
21059 break
21060 done
21061
21062   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21063 fi
21064 fi
21065 M4_exists=$ac_cv_prog_M4_exists
21066 if test -n "$M4_exists"; then
21067   echo "$as_me:21067: result: $M4_exists" >&5
21068 echo "${ECHO_T}$M4_exists" >&6
21069 else
21070   echo "$as_me:21070: result: no" >&5
21071 echo "${ECHO_T}no" >&6
21072 fi
21073
21074         if test "$ac_cv_prog_M4_exists" = no; then
21075                 cf_cv_prog_gnat_correct=no
21076                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21077         fi
21078         if test "$cf_cv_prog_gnat_correct" = yes; then
21079                 echo "$as_me:21079: checking if GNAT works" >&5
21080 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21081
21082 rm -rf conftest* *~conftest*
21083 cat >>conftest.ads <<CF_EOF
21084 procedure conftest;
21085 CF_EOF
21086 cat >>conftest.adb <<CF_EOF
21087 with Text_IO;
21088 with GNAT.OS_Lib;
21089 procedure conftest is
21090 begin
21091    Text_IO.Put ("Hello World");
21092    Text_IO.New_Line;
21093    GNAT.OS_Lib.OS_Exit (0);
21094 end conftest;
21095 CF_EOF
21096 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21097    if ( ./conftest 1>&5 2>&1 ) ; then
21098       cf_cv_prog_gnat_correct=yes
21099    else
21100       cf_cv_prog_gnat_correct=no
21101    fi
21102 else
21103    cf_cv_prog_gnat_correct=no
21104 fi
21105 rm -rf conftest* *~conftest*
21106
21107                 echo "$as_me:21107: result: $cf_cv_prog_gnat_correct" >&5
21108 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21109         fi
21110 fi
21111
21112                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21113
21114         ADAFLAGS="$ADAFLAGS -gnatpn"
21115
21116         echo "$as_me:21116: checking optimization options for ADAFLAGS" >&5
21117 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21118         case "$CFLAGS" in
21119         (*-g*)
21120
21121         ADAFLAGS="$ADAFLAGS -g"
21122
21123                 ;;
21124         esac
21125         case "$CFLAGS" in
21126         (*-O*)
21127                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21128
21129         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21130
21131                 ;;
21132         esac
21133         echo "$as_me:21133: result: $ADAFLAGS" >&5
21134 echo "${ECHO_T}$ADAFLAGS" >&6
21135
21136 echo "$as_me:21136: checking if GNATPREP supports -T option" >&5
21137 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21138 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21139   echo $ECHO_N "(cached) $ECHO_C" >&6
21140 else
21141
21142 cf_cv_gnatprep_opt_t=no
21143 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21144
21145 fi
21146 echo "$as_me:21146: result: $cf_cv_gnatprep_opt_t" >&5
21147 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21148 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21149
21150 echo "$as_me:21150: checking if GNAT supports generics" >&5
21151 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21152 case $cf_gnat_version in
21153 (3.[1-9]*|[4-9].*)
21154         cf_gnat_generics=yes
21155         ;;
21156 (*)
21157         cf_gnat_generics=no
21158         ;;
21159 esac
21160 echo "$as_me:21160: result: $cf_gnat_generics" >&5
21161 echo "${ECHO_T}$cf_gnat_generics" >&6
21162
21163 if test "$cf_gnat_generics" = yes
21164 then
21165         cf_compile_generics=generics
21166         cf_generic_objects="\${GENOBJS}"
21167 else
21168         cf_compile_generics=
21169         cf_generic_objects=
21170 fi
21171
21172 echo "$as_me:21172: checking if GNAT supports SIGINT" >&5
21173 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21174 if test "${cf_cv_gnat_sigint+set}" = set; then
21175   echo $ECHO_N "(cached) $ECHO_C" >&6
21176 else
21177
21178 rm -rf conftest* *~conftest*
21179 cat >>conftest.ads <<CF_EOF
21180 with Ada.Interrupts.Names;
21181
21182 package ConfTest is
21183
21184    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21185    pragma Unreserve_All_Interrupts;
21186    pragma Warnings (On);
21187
21188    protected Process is
21189       procedure Stop;
21190       function Continue return Boolean;
21191       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21192    private
21193       Done : Boolean := False;
21194    end Process;
21195
21196 end ConfTest;
21197 CF_EOF
21198 cat >>conftest.adb <<CF_EOF
21199 package body ConfTest is
21200    protected body Process is
21201       procedure Stop is
21202       begin
21203          Done := True;
21204       end Stop;
21205       function Continue return Boolean is
21206       begin
21207          return not Done;
21208       end Continue;
21209    end Process;
21210 end ConfTest;
21211 CF_EOF
21212 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21213       cf_cv_gnat_sigint=yes
21214 else
21215    cf_cv_gnat_sigint=no
21216 fi
21217 rm -rf conftest* *~conftest*
21218
21219 fi
21220 echo "$as_me:21220: result: $cf_cv_gnat_sigint" >&5
21221 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21222
21223 if test $cf_cv_gnat_sigint = yes ; then
21224         USE_GNAT_SIGINT=""
21225 else
21226         USE_GNAT_SIGINT="#"
21227 fi
21228
21229 cf_gnat_libraries=no
21230 cf_gnat_projects=no
21231
21232 if test "$enable_gnat_projects" != no ; then
21233 echo "$as_me:21233: checking if GNAT supports project files" >&5
21234 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21235 case $cf_gnat_version in
21236 (3.[0-9]*)
21237         ;;
21238 (*)
21239         case $cf_cv_system_name in
21240         (cygwin*|msys*)
21241                 ;;
21242         (*)
21243                 mkdir conftest.src conftest.bin conftest.lib
21244                 cd conftest.src
21245                 rm -rf conftest* *~conftest*
21246                 cat >>library.gpr <<CF_EOF
21247 project Library is
21248   Kind := External ("LIB_KIND");
21249   for Library_Name use "ConfTest";
21250   for Object_Dir use ".";
21251   for Library_ALI_Dir use External("LIBRARY_DIR");
21252   for Library_Version use External ("SONAME");
21253   for Library_Kind use Kind;
21254   for Library_Dir use External("BUILD_DIR");
21255   Source_Dir := External ("SOURCE_DIR");
21256   for Source_Dirs use (Source_Dir);
21257 end Library;
21258 CF_EOF
21259                 cat >>confpackage.ads <<CF_EOF
21260 package ConfPackage is
21261    procedure conftest;
21262 end ConfPackage;
21263 CF_EOF
21264                 cat >>confpackage.adb <<CF_EOF
21265 with Text_IO;
21266 package body ConfPackage is
21267    procedure conftest is
21268    begin
21269       Text_IO.Put ("Hello World");
21270       Text_IO.New_Line;
21271    end conftest;
21272 end ConfPackage;
21273 CF_EOF
21274                 if ( $cf_ada_make $ADAFLAGS \
21275                                 -Plibrary.gpr \
21276                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21277                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21278                                 -XSOURCE_DIR=`pwd` \
21279                                 -XSONAME=libConfTest.so.1 \
21280                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21281                         cf_gnat_projects=yes
21282                 fi
21283                 cd ..
21284                 if test -f conftest.lib/confpackage.ali
21285                 then
21286                         cf_gnat_libraries=yes
21287                 fi
21288                 rm -rf conftest* *~conftest*
21289                 ;;
21290         esac
21291         ;;
21292 esac
21293 echo "$as_me:21293: result: $cf_gnat_projects" >&5
21294 echo "${ECHO_T}$cf_gnat_projects" >&6
21295 fi # enable_gnat_projects
21296
21297 if test $cf_gnat_projects = yes
21298 then
21299         echo "$as_me:21299: checking if GNAT supports libraries" >&5
21300 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21301         echo "$as_me:21301: result: $cf_gnat_libraries" >&5
21302 echo "${ECHO_T}$cf_gnat_libraries" >&6
21303 fi
21304
21305 if test "$cf_gnat_projects" = yes
21306 then
21307         USE_OLD_MAKERULES="#"
21308         USE_GNAT_PROJECTS=""
21309 else
21310         USE_OLD_MAKERULES=""
21311         USE_GNAT_PROJECTS="#"
21312 fi
21313
21314 if test "$cf_gnat_libraries" = yes
21315 then
21316         USE_GNAT_LIBRARIES=""
21317 else
21318         USE_GNAT_LIBRARIES="#"
21319 fi
21320
21321 echo "$as_me:21321: checking for ada-compiler" >&5
21322 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21323
21324 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21325 if test "${with_ada_compiler+set}" = set; then
21326   withval="$with_ada_compiler"
21327   cf_ada_compiler=$withval
21328 else
21329   cf_ada_compiler=gnatmake
21330 fi;
21331
21332 echo "$as_me:21332: result: $cf_ada_compiler" >&5
21333 echo "${ECHO_T}$cf_ada_compiler" >&6
21334
21335                         cf_ada_package=terminal_interface
21336
21337 echo "$as_me:21337: checking for ada-include" >&5
21338 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21339
21340 # Check whether --with-ada-include or --without-ada-include was given.
21341 if test "${with_ada_include+set}" = set; then
21342   withval="$with_ada_include"
21343
21344 else
21345   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21346 fi; if test -n "$prefix/share/ada/adainclude" ; then
21347
21348 if test "x$prefix" != xNONE; then
21349         cf_path_syntax="$prefix"
21350 else
21351         cf_path_syntax="$ac_default_prefix"
21352 fi
21353
21354 case ".$withval" in
21355 (.\$\(*\)*|.\'*\'*)
21356         ;;
21357 (..|./*|.\\*)
21358         ;;
21359 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21360         ;;
21361 (.\${*prefix}*|.\${*dir}*)
21362         eval withval="$withval"
21363         case ".$withval" in
21364         (.NONE/*)
21365                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21366                 ;;
21367         esac
21368         ;;
21369 (.no|.NONE/*)
21370         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21371         ;;
21372 (*)
21373         { { echo "$as_me:21373: error: expected a pathname, not \"$withval\"" >&5
21374 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21375    { (exit 1); exit 1; }; }
21376         ;;
21377 esac
21378
21379 fi
21380 eval ADA_INCLUDE="$withval"
21381
21382 echo "$as_me:21382: result: $ADA_INCLUDE" >&5
21383 echo "${ECHO_T}$ADA_INCLUDE" >&6
21384
21385 echo "$as_me:21385: checking for ada-objects" >&5
21386 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21387
21388 # Check whether --with-ada-objects or --without-ada-objects was given.
21389 if test "${with_ada_objects+set}" = set; then
21390   withval="$with_ada_objects"
21391
21392 else
21393   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21394 fi; if test -n "$prefix/lib/ada/adalib" ; then
21395
21396 if test "x$prefix" != xNONE; then
21397         cf_path_syntax="$prefix"
21398 else
21399         cf_path_syntax="$ac_default_prefix"
21400 fi
21401
21402 case ".$withval" in
21403 (.\$\(*\)*|.\'*\'*)
21404         ;;
21405 (..|./*|.\\*)
21406         ;;
21407 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21408         ;;
21409 (.\${*prefix}*|.\${*dir}*)
21410         eval withval="$withval"
21411         case ".$withval" in
21412         (.NONE/*)
21413                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21414                 ;;
21415         esac
21416         ;;
21417 (.no|.NONE/*)
21418         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21419         ;;
21420 (*)
21421         { { echo "$as_me:21421: error: expected a pathname, not \"$withval\"" >&5
21422 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21423    { (exit 1); exit 1; }; }
21424         ;;
21425 esac
21426
21427 fi
21428 eval ADA_OBJECTS="$withval"
21429
21430 echo "$as_me:21430: result: $ADA_OBJECTS" >&5
21431 echo "${ECHO_T}$ADA_OBJECTS" >&6
21432
21433 echo "$as_me:21433: checking if an Ada95 shared-library should be built" >&5
21434 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21435
21436 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21437 if test "${with_ada_sharedlib+set}" = set; then
21438   withval="$with_ada_sharedlib"
21439   with_ada_sharedlib=$withval
21440 else
21441   with_ada_sharedlib=no
21442 fi;
21443 echo "$as_me:21443: result: $with_ada_sharedlib" >&5
21444 echo "${ECHO_T}$with_ada_sharedlib" >&6
21445
21446 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21447 MAKE_ADA_SHAREDLIB="#"
21448
21449 if test "x$with_ada_sharedlib" != xno
21450 then
21451         MAKE_ADA_SHAREDLIB=
21452         if test "x$with_ada_sharedlib" != xyes
21453         then
21454                 ADA_SHAREDLIB="$with_ada_sharedlib"
21455         fi
21456 fi
21457
21458                 fi
21459         fi
21460 else
21461         cf_with_ada=no
21462 fi
21463
21464 # do this "late" to avoid conflict with header-checks
21465 if test "x$with_widec" = xyes ; then
21466         echo "$as_me:21466: checking for wchar_t" >&5
21467 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21468 if test "${ac_cv_type_wchar_t+set}" = set; then
21469   echo $ECHO_N "(cached) $ECHO_C" >&6
21470 else
21471   cat >conftest.$ac_ext <<_ACEOF
21472 #line 21472 "configure"
21473 #include "confdefs.h"
21474 $ac_includes_default
21475 int
21476 main ()
21477 {
21478 if ((wchar_t *) 0)
21479   return 0;
21480 if (sizeof (wchar_t))
21481   return 0;
21482   ;
21483   return 0;
21484 }
21485 _ACEOF
21486 rm -f conftest.$ac_objext
21487 if { (eval echo "$as_me:21487: \"$ac_compile\"") >&5
21488   (eval $ac_compile) 2>&5
21489   ac_status=$?
21490   echo "$as_me:21490: \$? = $ac_status" >&5
21491   (exit $ac_status); } &&
21492          { ac_try='test -s conftest.$ac_objext'
21493   { (eval echo "$as_me:21493: \"$ac_try\"") >&5
21494   (eval $ac_try) 2>&5
21495   ac_status=$?
21496   echo "$as_me:21496: \$? = $ac_status" >&5
21497   (exit $ac_status); }; }; then
21498   ac_cv_type_wchar_t=yes
21499 else
21500   echo "$as_me: failed program was:" >&5
21501 cat conftest.$ac_ext >&5
21502 ac_cv_type_wchar_t=no
21503 fi
21504 rm -f conftest.$ac_objext conftest.$ac_ext
21505 fi
21506 echo "$as_me:21506: result: $ac_cv_type_wchar_t" >&5
21507 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21508
21509 echo "$as_me:21509: checking size of wchar_t" >&5
21510 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21511 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21512   echo $ECHO_N "(cached) $ECHO_C" >&6
21513 else
21514   if test "$ac_cv_type_wchar_t" = yes; then
21515   if test "$cross_compiling" = yes; then
21516   # Depending upon the size, compute the lo and hi bounds.
21517 cat >conftest.$ac_ext <<_ACEOF
21518 #line 21518 "configure"
21519 #include "confdefs.h"
21520 $ac_includes_default
21521 int
21522 main ()
21523 {
21524 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21525   ;
21526   return 0;
21527 }
21528 _ACEOF
21529 rm -f conftest.$ac_objext
21530 if { (eval echo "$as_me:21530: \"$ac_compile\"") >&5
21531   (eval $ac_compile) 2>&5
21532   ac_status=$?
21533   echo "$as_me:21533: \$? = $ac_status" >&5
21534   (exit $ac_status); } &&
21535          { ac_try='test -s conftest.$ac_objext'
21536   { (eval echo "$as_me:21536: \"$ac_try\"") >&5
21537   (eval $ac_try) 2>&5
21538   ac_status=$?
21539   echo "$as_me:21539: \$? = $ac_status" >&5
21540   (exit $ac_status); }; }; then
21541   ac_lo=0 ac_mid=0
21542   while :; do
21543     cat >conftest.$ac_ext <<_ACEOF
21544 #line 21544 "configure"
21545 #include "confdefs.h"
21546 $ac_includes_default
21547 int
21548 main ()
21549 {
21550 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21551   ;
21552   return 0;
21553 }
21554 _ACEOF
21555 rm -f conftest.$ac_objext
21556 if { (eval echo "$as_me:21556: \"$ac_compile\"") >&5
21557   (eval $ac_compile) 2>&5
21558   ac_status=$?
21559   echo "$as_me:21559: \$? = $ac_status" >&5
21560   (exit $ac_status); } &&
21561          { ac_try='test -s conftest.$ac_objext'
21562   { (eval echo "$as_me:21562: \"$ac_try\"") >&5
21563   (eval $ac_try) 2>&5
21564   ac_status=$?
21565   echo "$as_me:21565: \$? = $ac_status" >&5
21566   (exit $ac_status); }; }; then
21567   ac_hi=$ac_mid; break
21568 else
21569   echo "$as_me: failed program was:" >&5
21570 cat conftest.$ac_ext >&5
21571 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21572 fi
21573 rm -f conftest.$ac_objext conftest.$ac_ext
21574   done
21575 else
21576   echo "$as_me: failed program was:" >&5
21577 cat conftest.$ac_ext >&5
21578 ac_hi=-1 ac_mid=-1
21579   while :; do
21580     cat >conftest.$ac_ext <<_ACEOF
21581 #line 21581 "configure"
21582 #include "confdefs.h"
21583 $ac_includes_default
21584 int
21585 main ()
21586 {
21587 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21588   ;
21589   return 0;
21590 }
21591 _ACEOF
21592 rm -f conftest.$ac_objext
21593 if { (eval echo "$as_me:21593: \"$ac_compile\"") >&5
21594   (eval $ac_compile) 2>&5
21595   ac_status=$?
21596   echo "$as_me:21596: \$? = $ac_status" >&5
21597   (exit $ac_status); } &&
21598          { ac_try='test -s conftest.$ac_objext'
21599   { (eval echo "$as_me:21599: \"$ac_try\"") >&5
21600   (eval $ac_try) 2>&5
21601   ac_status=$?
21602   echo "$as_me:21602: \$? = $ac_status" >&5
21603   (exit $ac_status); }; }; then
21604   ac_lo=$ac_mid; break
21605 else
21606   echo "$as_me: failed program was:" >&5
21607 cat conftest.$ac_ext >&5
21608 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21609 fi
21610 rm -f conftest.$ac_objext conftest.$ac_ext
21611   done
21612 fi
21613 rm -f conftest.$ac_objext conftest.$ac_ext
21614 # Binary search between lo and hi bounds.
21615 while test "x$ac_lo" != "x$ac_hi"; do
21616   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21617   cat >conftest.$ac_ext <<_ACEOF
21618 #line 21618 "configure"
21619 #include "confdefs.h"
21620 $ac_includes_default
21621 int
21622 main ()
21623 {
21624 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21625   ;
21626   return 0;
21627 }
21628 _ACEOF
21629 rm -f conftest.$ac_objext
21630 if { (eval echo "$as_me:21630: \"$ac_compile\"") >&5
21631   (eval $ac_compile) 2>&5
21632   ac_status=$?
21633   echo "$as_me:21633: \$? = $ac_status" >&5
21634   (exit $ac_status); } &&
21635          { ac_try='test -s conftest.$ac_objext'
21636   { (eval echo "$as_me:21636: \"$ac_try\"") >&5
21637   (eval $ac_try) 2>&5
21638   ac_status=$?
21639   echo "$as_me:21639: \$? = $ac_status" >&5
21640   (exit $ac_status); }; }; then
21641   ac_hi=$ac_mid
21642 else
21643   echo "$as_me: failed program was:" >&5
21644 cat conftest.$ac_ext >&5
21645 ac_lo=`expr $ac_mid + 1`
21646 fi
21647 rm -f conftest.$ac_objext conftest.$ac_ext
21648 done
21649 ac_cv_sizeof_wchar_t=$ac_lo
21650 else
21651   if test "$cross_compiling" = yes; then
21652   { { echo "$as_me:21652: error: cannot run test program while cross compiling" >&5
21653 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21654    { (exit 1); exit 1; }; }
21655 else
21656   cat >conftest.$ac_ext <<_ACEOF
21657 #line 21657 "configure"
21658 #include "confdefs.h"
21659 $ac_includes_default
21660 int
21661 main ()
21662 {
21663 FILE *f = fopen ("conftest.val", "w");
21664 if (!f)
21665   $ac_main_return (1);
21666 fprintf (f, "%d", (sizeof (wchar_t)));
21667 fclose (f);
21668   ;
21669   return 0;
21670 }
21671 _ACEOF
21672 rm -f conftest$ac_exeext
21673 if { (eval echo "$as_me:21673: \"$ac_link\"") >&5
21674   (eval $ac_link) 2>&5
21675   ac_status=$?
21676   echo "$as_me:21676: \$? = $ac_status" >&5
21677   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21678   { (eval echo "$as_me:21678: \"$ac_try\"") >&5
21679   (eval $ac_try) 2>&5
21680   ac_status=$?
21681   echo "$as_me:21681: \$? = $ac_status" >&5
21682   (exit $ac_status); }; }; then
21683   ac_cv_sizeof_wchar_t=`cat conftest.val`
21684 else
21685   echo "$as_me: program exited with status $ac_status" >&5
21686 echo "$as_me: failed program was:" >&5
21687 cat conftest.$ac_ext >&5
21688 fi
21689 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21690 fi
21691 fi
21692 rm -f conftest.val
21693 else
21694   ac_cv_sizeof_wchar_t=0
21695 fi
21696 fi
21697 echo "$as_me:21697: result: $ac_cv_sizeof_wchar_t" >&5
21698 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21699 cat >>confdefs.h <<EOF
21700 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21701 EOF
21702
21703 fi
21704
21705 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21706 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21707 ###
21708 ### ticlib modules may be a separate library, otherwise contained in termlib.
21709 ### termlib modules may be a separate library, otherwise contained in ncurses.
21710 ###
21711 ### The of "+" or " " between the tokens controls the way the script
21712 ### chooses to split module lists into libraries.
21713 ###
21714 ### (see CF_LIB_RULES).
21715 echo "$as_me:21715: checking for library subsets" >&5
21716 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21717 LIB_SUBSETS=
21718
21719 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21720         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21721         if test "$with_ticlib" != no ; then
21722                 LIB_SUBSETS="${LIB_SUBSETS} "
21723         else
21724                 LIB_SUBSETS="${LIB_SUBSETS}+"
21725         fi
21726 fi
21727
21728 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21729 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21730
21731 if test "$with_termlib" != no ; then
21732         LIB_SUBSETS="${LIB_SUBSETS} "
21733 else
21734         LIB_SUBSETS="${LIB_SUBSETS}+"
21735 fi
21736
21737 LIB_SUBSETS="${LIB_SUBSETS}base"
21738
21739 # Most term-driver calls are to tinfo, but some like init_pair are to the
21740 # base library (so it resides in base).
21741 if test "$with_term_driver" != no ; then
21742         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21743         case $cf_cv_system_name in
21744         (*mingw32*|*mingw64*)
21745                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21746                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21747                 ;;
21748         (*)
21749                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21750                 ;;
21751         esac
21752 fi
21753
21754 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21755 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21756
21757 echo "$as_me:21757: result: $LIB_SUBSETS" >&5
21758 echo "${ECHO_T}$LIB_SUBSETS" >&6
21759
21760 ### Construct the list of include-directories to be generated
21761
21762 if test "$srcdir" != "."; then
21763         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21764 fi
21765 CPPFLAGS="-I../include $CPPFLAGS"
21766 if test "$srcdir" != "."; then
21767         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21768 fi
21769 CPPFLAGS="-I. $CPPFLAGS"
21770
21771 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21772 if test "$srcdir" != "."; then
21773         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21774 fi
21775 if test "$GCC" != yes; then
21776         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21777 elif test "$includedir" != "/usr/include"; then
21778         if test "$includedir" = '${prefix}/include' ; then
21779                 if test x$prefix != x/usr ; then
21780                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21781                 fi
21782         else
21783                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21784         fi
21785 fi
21786
21787 ### Build up pieces for makefile rules
21788 echo "$as_me:21788: checking default library suffix" >&5
21789 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21790
21791         case $DFT_LWR_MODEL in
21792         (libtool) DFT_ARG_SUFFIX=''   ;;
21793         (normal)  DFT_ARG_SUFFIX=''   ;;
21794         (debug)   DFT_ARG_SUFFIX='_g' ;;
21795         (profile) DFT_ARG_SUFFIX='_p' ;;
21796         (shared)  DFT_ARG_SUFFIX=''   ;;
21797         esac
21798         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21799 echo "$as_me:21799: result: $DFT_ARG_SUFFIX" >&5
21800 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21801
21802 echo "$as_me:21802: checking default library-dependency suffix" >&5
21803 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21804
21805         case X$DFT_LWR_MODEL in
21806         (Xlibtool)
21807                 DFT_LIB_SUFFIX='.la'
21808                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21809                 ;;
21810         (Xdebug)
21811                 DFT_LIB_SUFFIX='_g.a'
21812                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21813                 ;;
21814         (Xprofile)
21815                 DFT_LIB_SUFFIX='_p.a'
21816                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21817                 ;;
21818         (Xshared)
21819                 case $cf_cv_system_name in
21820                 (aix[5-7]*)
21821                         DFT_LIB_SUFFIX='.so'
21822                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21823                         ;;
21824                 (cygwin*|msys*|mingw*)
21825                         DFT_LIB_SUFFIX='.dll'
21826                         DFT_DEP_SUFFIX='.dll.a'
21827                         ;;
21828                 (darwin*)
21829                         DFT_LIB_SUFFIX='.dylib'
21830                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21831                         ;;
21832                 (hpux*)
21833                         case $target in
21834                         (ia64*)
21835                                 DFT_LIB_SUFFIX='.so'
21836                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21837                                 ;;
21838                         (*)
21839                                 DFT_LIB_SUFFIX='.sl'
21840                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21841                                 ;;
21842                         esac
21843                         ;;
21844                 (*)
21845                         DFT_LIB_SUFFIX='.so'
21846                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21847                         ;;
21848                 esac
21849                 ;;
21850         (*)
21851                 DFT_LIB_SUFFIX='.a'
21852                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21853                 ;;
21854         esac
21855         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21856         then
21857                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21858                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21859         fi
21860 echo "$as_me:21860: result: $DFT_DEP_SUFFIX" >&5
21861 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21862
21863 echo "$as_me:21863: checking default object directory" >&5
21864 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21865
21866         case $DFT_LWR_MODEL in
21867         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21868         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21869         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21870         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21871         (shared)
21872                 case $cf_cv_system_name in
21873                 (cygwin|msys)
21874                         DFT_OBJ_SUBDIR='objects' ;;
21875                 (*)
21876                         DFT_OBJ_SUBDIR='obj_s' ;;
21877                 esac
21878         esac
21879 echo "$as_me:21879: result: $DFT_OBJ_SUBDIR" >&5
21880 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21881
21882 if test "x$cf_with_cxx" = xyes ; then
21883 echo "$as_me:21883: checking c++ library-dependency suffix" >&5
21884 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21885 if test "$with_libtool" != "no"; then
21886         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21887         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21888 elif test "$with_shared_cxx" != "no"; then
21889         # also for g++ users...
21890         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21891 else
21892         # we normally make a static library because C/C++ library rules differ
21893
21894         case Xnormal in
21895         (Xlibtool)
21896                 CXX_LIB_SUFFIX='.la'
21897                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21898                 ;;
21899         (Xdebug)
21900                 CXX_LIB_SUFFIX='_g.a'
21901                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21902                 ;;
21903         (Xprofile)
21904                 CXX_LIB_SUFFIX='_p.a'
21905                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21906                 ;;
21907         (Xshared)
21908                 case $cf_cv_system_name in
21909                 (aix[5-7]*)
21910                         CXX_LIB_SUFFIX='.so'
21911                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21912                         ;;
21913                 (cygwin*|msys*|mingw*)
21914                         CXX_LIB_SUFFIX='.dll'
21915                         CXX_DEP_SUFFIX='.dll.a'
21916                         ;;
21917                 (darwin*)
21918                         CXX_LIB_SUFFIX='.dylib'
21919                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21920                         ;;
21921                 (hpux*)
21922                         case $target in
21923                         (ia64*)
21924                                 CXX_LIB_SUFFIX='.so'
21925                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21926                                 ;;
21927                         (*)
21928                                 CXX_LIB_SUFFIX='.sl'
21929                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21930                                 ;;
21931                         esac
21932                         ;;
21933                 (*)
21934                         CXX_LIB_SUFFIX='.so'
21935                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21936                         ;;
21937                 esac
21938                 ;;
21939         (*)
21940                 CXX_LIB_SUFFIX='.a'
21941                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21942                 ;;
21943         esac
21944         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21945         then
21946                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21947                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21948         fi
21949
21950 fi
21951 echo "$as_me:21951: result: $CXX_LIB_SUFFIX" >&5
21952 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21953
21954 fi
21955
21956 # do not want -ldl in build except as needed for -lncurses dependency
21957 if test "x$with_dlsym" = xyes ; then
21958 if test $DFT_LWR_MODEL = shared || \
21959    test $DFT_LWR_MODEL = libtool ; then
21960
21961 # remove dl library from $LIBS
21962 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21963
21964 fi
21965 fi
21966 ### Set up low-level terminfo dependencies for makefiles.
21967
21968 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21969 # do not need libdl
21970 TICS_LIST=
21971 if test "x$with_dlsym" = xyes ; then
21972
21973 # remove dl library from $SHLIB_LIST
21974 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21975
21976 fi
21977
21978 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21979 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21980 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21981 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21982 then
21983         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21984 fi
21985
21986 if test "$with_ticlib" != no ; then
21987
21988         if test "x$with_ticlib" != xyes ; then
21989                 TICS_NAME=$with_ticlib
21990                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21991                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21992                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21993                 TICS_LIB_SUFFIX="${with_ticlib}"
21994         else
21995                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
21996                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21997                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21998                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21999         fi
22000         TICS_LDFLAGS="-L${LIB_DIR}"
22001         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22002 else
22003         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22004         TICS_LDFLAGS="-L${LIB_DIR}"
22005         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22006 fi
22007
22008 if test "$with_termlib" != no ; then
22009
22010         if test "x$with_termlib" != xyes ; then
22011                 TINFO_NAME=$with_termlib
22012                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22013                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22014                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22015                 TINFO_LIB_SUFFIX="${with_termlib}"
22016         else
22017                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22018                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22019                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22020                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22021         fi
22022
22023         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22024         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22025         if test "$DFT_LWR_MODEL" = "libtool"; then
22026                 TEST_ARGS="${TEST_DEPS}"
22027                 TEST_ARG2="${TEST_DEP2}"
22028                 TINFO_LDFLAGS="-L${LIB_DIR}"
22029                 TINFO_LIBS="$TEST_ARGS"
22030                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22031                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22032         else
22033                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22034                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22035                 if test "x$with_term_driver" != xno ; then
22036                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22037                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22038                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22039                 else
22040                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22041                         TINFO_LIBS="$TEST_ARGS"
22042                 fi
22043                 TINFO_LDFLAGS="-L${LIB_DIR}"
22044                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22045         fi
22046 else
22047         # the next lines are needed for linking libtic over libncurses
22048         TINFO_NAME=${LIB_NAME}
22049         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22050         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22051         if test "x$with_tic_depends" = xyes ; then
22052                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22053         else
22054                 TICS_LIST="$SHLIB_LIST"
22055         fi
22056
22057         TINFO_LDFLAGS="-L${LIB_DIR}"
22058         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22059 fi
22060
22061 if test "$DFT_LWR_MODEL" = shared ; then
22062         case $cf_cv_system_name in
22063         (cygwin*|msys*)
22064                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22065                 TINFO_SUFFIX=.dll
22066                 ;;
22067         esac
22068 fi
22069
22070 if test "x$with_dlsym" = xyes ; then
22071
22072 # remove dl library from $TICS_LIST
22073 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22074
22075 fi
22076
22077 if test "$DFT_LWR_MODEL" = "libtool"; then
22078         OBJEXT=lo
22079 fi
22080
22081 # needed for Ada95
22082 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22083
22084 case $DFT_LWR_MODEL in
22085 (normal|debug|profile)
22086
22087 if test "$GCC" = yes ; then
22088         case $cf_cv_system_name in
22089         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22090                 LDFLAGS_STATIC=
22091                 LDFLAGS_SHARED=
22092                 ;;
22093         (*)     # normally, except when broken
22094                 LDFLAGS_STATIC=-static
22095                 LDFLAGS_SHARED=-dynamic
22096                 ;;
22097         esac
22098 else
22099         case $cf_cv_system_name in
22100         (aix[4-7]*)     # from ld manpage
22101                 LDFLAGS_STATIC=-bstatic
22102                 LDFLAGS_SHARED=-bdynamic
22103                 ;;
22104         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22105                 # We could also use just "archive" and "shared".
22106                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22107                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22108                 ;;
22109         (irix*)         # from ld manpage IRIX64
22110                 LDFLAGS_STATIC=-Bstatic
22111                 LDFLAGS_SHARED=-Bdynamic
22112                 ;;
22113         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22114                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22115                 LDFLAGS_STATIC=-noso
22116                 LDFLAGS_SHARED=-so_archive
22117                 ;;
22118         (solaris2*)
22119                 LDFLAGS_STATIC=-Bstatic
22120                 LDFLAGS_SHARED=-Bdynamic
22121                 ;;
22122         esac
22123 fi
22124
22125 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22126 then
22127         echo "$as_me:22127: checking if linker supports switching between static/dynamic" >&5
22128 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22129
22130         rm -f libconftest.a
22131         cat >conftest.$ac_ext <<EOF
22132 #line 22132 "configure"
22133 #include <stdio.h>
22134 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22135 EOF
22136         if { (eval echo "$as_me:22136: \"$ac_compile\"") >&5
22137   (eval $ac_compile) 2>&5
22138   ac_status=$?
22139   echo "$as_me:22139: \$? = $ac_status" >&5
22140   (exit $ac_status); } ; then
22141                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22142                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22143         fi
22144         rm -f conftest.*
22145
22146         cf_save_LIBS="$LIBS"
22147
22148         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22149         cat >conftest.$ac_ext <<_ACEOF
22150 #line 22150 "configure"
22151 #include "confdefs.h"
22152
22153 #line 22153 "configure"
22154 #include <stdio.h>
22155 int cf_ldflags_static(FILE *fp);
22156
22157 int
22158 main ()
22159 {
22160
22161         return cf_ldflags_static(stdin);
22162
22163   ;
22164   return 0;
22165 }
22166 _ACEOF
22167 rm -f conftest.$ac_objext conftest$ac_exeext
22168 if { (eval echo "$as_me:22168: \"$ac_link\"") >&5
22169   (eval $ac_link) 2>&5
22170   ac_status=$?
22171   echo "$as_me:22171: \$? = $ac_status" >&5
22172   (exit $ac_status); } &&
22173          { ac_try='test -s conftest$ac_exeext'
22174   { (eval echo "$as_me:22174: \"$ac_try\"") >&5
22175   (eval $ac_try) 2>&5
22176   ac_status=$?
22177   echo "$as_me:22177: \$? = $ac_status" >&5
22178   (exit $ac_status); }; }; then
22179
22180         # some linkers simply ignore the -dynamic
22181         case x`file conftest$ac_exeext 2>/dev/null` in
22182         (*static*)
22183                 cf_ldflags_static=no
22184                 ;;
22185         (*)
22186                 cf_ldflags_static=yes
22187                 ;;
22188         esac
22189
22190 else
22191   echo "$as_me: failed program was:" >&5
22192 cat conftest.$ac_ext >&5
22193 cf_ldflags_static=no
22194 fi
22195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22196
22197         rm -f libconftest.*
22198         LIBS="$cf_save_LIBS"
22199
22200         echo "$as_me:22200: result: $cf_ldflags_static" >&5
22201 echo "${ECHO_T}$cf_ldflags_static" >&6
22202
22203         if test $cf_ldflags_static != yes
22204         then
22205                 LDFLAGS_STATIC=
22206                 LDFLAGS_SHARED=
22207         fi
22208 else
22209         LDFLAGS_STATIC=
22210         LDFLAGS_SHARED=
22211 fi
22212
22213         ;;
22214 esac
22215
22216 echo "$as_me:22216: checking where we will install curses.h" >&5
22217 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22218
22219 includesubdir=
22220 if test "$with_overwrite" = no && \
22221  ( test "x$includedir" = 'x${prefix}/include' || \
22222    test "x$includedir" = "x${prefix}/include" )
22223 then
22224         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22225 fi
22226 echo "$as_me:22226: result: ${includedir}${includesubdir}" >&5
22227 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22228
22229 ### Resolve a conflict between normal and wide-curses by forcing applications
22230 ### that will need libutf8 to add it to their configure script.
22231 if test "$with_overwrite" != no ; then
22232 if test "$NCURSES_LIBUTF8" = 1 ; then
22233         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22234         { echo "$as_me:22234: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22235 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22236 fi
22237 fi
22238 WITH_OVERWRITE=$with_overwrite
22239
22240 # used to separate tack out of the tree
22241 NCURSES_TREE=
22242
22243 ### predefined stuff for the test programs
22244
22245 cat >>confdefs.h <<\EOF
22246 #define HAVE_SLK_COLOR 1
22247 EOF
22248
22249 ### Construct the list of subdirectories for which we'll customize makefiles
22250 ### with the appropriate compile-rules.
22251
22252 echo "$as_me:22252: checking for src modules" >&5
22253 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22254
22255 # dependencies and linker-arguments for test-programs
22256 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22257 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22258 if test "$DFT_LWR_MODEL" = "libtool"; then
22259         TEST_ARGS="${TEST_DEPS}"
22260         TEST_ARG2="${TEST_DEP2}"
22261 else
22262         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22263         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22264 fi
22265
22266 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22267 cf_cv_src_modules=
22268 for cf_dir in $modules_to_build
22269 do
22270         if test -f $srcdir/$cf_dir/modules; then
22271
22272                 # We may/may not have tack in the distribution, though the
22273                 # makefile is.
22274                 if test $cf_dir = tack ; then
22275                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22276                                 continue
22277                         fi
22278                 fi
22279
22280                 if test -z "$cf_cv_src_modules"; then
22281                         cf_cv_src_modules=$cf_dir
22282                 else
22283                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22284                 fi
22285
22286                 # Make the ncurses_cfg.h file record the library interface files as
22287                 # well.  These are header files that are the same name as their
22288                 # directory.  Ncurses is the only library that does not follow
22289                 # that pattern.
22290                 if test $cf_dir = tack ; then
22291                         continue
22292                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22293
22294 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22295
22296                         cat >>confdefs.h <<EOF
22297 #define HAVE_${cf_have_include}_H 1
22298 EOF
22299
22300                         cat >>confdefs.h <<EOF
22301 #define HAVE_LIB${cf_have_include} 1
22302 EOF
22303
22304                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22305                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22306                         if test "$DFT_LWR_MODEL" = "libtool"; then
22307                                 TEST_ARGS="${TEST_DEPS}"
22308                                 TEST_ARG2="${TEST_DEP2}"
22309                         else
22310                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22311                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22312                         fi
22313                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22314                 fi
22315         fi
22316 done
22317 echo "$as_me:22317: result: $cf_cv_src_modules" >&5
22318 echo "${ECHO_T}$cf_cv_src_modules" >&6
22319
22320 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22321 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22322
22323 SRC_SUBDIRS=
22324 if test "x$cf_with_manpages" != xno ; then
22325         SRC_SUBDIRS="$SRC_SUBDIRS man"
22326 fi
22327 SRC_SUBDIRS="$SRC_SUBDIRS include"
22328 for cf_dir in $cf_cv_src_modules
22329 do
22330         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22331 done
22332 if test "x$cf_with_tests" != "xno" ; then
22333         SRC_SUBDIRS="$SRC_SUBDIRS test"
22334 fi
22335 # always make this, to install the ncurses-config script
22336 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22337 if test "$cf_with_cxx_binding" != no; then
22338         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22339         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22340 fi
22341
22342 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22343 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22344
22345 ADA_SUBDIRS=
22346 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22347         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22348         ADA_SUBDIRS="gen src"
22349         if test "x$cf_with_tests" != "xno" ; then
22350                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22351         fi
22352 fi
22353
22354 SUB_MAKEFILES=
22355 for cf_dir in $SRC_SUBDIRS
22356 do
22357         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22358 done
22359
22360 if test -n "$ADA_SUBDIRS"; then
22361         for cf_dir in $ADA_SUBDIRS
22362         do
22363                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22364         done
22365
22366 fi
22367
22368 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22369    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22370    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22371 fi
22372
22373 DIRS_TO_MAKE="lib"
22374 for cf_item in $cf_list_models
22375 do
22376
22377         case $cf_item in
22378         (libtool) cf_subdir='obj_lo'  ;;
22379         (normal)  cf_subdir='objects' ;;
22380         (debug)   cf_subdir='obj_g' ;;
22381         (profile) cf_subdir='obj_p' ;;
22382         (shared)
22383                 case $cf_cv_system_name in
22384                 (cygwin|msys)
22385                         cf_subdir='objects' ;;
22386                 (*)
22387                         cf_subdir='obj_s' ;;
22388                 esac
22389         esac
22390
22391         for cf_item2 in $DIRS_TO_MAKE
22392         do
22393                 test $cf_item2 = $cf_subdir && break
22394         done
22395         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22396 done
22397 for cf_dir in $DIRS_TO_MAKE
22398 do
22399         test ! -d $cf_dir && mkdir $cf_dir
22400 done
22401
22402 # symbols that differ when compiling Ada95 by itself.
22403 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22404
22405 # values to use as strings
22406
22407 cat >>confdefs.h <<EOF
22408 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22409 EOF
22410
22411 cat >>confdefs.h <<EOF
22412 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22413 EOF
22414
22415 ### Now that we're done running tests, add the compiler-warnings, if any
22416
22417 cf_fix_cppflags=no
22418 cf_new_cflags=
22419 cf_new_cppflags=
22420 cf_new_extra_cppflags=
22421
22422 for cf_add_cflags in $EXTRA_CFLAGS
22423 do
22424 case $cf_fix_cppflags in
22425 (no)
22426         case $cf_add_cflags in
22427         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22428                 case $cf_add_cflags in
22429                 (-D*)
22430                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22431
22432                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22433                                 && test -z "${cf_tst_cflags}" \
22434                                 && cf_fix_cppflags=yes
22435
22436                         if test $cf_fix_cppflags = yes ; then
22437                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22438                                 continue
22439                         elif test "${cf_tst_cflags}" = "\"'" ; then
22440                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22441                                 continue
22442                         fi
22443                         ;;
22444                 esac
22445                 case "$CPPFLAGS" in
22446                 (*$cf_add_cflags)
22447                         ;;
22448                 (*)
22449                         case $cf_add_cflags in
22450                         (-D*)
22451                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22452
22453 CPPFLAGS=`echo "$CPPFLAGS" | \
22454         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22455                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22456
22457                                 ;;
22458                         esac
22459                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22460                         ;;
22461                 esac
22462                 ;;
22463         (*)
22464                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22465                 ;;
22466         esac
22467         ;;
22468 (yes)
22469         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22470
22471         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22472
22473         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22474                 && test -z "${cf_tst_cflags}" \
22475                 && cf_fix_cppflags=no
22476         ;;
22477 esac
22478 done
22479
22480 if test -n "$cf_new_cflags" ; then
22481
22482         CFLAGS="$CFLAGS $cf_new_cflags"
22483 fi
22484
22485 if test -n "$cf_new_cppflags" ; then
22486
22487         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22488 fi
22489
22490 if test -n "$cf_new_extra_cppflags" ; then
22491
22492         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22493 fi
22494
22495 ### Define substitutions for header files to avoid name-pollution
22496
22497 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22498         HAVE_TCGETATTR=1
22499 else
22500         HAVE_TCGETATTR=0
22501 fi
22502
22503 if test "x$ac_cv_header_stdint_h" = xyes ; then
22504         HAVE_STDINT_H=1
22505 else
22506         HAVE_STDINT_H=0
22507 fi
22508
22509 if test "x$ac_cv_header_termio_h" = xyes ; then
22510         HAVE_TERMIO_H=1
22511 else
22512         HAVE_TERMIO_H=0
22513 fi
22514
22515 if test "x$ac_cv_header_termios_h" = xyes ; then
22516         HAVE_TERMIOS_H=1
22517 else
22518         HAVE_TERMIOS_H=0
22519 fi
22520
22521 ################################################################################
22522 test "x$use_database" = xyes && \
22523 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22524
22525 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22526 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22527
22528 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22529 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22530 fi
22531
22532 # Extract the first word of "tic", so it can be a program name with args.
22533 set dummy tic; ac_word=$2
22534 echo "$as_me:22534: checking for $ac_word" >&5
22535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22536 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22537   echo $ECHO_N "(cached) $ECHO_C" >&6
22538 else
22539   case $TIC_PATH in
22540   [\\/]* | ?:[\\/]*)
22541   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22542   ;;
22543   *)
22544   ac_save_IFS=$IFS; IFS=$ac_path_separator
22545 ac_dummy="$PATH:/usr/local/ncurses/bin"
22546 for ac_dir in $ac_dummy; do
22547   IFS=$ac_save_IFS
22548   test -z "$ac_dir" && ac_dir=.
22549   if $as_executable_p "$ac_dir/$ac_word"; then
22550    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22551    echo "$as_me:22551: found $ac_dir/$ac_word" >&5
22552    break
22553 fi
22554 done
22555
22556   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22557   ;;
22558 esac
22559 fi
22560 TIC_PATH=$ac_cv_path_TIC_PATH
22561
22562 if test -n "$TIC_PATH"; then
22563   echo "$as_me:22563: result: $TIC_PATH" >&5
22564 echo "${ECHO_T}$TIC_PATH" >&6
22565 else
22566   echo "$as_me:22566: result: no" >&5
22567 echo "${ECHO_T}no" >&6
22568 fi
22569
22570 if test -n "$FALLBACK_LIST"
22571 then
22572         if test "$TIC_PATH" = unknown
22573         then
22574                 { echo "$as_me:22574: WARNING: no tic program found for fallbacks" >&5
22575 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22576         fi
22577 fi
22578
22579 if test "x$cf_with_tests" != xno ; then
22580         MAKE_TESTS=
22581 else
22582         MAKE_TESTS="#"
22583 fi
22584
22585 ADAHTML_DIR=../../doc/html/ada
22586
22587 # these could be configurable, but are not currently
22588 PANEL_NAME=panel
22589 MENU_NAME=menu
22590 FORM_NAME=form
22591 CXX_NAME=ncurses++
22592
22593 # workaround for OS/2 (20151017)
22594 case $cf_cv_system_name in
22595 (os2*)
22596         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22597         ;;
22598 (*)
22599         LIBTOOL_OPTS_CXX=
22600         ;;
22601 esac
22602
22603 # workaround for g++ versus Solaris (20131116)
22604 case $cf_cv_system_name in
22605 (solaris2*)
22606         case "x$CPPFLAGS" in
22607         (*-D_XOPEN_SOURCE_EXTENDED*)
22608                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22609
22610 echo "${as_me:-configure}:22610: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22611
22612                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22613                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22614                 ;;
22615         esac
22616         ;;
22617 esac
22618
22619 # Help to automatically enable the extended curses features when using either
22620 # the *-config or the ".pc" files by adding defines.
22621 echo "$as_me:22621: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22622 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22623 PKG_CFLAGS=
22624 for cf_loop1 in $CPPFLAGS_after_XOPEN
22625 do
22626         cf_found=no
22627         for cf_loop2 in $CPPFLAGS_before_XOPEN
22628         do
22629                 if test "x$cf_loop1" = "x$cf_loop2"
22630                 then
22631                         cf_found=yes
22632                         break
22633                 fi
22634         done
22635         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22636 done
22637 echo "$as_me:22637: result: $PKG_CFLAGS" >&5
22638 echo "${ECHO_T}$PKG_CFLAGS" >&6
22639
22640 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22641 case "x$NCURSES_OSPEED" in
22642 (*short*)
22643         cf_compatible=1
22644         ;;
22645 (*)
22646         cf_compatible=0
22647         ;;
22648 esac
22649
22650 cat >>confdefs.h <<EOF
22651 #define NCURSES_OSPEED_COMPAT $cf_compatible
22652 EOF
22653
22654 case "x$cf_cv_typeof_chtype" in
22655 (xshort|xint|xlong)
22656         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22657         ;;
22658 esac
22659
22660 case "x$cf_cv_typeof_mmask_t" in
22661 (xshort|xint|xlong)
22662         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22663         ;;
22664 esac
22665
22666 # substitute into misc/Makefile to suppress
22667 # (un)install.data from the
22668 # (un)install rules.
22669 if test "x$cf_with_db_install" = "xno"; then
22670         MISC_INSTALL_DATA=
22671         MISC_UNINSTALL_DATA=
22672 else
22673         MISC_INSTALL_DATA=install.data
22674         MISC_UNINSTALL_DATA=uninstall.data
22675 fi
22676
22677 SUB_SCRIPTS=
22678
22679 if test -n "$PACKAGE"
22680 then
22681         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22682         export PACKAGE
22683         echo "package: $PACKAGE"
22684 fi
22685
22686 UNALTERED_SYMS=
22687 cf_filter_syms=no
22688
22689 if test -n "$RESULTING_SYMS"
22690 then
22691         cf_filter_syms=$cf_dft_filter_syms
22692         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22693
22694 echo "${as_me:-configure}:22694: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22695
22696 fi
22697
22698 if test "x$WILDCARD_SYMS" = xno
22699 then
22700         cf_filter_syms=yes
22701 fi
22702
22703 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
22704
22705 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22706 if test $cf_filter_syms = yes
22707 then
22708         RESULTING_SYMS=resulting.map
22709 fi
22710
22711 if test "x$cross_compiling" = xyes ; then
22712         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22713 else
22714         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22715 fi
22716
22717 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"
22718 ac_config_commands="$ac_config_commands default"
22719 cat >confcache <<\_ACEOF
22720 # This file is a shell script that caches the results of configure
22721 # tests run on this system so they can be shared between configure
22722 # scripts and configure runs, see configure's option --config-cache.
22723 # It is not useful on other systems.  If it contains results you don't
22724 # want to keep, you may remove or edit it.
22725 #
22726 # config.status only pays attention to the cache file if you give it
22727 # the --recheck option to rerun configure.
22728 #
22729 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22730 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22731 # following values.
22732
22733 _ACEOF
22734
22735 # The following way of writing the cache mishandles newlines in values,
22736 # but we know of no workaround that is simple, portable, and efficient.
22737 # So, don't put newlines in cache variables' values.
22738 # Ultrix sh set writes to stderr and can't be redirected directly,
22739 # and sets the high bit in the cache file unless we assign to the vars.
22740 {
22741   (set) 2>&1 |
22742     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22743     *ac_space=\ *)
22744       # `set' does not quote correctly, so add quotes (double-quote
22745       # substitution turns \\\\ into \\, and sed turns \\ into \).
22746       sed -n \
22747         "s/'/'\\\\''/g;
22748           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22749       ;;
22750     *)
22751       # `set' quotes correctly as required by POSIX, so do not add quotes.
22752       sed -n \
22753         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22754       ;;
22755     esac;
22756 } |
22757   sed '
22758      t clear
22759      : clear
22760      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22761      t end
22762      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22763      : end' >>confcache
22764 if cmp -s $cache_file confcache; then :; else
22765   if test -w $cache_file; then
22766     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22767     cat confcache >$cache_file
22768   else
22769     echo "not updating unwritable cache $cache_file"
22770   fi
22771 fi
22772 rm -f confcache
22773
22774 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22775 # Let make expand exec_prefix.
22776 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22777
22778 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22779 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22780 # trailing colons and then remove the whole line if VPATH becomes empty
22781 # (actually we leave an empty line to preserve line numbers).
22782 if test "x$srcdir" = x.; then
22783   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22784 s/:*\$(srcdir):*/:/;
22785 s/:*\${srcdir}:*/:/;
22786 s/:*@srcdir@:*/:/;
22787 s/^\([^=]*=[    ]*\):*/\1/;
22788 s/:*$//;
22789 s/^[^=]*=[      ]*$//;
22790 }'
22791 fi
22792
22793 DEFS=-DHAVE_CONFIG_H
22794
22795 : ${CONFIG_STATUS=./config.status}
22796 ac_clean_files_save=$ac_clean_files
22797 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22798 { echo "$as_me:22798: creating $CONFIG_STATUS" >&5
22799 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22800 cat >$CONFIG_STATUS <<_ACEOF
22801 #! $SHELL
22802 # Generated automatically by configure.
22803 # Run this file to recreate the current configuration.
22804 # Compiler output produced by configure, useful for debugging
22805 # configure, is in config.log if it exists.
22806
22807 debug=false
22808 SHELL=\${CONFIG_SHELL-$SHELL}
22809 ac_cs_invocation="\$0 \$@"
22810
22811 _ACEOF
22812
22813 cat >>$CONFIG_STATUS <<\_ACEOF
22814 # Be Bourne compatible
22815 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22816   emulate sh
22817   NULLCMD=:
22818 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22819   set -o posix
22820 fi
22821
22822 # Name of the executable.
22823 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22824
22825 if expr a : '\(a\)' >/dev/null 2>&1; then
22826   as_expr=expr
22827 else
22828   as_expr=false
22829 fi
22830
22831 rm -f conf$$ conf$$.exe conf$$.file
22832 echo >conf$$.file
22833 if ln -s conf$$.file conf$$ 2>/dev/null; then
22834   # We could just check for DJGPP; but this test a) works b) is more generic
22835   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22836   if test -f conf$$.exe; then
22837     # Don't use ln at all; we don't have any links
22838     as_ln_s='cp -p'
22839   else
22840     as_ln_s='ln -s'
22841   fi
22842 elif ln conf$$.file conf$$ 2>/dev/null; then
22843   as_ln_s=ln
22844 else
22845   as_ln_s='cp -p'
22846 fi
22847 rm -f conf$$ conf$$.exe conf$$.file
22848
22849 as_executable_p="test -f"
22850
22851 # Support unset when possible.
22852 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22853   as_unset=unset
22854 else
22855   as_unset=false
22856 fi
22857
22858 # NLS nuisances.
22859 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22860 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22861 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22862 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22863 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22864 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22865 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22866 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22867
22868 # IFS
22869 # We need space, tab and new line, in precisely that order.
22870 as_nl='
22871 '
22872 IFS="   $as_nl"
22873
22874 # CDPATH.
22875 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22876
22877 exec 6>&1
22878
22879 _ACEOF
22880
22881 # Files that config.status was made for.
22882 if test -n "$ac_config_files"; then
22883   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22884 fi
22885
22886 if test -n "$ac_config_headers"; then
22887   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22888 fi
22889
22890 if test -n "$ac_config_links"; then
22891   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22892 fi
22893
22894 if test -n "$ac_config_commands"; then
22895   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22896 fi
22897
22898 cat >>$CONFIG_STATUS <<\EOF
22899
22900 ac_cs_usage="\
22901 \`$as_me' instantiates files from templates according to the
22902 current configuration.
22903
22904 Usage: $0 [OPTIONS] [FILE]...
22905
22906   -h, --help       print this help, then exit
22907   -V, --version    print version number, then exit
22908   -d, --debug      don't remove temporary files
22909       --recheck    update $as_me by reconfiguring in the same conditions
22910   --file=FILE[:TEMPLATE]
22911                    instantiate the configuration file FILE
22912   --header=FILE[:TEMPLATE]
22913                    instantiate the configuration header FILE
22914
22915 Configuration files:
22916 $config_files
22917
22918 Configuration headers:
22919 $config_headers
22920
22921 Configuration commands:
22922 $config_commands
22923
22924 Report bugs to <dickey@invisible-island.net>."
22925 EOF
22926
22927 cat >>$CONFIG_STATUS <<EOF
22928 ac_cs_version="\\
22929 config.status
22930 configured by $0, generated by GNU Autoconf 2.52.20150926,
22931   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22932
22933 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22934 Free Software Foundation, Inc.
22935 This config.status script is free software; the Free Software Foundation
22936 gives unlimited permission to copy, distribute and modify it."
22937 srcdir=$srcdir
22938 INSTALL="$INSTALL"
22939 EOF
22940
22941 cat >>$CONFIG_STATUS <<\EOF
22942 # If no file are specified by the user, then we need to provide default
22943 # value.  By we need to know if files were specified by the user.
22944 ac_need_defaults=:
22945 while test $# != 0
22946 do
22947   case $1 in
22948   --*=*)
22949     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22950     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22951     shift
22952     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22953     shift
22954     ;;
22955   -*);;
22956   *) # This is not an option, so the user has probably given explicit
22957      # arguments.
22958      ac_need_defaults=false;;
22959   esac
22960
22961   case $1 in
22962   # Handling of the options.
22963 EOF
22964 cat >>$CONFIG_STATUS <<EOF
22965   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22966     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22967     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22968 EOF
22969 cat >>$CONFIG_STATUS <<\EOF
22970   --version | --vers* | -V )
22971     echo "$ac_cs_version"; exit 0 ;;
22972   --he | --h)
22973     # Conflict between --help and --header
22974     { { echo "$as_me:22974: error: ambiguous option: $1
22975 Try \`$0 --help' for more information." >&5
22976 echo "$as_me: error: ambiguous option: $1
22977 Try \`$0 --help' for more information." >&2;}
22978    { (exit 1); exit 1; }; };;
22979   --help | --hel | -h )
22980     echo "$ac_cs_usage"; exit 0 ;;
22981   --debug | --d* | -d )
22982     debug=: ;;
22983   --file | --fil | --fi | --f )
22984     shift
22985     CONFIG_FILES="$CONFIG_FILES $1"
22986     ac_need_defaults=false;;
22987   --header | --heade | --head | --hea )
22988     shift
22989     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22990     ac_need_defaults=false;;
22991
22992   # This is an error.
22993   -*) { { echo "$as_me:22993: error: unrecognized option: $1
22994 Try \`$0 --help' for more information." >&5
22995 echo "$as_me: error: unrecognized option: $1
22996 Try \`$0 --help' for more information." >&2;}
22997    { (exit 1); exit 1; }; } ;;
22998
22999   *) ac_config_targets="$ac_config_targets $1" ;;
23000
23001   esac
23002   shift
23003 done
23004
23005 exec 5>>config.log
23006 cat >&5 << _ACEOF
23007
23008 ## ----------------------- ##
23009 ## Running config.status.  ##
23010 ## ----------------------- ##
23011
23012 This file was extended by $as_me 2.52.20150926, executed with
23013   CONFIG_FILES    = $CONFIG_FILES
23014   CONFIG_HEADERS  = $CONFIG_HEADERS
23015   CONFIG_LINKS    = $CONFIG_LINKS
23016   CONFIG_COMMANDS = $CONFIG_COMMANDS
23017   > $ac_cs_invocation
23018 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23019
23020 _ACEOF
23021 EOF
23022
23023 cat >>$CONFIG_STATUS <<EOF
23024 #
23025 # INIT-COMMANDS section.
23026 #
23027
23028 ### Special initialization commands, used to pass information from the
23029 ### configuration-run into config.status
23030
23031 AWK="$AWK"
23032 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23033 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23034 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23035 ECHO_LD="$ECHO_LD"
23036 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23037 LDCONFIG="$LDCONFIG"
23038 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23039 LIB_NAME="$LIB_NAME"
23040 LIB_PREFIX="$LIB_PREFIX"
23041 LIB_SUBSETS="$LIB_SUBSETS"
23042 LIB_SUFFIX="$LIB_SUFFIX"
23043 LIB_TRACING="$LIB_TRACING"
23044 LN_S="$LN_S"
23045 MAKE_TERMINFO="$MAKE_TERMINFO"
23046 NCURSES_MAJOR="$NCURSES_MAJOR"
23047 NCURSES_MINOR="$NCURSES_MINOR"
23048 NCURSES_OSPEED="$NCURSES_OSPEED"
23049 NCURSES_PATCH="$NCURSES_PATCH"
23050 SRC_SUBDIRS="$SRC_SUBDIRS"
23051 TERMINFO="$TERMINFO"
23052 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23053 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23054 TICS_NAME="$TICS_NAME"
23055 TICS_SUFFIX="$TICS_SUFFIX"
23056 TIC_PATH="$TIC_PATH"
23057 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23058 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23059 TINFO_NAME="$TINFO_NAME"
23060 TINFO_SUFFIX="$TINFO_SUFFIX"
23061 UNALTERED_SYMS="$UNALTERED_SYMS"
23062 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23063 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23064 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23065 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23066 WILDCARD_SYMS="$WILDCARD_SYMS"
23067 WITH_CURSES_H="$with_curses_h"
23068 WITH_ECHO="${enable_echo:=yes}"
23069 WITH_OVERWRITE="$with_overwrite"
23070 cf_LIST_MODELS="$cf_list_models"
23071 cf_cv_abi_version="$cf_cv_abi_version"
23072 cf_cv_do_relink="$cf_cv_do_relink"
23073 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23074 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23075 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23076 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23077 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23078 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23079 cf_cv_rel_version="$cf_cv_rel_version"
23080 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23081 cf_cv_shared_soname='$cf_cv_shared_soname'
23082 cf_cv_shlib_version="$cf_cv_shlib_version"
23083 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23084 cf_cv_system_name="$cf_cv_system_name"
23085 cf_cv_term_driver="$with_term_driver"
23086 cf_with_ada="$cf_with_ada"
23087 cf_with_cxx_binding="$cf_with_cxx_binding"
23088 cf_with_db_install="$cf_with_db_install"
23089 cf_with_manpages="$cf_with_manpages"
23090 cf_with_tests="$cf_with_tests"
23091 host="$host"
23092 target="$target"
23093 with_shared_cxx="$with_shared_cxx"
23094
23095 EOF
23096
23097 cat >>$CONFIG_STATUS <<\EOF
23098 for ac_config_target in $ac_config_targets
23099 do
23100   case "$ac_config_target" in
23101   # Handling of arguments.
23102   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23103   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23104   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23105   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23106   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23107   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23108   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23109   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23110   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23111   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23112   *) { { echo "$as_me:23112: error: invalid argument: $ac_config_target" >&5
23113 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23114    { (exit 1); exit 1; }; };;
23115   esac
23116 done
23117
23118 # If the user did not use the arguments to specify the items to instantiate,
23119 # then the envvar interface is used.  Set only those that are not.
23120 # We use the long form for the default assignment because of an extremely
23121 # bizarre bug on SunOS 4.1.3.
23122 if $ac_need_defaults; then
23123   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23124   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23125   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23126 fi
23127
23128 # Create a temporary directory, and hook for its removal unless debugging.
23129 $debug ||
23130 {
23131   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23132   trap '{ (exit 1); exit 1; }' 1 2 13 15
23133 }
23134
23135 # Create a (secure) tmp directory for tmp files.
23136 : ${TMPDIR=/tmp}
23137 {
23138   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23139   test -n "$tmp" && test -d "$tmp"
23140 }  ||
23141 {
23142   tmp=$TMPDIR/cs$$-$RANDOM
23143   (umask 077 && mkdir $tmp)
23144 } ||
23145 {
23146    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23147    { (exit 1); exit 1; }
23148 }
23149
23150 EOF
23151
23152 cat >>$CONFIG_STATUS <<EOF
23153
23154 #
23155 # CONFIG_FILES section.
23156 #
23157
23158 # No need to generate the scripts if there are no CONFIG_FILES.
23159 # This happens for instance when ./config.status config.h
23160 if test -n "\$CONFIG_FILES"; then
23161   # Protect against being on the right side of a sed subst in config.status.
23162   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23163    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23164 s,@SHELL@,$SHELL,;t t
23165 s,@exec_prefix@,$exec_prefix,;t t
23166 s,@prefix@,$prefix,;t t
23167 s,@program_transform_name@,$program_transform_name,;t t
23168 s,@bindir@,$bindir,;t t
23169 s,@sbindir@,$sbindir,;t t
23170 s,@libexecdir@,$libexecdir,;t t
23171 s,@datarootdir@,$datarootdir,;t t
23172 s,@datadir@,$datadir,;t t
23173 s,@sysconfdir@,$sysconfdir,;t t
23174 s,@sharedstatedir@,$sharedstatedir,;t t
23175 s,@localstatedir@,$localstatedir,;t t
23176 s,@libdir@,$libdir,;t t
23177 s,@includedir@,$includedir,;t t
23178 s,@oldincludedir@,$oldincludedir,;t t
23179 s,@infodir@,$infodir,;t t
23180 s,@mandir@,$mandir,;t t
23181 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23182 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23183 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23184 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23185 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23186 s,@build_alias@,$build_alias,;t t
23187 s,@host_alias@,$host_alias,;t t
23188 s,@target_alias@,$target_alias,;t t
23189 s,@ECHO_C@,$ECHO_C,;t t
23190 s,@ECHO_N@,$ECHO_N,;t t
23191 s,@ECHO_T@,$ECHO_T,;t t
23192 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23193 s,@DEFS@,$DEFS,;t t
23194 s,@LIBS@,$LIBS,;t t
23195 s,@top_builddir@,$top_builddir,;t t
23196 s,@EGREP@,$EGREP,;t t
23197 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23198 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23199 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23200 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23201 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23202 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23203 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23204 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23205 s,@VERSION@,$VERSION,;t t
23206 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23207 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23208 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23209 s,@PACKAGE@,$PACKAGE,;t t
23210 s,@build@,$build,;t t
23211 s,@build_cpu@,$build_cpu,;t t
23212 s,@build_vendor@,$build_vendor,;t t
23213 s,@build_os@,$build_os,;t t
23214 s,@host@,$host,;t t
23215 s,@host_cpu@,$host_cpu,;t t
23216 s,@host_vendor@,$host_vendor,;t t
23217 s,@host_os@,$host_os,;t t
23218 s,@target@,$target,;t t
23219 s,@target_cpu@,$target_cpu,;t t
23220 s,@target_vendor@,$target_vendor,;t t
23221 s,@target_os@,$target_os,;t t
23222 s,@CC@,$CC,;t t
23223 s,@CFLAGS@,$CFLAGS,;t t
23224 s,@LDFLAGS@,$LDFLAGS,;t t
23225 s,@CPPFLAGS@,$CPPFLAGS,;t t
23226 s,@ac_ct_CC@,$ac_ct_CC,;t t
23227 s,@EXEEXT@,$EXEEXT,;t t
23228 s,@OBJEXT@,$OBJEXT,;t t
23229 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23230 s,@CPP@,$CPP,;t t
23231 s,@LDCONFIG@,$LDCONFIG,;t t
23232 s,@CXX@,$CXX,;t t
23233 s,@CXXFLAGS@,$CXXFLAGS,;t t
23234 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23235 s,@AWK@,$AWK,;t t
23236 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23237 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23238 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23239 s,@LINT@,$LINT,;t t
23240 s,@LINT_OPTS@,$LINT_OPTS,;t t
23241 s,@LN_S@,$LN_S,;t t
23242 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23243 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23244 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23245 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23246 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23247 s,@SET_MAKE@,$SET_MAKE,;t t
23248 s,@CTAGS@,$CTAGS,;t t
23249 s,@ETAGS@,$ETAGS,;t t
23250 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23251 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23252 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23253 s,@RANLIB@,$RANLIB,;t t
23254 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23255 s,@LD@,$LD,;t t
23256 s,@ac_ct_LD@,$ac_ct_LD,;t t
23257 s,@AR@,$AR,;t t
23258 s,@ac_ct_AR@,$ac_ct_AR,;t t
23259 s,@NM@,$NM,;t t
23260 s,@ac_ct_NM@,$ac_ct_NM,;t t
23261 s,@ARFLAGS@,$ARFLAGS,;t t
23262 s,@DESTDIR@,$DESTDIR,;t t
23263 s,@BUILD_CC@,$BUILD_CC,;t t
23264 s,@BUILD_CPP@,$BUILD_CPP,;t t
23265 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23266 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23267 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23268 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23269 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23270 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23271 s,@cf_list_models@,$cf_list_models,;t t
23272 s,@ABI_VERSION@,$ABI_VERSION,;t t
23273 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23274 s,@LIBTOOL@,$LIBTOOL,;t t
23275 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23276 s,@LT_UNDEF@,$LT_UNDEF,;t t
23277 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23278 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23279 s,@LIB_CREATE@,$LIB_CREATE,;t t
23280 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23281 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23282 s,@LIB_PREP@,$LIB_PREP,;t t
23283 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23284 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23285 s,@LIB_LINK@,$LIB_LINK,;t t
23286 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23287 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23288 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23289 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23290 s,@TICS_NAME@,$TICS_NAME,;t t
23291 s,@TINFO_NAME@,$TINFO_NAME,;t t
23292 s,@LIB_NAME@,$LIB_NAME,;t t
23293 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23294 s,@CC_G_OPT@,$CC_G_OPT,;t t
23295 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23296 s,@LD_MODEL@,$LD_MODEL,;t t
23297 s,@shlibdir@,$shlibdir,;t t
23298 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23299 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23300 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23301 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23302 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23303 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23304 s,@LINK_PROGS@,$LINK_PROGS,;t t
23305 s,@LINK_TESTS@,$LINK_TESTS,;t t
23306 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23307 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23308 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23309 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23310 s,@RPATH_LIST@,$RPATH_LIST,;t t
23311 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23312 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23313 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23314 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23315 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23316 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23317 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23318 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23319 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23320 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23321 s,@XTERM_KBS@,$XTERM_KBS,;t t
23322 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23323 s,@TERMINFO@,$TERMINFO,;t t
23324 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23325 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23326 s,@TERMPATH@,$TERMPATH,;t t
23327 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23328 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23329 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23330 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23331 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23332 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23333 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23334 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23335 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23336 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23337 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23338 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23339 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23340 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23341 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23342 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23343 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23344 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23345 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23346 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23347 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23348 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23349 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23350 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23351 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23352 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23353 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23354 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23355 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23356 s,@PTHREAD@,$PTHREAD,;t t
23357 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23358 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23359 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23360 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23361 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23362 s,@ECHO_LT@,$ECHO_LT,;t t
23363 s,@ECHO_LD@,$ECHO_LD,;t t
23364 s,@RULE_CC@,$RULE_CC,;t t
23365 s,@SHOW_CC@,$SHOW_CC,;t t
23366 s,@ECHO_CC@,$ECHO_CC,;t t
23367 s,@ECHO_LINK@,$ECHO_LINK,;t t
23368 s,@ADAFLAGS@,$ADAFLAGS,;t t
23369 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23370 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23371 s,@ADA_TRACE@,$ADA_TRACE,;t t
23372 s,@MATH_LIB@,$MATH_LIB,;t t
23373 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23374 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23375 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23376 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23377 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23378 s,@TEST_LIBS@,$TEST_LIBS,;t t
23379 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23380 s,@CXXCPP@,$CXXCPP,;t t
23381 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23382 s,@CXX_AR@,$CXX_AR,;t t
23383 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23384 s,@CXXLIBS@,$CXXLIBS,;t t
23385 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23386 s,@gnat_exists@,$gnat_exists,;t t
23387 s,@M4_exists@,$M4_exists,;t t
23388 s,@cf_ada_make@,$cf_ada_make,;t t
23389 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23390 s,@cf_compile_generics@,$cf_compile_generics,;t t
23391 s,@cf_generic_objects@,$cf_generic_objects,;t t
23392 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23393 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23394 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23395 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23396 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23397 s,@cf_ada_package@,$cf_ada_package,;t t
23398 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23399 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23400 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23401 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23402 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23403 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23404 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23405 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23406 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23407 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23408 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23409 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23410 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23411 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23412 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23413 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23414 s,@TICS_LIBS@,$TICS_LIBS,;t t
23415 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23416 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23417 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23418 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23419 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23420 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23421 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23422 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23423 s,@includesubdir@,$includesubdir,;t t
23424 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23425 s,@TICS_LIST@,$TICS_LIST,;t t
23426 s,@TINFO_LIST@,$TINFO_LIST,;t t
23427 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23428 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23429 s,@TEST_ARGS@,$TEST_ARGS,;t t
23430 s,@TEST_DEPS@,$TEST_DEPS,;t t
23431 s,@TEST_ARG2@,$TEST_ARG2,;t t
23432 s,@TEST_DEP2@,$TEST_DEP2,;t t
23433 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23434 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23435 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23436 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23437 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23438 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23439 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23440 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23441 s,@cross_compiling@,$cross_compiling,;t t
23442 s,@TIC_PATH@,$TIC_PATH,;t t
23443 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23444 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23445 s,@PANEL_NAME@,$PANEL_NAME,;t t
23446 s,@MENU_NAME@,$MENU_NAME,;t t
23447 s,@FORM_NAME@,$FORM_NAME,;t t
23448 s,@CXX_NAME@,$CXX_NAME,;t t
23449 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23450 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23451 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23452 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23453 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23454 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23455 CEOF
23456
23457 EOF
23458
23459   cat >>$CONFIG_STATUS <<\EOF
23460   # Split the substitutions into bite-sized pieces for seds with
23461   # small command number limits, like on Digital OSF/1 and HP-UX.
23462   ac_max_sed_lines=48
23463   ac_sed_frag=1 # Number of current file.
23464   ac_beg=1 # First line for current file.
23465   ac_end=$ac_max_sed_lines # Line after last line for current file.
23466   ac_more_lines=:
23467   ac_sed_cmds=
23468   while $ac_more_lines; do
23469     if test $ac_beg -gt 1; then
23470       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23471     else
23472       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23473     fi
23474     if test ! -s $tmp/subs.frag; then
23475       ac_more_lines=false
23476     else
23477       # The purpose of the label and of the branching condition is to
23478       # speed up the sed processing (if there are no `@' at all, there
23479       # is no need to browse any of the substitutions).
23480       # These are the two extra sed commands mentioned above.
23481       (echo ':t
23482   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23483       # It is possible to make a multiline substitution using escaped newlines.
23484       # Ensure that we do not split the substitution between script fragments.
23485       ac_BEG=$ac_end
23486       ac_END=`expr $ac_end + $ac_max_sed_lines`
23487       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23488       if test -s $tmp/subs.next; then
23489         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23490         if test ! -s $tmp/subs.edit; then
23491           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23492           if test ! -s $tmp/subs.edit; then
23493             if test $ac_beg -gt 1; then
23494               ac_end=`expr $ac_end - 1`
23495               continue
23496             fi
23497           fi
23498         fi
23499       fi
23500
23501       if test -z "$ac_sed_cmds"; then
23502         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23503       else
23504         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23505       fi
23506       ac_sed_frag=`expr $ac_sed_frag + 1`
23507       ac_beg=$ac_end
23508       ac_end=`expr $ac_end + $ac_max_sed_lines`
23509     fi
23510   done
23511   if test -z "$ac_sed_cmds"; then
23512     ac_sed_cmds=cat
23513   fi
23514 fi # test -n "$CONFIG_FILES"
23515
23516 EOF
23517 cat >>$CONFIG_STATUS <<\EOF
23518 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23519   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23520   case $ac_file in
23521   - | *:- | *:-:* ) # input from stdin
23522         cat >$tmp/stdin
23523         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23524         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23525   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23526         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23527   * )   ac_file_in=$ac_file.in ;;
23528   esac
23529
23530   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23531   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23532          X"$ac_file" : 'X\(//\)[^/]' \| \
23533          X"$ac_file" : 'X\(//\)$' \| \
23534          X"$ac_file" : 'X\(/\)' \| \
23535          .     : '\(.\)' 2>/dev/null ||
23536 echo X"$ac_file" |
23537     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23538           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23539           /^X\(\/\/\)$/{ s//\1/; q; }
23540           /^X\(\/\).*/{ s//\1/; q; }
23541           s/.*/./; q'`
23542   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23543     { case "$ac_dir" in
23544   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23545   *)                      as_incr_dir=.;;
23546 esac
23547 as_dummy="$ac_dir"
23548 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23549   case $as_mkdir_dir in
23550     # Skip DOS drivespec
23551     ?:) as_incr_dir=$as_mkdir_dir ;;
23552     *)
23553       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23554       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23555     ;;
23556   esac
23557 done; }
23558
23559     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23560     # A "../" for each directory in $ac_dir_suffix.
23561     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23562   else
23563     ac_dir_suffix= ac_dots=
23564   fi
23565
23566   case $srcdir in
23567   .)  ac_srcdir=.
23568       if test -z "$ac_dots"; then
23569          ac_top_srcdir=.
23570       else
23571          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23572       fi ;;
23573   [\\/]* | ?:[\\/]* )
23574       ac_srcdir=$srcdir$ac_dir_suffix;
23575       ac_top_srcdir=$srcdir ;;
23576   *) # Relative path.
23577     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23578     ac_top_srcdir=$ac_dots$srcdir ;;
23579   esac
23580
23581   case $INSTALL in
23582   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23583   *) ac_INSTALL=$ac_dots$INSTALL ;;
23584   esac
23585
23586   if test x"$ac_file" != x-; then
23587     { echo "$as_me:23587: creating $ac_file" >&5
23588 echo "$as_me: creating $ac_file" >&6;}
23589     rm -f "$ac_file"
23590   fi
23591   # Let's still pretend it is `configure' which instantiates (i.e., don't
23592   # use $as_me), people would be surprised to read:
23593   #    /* config.h.  Generated automatically by config.status.  */
23594   configure_input="Generated automatically from `echo $ac_file_in |
23595                                                  sed 's,.*/,,'` by configure."
23596
23597   # First look for the input files in the build tree, otherwise in the
23598   # src tree.
23599   ac_file_inputs=`IFS=:
23600     for f in $ac_file_in; do
23601       case $f in
23602       -) echo $tmp/stdin ;;
23603       [\\/$]*)
23604          # Absolute (can't be DOS-style, as IFS=:)
23605          test -f "$f" || { { echo "$as_me:23605: error: cannot find input file: $f" >&5
23606 echo "$as_me: error: cannot find input file: $f" >&2;}
23607    { (exit 1); exit 1; }; }
23608          echo $f;;
23609       *) # Relative
23610          if test -f "$f"; then
23611            # Build tree
23612            echo $f
23613          elif test -f "$srcdir/$f"; then
23614            # Source tree
23615            echo $srcdir/$f
23616          else
23617            # /dev/null tree
23618            { { echo "$as_me:23618: error: cannot find input file: $f" >&5
23619 echo "$as_me: error: cannot find input file: $f" >&2;}
23620    { (exit 1); exit 1; }; }
23621          fi;;
23622       esac
23623     done` || { (exit 1); exit 1; }
23624 EOF
23625 cat >>$CONFIG_STATUS <<\EOF
23626   ac_warn_datarootdir=no
23627   if test x"$ac_file" != x-; then
23628     for ac_item in $ac_file_inputs
23629     do
23630       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23631       if test -n "$ac_seen"; then
23632         ac_used=`grep '@datarootdir@' $ac_item`
23633         if test -z "$ac_used"; then
23634           { echo "$as_me:23634: WARNING: datarootdir was used implicitly but not set:
23635 $ac_seen" >&5
23636 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23637 $ac_seen" >&2;}
23638           ac_warn_datarootdir=yes
23639         fi
23640       fi
23641       ac_seen=`grep '${datarootdir}' $ac_item`
23642       if test -n "$ac_seen"; then
23643         { echo "$as_me:23643: WARNING: datarootdir was used explicitly but not set:
23644 $ac_seen" >&5
23645 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23646 $ac_seen" >&2;}
23647         ac_warn_datarootdir=yes
23648       fi
23649     done
23650   fi
23651
23652 if test "x$ac_warn_datarootdir" = xyes; then
23653   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23654 fi
23655
23656 EOF
23657 cat >>$CONFIG_STATUS <<EOF
23658   sed "$ac_vpsub
23659 $extrasub
23660 EOF
23661 cat >>$CONFIG_STATUS <<\EOF
23662 :t
23663 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23664 s,@configure_input@,$configure_input,;t t
23665 s,@srcdir@,$ac_srcdir,;t t
23666 s,@top_srcdir@,$ac_top_srcdir,;t t
23667 s,@INSTALL@,$ac_INSTALL,;t t
23668 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23669   rm -f $tmp/stdin
23670   if test x"$ac_file" != x-; then
23671     cp $tmp/out $ac_file
23672
23673     for ac_name in prefix exec_prefix datarootdir
23674     do
23675         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23676         if test -n "$ac_seen"; then
23677             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23678             if test -z "$ac_init"; then
23679               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23680               { echo "$as_me:23680: WARNING: Variable $ac_name is used but was not set:
23681 $ac_seen" >&5
23682 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23683 $ac_seen" >&2;}
23684             fi
23685         fi
23686     done
23687     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23688     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23689     if test -s $tmp/out; then
23690       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23691       { echo "$as_me:23691: WARNING: Some variables may not be substituted:
23692 $ac_seen" >&5
23693 echo "$as_me: WARNING: Some variables may not be substituted:
23694 $ac_seen" >&2;}
23695     fi
23696   else
23697     cat $tmp/out
23698   fi
23699   rm -f $tmp/out
23700
23701 done
23702 EOF
23703 cat >>$CONFIG_STATUS <<\EOF
23704
23705 #
23706 # CONFIG_HEADER section.
23707 #
23708
23709 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23710 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23711 #
23712 # ac_d sets the value in "#define NAME VALUE" lines.
23713 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23714 ac_dB='[        ].*$,\1#\2'
23715 ac_dC=' '
23716 ac_dD=',;t'
23717 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23718 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23719 ac_iB='\([      ]\),\1#\2define\3'
23720 ac_iC=' '
23721 ac_iD='\4,;t'
23722 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23723 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23724 ac_uB='$,\1#\2define\3'
23725 ac_uC=' '
23726 ac_uD=',;t'
23727
23728 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23729   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23730   case $ac_file in
23731   - | *:- | *:-:* ) # input from stdin
23732         cat >$tmp/stdin
23733         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23734         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23735   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23736         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23737   * )   ac_file_in=$ac_file.in ;;
23738   esac
23739
23740   test x"$ac_file" != x- && { echo "$as_me:23740: creating $ac_file" >&5
23741 echo "$as_me: creating $ac_file" >&6;}
23742
23743   # First look for the input files in the build tree, otherwise in the
23744   # src tree.
23745   ac_file_inputs=`IFS=:
23746     for f in $ac_file_in; do
23747       case $f in
23748       -) echo $tmp/stdin ;;
23749       [\\/$]*)
23750          # Absolute (can't be DOS-style, as IFS=:)
23751          test -f "$f" || { { echo "$as_me:23751: error: cannot find input file: $f" >&5
23752 echo "$as_me: error: cannot find input file: $f" >&2;}
23753    { (exit 1); exit 1; }; }
23754          echo $f;;
23755       *) # Relative
23756          if test -f "$f"; then
23757            # Build tree
23758            echo $f
23759          elif test -f "$srcdir/$f"; then
23760            # Source tree
23761            echo $srcdir/$f
23762          else
23763            # /dev/null tree
23764            { { echo "$as_me:23764: error: cannot find input file: $f" >&5
23765 echo "$as_me: error: cannot find input file: $f" >&2;}
23766    { (exit 1); exit 1; }; }
23767          fi;;
23768       esac
23769     done` || { (exit 1); exit 1; }
23770   # Remove the trailing spaces.
23771   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23772
23773 EOF
23774
23775 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23776 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23777 # be either 'cat' or 'sort'.
23778 cat confdefs.h | uniq >conftest.vals
23779
23780 # Break up conftest.vals because some shells have a limit on
23781 # the size of here documents, and old seds have small limits too.
23782
23783 rm -f conftest.tail
23784 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23785 while grep . conftest.vals >/dev/null
23786 do
23787   # Write chunks of a limited-size here document to conftest.frag.
23788   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23789   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23790   echo 'CEOF' >> $CONFIG_STATUS
23791   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23792   rm -f conftest.vals
23793   mv conftest.tail conftest.vals
23794 done
23795 rm -f conftest.vals
23796
23797 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23798 # marker @DEFS@.
23799 echo '  cat >> conftest.edit <<CEOF
23800 /@DEFS@/r conftest.frag
23801 /@DEFS@/d
23802 CEOF
23803 sed -f conftest.edit $tmp/in > $tmp/out
23804 rm -f $tmp/in
23805 mv $tmp/out $tmp/in
23806 rm -f conftest.edit conftest.frag
23807 ' >> $CONFIG_STATUS
23808
23809 cat >>$CONFIG_STATUS <<\EOF
23810   # Let's still pretend it is `configure' which instantiates (i.e., don't
23811   # use $as_me), people would be surprised to read:
23812   #    /* config.h.  Generated automatically by config.status.  */
23813   if test x"$ac_file" = x-; then
23814     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23815   else
23816     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23817   fi
23818   cat $tmp/in >>$tmp/config.h
23819   rm -f $tmp/in
23820   if test x"$ac_file" != x-; then
23821     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23822       { echo "$as_me:23822: $ac_file is unchanged" >&5
23823 echo "$as_me: $ac_file is unchanged" >&6;}
23824     else
23825       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23826          X"$ac_file" : 'X\(//\)[^/]' \| \
23827          X"$ac_file" : 'X\(//\)$' \| \
23828          X"$ac_file" : 'X\(/\)' \| \
23829          .     : '\(.\)' 2>/dev/null ||
23830 echo X"$ac_file" |
23831     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23832           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23833           /^X\(\/\/\)$/{ s//\1/; q; }
23834           /^X\(\/\).*/{ s//\1/; q; }
23835           s/.*/./; q'`
23836       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23837         { case "$ac_dir" in
23838   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23839   *)                      as_incr_dir=.;;
23840 esac
23841 as_dummy="$ac_dir"
23842 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23843   case $as_mkdir_dir in
23844     # Skip DOS drivespec
23845     ?:) as_incr_dir=$as_mkdir_dir ;;
23846     *)
23847       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23848       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23849     ;;
23850   esac
23851 done; }
23852
23853       fi
23854       rm -f $ac_file
23855       mv $tmp/config.h $ac_file
23856     fi
23857   else
23858     cat $tmp/config.h
23859     rm -f $tmp/config.h
23860   fi
23861 done
23862 EOF
23863 cat >>$CONFIG_STATUS <<\EOF
23864 #
23865 # CONFIG_COMMANDS section.
23866 #
23867 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23868   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23869   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23870
23871   case $ac_dest in
23872     default )
23873 if test "x$cf_with_tests" != xno ; then
23874
23875 for cf_dir in test
23876 do
23877         if test ! -d $srcdir/$cf_dir; then
23878                 continue
23879         elif test -f $srcdir/$cf_dir/programs; then
23880                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23881         fi
23882 done
23883
23884 fi
23885
23886 cf_prefix=$LIB_PREFIX
23887
23888 case $cf_cv_shlib_version in
23889 (cygdll|msysdll|mingw)
23890         TINFO_NAME=$TINFO_ARG_SUFFIX
23891         TINFO_SUFFIX=.dll
23892         ;;
23893 esac
23894
23895 if test -n "$TINFO_SUFFIX" ; then
23896         case $TINFO_SUFFIX in
23897         (tw*)
23898                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23899                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23900                 ;;
23901         (t*)
23902                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23903                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23904                 ;;
23905         (w*)
23906                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23907                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23908                 ;;
23909         esac
23910 fi
23911
23912 for cf_dir in $SRC_SUBDIRS
23913 do
23914         if test ! -d $srcdir/$cf_dir ; then
23915                 continue
23916         elif test -f $srcdir/$cf_dir/modules; then
23917
23918                 SHARED_LIB=
23919                 Libs_To_Make=
23920                 cf_awk_program=
23921                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23922                 then
23923                         cf_awk_program="$cf_awk_program\
23924 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
23925 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
23926 "
23927                 fi
23928
23929                 if test "x$WILDCARD_SYMS" = xno
23930                 then
23931                         cf_awk_program="$cf_awk_program\
23932 /[      ]_\\*;/ { skip=1; next; }\
23933 "
23934                 fi
23935
23936                 if test "x$cf_awk_program" != "x"
23937                 then
23938                         cat >>$cf_dir/Makefile <<CF_EOF
23939
23940 # Generated by CF_LIB_RULES
23941 resulting.map: $UNALTERED_SYMS
23942         $AWK 'BEGIN { skip = 1; last=""; } \
23943 $cf_awk_program \
23944 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
23945  skip = 0; last = \$\$0; } \
23946 END { print last; }' < $UNALTERED_SYMS >\$@
23947
23948 distclean::
23949         rm -f resulting.map
23950 CF_EOF
23951                 fi
23952
23953                 for cf_item in $cf_LIST_MODELS
23954                 do
23955
23956         case X$cf_item in
23957         (Xlibtool)
23958                 cf_suffix='.la'
23959                 cf_depsuf=$cf_suffix
23960                 ;;
23961         (Xdebug)
23962                 cf_suffix='_g.a'
23963                 cf_depsuf=$cf_suffix
23964                 ;;
23965         (Xprofile)
23966                 cf_suffix='_p.a'
23967                 cf_depsuf=$cf_suffix
23968                 ;;
23969         (Xshared)
23970                 case $cf_cv_system_name in
23971                 (aix[5-7]*)
23972                         cf_suffix='.so'
23973                         cf_depsuf=$cf_suffix
23974                         ;;
23975                 (cygwin*|msys*|mingw*)
23976                         cf_suffix='.dll'
23977                         cf_depsuf='.dll.a'
23978                         ;;
23979                 (darwin*)
23980                         cf_suffix='.dylib'
23981                         cf_depsuf=$cf_suffix
23982                         ;;
23983                 (hpux*)
23984                         case $target in
23985                         (ia64*)
23986                                 cf_suffix='.so'
23987                                 cf_depsuf=$cf_suffix
23988                                 ;;
23989                         (*)
23990                                 cf_suffix='.sl'
23991                                 cf_depsuf=$cf_suffix
23992                                 ;;
23993                         esac
23994                         ;;
23995                 (*)
23996                         cf_suffix='.so'
23997                         cf_depsuf=$cf_suffix
23998                         ;;
23999                 esac
24000                 ;;
24001         (*)
24002                 cf_suffix='.a'
24003                 cf_depsuf=$cf_suffix
24004                 ;;
24005         esac
24006         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24007         then
24008                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24009                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24010         fi
24011
24012                         cf_libname=$cf_dir
24013                         test "$cf_dir" = c++ && cf_libname=ncurses++
24014                         if test $cf_item = shared ; then
24015                                 if test -n "${LIB_SUFFIX}"
24016                                 then
24017                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24018                                 else
24019                                         cf_shared_suffix="$cf_suffix"
24020                                 fi
24021                                 if test "$cf_cv_do_symlinks" = yes ; then
24022                                         cf_version_name=
24023
24024                                         case "$cf_cv_shlib_version" in
24025                                         (rel)
24026                                                 cf_version_name=REL_VERSION
24027                                                 ;;
24028                                         (abi)
24029                                                 cf_version_name=ABI_VERSION
24030                                                 ;;
24031                                         esac
24032
24033                                         if test -n "$cf_version_name"
24034                                         then
24035                                                 case "$cf_cv_system_name" in
24036                                                 (darwin*)
24037                                                         # "w", etc?
24038                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24039                                                         ;;
24040                                                 (*)
24041                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24042                                                         ;;
24043                                                 esac
24044                                         fi
24045                                         if test -n "${USE_LIB_SUFFIX}"
24046                                         then
24047                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24048                                         else
24049                                                 cf_shared_suffix="$cf_suffix"
24050                                         fi
24051                                 fi
24052                                 # cygwin needs import library, and has unique naming convention
24053                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24054                                 # use 'cyg' prefix for shared lib.
24055                                 case $cf_cv_shlib_version in
24056                                 (cygdll)
24057                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24058                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24059                                         ;;
24060                                 (msysdll)
24061                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24062                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24063                                         ;;
24064                                 (mingw)
24065                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24066                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24067                                         ;;
24068                                 (*)
24069                                         cf_add_lib=
24070                                         ;;
24071                                 esac
24072                                 if test -n "$cf_add_lib"
24073                                 then
24074                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24075                                         continue
24076                                 fi
24077                         fi
24078                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24079                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24080                 done
24081
24082                 if test $cf_dir = ncurses ; then
24083                         cf_subsets="$LIB_SUBSETS"
24084                         cf_r_parts="$cf_subsets"
24085                         cf_liblist="$Libs_To_Make"
24086
24087                         while test -n "$cf_r_parts"
24088                         do
24089                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24090                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24091                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24092                                         cf_add_lib=
24093                                         case $cf_l_parts in
24094                                         (*termlib*)
24095                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24096                                                 ;;
24097                                         (*ticlib*)
24098                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24099                                                 ;;
24100                                         (*)
24101                                                 break
24102                                                 ;;
24103                                         esac
24104                                         if test -n "$cf_add_lib"; then
24105                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24106                                         fi
24107                                 else
24108                                         break
24109                                 fi
24110                         done
24111                 else
24112                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24113                 fi
24114
24115                 if test $cf_dir = c++; then
24116                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24117                                 cf_list=
24118                                 for cf_item in $Libs_To_Make
24119                                 do
24120                                         case $cf_item in
24121                                         (*.a)
24122                                                 ;;
24123                                         (*)
24124                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24125                                                 ;;
24126                                         esac
24127                                         for cf_test in $cf_list
24128                                         do
24129                                                 if test "$cf_test" = "$cf_item"
24130                                                 then
24131                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24132                                                         cf_item=
24133                                                         break
24134                                                 fi
24135                                         done
24136                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24137                                 done
24138                                 Libs_To_Make="$cf_list"
24139                         fi
24140                 fi
24141
24142                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24143                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24144                         $cf_dir/Makefile >$cf_dir/Makefile.out
24145                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24146
24147                 $AWK -f $srcdir/mk-0th.awk \
24148                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24149                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24150
24151                 for cf_subset in $cf_subsets
24152                 do
24153                         cf_subdirs=
24154                         for cf_item in $cf_LIST_MODELS
24155                         do
24156
24157                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24158
24159 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24160
24161                         CXX_MODEL=$cf_ITEM
24162                         if test "$CXX_MODEL" = SHARED; then
24163                                 case $cf_cv_shlib_version in
24164                                 (cygdll|msysdll|mingw)
24165                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24166
24167 echo "${as_me:-configure}:24167: testing overriding CXX_MODEL to SHARED ..." 1>&5
24168
24169                                         with_shared_cxx=yes
24170                                         ;;
24171                                 (*)
24172                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24173                                         ;;
24174                                 esac
24175                         fi
24176
24177         case X$cf_item in
24178         (Xlibtool)
24179                 cf_suffix='.la'
24180                 cf_depsuf=$cf_suffix
24181                 ;;
24182         (Xdebug)
24183                 cf_suffix='_g.a'
24184                 cf_depsuf=$cf_suffix
24185                 ;;
24186         (Xprofile)
24187                 cf_suffix='_p.a'
24188                 cf_depsuf=$cf_suffix
24189                 ;;
24190         (Xshared)
24191                 case $cf_cv_system_name in
24192                 (aix[5-7]*)
24193                         cf_suffix='.so'
24194                         cf_depsuf=$cf_suffix
24195                         ;;
24196                 (cygwin*|msys*|mingw*)
24197                         cf_suffix='.dll'
24198                         cf_depsuf='.dll.a'
24199                         ;;
24200                 (darwin*)
24201                         cf_suffix='.dylib'
24202                         cf_depsuf=$cf_suffix
24203                         ;;
24204                 (hpux*)
24205                         case $target in
24206                         (ia64*)
24207                                 cf_suffix='.so'
24208                                 cf_depsuf=$cf_suffix
24209                                 ;;
24210                         (*)
24211                                 cf_suffix='.sl'
24212                                 cf_depsuf=$cf_suffix
24213                                 ;;
24214                         esac
24215                         ;;
24216                 (*)
24217                         cf_suffix='.so'
24218                         cf_depsuf=$cf_suffix
24219                         ;;
24220                 esac
24221                 ;;
24222         (*)
24223                 cf_suffix='.a'
24224                 cf_depsuf=$cf_suffix
24225                 ;;
24226         esac
24227         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24228         then
24229                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24230                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24231         fi
24232
24233         case $cf_item in
24234         (libtool) cf_subdir='obj_lo'  ;;
24235         (normal)  cf_subdir='objects' ;;
24236         (debug)   cf_subdir='obj_g' ;;
24237         (profile) cf_subdir='obj_p' ;;
24238         (shared)
24239                 case $cf_cv_system_name in
24240                 (cygwin|msys)
24241                         cf_subdir='objects' ;;
24242                 (*)
24243                         cf_subdir='obj_s' ;;
24244                 esac
24245         esac
24246
24247                         # Test for case where we build libtinfo with a different name.
24248                         cf_libname=$cf_dir
24249                         if test $cf_dir = ncurses ; then
24250                                 case $cf_subset in
24251                                 (*base*)
24252                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24253                                         ;;
24254                                 (*termlib*)
24255                                         cf_libname=$TINFO_LIB_SUFFIX
24256                                         ;;
24257                                 (ticlib*)
24258                                         cf_libname=$TICS_LIB_SUFFIX
24259                                         ;;
24260                                 esac
24261                         elif test $cf_dir = c++ ; then
24262                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24263                         else
24264                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24265                         fi
24266                         if test -n "${USE_ARG_SUFFIX}" ; then
24267                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24268                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24269                         fi
24270
24271                         # These dependencies really are for development, not
24272                         # builds, but they are useful in porting, too.
24273                         cf_depend="../include/ncurses_cfg.h"
24274                         if test "$srcdir" = "."; then
24275                                 cf_reldir="."
24276                         else
24277                                 cf_reldir="\${srcdir}"
24278                         fi
24279
24280                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24281                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24282                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24283                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24284                         fi
24285
24286                         cf_dir_suffix=
24287                         old_cf_suffix="$cf_suffix"
24288                         if test "$cf_cv_shlib_version_infix" = yes ; then
24289                         if test -n "$USE_LIB_SUFFIX" ; then
24290                                 case $USE_LIB_SUFFIX in
24291                                 (tw*)
24292                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24293                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24294                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24295                                         ;;
24296                                 (t*)
24297                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24298                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24299                                         cf_dir_suffix=t$EXTRA_SUFFIX
24300                                         ;;
24301                                 (w*)
24302                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24303                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24304                                         cf_dir_suffix=w$EXTRA_SUFFIX
24305                                         ;;
24306                                 (*)
24307                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24308                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24309                                         cf_dir_suffix=$EXTRA_SUFFIX
24310                                         ;;
24311                                 esac
24312                         fi
24313                         fi
24314
24315                         $AWK -f $srcdir/mk-1st.awk \
24316                                 name=${cf_libname}${cf_dir_suffix} \
24317                                 traces=$LIB_TRACING \
24318                                 MODEL=$cf_ITEM \
24319                                 CXX_MODEL=$CXX_MODEL \
24320                                 model=$cf_subdir \
24321                                 prefix=$cf_prefix \
24322                                 suffix=$cf_suffix \
24323                                 subset=$cf_subset \
24324                                 driver=$cf_cv_term_driver \
24325                                 SymLink="$LN_S" \
24326                                 TermlibRoot=$TINFO_NAME \
24327                                 TermlibSuffix=$TINFO_SUFFIX \
24328                                 ShlibVer=$cf_cv_shlib_version \
24329                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24330                                 ReLink=${cf_cv_do_relink:-no} \
24331                                 DoLinks=$cf_cv_do_symlinks \
24332                                 rmSoLocs=$cf_cv_rm_so_locs \
24333                                 ldconfig="$LDCONFIG" \
24334                                 overwrite=$WITH_OVERWRITE \
24335                                 depend="$cf_depend" \
24336                                 host="$host" \
24337                                 libtool_version="$LIBTOOL_VERSION" \
24338                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24339
24340                         cf_suffix="$old_cf_suffix"
24341
24342                         for cf_subdir2 in $cf_subdirs lib
24343                         do
24344                                 test $cf_subdir = $cf_subdir2 && break
24345                         done
24346                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24347                         $AWK -f $srcdir/mk-2nd.awk \
24348                                 name=$cf_dir \
24349                                 traces=$LIB_TRACING \
24350                                 MODEL=$cf_ITEM \
24351                                 model=$cf_subdir \
24352                                 subset=$cf_subset \
24353                                 srcdir=$srcdir \
24354                                 echo=$WITH_ECHO \
24355                                 crenames=$cf_cv_prog_CC_c_o \
24356                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24357                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24358                         cf_subdirs="$cf_subdirs $cf_subdir"
24359                         done
24360                 done
24361         fi
24362
24363         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24364 done
24365
24366 for cf_dir in $SRC_SUBDIRS
24367 do
24368         if test ! -d $srcdir/$cf_dir ; then
24369                 continue
24370         fi
24371
24372         if test -f $cf_dir/Makefile ; then
24373                 case "$cf_dir" in
24374                 (Ada95)
24375                         echo 'libs \' >> Makefile
24376                         echo 'install.libs \' >> Makefile
24377                         echo 'uninstall.libs ::' >> Makefile
24378                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24379                         ;;
24380                 esac
24381         fi
24382
24383         if test -f $srcdir/$cf_dir/modules; then
24384                 echo >> Makefile
24385                 if test -f $srcdir/$cf_dir/headers; then
24386 cat >> Makefile <<CF_EOF
24387 install.includes \\
24388 uninstall.includes \\
24389 CF_EOF
24390                 fi
24391 if test "$cf_dir" != "c++" ; then
24392 echo 'lint \' >> Makefile
24393 fi
24394 cat >> Makefile <<CF_EOF
24395 libs \\
24396 lintlib \\
24397 install.libs \\
24398 uninstall.libs \\
24399 install.$cf_dir \\
24400 uninstall.$cf_dir ::
24401         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24402 CF_EOF
24403         elif test -f $srcdir/$cf_dir/headers; then
24404 cat >> Makefile <<CF_EOF
24405
24406 libs \\
24407 install.libs \\
24408 uninstall.libs \\
24409 install.includes \\
24410 uninstall.includes ::
24411         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24412 CF_EOF
24413 fi
24414 done
24415
24416 if test "x$cf_with_db_install" = xyes; then
24417 cat >> Makefile <<CF_EOF
24418
24419 install.libs uninstall.libs \\
24420 install.data uninstall.data ::
24421 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24422 CF_EOF
24423 else
24424 cat >> Makefile <<CF_EOF
24425
24426 install.libs uninstall.libs ::
24427         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24428 CF_EOF
24429 fi
24430
24431 if test "x$cf_with_manpages" = xyes; then
24432 cat >> Makefile <<CF_EOF
24433
24434 install.man \\
24435 uninstall.man ::
24436         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24437 CF_EOF
24438 fi
24439
24440 cat >> Makefile <<CF_EOF
24441
24442 distclean ::
24443         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24444         rm -f headers.sh headers.sed mk_shared_lib.sh
24445         rm -f edit_man.* man_alias.*
24446         rm -rf \${DIRS_TO_MAKE}
24447 CF_EOF
24448
24449 # Special case: tack's manpage lives in its own directory.
24450 if test "x$cf_with_manpages" = xyes; then
24451 if test -d tack ; then
24452 if test -f $srcdir/$tack.h; then
24453 cat >> Makefile <<CF_EOF
24454
24455 install.man \\
24456 uninstall.man ::
24457         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24458 CF_EOF
24459 fi
24460 fi
24461 fi
24462
24463 rm -f headers.sed headers.sh
24464
24465 echo creating headers.sh
24466 cat >headers.sh <<CF_EOF
24467 #! $SHELL
24468 # This shell script is generated by the 'configure' script.  It is invoked in a
24469 # subdirectory of the build tree.  It generates a sed-script in the parent
24470 # directory that is used to adjust includes for header files that reside in a
24471 # subdirectory of /usr/include, etc.
24472 PRG=""
24473 while test \$# != 3
24474 do
24475 PRG="\$PRG \$1"; shift
24476 done
24477 DST=\$1
24478 REF=\$2
24479 SRC=\$3
24480 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24481 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24482 echo installing \$SRC in \$DST
24483 CF_EOF
24484
24485 if test $WITH_CURSES_H = yes; then
24486         cat >>headers.sh <<CF_EOF
24487 case \$DST in
24488 (/*/include/*)
24489         END=\`basename \$DST\`
24490         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24491         do
24492                 NAME=\`basename \$i\`
24493                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24494         done
24495         ;;
24496 (*)
24497         echo "" >> \$TMPSED
24498         ;;
24499 esac
24500 CF_EOF
24501
24502 else
24503         cat >>headers.sh <<CF_EOF
24504 case \$DST in
24505 (/*/include/*)
24506         END=\`basename \$DST\`
24507         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24508         do
24509                 NAME=\`basename \$i\`
24510                 if test "\$NAME" = "curses.h"
24511                 then
24512                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24513                         NAME=ncurses.h
24514                 fi
24515                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24516         done
24517         ;;
24518 (*)
24519         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24520         ;;
24521 esac
24522 CF_EOF
24523 fi
24524 cat >>headers.sh <<CF_EOF
24525 rm -f \$TMPSRC
24526 sed -f \$TMPSED \$SRC > \$TMPSRC
24527 NAME=\`basename \$SRC\`
24528 CF_EOF
24529 if test $WITH_CURSES_H != yes; then
24530         cat >>headers.sh <<CF_EOF
24531 test "\$NAME" = "curses.h" && NAME=ncurses.h
24532 CF_EOF
24533 fi
24534 cat >>headers.sh <<CF_EOF
24535 # Just in case someone gzip'd manpages, remove the conflicting copy.
24536 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24537
24538 eval \$PRG \$TMPSRC \$DST/\$NAME
24539 rm -f \$TMPSRC \$TMPSED
24540 CF_EOF
24541
24542 chmod 0755 headers.sh
24543
24544 for cf_dir in $SRC_SUBDIRS
24545 do
24546         if test ! -d $srcdir/$cf_dir ; then
24547                 continue
24548         fi
24549
24550         if test -f $srcdir/$cf_dir/headers; then
24551                 $AWK -f $srcdir/mk-hdr.awk \
24552                         subset="$LIB_SUBSETS" \
24553                         compat="$WITH_CURSES_H" \
24554                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24555         fi
24556
24557         if test -f $srcdir/$cf_dir/modules; then
24558                 if test "$cf_dir" != "c++" ; then
24559                         cat >>$cf_dir/Makefile <<"CF_EOF"
24560 depend : ${AUTO_SRC}
24561         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24562
24563 # DO NOT DELETE THIS LINE -- make depend depends on it.
24564 CF_EOF
24565                 fi
24566         fi
24567 done
24568
24569 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24570 if test -z "$USE_OLD_MAKERULES" ; then
24571         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24572 fi
24573 fi
24574  ;;
24575   esac
24576 done
24577 EOF
24578
24579 cat >>$CONFIG_STATUS <<\EOF
24580
24581 { (exit 0); exit 0; }
24582 EOF
24583 chmod +x $CONFIG_STATUS
24584 ac_clean_files=$ac_clean_files_save
24585
24586 # configure is writing to config.log, and then calls config.status.
24587 # config.status does its own redirection, appending to config.log.
24588 # Unfortunately, on DOS this fails, as config.log is still kept open
24589 # by configure, so config.status won't be able to write to it; its
24590 # output is simply discarded.  So we exec the FD to /dev/null,
24591 # effectively closing config.log, so it can be properly (re)opened and
24592 # appended to by config.status.  When coming back to configure, we
24593 # need to make the FD available again.
24594 if test "$no_create" != yes; then
24595   ac_cs_success=:
24596   exec 5>/dev/null
24597   $SHELL $CONFIG_STATUS || ac_cs_success=false
24598   exec 5>>config.log
24599   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24600   # would make configure fail if this is the last instruction.
24601   $ac_cs_success || { (exit 1); exit 1; }
24602 fi
24603 ${MAKE:-make} preinstall