]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
cf197e35c727a4a79bd74a2616f94d2032916ae5
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.660 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-config-suffix=X  suffixes ncursesXX-config file
716   --with-pkg-config{=path} enable/disable use of pkg-config
717   --with-pkg-config-libdir=XXX use given directory for installing pc-files
718   --enable-pc-files       generate and install .pc files for pkg-config
719   --with-pc-suffix        suffixes pc-files
720   --enable-mixed-case     tic should assume mixed-case filenames
721   --with-install-prefix   prefixes actual install-location ($DESTDIR)
722 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
723   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
724   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
725   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
726   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
727   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
728   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
729 Options to Specify the Libraries Built/Used:
730   --disable-libtool-version  enable to use libtool's incompatible naming scheme
731   --with-libtool          generate libraries with libtool
732   --with-shared           generate shared-libraries
733   --with-normal           generate normal-libraries (default)
734   --with-debug            generate debug-libraries (default)
735   --with-profile          generate profile-libraries
736   --with-cxx-shared       generate C++ shared-libraries
737   --with-lib-prefix       override library-prefix
738   --with-termlib          generate separate terminfo library
739   --with-ticlib           generate separate tic library
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --with-libtool-opts=XXX specify additional libtool options
744   --with-export-syms=XXX  limit exported symbols using libtool
745   --with-versioned-syms=X markup versioned symbols using ld
746   --with-gpm              use Alessandro Rubini's GPM library
747   --without-dlsym         do not use dlsym() to load GPM dynamically
748   --with-pcre2            use PCRE2 for regular-expressions
749   --with-sysmouse         use sysmouse (FreeBSD console)
750   --disable-lib-suffixes  disable library suffixes
751   --disable-rpath-hack    don't add rpath options for additional libraries
752 Fine-Tuning Your Configuration:
753   --with-extra-suffix=X   append extra suffix to header/library paths
754   --disable-overwrite     put headers in subdir, omit link to -lcurses
755   --disable-database      do not use terminfo, only fallbacks/termcap
756   --with-database=XXX     specify terminfo source to install
757   --with-hashed-db        specify hashed-database library
758   --with-fallbacks=XXX    specify list of fallback terminal descriptions
759   --without-xterm-new     specify if xterm terminfo should be old version
760   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
761   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
762   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
763   --disable-big-core      assume machine has little memory
764   --disable-big-strings   assume compiler has only standard-size strings
765   --enable-termcap        compile in termcap fallback support
766   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
767   --enable-getcap         fast termcap load, no xrefs to terminfo
768   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
769   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
770   --disable-root-environ  restrict environment when running as root
771   --enable-symlinks       make tic use symbolic links not hard links
772   --enable-broken_linker  compile with broken-linker support code
773   --enable-bsdpad         recognize BSD-style prefix padding
774   --enable-widec          compile with wide-char/UTF-8 code
775   --disable-lp64          allow chtype to be long (ignore _LP64)
776   --disable-largefile     omit support for large files
777   --disable-tparm-varargs compile tparm() without varargs interface
778   --disable-tic-depends   link tic library without explicit dependency on ncurses library
779   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
780   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
781   --with-bool=TYPE        override fallback type of bool variable
782   --with-caps=alt         compile with alternate Caps file
783   --with-chtype=TYPE      override type of chtype
784   --with-ospeed=TYPE      override type of ospeed variable
785   --with-mmask-t=TYPE     override type of mmask_t
786   --with-ccharw-max=XXX   override size CCHARW_MAX
787   --enable-signed-char    compile using signed Boolean's in term.h
788   --with-tparm-arg=TYPE   override parameter type of tparm
789   --with-rcs-ids          compile-in RCS identifiers
790 Options to Specify How Manpages are Installed:
791   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
792                           optionally formatted/catonly, e.g., gzip,formatted
793   --with-manpage-renames  specify manpage-renaming
794   --with-manpage-aliases  specify manpage-aliases using .so
795   --with-manpage-symlinks specify manpage-aliases using symlinks
796   --with-manpage-tbl      specify manpage processing with tbl
797 Extensions:
798   --disable-ext-funcs     disable function-extensions
799   --enable-sp-funcs       enable SCREEN-extensions
800   --enable-term-driver    enable terminal-driver
801   --enable-const          compile with extra/non-standard const
802   --enable-ext-colors     compile for 256-color support
803   --enable-ext-mouse      compile for extended mouse-encoding
804   --enable-ext-putwin     compile with extended putwin/screendump
805   --enable-no-padding     compile with $NCURSES_NO_PADDING code
806   --enable-sigwinch       compile with SIGWINCH handler
807   --enable-tcap-names     compile with user-definable terminal capabilities
808 Reentrant Code:
809   --with-pthread          use POSIX thread library
810   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
811   --enable-weak-symbols   enable weak-symbols for pthreads
812   --enable-reentrant      compile with reentrant code
813   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
814   --enable-opaque-form    make form-library structures "opaque"
815   --enable-opaque-menu    make menu-library structures "opaque"
816   --enable-opaque-panel   make panel-library structures "opaque"
817   --with-wrap-prefix=XXX  override prefix used for public variables
818 Development Code:
819   --without-develop       disable development options
820   --enable-hard-tabs      compile with hard-tabs code
821   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
822 Experimental Code:
823   --disable-assumed-color do not assume anything about default-colors
824   --disable-hashmap       compile without hashmap scrolling-optimization
825   --enable-colorfgbg      compile-in experimental $COLORFGBG code
826   --enable-interop        compile-in interop bindings
827   --enable-safe-sprintf   compile with experimental safe-sprintf code
828   --disable-scroll-hints  compile without scroll-hints code
829   --enable-wgetch-events  compile with wgetch-events code
830 Testing/development Options:
831   --disable-echo          do not display "compiling" commands
832   --disable-stripping     do not strip installed executables
833   --enable-warnings       build: turn on GCC compiler warnings
834   --enable-string-hacks   work around bogus compiler/loader warnings
835   --enable-assertions     test: turn on generation of assertion code
836   --with-dmalloc          test: use Gray Watson's dmalloc library
837   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
838   --with-valgrind         test: use valgrind
839   --disable-leaks         test: free permanent memory, analyze leaks
840   --enable-expanded       test: generate functions for certain macros
841   --disable-macros        test: use functions rather than macros
842   --with-trace            test: add trace() function to all models of ncurses
843   --disable-gnat-projects test: disable GNAT projects even if usable
844 Ada95 Binding Options:
845   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
846   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
847   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
848   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
849
850 Some influential environment variables:
851   CC          C compiler command
852   CFLAGS      C compiler flags
853   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
854               nonstandard directory <lib dir>
855   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
856               headers in a nonstandard directory <include dir>
857   CPP         C preprocessor
858   CXX         C++ compiler command
859   CXXFLAGS    C++ compiler flags
860   CXXCPP      C++ preprocessor
861
862 Use these variables to override the choices made by `configure' or to help
863 it to find libraries and programs with nonstandard names/locations.
864
865 EOF
866 fi
867
868 if test "$ac_init_help" = "recursive"; then
869   # If there are subdirs, report their specific --help.
870   ac_popdir=`pwd`
871   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
872     cd $ac_subdir
873     # A "../" for each directory in /$ac_subdir.
874     ac_dots=`echo $ac_subdir |
875              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
876
877     case $srcdir in
878     .) # No --srcdir option.  We are building in place.
879       ac_sub_srcdir=$srcdir ;;
880     [\\/]* | ?:[\\/]* ) # Absolute path.
881       ac_sub_srcdir=$srcdir/$ac_subdir ;;
882     *) # Relative path.
883       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
884     esac
885
886     # Check for guested configure; otherwise get Cygnus style configure.
887     if test -f $ac_sub_srcdir/configure.gnu; then
888       echo
889       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
890     elif test -f $ac_sub_srcdir/configure; then
891       echo
892       $SHELL $ac_sub_srcdir/configure  --help=recursive
893     elif test -f $ac_sub_srcdir/configure.ac ||
894            test -f $ac_sub_srcdir/configure.in; then
895       echo
896       $ac_configure --help
897     else
898       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
899     fi
900     cd $ac_popdir
901   done
902 fi
903
904 test -n "$ac_init_help" && exit 0
905 if $ac_init_version; then
906   cat <<\EOF
907
908 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
909 Free Software Foundation, Inc.
910 This configure script is free software; the Free Software Foundation
911 gives unlimited permission to copy, distribute and modify it.
912 EOF
913   exit 0
914 fi
915 exec 5>config.log
916 cat >&5 <<EOF
917 This file contains any messages produced by compilers while
918 running configure, to aid debugging if configure makes a mistake.
919
920 It was created by $as_me, which was
921 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
922
923   $ $0 $@
924
925 EOF
926 {
927 cat <<_ASUNAME
928 ## ---------- ##
929 ## Platform.  ##
930 ## ---------- ##
931
932 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
933 uname -m = `(uname -m) 2>/dev/null || echo unknown`
934 uname -r = `(uname -r) 2>/dev/null || echo unknown`
935 uname -s = `(uname -s) 2>/dev/null || echo unknown`
936 uname -v = `(uname -v) 2>/dev/null || echo unknown`
937
938 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
939 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
940
941 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
942 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
943 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
944 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
945 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
946 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
947 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
948
949 PATH = $PATH
950
951 _ASUNAME
952 } >&5
953
954 cat >&5 <<EOF
955 ## ------------ ##
956 ## Core tests.  ##
957 ## ------------ ##
958
959 EOF
960
961 # Keep a trace of the command line.
962 # Strip out --no-create and --no-recursion so they do not pile up.
963 # Also quote any args containing shell meta-characters.
964 ac_configure_args=
965 ac_sep=
966 for ac_arg
967 do
968   case $ac_arg in
969   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
970   | --no-cr | --no-c) ;;
971   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
972   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
973   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
974     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
975     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
976     ac_sep=" " ;;
977   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
978      ac_sep=" " ;;
979   esac
980   # Get rid of the leading space.
981 done
982
983 # When interrupted or exit'd, cleanup temporary files, and complete
984 # config.log.  We remove comments because anyway the quotes in there
985 # would cause problems or look ugly.
986 trap 'exit_status=$?
987   # Save into config.log some information that might help in debugging.
988   echo >&5
989   echo "## ----------------- ##" >&5
990   echo "## Cache variables.  ##" >&5
991   echo "## ----------------- ##" >&5
992   echo >&5
993   # The following way of writing the cache mishandles newlines in values,
994 {
995   (set) 2>&1 |
996     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
997     *ac_space=\ *)
998       sed -n \
999         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1000           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1001       ;;
1002     *)
1003       sed -n \
1004         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1005       ;;
1006     esac;
1007 } >&5
1008   sed "/^$/d" confdefs.h >conftest.log
1009   if test -s conftest.log; then
1010     echo >&5
1011     echo "## ------------ ##" >&5
1012     echo "## confdefs.h.  ##" >&5
1013     echo "## ------------ ##" >&5
1014     echo >&5
1015     cat conftest.log >&5
1016   fi
1017   (echo; echo) >&5
1018   test "$ac_signal" != 0 &&
1019     echo "$as_me: caught signal $ac_signal" >&5
1020   echo "$as_me: exit $exit_status" >&5
1021   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1022     exit $exit_status
1023      ' 0
1024 for ac_signal in 1 2 13 15; do
1025   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1026 done
1027 ac_signal=0
1028
1029 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1030 rm -rf conftest* confdefs.h
1031 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1032 echo >confdefs.h
1033
1034 # Let the site file select an alternate cache file if it wants to.
1035 # Prefer explicitly selected file to automatically selected ones.
1036 if test -z "$CONFIG_SITE"; then
1037   if test "x$prefix" != xNONE; then
1038     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1039   else
1040     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1041   fi
1042 fi
1043 for ac_site_file in $CONFIG_SITE; do
1044   if test -r "$ac_site_file"; then
1045     { echo "$as_me:1045: loading site script $ac_site_file" >&5
1046 echo "$as_me: loading site script $ac_site_file" >&6;}
1047     cat "$ac_site_file" >&5
1048     . "$ac_site_file"
1049   fi
1050 done
1051
1052 if test -r "$cache_file"; then
1053   # Some versions of bash will fail to source /dev/null (special
1054   # files actually), so we avoid doing that.
1055   if test -f "$cache_file"; then
1056     { echo "$as_me:1056: loading cache $cache_file" >&5
1057 echo "$as_me: loading cache $cache_file" >&6;}
1058     case $cache_file in
1059       [\\/]* | ?:[\\/]* ) . $cache_file;;
1060       *)                      . ./$cache_file;;
1061     esac
1062   fi
1063 else
1064   { echo "$as_me:1064: creating cache $cache_file" >&5
1065 echo "$as_me: creating cache $cache_file" >&6;}
1066   >$cache_file
1067 fi
1068
1069 # Check that the precious variables saved in the cache have kept the same
1070 # value.
1071 ac_cache_corrupted=false
1072 for ac_var in `(set) 2>&1 |
1073                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1074   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1075   eval ac_new_set=\$ac_env_${ac_var}_set
1076   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1077   eval ac_new_val="\$ac_env_${ac_var}_value"
1078   case $ac_old_set,$ac_new_set in
1079     set,)
1080       { echo "$as_me:1080: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1081 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1082       ac_cache_corrupted=: ;;
1083     ,set)
1084       { echo "$as_me:1084: error: \`$ac_var' was not set in the previous run" >&5
1085 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1086       ac_cache_corrupted=: ;;
1087     ,);;
1088     *)
1089       if test "x$ac_old_val" != "x$ac_new_val"; then
1090         { echo "$as_me:1090: error: \`$ac_var' has changed since the previous run:" >&5
1091 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1092         { echo "$as_me:1092:   former value:  $ac_old_val" >&5
1093 echo "$as_me:   former value:  $ac_old_val" >&2;}
1094         { echo "$as_me:1094:   current value: $ac_new_val" >&5
1095 echo "$as_me:   current value: $ac_new_val" >&2;}
1096         ac_cache_corrupted=:
1097       fi;;
1098   esac
1099   # Pass precious variables to config.status.  It doesn't matter if
1100   # we pass some twice (in addition to the command line arguments).
1101   if test "$ac_new_set" = set; then
1102     case $ac_new_val in
1103     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1104       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1105       ac_configure_args="$ac_configure_args '$ac_arg'"
1106       ;;
1107     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1108        ;;
1109     esac
1110   fi
1111 done
1112 if $ac_cache_corrupted; then
1113   { echo "$as_me:1113: error: changes in the environment can compromise the build" >&5
1114 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1115   { { echo "$as_me:1115: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1116 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1117    { (exit 1); exit 1; }; }
1118 fi
1119
1120 ac_ext=c
1121 ac_cpp='$CPP $CPPFLAGS'
1122 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1123 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1125 ac_main_return=return
1126
1127 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1128   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1129                    ECHO_T='     ' ;;
1130   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1131   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1132 esac
1133 echo "#! $SHELL" >conftest.sh
1134 echo  "exit 0"   >>conftest.sh
1135 chmod +x conftest.sh
1136 if { (echo "$as_me:1136: PATH=\".;.\"; conftest.sh") >&5
1137   (PATH=".;."; conftest.sh) 2>&5
1138   ac_status=$?
1139   echo "$as_me:1139: \$? = $ac_status" >&5
1140   (exit $ac_status); }; then
1141   ac_path_separator=';'
1142 else
1143   ac_path_separator=:
1144 fi
1145 PATH_SEPARATOR="$ac_path_separator"
1146 rm -f conftest.sh
1147
1148 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1149
1150 top_builddir=`pwd`
1151
1152 echo "$as_me:1152: checking for egrep" >&5
1153 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1154 if test "${ac_cv_prog_egrep+set}" = set; then
1155   echo $ECHO_N "(cached) $ECHO_C" >&6
1156 else
1157   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1158                 then ac_cv_prog_egrep='grep -E'
1159                 else ac_cv_prog_egrep='egrep'
1160         fi
1161 fi
1162 echo "$as_me:1162: result: $ac_cv_prog_egrep" >&5
1163 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1164         EGREP=$ac_cv_prog_egrep
1165
1166         test -z "$EGREP" && { { echo "$as_me:1166: error: No egrep program found" >&5
1167 echo "$as_me: error: No egrep program found" >&2;}
1168    { (exit 1); exit 1; }; }
1169
1170 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1171 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1172 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1173 cf_cv_abi_version=${NCURSES_MAJOR}
1174 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1175 cf_cv_timestamp=`date`
1176 echo "$as_me:1176: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1177 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1178
1179 if test -f $srcdir/VERSION ; then
1180         echo "$as_me:1180: checking for package version" >&5
1181 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1182
1183         # if there are not enough fields, cut returns the last one...
1184         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1185         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1186         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1187
1188         # this is how CF_BUNDLED_INTL uses $VERSION:
1189         VERSION="$cf_field1"
1190
1191         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1192         test -z "$VERSION_MAJOR" && { { echo "$as_me:1192: error: missing major-version" >&5
1193 echo "$as_me: error: missing major-version" >&2;}
1194    { (exit 1); exit 1; }; }
1195
1196         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1197         test -z "$VERSION_MINOR" && { { echo "$as_me:1197: error: missing minor-version" >&5
1198 echo "$as_me: error: missing minor-version" >&2;}
1199    { (exit 1); exit 1; }; }
1200
1201         echo "$as_me:1201: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1202 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1203
1204         echo "$as_me:1204: checking for package patch date" >&5
1205 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1206         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1207         case .$VERSION_PATCH in
1208         (.)
1209                 { { echo "$as_me:1209: error: missing patch-date $VERSION_PATCH" >&5
1210 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1211    { (exit 1); exit 1; }; }
1212                 ;;
1213         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1214                 ;;
1215         (*)
1216                 { { echo "$as_me:1216: error: illegal patch-date $VERSION_PATCH" >&5
1217 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1218    { (exit 1); exit 1; }; }
1219                 ;;
1220         esac
1221         echo "$as_me:1221: result: $VERSION_PATCH" >&5
1222 echo "${ECHO_T}$VERSION_PATCH" >&6
1223 else
1224         { { echo "$as_me:1224: error: did not find $srcdir/VERSION" >&5
1225 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1226    { (exit 1); exit 1; }; }
1227 fi
1228
1229 # show the actual data that we have for versions:
1230 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1231
1232 echo "${as_me:-configure}:1232: testing ABI VERSION $VERSION ..." 1>&5
1233
1234 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1235
1236 echo "${as_me:-configure}:1236: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1237
1238 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1239
1240 echo "${as_me:-configure}:1240: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1241
1242 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1243
1244 echo "${as_me:-configure}:1244: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1245
1246         cf_PACKAGE=NCURSES
1247         PACKAGE=ncurses
1248
1249 cat >>confdefs.h <<EOF
1250 #define PACKAGE "$PACKAGE"
1251 EOF
1252
1253 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1254
1255         cat >>confdefs.h <<EOF
1256 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1257 EOF
1258
1259         cat >>confdefs.h <<EOF
1260 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1261 EOF
1262
1263 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1264
1265 # Check whether --with-rel-version or --without-rel-version was given.
1266 if test "${with_rel_version+set}" = set; then
1267   withval="$with_rel_version"
1268   { echo "$as_me:1268: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1269 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1270  cf_cv_rel_version=$withval
1271 fi;
1272
1273  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1274  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1275
1276 if test -n "$NCURSES_MAJOR" ; then
1277   case $NCURSES_MAJOR in
1278   ([0-9]*)
1279         ;;
1280   (*)
1281         { { echo "$as_me:1281: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1282 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1283    { (exit 1); exit 1; }; }
1284         ;;
1285   esac
1286 else
1287   { { echo "$as_me:1287: error: Release major-version value is empty" >&5
1288 echo "$as_me: error: Release major-version value is empty" >&2;}
1289    { (exit 1); exit 1; }; }
1290 fi
1291
1292 if test -n "$NCURSES_MINOR" ; then
1293   case $NCURSES_MINOR in
1294   ([0-9]*)
1295         ;;
1296   (*)
1297         { { echo "$as_me:1297: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1298 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1299    { (exit 1); exit 1; }; }
1300         ;;
1301   esac
1302 else
1303   { { echo "$as_me:1303: error: Release minor-version value is empty" >&5
1304 echo "$as_me: error: Release minor-version value is empty" >&2;}
1305    { (exit 1); exit 1; }; }
1306 fi
1307
1308 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1309
1310 # Check whether --with-abi-version or --without-abi-version was given.
1311 if test "${with_abi_version+set}" = set; then
1312   withval="$with_abi_version"
1313
1314         if test "x$cf_cv_abi_version" != "x$withval"
1315         then
1316                 { echo "$as_me:1316: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1317 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1318                 case $cf_cv_rel_version in
1319                 (5.*)
1320                         cf_cv_rel_version=$withval.0
1321                         ;;
1322                 (6.*)
1323                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1324                         ;;
1325                 esac
1326         fi
1327         cf_cv_abi_version=$withval
1328 fi;
1329
1330 if test -n "$cf_cv_abi_version" ; then
1331   case $cf_cv_abi_version in
1332   ([0-9]*)
1333         ;;
1334   (*)
1335         { { echo "$as_me:1335: error: ABI version is not a number: $cf_cv_abi_version" >&5
1336 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1337    { (exit 1); exit 1; }; }
1338         ;;
1339   esac
1340 else
1341   { { echo "$as_me:1341: error: ABI version value is empty" >&5
1342 echo "$as_me: error: ABI version value is empty" >&2;}
1343    { (exit 1); exit 1; }; }
1344 fi
1345
1346 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1347 then
1348         case $cf_cv_rel_version in
1349         (5.*)
1350                 cf_cv_rel_version=$with_abi_version.0
1351                 ;;
1352         esac
1353 fi
1354
1355 ac_aux_dir=
1356 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1357   if test -f $ac_dir/install-sh; then
1358     ac_aux_dir=$ac_dir
1359     ac_install_sh="$ac_aux_dir/install-sh -c"
1360     break
1361   elif test -f $ac_dir/install.sh; then
1362     ac_aux_dir=$ac_dir
1363     ac_install_sh="$ac_aux_dir/install.sh -c"
1364     break
1365   elif test -f $ac_dir/shtool; then
1366     ac_aux_dir=$ac_dir
1367     ac_install_sh="$ac_aux_dir/shtool install -c"
1368     break
1369   fi
1370 done
1371 if test -z "$ac_aux_dir"; then
1372   { { echo "$as_me:1372: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1373 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1374    { (exit 1); exit 1; }; }
1375 fi
1376 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1377 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1378 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1379
1380 # Make sure we can run config.sub.
1381 $ac_config_sub sun4 >/dev/null 2>&1 ||
1382   { { echo "$as_me:1382: error: cannot run $ac_config_sub" >&5
1383 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1384    { (exit 1); exit 1; }; }
1385
1386 echo "$as_me:1386: checking build system type" >&5
1387 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1388 if test "${ac_cv_build+set}" = set; then
1389   echo $ECHO_N "(cached) $ECHO_C" >&6
1390 else
1391   ac_cv_build_alias=$build_alias
1392 test -z "$ac_cv_build_alias" &&
1393   ac_cv_build_alias=`$ac_config_guess`
1394 test -z "$ac_cv_build_alias" &&
1395   { { echo "$as_me:1395: error: cannot guess build type; you must specify one" >&5
1396 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1397    { (exit 1); exit 1; }; }
1398 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1399   { { echo "$as_me:1399: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1400 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1401    { (exit 1); exit 1; }; }
1402
1403 fi
1404 echo "$as_me:1404: result: $ac_cv_build" >&5
1405 echo "${ECHO_T}$ac_cv_build" >&6
1406 build=$ac_cv_build
1407 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1408 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1409 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1410
1411 echo "$as_me:1411: checking host system type" >&5
1412 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1413 if test "${ac_cv_host+set}" = set; then
1414   echo $ECHO_N "(cached) $ECHO_C" >&6
1415 else
1416   ac_cv_host_alias=$host_alias
1417 test -z "$ac_cv_host_alias" &&
1418   ac_cv_host_alias=$ac_cv_build_alias
1419 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1420   { { echo "$as_me:1420: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1421 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1422    { (exit 1); exit 1; }; }
1423
1424 fi
1425 echo "$as_me:1425: result: $ac_cv_host" >&5
1426 echo "${ECHO_T}$ac_cv_host" >&6
1427 host=$ac_cv_host
1428 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1429 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1430 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1431
1432 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1433         echo "$as_me:1433: checking target system type" >&5
1434 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1435 if test "${ac_cv_target+set}" = set; then
1436   echo $ECHO_N "(cached) $ECHO_C" >&6
1437 else
1438   ac_cv_target_alias=$target_alias
1439 test "x$ac_cv_target_alias" = "x" &&
1440   ac_cv_target_alias=$ac_cv_host_alias
1441 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1442   { { echo "$as_me:1442: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1443 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1444    { (exit 1); exit 1; }; }
1445
1446 fi
1447 echo "$as_me:1447: result: $ac_cv_target" >&5
1448 echo "${ECHO_T}$ac_cv_target" >&6
1449 target=$ac_cv_target
1450 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1451 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1452 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1453
1454 # The aliases save the names the user supplied, while $host etc.
1455 # will get canonicalized.
1456 test -n "$target_alias" &&
1457   test "$program_prefix$program_suffix$program_transform_name" = \
1458     NONENONEs,x,x, &&
1459   program_prefix=${target_alias}-
1460         system_name="$host_os"
1461 else
1462         system_name="`(uname -s -r) 2>/dev/null`"
1463         if test -z "$system_name" ; then
1464                 system_name="`(hostname) 2>/dev/null`"
1465         fi
1466 fi
1467 test -n "$system_name" &&
1468 cat >>confdefs.h <<EOF
1469 #define SYSTEM_NAME "$system_name"
1470 EOF
1471
1472 if test "${cf_cv_system_name+set}" = set; then
1473   echo $ECHO_N "(cached) $ECHO_C" >&6
1474 else
1475   cf_cv_system_name="$system_name"
1476 fi
1477
1478 test -z "$system_name" && system_name="$cf_cv_system_name"
1479 test -n "$cf_cv_system_name" && echo "$as_me:1479: result: Configuring for $cf_cv_system_name" >&5
1480 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1481
1482 if test ".$system_name" != ".$cf_cv_system_name" ; then
1483         echo "$as_me:1483: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1484 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1485         { { echo "$as_me:1485: error: \"Please remove config.cache and try again.\"" >&5
1486 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1487    { (exit 1); exit 1; }; }
1488 fi
1489
1490 # Check whether --with-system-type or --without-system-type was given.
1491 if test "${with_system_type+set}" = set; then
1492   withval="$with_system_type"
1493   { echo "$as_me:1493: WARNING: overriding system type to $withval" >&5
1494 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1495         cf_cv_system_name=$withval
1496         host_os=$withval
1497
1498 fi;
1499
1500 ###     Save the given $CFLAGS to allow user-override.
1501 cf_user_CFLAGS="$CFLAGS"
1502
1503 ###     Default install-location
1504
1505 echo "$as_me:1505: checking for prefix" >&5
1506 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1507 if test "x$prefix" = "xNONE" ; then
1508         case "$cf_cv_system_name" in
1509                 # non-vendor systems don't have a conflict
1510         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1511                 prefix=/usr
1512                 ;;
1513         (*)     prefix=$ac_default_prefix
1514                 ;;
1515         esac
1516 fi
1517 echo "$as_me:1517: result: $prefix" >&5
1518 echo "${ECHO_T}$prefix" >&6
1519
1520 if test "x$prefix" = "xNONE" ; then
1521 echo "$as_me:1521: checking for default include-directory" >&5
1522 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1523 test -n "$verbose" && echo 1>&6
1524 for cf_symbol in \
1525         $includedir \
1526         $includedir/ncurses \
1527         $prefix/include \
1528         $prefix/include/ncurses \
1529         /usr/local/include \
1530         /usr/local/include/ncurses \
1531         /usr/include \
1532         /usr/include/ncurses
1533 do
1534         cf_dir=`eval echo $cf_symbol`
1535         if test -f $cf_dir/curses.h ; then
1536         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1537                 includedir="$cf_symbol"
1538                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1539                 break
1540         fi
1541         fi
1542         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1543 done
1544 echo "$as_me:1544: result: $includedir" >&5
1545 echo "${ECHO_T}$includedir" >&6
1546 fi
1547
1548 ### Defaults for ncurses ABI
1549
1550 case x$cf_cv_abi_version in
1551 (x[6789])
1552         cf_dft_ext_colors=yes
1553         cf_dft_ext_const=yes
1554         cf_dft_ext_mouse=yes
1555         cf_dft_ext_putwin=yes
1556         cf_dft_ext_spfuncs=yes
1557         cf_dft_filter_syms=yes
1558         cf_dft_chtype=uint32_t
1559         cf_dft_mmask_t=uint32_t
1560         cf_dft_interop=yes
1561         cf_dft_tparm_arg=intptr_t
1562         cf_dft_with_lp64=yes
1563         ;;
1564 (*)
1565         cf_dft_ext_colors=no
1566         cf_dft_ext_const=no
1567         cf_dft_ext_mouse=no
1568         cf_dft_ext_putwin=no
1569         cf_dft_ext_spfuncs=no
1570         cf_dft_filter_syms=no
1571         cf_dft_chtype=auto
1572         cf_dft_mmask_t=auto
1573         cf_dft_interop=no
1574         cf_dft_tparm_arg=long
1575         cf_dft_with_lp64=no
1576         ;;
1577 esac
1578
1579 ###     Checks for programs.
1580
1581 # Check whether --with-ada or --without-ada was given.
1582 if test "${with_ada+set}" = set; then
1583   withval="$with_ada"
1584   cf_with_ada=$withval
1585 else
1586   cf_with_ada=yes
1587 fi;
1588 if test "x$cf_with_ada" = xyes
1589 then
1590         cf_PROG_CC="gnatgcc gcc cc"
1591 else
1592         cf_PROG_CC="gcc cc"
1593 fi
1594
1595 ac_ext=c
1596 ac_cpp='$CPP $CPPFLAGS'
1597 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1598 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1599 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1600 ac_main_return=return
1601 if test -n "$ac_tool_prefix"; then
1602   for ac_prog in $cf_PROG_CC
1603   do
1604     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1605 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1606 echo "$as_me:1606: checking for $ac_word" >&5
1607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1608 if test "${ac_cv_prog_CC+set}" = set; then
1609   echo $ECHO_N "(cached) $ECHO_C" >&6
1610 else
1611   if test -n "$CC"; then
1612   ac_cv_prog_CC="$CC" # Let the user override the test.
1613 else
1614   ac_save_IFS=$IFS; IFS=$ac_path_separator
1615 ac_dummy="$PATH"
1616 for ac_dir in $ac_dummy; do
1617   IFS=$ac_save_IFS
1618   test -z "$ac_dir" && ac_dir=.
1619   $as_executable_p "$ac_dir/$ac_word" || continue
1620 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1621 echo "$as_me:1621: found $ac_dir/$ac_word" >&5
1622 break
1623 done
1624
1625 fi
1626 fi
1627 CC=$ac_cv_prog_CC
1628 if test -n "$CC"; then
1629   echo "$as_me:1629: result: $CC" >&5
1630 echo "${ECHO_T}$CC" >&6
1631 else
1632   echo "$as_me:1632: result: no" >&5
1633 echo "${ECHO_T}no" >&6
1634 fi
1635
1636     test -n "$CC" && break
1637   done
1638 fi
1639 if test -z "$CC"; then
1640   ac_ct_CC=$CC
1641   for ac_prog in $cf_PROG_CC
1642 do
1643   # Extract the first word of "$ac_prog", so it can be a program name with args.
1644 set dummy $ac_prog; ac_word=$2
1645 echo "$as_me:1645: checking for $ac_word" >&5
1646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1647 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1648   echo $ECHO_N "(cached) $ECHO_C" >&6
1649 else
1650   if test -n "$ac_ct_CC"; then
1651   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1652 else
1653   ac_save_IFS=$IFS; IFS=$ac_path_separator
1654 ac_dummy="$PATH"
1655 for ac_dir in $ac_dummy; do
1656   IFS=$ac_save_IFS
1657   test -z "$ac_dir" && ac_dir=.
1658   $as_executable_p "$ac_dir/$ac_word" || continue
1659 ac_cv_prog_ac_ct_CC="$ac_prog"
1660 echo "$as_me:1660: found $ac_dir/$ac_word" >&5
1661 break
1662 done
1663
1664 fi
1665 fi
1666 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1667 if test -n "$ac_ct_CC"; then
1668   echo "$as_me:1668: result: $ac_ct_CC" >&5
1669 echo "${ECHO_T}$ac_ct_CC" >&6
1670 else
1671   echo "$as_me:1671: result: no" >&5
1672 echo "${ECHO_T}no" >&6
1673 fi
1674
1675   test -n "$ac_ct_CC" && break
1676 done
1677
1678   CC=$ac_ct_CC
1679 fi
1680
1681 test -z "$CC" && { { echo "$as_me:1681: error: no acceptable cc found in \$PATH" >&5
1682 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1683    { (exit 1); exit 1; }; }
1684
1685 # Provide some information about the compiler.
1686 echo "$as_me:1686:" \
1687      "checking for C compiler version" >&5
1688 ac_compiler=`set X $ac_compile; echo $2`
1689 { (eval echo "$as_me:1689: \"$ac_compiler --version </dev/null >&5\"") >&5
1690   (eval $ac_compiler --version </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694 { (eval echo "$as_me:1694: \"$ac_compiler -v </dev/null >&5\"") >&5
1695   (eval $ac_compiler -v </dev/null >&5) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }
1699 { (eval echo "$as_me:1699: \"$ac_compiler -V </dev/null >&5\"") >&5
1700   (eval $ac_compiler -V </dev/null >&5) 2>&5
1701   ac_status=$?
1702   echo "$as_me:1702: \$? = $ac_status" >&5
1703   (exit $ac_status); }
1704
1705 cat >conftest.$ac_ext <<_ACEOF
1706 #line 1706 "configure"
1707 #include "confdefs.h"
1708
1709 int
1710 main (void)
1711 {
1712
1713   ;
1714   return 0;
1715 }
1716 _ACEOF
1717 ac_clean_files_save=$ac_clean_files
1718 ac_clean_files="$ac_clean_files a.out a.exe"
1719 # Try to create an executable without -o first, disregard a.out.
1720 # It will help us diagnose broken compilers, and finding out an intuition
1721 # of exeext.
1722 echo "$as_me:1722: checking for C compiler default output" >&5
1723 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1724 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1725 if { (eval echo "$as_me:1725: \"$ac_link_default\"") >&5
1726   (eval $ac_link_default) 2>&5
1727   ac_status=$?
1728   echo "$as_me:1728: \$? = $ac_status" >&5
1729   (exit $ac_status); }; then
1730   # Find the output, starting from the most likely.  This scheme is
1731 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1732 # resort.
1733 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1734                 ls a.out conftest 2>/dev/null;
1735                 ls a.* conftest.* 2>/dev/null`; do
1736   case $ac_file in
1737     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1738     a.out ) # We found the default executable, but exeext='' is most
1739             # certainly right.
1740             break;;
1741     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1742           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1743           export ac_cv_exeext
1744           break;;
1745     * ) break;;
1746   esac
1747 done
1748 else
1749   echo "$as_me: failed program was:" >&5
1750 cat conftest.$ac_ext >&5
1751 { { echo "$as_me:1751: error: C compiler cannot create executables" >&5
1752 echo "$as_me: error: C compiler cannot create executables" >&2;}
1753    { (exit 77); exit 77; }; }
1754 fi
1755
1756 ac_exeext=$ac_cv_exeext
1757 echo "$as_me:1757: result: $ac_file" >&5
1758 echo "${ECHO_T}$ac_file" >&6
1759
1760 # Check the compiler produces executables we can run.  If not, either
1761 # the compiler is broken, or we cross compile.
1762 echo "$as_me:1762: checking whether the C compiler works" >&5
1763 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1764 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1765 # If not cross compiling, check that we can run a simple program.
1766 if test "$cross_compiling" != yes; then
1767   if { ac_try='./$ac_file'
1768   { (eval echo "$as_me:1768: \"$ac_try\"") >&5
1769   (eval $ac_try) 2>&5
1770   ac_status=$?
1771   echo "$as_me:1771: \$? = $ac_status" >&5
1772   (exit $ac_status); }; }; then
1773     cross_compiling=no
1774   else
1775     if test "$cross_compiling" = maybe; then
1776         cross_compiling=yes
1777     else
1778         { { echo "$as_me:1778: error: cannot run C compiled programs.
1779 If you meant to cross compile, use \`--host'." >&5
1780 echo "$as_me: error: cannot run C compiled programs.
1781 If you meant to cross compile, use \`--host'." >&2;}
1782    { (exit 1); exit 1; }; }
1783     fi
1784   fi
1785 fi
1786 echo "$as_me:1786: result: yes" >&5
1787 echo "${ECHO_T}yes" >&6
1788
1789 rm -f a.out a.exe conftest$ac_cv_exeext
1790 ac_clean_files=$ac_clean_files_save
1791 # Check the compiler produces executables we can run.  If not, either
1792 # the compiler is broken, or we cross compile.
1793 echo "$as_me:1793: checking whether we are cross compiling" >&5
1794 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1795 echo "$as_me:1795: result: $cross_compiling" >&5
1796 echo "${ECHO_T}$cross_compiling" >&6
1797
1798 echo "$as_me:1798: checking for executable suffix" >&5
1799 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1800 if { (eval echo "$as_me:1800: \"$ac_link\"") >&5
1801   (eval $ac_link) 2>&5
1802   ac_status=$?
1803   echo "$as_me:1803: \$? = $ac_status" >&5
1804   (exit $ac_status); }; then
1805   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1806 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1807 # work properly (i.e., refer to `conftest.exe'), while it won't with
1808 # `rm'.
1809 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1810   case $ac_file in
1811     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1812     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1813           export ac_cv_exeext
1814           break;;
1815     * ) break;;
1816   esac
1817 done
1818 else
1819   { { echo "$as_me:1819: error: cannot compute EXEEXT: cannot compile and link" >&5
1820 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1821    { (exit 1); exit 1; }; }
1822 fi
1823
1824 rm -f conftest$ac_cv_exeext
1825 echo "$as_me:1825: result: $ac_cv_exeext" >&5
1826 echo "${ECHO_T}$ac_cv_exeext" >&6
1827
1828 rm -f conftest.$ac_ext
1829 EXEEXT=$ac_cv_exeext
1830 ac_exeext=$EXEEXT
1831 echo "$as_me:1831: checking for object suffix" >&5
1832 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1833 if test "${ac_cv_objext+set}" = set; then
1834   echo $ECHO_N "(cached) $ECHO_C" >&6
1835 else
1836   cat >conftest.$ac_ext <<_ACEOF
1837 #line 1837 "configure"
1838 #include "confdefs.h"
1839
1840 int
1841 main (void)
1842 {
1843
1844   ;
1845   return 0;
1846 }
1847 _ACEOF
1848 rm -f conftest.o conftest.obj
1849 if { (eval echo "$as_me:1849: \"$ac_compile\"") >&5
1850   (eval $ac_compile) 2>&5
1851   ac_status=$?
1852   echo "$as_me:1852: \$? = $ac_status" >&5
1853   (exit $ac_status); }; then
1854   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1855   case $ac_file in
1856     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1857     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1858        break;;
1859   esac
1860 done
1861 else
1862   echo "$as_me: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1864 { { echo "$as_me:1864: error: cannot compute OBJEXT: cannot compile" >&5
1865 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1866    { (exit 1); exit 1; }; }
1867 fi
1868
1869 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1870 fi
1871 echo "$as_me:1871: result: $ac_cv_objext" >&5
1872 echo "${ECHO_T}$ac_cv_objext" >&6
1873 OBJEXT=$ac_cv_objext
1874 ac_objext=$OBJEXT
1875 echo "$as_me:1875: checking whether we are using the GNU C compiler" >&5
1876 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1877 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1878   echo $ECHO_N "(cached) $ECHO_C" >&6
1879 else
1880   cat >conftest.$ac_ext <<_ACEOF
1881 #line 1881 "configure"
1882 #include "confdefs.h"
1883
1884 int
1885 main (void)
1886 {
1887 #ifndef __GNUC__
1888        choke me
1889 #endif
1890
1891   ;
1892   return 0;
1893 }
1894 _ACEOF
1895 rm -f conftest.$ac_objext
1896 if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
1897   (eval $ac_compile) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); } &&
1901          { ac_try='test -s conftest.$ac_objext'
1902   { (eval echo "$as_me:1902: \"$ac_try\"") >&5
1903   (eval $ac_try) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); }; }; then
1907   ac_compiler_gnu=yes
1908 else
1909   echo "$as_me: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1911 ac_compiler_gnu=no
1912 fi
1913 rm -f conftest.$ac_objext conftest.$ac_ext
1914 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1915
1916 fi
1917 echo "$as_me:1917: result: $ac_cv_c_compiler_gnu" >&5
1918 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1919 GCC=`test $ac_compiler_gnu = yes && echo yes`
1920 ac_test_CFLAGS=${CFLAGS+set}
1921 ac_save_CFLAGS=$CFLAGS
1922 CFLAGS="-g"
1923 echo "$as_me:1923: checking whether $CC accepts -g" >&5
1924 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1925 if test "${ac_cv_prog_cc_g+set}" = set; then
1926   echo $ECHO_N "(cached) $ECHO_C" >&6
1927 else
1928   cat >conftest.$ac_ext <<_ACEOF
1929 #line 1929 "configure"
1930 #include "confdefs.h"
1931
1932 int
1933 main (void)
1934 {
1935
1936   ;
1937   return 0;
1938 }
1939 _ACEOF
1940 rm -f conftest.$ac_objext
1941 if { (eval echo "$as_me:1941: \"$ac_compile\"") >&5
1942   (eval $ac_compile) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit $ac_status); } &&
1946          { ac_try='test -s conftest.$ac_objext'
1947   { (eval echo "$as_me:1947: \"$ac_try\"") >&5
1948   (eval $ac_try) 2>&5
1949   ac_status=$?
1950   echo "$as_me:1950: \$? = $ac_status" >&5
1951   (exit $ac_status); }; }; then
1952   ac_cv_prog_cc_g=yes
1953 else
1954   echo "$as_me: failed program was:" >&5
1955 cat conftest.$ac_ext >&5
1956 ac_cv_prog_cc_g=no
1957 fi
1958 rm -f conftest.$ac_objext conftest.$ac_ext
1959 fi
1960 echo "$as_me:1960: result: $ac_cv_prog_cc_g" >&5
1961 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1962 if test "$ac_test_CFLAGS" = set; then
1963   CFLAGS=$ac_save_CFLAGS
1964 elif test $ac_cv_prog_cc_g = yes; then
1965   if test "$GCC" = yes; then
1966     CFLAGS="-g -O2"
1967   else
1968     CFLAGS="-g"
1969   fi
1970 else
1971   if test "$GCC" = yes; then
1972     CFLAGS="-O2"
1973   else
1974     CFLAGS=
1975   fi
1976 fi
1977 # Some people use a C++ compiler to compile C.  Since we use `exit',
1978 # in C++ we need to declare it.  In case someone uses the same compiler
1979 # for both compiling C and C++ we need to have the C++ compiler decide
1980 # the declaration of exit, since it's the most demanding environment.
1981 cat >conftest.$ac_ext <<_ACEOF
1982 #ifndef __cplusplus
1983   choke me
1984 #endif
1985 _ACEOF
1986 rm -f conftest.$ac_objext
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988   (eval $ac_compile) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); } &&
1992          { ac_try='test -s conftest.$ac_objext'
1993   { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994   (eval $ac_try) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); }; }; then
1998   for ac_declaration in \
1999    ''\
2000    '#include <stdlib.h>' \
2001    'extern "C" void std::exit (int) throw (); using std::exit;' \
2002    'extern "C" void std::exit (int); using std::exit;' \
2003    'extern "C" void exit (int) throw ();' \
2004    'extern "C" void exit (int);' \
2005    'void exit (int);'
2006 do
2007   cat >conftest.$ac_ext <<_ACEOF
2008 #line 2008 "configure"
2009 #include "confdefs.h"
2010 #include <stdlib.h>
2011 $ac_declaration
2012 int
2013 main (void)
2014 {
2015 exit (42);
2016   ;
2017   return 0;
2018 }
2019 _ACEOF
2020 rm -f conftest.$ac_objext
2021 if { (eval echo "$as_me:2021: \"$ac_compile\"") >&5
2022   (eval $ac_compile) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit $ac_status); } &&
2026          { ac_try='test -s conftest.$ac_objext'
2027   { (eval echo "$as_me:2027: \"$ac_try\"") >&5
2028   (eval $ac_try) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit $ac_status); }; }; then
2032   :
2033 else
2034   echo "$as_me: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 continue
2037 fi
2038 rm -f conftest.$ac_objext conftest.$ac_ext
2039   cat >conftest.$ac_ext <<_ACEOF
2040 #line 2040 "configure"
2041 #include "confdefs.h"
2042 $ac_declaration
2043 int
2044 main (void)
2045 {
2046 exit (42);
2047   ;
2048   return 0;
2049 }
2050 _ACEOF
2051 rm -f conftest.$ac_objext
2052 if { (eval echo "$as_me:2052: \"$ac_compile\"") >&5
2053   (eval $ac_compile) 2>&5
2054   ac_status=$?
2055   echo "$as_me:2055: \$? = $ac_status" >&5
2056   (exit $ac_status); } &&
2057          { ac_try='test -s conftest.$ac_objext'
2058   { (eval echo "$as_me:2058: \"$ac_try\"") >&5
2059   (eval $ac_try) 2>&5
2060   ac_status=$?
2061   echo "$as_me:2061: \$? = $ac_status" >&5
2062   (exit $ac_status); }; }; then
2063   break
2064 else
2065   echo "$as_me: failed program was:" >&5
2066 cat conftest.$ac_ext >&5
2067 fi
2068 rm -f conftest.$ac_objext conftest.$ac_ext
2069 done
2070 rm -rf conftest*
2071 if test -n "$ac_declaration"; then
2072   echo '#ifdef __cplusplus' >>confdefs.h
2073   echo $ac_declaration      >>confdefs.h
2074   echo '#endif'             >>confdefs.h
2075 fi
2076
2077 else
2078   echo "$as_me: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2080 fi
2081 rm -f conftest.$ac_objext conftest.$ac_ext
2082 ac_ext=c
2083 ac_cpp='$CPP $CPPFLAGS'
2084 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2085 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2086 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2087 ac_main_return=return
2088
2089 GCC_VERSION=none
2090 if test "$GCC" = yes ; then
2091         echo "$as_me:2091: checking version of $CC" >&5
2092 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2093         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.].*//'`"
2094         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2095         echo "$as_me:2095: result: $GCC_VERSION" >&5
2096 echo "${ECHO_T}$GCC_VERSION" >&6
2097 fi
2098
2099 echo "$as_me:2099: checking for $CC option to accept ANSI C" >&5
2100 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2101 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2102   echo $ECHO_N "(cached) $ECHO_C" >&6
2103 else
2104   ac_cv_prog_cc_stdc=no
2105 ac_save_CC=$CC
2106 cat >conftest.$ac_ext <<_ACEOF
2107 #line 2107 "configure"
2108 #include "confdefs.h"
2109 #include <stdarg.h>
2110 #include <stdio.h>
2111 #include <sys/types.h>
2112 #include <sys/stat.h>
2113 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2114 struct buf { int x; };
2115 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2116 static char *e (p, i)
2117      char **p;
2118      int i;
2119 {
2120   return p[i];
2121 }
2122 static char *f (char * (*g) (char **, int), char **p, ...)
2123 {
2124   char *s;
2125   va_list v;
2126   va_start (v,p);
2127   s = g (p, va_arg (v,int));
2128   va_end (v);
2129   return s;
2130 }
2131 int test (int i, double x);
2132 struct s1 {int (*f) (int a);};
2133 struct s2 {int (*f) (double a);};
2134 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2135 int argc;
2136 char **argv;
2137 int
2138 main (void)
2139 {
2140 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2141   ;
2142   return 0;
2143 }
2144 _ACEOF
2145 # Don't try gcc -ansi; that turns off useful extensions and
2146 # breaks some systems' header files.
2147 # AIX                   -qlanglvl=ansi
2148 # Ultrix and OSF/1      -std1
2149 # HP-UX 10.20 and later -Ae
2150 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2151 # SVR4                  -Xc -D__EXTENSIONS__
2152 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2153 do
2154   CC="$ac_save_CC $ac_arg"
2155   rm -f conftest.$ac_objext
2156 if { (eval echo "$as_me:2156: \"$ac_compile\"") >&5
2157   (eval $ac_compile) 2>&5
2158   ac_status=$?
2159   echo "$as_me:2159: \$? = $ac_status" >&5
2160   (exit $ac_status); } &&
2161          { ac_try='test -s conftest.$ac_objext'
2162   { (eval echo "$as_me:2162: \"$ac_try\"") >&5
2163   (eval $ac_try) 2>&5
2164   ac_status=$?
2165   echo "$as_me:2165: \$? = $ac_status" >&5
2166   (exit $ac_status); }; }; then
2167   ac_cv_prog_cc_stdc=$ac_arg
2168 break
2169 else
2170   echo "$as_me: failed program was:" >&5
2171 cat conftest.$ac_ext >&5
2172 fi
2173 rm -f conftest.$ac_objext
2174 done
2175 rm -f conftest.$ac_ext conftest.$ac_objext
2176 CC=$ac_save_CC
2177
2178 fi
2179
2180 case "x$ac_cv_prog_cc_stdc" in
2181   x|xno)
2182     echo "$as_me:2182: result: none needed" >&5
2183 echo "${ECHO_T}none needed" >&6 ;;
2184   *)
2185     echo "$as_me:2185: result: $ac_cv_prog_cc_stdc" >&5
2186 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2187     CC="$CC $ac_cv_prog_cc_stdc" ;;
2188 esac
2189
2190 # This should have been defined by AC_PROG_CC
2191 : ${CC:=cc}
2192
2193 echo "$as_me:2193: checking \$CC variable" >&5
2194 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2195 case "$CC" in
2196 (*[\ \  ]-*)
2197         echo "$as_me:2197: result: broken" >&5
2198 echo "${ECHO_T}broken" >&6
2199         { echo "$as_me:2199: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2200 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2201         # humor him...
2202         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2203         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2204         CC="$cf_prog"
2205         for cf_arg in $cf_flags
2206         do
2207                 case "x$cf_arg" in
2208                 (x-[IUDfgOW]*)
2209
2210 cf_fix_cppflags=no
2211 cf_new_cflags=
2212 cf_new_cppflags=
2213 cf_new_extra_cppflags=
2214
2215 for cf_add_cflags in $cf_arg
2216 do
2217 case $cf_fix_cppflags in
2218 (no)
2219         case $cf_add_cflags in
2220         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2221                 case $cf_add_cflags in
2222                 (-D*)
2223                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2224
2225                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2226                                 && test -z "${cf_tst_cflags}" \
2227                                 && cf_fix_cppflags=yes
2228
2229                         if test $cf_fix_cppflags = yes ; then
2230
2231         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2232         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2233
2234                                 continue
2235                         elif test "${cf_tst_cflags}" = "\"'" ; then
2236
2237         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2238         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2239
2240                                 continue
2241                         fi
2242                         ;;
2243                 esac
2244                 case "$CPPFLAGS" in
2245                 (*$cf_add_cflags)
2246                         ;;
2247                 (*)
2248                         case $cf_add_cflags in
2249                         (-D*)
2250                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2251
2252 CPPFLAGS=`echo "$CPPFLAGS" | \
2253         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2254                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2255
2256                                 ;;
2257                         esac
2258
2259         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2260         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2261
2262                         ;;
2263                 esac
2264                 ;;
2265         (*)
2266
2267         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2268         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2269
2270                 ;;
2271         esac
2272         ;;
2273 (yes)
2274
2275         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2276         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2277
2278         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2279
2280         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2281                 && test -z "${cf_tst_cflags}" \
2282                 && cf_fix_cppflags=no
2283         ;;
2284 esac
2285 done
2286
2287 if test -n "$cf_new_cflags" ; then
2288
2289         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2290         CFLAGS="${CFLAGS}$cf_new_cflags"
2291
2292 fi
2293
2294 if test -n "$cf_new_cppflags" ; then
2295
2296         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2297         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2298
2299 fi
2300
2301 if test -n "$cf_new_extra_cppflags" ; then
2302
2303         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2304         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2305
2306 fi
2307
2308                         ;;
2309                 (*)
2310                         CC="$CC $cf_arg"
2311                         ;;
2312                 esac
2313         done
2314         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2315
2316 echo "${as_me:-configure}:2316: testing resulting CC: '$CC' ..." 1>&5
2317
2318         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2319
2320 echo "${as_me:-configure}:2320: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2321
2322         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2323
2324 echo "${as_me:-configure}:2324: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2325
2326         ;;
2327 (*)
2328         echo "$as_me:2328: result: ok" >&5
2329 echo "${ECHO_T}ok" >&6
2330         ;;
2331 esac
2332
2333 ac_ext=c
2334 ac_cpp='$CPP $CPPFLAGS'
2335 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2336 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2337 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2338 ac_main_return=return
2339 echo "$as_me:2339: checking how to run the C preprocessor" >&5
2340 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2341 # On Suns, sometimes $CPP names a directory.
2342 if test -n "$CPP" && test -d "$CPP"; then
2343   CPP=
2344 fi
2345 if test -z "$CPP"; then
2346   if test "${ac_cv_prog_CPP+set}" = set; then
2347   echo $ECHO_N "(cached) $ECHO_C" >&6
2348 else
2349       # Double quotes because CPP needs to be expanded
2350     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2351     do
2352       ac_preproc_ok=false
2353 for ac_c_preproc_warn_flag in '' yes
2354 do
2355   # Use a header file that comes with gcc, so configuring glibc
2356   # with a fresh cross-compiler works.
2357   # On the NeXT, cc -E runs the code through the compiler's parser,
2358   # not just through cpp. "Syntax error" is here to catch this case.
2359   cat >conftest.$ac_ext <<_ACEOF
2360 #line 2360 "configure"
2361 #include "confdefs.h"
2362 #include <assert.h>
2363                      Syntax error
2364 _ACEOF
2365 if { (eval echo "$as_me:2365: \"$ac_cpp conftest.$ac_ext\"") >&5
2366   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2367   ac_status=$?
2368   egrep -v '^ *\+' conftest.er1 >conftest.err
2369   rm -f conftest.er1
2370   cat conftest.err >&5
2371   echo "$as_me:2371: \$? = $ac_status" >&5
2372   (exit $ac_status); } >/dev/null; then
2373   if test -s conftest.err; then
2374     ac_cpp_err=$ac_c_preproc_warn_flag
2375   else
2376     ac_cpp_err=
2377   fi
2378 else
2379   ac_cpp_err=yes
2380 fi
2381 if test -z "$ac_cpp_err"; then
2382   :
2383 else
2384   echo "$as_me: failed program was:" >&5
2385   cat conftest.$ac_ext >&5
2386   # Broken: fails on valid input.
2387 continue
2388 fi
2389 rm -f conftest.err conftest.$ac_ext
2390
2391   # OK, works on sane cases.  Now check whether non-existent headers
2392   # can be detected and how.
2393   cat >conftest.$ac_ext <<_ACEOF
2394 #line 2394 "configure"
2395 #include "confdefs.h"
2396 #include <ac_nonexistent.h>
2397 _ACEOF
2398 if { (eval echo "$as_me:2398: \"$ac_cpp conftest.$ac_ext\"") >&5
2399   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2400   ac_status=$?
2401   egrep -v '^ *\+' conftest.er1 >conftest.err
2402   rm -f conftest.er1
2403   cat conftest.err >&5
2404   echo "$as_me:2404: \$? = $ac_status" >&5
2405   (exit $ac_status); } >/dev/null; then
2406   if test -s conftest.err; then
2407     ac_cpp_err=$ac_c_preproc_warn_flag
2408   else
2409     ac_cpp_err=
2410   fi
2411 else
2412   ac_cpp_err=yes
2413 fi
2414 if test -z "$ac_cpp_err"; then
2415   # Broken: success on invalid input.
2416 continue
2417 else
2418   echo "$as_me: failed program was:" >&5
2419   cat conftest.$ac_ext >&5
2420   # Passes both tests.
2421 ac_preproc_ok=:
2422 break
2423 fi
2424 rm -f conftest.err conftest.$ac_ext
2425
2426 done
2427 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2428 rm -f conftest.err conftest.$ac_ext
2429 if $ac_preproc_ok; then
2430   break
2431 fi
2432
2433     done
2434     ac_cv_prog_CPP=$CPP
2435
2436 fi
2437   CPP=$ac_cv_prog_CPP
2438 else
2439   ac_cv_prog_CPP=$CPP
2440 fi
2441 echo "$as_me:2441: result: $CPP" >&5
2442 echo "${ECHO_T}$CPP" >&6
2443 ac_preproc_ok=false
2444 for ac_c_preproc_warn_flag in '' yes
2445 do
2446   # Use a header file that comes with gcc, so configuring glibc
2447   # with a fresh cross-compiler works.
2448   # On the NeXT, cc -E runs the code through the compiler's parser,
2449   # not just through cpp. "Syntax error" is here to catch this case.
2450   cat >conftest.$ac_ext <<_ACEOF
2451 #line 2451 "configure"
2452 #include "confdefs.h"
2453 #include <assert.h>
2454                      Syntax error
2455 _ACEOF
2456 if { (eval echo "$as_me:2456: \"$ac_cpp conftest.$ac_ext\"") >&5
2457   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2458   ac_status=$?
2459   egrep -v '^ *\+' conftest.er1 >conftest.err
2460   rm -f conftest.er1
2461   cat conftest.err >&5
2462   echo "$as_me:2462: \$? = $ac_status" >&5
2463   (exit $ac_status); } >/dev/null; then
2464   if test -s conftest.err; then
2465     ac_cpp_err=$ac_c_preproc_warn_flag
2466   else
2467     ac_cpp_err=
2468   fi
2469 else
2470   ac_cpp_err=yes
2471 fi
2472 if test -z "$ac_cpp_err"; then
2473   :
2474 else
2475   echo "$as_me: failed program was:" >&5
2476   cat conftest.$ac_ext >&5
2477   # Broken: fails on valid input.
2478 continue
2479 fi
2480 rm -f conftest.err conftest.$ac_ext
2481
2482   # OK, works on sane cases.  Now check whether non-existent headers
2483   # can be detected and how.
2484   cat >conftest.$ac_ext <<_ACEOF
2485 #line 2485 "configure"
2486 #include "confdefs.h"
2487 #include <ac_nonexistent.h>
2488 _ACEOF
2489 if { (eval echo "$as_me:2489: \"$ac_cpp conftest.$ac_ext\"") >&5
2490   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2491   ac_status=$?
2492   egrep -v '^ *\+' conftest.er1 >conftest.err
2493   rm -f conftest.er1
2494   cat conftest.err >&5
2495   echo "$as_me:2495: \$? = $ac_status" >&5
2496   (exit $ac_status); } >/dev/null; then
2497   if test -s conftest.err; then
2498     ac_cpp_err=$ac_c_preproc_warn_flag
2499   else
2500     ac_cpp_err=
2501   fi
2502 else
2503   ac_cpp_err=yes
2504 fi
2505 if test -z "$ac_cpp_err"; then
2506   # Broken: success on invalid input.
2507 continue
2508 else
2509   echo "$as_me: failed program was:" >&5
2510   cat conftest.$ac_ext >&5
2511   # Passes both tests.
2512 ac_preproc_ok=:
2513 break
2514 fi
2515 rm -f conftest.err conftest.$ac_ext
2516
2517 done
2518 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2519 rm -f conftest.err conftest.$ac_ext
2520 if $ac_preproc_ok; then
2521   :
2522 else
2523   { { echo "$as_me:2523: error: C preprocessor \"$CPP\" fails sanity check" >&5
2524 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2525    { (exit 1); exit 1; }; }
2526 fi
2527
2528 ac_ext=c
2529 ac_cpp='$CPP $CPPFLAGS'
2530 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2531 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2532 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2533 ac_main_return=return
2534
2535 if test $ac_cv_c_compiler_gnu = yes; then
2536     echo "$as_me:2536: checking whether $CC needs -traditional" >&5
2537 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2538 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2539   echo $ECHO_N "(cached) $ECHO_C" >&6
2540 else
2541     ac_pattern="Autoconf.*'x'"
2542   cat >conftest.$ac_ext <<_ACEOF
2543 #line 2543 "configure"
2544 #include "confdefs.h"
2545 #include <sgtty.h>
2546 int Autoconf = TIOCGETP;
2547 _ACEOF
2548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2549   egrep "$ac_pattern" >/dev/null 2>&1; then
2550   ac_cv_prog_gcc_traditional=yes
2551 else
2552   ac_cv_prog_gcc_traditional=no
2553 fi
2554 rm -rf conftest*
2555
2556   if test $ac_cv_prog_gcc_traditional = no; then
2557     cat >conftest.$ac_ext <<_ACEOF
2558 #line 2558 "configure"
2559 #include "confdefs.h"
2560 #include <termio.h>
2561 int Autoconf = TCGETA;
2562 _ACEOF
2563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2564   egrep "$ac_pattern" >/dev/null 2>&1; then
2565   ac_cv_prog_gcc_traditional=yes
2566 fi
2567 rm -rf conftest*
2568
2569   fi
2570 fi
2571 echo "$as_me:2571: result: $ac_cv_prog_gcc_traditional" >&5
2572 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2573   if test $ac_cv_prog_gcc_traditional = yes; then
2574     CC="$CC -traditional"
2575   fi
2576 fi
2577
2578 echo "$as_me:2578: checking whether $CC understands -c and -o together" >&5
2579 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2580 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2581   echo $ECHO_N "(cached) $ECHO_C" >&6
2582 else
2583
2584 cat > conftest.$ac_ext <<CF_EOF
2585 int main(void)
2586 {
2587         ${cf_cv_main_return:-return}(0);
2588 }
2589 CF_EOF
2590 # We do the test twice because some compilers refuse to overwrite an
2591 # existing .o file with -o, though they will create one.
2592 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2593 if { (eval echo "$as_me:2593: \"$ac_try\"") >&5
2594   (eval $ac_try) 2>&5
2595   ac_status=$?
2596   echo "$as_me:2596: \$? = $ac_status" >&5
2597   (exit $ac_status); } &&
2598   test -f conftest2.$ac_objext && { (eval echo "$as_me:2598: \"$ac_try\"") >&5
2599   (eval $ac_try) 2>&5
2600   ac_status=$?
2601   echo "$as_me:2601: \$? = $ac_status" >&5
2602   (exit $ac_status); };
2603 then
2604   eval cf_cv_prog_CC_c_o=yes
2605 else
2606   eval cf_cv_prog_CC_c_o=no
2607 fi
2608 rm -rf conftest*
2609
2610 fi
2611 if test $cf_cv_prog_CC_c_o = yes; then
2612   echo "$as_me:2612: result: yes" >&5
2613 echo "${ECHO_T}yes" >&6
2614 else
2615   echo "$as_me:2615: result: no" >&5
2616 echo "${ECHO_T}no" >&6
2617 fi
2618
2619 if test "$cross_compiling" = yes ; then
2620         LDCONFIG=:
2621 else
2622         case "$cf_cv_system_name" in
2623         (dragonfly*|mirbsd*|freebsd*)
2624                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2625                 ;;
2626         (*) LDPATH=$PATH:/sbin:/usr/sbin
2627                 # Extract the first word of "ldconfig", so it can be a program name with args.
2628 set dummy ldconfig; ac_word=$2
2629 echo "$as_me:2629: checking for $ac_word" >&5
2630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2631 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2632   echo $ECHO_N "(cached) $ECHO_C" >&6
2633 else
2634   case $LDCONFIG in
2635   [\\/]* | ?:[\\/]*)
2636   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2637   ;;
2638   *)
2639   ac_save_IFS=$IFS; IFS=$ac_path_separator
2640 ac_dummy="$LDPATH"
2641 for ac_dir in $ac_dummy; do
2642   IFS=$ac_save_IFS
2643   test -z "$ac_dir" && ac_dir=.
2644   if $as_executable_p "$ac_dir/$ac_word"; then
2645    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2646    echo "$as_me:2646: found $ac_dir/$ac_word" >&5
2647    break
2648 fi
2649 done
2650
2651   ;;
2652 esac
2653 fi
2654 LDCONFIG=$ac_cv_path_LDCONFIG
2655
2656 if test -n "$LDCONFIG"; then
2657   echo "$as_me:2657: result: $LDCONFIG" >&5
2658 echo "${ECHO_T}$LDCONFIG" >&6
2659 else
2660   echo "$as_me:2660: result: no" >&5
2661 echo "${ECHO_T}no" >&6
2662 fi
2663
2664                 ;;
2665         esac
2666 fi
2667
2668 echo "$as_me:2668: checking if you want to ensure bool is consistent with C++" >&5
2669 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2670
2671 # Check whether --with-cxx or --without-cxx was given.
2672 if test "${with_cxx+set}" = set; then
2673   withval="$with_cxx"
2674   cf_with_cxx=$withval
2675 else
2676   cf_with_cxx=yes
2677 fi;
2678 echo "$as_me:2678: result: $cf_with_cxx" >&5
2679 echo "${ECHO_T}$cf_with_cxx" >&6
2680 if test "X$cf_with_cxx" = Xno ; then
2681         CXX=""
2682         GXX=""
2683 else
2684         # with autoconf 2.13, we can change the error to a warning:
2685                 ac_ext=cc
2686 ac_cpp='$CXXCPP $CPPFLAGS'
2687 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2690 ac_main_return=return
2691 if test -n "$ac_tool_prefix"; then
2692   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2693   do
2694     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2695 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2696 echo "$as_me:2696: checking for $ac_word" >&5
2697 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2698 if test "${ac_cv_prog_CXX+set}" = set; then
2699   echo $ECHO_N "(cached) $ECHO_C" >&6
2700 else
2701   if test -n "$CXX"; then
2702   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2703 else
2704   ac_save_IFS=$IFS; IFS=$ac_path_separator
2705 ac_dummy="$PATH"
2706 for ac_dir in $ac_dummy; do
2707   IFS=$ac_save_IFS
2708   test -z "$ac_dir" && ac_dir=.
2709   $as_executable_p "$ac_dir/$ac_word" || continue
2710 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2711 echo "$as_me:2711: found $ac_dir/$ac_word" >&5
2712 break
2713 done
2714
2715 fi
2716 fi
2717 CXX=$ac_cv_prog_CXX
2718 if test -n "$CXX"; then
2719   echo "$as_me:2719: result: $CXX" >&5
2720 echo "${ECHO_T}$CXX" >&6
2721 else
2722   echo "$as_me:2722: result: no" >&5
2723 echo "${ECHO_T}no" >&6
2724 fi
2725
2726     test -n "$CXX" && break
2727   done
2728 fi
2729 if test -z "$CXX"; then
2730   ac_ct_CXX=$CXX
2731   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2732 do
2733   # Extract the first word of "$ac_prog", so it can be a program name with args.
2734 set dummy $ac_prog; ac_word=$2
2735 echo "$as_me:2735: checking for $ac_word" >&5
2736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2737 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2738   echo $ECHO_N "(cached) $ECHO_C" >&6
2739 else
2740   if test -n "$ac_ct_CXX"; then
2741   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2742 else
2743   ac_save_IFS=$IFS; IFS=$ac_path_separator
2744 ac_dummy="$PATH"
2745 for ac_dir in $ac_dummy; do
2746   IFS=$ac_save_IFS
2747   test -z "$ac_dir" && ac_dir=.
2748   $as_executable_p "$ac_dir/$ac_word" || continue
2749 ac_cv_prog_ac_ct_CXX="$ac_prog"
2750 echo "$as_me:2750: found $ac_dir/$ac_word" >&5
2751 break
2752 done
2753
2754 fi
2755 fi
2756 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2757 if test -n "$ac_ct_CXX"; then
2758   echo "$as_me:2758: result: $ac_ct_CXX" >&5
2759 echo "${ECHO_T}$ac_ct_CXX" >&6
2760 else
2761   echo "$as_me:2761: result: no" >&5
2762 echo "${ECHO_T}no" >&6
2763 fi
2764
2765   test -n "$ac_ct_CXX" && break
2766 done
2767 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2768
2769   CXX=$ac_ct_CXX
2770 fi
2771
2772 # Provide some information about the compiler.
2773 echo "$as_me:2773:" \
2774      "checking for C++ compiler version" >&5
2775 ac_compiler=`set X $ac_compile; echo $2`
2776 { (eval echo "$as_me:2776: \"$ac_compiler --version </dev/null >&5\"") >&5
2777   (eval $ac_compiler --version </dev/null >&5) 2>&5
2778   ac_status=$?
2779   echo "$as_me:2779: \$? = $ac_status" >&5
2780   (exit $ac_status); }
2781 { (eval echo "$as_me:2781: \"$ac_compiler -v </dev/null >&5\"") >&5
2782   (eval $ac_compiler -v </dev/null >&5) 2>&5
2783   ac_status=$?
2784   echo "$as_me:2784: \$? = $ac_status" >&5
2785   (exit $ac_status); }
2786 { (eval echo "$as_me:2786: \"$ac_compiler -V </dev/null >&5\"") >&5
2787   (eval $ac_compiler -V </dev/null >&5) 2>&5
2788   ac_status=$?
2789   echo "$as_me:2789: \$? = $ac_status" >&5
2790   (exit $ac_status); }
2791
2792 echo "$as_me:2792: checking whether we are using the GNU C++ compiler" >&5
2793 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2794 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2795   echo $ECHO_N "(cached) $ECHO_C" >&6
2796 else
2797   cat >conftest.$ac_ext <<_ACEOF
2798 #line 2798 "configure"
2799 #include "confdefs.h"
2800
2801 int
2802 main (void)
2803 {
2804 #ifndef __GNUC__
2805        choke me
2806 #endif
2807
2808   ;
2809   return 0;
2810 }
2811 _ACEOF
2812 rm -f conftest.$ac_objext
2813 if { (eval echo "$as_me:2813: \"$ac_compile\"") >&5
2814   (eval $ac_compile) 2>&5
2815   ac_status=$?
2816   echo "$as_me:2816: \$? = $ac_status" >&5
2817   (exit $ac_status); } &&
2818          { ac_try='test -s conftest.$ac_objext'
2819   { (eval echo "$as_me:2819: \"$ac_try\"") >&5
2820   (eval $ac_try) 2>&5
2821   ac_status=$?
2822   echo "$as_me:2822: \$? = $ac_status" >&5
2823   (exit $ac_status); }; }; then
2824   ac_compiler_gnu=yes
2825 else
2826   echo "$as_me: failed program was:" >&5
2827 cat conftest.$ac_ext >&5
2828 ac_compiler_gnu=no
2829 fi
2830 rm -f conftest.$ac_objext conftest.$ac_ext
2831 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2832
2833 fi
2834 echo "$as_me:2834: result: $ac_cv_cxx_compiler_gnu" >&5
2835 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2836 GXX=`test $ac_compiler_gnu = yes && echo yes`
2837 ac_test_CXXFLAGS=${CXXFLAGS+set}
2838 ac_save_CXXFLAGS=$CXXFLAGS
2839 CXXFLAGS="-g"
2840 echo "$as_me:2840: checking whether $CXX accepts -g" >&5
2841 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2842 if test "${ac_cv_prog_cxx_g+set}" = set; then
2843   echo $ECHO_N "(cached) $ECHO_C" >&6
2844 else
2845   cat >conftest.$ac_ext <<_ACEOF
2846 #line 2846 "configure"
2847 #include "confdefs.h"
2848
2849 int
2850 main (void)
2851 {
2852
2853   ;
2854   return 0;
2855 }
2856 _ACEOF
2857 rm -f conftest.$ac_objext
2858 if { (eval echo "$as_me:2858: \"$ac_compile\"") >&5
2859   (eval $ac_compile) 2>&5
2860   ac_status=$?
2861   echo "$as_me:2861: \$? = $ac_status" >&5
2862   (exit $ac_status); } &&
2863          { ac_try='test -s conftest.$ac_objext'
2864   { (eval echo "$as_me:2864: \"$ac_try\"") >&5
2865   (eval $ac_try) 2>&5
2866   ac_status=$?
2867   echo "$as_me:2867: \$? = $ac_status" >&5
2868   (exit $ac_status); }; }; then
2869   ac_cv_prog_cxx_g=yes
2870 else
2871   echo "$as_me: failed program was:" >&5
2872 cat conftest.$ac_ext >&5
2873 ac_cv_prog_cxx_g=no
2874 fi
2875 rm -f conftest.$ac_objext conftest.$ac_ext
2876 fi
2877 echo "$as_me:2877: result: $ac_cv_prog_cxx_g" >&5
2878 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2879 if test "$ac_test_CXXFLAGS" = set; then
2880   CXXFLAGS=$ac_save_CXXFLAGS
2881 elif test $ac_cv_prog_cxx_g = yes; then
2882   if test "$GXX" = yes; then
2883     CXXFLAGS="-g -O2"
2884   else
2885     CXXFLAGS="-g"
2886   fi
2887 else
2888   if test "$GXX" = yes; then
2889     CXXFLAGS="-O2"
2890   else
2891     CXXFLAGS=
2892   fi
2893 fi
2894 for ac_declaration in \
2895    ''\
2896    '#include <stdlib.h>' \
2897    'extern "C" void std::exit (int) throw (); using std::exit;' \
2898    'extern "C" void std::exit (int); using std::exit;' \
2899    'extern "C" void exit (int) throw ();' \
2900    'extern "C" void exit (int);' \
2901    'void exit (int);'
2902 do
2903   cat >conftest.$ac_ext <<_ACEOF
2904 #line 2904 "configure"
2905 #include "confdefs.h"
2906 #include <stdlib.h>
2907 $ac_declaration
2908 int
2909 main (void)
2910 {
2911 exit (42);
2912   ;
2913   return 0;
2914 }
2915 _ACEOF
2916 rm -f conftest.$ac_objext
2917 if { (eval echo "$as_me:2917: \"$ac_compile\"") >&5
2918   (eval $ac_compile) 2>&5
2919   ac_status=$?
2920   echo "$as_me:2920: \$? = $ac_status" >&5
2921   (exit $ac_status); } &&
2922          { ac_try='test -s conftest.$ac_objext'
2923   { (eval echo "$as_me:2923: \"$ac_try\"") >&5
2924   (eval $ac_try) 2>&5
2925   ac_status=$?
2926   echo "$as_me:2926: \$? = $ac_status" >&5
2927   (exit $ac_status); }; }; then
2928   :
2929 else
2930   echo "$as_me: failed program was:" >&5
2931 cat conftest.$ac_ext >&5
2932 continue
2933 fi
2934 rm -f conftest.$ac_objext conftest.$ac_ext
2935   cat >conftest.$ac_ext <<_ACEOF
2936 #line 2936 "configure"
2937 #include "confdefs.h"
2938 $ac_declaration
2939 int
2940 main (void)
2941 {
2942 exit (42);
2943   ;
2944   return 0;
2945 }
2946 _ACEOF
2947 rm -f conftest.$ac_objext
2948 if { (eval echo "$as_me:2948: \"$ac_compile\"") >&5
2949   (eval $ac_compile) 2>&5
2950   ac_status=$?
2951   echo "$as_me:2951: \$? = $ac_status" >&5
2952   (exit $ac_status); } &&
2953          { ac_try='test -s conftest.$ac_objext'
2954   { (eval echo "$as_me:2954: \"$ac_try\"") >&5
2955   (eval $ac_try) 2>&5
2956   ac_status=$?
2957   echo "$as_me:2957: \$? = $ac_status" >&5
2958   (exit $ac_status); }; }; then
2959   break
2960 else
2961   echo "$as_me: failed program was:" >&5
2962 cat conftest.$ac_ext >&5
2963 fi
2964 rm -f conftest.$ac_objext conftest.$ac_ext
2965 done
2966 rm -rf conftest*
2967 if test -n "$ac_declaration"; then
2968   echo '#ifdef __cplusplus' >>confdefs.h
2969   echo $ac_declaration      >>confdefs.h
2970   echo '#endif'             >>confdefs.h
2971 fi
2972
2973 ac_ext=c
2974 ac_cpp='$CPP $CPPFLAGS'
2975 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2976 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2978 ac_main_return=return
2979
2980         ac_ext=cc
2981 ac_cpp='$CXXCPP $CPPFLAGS'
2982 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2983 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2984 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2985 ac_main_return=return
2986
2987         if test "x$cf_with_cxx" != xno
2988         then
2989                 # Several of the C++ configurations do not work, particularly when
2990                 # cross-compiling (20140913 -TD)
2991                 echo "$as_me:2991: checking if $CXX works" >&5
2992 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2993
2994                 save_CPPFLAGS="$CPPFLAGS"
2995                 eval cf_includedir=${includedir}
2996                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2997
2998 cat >conftest.$ac_ext <<_ACEOF
2999 #line 2999 "configure"
3000 #include "confdefs.h"
3001
3002 #include <stdlib.h>
3003 #include <stdio.h>
3004
3005 int
3006 main (void)
3007 {
3008
3009                 printf("Hello world!\n")
3010
3011   ;
3012   return 0;
3013 }
3014 _ACEOF
3015 rm -f conftest.$ac_objext
3016 if { (eval echo "$as_me:3016: \"$ac_compile\"") >&5
3017   (eval $ac_compile) 2>&5
3018   ac_status=$?
3019   echo "$as_me:3019: \$? = $ac_status" >&5
3020   (exit $ac_status); } &&
3021          { ac_try='test -s conftest.$ac_objext'
3022   { (eval echo "$as_me:3022: \"$ac_try\"") >&5
3023   (eval $ac_try) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); }; }; then
3027   cf_cxx_works=yes
3028 else
3029   echo "$as_me: failed program was:" >&5
3030 cat conftest.$ac_ext >&5
3031 cf_cxx_works=no
3032 fi
3033 rm -f conftest.$ac_objext conftest.$ac_ext
3034                 CPPFLAGS="$save_CPPFLAGS"
3035
3036                 echo "$as_me:3036: result: $cf_cxx_works" >&5
3037 echo "${ECHO_T}$cf_cxx_works" >&6
3038                 if test "x$cf_cxx_works" = xno
3039                 then
3040                         { echo "$as_me:3040: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3041 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3042                         cf_with_cxx=no; CXX=""; GXX="";
3043                 fi
3044         fi
3045         ac_ext=c
3046 ac_cpp='$CPP $CPPFLAGS'
3047 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3048 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3049 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3050 ac_main_return=return
3051
3052         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3053         if test "$CXX" = "g++" ; then
3054                 # Extract the first word of "g++", so it can be a program name with args.
3055 set dummy g++; ac_word=$2
3056 echo "$as_me:3056: checking for $ac_word" >&5
3057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3058 if test "${ac_cv_path_CXX+set}" = set; then
3059   echo $ECHO_N "(cached) $ECHO_C" >&6
3060 else
3061   case $CXX in
3062   [\\/]* | ?:[\\/]*)
3063   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3064   ;;
3065   *)
3066   ac_save_IFS=$IFS; IFS=$ac_path_separator
3067 ac_dummy="$PATH"
3068 for ac_dir in $ac_dummy; do
3069   IFS=$ac_save_IFS
3070   test -z "$ac_dir" && ac_dir=.
3071   if $as_executable_p "$ac_dir/$ac_word"; then
3072    ac_cv_path_CXX="$ac_dir/$ac_word"
3073    echo "$as_me:3073: found $ac_dir/$ac_word" >&5
3074    break
3075 fi
3076 done
3077
3078   ;;
3079 esac
3080 fi
3081 CXX=$ac_cv_path_CXX
3082
3083 if test -n "$CXX"; then
3084   echo "$as_me:3084: result: $CXX" >&5
3085 echo "${ECHO_T}$CXX" >&6
3086 else
3087   echo "$as_me:3087: result: no" >&5
3088 echo "${ECHO_T}no" >&6
3089 fi
3090
3091         fi
3092         case "x$CXX" in
3093         (x|xg++)
3094                 { echo "$as_me:3094: WARNING: You don't have any C++ compiler, too bad" >&5
3095 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3096                 cf_with_cxx=no; CXX=""; GXX="";
3097                 ;;
3098         esac
3099 fi
3100
3101 GXX_VERSION=none
3102 if test "$GXX" = yes; then
3103         echo "$as_me:3103: checking version of ${CXX:-g++}" >&5
3104 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3105         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3106         if test -z "$GXX_VERSION"
3107         then
3108                 GXX_VERSION=unknown
3109                 GXX=no
3110         fi
3111         echo "$as_me:3111: result: $GXX_VERSION" >&5
3112 echo "${ECHO_T}$GXX_VERSION" >&6
3113 fi
3114
3115 case $GXX_VERSION in
3116 (1*|2.[0-6]*)
3117         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3118         # cf_cxx_library=no
3119         { echo "$as_me:3119: WARNING: templates do not work" >&5
3120 echo "$as_me: WARNING: templates do not work" >&2;}
3121         ;;
3122 esac
3123
3124 echo "$as_me:3124: checking if you want to build C++ binding and demo" >&5
3125 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3126
3127 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3128 if test "${with_cxx_binding+set}" = set; then
3129   withval="$with_cxx_binding"
3130   cf_with_cxx_binding=$withval
3131 else
3132   cf_with_cxx_binding=$cf_with_cxx
3133 fi;
3134 echo "$as_me:3134: result: $cf_with_cxx_binding" >&5
3135 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3136
3137 echo "$as_me:3137: checking if you want to build with Ada95" >&5
3138 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3139 echo "$as_me:3139: result: $cf_with_ada" >&5
3140 echo "${ECHO_T}$cf_with_ada" >&6
3141
3142 echo "$as_me:3142: checking if you want to install terminal database" >&5
3143 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3144
3145 # Check whether --enable-db-install or --disable-db-install was given.
3146 if test "${enable_db_install+set}" = set; then
3147   enableval="$enable_db_install"
3148   cf_with_db_install=$enableval
3149 else
3150   cf_with_db_install=yes
3151 fi;
3152 echo "$as_me:3152: result: $cf_with_db_install" >&5
3153 echo "${ECHO_T}$cf_with_db_install" >&6
3154
3155 echo "$as_me:3155: checking if you want to install manpages" >&5
3156 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3157
3158 # Check whether --with-manpages or --without-manpages was given.
3159 if test "${with_manpages+set}" = set; then
3160   withval="$with_manpages"
3161   cf_with_manpages=$withval
3162 else
3163   cf_with_manpages=yes
3164 fi;
3165 echo "$as_me:3165: result: $cf_with_manpages" >&5
3166 echo "${ECHO_T}$cf_with_manpages" >&6
3167
3168 echo "$as_me:3168: checking if you want to build programs such as tic" >&5
3169 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3170
3171 # Check whether --with-progs or --without-progs was given.
3172 if test "${with_progs+set}" = set; then
3173   withval="$with_progs"
3174   cf_with_progs=$withval
3175 else
3176   cf_with_progs=yes
3177 fi;
3178 echo "$as_me:3178: result: $cf_with_progs" >&5
3179 echo "${ECHO_T}$cf_with_progs" >&6
3180
3181 if test -f $srcdir/tack/tack.h; then
3182         if test "x$cross_compiling" = xyes ; then
3183                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3184
3185 echo "${as_me:-configure}:3185: testing ignoring tack because we are cross-compiling ..." 1>&5
3186
3187                 cf_with_tack=no
3188         else
3189                 echo "$as_me:3189: checking if you want to build the tack program" >&5
3190 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3191
3192 # Check whether --with-tack or --without-tack was given.
3193 if test "${with_tack+set}" = set; then
3194   withval="$with_tack"
3195   cf_with_tack=$withval
3196 else
3197   cf_with_tack=$cf_with_progs
3198 fi;
3199                 echo "$as_me:3199: result: $cf_with_tack" >&5
3200 echo "${ECHO_T}$cf_with_tack" >&6
3201         fi
3202 else
3203         cf_with_tack=no
3204 fi
3205
3206 echo "$as_me:3206: checking if you want to build test-programs" >&5
3207 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3208
3209 # Check whether --with-tests or --without-tests was given.
3210 if test "${with_tests+set}" = set; then
3211   withval="$with_tests"
3212   cf_with_tests=$withval
3213 else
3214   cf_with_tests=yes
3215 fi;
3216 echo "$as_me:3216: result: $cf_with_tests" >&5
3217 echo "${ECHO_T}$cf_with_tests" >&6
3218
3219 echo "$as_me:3219: checking if you wish to install curses.h" >&5
3220 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3221
3222 # Check whether --with-curses-h or --without-curses-h was given.
3223 if test "${with_curses_h+set}" = set; then
3224   withval="$with_curses_h"
3225   with_curses_h=$withval
3226 else
3227   with_curses_h=yes
3228 fi;
3229 echo "$as_me:3229: result: $with_curses_h" >&5
3230 echo "${ECHO_T}$with_curses_h" >&6
3231
3232 modules_to_build="ncurses"
3233 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3234 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3235 modules_to_build="$modules_to_build panel menu form"
3236
3237 test "$program_prefix" != NONE &&
3238   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3239 # Use a double $ so make ignores it.
3240 test "$program_suffix" != NONE &&
3241   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3242 # Double any \ or $.  echo might interpret backslashes.
3243 # By default was `s,x,x', remove it if useless.
3244 cat <<\_ACEOF >conftest.sed
3245 s/[\\$]/&&/g;s/;s,x,x,$//
3246 _ACEOF
3247 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3248 rm conftest.sed
3249
3250 for ac_prog in mawk gawk nawk awk
3251 do
3252   # Extract the first word of "$ac_prog", so it can be a program name with args.
3253 set dummy $ac_prog; ac_word=$2
3254 echo "$as_me:3254: checking for $ac_word" >&5
3255 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3256 if test "${ac_cv_prog_AWK+set}" = set; then
3257   echo $ECHO_N "(cached) $ECHO_C" >&6
3258 else
3259   if test -n "$AWK"; then
3260   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3261 else
3262   ac_save_IFS=$IFS; IFS=$ac_path_separator
3263 ac_dummy="$PATH"
3264 for ac_dir in $ac_dummy; do
3265   IFS=$ac_save_IFS
3266   test -z "$ac_dir" && ac_dir=.
3267   $as_executable_p "$ac_dir/$ac_word" || continue
3268 ac_cv_prog_AWK="$ac_prog"
3269 echo "$as_me:3269: found $ac_dir/$ac_word" >&5
3270 break
3271 done
3272
3273 fi
3274 fi
3275 AWK=$ac_cv_prog_AWK
3276 if test -n "$AWK"; then
3277   echo "$as_me:3277: result: $AWK" >&5
3278 echo "${ECHO_T}$AWK" >&6
3279 else
3280   echo "$as_me:3280: result: no" >&5
3281 echo "${ECHO_T}no" >&6
3282 fi
3283
3284   test -n "$AWK" && break
3285 done
3286
3287 test -z "$AWK" && { { echo "$as_me:3287: error: No awk program found" >&5
3288 echo "$as_me: error: No awk program found" >&2;}
3289    { (exit 1); exit 1; }; }
3290
3291 echo "$as_me:3291: checking for egrep" >&5
3292 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3293 if test "${ac_cv_prog_egrep+set}" = set; then
3294   echo $ECHO_N "(cached) $ECHO_C" >&6
3295 else
3296   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3297                 then ac_cv_prog_egrep='grep -E'
3298                 else ac_cv_prog_egrep='egrep'
3299         fi
3300 fi
3301 echo "$as_me:3301: result: $ac_cv_prog_egrep" >&5
3302 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3303         EGREP=$ac_cv_prog_egrep
3304
3305         test -z "$EGREP" && { { echo "$as_me:3305: error: No egrep program found" >&5
3306 echo "$as_me: error: No egrep program found" >&2;}
3307    { (exit 1); exit 1; }; }
3308
3309 # Find a good install program.  We prefer a C program (faster),
3310 # so one script is as good as another.  But avoid the broken or
3311 # incompatible versions:
3312 # SysV /etc/install, /usr/sbin/install
3313 # SunOS /usr/etc/install
3314 # IRIX /sbin/install
3315 # AIX /bin/install
3316 # AmigaOS /C/install, which installs bootblocks on floppy discs
3317 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3318 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3319 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3320 # ./install, which can be erroneously created by make from ./install.sh.
3321 echo "$as_me:3321: checking for a BSD compatible install" >&5
3322 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3323 if test -z "$INSTALL"; then
3324 if test "${ac_cv_path_install+set}" = set; then
3325   echo $ECHO_N "(cached) $ECHO_C" >&6
3326 else
3327     ac_save_IFS=$IFS; IFS=$ac_path_separator
3328   for ac_dir in $PATH; do
3329     IFS=$ac_save_IFS
3330     # Account for people who put trailing slashes in PATH elements.
3331     case $ac_dir/ in
3332     / | ./ | .// | /cC/* \
3333     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3334     | /usr/ucb/* ) ;;
3335     *)
3336       # OSF1 and SCO ODT 3.0 have their own names for install.
3337       # Don't use installbsd from OSF since it installs stuff as root
3338       # by default.
3339       for ac_prog in ginstall scoinst install; do
3340         if $as_executable_p "$ac_dir/$ac_prog"; then
3341           if test $ac_prog = install &&
3342             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3343             # AIX install.  It has an incompatible calling convention.
3344             :
3345           elif test $ac_prog = install &&
3346             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3347             # program-specific install script used by HP pwplus--don't use.
3348             :
3349           else
3350             ac_cv_path_install="$ac_dir/$ac_prog -c"
3351             break 2
3352           fi
3353         fi
3354       done
3355       ;;
3356     esac
3357   done
3358
3359 fi
3360   if test "${ac_cv_path_install+set}" = set; then
3361     INSTALL=$ac_cv_path_install
3362   else
3363     # As a last resort, use the slow shell script.  We don't cache a
3364     # path for INSTALL within a source directory, because that will
3365     # break other packages using the cache if that directory is
3366     # removed, or if the path is relative.
3367     INSTALL=$ac_install_sh
3368   fi
3369 fi
3370 echo "$as_me:3370: result: $INSTALL" >&5
3371 echo "${ECHO_T}$INSTALL" >&6
3372
3373 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3374 # It thinks the first close brace ends the variable substitution.
3375 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3376
3377 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3378
3379 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3380
3381 case $INSTALL in
3382 (/*)
3383         ;;
3384 (*)
3385         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3386         test -z "$cf_dir" && cf_dir=.
3387         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3388         ;;
3389 esac
3390
3391 for ac_prog in lint cppcheck splint
3392 do
3393   # Extract the first word of "$ac_prog", so it can be a program name with args.
3394 set dummy $ac_prog; ac_word=$2
3395 echo "$as_me:3395: checking for $ac_word" >&5
3396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3397 if test "${ac_cv_prog_LINT+set}" = set; then
3398   echo $ECHO_N "(cached) $ECHO_C" >&6
3399 else
3400   if test -n "$LINT"; then
3401   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3402 else
3403   ac_save_IFS=$IFS; IFS=$ac_path_separator
3404 ac_dummy="$PATH"
3405 for ac_dir in $ac_dummy; do
3406   IFS=$ac_save_IFS
3407   test -z "$ac_dir" && ac_dir=.
3408   $as_executable_p "$ac_dir/$ac_word" || continue
3409 ac_cv_prog_LINT="$ac_prog"
3410 echo "$as_me:3410: found $ac_dir/$ac_word" >&5
3411 break
3412 done
3413
3414 fi
3415 fi
3416 LINT=$ac_cv_prog_LINT
3417 if test -n "$LINT"; then
3418   echo "$as_me:3418: result: $LINT" >&5
3419 echo "${ECHO_T}$LINT" >&6
3420 else
3421   echo "$as_me:3421: result: no" >&5
3422 echo "${ECHO_T}no" >&6
3423 fi
3424
3425   test -n "$LINT" && break
3426 done
3427
3428 echo "$as_me:3428: checking whether ln -s works" >&5
3429 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3430 LN_S=$as_ln_s
3431 if test "$LN_S" = "ln -s"; then
3432   echo "$as_me:3432: result: yes" >&5
3433 echo "${ECHO_T}yes" >&6
3434 else
3435   echo "$as_me:3435: result: no, using $LN_S" >&5
3436 echo "${ECHO_T}no, using $LN_S" >&6
3437 fi
3438
3439 echo "$as_me:3439: checking if $LN_S -f options work" >&5
3440 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3441
3442 rm -f conf$$.src conf$$dst
3443 echo >conf$$.dst
3444 echo first >conf$$.src
3445 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3446         cf_prog_ln_sf=yes
3447 else
3448         cf_prog_ln_sf=no
3449 fi
3450 rm -f conf$$.dst conf$$src
3451 echo "$as_me:3451: result: $cf_prog_ln_sf" >&5
3452 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3453
3454 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3455
3456 echo "$as_me:3456: checking for long file names" >&5
3457 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3458 if test "${ac_cv_sys_long_file_names+set}" = set; then
3459   echo $ECHO_N "(cached) $ECHO_C" >&6
3460 else
3461   ac_cv_sys_long_file_names=yes
3462 # Test for long file names in all the places we know might matter:
3463 #      .                the current directory, where building will happen
3464 #      $prefix/lib      where we will be installing things
3465 #      $exec_prefix/lib likewise
3466 # eval it to expand exec_prefix.
3467 #      $TMPDIR          if set, where it might want to write temporary files
3468 # if $TMPDIR is not set:
3469 #      /tmp             where it might want to write temporary files
3470 #      /var/tmp         likewise
3471 #      /usr/tmp         likewise
3472 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3473   ac_tmpdirs=$TMPDIR
3474 else
3475   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3476 fi
3477 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3478   test -d $ac_dir || continue
3479   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3480   ac_xdir=$ac_dir/cf$$
3481   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3482   ac_tf1=$ac_xdir/conftest9012345
3483   ac_tf2=$ac_xdir/conftest9012346
3484   (echo 1 >$ac_tf1) 2>/dev/null
3485   (echo 2 >$ac_tf2) 2>/dev/null
3486   ac_val=`cat $ac_tf1 2>/dev/null`
3487   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3488     ac_cv_sys_long_file_names=no
3489     rm -rf $ac_xdir 2>/dev/null
3490     break
3491   fi
3492   rm -rf $ac_xdir 2>/dev/null
3493 done
3494 fi
3495 echo "$as_me:3495: result: $ac_cv_sys_long_file_names" >&5
3496 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3497 if test $ac_cv_sys_long_file_names = yes; then
3498
3499 cat >>confdefs.h <<\EOF
3500 #define HAVE_LONG_FILE_NAMES 1
3501 EOF
3502
3503 fi
3504
3505 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3506 # of package conflict.
3507 cf_config_suffix=
3508
3509 # Check whether --with-config-suffix or --without-config-suffix was given.
3510 if test "${with_config_suffix+set}" = set; then
3511   withval="$with_config_suffix"
3512   case "x$withval" in
3513         (xyes|xno)
3514                 { echo "$as_me:3514: WARNING: expected a value for config-suffix option" >&5
3515 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3516                 ;;
3517         (*)     cf_config_suffix="$withval"
3518                 ;;
3519         esac
3520 fi;
3521
3522 # If we find pkg-config, check if we should install the ".pc" files.
3523
3524 echo "$as_me:3524: checking if you want to use pkg-config" >&5
3525 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3526
3527 # Check whether --with-pkg-config or --without-pkg-config was given.
3528 if test "${with_pkg_config+set}" = set; then
3529   withval="$with_pkg_config"
3530   cf_pkg_config=$withval
3531 else
3532   cf_pkg_config=yes
3533 fi;
3534 echo "$as_me:3534: result: $cf_pkg_config" >&5
3535 echo "${ECHO_T}$cf_pkg_config" >&6
3536
3537 case $cf_pkg_config in
3538 (no)
3539         PKG_CONFIG=none
3540         ;;
3541 (yes)
3542
3543 if test -n "$ac_tool_prefix"; then
3544   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3545 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3546 echo "$as_me:3546: checking for $ac_word" >&5
3547 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3548 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3549   echo $ECHO_N "(cached) $ECHO_C" >&6
3550 else
3551   case $PKG_CONFIG in
3552   [\\/]* | ?:[\\/]*)
3553   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3554   ;;
3555   *)
3556   ac_save_IFS=$IFS; IFS=$ac_path_separator
3557 ac_dummy="$PATH"
3558 for ac_dir in $ac_dummy; do
3559   IFS=$ac_save_IFS
3560   test -z "$ac_dir" && ac_dir=.
3561   if $as_executable_p "$ac_dir/$ac_word"; then
3562    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3563    echo "$as_me:3563: found $ac_dir/$ac_word" >&5
3564    break
3565 fi
3566 done
3567
3568   ;;
3569 esac
3570 fi
3571 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3572
3573 if test -n "$PKG_CONFIG"; then
3574   echo "$as_me:3574: result: $PKG_CONFIG" >&5
3575 echo "${ECHO_T}$PKG_CONFIG" >&6
3576 else
3577   echo "$as_me:3577: result: no" >&5
3578 echo "${ECHO_T}no" >&6
3579 fi
3580
3581 fi
3582 if test -z "$ac_cv_path_PKG_CONFIG"; then
3583   ac_pt_PKG_CONFIG=$PKG_CONFIG
3584   # Extract the first word of "pkg-config", so it can be a program name with args.
3585 set dummy pkg-config; ac_word=$2
3586 echo "$as_me:3586: checking for $ac_word" >&5
3587 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3588 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3589   echo $ECHO_N "(cached) $ECHO_C" >&6
3590 else
3591   case $ac_pt_PKG_CONFIG in
3592   [\\/]* | ?:[\\/]*)
3593   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3594   ;;
3595   *)
3596   ac_save_IFS=$IFS; IFS=$ac_path_separator
3597 ac_dummy="$PATH"
3598 for ac_dir in $ac_dummy; do
3599   IFS=$ac_save_IFS
3600   test -z "$ac_dir" && ac_dir=.
3601   if $as_executable_p "$ac_dir/$ac_word"; then
3602    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3603    echo "$as_me:3603: found $ac_dir/$ac_word" >&5
3604    break
3605 fi
3606 done
3607
3608   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3609   ;;
3610 esac
3611 fi
3612 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3613
3614 if test -n "$ac_pt_PKG_CONFIG"; then
3615   echo "$as_me:3615: result: $ac_pt_PKG_CONFIG" >&5
3616 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3617 else
3618   echo "$as_me:3618: result: no" >&5
3619 echo "${ECHO_T}no" >&6
3620 fi
3621
3622   PKG_CONFIG=$ac_pt_PKG_CONFIG
3623 else
3624   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3625 fi
3626
3627         ;;
3628 (*)
3629         PKG_CONFIG=$withval
3630         ;;
3631 esac
3632
3633 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3634 if test "$PKG_CONFIG" != none ; then
3635
3636 if test "x$prefix" != xNONE; then
3637         cf_path_syntax="$prefix"
3638 else
3639         cf_path_syntax="$ac_default_prefix"
3640 fi
3641
3642 case ".$PKG_CONFIG" in
3643 (.\$\(*\)*|.\'*\'*)
3644         ;;
3645 (..|./*|.\\*)
3646         ;;
3647 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3648         ;;
3649 (.\${*prefix}*|.\${*dir}*)
3650         eval PKG_CONFIG="$PKG_CONFIG"
3651         case ".$PKG_CONFIG" in
3652         (.NONE/*)
3653                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3654                 ;;
3655         esac
3656         ;;
3657 (.no|.NONE/*)
3658         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3659         ;;
3660 (*)
3661         { { echo "$as_me:3661: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3662 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3663    { (exit 1); exit 1; }; }
3664         ;;
3665 esac
3666
3667 elif test "x$cf_pkg_config" != xno ; then
3668         { echo "$as_me:3668: WARNING: pkg-config is not installed" >&5
3669 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3670 fi
3671
3672 case $PKG_CONFIG in
3673 (no|none|yes)
3674         echo "$as_me:3674: checking for pkg-config library directory" >&5
3675 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3676         ;;
3677 (*)
3678         echo "$as_me:3678: checking for $PKG_CONFIG library directory" >&5
3679 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3680         ;;
3681 esac
3682
3683 PKG_CONFIG_LIBDIR=no
3684
3685 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3686 if test "${with_pkg_config_libdir+set}" = set; then
3687   withval="$with_pkg_config_libdir"
3688   PKG_CONFIG_LIBDIR=$withval
3689 else
3690   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3691 fi;
3692
3693 case x$PKG_CONFIG_LIBDIR in
3694 (x/*)
3695         ;;
3696 (xyes)
3697         # Look for the library directory using the same prefix as the executable
3698         if test "x$PKG_CONFIG" = xnone
3699         then
3700                 cf_path=$prefix
3701         else
3702                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3703         fi
3704
3705         # If you don't like using the default architecture, you have to specify the
3706         # intended library directory and corresponding compiler/linker options.
3707         #
3708         # This case allows for Debian's 2014-flavor of multiarch, along with the
3709         # most common variations before that point.  Some other variants spell the
3710         # directory differently, e.g., "pkg-config", and put it in unusual places.
3711         # pkg-config has always been poorly standardized, which is ironic...
3712         case x`(arch) 2>/dev/null` in
3713         (*64)
3714                 cf_search_path="\
3715                         $cf_path/lib/*64-linux-gnu \
3716                         $cf_path/share \
3717                         $cf_path/lib64 \
3718                         $cf_path/lib32 \
3719                         $cf_path/lib"
3720                 ;;
3721         (*)
3722                 cf_search_path="\
3723                         $cf_path/lib/*-linux-gnu \
3724                         $cf_path/share \
3725                         $cf_path/lib32 \
3726                         $cf_path/lib \
3727                         $cf_path/libdata"
3728                 ;;
3729         esac
3730
3731         test -n "$verbose" && echo "    list..." 1>&6
3732
3733 echo "${as_me:-configure}:3733: testing list... ..." 1>&5
3734
3735         for cf_config in $cf_search_path
3736         do
3737                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3738
3739 echo "${as_me:-configure}:3739: testing checking $cf_config/pkgconfig ..." 1>&5
3740
3741                 if test -d $cf_config/pkgconfig
3742                 then
3743                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3744                         echo "$as_me:3744: checking done" >&5
3745 echo $ECHO_N "checking done... $ECHO_C" >&6
3746                         break
3747                 fi
3748         done
3749         ;;
3750 (*)
3751         ;;
3752 esac
3753
3754 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3755         echo "$as_me:3755: result: $PKG_CONFIG_LIBDIR" >&5
3756 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3757 fi
3758
3759 if test "x$PKG_CONFIG" != xnone
3760 then
3761         echo "$as_me:3761: checking if we should install .pc files for $PKG_CONFIG" >&5
3762 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3763 else
3764         echo "$as_me:3764: checking if we should install .pc files" >&5
3765 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3766 fi
3767
3768 # Check whether --enable-pc-files or --disable-pc-files was given.
3769 if test "${enable_pc_files+set}" = set; then
3770   enableval="$enable_pc_files"
3771   enable_pc_files=$enableval
3772 else
3773   enable_pc_files=no
3774 fi;
3775 echo "$as_me:3775: result: $enable_pc_files" >&5
3776 echo "${ECHO_T}$enable_pc_files" >&6
3777
3778 if test "x$enable_pc_files" != xno
3779 then
3780         MAKE_PC_FILES=
3781         case "x$PKG_CONFIG_LIBDIR" in
3782         (xno|xyes)
3783                 { echo "$as_me:3783: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3784 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3785                 ;;
3786         (*)
3787
3788 if test "x$prefix" != xNONE; then
3789         cf_path_syntax="$prefix"
3790 else
3791         cf_path_syntax="$ac_default_prefix"
3792 fi
3793
3794 case ".$PKG_CONFIG_LIBDIR" in
3795 (.\$\(*\)*|.\'*\'*)
3796         ;;
3797 (..|./*|.\\*)
3798         ;;
3799 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3800         ;;
3801 (.\${*prefix}*|.\${*dir}*)
3802         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3803         case ".$PKG_CONFIG_LIBDIR" in
3804         (.NONE/*)
3805                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3806                 ;;
3807         esac
3808         ;;
3809 (.no|.NONE/*)
3810         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3811         ;;
3812 (*)
3813         { { echo "$as_me:3813: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3814 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3815    { (exit 1); exit 1; }; }
3816         ;;
3817 esac
3818
3819                 ;;
3820         esac
3821 else
3822         MAKE_PC_FILES="#"
3823 fi
3824
3825 if test -z "$MAKE_PC_FILES"
3826 then
3827         echo "$as_me:3827: checking for suffix to add to pc-files" >&5
3828 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3829
3830 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3831 if test "${with_pc_suffix+set}" = set; then
3832   withval="$with_pc_suffix"
3833   case "x$withval" in
3834         (xyes|xno)
3835                 PC_MODULE_SUFFIX=
3836                 ;;
3837         (*)     PC_MODULE_SUFFIX="$withval"
3838                 ;;
3839         esac
3840 fi;
3841         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3842         echo "$as_me:3842: result: $PC_MODULE_SUFFIX" >&5
3843 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3844         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3845
3846 fi
3847
3848 echo "$as_me:3848: checking if we should assume mixed-case filenames" >&5
3849 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3850
3851 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3852 if test "${enable_mixed_case+set}" = set; then
3853   enableval="$enable_mixed_case"
3854   enable_mixedcase=$enableval
3855 else
3856   enable_mixedcase=auto
3857 fi;
3858 echo "$as_me:3858: result: $enable_mixedcase" >&5
3859 echo "${ECHO_T}$enable_mixedcase" >&6
3860 if test "$enable_mixedcase" = "auto" ; then
3861
3862 echo "$as_me:3862: checking if filesystem supports mixed-case filenames" >&5
3863 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3864 if test "${cf_cv_mixedcase+set}" = set; then
3865   echo $ECHO_N "(cached) $ECHO_C" >&6
3866 else
3867
3868 if test "$cross_compiling" = yes ; then
3869         case $target_alias in
3870         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3871                 cf_cv_mixedcase=no
3872                 ;;
3873         (*)
3874                 cf_cv_mixedcase=yes
3875                 ;;
3876         esac
3877 else
3878         rm -f conftest CONFTEST
3879         echo test >conftest
3880         if test -f CONFTEST ; then
3881                 cf_cv_mixedcase=no
3882         else
3883                 cf_cv_mixedcase=yes
3884         fi
3885         rm -f conftest CONFTEST
3886 fi
3887
3888 fi
3889 echo "$as_me:3889: result: $cf_cv_mixedcase" >&5
3890 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3891 test "$cf_cv_mixedcase" = yes &&
3892 cat >>confdefs.h <<\EOF
3893 #define MIXEDCASE_FILENAMES 1
3894 EOF
3895
3896 else
3897         cf_cv_mixedcase=$enable_mixedcase
3898         if test "x$enable_mixedcase" = "xyes" ; then
3899
3900 cat >>confdefs.h <<\EOF
3901 #define MIXEDCASE_FILENAMES 1
3902 EOF
3903
3904         fi
3905 fi
3906
3907 # do this after mixed-case option (tags/TAGS is not as important as tic).
3908 echo "$as_me:3908: checking whether ${MAKE-make} sets \${MAKE}" >&5
3909 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3910 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3911 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3912   echo $ECHO_N "(cached) $ECHO_C" >&6
3913 else
3914   cat >conftest.make <<\EOF
3915 all:
3916         @echo 'ac_maketemp="${MAKE}"'
3917 EOF
3918 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3919 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3920 if test -n "$ac_maketemp"; then
3921   eval ac_cv_prog_make_${ac_make}_set=yes
3922 else
3923   eval ac_cv_prog_make_${ac_make}_set=no
3924 fi
3925 rm -f conftest.make
3926 fi
3927 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3928   echo "$as_me:3928: result: yes" >&5
3929 echo "${ECHO_T}yes" >&6
3930   SET_MAKE=
3931 else
3932   echo "$as_me:3932: result: no" >&5
3933 echo "${ECHO_T}no" >&6
3934   SET_MAKE="MAKE=${MAKE-make}"
3935 fi
3936
3937 for ac_prog in exctags ctags
3938 do
3939   # Extract the first word of "$ac_prog", so it can be a program name with args.
3940 set dummy $ac_prog; ac_word=$2
3941 echo "$as_me:3941: checking for $ac_word" >&5
3942 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3943 if test "${ac_cv_prog_CTAGS+set}" = set; then
3944   echo $ECHO_N "(cached) $ECHO_C" >&6
3945 else
3946   if test -n "$CTAGS"; then
3947   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3948 else
3949   ac_save_IFS=$IFS; IFS=$ac_path_separator
3950 ac_dummy="$PATH"
3951 for ac_dir in $ac_dummy; do
3952   IFS=$ac_save_IFS
3953   test -z "$ac_dir" && ac_dir=.
3954   $as_executable_p "$ac_dir/$ac_word" || continue
3955 ac_cv_prog_CTAGS="$ac_prog"
3956 echo "$as_me:3956: found $ac_dir/$ac_word" >&5
3957 break
3958 done
3959
3960 fi
3961 fi
3962 CTAGS=$ac_cv_prog_CTAGS
3963 if test -n "$CTAGS"; then
3964   echo "$as_me:3964: result: $CTAGS" >&5
3965 echo "${ECHO_T}$CTAGS" >&6
3966 else
3967   echo "$as_me:3967: result: no" >&5
3968 echo "${ECHO_T}no" >&6
3969 fi
3970
3971   test -n "$CTAGS" && break
3972 done
3973
3974 for ac_prog in exetags etags
3975 do
3976   # Extract the first word of "$ac_prog", so it can be a program name with args.
3977 set dummy $ac_prog; ac_word=$2
3978 echo "$as_me:3978: checking for $ac_word" >&5
3979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3980 if test "${ac_cv_prog_ETAGS+set}" = set; then
3981   echo $ECHO_N "(cached) $ECHO_C" >&6
3982 else
3983   if test -n "$ETAGS"; then
3984   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3985 else
3986   ac_save_IFS=$IFS; IFS=$ac_path_separator
3987 ac_dummy="$PATH"
3988 for ac_dir in $ac_dummy; do
3989   IFS=$ac_save_IFS
3990   test -z "$ac_dir" && ac_dir=.
3991   $as_executable_p "$ac_dir/$ac_word" || continue
3992 ac_cv_prog_ETAGS="$ac_prog"
3993 echo "$as_me:3993: found $ac_dir/$ac_word" >&5
3994 break
3995 done
3996
3997 fi
3998 fi
3999 ETAGS=$ac_cv_prog_ETAGS
4000 if test -n "$ETAGS"; then
4001   echo "$as_me:4001: result: $ETAGS" >&5
4002 echo "${ECHO_T}$ETAGS" >&6
4003 else
4004   echo "$as_me:4004: result: no" >&5
4005 echo "${ECHO_T}no" >&6
4006 fi
4007
4008   test -n "$ETAGS" && break
4009 done
4010
4011 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4012 set dummy ${CTAGS:-ctags}; ac_word=$2
4013 echo "$as_me:4013: checking for $ac_word" >&5
4014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4015 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4016   echo $ECHO_N "(cached) $ECHO_C" >&6
4017 else
4018   if test -n "$MAKE_LOWER_TAGS"; then
4019   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4020 else
4021   ac_save_IFS=$IFS; IFS=$ac_path_separator
4022 ac_dummy="$PATH"
4023 for ac_dir in $ac_dummy; do
4024   IFS=$ac_save_IFS
4025   test -z "$ac_dir" && ac_dir=.
4026   $as_executable_p "$ac_dir/$ac_word" || continue
4027 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4028 echo "$as_me:4028: found $ac_dir/$ac_word" >&5
4029 break
4030 done
4031
4032   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4033 fi
4034 fi
4035 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4036 if test -n "$MAKE_LOWER_TAGS"; then
4037   echo "$as_me:4037: result: $MAKE_LOWER_TAGS" >&5
4038 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4039 else
4040   echo "$as_me:4040: result: no" >&5
4041 echo "${ECHO_T}no" >&6
4042 fi
4043
4044 if test "$cf_cv_mixedcase" = yes ; then
4045         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4046 set dummy ${ETAGS:-etags}; ac_word=$2
4047 echo "$as_me:4047: checking for $ac_word" >&5
4048 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4049 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4050   echo $ECHO_N "(cached) $ECHO_C" >&6
4051 else
4052   if test -n "$MAKE_UPPER_TAGS"; then
4053   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4054 else
4055   ac_save_IFS=$IFS; IFS=$ac_path_separator
4056 ac_dummy="$PATH"
4057 for ac_dir in $ac_dummy; do
4058   IFS=$ac_save_IFS
4059   test -z "$ac_dir" && ac_dir=.
4060   $as_executable_p "$ac_dir/$ac_word" || continue
4061 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4062 echo "$as_me:4062: found $ac_dir/$ac_word" >&5
4063 break
4064 done
4065
4066   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4067 fi
4068 fi
4069 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4070 if test -n "$MAKE_UPPER_TAGS"; then
4071   echo "$as_me:4071: result: $MAKE_UPPER_TAGS" >&5
4072 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4073 else
4074   echo "$as_me:4074: result: no" >&5
4075 echo "${ECHO_T}no" >&6
4076 fi
4077
4078 else
4079         MAKE_UPPER_TAGS=no
4080 fi
4081
4082 if test "$MAKE_UPPER_TAGS" = yes ; then
4083         MAKE_UPPER_TAGS=
4084 else
4085         MAKE_UPPER_TAGS="#"
4086 fi
4087
4088 if test "$MAKE_LOWER_TAGS" = yes ; then
4089         MAKE_LOWER_TAGS=
4090 else
4091         MAKE_LOWER_TAGS="#"
4092 fi
4093
4094 echo "$as_me:4094: checking for makeflags variable" >&5
4095 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4096 if test "${cf_cv_makeflags+set}" = set; then
4097   echo $ECHO_N "(cached) $ECHO_C" >&6
4098 else
4099
4100         cf_cv_makeflags=''
4101         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4102         do
4103                 cat >cf_makeflags.tmp <<CF_EOF
4104 SHELL = $SHELL
4105 all :
4106         @ echo '.$cf_option'
4107 CF_EOF
4108                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4109                 case "$cf_result" in
4110                 (.*k|.*kw)
4111                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4112                         case "$cf_result" in
4113                         (.*CC=*)        cf_cv_makeflags=
4114                                 ;;
4115                         (*)     cf_cv_makeflags=$cf_option
4116                                 ;;
4117                         esac
4118                         break
4119                         ;;
4120                 (.-)
4121                         ;;
4122                 (*)
4123
4124 echo "${as_me:-configure}:4124: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4125
4126                         ;;
4127                 esac
4128         done
4129         rm -f cf_makeflags.tmp
4130
4131 fi
4132 echo "$as_me:4132: result: $cf_cv_makeflags" >&5
4133 echo "${ECHO_T}$cf_cv_makeflags" >&6
4134
4135 if test -n "$ac_tool_prefix"; then
4136   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4137 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4138 echo "$as_me:4138: checking for $ac_word" >&5
4139 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4140 if test "${ac_cv_prog_RANLIB+set}" = set; then
4141   echo $ECHO_N "(cached) $ECHO_C" >&6
4142 else
4143   if test -n "$RANLIB"; then
4144   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4145 else
4146   ac_save_IFS=$IFS; IFS=$ac_path_separator
4147 ac_dummy="$PATH"
4148 for ac_dir in $ac_dummy; do
4149   IFS=$ac_save_IFS
4150   test -z "$ac_dir" && ac_dir=.
4151   $as_executable_p "$ac_dir/$ac_word" || continue
4152 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4153 echo "$as_me:4153: found $ac_dir/$ac_word" >&5
4154 break
4155 done
4156
4157 fi
4158 fi
4159 RANLIB=$ac_cv_prog_RANLIB
4160 if test -n "$RANLIB"; then
4161   echo "$as_me:4161: result: $RANLIB" >&5
4162 echo "${ECHO_T}$RANLIB" >&6
4163 else
4164   echo "$as_me:4164: result: no" >&5
4165 echo "${ECHO_T}no" >&6
4166 fi
4167
4168 fi
4169 if test -z "$ac_cv_prog_RANLIB"; then
4170   ac_ct_RANLIB=$RANLIB
4171   # Extract the first word of "ranlib", so it can be a program name with args.
4172 set dummy ranlib; ac_word=$2
4173 echo "$as_me:4173: checking for $ac_word" >&5
4174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4175 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4176   echo $ECHO_N "(cached) $ECHO_C" >&6
4177 else
4178   if test -n "$ac_ct_RANLIB"; then
4179   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4180 else
4181   ac_save_IFS=$IFS; IFS=$ac_path_separator
4182 ac_dummy="$PATH"
4183 for ac_dir in $ac_dummy; do
4184   IFS=$ac_save_IFS
4185   test -z "$ac_dir" && ac_dir=.
4186   $as_executable_p "$ac_dir/$ac_word" || continue
4187 ac_cv_prog_ac_ct_RANLIB="ranlib"
4188 echo "$as_me:4188: found $ac_dir/$ac_word" >&5
4189 break
4190 done
4191
4192   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4193 fi
4194 fi
4195 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4196 if test -n "$ac_ct_RANLIB"; then
4197   echo "$as_me:4197: result: $ac_ct_RANLIB" >&5
4198 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4199 else
4200   echo "$as_me:4200: result: no" >&5
4201 echo "${ECHO_T}no" >&6
4202 fi
4203
4204   RANLIB=$ac_ct_RANLIB
4205 else
4206   RANLIB="$ac_cv_prog_RANLIB"
4207 fi
4208
4209 if test -n "$ac_tool_prefix"; then
4210   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4211 set dummy ${ac_tool_prefix}ld; ac_word=$2
4212 echo "$as_me:4212: checking for $ac_word" >&5
4213 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4214 if test "${ac_cv_prog_LD+set}" = set; then
4215   echo $ECHO_N "(cached) $ECHO_C" >&6
4216 else
4217   if test -n "$LD"; then
4218   ac_cv_prog_LD="$LD" # Let the user override the test.
4219 else
4220   ac_save_IFS=$IFS; IFS=$ac_path_separator
4221 ac_dummy="$PATH"
4222 for ac_dir in $ac_dummy; do
4223   IFS=$ac_save_IFS
4224   test -z "$ac_dir" && ac_dir=.
4225   $as_executable_p "$ac_dir/$ac_word" || continue
4226 ac_cv_prog_LD="${ac_tool_prefix}ld"
4227 echo "$as_me:4227: found $ac_dir/$ac_word" >&5
4228 break
4229 done
4230
4231 fi
4232 fi
4233 LD=$ac_cv_prog_LD
4234 if test -n "$LD"; then
4235   echo "$as_me:4235: result: $LD" >&5
4236 echo "${ECHO_T}$LD" >&6
4237 else
4238   echo "$as_me:4238: result: no" >&5
4239 echo "${ECHO_T}no" >&6
4240 fi
4241
4242 fi
4243 if test -z "$ac_cv_prog_LD"; then
4244   ac_ct_LD=$LD
4245   # Extract the first word of "ld", so it can be a program name with args.
4246 set dummy ld; ac_word=$2
4247 echo "$as_me:4247: checking for $ac_word" >&5
4248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4249 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4250   echo $ECHO_N "(cached) $ECHO_C" >&6
4251 else
4252   if test -n "$ac_ct_LD"; then
4253   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4254 else
4255   ac_save_IFS=$IFS; IFS=$ac_path_separator
4256 ac_dummy="$PATH"
4257 for ac_dir in $ac_dummy; do
4258   IFS=$ac_save_IFS
4259   test -z "$ac_dir" && ac_dir=.
4260   $as_executable_p "$ac_dir/$ac_word" || continue
4261 ac_cv_prog_ac_ct_LD="ld"
4262 echo "$as_me:4262: found $ac_dir/$ac_word" >&5
4263 break
4264 done
4265
4266   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4267 fi
4268 fi
4269 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4270 if test -n "$ac_ct_LD"; then
4271   echo "$as_me:4271: result: $ac_ct_LD" >&5
4272 echo "${ECHO_T}$ac_ct_LD" >&6
4273 else
4274   echo "$as_me:4274: result: no" >&5
4275 echo "${ECHO_T}no" >&6
4276 fi
4277
4278   LD=$ac_ct_LD
4279 else
4280   LD="$ac_cv_prog_LD"
4281 fi
4282
4283 if test -n "$ac_tool_prefix"; then
4284   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4285 set dummy ${ac_tool_prefix}ar; ac_word=$2
4286 echo "$as_me:4286: checking for $ac_word" >&5
4287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4288 if test "${ac_cv_prog_AR+set}" = set; then
4289   echo $ECHO_N "(cached) $ECHO_C" >&6
4290 else
4291   if test -n "$AR"; then
4292   ac_cv_prog_AR="$AR" # Let the user override the test.
4293 else
4294   ac_save_IFS=$IFS; IFS=$ac_path_separator
4295 ac_dummy="$PATH"
4296 for ac_dir in $ac_dummy; do
4297   IFS=$ac_save_IFS
4298   test -z "$ac_dir" && ac_dir=.
4299   $as_executable_p "$ac_dir/$ac_word" || continue
4300 ac_cv_prog_AR="${ac_tool_prefix}ar"
4301 echo "$as_me:4301: found $ac_dir/$ac_word" >&5
4302 break
4303 done
4304
4305 fi
4306 fi
4307 AR=$ac_cv_prog_AR
4308 if test -n "$AR"; then
4309   echo "$as_me:4309: result: $AR" >&5
4310 echo "${ECHO_T}$AR" >&6
4311 else
4312   echo "$as_me:4312: result: no" >&5
4313 echo "${ECHO_T}no" >&6
4314 fi
4315
4316 fi
4317 if test -z "$ac_cv_prog_AR"; then
4318   ac_ct_AR=$AR
4319   # Extract the first word of "ar", so it can be a program name with args.
4320 set dummy ar; ac_word=$2
4321 echo "$as_me:4321: checking for $ac_word" >&5
4322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4323 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4324   echo $ECHO_N "(cached) $ECHO_C" >&6
4325 else
4326   if test -n "$ac_ct_AR"; then
4327   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4328 else
4329   ac_save_IFS=$IFS; IFS=$ac_path_separator
4330 ac_dummy="$PATH"
4331 for ac_dir in $ac_dummy; do
4332   IFS=$ac_save_IFS
4333   test -z "$ac_dir" && ac_dir=.
4334   $as_executable_p "$ac_dir/$ac_word" || continue
4335 ac_cv_prog_ac_ct_AR="ar"
4336 echo "$as_me:4336: found $ac_dir/$ac_word" >&5
4337 break
4338 done
4339
4340   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4341 fi
4342 fi
4343 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4344 if test -n "$ac_ct_AR"; then
4345   echo "$as_me:4345: result: $ac_ct_AR" >&5
4346 echo "${ECHO_T}$ac_ct_AR" >&6
4347 else
4348   echo "$as_me:4348: result: no" >&5
4349 echo "${ECHO_T}no" >&6
4350 fi
4351
4352   AR=$ac_ct_AR
4353 else
4354   AR="$ac_cv_prog_AR"
4355 fi
4356
4357 if test -n "$ac_tool_prefix"; then
4358   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4359 set dummy ${ac_tool_prefix}nm; ac_word=$2
4360 echo "$as_me:4360: checking for $ac_word" >&5
4361 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4362 if test "${ac_cv_prog_NM+set}" = set; then
4363   echo $ECHO_N "(cached) $ECHO_C" >&6
4364 else
4365   if test -n "$NM"; then
4366   ac_cv_prog_NM="$NM" # Let the user override the test.
4367 else
4368   ac_save_IFS=$IFS; IFS=$ac_path_separator
4369 ac_dummy="$PATH"
4370 for ac_dir in $ac_dummy; do
4371   IFS=$ac_save_IFS
4372   test -z "$ac_dir" && ac_dir=.
4373   $as_executable_p "$ac_dir/$ac_word" || continue
4374 ac_cv_prog_NM="${ac_tool_prefix}nm"
4375 echo "$as_me:4375: found $ac_dir/$ac_word" >&5
4376 break
4377 done
4378
4379 fi
4380 fi
4381 NM=$ac_cv_prog_NM
4382 if test -n "$NM"; then
4383   echo "$as_me:4383: result: $NM" >&5
4384 echo "${ECHO_T}$NM" >&6
4385 else
4386   echo "$as_me:4386: result: no" >&5
4387 echo "${ECHO_T}no" >&6
4388 fi
4389
4390 fi
4391 if test -z "$ac_cv_prog_NM"; then
4392   ac_ct_NM=$NM
4393   # Extract the first word of "nm", so it can be a program name with args.
4394 set dummy nm; ac_word=$2
4395 echo "$as_me:4395: checking for $ac_word" >&5
4396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4397 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4398   echo $ECHO_N "(cached) $ECHO_C" >&6
4399 else
4400   if test -n "$ac_ct_NM"; then
4401   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4402 else
4403   ac_save_IFS=$IFS; IFS=$ac_path_separator
4404 ac_dummy="$PATH"
4405 for ac_dir in $ac_dummy; do
4406   IFS=$ac_save_IFS
4407   test -z "$ac_dir" && ac_dir=.
4408   $as_executable_p "$ac_dir/$ac_word" || continue
4409 ac_cv_prog_ac_ct_NM="nm"
4410 echo "$as_me:4410: found $ac_dir/$ac_word" >&5
4411 break
4412 done
4413
4414   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4415 fi
4416 fi
4417 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4418 if test -n "$ac_ct_NM"; then
4419   echo "$as_me:4419: result: $ac_ct_NM" >&5
4420 echo "${ECHO_T}$ac_ct_NM" >&6
4421 else
4422   echo "$as_me:4422: result: no" >&5
4423 echo "${ECHO_T}no" >&6
4424 fi
4425
4426   NM=$ac_ct_NM
4427 else
4428   NM="$ac_cv_prog_NM"
4429 fi
4430
4431 if test -n "$ac_tool_prefix"; then
4432   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4433 set dummy ${ac_tool_prefix}ar; ac_word=$2
4434 echo "$as_me:4434: checking for $ac_word" >&5
4435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4436 if test "${ac_cv_prog_AR+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   if test -n "$AR"; then
4440   ac_cv_prog_AR="$AR" # Let the user override the test.
4441 else
4442   ac_save_IFS=$IFS; IFS=$ac_path_separator
4443 ac_dummy="$PATH"
4444 for ac_dir in $ac_dummy; do
4445   IFS=$ac_save_IFS
4446   test -z "$ac_dir" && ac_dir=.
4447   $as_executable_p "$ac_dir/$ac_word" || continue
4448 ac_cv_prog_AR="${ac_tool_prefix}ar"
4449 echo "$as_me:4449: found $ac_dir/$ac_word" >&5
4450 break
4451 done
4452
4453 fi
4454 fi
4455 AR=$ac_cv_prog_AR
4456 if test -n "$AR"; then
4457   echo "$as_me:4457: result: $AR" >&5
4458 echo "${ECHO_T}$AR" >&6
4459 else
4460   echo "$as_me:4460: result: no" >&5
4461 echo "${ECHO_T}no" >&6
4462 fi
4463
4464 fi
4465 if test -z "$ac_cv_prog_AR"; then
4466   ac_ct_AR=$AR
4467   # Extract the first word of "ar", so it can be a program name with args.
4468 set dummy ar; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   if test -n "$ac_ct_AR"; then
4475   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4476 else
4477   ac_save_IFS=$IFS; IFS=$ac_path_separator
4478 ac_dummy="$PATH"
4479 for ac_dir in $ac_dummy; do
4480   IFS=$ac_save_IFS
4481   test -z "$ac_dir" && ac_dir=.
4482   $as_executable_p "$ac_dir/$ac_word" || continue
4483 ac_cv_prog_ac_ct_AR="ar"
4484 echo "$as_me:4484: found $ac_dir/$ac_word" >&5
4485 break
4486 done
4487
4488   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4489 fi
4490 fi
4491 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4492 if test -n "$ac_ct_AR"; then
4493   echo "$as_me:4493: result: $ac_ct_AR" >&5
4494 echo "${ECHO_T}$ac_ct_AR" >&6
4495 else
4496   echo "$as_me:4496: result: no" >&5
4497 echo "${ECHO_T}no" >&6
4498 fi
4499
4500   AR=$ac_ct_AR
4501 else
4502   AR="$ac_cv_prog_AR"
4503 fi
4504
4505 echo "$as_me:4505: checking for options to update archives" >&5
4506 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4507 if test "${cf_cv_ar_flags+set}" = set; then
4508   echo $ECHO_N "(cached) $ECHO_C" >&6
4509 else
4510
4511         cf_cv_ar_flags=unknown
4512         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4513         do
4514
4515                 # check if $ARFLAGS already contains this choice
4516                 if test "x$ARFLAGS" != "x" ; then
4517                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4518                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4519                                 cf_cv_ar_flags=
4520                                 break
4521                         fi
4522                 fi
4523
4524                 rm -f conftest.$ac_cv_objext
4525                 rm -f conftest.a
4526
4527                 cat >conftest.$ac_ext <<EOF
4528 #line 4528 "configure"
4529 int     testdata[3] = { 123, 456, 789 };
4530 EOF
4531                 if { (eval echo "$as_me:4531: \"$ac_compile\"") >&5
4532   (eval $ac_compile) 2>&5
4533   ac_status=$?
4534   echo "$as_me:4534: \$? = $ac_status" >&5
4535   (exit $ac_status); } ; then
4536                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4537                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4538                         if test -f conftest.a ; then
4539                                 cf_cv_ar_flags=$cf_ar_flags
4540                                 break
4541                         fi
4542                 else
4543                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4544
4545 echo "${as_me:-configure}:4545: testing cannot compile test-program ..." 1>&5
4546
4547                         break
4548                 fi
4549         done
4550         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4551
4552 fi
4553 echo "$as_me:4553: result: $cf_cv_ar_flags" >&5
4554 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4555
4556 if test -n "$ARFLAGS" ; then
4557         if test -n "$cf_cv_ar_flags" ; then
4558                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4559         fi
4560 else
4561         ARFLAGS=$cf_cv_ar_flags
4562 fi
4563
4564 echo "$as_me:4564: checking if you have specified an install-prefix" >&5
4565 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4566
4567 # Check whether --with-install-prefix or --without-install-prefix was given.
4568 if test "${with_install_prefix+set}" = set; then
4569   withval="$with_install_prefix"
4570   case "x$withval" in
4571         (xyes|xno)
4572                 ;;
4573         (*)     DESTDIR="$withval"
4574                 ;;
4575         esac
4576 fi;
4577 echo "$as_me:4577: result: $DESTDIR" >&5
4578 echo "${ECHO_T}$DESTDIR" >&6
4579
4580 ###############################################################################
4581
4582 # If we're cross-compiling, allow the user to override the tools and their
4583 # options.  The configure script is oriented toward identifying the host
4584 # compiler, etc., but we need a build compiler to generate parts of the source.
4585
4586 if test "$cross_compiling" = yes ; then
4587
4588         # defaults that we might want to override
4589         : ${BUILD_CFLAGS:=''}
4590         : ${BUILD_CPPFLAGS:=''}
4591         : ${BUILD_LDFLAGS:=''}
4592         : ${BUILD_LIBS:=''}
4593         : ${BUILD_EXEEXT:='$x'}
4594         : ${BUILD_OBJEXT:='o'}
4595
4596 # Check whether --with-build-cc or --without-build-cc was given.
4597 if test "${with_build_cc+set}" = set; then
4598   withval="$with_build_cc"
4599   BUILD_CC="$withval"
4600 else
4601   for ac_prog in gcc clang c99 c89 cc cl
4602 do
4603   # Extract the first word of "$ac_prog", so it can be a program name with args.
4604 set dummy $ac_prog; ac_word=$2
4605 echo "$as_me:4605: checking for $ac_word" >&5
4606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4607 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4608   echo $ECHO_N "(cached) $ECHO_C" >&6
4609 else
4610   if test -n "$BUILD_CC"; then
4611   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4612 else
4613   ac_save_IFS=$IFS; IFS=$ac_path_separator
4614 ac_dummy="$PATH"
4615 for ac_dir in $ac_dummy; do
4616   IFS=$ac_save_IFS
4617   test -z "$ac_dir" && ac_dir=.
4618   $as_executable_p "$ac_dir/$ac_word" || continue
4619 ac_cv_prog_BUILD_CC="$ac_prog"
4620 echo "$as_me:4620: found $ac_dir/$ac_word" >&5
4621 break
4622 done
4623
4624 fi
4625 fi
4626 BUILD_CC=$ac_cv_prog_BUILD_CC
4627 if test -n "$BUILD_CC"; then
4628   echo "$as_me:4628: result: $BUILD_CC" >&5
4629 echo "${ECHO_T}$BUILD_CC" >&6
4630 else
4631   echo "$as_me:4631: result: no" >&5
4632 echo "${ECHO_T}no" >&6
4633 fi
4634
4635   test -n "$BUILD_CC" && break
4636 done
4637 test -n "$BUILD_CC" || BUILD_CC="none"
4638
4639 fi;
4640         echo "$as_me:4640: checking for native build C compiler" >&5
4641 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4642         echo "$as_me:4642: result: $BUILD_CC" >&5
4643 echo "${ECHO_T}$BUILD_CC" >&6
4644
4645         echo "$as_me:4645: checking for native build C preprocessor" >&5
4646 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4647
4648 # Check whether --with-build-cpp or --without-build-cpp was given.
4649 if test "${with_build_cpp+set}" = set; then
4650   withval="$with_build_cpp"
4651   BUILD_CPP="$withval"
4652 else
4653   BUILD_CPP='${BUILD_CC} -E'
4654 fi;
4655         echo "$as_me:4655: result: $BUILD_CPP" >&5
4656 echo "${ECHO_T}$BUILD_CPP" >&6
4657
4658         echo "$as_me:4658: checking for native build C flags" >&5
4659 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4660
4661 # Check whether --with-build-cflags or --without-build-cflags was given.
4662 if test "${with_build_cflags+set}" = set; then
4663   withval="$with_build_cflags"
4664   BUILD_CFLAGS="$withval"
4665 fi;
4666         echo "$as_me:4666: result: $BUILD_CFLAGS" >&5
4667 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4668
4669         echo "$as_me:4669: checking for native build C preprocessor-flags" >&5
4670 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4671
4672 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4673 if test "${with_build_cppflags+set}" = set; then
4674   withval="$with_build_cppflags"
4675   BUILD_CPPFLAGS="$withval"
4676 fi;
4677         echo "$as_me:4677: result: $BUILD_CPPFLAGS" >&5
4678 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4679
4680         echo "$as_me:4680: checking for native build linker-flags" >&5
4681 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4682
4683 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4684 if test "${with_build_ldflags+set}" = set; then
4685   withval="$with_build_ldflags"
4686   BUILD_LDFLAGS="$withval"
4687 fi;
4688         echo "$as_me:4688: result: $BUILD_LDFLAGS" >&5
4689 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4690
4691         echo "$as_me:4691: checking for native build linker-libraries" >&5
4692 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4693
4694 # Check whether --with-build-libs or --without-build-libs was given.
4695 if test "${with_build_libs+set}" = set; then
4696   withval="$with_build_libs"
4697   BUILD_LIBS="$withval"
4698 fi;
4699         echo "$as_me:4699: result: $BUILD_LIBS" >&5
4700 echo "${ECHO_T}$BUILD_LIBS" >&6
4701
4702         # this assumes we're on Unix.
4703         BUILD_EXEEXT=
4704         BUILD_OBJEXT=o
4705
4706         : ${BUILD_CC:='${CC}'}
4707
4708         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4709                 { { echo "$as_me:4709: error: Cross-build requires two compilers.
4710 Use --with-build-cc to specify the native compiler." >&5
4711 echo "$as_me: error: Cross-build requires two compilers.
4712 Use --with-build-cc to specify the native compiler." >&2;}
4713    { (exit 1); exit 1; }; }
4714         fi
4715
4716 else
4717         : ${BUILD_CC:='${CC}'}
4718         : ${BUILD_CPP:='${CPP}'}
4719         : ${BUILD_CFLAGS:='${CFLAGS}'}
4720         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4721         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4722         : ${BUILD_LIBS:='${LIBS}'}
4723         : ${BUILD_EXEEXT:='$x'}
4724         : ${BUILD_OBJEXT:='o'}
4725 fi
4726
4727 ###############################################################################
4728
4729 ### Options to allow the user to specify the set of libraries which are used.
4730 ### Use "--without-normal --with-shared" to allow the default model to be
4731 ### shared, for example.
4732 cf_list_models=""
4733
4734 echo "$as_me:4734: checking if libtool -version-number should be used" >&5
4735 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4736
4737 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4738 if test "${enable_libtool_version+set}" = set; then
4739   enableval="$enable_libtool_version"
4740   test "$enableval" != no && enableval=yes
4741         if test "$enableval" != "yes" ; then
4742     cf_libtool_version=no
4743         else
4744                 cf_libtool_version=yes
4745         fi
4746 else
4747   enableval=yes
4748         cf_libtool_version=yes
4749
4750 fi;
4751 echo "$as_me:4751: result: $cf_libtool_version" >&5
4752 echo "${ECHO_T}$cf_libtool_version" >&6
4753
4754 if test "$cf_libtool_version" = yes ; then
4755         LIBTOOL_VERSION="-version-number"
4756 else
4757         LIBTOOL_VERSION="-version-info"
4758         case "x$VERSION" in
4759         (x)
4760                 { echo "$as_me:4760: WARNING: VERSION was not set" >&5
4761 echo "$as_me: WARNING: VERSION was not set" >&2;}
4762                 ;;
4763         (x*.*.*)
4764                 ABI_VERSION="$VERSION"
4765                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4766
4767 echo "${as_me:-configure}:4767: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4768
4769                 ;;
4770         (x*:*:*)
4771                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4772                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4773
4774 echo "${as_me:-configure}:4774: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4775
4776                 ;;
4777         (*)
4778                 { echo "$as_me:4778: WARNING: unexpected VERSION value: $VERSION" >&5
4779 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4780                 ;;
4781         esac
4782 fi
4783
4784 LIBTOOL=
4785
4786 # common library maintenance symbols that are convenient for libtool scripts:
4787 LIB_CREATE='${AR} -cr'
4788 LIB_OBJECT='${OBJECTS}'
4789 LIB_SUFFIX=.a
4790 LIB_PREP="$RANLIB"
4791
4792 # symbols used to prop libtool up to enable it to determine what it should be
4793 # doing:
4794 LIB_CLEAN=
4795 LIB_COMPILE=
4796 LIB_LINK='${CC}'
4797 LIB_INSTALL=
4798 LIB_UNINSTALL=
4799
4800 echo "$as_me:4800: checking if you want to build libraries with libtool" >&5
4801 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4802
4803 # Check whether --with-libtool or --without-libtool was given.
4804 if test "${with_libtool+set}" = set; then
4805   withval="$with_libtool"
4806   with_libtool=$withval
4807 else
4808   with_libtool=no
4809 fi;
4810 echo "$as_me:4810: result: $with_libtool" >&5
4811 echo "${ECHO_T}$with_libtool" >&6
4812 if test "$with_libtool" != "no"; then
4813
4814         if test "$with_libtool" != "yes" ; then
4815
4816 if test "x$prefix" != xNONE; then
4817         cf_path_syntax="$prefix"
4818 else
4819         cf_path_syntax="$ac_default_prefix"
4820 fi
4821
4822 case ".$with_libtool" in
4823 (.\$\(*\)*|.\'*\'*)
4824         ;;
4825 (..|./*|.\\*)
4826         ;;
4827 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4828         ;;
4829 (.\${*prefix}*|.\${*dir}*)
4830         eval with_libtool="$with_libtool"
4831         case ".$with_libtool" in
4832         (.NONE/*)
4833                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4834                 ;;
4835         esac
4836         ;;
4837 (.no|.NONE/*)
4838         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4839         ;;
4840 (*)
4841         { { echo "$as_me:4841: error: expected a pathname, not \"$with_libtool\"" >&5
4842 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4843    { (exit 1); exit 1; }; }
4844         ;;
4845 esac
4846
4847                 LIBTOOL=$with_libtool
4848         else
4849                 if test -n "$ac_tool_prefix"; then
4850   for ac_prog in libtool glibtool
4851   do
4852     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4853 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4854 echo "$as_me:4854: checking for $ac_word" >&5
4855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4856 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4857   echo $ECHO_N "(cached) $ECHO_C" >&6
4858 else
4859   if test -n "$LIBTOOL"; then
4860   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4861 else
4862   ac_save_IFS=$IFS; IFS=$ac_path_separator
4863 ac_dummy="$PATH"
4864 for ac_dir in $ac_dummy; do
4865   IFS=$ac_save_IFS
4866   test -z "$ac_dir" && ac_dir=.
4867   $as_executable_p "$ac_dir/$ac_word" || continue
4868 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4869 echo "$as_me:4869: found $ac_dir/$ac_word" >&5
4870 break
4871 done
4872
4873 fi
4874 fi
4875 LIBTOOL=$ac_cv_prog_LIBTOOL
4876 if test -n "$LIBTOOL"; then
4877   echo "$as_me:4877: result: $LIBTOOL" >&5
4878 echo "${ECHO_T}$LIBTOOL" >&6
4879 else
4880   echo "$as_me:4880: result: no" >&5
4881 echo "${ECHO_T}no" >&6
4882 fi
4883
4884     test -n "$LIBTOOL" && break
4885   done
4886 fi
4887 if test -z "$LIBTOOL"; then
4888   ac_ct_LIBTOOL=$LIBTOOL
4889   for ac_prog in libtool glibtool
4890 do
4891   # Extract the first word of "$ac_prog", so it can be a program name with args.
4892 set dummy $ac_prog; ac_word=$2
4893 echo "$as_me:4893: checking for $ac_word" >&5
4894 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4895 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4896   echo $ECHO_N "(cached) $ECHO_C" >&6
4897 else
4898   if test -n "$ac_ct_LIBTOOL"; then
4899   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4900 else
4901   ac_save_IFS=$IFS; IFS=$ac_path_separator
4902 ac_dummy="$PATH"
4903 for ac_dir in $ac_dummy; do
4904   IFS=$ac_save_IFS
4905   test -z "$ac_dir" && ac_dir=.
4906   $as_executable_p "$ac_dir/$ac_word" || continue
4907 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4908 echo "$as_me:4908: found $ac_dir/$ac_word" >&5
4909 break
4910 done
4911
4912 fi
4913 fi
4914 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4915 if test -n "$ac_ct_LIBTOOL"; then
4916   echo "$as_me:4916: result: $ac_ct_LIBTOOL" >&5
4917 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4918 else
4919   echo "$as_me:4919: result: no" >&5
4920 echo "${ECHO_T}no" >&6
4921 fi
4922
4923   test -n "$ac_ct_LIBTOOL" && break
4924 done
4925 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4926
4927   LIBTOOL=$ac_ct_LIBTOOL
4928 fi
4929
4930 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4931 then
4932         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.].*//'`
4933 else
4934         cf_cv_libtool_version=
4935 fi
4936 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4937
4938                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4939                 then
4940
4941 unset ac_cv_prog_ac_ct_LIBTOOL
4942 unset ac_ct_LIBTOOL
4943 unset LIBTOOL
4944
4945                         if test -n "$ac_tool_prefix"; then
4946   for ac_prog in glibtool
4947   do
4948     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4949 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4950 echo "$as_me:4950: checking for $ac_word" >&5
4951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4952 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4953   echo $ECHO_N "(cached) $ECHO_C" >&6
4954 else
4955   if test -n "$LIBTOOL"; then
4956   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4957 else
4958   ac_save_IFS=$IFS; IFS=$ac_path_separator
4959 ac_dummy="$PATH"
4960 for ac_dir in $ac_dummy; do
4961   IFS=$ac_save_IFS
4962   test -z "$ac_dir" && ac_dir=.
4963   $as_executable_p "$ac_dir/$ac_word" || continue
4964 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4965 echo "$as_me:4965: found $ac_dir/$ac_word" >&5
4966 break
4967 done
4968
4969 fi
4970 fi
4971 LIBTOOL=$ac_cv_prog_LIBTOOL
4972 if test -n "$LIBTOOL"; then
4973   echo "$as_me:4973: result: $LIBTOOL" >&5
4974 echo "${ECHO_T}$LIBTOOL" >&6
4975 else
4976   echo "$as_me:4976: result: no" >&5
4977 echo "${ECHO_T}no" >&6
4978 fi
4979
4980     test -n "$LIBTOOL" && break
4981   done
4982 fi
4983 if test -z "$LIBTOOL"; then
4984   ac_ct_LIBTOOL=$LIBTOOL
4985   for ac_prog in glibtool
4986 do
4987   # Extract the first word of "$ac_prog", so it can be a program name with args.
4988 set dummy $ac_prog; ac_word=$2
4989 echo "$as_me:4989: checking for $ac_word" >&5
4990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4991 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4992   echo $ECHO_N "(cached) $ECHO_C" >&6
4993 else
4994   if test -n "$ac_ct_LIBTOOL"; then
4995   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4996 else
4997   ac_save_IFS=$IFS; IFS=$ac_path_separator
4998 ac_dummy="$PATH"
4999 for ac_dir in $ac_dummy; do
5000   IFS=$ac_save_IFS
5001   test -z "$ac_dir" && ac_dir=.
5002   $as_executable_p "$ac_dir/$ac_word" || continue
5003 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5004 echo "$as_me:5004: found $ac_dir/$ac_word" >&5
5005 break
5006 done
5007
5008 fi
5009 fi
5010 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5011 if test -n "$ac_ct_LIBTOOL"; then
5012   echo "$as_me:5012: result: $ac_ct_LIBTOOL" >&5
5013 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5014 else
5015   echo "$as_me:5015: result: no" >&5
5016 echo "${ECHO_T}no" >&6
5017 fi
5018
5019   test -n "$ac_ct_LIBTOOL" && break
5020 done
5021 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5022
5023   LIBTOOL=$ac_ct_LIBTOOL
5024 fi
5025
5026 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5027 then
5028         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.].*//'`
5029 else
5030         cf_cv_libtool_version=
5031 fi
5032 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5033
5034                 fi
5035         fi
5036         if test -z "$LIBTOOL" ; then
5037                 { { echo "$as_me:5037: error: Cannot find libtool" >&5
5038 echo "$as_me: error: Cannot find libtool" >&2;}
5039    { (exit 1); exit 1; }; }
5040         fi
5041         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5042         LIB_OBJECT='${OBJECTS:.o=.lo}'
5043         LIB_SUFFIX=.la
5044         LIB_CLEAN='${LIBTOOL} --mode=clean'
5045         LIB_COMPILE='${LIBTOOL} --mode=compile'
5046         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5047         LIB_INSTALL='${LIBTOOL} --mode=install'
5048         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5049         LIB_PREP=:
5050
5051 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5052 then
5053         echo "$as_me:5053: checking version of $LIBTOOL" >&5
5054 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5055
5056 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5057 then
5058         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.].*//'`
5059 else
5060         cf_cv_libtool_version=
5061 fi
5062 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5063
5064         echo "$as_me:5064: result: $cf_cv_libtool_version" >&5
5065 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5066         if test -z "$cf_cv_libtool_version" ; then
5067                 { { echo "$as_me:5067: error: This is not GNU libtool" >&5
5068 echo "$as_me: error: This is not GNU libtool" >&2;}
5069    { (exit 1); exit 1; }; }
5070         fi
5071 else
5072         { { echo "$as_me:5072: error: GNU libtool has not been found" >&5
5073 echo "$as_me: error: GNU libtool has not been found" >&2;}
5074    { (exit 1); exit 1; }; }
5075 fi
5076
5077         # special hack to add -no-undefined (which libtool should do for itself)
5078         LT_UNDEF=
5079         case "$cf_cv_system_name" in
5080         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5081                 LT_UNDEF=-no-undefined
5082                 ;;
5083         esac
5084
5085         # special hack to add --tag option for C++ compiler
5086         case $cf_cv_libtool_version in
5087         (1.[5-9]*|[2-9].[0-9.a-z]*)
5088                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5089                 LIBTOOL="$LIBTOOL --tag=CC"
5090                 ;;
5091         (*)
5092                 LIBTOOL_CXX="$LIBTOOL"
5093                 ;;
5094         esac
5095 else
5096         LIBTOOL=""
5097         LIBTOOL_CXX=""
5098 fi
5099
5100 test -z "$LIBTOOL" && ECHO_LT=
5101
5102 if test "$with_libtool" != "no" ; then
5103
5104 cf_list_models="$cf_list_models libtool"
5105
5106 else
5107
5108 echo "$as_me:5108: checking if you want to build shared libraries" >&5
5109 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5110
5111 # Check whether --with-shared or --without-shared was given.
5112 if test "${with_shared+set}" = set; then
5113   withval="$with_shared"
5114   with_shared=$withval
5115 else
5116   with_shared=no
5117 fi;
5118 echo "$as_me:5118: result: $with_shared" >&5
5119 echo "${ECHO_T}$with_shared" >&6
5120 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5121
5122 echo "$as_me:5122: checking if you want to build static libraries" >&5
5123 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5124
5125 # Check whether --with-normal or --without-normal was given.
5126 if test "${with_normal+set}" = set; then
5127   withval="$with_normal"
5128   with_normal=$withval
5129 else
5130   with_normal=yes
5131 fi;
5132 echo "$as_me:5132: result: $with_normal" >&5
5133 echo "${ECHO_T}$with_normal" >&6
5134 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5135
5136 echo "$as_me:5136: checking if you want to build debug libraries" >&5
5137 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5138
5139 # Check whether --with-debug or --without-debug was given.
5140 if test "${with_debug+set}" = set; then
5141   withval="$with_debug"
5142   with_debug=$withval
5143 else
5144   with_debug=yes
5145 fi;
5146 echo "$as_me:5146: result: $with_debug" >&5
5147 echo "${ECHO_T}$with_debug" >&6
5148 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5149
5150 echo "$as_me:5150: checking if you want to build profiling libraries" >&5
5151 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5152
5153 # Check whether --with-profile or --without-profile was given.
5154 if test "${with_profile+set}" = set; then
5155   withval="$with_profile"
5156   with_profile=$withval
5157 else
5158   with_profile=no
5159 fi;
5160 echo "$as_me:5160: result: $with_profile" >&5
5161 echo "${ECHO_T}$with_profile" >&6
5162 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5163
5164 fi
5165
5166 if test "X$cf_with_cxx_binding" != Xno; then
5167 if test "x$with_shared" = "xyes"; then
5168 echo "$as_me:5168: checking if you want to build C++ shared libraries" >&5
5169 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5170
5171 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5172 if test "${with_cxx_shared+set}" = set; then
5173   withval="$with_cxx_shared"
5174   with_shared_cxx=$withval
5175 else
5176   with_shared_cxx=no
5177 fi;
5178 echo "$as_me:5178: result: $with_shared_cxx" >&5
5179 echo "${ECHO_T}$with_shared_cxx" >&6
5180 fi
5181 fi
5182
5183 ###############################################################################
5184
5185 echo "$as_me:5185: checking for specified models" >&5
5186 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5187 test -z "$cf_list_models" && cf_list_models=normal
5188 test "$with_libtool" != "no" && cf_list_models=libtool
5189 echo "$as_me:5189: result: $cf_list_models" >&5
5190 echo "${ECHO_T}$cf_list_models" >&6
5191
5192 ### Use the first model as the default, and save its suffix for use in building
5193 ### up test-applications.
5194 echo "$as_me:5194: checking for default model" >&5
5195 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5196 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5197 echo "$as_me:5197: result: $DFT_LWR_MODEL" >&5
5198 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5199
5200 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5201
5202 TICS_NAME=tic
5203
5204 TINFO_NAME=tinfo
5205
5206 LIB_NAME=ncurses
5207
5208 LIB_DIR=../lib
5209 LIB_2ND=../../lib
5210
5211 echo "$as_me:5211: checking if you want to have a library-prefix" >&5
5212 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5213
5214 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5215 if test "${with_lib_prefix+set}" = set; then
5216   withval="$with_lib_prefix"
5217   with_lib_prefix=$withval
5218 else
5219   with_lib_prefix=auto
5220 fi;
5221 echo "$as_me:5221: result: $with_lib_prefix" >&5
5222 echo "${ECHO_T}$with_lib_prefix" >&6
5223
5224 if test $with_lib_prefix = auto
5225 then
5226
5227         case $cf_cv_system_name in
5228         (OS/2*|os2*)
5229                 if test "$DFT_LWR_MODEL" = libtool; then
5230                         LIB_PREFIX='lib'
5231                 else
5232                         LIB_PREFIX=''
5233                 fi
5234                 ;;
5235         (*)     LIB_PREFIX='lib'
5236                 ;;
5237         esac
5238 cf_prefix=$LIB_PREFIX
5239
5240 elif test $with_lib_prefix = no
5241 then
5242         LIB_PREFIX=
5243 else
5244         LIB_PREFIX=$with_lib_prefix
5245 fi
5246
5247 LIB_SUFFIX=
5248
5249         echo "$as_me:5249: checking for PATH separator" >&5
5250 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5251         case $cf_cv_system_name in
5252         (os2*)  PATH_SEPARATOR=';'  ;;
5253         (*)     ${PATH_SEPARATOR:=':'}  ;;
5254         esac
5255
5256         echo "$as_me:5256: result: $PATH_SEPARATOR" >&5
5257 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5258
5259 ###############################################################################
5260
5261 echo "$as_me:5261: checking if you want to build a separate terminfo library" >&5
5262 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5263
5264 # Check whether --with-termlib or --without-termlib was given.
5265 if test "${with_termlib+set}" = set; then
5266   withval="$with_termlib"
5267   with_termlib=$withval
5268 else
5269   with_termlib=no
5270 fi;
5271 echo "$as_me:5271: result: $with_termlib" >&5
5272 echo "${ECHO_T}$with_termlib" >&6
5273
5274 echo "$as_me:5274: checking if you want to build a separate tic library" >&5
5275 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5276
5277 # Check whether --with-ticlib or --without-ticlib was given.
5278 if test "${with_ticlib+set}" = set; then
5279   withval="$with_ticlib"
5280   with_ticlib=$withval
5281 else
5282   with_ticlib=no
5283 fi;
5284 echo "$as_me:5284: result: $with_ticlib" >&5
5285 echo "${ECHO_T}$with_ticlib" >&6
5286
5287 if test X"$CC_G_OPT" = X"" ; then
5288         CC_G_OPT='-g'
5289         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5290 fi
5291
5292 if test X"$CXX_G_OPT" = X"" ; then
5293         CXX_G_OPT='-g'
5294         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5295 fi
5296
5297 echo "$as_me:5297: checking for default loader flags" >&5
5298 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5299 case $DFT_LWR_MODEL in
5300 (libtool) LD_MODEL=''   ;;
5301 (normal)  LD_MODEL=''   ;;
5302 (debug)   LD_MODEL=$CC_G_OPT ;;
5303 (profile) LD_MODEL='-pg';;
5304 (shared)  LD_MODEL=''   ;;
5305 esac
5306 echo "$as_me:5306: result: $LD_MODEL" >&5
5307 echo "${ECHO_T}$LD_MODEL" >&6
5308
5309 case $DFT_LWR_MODEL in
5310 (shared)
5311
5312 echo "$as_me:5312: checking if rpath option should be used" >&5
5313 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5314
5315 # Check whether --enable-rpath or --disable-rpath was given.
5316 if test "${enable_rpath+set}" = set; then
5317   enableval="$enable_rpath"
5318   cf_cv_enable_rpath=$enableval
5319 else
5320   cf_cv_enable_rpath=no
5321 fi;
5322 echo "$as_me:5322: result: $cf_cv_enable_rpath" >&5
5323 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5324
5325 echo "$as_me:5325: checking if shared libraries should be relinked during install" >&5
5326 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5327
5328 # Check whether --enable-relink or --disable-relink was given.
5329 if test "${enable_relink+set}" = set; then
5330   enableval="$enable_relink"
5331   cf_cv_do_relink=$enableval
5332 else
5333   cf_cv_do_relink=yes
5334 fi;
5335 echo "$as_me:5335: result: $cf_cv_do_relink" >&5
5336 echo "${ECHO_T}$cf_cv_do_relink" >&6
5337         ;;
5338 esac
5339
5340 # we will build libraries one-level down.
5341 rel_builddir=..
5342
5343 LD_RPATH_OPT=
5344 echo "$as_me:5344: checking for an rpath option" >&5
5345 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5346 case $cf_cv_system_name in
5347 (irix*)
5348         if test "$GCC" = yes; then
5349                 LD_RPATH_OPT="-Wl,-rpath,"
5350         else
5351                 LD_RPATH_OPT="-rpath "
5352         fi
5353         ;;
5354 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5355         LD_RPATH_OPT="-Wl,-rpath,"
5356         ;;
5357 (openbsd[2-9].*|mirbsd*)
5358         LD_RPATH_OPT="-Wl,-rpath,"
5359         ;;
5360 (dragonfly*)
5361         LD_RPATH_OPT="-rpath "
5362         ;;
5363 (netbsd*)
5364         LD_RPATH_OPT="-Wl,-rpath,"
5365         ;;
5366 (osf*|mls+*)
5367         LD_RPATH_OPT="-rpath "
5368         ;;
5369 (solaris2*)
5370         LD_RPATH_OPT="-R"
5371         ;;
5372 (*)
5373         ;;
5374 esac
5375 echo "$as_me:5375: result: $LD_RPATH_OPT" >&5
5376 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5377
5378 case "x$LD_RPATH_OPT" in
5379 (x-R*)
5380         echo "$as_me:5380: checking if we need a space after rpath option" >&5
5381 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5382         cf_save_LIBS="$LIBS"
5383
5384 cf_add_libs="${LD_RPATH_OPT}$libdir"
5385 # Filter out duplicates - this happens with badly-designed ".pc" files...
5386 for cf_add_1lib in $LIBS
5387 do
5388         for cf_add_2lib in $cf_add_libs
5389         do
5390                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5391                 then
5392                         cf_add_1lib=
5393                         break
5394                 fi
5395         done
5396         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5397 done
5398 LIBS="$cf_add_libs"
5399
5400         cat >conftest.$ac_ext <<_ACEOF
5401 #line 5401 "configure"
5402 #include "confdefs.h"
5403
5404 int
5405 main (void)
5406 {
5407
5408   ;
5409   return 0;
5410 }
5411 _ACEOF
5412 rm -f conftest.$ac_objext conftest$ac_exeext
5413 if { (eval echo "$as_me:5413: \"$ac_link\"") >&5
5414   (eval $ac_link) 2>&5
5415   ac_status=$?
5416   echo "$as_me:5416: \$? = $ac_status" >&5
5417   (exit $ac_status); } &&
5418          { ac_try='test -s conftest$ac_exeext'
5419   { (eval echo "$as_me:5419: \"$ac_try\"") >&5
5420   (eval $ac_try) 2>&5
5421   ac_status=$?
5422   echo "$as_me:5422: \$? = $ac_status" >&5
5423   (exit $ac_status); }; }; then
5424   cf_rpath_space=no
5425 else
5426   echo "$as_me: failed program was:" >&5
5427 cat conftest.$ac_ext >&5
5428 cf_rpath_space=yes
5429 fi
5430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5431         LIBS="$cf_save_LIBS"
5432         echo "$as_me:5432: result: $cf_rpath_space" >&5
5433 echo "${ECHO_T}$cf_rpath_space" >&6
5434         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5435         ;;
5436 esac
5437
5438         RM_SHARED_OPTS=
5439         LOCAL_LDFLAGS=
5440         LOCAL_LDFLAGS2=
5441         LD_SHARED_OPTS=
5442         INSTALL_LIB="-m 644"
5443         : ${rel_builddir:=.}
5444
5445         shlibdir=$libdir
5446
5447         MAKE_DLLS="#"
5448
5449         cf_cv_do_symlinks=no
5450         cf_ld_rpath_opt=
5451         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5452
5453         echo "$as_me:5453: checking if release/abi version should be used for shared libs" >&5
5454 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5455
5456 # Check whether --with-shlib-version or --without-shlib-version was given.
5457 if test "${with_shlib_version+set}" = set; then
5458   withval="$with_shlib_version"
5459   test -z "$withval" && withval=auto
5460         case $withval in
5461         (yes)
5462                 cf_cv_shlib_version=auto
5463                 ;;
5464         (rel|abi|auto)
5465                 cf_cv_shlib_version=$withval
5466                 ;;
5467         (*)
5468                 echo "$as_me:5468: result: $withval" >&5
5469 echo "${ECHO_T}$withval" >&6
5470                 { { echo "$as_me:5470: error: option value must be one of: rel, abi, or auto" >&5
5471 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5472    { (exit 1); exit 1; }; }
5473                 ;;
5474         esac
5475
5476 else
5477   cf_cv_shlib_version=auto
5478 fi;
5479         echo "$as_me:5479: result: $cf_cv_shlib_version" >&5
5480 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5481
5482         cf_cv_rm_so_locs=no
5483         cf_try_cflags=
5484
5485         # Some less-capable ports of gcc support only -fpic
5486         CC_SHARED_OPTS=
5487
5488         cf_try_fPIC=no
5489         if test "$GCC" = yes
5490         then
5491                 cf_try_fPIC=yes
5492         else
5493                 case $cf_cv_system_name in
5494                 (*linux*)       # e.g., PGI compiler
5495                         cf_try_fPIC=yes
5496                         ;;
5497                 esac
5498         fi
5499
5500         if test "$cf_try_fPIC" = yes
5501         then
5502                 echo "$as_me:5502: checking which $CC option to use" >&5
5503 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5504                 cf_save_CFLAGS="$CFLAGS"
5505                 for CC_SHARED_OPTS in -fPIC -fpic ''
5506                 do
5507                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5508                         cat >conftest.$ac_ext <<_ACEOF
5509 #line 5509 "configure"
5510 #include "confdefs.h"
5511 #include <stdio.h>
5512 int
5513 main (void)
5514 {
5515 int x = 1
5516   ;
5517   return 0;
5518 }
5519 _ACEOF
5520 rm -f conftest.$ac_objext
5521 if { (eval echo "$as_me:5521: \"$ac_compile\"") >&5
5522   (eval $ac_compile) 2>&5
5523   ac_status=$?
5524   echo "$as_me:5524: \$? = $ac_status" >&5
5525   (exit $ac_status); } &&
5526          { ac_try='test -s conftest.$ac_objext'
5527   { (eval echo "$as_me:5527: \"$ac_try\"") >&5
5528   (eval $ac_try) 2>&5
5529   ac_status=$?
5530   echo "$as_me:5530: \$? = $ac_status" >&5
5531   (exit $ac_status); }; }; then
5532   break
5533 else
5534   echo "$as_me: failed program was:" >&5
5535 cat conftest.$ac_ext >&5
5536 fi
5537 rm -f conftest.$ac_objext conftest.$ac_ext
5538                 done
5539                 echo "$as_me:5539: result: $CC_SHARED_OPTS" >&5
5540 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5541                 CFLAGS="$cf_save_CFLAGS"
5542         fi
5543
5544         cf_cv_shlib_version_infix=no
5545
5546         case $cf_cv_system_name in
5547         (aix4.3-9*|aix[5-7]*)
5548                 if test "$GCC" = yes; then
5549                         CC_SHARED_OPTS='-Wl,-brtl'
5550                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5551                 else
5552                         CC_SHARED_OPTS='-brtl'
5553                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5554                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5555                 fi
5556                 ;;
5557         (beos*)
5558                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5559                 ;;
5560         (cygwin*)
5561                 CC_SHARED_OPTS=
5562                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5563                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5564                 cf_cv_shlib_version=cygdll
5565                 cf_cv_shlib_version_infix=cygdll
5566                 shlibdir=$bindir
5567                 MAKE_DLLS=
5568                 cat >mk_shared_lib.sh <<-CF_EOF
5569                 #!$SHELL
5570                 SHARED_LIB=\$1
5571                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5572                 shift
5573                 cat <<-EOF
5574                 Linking shared library
5575                 ** SHARED_LIB \$SHARED_LIB
5576                 ** IMPORT_LIB \$IMPORT_LIB
5577 EOF
5578                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5579 CF_EOF
5580                 chmod +x mk_shared_lib.sh
5581                 ;;
5582         (msys*)
5583                 CC_SHARED_OPTS=
5584                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5585                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5586                 cf_cv_shlib_version=msysdll
5587                 cf_cv_shlib_version_infix=msysdll
5588                 shlibdir=$bindir
5589                 MAKE_DLLS=
5590                 cat >mk_shared_lib.sh <<-CF_EOF
5591                 #!$SHELL
5592                 SHARED_LIB=\$1
5593                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5594                 shift
5595                 cat <<-EOF
5596                 Linking shared library
5597                 ** SHARED_LIB \$SHARED_LIB
5598                 ** IMPORT_LIB \$IMPORT_LIB
5599 EOF
5600                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5601 CF_EOF
5602                 chmod +x mk_shared_lib.sh
5603                 ;;
5604         (darwin*)
5605                 cf_try_cflags="no-cpp-precomp"
5606                 CC_SHARED_OPTS="-dynamic"
5607                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5608                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5609                 cf_cv_shlib_version_infix=yes
5610                 echo "$as_me:5610: checking if ld -search_paths_first works" >&5
5611 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5612 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5613   echo $ECHO_N "(cached) $ECHO_C" >&6
5614 else
5615
5616                         cf_save_LDFLAGS=$LDFLAGS
5617                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5618                         cat >conftest.$ac_ext <<_ACEOF
5619 #line 5619 "configure"
5620 #include "confdefs.h"
5621
5622 int
5623 main (void)
5624 {
5625 int i;
5626   ;
5627   return 0;
5628 }
5629 _ACEOF
5630 rm -f conftest.$ac_objext conftest$ac_exeext
5631 if { (eval echo "$as_me:5631: \"$ac_link\"") >&5
5632   (eval $ac_link) 2>&5
5633   ac_status=$?
5634   echo "$as_me:5634: \$? = $ac_status" >&5
5635   (exit $ac_status); } &&
5636          { ac_try='test -s conftest$ac_exeext'
5637   { (eval echo "$as_me:5637: \"$ac_try\"") >&5
5638   (eval $ac_try) 2>&5
5639   ac_status=$?
5640   echo "$as_me:5640: \$? = $ac_status" >&5
5641   (exit $ac_status); }; }; then
5642   cf_cv_ldflags_search_paths_first=yes
5643 else
5644   echo "$as_me: failed program was:" >&5
5645 cat conftest.$ac_ext >&5
5646 cf_cv_ldflags_search_paths_first=no
5647 fi
5648 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5649                                 LDFLAGS=$cf_save_LDFLAGS
5650 fi
5651 echo "$as_me:5651: result: $cf_cv_ldflags_search_paths_first" >&5
5652 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5653                 if test $cf_cv_ldflags_search_paths_first = yes; then
5654                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5655                 fi
5656                 ;;
5657         (hpux[7-8]*)
5658                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5659                 if test "$GCC" != yes; then
5660                         CC_SHARED_OPTS='+Z'
5661                 fi
5662                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5663                 INSTALL_LIB="-m 555"
5664                 ;;
5665         (hpux*)
5666                 # (tested with gcc 2.7.2 -- I don't have c89)
5667                 if test "$GCC" = yes; then
5668                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5669                 else
5670                         CC_SHARED_OPTS='+Z'
5671                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5672                 fi
5673                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5674                 # HP-UX shared libraries must be executable, and should be
5675                 # readonly to exploit a quirk in the memory manager.
5676                 INSTALL_LIB="-m 555"
5677                 ;;
5678         (interix*)
5679                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5680                 if test "$cf_cv_shlib_version" = rel; then
5681                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5682                 else
5683                         cf_shared_soname='`basename $@`'
5684                 fi
5685                 CC_SHARED_OPTS=
5686                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5687                 ;;
5688         (irix*)
5689                 if test "$cf_cv_enable_rpath" = yes ; then
5690                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5691                 fi
5692                 # tested with IRIX 5.2 and 'cc'.
5693                 if test "$GCC" != yes; then
5694                         CC_SHARED_OPTS='-KPIC'
5695                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5696                 else
5697                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5698                 fi
5699                 cf_cv_rm_so_locs=yes
5700                 ;;
5701         (linux*|gnu*|k*bsd*-gnu)
5702                 if test "$DFT_LWR_MODEL" = "shared" ; then
5703                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5704                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5705                 fi
5706                 if test "$cf_cv_enable_rpath" = yes ; then
5707                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5708                 fi
5709
5710         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5711         if test "$cf_cv_shlib_version" = rel; then
5712                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5713         else
5714                 cf_cv_shared_soname='`basename $@`'
5715         fi
5716
5717                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5718                 ;;
5719         (mingw*)
5720                 cf_cv_shlib_version=mingw
5721                 cf_cv_shlib_version_infix=mingw
5722                 shlibdir=$bindir
5723                 MAKE_DLLS=
5724                 if test "$DFT_LWR_MODEL" = "shared" ; then
5725                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5726                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5727                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5728                 fi
5729                 CC_SHARED_OPTS=
5730                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5731                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5732                 cat >mk_shared_lib.sh <<-CF_EOF
5733                 #!$SHELL
5734                 SHARED_LIB=\$1
5735                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5736                 shift
5737                 cat <<-EOF
5738                 Linking shared library
5739                 ** SHARED_LIB \$SHARED_LIB
5740                 ** IMPORT_LIB \$IMPORT_LIB
5741 EOF
5742                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5743 CF_EOF
5744                 chmod +x mk_shared_lib.sh
5745                 ;;
5746         (openbsd[2-9].*|mirbsd*)
5747                 if test "$DFT_LWR_MODEL" = "shared" ; then
5748                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5749                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5750                 fi
5751                 if test "$cf_cv_enable_rpath" = yes ; then
5752                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5753                 fi
5754                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5755
5756         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5757         if test "$cf_cv_shlib_version" = rel; then
5758                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5759         else
5760                 cf_cv_shared_soname='`basename $@`'
5761         fi
5762
5763                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5764                 ;;
5765         (nto-qnx*|openbsd*|freebsd[12].*)
5766                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5767                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5768                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5769                 ;;
5770         (dragonfly*|freebsd*)
5771                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5772                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5773                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5774                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5775                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5776                 fi
5777
5778         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5779         if test "$cf_cv_shlib_version" = rel; then
5780                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5781         else
5782                 cf_cv_shared_soname='`basename $@`'
5783         fi
5784
5785                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5786                 ;;
5787         (netbsd*)
5788                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5789                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5790                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5791                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5792                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5793                         if test "$cf_cv_shlib_version" = auto; then
5794                         if test -f /usr/libexec/ld.elf_so; then
5795                                 cf_cv_shlib_version=abi
5796                         else
5797                                 cf_cv_shlib_version=rel
5798                         fi
5799                         fi
5800
5801         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5802         if test "$cf_cv_shlib_version" = rel; then
5803                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5804         else
5805                 cf_cv_shared_soname='`basename $@`'
5806         fi
5807
5808                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5809                 else
5810                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5811                 fi
5812                 ;;
5813         (osf*|mls+*)
5814                 # tested with OSF/1 V3.2 and 'cc'
5815                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5816                 # link with shared libs).
5817                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5818                 case $host_os in
5819                 (osf4*)
5820                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5821                         ;;
5822                 esac
5823                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5824                 if test "$DFT_LWR_MODEL" = "shared" ; then
5825                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5826                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5827                 fi
5828                 cf_cv_rm_so_locs=yes
5829                 ;;
5830         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5831                 # tested with osr5.0.5
5832                 if test "$GCC" != yes; then
5833                         CC_SHARED_OPTS='-belf -KPIC'
5834                 fi
5835                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5836                 if test "$cf_cv_enable_rpath" = yes ; then
5837                         # only way is to set LD_RUN_PATH but no switch for it
5838                         RUN_PATH=$libdir
5839                 fi
5840                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5841                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5842                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5843                 ;;
5844         (sunos4*)
5845                 # tested with SunOS 4.1.1 and gcc 2.7.0
5846                 if test "$GCC" != yes; then
5847                         CC_SHARED_OPTS='-KPIC'
5848                 fi
5849                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5850                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5851                 ;;
5852         (solaris2*)
5853                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5854                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5855                 if test "$DFT_LWR_MODEL" = "shared" ; then
5856                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5857                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5858                 fi
5859                 if test "$cf_cv_enable_rpath" = yes ; then
5860                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5861                 fi
5862
5863         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5864         if test "$cf_cv_shlib_version" = rel; then
5865                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5866         else
5867                 cf_cv_shared_soname='`basename $@`'
5868         fi
5869
5870                 if test "$GCC" != yes; then
5871                         cf_save_CFLAGS="$CFLAGS"
5872                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5873                         do
5874                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5875                                 cat >conftest.$ac_ext <<_ACEOF
5876 #line 5876 "configure"
5877 #include "confdefs.h"
5878 #include <stdio.h>
5879 int
5880 main (void)
5881 {
5882 printf("Hello\n");
5883   ;
5884   return 0;
5885 }
5886 _ACEOF
5887 rm -f conftest.$ac_objext
5888 if { (eval echo "$as_me:5888: \"$ac_compile\"") >&5
5889   (eval $ac_compile) 2>&5
5890   ac_status=$?
5891   echo "$as_me:5891: \$? = $ac_status" >&5
5892   (exit $ac_status); } &&
5893          { ac_try='test -s conftest.$ac_objext'
5894   { (eval echo "$as_me:5894: \"$ac_try\"") >&5
5895   (eval $ac_try) 2>&5
5896   ac_status=$?
5897   echo "$as_me:5897: \$? = $ac_status" >&5
5898   (exit $ac_status); }; }; then
5899   break
5900 else
5901   echo "$as_me: failed program was:" >&5
5902 cat conftest.$ac_ext >&5
5903 fi
5904 rm -f conftest.$ac_objext conftest.$ac_ext
5905                         done
5906                         CFLAGS="$cf_save_CFLAGS"
5907                         CC_SHARED_OPTS=$cf_shared_opts
5908                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
5909                 else
5910                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5911                 fi
5912                 ;;
5913         (sysv5uw7*|unix_sv*)
5914                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5915                 if test "$GCC" != yes; then
5916                         CC_SHARED_OPTS='-KPIC'
5917                 fi
5918                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
5919                 ;;
5920         (*)
5921                 CC_SHARED_OPTS='unknown'
5922                 MK_SHARED_LIB='echo unknown'
5923                 ;;
5924         esac
5925
5926         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5927         case "$cf_cv_shlib_version" in
5928         (rel|abi)
5929                 case "$MK_SHARED_LIB" in
5930                 (*'-o $@')
5931                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5932                         ;;
5933                 (*)
5934                         { echo "$as_me:5934: WARNING: ignored --with-shlib-version" >&5
5935 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5936                         ;;
5937                 esac
5938                 ;;
5939         esac
5940
5941         if test -n "$cf_try_cflags"
5942         then
5943 cat > conftest.$ac_ext <<EOF
5944 #line 5944 "${as_me:-configure}"
5945 #include <stdio.h>
5946 int main(int argc, char *argv[])
5947 {
5948         printf("hello\n");
5949         return (argv[argc-1] == 0) ;
5950 }
5951 EOF
5952                 cf_save_CFLAGS="$CFLAGS"
5953                 for cf_opt in $cf_try_cflags
5954                 do
5955                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5956                         echo "$as_me:5956: checking if CFLAGS option -$cf_opt works" >&5
5957 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5958                         if { (eval echo "$as_me:5958: \"$ac_compile\"") >&5
5959   (eval $ac_compile) 2>&5
5960   ac_status=$?
5961   echo "$as_me:5961: \$? = $ac_status" >&5
5962   (exit $ac_status); }; then
5963                                 echo "$as_me:5963: result: yes" >&5
5964 echo "${ECHO_T}yes" >&6
5965                                 cf_save_CFLAGS="$CFLAGS"
5966                         else
5967                                 echo "$as_me:5967: result: no" >&5
5968 echo "${ECHO_T}no" >&6
5969                         fi
5970                 done
5971                 CFLAGS="$cf_save_CFLAGS"
5972         fi
5973
5974         # RPATH_LIST is a colon-separated list of directories
5975         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5976         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5977
5978         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
5979
5980         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5981
5982 echo "${as_me:-configure}:5982: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5983
5984         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5985
5986 echo "${as_me:-configure}:5986: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5987
5988 for model in $cf_list_models; do
5989         case $model in
5990         (libtool)
5991
5992 echo "$as_me:5992: checking for additional libtool options" >&5
5993 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
5994
5995 # Check whether --with-libtool-opts or --without-libtool-opts was given.
5996 if test "${with_libtool_opts+set}" = set; then
5997   withval="$with_libtool_opts"
5998   with_libtool_opts=$withval
5999 else
6000   with_libtool_opts=no
6001 fi;
6002 echo "$as_me:6002: result: $with_libtool_opts" >&5
6003 echo "${ECHO_T}$with_libtool_opts" >&6
6004
6005 case .$with_libtool_opts in
6006 (.yes|.no|.)
6007         ;;
6008 (*)
6009         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6010         ;;
6011 esac
6012
6013 echo "$as_me:6013: checking if exported-symbols file should be used" >&5
6014 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6015
6016 # Check whether --with-export-syms or --without-export-syms was given.
6017 if test "${with_export_syms+set}" = set; then
6018   withval="$with_export_syms"
6019   with_export_syms=$withval
6020 else
6021   with_export_syms=no
6022 fi;
6023 if test "x$with_export_syms" = xyes
6024 then
6025         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6026
6027 fi
6028 echo "$as_me:6028: result: $with_export_syms" >&5
6029 echo "${ECHO_T}$with_export_syms" >&6
6030 if test "x$with_export_syms" != xno
6031 then
6032         EXPORT_SYMS="-export-symbols $with_export_syms"
6033
6034 fi
6035
6036                 ;;
6037         (shared)
6038                 if test "$CC_SHARED_OPTS" = "unknown"; then
6039                         { { echo "$as_me:6039: error: Shared libraries are not supported in this version" >&5
6040 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6041    { (exit 1); exit 1; }; }
6042                 fi
6043                 # workaround for inept transition to PIE vs PIC...
6044                 echo "$as_me:6044: checking if current CFLAGS link properly" >&5
6045 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6046                 cat >conftest.$ac_ext <<_ACEOF
6047 #line 6047 "configure"
6048 #include "confdefs.h"
6049 #include <stdio.h>
6050 int
6051 main (void)
6052 {
6053 printf("Hello work\n");
6054   ;
6055   return 0;
6056 }
6057 _ACEOF
6058 rm -f conftest.$ac_objext conftest$ac_exeext
6059 if { (eval echo "$as_me:6059: \"$ac_link\"") >&5
6060   (eval $ac_link) 2>&5
6061   ac_status=$?
6062   echo "$as_me:6062: \$? = $ac_status" >&5
6063   (exit $ac_status); } &&
6064          { ac_try='test -s conftest$ac_exeext'
6065   { (eval echo "$as_me:6065: \"$ac_try\"") >&5
6066   (eval $ac_try) 2>&5
6067   ac_status=$?
6068   echo "$as_me:6068: \$? = $ac_status" >&5
6069   (exit $ac_status); }; }; then
6070   cf_cflags_work=yes
6071 else
6072   echo "$as_me: failed program was:" >&5
6073 cat conftest.$ac_ext >&5
6074 cf_cflags_work=no
6075 fi
6076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6077                 echo "$as_me:6077: result: $cf_cflags_work" >&5
6078 echo "${ECHO_T}$cf_cflags_work" >&6
6079                 if test "$cf_cflags_work" = no
6080                 then
6081                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6082
6083 echo "${as_me:-configure}:6083: testing try to work around by appending shared-options ..." 1>&5
6084
6085                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6086                 fi
6087
6088 echo "$as_me:6088: checking if versioned-symbols file should be used" >&5
6089 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6090
6091 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6092 if test "${with_versioned_syms+set}" = set; then
6093   withval="$with_versioned_syms"
6094   with_versioned_syms=$withval
6095 else
6096   with_versioned_syms=no
6097 fi;
6098 if test "x$with_versioned_syms" = xyes
6099 then
6100         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6101
6102 fi
6103 echo "$as_me:6103: result: $with_versioned_syms" >&5
6104 echo "${ECHO_T}$with_versioned_syms" >&6
6105
6106 RESULTING_SYMS=
6107 VERSIONED_SYMS=
6108 WILDCARD_SYMS=
6109
6110 if test "x$with_versioned_syms" != xno
6111 then
6112         RESULTING_SYMS=$with_versioned_syms
6113         case "x$MK_SHARED_LIB" in
6114         (*-Wl,*)
6115                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6116                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6117                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6118
6119 echo "${as_me:-configure}:6119: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6120
6121                 ;;
6122         (*-dy\ *)
6123                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6124                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6125                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6126
6127 echo "${as_me:-configure}:6127: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6128
6129                 ;;
6130         (*)
6131                 { echo "$as_me:6131: WARNING: this system does not support versioned-symbols" >&5
6132 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6133                 ;;
6134         esac
6135
6136         # Linux ld can selectively override scope, e.g., of symbols beginning with
6137         # "_" by first declaring some as global, and then using a wildcard to
6138         # declare the others as local.  Some other loaders cannot do this.  Check
6139         # by constructing a (very) simple shared library and inspecting its
6140         # symbols.
6141         if test "x$VERSIONED_SYMS" != "x"
6142         then
6143                 echo "$as_me:6143: checking if wildcards can be used to selectively omit symbols" >&5
6144 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6145                 WILDCARD_SYMS=no
6146
6147                 # make sources
6148                 rm -f conftest.*
6149
6150                 cat >conftest.ver <<EOF
6151 module_1.0 {
6152 global:
6153         globalf1;
6154 local:
6155         localf1;
6156 };
6157 module_2.0 {
6158 global:
6159         globalf2;
6160 local:
6161         localf2;
6162         _*;
6163 } module_1.0;
6164 submodule_1.0 {
6165 global:
6166         subglobalf1;
6167         _ismissing;
6168 local:
6169         sublocalf1;
6170 };
6171 submodule_2.0 {
6172 global:
6173         subglobalf2;
6174 local:
6175         sublocalf2;
6176         _*;
6177 } submodule_1.0;
6178 EOF
6179                 cat >conftest.$ac_ext <<EOF
6180 #line 6180 "configure"
6181 int     _ismissing(void) { return 1; }
6182 int     _localf1(void) { return 1; }
6183 int     _localf2(void) { return 2; }
6184 int     globalf1(void) { return 1; }
6185 int     globalf2(void) { return 2; }
6186 int     _sublocalf1(void) { return 1; }
6187 int     _sublocalf2(void) { return 2; }
6188 int     subglobalf1(void) { return 1; }
6189 int     subglobalf2(void) { return 2; }
6190 EOF
6191                 cat >conftest.mk <<EOF
6192 CC=${CC}
6193 CFLAGS=${CFLAGS}
6194 CPPFLAGS=${CPPFLAGS}
6195 LDFLAGS=${LDFLAGS}
6196 LIBS=${LIBS}
6197 VERSIONED_SYMS=${VERSIONED_SYMS}
6198 RESULTING_SYMS=conftest.ver
6199 MK_SHARED_LIB=${MK_SHARED_LIB}
6200 conftest.so: conftest.$ac_cv_objext
6201                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6202 EOF
6203
6204                 # compile source, make library
6205                 if make -f conftest.mk 2>&5 >/dev/null
6206                 then
6207                         # test for missing symbol in either Data or Text section
6208                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6209                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6210                 fi
6211                 echo "$as_me:6211: result: $WILDCARD_SYMS" >&5
6212 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6213                 rm -f conftest.*
6214         fi
6215 fi
6216
6217                 ;;
6218         esac
6219 done
6220
6221 ### Checks for special libraries, must be done up-front.
6222 SHLIB_LIST=""
6223
6224 echo "$as_me:6224: checking if you want to link with the GPM mouse library" >&5
6225 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6226
6227 # Check whether --with-gpm or --without-gpm was given.
6228 if test "${with_gpm+set}" = set; then
6229   withval="$with_gpm"
6230   with_gpm=$withval
6231 else
6232   with_gpm=maybe
6233 fi;
6234 echo "$as_me:6234: result: $with_gpm" >&5
6235 echo "${ECHO_T}$with_gpm" >&6
6236
6237 if test "$with_gpm" != no ; then
6238         echo "$as_me:6238: checking for gpm.h" >&5
6239 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6240 if test "${ac_cv_header_gpm_h+set}" = set; then
6241   echo $ECHO_N "(cached) $ECHO_C" >&6
6242 else
6243   cat >conftest.$ac_ext <<_ACEOF
6244 #line 6244 "configure"
6245 #include "confdefs.h"
6246 #include <gpm.h>
6247 _ACEOF
6248 if { (eval echo "$as_me:6248: \"$ac_cpp conftest.$ac_ext\"") >&5
6249   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6250   ac_status=$?
6251   egrep -v '^ *\+' conftest.er1 >conftest.err
6252   rm -f conftest.er1
6253   cat conftest.err >&5
6254   echo "$as_me:6254: \$? = $ac_status" >&5
6255   (exit $ac_status); } >/dev/null; then
6256   if test -s conftest.err; then
6257     ac_cpp_err=$ac_c_preproc_warn_flag
6258   else
6259     ac_cpp_err=
6260   fi
6261 else
6262   ac_cpp_err=yes
6263 fi
6264 if test -z "$ac_cpp_err"; then
6265   ac_cv_header_gpm_h=yes
6266 else
6267   echo "$as_me: failed program was:" >&5
6268   cat conftest.$ac_ext >&5
6269   ac_cv_header_gpm_h=no
6270 fi
6271 rm -f conftest.err conftest.$ac_ext
6272 fi
6273 echo "$as_me:6273: result: $ac_cv_header_gpm_h" >&5
6274 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6275 if test $ac_cv_header_gpm_h = yes; then
6276
6277 cat >>confdefs.h <<\EOF
6278 #define HAVE_GPM_H 1
6279 EOF
6280
6281                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6282                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6283
6284 echo "${as_me:-configure}:6284: testing assuming we really have GPM library ..." 1>&5
6285
6286 cat >>confdefs.h <<\EOF
6287 #define HAVE_LIBGPM 1
6288 EOF
6289
6290                         with_gpm=yes
6291                 else
6292                         echo "$as_me:6292: checking for Gpm_Open in -lgpm" >&5
6293 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6294 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6295   echo $ECHO_N "(cached) $ECHO_C" >&6
6296 else
6297   ac_check_lib_save_LIBS=$LIBS
6298 LIBS="-lgpm  $LIBS"
6299 cat >conftest.$ac_ext <<_ACEOF
6300 #line 6300 "configure"
6301 #include "confdefs.h"
6302
6303 /* Override any gcc2 internal prototype to avoid an error.  */
6304 #ifdef __cplusplus
6305 extern "C"
6306 #endif
6307 /* We use char because int might match the return type of a gcc2
6308    builtin and then its argument prototype would still apply.  */
6309 char Gpm_Open ();
6310 int
6311 main (void)
6312 {
6313 Gpm_Open ();
6314   ;
6315   return 0;
6316 }
6317 _ACEOF
6318 rm -f conftest.$ac_objext conftest$ac_exeext
6319 if { (eval echo "$as_me:6319: \"$ac_link\"") >&5
6320   (eval $ac_link) 2>&5
6321   ac_status=$?
6322   echo "$as_me:6322: \$? = $ac_status" >&5
6323   (exit $ac_status); } &&
6324          { ac_try='test -s conftest$ac_exeext'
6325   { (eval echo "$as_me:6325: \"$ac_try\"") >&5
6326   (eval $ac_try) 2>&5
6327   ac_status=$?
6328   echo "$as_me:6328: \$? = $ac_status" >&5
6329   (exit $ac_status); }; }; then
6330   ac_cv_lib_gpm_Gpm_Open=yes
6331 else
6332   echo "$as_me: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6334 ac_cv_lib_gpm_Gpm_Open=no
6335 fi
6336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6337 LIBS=$ac_check_lib_save_LIBS
6338 fi
6339 echo "$as_me:6339: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6340 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6341 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6342   with_gpm=yes
6343 else
6344
6345                                 if test "$with_gpm" = maybe; then
6346                                         { echo "$as_me:6346: WARNING: Cannot link with GPM library" >&5
6347 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6348                                         with_gpm=no
6349                                 else
6350                                         { { echo "$as_me:6350: error: Cannot link with GPM library" >&5
6351 echo "$as_me: error: Cannot link with GPM library" >&2;}
6352    { (exit 1); exit 1; }; }
6353                                 fi
6354
6355 fi
6356
6357                 fi
6358
6359 else
6360
6361                 test "$with_gpm" != maybe && { echo "$as_me:6361: WARNING: Cannot find GPM header" >&5
6362 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6363                 with_gpm=no
6364
6365 fi
6366
6367 fi
6368
6369 if test "$with_gpm" != no ; then
6370         echo "$as_me:6370: checking if you want to load GPM dynamically" >&5
6371 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6372
6373 # Check whether --with-dlsym or --without-dlsym was given.
6374 if test "${with_dlsym+set}" = set; then
6375   withval="$with_dlsym"
6376   with_dlsym=$withval
6377 else
6378   with_dlsym=yes
6379 fi;
6380         echo "$as_me:6380: result: $with_dlsym" >&5
6381 echo "${ECHO_T}$with_dlsym" >&6
6382         if test "x$with_dlsym" = xyes ; then
6383
6384 cf_have_dlsym=no
6385 echo "$as_me:6385: checking for dlsym" >&5
6386 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6387 if test "${ac_cv_func_dlsym+set}" = set; then
6388   echo $ECHO_N "(cached) $ECHO_C" >&6
6389 else
6390   cat >conftest.$ac_ext <<_ACEOF
6391 #line 6391 "configure"
6392 #include "confdefs.h"
6393 /* System header to define __stub macros and hopefully few prototypes,
6394     which can conflict with char dlsym (); below.  */
6395 #include <assert.h>
6396 /* Override any gcc2 internal prototype to avoid an error.  */
6397 #ifdef __cplusplus
6398 extern "C"
6399 #endif
6400 /* We use char because int might match the return type of a gcc2
6401    builtin and then its argument prototype would still apply.  */
6402 char dlsym ();
6403 char (*f) ();
6404
6405 int
6406 main (void)
6407 {
6408 /* The GNU C library defines this for functions which it implements
6409     to always fail with ENOSYS.  Some functions are actually named
6410     something starting with __ and the normal name is an alias.  */
6411 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6412 choke me
6413 #else
6414 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6415 #endif
6416
6417   ;
6418   return 0;
6419 }
6420 _ACEOF
6421 rm -f conftest.$ac_objext conftest$ac_exeext
6422 if { (eval echo "$as_me:6422: \"$ac_link\"") >&5
6423   (eval $ac_link) 2>&5
6424   ac_status=$?
6425   echo "$as_me:6425: \$? = $ac_status" >&5
6426   (exit $ac_status); } &&
6427          { ac_try='test -s conftest$ac_exeext'
6428   { (eval echo "$as_me:6428: \"$ac_try\"") >&5
6429   (eval $ac_try) 2>&5
6430   ac_status=$?
6431   echo "$as_me:6431: \$? = $ac_status" >&5
6432   (exit $ac_status); }; }; then
6433   ac_cv_func_dlsym=yes
6434 else
6435   echo "$as_me: failed program was:" >&5
6436 cat conftest.$ac_ext >&5
6437 ac_cv_func_dlsym=no
6438 fi
6439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6440 fi
6441 echo "$as_me:6441: result: $ac_cv_func_dlsym" >&5
6442 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6443 if test $ac_cv_func_dlsym = yes; then
6444   cf_have_dlsym=yes
6445 else
6446
6447 cf_have_libdl=no
6448 echo "$as_me:6448: checking for dlsym in -ldl" >&5
6449 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6450 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6451   echo $ECHO_N "(cached) $ECHO_C" >&6
6452 else
6453   ac_check_lib_save_LIBS=$LIBS
6454 LIBS="-ldl  $LIBS"
6455 cat >conftest.$ac_ext <<_ACEOF
6456 #line 6456 "configure"
6457 #include "confdefs.h"
6458
6459 /* Override any gcc2 internal prototype to avoid an error.  */
6460 #ifdef __cplusplus
6461 extern "C"
6462 #endif
6463 /* We use char because int might match the return type of a gcc2
6464    builtin and then its argument prototype would still apply.  */
6465 char dlsym ();
6466 int
6467 main (void)
6468 {
6469 dlsym ();
6470   ;
6471   return 0;
6472 }
6473 _ACEOF
6474 rm -f conftest.$ac_objext conftest$ac_exeext
6475 if { (eval echo "$as_me:6475: \"$ac_link\"") >&5
6476   (eval $ac_link) 2>&5
6477   ac_status=$?
6478   echo "$as_me:6478: \$? = $ac_status" >&5
6479   (exit $ac_status); } &&
6480          { ac_try='test -s conftest$ac_exeext'
6481   { (eval echo "$as_me:6481: \"$ac_try\"") >&5
6482   (eval $ac_try) 2>&5
6483   ac_status=$?
6484   echo "$as_me:6484: \$? = $ac_status" >&5
6485   (exit $ac_status); }; }; then
6486   ac_cv_lib_dl_dlsym=yes
6487 else
6488   echo "$as_me: failed program was:" >&5
6489 cat conftest.$ac_ext >&5
6490 ac_cv_lib_dl_dlsym=no
6491 fi
6492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6493 LIBS=$ac_check_lib_save_LIBS
6494 fi
6495 echo "$as_me:6495: result: $ac_cv_lib_dl_dlsym" >&5
6496 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6497 if test $ac_cv_lib_dl_dlsym = yes; then
6498
6499         cf_have_dlsym=yes
6500         cf_have_libdl=yes
6501 fi
6502
6503 fi
6504
6505 if test "$cf_have_dlsym" = yes ; then
6506         test "$cf_have_libdl" = yes && {
6507 cf_add_libs="-ldl"
6508 # Filter out duplicates - this happens with badly-designed ".pc" files...
6509 for cf_add_1lib in $LIBS
6510 do
6511         for cf_add_2lib in $cf_add_libs
6512         do
6513                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6514                 then
6515                         cf_add_1lib=
6516                         break
6517                 fi
6518         done
6519         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6520 done
6521 LIBS="$cf_add_libs"
6522  }
6523
6524         echo "$as_me:6524: checking whether able to link to dl*() functions" >&5
6525 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6526         cat >conftest.$ac_ext <<_ACEOF
6527 #line 6527 "configure"
6528 #include "confdefs.h"
6529 #include <dlfcn.h>
6530 int
6531 main (void)
6532 {
6533
6534                 void *obj;
6535                 if ((obj = dlopen("filename", 0)) != 0) {
6536                         if (dlsym(obj, "symbolname") == 0) {
6537                         dlclose(obj);
6538                         }
6539                 }
6540   ;
6541   return 0;
6542 }
6543 _ACEOF
6544 rm -f conftest.$ac_objext conftest$ac_exeext
6545 if { (eval echo "$as_me:6545: \"$ac_link\"") >&5
6546   (eval $ac_link) 2>&5
6547   ac_status=$?
6548   echo "$as_me:6548: \$? = $ac_status" >&5
6549   (exit $ac_status); } &&
6550          { ac_try='test -s conftest$ac_exeext'
6551   { (eval echo "$as_me:6551: \"$ac_try\"") >&5
6552   (eval $ac_try) 2>&5
6553   ac_status=$?
6554   echo "$as_me:6554: \$? = $ac_status" >&5
6555   (exit $ac_status); }; }; then
6556
6557 cat >>confdefs.h <<\EOF
6558 #define HAVE_LIBDL 1
6559 EOF
6560
6561 else
6562   echo "$as_me: failed program was:" >&5
6563 cat conftest.$ac_ext >&5
6564
6565                 { { echo "$as_me:6565: error: Cannot link test program for libdl" >&5
6566 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6567    { (exit 1); exit 1; }; }
6568 fi
6569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6570         echo "$as_me:6570: result: ok" >&5
6571 echo "${ECHO_T}ok" >&6
6572 else
6573         { { echo "$as_me:6573: error: Cannot find dlsym function" >&5
6574 echo "$as_me: error: Cannot find dlsym function" >&2;}
6575    { (exit 1); exit 1; }; }
6576 fi
6577
6578                 if test "x$with_gpm" != xyes ; then
6579                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6580
6581 echo "${as_me:-configure}:6581: testing assuming soname for gpm is $with_gpm ..." 1>&5
6582
6583                         cf_cv_gpm_soname="$with_gpm"
6584                 else
6585
6586 echo "$as_me:6586: checking for soname of gpm library" >&5
6587 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6588 if test "${cf_cv_gpm_soname+set}" = set; then
6589   echo $ECHO_N "(cached) $ECHO_C" >&6
6590 else
6591
6592 cf_cv_gpm_soname=unknown
6593 if test "$cross_compiling" != yes ; then
6594 cat >conftest.$ac_ext <<CF_EOF
6595 #include <gpm.h>
6596 int main(void)
6597 {
6598 if (Gpm_Open(0,0)) Gpm_Close();
6599         ${cf_cv_main_return:-return}(0);
6600 }
6601 CF_EOF
6602 cf_save_LIBS="$LIBS"
6603
6604 cf_add_libs="-lgpm"
6605 # Filter out duplicates - this happens with badly-designed ".pc" files...
6606 for cf_add_1lib in $LIBS
6607 do
6608         for cf_add_2lib in $cf_add_libs
6609         do
6610                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6611                 then
6612                         cf_add_1lib=
6613                         break
6614                 fi
6615         done
6616         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6617 done
6618 LIBS="$cf_add_libs"
6619
6620         if { (eval echo "$as_me:6620: \"$ac_compile\"") >&5
6621   (eval $ac_compile) 2>&5
6622   ac_status=$?
6623   echo "$as_me:6623: \$? = $ac_status" >&5
6624   (exit $ac_status); } ; then
6625                 if { (eval echo "$as_me:6625: \"$ac_link\"") >&5
6626   (eval $ac_link) 2>&5
6627   ac_status=$?
6628   echo "$as_me:6628: \$? = $ac_status" >&5
6629   (exit $ac_status); } ; then
6630                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6631                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6632                 fi
6633         fi
6634 rm -rf conftest*
6635 LIBS="$cf_save_LIBS"
6636 fi
6637
6638 fi
6639 echo "$as_me:6639: result: $cf_cv_gpm_soname" >&5
6640 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6641
6642                 fi
6643                 test "$cf_cv_gpm_soname" != "unknown" &&
6644 cat >>confdefs.h <<EOF
6645 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6646 EOF
6647
6648                 SHLIB_LIST="-ldl $SHLIB_LIST"
6649
6650 cf_add_libs="-ldl"
6651 # Filter out duplicates - this happens with badly-designed ".pc" files...
6652 for cf_add_1lib in $PRIVATE_LIBS
6653 do
6654         for cf_add_2lib in $cf_add_libs
6655         do
6656                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6657                 then
6658                         cf_add_1lib=
6659                         break
6660                 fi
6661         done
6662         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6663 done
6664 PRIVATE_LIBS="$cf_add_libs"
6665
6666         else
6667                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6668
6669 cf_add_libs="-lgpm"
6670 # Filter out duplicates - this happens with badly-designed ".pc" files...
6671 for cf_add_1lib in $TEST_LIBS
6672 do
6673         for cf_add_2lib in $cf_add_libs
6674         do
6675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6676                 then
6677                         cf_add_1lib=
6678                         break
6679                 fi
6680         done
6681         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6682 done
6683 TEST_LIBS="$cf_add_libs"
6684
6685 cf_add_libs="-lgpm"
6686 # Filter out duplicates - this happens with badly-designed ".pc" files...
6687 for cf_add_1lib in $PRIVATE_LIBS
6688 do
6689         for cf_add_2lib in $cf_add_libs
6690         do
6691                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6692                 then
6693                         cf_add_1lib=
6694                         break
6695                 fi
6696         done
6697         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6698 done
6699 PRIVATE_LIBS="$cf_add_libs"
6700
6701         fi
6702
6703 cat >>confdefs.h <<\EOF
6704 #define HAVE_LIBGPM 1
6705 EOF
6706
6707 echo "$as_me:6707: checking for Gpm_Wgetch in -lgpm" >&5
6708 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6709 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6710   echo $ECHO_N "(cached) $ECHO_C" >&6
6711 else
6712   ac_check_lib_save_LIBS=$LIBS
6713 LIBS="-lgpm  $LIBS"
6714 cat >conftest.$ac_ext <<_ACEOF
6715 #line 6715 "configure"
6716 #include "confdefs.h"
6717
6718 /* Override any gcc2 internal prototype to avoid an error.  */
6719 #ifdef __cplusplus
6720 extern "C"
6721 #endif
6722 /* We use char because int might match the return type of a gcc2
6723    builtin and then its argument prototype would still apply.  */
6724 char Gpm_Wgetch ();
6725 int
6726 main (void)
6727 {
6728 Gpm_Wgetch ();
6729   ;
6730   return 0;
6731 }
6732 _ACEOF
6733 rm -f conftest.$ac_objext conftest$ac_exeext
6734 if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
6735   (eval $ac_link) 2>&5
6736   ac_status=$?
6737   echo "$as_me:6737: \$? = $ac_status" >&5
6738   (exit $ac_status); } &&
6739          { ac_try='test -s conftest$ac_exeext'
6740   { (eval echo "$as_me:6740: \"$ac_try\"") >&5
6741   (eval $ac_try) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit $ac_status); }; }; then
6745   ac_cv_lib_gpm_Gpm_Wgetch=yes
6746 else
6747   echo "$as_me: failed program was:" >&5
6748 cat conftest.$ac_ext >&5
6749 ac_cv_lib_gpm_Gpm_Wgetch=no
6750 fi
6751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6752 LIBS=$ac_check_lib_save_LIBS
6753 fi
6754 echo "$as_me:6754: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6755 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6756 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6757
6758 echo "$as_me:6758: checking if GPM is weakly bound to curses library" >&5
6759 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6760 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6761   echo $ECHO_N "(cached) $ECHO_C" >&6
6762 else
6763
6764 cf_cv_check_gpm_wgetch=unknown
6765 if test "$cross_compiling" != yes ; then
6766
6767 cat >conftest.$ac_ext <<CF_EOF
6768 #include <gpm.h>
6769 int main(void)
6770 {
6771         Gpm_Wgetch();
6772         ${cf_cv_main_return:-return}(0);
6773 }
6774 CF_EOF
6775
6776         cf_save_LIBS="$LIBS"
6777         # This only works if we can look at the symbol table.  If a shared
6778         # library is stripped for install, we cannot use that.  So we're forced
6779         # to rely on the static library, noting that some packagers may not
6780         # include it.
6781         LIBS="-static -lgpm -dynamic $LIBS"
6782         if { (eval echo "$as_me:6782: \"$ac_compile\"") >&5
6783   (eval $ac_compile) 2>&5
6784   ac_status=$?
6785   echo "$as_me:6785: \$? = $ac_status" >&5
6786   (exit $ac_status); } ; then
6787                 if { (eval echo "$as_me:6787: \"$ac_link\"") >&5
6788   (eval $ac_link) 2>&5
6789   ac_status=$?
6790   echo "$as_me:6790: \$? = $ac_status" >&5
6791   (exit $ac_status); } ; then
6792                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6793                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6794                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6795                 fi
6796         fi
6797         rm -rf conftest*
6798         LIBS="$cf_save_LIBS"
6799 fi
6800
6801 fi
6802 echo "$as_me:6802: result: $cf_cv_check_gpm_wgetch" >&5
6803 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6804
6805 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6806         { echo "$as_me:6806: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6807 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6808 fi
6809
6810 fi
6811
6812 fi
6813
6814 echo "$as_me:6814: checking if you want to use PCRE2 for regular-expressions" >&5
6815 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6816
6817 # Check whether --with-pcre2 or --without-pcre2 was given.
6818 if test "${with_pcre2+set}" = set; then
6819   withval="$with_pcre2"
6820
6821 fi;
6822 test -z "$with_pcre2" && with_pcre2=no
6823 echo "$as_me:6823: result: $with_pcre2" >&5
6824 echo "${ECHO_T}$with_pcre2" >&6
6825
6826 if test "x$with_pcre2" != xno ; then
6827
6828 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6829         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6830
6831 echo "${as_me:-configure}:6831: testing found package libpcre2 ..." 1>&5
6832
6833         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6834         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6835         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6836
6837 echo "${as_me:-configure}:6837: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6838
6839         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6840
6841 echo "${as_me:-configure}:6841: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6842
6843 cf_fix_cppflags=no
6844 cf_new_cflags=
6845 cf_new_cppflags=
6846 cf_new_extra_cppflags=
6847
6848 for cf_add_cflags in $cf_pkgconfig_incs
6849 do
6850 case $cf_fix_cppflags in
6851 (no)
6852         case $cf_add_cflags in
6853         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6854                 case $cf_add_cflags in
6855                 (-D*)
6856                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6857
6858                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6859                                 && test -z "${cf_tst_cflags}" \
6860                                 && cf_fix_cppflags=yes
6861
6862                         if test $cf_fix_cppflags = yes ; then
6863
6864         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6865         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6866
6867                                 continue
6868                         elif test "${cf_tst_cflags}" = "\"'" ; then
6869
6870         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6871         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6872
6873                                 continue
6874                         fi
6875                         ;;
6876                 esac
6877                 case "$CPPFLAGS" in
6878                 (*$cf_add_cflags)
6879                         ;;
6880                 (*)
6881                         case $cf_add_cflags in
6882                         (-D*)
6883                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6884
6885 CPPFLAGS=`echo "$CPPFLAGS" | \
6886         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6887                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6888
6889                                 ;;
6890                         esac
6891
6892         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6893         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6894
6895                         ;;
6896                 esac
6897                 ;;
6898         (*)
6899
6900         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6901         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6902
6903                 ;;
6904         esac
6905         ;;
6906 (yes)
6907
6908         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6909         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6910
6911         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6912
6913         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6914                 && test -z "${cf_tst_cflags}" \
6915                 && cf_fix_cppflags=no
6916         ;;
6917 esac
6918 done
6919
6920 if test -n "$cf_new_cflags" ; then
6921
6922         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6923         CFLAGS="${CFLAGS}$cf_new_cflags"
6924
6925 fi
6926
6927 if test -n "$cf_new_cppflags" ; then
6928
6929         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6930         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6931
6932 fi
6933
6934 if test -n "$cf_new_extra_cppflags" ; then
6935
6936         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6937         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6938
6939 fi
6940
6941 cf_add_libs="$cf_pkgconfig_libs"
6942 # Filter out duplicates - this happens with badly-designed ".pc" files...
6943 for cf_add_1lib in $LIBS
6944 do
6945         for cf_add_2lib in $cf_add_libs
6946         do
6947                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6948                 then
6949                         cf_add_1lib=
6950                         break
6951                 fi
6952         done
6953         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6954 done
6955 LIBS="$cf_add_libs"
6956
6957         :
6958 else
6959         cf_pkgconfig_incs=
6960         cf_pkgconfig_libs=
6961
6962 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
6963         test -n "$verbose" && echo "    found package libpcre" 1>&6
6964
6965 echo "${as_me:-configure}:6965: testing found package libpcre ..." 1>&5
6966
6967         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
6968         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
6969         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
6970
6971 echo "${as_me:-configure}:6971: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6972
6973         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
6974
6975 echo "${as_me:-configure}:6975: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
6976
6977 cf_fix_cppflags=no
6978 cf_new_cflags=
6979 cf_new_cppflags=
6980 cf_new_extra_cppflags=
6981
6982 for cf_add_cflags in $cf_pkgconfig_incs
6983 do
6984 case $cf_fix_cppflags in
6985 (no)
6986         case $cf_add_cflags in
6987         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6988                 case $cf_add_cflags in
6989                 (-D*)
6990                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6991
6992                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6993                                 && test -z "${cf_tst_cflags}" \
6994                                 && cf_fix_cppflags=yes
6995
6996                         if test $cf_fix_cppflags = yes ; then
6997
6998         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6999         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7000
7001                                 continue
7002                         elif test "${cf_tst_cflags}" = "\"'" ; then
7003
7004         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7005         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7006
7007                                 continue
7008                         fi
7009                         ;;
7010                 esac
7011                 case "$CPPFLAGS" in
7012                 (*$cf_add_cflags)
7013                         ;;
7014                 (*)
7015                         case $cf_add_cflags in
7016                         (-D*)
7017                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7018
7019 CPPFLAGS=`echo "$CPPFLAGS" | \
7020         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7021                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7022
7023                                 ;;
7024                         esac
7025
7026         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7027         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7028
7029                         ;;
7030                 esac
7031                 ;;
7032         (*)
7033
7034         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7035         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7036
7037                 ;;
7038         esac
7039         ;;
7040 (yes)
7041
7042         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7043         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7044
7045         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7046
7047         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7048                 && test -z "${cf_tst_cflags}" \
7049                 && cf_fix_cppflags=no
7050         ;;
7051 esac
7052 done
7053
7054 if test -n "$cf_new_cflags" ; then
7055
7056         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7057         CFLAGS="${CFLAGS}$cf_new_cflags"
7058
7059 fi
7060
7061 if test -n "$cf_new_cppflags" ; then
7062
7063         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7064         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7065
7066 fi
7067
7068 if test -n "$cf_new_extra_cppflags" ; then
7069
7070         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7071         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7072
7073 fi
7074
7075 cf_add_libs="$cf_pkgconfig_libs"
7076 # Filter out duplicates - this happens with badly-designed ".pc" files...
7077 for cf_add_1lib in $LIBS
7078 do
7079         for cf_add_2lib in $cf_add_libs
7080         do
7081                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7082                 then
7083                         cf_add_1lib=
7084                         break
7085                 fi
7086         done
7087         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7088 done
7089 LIBS="$cf_add_libs"
7090
7091         :
7092 else
7093         cf_pkgconfig_incs=
7094         cf_pkgconfig_libs=
7095
7096                         { { echo "$as_me:7096: error: Cannot find PCRE2 library" >&5
7097 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7098    { (exit 1); exit 1; }; }
7099 fi
7100
7101 fi
7102
7103 cat >>confdefs.h <<\EOF
7104 #define HAVE_LIB_PCRE2 1
7105 EOF
7106
7107         # if pkgconfig gave no results, look for the libraries directly
7108         case $LIBS in
7109         (*pcre2-posix*|*pcreposix*)
7110                 ;;
7111         (*)
7112                 echo "$as_me:7112: checking for regcomp in -lpcre2-posix" >&5
7113 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7114 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7115   echo $ECHO_N "(cached) $ECHO_C" >&6
7116 else
7117   ac_check_lib_save_LIBS=$LIBS
7118 LIBS="-lpcre2-posix  $LIBS"
7119 cat >conftest.$ac_ext <<_ACEOF
7120 #line 7120 "configure"
7121 #include "confdefs.h"
7122
7123 /* Override any gcc2 internal prototype to avoid an error.  */
7124 #ifdef __cplusplus
7125 extern "C"
7126 #endif
7127 /* We use char because int might match the return type of a gcc2
7128    builtin and then its argument prototype would still apply.  */
7129 char regcomp ();
7130 int
7131 main (void)
7132 {
7133 regcomp ();
7134   ;
7135   return 0;
7136 }
7137 _ACEOF
7138 rm -f conftest.$ac_objext conftest$ac_exeext
7139 if { (eval echo "$as_me:7139: \"$ac_link\"") >&5
7140   (eval $ac_link) 2>&5
7141   ac_status=$?
7142   echo "$as_me:7142: \$? = $ac_status" >&5
7143   (exit $ac_status); } &&
7144          { ac_try='test -s conftest$ac_exeext'
7145   { (eval echo "$as_me:7145: \"$ac_try\"") >&5
7146   (eval $ac_try) 2>&5
7147   ac_status=$?
7148   echo "$as_me:7148: \$? = $ac_status" >&5
7149   (exit $ac_status); }; }; then
7150   ac_cv_lib_pcre2_posix_regcomp=yes
7151 else
7152   echo "$as_me: failed program was:" >&5
7153 cat conftest.$ac_ext >&5
7154 ac_cv_lib_pcre2_posix_regcomp=no
7155 fi
7156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7157 LIBS=$ac_check_lib_save_LIBS
7158 fi
7159 echo "$as_me:7159: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7160 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7161 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7162
7163 cf_add_libs="-lpcre2-posix"
7164 # Filter out duplicates - this happens with badly-designed ".pc" files...
7165 for cf_add_1lib in $LIBS
7166 do
7167         for cf_add_2lib in $cf_add_libs
7168         do
7169                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7170                 then
7171                         cf_add_1lib=
7172                         break
7173                 fi
7174         done
7175         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7176 done
7177 LIBS="$cf_add_libs"
7178
7179 else
7180   echo "$as_me:7180: checking for regcomp in -lpcreposix" >&5
7181 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7182 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7183   echo $ECHO_N "(cached) $ECHO_C" >&6
7184 else
7185   ac_check_lib_save_LIBS=$LIBS
7186 LIBS="-lpcreposix  $LIBS"
7187 cat >conftest.$ac_ext <<_ACEOF
7188 #line 7188 "configure"
7189 #include "confdefs.h"
7190
7191 /* Override any gcc2 internal prototype to avoid an error.  */
7192 #ifdef __cplusplus
7193 extern "C"
7194 #endif
7195 /* We use char because int might match the return type of a gcc2
7196    builtin and then its argument prototype would still apply.  */
7197 char regcomp ();
7198 int
7199 main (void)
7200 {
7201 regcomp ();
7202   ;
7203   return 0;
7204 }
7205 _ACEOF
7206 rm -f conftest.$ac_objext conftest$ac_exeext
7207 if { (eval echo "$as_me:7207: \"$ac_link\"") >&5
7208   (eval $ac_link) 2>&5
7209   ac_status=$?
7210   echo "$as_me:7210: \$? = $ac_status" >&5
7211   (exit $ac_status); } &&
7212          { ac_try='test -s conftest$ac_exeext'
7213   { (eval echo "$as_me:7213: \"$ac_try\"") >&5
7214   (eval $ac_try) 2>&5
7215   ac_status=$?
7216   echo "$as_me:7216: \$? = $ac_status" >&5
7217   (exit $ac_status); }; }; then
7218   ac_cv_lib_pcreposix_regcomp=yes
7219 else
7220   echo "$as_me: failed program was:" >&5
7221 cat conftest.$ac_ext >&5
7222 ac_cv_lib_pcreposix_regcomp=no
7223 fi
7224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7225 LIBS=$ac_check_lib_save_LIBS
7226 fi
7227 echo "$as_me:7227: result: $ac_cv_lib_pcreposix_regcomp" >&5
7228 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7229 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7230
7231 cf_add_libs="-lpcreposix"
7232 # Filter out duplicates - this happens with badly-designed ".pc" files...
7233 for cf_add_1lib in $LIBS
7234 do
7235         for cf_add_2lib in $cf_add_libs
7236         do
7237                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7238                 then
7239                         cf_add_1lib=
7240                         break
7241                 fi
7242         done
7243         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7244 done
7245 LIBS="$cf_add_libs"
7246
7247 else
7248   { { echo "$as_me:7248: error: Cannot find PCRE2 POSIX library" >&5
7249 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7250    { (exit 1); exit 1; }; }
7251 fi
7252
7253 fi
7254
7255                 ;;
7256         esac
7257
7258         # either way, check for the library header files
7259
7260 for ac_header in pcre2-posix.h pcreposix.h
7261 do
7262 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7263 echo "$as_me:7263: checking for $ac_header" >&5
7264 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7265 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7266   echo $ECHO_N "(cached) $ECHO_C" >&6
7267 else
7268   cat >conftest.$ac_ext <<_ACEOF
7269 #line 7269 "configure"
7270 #include "confdefs.h"
7271 #include <$ac_header>
7272 _ACEOF
7273 if { (eval echo "$as_me:7273: \"$ac_cpp conftest.$ac_ext\"") >&5
7274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7275   ac_status=$?
7276   egrep -v '^ *\+' conftest.er1 >conftest.err
7277   rm -f conftest.er1
7278   cat conftest.err >&5
7279   echo "$as_me:7279: \$? = $ac_status" >&5
7280   (exit $ac_status); } >/dev/null; then
7281   if test -s conftest.err; then
7282     ac_cpp_err=$ac_c_preproc_warn_flag
7283   else
7284     ac_cpp_err=
7285   fi
7286 else
7287   ac_cpp_err=yes
7288 fi
7289 if test -z "$ac_cpp_err"; then
7290   eval "$as_ac_Header=yes"
7291 else
7292   echo "$as_me: failed program was:" >&5
7293   cat conftest.$ac_ext >&5
7294   eval "$as_ac_Header=no"
7295 fi
7296 rm -f conftest.err conftest.$ac_ext
7297 fi
7298 echo "$as_me:7298: result: `eval echo '${'$as_ac_Header'}'`" >&5
7299 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7300 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7301   cat >>confdefs.h <<EOF
7302 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7303 EOF
7304
7305 fi
7306 done
7307
7308 fi
7309
7310 # not everyone has "test -c"
7311 if test -c /dev/sysmouse 2>/dev/null ; then
7312 echo "$as_me:7312: checking if you want to use sysmouse" >&5
7313 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7314
7315 # Check whether --with-sysmouse or --without-sysmouse was given.
7316 if test "${with_sysmouse+set}" = set; then
7317   withval="$with_sysmouse"
7318   cf_with_sysmouse=$withval
7319 else
7320   cf_with_sysmouse=maybe
7321 fi;
7322         if test "$cf_with_sysmouse" != no ; then
7323         cat >conftest.$ac_ext <<_ACEOF
7324 #line 7324 "configure"
7325 #include "confdefs.h"
7326
7327 #include <osreldate.h>
7328 #if (__FreeBSD_version >= 400017)
7329 #include <sys/consio.h>
7330 #include <sys/fbio.h>
7331 #else
7332 #include <machine/console.h>
7333 #endif
7334
7335 int
7336 main (void)
7337 {
7338
7339         struct mouse_info the_mouse;
7340         ioctl(0, CONS_MOUSECTL, &the_mouse);
7341
7342   ;
7343   return 0;
7344 }
7345 _ACEOF
7346 rm -f conftest.$ac_objext
7347 if { (eval echo "$as_me:7347: \"$ac_compile\"") >&5
7348   (eval $ac_compile) 2>&5
7349   ac_status=$?
7350   echo "$as_me:7350: \$? = $ac_status" >&5
7351   (exit $ac_status); } &&
7352          { ac_try='test -s conftest.$ac_objext'
7353   { (eval echo "$as_me:7353: \"$ac_try\"") >&5
7354   (eval $ac_try) 2>&5
7355   ac_status=$?
7356   echo "$as_me:7356: \$? = $ac_status" >&5
7357   (exit $ac_status); }; }; then
7358   cf_with_sysmouse=yes
7359 else
7360   echo "$as_me: failed program was:" >&5
7361 cat conftest.$ac_ext >&5
7362 cf_with_sysmouse=no
7363 fi
7364 rm -f conftest.$ac_objext conftest.$ac_ext
7365         fi
7366 echo "$as_me:7366: result: $cf_with_sysmouse" >&5
7367 echo "${ECHO_T}$cf_with_sysmouse" >&6
7368 test "$cf_with_sysmouse" = yes &&
7369 cat >>confdefs.h <<\EOF
7370 #define USE_SYSMOUSE 1
7371 EOF
7372
7373 fi
7374
7375 # pretend that ncurses==ncursesw==ncursest
7376 echo "$as_me:7376: checking if you want to disable library suffixes" >&5
7377 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7378
7379 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7380 if test "${enable_lib_suffixes+set}" = set; then
7381   enableval="$enable_lib_suffixes"
7382   test "$enableval" != no && enableval=yes
7383         if test "$enableval" != "yes" ; then
7384     disable_lib_suffixes=yes
7385         else
7386                 disable_lib_suffixes=no
7387         fi
7388 else
7389   enableval=yes
7390         disable_lib_suffixes=no
7391
7392 fi;
7393 echo "$as_me:7393: result: $disable_lib_suffixes" >&5
7394 echo "${ECHO_T}$disable_lib_suffixes" >&6
7395
7396 ### If we're building with rpath, try to link non-standard libs that way too.
7397 if test "$DFT_LWR_MODEL" = "shared"; then
7398
7399 echo "$as_me:7399: checking if rpath-hack should be disabled" >&5
7400 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7401
7402 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7403 if test "${enable_rpath_hack+set}" = set; then
7404   enableval="$enable_rpath_hack"
7405   test "$enableval" != no && enableval=yes
7406         if test "$enableval" != "yes" ; then
7407     cf_disable_rpath_hack=yes
7408         else
7409                 cf_disable_rpath_hack=no
7410         fi
7411 else
7412   enableval=yes
7413         cf_disable_rpath_hack=no
7414
7415 fi;
7416 echo "$as_me:7416: result: $cf_disable_rpath_hack" >&5
7417 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7418 if test "$cf_disable_rpath_hack" = no ; then
7419
7420 echo "$as_me:7420: checking for updated LDFLAGS" >&5
7421 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7422 if test -n "$LD_RPATH_OPT" ; then
7423         echo "$as_me:7423: result: maybe" >&5
7424 echo "${ECHO_T}maybe" >&6
7425
7426         for ac_prog in ldd
7427 do
7428   # Extract the first word of "$ac_prog", so it can be a program name with args.
7429 set dummy $ac_prog; ac_word=$2
7430 echo "$as_me:7430: checking for $ac_word" >&5
7431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7432 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7433   echo $ECHO_N "(cached) $ECHO_C" >&6
7434 else
7435   if test -n "$cf_ldd_prog"; then
7436   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7437 else
7438   ac_save_IFS=$IFS; IFS=$ac_path_separator
7439 ac_dummy="$PATH"
7440 for ac_dir in $ac_dummy; do
7441   IFS=$ac_save_IFS
7442   test -z "$ac_dir" && ac_dir=.
7443   $as_executable_p "$ac_dir/$ac_word" || continue
7444 ac_cv_prog_cf_ldd_prog="$ac_prog"
7445 echo "$as_me:7445: found $ac_dir/$ac_word" >&5
7446 break
7447 done
7448
7449 fi
7450 fi
7451 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7452 if test -n "$cf_ldd_prog"; then
7453   echo "$as_me:7453: result: $cf_ldd_prog" >&5
7454 echo "${ECHO_T}$cf_ldd_prog" >&6
7455 else
7456   echo "$as_me:7456: result: no" >&5
7457 echo "${ECHO_T}no" >&6
7458 fi
7459
7460   test -n "$cf_ldd_prog" && break
7461 done
7462 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7463
7464         cf_rpath_list="/usr/lib /lib"
7465         if test "$cf_ldd_prog" != no
7466         then
7467                 cf_rpath_oops=
7468
7469 cat >conftest.$ac_ext <<_ACEOF
7470 #line 7470 "configure"
7471 #include "confdefs.h"
7472 #include <stdio.h>
7473 int
7474 main (void)
7475 {
7476 printf("Hello");
7477   ;
7478   return 0;
7479 }
7480 _ACEOF
7481 rm -f conftest.$ac_objext conftest$ac_exeext
7482 if { (eval echo "$as_me:7482: \"$ac_link\"") >&5
7483   (eval $ac_link) 2>&5
7484   ac_status=$?
7485   echo "$as_me:7485: \$? = $ac_status" >&5
7486   (exit $ac_status); } &&
7487          { ac_try='test -s conftest$ac_exeext'
7488   { (eval echo "$as_me:7488: \"$ac_try\"") >&5
7489   (eval $ac_try) 2>&5
7490   ac_status=$?
7491   echo "$as_me:7491: \$? = $ac_status" >&5
7492   (exit $ac_status); }; }; then
7493   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7494                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7495 else
7496   echo "$as_me: failed program was:" >&5
7497 cat conftest.$ac_ext >&5
7498 fi
7499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7500
7501                 # If we passed the link-test, but get a "not found" on a given library,
7502                 # this could be due to inept reconfiguration of gcc to make it only
7503                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7504                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7505                 # /usr/local libraries.
7506                 if test -n "$cf_rpath_oops"
7507                 then
7508                         for cf_rpath_src in $cf_rpath_oops
7509                         do
7510                                 for cf_rpath_dir in \
7511                                         /usr/local \
7512                                         /usr/pkg \
7513                                         /opt/sfw
7514                                 do
7515                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7516                                         then
7517                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7518
7519 echo "${as_me:-configure}:7519: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7520
7521                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7522                                                 break
7523                                         fi
7524                                 done
7525                         done
7526                 fi
7527         fi
7528
7529         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7530
7531 echo "${as_me:-configure}:7531: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7532
7533 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7534
7535 echo "${as_me:-configure}:7535: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7536
7537 cf_rpath_dst=
7538 for cf_rpath_src in $LDFLAGS
7539 do
7540         case $cf_rpath_src in
7541         (-L*)
7542
7543                 # check if this refers to a directory which we will ignore
7544                 cf_rpath_skip=no
7545                 if test -n "$cf_rpath_list"
7546                 then
7547                         for cf_rpath_item in $cf_rpath_list
7548                         do
7549                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7550                                 then
7551                                         cf_rpath_skip=yes
7552                                         break
7553                                 fi
7554                         done
7555                 fi
7556
7557                 if test "$cf_rpath_skip" = no
7558                 then
7559                         # transform the option
7560                         if test "$LD_RPATH_OPT" = "-R " ; then
7561                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7562                         else
7563                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7564                         fi
7565
7566                         # if we have not already added this, add it now
7567                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7568                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7569                         then
7570                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7571
7572 echo "${as_me:-configure}:7572: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7573
7574                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7575                         fi
7576                 fi
7577                 ;;
7578         esac
7579         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7580 done
7581 LDFLAGS=$cf_rpath_dst
7582
7583 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7584
7585 echo "${as_me:-configure}:7585: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7586
7587 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7588
7589 echo "${as_me:-configure}:7589: testing ...checking LIBS $LIBS ..." 1>&5
7590
7591 cf_rpath_dst=
7592 for cf_rpath_src in $LIBS
7593 do
7594         case $cf_rpath_src in
7595         (-L*)
7596
7597                 # check if this refers to a directory which we will ignore
7598                 cf_rpath_skip=no
7599                 if test -n "$cf_rpath_list"
7600                 then
7601                         for cf_rpath_item in $cf_rpath_list
7602                         do
7603                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7604                                 then
7605                                         cf_rpath_skip=yes
7606                                         break
7607                                 fi
7608                         done
7609                 fi
7610
7611                 if test "$cf_rpath_skip" = no
7612                 then
7613                         # transform the option
7614                         if test "$LD_RPATH_OPT" = "-R " ; then
7615                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7616                         else
7617                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7618                         fi
7619
7620                         # if we have not already added this, add it now
7621                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7622                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7623                         then
7624                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7625
7626 echo "${as_me:-configure}:7626: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7627
7628                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7629                         fi
7630                 fi
7631                 ;;
7632         esac
7633         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7634 done
7635 LIBS=$cf_rpath_dst
7636
7637 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7638
7639 echo "${as_me:-configure}:7639: testing ...checked LIBS $LIBS ..." 1>&5
7640
7641         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7642
7643 echo "${as_me:-configure}:7643: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7644
7645 else
7646         echo "$as_me:7646: result: no" >&5
7647 echo "${ECHO_T}no" >&6
7648 fi
7649
7650 fi
7651
7652 fi
7653
7654 ###############################################################################
7655
7656 ###     use option --with-extra-suffix to append suffix to headers and libraries
7657 echo "$as_me:7657: checking if you wish to append extra suffix to header/library paths" >&5
7658 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7659 EXTRA_SUFFIX=
7660
7661 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7662 if test "${with_extra_suffix+set}" = set; then
7663   withval="$with_extra_suffix"
7664   case x$withval in
7665         (no)
7666                 ;;
7667         (xyes|x)
7668                 EXTRA_SUFFIX=$cf_cv_abi_version
7669                 ;;
7670         (*)
7671                 EXTRA_SUFFIX=$withval
7672                 ;;
7673         esac
7674
7675 fi;
7676 echo "$as_me:7676: result: $EXTRA_SUFFIX" >&5
7677 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7678
7679 ###     use option --disable-overwrite to leave out the link to -lcurses
7680 echo "$as_me:7680: checking if you wish to install ncurses overwriting curses" >&5
7681 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7682
7683 # Check whether --enable-overwrite or --disable-overwrite was given.
7684 if test "${enable_overwrite+set}" = set; then
7685   enableval="$enable_overwrite"
7686   with_overwrite=$enableval
7687 else
7688   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7689 fi;
7690 echo "$as_me:7690: result: $with_overwrite" >&5
7691 echo "${ECHO_T}$with_overwrite" >&6
7692
7693 echo "$as_me:7693: checking if external terminfo-database is used" >&5
7694 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7695
7696 # Check whether --enable-database or --disable-database was given.
7697 if test "${enable_database+set}" = set; then
7698   enableval="$enable_database"
7699   use_database=$enableval
7700 else
7701   use_database=yes
7702 fi;
7703 echo "$as_me:7703: result: $use_database" >&5
7704 echo "${ECHO_T}$use_database" >&6
7705
7706 case $host_os in
7707 (os2*)
7708         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7709         ;;
7710 (*)
7711         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7712         ;;
7713 esac
7714
7715 NCURSES_USE_DATABASE=0
7716 if test "$use_database" != no ; then
7717         NCURSES_USE_DATABASE=1
7718
7719         echo "$as_me:7719: checking which terminfo source-file will be installed" >&5
7720 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7721
7722 # Check whether --with-database or --without-database was given.
7723 if test "${with_database+set}" = set; then
7724   withval="$with_database"
7725   TERMINFO_SRC=$withval
7726 fi;
7727         echo "$as_me:7727: result: $TERMINFO_SRC" >&5
7728 echo "${ECHO_T}$TERMINFO_SRC" >&6
7729
7730         echo "$as_me:7730: checking whether to use hashed database instead of directory/tree" >&5
7731 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7732
7733 # Check whether --with-hashed-db or --without-hashed-db was given.
7734 if test "${with_hashed_db+set}" = set; then
7735   withval="$with_hashed_db"
7736
7737 else
7738   with_hashed_db=no
7739 fi;
7740         echo "$as_me:7740: result: $with_hashed_db" >&5
7741 echo "${ECHO_T}$with_hashed_db" >&6
7742 else
7743         with_hashed_db=no
7744 fi
7745
7746 echo "$as_me:7746: checking for list of fallback descriptions" >&5
7747 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7748
7749 # Check whether --with-fallbacks or --without-fallbacks was given.
7750 if test "${with_fallbacks+set}" = set; then
7751   withval="$with_fallbacks"
7752   with_fallback=$withval
7753 else
7754   with_fallback=
7755 fi;
7756 echo "$as_me:7756: result: $with_fallback" >&5
7757 echo "${ECHO_T}$with_fallback" >&6
7758 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7759
7760 echo "$as_me:7760: checking if you want modern xterm or antique" >&5
7761 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7762
7763 # Check whether --with-xterm-new or --without-xterm-new was given.
7764 if test "${with_xterm_new+set}" = set; then
7765   withval="$with_xterm_new"
7766   with_xterm_new=$withval
7767 else
7768   with_xterm_new=yes
7769 fi;
7770 case $with_xterm_new in
7771 (no) with_xterm_new=xterm-old;;
7772 (*)      with_xterm_new=xterm-new;;
7773 esac
7774 echo "$as_me:7774: result: $with_xterm_new" >&5
7775 echo "${ECHO_T}$with_xterm_new" >&6
7776 WHICH_XTERM=$with_xterm_new
7777
7778 echo "$as_me:7778: checking if xterm backspace sends BS or DEL" >&5
7779 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7780
7781 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7782 if test "${with_xterm_kbs+set}" = set; then
7783   withval="$with_xterm_kbs"
7784   with_xterm_kbs=$withval
7785 else
7786   with_xterm_kbs=BS
7787 fi;
7788 case x$with_xterm_kbs in
7789 (xyes|xno|xBS|xbs|x8)
7790         with_xterm_kbs=BS
7791         ;;
7792 (xDEL|xdel|x127)
7793         with_xterm_kbs=DEL
7794         ;;
7795 (*)
7796         with_xterm_kbs=$withval
7797         ;;
7798 esac
7799 echo "$as_me:7799: result: $with_xterm_kbs" >&5
7800 echo "${ECHO_T}$with_xterm_kbs" >&6
7801 XTERM_KBS=$with_xterm_kbs
7802
7803 MAKE_TERMINFO=
7804 if test "$use_database" = no ; then
7805         TERMINFO="${datadir}/terminfo"
7806         MAKE_TERMINFO="#"
7807 else
7808
7809 echo "$as_me:7809: checking for list of terminfo directories" >&5
7810 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7811
7812 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7813 if test "${with_terminfo_dirs+set}" = set; then
7814   withval="$with_terminfo_dirs"
7815
7816 else
7817   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7818 fi;
7819 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7820 cf_dst_path=
7821 for cf_src_path in $withval
7822 do
7823
7824 if test "x$prefix" != xNONE; then
7825         cf_path_syntax="$prefix"
7826 else
7827         cf_path_syntax="$ac_default_prefix"
7828 fi
7829
7830 case ".$cf_src_path" in
7831 (.\$\(*\)*|.\'*\'*)
7832         ;;
7833 (..|./*|.\\*)
7834         ;;
7835 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7836         ;;
7837 (.\${*prefix}*|.\${*dir}*)
7838         eval cf_src_path="$cf_src_path"
7839         case ".$cf_src_path" in
7840         (.NONE/*)
7841                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7842                 ;;
7843         esac
7844         ;;
7845 (.no|.NONE/*)
7846         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7847         ;;
7848 (*)
7849         { { echo "$as_me:7849: error: expected a pathname, not \"$cf_src_path\"" >&5
7850 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7851    { (exit 1); exit 1; }; }
7852         ;;
7853 esac
7854
7855   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7856   cf_dst_path="${cf_dst_path}${cf_src_path}"
7857 done
7858 IFS="$ac_save_ifs"
7859
7860 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7861 # so we have to check/work around.  We do prefer the result of "eval"...
7862 eval cf_dst_eval="$cf_dst_path"
7863 case "x$cf_dst_eval" in
7864 (xNONE*)
7865         TERMINFO_DIRS=$cf_dst_path
7866         ;;
7867 (*)
7868         TERMINFO_DIRS="$cf_dst_eval"
7869         ;;
7870 esac
7871
7872 echo "$as_me:7872: result: $TERMINFO_DIRS" >&5
7873 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7874 test -n "$TERMINFO_DIRS" &&
7875 cat >>confdefs.h <<EOF
7876 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7877 EOF
7878
7879 echo "$as_me:7879: checking for default terminfo directory" >&5
7880 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7881
7882 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7883 if test "${with_default_terminfo_dir+set}" = set; then
7884   withval="$with_default_terminfo_dir"
7885
7886 else
7887   withval="${TERMINFO:-${datadir}/terminfo}"
7888 fi; if test -n "${datadir}/terminfo" ; then
7889
7890 if test "x$prefix" != xNONE; then
7891         cf_path_syntax="$prefix"
7892 else
7893         cf_path_syntax="$ac_default_prefix"
7894 fi
7895
7896 case ".$withval" in
7897 (.\$\(*\)*|.\'*\'*)
7898         ;;
7899 (..|./*|.\\*)
7900         ;;
7901 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7902         ;;
7903 (.\${*prefix}*|.\${*dir}*)
7904         eval withval="$withval"
7905         case ".$withval" in
7906         (.NONE/*)
7907                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7908                 ;;
7909         esac
7910         ;;
7911 (.no|.NONE/*)
7912         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7913         ;;
7914 (*)
7915         { { echo "$as_me:7915: error: expected a pathname, not \"$withval\"" >&5
7916 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7917    { (exit 1); exit 1; }; }
7918         ;;
7919 esac
7920
7921 fi
7922 eval TERMINFO="$withval"
7923
7924 echo "$as_me:7924: result: $TERMINFO" >&5
7925 echo "${ECHO_T}$TERMINFO" >&6
7926
7927 cat >>confdefs.h <<EOF
7928 #define TERMINFO "$TERMINFO"
7929 EOF
7930
7931 fi
7932
7933 ###     use option --disable-big-core to make tic run on small machines
7934 ###     We need 4Mb, check if we can allocate 50% more than that.
7935 echo "$as_me:7935: checking if big-core option selected" >&5
7936 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7937
7938 # Check whether --enable-big-core or --disable-big-core was given.
7939 if test "${enable_big_core+set}" = set; then
7940   enableval="$enable_big_core"
7941   with_big_core=$enableval
7942 else
7943   if test "$cross_compiling" = yes; then
7944   with_big_core=no
7945 else
7946   cat >conftest.$ac_ext <<_ACEOF
7947 #line 7947 "configure"
7948 #include "confdefs.h"
7949
7950 #include <stdlib.h>
7951 #include <string.h>
7952 int main() {
7953         unsigned long n = 6000000L;
7954         char *s = malloc(n);
7955         if (s != 0)
7956                 s[0] = s[n-1] = 0;
7957         ${cf_cv_main_return:-return}(s == 0);
7958 }
7959 _ACEOF
7960 rm -f conftest$ac_exeext
7961 if { (eval echo "$as_me:7961: \"$ac_link\"") >&5
7962   (eval $ac_link) 2>&5
7963   ac_status=$?
7964   echo "$as_me:7964: \$? = $ac_status" >&5
7965   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7966   { (eval echo "$as_me:7966: \"$ac_try\"") >&5
7967   (eval $ac_try) 2>&5
7968   ac_status=$?
7969   echo "$as_me:7969: \$? = $ac_status" >&5
7970   (exit $ac_status); }; }; then
7971   with_big_core=yes
7972 else
7973   echo "$as_me: program exited with status $ac_status" >&5
7974 echo "$as_me: failed program was:" >&5
7975 cat conftest.$ac_ext >&5
7976 with_big_core=no
7977 fi
7978 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7979 fi
7980 fi;
7981 echo "$as_me:7981: result: $with_big_core" >&5
7982 echo "${ECHO_T}$with_big_core" >&6
7983 test "x$with_big_core" = "xyes" &&
7984 cat >>confdefs.h <<\EOF
7985 #define HAVE_BIG_CORE 1
7986 EOF
7987
7988 ### ISO C only guarantees 512-char strings, we have tables which load faster
7989 ### when constructed using "big" strings.  More than the C compiler, the awk
7990 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7991 echo "$as_me:7991: checking if big-strings option selected" >&5
7992 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7993
7994 # Check whether --enable-big-strings or --disable-big-strings was given.
7995 if test "${enable_big_strings+set}" = set; then
7996   enableval="$enable_big_strings"
7997   with_big_strings=$enableval
7998 else
7999
8000         case x$AWK in
8001         (x)
8002                 eval with_big_strings=no
8003                 ;;
8004         (*)
8005                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8006                         | $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
8007                         eval with_big_strings=yes
8008                 else
8009                         eval with_big_strings=no
8010                 fi
8011                 ;;
8012         esac
8013
8014 fi;
8015 echo "$as_me:8015: result: $with_big_strings" >&5
8016 echo "${ECHO_T}$with_big_strings" >&6
8017
8018 USE_BIG_STRINGS=0
8019 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8020
8021 ###     use option --enable-termcap to compile in the termcap fallback support
8022 echo "$as_me:8022: checking if you want termcap-fallback support" >&5
8023 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8024
8025 # Check whether --enable-termcap or --disable-termcap was given.
8026 if test "${enable_termcap+set}" = set; then
8027   enableval="$enable_termcap"
8028   with_termcap=$enableval
8029 else
8030   with_termcap=no
8031 fi;
8032 echo "$as_me:8032: result: $with_termcap" >&5
8033 echo "${ECHO_T}$with_termcap" >&6
8034
8035 NCURSES_USE_TERMCAP=0
8036 if test "x$with_termcap" != "xyes" ; then
8037         if test "$use_database" = no ; then
8038                 if test -z "$with_fallback" ; then
8039                         { { echo "$as_me:8039: error: You have disabled the database w/o specifying fallbacks" >&5
8040 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8041    { (exit 1); exit 1; }; }
8042                 fi
8043         fi
8044
8045 cat >>confdefs.h <<\EOF
8046 #define PURE_TERMINFO 1
8047 EOF
8048
8049 else
8050
8051         if test "$with_ticlib" != no ; then
8052                 { { echo "$as_me:8052: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8053 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8054    { (exit 1); exit 1; }; }
8055         fi
8056
8057         NCURSES_USE_TERMCAP=1
8058         echo "$as_me:8058: checking for list of termcap files" >&5
8059 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8060
8061 # Check whether --with-termpath or --without-termpath was given.
8062 if test "${with_termpath+set}" = set; then
8063   withval="$with_termpath"
8064
8065 else
8066   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8067 fi;
8068 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8069 cf_dst_path=
8070 for cf_src_path in $withval
8071 do
8072
8073 if test "x$prefix" != xNONE; then
8074         cf_path_syntax="$prefix"
8075 else
8076         cf_path_syntax="$ac_default_prefix"
8077 fi
8078
8079 case ".$cf_src_path" in
8080 (.\$\(*\)*|.\'*\'*)
8081         ;;
8082 (..|./*|.\\*)
8083         ;;
8084 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8085         ;;
8086 (.\${*prefix}*|.\${*dir}*)
8087         eval cf_src_path="$cf_src_path"
8088         case ".$cf_src_path" in
8089         (.NONE/*)
8090                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8091                 ;;
8092         esac
8093         ;;
8094 (.no|.NONE/*)
8095         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8096         ;;
8097 (*)
8098         { { echo "$as_me:8098: error: expected a pathname, not \"$cf_src_path\"" >&5
8099 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8100    { (exit 1); exit 1; }; }
8101         ;;
8102 esac
8103
8104   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8105   cf_dst_path="${cf_dst_path}${cf_src_path}"
8106 done
8107 IFS="$ac_save_ifs"
8108
8109 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8110 # so we have to check/work around.  We do prefer the result of "eval"...
8111 eval cf_dst_eval="$cf_dst_path"
8112 case "x$cf_dst_eval" in
8113 (xNONE*)
8114         TERMPATH=$cf_dst_path
8115         ;;
8116 (*)
8117         TERMPATH="$cf_dst_eval"
8118         ;;
8119 esac
8120
8121         echo "$as_me:8121: result: $TERMPATH" >&5
8122 echo "${ECHO_T}$TERMPATH" >&6
8123         test -n "$TERMPATH" &&
8124 cat >>confdefs.h <<EOF
8125 #define TERMPATH "$TERMPATH"
8126 EOF
8127
8128         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8129         echo "$as_me:8129: checking if fast termcap-loader is needed" >&5
8130 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8131
8132 # Check whether --enable-getcap or --disable-getcap was given.
8133 if test "${enable_getcap+set}" = set; then
8134   enableval="$enable_getcap"
8135   with_getcap=$enableval
8136 else
8137   with_getcap=no
8138 fi;
8139         echo "$as_me:8139: result: $with_getcap" >&5
8140 echo "${ECHO_T}$with_getcap" >&6
8141         test "x$with_getcap" = "xyes" &&
8142 cat >>confdefs.h <<\EOF
8143 #define USE_GETCAP 1
8144 EOF
8145
8146         echo "$as_me:8146: checking if translated termcaps will be cached in ~/.terminfo" >&5
8147 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8148
8149 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8150 if test "${enable_getcap_cache+set}" = set; then
8151   enableval="$enable_getcap_cache"
8152   with_getcap_cache=$enableval
8153 else
8154   with_getcap_cache=no
8155 fi;
8156         echo "$as_me:8156: result: $with_getcap_cache" >&5
8157 echo "${ECHO_T}$with_getcap_cache" >&6
8158         test "x$with_getcap_cache" = "xyes" &&
8159 cat >>confdefs.h <<\EOF
8160 #define USE_GETCAP_CACHE 1
8161 EOF
8162
8163 fi
8164
8165 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8166 echo "$as_me:8166: checking if ~/.terminfo is wanted" >&5
8167 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8168
8169 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8170 if test "${enable_home_terminfo+set}" = set; then
8171   enableval="$enable_home_terminfo"
8172   with_home_terminfo=$enableval
8173 else
8174   with_home_terminfo=yes
8175 fi;
8176 echo "$as_me:8176: result: $with_home_terminfo" >&5
8177 echo "${ECHO_T}$with_home_terminfo" >&6
8178 test "x$with_home_terminfo" = "xyes" &&
8179 cat >>confdefs.h <<\EOF
8180 #define USE_HOME_TERMINFO 1
8181 EOF
8182
8183 echo "$as_me:8183: checking if you want to use restricted environment when running as root" >&5
8184 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8185
8186 # Check whether --enable-root-environ or --disable-root-environ was given.
8187 if test "${enable_root_environ+set}" = set; then
8188   enableval="$enable_root_environ"
8189   with_root_environ=$enableval
8190 else
8191   with_root_environ=yes
8192 fi;
8193 echo "$as_me:8193: result: $with_root_environ" >&5
8194 echo "${ECHO_T}$with_root_environ" >&6
8195 test "x$with_root_environ" = xyes &&
8196 cat >>confdefs.h <<\EOF
8197 #define USE_ROOT_ENVIRON 1
8198 EOF
8199
8200 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8201 ###   to reduce storage requirements for the terminfo database.
8202
8203 for ac_header in \
8204 unistd.h \
8205
8206 do
8207 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8208 echo "$as_me:8208: checking for $ac_header" >&5
8209 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8211   echo $ECHO_N "(cached) $ECHO_C" >&6
8212 else
8213   cat >conftest.$ac_ext <<_ACEOF
8214 #line 8214 "configure"
8215 #include "confdefs.h"
8216 #include <$ac_header>
8217 _ACEOF
8218 if { (eval echo "$as_me:8218: \"$ac_cpp conftest.$ac_ext\"") >&5
8219   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8220   ac_status=$?
8221   egrep -v '^ *\+' conftest.er1 >conftest.err
8222   rm -f conftest.er1
8223   cat conftest.err >&5
8224   echo "$as_me:8224: \$? = $ac_status" >&5
8225   (exit $ac_status); } >/dev/null; then
8226   if test -s conftest.err; then
8227     ac_cpp_err=$ac_c_preproc_warn_flag
8228   else
8229     ac_cpp_err=
8230   fi
8231 else
8232   ac_cpp_err=yes
8233 fi
8234 if test -z "$ac_cpp_err"; then
8235   eval "$as_ac_Header=yes"
8236 else
8237   echo "$as_me: failed program was:" >&5
8238   cat conftest.$ac_ext >&5
8239   eval "$as_ac_Header=no"
8240 fi
8241 rm -f conftest.err conftest.$ac_ext
8242 fi
8243 echo "$as_me:8243: result: `eval echo '${'$as_ac_Header'}'`" >&5
8244 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8245 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8246   cat >>confdefs.h <<EOF
8247 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8248 EOF
8249
8250 fi
8251 done
8252
8253 for ac_func in \
8254         remove \
8255         unlink
8256 do
8257 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8258 echo "$as_me:8258: checking for $ac_func" >&5
8259 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8260 if eval "test \"\${$as_ac_var+set}\" = set"; then
8261   echo $ECHO_N "(cached) $ECHO_C" >&6
8262 else
8263   cat >conftest.$ac_ext <<_ACEOF
8264 #line 8264 "configure"
8265 #include "confdefs.h"
8266 /* System header to define __stub macros and hopefully few prototypes,
8267     which can conflict with char $ac_func (); below.  */
8268 #include <assert.h>
8269 /* Override any gcc2 internal prototype to avoid an error.  */
8270 #ifdef __cplusplus
8271 extern "C"
8272 #endif
8273 /* We use char because int might match the return type of a gcc2
8274    builtin and then its argument prototype would still apply.  */
8275 char $ac_func ();
8276 char (*f) ();
8277
8278 int
8279 main (void)
8280 {
8281 /* The GNU C library defines this for functions which it implements
8282     to always fail with ENOSYS.  Some functions are actually named
8283     something starting with __ and the normal name is an alias.  */
8284 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8285 choke me
8286 #else
8287 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8288 #endif
8289
8290   ;
8291   return 0;
8292 }
8293 _ACEOF
8294 rm -f conftest.$ac_objext conftest$ac_exeext
8295 if { (eval echo "$as_me:8295: \"$ac_link\"") >&5
8296   (eval $ac_link) 2>&5
8297   ac_status=$?
8298   echo "$as_me:8298: \$? = $ac_status" >&5
8299   (exit $ac_status); } &&
8300          { ac_try='test -s conftest$ac_exeext'
8301   { (eval echo "$as_me:8301: \"$ac_try\"") >&5
8302   (eval $ac_try) 2>&5
8303   ac_status=$?
8304   echo "$as_me:8304: \$? = $ac_status" >&5
8305   (exit $ac_status); }; }; then
8306   eval "$as_ac_var=yes"
8307 else
8308   echo "$as_me: failed program was:" >&5
8309 cat conftest.$ac_ext >&5
8310 eval "$as_ac_var=no"
8311 fi
8312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8313 fi
8314 echo "$as_me:8314: result: `eval echo '${'$as_ac_var'}'`" >&5
8315 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8316 if test `eval echo '${'$as_ac_var'}'` = yes; then
8317   cat >>confdefs.h <<EOF
8318 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8319 EOF
8320
8321 fi
8322 done
8323
8324 if test "$cross_compiling" = yes ; then
8325
8326 for ac_func in \
8327                 link \
8328                 symlink
8329 do
8330 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8331 echo "$as_me:8331: checking for $ac_func" >&5
8332 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8333 if eval "test \"\${$as_ac_var+set}\" = set"; then
8334   echo $ECHO_N "(cached) $ECHO_C" >&6
8335 else
8336   cat >conftest.$ac_ext <<_ACEOF
8337 #line 8337 "configure"
8338 #include "confdefs.h"
8339 /* System header to define __stub macros and hopefully few prototypes,
8340     which can conflict with char $ac_func (); below.  */
8341 #include <assert.h>
8342 /* Override any gcc2 internal prototype to avoid an error.  */
8343 #ifdef __cplusplus
8344 extern "C"
8345 #endif
8346 /* We use char because int might match the return type of a gcc2
8347    builtin and then its argument prototype would still apply.  */
8348 char $ac_func ();
8349 char (*f) ();
8350
8351 int
8352 main (void)
8353 {
8354 /* The GNU C library defines this for functions which it implements
8355     to always fail with ENOSYS.  Some functions are actually named
8356     something starting with __ and the normal name is an alias.  */
8357 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8358 choke me
8359 #else
8360 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8361 #endif
8362
8363   ;
8364   return 0;
8365 }
8366 _ACEOF
8367 rm -f conftest.$ac_objext conftest$ac_exeext
8368 if { (eval echo "$as_me:8368: \"$ac_link\"") >&5
8369   (eval $ac_link) 2>&5
8370   ac_status=$?
8371   echo "$as_me:8371: \$? = $ac_status" >&5
8372   (exit $ac_status); } &&
8373          { ac_try='test -s conftest$ac_exeext'
8374   { (eval echo "$as_me:8374: \"$ac_try\"") >&5
8375   (eval $ac_try) 2>&5
8376   ac_status=$?
8377   echo "$as_me:8377: \$? = $ac_status" >&5
8378   (exit $ac_status); }; }; then
8379   eval "$as_ac_var=yes"
8380 else
8381   echo "$as_me: failed program was:" >&5
8382 cat conftest.$ac_ext >&5
8383 eval "$as_ac_var=no"
8384 fi
8385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8386 fi
8387 echo "$as_me:8387: result: `eval echo '${'$as_ac_var'}'`" >&5
8388 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8389 if test `eval echo '${'$as_ac_var'}'` = yes; then
8390   cat >>confdefs.h <<EOF
8391 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8392 EOF
8393
8394 fi
8395 done
8396
8397 else
8398         echo "$as_me:8398: checking if link/symlink functions work" >&5
8399 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8400 if test "${cf_cv_link_funcs+set}" = set; then
8401   echo $ECHO_N "(cached) $ECHO_C" >&6
8402 else
8403
8404                 cf_cv_link_funcs=
8405                 for cf_func in link symlink ; do
8406                         if test "$cross_compiling" = yes; then
8407
8408                         eval 'ac_cv_func_'$cf_func'=error'
8409 else
8410   cat >conftest.$ac_ext <<_ACEOF
8411 #line 8411 "configure"
8412 #include "confdefs.h"
8413
8414 #include <sys/types.h>
8415 #include <sys/stat.h>
8416 #ifdef HAVE_UNISTD_H
8417 #include <unistd.h>
8418 #endif
8419 int main(void)
8420 {
8421         int fail = 0;
8422         char *src = "config.log";
8423         char *dst = "conftest.chk";
8424         struct stat src_sb;
8425         struct stat dst_sb;
8426
8427         stat(src, &src_sb);
8428         fail = ($cf_func("config.log", "conftest.chk") < 0)
8429             || (stat(dst, &dst_sb) < 0)
8430             || (dst_sb.st_mtime != src_sb.st_mtime);
8431 #ifdef HAVE_UNLINK
8432         unlink(dst);
8433 #else
8434         remove(dst);
8435 #endif
8436         ${cf_cv_main_return:-return} (fail);
8437 }
8438
8439 _ACEOF
8440 rm -f conftest$ac_exeext
8441 if { (eval echo "$as_me:8441: \"$ac_link\"") >&5
8442   (eval $ac_link) 2>&5
8443   ac_status=$?
8444   echo "$as_me:8444: \$? = $ac_status" >&5
8445   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8446   { (eval echo "$as_me:8446: \"$ac_try\"") >&5
8447   (eval $ac_try) 2>&5
8448   ac_status=$?
8449   echo "$as_me:8449: \$? = $ac_status" >&5
8450   (exit $ac_status); }; }; then
8451
8452                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8453                         eval 'ac_cv_func_'$cf_func'=yes'
8454 else
8455   echo "$as_me: program exited with status $ac_status" >&5
8456 echo "$as_me: failed program was:" >&5
8457 cat conftest.$ac_ext >&5
8458
8459                         eval 'ac_cv_func_'$cf_func'=no'
8460 fi
8461 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8462 fi
8463                 done
8464                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8465
8466 fi
8467 echo "$as_me:8467: result: $cf_cv_link_funcs" >&5
8468 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8469         test "$ac_cv_func_link"    = yes &&
8470 cat >>confdefs.h <<\EOF
8471 #define HAVE_LINK 1
8472 EOF
8473
8474         test "$ac_cv_func_symlink" = yes &&
8475 cat >>confdefs.h <<\EOF
8476 #define HAVE_SYMLINK 1
8477 EOF
8478
8479 fi
8480
8481 with_links=no
8482 with_symlinks=no
8483
8484 # soft links (symbolic links) are useful for some systems where hard links do
8485 # not work, or to make it simpler to copy terminfo trees around.
8486 if test "x$ac_cv_func_symlink" = xyes ; then
8487         echo "$as_me:8487: checking if tic should use symbolic links" >&5
8488 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8489
8490 # Check whether --enable-symlinks or --disable-symlinks was given.
8491 if test "${enable_symlinks+set}" = set; then
8492   enableval="$enable_symlinks"
8493   with_symlinks=$enableval
8494 else
8495   with_symlinks=no
8496 fi;
8497         echo "$as_me:8497: result: $with_symlinks" >&5
8498 echo "${ECHO_T}$with_symlinks" >&6
8499 fi
8500
8501 # If we have hard links and did not choose to use soft links instead, there is
8502 # no reason to make this choice optional - use the hard links.
8503 if test "$with_symlinks" = no ; then
8504         echo "$as_me:8504: checking if tic should use hard links" >&5
8505 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8506         if test "x$ac_cv_func_link" = xyes ; then
8507                 with_links=yes
8508         else
8509                 with_links=no
8510         fi
8511         echo "$as_me:8511: result: $with_links" >&5
8512 echo "${ECHO_T}$with_links" >&6
8513 fi
8514
8515 test "x$with_links" = xyes &&
8516 cat >>confdefs.h <<\EOF
8517 #define USE_LINKS 1
8518 EOF
8519
8520 test "x$with_symlinks" = xyes &&
8521 cat >>confdefs.h <<\EOF
8522 #define USE_SYMLINKS 1
8523 EOF
8524
8525 ###   use option --enable-broken-linker to force on use of broken-linker support
8526 echo "$as_me:8526: checking if you want broken-linker support code" >&5
8527 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8528
8529 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8530 if test "${enable_broken_linker+set}" = set; then
8531   enableval="$enable_broken_linker"
8532   with_broken_linker=$enableval
8533 else
8534   with_broken_linker=${BROKEN_LINKER:-no}
8535 fi;
8536 echo "$as_me:8536: result: $with_broken_linker" >&5
8537 echo "${ECHO_T}$with_broken_linker" >&6
8538
8539 BROKEN_LINKER=0
8540 if test "x$with_broken_linker" = xyes ; then
8541
8542 cat >>confdefs.h <<\EOF
8543 #define BROKEN_LINKER 1
8544 EOF
8545
8546         BROKEN_LINKER=1
8547 elif test "$DFT_LWR_MODEL" = shared ; then
8548         case $cf_cv_system_name in
8549         (cygwin*)
8550
8551 cat >>confdefs.h <<\EOF
8552 #define BROKEN_LINKER 1
8553 EOF
8554
8555                 BROKEN_LINKER=1
8556                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8557
8558 echo "${as_me:-configure}:8558: testing cygwin linker is broken anyway ..." 1>&5
8559
8560                 ;;
8561         esac
8562 fi
8563
8564 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8565 echo "$as_me:8565: checking if tputs should process BSD-style prefix padding" >&5
8566 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8567
8568 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8569 if test "${enable_bsdpad+set}" = set; then
8570   enableval="$enable_bsdpad"
8571   with_bsdpad=$enableval
8572 else
8573   with_bsdpad=no
8574 fi;
8575 echo "$as_me:8575: result: $with_bsdpad" >&5
8576 echo "${ECHO_T}$with_bsdpad" >&6
8577 test "x$with_bsdpad" = xyes &&
8578 cat >>confdefs.h <<\EOF
8579 #define BSD_TPUTS 1
8580 EOF
8581
8582 ###   use option --enable-widec to turn on use of wide-character support
8583 NCURSES_CH_T=chtype
8584 NCURSES_LIBUTF8=0
8585
8586 NEED_WCHAR_H=0
8587 NCURSES_MBSTATE_T=0
8588 NCURSES_WCHAR_T=0
8589 NCURSES_WINT_T=0
8590
8591 # Check to define _XOPEN_SOURCE "automatically"
8592 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8593
8594 cf_XOPEN_SOURCE=600
8595 cf_POSIX_C_SOURCE=199506L
8596 cf_xopen_source=
8597
8598 case $host_os in
8599 (aix[4-7]*)
8600         cf_xopen_source="-D_ALL_SOURCE"
8601         ;;
8602 (msys)
8603         cf_XOPEN_SOURCE=600
8604         ;;
8605 (darwin[0-8].*)
8606         cf_xopen_source="-D_APPLE_C_SOURCE"
8607         ;;
8608 (darwin*)
8609         cf_xopen_source="-D_DARWIN_C_SOURCE"
8610         cf_XOPEN_SOURCE=
8611         ;;
8612 (freebsd*|dragonfly*)
8613         # 5.x headers associate
8614         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8615         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8616         cf_POSIX_C_SOURCE=200112L
8617         cf_XOPEN_SOURCE=600
8618         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8619         ;;
8620 (hpux11*)
8621         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8622         ;;
8623 (hpux*)
8624         cf_xopen_source="-D_HPUX_SOURCE"
8625         ;;
8626 (irix[56].*)
8627         cf_xopen_source="-D_SGI_SOURCE"
8628         cf_XOPEN_SOURCE=
8629         ;;
8630 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8631
8632 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8633
8634 echo "$as_me:8634: checking if this is the GNU C library" >&5
8635 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8636 if test "${cf_cv_gnu_library+set}" = set; then
8637   echo $ECHO_N "(cached) $ECHO_C" >&6
8638 else
8639
8640 cat >conftest.$ac_ext <<_ACEOF
8641 #line 8641 "configure"
8642 #include "confdefs.h"
8643 #include <sys/types.h>
8644 int
8645 main (void)
8646 {
8647
8648         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8649                 return 0;
8650         #else
8651         #       error not GNU C library
8652         #endif
8653   ;
8654   return 0;
8655 }
8656 _ACEOF
8657 rm -f conftest.$ac_objext
8658 if { (eval echo "$as_me:8658: \"$ac_compile\"") >&5
8659   (eval $ac_compile) 2>&5
8660   ac_status=$?
8661   echo "$as_me:8661: \$? = $ac_status" >&5
8662   (exit $ac_status); } &&
8663          { ac_try='test -s conftest.$ac_objext'
8664   { (eval echo "$as_me:8664: \"$ac_try\"") >&5
8665   (eval $ac_try) 2>&5
8666   ac_status=$?
8667   echo "$as_me:8667: \$? = $ac_status" >&5
8668   (exit $ac_status); }; }; then
8669   cf_cv_gnu_library=yes
8670 else
8671   echo "$as_me: failed program was:" >&5
8672 cat conftest.$ac_ext >&5
8673 cf_cv_gnu_library=no
8674 fi
8675 rm -f conftest.$ac_objext conftest.$ac_ext
8676
8677 fi
8678 echo "$as_me:8678: result: $cf_cv_gnu_library" >&5
8679 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8680
8681 if test x$cf_cv_gnu_library = xyes; then
8682
8683         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8684         # was changed to help a little...
8685         echo "$as_me:8685: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8686 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8687 if test "${cf_cv_gnu_library_219+set}" = set; then
8688   echo $ECHO_N "(cached) $ECHO_C" >&6
8689 else
8690
8691                 cf_save="$CPPFLAGS"
8692
8693         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8694         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8695
8696                 cat >conftest.$ac_ext <<_ACEOF
8697 #line 8697 "configure"
8698 #include "confdefs.h"
8699 #include <sys/types.h>
8700 int
8701 main (void)
8702 {
8703
8704                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8705                                 return 0;
8706                         #else
8707                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8708                         #endif
8709   ;
8710   return 0;
8711 }
8712 _ACEOF
8713 rm -f conftest.$ac_objext
8714 if { (eval echo "$as_me:8714: \"$ac_compile\"") >&5
8715   (eval $ac_compile) 2>&5
8716   ac_status=$?
8717   echo "$as_me:8717: \$? = $ac_status" >&5
8718   (exit $ac_status); } &&
8719          { ac_try='test -s conftest.$ac_objext'
8720   { (eval echo "$as_me:8720: \"$ac_try\"") >&5
8721   (eval $ac_try) 2>&5
8722   ac_status=$?
8723   echo "$as_me:8723: \$? = $ac_status" >&5
8724   (exit $ac_status); }; }; then
8725   cf_cv_gnu_library_219=yes
8726 else
8727   echo "$as_me: failed program was:" >&5
8728 cat conftest.$ac_ext >&5
8729 cf_cv_gnu_library_219=no
8730 fi
8731 rm -f conftest.$ac_objext conftest.$ac_ext
8732                 CPPFLAGS="$cf_save"
8733
8734 fi
8735 echo "$as_me:8735: result: $cf_cv_gnu_library_219" >&5
8736 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8737
8738         if test "x$cf_cv_gnu_library_219" = xyes; then
8739                 cf_save="$CPPFLAGS"
8740                 echo "$as_me:8740: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8741 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8742 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8743   echo $ECHO_N "(cached) $ECHO_C" >&6
8744 else
8745
8746 cf_fix_cppflags=no
8747 cf_new_cflags=
8748 cf_new_cppflags=
8749 cf_new_extra_cppflags=
8750
8751 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8752 do
8753 case $cf_fix_cppflags in
8754 (no)
8755         case $cf_add_cflags in
8756         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8757                 case $cf_add_cflags in
8758                 (-D*)
8759                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8760
8761                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8762                                 && test -z "${cf_tst_cflags}" \
8763                                 && cf_fix_cppflags=yes
8764
8765                         if test $cf_fix_cppflags = yes ; then
8766
8767         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8768         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8769
8770                                 continue
8771                         elif test "${cf_tst_cflags}" = "\"'" ; then
8772
8773         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8774         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8775
8776                                 continue
8777                         fi
8778                         ;;
8779                 esac
8780                 case "$CPPFLAGS" in
8781                 (*$cf_add_cflags)
8782                         ;;
8783                 (*)
8784                         case $cf_add_cflags in
8785                         (-D*)
8786                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8787
8788 CPPFLAGS=`echo "$CPPFLAGS" | \
8789         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8790                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8791
8792                                 ;;
8793                         esac
8794
8795         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8796         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8797
8798                         ;;
8799                 esac
8800                 ;;
8801         (*)
8802
8803         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8804         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8805
8806                 ;;
8807         esac
8808         ;;
8809 (yes)
8810
8811         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8812         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8813
8814         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8815
8816         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8817                 && test -z "${cf_tst_cflags}" \
8818                 && cf_fix_cppflags=no
8819         ;;
8820 esac
8821 done
8822
8823 if test -n "$cf_new_cflags" ; then
8824
8825         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8826         CFLAGS="${CFLAGS}$cf_new_cflags"
8827
8828 fi
8829
8830 if test -n "$cf_new_cppflags" ; then
8831
8832         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8833         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8834
8835 fi
8836
8837 if test -n "$cf_new_extra_cppflags" ; then
8838
8839         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8840         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8841
8842 fi
8843
8844                         cat >conftest.$ac_ext <<_ACEOF
8845 #line 8845 "configure"
8846 #include "confdefs.h"
8847
8848                                 #include <limits.h>
8849                                 #include <sys/types.h>
8850
8851 int
8852 main (void)
8853 {
8854
8855                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
8856                                         return 0;
8857                                 #else
8858                                 #       error GNU C library is too old
8859                                 #endif
8860   ;
8861   return 0;
8862 }
8863 _ACEOF
8864 rm -f conftest.$ac_objext
8865 if { (eval echo "$as_me:8865: \"$ac_compile\"") >&5
8866   (eval $ac_compile) 2>&5
8867   ac_status=$?
8868   echo "$as_me:8868: \$? = $ac_status" >&5
8869   (exit $ac_status); } &&
8870          { ac_try='test -s conftest.$ac_objext'
8871   { (eval echo "$as_me:8871: \"$ac_try\"") >&5
8872   (eval $ac_try) 2>&5
8873   ac_status=$?
8874   echo "$as_me:8874: \$? = $ac_status" >&5
8875   (exit $ac_status); }; }; then
8876   cf_cv_gnu_dftsrc_219=yes
8877 else
8878   echo "$as_me: failed program was:" >&5
8879 cat conftest.$ac_ext >&5
8880 cf_cv_gnu_dftsrc_219=no
8881 fi
8882 rm -f conftest.$ac_objext conftest.$ac_ext
8883
8884 fi
8885 echo "$as_me:8885: result: $cf_cv_gnu_dftsrc_219" >&5
8886 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
8887                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
8888         else
8889                 cf_cv_gnu_dftsrc_219=maybe
8890         fi
8891
8892         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
8893
8894                 echo "$as_me:8894: checking if we must define _GNU_SOURCE" >&5
8895 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8896 if test "${cf_cv_gnu_source+set}" = set; then
8897   echo $ECHO_N "(cached) $ECHO_C" >&6
8898 else
8899
8900                 cat >conftest.$ac_ext <<_ACEOF
8901 #line 8901 "configure"
8902 #include "confdefs.h"
8903 #include <sys/types.h>
8904 int
8905 main (void)
8906 {
8907
8908                         #ifndef _XOPEN_SOURCE
8909                         #error  expected _XOPEN_SOURCE to be defined
8910                         #endif
8911   ;
8912   return 0;
8913 }
8914 _ACEOF
8915 rm -f conftest.$ac_objext
8916 if { (eval echo "$as_me:8916: \"$ac_compile\"") >&5
8917   (eval $ac_compile) 2>&5
8918   ac_status=$?
8919   echo "$as_me:8919: \$? = $ac_status" >&5
8920   (exit $ac_status); } &&
8921          { ac_try='test -s conftest.$ac_objext'
8922   { (eval echo "$as_me:8922: \"$ac_try\"") >&5
8923   (eval $ac_try) 2>&5
8924   ac_status=$?
8925   echo "$as_me:8925: \$? = $ac_status" >&5
8926   (exit $ac_status); }; }; then
8927   cf_cv_gnu_source=no
8928 else
8929   echo "$as_me: failed program was:" >&5
8930 cat conftest.$ac_ext >&5
8931 cf_save="$CPPFLAGS"
8932
8933 cf_fix_cppflags=no
8934 cf_new_cflags=
8935 cf_new_cppflags=
8936 cf_new_extra_cppflags=
8937
8938 for cf_add_cflags in -D_GNU_SOURCE
8939 do
8940 case $cf_fix_cppflags in
8941 (no)
8942         case $cf_add_cflags in
8943         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8944                 case $cf_add_cflags in
8945                 (-D*)
8946                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8947
8948                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8949                                 && test -z "${cf_tst_cflags}" \
8950                                 && cf_fix_cppflags=yes
8951
8952                         if test $cf_fix_cppflags = yes ; then
8953
8954         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8955         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8956
8957                                 continue
8958                         elif test "${cf_tst_cflags}" = "\"'" ; then
8959
8960         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8961         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8962
8963                                 continue
8964                         fi
8965                         ;;
8966                 esac
8967                 case "$CPPFLAGS" in
8968                 (*$cf_add_cflags)
8969                         ;;
8970                 (*)
8971                         case $cf_add_cflags in
8972                         (-D*)
8973                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8974
8975 CPPFLAGS=`echo "$CPPFLAGS" | \
8976         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8977                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8978
8979                                 ;;
8980                         esac
8981
8982         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8983         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8984
8985                         ;;
8986                 esac
8987                 ;;
8988         (*)
8989
8990         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8991         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8992
8993                 ;;
8994         esac
8995         ;;
8996 (yes)
8997
8998         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8999         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9000
9001         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9002
9003         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9004                 && test -z "${cf_tst_cflags}" \
9005                 && cf_fix_cppflags=no
9006         ;;
9007 esac
9008 done
9009
9010 if test -n "$cf_new_cflags" ; then
9011
9012         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9013         CFLAGS="${CFLAGS}$cf_new_cflags"
9014
9015 fi
9016
9017 if test -n "$cf_new_cppflags" ; then
9018
9019         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9020         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9021
9022 fi
9023
9024 if test -n "$cf_new_extra_cppflags" ; then
9025
9026         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9027         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9028
9029 fi
9030
9031                          cat >conftest.$ac_ext <<_ACEOF
9032 #line 9032 "configure"
9033 #include "confdefs.h"
9034 #include <sys/types.h>
9035 int
9036 main (void)
9037 {
9038
9039                                 #ifdef _XOPEN_SOURCE
9040                                 #error  expected _XOPEN_SOURCE to be undefined
9041                                 #endif
9042   ;
9043   return 0;
9044 }
9045 _ACEOF
9046 rm -f conftest.$ac_objext
9047 if { (eval echo "$as_me:9047: \"$ac_compile\"") >&5
9048   (eval $ac_compile) 2>&5
9049   ac_status=$?
9050   echo "$as_me:9050: \$? = $ac_status" >&5
9051   (exit $ac_status); } &&
9052          { ac_try='test -s conftest.$ac_objext'
9053   { (eval echo "$as_me:9053: \"$ac_try\"") >&5
9054   (eval $ac_try) 2>&5
9055   ac_status=$?
9056   echo "$as_me:9056: \$? = $ac_status" >&5
9057   (exit $ac_status); }; }; then
9058   cf_cv_gnu_source=no
9059 else
9060   echo "$as_me: failed program was:" >&5
9061 cat conftest.$ac_ext >&5
9062 cf_cv_gnu_source=yes
9063 fi
9064 rm -f conftest.$ac_objext conftest.$ac_ext
9065                         CPPFLAGS="$cf_save"
9066
9067 fi
9068 rm -f conftest.$ac_objext conftest.$ac_ext
9069
9070 fi
9071 echo "$as_me:9071: result: $cf_cv_gnu_source" >&5
9072 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9073
9074                 if test "$cf_cv_gnu_source" = yes
9075                 then
9076                 echo "$as_me:9076: checking if we should also define _DEFAULT_SOURCE" >&5
9077 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9078 if test "${cf_cv_default_source+set}" = set; then
9079   echo $ECHO_N "(cached) $ECHO_C" >&6
9080 else
9081
9082         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9083         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9084
9085                         cat >conftest.$ac_ext <<_ACEOF
9086 #line 9086 "configure"
9087 #include "confdefs.h"
9088 #include <sys/types.h>
9089 int
9090 main (void)
9091 {
9092
9093                                 #ifdef _DEFAULT_SOURCE
9094                                 #error  expected _DEFAULT_SOURCE to be undefined
9095                                 #endif
9096   ;
9097   return 0;
9098 }
9099 _ACEOF
9100 rm -f conftest.$ac_objext
9101 if { (eval echo "$as_me:9101: \"$ac_compile\"") >&5
9102   (eval $ac_compile) 2>&5
9103   ac_status=$?
9104   echo "$as_me:9104: \$? = $ac_status" >&5
9105   (exit $ac_status); } &&
9106          { ac_try='test -s conftest.$ac_objext'
9107   { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108   (eval $ac_try) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); }; }; then
9112   cf_cv_default_source=no
9113 else
9114   echo "$as_me: failed program was:" >&5
9115 cat conftest.$ac_ext >&5
9116 cf_cv_default_source=yes
9117 fi
9118 rm -f conftest.$ac_objext conftest.$ac_ext
9119
9120 fi
9121 echo "$as_me:9121: result: $cf_cv_default_source" >&5
9122 echo "${ECHO_T}$cf_cv_default_source" >&6
9123                         if test "$cf_cv_default_source" = yes
9124                         then
9125
9126         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9127         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9128
9129                         fi
9130                 fi
9131         fi
9132
9133 fi
9134
9135         ;;
9136 (minix*)
9137         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9138         ;;
9139 (mirbsd*)
9140         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9141         cf_XOPEN_SOURCE=
9142
9143 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9144
9145 cf_save_CFLAGS="$CFLAGS"
9146 cf_save_CPPFLAGS="$CPPFLAGS"
9147
9148 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9149         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9150                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9151
9152 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9153         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9154                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9155
9156 echo "$as_me:9156: checking if we should define _POSIX_C_SOURCE" >&5
9157 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9158 if test "${cf_cv_posix_c_source+set}" = set; then
9159   echo $ECHO_N "(cached) $ECHO_C" >&6
9160 else
9161
9162 echo "${as_me:-configure}:9162: testing if the symbol is already defined go no further ..." 1>&5
9163
9164         cat >conftest.$ac_ext <<_ACEOF
9165 #line 9165 "configure"
9166 #include "confdefs.h"
9167 #include <sys/types.h>
9168 int
9169 main (void)
9170 {
9171
9172 #ifndef _POSIX_C_SOURCE
9173 make an error
9174 #endif
9175   ;
9176   return 0;
9177 }
9178 _ACEOF
9179 rm -f conftest.$ac_objext
9180 if { (eval echo "$as_me:9180: \"$ac_compile\"") >&5
9181   (eval $ac_compile) 2>&5
9182   ac_status=$?
9183   echo "$as_me:9183: \$? = $ac_status" >&5
9184   (exit $ac_status); } &&
9185          { ac_try='test -s conftest.$ac_objext'
9186   { (eval echo "$as_me:9186: \"$ac_try\"") >&5
9187   (eval $ac_try) 2>&5
9188   ac_status=$?
9189   echo "$as_me:9189: \$? = $ac_status" >&5
9190   (exit $ac_status); }; }; then
9191   cf_cv_posix_c_source=no
9192 else
9193   echo "$as_me: failed program was:" >&5
9194 cat conftest.$ac_ext >&5
9195 cf_want_posix_source=no
9196          case .$cf_POSIX_C_SOURCE in
9197          (.[12]??*)
9198                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9199                 ;;
9200          (.2)
9201                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9202                 cf_want_posix_source=yes
9203                 ;;
9204          (.*)
9205                 cf_want_posix_source=yes
9206                 ;;
9207          esac
9208          if test "$cf_want_posix_source" = yes ; then
9209                 cat >conftest.$ac_ext <<_ACEOF
9210 #line 9210 "configure"
9211 #include "confdefs.h"
9212 #include <sys/types.h>
9213 int
9214 main (void)
9215 {
9216
9217 #ifdef _POSIX_SOURCE
9218 make an error
9219 #endif
9220   ;
9221   return 0;
9222 }
9223 _ACEOF
9224 rm -f conftest.$ac_objext
9225 if { (eval echo "$as_me:9225: \"$ac_compile\"") >&5
9226   (eval $ac_compile) 2>&5
9227   ac_status=$?
9228   echo "$as_me:9228: \$? = $ac_status" >&5
9229   (exit $ac_status); } &&
9230          { ac_try='test -s conftest.$ac_objext'
9231   { (eval echo "$as_me:9231: \"$ac_try\"") >&5
9232   (eval $ac_try) 2>&5
9233   ac_status=$?
9234   echo "$as_me:9234: \$? = $ac_status" >&5
9235   (exit $ac_status); }; }; then
9236   :
9237 else
9238   echo "$as_me: failed program was:" >&5
9239 cat conftest.$ac_ext >&5
9240 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9241 fi
9242 rm -f conftest.$ac_objext conftest.$ac_ext
9243          fi
9244
9245 echo "${as_me:-configure}:9245: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9246
9247          CFLAGS="$cf_trim_CFLAGS"
9248          CPPFLAGS="$cf_trim_CPPFLAGS"
9249
9250         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9251         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9252
9253 echo "${as_me:-configure}:9253: testing if the second compile does not leave our definition intact error ..." 1>&5
9254
9255          cat >conftest.$ac_ext <<_ACEOF
9256 #line 9256 "configure"
9257 #include "confdefs.h"
9258 #include <sys/types.h>
9259 int
9260 main (void)
9261 {
9262
9263 #ifndef _POSIX_C_SOURCE
9264 make an error
9265 #endif
9266   ;
9267   return 0;
9268 }
9269 _ACEOF
9270 rm -f conftest.$ac_objext
9271 if { (eval echo "$as_me:9271: \"$ac_compile\"") >&5
9272   (eval $ac_compile) 2>&5
9273   ac_status=$?
9274   echo "$as_me:9274: \$? = $ac_status" >&5
9275   (exit $ac_status); } &&
9276          { ac_try='test -s conftest.$ac_objext'
9277   { (eval echo "$as_me:9277: \"$ac_try\"") >&5
9278   (eval $ac_try) 2>&5
9279   ac_status=$?
9280   echo "$as_me:9280: \$? = $ac_status" >&5
9281   (exit $ac_status); }; }; then
9282   :
9283 else
9284   echo "$as_me: failed program was:" >&5
9285 cat conftest.$ac_ext >&5
9286 cf_cv_posix_c_source=no
9287 fi
9288 rm -f conftest.$ac_objext conftest.$ac_ext
9289          CFLAGS="$cf_save_CFLAGS"
9290          CPPFLAGS="$cf_save_CPPFLAGS"
9291
9292 fi
9293 rm -f conftest.$ac_objext conftest.$ac_ext
9294
9295 fi
9296 echo "$as_me:9296: result: $cf_cv_posix_c_source" >&5
9297 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9298
9299 if test "$cf_cv_posix_c_source" != no ; then
9300         CFLAGS="$cf_trim_CFLAGS"
9301         CPPFLAGS="$cf_trim_CPPFLAGS"
9302
9303 cf_fix_cppflags=no
9304 cf_new_cflags=
9305 cf_new_cppflags=
9306 cf_new_extra_cppflags=
9307
9308 for cf_add_cflags in $cf_cv_posix_c_source
9309 do
9310 case $cf_fix_cppflags in
9311 (no)
9312         case $cf_add_cflags in
9313         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9314                 case $cf_add_cflags in
9315                 (-D*)
9316                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9317
9318                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9319                                 && test -z "${cf_tst_cflags}" \
9320                                 && cf_fix_cppflags=yes
9321
9322                         if test $cf_fix_cppflags = yes ; then
9323
9324         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9325         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9326
9327                                 continue
9328                         elif test "${cf_tst_cflags}" = "\"'" ; then
9329
9330         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9331         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9332
9333                                 continue
9334                         fi
9335                         ;;
9336                 esac
9337                 case "$CPPFLAGS" in
9338                 (*$cf_add_cflags)
9339                         ;;
9340                 (*)
9341                         case $cf_add_cflags in
9342                         (-D*)
9343                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9344
9345 CPPFLAGS=`echo "$CPPFLAGS" | \
9346         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9347                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9348
9349                                 ;;
9350                         esac
9351
9352         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9353         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9354
9355                         ;;
9356                 esac
9357                 ;;
9358         (*)
9359
9360         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9361         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9362
9363                 ;;
9364         esac
9365         ;;
9366 (yes)
9367
9368         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9369         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9370
9371         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9372
9373         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9374                 && test -z "${cf_tst_cflags}" \
9375                 && cf_fix_cppflags=no
9376         ;;
9377 esac
9378 done
9379
9380 if test -n "$cf_new_cflags" ; then
9381
9382         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9383         CFLAGS="${CFLAGS}$cf_new_cflags"
9384
9385 fi
9386
9387 if test -n "$cf_new_cppflags" ; then
9388
9389         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9390         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9391
9392 fi
9393
9394 if test -n "$cf_new_extra_cppflags" ; then
9395
9396         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9397         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9398
9399 fi
9400
9401 fi
9402
9403         ;;
9404 (netbsd*)
9405         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9406         ;;
9407 (openbsd[4-9]*)
9408         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9409         cf_xopen_source="-D_BSD_SOURCE"
9410         cf_XOPEN_SOURCE=600
9411         ;;
9412 (openbsd*)
9413         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9414         ;;
9415 (osf[45]*)
9416         cf_xopen_source="-D_OSF_SOURCE"
9417         ;;
9418 (nto-qnx*)
9419         cf_xopen_source="-D_QNX_SOURCE"
9420         ;;
9421 (sco*)
9422         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9423         ;;
9424 (solaris2.*)
9425         cf_xopen_source="-D__EXTENSIONS__"
9426         cf_cv_xopen_source=broken
9427         ;;
9428 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9429         cf_XOPEN_SOURCE=
9430         cf_POSIX_C_SOURCE=
9431         ;;
9432 (*)
9433
9434 echo "$as_me:9434: checking if we should define _XOPEN_SOURCE" >&5
9435 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9436 if test "${cf_cv_xopen_source+set}" = set; then
9437   echo $ECHO_N "(cached) $ECHO_C" >&6
9438 else
9439
9440         cat >conftest.$ac_ext <<_ACEOF
9441 #line 9441 "configure"
9442 #include "confdefs.h"
9443
9444 #include <stdlib.h>
9445 #include <string.h>
9446 #include <sys/types.h>
9447
9448 int
9449 main (void)
9450 {
9451
9452 #ifndef _XOPEN_SOURCE
9453 make an error
9454 #endif
9455   ;
9456   return 0;
9457 }
9458 _ACEOF
9459 rm -f conftest.$ac_objext
9460 if { (eval echo "$as_me:9460: \"$ac_compile\"") >&5
9461   (eval $ac_compile) 2>&5
9462   ac_status=$?
9463   echo "$as_me:9463: \$? = $ac_status" >&5
9464   (exit $ac_status); } &&
9465          { ac_try='test -s conftest.$ac_objext'
9466   { (eval echo "$as_me:9466: \"$ac_try\"") >&5
9467   (eval $ac_try) 2>&5
9468   ac_status=$?
9469   echo "$as_me:9469: \$? = $ac_status" >&5
9470   (exit $ac_status); }; }; then
9471   cf_cv_xopen_source=no
9472 else
9473   echo "$as_me: failed program was:" >&5
9474 cat conftest.$ac_ext >&5
9475 cf_save="$CPPFLAGS"
9476
9477         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9478         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9479
9480          cat >conftest.$ac_ext <<_ACEOF
9481 #line 9481 "configure"
9482 #include "confdefs.h"
9483
9484 #include <stdlib.h>
9485 #include <string.h>
9486 #include <sys/types.h>
9487
9488 int
9489 main (void)
9490 {
9491
9492 #ifdef _XOPEN_SOURCE
9493 make an error
9494 #endif
9495   ;
9496   return 0;
9497 }
9498 _ACEOF
9499 rm -f conftest.$ac_objext
9500 if { (eval echo "$as_me:9500: \"$ac_compile\"") >&5
9501   (eval $ac_compile) 2>&5
9502   ac_status=$?
9503   echo "$as_me:9503: \$? = $ac_status" >&5
9504   (exit $ac_status); } &&
9505          { ac_try='test -s conftest.$ac_objext'
9506   { (eval echo "$as_me:9506: \"$ac_try\"") >&5
9507   (eval $ac_try) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit $ac_status); }; }; then
9511   cf_cv_xopen_source=no
9512 else
9513   echo "$as_me: failed program was:" >&5
9514 cat conftest.$ac_ext >&5
9515 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9516 fi
9517 rm -f conftest.$ac_objext conftest.$ac_ext
9518         CPPFLAGS="$cf_save"
9519
9520 fi
9521 rm -f conftest.$ac_objext conftest.$ac_ext
9522
9523 fi
9524 echo "$as_me:9524: result: $cf_cv_xopen_source" >&5
9525 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9526
9527 if test "$cf_cv_xopen_source" != no ; then
9528
9529 CFLAGS=`echo "$CFLAGS" | \
9530         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9531                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9532
9533 CPPFLAGS=`echo "$CPPFLAGS" | \
9534         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9535                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9536
9537         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9538
9539 cf_fix_cppflags=no
9540 cf_new_cflags=
9541 cf_new_cppflags=
9542 cf_new_extra_cppflags=
9543
9544 for cf_add_cflags in $cf_temp_xopen_source
9545 do
9546 case $cf_fix_cppflags in
9547 (no)
9548         case $cf_add_cflags in
9549         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9550                 case $cf_add_cflags in
9551                 (-D*)
9552                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9553
9554                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9555                                 && test -z "${cf_tst_cflags}" \
9556                                 && cf_fix_cppflags=yes
9557
9558                         if test $cf_fix_cppflags = yes ; then
9559
9560         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9561         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9562
9563                                 continue
9564                         elif test "${cf_tst_cflags}" = "\"'" ; then
9565
9566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9568
9569                                 continue
9570                         fi
9571                         ;;
9572                 esac
9573                 case "$CPPFLAGS" in
9574                 (*$cf_add_cflags)
9575                         ;;
9576                 (*)
9577                         case $cf_add_cflags in
9578                         (-D*)
9579                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9580
9581 CPPFLAGS=`echo "$CPPFLAGS" | \
9582         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9583                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9584
9585                                 ;;
9586                         esac
9587
9588         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9589         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9590
9591                         ;;
9592                 esac
9593                 ;;
9594         (*)
9595
9596         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9597         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9598
9599                 ;;
9600         esac
9601         ;;
9602 (yes)
9603
9604         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9605         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9606
9607         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9608
9609         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9610                 && test -z "${cf_tst_cflags}" \
9611                 && cf_fix_cppflags=no
9612         ;;
9613 esac
9614 done
9615
9616 if test -n "$cf_new_cflags" ; then
9617
9618         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9619         CFLAGS="${CFLAGS}$cf_new_cflags"
9620
9621 fi
9622
9623 if test -n "$cf_new_cppflags" ; then
9624
9625         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9626         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9627
9628 fi
9629
9630 if test -n "$cf_new_extra_cppflags" ; then
9631
9632         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9633         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9634
9635 fi
9636
9637 fi
9638
9639 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9640
9641 cf_save_CFLAGS="$CFLAGS"
9642 cf_save_CPPFLAGS="$CPPFLAGS"
9643
9644 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9645         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9646                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9647
9648 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9649         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9650                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9651
9652 echo "$as_me:9652: checking if we should define _POSIX_C_SOURCE" >&5
9653 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9654 if test "${cf_cv_posix_c_source+set}" = set; then
9655   echo $ECHO_N "(cached) $ECHO_C" >&6
9656 else
9657
9658 echo "${as_me:-configure}:9658: testing if the symbol is already defined go no further ..." 1>&5
9659
9660         cat >conftest.$ac_ext <<_ACEOF
9661 #line 9661 "configure"
9662 #include "confdefs.h"
9663 #include <sys/types.h>
9664 int
9665 main (void)
9666 {
9667
9668 #ifndef _POSIX_C_SOURCE
9669 make an error
9670 #endif
9671   ;
9672   return 0;
9673 }
9674 _ACEOF
9675 rm -f conftest.$ac_objext
9676 if { (eval echo "$as_me:9676: \"$ac_compile\"") >&5
9677   (eval $ac_compile) 2>&5
9678   ac_status=$?
9679   echo "$as_me:9679: \$? = $ac_status" >&5
9680   (exit $ac_status); } &&
9681          { ac_try='test -s conftest.$ac_objext'
9682   { (eval echo "$as_me:9682: \"$ac_try\"") >&5
9683   (eval $ac_try) 2>&5
9684   ac_status=$?
9685   echo "$as_me:9685: \$? = $ac_status" >&5
9686   (exit $ac_status); }; }; then
9687   cf_cv_posix_c_source=no
9688 else
9689   echo "$as_me: failed program was:" >&5
9690 cat conftest.$ac_ext >&5
9691 cf_want_posix_source=no
9692          case .$cf_POSIX_C_SOURCE in
9693          (.[12]??*)
9694                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9695                 ;;
9696          (.2)
9697                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9698                 cf_want_posix_source=yes
9699                 ;;
9700          (.*)
9701                 cf_want_posix_source=yes
9702                 ;;
9703          esac
9704          if test "$cf_want_posix_source" = yes ; then
9705                 cat >conftest.$ac_ext <<_ACEOF
9706 #line 9706 "configure"
9707 #include "confdefs.h"
9708 #include <sys/types.h>
9709 int
9710 main (void)
9711 {
9712
9713 #ifdef _POSIX_SOURCE
9714 make an error
9715 #endif
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 rm -f conftest.$ac_objext
9721 if { (eval echo "$as_me:9721: \"$ac_compile\"") >&5
9722   (eval $ac_compile) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); } &&
9726          { ac_try='test -s conftest.$ac_objext'
9727   { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728   (eval $ac_try) 2>&5
9729   ac_status=$?
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit $ac_status); }; }; then
9732   :
9733 else
9734   echo "$as_me: failed program was:" >&5
9735 cat conftest.$ac_ext >&5
9736 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9737 fi
9738 rm -f conftest.$ac_objext conftest.$ac_ext
9739          fi
9740
9741 echo "${as_me:-configure}:9741: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9742
9743          CFLAGS="$cf_trim_CFLAGS"
9744          CPPFLAGS="$cf_trim_CPPFLAGS"
9745
9746         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9747         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9748
9749 echo "${as_me:-configure}:9749: testing if the second compile does not leave our definition intact error ..." 1>&5
9750
9751          cat >conftest.$ac_ext <<_ACEOF
9752 #line 9752 "configure"
9753 #include "confdefs.h"
9754 #include <sys/types.h>
9755 int
9756 main (void)
9757 {
9758
9759 #ifndef _POSIX_C_SOURCE
9760 make an error
9761 #endif
9762   ;
9763   return 0;
9764 }
9765 _ACEOF
9766 rm -f conftest.$ac_objext
9767 if { (eval echo "$as_me:9767: \"$ac_compile\"") >&5
9768   (eval $ac_compile) 2>&5
9769   ac_status=$?
9770   echo "$as_me:9770: \$? = $ac_status" >&5
9771   (exit $ac_status); } &&
9772          { ac_try='test -s conftest.$ac_objext'
9773   { (eval echo "$as_me:9773: \"$ac_try\"") >&5
9774   (eval $ac_try) 2>&5
9775   ac_status=$?
9776   echo "$as_me:9776: \$? = $ac_status" >&5
9777   (exit $ac_status); }; }; then
9778   :
9779 else
9780   echo "$as_me: failed program was:" >&5
9781 cat conftest.$ac_ext >&5
9782 cf_cv_posix_c_source=no
9783 fi
9784 rm -f conftest.$ac_objext conftest.$ac_ext
9785          CFLAGS="$cf_save_CFLAGS"
9786          CPPFLAGS="$cf_save_CPPFLAGS"
9787
9788 fi
9789 rm -f conftest.$ac_objext conftest.$ac_ext
9790
9791 fi
9792 echo "$as_me:9792: result: $cf_cv_posix_c_source" >&5
9793 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9794
9795 if test "$cf_cv_posix_c_source" != no ; then
9796         CFLAGS="$cf_trim_CFLAGS"
9797         CPPFLAGS="$cf_trim_CPPFLAGS"
9798
9799 cf_fix_cppflags=no
9800 cf_new_cflags=
9801 cf_new_cppflags=
9802 cf_new_extra_cppflags=
9803
9804 for cf_add_cflags in $cf_cv_posix_c_source
9805 do
9806 case $cf_fix_cppflags in
9807 (no)
9808         case $cf_add_cflags in
9809         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9810                 case $cf_add_cflags in
9811                 (-D*)
9812                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9813
9814                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9815                                 && test -z "${cf_tst_cflags}" \
9816                                 && cf_fix_cppflags=yes
9817
9818                         if test $cf_fix_cppflags = yes ; then
9819
9820         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9821         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9822
9823                                 continue
9824                         elif test "${cf_tst_cflags}" = "\"'" ; then
9825
9826         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9827         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9828
9829                                 continue
9830                         fi
9831                         ;;
9832                 esac
9833                 case "$CPPFLAGS" in
9834                 (*$cf_add_cflags)
9835                         ;;
9836                 (*)
9837                         case $cf_add_cflags in
9838                         (-D*)
9839                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9840
9841 CPPFLAGS=`echo "$CPPFLAGS" | \
9842         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9843                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9844
9845                                 ;;
9846                         esac
9847
9848         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9849         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9850
9851                         ;;
9852                 esac
9853                 ;;
9854         (*)
9855
9856         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9857         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9858
9859                 ;;
9860         esac
9861         ;;
9862 (yes)
9863
9864         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9865         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9866
9867         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9868
9869         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9870                 && test -z "${cf_tst_cflags}" \
9871                 && cf_fix_cppflags=no
9872         ;;
9873 esac
9874 done
9875
9876 if test -n "$cf_new_cflags" ; then
9877
9878         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9879         CFLAGS="${CFLAGS}$cf_new_cflags"
9880
9881 fi
9882
9883 if test -n "$cf_new_cppflags" ; then
9884
9885         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9886         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9887
9888 fi
9889
9890 if test -n "$cf_new_extra_cppflags" ; then
9891
9892         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9893         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9894
9895 fi
9896
9897 fi
9898
9899         ;;
9900 esac
9901
9902 if test -n "$cf_xopen_source" ; then
9903
9904 cf_fix_cppflags=no
9905 cf_new_cflags=
9906 cf_new_cppflags=
9907 cf_new_extra_cppflags=
9908
9909 for cf_add_cflags in $cf_xopen_source
9910 do
9911 case $cf_fix_cppflags in
9912 (no)
9913         case $cf_add_cflags in
9914         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9915                 case $cf_add_cflags in
9916                 (-D*)
9917                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9918
9919                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9920                                 && test -z "${cf_tst_cflags}" \
9921                                 && cf_fix_cppflags=yes
9922
9923                         if test $cf_fix_cppflags = yes ; then
9924
9925         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9926         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9927
9928                                 continue
9929                         elif test "${cf_tst_cflags}" = "\"'" ; then
9930
9931         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9932         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9933
9934                                 continue
9935                         fi
9936                         ;;
9937                 esac
9938                 case "$CPPFLAGS" in
9939                 (*$cf_add_cflags)
9940                         ;;
9941                 (*)
9942                         case $cf_add_cflags in
9943                         (-D*)
9944                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9945
9946 CPPFLAGS=`echo "$CPPFLAGS" | \
9947         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9948                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9949
9950                                 ;;
9951                         esac
9952
9953         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9954         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9955
9956                         ;;
9957                 esac
9958                 ;;
9959         (*)
9960
9961         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9962         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9963
9964                 ;;
9965         esac
9966         ;;
9967 (yes)
9968
9969         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9970         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9971
9972         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9973
9974         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9975                 && test -z "${cf_tst_cflags}" \
9976                 && cf_fix_cppflags=no
9977         ;;
9978 esac
9979 done
9980
9981 if test -n "$cf_new_cflags" ; then
9982         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9983
9984 echo "${as_me:-configure}:9984: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9985
9986         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9987         CFLAGS="${CFLAGS}$cf_new_cflags"
9988
9989 fi
9990
9991 if test -n "$cf_new_cppflags" ; then
9992         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9993
9994 echo "${as_me:-configure}:9994: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9995
9996         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9997         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9998
9999 fi
10000
10001 if test -n "$cf_new_extra_cppflags" ; then
10002         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10003
10004 echo "${as_me:-configure}:10004: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10005
10006         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10007         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10008
10009 fi
10010
10011 fi
10012
10013 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10014         echo "$as_me:10014: checking if _XOPEN_SOURCE really is set" >&5
10015 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10016         cat >conftest.$ac_ext <<_ACEOF
10017 #line 10017 "configure"
10018 #include "confdefs.h"
10019 #include <stdlib.h>
10020 int
10021 main (void)
10022 {
10023
10024 #ifndef _XOPEN_SOURCE
10025 make an error
10026 #endif
10027   ;
10028   return 0;
10029 }
10030 _ACEOF
10031 rm -f conftest.$ac_objext
10032 if { (eval echo "$as_me:10032: \"$ac_compile\"") >&5
10033   (eval $ac_compile) 2>&5
10034   ac_status=$?
10035   echo "$as_me:10035: \$? = $ac_status" >&5
10036   (exit $ac_status); } &&
10037          { ac_try='test -s conftest.$ac_objext'
10038   { (eval echo "$as_me:10038: \"$ac_try\"") >&5
10039   (eval $ac_try) 2>&5
10040   ac_status=$?
10041   echo "$as_me:10041: \$? = $ac_status" >&5
10042   (exit $ac_status); }; }; then
10043   cf_XOPEN_SOURCE_set=yes
10044 else
10045   echo "$as_me: failed program was:" >&5
10046 cat conftest.$ac_ext >&5
10047 cf_XOPEN_SOURCE_set=no
10048 fi
10049 rm -f conftest.$ac_objext conftest.$ac_ext
10050         echo "$as_me:10050: result: $cf_XOPEN_SOURCE_set" >&5
10051 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10052         if test $cf_XOPEN_SOURCE_set = yes
10053         then
10054                 cat >conftest.$ac_ext <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10057 #include <stdlib.h>
10058 int
10059 main (void)
10060 {
10061
10062 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10063 make an error
10064 #endif
10065   ;
10066   return 0;
10067 }
10068 _ACEOF
10069 rm -f conftest.$ac_objext
10070 if { (eval echo "$as_me:10070: \"$ac_compile\"") >&5
10071   (eval $ac_compile) 2>&5
10072   ac_status=$?
10073   echo "$as_me:10073: \$? = $ac_status" >&5
10074   (exit $ac_status); } &&
10075          { ac_try='test -s conftest.$ac_objext'
10076   { (eval echo "$as_me:10076: \"$ac_try\"") >&5
10077   (eval $ac_try) 2>&5
10078   ac_status=$?
10079   echo "$as_me:10079: \$? = $ac_status" >&5
10080   (exit $ac_status); }; }; then
10081   cf_XOPEN_SOURCE_set_ok=yes
10082 else
10083   echo "$as_me: failed program was:" >&5
10084 cat conftest.$ac_ext >&5
10085 cf_XOPEN_SOURCE_set_ok=no
10086 fi
10087 rm -f conftest.$ac_objext conftest.$ac_ext
10088                 if test $cf_XOPEN_SOURCE_set_ok = no
10089                 then
10090                         { echo "$as_me:10090: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10091 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10092                 fi
10093         else
10094
10095 echo "$as_me:10095: checking if we should define _XOPEN_SOURCE" >&5
10096 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10097 if test "${cf_cv_xopen_source+set}" = set; then
10098   echo $ECHO_N "(cached) $ECHO_C" >&6
10099 else
10100
10101         cat >conftest.$ac_ext <<_ACEOF
10102 #line 10102 "configure"
10103 #include "confdefs.h"
10104
10105 #include <stdlib.h>
10106 #include <string.h>
10107 #include <sys/types.h>
10108
10109 int
10110 main (void)
10111 {
10112
10113 #ifndef _XOPEN_SOURCE
10114 make an error
10115 #endif
10116   ;
10117   return 0;
10118 }
10119 _ACEOF
10120 rm -f conftest.$ac_objext
10121 if { (eval echo "$as_me:10121: \"$ac_compile\"") >&5
10122   (eval $ac_compile) 2>&5
10123   ac_status=$?
10124   echo "$as_me:10124: \$? = $ac_status" >&5
10125   (exit $ac_status); } &&
10126          { ac_try='test -s conftest.$ac_objext'
10127   { (eval echo "$as_me:10127: \"$ac_try\"") >&5
10128   (eval $ac_try) 2>&5
10129   ac_status=$?
10130   echo "$as_me:10130: \$? = $ac_status" >&5
10131   (exit $ac_status); }; }; then
10132   cf_cv_xopen_source=no
10133 else
10134   echo "$as_me: failed program was:" >&5
10135 cat conftest.$ac_ext >&5
10136 cf_save="$CPPFLAGS"
10137
10138         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10139         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10140
10141          cat >conftest.$ac_ext <<_ACEOF
10142 #line 10142 "configure"
10143 #include "confdefs.h"
10144
10145 #include <stdlib.h>
10146 #include <string.h>
10147 #include <sys/types.h>
10148
10149 int
10150 main (void)
10151 {
10152
10153 #ifdef _XOPEN_SOURCE
10154 make an error
10155 #endif
10156   ;
10157   return 0;
10158 }
10159 _ACEOF
10160 rm -f conftest.$ac_objext
10161 if { (eval echo "$as_me:10161: \"$ac_compile\"") >&5
10162   (eval $ac_compile) 2>&5
10163   ac_status=$?
10164   echo "$as_me:10164: \$? = $ac_status" >&5
10165   (exit $ac_status); } &&
10166          { ac_try='test -s conftest.$ac_objext'
10167   { (eval echo "$as_me:10167: \"$ac_try\"") >&5
10168   (eval $ac_try) 2>&5
10169   ac_status=$?
10170   echo "$as_me:10170: \$? = $ac_status" >&5
10171   (exit $ac_status); }; }; then
10172   cf_cv_xopen_source=no
10173 else
10174   echo "$as_me: failed program was:" >&5
10175 cat conftest.$ac_ext >&5
10176 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10177 fi
10178 rm -f conftest.$ac_objext conftest.$ac_ext
10179         CPPFLAGS="$cf_save"
10180
10181 fi
10182 rm -f conftest.$ac_objext conftest.$ac_ext
10183
10184 fi
10185 echo "$as_me:10185: result: $cf_cv_xopen_source" >&5
10186 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10187
10188 if test "$cf_cv_xopen_source" != no ; then
10189
10190 CFLAGS=`echo "$CFLAGS" | \
10191         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10192                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10193
10194 CPPFLAGS=`echo "$CPPFLAGS" | \
10195         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10196                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10197
10198         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10199
10200 cf_fix_cppflags=no
10201 cf_new_cflags=
10202 cf_new_cppflags=
10203 cf_new_extra_cppflags=
10204
10205 for cf_add_cflags in $cf_temp_xopen_source
10206 do
10207 case $cf_fix_cppflags in
10208 (no)
10209         case $cf_add_cflags in
10210         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10211                 case $cf_add_cflags in
10212                 (-D*)
10213                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10214
10215                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10216                                 && test -z "${cf_tst_cflags}" \
10217                                 && cf_fix_cppflags=yes
10218
10219                         if test $cf_fix_cppflags = yes ; then
10220
10221         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10222         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10223
10224                                 continue
10225                         elif test "${cf_tst_cflags}" = "\"'" ; then
10226
10227         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10228         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10229
10230                                 continue
10231                         fi
10232                         ;;
10233                 esac
10234                 case "$CPPFLAGS" in
10235                 (*$cf_add_cflags)
10236                         ;;
10237                 (*)
10238                         case $cf_add_cflags in
10239                         (-D*)
10240                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10241
10242 CPPFLAGS=`echo "$CPPFLAGS" | \
10243         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10244                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10245
10246                                 ;;
10247                         esac
10248
10249         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10250         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10251
10252                         ;;
10253                 esac
10254                 ;;
10255         (*)
10256
10257         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10258         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10259
10260                 ;;
10261         esac
10262         ;;
10263 (yes)
10264
10265         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10266         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10267
10268         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10269
10270         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10271                 && test -z "${cf_tst_cflags}" \
10272                 && cf_fix_cppflags=no
10273         ;;
10274 esac
10275 done
10276
10277 if test -n "$cf_new_cflags" ; then
10278
10279         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10280         CFLAGS="${CFLAGS}$cf_new_cflags"
10281
10282 fi
10283
10284 if test -n "$cf_new_cppflags" ; then
10285
10286         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10287         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10288
10289 fi
10290
10291 if test -n "$cf_new_extra_cppflags" ; then
10292
10293         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10294         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10295
10296 fi
10297
10298 fi
10299
10300         fi
10301 fi
10302
10303 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10304
10305 # Work around breakage on OS X
10306
10307 echo "$as_me:10307: checking if SIGWINCH is defined" >&5
10308 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10309 if test "${cf_cv_define_sigwinch+set}" = set; then
10310   echo $ECHO_N "(cached) $ECHO_C" >&6
10311 else
10312
10313         cat >conftest.$ac_ext <<_ACEOF
10314 #line 10314 "configure"
10315 #include "confdefs.h"
10316
10317 #include <sys/types.h>
10318 #include <sys/signal.h>
10319
10320 int
10321 main (void)
10322 {
10323 int x = SIGWINCH
10324   ;
10325   return 0;
10326 }
10327 _ACEOF
10328 rm -f conftest.$ac_objext
10329 if { (eval echo "$as_me:10329: \"$ac_compile\"") >&5
10330   (eval $ac_compile) 2>&5
10331   ac_status=$?
10332   echo "$as_me:10332: \$? = $ac_status" >&5
10333   (exit $ac_status); } &&
10334          { ac_try='test -s conftest.$ac_objext'
10335   { (eval echo "$as_me:10335: \"$ac_try\"") >&5
10336   (eval $ac_try) 2>&5
10337   ac_status=$?
10338   echo "$as_me:10338: \$? = $ac_status" >&5
10339   (exit $ac_status); }; }; then
10340   cf_cv_define_sigwinch=yes
10341 else
10342   echo "$as_me: failed program was:" >&5
10343 cat conftest.$ac_ext >&5
10344 cat >conftest.$ac_ext <<_ACEOF
10345 #line 10345 "configure"
10346 #include "confdefs.h"
10347
10348 #undef _XOPEN_SOURCE
10349 #undef _POSIX_SOURCE
10350 #undef _POSIX_C_SOURCE
10351 #include <sys/types.h>
10352 #include <sys/signal.h>
10353
10354 int
10355 main (void)
10356 {
10357 int x = SIGWINCH
10358   ;
10359   return 0;
10360 }
10361 _ACEOF
10362 rm -f conftest.$ac_objext
10363 if { (eval echo "$as_me:10363: \"$ac_compile\"") >&5
10364   (eval $ac_compile) 2>&5
10365   ac_status=$?
10366   echo "$as_me:10366: \$? = $ac_status" >&5
10367   (exit $ac_status); } &&
10368          { ac_try='test -s conftest.$ac_objext'
10369   { (eval echo "$as_me:10369: \"$ac_try\"") >&5
10370   (eval $ac_try) 2>&5
10371   ac_status=$?
10372   echo "$as_me:10372: \$? = $ac_status" >&5
10373   (exit $ac_status); }; }; then
10374   cf_cv_define_sigwinch=maybe
10375 else
10376   echo "$as_me: failed program was:" >&5
10377 cat conftest.$ac_ext >&5
10378 cf_cv_define_sigwinch=no
10379 fi
10380 rm -f conftest.$ac_objext conftest.$ac_ext
10381
10382 fi
10383 rm -f conftest.$ac_objext conftest.$ac_ext
10384
10385 fi
10386 echo "$as_me:10386: result: $cf_cv_define_sigwinch" >&5
10387 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10388
10389 if test "$cf_cv_define_sigwinch" = maybe ; then
10390 echo "$as_me:10390: checking for actual SIGWINCH definition" >&5
10391 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10392 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10393   echo $ECHO_N "(cached) $ECHO_C" >&6
10394 else
10395
10396 cf_cv_fixup_sigwinch=unknown
10397 cf_sigwinch=32
10398 while test $cf_sigwinch != 1
10399 do
10400         cat >conftest.$ac_ext <<_ACEOF
10401 #line 10401 "configure"
10402 #include "confdefs.h"
10403
10404 #undef _XOPEN_SOURCE
10405 #undef _POSIX_SOURCE
10406 #undef _POSIX_C_SOURCE
10407 #include <sys/types.h>
10408 #include <sys/signal.h>
10409
10410 int
10411 main (void)
10412 {
10413
10414 #if SIGWINCH != $cf_sigwinch
10415 make an error
10416 #endif
10417 int x = SIGWINCH
10418   ;
10419   return 0;
10420 }
10421 _ACEOF
10422 rm -f conftest.$ac_objext
10423 if { (eval echo "$as_me:10423: \"$ac_compile\"") >&5
10424   (eval $ac_compile) 2>&5
10425   ac_status=$?
10426   echo "$as_me:10426: \$? = $ac_status" >&5
10427   (exit $ac_status); } &&
10428          { ac_try='test -s conftest.$ac_objext'
10429   { (eval echo "$as_me:10429: \"$ac_try\"") >&5
10430   (eval $ac_try) 2>&5
10431   ac_status=$?
10432   echo "$as_me:10432: \$? = $ac_status" >&5
10433   (exit $ac_status); }; }; then
10434   cf_cv_fixup_sigwinch=$cf_sigwinch
10435          break
10436 else
10437   echo "$as_me: failed program was:" >&5
10438 cat conftest.$ac_ext >&5
10439 fi
10440 rm -f conftest.$ac_objext conftest.$ac_ext
10441
10442 cf_sigwinch=`expr $cf_sigwinch - 1`
10443 done
10444
10445 fi
10446 echo "$as_me:10446: result: $cf_cv_fixup_sigwinch" >&5
10447 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10448
10449         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10450                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10451         fi
10452 fi
10453
10454 # Checks for CODESET support.
10455
10456 echo "$as_me:10456: checking for nl_langinfo and CODESET" >&5
10457 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10458 if test "${am_cv_langinfo_codeset+set}" = set; then
10459   echo $ECHO_N "(cached) $ECHO_C" >&6
10460 else
10461   cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464 #include <langinfo.h>
10465 int
10466 main (void)
10467 {
10468 char* cs = nl_langinfo(CODESET);
10469   ;
10470   return 0;
10471 }
10472 _ACEOF
10473 rm -f conftest.$ac_objext conftest$ac_exeext
10474 if { (eval echo "$as_me:10474: \"$ac_link\"") >&5
10475   (eval $ac_link) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); } &&
10479          { ac_try='test -s conftest$ac_exeext'
10480   { (eval echo "$as_me:10480: \"$ac_try\"") >&5
10481   (eval $ac_try) 2>&5
10482   ac_status=$?
10483   echo "$as_me:10483: \$? = $ac_status" >&5
10484   (exit $ac_status); }; }; then
10485   am_cv_langinfo_codeset=yes
10486 else
10487   echo "$as_me: failed program was:" >&5
10488 cat conftest.$ac_ext >&5
10489 am_cv_langinfo_codeset=no
10490 fi
10491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10492
10493 fi
10494 echo "$as_me:10494: result: $am_cv_langinfo_codeset" >&5
10495 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10496         if test $am_cv_langinfo_codeset = yes; then
10497
10498 cat >>confdefs.h <<\EOF
10499 #define HAVE_LANGINFO_CODESET 1
10500 EOF
10501
10502         fi
10503
10504 # use these variables to work around a defect in gcc's fixincludes.
10505 NCURSES_OK_WCHAR_T=
10506 NCURSES_OK_WINT_T=
10507
10508 echo "$as_me:10508: checking if you want wide-character code" >&5
10509 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10510
10511 # Check whether --enable-widec or --disable-widec was given.
10512 if test "${enable_widec+set}" = set; then
10513   enableval="$enable_widec"
10514   with_widec=$enableval
10515 else
10516   with_widec=no
10517 fi;
10518 echo "$as_me:10518: result: $with_widec" >&5
10519 echo "${ECHO_T}$with_widec" >&6
10520
10521 NCURSES_WCWIDTH_GRAPHICS=1
10522
10523 if test "x$with_widec" = xyes ; then
10524         if test "x$disable_lib_suffixes" = xno ; then
10525                 LIB_SUFFIX="w${LIB_SUFFIX}"
10526         fi
10527
10528 cat >>confdefs.h <<\EOF
10529 #define USE_WIDEC_SUPPORT 1
10530 EOF
10531
10532 cat >>confdefs.h <<\EOF
10533 #define NCURSES_WIDECHAR 1
10534 EOF
10535
10536 for ac_header in \
10537 wchar.h \
10538 wctype.h \
10539
10540 do
10541 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10542 echo "$as_me:10542: checking for $ac_header" >&5
10543 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10544 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10545   echo $ECHO_N "(cached) $ECHO_C" >&6
10546 else
10547   cat >conftest.$ac_ext <<_ACEOF
10548 #line 10548 "configure"
10549 #include "confdefs.h"
10550 #include <$ac_header>
10551 _ACEOF
10552 if { (eval echo "$as_me:10552: \"$ac_cpp conftest.$ac_ext\"") >&5
10553   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10554   ac_status=$?
10555   egrep -v '^ *\+' conftest.er1 >conftest.err
10556   rm -f conftest.er1
10557   cat conftest.err >&5
10558   echo "$as_me:10558: \$? = $ac_status" >&5
10559   (exit $ac_status); } >/dev/null; then
10560   if test -s conftest.err; then
10561     ac_cpp_err=$ac_c_preproc_warn_flag
10562   else
10563     ac_cpp_err=
10564   fi
10565 else
10566   ac_cpp_err=yes
10567 fi
10568 if test -z "$ac_cpp_err"; then
10569   eval "$as_ac_Header=yes"
10570 else
10571   echo "$as_me: failed program was:" >&5
10572   cat conftest.$ac_ext >&5
10573   eval "$as_ac_Header=no"
10574 fi
10575 rm -f conftest.err conftest.$ac_ext
10576 fi
10577 echo "$as_me:10577: result: `eval echo '${'$as_ac_Header'}'`" >&5
10578 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10579 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10580   cat >>confdefs.h <<EOF
10581 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10582 EOF
10583
10584 fi
10585 done
10586
10587 echo "$as_me:10587: checking if wchar.h can be used as is" >&5
10588 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10589 if test "${cf_cv_wchar_h_okay+set}" = set; then
10590   echo $ECHO_N "(cached) $ECHO_C" >&6
10591 else
10592
10593 cat >conftest.$ac_ext <<_ACEOF
10594 #line 10594 "configure"
10595 #include "confdefs.h"
10596
10597 #include <stdlib.h>
10598 #ifdef HAVE_WCHAR_H
10599 #include <wchar.h>
10600 #endif
10601 #ifdef HAVE_WCTYPE_H
10602 #include <wctype.h>
10603 #endif
10604
10605 int
10606 main (void)
10607 {
10608
10609         wint_t foo = 0;
10610         int bar = iswpunct(foo)
10611   ;
10612   return 0;
10613 }
10614 _ACEOF
10615 rm -f conftest.$ac_objext
10616 if { (eval echo "$as_me:10616: \"$ac_compile\"") >&5
10617   (eval $ac_compile) 2>&5
10618   ac_status=$?
10619   echo "$as_me:10619: \$? = $ac_status" >&5
10620   (exit $ac_status); } &&
10621          { ac_try='test -s conftest.$ac_objext'
10622   { (eval echo "$as_me:10622: \"$ac_try\"") >&5
10623   (eval $ac_try) 2>&5
10624   ac_status=$?
10625   echo "$as_me:10625: \$? = $ac_status" >&5
10626   (exit $ac_status); }; }; then
10627   cf_cv_wchar_h_okay=yes
10628 else
10629   echo "$as_me: failed program was:" >&5
10630 cat conftest.$ac_ext >&5
10631 cf_cv_wchar_h_okay=no
10632 fi
10633 rm -f conftest.$ac_objext conftest.$ac_ext
10634 fi
10635 echo "$as_me:10635: result: $cf_cv_wchar_h_okay" >&5
10636 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10637
10638 if test $cf_cv_wchar_h_okay = no
10639 then
10640
10641 echo "$as_me:10641: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10642 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10643 cat >conftest.$ac_ext <<_ACEOF
10644 #line 10644 "configure"
10645 #include "confdefs.h"
10646 #include <sys/types.h>
10647
10648 int
10649 main (void)
10650 {
10651
10652 #ifndef _XOPEN_SOURCE_EXTENDED
10653 make an error
10654 #endif
10655   ;
10656   return 0;
10657 }
10658 _ACEOF
10659 rm -f conftest.$ac_objext
10660 if { (eval echo "$as_me:10660: \"$ac_compile\"") >&5
10661   (eval $ac_compile) 2>&5
10662   ac_status=$?
10663   echo "$as_me:10663: \$? = $ac_status" >&5
10664   (exit $ac_status); } &&
10665          { ac_try='test -s conftest.$ac_objext'
10666   { (eval echo "$as_me:10666: \"$ac_try\"") >&5
10667   (eval $ac_try) 2>&5
10668   ac_status=$?
10669   echo "$as_me:10669: \$? = $ac_status" >&5
10670   (exit $ac_status); }; }; then
10671   cf_result=no
10672 else
10673   echo "$as_me: failed program was:" >&5
10674 cat conftest.$ac_ext >&5
10675 cf_result=yes
10676 fi
10677 rm -f conftest.$ac_objext conftest.$ac_ext
10678 echo "$as_me:10678: result: $cf_result" >&5
10679 echo "${ECHO_T}$cf_result" >&6
10680
10681 if test "$cf_result" = yes ; then
10682         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10683 elif test "x" != "x" ; then
10684         echo "$as_me:10684: checking checking for compatible value versus " >&5
10685 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10686         cat >conftest.$ac_ext <<_ACEOF
10687 #line 10687 "configure"
10688 #include "confdefs.h"
10689 #include <sys/types.h>
10690
10691 int
10692 main (void)
10693 {
10694
10695 #if _XOPEN_SOURCE_EXTENDED- < 0
10696 make an error
10697 #endif
10698   ;
10699   return 0;
10700 }
10701 _ACEOF
10702 rm -f conftest.$ac_objext
10703 if { (eval echo "$as_me:10703: \"$ac_compile\"") >&5
10704   (eval $ac_compile) 2>&5
10705   ac_status=$?
10706   echo "$as_me:10706: \$? = $ac_status" >&5
10707   (exit $ac_status); } &&
10708          { ac_try='test -s conftest.$ac_objext'
10709   { (eval echo "$as_me:10709: \"$ac_try\"") >&5
10710   (eval $ac_try) 2>&5
10711   ac_status=$?
10712   echo "$as_me:10712: \$? = $ac_status" >&5
10713   (exit $ac_status); }; }; then
10714   cf_result=yes
10715 else
10716   echo "$as_me: failed program was:" >&5
10717 cat conftest.$ac_ext >&5
10718 cf_result=no
10719 fi
10720 rm -f conftest.$ac_objext conftest.$ac_ext
10721         echo "$as_me:10721: result: $cf_result" >&5
10722 echo "${ECHO_T}$cf_result" >&6
10723         if test "$cf_result" = no ; then
10724                 # perhaps we can override it - try...
10725                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10726         fi
10727 fi
10728
10729 fi
10730
10731 echo "$as_me:10731: checking if wcwidth agrees graphics are single-width" >&5
10732 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10733 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10734   echo $ECHO_N "(cached) $ECHO_C" >&6
10735 else
10736
10737 cat >conftest.in <<CF_EOF
10738 -       VT100 symbols
10739 0x250c  upper left corner
10740 0x2514  lower left corner
10741 0x2510  upper right corner
10742 0x2518  lower right corner
10743 0x251c  tee pointing left
10744 0x2524  tee pointing right
10745 0x2534  tee pointing up
10746 0x252c  tee pointing down
10747 0x2500  horizontal line
10748 0x2502  vertical line
10749 0x253c  large plus or crossover
10750 0x23ba  scan line 1
10751 0x23bd  scan line 9
10752 0x25c6  diamond
10753 0x2592  checker board (stipple)
10754 0x00b0  degree symbol
10755 0x00b1  plus/minus
10756 0x00b7  bullet
10757 -       Teletype 5410v1 symbols
10758 0x2190  arrow pointing left
10759 0x2192  arrow pointing right
10760 0x2193  arrow pointing down
10761 0x2191  arrow pointing up
10762 0x2592  board of squares
10763 0x2603  lantern symbol
10764 0x25ae  solid square block
10765 -       these defaults were invented for ncurses
10766 0x23bb  scan line 3
10767 0x23bc  scan line 7
10768 0x2264  less-than-or-equal-to
10769 0x2265  greater-than-or-equal-to
10770 0x03c0  greek pi
10771 0x2260  not-equal
10772 0x00a3  pound-sterling symbol
10773 -       thick-line-drawing
10774 0x250f  upper left corner
10775 0x2517  lower left corner
10776 0x2513  upper right corner
10777 0x251b  lower right corner
10778 0x2523  tee pointing left
10779 0x252b  tee pointing right
10780 0x253b  tee pointing up
10781 0x2533  tee pointing down
10782 0x2501  horizontal line
10783 0x2503  vertical line
10784 0x254b  large plus or crossover
10785 -       double-line-drawing
10786 0x2554  upper left corner
10787 0x255a  lower left corner
10788 0x2557  upper right corner
10789 0x255d  lower right corner
10790 0x2563  tee pointing left
10791 0x2560  tee pointing right
10792 0x2569  tee pointing up
10793 0x2566  tee pointing down
10794 0x2550  horizontal line
10795 0x2551  vertical line
10796 0x256c  large plus or crossover
10797 CF_EOF
10798 if test "$cross_compiling" = yes; then
10799   cf_cv_wcwidth_graphics=unknown
10800 else
10801   cat >conftest.$ac_ext <<_ACEOF
10802 #line 10802 "configure"
10803 #include "confdefs.h"
10804
10805 #include <locale.h>
10806 #include <stdio.h>
10807 #include <wchar.h>
10808
10809 #define MY_LEN 80
10810
10811 int
10812 main(void)
10813 {
10814         FILE *fp;
10815         int value;
10816         char buffer[MY_LEN + 1];
10817         char notes[MY_LEN + 1];
10818         int totals = 0;
10819         int passed = 0;
10820
10821         if (setlocale(LC_ALL, "en_US.UTF8") ||
10822                 setlocale(LC_ALL, "en_US.UTF-8") ||
10823                 setlocale(LC_ALL, "en_US.utf8") ||
10824                 setlocale(LC_ALL, "en_US.utf-8")) {
10825                 if ((fp = fopen("conftest.in", "r")) != 0) {
10826                         while (fgets(buffer, MY_LEN, fp) != 0) {
10827                                 if (*buffer == '-') {
10828                                         fprintf(stderr, "\t%s", buffer);
10829                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
10830                                         ++totals;
10831                                         if (wcwidth(value) == 1)
10832                                                 ++passed;
10833                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
10834                                 } else {
10835                                         fprintf(stderr, "?\t%s", buffer);
10836                                 }
10837                         }
10838                 }
10839         }
10840         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
10841         return (totals == passed) ? 0 : 1;
10842 }
10843
10844 _ACEOF
10845 rm -f conftest$ac_exeext
10846 if { (eval echo "$as_me:10846: \"$ac_link\"") >&5
10847   (eval $ac_link) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10851   { (eval echo "$as_me:10851: \"$ac_try\"") >&5
10852   (eval $ac_try) 2>&5
10853   ac_status=$?
10854   echo "$as_me:10854: \$? = $ac_status" >&5
10855   (exit $ac_status); }; }; then
10856   cf_cv_wcwidth_graphics=yes
10857 else
10858   echo "$as_me: program exited with status $ac_status" >&5
10859 echo "$as_me: failed program was:" >&5
10860 cat conftest.$ac_ext >&5
10861 cf_cv_wcwidth_graphics=no
10862 fi
10863 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10864 fi
10865
10866 fi
10867 echo "$as_me:10867: result: $cf_cv_wcwidth_graphics" >&5
10868 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
10869
10870         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
10871
10872         # with_overwrite=no
10873         NCURSES_CH_T=cchar_t
10874
10875 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
10876 do
10877 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10878 echo "$as_me:10878: checking for $ac_func" >&5
10879 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10880 if eval "test \"\${$as_ac_var+set}\" = set"; then
10881   echo $ECHO_N "(cached) $ECHO_C" >&6
10882 else
10883   cat >conftest.$ac_ext <<_ACEOF
10884 #line 10884 "configure"
10885 #include "confdefs.h"
10886 /* System header to define __stub macros and hopefully few prototypes,
10887     which can conflict with char $ac_func (); below.  */
10888 #include <assert.h>
10889 /* Override any gcc2 internal prototype to avoid an error.  */
10890 #ifdef __cplusplus
10891 extern "C"
10892 #endif
10893 /* We use char because int might match the return type of a gcc2
10894    builtin and then its argument prototype would still apply.  */
10895 char $ac_func ();
10896 char (*f) ();
10897
10898 int
10899 main (void)
10900 {
10901 /* The GNU C library defines this for functions which it implements
10902     to always fail with ENOSYS.  Some functions are actually named
10903     something starting with __ and the normal name is an alias.  */
10904 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10905 choke me
10906 #else
10907 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10908 #endif
10909
10910   ;
10911   return 0;
10912 }
10913 _ACEOF
10914 rm -f conftest.$ac_objext conftest$ac_exeext
10915 if { (eval echo "$as_me:10915: \"$ac_link\"") >&5
10916   (eval $ac_link) 2>&5
10917   ac_status=$?
10918   echo "$as_me:10918: \$? = $ac_status" >&5
10919   (exit $ac_status); } &&
10920          { ac_try='test -s conftest$ac_exeext'
10921   { (eval echo "$as_me:10921: \"$ac_try\"") >&5
10922   (eval $ac_try) 2>&5
10923   ac_status=$?
10924   echo "$as_me:10924: \$? = $ac_status" >&5
10925   (exit $ac_status); }; }; then
10926   eval "$as_ac_var=yes"
10927 else
10928   echo "$as_me: failed program was:" >&5
10929 cat conftest.$ac_ext >&5
10930 eval "$as_ac_var=no"
10931 fi
10932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10933 fi
10934 echo "$as_me:10934: result: `eval echo '${'$as_ac_var'}'`" >&5
10935 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10936 if test `eval echo '${'$as_ac_var'}'` = yes; then
10937   cat >>confdefs.h <<EOF
10938 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10939 EOF
10940
10941 fi
10942 done
10943
10944         if test "x$ac_cv_func_putwc" != xyes ; then
10945
10946 echo "$as_me:10946: checking for multibyte character support" >&5
10947 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10948 if test "${cf_cv_utf8_lib+set}" = set; then
10949   echo $ECHO_N "(cached) $ECHO_C" >&6
10950 else
10951
10952         cf_save_LIBS="$LIBS"
10953         cat >conftest.$ac_ext <<_ACEOF
10954 #line 10954 "configure"
10955 #include "confdefs.h"
10956
10957 #include <stdlib.h>
10958 int
10959 main (void)
10960 {
10961 putwc(0,0);
10962   ;
10963   return 0;
10964 }
10965 _ACEOF
10966 rm -f conftest.$ac_objext conftest$ac_exeext
10967 if { (eval echo "$as_me:10967: \"$ac_link\"") >&5
10968   (eval $ac_link) 2>&5
10969   ac_status=$?
10970   echo "$as_me:10970: \$? = $ac_status" >&5
10971   (exit $ac_status); } &&
10972          { ac_try='test -s conftest$ac_exeext'
10973   { (eval echo "$as_me:10973: \"$ac_try\"") >&5
10974   (eval $ac_try) 2>&5
10975   ac_status=$?
10976   echo "$as_me:10976: \$? = $ac_status" >&5
10977   (exit $ac_status); }; }; then
10978   cf_cv_utf8_lib=yes
10979 else
10980   echo "$as_me: failed program was:" >&5
10981 cat conftest.$ac_ext >&5
10982
10983 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10984 # will be set on completion of the AC_TRY_LINK below.
10985 cf_cv_header_path_utf8=
10986 cf_cv_library_path_utf8=
10987
10988 echo "${as_me:-configure}:10988: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10989
10990 cf_save_LIBS="$LIBS"
10991
10992 cat >conftest.$ac_ext <<_ACEOF
10993 #line 10993 "configure"
10994 #include "confdefs.h"
10995
10996 #include <libutf8.h>
10997 int
10998 main (void)
10999 {
11000 putwc(0,0);
11001   ;
11002   return 0;
11003 }
11004 _ACEOF
11005 rm -f conftest.$ac_objext conftest$ac_exeext
11006 if { (eval echo "$as_me:11006: \"$ac_link\"") >&5
11007   (eval $ac_link) 2>&5
11008   ac_status=$?
11009   echo "$as_me:11009: \$? = $ac_status" >&5
11010   (exit $ac_status); } &&
11011          { ac_try='test -s conftest$ac_exeext'
11012   { (eval echo "$as_me:11012: \"$ac_try\"") >&5
11013   (eval $ac_try) 2>&5
11014   ac_status=$?
11015   echo "$as_me:11015: \$? = $ac_status" >&5
11016   (exit $ac_status); }; }; then
11017
11018         cf_cv_find_linkage_utf8=yes
11019         cf_cv_header_path_utf8=/usr/include
11020         cf_cv_library_path_utf8=/usr/lib
11021
11022 else
11023   echo "$as_me: failed program was:" >&5
11024 cat conftest.$ac_ext >&5
11025
11026 LIBS="-lutf8  $cf_save_LIBS"
11027
11028 cat >conftest.$ac_ext <<_ACEOF
11029 #line 11029 "configure"
11030 #include "confdefs.h"
11031
11032 #include <libutf8.h>
11033 int
11034 main (void)
11035 {
11036 putwc(0,0);
11037   ;
11038   return 0;
11039 }
11040 _ACEOF
11041 rm -f conftest.$ac_objext conftest$ac_exeext
11042 if { (eval echo "$as_me:11042: \"$ac_link\"") >&5
11043   (eval $ac_link) 2>&5
11044   ac_status=$?
11045   echo "$as_me:11045: \$? = $ac_status" >&5
11046   (exit $ac_status); } &&
11047          { ac_try='test -s conftest$ac_exeext'
11048   { (eval echo "$as_me:11048: \"$ac_try\"") >&5
11049   (eval $ac_try) 2>&5
11050   ac_status=$?
11051   echo "$as_me:11051: \$? = $ac_status" >&5
11052   (exit $ac_status); }; }; then
11053
11054         cf_cv_find_linkage_utf8=yes
11055         cf_cv_header_path_utf8=/usr/include
11056         cf_cv_library_path_utf8=/usr/lib
11057         cf_cv_library_file_utf8="-lutf8"
11058
11059 else
11060   echo "$as_me: failed program was:" >&5
11061 cat conftest.$ac_ext >&5
11062
11063         cf_cv_find_linkage_utf8=no
11064         LIBS="$cf_save_LIBS"
11065
11066         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11067
11068 echo "${as_me:-configure}:11068: testing find linkage for utf8 library ..." 1>&5
11069
11070 echo "${as_me:-configure}:11070: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11071
11072         cf_save_CPPFLAGS="$CPPFLAGS"
11073         cf_test_CPPFLAGS="$CPPFLAGS"
11074
11075 cf_search=
11076
11077 # collect the current set of include-directories from compiler flags
11078 cf_header_path_list=""
11079 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11080         for cf_header_path in $CPPFLAGS $CFLAGS
11081         do
11082                 case $cf_header_path in
11083                 (-I*)
11084                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11085
11086 test "x$cf_header_path" != "xNONE" && \
11087 test -d "$cf_header_path" && \
11088  {
11089         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11090         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11091         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11092         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11093         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11094         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11095 }
11096
11097                         cf_header_path_list="$cf_header_path_list $cf_search"
11098                         ;;
11099                 esac
11100         done
11101 fi
11102
11103 # add the variations for the package we are looking for
11104
11105 cf_search=
11106
11107 test "x$prefix" != "xNONE" && \
11108 test -d "$prefix" && \
11109  {
11110         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11111         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11112         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11113         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11114         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11115         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11116 }
11117
11118 for cf_subdir_prefix in \
11119         /usr \
11120         /usr/local \
11121         /usr/pkg \
11122         /opt \
11123         /opt/local \
11124         $HOME
11125 do
11126
11127 test "x$cf_subdir_prefix" != "x$prefix" && \
11128 test -d "$cf_subdir_prefix" && \
11129 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11130         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11131         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11132         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11133         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11134         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11135         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11136 }
11137
11138 done
11139
11140 test "$includedir" != NONE && \
11141 test "$includedir" != "/usr/include" && \
11142 test -d "$includedir" && {
11143         test -d $includedir &&    cf_search="$cf_search $includedir"
11144         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11145 }
11146
11147 test "$oldincludedir" != NONE && \
11148 test "$oldincludedir" != "/usr/include" && \
11149 test -d "$oldincludedir" && {
11150         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11151         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11152 }
11153
11154 cf_search="$cf_search $cf_header_path_list"
11155
11156         for cf_cv_header_path_utf8 in $cf_search
11157         do
11158                 if test -d $cf_cv_header_path_utf8 ; then
11159                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11160
11161 echo "${as_me:-configure}:11161: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11162
11163                         CPPFLAGS="$cf_save_CPPFLAGS"
11164
11165         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11166         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11167
11168                         cat >conftest.$ac_ext <<_ACEOF
11169 #line 11169 "configure"
11170 #include "confdefs.h"
11171
11172 #include <libutf8.h>
11173 int
11174 main (void)
11175 {
11176 putwc(0,0);
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f conftest.$ac_objext
11182 if { (eval echo "$as_me:11182: \"$ac_compile\"") >&5
11183   (eval $ac_compile) 2>&5
11184   ac_status=$?
11185   echo "$as_me:11185: \$? = $ac_status" >&5
11186   (exit $ac_status); } &&
11187          { ac_try='test -s conftest.$ac_objext'
11188   { (eval echo "$as_me:11188: \"$ac_try\"") >&5
11189   (eval $ac_try) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit $ac_status); }; }; then
11193
11194                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11195
11196 echo "${as_me:-configure}:11196: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11197
11198                                 cf_cv_find_linkage_utf8=maybe
11199                                 cf_test_CPPFLAGS="$CPPFLAGS"
11200                                 break
11201 else
11202   echo "$as_me: failed program was:" >&5
11203 cat conftest.$ac_ext >&5
11204
11205                                 CPPFLAGS="$cf_save_CPPFLAGS"
11206
11207 fi
11208 rm -f conftest.$ac_objext conftest.$ac_ext
11209                 fi
11210         done
11211
11212         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11213
11214 echo "${as_me:-configure}:11214: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11215
11216                 cf_save_LIBS="$LIBS"
11217                 cf_save_LDFLAGS="$LDFLAGS"
11218
11219                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11220
11221 cf_search=
11222 cf_library_path_list=""
11223 if test -n "${LDFLAGS}${LIBS}" ; then
11224         for cf_library_path in $LDFLAGS $LIBS
11225         do
11226                 case $cf_library_path in
11227                 (-L*)
11228                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11229
11230 test "x$cf_library_path" != "xNONE" && \
11231 test -d "$cf_library_path" && \
11232  {
11233         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11234         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11235         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11236         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11237         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11238         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11239 }
11240
11241                         cf_library_path_list="$cf_library_path_list $cf_search"
11242                         ;;
11243                 esac
11244         done
11245 fi
11246
11247 cf_search=
11248
11249 test "x$prefix" != "xNONE" && \
11250 test -d "$prefix" && \
11251  {
11252         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11253         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11254         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11255         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11256         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11257         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11258 }
11259
11260 for cf_subdir_prefix in \
11261         /usr \
11262         /usr/local \
11263         /usr/pkg \
11264         /opt \
11265         /opt/local \
11266         $HOME
11267 do
11268
11269 test "x$cf_subdir_prefix" != "x$prefix" && \
11270 test -d "$cf_subdir_prefix" && \
11271 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11272         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11273         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11274         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11275         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11276         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11277         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11278 }
11279
11280 done
11281
11282 cf_search="$cf_library_path_list $cf_search"
11283
11284                         for cf_cv_library_path_utf8 in $cf_search
11285                         do
11286                                 if test -d $cf_cv_library_path_utf8 ; then
11287                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11288
11289 echo "${as_me:-configure}:11289: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11290
11291                                         CPPFLAGS="$cf_test_CPPFLAGS"
11292                                         LIBS="-lutf8  $cf_save_LIBS"
11293                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11294                                         cat >conftest.$ac_ext <<_ACEOF
11295 #line 11295 "configure"
11296 #include "confdefs.h"
11297
11298 #include <libutf8.h>
11299 int
11300 main (void)
11301 {
11302 putwc(0,0);
11303   ;
11304   return 0;
11305 }
11306 _ACEOF
11307 rm -f conftest.$ac_objext conftest$ac_exeext
11308 if { (eval echo "$as_me:11308: \"$ac_link\"") >&5
11309   (eval $ac_link) 2>&5
11310   ac_status=$?
11311   echo "$as_me:11311: \$? = $ac_status" >&5
11312   (exit $ac_status); } &&
11313          { ac_try='test -s conftest$ac_exeext'
11314   { (eval echo "$as_me:11314: \"$ac_try\"") >&5
11315   (eval $ac_try) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit $ac_status); }; }; then
11319
11320                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11321
11322 echo "${as_me:-configure}:11322: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11323
11324                                         cf_cv_find_linkage_utf8=yes
11325                                         cf_cv_library_file_utf8="-lutf8"
11326                                         break
11327 else
11328   echo "$as_me: failed program was:" >&5
11329 cat conftest.$ac_ext >&5
11330
11331                                         CPPFLAGS="$cf_save_CPPFLAGS"
11332                                         LIBS="$cf_save_LIBS"
11333                                         LDFLAGS="$cf_save_LDFLAGS"
11334
11335 fi
11336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11337                                 fi
11338                         done
11339                         CPPFLAGS="$cf_save_CPPFLAGS"
11340                         LDFLAGS="$cf_save_LDFLAGS"
11341                 fi
11342
11343         else
11344                 cf_cv_find_linkage_utf8=no
11345         fi
11346
11347 fi
11348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11349
11350 fi
11351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11352
11353 LIBS="$cf_save_LIBS"
11354
11355 if test "$cf_cv_find_linkage_utf8" = yes ; then
11356 cf_cv_utf8_lib=add-on
11357 else
11358 cf_cv_utf8_lib=no
11359 fi
11360
11361 fi
11362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11363 fi
11364 echo "$as_me:11364: result: $cf_cv_utf8_lib" >&5
11365 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11366
11367 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11368 # ncurses/ncursesw:
11369 if test "$cf_cv_utf8_lib" = "add-on" ; then
11370
11371 cat >>confdefs.h <<\EOF
11372 #define HAVE_LIBUTF8_H 1
11373 EOF
11374
11375 if test -n "$cf_cv_header_path_utf8" ; then
11376   for cf_add_incdir in $cf_cv_header_path_utf8
11377   do
11378         while test $cf_add_incdir != /usr/include
11379         do
11380           if test -d $cf_add_incdir
11381           then
11382                 cf_have_incdir=no
11383                 if test -n "$CFLAGS$CPPFLAGS" ; then
11384                   # a loop is needed to ensure we can add subdirs of existing dirs
11385                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11386                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11387                           cf_have_incdir=yes; break
11388                         fi
11389                   done
11390                 fi
11391
11392                 if test "$cf_have_incdir" = no ; then
11393                   if test "$cf_add_incdir" = /usr/local/include ; then
11394                         if test "$GCC" = yes
11395                         then
11396                           cf_save_CPPFLAGS=$CPPFLAGS
11397
11398         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11399         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11400
11401                           cat >conftest.$ac_ext <<_ACEOF
11402 #line 11402 "configure"
11403 #include "confdefs.h"
11404 #include <stdio.h>
11405 int
11406 main (void)
11407 {
11408 printf("Hello")
11409   ;
11410   return 0;
11411 }
11412 _ACEOF
11413 rm -f conftest.$ac_objext
11414 if { (eval echo "$as_me:11414: \"$ac_compile\"") >&5
11415   (eval $ac_compile) 2>&5
11416   ac_status=$?
11417   echo "$as_me:11417: \$? = $ac_status" >&5
11418   (exit $ac_status); } &&
11419          { ac_try='test -s conftest.$ac_objext'
11420   { (eval echo "$as_me:11420: \"$ac_try\"") >&5
11421   (eval $ac_try) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit $ac_status); }; }; then
11425   :
11426 else
11427   echo "$as_me: failed program was:" >&5
11428 cat conftest.$ac_ext >&5
11429 cf_have_incdir=yes
11430 fi
11431 rm -f conftest.$ac_objext conftest.$ac_ext
11432                           CPPFLAGS=$cf_save_CPPFLAGS
11433                         fi
11434                   fi
11435                 fi
11436
11437                 if test "$cf_have_incdir" = no ; then
11438                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11439
11440 echo "${as_me:-configure}:11440: testing adding $cf_add_incdir to include-path ..." 1>&5
11441
11442                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11443
11444                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11445                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11446                   cf_add_incdir="$cf_top_incdir"
11447                 else
11448                   break
11449                 fi
11450           else
11451                 break
11452           fi
11453         done
11454   done
11455 fi
11456
11457 if test -n "$cf_cv_library_path_utf8" ; then
11458         for cf_add_libdir in $cf_cv_library_path_utf8
11459         do
11460                 if test $cf_add_libdir = /usr/lib ; then
11461                         :
11462                 elif test -d $cf_add_libdir
11463                 then
11464                         cf_have_libdir=no
11465                         if test -n "$LDFLAGS$LIBS" ; then
11466                                 # a loop is needed to ensure we can add subdirs of existing dirs
11467                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11468                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11469                                                 cf_have_libdir=yes; break
11470                                         fi
11471                                 done
11472                         fi
11473                         if test "$cf_have_libdir" = no ; then
11474                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11475
11476 echo "${as_me:-configure}:11476: testing adding $cf_add_libdir to library-path ..." 1>&5
11477
11478                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11479                         fi
11480                 fi
11481         done
11482 fi
11483
11484 cf_add_libs="$cf_cv_library_file_utf8"
11485 # Filter out duplicates - this happens with badly-designed ".pc" files...
11486 for cf_add_1lib in $LIBS
11487 do
11488         for cf_add_2lib in $cf_add_libs
11489         do
11490                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11491                 then
11492                         cf_add_1lib=
11493                         break
11494                 fi
11495         done
11496         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11497 done
11498 LIBS="$cf_add_libs"
11499
11500 fi
11501
11502                 if test "$cf_cv_utf8_lib" != no ; then
11503                         NCURSES_LIBUTF8=1
11504                 fi
11505         fi
11506
11507 # This is needed on Tru64 5.0 to declare mbstate_t
11508 echo "$as_me:11508: checking if we must include wchar.h to declare mbstate_t" >&5
11509 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11510 if test "${cf_cv_mbstate_t+set}" = set; then
11511   echo $ECHO_N "(cached) $ECHO_C" >&6
11512 else
11513
11514 cat >conftest.$ac_ext <<_ACEOF
11515 #line 11515 "configure"
11516 #include "confdefs.h"
11517
11518 #include <stdlib.h>
11519 #include <stdarg.h>
11520 #include <stdio.h>
11521 #ifdef HAVE_LIBUTF8_H
11522 #include <libutf8.h>
11523 #endif
11524 int
11525 main (void)
11526 {
11527 mbstate_t state
11528   ;
11529   return 0;
11530 }
11531 _ACEOF
11532 rm -f conftest.$ac_objext
11533 if { (eval echo "$as_me:11533: \"$ac_compile\"") >&5
11534   (eval $ac_compile) 2>&5
11535   ac_status=$?
11536   echo "$as_me:11536: \$? = $ac_status" >&5
11537   (exit $ac_status); } &&
11538          { ac_try='test -s conftest.$ac_objext'
11539   { (eval echo "$as_me:11539: \"$ac_try\"") >&5
11540   (eval $ac_try) 2>&5
11541   ac_status=$?
11542   echo "$as_me:11542: \$? = $ac_status" >&5
11543   (exit $ac_status); }; }; then
11544   cf_cv_mbstate_t=no
11545 else
11546   echo "$as_me: failed program was:" >&5
11547 cat conftest.$ac_ext >&5
11548 cat >conftest.$ac_ext <<_ACEOF
11549 #line 11549 "configure"
11550 #include "confdefs.h"
11551
11552 #include <stdlib.h>
11553 #include <stdarg.h>
11554 #include <stdio.h>
11555 #include <wchar.h>
11556 #ifdef HAVE_LIBUTF8_H
11557 #include <libutf8.h>
11558 #endif
11559 int
11560 main (void)
11561 {
11562 mbstate_t value
11563   ;
11564   return 0;
11565 }
11566 _ACEOF
11567 rm -f conftest.$ac_objext
11568 if { (eval echo "$as_me:11568: \"$ac_compile\"") >&5
11569   (eval $ac_compile) 2>&5
11570   ac_status=$?
11571   echo "$as_me:11571: \$? = $ac_status" >&5
11572   (exit $ac_status); } &&
11573          { ac_try='test -s conftest.$ac_objext'
11574   { (eval echo "$as_me:11574: \"$ac_try\"") >&5
11575   (eval $ac_try) 2>&5
11576   ac_status=$?
11577   echo "$as_me:11577: \$? = $ac_status" >&5
11578   (exit $ac_status); }; }; then
11579   cf_cv_mbstate_t=yes
11580 else
11581   echo "$as_me: failed program was:" >&5
11582 cat conftest.$ac_ext >&5
11583 cf_cv_mbstate_t=unknown
11584 fi
11585 rm -f conftest.$ac_objext conftest.$ac_ext
11586 fi
11587 rm -f conftest.$ac_objext conftest.$ac_ext
11588 fi
11589 echo "$as_me:11589: result: $cf_cv_mbstate_t" >&5
11590 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11591
11592 if test "$cf_cv_mbstate_t" = yes ; then
11593
11594 cat >>confdefs.h <<\EOF
11595 #define NEED_WCHAR_H 1
11596 EOF
11597
11598         NEED_WCHAR_H=1
11599 fi
11600
11601 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11602 if test "$cf_cv_mbstate_t" = unknown ; then
11603         NCURSES_MBSTATE_T=1
11604 fi
11605
11606 # This is needed on Tru64 5.0 to declare wchar_t
11607 echo "$as_me:11607: checking if we must include wchar.h to declare wchar_t" >&5
11608 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11609 if test "${cf_cv_wchar_t+set}" = set; then
11610   echo $ECHO_N "(cached) $ECHO_C" >&6
11611 else
11612
11613 cat >conftest.$ac_ext <<_ACEOF
11614 #line 11614 "configure"
11615 #include "confdefs.h"
11616
11617 #include <stdlib.h>
11618 #include <stdarg.h>
11619 #include <stdio.h>
11620 #ifdef HAVE_LIBUTF8_H
11621 #include <libutf8.h>
11622 #endif
11623 int
11624 main (void)
11625 {
11626 wchar_t state
11627   ;
11628   return 0;
11629 }
11630 _ACEOF
11631 rm -f conftest.$ac_objext
11632 if { (eval echo "$as_me:11632: \"$ac_compile\"") >&5
11633   (eval $ac_compile) 2>&5
11634   ac_status=$?
11635   echo "$as_me:11635: \$? = $ac_status" >&5
11636   (exit $ac_status); } &&
11637          { ac_try='test -s conftest.$ac_objext'
11638   { (eval echo "$as_me:11638: \"$ac_try\"") >&5
11639   (eval $ac_try) 2>&5
11640   ac_status=$?
11641   echo "$as_me:11641: \$? = $ac_status" >&5
11642   (exit $ac_status); }; }; then
11643   cf_cv_wchar_t=no
11644 else
11645   echo "$as_me: failed program was:" >&5
11646 cat conftest.$ac_ext >&5
11647 cat >conftest.$ac_ext <<_ACEOF
11648 #line 11648 "configure"
11649 #include "confdefs.h"
11650
11651 #include <stdlib.h>
11652 #include <stdarg.h>
11653 #include <stdio.h>
11654 #include <wchar.h>
11655 #ifdef HAVE_LIBUTF8_H
11656 #include <libutf8.h>
11657 #endif
11658 int
11659 main (void)
11660 {
11661 wchar_t value
11662   ;
11663   return 0;
11664 }
11665 _ACEOF
11666 rm -f conftest.$ac_objext
11667 if { (eval echo "$as_me:11667: \"$ac_compile\"") >&5
11668   (eval $ac_compile) 2>&5
11669   ac_status=$?
11670   echo "$as_me:11670: \$? = $ac_status" >&5
11671   (exit $ac_status); } &&
11672          { ac_try='test -s conftest.$ac_objext'
11673   { (eval echo "$as_me:11673: \"$ac_try\"") >&5
11674   (eval $ac_try) 2>&5
11675   ac_status=$?
11676   echo "$as_me:11676: \$? = $ac_status" >&5
11677   (exit $ac_status); }; }; then
11678   cf_cv_wchar_t=yes
11679 else
11680   echo "$as_me: failed program was:" >&5
11681 cat conftest.$ac_ext >&5
11682 cf_cv_wchar_t=unknown
11683 fi
11684 rm -f conftest.$ac_objext conftest.$ac_ext
11685 fi
11686 rm -f conftest.$ac_objext conftest.$ac_ext
11687 fi
11688 echo "$as_me:11688: result: $cf_cv_wchar_t" >&5
11689 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11690
11691 if test "$cf_cv_wchar_t" = yes ; then
11692
11693 cat >>confdefs.h <<\EOF
11694 #define NEED_WCHAR_H 1
11695 EOF
11696
11697         NEED_WCHAR_H=1
11698 fi
11699
11700 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11701 if test "$cf_cv_wchar_t" = unknown ; then
11702         NCURSES_WCHAR_T=1
11703 fi
11704
11705 # if we find wchar_t in either place, use substitution to provide a fallback.
11706 if test "$cf_cv_wchar_t" != unknown ; then
11707         NCURSES_OK_WCHAR_T=1
11708 fi
11709
11710 # This is needed on Tru64 5.0 to declare wint_t
11711 echo "$as_me:11711: checking if we must include wchar.h to declare wint_t" >&5
11712 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11713 if test "${cf_cv_wint_t+set}" = set; then
11714   echo $ECHO_N "(cached) $ECHO_C" >&6
11715 else
11716
11717 cat >conftest.$ac_ext <<_ACEOF
11718 #line 11718 "configure"
11719 #include "confdefs.h"
11720
11721 #include <stdlib.h>
11722 #include <stdarg.h>
11723 #include <stdio.h>
11724 #ifdef HAVE_LIBUTF8_H
11725 #include <libutf8.h>
11726 #endif
11727 int
11728 main (void)
11729 {
11730 wint_t state
11731   ;
11732   return 0;
11733 }
11734 _ACEOF
11735 rm -f conftest.$ac_objext
11736 if { (eval echo "$as_me:11736: \"$ac_compile\"") >&5
11737   (eval $ac_compile) 2>&5
11738   ac_status=$?
11739   echo "$as_me:11739: \$? = $ac_status" >&5
11740   (exit $ac_status); } &&
11741          { ac_try='test -s conftest.$ac_objext'
11742   { (eval echo "$as_me:11742: \"$ac_try\"") >&5
11743   (eval $ac_try) 2>&5
11744   ac_status=$?
11745   echo "$as_me:11745: \$? = $ac_status" >&5
11746   (exit $ac_status); }; }; then
11747   cf_cv_wint_t=no
11748 else
11749   echo "$as_me: failed program was:" >&5
11750 cat conftest.$ac_ext >&5
11751 cat >conftest.$ac_ext <<_ACEOF
11752 #line 11752 "configure"
11753 #include "confdefs.h"
11754
11755 #include <stdlib.h>
11756 #include <stdarg.h>
11757 #include <stdio.h>
11758 #include <wchar.h>
11759 #ifdef HAVE_LIBUTF8_H
11760 #include <libutf8.h>
11761 #endif
11762 int
11763 main (void)
11764 {
11765 wint_t value
11766   ;
11767   return 0;
11768 }
11769 _ACEOF
11770 rm -f conftest.$ac_objext
11771 if { (eval echo "$as_me:11771: \"$ac_compile\"") >&5
11772   (eval $ac_compile) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit $ac_status); } &&
11776          { ac_try='test -s conftest.$ac_objext'
11777   { (eval echo "$as_me:11777: \"$ac_try\"") >&5
11778   (eval $ac_try) 2>&5
11779   ac_status=$?
11780   echo "$as_me:11780: \$? = $ac_status" >&5
11781   (exit $ac_status); }; }; then
11782   cf_cv_wint_t=yes
11783 else
11784   echo "$as_me: failed program was:" >&5
11785 cat conftest.$ac_ext >&5
11786 cf_cv_wint_t=unknown
11787 fi
11788 rm -f conftest.$ac_objext conftest.$ac_ext
11789 fi
11790 rm -f conftest.$ac_objext conftest.$ac_ext
11791 fi
11792 echo "$as_me:11792: result: $cf_cv_wint_t" >&5
11793 echo "${ECHO_T}$cf_cv_wint_t" >&6
11794
11795 if test "$cf_cv_wint_t" = yes ; then
11796
11797 cat >>confdefs.h <<\EOF
11798 #define NEED_WCHAR_H 1
11799 EOF
11800
11801         NEED_WCHAR_H=1
11802 fi
11803
11804 # if we do not find wint_t in either place, use substitution to provide a fallback.
11805 if test "$cf_cv_wint_t" = unknown ; then
11806         NCURSES_WINT_T=1
11807 fi
11808
11809 # if we find wint_t in either place, use substitution to provide a fallback.
11810 if test "$cf_cv_wint_t" != unknown ; then
11811         NCURSES_OK_WINT_T=1
11812 fi
11813
11814         if test "$NCURSES_MBSTATE_T" != 0; then
11815
11816 cat >>confdefs.h <<\EOF
11817 #define NEED_MBSTATE_T_DEF 1
11818 EOF
11819
11820         fi
11821 fi
11822
11823 ###   use option --disable-lp64 to allow long chtype
11824 echo "$as_me:11824: checking whether to enable _LP64 definition in curses.h" >&5
11825 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11826
11827 # Check whether --enable-lp64 or --disable-lp64 was given.
11828 if test "${enable_lp64+set}" = set; then
11829   enableval="$enable_lp64"
11830   with_lp64=$enableval
11831 else
11832   with_lp64=$cf_dft_with_lp64
11833 fi;
11834 echo "$as_me:11834: result: $with_lp64" >&5
11835 echo "${ECHO_T}$with_lp64" >&6
11836
11837 if test "x$with_lp64" = xyes ; then
11838         cf_cv_enable_lp64=1
11839 else
11840         cf_cv_enable_lp64=0
11841 fi
11842
11843 # Check whether --enable-largefile or --disable-largefile was given.
11844 if test "${enable_largefile+set}" = set; then
11845   enableval="$enable_largefile"
11846
11847 fi;
11848 if test "$enable_largefile" != no; then
11849
11850   echo "$as_me:11850: checking for special C compiler options needed for large files" >&5
11851 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11852 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11853   echo $ECHO_N "(cached) $ECHO_C" >&6
11854 else
11855   ac_cv_sys_largefile_CC=no
11856      if test "$GCC" != yes; then
11857        ac_save_CC=$CC
11858        while :; do
11859          # IRIX 6.2 and later do not support large files by default,
11860          # so use the C compiler's -n32 option if that helps.
11861          cat >conftest.$ac_ext <<_ACEOF
11862 #line 11862 "configure"
11863 #include "confdefs.h"
11864 #include <sys/types.h>
11865  /* Check that off_t can represent 2**63 - 1 correctly.
11866     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11867     since some C++ compilers masquerading as C compilers
11868     incorrectly reject 9223372036854775807.  */
11869 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11870   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11871                        && LARGE_OFF_T % 2147483647 == 1)
11872                       ? 1 : -1];
11873 int
11874 main (void)
11875 {
11876
11877   ;
11878   return 0;
11879 }
11880 _ACEOF
11881          rm -f conftest.$ac_objext
11882 if { (eval echo "$as_me:11882: \"$ac_compile\"") >&5
11883   (eval $ac_compile) 2>&5
11884   ac_status=$?
11885   echo "$as_me:11885: \$? = $ac_status" >&5
11886   (exit $ac_status); } &&
11887          { ac_try='test -s conftest.$ac_objext'
11888   { (eval echo "$as_me:11888: \"$ac_try\"") >&5
11889   (eval $ac_try) 2>&5
11890   ac_status=$?
11891   echo "$as_me:11891: \$? = $ac_status" >&5
11892   (exit $ac_status); }; }; then
11893   break
11894 else
11895   echo "$as_me: failed program was:" >&5
11896 cat conftest.$ac_ext >&5
11897 fi
11898 rm -f conftest.$ac_objext
11899          CC="$CC -n32"
11900          rm -f conftest.$ac_objext
11901 if { (eval echo "$as_me:11901: \"$ac_compile\"") >&5
11902   (eval $ac_compile) 2>&5
11903   ac_status=$?
11904   echo "$as_me:11904: \$? = $ac_status" >&5
11905   (exit $ac_status); } &&
11906          { ac_try='test -s conftest.$ac_objext'
11907   { (eval echo "$as_me:11907: \"$ac_try\"") >&5
11908   (eval $ac_try) 2>&5
11909   ac_status=$?
11910   echo "$as_me:11910: \$? = $ac_status" >&5
11911   (exit $ac_status); }; }; then
11912   ac_cv_sys_largefile_CC=' -n32'; break
11913 else
11914   echo "$as_me: failed program was:" >&5
11915 cat conftest.$ac_ext >&5
11916 fi
11917 rm -f conftest.$ac_objext
11918          break
11919        done
11920        CC=$ac_save_CC
11921        rm -f conftest.$ac_ext
11922     fi
11923 fi
11924 echo "$as_me:11924: result: $ac_cv_sys_largefile_CC" >&5
11925 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11926   if test "$ac_cv_sys_largefile_CC" != no; then
11927     CC=$CC$ac_cv_sys_largefile_CC
11928   fi
11929
11930   echo "$as_me:11930: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11931 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11932 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11933   echo $ECHO_N "(cached) $ECHO_C" >&6
11934 else
11935   while :; do
11936   ac_cv_sys_file_offset_bits=no
11937   cat >conftest.$ac_ext <<_ACEOF
11938 #line 11938 "configure"
11939 #include "confdefs.h"
11940 #include <sys/types.h>
11941  /* Check that off_t can represent 2**63 - 1 correctly.
11942     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11943     since some C++ compilers masquerading as C compilers
11944     incorrectly reject 9223372036854775807.  */
11945 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11946   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11947                        && LARGE_OFF_T % 2147483647 == 1)
11948                       ? 1 : -1];
11949 int
11950 main (void)
11951 {
11952
11953   ;
11954   return 0;
11955 }
11956 _ACEOF
11957 rm -f conftest.$ac_objext
11958 if { (eval echo "$as_me:11958: \"$ac_compile\"") >&5
11959   (eval $ac_compile) 2>&5
11960   ac_status=$?
11961   echo "$as_me:11961: \$? = $ac_status" >&5
11962   (exit $ac_status); } &&
11963          { ac_try='test -s conftest.$ac_objext'
11964   { (eval echo "$as_me:11964: \"$ac_try\"") >&5
11965   (eval $ac_try) 2>&5
11966   ac_status=$?
11967   echo "$as_me:11967: \$? = $ac_status" >&5
11968   (exit $ac_status); }; }; then
11969   break
11970 else
11971   echo "$as_me: failed program was:" >&5
11972 cat conftest.$ac_ext >&5
11973 fi
11974 rm -f conftest.$ac_objext conftest.$ac_ext
11975   cat >conftest.$ac_ext <<_ACEOF
11976 #line 11976 "configure"
11977 #include "confdefs.h"
11978 #define _FILE_OFFSET_BITS 64
11979 #include <sys/types.h>
11980  /* Check that off_t can represent 2**63 - 1 correctly.
11981     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11982     since some C++ compilers masquerading as C compilers
11983     incorrectly reject 9223372036854775807.  */
11984 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11985   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11986                        && LARGE_OFF_T % 2147483647 == 1)
11987                       ? 1 : -1];
11988 int
11989 main (void)
11990 {
11991
11992   ;
11993   return 0;
11994 }
11995 _ACEOF
11996 rm -f conftest.$ac_objext
11997 if { (eval echo "$as_me:11997: \"$ac_compile\"") >&5
11998   (eval $ac_compile) 2>&5
11999   ac_status=$?
12000   echo "$as_me:12000: \$? = $ac_status" >&5
12001   (exit $ac_status); } &&
12002          { ac_try='test -s conftest.$ac_objext'
12003   { (eval echo "$as_me:12003: \"$ac_try\"") >&5
12004   (eval $ac_try) 2>&5
12005   ac_status=$?
12006   echo "$as_me:12006: \$? = $ac_status" >&5
12007   (exit $ac_status); }; }; then
12008   ac_cv_sys_file_offset_bits=64; break
12009 else
12010   echo "$as_me: failed program was:" >&5
12011 cat conftest.$ac_ext >&5
12012 fi
12013 rm -f conftest.$ac_objext conftest.$ac_ext
12014   break
12015 done
12016 fi
12017 echo "$as_me:12017: result: $ac_cv_sys_file_offset_bits" >&5
12018 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12019 if test "$ac_cv_sys_file_offset_bits" != no; then
12020
12021 cat >>confdefs.h <<EOF
12022 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12023 EOF
12024
12025 fi
12026 rm -rf conftest*
12027   echo "$as_me:12027: checking for _LARGE_FILES value needed for large files" >&5
12028 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12029 if test "${ac_cv_sys_large_files+set}" = set; then
12030   echo $ECHO_N "(cached) $ECHO_C" >&6
12031 else
12032   while :; do
12033   ac_cv_sys_large_files=no
12034   cat >conftest.$ac_ext <<_ACEOF
12035 #line 12035 "configure"
12036 #include "confdefs.h"
12037 #include <sys/types.h>
12038  /* Check that off_t can represent 2**63 - 1 correctly.
12039     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12040     since some C++ compilers masquerading as C compilers
12041     incorrectly reject 9223372036854775807.  */
12042 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12043   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12044                        && LARGE_OFF_T % 2147483647 == 1)
12045                       ? 1 : -1];
12046 int
12047 main (void)
12048 {
12049
12050   ;
12051   return 0;
12052 }
12053 _ACEOF
12054 rm -f conftest.$ac_objext
12055 if { (eval echo "$as_me:12055: \"$ac_compile\"") >&5
12056   (eval $ac_compile) 2>&5
12057   ac_status=$?
12058   echo "$as_me:12058: \$? = $ac_status" >&5
12059   (exit $ac_status); } &&
12060          { ac_try='test -s conftest.$ac_objext'
12061   { (eval echo "$as_me:12061: \"$ac_try\"") >&5
12062   (eval $ac_try) 2>&5
12063   ac_status=$?
12064   echo "$as_me:12064: \$? = $ac_status" >&5
12065   (exit $ac_status); }; }; then
12066   break
12067 else
12068   echo "$as_me: failed program was:" >&5
12069 cat conftest.$ac_ext >&5
12070 fi
12071 rm -f conftest.$ac_objext conftest.$ac_ext
12072   cat >conftest.$ac_ext <<_ACEOF
12073 #line 12073 "configure"
12074 #include "confdefs.h"
12075 #define _LARGE_FILES 1
12076 #include <sys/types.h>
12077  /* Check that off_t can represent 2**63 - 1 correctly.
12078     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12079     since some C++ compilers masquerading as C compilers
12080     incorrectly reject 9223372036854775807.  */
12081 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12082   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12083                        && LARGE_OFF_T % 2147483647 == 1)
12084                       ? 1 : -1];
12085 int
12086 main (void)
12087 {
12088
12089   ;
12090   return 0;
12091 }
12092 _ACEOF
12093 rm -f conftest.$ac_objext
12094 if { (eval echo "$as_me:12094: \"$ac_compile\"") >&5
12095   (eval $ac_compile) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit $ac_status); } &&
12099          { ac_try='test -s conftest.$ac_objext'
12100   { (eval echo "$as_me:12100: \"$ac_try\"") >&5
12101   (eval $ac_try) 2>&5
12102   ac_status=$?
12103   echo "$as_me:12103: \$? = $ac_status" >&5
12104   (exit $ac_status); }; }; then
12105   ac_cv_sys_large_files=1; break
12106 else
12107   echo "$as_me: failed program was:" >&5
12108 cat conftest.$ac_ext >&5
12109 fi
12110 rm -f conftest.$ac_objext conftest.$ac_ext
12111   break
12112 done
12113 fi
12114 echo "$as_me:12114: result: $ac_cv_sys_large_files" >&5
12115 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12116 if test "$ac_cv_sys_large_files" != no; then
12117
12118 cat >>confdefs.h <<EOF
12119 #define _LARGE_FILES $ac_cv_sys_large_files
12120 EOF
12121
12122 fi
12123 rm -rf conftest*
12124 fi
12125
12126         if test "$enable_largefile" != no ; then
12127         echo "$as_me:12127: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12128 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12129 if test "${ac_cv_sys_largefile_source+set}" = set; then
12130   echo $ECHO_N "(cached) $ECHO_C" >&6
12131 else
12132   while :; do
12133   ac_cv_sys_largefile_source=no
12134   cat >conftest.$ac_ext <<_ACEOF
12135 #line 12135 "configure"
12136 #include "confdefs.h"
12137 #include <stdio.h>
12138 int
12139 main (void)
12140 {
12141 return !fseeko;
12142   ;
12143   return 0;
12144 }
12145 _ACEOF
12146 rm -f conftest.$ac_objext
12147 if { (eval echo "$as_me:12147: \"$ac_compile\"") >&5
12148   (eval $ac_compile) 2>&5
12149   ac_status=$?
12150   echo "$as_me:12150: \$? = $ac_status" >&5
12151   (exit $ac_status); } &&
12152          { ac_try='test -s conftest.$ac_objext'
12153   { (eval echo "$as_me:12153: \"$ac_try\"") >&5
12154   (eval $ac_try) 2>&5
12155   ac_status=$?
12156   echo "$as_me:12156: \$? = $ac_status" >&5
12157   (exit $ac_status); }; }; then
12158   break
12159 else
12160   echo "$as_me: failed program was:" >&5
12161 cat conftest.$ac_ext >&5
12162 fi
12163 rm -f conftest.$ac_objext conftest.$ac_ext
12164   cat >conftest.$ac_ext <<_ACEOF
12165 #line 12165 "configure"
12166 #include "confdefs.h"
12167 #define _LARGEFILE_SOURCE 1
12168 #include <stdio.h>
12169 int
12170 main (void)
12171 {
12172 return !fseeko;
12173   ;
12174   return 0;
12175 }
12176 _ACEOF
12177 rm -f conftest.$ac_objext
12178 if { (eval echo "$as_me:12178: \"$ac_compile\"") >&5
12179   (eval $ac_compile) 2>&5
12180   ac_status=$?
12181   echo "$as_me:12181: \$? = $ac_status" >&5
12182   (exit $ac_status); } &&
12183          { ac_try='test -s conftest.$ac_objext'
12184   { (eval echo "$as_me:12184: \"$ac_try\"") >&5
12185   (eval $ac_try) 2>&5
12186   ac_status=$?
12187   echo "$as_me:12187: \$? = $ac_status" >&5
12188   (exit $ac_status); }; }; then
12189   ac_cv_sys_largefile_source=1; break
12190 else
12191   echo "$as_me: failed program was:" >&5
12192 cat conftest.$ac_ext >&5
12193 fi
12194 rm -f conftest.$ac_objext conftest.$ac_ext
12195   break
12196 done
12197 fi
12198 echo "$as_me:12198: result: $ac_cv_sys_largefile_source" >&5
12199 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12200 if test "$ac_cv_sys_largefile_source" != no; then
12201
12202 cat >>confdefs.h <<EOF
12203 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12204 EOF
12205
12206 fi
12207 rm -rf conftest*
12208
12209 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12210 # in glibc 2.1.3, but that breaks too many other things.
12211 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12212 echo "$as_me:12212: checking for fseeko" >&5
12213 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12214 if test "${ac_cv_func_fseeko+set}" = set; then
12215   echo $ECHO_N "(cached) $ECHO_C" >&6
12216 else
12217   cat >conftest.$ac_ext <<_ACEOF
12218 #line 12218 "configure"
12219 #include "confdefs.h"
12220 #include <stdio.h>
12221 int
12222 main (void)
12223 {
12224 return fseeko && fseeko (stdin, 0, 0);
12225   ;
12226   return 0;
12227 }
12228 _ACEOF
12229 rm -f conftest.$ac_objext conftest$ac_exeext
12230 if { (eval echo "$as_me:12230: \"$ac_link\"") >&5
12231   (eval $ac_link) 2>&5
12232   ac_status=$?
12233   echo "$as_me:12233: \$? = $ac_status" >&5
12234   (exit $ac_status); } &&
12235          { ac_try='test -s conftest$ac_exeext'
12236   { (eval echo "$as_me:12236: \"$ac_try\"") >&5
12237   (eval $ac_try) 2>&5
12238   ac_status=$?
12239   echo "$as_me:12239: \$? = $ac_status" >&5
12240   (exit $ac_status); }; }; then
12241   ac_cv_func_fseeko=yes
12242 else
12243   echo "$as_me: failed program was:" >&5
12244 cat conftest.$ac_ext >&5
12245 ac_cv_func_fseeko=no
12246 fi
12247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12248 fi
12249 echo "$as_me:12249: result: $ac_cv_func_fseeko" >&5
12250 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12251 if test $ac_cv_func_fseeko = yes; then
12252
12253 cat >>confdefs.h <<\EOF
12254 #define HAVE_FSEEKO 1
12255 EOF
12256
12257 fi
12258
12259         # Normally we would collect these definitions in the config.h,
12260         # but (like _XOPEN_SOURCE), some environments rely on having these
12261         # defined before any of the system headers are included.  Another
12262         # case comes up with C++, e.g., on AIX the compiler compiles the
12263         # header files by themselves before looking at the body files it is
12264         # told to compile.  For ncurses, those header files do not include
12265         # the config.h
12266         if test "$ac_cv_sys_large_files" != no
12267         then
12268
12269         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12270         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12271
12272         fi
12273         if test "$ac_cv_sys_largefile_source" != no
12274         then
12275
12276         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12277         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12278
12279         fi
12280         if test "$ac_cv_sys_file_offset_bits" != no
12281         then
12282
12283         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12284         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12285
12286         fi
12287
12288         echo "$as_me:12288: checking whether to use struct dirent64" >&5
12289 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12290 if test "${cf_cv_struct_dirent64+set}" = set; then
12291   echo $ECHO_N "(cached) $ECHO_C" >&6
12292 else
12293
12294                 cat >conftest.$ac_ext <<_ACEOF
12295 #line 12295 "configure"
12296 #include "confdefs.h"
12297
12298 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12299 #include <sys/types.h>
12300 #include <dirent.h>
12301
12302 int
12303 main (void)
12304 {
12305
12306                 /* if transitional largefile support is setup, this is true */
12307                 extern struct dirent64 * readdir(DIR *);
12308                 struct dirent64 *x = readdir((DIR *)0);
12309                 struct dirent *y = readdir((DIR *)0);
12310                 int z = x - y;
12311
12312   ;
12313   return 0;
12314 }
12315 _ACEOF
12316 rm -f conftest.$ac_objext
12317 if { (eval echo "$as_me:12317: \"$ac_compile\"") >&5
12318   (eval $ac_compile) 2>&5
12319   ac_status=$?
12320   echo "$as_me:12320: \$? = $ac_status" >&5
12321   (exit $ac_status); } &&
12322          { ac_try='test -s conftest.$ac_objext'
12323   { (eval echo "$as_me:12323: \"$ac_try\"") >&5
12324   (eval $ac_try) 2>&5
12325   ac_status=$?
12326   echo "$as_me:12326: \$? = $ac_status" >&5
12327   (exit $ac_status); }; }; then
12328   cf_cv_struct_dirent64=yes
12329 else
12330   echo "$as_me: failed program was:" >&5
12331 cat conftest.$ac_ext >&5
12332 cf_cv_struct_dirent64=no
12333 fi
12334 rm -f conftest.$ac_objext conftest.$ac_ext
12335
12336 fi
12337 echo "$as_me:12337: result: $cf_cv_struct_dirent64" >&5
12338 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12339         test "$cf_cv_struct_dirent64" = yes &&
12340 cat >>confdefs.h <<\EOF
12341 #define HAVE_STRUCT_DIRENT64 1
12342 EOF
12343
12344         fi
12345
12346 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12347 echo "$as_me:12347: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12348 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12349
12350 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12351 if test "${enable_tparm_varargs+set}" = set; then
12352   enableval="$enable_tparm_varargs"
12353   with_tparm_varargs=$enableval
12354 else
12355   with_tparm_varargs=yes
12356 fi;
12357 echo "$as_me:12357: result: $with_tparm_varargs" >&5
12358 echo "${ECHO_T}$with_tparm_varargs" >&6
12359 NCURSES_TPARM_VARARGS=0
12360 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12361
12362 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12363 if test "$with_ticlib" != no ; then
12364 echo "$as_me:12364: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12365 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12366
12367 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12368 if test "${enable_tic_depends+set}" = set; then
12369   enableval="$enable_tic_depends"
12370   with_tic_depends=$enableval
12371 else
12372   with_tic_depends=yes
12373 fi;
12374 echo "$as_me:12374: result: $with_tic_depends" >&5
12375 echo "${ECHO_T}$with_tic_depends" >&6
12376 else
12377         with_tic_depends=no
12378 fi
12379
12380 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12381 echo "$as_me:12381: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12382 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12383
12384 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12385 if test "${enable_wattr_macros+set}" = set; then
12386   enableval="$enable_wattr_macros"
12387   with_wattr_macros=$enableval
12388 else
12389   with_wattr_macros=yes
12390 fi;
12391 if [ "x$with_wattr_macros" != xyes ]; then
12392         NCURSES_WATTR_MACROS=0
12393         echo "$as_me:12393: result: yes" >&5
12394 echo "${ECHO_T}yes" >&6
12395 else
12396         NCURSES_WATTR_MACROS=1
12397         echo "$as_me:12397: result: no" >&5
12398 echo "${ECHO_T}no" >&6
12399 fi
12400
12401 echo "$as_me:12401: checking for X11 rgb file" >&5
12402 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12403
12404 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12405 if test "${with_x11_rgb+set}" = set; then
12406   withval="$with_x11_rgb"
12407   RGB_PATH=$withval
12408 else
12409   RGB_PATH=auto
12410 fi;
12411
12412 if test "x$RGB_PATH" = xauto
12413 then
12414         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12415         for cf_path in \
12416                 /opt/local/share/X11/rgb.txt \
12417                 /opt/X11/share/X11/rgb.txt \
12418                 /usr/share/X11/rgb.txt \
12419                 /usr/X11/share/X11/rgb.txt \
12420                 /usr/X11/lib/X11/rgb.txt \
12421                 /usr/lib/X11/rgb.txt \
12422                 /etc/X11/rgb.txt \
12423                 /usr/pkg/lib/X11/rgb.txt \
12424                 /usr/X11R7/lib/X11/rgb.txt \
12425                 /usr/X11R6/lib/X11/rgb.txt \
12426                 /usr/X11R5/lib/X11/rgb.txt \
12427                 /usr/X11R4/lib/X11/rgb.txt \
12428                 /usr/local/lib/X11/rgb.txt \
12429                 /usr/local/share/X11/rgb.txt \
12430                 /usr/lib64/X11/rgb.txt
12431         do
12432                 if test -f "$cf_path" ; then
12433                         RGB_PATH="$cf_path"
12434                         break
12435                 fi
12436         done
12437 else
12438         cf_path=$RGB_PATH
12439
12440 if test "x$prefix" != xNONE; then
12441         cf_path_syntax="$prefix"
12442 else
12443         cf_path_syntax="$ac_default_prefix"
12444 fi
12445
12446 case ".$cf_path" in
12447 (.\$\(*\)*|.\'*\'*)
12448         ;;
12449 (..|./*|.\\*)
12450         ;;
12451 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12452         ;;
12453 (.\${*prefix}*|.\${*dir}*)
12454         eval cf_path="$cf_path"
12455         case ".$cf_path" in
12456         (.NONE/*)
12457                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12458                 ;;
12459         esac
12460         ;;
12461 (.no|.NONE/*)
12462         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12463         ;;
12464 (*)
12465         { { echo "$as_me:12465: error: expected a pathname, not \"$cf_path\"" >&5
12466 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12467    { (exit 1); exit 1; }; }
12468         ;;
12469 esac
12470
12471 fi
12472
12473 echo "$as_me:12473: result: $RGB_PATH" >&5
12474 echo "${ECHO_T}$RGB_PATH" >&6
12475
12476 cat >>confdefs.h <<EOF
12477 #define RGB_PATH "$cf_path"
12478 EOF
12479
12480 no_x11_rgb=
12481 if test "$RGB_PATH" = no
12482 then
12483         no_x11_rgb="#"
12484 fi
12485
12486 ###   use option --with-bool to override bool's type
12487 echo "$as_me:12487: checking for type of bool" >&5
12488 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12489
12490 # Check whether --with-bool or --without-bool was given.
12491 if test "${with_bool+set}" = set; then
12492   withval="$with_bool"
12493   NCURSES_BOOL="$withval"
12494 else
12495   NCURSES_BOOL=auto
12496 fi;
12497 echo "$as_me:12497: result: $NCURSES_BOOL" >&5
12498 echo "${ECHO_T}$NCURSES_BOOL" >&6
12499
12500 echo "$as_me:12500: checking for alternate terminal capabilities file" >&5
12501 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12502
12503 # Check whether --with-caps or --without-caps was given.
12504 if test "${with_caps+set}" = set; then
12505   withval="$with_caps"
12506   TERMINFO_CAPS=Caps.$withval
12507 else
12508   TERMINFO_CAPS=Caps
12509 fi;
12510 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12511 echo "$as_me:12511: result: $TERMINFO_CAPS" >&5
12512 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12513
12514 ###   use option --with-chtype to override chtype's type
12515 echo "$as_me:12515: checking for type of chtype" >&5
12516 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12517
12518 # Check whether --with-chtype or --without-chtype was given.
12519 if test "${with_chtype+set}" = set; then
12520   withval="$with_chtype"
12521   NCURSES_CHTYPE="$withval"
12522 else
12523   NCURSES_CHTYPE=$cf_dft_chtype
12524 fi;
12525 echo "$as_me:12525: result: $NCURSES_CHTYPE" >&5
12526 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12527
12528 ###   use option --with-ospeed to override ospeed's type
12529 echo "$as_me:12529: checking for type of ospeed" >&5
12530 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12531
12532 # Check whether --with-ospeed or --without-ospeed was given.
12533 if test "${with_ospeed+set}" = set; then
12534   withval="$with_ospeed"
12535   NCURSES_OSPEED="$withval"
12536 else
12537   NCURSES_OSPEED=short
12538 fi;
12539 echo "$as_me:12539: result: $NCURSES_OSPEED" >&5
12540 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12541
12542 ###   use option --with-mmask-t to override mmask_t's type
12543 echo "$as_me:12543: checking for type of mmask_t" >&5
12544 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12545
12546 # Check whether --with-mmask-t or --without-mmask-t was given.
12547 if test "${with_mmask_t+set}" = set; then
12548   withval="$with_mmask_t"
12549   NCURSES_MMASK_T="$withval"
12550 else
12551   NCURSES_MMASK_T=$cf_dft_mmask_t
12552 fi;
12553 echo "$as_me:12553: result: $NCURSES_MMASK_T" >&5
12554 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12555
12556 ###   use option --with-ccharw-max to override CCHARW_MAX size
12557 echo "$as_me:12557: checking for size CCHARW_MAX" >&5
12558 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12559
12560 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12561 if test "${with_ccharw_max+set}" = set; then
12562   withval="$with_ccharw_max"
12563   NCURSES_CCHARW_MAX="$withval"
12564 else
12565   NCURSES_CCHARW_MAX=5
12566 fi;
12567 echo "$as_me:12567: result: $NCURSES_CCHARW_MAX" >&5
12568 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12569
12570 echo "$as_me:12570: checking for ANSI C header files" >&5
12571 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12572 if test "${ac_cv_header_stdc+set}" = set; then
12573   echo $ECHO_N "(cached) $ECHO_C" >&6
12574 else
12575   cat >conftest.$ac_ext <<_ACEOF
12576 #line 12576 "configure"
12577 #include "confdefs.h"
12578 #include <stdlib.h>
12579 #include <stdarg.h>
12580 #include <string.h>
12581 #include <float.h>
12582
12583 _ACEOF
12584 if { (eval echo "$as_me:12584: \"$ac_cpp conftest.$ac_ext\"") >&5
12585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12586   ac_status=$?
12587   egrep -v '^ *\+' conftest.er1 >conftest.err
12588   rm -f conftest.er1
12589   cat conftest.err >&5
12590   echo "$as_me:12590: \$? = $ac_status" >&5
12591   (exit $ac_status); } >/dev/null; then
12592   if test -s conftest.err; then
12593     ac_cpp_err=$ac_c_preproc_warn_flag
12594   else
12595     ac_cpp_err=
12596   fi
12597 else
12598   ac_cpp_err=yes
12599 fi
12600 if test -z "$ac_cpp_err"; then
12601   ac_cv_header_stdc=yes
12602 else
12603   echo "$as_me: failed program was:" >&5
12604   cat conftest.$ac_ext >&5
12605   ac_cv_header_stdc=no
12606 fi
12607 rm -f conftest.err conftest.$ac_ext
12608
12609 if test $ac_cv_header_stdc = yes; then
12610   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12611   cat >conftest.$ac_ext <<_ACEOF
12612 #line 12612 "configure"
12613 #include "confdefs.h"
12614 #include <string.h>
12615
12616 _ACEOF
12617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12618   egrep "memchr" >/dev/null 2>&1; then
12619   :
12620 else
12621   ac_cv_header_stdc=no
12622 fi
12623 rm -rf conftest*
12624
12625 fi
12626
12627 if test $ac_cv_header_stdc = yes; then
12628   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12629   cat >conftest.$ac_ext <<_ACEOF
12630 #line 12630 "configure"
12631 #include "confdefs.h"
12632 #include <stdlib.h>
12633
12634 _ACEOF
12635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12636   egrep "free" >/dev/null 2>&1; then
12637   :
12638 else
12639   ac_cv_header_stdc=no
12640 fi
12641 rm -rf conftest*
12642
12643 fi
12644
12645 if test $ac_cv_header_stdc = yes; then
12646   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12647   if test "$cross_compiling" = yes; then
12648   :
12649 else
12650   cat >conftest.$ac_ext <<_ACEOF
12651 #line 12651 "configure"
12652 #include "confdefs.h"
12653 #include <ctype.h>
12654 #if ((' ' & 0x0FF) == 0x020)
12655 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12656 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12657 #else
12658 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12659                      || ('j' <= (c) && (c) <= 'r') \
12660                      || ('s' <= (c) && (c) <= 'z'))
12661 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12662 #endif
12663
12664 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12665 int
12666 main (void)
12667 {
12668   int i;
12669   for (i = 0; i < 256; i++)
12670     if (XOR (islower (i), ISLOWER (i))
12671         || toupper (i) != TOUPPER (i))
12672       $ac_main_return(2);
12673   $ac_main_return (0);
12674 }
12675 _ACEOF
12676 rm -f conftest$ac_exeext
12677 if { (eval echo "$as_me:12677: \"$ac_link\"") >&5
12678   (eval $ac_link) 2>&5
12679   ac_status=$?
12680   echo "$as_me:12680: \$? = $ac_status" >&5
12681   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12682   { (eval echo "$as_me:12682: \"$ac_try\"") >&5
12683   (eval $ac_try) 2>&5
12684   ac_status=$?
12685   echo "$as_me:12685: \$? = $ac_status" >&5
12686   (exit $ac_status); }; }; then
12687   :
12688 else
12689   echo "$as_me: program exited with status $ac_status" >&5
12690 echo "$as_me: failed program was:" >&5
12691 cat conftest.$ac_ext >&5
12692 ac_cv_header_stdc=no
12693 fi
12694 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12695 fi
12696 fi
12697 fi
12698 echo "$as_me:12698: result: $ac_cv_header_stdc" >&5
12699 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12700 if test $ac_cv_header_stdc = yes; then
12701
12702 cat >>confdefs.h <<\EOF
12703 #define STDC_HEADERS 1
12704 EOF
12705
12706 fi
12707
12708 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12709
12710 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12711                   inttypes.h stdint.h unistd.h
12712 do
12713 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12714 echo "$as_me:12714: checking for $ac_header" >&5
12715 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12716 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12717   echo $ECHO_N "(cached) $ECHO_C" >&6
12718 else
12719   cat >conftest.$ac_ext <<_ACEOF
12720 #line 12720 "configure"
12721 #include "confdefs.h"
12722 $ac_includes_default
12723 #include <$ac_header>
12724 _ACEOF
12725 rm -f conftest.$ac_objext
12726 if { (eval echo "$as_me:12726: \"$ac_compile\"") >&5
12727   (eval $ac_compile) 2>&5
12728   ac_status=$?
12729   echo "$as_me:12729: \$? = $ac_status" >&5
12730   (exit $ac_status); } &&
12731          { ac_try='test -s conftest.$ac_objext'
12732   { (eval echo "$as_me:12732: \"$ac_try\"") >&5
12733   (eval $ac_try) 2>&5
12734   ac_status=$?
12735   echo "$as_me:12735: \$? = $ac_status" >&5
12736   (exit $ac_status); }; }; then
12737   eval "$as_ac_Header=yes"
12738 else
12739   echo "$as_me: failed program was:" >&5
12740 cat conftest.$ac_ext >&5
12741 eval "$as_ac_Header=no"
12742 fi
12743 rm -f conftest.$ac_objext conftest.$ac_ext
12744 fi
12745 echo "$as_me:12745: result: `eval echo '${'$as_ac_Header'}'`" >&5
12746 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12748   cat >>confdefs.h <<EOF
12749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12750 EOF
12751
12752 fi
12753 done
12754
12755 echo "$as_me:12755: checking for signed char" >&5
12756 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12757 if test "${ac_cv_type_signed_char+set}" = set; then
12758   echo $ECHO_N "(cached) $ECHO_C" >&6
12759 else
12760   cat >conftest.$ac_ext <<_ACEOF
12761 #line 12761 "configure"
12762 #include "confdefs.h"
12763 $ac_includes_default
12764 int
12765 main (void)
12766 {
12767 if ((signed char *) 0)
12768   return 0;
12769 if (sizeof (signed char))
12770   return 0;
12771   ;
12772   return 0;
12773 }
12774 _ACEOF
12775 rm -f conftest.$ac_objext
12776 if { (eval echo "$as_me:12776: \"$ac_compile\"") >&5
12777   (eval $ac_compile) 2>&5
12778   ac_status=$?
12779   echo "$as_me:12779: \$? = $ac_status" >&5
12780   (exit $ac_status); } &&
12781          { ac_try='test -s conftest.$ac_objext'
12782   { (eval echo "$as_me:12782: \"$ac_try\"") >&5
12783   (eval $ac_try) 2>&5
12784   ac_status=$?
12785   echo "$as_me:12785: \$? = $ac_status" >&5
12786   (exit $ac_status); }; }; then
12787   ac_cv_type_signed_char=yes
12788 else
12789   echo "$as_me: failed program was:" >&5
12790 cat conftest.$ac_ext >&5
12791 ac_cv_type_signed_char=no
12792 fi
12793 rm -f conftest.$ac_objext conftest.$ac_ext
12794 fi
12795 echo "$as_me:12795: result: $ac_cv_type_signed_char" >&5
12796 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12797
12798 echo "$as_me:12798: checking size of signed char" >&5
12799 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12800 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12801   echo $ECHO_N "(cached) $ECHO_C" >&6
12802 else
12803   if test "$ac_cv_type_signed_char" = yes; then
12804   if test "$cross_compiling" = yes; then
12805   # Depending upon the size, compute the lo and hi bounds.
12806 cat >conftest.$ac_ext <<_ACEOF
12807 #line 12807 "configure"
12808 #include "confdefs.h"
12809 $ac_includes_default
12810 int
12811 main (void)
12812 {
12813 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12814   ;
12815   return 0;
12816 }
12817 _ACEOF
12818 rm -f conftest.$ac_objext
12819 if { (eval echo "$as_me:12819: \"$ac_compile\"") >&5
12820   (eval $ac_compile) 2>&5
12821   ac_status=$?
12822   echo "$as_me:12822: \$? = $ac_status" >&5
12823   (exit $ac_status); } &&
12824          { ac_try='test -s conftest.$ac_objext'
12825   { (eval echo "$as_me:12825: \"$ac_try\"") >&5
12826   (eval $ac_try) 2>&5
12827   ac_status=$?
12828   echo "$as_me:12828: \$? = $ac_status" >&5
12829   (exit $ac_status); }; }; then
12830   ac_lo=0 ac_mid=0
12831   while :; do
12832     cat >conftest.$ac_ext <<_ACEOF
12833 #line 12833 "configure"
12834 #include "confdefs.h"
12835 $ac_includes_default
12836 int
12837 main (void)
12838 {
12839 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12840   ;
12841   return 0;
12842 }
12843 _ACEOF
12844 rm -f conftest.$ac_objext
12845 if { (eval echo "$as_me:12845: \"$ac_compile\"") >&5
12846   (eval $ac_compile) 2>&5
12847   ac_status=$?
12848   echo "$as_me:12848: \$? = $ac_status" >&5
12849   (exit $ac_status); } &&
12850          { ac_try='test -s conftest.$ac_objext'
12851   { (eval echo "$as_me:12851: \"$ac_try\"") >&5
12852   (eval $ac_try) 2>&5
12853   ac_status=$?
12854   echo "$as_me:12854: \$? = $ac_status" >&5
12855   (exit $ac_status); }; }; then
12856   ac_hi=$ac_mid; break
12857 else
12858   echo "$as_me: failed program was:" >&5
12859 cat conftest.$ac_ext >&5
12860 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12861 fi
12862 rm -f conftest.$ac_objext conftest.$ac_ext
12863   done
12864 else
12865   echo "$as_me: failed program was:" >&5
12866 cat conftest.$ac_ext >&5
12867 ac_hi=-1 ac_mid=-1
12868   while :; do
12869     cat >conftest.$ac_ext <<_ACEOF
12870 #line 12870 "configure"
12871 #include "confdefs.h"
12872 $ac_includes_default
12873 int
12874 main (void)
12875 {
12876 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 rm -f conftest.$ac_objext
12882 if { (eval echo "$as_me:12882: \"$ac_compile\"") >&5
12883   (eval $ac_compile) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); } &&
12887          { ac_try='test -s conftest.$ac_objext'
12888   { (eval echo "$as_me:12888: \"$ac_try\"") >&5
12889   (eval $ac_try) 2>&5
12890   ac_status=$?
12891   echo "$as_me:12891: \$? = $ac_status" >&5
12892   (exit $ac_status); }; }; then
12893   ac_lo=$ac_mid; break
12894 else
12895   echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12898 fi
12899 rm -f conftest.$ac_objext conftest.$ac_ext
12900   done
12901 fi
12902 rm -f conftest.$ac_objext conftest.$ac_ext
12903 # Binary search between lo and hi bounds.
12904 while test "x$ac_lo" != "x$ac_hi"; do
12905   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12906   cat >conftest.$ac_ext <<_ACEOF
12907 #line 12907 "configure"
12908 #include "confdefs.h"
12909 $ac_includes_default
12910 int
12911 main (void)
12912 {
12913 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12914   ;
12915   return 0;
12916 }
12917 _ACEOF
12918 rm -f conftest.$ac_objext
12919 if { (eval echo "$as_me:12919: \"$ac_compile\"") >&5
12920   (eval $ac_compile) 2>&5
12921   ac_status=$?
12922   echo "$as_me:12922: \$? = $ac_status" >&5
12923   (exit $ac_status); } &&
12924          { ac_try='test -s conftest.$ac_objext'
12925   { (eval echo "$as_me:12925: \"$ac_try\"") >&5
12926   (eval $ac_try) 2>&5
12927   ac_status=$?
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit $ac_status); }; }; then
12930   ac_hi=$ac_mid
12931 else
12932   echo "$as_me: failed program was:" >&5
12933 cat conftest.$ac_ext >&5
12934 ac_lo=`expr $ac_mid + 1`
12935 fi
12936 rm -f conftest.$ac_objext conftest.$ac_ext
12937 done
12938 ac_cv_sizeof_signed_char=$ac_lo
12939 else
12940   if test "$cross_compiling" = yes; then
12941   { { echo "$as_me:12941: error: cannot run test program while cross compiling" >&5
12942 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12943    { (exit 1); exit 1; }; }
12944 else
12945   cat >conftest.$ac_ext <<_ACEOF
12946 #line 12946 "configure"
12947 #include "confdefs.h"
12948 $ac_includes_default
12949 int
12950 main (void)
12951 {
12952 FILE *f = fopen ("conftest.val", "w");
12953 if (!f)
12954   $ac_main_return (1);
12955 fprintf (f, "%d", (sizeof (signed char)));
12956 fclose (f);
12957   ;
12958   return 0;
12959 }
12960 _ACEOF
12961 rm -f conftest$ac_exeext
12962 if { (eval echo "$as_me:12962: \"$ac_link\"") >&5
12963   (eval $ac_link) 2>&5
12964   ac_status=$?
12965   echo "$as_me:12965: \$? = $ac_status" >&5
12966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12967   { (eval echo "$as_me:12967: \"$ac_try\"") >&5
12968   (eval $ac_try) 2>&5
12969   ac_status=$?
12970   echo "$as_me:12970: \$? = $ac_status" >&5
12971   (exit $ac_status); }; }; then
12972   ac_cv_sizeof_signed_char=`cat conftest.val`
12973 else
12974   echo "$as_me: program exited with status $ac_status" >&5
12975 echo "$as_me: failed program was:" >&5
12976 cat conftest.$ac_ext >&5
12977 fi
12978 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12979 fi
12980 fi
12981 rm -f conftest.val
12982 else
12983   ac_cv_sizeof_signed_char=0
12984 fi
12985 fi
12986 echo "$as_me:12986: result: $ac_cv_sizeof_signed_char" >&5
12987 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12988 cat >>confdefs.h <<EOF
12989 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12990 EOF
12991
12992 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12993         NCURSES_SBOOL="signed char"
12994 else
12995         NCURSES_SBOOL="char"
12996 fi
12997 echo "$as_me:12997: checking if you want to use signed Boolean array in term.h" >&5
12998 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12999
13000 # Check whether --enable-signed-char or --disable-signed-char was given.
13001 if test "${enable_signed_char+set}" = set; then
13002   enableval="$enable_signed_char"
13003   with_signed_char=$enableval
13004 else
13005   with_signed_char=no
13006 fi;
13007 echo "$as_me:13007: result: $with_signed_char" >&5
13008 echo "${ECHO_T}$with_signed_char" >&6
13009 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13010
13011 ###   use option --with-tparm-arg to override tparm's argument type
13012 echo "$as_me:13012: checking for type of tparm args" >&5
13013 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13014
13015 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13016 if test "${with_tparm_arg+set}" = set; then
13017   withval="$with_tparm_arg"
13018   NCURSES_TPARM_ARG="$withval"
13019 else
13020   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13021 fi;
13022 echo "$as_me:13022: result: $NCURSES_TPARM_ARG" >&5
13023 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13024
13025 ### Enable compiling-in rcs id's
13026 echo "$as_me:13026: checking if RCS identifiers should be compiled-in" >&5
13027 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13028
13029 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13030 if test "${with_rcs_ids+set}" = set; then
13031   withval="$with_rcs_ids"
13032   with_rcs_ids=$withval
13033 else
13034   with_rcs_ids=no
13035 fi;
13036 echo "$as_me:13036: result: $with_rcs_ids" >&5
13037 echo "${ECHO_T}$with_rcs_ids" >&6
13038 test "x$with_rcs_ids" = xyes &&
13039 cat >>confdefs.h <<\EOF
13040 #define USE_RCS_IDS 1
13041 EOF
13042
13043 ###############################################################################
13044
13045 echo "$as_me:13045: checking format of man-pages" >&5
13046 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13047
13048 # Check whether --with-manpage-format or --without-manpage-format was given.
13049 if test "${with_manpage_format+set}" = set; then
13050   withval="$with_manpage_format"
13051   MANPAGE_FORMAT=$withval
13052 else
13053   MANPAGE_FORMAT=unknown
13054 fi;
13055
13056 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13057 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13058
13059 cf_unknown=
13060
13061 case $MANPAGE_FORMAT in
13062 (unknown)
13063         if test -z "$MANPATH" ; then
13064                 MANPATH="/usr/man:/usr/share/man"
13065         fi
13066
13067         # look for the 'date' man-page (it's most likely to be installed!)
13068         MANPAGE_FORMAT=
13069         cf_preform=no
13070         cf_catonly=yes
13071         cf_example=date
13072
13073         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13074         for cf_dir in $MANPATH; do
13075                 test -z "$cf_dir" && cf_dir=/usr/man
13076                 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
13077                 do
13078                         cf_test=`echo $cf_name | sed -e 's/*//'`
13079                         if test "x$cf_test" = "x$cf_name" ; then
13080
13081                                 case "$cf_name" in
13082                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13083                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13084                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13085                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13086                                 esac
13087
13088                                 case "$cf_name" in
13089                                 ($cf_dir/man*)
13090                                         cf_catonly=no
13091                                         ;;
13092                                 ($cf_dir/cat*)
13093                                         cf_preform=yes
13094                                         ;;
13095                                 esac
13096                                 break
13097                         fi
13098
13099                         # if we found a match in either man* or cat*, stop looking
13100                         if test -n "$MANPAGE_FORMAT" ; then
13101                                 cf_found=no
13102                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13103                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13104                                 case "$cf_name" in
13105                                 ($cf_dir/cat*)
13106                                         cf_found=yes
13107                                         ;;
13108                                 esac
13109                                 test $cf_found=yes && break
13110                         fi
13111                 done
13112                 # only check the first directory in $MANPATH where we find manpages
13113                 if test -n "$MANPAGE_FORMAT" ; then
13114                         break
13115                 fi
13116         done
13117         # if we did not find the example, just assume it is normal
13118         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13119         IFS="$ac_save_ifs"
13120         ;;
13121 (*)
13122         for cf_option in $MANPAGE_FORMAT; do
13123         case $cf_option in
13124         (gzip|compress|BSDI|normal|formatted|catonly)
13125                 ;;
13126         (*)
13127                 cf_unknown="$cf_unknown $cf_option"
13128                 ;;
13129         esac
13130         done
13131         ;;
13132 esac
13133
13134 echo "$as_me:13134: result: $MANPAGE_FORMAT" >&5
13135 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13136 if test -n "$cf_unknown" ; then
13137         { echo "$as_me:13137: WARNING: Unexpected manpage-format $cf_unknown" >&5
13138 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13139 fi
13140
13141 echo "$as_me:13141: checking for manpage renaming" >&5
13142 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13143
13144 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13145 if test "${with_manpage_renames+set}" = set; then
13146   withval="$with_manpage_renames"
13147   MANPAGE_RENAMES=$withval
13148 else
13149   MANPAGE_RENAMES=yes
13150 fi;
13151
13152 case ".$MANPAGE_RENAMES" in
13153 (.no)
13154         ;;
13155 (.|.yes)
13156         # Debian 'man' program?
13157         if test -f /etc/debian_version ; then
13158                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13159         else
13160                 MANPAGE_RENAMES=no
13161         fi
13162         ;;
13163 esac
13164
13165 if test "$MANPAGE_RENAMES" != no ; then
13166         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13167                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13168         elif test ! -f $MANPAGE_RENAMES ; then
13169                 { { echo "$as_me:13169: error: not a filename: $MANPAGE_RENAMES" >&5
13170 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13171    { (exit 1); exit 1; }; }
13172         fi
13173
13174         test ! -d man && mkdir man
13175
13176         # Construct a sed-script to perform renaming within man-pages
13177         if test -n "$MANPAGE_RENAMES" ; then
13178                 test ! -d man && mkdir man
13179                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13180         fi
13181 fi
13182
13183 echo "$as_me:13183: result: $MANPAGE_RENAMES" >&5
13184 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13185
13186 echo "$as_me:13186: checking if manpage aliases will be installed" >&5
13187 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13188
13189 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13190 if test "${with_manpage_aliases+set}" = set; then
13191   withval="$with_manpage_aliases"
13192   MANPAGE_ALIASES=$withval
13193 else
13194   MANPAGE_ALIASES=yes
13195 fi;
13196
13197 echo "$as_me:13197: result: $MANPAGE_ALIASES" >&5
13198 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13199
13200 case "x$LN_S" in
13201 (xln*)
13202         cf_use_symlinks=yes
13203         ;;
13204 (*)
13205         cf_use_symlinks=no
13206         ;;
13207 esac
13208
13209 MANPAGE_SYMLINKS=no
13210 if test "$MANPAGE_ALIASES" = yes ; then
13211 echo "$as_me:13211: checking if manpage symlinks should be used" >&5
13212 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13213
13214 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13215 if test "${with_manpage_symlinks+set}" = set; then
13216   withval="$with_manpage_symlinks"
13217   MANPAGE_SYMLINKS=$withval
13218 else
13219   MANPAGE_SYMLINKS=$cf_use_symlinks
13220 fi;
13221
13222 if test "$$cf_use_symlinks" = no; then
13223 if test "$MANPAGE_SYMLINKS" = yes ; then
13224         { echo "$as_me:13224: WARNING: cannot make symlinks" >&5
13225 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13226         MANPAGE_SYMLINKS=no
13227 fi
13228 fi
13229
13230 echo "$as_me:13230: result: $MANPAGE_SYMLINKS" >&5
13231 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13232 fi
13233
13234 echo "$as_me:13234: checking for manpage tbl" >&5
13235 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13236
13237 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13238 if test "${with_manpage_tbl+set}" = set; then
13239   withval="$with_manpage_tbl"
13240   MANPAGE_TBL=$withval
13241 else
13242   MANPAGE_TBL=no
13243 fi;
13244
13245 echo "$as_me:13245: result: $MANPAGE_TBL" >&5
13246 echo "${ECHO_T}$MANPAGE_TBL" >&6
13247
13248 if test "$prefix" = "NONE" ; then
13249         cf_prefix="$ac_default_prefix"
13250 else
13251         cf_prefix="$prefix"
13252 fi
13253
13254 case "$MANPAGE_FORMAT" in
13255 (*catonly*)
13256         cf_format=yes
13257         cf_inboth=no
13258         ;;
13259 (*formatted*)
13260         cf_format=yes
13261         cf_inboth=yes
13262         ;;
13263 (*)
13264         cf_format=no
13265         cf_inboth=no
13266         ;;
13267 esac
13268
13269 test ! -d man && mkdir man
13270
13271 cf_so_strip=
13272 cf_compress=
13273 case "$MANPAGE_FORMAT" in
13274 (*compress*)
13275         cf_so_strip="Z"
13276         cf_compress=compress
13277         ;;
13278 (*gzip*)
13279         cf_so_strip="gz"
13280         cf_compress=gzip
13281         ;;
13282 esac
13283
13284 cf_edit_man=./edit_man.sh
13285 cf_man_alias=`pwd`/man_alias.sed
13286
13287 cat >$cf_edit_man <<CF_EOF
13288 #! $SHELL
13289 # this script is generated by the configure-script CF_MAN_PAGES macro.
13290
13291 prefix="$cf_prefix"
13292 datarootdir="$datarootdir"
13293 datadir="$datadir"
13294
13295 NCURSES_MAJOR="$NCURSES_MAJOR"
13296 NCURSES_MINOR="$NCURSES_MINOR"
13297 NCURSES_PATCH="$NCURSES_PATCH"
13298
13299 NCURSES_OSPEED="$NCURSES_OSPEED"
13300 TERMINFO="$TERMINFO"
13301
13302 INSTALL="$INSTALL"
13303 INSTALL_DATA="$INSTALL_DATA"
13304
13305 transform="$program_transform_name"
13306
13307 TMP=\${TMPDIR:=/tmp}/man\$\$
13308 trap "rm -f \$TMP" 0 1 2 3 15
13309
13310 form=\$1
13311 shift || exit 1
13312
13313 verb=\$1
13314 shift || exit 1
13315
13316 mandir=\$1
13317 shift || exit 1
13318
13319 srcdir=\$1
13320 top_srcdir=\$srcdir/..
13321 shift || exit 1
13322
13323 if test "\$form" = normal ; then
13324         if test "$cf_format" = yes ; then
13325         if test "$cf_inboth" = no ; then
13326                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13327                 exit $?
13328         fi
13329         fi
13330         cf_subdir=\$mandir/man
13331         cf_tables=$MANPAGE_TBL
13332 else
13333         cf_subdir=\$mandir/cat
13334         cf_tables=yes
13335 fi
13336
13337 # process the list of source-files
13338 for i in \$* ; do
13339 case \$i in
13340 (*.orig|*.rej) ;;
13341 (*.[0-9]*)
13342         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13343         if test \$verb = installing ; then
13344         if test ! -d \$cf_subdir\${section} ; then
13345                 mkdir -p \$cf_subdir\$section
13346         fi
13347         fi
13348
13349         # replace variables in man page
13350         if test ! -f $cf_man_alias ; then
13351 cat >>$cf_man_alias <<-CF_EOF2
13352                 s,@DATADIR@,\$datadir,g
13353                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13354                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13355                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13356                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13357                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13358                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13359 CF_EOF
13360
13361         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13362         do
13363                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13364                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13365 cat >>$cf_edit_man <<-CF_EOF
13366                 s,@$cf_NAME@,$cf_name,g
13367 CF_EOF
13368         done
13369
13370 cat >>$cf_edit_man <<CF_EOF
13371 CF_EOF2
13372                 echo "...made $cf_man_alias"
13373         fi
13374
13375         aliases=
13376         cf_source=\`basename \$i\`
13377         inalias=\$cf_source
13378         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13379         if test ! -f \$inalias ; then
13380                 echo .. skipped \$cf_source
13381                 continue
13382         fi
13383 CF_EOF
13384
13385 if test "$MANPAGE_ALIASES" != no ; then
13386 cat >>$cf_edit_man <<CF_EOF
13387         nCurses=ignore.3x
13388         test $with_curses_h = yes && nCurses=ncurses.3x
13389         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13390 CF_EOF
13391 fi
13392
13393 if test "$MANPAGE_RENAMES" = no ; then
13394 cat >>$cf_edit_man <<CF_EOF
13395         # perform program transformations for section 1 man pages
13396         if test \$section = 1 ; then
13397                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13398         else
13399                 cf_target=\$cf_subdir\${section}/\$cf_source
13400         fi
13401 CF_EOF
13402 else
13403 cat >>$cf_edit_man <<CF_EOF
13404         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13405         if test -z "\$cf_target" ; then
13406                 echo '? missing rename for '\$cf_source
13407                 cf_target="\$cf_source"
13408         fi
13409         cf_target="\$cf_subdir\${section}/\${cf_target}"
13410
13411 CF_EOF
13412 fi
13413
13414 cat >>$cf_edit_man <<CF_EOF
13415         sed     -f $cf_man_alias \\
13416 CF_EOF
13417
13418 if test -f $MANPAGE_RENAMES ; then
13419 cat >>$cf_edit_man <<CF_EOF
13420                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13421 CF_EOF
13422 else
13423 cat >>$cf_edit_man <<CF_EOF
13424                 < \$i >\$TMP
13425 CF_EOF
13426 fi
13427
13428 cat >>$cf_edit_man <<CF_EOF
13429 if test \$cf_tables = yes ; then
13430         tbl \$TMP >\$TMP.out
13431         mv \$TMP.out \$TMP
13432 fi
13433 CF_EOF
13434
13435 if test $with_overwrite != yes ; then
13436 cat >>$cf_edit_man <<CF_EOF
13437         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13438         mv \$TMP.out \$TMP
13439 CF_EOF
13440 fi
13441
13442 if test $with_curses_h != yes ; then
13443 cat >>$cf_edit_man <<CF_EOF
13444         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13445         mv \$TMP.out \$TMP
13446 CF_EOF
13447 fi
13448
13449 cat >>$cf_edit_man <<CF_EOF
13450         if test \$form = format ; then
13451                 nroff -man \$TMP >\$TMP.out
13452                 mv \$TMP.out \$TMP
13453         fi
13454 CF_EOF
13455
13456 if test -n "$cf_compress" ; then
13457 cat >>$cf_edit_man <<CF_EOF
13458         if test \$verb = installing ; then
13459         if ( $cf_compress -f \$TMP )
13460         then
13461                 mv \$TMP.$cf_so_strip \$TMP
13462         fi
13463         fi
13464         cf_target="\$cf_target.$cf_so_strip"
13465 CF_EOF
13466 fi
13467
13468 case "$MANPAGE_FORMAT" in
13469 (*BSDI*)
13470 cat >>$cf_edit_man <<CF_EOF
13471         if test \$form = format ; then
13472                 # BSDI installs only .0 suffixes in the cat directories
13473                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13474         fi
13475 CF_EOF
13476   ;;
13477 esac
13478
13479 cat >>$cf_edit_man <<CF_EOF
13480         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13481         if test \$verb = installing ; then
13482                 echo \$verb \$cf_target
13483                 \$INSTALL_DATA \$TMP \$cf_target
13484                 test -d \$cf_subdir\${section} &&
13485                 test -n "\$aliases" && (
13486                         cd \$cf_subdir\${section} && (
13487                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13488                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13489                                 cf_target=\`basename \$cf_target\`
13490                                 for cf_alias in \$aliases
13491                                 do
13492                                         if test \$section = 1 ; then
13493                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13494                                         fi
13495
13496                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13497                                                 if test -f \$cf_alias\${suffix} ; then
13498                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13499                                                         then
13500                                                                 continue
13501                                                         fi
13502                                                 fi
13503                                                 echo .. \$verb alias \$cf_alias\${suffix}
13504 CF_EOF
13505 case "x$LN_S" in
13506 (*-f)
13507 cat >>$cf_edit_man <<CF_EOF
13508                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13509 CF_EOF
13510         ;;
13511 (*)
13512 cat >>$cf_edit_man <<CF_EOF
13513                                                 rm -f \$cf_alias\${suffix}
13514                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13515 CF_EOF
13516         ;;
13517 esac
13518 cat >>$cf_edit_man <<CF_EOF
13519                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13520                                                 echo ".so \$cf_source" >\$TMP
13521 CF_EOF
13522 if test -n "$cf_compress" ; then
13523 cat >>$cf_edit_man <<CF_EOF
13524                                                 if test -n "$cf_so_strip" ; then
13525                                                         $cf_compress -f \$TMP
13526                                                         mv \$TMP.$cf_so_strip \$TMP
13527                                                 fi
13528 CF_EOF
13529 fi
13530 cat >>$cf_edit_man <<CF_EOF
13531                                                 echo .. \$verb alias \$cf_alias\${suffix}
13532                                                 rm -f \$cf_alias\${suffix}
13533                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13534                                         fi
13535                                 done
13536                         )
13537                 )
13538         elif test \$verb = removing ; then
13539                 test -f \$cf_target && (
13540                         echo \$verb \$cf_target
13541                         rm -f \$cf_target
13542                 )
13543                 test -d \$cf_subdir\${section} &&
13544                 test -n "\$aliases" && (
13545                         cd \$cf_subdir\${section} && (
13546                                 for cf_alias in \$aliases
13547                                 do
13548                                         if test \$section = 1 ; then
13549                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13550                                         fi
13551
13552                                         echo .. \$verb alias \$cf_alias\${suffix}
13553                                         rm -f \$cf_alias\${suffix}
13554                                 done
13555                         )
13556                 )
13557         else
13558 #               echo ".hy 0"
13559                 cat \$TMP
13560         fi
13561         ;;
13562 esac
13563 done
13564
13565 if test $cf_inboth = yes ; then
13566 if test \$form != format ; then
13567         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13568 fi
13569 fi
13570
13571 exit 0
13572 CF_EOF
13573 chmod 755 $cf_edit_man
13574
13575 ###############################################################################
13576
13577 ### Note that some functions (such as const) are normally disabled anyway.
13578 echo "$as_me:13578: checking if you want to build with function extensions" >&5
13579 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13580
13581 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13582 if test "${enable_ext_funcs+set}" = set; then
13583   enableval="$enable_ext_funcs"
13584   with_ext_funcs=$enableval
13585 else
13586   with_ext_funcs=yes
13587 fi;
13588 echo "$as_me:13588: result: $with_ext_funcs" >&5
13589 echo "${ECHO_T}$with_ext_funcs" >&6
13590 if test "x$with_ext_funcs" = xyes ; then
13591         NCURSES_EXT_FUNCS=1
13592
13593 cat >>confdefs.h <<\EOF
13594 #define NCURSES_EXT_FUNCS 1
13595 EOF
13596
13597 cat >>confdefs.h <<\EOF
13598 #define HAVE_ASSUME_DEFAULT_COLORS 1
13599 EOF
13600
13601 cat >>confdefs.h <<\EOF
13602 #define HAVE_CURSES_VERSION 1
13603 EOF
13604
13605 cat >>confdefs.h <<\EOF
13606 #define HAVE_HAS_KEY 1
13607 EOF
13608
13609 cat >>confdefs.h <<\EOF
13610 #define HAVE_RESIZETERM 1
13611 EOF
13612
13613 cat >>confdefs.h <<\EOF
13614 #define HAVE_RESIZE_TERM 1
13615 EOF
13616
13617 cat >>confdefs.h <<\EOF
13618 #define HAVE_TERM_ENTRY_H 1
13619 EOF
13620
13621 cat >>confdefs.h <<\EOF
13622 #define HAVE_USE_DEFAULT_COLORS 1
13623 EOF
13624
13625 cat >>confdefs.h <<\EOF
13626 #define HAVE_USE_EXTENDED_NAMES 1
13627 EOF
13628
13629 cat >>confdefs.h <<\EOF
13630 #define HAVE_USE_SCREEN 1
13631 EOF
13632
13633 cat >>confdefs.h <<\EOF
13634 #define HAVE_USE_WINDOW 1
13635 EOF
13636
13637 cat >>confdefs.h <<\EOF
13638 #define HAVE_WRESIZE 1
13639 EOF
13640
13641         GENERATED_EXT_FUNCS=generated
13642         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13643 else
13644         NCURSES_EXT_FUNCS=0
13645         GENERATED_EXT_FUNCS=
13646 fi
13647
13648 echo "$as_me:13648: checking if you want to build with SCREEN extensions" >&5
13649 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13650
13651 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13652 if test "${enable_sp_funcs+set}" = set; then
13653   enableval="$enable_sp_funcs"
13654   with_sp_funcs=$enableval
13655 else
13656   with_sp_funcs=$cf_dft_ext_spfuncs
13657 fi;
13658 echo "$as_me:13658: result: $with_sp_funcs" >&5
13659 echo "${ECHO_T}$with_sp_funcs" >&6
13660 if test "x$with_sp_funcs" = xyes ; then
13661         NCURSES_SP_FUNCS=1
13662
13663 cat >>confdefs.h <<\EOF
13664 #define NCURSES_SP_FUNCS 1
13665 EOF
13666
13667 cat >>confdefs.h <<\EOF
13668 #define HAVE_TPUTS_SP 1
13669 EOF
13670
13671         GENERATED_SP_FUNCS=generated
13672 else
13673         NCURSES_SP_FUNCS=0
13674         GENERATED_SP_FUNCS=
13675 fi
13676
13677 echo "$as_me:13677: checking if you want to build with terminal-driver" >&5
13678 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13679
13680 # Check whether --enable-term-driver or --disable-term-driver was given.
13681 if test "${enable_term_driver+set}" = set; then
13682   enableval="$enable_term_driver"
13683   with_term_driver=$enableval
13684 else
13685   with_term_driver=no
13686 fi;
13687 echo "$as_me:13687: result: $with_term_driver" >&5
13688 echo "${ECHO_T}$with_term_driver" >&6
13689 if test "x$with_term_driver" = xyes ; then
13690
13691 cat >>confdefs.h <<\EOF
13692 #define USE_TERM_DRIVER 1
13693 EOF
13694
13695         if test "x$with_termlib" != xno ; then
13696                 { { echo "$as_me:13696: error: The term-driver option conflicts with the termlib option" >&5
13697 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13698    { (exit 1); exit 1; }; }
13699         fi
13700         if test "x$with_sp_funcs" != xyes ; then
13701                 { { echo "$as_me:13701: error: The term-driver option relies upon sp-funcs" >&5
13702 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13703    { (exit 1); exit 1; }; }
13704         fi
13705 fi
13706
13707 ###   use option --enable-const to turn on use of const beyond that in XSI.
13708 echo "$as_me:13708: checking for extended use of const keyword" >&5
13709 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13710
13711 # Check whether --enable-const or --disable-const was given.
13712 if test "${enable_const+set}" = set; then
13713   enableval="$enable_const"
13714   with_ext_const=$enableval
13715 else
13716   with_ext_const=$cf_dft_ext_const
13717 fi;
13718 echo "$as_me:13718: result: $with_ext_const" >&5
13719 echo "${ECHO_T}$with_ext_const" >&6
13720 NCURSES_CONST='/*nothing*/'
13721 if test "x$with_ext_const" = xyes ; then
13722         NCURSES_CONST=const
13723 fi
13724
13725 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13726 echo "$as_me:13726: checking if you want to use extended colors" >&5
13727 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13728
13729 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13730 if test "${enable_ext_colors+set}" = set; then
13731   enableval="$enable_ext_colors"
13732   with_ext_colors=$enableval
13733 else
13734   with_ext_colors=$cf_dft_ext_colors
13735 fi;
13736 echo "$as_me:13736: result: $with_ext_colors" >&5
13737 echo "${ECHO_T}$with_ext_colors" >&6
13738 NCURSES_EXT_COLORS=0
13739 if test "x$with_ext_colors" = xyes ; then
13740         if test "x$with_widec" != xyes ; then
13741                 { echo "$as_me:13741: WARNING: This option applies only to wide-character library" >&5
13742 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13743         else
13744                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13745
13746 if test "${with_abi_version+set}" != set; then
13747         case $cf_cv_rel_version in
13748         (5.*)
13749                 cf_cv_rel_version=6.0
13750                 cf_cv_abi_version=6
13751                 { echo "$as_me:13751: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13752 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13753                 ;;
13754         esac
13755 fi
13756
13757                 NCURSES_EXT_COLORS=1
13758
13759 cat >>confdefs.h <<\EOF
13760 #define NCURSES_EXT_COLORS 1
13761 EOF
13762
13763 cat >>confdefs.h <<\EOF
13764 #define HAVE_ALLOC_PAIR 1
13765 EOF
13766
13767 cat >>confdefs.h <<\EOF
13768 #define HAVE_INIT_EXTENDED_COLOR 1
13769 EOF
13770
13771 cat >>confdefs.h <<\EOF
13772 #define HAVE_RESET_COLOR_PAIRS 1
13773 EOF
13774
13775         fi
13776 fi
13777
13778 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13779 echo "$as_me:13779: checking if you want to use extended mouse encoding" >&5
13780 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13781
13782 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13783 if test "${enable_ext_mouse+set}" = set; then
13784   enableval="$enable_ext_mouse"
13785   with_ext_mouse=$enableval
13786 else
13787   with_ext_mouse=$cf_dft_ext_mouse
13788 fi;
13789 echo "$as_me:13789: result: $with_ext_mouse" >&5
13790 echo "${ECHO_T}$with_ext_mouse" >&6
13791 NCURSES_MOUSE_VERSION=1
13792 if test "x$with_ext_mouse" = xyes ; then
13793         NCURSES_MOUSE_VERSION=2
13794
13795 if test "${with_abi_version+set}" != set; then
13796         case $cf_cv_rel_version in
13797         (5.*)
13798                 cf_cv_rel_version=6.0
13799                 cf_cv_abi_version=6
13800                 { echo "$as_me:13800: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13801 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13802                 ;;
13803         esac
13804 fi
13805
13806 fi
13807
13808 ###   use option --enable-ext-putwin to turn on extended screendumps
13809 echo "$as_me:13809: checking if you want to use extended putwin/screendump" >&5
13810 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13811
13812 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13813 if test "${enable_ext_putwin+set}" = set; then
13814   enableval="$enable_ext_putwin"
13815   with_ext_putwin=$enableval
13816 else
13817   with_ext_putwin=$cf_dft_ext_putwin
13818 fi;
13819 echo "$as_me:13819: result: $with_ext_putwin" >&5
13820 echo "${ECHO_T}$with_ext_putwin" >&6
13821 if test "x$with_ext_putwin" = xyes ; then
13822
13823 cat >>confdefs.h <<\EOF
13824 #define NCURSES_EXT_PUTWIN 1
13825 EOF
13826
13827 fi
13828
13829 echo "$as_me:13829: checking if you want \$NCURSES_NO_PADDING code" >&5
13830 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
13831
13832 # Check whether --enable-no-padding or --disable-no-padding was given.
13833 if test "${enable_no_padding+set}" = set; then
13834   enableval="$enable_no_padding"
13835   with_no_padding=$enableval
13836 else
13837   with_no_padding=$with_ext_funcs
13838 fi;
13839 echo "$as_me:13839: result: $with_no_padding" >&5
13840 echo "${ECHO_T}$with_no_padding" >&6
13841 test "x$with_no_padding" = xyes &&
13842 cat >>confdefs.h <<\EOF
13843 #define NCURSES_NO_PADDING 1
13844 EOF
13845
13846 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
13847 echo "$as_me:13847: checking if you want SIGWINCH handler" >&5
13848 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
13849
13850 # Check whether --enable-sigwinch or --disable-sigwinch was given.
13851 if test "${enable_sigwinch+set}" = set; then
13852   enableval="$enable_sigwinch"
13853   with_sigwinch=$enableval
13854 else
13855   with_sigwinch=$with_ext_funcs
13856 fi;
13857 echo "$as_me:13857: result: $with_sigwinch" >&5
13858 echo "${ECHO_T}$with_sigwinch" >&6
13859 test "x$with_sigwinch" = xyes &&
13860 cat >>confdefs.h <<\EOF
13861 #define USE_SIGWINCH 1
13862 EOF
13863
13864 ###   use option --enable-tcap-names to allow user to define new capabilities
13865 echo "$as_me:13865: checking if you want user-definable terminal capabilities like termcap" >&5
13866 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
13867
13868 # Check whether --enable-tcap-names or --disable-tcap-names was given.
13869 if test "${enable_tcap_names+set}" = set; then
13870   enableval="$enable_tcap_names"
13871   with_tcap_names=$enableval
13872 else
13873   with_tcap_names=$with_ext_funcs
13874 fi;
13875 echo "$as_me:13875: result: $with_tcap_names" >&5
13876 echo "${ECHO_T}$with_tcap_names" >&6
13877 NCURSES_XNAMES=0
13878 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
13879
13880 ##############################################################################
13881
13882 echo "$as_me:13882: checking if you want to link with the pthread library" >&5
13883 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13884
13885 # Check whether --with-pthread or --without-pthread was given.
13886 if test "${with_pthread+set}" = set; then
13887   withval="$with_pthread"
13888   with_pthread=$withval
13889 else
13890   with_pthread=no
13891 fi;
13892 echo "$as_me:13892: result: $with_pthread" >&5
13893 echo "${ECHO_T}$with_pthread" >&6
13894
13895 if test "$with_pthread" != no ; then
13896         echo "$as_me:13896: checking for pthread.h" >&5
13897 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13898 if test "${ac_cv_header_pthread_h+set}" = set; then
13899   echo $ECHO_N "(cached) $ECHO_C" >&6
13900 else
13901   cat >conftest.$ac_ext <<_ACEOF
13902 #line 13902 "configure"
13903 #include "confdefs.h"
13904 #include <pthread.h>
13905 _ACEOF
13906 if { (eval echo "$as_me:13906: \"$ac_cpp conftest.$ac_ext\"") >&5
13907   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13908   ac_status=$?
13909   egrep -v '^ *\+' conftest.er1 >conftest.err
13910   rm -f conftest.er1
13911   cat conftest.err >&5
13912   echo "$as_me:13912: \$? = $ac_status" >&5
13913   (exit $ac_status); } >/dev/null; then
13914   if test -s conftest.err; then
13915     ac_cpp_err=$ac_c_preproc_warn_flag
13916   else
13917     ac_cpp_err=
13918   fi
13919 else
13920   ac_cpp_err=yes
13921 fi
13922 if test -z "$ac_cpp_err"; then
13923   ac_cv_header_pthread_h=yes
13924 else
13925   echo "$as_me: failed program was:" >&5
13926   cat conftest.$ac_ext >&5
13927   ac_cv_header_pthread_h=no
13928 fi
13929 rm -f conftest.err conftest.$ac_ext
13930 fi
13931 echo "$as_me:13931: result: $ac_cv_header_pthread_h" >&5
13932 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13933 if test $ac_cv_header_pthread_h = yes; then
13934
13935 cat >>confdefs.h <<\EOF
13936 #define HAVE_PTHREADS_H 1
13937 EOF
13938
13939         for cf_lib_pthread in pthread c_r
13940         do
13941             echo "$as_me:13941: checking if we can link with the $cf_lib_pthread library" >&5
13942 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13943             cf_save_LIBS="$LIBS"
13944
13945 cf_add_libs="-l$cf_lib_pthread"
13946 # Filter out duplicates - this happens with badly-designed ".pc" files...
13947 for cf_add_1lib in $LIBS
13948 do
13949         for cf_add_2lib in $cf_add_libs
13950         do
13951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13952                 then
13953                         cf_add_1lib=
13954                         break
13955                 fi
13956         done
13957         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13958 done
13959 LIBS="$cf_add_libs"
13960
13961             cat >conftest.$ac_ext <<_ACEOF
13962 #line 13962 "configure"
13963 #include "confdefs.h"
13964
13965 #include <pthread.h>
13966
13967 int
13968 main (void)
13969 {
13970
13971                 int rc = pthread_create(0,0,0,0);
13972                 int r2 = pthread_mutexattr_settype(0, 0);
13973
13974   ;
13975   return 0;
13976 }
13977 _ACEOF
13978 rm -f conftest.$ac_objext conftest$ac_exeext
13979 if { (eval echo "$as_me:13979: \"$ac_link\"") >&5
13980   (eval $ac_link) 2>&5
13981   ac_status=$?
13982   echo "$as_me:13982: \$? = $ac_status" >&5
13983   (exit $ac_status); } &&
13984          { ac_try='test -s conftest$ac_exeext'
13985   { (eval echo "$as_me:13985: \"$ac_try\"") >&5
13986   (eval $ac_try) 2>&5
13987   ac_status=$?
13988   echo "$as_me:13988: \$? = $ac_status" >&5
13989   (exit $ac_status); }; }; then
13990   with_pthread=yes
13991 else
13992   echo "$as_me: failed program was:" >&5
13993 cat conftest.$ac_ext >&5
13994 with_pthread=no
13995 fi
13996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13997             LIBS="$cf_save_LIBS"
13998             echo "$as_me:13998: result: $with_pthread" >&5
13999 echo "${ECHO_T}$with_pthread" >&6
14000             test "$with_pthread" = yes && break
14001         done
14002
14003         if test "$with_pthread" = yes ; then
14004
14005 cf_add_libs="-l$cf_lib_pthread"
14006 # Filter out duplicates - this happens with badly-designed ".pc" files...
14007 for cf_add_1lib in $LIBS
14008 do
14009         for cf_add_2lib in $cf_add_libs
14010         do
14011                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14012                 then
14013                         cf_add_1lib=
14014                         break
14015                 fi
14016         done
14017         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14018 done
14019 LIBS="$cf_add_libs"
14020
14021 cat >>confdefs.h <<\EOF
14022 #define HAVE_LIBPTHREADS 1
14023 EOF
14024
14025         else
14026             { { echo "$as_me:14026: error: Cannot link with pthread library" >&5
14027 echo "$as_me: error: Cannot link with pthread library" >&2;}
14028    { (exit 1); exit 1; }; }
14029         fi
14030
14031 fi
14032
14033 fi
14034
14035 if test "x$with_pthread" != xno; then
14036         echo "$as_me:14036: checking for pthread_kill" >&5
14037 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14038 if test "${ac_cv_func_pthread_kill+set}" = set; then
14039   echo $ECHO_N "(cached) $ECHO_C" >&6
14040 else
14041   cat >conftest.$ac_ext <<_ACEOF
14042 #line 14042 "configure"
14043 #include "confdefs.h"
14044 /* System header to define __stub macros and hopefully few prototypes,
14045     which can conflict with char pthread_kill (); below.  */
14046 #include <assert.h>
14047 /* Override any gcc2 internal prototype to avoid an error.  */
14048 #ifdef __cplusplus
14049 extern "C"
14050 #endif
14051 /* We use char because int might match the return type of a gcc2
14052    builtin and then its argument prototype would still apply.  */
14053 char pthread_kill ();
14054 char (*f) ();
14055
14056 int
14057 main (void)
14058 {
14059 /* The GNU C library defines this for functions which it implements
14060     to always fail with ENOSYS.  Some functions are actually named
14061     something starting with __ and the normal name is an alias.  */
14062 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14063 choke me
14064 #else
14065 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14066 #endif
14067
14068   ;
14069   return 0;
14070 }
14071 _ACEOF
14072 rm -f conftest.$ac_objext conftest$ac_exeext
14073 if { (eval echo "$as_me:14073: \"$ac_link\"") >&5
14074   (eval $ac_link) 2>&5
14075   ac_status=$?
14076   echo "$as_me:14076: \$? = $ac_status" >&5
14077   (exit $ac_status); } &&
14078          { ac_try='test -s conftest$ac_exeext'
14079   { (eval echo "$as_me:14079: \"$ac_try\"") >&5
14080   (eval $ac_try) 2>&5
14081   ac_status=$?
14082   echo "$as_me:14082: \$? = $ac_status" >&5
14083   (exit $ac_status); }; }; then
14084   ac_cv_func_pthread_kill=yes
14085 else
14086   echo "$as_me: failed program was:" >&5
14087 cat conftest.$ac_ext >&5
14088 ac_cv_func_pthread_kill=no
14089 fi
14090 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14091 fi
14092 echo "$as_me:14092: result: $ac_cv_func_pthread_kill" >&5
14093 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14094 if test $ac_cv_func_pthread_kill = yes; then
14095
14096                 echo "$as_me:14096: checking if you want to allow EINTR in wgetch with pthreads" >&5
14097 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14098
14099 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14100 if test "${enable_pthreads_eintr+set}" = set; then
14101   enableval="$enable_pthreads_eintr"
14102   use_pthreads_eintr=$enableval
14103 else
14104   use_pthreads_eintr=no
14105 fi;
14106                 echo "$as_me:14106: result: $use_pthreads_eintr" >&5
14107 echo "${ECHO_T}$use_pthreads_eintr" >&6
14108                 if test "x$use_pthreads_eintr" = xyes ; then
14109
14110 cat >>confdefs.h <<\EOF
14111 #define USE_PTHREADS_EINTR 1
14112 EOF
14113
14114                 fi
14115 fi
14116
14117         echo "$as_me:14117: checking if you want to use weak-symbols for pthreads" >&5
14118 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14119
14120 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14121 if test "${enable_weak_symbols+set}" = set; then
14122   enableval="$enable_weak_symbols"
14123   use_weak_symbols=$enableval
14124 else
14125   use_weak_symbols=no
14126 fi;
14127         echo "$as_me:14127: result: $use_weak_symbols" >&5
14128 echo "${ECHO_T}$use_weak_symbols" >&6
14129         if test "x$use_weak_symbols" = xyes ; then
14130
14131 echo "$as_me:14131: checking if $CC supports weak symbols" >&5
14132 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14133 if test "${cf_cv_weak_symbols+set}" = set; then
14134   echo $ECHO_N "(cached) $ECHO_C" >&6
14135 else
14136
14137 cat >conftest.$ac_ext <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14140
14141 #include <stdio.h>
14142 int
14143 main (void)
14144 {
14145
14146 #if defined(__GNUC__)
14147 #  if defined __USE_ISOC99
14148 #    define _cat_pragma(exp)    _Pragma(#exp)
14149 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14150 #  else
14151 #    define _weak_pragma(exp)
14152 #  endif
14153 #  define _declare(name)        __extension__ extern __typeof__(name) name
14154 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14155 #endif
14156
14157 weak_symbol(fopen);
14158
14159   ;
14160   return 0;
14161 }
14162 _ACEOF
14163 rm -f conftest.$ac_objext
14164 if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5
14165   (eval $ac_compile) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); } &&
14169          { ac_try='test -s conftest.$ac_objext'
14170   { (eval echo "$as_me:14170: \"$ac_try\"") >&5
14171   (eval $ac_try) 2>&5
14172   ac_status=$?
14173   echo "$as_me:14173: \$? = $ac_status" >&5
14174   (exit $ac_status); }; }; then
14175   cf_cv_weak_symbols=yes
14176 else
14177   echo "$as_me: failed program was:" >&5
14178 cat conftest.$ac_ext >&5
14179 cf_cv_weak_symbols=no
14180 fi
14181 rm -f conftest.$ac_objext conftest.$ac_ext
14182
14183 fi
14184 echo "$as_me:14184: result: $cf_cv_weak_symbols" >&5
14185 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14186
14187         else
14188                 cf_cv_weak_symbols=no
14189         fi
14190
14191         if test "x$cf_cv_weak_symbols" = xyes ; then
14192
14193 cat >>confdefs.h <<\EOF
14194 #define USE_WEAK_SYMBOLS 1
14195 EOF
14196
14197         fi
14198 fi
14199
14200 PTHREAD=
14201 if test "x$with_pthread" = "xyes" ; then
14202
14203 cat >>confdefs.h <<\EOF
14204 #define USE_PTHREADS 1
14205 EOF
14206
14207         enable_reentrant=yes
14208         if test "x$cf_cv_weak_symbols" = xyes ; then
14209                 PTHREAD=-lpthread
14210
14211 cf_add_libs="-lpthread"
14212 # Filter out duplicates - this happens with badly-designed ".pc" files...
14213 for cf_add_1lib in $PRIVATE_LIBS
14214 do
14215         for cf_add_2lib in $cf_add_libs
14216         do
14217                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14218                 then
14219                         cf_add_1lib=
14220                         break
14221                 fi
14222         done
14223         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14224 done
14225 PRIVATE_LIBS="$cf_add_libs"
14226
14227         fi
14228 fi
14229
14230 # Reentrant code has to be opaque; there's little advantage to making ncurses
14231 # opaque outside of that, so there is no --enable-opaque option.  We can use
14232 # this option without --with-pthreads, but this will be always set for
14233 # pthreads.
14234 echo "$as_me:14234: checking if you want reentrant code" >&5
14235 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14236
14237 # Check whether --enable-reentrant or --disable-reentrant was given.
14238 if test "${enable_reentrant+set}" = set; then
14239   enableval="$enable_reentrant"
14240   with_reentrant=$enableval
14241 else
14242   with_reentrant=no
14243 fi;
14244 echo "$as_me:14244: result: $with_reentrant" >&5
14245 echo "${ECHO_T}$with_reentrant" >&6
14246 if test "x$with_reentrant" = xyes ; then
14247         cf_cv_enable_reentrant=1
14248         cf_cv_enable_opaque="NCURSES_INTERNALS"
14249         NCURSES_SIZE_T=int
14250         if test "x$cf_cv_weak_symbols" = xyes ; then
14251
14252 # remove pthread library from $LIBS
14253 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14254
14255 cf_add_libs="-lpthread"
14256 # Filter out duplicates - this happens with badly-designed ".pc" files...
14257 for cf_add_1lib in $TEST_LIBS
14258 do
14259         for cf_add_2lib in $cf_add_libs
14260         do
14261                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14262                 then
14263                         cf_add_1lib=
14264                         break
14265                 fi
14266         done
14267         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14268 done
14269 TEST_LIBS="$cf_add_libs"
14270
14271 cf_add_libs="-lpthread"
14272 # Filter out duplicates - this happens with badly-designed ".pc" files...
14273 for cf_add_1lib in $TEST_LIBS2
14274 do
14275         for cf_add_2lib in $cf_add_libs
14276         do
14277                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14278                 then
14279                         cf_add_1lib=
14280                         break
14281                 fi
14282         done
14283         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14284 done
14285 TEST_LIBS2="$cf_add_libs"
14286
14287 cf_add_libs="-lpthread"
14288 # Filter out duplicates - this happens with badly-designed ".pc" files...
14289 for cf_add_1lib in $PRIVATE_LIBS
14290 do
14291         for cf_add_2lib in $cf_add_libs
14292         do
14293                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14294                 then
14295                         cf_add_1lib=
14296                         break
14297                 fi
14298         done
14299         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14300 done
14301 PRIVATE_LIBS="$cf_add_libs"
14302
14303         else
14304                 # when not using weak symbols but with_reentrant,
14305                 # add 't' to the library suffix on all platforms
14306                 # except cygwin, where we only do that if ALSO
14307                 # compiling with full thread support.
14308                 case "$host" in
14309                 (*cygwin* | *msys*)
14310                         if test "$with_pthread" = "yes" ; then
14311                                 if test "x$disable_lib_suffixes" = "xno" ; then
14312                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14313                                 fi
14314                         fi ;;
14315                 (*)
14316                         if test "x$disable_lib_suffixes" = "xno" ; then
14317                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14318                         fi
14319                         ;;
14320                 esac
14321         fi
14322
14323 cat >>confdefs.h <<\EOF
14324 #define USE_REENTRANT 1
14325 EOF
14326
14327 if test "${with_abi_version+set}" != set; then
14328         case $cf_cv_rel_version in
14329         (5.*)
14330                 cf_cv_rel_version=6.0
14331                 cf_cv_abi_version=6
14332                 { echo "$as_me:14332: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14333 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14334                 ;;
14335         esac
14336 fi
14337
14338 else
14339         cf_cv_enable_reentrant=0
14340         cf_cv_enable_opaque="NCURSES_OPAQUE"
14341         NCURSES_SIZE_T=short
14342 fi
14343
14344 echo "$as_me:14344: checking if you want opaque curses-library structures" >&5
14345 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14346
14347 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14348 if test "${enable_opaque_curses+set}" = set; then
14349   enableval="$enable_opaque_curses"
14350   test "$enableval" != yes && enableval=no
14351         if test "$enableval" != "no" ; then
14352     enable_opaque_curses=yes
14353         else
14354
14355          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14356          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14357
14358         fi
14359 else
14360   enableval=no
14361
14362          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14363          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14364
14365 fi;
14366 echo "$as_me:14366: result: $enable_opaque_curses" >&5
14367 echo "${ECHO_T}$enable_opaque_curses" >&6
14368
14369 test "$cf_cv_enable_reentrant" = 1 && \
14370 test "$enable_opaque_curses" = no && \
14371 { { echo "$as_me:14371: error: reentrant configuration requires opaque library" >&5
14372 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14373    { (exit 1); exit 1; }; }
14374
14375 echo "$as_me:14375: checking if you want opaque form-library structures" >&5
14376 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14377
14378 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14379 if test "${enable_opaque_form+set}" = set; then
14380   enableval="$enable_opaque_form"
14381   enable_opaque_form=yes
14382 else
14383   enable_opaque_form=no
14384 fi;
14385 echo "$as_me:14385: result: $enable_opaque_form" >&5
14386 echo "${ECHO_T}$enable_opaque_form" >&6
14387
14388 echo "$as_me:14388: checking if you want opaque menu-library structures" >&5
14389 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14390
14391 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14392 if test "${enable_opaque_menu+set}" = set; then
14393   enableval="$enable_opaque_menu"
14394   enable_opaque_menu=yes
14395 else
14396   enable_opaque_menu=no
14397 fi;
14398 echo "$as_me:14398: result: $enable_opaque_menu" >&5
14399 echo "${ECHO_T}$enable_opaque_menu" >&6
14400
14401 echo "$as_me:14401: checking if you want opaque panel-library structures" >&5
14402 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14403
14404 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14405 if test "${enable_opaque_panel+set}" = set; then
14406   enableval="$enable_opaque_panel"
14407   enable_opaque_panel=yes
14408 else
14409   enable_opaque_panel=no
14410 fi;
14411 echo "$as_me:14411: result: $enable_opaque_panel" >&5
14412 echo "${ECHO_T}$enable_opaque_panel" >&6
14413
14414 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14415 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14416 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14417 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14418
14419 ### Allow using a different wrap-prefix
14420 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14421         echo "$as_me:14421: checking for prefix used to wrap public variables" >&5
14422 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14423
14424 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14425 if test "${with_wrap_prefix+set}" = set; then
14426   withval="$with_wrap_prefix"
14427   NCURSES_WRAP_PREFIX=$withval
14428 else
14429   NCURSES_WRAP_PREFIX=_nc_
14430 fi;
14431         echo "$as_me:14431: result: $NCURSES_WRAP_PREFIX" >&5
14432 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14433 else
14434         NCURSES_WRAP_PREFIX=_nc_
14435 fi
14436
14437 cat >>confdefs.h <<EOF
14438 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14439 EOF
14440
14441 ###############################################################################
14442 # These options are relatively safe to experiment with.
14443
14444 echo "$as_me:14444: checking if you want all development code" >&5
14445 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14446
14447 # Check whether --with-develop or --without-develop was given.
14448 if test "${with_develop+set}" = set; then
14449   withval="$with_develop"
14450   with_develop=$withval
14451 else
14452   with_develop=no
14453 fi;
14454 echo "$as_me:14454: result: $with_develop" >&5
14455 echo "${ECHO_T}$with_develop" >&6
14456
14457 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14458 echo "$as_me:14458: checking if you want hard-tabs code" >&5
14459 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14460
14461 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14462 if test "${enable_hard_tabs+set}" = set; then
14463   enableval="$enable_hard_tabs"
14464
14465 else
14466   enable_hard_tabs=$with_develop
14467 fi;
14468 echo "$as_me:14468: result: $enable_hard_tabs" >&5
14469 echo "${ECHO_T}$enable_hard_tabs" >&6
14470 test "x$enable_hard_tabs" = xyes &&
14471 cat >>confdefs.h <<\EOF
14472 #define USE_HARD_TABS 1
14473 EOF
14474
14475 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14476 echo "$as_me:14476: checking if you want limited support for xmc" >&5
14477 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14478
14479 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14480 if test "${enable_xmc_glitch+set}" = set; then
14481   enableval="$enable_xmc_glitch"
14482
14483 else
14484   enable_xmc_glitch=$with_develop
14485 fi;
14486 echo "$as_me:14486: result: $enable_xmc_glitch" >&5
14487 echo "${ECHO_T}$enable_xmc_glitch" >&6
14488 test "x$enable_xmc_glitch" = xyes &&
14489 cat >>confdefs.h <<\EOF
14490 #define USE_XMC_SUPPORT 1
14491 EOF
14492
14493 ###############################################################################
14494 # These are just experimental, probably should not be in a package:
14495
14496 echo "$as_me:14496: checking if you do not want to assume colors are white-on-black" >&5
14497 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14498
14499 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14500 if test "${enable_assumed_color+set}" = set; then
14501   enableval="$enable_assumed_color"
14502   with_assumed_color=$enableval
14503 else
14504   with_assumed_color=yes
14505 fi;
14506 echo "$as_me:14506: result: $with_assumed_color" >&5
14507 echo "${ECHO_T}$with_assumed_color" >&6
14508 test "x$with_assumed_color" = xyes &&
14509 cat >>confdefs.h <<\EOF
14510 #define USE_ASSUMED_COLOR 1
14511 EOF
14512
14513 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14514 echo "$as_me:14514: checking if you want hashmap scrolling-optimization code" >&5
14515 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14516
14517 # Check whether --enable-hashmap or --disable-hashmap was given.
14518 if test "${enable_hashmap+set}" = set; then
14519   enableval="$enable_hashmap"
14520   with_hashmap=$enableval
14521 else
14522   with_hashmap=yes
14523 fi;
14524 echo "$as_me:14524: result: $with_hashmap" >&5
14525 echo "${ECHO_T}$with_hashmap" >&6
14526 test "x$with_hashmap" = xyes &&
14527 cat >>confdefs.h <<\EOF
14528 #define USE_HASHMAP 1
14529 EOF
14530
14531 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14532 echo "$as_me:14532: checking if you want colorfgbg code" >&5
14533 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14534
14535 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14536 if test "${enable_colorfgbg+set}" = set; then
14537   enableval="$enable_colorfgbg"
14538   with_colorfgbg=$enableval
14539 else
14540   with_colorfgbg=no
14541 fi;
14542 echo "$as_me:14542: result: $with_colorfgbg" >&5
14543 echo "${ECHO_T}$with_colorfgbg" >&6
14544 test "x$with_colorfgbg" = xyes &&
14545 cat >>confdefs.h <<\EOF
14546 #define USE_COLORFGBG 1
14547 EOF
14548
14549 ###   use option --enable-interop to turn on use of bindings used for interop
14550 echo "$as_me:14550: checking if you want interop bindings" >&5
14551 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14552
14553 # Check whether --enable-interop or --disable-interop was given.
14554 if test "${enable_interop+set}" = set; then
14555   enableval="$enable_interop"
14556   with_exp_interop=$enableval
14557 else
14558   with_exp_interop=$cf_dft_interop
14559 fi;
14560 echo "$as_me:14560: result: $with_exp_interop" >&5
14561 echo "${ECHO_T}$with_exp_interop" >&6
14562
14563 NCURSES_INTEROP_FUNCS=0
14564 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14565
14566 echo "$as_me:14566: checking if you want experimental safe-sprintf code" >&5
14567 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14568
14569 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14570 if test "${enable_safe_sprintf+set}" = set; then
14571   enableval="$enable_safe_sprintf"
14572   with_safe_sprintf=$enableval
14573 else
14574   with_safe_sprintf=no
14575 fi;
14576 echo "$as_me:14576: result: $with_safe_sprintf" >&5
14577 echo "${ECHO_T}$with_safe_sprintf" >&6
14578
14579 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14580 # when hashmap is used scroll hints are useless
14581 if test "$with_hashmap" = no ; then
14582 echo "$as_me:14582: checking if you want to experiment without scrolling-hints code" >&5
14583 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14584
14585 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14586 if test "${enable_scroll_hints+set}" = set; then
14587   enableval="$enable_scroll_hints"
14588   with_scroll_hints=$enableval
14589 else
14590   with_scroll_hints=yes
14591 fi;
14592 echo "$as_me:14592: result: $with_scroll_hints" >&5
14593 echo "${ECHO_T}$with_scroll_hints" >&6
14594 test "x$with_scroll_hints" = xyes &&
14595 cat >>confdefs.h <<\EOF
14596 #define USE_SCROLL_HINTS 1
14597 EOF
14598
14599 fi
14600
14601 echo "$as_me:14601: checking if you want wgetch-events code" >&5
14602 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14603
14604 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14605 if test "${enable_wgetch_events+set}" = set; then
14606   enableval="$enable_wgetch_events"
14607   with_wgetch_events=$enableval
14608 else
14609   with_wgetch_events=no
14610 fi;
14611 echo "$as_me:14611: result: $with_wgetch_events" >&5
14612 echo "${ECHO_T}$with_wgetch_events" >&6
14613 test "x$with_wgetch_events" = xyes &&
14614 cat >>confdefs.h <<\EOF
14615 #define NCURSES_WGETCH_EVENTS 1
14616 EOF
14617
14618 ###############################################################################
14619
14620 ###     use option --disable-echo to suppress full display compiling commands
14621
14622 echo "$as_me:14622: checking if you want to see long compiling messages" >&5
14623 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14624
14625 # Check whether --enable-echo or --disable-echo was given.
14626 if test "${enable_echo+set}" = set; then
14627   enableval="$enable_echo"
14628   test "$enableval" != no && enableval=yes
14629         if test "$enableval" != "yes" ; then
14630
14631         ECHO_LT='--silent'
14632         ECHO_LD='@echo linking $@;'
14633         RULE_CC='@echo compiling $<'
14634         SHOW_CC='@echo compiling $@'
14635         ECHO_CC='@'
14636
14637         else
14638
14639         ECHO_LT=''
14640         ECHO_LD=''
14641         RULE_CC=''
14642         SHOW_CC=''
14643         ECHO_CC=''
14644
14645         fi
14646 else
14647   enableval=yes
14648
14649         ECHO_LT=''
14650         ECHO_LD=''
14651         RULE_CC=''
14652         SHOW_CC=''
14653         ECHO_CC=''
14654
14655 fi;
14656 echo "$as_me:14656: result: $enableval" >&5
14657 echo "${ECHO_T}$enableval" >&6
14658
14659 if test "x$enable_echo" = xyes; then
14660         ECHO_LINK=
14661 else
14662         ECHO_LINK='@ echo linking $@ ... ;'
14663         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14664         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14665 fi
14666
14667 # --disable-stripping is used for debugging
14668
14669 echo "$as_me:14669: checking if you want to install stripped executables" >&5
14670 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14671
14672 # Check whether --enable-stripping or --disable-stripping was given.
14673 if test "${enable_stripping+set}" = set; then
14674   enableval="$enable_stripping"
14675   test "$enableval" != no && enableval=yes
14676         if test "$enableval" != "yes" ; then
14677     with_stripping=no
14678         else
14679                 with_stripping=yes
14680         fi
14681 else
14682   enableval=yes
14683         with_stripping=yes
14684
14685 fi;
14686 echo "$as_me:14686: result: $with_stripping" >&5
14687 echo "${ECHO_T}$with_stripping" >&6
14688
14689 if test "$with_stripping" = yes
14690 then
14691         INSTALL_OPT_S="-s"
14692 else
14693         INSTALL_OPT_S=
14694 fi
14695
14696 echo "$as_me:14696: checking if install needs to be told about ownership" >&5
14697 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14698 case `$ac_config_guess` in
14699 (*minix)
14700         with_install_o=yes
14701         ;;
14702 (*)
14703         with_install_o=no
14704         ;;
14705 esac
14706
14707 echo "$as_me:14707: result: $with_install_o" >&5
14708 echo "${ECHO_T}$with_install_o" >&6
14709 if test "x$with_install_o" = xyes
14710 then
14711         INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
14712 else
14713         INSTALL_OPT_O=
14714 fi
14715
14716 ###     use option --enable-warnings to turn on all gcc warnings
14717 echo "$as_me:14717: checking if you want to see compiler warnings" >&5
14718 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14719
14720 # Check whether --enable-warnings or --disable-warnings was given.
14721 if test "${enable_warnings+set}" = set; then
14722   enableval="$enable_warnings"
14723   with_warnings=$enableval
14724 fi;
14725 echo "$as_me:14725: result: $with_warnings" >&5
14726 echo "${ECHO_T}$with_warnings" >&6
14727
14728 if test "x$with_warnings" = "xyes"; then
14729
14730         ADAFLAGS="$ADAFLAGS -gnatg"
14731
14732 INTEL_COMPILER=no
14733
14734 if test "$GCC" = yes ; then
14735         case $host_os in
14736         (linux*|gnu*)
14737                 echo "$as_me:14737: checking if this is really Intel C compiler" >&5
14738 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14739                 cf_save_CFLAGS="$CFLAGS"
14740                 CFLAGS="$CFLAGS -no-gcc"
14741                 cat >conftest.$ac_ext <<_ACEOF
14742 #line 14742 "configure"
14743 #include "confdefs.h"
14744
14745 int
14746 main (void)
14747 {
14748
14749 #ifdef __INTEL_COMPILER
14750 #else
14751 make an error
14752 #endif
14753
14754   ;
14755   return 0;
14756 }
14757 _ACEOF
14758 rm -f conftest.$ac_objext
14759 if { (eval echo "$as_me:14759: \"$ac_compile\"") >&5
14760   (eval $ac_compile) 2>&5
14761   ac_status=$?
14762   echo "$as_me:14762: \$? = $ac_status" >&5
14763   (exit $ac_status); } &&
14764          { ac_try='test -s conftest.$ac_objext'
14765   { (eval echo "$as_me:14765: \"$ac_try\"") >&5
14766   (eval $ac_try) 2>&5
14767   ac_status=$?
14768   echo "$as_me:14768: \$? = $ac_status" >&5
14769   (exit $ac_status); }; }; then
14770   INTEL_COMPILER=yes
14771 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14772
14773 else
14774   echo "$as_me: failed program was:" >&5
14775 cat conftest.$ac_ext >&5
14776 fi
14777 rm -f conftest.$ac_objext conftest.$ac_ext
14778                 CFLAGS="$cf_save_CFLAGS"
14779                 echo "$as_me:14779: result: $INTEL_COMPILER" >&5
14780 echo "${ECHO_T}$INTEL_COMPILER" >&6
14781                 ;;
14782         esac
14783 fi
14784
14785 CLANG_COMPILER=no
14786
14787 if test "$GCC" = yes ; then
14788         echo "$as_me:14788: checking if this is really Clang C compiler" >&5
14789 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
14790         cf_save_CFLAGS="$CFLAGS"
14791         CFLAGS="$CFLAGS -Qunused-arguments"
14792         cat >conftest.$ac_ext <<_ACEOF
14793 #line 14793 "configure"
14794 #include "confdefs.h"
14795
14796 int
14797 main (void)
14798 {
14799
14800 #ifdef __clang__
14801 #else
14802 make an error
14803 #endif
14804
14805   ;
14806   return 0;
14807 }
14808 _ACEOF
14809 rm -f conftest.$ac_objext
14810 if { (eval echo "$as_me:14810: \"$ac_compile\"") >&5
14811   (eval $ac_compile) 2>&5
14812   ac_status=$?
14813   echo "$as_me:14813: \$? = $ac_status" >&5
14814   (exit $ac_status); } &&
14815          { ac_try='test -s conftest.$ac_objext'
14816   { (eval echo "$as_me:14816: \"$ac_try\"") >&5
14817   (eval $ac_try) 2>&5
14818   ac_status=$?
14819   echo "$as_me:14819: \$? = $ac_status" >&5
14820   (exit $ac_status); }; }; then
14821   CLANG_COMPILER=yes
14822 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14823
14824 else
14825   echo "$as_me: failed program was:" >&5
14826 cat conftest.$ac_ext >&5
14827 fi
14828 rm -f conftest.$ac_objext conftest.$ac_ext
14829         CFLAGS="$cf_save_CFLAGS"
14830         echo "$as_me:14830: result: $CLANG_COMPILER" >&5
14831 echo "${ECHO_T}$CLANG_COMPILER" >&6
14832 fi
14833
14834 cat > conftest.$ac_ext <<EOF
14835 #line 14835 "${as_me:-configure}"
14836 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14837 EOF
14838
14839 if test "$INTEL_COMPILER" = yes
14840 then
14841 # The "-wdXXX" options suppress warnings:
14842 # remark #1419: external declaration in primary source file
14843 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14844 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14845 # remark #193: zero used for undefined preprocessing identifier
14846 # remark #593: variable "curs_sb_left_arrow" was set but never used
14847 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14848 # remark #869: parameter "tw" was never referenced
14849 # remark #981: operands are evaluated in unspecified order
14850 # warning #279: controlling expression is constant
14851
14852         { echo "$as_me:14852: checking for $CC warning options..." >&5
14853 echo "$as_me: checking for $CC warning options..." >&6;}
14854         cf_save_CFLAGS="$CFLAGS"
14855         EXTRA_CFLAGS="-Wall"
14856         for cf_opt in \
14857                 wd1419 \
14858                 wd1683 \
14859                 wd1684 \
14860                 wd193 \
14861                 wd593 \
14862                 wd279 \
14863                 wd810 \
14864                 wd869 \
14865                 wd981
14866         do
14867                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14868                 if { (eval echo "$as_me:14868: \"$ac_compile\"") >&5
14869   (eval $ac_compile) 2>&5
14870   ac_status=$?
14871   echo "$as_me:14871: \$? = $ac_status" >&5
14872   (exit $ac_status); }; then
14873                         test -n "$verbose" && echo "$as_me:14873: result: ... -$cf_opt" >&5
14874 echo "${ECHO_T}... -$cf_opt" >&6
14875                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14876                 fi
14877         done
14878         CFLAGS="$cf_save_CFLAGS"
14879
14880 elif test "$GCC" = yes
14881 then
14882         { echo "$as_me:14882: checking for $CC warning options..." >&5
14883 echo "$as_me: checking for $CC warning options..." >&6;}
14884         cf_save_CFLAGS="$CFLAGS"
14885         EXTRA_CFLAGS=
14886         cf_warn_CONST=""
14887         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
14888         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
14889         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
14890         for cf_opt in W Wall \
14891                 Wbad-function-cast \
14892                 Wcast-align \
14893                 Wcast-qual \
14894                 Wdeclaration-after-statement \
14895                 Wextra \
14896                 Winline \
14897                 Wmissing-declarations \
14898                 Wmissing-prototypes \
14899                 Wnested-externs \
14900                 Wpointer-arith \
14901                 Wshadow \
14902                 Wstrict-prototypes \
14903                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
14904         do
14905                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14906                 if { (eval echo "$as_me:14906: \"$ac_compile\"") >&5
14907   (eval $ac_compile) 2>&5
14908   ac_status=$?
14909   echo "$as_me:14909: \$? = $ac_status" >&5
14910   (exit $ac_status); }; then
14911                         test -n "$verbose" && echo "$as_me:14911: result: ... -$cf_opt" >&5
14912 echo "${ECHO_T}... -$cf_opt" >&6
14913                         case $cf_opt in
14914                         (Wcast-qual)
14915
14916         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14917         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
14918
14919                                 ;;
14920                         (Winline)
14921                                 case $GCC_VERSION in
14922                                 ([34].*)
14923                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
14924
14925 echo "${as_me:-configure}:14925: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14926
14927                                         continue;;
14928                                 esac
14929                                 ;;
14930                         (Wpointer-arith)
14931                                 case $GCC_VERSION in
14932                                 ([12].*)
14933                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
14934
14935 echo "${as_me:-configure}:14935: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14936
14937                                         continue;;
14938                                 esac
14939                                 ;;
14940                         esac
14941                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14942                 fi
14943         done
14944         CFLAGS="$cf_save_CFLAGS"
14945 fi
14946 rm -rf conftest*
14947
14948         if test "x$cf_with_cxx" = xyes ; then
14949
14950 INTEL_CPLUSPLUS=no
14951
14952 if test "$GCC" = yes ; then
14953         case $host_os in
14954         (linux*|gnu*)
14955                 echo "$as_me:14955: checking if this is really Intel C++ compiler" >&5
14956 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
14957                 cf_save_CFLAGS="$CXXFLAGS"
14958                 CXXFLAGS="$CXXFLAGS -no-gcc"
14959                 cat >conftest.$ac_ext <<_ACEOF
14960 #line 14960 "configure"
14961 #include "confdefs.h"
14962
14963 int
14964 main (void)
14965 {
14966
14967 #ifdef __INTEL_COMPILER
14968 #else
14969 make an error
14970 #endif
14971
14972   ;
14973   return 0;
14974 }
14975 _ACEOF
14976 rm -f conftest.$ac_objext
14977 if { (eval echo "$as_me:14977: \"$ac_compile\"") >&5
14978   (eval $ac_compile) 2>&5
14979   ac_status=$?
14980   echo "$as_me:14980: \$? = $ac_status" >&5
14981   (exit $ac_status); } &&
14982          { ac_try='test -s conftest.$ac_objext'
14983   { (eval echo "$as_me:14983: \"$ac_try\"") >&5
14984   (eval $ac_try) 2>&5
14985   ac_status=$?
14986   echo "$as_me:14986: \$? = $ac_status" >&5
14987   (exit $ac_status); }; }; then
14988   INTEL_CPLUSPLUS=yes
14989 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14990
14991 else
14992   echo "$as_me: failed program was:" >&5
14993 cat conftest.$ac_ext >&5
14994 fi
14995 rm -f conftest.$ac_objext conftest.$ac_ext
14996                 CXXFLAGS="$cf_save_CFLAGS"
14997                 echo "$as_me:14997: result: $INTEL_CPLUSPLUS" >&5
14998 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
14999                 ;;
15000         esac
15001 fi
15002
15003 CLANG_CPLUSPLUS=no
15004
15005 if test "$GCC" = yes ; then
15006         echo "$as_me:15006: checking if this is really Clang C++ compiler" >&5
15007 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15008         cf_save_CFLAGS="$CXXFLAGS"
15009         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15010         cat >conftest.$ac_ext <<_ACEOF
15011 #line 15011 "configure"
15012 #include "confdefs.h"
15013
15014 int
15015 main (void)
15016 {
15017
15018 #ifdef __clang__
15019 #else
15020 make an error
15021 #endif
15022
15023   ;
15024   return 0;
15025 }
15026 _ACEOF
15027 rm -f conftest.$ac_objext
15028 if { (eval echo "$as_me:15028: \"$ac_compile\"") >&5
15029   (eval $ac_compile) 2>&5
15030   ac_status=$?
15031   echo "$as_me:15031: \$? = $ac_status" >&5
15032   (exit $ac_status); } &&
15033          { ac_try='test -s conftest.$ac_objext'
15034   { (eval echo "$as_me:15034: \"$ac_try\"") >&5
15035   (eval $ac_try) 2>&5
15036   ac_status=$?
15037   echo "$as_me:15037: \$? = $ac_status" >&5
15038   (exit $ac_status); }; }; then
15039   CLANG_CPLUSPLUS=yes
15040 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15041
15042 else
15043   echo "$as_me: failed program was:" >&5
15044 cat conftest.$ac_ext >&5
15045 fi
15046 rm -f conftest.$ac_objext conftest.$ac_ext
15047         CXXFLAGS="$cf_save_CFLAGS"
15048         echo "$as_me:15048: result: $CLANG_CPLUSPLUS" >&5
15049 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15050 fi
15051
15052 ac_ext=cc
15053 ac_cpp='$CXXCPP $CPPFLAGS'
15054 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15055 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15056 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15057 ac_main_return=return
15058
15059 cat > conftest.$ac_ext <<EOF
15060 #line 15060 "configure"
15061 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15062 EOF
15063
15064 if test "$INTEL_CPLUSPLUS" = yes
15065 then
15066 # The "-wdXXX" options suppress warnings:
15067 # remark #1419: external declaration in primary source file
15068 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15069 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15070 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15071 # remark #193: zero used for undefined preprocessing identifier
15072 # remark #593: variable "curs_sb_left_arrow" was set but never used
15073 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15074 # remark #869: parameter "tw" was never referenced
15075 # remark #981: operands are evaluated in unspecified order
15076 # warning #269: invalid format string conversion
15077
15078         { echo "$as_me:15078: checking for $CC warning options..." >&5
15079 echo "$as_me: checking for $CC warning options..." >&6;}
15080         cf_save_CXXFLAGS="$CXXFLAGS"
15081         EXTRA_CXXFLAGS="-Wall"
15082         for cf_opt in \
15083                 wd1419 \
15084                 wd1682 \
15085                 wd1683 \
15086                 wd1684 \
15087                 wd193 \
15088                 wd279 \
15089                 wd593 \
15090                 wd810 \
15091                 wd869 \
15092                 wd981
15093         do
15094                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15095                 if { (eval echo "$as_me:15095: \"$ac_compile\"") >&5
15096   (eval $ac_compile) 2>&5
15097   ac_status=$?
15098   echo "$as_me:15098: \$? = $ac_status" >&5
15099   (exit $ac_status); }; then
15100                         test -n "$verbose" && echo "$as_me:15100: result: ... -$cf_opt" >&5
15101 echo "${ECHO_T}... -$cf_opt" >&6
15102                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15103                 fi
15104         done
15105         CXXFLAGS="$cf_save_CXXFLAGS"
15106
15107 elif test "$GXX" = yes
15108 then
15109         { echo "$as_me:15109: checking for $CXX warning options..." >&5
15110 echo "$as_me: checking for $CXX warning options..." >&6;}
15111         cf_save_CXXFLAGS="$CXXFLAGS"
15112         EXTRA_CXXFLAGS="-W -Wall"
15113         cf_gxx_extra_warnings=""
15114         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15115         case "$GCC_VERSION" in
15116         ([1-2].*)
15117                 ;;
15118         (*)
15119                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15120                 ;;
15121         esac
15122         for cf_opt in \
15123                 Wabi \
15124                 fabi-version=0 \
15125                 Wextra \
15126                 Wignored-qualifiers \
15127                 Wlogical-op \
15128                 Woverloaded-virtual \
15129                 Wsign-promo \
15130                 Wsynth \
15131                 Wold-style-cast \
15132                 Wcast-align \
15133                 Wcast-qual \
15134                 Wpointer-arith \
15135                 Wshadow \
15136                 Wundef $cf_gxx_extra_warnings Wno-unused
15137         do
15138                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15139                 if { (eval echo "$as_me:15139: \"$ac_compile\"") >&5
15140   (eval $ac_compile) 2>&5
15141   ac_status=$?
15142   echo "$as_me:15142: \$? = $ac_status" >&5
15143   (exit $ac_status); }; then
15144                         test -n "$verbose" && echo "$as_me:15144: result: ... -$cf_opt" >&5
15145 echo "${ECHO_T}... -$cf_opt" >&6
15146                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15147                 else
15148                         test -n "$verbose" && echo "$as_me:15148: result: ... no -$cf_opt" >&5
15149 echo "${ECHO_T}... no -$cf_opt" >&6
15150                 fi
15151         done
15152         CXXFLAGS="$cf_save_CXXFLAGS"
15153 fi
15154
15155 rm -rf conftest*
15156 ac_ext=c
15157 ac_cpp='$CPP $CPPFLAGS'
15158 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15159 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15160 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15161 ac_main_return=return
15162
15163         fi
15164 fi
15165
15166 if test "$GCC" = yes
15167 then
15168 cat > conftest.i <<EOF
15169 #ifndef GCC_PRINTF
15170 #define GCC_PRINTF 0
15171 #endif
15172 #ifndef GCC_SCANF
15173 #define GCC_SCANF 0
15174 #endif
15175 #ifndef GCC_NORETURN
15176 #define GCC_NORETURN /* nothing */
15177 #endif
15178 #ifndef GCC_UNUSED
15179 #define GCC_UNUSED /* nothing */
15180 #endif
15181 EOF
15182 if test "$GCC" = yes
15183 then
15184         { echo "$as_me:15184: checking for $CC __attribute__ directives..." >&5
15185 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15186 cat > conftest.$ac_ext <<EOF
15187 #line 15187 "${as_me:-configure}"
15188 #include "confdefs.h"
15189 #include "conftest.h"
15190 #include "conftest.i"
15191 #if     GCC_PRINTF
15192 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15193 #else
15194 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15195 #endif
15196 #if     GCC_SCANF
15197 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15198 #else
15199 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15200 #endif
15201 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15202 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15203 extern void foo(void) GCC_NORETURN;
15204 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15205 EOF
15206         cf_printf_attribute=no
15207         cf_scanf_attribute=no
15208         for cf_attribute in scanf printf unused noreturn
15209         do
15210
15211 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15212
15213                 cf_directive="__attribute__(($cf_attribute))"
15214                 echo "checking for $CC $cf_directive" 1>&5
15215
15216                 case $cf_attribute in
15217                 (printf)
15218                         cf_printf_attribute=yes
15219                         cat >conftest.h <<EOF
15220 #define GCC_$cf_ATTRIBUTE 1
15221 EOF
15222                         ;;
15223                 (scanf)
15224                         cf_scanf_attribute=yes
15225                         cat >conftest.h <<EOF
15226 #define GCC_$cf_ATTRIBUTE 1
15227 EOF
15228                         ;;
15229                 (*)
15230                         cat >conftest.h <<EOF
15231 #define GCC_$cf_ATTRIBUTE $cf_directive
15232 EOF
15233                         ;;
15234                 esac
15235
15236                 if { (eval echo "$as_me:15236: \"$ac_compile\"") >&5
15237   (eval $ac_compile) 2>&5
15238   ac_status=$?
15239   echo "$as_me:15239: \$? = $ac_status" >&5
15240   (exit $ac_status); }; then
15241                         test -n "$verbose" && echo "$as_me:15241: result: ... $cf_attribute" >&5
15242 echo "${ECHO_T}... $cf_attribute" >&6
15243                         cat conftest.h >>confdefs.h
15244                         case $cf_attribute in
15245                         (noreturn)
15246
15247 cat >>confdefs.h <<EOF
15248 #define GCC_NORETURN $cf_directive
15249 EOF
15250
15251                                 ;;
15252                         (printf)
15253                                 cf_value='/* nothing */'
15254                                 if test "$cf_printf_attribute" != no ; then
15255                                         cf_value='__attribute__((format(printf,fmt,var)))'
15256
15257 cat >>confdefs.h <<\EOF
15258 #define GCC_PRINTF 1
15259 EOF
15260
15261                                 fi
15262
15263 cat >>confdefs.h <<EOF
15264 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15265 EOF
15266
15267                                 ;;
15268                         (scanf)
15269                                 cf_value='/* nothing */'
15270                                 if test "$cf_scanf_attribute" != no ; then
15271                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15272
15273 cat >>confdefs.h <<\EOF
15274 #define GCC_SCANF 1
15275 EOF
15276
15277                                 fi
15278
15279 cat >>confdefs.h <<EOF
15280 #define GCC_SCANFLIKE(fmt,var) $cf_value
15281 EOF
15282
15283                                 ;;
15284                         (unused)
15285
15286 cat >>confdefs.h <<EOF
15287 #define GCC_UNUSED $cf_directive
15288 EOF
15289
15290                                 ;;
15291                         esac
15292                 fi
15293         done
15294 else
15295         fgrep define conftest.i >>confdefs.h
15296 fi
15297 rm -rf conftest*
15298 fi
15299
15300 echo "$as_me:15300: checking if you want to work around bogus compiler/loader warnings" >&5
15301 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15302
15303 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15304 if test "${enable_string_hacks+set}" = set; then
15305   enableval="$enable_string_hacks"
15306   with_string_hacks=$enableval
15307 else
15308   with_string_hacks=no
15309 fi;
15310 echo "$as_me:15310: result: $with_string_hacks" >&5
15311 echo "${ECHO_T}$with_string_hacks" >&6
15312
15313 if test "x$with_string_hacks" = "xyes"; then
15314
15315 cat >>confdefs.h <<\EOF
15316 #define USE_STRING_HACKS 1
15317 EOF
15318
15319         { echo "$as_me:15319: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15320 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15321         echo "$as_me:15321: checking for strlcat" >&5
15322 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15323 if test "${ac_cv_func_strlcat+set}" = set; then
15324   echo $ECHO_N "(cached) $ECHO_C" >&6
15325 else
15326   cat >conftest.$ac_ext <<_ACEOF
15327 #line 15327 "configure"
15328 #include "confdefs.h"
15329 /* System header to define __stub macros and hopefully few prototypes,
15330     which can conflict with char strlcat (); below.  */
15331 #include <assert.h>
15332 /* Override any gcc2 internal prototype to avoid an error.  */
15333 #ifdef __cplusplus
15334 extern "C"
15335 #endif
15336 /* We use char because int might match the return type of a gcc2
15337    builtin and then its argument prototype would still apply.  */
15338 char strlcat ();
15339 char (*f) ();
15340
15341 int
15342 main (void)
15343 {
15344 /* The GNU C library defines this for functions which it implements
15345     to always fail with ENOSYS.  Some functions are actually named
15346     something starting with __ and the normal name is an alias.  */
15347 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15348 choke me
15349 #else
15350 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15351 #endif
15352
15353   ;
15354   return 0;
15355 }
15356 _ACEOF
15357 rm -f conftest.$ac_objext conftest$ac_exeext
15358 if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
15359   (eval $ac_link) 2>&5
15360   ac_status=$?
15361   echo "$as_me:15361: \$? = $ac_status" >&5
15362   (exit $ac_status); } &&
15363          { ac_try='test -s conftest$ac_exeext'
15364   { (eval echo "$as_me:15364: \"$ac_try\"") >&5
15365   (eval $ac_try) 2>&5
15366   ac_status=$?
15367   echo "$as_me:15367: \$? = $ac_status" >&5
15368   (exit $ac_status); }; }; then
15369   ac_cv_func_strlcat=yes
15370 else
15371   echo "$as_me: failed program was:" >&5
15372 cat conftest.$ac_ext >&5
15373 ac_cv_func_strlcat=no
15374 fi
15375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15376 fi
15377 echo "$as_me:15377: result: $ac_cv_func_strlcat" >&5
15378 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15379 if test $ac_cv_func_strlcat = yes; then
15380
15381 cat >>confdefs.h <<\EOF
15382 #define HAVE_STRLCAT 1
15383 EOF
15384
15385 else
15386
15387                 echo "$as_me:15387: checking for strlcat in -lbsd" >&5
15388 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15389 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15390   echo $ECHO_N "(cached) $ECHO_C" >&6
15391 else
15392   ac_check_lib_save_LIBS=$LIBS
15393 LIBS="-lbsd  $LIBS"
15394 cat >conftest.$ac_ext <<_ACEOF
15395 #line 15395 "configure"
15396 #include "confdefs.h"
15397
15398 /* Override any gcc2 internal prototype to avoid an error.  */
15399 #ifdef __cplusplus
15400 extern "C"
15401 #endif
15402 /* We use char because int might match the return type of a gcc2
15403    builtin and then its argument prototype would still apply.  */
15404 char strlcat ();
15405 int
15406 main (void)
15407 {
15408 strlcat ();
15409   ;
15410   return 0;
15411 }
15412 _ACEOF
15413 rm -f conftest.$ac_objext conftest$ac_exeext
15414 if { (eval echo "$as_me:15414: \"$ac_link\"") >&5
15415   (eval $ac_link) 2>&5
15416   ac_status=$?
15417   echo "$as_me:15417: \$? = $ac_status" >&5
15418   (exit $ac_status); } &&
15419          { ac_try='test -s conftest$ac_exeext'
15420   { (eval echo "$as_me:15420: \"$ac_try\"") >&5
15421   (eval $ac_try) 2>&5
15422   ac_status=$?
15423   echo "$as_me:15423: \$? = $ac_status" >&5
15424   (exit $ac_status); }; }; then
15425   ac_cv_lib_bsd_strlcat=yes
15426 else
15427   echo "$as_me: failed program was:" >&5
15428 cat conftest.$ac_ext >&5
15429 ac_cv_lib_bsd_strlcat=no
15430 fi
15431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15432 LIBS=$ac_check_lib_save_LIBS
15433 fi
15434 echo "$as_me:15434: result: $ac_cv_lib_bsd_strlcat" >&5
15435 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15436 if test $ac_cv_lib_bsd_strlcat = yes; then
15437
15438 cf_add_libs="-lbsd"
15439 # Filter out duplicates - this happens with badly-designed ".pc" files...
15440 for cf_add_1lib in $LIBS
15441 do
15442         for cf_add_2lib in $cf_add_libs
15443         do
15444                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15445                 then
15446                         cf_add_1lib=
15447                         break
15448                 fi
15449         done
15450         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15451 done
15452 LIBS="$cf_add_libs"
15453
15454 for ac_header in bsd/string.h
15455 do
15456 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15457 echo "$as_me:15457: checking for $ac_header" >&5
15458 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15459 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15460   echo $ECHO_N "(cached) $ECHO_C" >&6
15461 else
15462   cat >conftest.$ac_ext <<_ACEOF
15463 #line 15463 "configure"
15464 #include "confdefs.h"
15465 #include <$ac_header>
15466 _ACEOF
15467 if { (eval echo "$as_me:15467: \"$ac_cpp conftest.$ac_ext\"") >&5
15468   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15469   ac_status=$?
15470   egrep -v '^ *\+' conftest.er1 >conftest.err
15471   rm -f conftest.er1
15472   cat conftest.err >&5
15473   echo "$as_me:15473: \$? = $ac_status" >&5
15474   (exit $ac_status); } >/dev/null; then
15475   if test -s conftest.err; then
15476     ac_cpp_err=$ac_c_preproc_warn_flag
15477   else
15478     ac_cpp_err=
15479   fi
15480 else
15481   ac_cpp_err=yes
15482 fi
15483 if test -z "$ac_cpp_err"; then
15484   eval "$as_ac_Header=yes"
15485 else
15486   echo "$as_me: failed program was:" >&5
15487   cat conftest.$ac_ext >&5
15488   eval "$as_ac_Header=no"
15489 fi
15490 rm -f conftest.err conftest.$ac_ext
15491 fi
15492 echo "$as_me:15492: result: `eval echo '${'$as_ac_Header'}'`" >&5
15493 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15494 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15495   cat >>confdefs.h <<EOF
15496 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15497 EOF
15498
15499 fi
15500 done
15501
15502 cat >>confdefs.h <<\EOF
15503 #define HAVE_STRLCAT 1
15504 EOF
15505
15506 fi
15507
15508 fi
15509
15510 for ac_func in strlcpy snprintf
15511 do
15512 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15513 echo "$as_me:15513: checking for $ac_func" >&5
15514 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15515 if eval "test \"\${$as_ac_var+set}\" = set"; then
15516   echo $ECHO_N "(cached) $ECHO_C" >&6
15517 else
15518   cat >conftest.$ac_ext <<_ACEOF
15519 #line 15519 "configure"
15520 #include "confdefs.h"
15521 /* System header to define __stub macros and hopefully few prototypes,
15522     which can conflict with char $ac_func (); below.  */
15523 #include <assert.h>
15524 /* Override any gcc2 internal prototype to avoid an error.  */
15525 #ifdef __cplusplus
15526 extern "C"
15527 #endif
15528 /* We use char because int might match the return type of a gcc2
15529    builtin and then its argument prototype would still apply.  */
15530 char $ac_func ();
15531 char (*f) ();
15532
15533 int
15534 main (void)
15535 {
15536 /* The GNU C library defines this for functions which it implements
15537     to always fail with ENOSYS.  Some functions are actually named
15538     something starting with __ and the normal name is an alias.  */
15539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15540 choke me
15541 #else
15542 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15543 #endif
15544
15545   ;
15546   return 0;
15547 }
15548 _ACEOF
15549 rm -f conftest.$ac_objext conftest$ac_exeext
15550 if { (eval echo "$as_me:15550: \"$ac_link\"") >&5
15551   (eval $ac_link) 2>&5
15552   ac_status=$?
15553   echo "$as_me:15553: \$? = $ac_status" >&5
15554   (exit $ac_status); } &&
15555          { ac_try='test -s conftest$ac_exeext'
15556   { (eval echo "$as_me:15556: \"$ac_try\"") >&5
15557   (eval $ac_try) 2>&5
15558   ac_status=$?
15559   echo "$as_me:15559: \$? = $ac_status" >&5
15560   (exit $ac_status); }; }; then
15561   eval "$as_ac_var=yes"
15562 else
15563   echo "$as_me: failed program was:" >&5
15564 cat conftest.$ac_ext >&5
15565 eval "$as_ac_var=no"
15566 fi
15567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15568 fi
15569 echo "$as_me:15569: result: `eval echo '${'$as_ac_var'}'`" >&5
15570 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15571 if test `eval echo '${'$as_ac_var'}'` = yes; then
15572   cat >>confdefs.h <<EOF
15573 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15574 EOF
15575
15576 fi
15577 done
15578
15579 fi
15580
15581 ###     use option --enable-assertions to turn on generation of assertion code
15582 echo "$as_me:15582: checking if you want to enable runtime assertions" >&5
15583 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15584
15585 # Check whether --enable-assertions or --disable-assertions was given.
15586 if test "${enable_assertions+set}" = set; then
15587   enableval="$enable_assertions"
15588   with_assertions=$enableval
15589 else
15590   with_assertions=no
15591 fi;
15592 echo "$as_me:15592: result: $with_assertions" >&5
15593 echo "${ECHO_T}$with_assertions" >&6
15594 if test -n "$GCC"
15595 then
15596         if test "$with_assertions" = no
15597         then
15598                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15599         else
15600
15601         ADAFLAGS="$ADAFLAGS -gnata"
15602
15603         fi
15604 fi
15605
15606 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15607
15608 echo "$as_me:15608: checking if you want to use dmalloc for testing" >&5
15609 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15610
15611 # Check whether --with-dmalloc or --without-dmalloc was given.
15612 if test "${with_dmalloc+set}" = set; then
15613   withval="$with_dmalloc"
15614
15615 cat >>confdefs.h <<EOF
15616 #define USE_DMALLOC 1
15617 EOF
15618
15619         : ${with_cflags:=-g}
15620         : ${with_no_leaks:=yes}
15621          with_dmalloc=yes
15622 else
15623   with_dmalloc=
15624 fi;
15625 echo "$as_me:15625: result: ${with_dmalloc:-no}" >&5
15626 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15627
15628 case .$with_cflags in
15629 (.*-g*)
15630         case .$CFLAGS in
15631         (.*-g*)
15632                 ;;
15633         (*)
15634
15635 cf_fix_cppflags=no
15636 cf_new_cflags=
15637 cf_new_cppflags=
15638 cf_new_extra_cppflags=
15639
15640 for cf_add_cflags in -g
15641 do
15642 case $cf_fix_cppflags in
15643 (no)
15644         case $cf_add_cflags in
15645         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15646                 case $cf_add_cflags in
15647                 (-D*)
15648                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15649
15650                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15651                                 && test -z "${cf_tst_cflags}" \
15652                                 && cf_fix_cppflags=yes
15653
15654                         if test $cf_fix_cppflags = yes ; then
15655
15656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15658
15659                                 continue
15660                         elif test "${cf_tst_cflags}" = "\"'" ; then
15661
15662         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15663         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15664
15665                                 continue
15666                         fi
15667                         ;;
15668                 esac
15669                 case "$CPPFLAGS" in
15670                 (*$cf_add_cflags)
15671                         ;;
15672                 (*)
15673                         case $cf_add_cflags in
15674                         (-D*)
15675                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15676
15677 CPPFLAGS=`echo "$CPPFLAGS" | \
15678         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15679                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15680
15681                                 ;;
15682                         esac
15683
15684         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15685         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15686
15687                         ;;
15688                 esac
15689                 ;;
15690         (*)
15691
15692         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15693         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15694
15695                 ;;
15696         esac
15697         ;;
15698 (yes)
15699
15700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15702
15703         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15704
15705         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15706                 && test -z "${cf_tst_cflags}" \
15707                 && cf_fix_cppflags=no
15708         ;;
15709 esac
15710 done
15711
15712 if test -n "$cf_new_cflags" ; then
15713
15714         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15715         CFLAGS="${CFLAGS}$cf_new_cflags"
15716
15717 fi
15718
15719 if test -n "$cf_new_cppflags" ; then
15720
15721         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15722         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15723
15724 fi
15725
15726 if test -n "$cf_new_extra_cppflags" ; then
15727
15728         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15729         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15730
15731 fi
15732
15733                 ;;
15734         esac
15735         ;;
15736 esac
15737
15738 if test "$with_dmalloc" = yes ; then
15739         echo "$as_me:15739: checking for dmalloc.h" >&5
15740 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15741 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15742   echo $ECHO_N "(cached) $ECHO_C" >&6
15743 else
15744   cat >conftest.$ac_ext <<_ACEOF
15745 #line 15745 "configure"
15746 #include "confdefs.h"
15747 #include <dmalloc.h>
15748 _ACEOF
15749 if { (eval echo "$as_me:15749: \"$ac_cpp conftest.$ac_ext\"") >&5
15750   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15751   ac_status=$?
15752   egrep -v '^ *\+' conftest.er1 >conftest.err
15753   rm -f conftest.er1
15754   cat conftest.err >&5
15755   echo "$as_me:15755: \$? = $ac_status" >&5
15756   (exit $ac_status); } >/dev/null; then
15757   if test -s conftest.err; then
15758     ac_cpp_err=$ac_c_preproc_warn_flag
15759   else
15760     ac_cpp_err=
15761   fi
15762 else
15763   ac_cpp_err=yes
15764 fi
15765 if test -z "$ac_cpp_err"; then
15766   ac_cv_header_dmalloc_h=yes
15767 else
15768   echo "$as_me: failed program was:" >&5
15769   cat conftest.$ac_ext >&5
15770   ac_cv_header_dmalloc_h=no
15771 fi
15772 rm -f conftest.err conftest.$ac_ext
15773 fi
15774 echo "$as_me:15774: result: $ac_cv_header_dmalloc_h" >&5
15775 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15776 if test $ac_cv_header_dmalloc_h = yes; then
15777
15778 echo "$as_me:15778: checking for dmalloc_debug in -ldmalloc" >&5
15779 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
15780 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
15781   echo $ECHO_N "(cached) $ECHO_C" >&6
15782 else
15783   ac_check_lib_save_LIBS=$LIBS
15784 LIBS="-ldmalloc  $LIBS"
15785 cat >conftest.$ac_ext <<_ACEOF
15786 #line 15786 "configure"
15787 #include "confdefs.h"
15788
15789 /* Override any gcc2 internal prototype to avoid an error.  */
15790 #ifdef __cplusplus
15791 extern "C"
15792 #endif
15793 /* We use char because int might match the return type of a gcc2
15794    builtin and then its argument prototype would still apply.  */
15795 char dmalloc_debug ();
15796 int
15797 main (void)
15798 {
15799 dmalloc_debug ();
15800   ;
15801   return 0;
15802 }
15803 _ACEOF
15804 rm -f conftest.$ac_objext conftest$ac_exeext
15805 if { (eval echo "$as_me:15805: \"$ac_link\"") >&5
15806   (eval $ac_link) 2>&5
15807   ac_status=$?
15808   echo "$as_me:15808: \$? = $ac_status" >&5
15809   (exit $ac_status); } &&
15810          { ac_try='test -s conftest$ac_exeext'
15811   { (eval echo "$as_me:15811: \"$ac_try\"") >&5
15812   (eval $ac_try) 2>&5
15813   ac_status=$?
15814   echo "$as_me:15814: \$? = $ac_status" >&5
15815   (exit $ac_status); }; }; then
15816   ac_cv_lib_dmalloc_dmalloc_debug=yes
15817 else
15818   echo "$as_me: failed program was:" >&5
15819 cat conftest.$ac_ext >&5
15820 ac_cv_lib_dmalloc_dmalloc_debug=no
15821 fi
15822 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15823 LIBS=$ac_check_lib_save_LIBS
15824 fi
15825 echo "$as_me:15825: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
15826 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
15827 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
15828   cat >>confdefs.h <<EOF
15829 #define HAVE_LIBDMALLOC 1
15830 EOF
15831
15832   LIBS="-ldmalloc $LIBS"
15833
15834 fi
15835
15836 fi
15837
15838 fi
15839
15840 echo "$as_me:15840: checking if you want to use dbmalloc for testing" >&5
15841 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
15842
15843 # Check whether --with-dbmalloc or --without-dbmalloc was given.
15844 if test "${with_dbmalloc+set}" = set; then
15845   withval="$with_dbmalloc"
15846
15847 cat >>confdefs.h <<EOF
15848 #define USE_DBMALLOC 1
15849 EOF
15850
15851         : ${with_cflags:=-g}
15852         : ${with_no_leaks:=yes}
15853          with_dbmalloc=yes
15854 else
15855   with_dbmalloc=
15856 fi;
15857 echo "$as_me:15857: result: ${with_dbmalloc:-no}" >&5
15858 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
15859
15860 case .$with_cflags in
15861 (.*-g*)
15862         case .$CFLAGS in
15863         (.*-g*)
15864                 ;;
15865         (*)
15866
15867 cf_fix_cppflags=no
15868 cf_new_cflags=
15869 cf_new_cppflags=
15870 cf_new_extra_cppflags=
15871
15872 for cf_add_cflags in -g
15873 do
15874 case $cf_fix_cppflags in
15875 (no)
15876         case $cf_add_cflags in
15877         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15878                 case $cf_add_cflags in
15879                 (-D*)
15880                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15881
15882                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15883                                 && test -z "${cf_tst_cflags}" \
15884                                 && cf_fix_cppflags=yes
15885
15886                         if test $cf_fix_cppflags = yes ; then
15887
15888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15890
15891                                 continue
15892                         elif test "${cf_tst_cflags}" = "\"'" ; then
15893
15894         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15895         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15896
15897                                 continue
15898                         fi
15899                         ;;
15900                 esac
15901                 case "$CPPFLAGS" in
15902                 (*$cf_add_cflags)
15903                         ;;
15904                 (*)
15905                         case $cf_add_cflags in
15906                         (-D*)
15907                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15908
15909 CPPFLAGS=`echo "$CPPFLAGS" | \
15910         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15911                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15912
15913                                 ;;
15914                         esac
15915
15916         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15917         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15918
15919                         ;;
15920                 esac
15921                 ;;
15922         (*)
15923
15924         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15925         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15926
15927                 ;;
15928         esac
15929         ;;
15930 (yes)
15931
15932         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15933         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15934
15935         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15936
15937         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15938                 && test -z "${cf_tst_cflags}" \
15939                 && cf_fix_cppflags=no
15940         ;;
15941 esac
15942 done
15943
15944 if test -n "$cf_new_cflags" ; then
15945
15946         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15947         CFLAGS="${CFLAGS}$cf_new_cflags"
15948
15949 fi
15950
15951 if test -n "$cf_new_cppflags" ; then
15952
15953         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15954         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15955
15956 fi
15957
15958 if test -n "$cf_new_extra_cppflags" ; then
15959
15960         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15961         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15962
15963 fi
15964
15965                 ;;
15966         esac
15967         ;;
15968 esac
15969
15970 if test "$with_dbmalloc" = yes ; then
15971         echo "$as_me:15971: checking for dbmalloc.h" >&5
15972 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
15973 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
15974   echo $ECHO_N "(cached) $ECHO_C" >&6
15975 else
15976   cat >conftest.$ac_ext <<_ACEOF
15977 #line 15977 "configure"
15978 #include "confdefs.h"
15979 #include <dbmalloc.h>
15980 _ACEOF
15981 if { (eval echo "$as_me:15981: \"$ac_cpp conftest.$ac_ext\"") >&5
15982   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15983   ac_status=$?
15984   egrep -v '^ *\+' conftest.er1 >conftest.err
15985   rm -f conftest.er1
15986   cat conftest.err >&5
15987   echo "$as_me:15987: \$? = $ac_status" >&5
15988   (exit $ac_status); } >/dev/null; then
15989   if test -s conftest.err; then
15990     ac_cpp_err=$ac_c_preproc_warn_flag
15991   else
15992     ac_cpp_err=
15993   fi
15994 else
15995   ac_cpp_err=yes
15996 fi
15997 if test -z "$ac_cpp_err"; then
15998   ac_cv_header_dbmalloc_h=yes
15999 else
16000   echo "$as_me: failed program was:" >&5
16001   cat conftest.$ac_ext >&5
16002   ac_cv_header_dbmalloc_h=no
16003 fi
16004 rm -f conftest.err conftest.$ac_ext
16005 fi
16006 echo "$as_me:16006: result: $ac_cv_header_dbmalloc_h" >&5
16007 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16008 if test $ac_cv_header_dbmalloc_h = yes; then
16009
16010 echo "$as_me:16010: checking for debug_malloc in -ldbmalloc" >&5
16011 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16012 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16013   echo $ECHO_N "(cached) $ECHO_C" >&6
16014 else
16015   ac_check_lib_save_LIBS=$LIBS
16016 LIBS="-ldbmalloc  $LIBS"
16017 cat >conftest.$ac_ext <<_ACEOF
16018 #line 16018 "configure"
16019 #include "confdefs.h"
16020
16021 /* Override any gcc2 internal prototype to avoid an error.  */
16022 #ifdef __cplusplus
16023 extern "C"
16024 #endif
16025 /* We use char because int might match the return type of a gcc2
16026    builtin and then its argument prototype would still apply.  */
16027 char debug_malloc ();
16028 int
16029 main (void)
16030 {
16031 debug_malloc ();
16032   ;
16033   return 0;
16034 }
16035 _ACEOF
16036 rm -f conftest.$ac_objext conftest$ac_exeext
16037 if { (eval echo "$as_me:16037: \"$ac_link\"") >&5
16038   (eval $ac_link) 2>&5
16039   ac_status=$?
16040   echo "$as_me:16040: \$? = $ac_status" >&5
16041   (exit $ac_status); } &&
16042          { ac_try='test -s conftest$ac_exeext'
16043   { (eval echo "$as_me:16043: \"$ac_try\"") >&5
16044   (eval $ac_try) 2>&5
16045   ac_status=$?
16046   echo "$as_me:16046: \$? = $ac_status" >&5
16047   (exit $ac_status); }; }; then
16048   ac_cv_lib_dbmalloc_debug_malloc=yes
16049 else
16050   echo "$as_me: failed program was:" >&5
16051 cat conftest.$ac_ext >&5
16052 ac_cv_lib_dbmalloc_debug_malloc=no
16053 fi
16054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16055 LIBS=$ac_check_lib_save_LIBS
16056 fi
16057 echo "$as_me:16057: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16058 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16059 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16060   cat >>confdefs.h <<EOF
16061 #define HAVE_LIBDBMALLOC 1
16062 EOF
16063
16064   LIBS="-ldbmalloc $LIBS"
16065
16066 fi
16067
16068 fi
16069
16070 fi
16071
16072 echo "$as_me:16072: checking if you want to use valgrind for testing" >&5
16073 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16074
16075 # Check whether --with-valgrind or --without-valgrind was given.
16076 if test "${with_valgrind+set}" = set; then
16077   withval="$with_valgrind"
16078
16079 cat >>confdefs.h <<EOF
16080 #define USE_VALGRIND 1
16081 EOF
16082
16083         : ${with_cflags:=-g}
16084         : ${with_no_leaks:=yes}
16085          with_valgrind=yes
16086 else
16087   with_valgrind=
16088 fi;
16089 echo "$as_me:16089: result: ${with_valgrind:-no}" >&5
16090 echo "${ECHO_T}${with_valgrind:-no}" >&6
16091
16092 case .$with_cflags in
16093 (.*-g*)
16094         case .$CFLAGS in
16095         (.*-g*)
16096                 ;;
16097         (*)
16098
16099 cf_fix_cppflags=no
16100 cf_new_cflags=
16101 cf_new_cppflags=
16102 cf_new_extra_cppflags=
16103
16104 for cf_add_cflags in -g
16105 do
16106 case $cf_fix_cppflags in
16107 (no)
16108         case $cf_add_cflags in
16109         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16110                 case $cf_add_cflags in
16111                 (-D*)
16112                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16113
16114                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16115                                 && test -z "${cf_tst_cflags}" \
16116                                 && cf_fix_cppflags=yes
16117
16118                         if test $cf_fix_cppflags = yes ; then
16119
16120         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16121         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16122
16123                                 continue
16124                         elif test "${cf_tst_cflags}" = "\"'" ; then
16125
16126         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16127         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16128
16129                                 continue
16130                         fi
16131                         ;;
16132                 esac
16133                 case "$CPPFLAGS" in
16134                 (*$cf_add_cflags)
16135                         ;;
16136                 (*)
16137                         case $cf_add_cflags in
16138                         (-D*)
16139                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16140
16141 CPPFLAGS=`echo "$CPPFLAGS" | \
16142         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16143                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16144
16145                                 ;;
16146                         esac
16147
16148         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16149         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16150
16151                         ;;
16152                 esac
16153                 ;;
16154         (*)
16155
16156         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16157         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16158
16159                 ;;
16160         esac
16161         ;;
16162 (yes)
16163
16164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16166
16167         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16168
16169         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16170                 && test -z "${cf_tst_cflags}" \
16171                 && cf_fix_cppflags=no
16172         ;;
16173 esac
16174 done
16175
16176 if test -n "$cf_new_cflags" ; then
16177
16178         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16179         CFLAGS="${CFLAGS}$cf_new_cflags"
16180
16181 fi
16182
16183 if test -n "$cf_new_cppflags" ; then
16184
16185         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16186         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16187
16188 fi
16189
16190 if test -n "$cf_new_extra_cppflags" ; then
16191
16192         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16193         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16194
16195 fi
16196
16197                 ;;
16198         esac
16199         ;;
16200 esac
16201
16202 echo "$as_me:16202: checking if you want to perform memory-leak testing" >&5
16203 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16204
16205 # Check whether --enable-leaks or --disable-leaks was given.
16206 if test "${enable_leaks+set}" = set; then
16207   enableval="$enable_leaks"
16208   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16209 else
16210   : ${with_no_leaks:=no}
16211 fi;
16212 echo "$as_me:16212: result: $with_no_leaks" >&5
16213 echo "${ECHO_T}$with_no_leaks" >&6
16214
16215 if test "$with_no_leaks" = yes ; then
16216
16217 cat >>confdefs.h <<\EOF
16218 #define NO_LEAKS 1
16219 EOF
16220
16221 cat >>confdefs.h <<\EOF
16222 #define YY_NO_LEAKS 1
16223 EOF
16224
16225 fi
16226
16227 cat >>confdefs.h <<\EOF
16228 #define HAVE_NC_ALLOC_H 1
16229 EOF
16230
16231 ###     use option --enable-expanded to generate certain macros as functions
16232
16233 # Check whether --enable-expanded or --disable-expanded was given.
16234 if test "${enable_expanded+set}" = set; then
16235   enableval="$enable_expanded"
16236   test "x$enableval" = xyes &&
16237 cat >>confdefs.h <<\EOF
16238 #define NCURSES_EXPANDED 1
16239 EOF
16240
16241 fi;
16242
16243 ###     use option --disable-macros to suppress macros in favor of functions
16244
16245 # Check whether --enable-macros or --disable-macros was given.
16246 if test "${enable_macros+set}" = set; then
16247   enableval="$enable_macros"
16248   test "$enableval" = no &&
16249 cat >>confdefs.h <<\EOF
16250 #define NCURSES_NOMACROS 1
16251 EOF
16252
16253 fi;
16254
16255 # Normally we only add trace() to the debug-library.  Allow this to be
16256 # extended to all models of the ncurses library:
16257 cf_all_traces=no
16258 case "$CFLAGS $CPPFLAGS" in
16259 (*-DTRACE*)
16260         cf_all_traces=yes
16261         ;;
16262 esac
16263
16264 echo "$as_me:16264: checking whether to add trace feature to all models" >&5
16265 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16266
16267 # Check whether --with-trace or --without-trace was given.
16268 if test "${with_trace+set}" = set; then
16269   withval="$with_trace"
16270   cf_with_trace=$withval
16271 else
16272   cf_with_trace=$cf_all_traces
16273 fi;
16274 echo "$as_me:16274: result: $cf_with_trace" >&5
16275 echo "${ECHO_T}$cf_with_trace" >&6
16276
16277 if test "x$cf_with_trace" = xyes ; then
16278         LIB_TRACING=all
16279         ADA_TRACE=TRUE
16280
16281 cf_fix_cppflags=no
16282 cf_new_cflags=
16283 cf_new_cppflags=
16284 cf_new_extra_cppflags=
16285
16286 for cf_add_cflags in -DTRACE
16287 do
16288 case $cf_fix_cppflags in
16289 (no)
16290         case $cf_add_cflags in
16291         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16292                 case $cf_add_cflags in
16293                 (-D*)
16294                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16295
16296                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16297                                 && test -z "${cf_tst_cflags}" \
16298                                 && cf_fix_cppflags=yes
16299
16300                         if test $cf_fix_cppflags = yes ; then
16301
16302         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16303         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16304
16305                                 continue
16306                         elif test "${cf_tst_cflags}" = "\"'" ; then
16307
16308         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16309         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16310
16311                                 continue
16312                         fi
16313                         ;;
16314                 esac
16315                 case "$CPPFLAGS" in
16316                 (*$cf_add_cflags)
16317                         ;;
16318                 (*)
16319                         case $cf_add_cflags in
16320                         (-D*)
16321                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16322
16323 CPPFLAGS=`echo "$CPPFLAGS" | \
16324         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16325                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16326
16327                                 ;;
16328                         esac
16329
16330         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16331         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16332
16333                         ;;
16334                 esac
16335                 ;;
16336         (*)
16337
16338         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16339         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16340
16341                 ;;
16342         esac
16343         ;;
16344 (yes)
16345
16346         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16347         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16348
16349         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16350
16351         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16352                 && test -z "${cf_tst_cflags}" \
16353                 && cf_fix_cppflags=no
16354         ;;
16355 esac
16356 done
16357
16358 if test -n "$cf_new_cflags" ; then
16359
16360         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16361         CFLAGS="${CFLAGS}$cf_new_cflags"
16362
16363 fi
16364
16365 if test -n "$cf_new_cppflags" ; then
16366
16367         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16368         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16369
16370 fi
16371
16372 if test -n "$cf_new_extra_cppflags" ; then
16373
16374         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16375         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16376
16377 fi
16378
16379 cat >>confdefs.h <<\EOF
16380 #define HAVE__TRACEF 1
16381 EOF
16382
16383 else
16384         LIB_TRACING=DEBUG
16385         ADA_TRACE=FALSE
16386 fi
16387
16388 echo "$as_me:16388: checking if we want to use GNAT projects" >&5
16389 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16390
16391 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16392 if test "${enable_gnat_projects+set}" = set; then
16393   enableval="$enable_gnat_projects"
16394   test "$enableval" != no && enableval=yes
16395         if test "$enableval" != "yes" ; then
16396     enable_gnat_projects=no
16397         else
16398                 enable_gnat_projects=yes
16399         fi
16400 else
16401   enableval=yes
16402         enable_gnat_projects=yes
16403
16404 fi;
16405 echo "$as_me:16405: result: $enable_gnat_projects" >&5
16406 echo "${ECHO_T}$enable_gnat_projects" >&6
16407
16408 ###     Checks for libraries.
16409 case $cf_cv_system_name in
16410 (*mingw32*|*mingw64*)
16411         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16412         LIBS=" -lpsapi $LIBS"
16413         ;;
16414 (*)
16415 echo "$as_me:16415: checking for gettimeofday" >&5
16416 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16417 if test "${ac_cv_func_gettimeofday+set}" = set; then
16418   echo $ECHO_N "(cached) $ECHO_C" >&6
16419 else
16420   cat >conftest.$ac_ext <<_ACEOF
16421 #line 16421 "configure"
16422 #include "confdefs.h"
16423 /* System header to define __stub macros and hopefully few prototypes,
16424     which can conflict with char gettimeofday (); below.  */
16425 #include <assert.h>
16426 /* Override any gcc2 internal prototype to avoid an error.  */
16427 #ifdef __cplusplus
16428 extern "C"
16429 #endif
16430 /* We use char because int might match the return type of a gcc2
16431    builtin and then its argument prototype would still apply.  */
16432 char gettimeofday ();
16433 char (*f) ();
16434
16435 int
16436 main (void)
16437 {
16438 /* The GNU C library defines this for functions which it implements
16439     to always fail with ENOSYS.  Some functions are actually named
16440     something starting with __ and the normal name is an alias.  */
16441 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16442 choke me
16443 #else
16444 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16445 #endif
16446
16447   ;
16448   return 0;
16449 }
16450 _ACEOF
16451 rm -f conftest.$ac_objext conftest$ac_exeext
16452 if { (eval echo "$as_me:16452: \"$ac_link\"") >&5
16453   (eval $ac_link) 2>&5
16454   ac_status=$?
16455   echo "$as_me:16455: \$? = $ac_status" >&5
16456   (exit $ac_status); } &&
16457          { ac_try='test -s conftest$ac_exeext'
16458   { (eval echo "$as_me:16458: \"$ac_try\"") >&5
16459   (eval $ac_try) 2>&5
16460   ac_status=$?
16461   echo "$as_me:16461: \$? = $ac_status" >&5
16462   (exit $ac_status); }; }; then
16463   ac_cv_func_gettimeofday=yes
16464 else
16465   echo "$as_me: failed program was:" >&5
16466 cat conftest.$ac_ext >&5
16467 ac_cv_func_gettimeofday=no
16468 fi
16469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16470 fi
16471 echo "$as_me:16471: result: $ac_cv_func_gettimeofday" >&5
16472 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16473 if test $ac_cv_func_gettimeofday = yes; then
16474
16475 cat >>confdefs.h <<\EOF
16476 #define HAVE_GETTIMEOFDAY 1
16477 EOF
16478
16479 else
16480
16481 echo "$as_me:16481: checking for gettimeofday in -lbsd" >&5
16482 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16483 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16484   echo $ECHO_N "(cached) $ECHO_C" >&6
16485 else
16486   ac_check_lib_save_LIBS=$LIBS
16487 LIBS="-lbsd  $LIBS"
16488 cat >conftest.$ac_ext <<_ACEOF
16489 #line 16489 "configure"
16490 #include "confdefs.h"
16491
16492 /* Override any gcc2 internal prototype to avoid an error.  */
16493 #ifdef __cplusplus
16494 extern "C"
16495 #endif
16496 /* We use char because int might match the return type of a gcc2
16497    builtin and then its argument prototype would still apply.  */
16498 char gettimeofday ();
16499 int
16500 main (void)
16501 {
16502 gettimeofday ();
16503   ;
16504   return 0;
16505 }
16506 _ACEOF
16507 rm -f conftest.$ac_objext conftest$ac_exeext
16508 if { (eval echo "$as_me:16508: \"$ac_link\"") >&5
16509   (eval $ac_link) 2>&5
16510   ac_status=$?
16511   echo "$as_me:16511: \$? = $ac_status" >&5
16512   (exit $ac_status); } &&
16513          { ac_try='test -s conftest$ac_exeext'
16514   { (eval echo "$as_me:16514: \"$ac_try\"") >&5
16515   (eval $ac_try) 2>&5
16516   ac_status=$?
16517   echo "$as_me:16517: \$? = $ac_status" >&5
16518   (exit $ac_status); }; }; then
16519   ac_cv_lib_bsd_gettimeofday=yes
16520 else
16521   echo "$as_me: failed program was:" >&5
16522 cat conftest.$ac_ext >&5
16523 ac_cv_lib_bsd_gettimeofday=no
16524 fi
16525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16526 LIBS=$ac_check_lib_save_LIBS
16527 fi
16528 echo "$as_me:16528: result: $ac_cv_lib_bsd_gettimeofday" >&5
16529 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16530 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16531
16532 cat >>confdefs.h <<\EOF
16533 #define HAVE_GETTIMEOFDAY 1
16534 EOF
16535
16536 cf_add_libs="-lbsd"
16537 # Filter out duplicates - this happens with badly-designed ".pc" files...
16538 for cf_add_1lib in $LIBS
16539 do
16540         for cf_add_2lib in $cf_add_libs
16541         do
16542                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16543                 then
16544                         cf_add_1lib=
16545                         break
16546                 fi
16547         done
16548         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16549 done
16550 LIBS="$cf_add_libs"
16551
16552 fi
16553
16554 fi
16555         ;;
16556 esac
16557
16558 echo "$as_me:16558: checking if -lm needed for math functions" >&5
16559 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16560 if test "${cf_cv_need_libm+set}" = set; then
16561   echo $ECHO_N "(cached) $ECHO_C" >&6
16562 else
16563
16564         cat >conftest.$ac_ext <<_ACEOF
16565 #line 16565 "configure"
16566 #include "confdefs.h"
16567
16568         #include <stdio.h>
16569         #include <stdlib.h>
16570         #include <math.h>
16571
16572 int
16573 main (void)
16574 {
16575 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16576   ;
16577   return 0;
16578 }
16579 _ACEOF
16580 rm -f conftest.$ac_objext conftest$ac_exeext
16581 if { (eval echo "$as_me:16581: \"$ac_link\"") >&5
16582   (eval $ac_link) 2>&5
16583   ac_status=$?
16584   echo "$as_me:16584: \$? = $ac_status" >&5
16585   (exit $ac_status); } &&
16586          { ac_try='test -s conftest$ac_exeext'
16587   { (eval echo "$as_me:16587: \"$ac_try\"") >&5
16588   (eval $ac_try) 2>&5
16589   ac_status=$?
16590   echo "$as_me:16590: \$? = $ac_status" >&5
16591   (exit $ac_status); }; }; then
16592   cf_cv_need_libm=no
16593 else
16594   echo "$as_me: failed program was:" >&5
16595 cat conftest.$ac_ext >&5
16596 cf_cv_need_libm=yes
16597 fi
16598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16599 fi
16600 echo "$as_me:16600: result: $cf_cv_need_libm" >&5
16601 echo "${ECHO_T}$cf_cv_need_libm" >&6
16602 if test "$cf_cv_need_libm" = yes
16603 then
16604 MATH_LIB=-lm
16605 fi
16606
16607 ###     Checks for header files.
16608 echo "$as_me:16608: checking for ANSI C header files" >&5
16609 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16610 if test "${ac_cv_header_stdc+set}" = set; then
16611   echo $ECHO_N "(cached) $ECHO_C" >&6
16612 else
16613   cat >conftest.$ac_ext <<_ACEOF
16614 #line 16614 "configure"
16615 #include "confdefs.h"
16616 #include <stdlib.h>
16617 #include <stdarg.h>
16618 #include <string.h>
16619 #include <float.h>
16620
16621 _ACEOF
16622 if { (eval echo "$as_me:16622: \"$ac_cpp conftest.$ac_ext\"") >&5
16623   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16624   ac_status=$?
16625   egrep -v '^ *\+' conftest.er1 >conftest.err
16626   rm -f conftest.er1
16627   cat conftest.err >&5
16628   echo "$as_me:16628: \$? = $ac_status" >&5
16629   (exit $ac_status); } >/dev/null; then
16630   if test -s conftest.err; then
16631     ac_cpp_err=$ac_c_preproc_warn_flag
16632   else
16633     ac_cpp_err=
16634   fi
16635 else
16636   ac_cpp_err=yes
16637 fi
16638 if test -z "$ac_cpp_err"; then
16639   ac_cv_header_stdc=yes
16640 else
16641   echo "$as_me: failed program was:" >&5
16642   cat conftest.$ac_ext >&5
16643   ac_cv_header_stdc=no
16644 fi
16645 rm -f conftest.err conftest.$ac_ext
16646
16647 if test $ac_cv_header_stdc = yes; then
16648   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16649   cat >conftest.$ac_ext <<_ACEOF
16650 #line 16650 "configure"
16651 #include "confdefs.h"
16652 #include <string.h>
16653
16654 _ACEOF
16655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16656   egrep "memchr" >/dev/null 2>&1; then
16657   :
16658 else
16659   ac_cv_header_stdc=no
16660 fi
16661 rm -rf conftest*
16662
16663 fi
16664
16665 if test $ac_cv_header_stdc = yes; then
16666   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16667   cat >conftest.$ac_ext <<_ACEOF
16668 #line 16668 "configure"
16669 #include "confdefs.h"
16670 #include <stdlib.h>
16671
16672 _ACEOF
16673 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16674   egrep "free" >/dev/null 2>&1; then
16675   :
16676 else
16677   ac_cv_header_stdc=no
16678 fi
16679 rm -rf conftest*
16680
16681 fi
16682
16683 if test $ac_cv_header_stdc = yes; then
16684   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16685   if test "$cross_compiling" = yes; then
16686   :
16687 else
16688   cat >conftest.$ac_ext <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691 #include <ctype.h>
16692 #if ((' ' & 0x0FF) == 0x020)
16693 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16694 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16695 #else
16696 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16697                      || ('j' <= (c) && (c) <= 'r') \
16698                      || ('s' <= (c) && (c) <= 'z'))
16699 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16700 #endif
16701
16702 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16703 int
16704 main (void)
16705 {
16706   int i;
16707   for (i = 0; i < 256; i++)
16708     if (XOR (islower (i), ISLOWER (i))
16709         || toupper (i) != TOUPPER (i))
16710       $ac_main_return(2);
16711   $ac_main_return (0);
16712 }
16713 _ACEOF
16714 rm -f conftest$ac_exeext
16715 if { (eval echo "$as_me:16715: \"$ac_link\"") >&5
16716   (eval $ac_link) 2>&5
16717   ac_status=$?
16718   echo "$as_me:16718: \$? = $ac_status" >&5
16719   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16720   { (eval echo "$as_me:16720: \"$ac_try\"") >&5
16721   (eval $ac_try) 2>&5
16722   ac_status=$?
16723   echo "$as_me:16723: \$? = $ac_status" >&5
16724   (exit $ac_status); }; }; then
16725   :
16726 else
16727   echo "$as_me: program exited with status $ac_status" >&5
16728 echo "$as_me: failed program was:" >&5
16729 cat conftest.$ac_ext >&5
16730 ac_cv_header_stdc=no
16731 fi
16732 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16733 fi
16734 fi
16735 fi
16736 echo "$as_me:16736: result: $ac_cv_header_stdc" >&5
16737 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16738 if test $ac_cv_header_stdc = yes; then
16739
16740 cat >>confdefs.h <<\EOF
16741 #define STDC_HEADERS 1
16742 EOF
16743
16744 fi
16745
16746 ac_header_dirent=no
16747 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16748   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16749 echo "$as_me:16749: checking for $ac_hdr that defines DIR" >&5
16750 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16751 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16752   echo $ECHO_N "(cached) $ECHO_C" >&6
16753 else
16754   cat >conftest.$ac_ext <<_ACEOF
16755 #line 16755 "configure"
16756 #include "confdefs.h"
16757 #include <sys/types.h>
16758 #include <$ac_hdr>
16759
16760 int
16761 main (void)
16762 {
16763 if ((DIR *) 0)
16764 return 0;
16765   ;
16766   return 0;
16767 }
16768 _ACEOF
16769 rm -f conftest.$ac_objext
16770 if { (eval echo "$as_me:16770: \"$ac_compile\"") >&5
16771   (eval $ac_compile) 2>&5
16772   ac_status=$?
16773   echo "$as_me:16773: \$? = $ac_status" >&5
16774   (exit $ac_status); } &&
16775          { ac_try='test -s conftest.$ac_objext'
16776   { (eval echo "$as_me:16776: \"$ac_try\"") >&5
16777   (eval $ac_try) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit $ac_status); }; }; then
16781   eval "$as_ac_Header=yes"
16782 else
16783   echo "$as_me: failed program was:" >&5
16784 cat conftest.$ac_ext >&5
16785 eval "$as_ac_Header=no"
16786 fi
16787 rm -f conftest.$ac_objext conftest.$ac_ext
16788 fi
16789 echo "$as_me:16789: result: `eval echo '${'$as_ac_Header'}'`" >&5
16790 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16791 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16792   cat >>confdefs.h <<EOF
16793 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16794 EOF
16795
16796 ac_header_dirent=$ac_hdr; break
16797 fi
16798
16799 done
16800 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16801 if test $ac_header_dirent = dirent.h; then
16802   echo "$as_me:16802: checking for opendir in -ldir" >&5
16803 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16804 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16805   echo $ECHO_N "(cached) $ECHO_C" >&6
16806 else
16807   ac_check_lib_save_LIBS=$LIBS
16808 LIBS="-ldir  $LIBS"
16809 cat >conftest.$ac_ext <<_ACEOF
16810 #line 16810 "configure"
16811 #include "confdefs.h"
16812
16813 /* Override any gcc2 internal prototype to avoid an error.  */
16814 #ifdef __cplusplus
16815 extern "C"
16816 #endif
16817 /* We use char because int might match the return type of a gcc2
16818    builtin and then its argument prototype would still apply.  */
16819 char opendir ();
16820 int
16821 main (void)
16822 {
16823 opendir ();
16824   ;
16825   return 0;
16826 }
16827 _ACEOF
16828 rm -f conftest.$ac_objext conftest$ac_exeext
16829 if { (eval echo "$as_me:16829: \"$ac_link\"") >&5
16830   (eval $ac_link) 2>&5
16831   ac_status=$?
16832   echo "$as_me:16832: \$? = $ac_status" >&5
16833   (exit $ac_status); } &&
16834          { ac_try='test -s conftest$ac_exeext'
16835   { (eval echo "$as_me:16835: \"$ac_try\"") >&5
16836   (eval $ac_try) 2>&5
16837   ac_status=$?
16838   echo "$as_me:16838: \$? = $ac_status" >&5
16839   (exit $ac_status); }; }; then
16840   ac_cv_lib_dir_opendir=yes
16841 else
16842   echo "$as_me: failed program was:" >&5
16843 cat conftest.$ac_ext >&5
16844 ac_cv_lib_dir_opendir=no
16845 fi
16846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16847 LIBS=$ac_check_lib_save_LIBS
16848 fi
16849 echo "$as_me:16849: result: $ac_cv_lib_dir_opendir" >&5
16850 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16851 if test $ac_cv_lib_dir_opendir = yes; then
16852   LIBS="$LIBS -ldir"
16853 fi
16854
16855 else
16856   echo "$as_me:16856: checking for opendir in -lx" >&5
16857 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16858 if test "${ac_cv_lib_x_opendir+set}" = set; then
16859   echo $ECHO_N "(cached) $ECHO_C" >&6
16860 else
16861   ac_check_lib_save_LIBS=$LIBS
16862 LIBS="-lx  $LIBS"
16863 cat >conftest.$ac_ext <<_ACEOF
16864 #line 16864 "configure"
16865 #include "confdefs.h"
16866
16867 /* Override any gcc2 internal prototype to avoid an error.  */
16868 #ifdef __cplusplus
16869 extern "C"
16870 #endif
16871 /* We use char because int might match the return type of a gcc2
16872    builtin and then its argument prototype would still apply.  */
16873 char opendir ();
16874 int
16875 main (void)
16876 {
16877 opendir ();
16878   ;
16879   return 0;
16880 }
16881 _ACEOF
16882 rm -f conftest.$ac_objext conftest$ac_exeext
16883 if { (eval echo "$as_me:16883: \"$ac_link\"") >&5
16884   (eval $ac_link) 2>&5
16885   ac_status=$?
16886   echo "$as_me:16886: \$? = $ac_status" >&5
16887   (exit $ac_status); } &&
16888          { ac_try='test -s conftest$ac_exeext'
16889   { (eval echo "$as_me:16889: \"$ac_try\"") >&5
16890   (eval $ac_try) 2>&5
16891   ac_status=$?
16892   echo "$as_me:16892: \$? = $ac_status" >&5
16893   (exit $ac_status); }; }; then
16894   ac_cv_lib_x_opendir=yes
16895 else
16896   echo "$as_me: failed program was:" >&5
16897 cat conftest.$ac_ext >&5
16898 ac_cv_lib_x_opendir=no
16899 fi
16900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16901 LIBS=$ac_check_lib_save_LIBS
16902 fi
16903 echo "$as_me:16903: result: $ac_cv_lib_x_opendir" >&5
16904 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16905 if test $ac_cv_lib_x_opendir = yes; then
16906   LIBS="$LIBS -lx"
16907 fi
16908
16909 fi
16910
16911 echo "$as_me:16911: checking whether time.h and sys/time.h may both be included" >&5
16912 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16913 if test "${ac_cv_header_time+set}" = set; then
16914   echo $ECHO_N "(cached) $ECHO_C" >&6
16915 else
16916   cat >conftest.$ac_ext <<_ACEOF
16917 #line 16917 "configure"
16918 #include "confdefs.h"
16919 #include <sys/types.h>
16920 #include <sys/time.h>
16921 #include <time.h>
16922
16923 int
16924 main (void)
16925 {
16926 if ((struct tm *) 0)
16927 return 0;
16928   ;
16929   return 0;
16930 }
16931 _ACEOF
16932 rm -f conftest.$ac_objext
16933 if { (eval echo "$as_me:16933: \"$ac_compile\"") >&5
16934   (eval $ac_compile) 2>&5
16935   ac_status=$?
16936   echo "$as_me:16936: \$? = $ac_status" >&5
16937   (exit $ac_status); } &&
16938          { ac_try='test -s conftest.$ac_objext'
16939   { (eval echo "$as_me:16939: \"$ac_try\"") >&5
16940   (eval $ac_try) 2>&5
16941   ac_status=$?
16942   echo "$as_me:16942: \$? = $ac_status" >&5
16943   (exit $ac_status); }; }; then
16944   ac_cv_header_time=yes
16945 else
16946   echo "$as_me: failed program was:" >&5
16947 cat conftest.$ac_ext >&5
16948 ac_cv_header_time=no
16949 fi
16950 rm -f conftest.$ac_objext conftest.$ac_ext
16951 fi
16952 echo "$as_me:16952: result: $ac_cv_header_time" >&5
16953 echo "${ECHO_T}$ac_cv_header_time" >&6
16954 if test $ac_cv_header_time = yes; then
16955
16956 cat >>confdefs.h <<\EOF
16957 #define TIME_WITH_SYS_TIME 1
16958 EOF
16959
16960 fi
16961
16962 cf_regex_func=no
16963
16964 cf_regex_libs="regex re"
16965 case $host_os in
16966 (mingw*)
16967         cf_regex_libs="gnurx $cf_regex_libs"
16968         ;;
16969 esac
16970
16971 echo "$as_me:16971: checking for regcomp" >&5
16972 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
16973 if test "${ac_cv_func_regcomp+set}" = set; then
16974   echo $ECHO_N "(cached) $ECHO_C" >&6
16975 else
16976   cat >conftest.$ac_ext <<_ACEOF
16977 #line 16977 "configure"
16978 #include "confdefs.h"
16979 /* System header to define __stub macros and hopefully few prototypes,
16980     which can conflict with char regcomp (); below.  */
16981 #include <assert.h>
16982 /* Override any gcc2 internal prototype to avoid an error.  */
16983 #ifdef __cplusplus
16984 extern "C"
16985 #endif
16986 /* We use char because int might match the return type of a gcc2
16987    builtin and then its argument prototype would still apply.  */
16988 char regcomp ();
16989 char (*f) ();
16990
16991 int
16992 main (void)
16993 {
16994 /* The GNU C library defines this for functions which it implements
16995     to always fail with ENOSYS.  Some functions are actually named
16996     something starting with __ and the normal name is an alias.  */
16997 #if defined (__stub_regcomp) || defined (__stub___regcomp)
16998 choke me
16999 #else
17000 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17001 #endif
17002
17003   ;
17004   return 0;
17005 }
17006 _ACEOF
17007 rm -f conftest.$ac_objext conftest$ac_exeext
17008 if { (eval echo "$as_me:17008: \"$ac_link\"") >&5
17009   (eval $ac_link) 2>&5
17010   ac_status=$?
17011   echo "$as_me:17011: \$? = $ac_status" >&5
17012   (exit $ac_status); } &&
17013          { ac_try='test -s conftest$ac_exeext'
17014   { (eval echo "$as_me:17014: \"$ac_try\"") >&5
17015   (eval $ac_try) 2>&5
17016   ac_status=$?
17017   echo "$as_me:17017: \$? = $ac_status" >&5
17018   (exit $ac_status); }; }; then
17019   ac_cv_func_regcomp=yes
17020 else
17021   echo "$as_me: failed program was:" >&5
17022 cat conftest.$ac_ext >&5
17023 ac_cv_func_regcomp=no
17024 fi
17025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17026 fi
17027 echo "$as_me:17027: result: $ac_cv_func_regcomp" >&5
17028 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17029 if test $ac_cv_func_regcomp = yes; then
17030   cf_regex_func=regcomp
17031 else
17032
17033         for cf_regex_lib in $cf_regex_libs
17034         do
17035                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17036 echo "$as_me:17036: checking for regcomp in -l$cf_regex_lib" >&5
17037 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17038 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17039   echo $ECHO_N "(cached) $ECHO_C" >&6
17040 else
17041   ac_check_lib_save_LIBS=$LIBS
17042 LIBS="-l$cf_regex_lib  $LIBS"
17043 cat >conftest.$ac_ext <<_ACEOF
17044 #line 17044 "configure"
17045 #include "confdefs.h"
17046
17047 /* Override any gcc2 internal prototype to avoid an error.  */
17048 #ifdef __cplusplus
17049 extern "C"
17050 #endif
17051 /* We use char because int might match the return type of a gcc2
17052    builtin and then its argument prototype would still apply.  */
17053 char regcomp ();
17054 int
17055 main (void)
17056 {
17057 regcomp ();
17058   ;
17059   return 0;
17060 }
17061 _ACEOF
17062 rm -f conftest.$ac_objext conftest$ac_exeext
17063 if { (eval echo "$as_me:17063: \"$ac_link\"") >&5
17064   (eval $ac_link) 2>&5
17065   ac_status=$?
17066   echo "$as_me:17066: \$? = $ac_status" >&5
17067   (exit $ac_status); } &&
17068          { ac_try='test -s conftest$ac_exeext'
17069   { (eval echo "$as_me:17069: \"$ac_try\"") >&5
17070   (eval $ac_try) 2>&5
17071   ac_status=$?
17072   echo "$as_me:17072: \$? = $ac_status" >&5
17073   (exit $ac_status); }; }; then
17074   eval "$as_ac_Lib=yes"
17075 else
17076   echo "$as_me: failed program was:" >&5
17077 cat conftest.$ac_ext >&5
17078 eval "$as_ac_Lib=no"
17079 fi
17080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17081 LIBS=$ac_check_lib_save_LIBS
17082 fi
17083 echo "$as_me:17083: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17084 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17085 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17086
17087 cf_add_libs="-l$cf_regex_lib"
17088 # Filter out duplicates - this happens with badly-designed ".pc" files...
17089 for cf_add_1lib in $LIBS
17090 do
17091         for cf_add_2lib in $cf_add_libs
17092         do
17093                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17094                 then
17095                         cf_add_1lib=
17096                         break
17097                 fi
17098         done
17099         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17100 done
17101 LIBS="$cf_add_libs"
17102
17103                                 cf_regex_func=regcomp
17104                                 break
17105 fi
17106
17107         done
17108
17109 fi
17110
17111 if test "$cf_regex_func" = no ; then
17112         echo "$as_me:17112: checking for compile" >&5
17113 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17114 if test "${ac_cv_func_compile+set}" = set; then
17115   echo $ECHO_N "(cached) $ECHO_C" >&6
17116 else
17117   cat >conftest.$ac_ext <<_ACEOF
17118 #line 17118 "configure"
17119 #include "confdefs.h"
17120 /* System header to define __stub macros and hopefully few prototypes,
17121     which can conflict with char compile (); below.  */
17122 #include <assert.h>
17123 /* Override any gcc2 internal prototype to avoid an error.  */
17124 #ifdef __cplusplus
17125 extern "C"
17126 #endif
17127 /* We use char because int might match the return type of a gcc2
17128    builtin and then its argument prototype would still apply.  */
17129 char compile ();
17130 char (*f) ();
17131
17132 int
17133 main (void)
17134 {
17135 /* The GNU C library defines this for functions which it implements
17136     to always fail with ENOSYS.  Some functions are actually named
17137     something starting with __ and the normal name is an alias.  */
17138 #if defined (__stub_compile) || defined (__stub___compile)
17139 choke me
17140 #else
17141 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17142 #endif
17143
17144   ;
17145   return 0;
17146 }
17147 _ACEOF
17148 rm -f conftest.$ac_objext conftest$ac_exeext
17149 if { (eval echo "$as_me:17149: \"$ac_link\"") >&5
17150   (eval $ac_link) 2>&5
17151   ac_status=$?
17152   echo "$as_me:17152: \$? = $ac_status" >&5
17153   (exit $ac_status); } &&
17154          { ac_try='test -s conftest$ac_exeext'
17155   { (eval echo "$as_me:17155: \"$ac_try\"") >&5
17156   (eval $ac_try) 2>&5
17157   ac_status=$?
17158   echo "$as_me:17158: \$? = $ac_status" >&5
17159   (exit $ac_status); }; }; then
17160   ac_cv_func_compile=yes
17161 else
17162   echo "$as_me: failed program was:" >&5
17163 cat conftest.$ac_ext >&5
17164 ac_cv_func_compile=no
17165 fi
17166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17167 fi
17168 echo "$as_me:17168: result: $ac_cv_func_compile" >&5
17169 echo "${ECHO_T}$ac_cv_func_compile" >&6
17170 if test $ac_cv_func_compile = yes; then
17171   cf_regex_func=compile
17172 else
17173
17174                 echo "$as_me:17174: checking for compile in -lgen" >&5
17175 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17176 if test "${ac_cv_lib_gen_compile+set}" = set; then
17177   echo $ECHO_N "(cached) $ECHO_C" >&6
17178 else
17179   ac_check_lib_save_LIBS=$LIBS
17180 LIBS="-lgen  $LIBS"
17181 cat >conftest.$ac_ext <<_ACEOF
17182 #line 17182 "configure"
17183 #include "confdefs.h"
17184
17185 /* Override any gcc2 internal prototype to avoid an error.  */
17186 #ifdef __cplusplus
17187 extern "C"
17188 #endif
17189 /* We use char because int might match the return type of a gcc2
17190    builtin and then its argument prototype would still apply.  */
17191 char compile ();
17192 int
17193 main (void)
17194 {
17195 compile ();
17196   ;
17197   return 0;
17198 }
17199 _ACEOF
17200 rm -f conftest.$ac_objext conftest$ac_exeext
17201 if { (eval echo "$as_me:17201: \"$ac_link\"") >&5
17202   (eval $ac_link) 2>&5
17203   ac_status=$?
17204   echo "$as_me:17204: \$? = $ac_status" >&5
17205   (exit $ac_status); } &&
17206          { ac_try='test -s conftest$ac_exeext'
17207   { (eval echo "$as_me:17207: \"$ac_try\"") >&5
17208   (eval $ac_try) 2>&5
17209   ac_status=$?
17210   echo "$as_me:17210: \$? = $ac_status" >&5
17211   (exit $ac_status); }; }; then
17212   ac_cv_lib_gen_compile=yes
17213 else
17214   echo "$as_me: failed program was:" >&5
17215 cat conftest.$ac_ext >&5
17216 ac_cv_lib_gen_compile=no
17217 fi
17218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17219 LIBS=$ac_check_lib_save_LIBS
17220 fi
17221 echo "$as_me:17221: result: $ac_cv_lib_gen_compile" >&5
17222 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17223 if test $ac_cv_lib_gen_compile = yes; then
17224
17225 cf_add_libs="-lgen"
17226 # Filter out duplicates - this happens with badly-designed ".pc" files...
17227 for cf_add_1lib in $LIBS
17228 do
17229         for cf_add_2lib in $cf_add_libs
17230         do
17231                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17232                 then
17233                         cf_add_1lib=
17234                         break
17235                 fi
17236         done
17237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17238 done
17239 LIBS="$cf_add_libs"
17240
17241                                 cf_regex_func=compile
17242 fi
17243
17244 fi
17245
17246 fi
17247
17248 if test "$cf_regex_func" = no ; then
17249         { echo "$as_me:17249: WARNING: cannot find regular expression library" >&5
17250 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17251 fi
17252
17253 echo "$as_me:17253: checking for regular-expression headers" >&5
17254 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17255 if test "${cf_cv_regex_hdrs+set}" = set; then
17256   echo $ECHO_N "(cached) $ECHO_C" >&6
17257 else
17258
17259 cf_cv_regex_hdrs=no
17260 case $cf_regex_func in
17261 (compile)
17262         for cf_regex_hdr in regexp.h regexpr.h
17263         do
17264                 cat >conftest.$ac_ext <<_ACEOF
17265 #line 17265 "configure"
17266 #include "confdefs.h"
17267 #include <$cf_regex_hdr>
17268 int
17269 main (void)
17270 {
17271
17272                         char *p = compile("", "", "", 0);
17273                         int x = step("", "");
17274
17275   ;
17276   return 0;
17277 }
17278 _ACEOF
17279 rm -f conftest.$ac_objext conftest$ac_exeext
17280 if { (eval echo "$as_me:17280: \"$ac_link\"") >&5
17281   (eval $ac_link) 2>&5
17282   ac_status=$?
17283   echo "$as_me:17283: \$? = $ac_status" >&5
17284   (exit $ac_status); } &&
17285          { ac_try='test -s conftest$ac_exeext'
17286   { (eval echo "$as_me:17286: \"$ac_try\"") >&5
17287   (eval $ac_try) 2>&5
17288   ac_status=$?
17289   echo "$as_me:17289: \$? = $ac_status" >&5
17290   (exit $ac_status); }; }; then
17291
17292                         cf_cv_regex_hdrs=$cf_regex_hdr
17293                         break
17294
17295 else
17296   echo "$as_me: failed program was:" >&5
17297 cat conftest.$ac_ext >&5
17298 fi
17299 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17300         done
17301         ;;
17302 (*)
17303         for cf_regex_hdr in regex.h
17304         do
17305                 cat >conftest.$ac_ext <<_ACEOF
17306 #line 17306 "configure"
17307 #include "confdefs.h"
17308 #include <sys/types.h>
17309 #include <$cf_regex_hdr>
17310 int
17311 main (void)
17312 {
17313
17314                         regex_t *p;
17315                         int x = regcomp(p, "", 0);
17316                         int y = regexec(p, "", 0, 0, 0);
17317                         regfree(p);
17318
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
17336                         cf_cv_regex_hdrs=$cf_regex_hdr
17337                         break
17338
17339 else
17340   echo "$as_me: failed program was:" >&5
17341 cat conftest.$ac_ext >&5
17342 fi
17343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17344         done
17345         ;;
17346 esac
17347
17348 fi
17349 echo "$as_me:17349: result: $cf_cv_regex_hdrs" >&5
17350 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17351
17352 case $cf_cv_regex_hdrs in
17353         (no)            { echo "$as_me:17353: WARNING: no regular expression header found" >&5
17354 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17355         (regex.h)
17356 cat >>confdefs.h <<\EOF
17357 #define HAVE_REGEX_H_FUNCS 1
17358 EOF
17359  ;;
17360         (regexp.h)
17361 cat >>confdefs.h <<\EOF
17362 #define HAVE_REGEXP_H_FUNCS 1
17363 EOF
17364  ;;
17365         (regexpr.h)
17366 cat >>confdefs.h <<\EOF
17367 #define HAVE_REGEXPR_H_FUNCS 1
17368 EOF
17369  ;;
17370 esac
17371
17372 for ac_header in \
17373 fcntl.h \
17374 getopt.h \
17375 limits.h \
17376 locale.h \
17377 math.h \
17378 poll.h \
17379 sys/bsdtypes.h \
17380 sys/ioctl.h \
17381 sys/param.h \
17382 sys/poll.h \
17383 sys/select.h \
17384 sys/time.h \
17385 sys/times.h \
17386 ttyent.h \
17387 unistd.h \
17388 wctype.h \
17389
17390 do
17391 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17392 echo "$as_me:17392: checking for $ac_header" >&5
17393 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17394 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17395   echo $ECHO_N "(cached) $ECHO_C" >&6
17396 else
17397   cat >conftest.$ac_ext <<_ACEOF
17398 #line 17398 "configure"
17399 #include "confdefs.h"
17400 #include <$ac_header>
17401 _ACEOF
17402 if { (eval echo "$as_me:17402: \"$ac_cpp conftest.$ac_ext\"") >&5
17403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17404   ac_status=$?
17405   egrep -v '^ *\+' conftest.er1 >conftest.err
17406   rm -f conftest.er1
17407   cat conftest.err >&5
17408   echo "$as_me:17408: \$? = $ac_status" >&5
17409   (exit $ac_status); } >/dev/null; then
17410   if test -s conftest.err; then
17411     ac_cpp_err=$ac_c_preproc_warn_flag
17412   else
17413     ac_cpp_err=
17414   fi
17415 else
17416   ac_cpp_err=yes
17417 fi
17418 if test -z "$ac_cpp_err"; then
17419   eval "$as_ac_Header=yes"
17420 else
17421   echo "$as_me: failed program was:" >&5
17422   cat conftest.$ac_ext >&5
17423   eval "$as_ac_Header=no"
17424 fi
17425 rm -f conftest.err conftest.$ac_ext
17426 fi
17427 echo "$as_me:17427: result: `eval echo '${'$as_ac_Header'}'`" >&5
17428 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17429 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17430   cat >>confdefs.h <<EOF
17431 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17432 EOF
17433
17434 fi
17435 done
17436
17437 for ac_header in unistd.h getopt.h
17438 do
17439 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17440 echo "$as_me:17440: checking for $ac_header" >&5
17441 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17442 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17443   echo $ECHO_N "(cached) $ECHO_C" >&6
17444 else
17445   cat >conftest.$ac_ext <<_ACEOF
17446 #line 17446 "configure"
17447 #include "confdefs.h"
17448 #include <$ac_header>
17449 _ACEOF
17450 if { (eval echo "$as_me:17450: \"$ac_cpp conftest.$ac_ext\"") >&5
17451   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17452   ac_status=$?
17453   egrep -v '^ *\+' conftest.er1 >conftest.err
17454   rm -f conftest.er1
17455   cat conftest.err >&5
17456   echo "$as_me:17456: \$? = $ac_status" >&5
17457   (exit $ac_status); } >/dev/null; then
17458   if test -s conftest.err; then
17459     ac_cpp_err=$ac_c_preproc_warn_flag
17460   else
17461     ac_cpp_err=
17462   fi
17463 else
17464   ac_cpp_err=yes
17465 fi
17466 if test -z "$ac_cpp_err"; then
17467   eval "$as_ac_Header=yes"
17468 else
17469   echo "$as_me: failed program was:" >&5
17470   cat conftest.$ac_ext >&5
17471   eval "$as_ac_Header=no"
17472 fi
17473 rm -f conftest.err conftest.$ac_ext
17474 fi
17475 echo "$as_me:17475: result: `eval echo '${'$as_ac_Header'}'`" >&5
17476 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17477 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17478   cat >>confdefs.h <<EOF
17479 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17480 EOF
17481
17482 fi
17483 done
17484
17485 echo "$as_me:17485: checking for header declaring getopt variables" >&5
17486 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17487 if test "${cf_cv_getopt_header+set}" = set; then
17488   echo $ECHO_N "(cached) $ECHO_C" >&6
17489 else
17490
17491 cf_cv_getopt_header=none
17492 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17493 do
17494 cat >conftest.$ac_ext <<_ACEOF
17495 #line 17495 "configure"
17496 #include "confdefs.h"
17497
17498 #include <$cf_header>
17499 int
17500 main (void)
17501 {
17502 int x = optind; char *y = optarg
17503   ;
17504   return 0;
17505 }
17506 _ACEOF
17507 rm -f conftest.$ac_objext
17508 if { (eval echo "$as_me:17508: \"$ac_compile\"") >&5
17509   (eval $ac_compile) 2>&5
17510   ac_status=$?
17511   echo "$as_me:17511: \$? = $ac_status" >&5
17512   (exit $ac_status); } &&
17513          { ac_try='test -s conftest.$ac_objext'
17514   { (eval echo "$as_me:17514: \"$ac_try\"") >&5
17515   (eval $ac_try) 2>&5
17516   ac_status=$?
17517   echo "$as_me:17517: \$? = $ac_status" >&5
17518   (exit $ac_status); }; }; then
17519   cf_cv_getopt_header=$cf_header
17520  break
17521 else
17522   echo "$as_me: failed program was:" >&5
17523 cat conftest.$ac_ext >&5
17524 fi
17525 rm -f conftest.$ac_objext conftest.$ac_ext
17526 done
17527
17528 fi
17529 echo "$as_me:17529: result: $cf_cv_getopt_header" >&5
17530 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17531 if test $cf_cv_getopt_header != none ; then
17532
17533 cat >>confdefs.h <<\EOF
17534 #define HAVE_GETOPT_HEADER 1
17535 EOF
17536
17537 fi
17538 if test $cf_cv_getopt_header = getopt.h ; then
17539
17540 cat >>confdefs.h <<\EOF
17541 #define NEED_GETOPT_H 1
17542 EOF
17543
17544 fi
17545
17546 # check for ISC (this may also define _POSIX_SOURCE)
17547 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17548 if test "x$ISC" = xyes ; then
17549
17550 echo "$as_me:17550: checking for main in -lcposix" >&5
17551 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17552 if test "${ac_cv_lib_cposix_main+set}" = set; then
17553   echo $ECHO_N "(cached) $ECHO_C" >&6
17554 else
17555   ac_check_lib_save_LIBS=$LIBS
17556 LIBS="-lcposix  $LIBS"
17557 cat >conftest.$ac_ext <<_ACEOF
17558 #line 17558 "configure"
17559 #include "confdefs.h"
17560
17561 int
17562 main (void)
17563 {
17564 main ();
17565   ;
17566   return 0;
17567 }
17568 _ACEOF
17569 rm -f conftest.$ac_objext conftest$ac_exeext
17570 if { (eval echo "$as_me:17570: \"$ac_link\"") >&5
17571   (eval $ac_link) 2>&5
17572   ac_status=$?
17573   echo "$as_me:17573: \$? = $ac_status" >&5
17574   (exit $ac_status); } &&
17575          { ac_try='test -s conftest$ac_exeext'
17576   { (eval echo "$as_me:17576: \"$ac_try\"") >&5
17577   (eval $ac_try) 2>&5
17578   ac_status=$?
17579   echo "$as_me:17579: \$? = $ac_status" >&5
17580   (exit $ac_status); }; }; then
17581   ac_cv_lib_cposix_main=yes
17582 else
17583   echo "$as_me: failed program was:" >&5
17584 cat conftest.$ac_ext >&5
17585 ac_cv_lib_cposix_main=no
17586 fi
17587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17588 LIBS=$ac_check_lib_save_LIBS
17589 fi
17590 echo "$as_me:17590: result: $ac_cv_lib_cposix_main" >&5
17591 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17592 if test $ac_cv_lib_cposix_main = yes; then
17593   cat >>confdefs.h <<EOF
17594 #define HAVE_LIBCPOSIX 1
17595 EOF
17596
17597   LIBS="-lcposix $LIBS"
17598
17599 fi
17600
17601         echo "$as_me:17601: checking for bzero in -linet" >&5
17602 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17603 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17604   echo $ECHO_N "(cached) $ECHO_C" >&6
17605 else
17606   ac_check_lib_save_LIBS=$LIBS
17607 LIBS="-linet  $LIBS"
17608 cat >conftest.$ac_ext <<_ACEOF
17609 #line 17609 "configure"
17610 #include "confdefs.h"
17611
17612 /* Override any gcc2 internal prototype to avoid an error.  */
17613 #ifdef __cplusplus
17614 extern "C"
17615 #endif
17616 /* We use char because int might match the return type of a gcc2
17617    builtin and then its argument prototype would still apply.  */
17618 char bzero ();
17619 int
17620 main (void)
17621 {
17622 bzero ();
17623   ;
17624   return 0;
17625 }
17626 _ACEOF
17627 rm -f conftest.$ac_objext conftest$ac_exeext
17628 if { (eval echo "$as_me:17628: \"$ac_link\"") >&5
17629   (eval $ac_link) 2>&5
17630   ac_status=$?
17631   echo "$as_me:17631: \$? = $ac_status" >&5
17632   (exit $ac_status); } &&
17633          { ac_try='test -s conftest$ac_exeext'
17634   { (eval echo "$as_me:17634: \"$ac_try\"") >&5
17635   (eval $ac_try) 2>&5
17636   ac_status=$?
17637   echo "$as_me:17637: \$? = $ac_status" >&5
17638   (exit $ac_status); }; }; then
17639   ac_cv_lib_inet_bzero=yes
17640 else
17641   echo "$as_me: failed program was:" >&5
17642 cat conftest.$ac_ext >&5
17643 ac_cv_lib_inet_bzero=no
17644 fi
17645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17646 LIBS=$ac_check_lib_save_LIBS
17647 fi
17648 echo "$as_me:17648: result: $ac_cv_lib_inet_bzero" >&5
17649 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17650 if test $ac_cv_lib_inet_bzero = yes; then
17651
17652 cf_add_libs="-linet"
17653 # Filter out duplicates - this happens with badly-designed ".pc" files...
17654 for cf_add_1lib in $LIBS
17655 do
17656         for cf_add_2lib in $cf_add_libs
17657         do
17658                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17659                 then
17660                         cf_add_1lib=
17661                         break
17662                 fi
17663         done
17664         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17665 done
17666 LIBS="$cf_add_libs"
17667
17668 fi
17669 fi
17670
17671 echo "$as_me:17671: checking if sys/time.h works with sys/select.h" >&5
17672 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17673 if test "${cf_cv_sys_time_select+set}" = set; then
17674   echo $ECHO_N "(cached) $ECHO_C" >&6
17675 else
17676
17677 cat >conftest.$ac_ext <<_ACEOF
17678 #line 17678 "configure"
17679 #include "confdefs.h"
17680
17681 #include <sys/types.h>
17682 #ifdef HAVE_SYS_TIME_H
17683 #include <sys/time.h>
17684 #endif
17685 #ifdef HAVE_SYS_SELECT_H
17686 #include <sys/select.h>
17687 #endif
17688
17689 int
17690 main (void)
17691 {
17692
17693   ;
17694   return 0;
17695 }
17696 _ACEOF
17697 rm -f conftest.$ac_objext
17698 if { (eval echo "$as_me:17698: \"$ac_compile\"") >&5
17699   (eval $ac_compile) 2>&5
17700   ac_status=$?
17701   echo "$as_me:17701: \$? = $ac_status" >&5
17702   (exit $ac_status); } &&
17703          { ac_try='test -s conftest.$ac_objext'
17704   { (eval echo "$as_me:17704: \"$ac_try\"") >&5
17705   (eval $ac_try) 2>&5
17706   ac_status=$?
17707   echo "$as_me:17707: \$? = $ac_status" >&5
17708   (exit $ac_status); }; }; then
17709   cf_cv_sys_time_select=yes
17710 else
17711   echo "$as_me: failed program was:" >&5
17712 cat conftest.$ac_ext >&5
17713 cf_cv_sys_time_select=no
17714 fi
17715 rm -f conftest.$ac_objext conftest.$ac_ext
17716
17717 fi
17718
17719 echo "$as_me:17719: result: $cf_cv_sys_time_select" >&5
17720 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17721 test "$cf_cv_sys_time_select" = yes &&
17722 cat >>confdefs.h <<\EOF
17723 #define HAVE_SYS_TIME_SELECT 1
17724 EOF
17725
17726 ###     checks for compiler characteristics
17727 ac_ext=c
17728 ac_cpp='$CPP $CPPFLAGS'
17729 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17730 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17731 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17732 ac_main_return=return
17733
17734 echo "$as_me:17734: checking for an ANSI C-conforming const" >&5
17735 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17736 if test "${ac_cv_c_const+set}" = set; then
17737   echo $ECHO_N "(cached) $ECHO_C" >&6
17738 else
17739   cat >conftest.$ac_ext <<_ACEOF
17740 #line 17740 "configure"
17741 #include "confdefs.h"
17742
17743 int
17744 main (void)
17745 {
17746 /* FIXME: Include the comments suggested by Paul. */
17747 #ifndef __cplusplus
17748   /* Ultrix mips cc rejects this.  */
17749   typedef int charset[2];
17750   const charset x;
17751   /* SunOS 4.1.1 cc rejects this.  */
17752   char const *const *ccp;
17753   char **p;
17754   /* NEC SVR4.0.2 mips cc rejects this.  */
17755   struct point {int x, y;};
17756   static struct point const zero = {0,0};
17757   /* AIX XL C 1.02.0.0 rejects this.
17758      It does not let you subtract one const X* pointer from another in
17759      an arm of an if-expression whose if-part is not a constant
17760      expression */
17761   const char *g = "string";
17762   ccp = &g + (g ? g-g : 0);
17763   /* HPUX 7.0 cc rejects these. */
17764   ++ccp;
17765   p = (char**) ccp;
17766   ccp = (char const *const *) p;
17767   { /* SCO 3.2v4 cc rejects this.  */
17768     char *t;
17769     char const *s = 0 ? (char *) 0 : (char const *) 0;
17770
17771     *t++ = 0;
17772   }
17773   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17774     int x[] = {25, 17};
17775     const int *foo = &x[0];
17776     ++foo;
17777   }
17778   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17779     typedef const int *iptr;
17780     iptr p = 0;
17781     ++p;
17782   }
17783   { /* AIX XL C 1.02.0.0 rejects this saying
17784        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17785     struct s { int j; const int *ap[3]; };
17786     struct s *b; b->j = 5;
17787   }
17788   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17789     const int foo = 10;
17790   }
17791 #endif
17792
17793   ;
17794   return 0;
17795 }
17796 _ACEOF
17797 rm -f conftest.$ac_objext
17798 if { (eval echo "$as_me:17798: \"$ac_compile\"") >&5
17799   (eval $ac_compile) 2>&5
17800   ac_status=$?
17801   echo "$as_me:17801: \$? = $ac_status" >&5
17802   (exit $ac_status); } &&
17803          { ac_try='test -s conftest.$ac_objext'
17804   { (eval echo "$as_me:17804: \"$ac_try\"") >&5
17805   (eval $ac_try) 2>&5
17806   ac_status=$?
17807   echo "$as_me:17807: \$? = $ac_status" >&5
17808   (exit $ac_status); }; }; then
17809   ac_cv_c_const=yes
17810 else
17811   echo "$as_me: failed program was:" >&5
17812 cat conftest.$ac_ext >&5
17813 ac_cv_c_const=no
17814 fi
17815 rm -f conftest.$ac_objext conftest.$ac_ext
17816 fi
17817 echo "$as_me:17817: result: $ac_cv_c_const" >&5
17818 echo "${ECHO_T}$ac_cv_c_const" >&6
17819 if test $ac_cv_c_const = no; then
17820
17821 cat >>confdefs.h <<\EOF
17822 #define const
17823 EOF
17824
17825 fi
17826
17827 echo "$as_me:17827: checking for inline" >&5
17828 echo $ECHO_N "checking for inline... $ECHO_C" >&6
17829 if test "${ac_cv_c_inline+set}" = set; then
17830   echo $ECHO_N "(cached) $ECHO_C" >&6
17831 else
17832   ac_cv_c_inline=no
17833 for ac_kw in inline __inline__ __inline; do
17834   cat >conftest.$ac_ext <<_ACEOF
17835 #line 17835 "configure"
17836 #include "confdefs.h"
17837 #ifndef __cplusplus
17838 static $ac_kw int static_foo () {return 0; }
17839 $ac_kw int foo () {return 0; }
17840 #endif
17841
17842 _ACEOF
17843 rm -f conftest.$ac_objext
17844 if { (eval echo "$as_me:17844: \"$ac_compile\"") >&5
17845   (eval $ac_compile) 2>&5
17846   ac_status=$?
17847   echo "$as_me:17847: \$? = $ac_status" >&5
17848   (exit $ac_status); } &&
17849          { ac_try='test -s conftest.$ac_objext'
17850   { (eval echo "$as_me:17850: \"$ac_try\"") >&5
17851   (eval $ac_try) 2>&5
17852   ac_status=$?
17853   echo "$as_me:17853: \$? = $ac_status" >&5
17854   (exit $ac_status); }; }; then
17855   ac_cv_c_inline=$ac_kw; break
17856 else
17857   echo "$as_me: failed program was:" >&5
17858 cat conftest.$ac_ext >&5
17859 fi
17860 rm -f conftest.$ac_objext conftest.$ac_ext
17861 done
17862
17863 fi
17864 echo "$as_me:17864: result: $ac_cv_c_inline" >&5
17865 echo "${ECHO_T}$ac_cv_c_inline" >&6
17866 case $ac_cv_c_inline in
17867   inline | yes) ;;
17868   no)
17869 cat >>confdefs.h <<\EOF
17870 #define inline
17871 EOF
17872  ;;
17873   *)  cat >>confdefs.h <<EOF
17874 #define inline $ac_cv_c_inline
17875 EOF
17876  ;;
17877 esac
17878
17879 NCURSES_INLINE=
17880 if test "$ac_cv_c_inline" != no ; then
17881         NCURSES_INLINE=inline
17882         if test "$INTEL_COMPILER" = yes
17883         then
17884                 :
17885         elif test "$CLANG_COMPILER" = yes
17886         then
17887                 :
17888         elif test "$GCC" = yes
17889         then
17890                 echo "$as_me:17890: checking if $CC supports options to tune inlining" >&5
17891 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
17892 if test "${cf_cv_gcc_inline+set}" = set; then
17893   echo $ECHO_N "(cached) $ECHO_C" >&6
17894 else
17895
17896                 cf_save_CFLAGS=$CFLAGS
17897                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
17898                 cat >conftest.$ac_ext <<_ACEOF
17899 #line 17899 "configure"
17900 #include "confdefs.h"
17901 inline int foo(void) { return 1; }
17902 int
17903 main (void)
17904 {
17905 ${cf_cv_main_return:-return} foo()
17906   ;
17907   return 0;
17908 }
17909 _ACEOF
17910 rm -f conftest.$ac_objext
17911 if { (eval echo "$as_me:17911: \"$ac_compile\"") >&5
17912   (eval $ac_compile) 2>&5
17913   ac_status=$?
17914   echo "$as_me:17914: \$? = $ac_status" >&5
17915   (exit $ac_status); } &&
17916          { ac_try='test -s conftest.$ac_objext'
17917   { (eval echo "$as_me:17917: \"$ac_try\"") >&5
17918   (eval $ac_try) 2>&5
17919   ac_status=$?
17920   echo "$as_me:17920: \$? = $ac_status" >&5
17921   (exit $ac_status); }; }; then
17922   cf_cv_gcc_inline=yes
17923 else
17924   echo "$as_me: failed program was:" >&5
17925 cat conftest.$ac_ext >&5
17926 cf_cv_gcc_inline=no
17927 fi
17928 rm -f conftest.$ac_objext conftest.$ac_ext
17929                 CFLAGS=$cf_save_CFLAGS
17930
17931 fi
17932 echo "$as_me:17932: result: $cf_cv_gcc_inline" >&5
17933 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
17934                 if test "$cf_cv_gcc_inline" = yes ; then
17935
17936 cf_fix_cppflags=no
17937 cf_new_cflags=
17938 cf_new_cppflags=
17939 cf_new_extra_cppflags=
17940
17941 for cf_add_cflags in --param max-inline-insns-single=1200
17942 do
17943 case $cf_fix_cppflags in
17944 (no)
17945         case $cf_add_cflags in
17946         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17947                 case $cf_add_cflags in
17948                 (-D*)
17949                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17950
17951                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17952                                 && test -z "${cf_tst_cflags}" \
17953                                 && cf_fix_cppflags=yes
17954
17955                         if test $cf_fix_cppflags = yes ; then
17956
17957         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17958         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17959
17960                                 continue
17961                         elif test "${cf_tst_cflags}" = "\"'" ; then
17962
17963         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17964         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17965
17966                                 continue
17967                         fi
17968                         ;;
17969                 esac
17970                 case "$CPPFLAGS" in
17971                 (*$cf_add_cflags)
17972                         ;;
17973                 (*)
17974                         case $cf_add_cflags in
17975                         (-D*)
17976                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17977
17978 CPPFLAGS=`echo "$CPPFLAGS" | \
17979         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17980                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17981
17982                                 ;;
17983                         esac
17984
17985         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17986         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17987
17988                         ;;
17989                 esac
17990                 ;;
17991         (*)
17992
17993         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17994         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17995
17996                 ;;
17997         esac
17998         ;;
17999 (yes)
18000
18001         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18002         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18003
18004         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18005
18006         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18007                 && test -z "${cf_tst_cflags}" \
18008                 && cf_fix_cppflags=no
18009         ;;
18010 esac
18011 done
18012
18013 if test -n "$cf_new_cflags" ; then
18014
18015         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18016         CFLAGS="${CFLAGS}$cf_new_cflags"
18017
18018 fi
18019
18020 if test -n "$cf_new_cppflags" ; then
18021
18022         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18023         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18024
18025 fi
18026
18027 if test -n "$cf_new_extra_cppflags" ; then
18028
18029         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18030         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18031
18032 fi
18033
18034                 fi
18035         fi
18036 fi
18037
18038 echo "$as_me:18038: checking for signal global datatype" >&5
18039 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18040 if test "${cf_cv_sig_atomic_t+set}" = set; then
18041   echo $ECHO_N "(cached) $ECHO_C" >&6
18042 else
18043
18044         for cf_type in \
18045                 "volatile sig_atomic_t" \
18046                 "sig_atomic_t" \
18047                 "int"
18048         do
18049         cat >conftest.$ac_ext <<_ACEOF
18050 #line 18050 "configure"
18051 #include "confdefs.h"
18052
18053 #include <sys/types.h>
18054 #include <signal.h>
18055 #include <stdio.h>
18056
18057 extern $cf_type x;
18058 $cf_type x;
18059 static void handler(int sig)
18060 {
18061         x = 5;
18062 }
18063 int
18064 main (void)
18065 {
18066 signal(SIGINT, handler);
18067                  x = 1
18068   ;
18069   return 0;
18070 }
18071 _ACEOF
18072 rm -f conftest.$ac_objext
18073 if { (eval echo "$as_me:18073: \"$ac_compile\"") >&5
18074   (eval $ac_compile) 2>&5
18075   ac_status=$?
18076   echo "$as_me:18076: \$? = $ac_status" >&5
18077   (exit $ac_status); } &&
18078          { ac_try='test -s conftest.$ac_objext'
18079   { (eval echo "$as_me:18079: \"$ac_try\"") >&5
18080   (eval $ac_try) 2>&5
18081   ac_status=$?
18082   echo "$as_me:18082: \$? = $ac_status" >&5
18083   (exit $ac_status); }; }; then
18084   cf_cv_sig_atomic_t=$cf_type
18085 else
18086   echo "$as_me: failed program was:" >&5
18087 cat conftest.$ac_ext >&5
18088 cf_cv_sig_atomic_t=no
18089 fi
18090 rm -f conftest.$ac_objext conftest.$ac_ext
18091                 test "$cf_cv_sig_atomic_t" != no && break
18092         done
18093
18094 fi
18095
18096 echo "$as_me:18096: result: $cf_cv_sig_atomic_t" >&5
18097 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18098 test "$cf_cv_sig_atomic_t" != no &&
18099 cat >>confdefs.h <<EOF
18100 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18101 EOF
18102
18103 if test $NCURSES_CHTYPE = auto ; then
18104
18105 echo "$as_me:18105: checking for type of chtype" >&5
18106 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18107 if test "${cf_cv_typeof_chtype+set}" = set; then
18108   echo $ECHO_N "(cached) $ECHO_C" >&6
18109 else
18110
18111                 if test "$cross_compiling" = yes; then
18112   cf_cv_typeof_chtype=long
18113 else
18114   cat >conftest.$ac_ext <<_ACEOF
18115 #line 18115 "configure"
18116 #include "confdefs.h"
18117
18118 #define WANT_BITS 31
18119 #include <stdio.h>
18120 int main(void)
18121 {
18122         FILE *fp = fopen("cf_test.out", "w");
18123         if (fp != 0) {
18124                 char *result = "long";
18125                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18126                         int n;
18127                         unsigned int x, y;
18128                         for (n = 0; n < WANT_BITS; n++) {
18129                                 x = (1 << n);
18130                                 y = (x >> n);
18131                                 if (y != 1 || x == 0) {
18132                                         x = 0;
18133                                         break;
18134                                 }
18135                         }
18136                         /*
18137                          * If x is nonzero, an int is big enough for the bits
18138                          * that we want.
18139                          */
18140                         result = (x != 0) ? "int" : "long";
18141                 }
18142                 fputs(result, fp);
18143                 fclose(fp);
18144         }
18145         ${cf_cv_main_return:-return}(0);
18146 }
18147
18148 _ACEOF
18149 rm -f conftest$ac_exeext
18150 if { (eval echo "$as_me:18150: \"$ac_link\"") >&5
18151   (eval $ac_link) 2>&5
18152   ac_status=$?
18153   echo "$as_me:18153: \$? = $ac_status" >&5
18154   (exit $ac_status); } && { ac_try='./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   cf_cv_typeof_chtype=`cat cf_test.out`
18161 else
18162   echo "$as_me: program exited with status $ac_status" >&5
18163 echo "$as_me: failed program was:" >&5
18164 cat conftest.$ac_ext >&5
18165 cf_cv_typeof_chtype=long
18166 fi
18167 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18168 fi
18169                 rm -f cf_test.out
18170
18171 fi
18172
18173 echo "$as_me:18173: result: $cf_cv_typeof_chtype" >&5
18174 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18175
18176 cat >>confdefs.h <<EOF
18177 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18178 EOF
18179
18180 else
18181         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18182 fi
18183 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18184
18185 echo "$as_me:18185: checking if unsigned literals are legal" >&5
18186 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18187 if test "${cf_cv_unsigned_literals+set}" = set; then
18188   echo $ECHO_N "(cached) $ECHO_C" >&6
18189 else
18190
18191         cat >conftest.$ac_ext <<_ACEOF
18192 #line 18192 "configure"
18193 #include "confdefs.h"
18194
18195 int
18196 main (void)
18197 {
18198 long x = 1L + 1UL + 1U + 1
18199   ;
18200   return 0;
18201 }
18202 _ACEOF
18203 rm -f conftest.$ac_objext
18204 if { (eval echo "$as_me:18204: \"$ac_compile\"") >&5
18205   (eval $ac_compile) 2>&5
18206   ac_status=$?
18207   echo "$as_me:18207: \$? = $ac_status" >&5
18208   (exit $ac_status); } &&
18209          { ac_try='test -s conftest.$ac_objext'
18210   { (eval echo "$as_me:18210: \"$ac_try\"") >&5
18211   (eval $ac_try) 2>&5
18212   ac_status=$?
18213   echo "$as_me:18213: \$? = $ac_status" >&5
18214   (exit $ac_status); }; }; then
18215   cf_cv_unsigned_literals=yes
18216 else
18217   echo "$as_me: failed program was:" >&5
18218 cat conftest.$ac_ext >&5
18219 cf_cv_unsigned_literals=no
18220 fi
18221 rm -f conftest.$ac_objext conftest.$ac_ext
18222
18223 fi
18224
18225 echo "$as_me:18225: result: $cf_cv_unsigned_literals" >&5
18226 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
18227
18228 cf_cv_1UL="1"
18229 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
18230 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
18231
18232 if test $NCURSES_MMASK_T = auto ; then
18233         cf_cv_typeof_mmask_t=long
18234 else
18235         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
18236 fi
18237 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
18238
18239 ###     Checks for external-data
18240
18241 echo "$as_me:18241: checking if external errno is declared" >&5
18242 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
18243 if test "${cf_cv_dcl_errno+set}" = set; then
18244   echo $ECHO_N "(cached) $ECHO_C" >&6
18245 else
18246
18247         cat >conftest.$ac_ext <<_ACEOF
18248 #line 18248 "configure"
18249 #include "confdefs.h"
18250
18251 #ifdef HAVE_STDLIB_H
18252 #include <stdlib.h>
18253 #endif
18254 #include <stdio.h>
18255 #include <sys/types.h>
18256 #include <errno.h>
18257 int
18258 main (void)
18259 {
18260 int x = (int) errno
18261   ;
18262   return 0;
18263 }
18264 _ACEOF
18265 rm -f conftest.$ac_objext
18266 if { (eval echo "$as_me:18266: \"$ac_compile\"") >&5
18267   (eval $ac_compile) 2>&5
18268   ac_status=$?
18269   echo "$as_me:18269: \$? = $ac_status" >&5
18270   (exit $ac_status); } &&
18271          { ac_try='test -s conftest.$ac_objext'
18272   { (eval echo "$as_me:18272: \"$ac_try\"") >&5
18273   (eval $ac_try) 2>&5
18274   ac_status=$?
18275   echo "$as_me:18275: \$? = $ac_status" >&5
18276   (exit $ac_status); }; }; then
18277   cf_cv_dcl_errno=yes
18278 else
18279   echo "$as_me: failed program was:" >&5
18280 cat conftest.$ac_ext >&5
18281 cf_cv_dcl_errno=no
18282 fi
18283 rm -f conftest.$ac_objext conftest.$ac_ext
18284
18285 fi
18286 echo "$as_me:18286: result: $cf_cv_dcl_errno" >&5
18287 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
18288
18289 if test "$cf_cv_dcl_errno" = no ; then
18290
18291 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18292
18293         cat >>confdefs.h <<EOF
18294 #define $cf_result 1
18295 EOF
18296
18297 fi
18298
18299 # It's possible (for near-UNIX clones) that the data doesn't exist
18300
18301 echo "$as_me:18301: checking if external errno exists" >&5
18302 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
18303 if test "${cf_cv_have_errno+set}" = set; then
18304   echo $ECHO_N "(cached) $ECHO_C" >&6
18305 else
18306
18307         cat >conftest.$ac_ext <<_ACEOF
18308 #line 18308 "configure"
18309 #include "confdefs.h"
18310
18311 #undef errno
18312 extern int errno;
18313
18314 int
18315 main (void)
18316 {
18317 errno = 2
18318   ;
18319   return 0;
18320 }
18321 _ACEOF
18322 rm -f conftest.$ac_objext conftest$ac_exeext
18323 if { (eval echo "$as_me:18323: \"$ac_link\"") >&5
18324   (eval $ac_link) 2>&5
18325   ac_status=$?
18326   echo "$as_me:18326: \$? = $ac_status" >&5
18327   (exit $ac_status); } &&
18328          { ac_try='test -s conftest$ac_exeext'
18329   { (eval echo "$as_me:18329: \"$ac_try\"") >&5
18330   (eval $ac_try) 2>&5
18331   ac_status=$?
18332   echo "$as_me:18332: \$? = $ac_status" >&5
18333   (exit $ac_status); }; }; then
18334   cf_cv_have_errno=yes
18335 else
18336   echo "$as_me: failed program was:" >&5
18337 cat conftest.$ac_ext >&5
18338 cf_cv_have_errno=no
18339 fi
18340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18341
18342 fi
18343 echo "$as_me:18343: result: $cf_cv_have_errno" >&5
18344 echo "${ECHO_T}$cf_cv_have_errno" >&6
18345
18346 if test "$cf_cv_have_errno" = yes ; then
18347
18348 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18349
18350         cat >>confdefs.h <<EOF
18351 #define $cf_result 1
18352 EOF
18353
18354 fi
18355
18356 echo "$as_me:18356: checking if data-only library module links" >&5
18357 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18358 if test "${cf_cv_link_dataonly+set}" = set; then
18359   echo $ECHO_N "(cached) $ECHO_C" >&6
18360 else
18361
18362         rm -f conftest.a
18363         cat >conftest.$ac_ext <<EOF
18364 #line 18364 "configure"
18365 int     testdata[3] = { 123, 456, 789 };
18366 EOF
18367         if { (eval echo "$as_me:18367: \"$ac_compile\"") >&5
18368   (eval $ac_compile) 2>&5
18369   ac_status=$?
18370   echo "$as_me:18370: \$? = $ac_status" >&5
18371   (exit $ac_status); } ; then
18372                 mv conftest.o data.o && \
18373                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
18374         fi
18375         rm -f conftest.$ac_ext data.o
18376         cat >conftest.$ac_ext <<EOF
18377 #line 18377 "configure"
18378 int     testfunc(void)
18379 {
18380 #if defined(NeXT)
18381         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
18382 #else
18383         extern int testdata[3];
18384         return testdata[0] == 123
18385            &&  testdata[1] == 456
18386            &&  testdata[2] == 789;
18387 #endif
18388 }
18389 EOF
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); }; then
18395                 mv conftest.o func.o && \
18396                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
18397         fi
18398         rm -f conftest.$ac_ext func.o
18399         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18400         cf_saveLIBS="$LIBS"
18401         LIBS="conftest.a $LIBS"
18402         if test "$cross_compiling" = yes; then
18403   cf_cv_link_dataonly=unknown
18404 else
18405   cat >conftest.$ac_ext <<_ACEOF
18406 #line 18406 "configure"
18407 #include "confdefs.h"
18408
18409         int main(void)
18410         {
18411                 extern int testfunc();
18412                 ${cf_cv_main_return:-return} (!testfunc());
18413         }
18414
18415 _ACEOF
18416 rm -f conftest$ac_exeext
18417 if { (eval echo "$as_me:18417: \"$ac_link\"") >&5
18418   (eval $ac_link) 2>&5
18419   ac_status=$?
18420   echo "$as_me:18420: \$? = $ac_status" >&5
18421   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18422   { (eval echo "$as_me:18422: \"$ac_try\"") >&5
18423   (eval $ac_try) 2>&5
18424   ac_status=$?
18425   echo "$as_me:18425: \$? = $ac_status" >&5
18426   (exit $ac_status); }; }; then
18427   cf_cv_link_dataonly=yes
18428 else
18429   echo "$as_me: program exited with status $ac_status" >&5
18430 echo "$as_me: failed program was:" >&5
18431 cat conftest.$ac_ext >&5
18432 cf_cv_link_dataonly=no
18433 fi
18434 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18435 fi
18436         LIBS="$cf_saveLIBS"
18437
18438 fi
18439
18440 echo "$as_me:18440: result: $cf_cv_link_dataonly" >&5
18441 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18442
18443 if test "$cf_cv_link_dataonly" = no ; then
18444
18445 cat >>confdefs.h <<\EOF
18446 #define BROKEN_LINKER 1
18447 EOF
18448
18449         BROKEN_LINKER=1
18450 fi
18451
18452 ###     Checks for library functions.
18453
18454 for ac_func in \
18455 getcwd \
18456 getegid \
18457 geteuid \
18458 getopt \
18459 getttynam \
18460 issetugid \
18461 poll \
18462 putenv \
18463 remove \
18464 select \
18465 setbuf \
18466 setbuffer \
18467 setenv \
18468 setvbuf \
18469 sigaction \
18470 sigvec \
18471 strdup \
18472 strstr \
18473 tcgetpgrp \
18474 tdestroy \
18475 times \
18476 tsearch \
18477 vsnprintf \
18478
18479 do
18480 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18481 echo "$as_me:18481: checking for $ac_func" >&5
18482 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18483 if eval "test \"\${$as_ac_var+set}\" = set"; then
18484   echo $ECHO_N "(cached) $ECHO_C" >&6
18485 else
18486   cat >conftest.$ac_ext <<_ACEOF
18487 #line 18487 "configure"
18488 #include "confdefs.h"
18489 /* System header to define __stub macros and hopefully few prototypes,
18490     which can conflict with char $ac_func (); below.  */
18491 #include <assert.h>
18492 /* Override any gcc2 internal prototype to avoid an error.  */
18493 #ifdef __cplusplus
18494 extern "C"
18495 #endif
18496 /* We use char because int might match the return type of a gcc2
18497    builtin and then its argument prototype would still apply.  */
18498 char $ac_func ();
18499 char (*f) ();
18500
18501 int
18502 main (void)
18503 {
18504 /* The GNU C library defines this for functions which it implements
18505     to always fail with ENOSYS.  Some functions are actually named
18506     something starting with __ and the normal name is an alias.  */
18507 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18508 choke me
18509 #else
18510 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18511 #endif
18512
18513   ;
18514   return 0;
18515 }
18516 _ACEOF
18517 rm -f conftest.$ac_objext conftest$ac_exeext
18518 if { (eval echo "$as_me:18518: \"$ac_link\"") >&5
18519   (eval $ac_link) 2>&5
18520   ac_status=$?
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit $ac_status); } &&
18523          { ac_try='test -s conftest$ac_exeext'
18524   { (eval echo "$as_me:18524: \"$ac_try\"") >&5
18525   (eval $ac_try) 2>&5
18526   ac_status=$?
18527   echo "$as_me:18527: \$? = $ac_status" >&5
18528   (exit $ac_status); }; }; then
18529   eval "$as_ac_var=yes"
18530 else
18531   echo "$as_me: failed program was:" >&5
18532 cat conftest.$ac_ext >&5
18533 eval "$as_ac_var=no"
18534 fi
18535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18536 fi
18537 echo "$as_me:18537: result: `eval echo '${'$as_ac_var'}'`" >&5
18538 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18539 if test `eval echo '${'$as_ac_var'}'` = yes; then
18540   cat >>confdefs.h <<EOF
18541 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18542 EOF
18543
18544 fi
18545 done
18546
18547 if test "x$ac_cv_func_getopt" = xno && \
18548    test "x$cf_with_progs$cf_with_tests" != xnono; then
18549         { { echo "$as_me:18549: error: getopt is required for building programs" >&5
18550 echo "$as_me: error: getopt is required for building programs" >&2;}
18551    { (exit 1); exit 1; }; }
18552 fi
18553
18554 if test "x$with_safe_sprintf" = xyes
18555 then
18556         if test "x$ac_cv_func_vsnprintf" = xyes
18557         then
18558                 { echo "$as_me:18558: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18559 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18560         else
18561
18562 cat >>confdefs.h <<\EOF
18563 #define USE_SAFE_SPRINTF 1
18564 EOF
18565
18566         fi
18567 fi
18568
18569 if test "x$with_getcap" = "xyes" ; then
18570
18571 echo "$as_me:18571: checking for terminal-capability database functions" >&5
18572 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18573 if test "${cf_cv_cgetent+set}" = set; then
18574   echo $ECHO_N "(cached) $ECHO_C" >&6
18575 else
18576
18577 cat >conftest.$ac_ext <<_ACEOF
18578 #line 18578 "configure"
18579 #include "confdefs.h"
18580
18581 #include <stdlib.h>
18582 int
18583 main (void)
18584 {
18585
18586         char temp[128];
18587         char *buf = temp;
18588         char *db_array = temp;
18589         cgetent(&buf, &db_array, "vt100");
18590         cgetcap(buf, "tc", '=');
18591         cgetmatch(buf, "tc");
18592
18593   ;
18594   return 0;
18595 }
18596 _ACEOF
18597 rm -f conftest.$ac_objext conftest$ac_exeext
18598 if { (eval echo "$as_me:18598: \"$ac_link\"") >&5
18599   (eval $ac_link) 2>&5
18600   ac_status=$?
18601   echo "$as_me:18601: \$? = $ac_status" >&5
18602   (exit $ac_status); } &&
18603          { ac_try='test -s conftest$ac_exeext'
18604   { (eval echo "$as_me:18604: \"$ac_try\"") >&5
18605   (eval $ac_try) 2>&5
18606   ac_status=$?
18607   echo "$as_me:18607: \$? = $ac_status" >&5
18608   (exit $ac_status); }; }; then
18609   cf_cv_cgetent=yes
18610 else
18611   echo "$as_me: failed program was:" >&5
18612 cat conftest.$ac_ext >&5
18613 cf_cv_cgetent=no
18614 fi
18615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18616
18617 fi
18618 echo "$as_me:18618: result: $cf_cv_cgetent" >&5
18619 echo "${ECHO_T}$cf_cv_cgetent" >&6
18620
18621 if test "$cf_cv_cgetent" = yes
18622 then
18623
18624 cat >>confdefs.h <<\EOF
18625 #define HAVE_BSD_CGETENT 1
18626 EOF
18627
18628 echo "$as_me:18628: checking if cgetent uses const parameter" >&5
18629 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18630 if test "${cf_cv_cgetent_const+set}" = set; then
18631   echo $ECHO_N "(cached) $ECHO_C" >&6
18632 else
18633
18634 cat >conftest.$ac_ext <<_ACEOF
18635 #line 18635 "configure"
18636 #include "confdefs.h"
18637
18638 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18639 #include <stdlib.h>
18640 int
18641 main (void)
18642 {
18643
18644         char temp[128];
18645         char *buf = temp;
18646 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18647         const char *db_array = temp;
18648         cgetent(&buf, &db_array, "vt100");
18649 #endif
18650         cgetcap(buf, "tc", '=');
18651         cgetmatch(buf, "tc");
18652
18653   ;
18654   return 0;
18655 }
18656 _ACEOF
18657 rm -f conftest.$ac_objext conftest$ac_exeext
18658 if { (eval echo "$as_me:18658: \"$ac_link\"") >&5
18659   (eval $ac_link) 2>&5
18660   ac_status=$?
18661   echo "$as_me:18661: \$? = $ac_status" >&5
18662   (exit $ac_status); } &&
18663          { ac_try='test -s conftest$ac_exeext'
18664   { (eval echo "$as_me:18664: \"$ac_try\"") >&5
18665   (eval $ac_try) 2>&5
18666   ac_status=$?
18667   echo "$as_me:18667: \$? = $ac_status" >&5
18668   (exit $ac_status); }; }; then
18669   cf_cv_cgetent_const=yes
18670 else
18671   echo "$as_me: failed program was:" >&5
18672 cat conftest.$ac_ext >&5
18673 cf_cv_cgetent_const=no
18674 fi
18675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18676
18677 fi
18678 echo "$as_me:18678: result: $cf_cv_cgetent_const" >&5
18679 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18680         if test "$cf_cv_cgetent_const" = yes
18681         then
18682
18683 cat >>confdefs.h <<EOF
18684 #define CGETENT_CONST const
18685 EOF
18686
18687         fi
18688 fi
18689
18690 fi
18691
18692 echo "$as_me:18692: checking for isascii" >&5
18693 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18694 if test "${cf_cv_have_isascii+set}" = set; then
18695   echo $ECHO_N "(cached) $ECHO_C" >&6
18696 else
18697
18698         cat >conftest.$ac_ext <<_ACEOF
18699 #line 18699 "configure"
18700 #include "confdefs.h"
18701 #include <ctype.h>
18702 int
18703 main (void)
18704 {
18705 int x = isascii(' ')
18706   ;
18707   return 0;
18708 }
18709 _ACEOF
18710 rm -f conftest.$ac_objext conftest$ac_exeext
18711 if { (eval echo "$as_me:18711: \"$ac_link\"") >&5
18712   (eval $ac_link) 2>&5
18713   ac_status=$?
18714   echo "$as_me:18714: \$? = $ac_status" >&5
18715   (exit $ac_status); } &&
18716          { ac_try='test -s conftest$ac_exeext'
18717   { (eval echo "$as_me:18717: \"$ac_try\"") >&5
18718   (eval $ac_try) 2>&5
18719   ac_status=$?
18720   echo "$as_me:18720: \$? = $ac_status" >&5
18721   (exit $ac_status); }; }; then
18722   cf_cv_have_isascii=yes
18723 else
18724   echo "$as_me: failed program was:" >&5
18725 cat conftest.$ac_ext >&5
18726 cf_cv_have_isascii=no
18727 fi
18728 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18729
18730 fi
18731 echo "$as_me:18731: result: $cf_cv_have_isascii" >&5
18732 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18733 test "$cf_cv_have_isascii" = yes &&
18734 cat >>confdefs.h <<\EOF
18735 #define HAVE_ISASCII 1
18736 EOF
18737
18738 if test "$ac_cv_func_sigaction" = yes; then
18739 echo "$as_me:18739: checking whether sigaction needs _POSIX_SOURCE" >&5
18740 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18741 cat >conftest.$ac_ext <<_ACEOF
18742 #line 18742 "configure"
18743 #include "confdefs.h"
18744
18745 #include <sys/types.h>
18746 #include <signal.h>
18747 int
18748 main (void)
18749 {
18750 struct sigaction act
18751   ;
18752   return 0;
18753 }
18754 _ACEOF
18755 rm -f conftest.$ac_objext
18756 if { (eval echo "$as_me:18756: \"$ac_compile\"") >&5
18757   (eval $ac_compile) 2>&5
18758   ac_status=$?
18759   echo "$as_me:18759: \$? = $ac_status" >&5
18760   (exit $ac_status); } &&
18761          { ac_try='test -s conftest.$ac_objext'
18762   { (eval echo "$as_me:18762: \"$ac_try\"") >&5
18763   (eval $ac_try) 2>&5
18764   ac_status=$?
18765   echo "$as_me:18765: \$? = $ac_status" >&5
18766   (exit $ac_status); }; }; then
18767   sigact_bad=no
18768 else
18769   echo "$as_me: failed program was:" >&5
18770 cat conftest.$ac_ext >&5
18771
18772 cat >conftest.$ac_ext <<_ACEOF
18773 #line 18773 "configure"
18774 #include "confdefs.h"
18775
18776 #define _POSIX_SOURCE
18777 #include <sys/types.h>
18778 #include <signal.h>
18779 int
18780 main (void)
18781 {
18782 struct sigaction act
18783   ;
18784   return 0;
18785 }
18786 _ACEOF
18787 rm -f conftest.$ac_objext
18788 if { (eval echo "$as_me:18788: \"$ac_compile\"") >&5
18789   (eval $ac_compile) 2>&5
18790   ac_status=$?
18791   echo "$as_me:18791: \$? = $ac_status" >&5
18792   (exit $ac_status); } &&
18793          { ac_try='test -s conftest.$ac_objext'
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   sigact_bad=yes
18800
18801 cat >>confdefs.h <<\EOF
18802 #define _POSIX_SOURCE 1
18803 EOF
18804
18805 else
18806   echo "$as_me: failed program was:" >&5
18807 cat conftest.$ac_ext >&5
18808 sigact_bad=unknown
18809 fi
18810 rm -f conftest.$ac_objext conftest.$ac_ext
18811 fi
18812 rm -f conftest.$ac_objext conftest.$ac_ext
18813 echo "$as_me:18813: result: $sigact_bad" >&5
18814 echo "${ECHO_T}$sigact_bad" >&6
18815 fi
18816
18817 echo "$as_me:18817: checking if nanosleep really works" >&5
18818 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
18819 if test "${cf_cv_func_nanosleep+set}" = set; then
18820   echo $ECHO_N "(cached) $ECHO_C" >&6
18821 else
18822
18823 if test "$cross_compiling" = yes; then
18824   cf_cv_func_nanosleep=unknown
18825 else
18826   cat >conftest.$ac_ext <<_ACEOF
18827 #line 18827 "configure"
18828 #include "confdefs.h"
18829
18830 #include <stdio.h>
18831 #include <errno.h>
18832 #include <time.h>
18833
18834 #ifdef HAVE_SYS_TIME_H
18835 #include <sys/time.h>
18836 #endif
18837
18838 int main(void) {
18839         struct timespec ts1, ts2;
18840         int code;
18841         ts1.tv_sec  = 0;
18842         ts1.tv_nsec = 750000000;
18843         ts2.tv_sec  = 0;
18844         ts2.tv_nsec = 0;
18845         errno = 0;
18846         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
18847         ${cf_cv_main_return:-return}(code != 0);
18848 }
18849
18850 _ACEOF
18851 rm -f conftest$ac_exeext
18852 if { (eval echo "$as_me:18852: \"$ac_link\"") >&5
18853   (eval $ac_link) 2>&5
18854   ac_status=$?
18855   echo "$as_me:18855: \$? = $ac_status" >&5
18856   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18857   { (eval echo "$as_me:18857: \"$ac_try\"") >&5
18858   (eval $ac_try) 2>&5
18859   ac_status=$?
18860   echo "$as_me:18860: \$? = $ac_status" >&5
18861   (exit $ac_status); }; }; then
18862   cf_cv_func_nanosleep=yes
18863 else
18864   echo "$as_me: program exited with status $ac_status" >&5
18865 echo "$as_me: failed program was:" >&5
18866 cat conftest.$ac_ext >&5
18867 cf_cv_func_nanosleep=no
18868 fi
18869 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18870 fi
18871 fi
18872 echo "$as_me:18872: result: $cf_cv_func_nanosleep" >&5
18873 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
18874
18875 test "$cf_cv_func_nanosleep" = "yes" &&
18876 cat >>confdefs.h <<\EOF
18877 #define HAVE_NANOSLEEP 1
18878 EOF
18879
18880 for ac_header in \
18881 termio.h \
18882 termios.h \
18883 unistd.h \
18884 sys/ioctl.h \
18885 sys/termio.h \
18886
18887 do
18888 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18889 echo "$as_me:18889: checking for $ac_header" >&5
18890 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18891 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18892   echo $ECHO_N "(cached) $ECHO_C" >&6
18893 else
18894   cat >conftest.$ac_ext <<_ACEOF
18895 #line 18895 "configure"
18896 #include "confdefs.h"
18897 #include <$ac_header>
18898 _ACEOF
18899 if { (eval echo "$as_me:18899: \"$ac_cpp conftest.$ac_ext\"") >&5
18900   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18901   ac_status=$?
18902   egrep -v '^ *\+' conftest.er1 >conftest.err
18903   rm -f conftest.er1
18904   cat conftest.err >&5
18905   echo "$as_me:18905: \$? = $ac_status" >&5
18906   (exit $ac_status); } >/dev/null; then
18907   if test -s conftest.err; then
18908     ac_cpp_err=$ac_c_preproc_warn_flag
18909   else
18910     ac_cpp_err=
18911   fi
18912 else
18913   ac_cpp_err=yes
18914 fi
18915 if test -z "$ac_cpp_err"; then
18916   eval "$as_ac_Header=yes"
18917 else
18918   echo "$as_me: failed program was:" >&5
18919   cat conftest.$ac_ext >&5
18920   eval "$as_ac_Header=no"
18921 fi
18922 rm -f conftest.err conftest.$ac_ext
18923 fi
18924 echo "$as_me:18924: result: `eval echo '${'$as_ac_Header'}'`" >&5
18925 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18926 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18927   cat >>confdefs.h <<EOF
18928 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18929 EOF
18930
18931 fi
18932 done
18933
18934 if test "$ac_cv_header_termios_h" = yes ; then
18935         case "$CFLAGS $CPPFLAGS" in
18936         (*-D_POSIX_SOURCE*)
18937                 termios_bad=dunno ;;
18938         (*)     termios_bad=maybe ;;
18939         esac
18940         if test "$termios_bad" = maybe ; then
18941         echo "$as_me:18941: checking whether termios.h needs _POSIX_SOURCE" >&5
18942 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
18943         cat >conftest.$ac_ext <<_ACEOF
18944 #line 18944 "configure"
18945 #include "confdefs.h"
18946 #include <termios.h>
18947 int
18948 main (void)
18949 {
18950 struct termios foo; int x = foo.c_iflag
18951   ;
18952   return 0;
18953 }
18954 _ACEOF
18955 rm -f conftest.$ac_objext
18956 if { (eval echo "$as_me:18956: \"$ac_compile\"") >&5
18957   (eval $ac_compile) 2>&5
18958   ac_status=$?
18959   echo "$as_me:18959: \$? = $ac_status" >&5
18960   (exit $ac_status); } &&
18961          { ac_try='test -s conftest.$ac_objext'
18962   { (eval echo "$as_me:18962: \"$ac_try\"") >&5
18963   (eval $ac_try) 2>&5
18964   ac_status=$?
18965   echo "$as_me:18965: \$? = $ac_status" >&5
18966   (exit $ac_status); }; }; then
18967   termios_bad=no
18968 else
18969   echo "$as_me: failed program was:" >&5
18970 cat conftest.$ac_ext >&5
18971
18972                 cat >conftest.$ac_ext <<_ACEOF
18973 #line 18973 "configure"
18974 #include "confdefs.h"
18975
18976 #define _POSIX_SOURCE
18977 #include <termios.h>
18978 int
18979 main (void)
18980 {
18981 struct termios foo; int x = foo.c_iflag
18982   ;
18983   return 0;
18984 }
18985 _ACEOF
18986 rm -f conftest.$ac_objext
18987 if { (eval echo "$as_me:18987: \"$ac_compile\"") >&5
18988   (eval $ac_compile) 2>&5
18989   ac_status=$?
18990   echo "$as_me:18990: \$? = $ac_status" >&5
18991   (exit $ac_status); } &&
18992          { ac_try='test -s conftest.$ac_objext'
18993   { (eval echo "$as_me:18993: \"$ac_try\"") >&5
18994   (eval $ac_try) 2>&5
18995   ac_status=$?
18996   echo "$as_me:18996: \$? = $ac_status" >&5
18997   (exit $ac_status); }; }; then
18998   termios_bad=unknown
18999 else
19000   echo "$as_me: failed program was:" >&5
19001 cat conftest.$ac_ext >&5
19002 termios_bad=yes
19003 cat >>confdefs.h <<\EOF
19004 #define _POSIX_SOURCE 1
19005 EOF
19006
19007 fi
19008 rm -f conftest.$ac_objext conftest.$ac_ext
19009
19010 fi
19011 rm -f conftest.$ac_objext conftest.$ac_ext
19012         echo "$as_me:19012: result: $termios_bad" >&5
19013 echo "${ECHO_T}$termios_bad" >&6
19014         fi
19015 fi
19016
19017 echo "$as_me:19017: checking for tcgetattr" >&5
19018 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19019 if test "${cf_cv_have_tcgetattr+set}" = set; then
19020   echo $ECHO_N "(cached) $ECHO_C" >&6
19021 else
19022
19023 cat >conftest.$ac_ext <<_ACEOF
19024 #line 19024 "configure"
19025 #include "confdefs.h"
19026
19027 #include <sys/types.h>
19028 #ifdef HAVE_UNISTD_H
19029 #include <unistd.h>
19030 #endif
19031 #ifdef HAVE_TERMIOS_H
19032 #include <termios.h>
19033 #define TTY struct termios
19034 #else
19035 #ifdef HAVE_TERMIO_H
19036 #include <termio.h>
19037 #define TTY struct termio
19038 #endif
19039 #endif
19040
19041 int
19042 main (void)
19043 {
19044
19045 TTY foo;
19046 tcgetattr(1, &foo);
19047   ;
19048   return 0;
19049 }
19050 _ACEOF
19051 rm -f conftest.$ac_objext conftest$ac_exeext
19052 if { (eval echo "$as_me:19052: \"$ac_link\"") >&5
19053   (eval $ac_link) 2>&5
19054   ac_status=$?
19055   echo "$as_me:19055: \$? = $ac_status" >&5
19056   (exit $ac_status); } &&
19057          { ac_try='test -s conftest$ac_exeext'
19058   { (eval echo "$as_me:19058: \"$ac_try\"") >&5
19059   (eval $ac_try) 2>&5
19060   ac_status=$?
19061   echo "$as_me:19061: \$? = $ac_status" >&5
19062   (exit $ac_status); }; }; then
19063   cf_cv_have_tcgetattr=yes
19064 else
19065   echo "$as_me: failed program was:" >&5
19066 cat conftest.$ac_ext >&5
19067 cf_cv_have_tcgetattr=no
19068 fi
19069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19070 fi
19071 echo "$as_me:19071: result: $cf_cv_have_tcgetattr" >&5
19072 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19073 test "$cf_cv_have_tcgetattr" = yes &&
19074 cat >>confdefs.h <<\EOF
19075 #define HAVE_TCGETATTR 1
19076 EOF
19077
19078 echo "$as_me:19078: checking for vsscanf function or workaround" >&5
19079 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19080 if test "${cf_cv_func_vsscanf+set}" = set; then
19081   echo $ECHO_N "(cached) $ECHO_C" >&6
19082 else
19083
19084 cat >conftest.$ac_ext <<_ACEOF
19085 #line 19085 "configure"
19086 #include "confdefs.h"
19087
19088 #include <stdarg.h>
19089 #include <stdio.h>
19090 int
19091 main (void)
19092 {
19093
19094         va_list ap;
19095         vsscanf("from", "%d", ap)
19096   ;
19097   return 0;
19098 }
19099 _ACEOF
19100 rm -f conftest.$ac_objext conftest$ac_exeext
19101 if { (eval echo "$as_me:19101: \"$ac_link\"") >&5
19102   (eval $ac_link) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit $ac_status); } &&
19106          { ac_try='test -s conftest$ac_exeext'
19107   { (eval echo "$as_me:19107: \"$ac_try\"") >&5
19108   (eval $ac_try) 2>&5
19109   ac_status=$?
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit $ac_status); }; }; then
19112   cf_cv_func_vsscanf=vsscanf
19113 else
19114   echo "$as_me: failed program was:" >&5
19115 cat conftest.$ac_ext >&5
19116
19117 cat >conftest.$ac_ext <<_ACEOF
19118 #line 19118 "configure"
19119 #include "confdefs.h"
19120
19121 #include <stdarg.h>
19122 #include <stdio.h>
19123 int
19124 main (void)
19125 {
19126
19127         FILE strbuf;
19128         char *str = "from";
19129
19130         strbuf._flag = _IOREAD;
19131         strbuf._ptr = strbuf._base = (unsigned char *) str;
19132         strbuf._cnt = strlen(str);
19133         strbuf._file = _NFILE;
19134         return (vfscanf(&strbuf, "%d", ap))
19135   ;
19136   return 0;
19137 }
19138 _ACEOF
19139 rm -f conftest.$ac_objext conftest$ac_exeext
19140 if { (eval echo "$as_me:19140: \"$ac_link\"") >&5
19141   (eval $ac_link) 2>&5
19142   ac_status=$?
19143   echo "$as_me:19143: \$? = $ac_status" >&5
19144   (exit $ac_status); } &&
19145          { ac_try='test -s conftest$ac_exeext'
19146   { (eval echo "$as_me:19146: \"$ac_try\"") >&5
19147   (eval $ac_try) 2>&5
19148   ac_status=$?
19149   echo "$as_me:19149: \$? = $ac_status" >&5
19150   (exit $ac_status); }; }; then
19151   cf_cv_func_vsscanf=vfscanf
19152 else
19153   echo "$as_me: failed program was:" >&5
19154 cat conftest.$ac_ext >&5
19155
19156 cat >conftest.$ac_ext <<_ACEOF
19157 #line 19157 "configure"
19158 #include "confdefs.h"
19159
19160 #include <stdarg.h>
19161 #include <stdio.h>
19162 int
19163 main (void)
19164 {
19165
19166         FILE strbuf;
19167         char *str = "from";
19168
19169         strbuf._flag = _IOREAD;
19170         strbuf._ptr = strbuf._base = (unsigned char *) str;
19171         strbuf._cnt = strlen(str);
19172         strbuf._file = _NFILE;
19173         return (_doscan(&strbuf, "%d", ap))
19174   ;
19175   return 0;
19176 }
19177 _ACEOF
19178 rm -f conftest.$ac_objext conftest$ac_exeext
19179 if { (eval echo "$as_me:19179: \"$ac_link\"") >&5
19180   (eval $ac_link) 2>&5
19181   ac_status=$?
19182   echo "$as_me:19182: \$? = $ac_status" >&5
19183   (exit $ac_status); } &&
19184          { ac_try='test -s conftest$ac_exeext'
19185   { (eval echo "$as_me:19185: \"$ac_try\"") >&5
19186   (eval $ac_try) 2>&5
19187   ac_status=$?
19188   echo "$as_me:19188: \$? = $ac_status" >&5
19189   (exit $ac_status); }; }; then
19190   cf_cv_func_vsscanf=_doscan
19191 else
19192   echo "$as_me: failed program was:" >&5
19193 cat conftest.$ac_ext >&5
19194
19195 cf_cv_func_vsscanf=no
19196 fi
19197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19198 fi
19199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19200 fi
19201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19202 fi
19203 echo "$as_me:19203: result: $cf_cv_func_vsscanf" >&5
19204 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19205
19206 case $cf_cv_func_vsscanf in
19207 (vsscanf)
19208 cat >>confdefs.h <<\EOF
19209 #define HAVE_VSSCANF 1
19210 EOF
19211 ;;
19212 (vfscanf)
19213 cat >>confdefs.h <<\EOF
19214 #define HAVE_VFSCANF 1
19215 EOF
19216 ;;
19217 (_doscan)
19218 cat >>confdefs.h <<\EOF
19219 #define HAVE__DOSCAN 1
19220 EOF
19221 ;;
19222 esac
19223
19224 for ac_header in \
19225 unistd.h \
19226
19227 do
19228 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19229 echo "$as_me:19229: checking for $ac_header" >&5
19230 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19232   echo $ECHO_N "(cached) $ECHO_C" >&6
19233 else
19234   cat >conftest.$ac_ext <<_ACEOF
19235 #line 19235 "configure"
19236 #include "confdefs.h"
19237 #include <$ac_header>
19238 _ACEOF
19239 if { (eval echo "$as_me:19239: \"$ac_cpp conftest.$ac_ext\"") >&5
19240   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19241   ac_status=$?
19242   egrep -v '^ *\+' conftest.er1 >conftest.err
19243   rm -f conftest.er1
19244   cat conftest.err >&5
19245   echo "$as_me:19245: \$? = $ac_status" >&5
19246   (exit $ac_status); } >/dev/null; then
19247   if test -s conftest.err; then
19248     ac_cpp_err=$ac_c_preproc_warn_flag
19249   else
19250     ac_cpp_err=
19251   fi
19252 else
19253   ac_cpp_err=yes
19254 fi
19255 if test -z "$ac_cpp_err"; then
19256   eval "$as_ac_Header=yes"
19257 else
19258   echo "$as_me: failed program was:" >&5
19259   cat conftest.$ac_ext >&5
19260   eval "$as_ac_Header=no"
19261 fi
19262 rm -f conftest.err conftest.$ac_ext
19263 fi
19264 echo "$as_me:19264: result: `eval echo '${'$as_ac_Header'}'`" >&5
19265 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19266 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19267   cat >>confdefs.h <<EOF
19268 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19269 EOF
19270
19271 fi
19272 done
19273
19274 echo "$as_me:19274: checking for working mkstemp" >&5
19275 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
19276 if test "${cf_cv_func_mkstemp+set}" = set; then
19277   echo $ECHO_N "(cached) $ECHO_C" >&6
19278 else
19279
19280 rm -rf conftest*
19281 if test "$cross_compiling" = yes; then
19282   cf_cv_func_mkstemp=maybe
19283 else
19284   cat >conftest.$ac_ext <<_ACEOF
19285 #line 19285 "configure"
19286 #include "confdefs.h"
19287
19288 #include <sys/types.h>
19289 #ifdef HAVE_UNISTD_H
19290 #include <unistd.h>
19291 #endif
19292 #include <stdlib.h>
19293 #include <stdio.h>
19294 #include <string.h>
19295 #include <sys/stat.h>
19296 int main(void)
19297 {
19298         char *tmpl = "conftestXXXXXX";
19299         char name[2][80];
19300         int n;
19301         int result = 0;
19302         int fd;
19303         struct stat sb;
19304
19305         umask(077);
19306         for (n = 0; n < 2; ++n) {
19307                 strcpy(name[n], tmpl);
19308                 if ((fd = mkstemp(name[n])) >= 0) {
19309                         if (!strcmp(name[n], tmpl)
19310                          || stat(name[n], &sb) != 0
19311                          || (sb.st_mode & S_IFMT) != S_IFREG
19312                          || (sb.st_mode & 077) != 0) {
19313                                 result = 1;
19314                         }
19315                         close(fd);
19316                 }
19317         }
19318         if (result == 0
19319          && !strcmp(name[0], name[1]))
19320                 result = 1;
19321         ${cf_cv_main_return:-return}(result);
19322 }
19323
19324 _ACEOF
19325 rm -f conftest$ac_exeext
19326 if { (eval echo "$as_me:19326: \"$ac_link\"") >&5
19327   (eval $ac_link) 2>&5
19328   ac_status=$?
19329   echo "$as_me:19329: \$? = $ac_status" >&5
19330   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19331   { (eval echo "$as_me:19331: \"$ac_try\"") >&5
19332   (eval $ac_try) 2>&5
19333   ac_status=$?
19334   echo "$as_me:19334: \$? = $ac_status" >&5
19335   (exit $ac_status); }; }; then
19336   cf_cv_func_mkstemp=yes
19337
19338 else
19339   echo "$as_me: program exited with status $ac_status" >&5
19340 echo "$as_me: failed program was:" >&5
19341 cat conftest.$ac_ext >&5
19342 cf_cv_func_mkstemp=no
19343
19344 fi
19345 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19346 fi
19347
19348 fi
19349 echo "$as_me:19349: result: $cf_cv_func_mkstemp" >&5
19350 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19351 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19352         echo "$as_me:19352: checking for mkstemp" >&5
19353 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19354 if test "${ac_cv_func_mkstemp+set}" = set; then
19355   echo $ECHO_N "(cached) $ECHO_C" >&6
19356 else
19357   cat >conftest.$ac_ext <<_ACEOF
19358 #line 19358 "configure"
19359 #include "confdefs.h"
19360 /* System header to define __stub macros and hopefully few prototypes,
19361     which can conflict with char mkstemp (); below.  */
19362 #include <assert.h>
19363 /* Override any gcc2 internal prototype to avoid an error.  */
19364 #ifdef __cplusplus
19365 extern "C"
19366 #endif
19367 /* We use char because int might match the return type of a gcc2
19368    builtin and then its argument prototype would still apply.  */
19369 char mkstemp ();
19370 char (*f) ();
19371
19372 int
19373 main (void)
19374 {
19375 /* The GNU C library defines this for functions which it implements
19376     to always fail with ENOSYS.  Some functions are actually named
19377     something starting with __ and the normal name is an alias.  */
19378 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19379 choke me
19380 #else
19381 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19382 #endif
19383
19384   ;
19385   return 0;
19386 }
19387 _ACEOF
19388 rm -f conftest.$ac_objext conftest$ac_exeext
19389 if { (eval echo "$as_me:19389: \"$ac_link\"") >&5
19390   (eval $ac_link) 2>&5
19391   ac_status=$?
19392   echo "$as_me:19392: \$? = $ac_status" >&5
19393   (exit $ac_status); } &&
19394          { ac_try='test -s conftest$ac_exeext'
19395   { (eval echo "$as_me:19395: \"$ac_try\"") >&5
19396   (eval $ac_try) 2>&5
19397   ac_status=$?
19398   echo "$as_me:19398: \$? = $ac_status" >&5
19399   (exit $ac_status); }; }; then
19400   ac_cv_func_mkstemp=yes
19401 else
19402   echo "$as_me: failed program was:" >&5
19403 cat conftest.$ac_ext >&5
19404 ac_cv_func_mkstemp=no
19405 fi
19406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19407 fi
19408 echo "$as_me:19408: result: $ac_cv_func_mkstemp" >&5
19409 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19410
19411 fi
19412 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19413
19414 cat >>confdefs.h <<\EOF
19415 #define HAVE_MKSTEMP 1
19416 EOF
19417
19418 fi
19419
19420 # setup for prototype of fallback for vsscanf()
19421
19422 if test "$cf_cv_func_vsscanf" = vsscanf ; then
19423         HAVE_VSSCANF=1
19424 else
19425         HAVE_VSSCANF=0
19426 fi
19427
19428 if test "x$cross_compiling" = xyes ; then
19429         { echo "$as_me:19429: WARNING: cross compiling: assume setvbuf params not reversed" >&5
19430 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
19431 else
19432         echo "$as_me:19432: checking whether setvbuf arguments are reversed" >&5
19433 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
19434 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
19435   echo $ECHO_N "(cached) $ECHO_C" >&6
19436 else
19437   if test "$cross_compiling" = yes; then
19438   { { echo "$as_me:19438: error: cannot run test program while cross compiling" >&5
19439 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
19440    { (exit 1); exit 1; }; }
19441 else
19442   cat >conftest.$ac_ext <<_ACEOF
19443 #line 19443 "configure"
19444 #include "confdefs.h"
19445 #include <stdio.h>
19446 /* If setvbuf has the reversed format, exit 0. */
19447 int
19448 main (void)
19449 {
19450   /* This call has the arguments reversed.
19451      A reversed system may check and see that the address of main
19452      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
19453   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
19454     $ac_main_return(1);
19455   putc('\r', stdout);
19456   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
19457 }
19458 _ACEOF
19459 rm -f conftest$ac_exeext
19460 if { (eval echo "$as_me:19460: \"$ac_link\"") >&5
19461   (eval $ac_link) 2>&5
19462   ac_status=$?
19463   echo "$as_me:19463: \$? = $ac_status" >&5
19464   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19465   { (eval echo "$as_me:19465: \"$ac_try\"") >&5
19466   (eval $ac_try) 2>&5
19467   ac_status=$?
19468   echo "$as_me:19468: \$? = $ac_status" >&5
19469   (exit $ac_status); }; }; then
19470   ac_cv_func_setvbuf_reversed=yes
19471 else
19472   echo "$as_me: program exited with status $ac_status" >&5
19473 echo "$as_me: failed program was:" >&5
19474 cat conftest.$ac_ext >&5
19475 ac_cv_func_setvbuf_reversed=no
19476 fi
19477 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19478 fi
19479 rm -f core core.* *.core
19480 fi
19481 echo "$as_me:19481: result: $ac_cv_func_setvbuf_reversed" >&5
19482 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
19483 if test $ac_cv_func_setvbuf_reversed = yes; then
19484
19485 cat >>confdefs.h <<\EOF
19486 #define SETVBUF_REVERSED 1
19487 EOF
19488
19489 fi
19490
19491 fi
19492 echo "$as_me:19492: checking for intptr_t" >&5
19493 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
19494 if test "${ac_cv_type_intptr_t+set}" = set; then
19495   echo $ECHO_N "(cached) $ECHO_C" >&6
19496 else
19497   cat >conftest.$ac_ext <<_ACEOF
19498 #line 19498 "configure"
19499 #include "confdefs.h"
19500 $ac_includes_default
19501 int
19502 main (void)
19503 {
19504 if ((intptr_t *) 0)
19505   return 0;
19506 if (sizeof (intptr_t))
19507   return 0;
19508   ;
19509   return 0;
19510 }
19511 _ACEOF
19512 rm -f conftest.$ac_objext
19513 if { (eval echo "$as_me:19513: \"$ac_compile\"") >&5
19514   (eval $ac_compile) 2>&5
19515   ac_status=$?
19516   echo "$as_me:19516: \$? = $ac_status" >&5
19517   (exit $ac_status); } &&
19518          { ac_try='test -s conftest.$ac_objext'
19519   { (eval echo "$as_me:19519: \"$ac_try\"") >&5
19520   (eval $ac_try) 2>&5
19521   ac_status=$?
19522   echo "$as_me:19522: \$? = $ac_status" >&5
19523   (exit $ac_status); }; }; then
19524   ac_cv_type_intptr_t=yes
19525 else
19526   echo "$as_me: failed program was:" >&5
19527 cat conftest.$ac_ext >&5
19528 ac_cv_type_intptr_t=no
19529 fi
19530 rm -f conftest.$ac_objext conftest.$ac_ext
19531 fi
19532 echo "$as_me:19532: result: $ac_cv_type_intptr_t" >&5
19533 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19534 if test $ac_cv_type_intptr_t = yes; then
19535   :
19536 else
19537
19538 cat >>confdefs.h <<EOF
19539 #define intptr_t long
19540 EOF
19541
19542 fi
19543
19544 echo "$as_me:19544: checking for ssize_t" >&5
19545 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19546 if test "${ac_cv_type_ssize_t+set}" = set; then
19547   echo $ECHO_N "(cached) $ECHO_C" >&6
19548 else
19549   cat >conftest.$ac_ext <<_ACEOF
19550 #line 19550 "configure"
19551 #include "confdefs.h"
19552 $ac_includes_default
19553 int
19554 main (void)
19555 {
19556 if ((ssize_t *) 0)
19557   return 0;
19558 if (sizeof (ssize_t))
19559   return 0;
19560   ;
19561   return 0;
19562 }
19563 _ACEOF
19564 rm -f conftest.$ac_objext
19565 if { (eval echo "$as_me:19565: \"$ac_compile\"") >&5
19566   (eval $ac_compile) 2>&5
19567   ac_status=$?
19568   echo "$as_me:19568: \$? = $ac_status" >&5
19569   (exit $ac_status); } &&
19570          { ac_try='test -s conftest.$ac_objext'
19571   { (eval echo "$as_me:19571: \"$ac_try\"") >&5
19572   (eval $ac_try) 2>&5
19573   ac_status=$?
19574   echo "$as_me:19574: \$? = $ac_status" >&5
19575   (exit $ac_status); }; }; then
19576   ac_cv_type_ssize_t=yes
19577 else
19578   echo "$as_me: failed program was:" >&5
19579 cat conftest.$ac_ext >&5
19580 ac_cv_type_ssize_t=no
19581 fi
19582 rm -f conftest.$ac_objext conftest.$ac_ext
19583 fi
19584 echo "$as_me:19584: result: $ac_cv_type_ssize_t" >&5
19585 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19586 if test $ac_cv_type_ssize_t = yes; then
19587   :
19588 else
19589
19590 cat >>confdefs.h <<EOF
19591 #define ssize_t int
19592 EOF
19593
19594 fi
19595
19596 echo "$as_me:19596: checking for type sigaction_t" >&5
19597 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19598 if test "${cf_cv_type_sigaction+set}" = set; then
19599   echo $ECHO_N "(cached) $ECHO_C" >&6
19600 else
19601
19602         cat >conftest.$ac_ext <<_ACEOF
19603 #line 19603 "configure"
19604 #include "confdefs.h"
19605
19606 #include <signal.h>
19607 int
19608 main (void)
19609 {
19610 sigaction_t x
19611   ;
19612   return 0;
19613 }
19614 _ACEOF
19615 rm -f conftest.$ac_objext
19616 if { (eval echo "$as_me:19616: \"$ac_compile\"") >&5
19617   (eval $ac_compile) 2>&5
19618   ac_status=$?
19619   echo "$as_me:19619: \$? = $ac_status" >&5
19620   (exit $ac_status); } &&
19621          { ac_try='test -s conftest.$ac_objext'
19622   { (eval echo "$as_me:19622: \"$ac_try\"") >&5
19623   (eval $ac_try) 2>&5
19624   ac_status=$?
19625   echo "$as_me:19625: \$? = $ac_status" >&5
19626   (exit $ac_status); }; }; then
19627   cf_cv_type_sigaction=yes
19628 else
19629   echo "$as_me: failed program was:" >&5
19630 cat conftest.$ac_ext >&5
19631 cf_cv_type_sigaction=no
19632 fi
19633 rm -f conftest.$ac_objext conftest.$ac_ext
19634 fi
19635
19636 echo "$as_me:19636: result: $cf_cv_type_sigaction" >&5
19637 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19638 test "$cf_cv_type_sigaction" = yes &&
19639 cat >>confdefs.h <<\EOF
19640 #define HAVE_TYPE_SIGACTION 1
19641 EOF
19642
19643 echo "$as_me:19643: checking declaration of size-change" >&5
19644 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19645 if test "${cf_cv_sizechange+set}" = set; then
19646   echo $ECHO_N "(cached) $ECHO_C" >&6
19647 else
19648
19649         cf_cv_sizechange=unknown
19650         cf_save_CPPFLAGS="$CPPFLAGS"
19651
19652 for cf_opts in "" "NEED_PTEM_H"
19653 do
19654
19655         CPPFLAGS="$cf_save_CPPFLAGS"
19656         if test -n "$cf_opts"
19657         then
19658
19659         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19660         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19661
19662         fi
19663         cat >conftest.$ac_ext <<_ACEOF
19664 #line 19664 "configure"
19665 #include "confdefs.h"
19666 #include <sys/types.h>
19667 #ifdef HAVE_TERMIOS_H
19668 #include <termios.h>
19669 #else
19670 #ifdef HAVE_TERMIO_H
19671 #include <termio.h>
19672 #endif
19673 #endif
19674
19675 #ifdef NEED_PTEM_H
19676 /* This is a workaround for SCO:  they neglected to define struct winsize in
19677  * termios.h -- it's only in termio.h and ptem.h
19678  */
19679 #include <sys/stream.h>
19680 #include <sys/ptem.h>
19681 #endif
19682
19683 #ifdef HAVE_SYS_IOCTL_H
19684 #include <sys/ioctl.h>
19685 #endif
19686
19687 int
19688 main (void)
19689 {
19690
19691 #ifdef TIOCGSIZE
19692         struct ttysize win;     /* SunOS 3.0... */
19693         int y = win.ts_lines;
19694         int x = win.ts_cols;
19695 #else
19696 #ifdef TIOCGWINSZ
19697         struct winsize win;     /* everything else */
19698         int y = win.ws_row;
19699         int x = win.ws_col;
19700 #else
19701         no TIOCGSIZE or TIOCGWINSZ
19702 #endif /* TIOCGWINSZ */
19703 #endif /* TIOCGSIZE */
19704
19705   ;
19706   return 0;
19707 }
19708 _ACEOF
19709 rm -f conftest.$ac_objext
19710 if { (eval echo "$as_me:19710: \"$ac_compile\"") >&5
19711   (eval $ac_compile) 2>&5
19712   ac_status=$?
19713   echo "$as_me:19713: \$? = $ac_status" >&5
19714   (exit $ac_status); } &&
19715          { ac_try='test -s conftest.$ac_objext'
19716   { (eval echo "$as_me:19716: \"$ac_try\"") >&5
19717   (eval $ac_try) 2>&5
19718   ac_status=$?
19719   echo "$as_me:19719: \$? = $ac_status" >&5
19720   (exit $ac_status); }; }; then
19721   cf_cv_sizechange=yes
19722 else
19723   echo "$as_me: failed program was:" >&5
19724 cat conftest.$ac_ext >&5
19725 cf_cv_sizechange=no
19726 fi
19727 rm -f conftest.$ac_objext conftest.$ac_ext
19728
19729         CPPFLAGS="$cf_save_CPPFLAGS"
19730         if test "$cf_cv_sizechange" = yes ; then
19731                 echo "size-change succeeded ($cf_opts)" >&5
19732                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19733                 break
19734         fi
19735 done
19736
19737 fi
19738 echo "$as_me:19738: result: $cf_cv_sizechange" >&5
19739 echo "${ECHO_T}$cf_cv_sizechange" >&6
19740 if test "$cf_cv_sizechange" != no ; then
19741
19742 cat >>confdefs.h <<\EOF
19743 #define HAVE_SIZECHANGE 1
19744 EOF
19745
19746         case $cf_cv_sizechange in
19747         (NEED*)
19748                 cat >>confdefs.h <<EOF
19749 #define $cf_cv_sizechange  1
19750 EOF
19751
19752                 ;;
19753         esac
19754 fi
19755
19756 echo "$as_me:19756: checking for memmove" >&5
19757 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19758 if test "${ac_cv_func_memmove+set}" = set; then
19759   echo $ECHO_N "(cached) $ECHO_C" >&6
19760 else
19761   cat >conftest.$ac_ext <<_ACEOF
19762 #line 19762 "configure"
19763 #include "confdefs.h"
19764 /* System header to define __stub macros and hopefully few prototypes,
19765     which can conflict with char memmove (); below.  */
19766 #include <assert.h>
19767 /* Override any gcc2 internal prototype to avoid an error.  */
19768 #ifdef __cplusplus
19769 extern "C"
19770 #endif
19771 /* We use char because int might match the return type of a gcc2
19772    builtin and then its argument prototype would still apply.  */
19773 char memmove ();
19774 char (*f) ();
19775
19776 int
19777 main (void)
19778 {
19779 /* The GNU C library defines this for functions which it implements
19780     to always fail with ENOSYS.  Some functions are actually named
19781     something starting with __ and the normal name is an alias.  */
19782 #if defined (__stub_memmove) || defined (__stub___memmove)
19783 choke me
19784 #else
19785 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19786 #endif
19787
19788   ;
19789   return 0;
19790 }
19791 _ACEOF
19792 rm -f conftest.$ac_objext conftest$ac_exeext
19793 if { (eval echo "$as_me:19793: \"$ac_link\"") >&5
19794   (eval $ac_link) 2>&5
19795   ac_status=$?
19796   echo "$as_me:19796: \$? = $ac_status" >&5
19797   (exit $ac_status); } &&
19798          { ac_try='test -s conftest$ac_exeext'
19799   { (eval echo "$as_me:19799: \"$ac_try\"") >&5
19800   (eval $ac_try) 2>&5
19801   ac_status=$?
19802   echo "$as_me:19802: \$? = $ac_status" >&5
19803   (exit $ac_status); }; }; then
19804   ac_cv_func_memmove=yes
19805 else
19806   echo "$as_me: failed program was:" >&5
19807 cat conftest.$ac_ext >&5
19808 ac_cv_func_memmove=no
19809 fi
19810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19811 fi
19812 echo "$as_me:19812: result: $ac_cv_func_memmove" >&5
19813 echo "${ECHO_T}$ac_cv_func_memmove" >&6
19814 if test $ac_cv_func_memmove = yes; then
19815   :
19816 else
19817
19818 echo "$as_me:19818: checking for bcopy" >&5
19819 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
19820 if test "${ac_cv_func_bcopy+set}" = set; then
19821   echo $ECHO_N "(cached) $ECHO_C" >&6
19822 else
19823   cat >conftest.$ac_ext <<_ACEOF
19824 #line 19824 "configure"
19825 #include "confdefs.h"
19826 /* System header to define __stub macros and hopefully few prototypes,
19827     which can conflict with char bcopy (); below.  */
19828 #include <assert.h>
19829 /* Override any gcc2 internal prototype to avoid an error.  */
19830 #ifdef __cplusplus
19831 extern "C"
19832 #endif
19833 /* We use char because int might match the return type of a gcc2
19834    builtin and then its argument prototype would still apply.  */
19835 char bcopy ();
19836 char (*f) ();
19837
19838 int
19839 main (void)
19840 {
19841 /* The GNU C library defines this for functions which it implements
19842     to always fail with ENOSYS.  Some functions are actually named
19843     something starting with __ and the normal name is an alias.  */
19844 #if defined (__stub_bcopy) || defined (__stub___bcopy)
19845 choke me
19846 #else
19847 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19848 #endif
19849
19850   ;
19851   return 0;
19852 }
19853 _ACEOF
19854 rm -f conftest.$ac_objext conftest$ac_exeext
19855 if { (eval echo "$as_me:19855: \"$ac_link\"") >&5
19856   (eval $ac_link) 2>&5
19857   ac_status=$?
19858   echo "$as_me:19858: \$? = $ac_status" >&5
19859   (exit $ac_status); } &&
19860          { ac_try='test -s conftest$ac_exeext'
19861   { (eval echo "$as_me:19861: \"$ac_try\"") >&5
19862   (eval $ac_try) 2>&5
19863   ac_status=$?
19864   echo "$as_me:19864: \$? = $ac_status" >&5
19865   (exit $ac_status); }; }; then
19866   ac_cv_func_bcopy=yes
19867 else
19868   echo "$as_me: failed program was:" >&5
19869 cat conftest.$ac_ext >&5
19870 ac_cv_func_bcopy=no
19871 fi
19872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19873 fi
19874 echo "$as_me:19874: result: $ac_cv_func_bcopy" >&5
19875 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
19876 if test $ac_cv_func_bcopy = yes; then
19877
19878         echo "$as_me:19878: checking if bcopy does overlapping moves" >&5
19879 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
19880 if test "${cf_cv_good_bcopy+set}" = set; then
19881   echo $ECHO_N "(cached) $ECHO_C" >&6
19882 else
19883
19884                 if test "$cross_compiling" = yes; then
19885   cf_cv_good_bcopy=unknown
19886 else
19887   cat >conftest.$ac_ext <<_ACEOF
19888 #line 19888 "configure"
19889 #include "confdefs.h"
19890
19891 int main(void) {
19892         static char data[] = "abcdefghijklmnopqrstuwwxyz";
19893         char temp[40];
19894         bcopy(data, temp, sizeof(data));
19895         bcopy(temp+10, temp, 15);
19896         bcopy(temp+5, temp+15, 10);
19897         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
19898 }
19899
19900 _ACEOF
19901 rm -f conftest$ac_exeext
19902 if { (eval echo "$as_me:19902: \"$ac_link\"") >&5
19903   (eval $ac_link) 2>&5
19904   ac_status=$?
19905   echo "$as_me:19905: \$? = $ac_status" >&5
19906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19907   { (eval echo "$as_me:19907: \"$ac_try\"") >&5
19908   (eval $ac_try) 2>&5
19909   ac_status=$?
19910   echo "$as_me:19910: \$? = $ac_status" >&5
19911   (exit $ac_status); }; }; then
19912   cf_cv_good_bcopy=yes
19913 else
19914   echo "$as_me: program exited with status $ac_status" >&5
19915 echo "$as_me: failed program was:" >&5
19916 cat conftest.$ac_ext >&5
19917 cf_cv_good_bcopy=no
19918 fi
19919 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19920 fi
19921
19922 fi
19923 echo "$as_me:19923: result: $cf_cv_good_bcopy" >&5
19924 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
19925
19926 else
19927   cf_cv_good_bcopy=no
19928 fi
19929
19930         if test "$cf_cv_good_bcopy" = yes ; then
19931
19932 cat >>confdefs.h <<\EOF
19933 #define USE_OK_BCOPY 1
19934 EOF
19935
19936         else
19937
19938 cat >>confdefs.h <<\EOF
19939 #define USE_MY_MEMMOVE 1
19940 EOF
19941
19942         fi
19943
19944 fi
19945
19946 tty 2>&1 >/dev/null || {
19947 for ac_func in posix_openpt
19948 do
19949 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19950 echo "$as_me:19950: checking for $ac_func" >&5
19951 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19952 if eval "test \"\${$as_ac_var+set}\" = set"; then
19953   echo $ECHO_N "(cached) $ECHO_C" >&6
19954 else
19955   cat >conftest.$ac_ext <<_ACEOF
19956 #line 19956 "configure"
19957 #include "confdefs.h"
19958 /* System header to define __stub macros and hopefully few prototypes,
19959     which can conflict with char $ac_func (); below.  */
19960 #include <assert.h>
19961 /* Override any gcc2 internal prototype to avoid an error.  */
19962 #ifdef __cplusplus
19963 extern "C"
19964 #endif
19965 /* We use char because int might match the return type of a gcc2
19966    builtin and then its argument prototype would still apply.  */
19967 char $ac_func ();
19968 char (*f) ();
19969
19970 int
19971 main (void)
19972 {
19973 /* The GNU C library defines this for functions which it implements
19974     to always fail with ENOSYS.  Some functions are actually named
19975     something starting with __ and the normal name is an alias.  */
19976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19977 choke me
19978 #else
19979 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19980 #endif
19981
19982   ;
19983   return 0;
19984 }
19985 _ACEOF
19986 rm -f conftest.$ac_objext conftest$ac_exeext
19987 if { (eval echo "$as_me:19987: \"$ac_link\"") >&5
19988   (eval $ac_link) 2>&5
19989   ac_status=$?
19990   echo "$as_me:19990: \$? = $ac_status" >&5
19991   (exit $ac_status); } &&
19992          { ac_try='test -s conftest$ac_exeext'
19993   { (eval echo "$as_me:19993: \"$ac_try\"") >&5
19994   (eval $ac_try) 2>&5
19995   ac_status=$?
19996   echo "$as_me:19996: \$? = $ac_status" >&5
19997   (exit $ac_status); }; }; then
19998   eval "$as_ac_var=yes"
19999 else
20000   echo "$as_me: failed program was:" >&5
20001 cat conftest.$ac_ext >&5
20002 eval "$as_ac_var=no"
20003 fi
20004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20005 fi
20006 echo "$as_me:20006: result: `eval echo '${'$as_ac_var'}'`" >&5
20007 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20008 if test `eval echo '${'$as_ac_var'}'` = yes; then
20009   cat >>confdefs.h <<EOF
20010 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20011 EOF
20012
20013 fi
20014 done
20015  }
20016 echo "$as_me:20016: checking if poll really works" >&5
20017 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20018 if test "${cf_cv_working_poll+set}" = set; then
20019   echo $ECHO_N "(cached) $ECHO_C" >&6
20020 else
20021
20022 if test "$cross_compiling" = yes; then
20023   cf_cv_working_poll=unknown
20024 else
20025   cat >conftest.$ac_ext <<_ACEOF
20026 #line 20026 "configure"
20027 #include "confdefs.h"
20028
20029 #include <stdlib.h>
20030 #include <stdio.h>
20031 #include <unistd.h>
20032 #include <fcntl.h>
20033 #ifdef HAVE_POLL_H
20034 #include <poll.h>
20035 #else
20036 #include <sys/poll.h>
20037 #endif
20038 int main(void) {
20039         struct pollfd myfds;
20040         int ret;
20041
20042         /* check for Darwin bug with respect to "devices" */
20043         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20044         if (myfds.fd < 0)
20045                 myfds.fd = 0;
20046         myfds.events = POLLIN;
20047         myfds.revents = 0;
20048
20049         ret = poll(&myfds, 1, 100);
20050
20051         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20052                 ret = -1;
20053         } else {
20054                 int fd = 0;
20055                 if (!isatty(fd)) {
20056                         fd = open("/dev/tty", 2);       /* O_RDWR */
20057                 }
20058 #ifdef HAVE_POSIX_OPENPT
20059                 if (fd < 0) {
20060                         fd = posix_openpt(O_RDWR);
20061                 }
20062 #endif
20063
20064                 if (fd >= 0) {
20065                         /* also check with standard input */
20066                         myfds.fd = fd;
20067                         myfds.events = POLLIN;
20068                         myfds.revents = 0;
20069                         ret = poll(&myfds, 1, 100);
20070                 } else {
20071                         ret = -1;
20072                 }
20073         }
20074         ${cf_cv_main_return:-return}(ret < 0);
20075 }
20076 _ACEOF
20077 rm -f conftest$ac_exeext
20078 if { (eval echo "$as_me:20078: \"$ac_link\"") >&5
20079   (eval $ac_link) 2>&5
20080   ac_status=$?
20081   echo "$as_me:20081: \$? = $ac_status" >&5
20082   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20083   { (eval echo "$as_me:20083: \"$ac_try\"") >&5
20084   (eval $ac_try) 2>&5
20085   ac_status=$?
20086   echo "$as_me:20086: \$? = $ac_status" >&5
20087   (exit $ac_status); }; }; then
20088   cf_cv_working_poll=yes
20089 else
20090   echo "$as_me: program exited with status $ac_status" >&5
20091 echo "$as_me: failed program was:" >&5
20092 cat conftest.$ac_ext >&5
20093 cf_cv_working_poll=no
20094 fi
20095 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20096 fi
20097 fi
20098 echo "$as_me:20098: result: $cf_cv_working_poll" >&5
20099 echo "${ECHO_T}$cf_cv_working_poll" >&6
20100 test "$cf_cv_working_poll" = "yes" &&
20101 cat >>confdefs.h <<\EOF
20102 #define HAVE_WORKING_POLL 1
20103 EOF
20104
20105 echo "$as_me:20105: checking for va_copy" >&5
20106 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20107 if test "${cf_cv_have_va_copy+set}" = set; then
20108   echo $ECHO_N "(cached) $ECHO_C" >&6
20109 else
20110
20111 cat >conftest.$ac_ext <<_ACEOF
20112 #line 20112 "configure"
20113 #include "confdefs.h"
20114
20115 #include <stdarg.h>
20116
20117 int
20118 main (void)
20119 {
20120
20121         static va_list dst;
20122         static va_list src;
20123         va_copy(dst, src)
20124   ;
20125   return 0;
20126 }
20127 _ACEOF
20128 rm -f conftest.$ac_objext conftest$ac_exeext
20129 if { (eval echo "$as_me:20129: \"$ac_link\"") >&5
20130   (eval $ac_link) 2>&5
20131   ac_status=$?
20132   echo "$as_me:20132: \$? = $ac_status" >&5
20133   (exit $ac_status); } &&
20134          { ac_try='test -s conftest$ac_exeext'
20135   { (eval echo "$as_me:20135: \"$ac_try\"") >&5
20136   (eval $ac_try) 2>&5
20137   ac_status=$?
20138   echo "$as_me:20138: \$? = $ac_status" >&5
20139   (exit $ac_status); }; }; then
20140   cf_cv_have_va_copy=yes
20141 else
20142   echo "$as_me: failed program was:" >&5
20143 cat conftest.$ac_ext >&5
20144 cf_cv_have_va_copy=no
20145 fi
20146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20147 fi
20148 echo "$as_me:20148: result: $cf_cv_have_va_copy" >&5
20149 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20150
20151 test "$cf_cv_have_va_copy" = yes &&
20152 cat >>confdefs.h <<\EOF
20153 #define HAVE_VA_COPY 1
20154 EOF
20155
20156 echo "$as_me:20156: checking for __va_copy" >&5
20157 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20158 if test "${cf_cv_have___va_copy+set}" = set; then
20159   echo $ECHO_N "(cached) $ECHO_C" >&6
20160 else
20161
20162 cat >conftest.$ac_ext <<_ACEOF
20163 #line 20163 "configure"
20164 #include "confdefs.h"
20165
20166 #include <stdarg.h>
20167
20168 int
20169 main (void)
20170 {
20171
20172         static va_list dst;
20173         static va_list src;
20174         __va_copy(dst, src)
20175   ;
20176   return 0;
20177 }
20178 _ACEOF
20179 rm -f conftest.$ac_objext conftest$ac_exeext
20180 if { (eval echo "$as_me:20180: \"$ac_link\"") >&5
20181   (eval $ac_link) 2>&5
20182   ac_status=$?
20183   echo "$as_me:20183: \$? = $ac_status" >&5
20184   (exit $ac_status); } &&
20185          { ac_try='test -s conftest$ac_exeext'
20186   { (eval echo "$as_me:20186: \"$ac_try\"") >&5
20187   (eval $ac_try) 2>&5
20188   ac_status=$?
20189   echo "$as_me:20189: \$? = $ac_status" >&5
20190   (exit $ac_status); }; }; then
20191   cf_cv_have___va_copy=yes
20192 else
20193   echo "$as_me: failed program was:" >&5
20194 cat conftest.$ac_ext >&5
20195 cf_cv_have___va_copy=no
20196 fi
20197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20198 fi
20199 echo "$as_me:20199: result: $cf_cv_have___va_copy" >&5
20200 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20201
20202 test "$cf_cv_have___va_copy" = yes &&
20203 cat >>confdefs.h <<\EOF
20204 #define HAVE___VA_COPY 1
20205 EOF
20206
20207 echo "$as_me:20207: checking for pid_t" >&5
20208 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20209 if test "${ac_cv_type_pid_t+set}" = set; then
20210   echo $ECHO_N "(cached) $ECHO_C" >&6
20211 else
20212   cat >conftest.$ac_ext <<_ACEOF
20213 #line 20213 "configure"
20214 #include "confdefs.h"
20215 $ac_includes_default
20216 int
20217 main (void)
20218 {
20219 if ((pid_t *) 0)
20220   return 0;
20221 if (sizeof (pid_t))
20222   return 0;
20223   ;
20224   return 0;
20225 }
20226 _ACEOF
20227 rm -f conftest.$ac_objext
20228 if { (eval echo "$as_me:20228: \"$ac_compile\"") >&5
20229   (eval $ac_compile) 2>&5
20230   ac_status=$?
20231   echo "$as_me:20231: \$? = $ac_status" >&5
20232   (exit $ac_status); } &&
20233          { ac_try='test -s conftest.$ac_objext'
20234   { (eval echo "$as_me:20234: \"$ac_try\"") >&5
20235   (eval $ac_try) 2>&5
20236   ac_status=$?
20237   echo "$as_me:20237: \$? = $ac_status" >&5
20238   (exit $ac_status); }; }; then
20239   ac_cv_type_pid_t=yes
20240 else
20241   echo "$as_me: failed program was:" >&5
20242 cat conftest.$ac_ext >&5
20243 ac_cv_type_pid_t=no
20244 fi
20245 rm -f conftest.$ac_objext conftest.$ac_ext
20246 fi
20247 echo "$as_me:20247: result: $ac_cv_type_pid_t" >&5
20248 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20249 if test $ac_cv_type_pid_t = yes; then
20250   :
20251 else
20252
20253 cat >>confdefs.h <<EOF
20254 #define pid_t int
20255 EOF
20256
20257 fi
20258
20259 for ac_header in unistd.h vfork.h
20260 do
20261 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20262 echo "$as_me:20262: checking for $ac_header" >&5
20263 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20265   echo $ECHO_N "(cached) $ECHO_C" >&6
20266 else
20267   cat >conftest.$ac_ext <<_ACEOF
20268 #line 20268 "configure"
20269 #include "confdefs.h"
20270 #include <$ac_header>
20271 _ACEOF
20272 if { (eval echo "$as_me:20272: \"$ac_cpp conftest.$ac_ext\"") >&5
20273   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20274   ac_status=$?
20275   egrep -v '^ *\+' conftest.er1 >conftest.err
20276   rm -f conftest.er1
20277   cat conftest.err >&5
20278   echo "$as_me:20278: \$? = $ac_status" >&5
20279   (exit $ac_status); } >/dev/null; then
20280   if test -s conftest.err; then
20281     ac_cpp_err=$ac_c_preproc_warn_flag
20282   else
20283     ac_cpp_err=
20284   fi
20285 else
20286   ac_cpp_err=yes
20287 fi
20288 if test -z "$ac_cpp_err"; then
20289   eval "$as_ac_Header=yes"
20290 else
20291   echo "$as_me: failed program was:" >&5
20292   cat conftest.$ac_ext >&5
20293   eval "$as_ac_Header=no"
20294 fi
20295 rm -f conftest.err conftest.$ac_ext
20296 fi
20297 echo "$as_me:20297: result: `eval echo '${'$as_ac_Header'}'`" >&5
20298 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20299 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20300   cat >>confdefs.h <<EOF
20301 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20302 EOF
20303
20304 fi
20305 done
20306
20307 for ac_func in fork vfork
20308 do
20309 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20310 echo "$as_me:20310: checking for $ac_func" >&5
20311 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20312 if eval "test \"\${$as_ac_var+set}\" = set"; then
20313   echo $ECHO_N "(cached) $ECHO_C" >&6
20314 else
20315   cat >conftest.$ac_ext <<_ACEOF
20316 #line 20316 "configure"
20317 #include "confdefs.h"
20318 /* System header to define __stub macros and hopefully few prototypes,
20319     which can conflict with char $ac_func (); below.  */
20320 #include <assert.h>
20321 /* Override any gcc2 internal prototype to avoid an error.  */
20322 #ifdef __cplusplus
20323 extern "C"
20324 #endif
20325 /* We use char because int might match the return type of a gcc2
20326    builtin and then its argument prototype would still apply.  */
20327 char $ac_func ();
20328 char (*f) ();
20329
20330 int
20331 main (void)
20332 {
20333 /* The GNU C library defines this for functions which it implements
20334     to always fail with ENOSYS.  Some functions are actually named
20335     something starting with __ and the normal name is an alias.  */
20336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20337 choke me
20338 #else
20339 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20340 #endif
20341
20342   ;
20343   return 0;
20344 }
20345 _ACEOF
20346 rm -f conftest.$ac_objext conftest$ac_exeext
20347 if { (eval echo "$as_me:20347: \"$ac_link\"") >&5
20348   (eval $ac_link) 2>&5
20349   ac_status=$?
20350   echo "$as_me:20350: \$? = $ac_status" >&5
20351   (exit $ac_status); } &&
20352          { ac_try='test -s conftest$ac_exeext'
20353   { (eval echo "$as_me:20353: \"$ac_try\"") >&5
20354   (eval $ac_try) 2>&5
20355   ac_status=$?
20356   echo "$as_me:20356: \$? = $ac_status" >&5
20357   (exit $ac_status); }; }; then
20358   eval "$as_ac_var=yes"
20359 else
20360   echo "$as_me: failed program was:" >&5
20361 cat conftest.$ac_ext >&5
20362 eval "$as_ac_var=no"
20363 fi
20364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20365 fi
20366 echo "$as_me:20366: result: `eval echo '${'$as_ac_var'}'`" >&5
20367 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20368 if test `eval echo '${'$as_ac_var'}'` = yes; then
20369   cat >>confdefs.h <<EOF
20370 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20371 EOF
20372
20373 fi
20374 done
20375
20376 ac_cv_func_fork_works=$ac_cv_func_fork
20377 if test "x$ac_cv_func_fork" = xyes; then
20378   echo "$as_me:20378: checking for working fork" >&5
20379 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20380 if test "${ac_cv_func_fork_works+set}" = set; then
20381   echo $ECHO_N "(cached) $ECHO_C" >&6
20382 else
20383   if test "$cross_compiling" = yes; then
20384   ac_cv_func_fork_works=cross
20385 else
20386   cat >conftest.$ac_ext <<_ACEOF
20387 /* By Rüdiger Kuhlmann. */
20388       #include <sys/types.h>
20389       #if HAVE_UNISTD_H
20390       # include <unistd.h>
20391       #endif
20392       /* Some systems only have a dummy stub for fork() */
20393       int main (void)
20394       {
20395         if (fork() < 0)
20396           $ac_main_return (1);
20397         $ac_main_return (0);
20398       }
20399 _ACEOF
20400 rm -f conftest$ac_exeext
20401 if { (eval echo "$as_me:20401: \"$ac_link\"") >&5
20402   (eval $ac_link) 2>&5
20403   ac_status=$?
20404   echo "$as_me:20404: \$? = $ac_status" >&5
20405   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20406   { (eval echo "$as_me:20406: \"$ac_try\"") >&5
20407   (eval $ac_try) 2>&5
20408   ac_status=$?
20409   echo "$as_me:20409: \$? = $ac_status" >&5
20410   (exit $ac_status); }; }; then
20411   ac_cv_func_fork_works=yes
20412 else
20413   echo "$as_me: program exited with status $ac_status" >&5
20414 echo "$as_me: failed program was:" >&5
20415 cat conftest.$ac_ext >&5
20416 ac_cv_func_fork_works=no
20417 fi
20418 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20419 fi
20420 fi
20421 echo "$as_me:20421: result: $ac_cv_func_fork_works" >&5
20422 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
20423
20424 fi
20425 if test "x$ac_cv_func_fork_works" = xcross; then
20426   case $host in
20427     *-*-amigaos* | *-*-msdosdjgpp*)
20428       # Override, as these systems have only a dummy fork() stub
20429       ac_cv_func_fork_works=no
20430       ;;
20431     *)
20432       ac_cv_func_fork_works=yes
20433       ;;
20434   esac
20435   { echo "$as_me:20435: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
20436 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
20437 fi
20438 ac_cv_func_vfork_works=$ac_cv_func_vfork
20439 if test "x$ac_cv_func_vfork" = xyes; then
20440   echo "$as_me:20440: checking for working vfork" >&5
20441 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
20442 if test "${ac_cv_func_vfork_works+set}" = set; then
20443   echo $ECHO_N "(cached) $ECHO_C" >&6
20444 else
20445   if test "$cross_compiling" = yes; then
20446   ac_cv_func_vfork_works=cross
20447 else
20448   cat >conftest.$ac_ext <<_ACEOF
20449 #line 20449 "configure"
20450 #include "confdefs.h"
20451 /* Thanks to Paul Eggert for this test.  */
20452 #include <stdio.h>
20453 #include <sys/types.h>
20454 #include <sys/stat.h>
20455 #if HAVE_UNISTD_H
20456 # include <unistd.h>
20457 #endif
20458 #if HAVE_VFORK_H
20459 # include <vfork.h>
20460 #endif
20461 /* On some sparc systems, changes by the child to local and incoming
20462    argument registers are propagated back to the parent.  The compiler
20463    is told about this with #include <vfork.h>, but some compilers
20464    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
20465    static variable whose address is put into a register that is
20466    clobbered by the vfork.  */
20467 static
20468 #ifdef __cplusplus
20469 sparc_address_test (int arg)
20470 # else
20471 sparc_address_test (arg) int arg;
20472 #endif
20473 {
20474   static pid_t child;
20475   if (!child) {
20476     child = vfork ();
20477     if (child < 0) {
20478       perror ("vfork");
20479       _exit(2);
20480     }
20481     if (!child) {
20482       arg = getpid();
20483       write(-1, "", 0);
20484       _exit (arg);
20485     }
20486   }
20487 }
20488
20489 int
20490 main (void)
20491 {
20492   pid_t parent = getpid ();
20493   pid_t child;
20494
20495   sparc_address_test ();
20496
20497   child = vfork ();
20498
20499   if (child == 0) {
20500     /* Here is another test for sparc vfork register problems.  This
20501        test uses lots of local variables, at least as many local
20502        variables as main has allocated so far including compiler
20503        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20504        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20505        reuse the register of parent for one of the local variables,
20506        since it will think that parent can't possibly be used any more
20507        in this routine.  Assigning to the local variable will thus
20508        munge parent in the parent process.  */
20509     pid_t
20510       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20511       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20512     /* Convince the compiler that p..p7 are live; otherwise, it might
20513        use the same hardware register for all 8 local variables.  */
20514     if (p != p1 || p != p2 || p != p3 || p != p4
20515         || p != p5 || p != p6 || p != p7)
20516       _exit(1);
20517
20518     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20519        from child file descriptors.  If the child closes a descriptor
20520        before it execs or exits, this munges the parent's descriptor
20521        as well.  Test for this by closing stdout in the child.  */
20522     _exit(close(fileno(stdout)) != 0);
20523   } else {
20524     int status;
20525     struct stat st;
20526
20527     while (wait(&status) != child)
20528       ;
20529     $ac_main_return(
20530          /* Was there some problem with vforking?  */
20531          child < 0
20532
20533          /* Did the child fail?  (This shouldn't happen.)  */
20534          || status
20535
20536          /* Did the vfork/compiler bug occur?  */
20537          || parent != getpid()
20538
20539          /* Did the file descriptor bug occur?  */
20540          || fstat(fileno(stdout), &st) != 0
20541          );
20542   }
20543 }
20544 _ACEOF
20545 rm -f conftest$ac_exeext
20546 if { (eval echo "$as_me:20546: \"$ac_link\"") >&5
20547   (eval $ac_link) 2>&5
20548   ac_status=$?
20549   echo "$as_me:20549: \$? = $ac_status" >&5
20550   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20551   { (eval echo "$as_me:20551: \"$ac_try\"") >&5
20552   (eval $ac_try) 2>&5
20553   ac_status=$?
20554   echo "$as_me:20554: \$? = $ac_status" >&5
20555   (exit $ac_status); }; }; then
20556   ac_cv_func_vfork_works=yes
20557 else
20558   echo "$as_me: program exited with status $ac_status" >&5
20559 echo "$as_me: failed program was:" >&5
20560 cat conftest.$ac_ext >&5
20561 ac_cv_func_vfork_works=no
20562 fi
20563 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20564 fi
20565 fi
20566 echo "$as_me:20566: result: $ac_cv_func_vfork_works" >&5
20567 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20568
20569 fi;
20570 if test "x$ac_cv_func_fork_works" = xcross; then
20571   ac_cv_func_vfork_works=ac_cv_func_vfork
20572   { echo "$as_me:20572: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20573 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20574 fi
20575
20576 if test "x$ac_cv_func_vfork_works" = xyes; then
20577
20578 cat >>confdefs.h <<\EOF
20579 #define HAVE_WORKING_VFORK 1
20580 EOF
20581
20582 else
20583
20584 cat >>confdefs.h <<\EOF
20585 #define vfork fork
20586 EOF
20587
20588 fi
20589 if test "x$ac_cv_func_fork_works" = xyes; then
20590
20591 cat >>confdefs.h <<\EOF
20592 #define HAVE_WORKING_FORK 1
20593 EOF
20594
20595 fi
20596
20597 # special check for test/ditto.c
20598
20599 echo "$as_me:20599: checking for openpty in -lutil" >&5
20600 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20601 if test "${ac_cv_lib_util_openpty+set}" = set; then
20602   echo $ECHO_N "(cached) $ECHO_C" >&6
20603 else
20604   ac_check_lib_save_LIBS=$LIBS
20605 LIBS="-lutil  $LIBS"
20606 cat >conftest.$ac_ext <<_ACEOF
20607 #line 20607 "configure"
20608 #include "confdefs.h"
20609
20610 /* Override any gcc2 internal prototype to avoid an error.  */
20611 #ifdef __cplusplus
20612 extern "C"
20613 #endif
20614 /* We use char because int might match the return type of a gcc2
20615    builtin and then its argument prototype would still apply.  */
20616 char openpty ();
20617 int
20618 main (void)
20619 {
20620 openpty ();
20621   ;
20622   return 0;
20623 }
20624 _ACEOF
20625 rm -f conftest.$ac_objext conftest$ac_exeext
20626 if { (eval echo "$as_me:20626: \"$ac_link\"") >&5
20627   (eval $ac_link) 2>&5
20628   ac_status=$?
20629   echo "$as_me:20629: \$? = $ac_status" >&5
20630   (exit $ac_status); } &&
20631          { ac_try='test -s conftest$ac_exeext'
20632   { (eval echo "$as_me:20632: \"$ac_try\"") >&5
20633   (eval $ac_try) 2>&5
20634   ac_status=$?
20635   echo "$as_me:20635: \$? = $ac_status" >&5
20636   (exit $ac_status); }; }; then
20637   ac_cv_lib_util_openpty=yes
20638 else
20639   echo "$as_me: failed program was:" >&5
20640 cat conftest.$ac_ext >&5
20641 ac_cv_lib_util_openpty=no
20642 fi
20643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20644 LIBS=$ac_check_lib_save_LIBS
20645 fi
20646 echo "$as_me:20646: result: $ac_cv_lib_util_openpty" >&5
20647 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20648 if test $ac_cv_lib_util_openpty = yes; then
20649   cf_cv_lib_util=yes
20650 else
20651   cf_cv_lib_util=no
20652 fi
20653
20654 echo "$as_me:20654: checking for openpty header" >&5
20655 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20656 if test "${cf_cv_func_openpty+set}" = set; then
20657   echo $ECHO_N "(cached) $ECHO_C" >&6
20658 else
20659
20660         cf_save_LIBS="$LIBS"
20661         test $cf_cv_lib_util = yes && {
20662 cf_add_libs="-lutil"
20663 # Filter out duplicates - this happens with badly-designed ".pc" files...
20664 for cf_add_1lib in $LIBS
20665 do
20666         for cf_add_2lib in $cf_add_libs
20667         do
20668                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20669                 then
20670                         cf_add_1lib=
20671                         break
20672                 fi
20673         done
20674         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20675 done
20676 LIBS="$cf_add_libs"
20677  }
20678         for cf_header in pty.h libutil.h util.h
20679         do
20680         cat >conftest.$ac_ext <<_ACEOF
20681 #line 20681 "configure"
20682 #include "confdefs.h"
20683
20684 #include <$cf_header>
20685
20686 int
20687 main (void)
20688 {
20689
20690         int x = openpty((int *)0, (int *)0, (char *)0,
20691                                    (struct termios *)0, (struct winsize *)0);
20692
20693   ;
20694   return 0;
20695 }
20696 _ACEOF
20697 rm -f conftest.$ac_objext conftest$ac_exeext
20698 if { (eval echo "$as_me:20698: \"$ac_link\"") >&5
20699   (eval $ac_link) 2>&5
20700   ac_status=$?
20701   echo "$as_me:20701: \$? = $ac_status" >&5
20702   (exit $ac_status); } &&
20703          { ac_try='test -s conftest$ac_exeext'
20704   { (eval echo "$as_me:20704: \"$ac_try\"") >&5
20705   (eval $ac_try) 2>&5
20706   ac_status=$?
20707   echo "$as_me:20707: \$? = $ac_status" >&5
20708   (exit $ac_status); }; }; then
20709
20710                 cf_cv_func_openpty=$cf_header
20711                 break
20712
20713 else
20714   echo "$as_me: failed program was:" >&5
20715 cat conftest.$ac_ext >&5
20716
20717                 cf_cv_func_openpty=no
20718
20719 fi
20720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20721         done
20722         LIBS="$cf_save_LIBS"
20723
20724 fi
20725 echo "$as_me:20725: result: $cf_cv_func_openpty" >&5
20726 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20727
20728 if test "$cf_cv_func_openpty" != no ; then
20729
20730 cat >>confdefs.h <<EOF
20731 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20732 EOF
20733
20734 cat >>confdefs.h <<\EOF
20735 #define USE_XTERM_PTY 1
20736 EOF
20737
20738         if test "x$cf_cv_lib_util" = xyes ; then
20739
20740 cf_add_libs="-lutil"
20741 # Filter out duplicates - this happens with badly-designed ".pc" files...
20742 for cf_add_1lib in $TEST_LIBS
20743 do
20744         for cf_add_2lib in $cf_add_libs
20745         do
20746                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20747                 then
20748                         cf_add_1lib=
20749                         break
20750                 fi
20751         done
20752         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20753 done
20754 TEST_LIBS="$cf_add_libs"
20755
20756         fi
20757 fi
20758
20759 if test "$with_hashed_db" != no ; then
20760
20761 cat >>confdefs.h <<\EOF
20762 #define USE_HASHED_DB 1
20763 EOF
20764
20765 case $with_hashed_db in
20766 (yes|*able*)
20767         ;;
20768 (*)
20769         if test -d "$with_hashed_db" ; then
20770
20771 if test -n "$with_hashed_db/include" ; then
20772   for cf_add_incdir in $with_hashed_db/include
20773   do
20774         while test $cf_add_incdir != /usr/include
20775         do
20776           if test -d $cf_add_incdir
20777           then
20778                 cf_have_incdir=no
20779                 if test -n "$CFLAGS$CPPFLAGS" ; then
20780                   # a loop is needed to ensure we can add subdirs of existing dirs
20781                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20782                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20783                           cf_have_incdir=yes; break
20784                         fi
20785                   done
20786                 fi
20787
20788                 if test "$cf_have_incdir" = no ; then
20789                   if test "$cf_add_incdir" = /usr/local/include ; then
20790                         if test "$GCC" = yes
20791                         then
20792                           cf_save_CPPFLAGS=$CPPFLAGS
20793
20794         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20795         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20796
20797                           cat >conftest.$ac_ext <<_ACEOF
20798 #line 20798 "configure"
20799 #include "confdefs.h"
20800 #include <stdio.h>
20801 int
20802 main (void)
20803 {
20804 printf("Hello")
20805   ;
20806   return 0;
20807 }
20808 _ACEOF
20809 rm -f conftest.$ac_objext
20810 if { (eval echo "$as_me:20810: \"$ac_compile\"") >&5
20811   (eval $ac_compile) 2>&5
20812   ac_status=$?
20813   echo "$as_me:20813: \$? = $ac_status" >&5
20814   (exit $ac_status); } &&
20815          { ac_try='test -s conftest.$ac_objext'
20816   { (eval echo "$as_me:20816: \"$ac_try\"") >&5
20817   (eval $ac_try) 2>&5
20818   ac_status=$?
20819   echo "$as_me:20819: \$? = $ac_status" >&5
20820   (exit $ac_status); }; }; then
20821   :
20822 else
20823   echo "$as_me: failed program was:" >&5
20824 cat conftest.$ac_ext >&5
20825 cf_have_incdir=yes
20826 fi
20827 rm -f conftest.$ac_objext conftest.$ac_ext
20828                           CPPFLAGS=$cf_save_CPPFLAGS
20829                         fi
20830                   fi
20831                 fi
20832
20833                 if test "$cf_have_incdir" = no ; then
20834                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20835
20836 echo "${as_me:-configure}:20836: testing adding $cf_add_incdir to include-path ..." 1>&5
20837
20838                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20839
20840                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20841                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20842                   cf_add_incdir="$cf_top_incdir"
20843                 else
20844                   break
20845                 fi
20846           else
20847                 break
20848           fi
20849         done
20850   done
20851 fi
20852
20853 if test -n "$with_hashed_db/lib" ; then
20854         for cf_add_libdir in $with_hashed_db/lib
20855         do
20856                 if test $cf_add_libdir = /usr/lib ; then
20857                         :
20858                 elif test -d $cf_add_libdir
20859                 then
20860                         cf_have_libdir=no
20861                         if test -n "$LDFLAGS$LIBS" ; then
20862                                 # a loop is needed to ensure we can add subdirs of existing dirs
20863                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20864                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20865                                                 cf_have_libdir=yes; break
20866                                         fi
20867                                 done
20868                         fi
20869                         if test "$cf_have_libdir" = no ; then
20870                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20871
20872 echo "${as_me:-configure}:20872: testing adding $cf_add_libdir to library-path ..." 1>&5
20873
20874                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20875                         fi
20876                 fi
20877         done
20878 fi
20879
20880         else
20881                 case "$with_hashed_db" in
20882                 (./*|../*|/*)
20883                         { echo "$as_me:20883: WARNING: no such directory $with_hashed_db" >&5
20884 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
20885                         ;;
20886                 (*)
20887
20888 cf_search=
20889
20890 test "x$prefix" != "xNONE" && \
20891 test -d "$prefix" && \
20892  {
20893         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
20894         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
20895         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
20896         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
20897         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
20898         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
20899 }
20900
20901 for cf_subdir_prefix in \
20902         /usr \
20903         /usr/local \
20904         /usr/pkg \
20905         /opt \
20906         /opt/local \
20907         $HOME
20908 do
20909
20910 test "x$cf_subdir_prefix" != "x$prefix" && \
20911 test -d "$cf_subdir_prefix" && \
20912 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20913         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
20914         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
20915         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
20916         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
20917         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
20918         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"
20919 }
20920
20921 done
20922
20923         for cf_item in $cf_search
20924         do
20925                 case $cf_item in
20926                 (*/$with_hashed_db)
20927
20928 if test -n "$cf_item" ; then
20929   for cf_add_incdir in $cf_item
20930   do
20931         while test $cf_add_incdir != /usr/include
20932         do
20933           if test -d $cf_add_incdir
20934           then
20935                 cf_have_incdir=no
20936                 if test -n "$CFLAGS$CPPFLAGS" ; then
20937                   # a loop is needed to ensure we can add subdirs of existing dirs
20938                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20939                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20940                           cf_have_incdir=yes; break
20941                         fi
20942                   done
20943                 fi
20944
20945                 if test "$cf_have_incdir" = no ; then
20946                   if test "$cf_add_incdir" = /usr/local/include ; then
20947                         if test "$GCC" = yes
20948                         then
20949                           cf_save_CPPFLAGS=$CPPFLAGS
20950
20951         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20952         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20953
20954                           cat >conftest.$ac_ext <<_ACEOF
20955 #line 20955 "configure"
20956 #include "confdefs.h"
20957 #include <stdio.h>
20958 int
20959 main (void)
20960 {
20961 printf("Hello")
20962   ;
20963   return 0;
20964 }
20965 _ACEOF
20966 rm -f conftest.$ac_objext
20967 if { (eval echo "$as_me:20967: \"$ac_compile\"") >&5
20968   (eval $ac_compile) 2>&5
20969   ac_status=$?
20970   echo "$as_me:20970: \$? = $ac_status" >&5
20971   (exit $ac_status); } &&
20972          { ac_try='test -s conftest.$ac_objext'
20973   { (eval echo "$as_me:20973: \"$ac_try\"") >&5
20974   (eval $ac_try) 2>&5
20975   ac_status=$?
20976   echo "$as_me:20976: \$? = $ac_status" >&5
20977   (exit $ac_status); }; }; then
20978   :
20979 else
20980   echo "$as_me: failed program was:" >&5
20981 cat conftest.$ac_ext >&5
20982 cf_have_incdir=yes
20983 fi
20984 rm -f conftest.$ac_objext conftest.$ac_ext
20985                           CPPFLAGS=$cf_save_CPPFLAGS
20986                         fi
20987                   fi
20988                 fi
20989
20990                 if test "$cf_have_incdir" = no ; then
20991                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20992
20993 echo "${as_me:-configure}:20993: testing adding $cf_add_incdir to include-path ..." 1>&5
20994
20995                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20996
20997                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20998                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20999                   cf_add_incdir="$cf_top_incdir"
21000                 else
21001                   break
21002                 fi
21003           else
21004                 break
21005           fi
21006         done
21007   done
21008 fi
21009
21010                         ;;
21011                 esac
21012         done
21013
21014 cf_search=
21015
21016 test "x$prefix" != "xNONE" && \
21017 test -d "$prefix" && \
21018  {
21019         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
21020         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
21021         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
21022         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
21023         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
21024         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
21025 }
21026
21027 for cf_subdir_prefix in \
21028         /usr \
21029         /usr/local \
21030         /usr/pkg \
21031         /opt \
21032         /opt/local \
21033         $HOME
21034 do
21035
21036 test "x$cf_subdir_prefix" != "x$prefix" && \
21037 test -d "$cf_subdir_prefix" && \
21038 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21039         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
21040         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21041         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
21042         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
21043         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
21044         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"
21045 }
21046
21047 done
21048
21049         for cf_item in $cf_search
21050         do
21051                 case $cf_item in
21052                 (*/$with_hashed_db)
21053
21054 if test -n "$cf_item" ; then
21055         for cf_add_libdir in $cf_item
21056         do
21057                 if test $cf_add_libdir = /usr/lib ; then
21058                         :
21059                 elif test -d $cf_add_libdir
21060                 then
21061                         cf_have_libdir=no
21062                         if test -n "$LDFLAGS$LIBS" ; then
21063                                 # a loop is needed to ensure we can add subdirs of existing dirs
21064                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21065                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21066                                                 cf_have_libdir=yes; break
21067                                         fi
21068                                 done
21069                         fi
21070                         if test "$cf_have_libdir" = no ; then
21071                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21072
21073 echo "${as_me:-configure}:21073: testing adding $cf_add_libdir to library-path ..." 1>&5
21074
21075                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21076                         fi
21077                 fi
21078         done
21079 fi
21080
21081                         ;;
21082                 esac
21083         done
21084
21085                         ;;
21086                 esac
21087         fi
21088 esac
21089
21090 echo "$as_me:21090: checking for db.h" >&5
21091 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
21092 if test "${ac_cv_header_db_h+set}" = set; then
21093   echo $ECHO_N "(cached) $ECHO_C" >&6
21094 else
21095   cat >conftest.$ac_ext <<_ACEOF
21096 #line 21096 "configure"
21097 #include "confdefs.h"
21098 #include <db.h>
21099 _ACEOF
21100 if { (eval echo "$as_me:21100: \"$ac_cpp conftest.$ac_ext\"") >&5
21101   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21102   ac_status=$?
21103   egrep -v '^ *\+' conftest.er1 >conftest.err
21104   rm -f conftest.er1
21105   cat conftest.err >&5
21106   echo "$as_me:21106: \$? = $ac_status" >&5
21107   (exit $ac_status); } >/dev/null; then
21108   if test -s conftest.err; then
21109     ac_cpp_err=$ac_c_preproc_warn_flag
21110   else
21111     ac_cpp_err=
21112   fi
21113 else
21114   ac_cpp_err=yes
21115 fi
21116 if test -z "$ac_cpp_err"; then
21117   ac_cv_header_db_h=yes
21118 else
21119   echo "$as_me: failed program was:" >&5
21120   cat conftest.$ac_ext >&5
21121   ac_cv_header_db_h=no
21122 fi
21123 rm -f conftest.err conftest.$ac_ext
21124 fi
21125 echo "$as_me:21125: result: $ac_cv_header_db_h" >&5
21126 echo "${ECHO_T}$ac_cv_header_db_h" >&6
21127 if test $ac_cv_header_db_h = yes; then
21128
21129 echo "$as_me:21129: checking for version of db" >&5
21130 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
21131 if test "${cf_cv_hashed_db_version+set}" = set; then
21132   echo $ECHO_N "(cached) $ECHO_C" >&6
21133 else
21134
21135 cf_cv_hashed_db_version=unknown
21136
21137 for cf_db_version in 1 2 3 4 5 6
21138 do
21139
21140 echo "${as_me:-configure}:21140: testing checking for db version $cf_db_version ..." 1>&5
21141
21142         cat >conftest.$ac_ext <<_ACEOF
21143 #line 21143 "configure"
21144 #include "confdefs.h"
21145
21146 $ac_includes_default
21147 #include <db.h>
21148
21149 #ifdef DB_VERSION_MAJOR
21150         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
21151 #if $cf_db_version == DB_VERSION_MAJOR
21152         /* ok */
21153 #else
21154         make an error
21155 #endif
21156 #else
21157 #if $cf_db_version == 1
21158         /* ok: assuming this is DB 1.8.5 */
21159 #else
21160         make an error
21161 #endif
21162 #endif
21163
21164 int
21165 main (void)
21166 {
21167 DBT *foo = 0
21168   ;
21169   return 0;
21170 }
21171 _ACEOF
21172 rm -f conftest.$ac_objext
21173 if { (eval echo "$as_me:21173: \"$ac_compile\"") >&5
21174   (eval $ac_compile) 2>&5
21175   ac_status=$?
21176   echo "$as_me:21176: \$? = $ac_status" >&5
21177   (exit $ac_status); } &&
21178          { ac_try='test -s conftest.$ac_objext'
21179   { (eval echo "$as_me:21179: \"$ac_try\"") >&5
21180   (eval $ac_try) 2>&5
21181   ac_status=$?
21182   echo "$as_me:21182: \$? = $ac_status" >&5
21183   (exit $ac_status); }; }; then
21184
21185         cf_cv_hashed_db_version=$cf_db_version
21186         break
21187
21188 else
21189   echo "$as_me: failed program was:" >&5
21190 cat conftest.$ac_ext >&5
21191 fi
21192 rm -f conftest.$ac_objext conftest.$ac_ext
21193 done
21194
21195 fi
21196 echo "$as_me:21196: result: $cf_cv_hashed_db_version" >&5
21197 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
21198
21199 if test "$cf_cv_hashed_db_version" = unknown ; then
21200         { { echo "$as_me:21200: error: Cannot determine version of db" >&5
21201 echo "$as_me: error: Cannot determine version of db" >&2;}
21202    { (exit 1); exit 1; }; }
21203 else
21204
21205 echo "$as_me:21205: checking for db libraries" >&5
21206 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
21207 if test "${cf_cv_hashed_db_libs+set}" = set; then
21208   echo $ECHO_N "(cached) $ECHO_C" >&6
21209 else
21210
21211 cf_cv_hashed_db_libs=unknown
21212 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
21213 do
21214         cf_save_libs="$LIBS"
21215         if test -n "$cf_db_libs"; then
21216
21217 cf_add_libs="-l$cf_db_libs"
21218 # Filter out duplicates - this happens with badly-designed ".pc" files...
21219 for cf_add_1lib in $LIBS
21220 do
21221         for cf_add_2lib in $cf_add_libs
21222         do
21223                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21224                 then
21225                         cf_add_1lib=
21226                         break
21227                 fi
21228         done
21229         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21230 done
21231 LIBS="$cf_add_libs"
21232
21233         fi
21234
21235 echo "${as_me:-configure}:21235: testing checking for library "$cf_db_libs" ..." 1>&5
21236
21237         cat >conftest.$ac_ext <<_ACEOF
21238 #line 21238 "configure"
21239 #include "confdefs.h"
21240
21241 $ac_includes_default
21242 #include <db.h>
21243
21244 int
21245 main (void)
21246 {
21247
21248         char *path = "/tmp/foo";
21249 #ifdef DB_VERSION_MAJOR
21250 #if DB_VERSION_MAJOR >= 4
21251         DB *result = 0;
21252         db_create(&result, NULL, 0);
21253         result->open(result,
21254                 NULL,
21255                 path,
21256                 path,
21257                 DB_HASH,
21258                 DB_CREATE,
21259                 0644);
21260 #elif DB_VERSION_MAJOR >= 3
21261         DB *result = 0;
21262         db_create(&result, NULL, 0);
21263         result->open(result,
21264                 path,
21265                 path,
21266                 DB_HASH,
21267                 DB_CREATE,
21268                 0644);
21269 #elif DB_VERSION_MAJOR >= 2
21270         DB *result = 0;
21271         db_open(path,
21272                 DB_HASH,
21273                 DB_CREATE,
21274                 0644,
21275                 (DB_ENV *) 0,
21276                 (DB_INFO *) 0,
21277                 &result);
21278 #endif /* DB_VERSION_MAJOR */
21279 #else
21280         DB *result = dbopen(path,
21281                      2,
21282                      0644,
21283                      DB_HASH,
21284                      0);
21285 #endif
21286         ${cf_cv_main_return:-return}(result != 0)
21287
21288   ;
21289   return 0;
21290 }
21291 _ACEOF
21292 rm -f conftest.$ac_objext conftest$ac_exeext
21293 if { (eval echo "$as_me:21293: \"$ac_link\"") >&5
21294   (eval $ac_link) 2>&5
21295   ac_status=$?
21296   echo "$as_me:21296: \$? = $ac_status" >&5
21297   (exit $ac_status); } &&
21298          { ac_try='test -s conftest$ac_exeext'
21299   { (eval echo "$as_me:21299: \"$ac_try\"") >&5
21300   (eval $ac_try) 2>&5
21301   ac_status=$?
21302   echo "$as_me:21302: \$? = $ac_status" >&5
21303   (exit $ac_status); }; }; then
21304
21305         if test -n "$cf_db_libs" ; then
21306                 cf_cv_hashed_db_libs=$cf_db_libs
21307         else
21308                 cf_cv_hashed_db_libs=default
21309         fi
21310         LIBS="$cf_save_libs"
21311         break
21312
21313 else
21314   echo "$as_me: failed program was:" >&5
21315 cat conftest.$ac_ext >&5
21316 fi
21317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21318         LIBS="$cf_save_libs"
21319 done
21320
21321 fi
21322 echo "$as_me:21322: result: $cf_cv_hashed_db_libs" >&5
21323 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
21324
21325         if test "$cf_cv_hashed_db_libs" = unknown ; then
21326                 { { echo "$as_me:21326: error: Cannot determine library for db" >&5
21327 echo "$as_me: error: Cannot determine library for db" >&2;}
21328    { (exit 1); exit 1; }; }
21329         elif test "$cf_cv_hashed_db_libs" != default ; then
21330
21331 cf_add_libs="-l$cf_cv_hashed_db_libs"
21332 # Filter out duplicates - this happens with badly-designed ".pc" files...
21333 for cf_add_1lib in $LIBS
21334 do
21335         for cf_add_2lib in $cf_add_libs
21336         do
21337                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21338                 then
21339                         cf_add_1lib=
21340                         break
21341                 fi
21342         done
21343         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21344 done
21345 LIBS="$cf_add_libs"
21346
21347         fi
21348 fi
21349
21350 else
21351
21352         { { echo "$as_me:21352: error: Cannot find db.h" >&5
21353 echo "$as_me: error: Cannot find db.h" >&2;}
21354    { (exit 1); exit 1; }; }
21355
21356 fi
21357
21358 fi
21359
21360 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
21361         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21362         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21363 fi
21364
21365 # Just in case, check if the C compiler has a bool type.
21366
21367 echo "$as_me:21367: checking if we should include stdbool.h" >&5
21368 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21369
21370 if test "${cf_cv_header_stdbool_h+set}" = set; then
21371   echo $ECHO_N "(cached) $ECHO_C" >&6
21372 else
21373
21374         cat >conftest.$ac_ext <<_ACEOF
21375 #line 21375 "configure"
21376 #include "confdefs.h"
21377
21378 int
21379 main (void)
21380 {
21381 bool foo = false
21382   ;
21383   return 0;
21384 }
21385 _ACEOF
21386 rm -f conftest.$ac_objext
21387 if { (eval echo "$as_me:21387: \"$ac_compile\"") >&5
21388   (eval $ac_compile) 2>&5
21389   ac_status=$?
21390   echo "$as_me:21390: \$? = $ac_status" >&5
21391   (exit $ac_status); } &&
21392          { ac_try='test -s conftest.$ac_objext'
21393   { (eval echo "$as_me:21393: \"$ac_try\"") >&5
21394   (eval $ac_try) 2>&5
21395   ac_status=$?
21396   echo "$as_me:21396: \$? = $ac_status" >&5
21397   (exit $ac_status); }; }; then
21398   cf_cv_header_stdbool_h=0
21399 else
21400   echo "$as_me: failed program was:" >&5
21401 cat conftest.$ac_ext >&5
21402 cat >conftest.$ac_ext <<_ACEOF
21403 #line 21403 "configure"
21404 #include "confdefs.h"
21405
21406 #ifndef __BEOS__
21407 #include <stdbool.h>
21408 #endif
21409
21410 int
21411 main (void)
21412 {
21413 bool foo = false
21414   ;
21415   return 0;
21416 }
21417 _ACEOF
21418 rm -f conftest.$ac_objext
21419 if { (eval echo "$as_me:21419: \"$ac_compile\"") >&5
21420   (eval $ac_compile) 2>&5
21421   ac_status=$?
21422   echo "$as_me:21422: \$? = $ac_status" >&5
21423   (exit $ac_status); } &&
21424          { ac_try='test -s conftest.$ac_objext'
21425   { (eval echo "$as_me:21425: \"$ac_try\"") >&5
21426   (eval $ac_try) 2>&5
21427   ac_status=$?
21428   echo "$as_me:21428: \$? = $ac_status" >&5
21429   (exit $ac_status); }; }; then
21430   cf_cv_header_stdbool_h=1
21431 else
21432   echo "$as_me: failed program was:" >&5
21433 cat conftest.$ac_ext >&5
21434 cf_cv_header_stdbool_h=0
21435 fi
21436 rm -f conftest.$ac_objext conftest.$ac_ext
21437 fi
21438 rm -f conftest.$ac_objext conftest.$ac_ext
21439 fi
21440
21441 if test "$cf_cv_header_stdbool_h" = 1
21442 then    echo "$as_me:21442: result: yes" >&5
21443 echo "${ECHO_T}yes" >&6
21444 else    echo "$as_me:21444: result: no" >&5
21445 echo "${ECHO_T}no" >&6
21446 fi
21447
21448 echo "$as_me:21448: checking for builtin bool type" >&5
21449 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21450
21451 if test "${cf_cv_cc_bool_type+set}" = set; then
21452   echo $ECHO_N "(cached) $ECHO_C" >&6
21453 else
21454
21455         cat >conftest.$ac_ext <<_ACEOF
21456 #line 21456 "configure"
21457 #include "confdefs.h"
21458
21459 #include <stdio.h>
21460 #include <sys/types.h>
21461
21462 int
21463 main (void)
21464 {
21465 bool x = false
21466   ;
21467   return 0;
21468 }
21469 _ACEOF
21470 rm -f conftest.$ac_objext
21471 if { (eval echo "$as_me:21471: \"$ac_compile\"") >&5
21472   (eval $ac_compile) 2>&5
21473   ac_status=$?
21474   echo "$as_me:21474: \$? = $ac_status" >&5
21475   (exit $ac_status); } &&
21476          { ac_try='test -s conftest.$ac_objext'
21477   { (eval echo "$as_me:21477: \"$ac_try\"") >&5
21478   (eval $ac_try) 2>&5
21479   ac_status=$?
21480   echo "$as_me:21480: \$? = $ac_status" >&5
21481   (exit $ac_status); }; }; then
21482   cf_cv_cc_bool_type=1
21483 else
21484   echo "$as_me: failed program was:" >&5
21485 cat conftest.$ac_ext >&5
21486 cf_cv_cc_bool_type=0
21487 fi
21488 rm -f conftest.$ac_objext conftest.$ac_ext
21489
21490 fi
21491
21492 if test "$cf_cv_cc_bool_type" = 1
21493 then    echo "$as_me:21493: result: yes" >&5
21494 echo "${ECHO_T}yes" >&6
21495 else    echo "$as_me:21495: result: no" >&5
21496 echo "${ECHO_T}no" >&6
21497 fi
21498
21499 # Check for C++ compiler characteristics (and ensure that it's there!)
21500 if test -n "$CXX" ; then
21501         ac_ext=cc
21502 ac_cpp='$CXXCPP $CPPFLAGS'
21503 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21504 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21505 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21506 ac_main_return=return
21507
21508 if test -n "$GXX" ; then
21509
21510         cf_save="$LIBS"
21511         LIBS="$LIBS $CXXLIBS"
21512         echo "$as_me:21512: checking if we already have C++ library" >&5
21513 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21514         cat >conftest.$ac_ext <<_ACEOF
21515 #line 21515 "configure"
21516 #include "confdefs.h"
21517
21518                         #include <iostream>
21519 int
21520 main (void)
21521 {
21522
21523                         std::cout << "Hello World!" << std::endl;
21524   ;
21525   return 0;
21526 }
21527 _ACEOF
21528 rm -f conftest.$ac_objext conftest$ac_exeext
21529 if { (eval echo "$as_me:21529: \"$ac_link\"") >&5
21530   (eval $ac_link) 2>&5
21531   ac_status=$?
21532   echo "$as_me:21532: \$? = $ac_status" >&5
21533   (exit $ac_status); } &&
21534          { ac_try='test -s conftest$ac_exeext'
21535   { (eval echo "$as_me:21535: \"$ac_try\"") >&5
21536   (eval $ac_try) 2>&5
21537   ac_status=$?
21538   echo "$as_me:21538: \$? = $ac_status" >&5
21539   (exit $ac_status); }; }; then
21540   cf_have_libstdcpp=yes
21541 else
21542   echo "$as_me: failed program was:" >&5
21543 cat conftest.$ac_ext >&5
21544 cf_have_libstdcpp=no
21545 fi
21546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21547         echo "$as_me:21547: result: $cf_have_libstdcpp" >&5
21548 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21549         LIBS="$cf_save"
21550
21551         if test $cf_have_libstdcpp != yes
21552         then
21553                 case $cf_cv_system_name in
21554                 (os2*)
21555                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21556                                 cf_stdcpp_libname=stdcpp
21557                         else
21558                                 cf_stdcpp_libname=stdc++
21559                         fi
21560                         ;;
21561                 (*)
21562                         cf_stdcpp_libname=stdc++
21563                         ;;
21564                 esac
21565
21566                 echo "$as_me:21566: checking for library $cf_stdcpp_libname" >&5
21567 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21568 if test "${cf_cv_libstdcpp+set}" = set; then
21569   echo $ECHO_N "(cached) $ECHO_C" >&6
21570 else
21571
21572                         cf_save="$LIBS"
21573                         LIBS="$LIBS $CXXLIBS"
21574
21575 cf_add_libs="-l$cf_stdcpp_libname"
21576 # Filter out duplicates - this happens with badly-designed ".pc" files...
21577 for cf_add_1lib in $LIBS
21578 do
21579         for cf_add_2lib in $cf_add_libs
21580         do
21581                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21582                 then
21583                         cf_add_1lib=
21584                         break
21585                 fi
21586         done
21587         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21588 done
21589 LIBS="$cf_add_libs"
21590
21591                 cat >conftest.$ac_ext <<_ACEOF
21592 #line 21592 "configure"
21593 #include "confdefs.h"
21594
21595                                 #include <iostream>
21596 int
21597 main (void)
21598 {
21599
21600                                 std::cout << "Hello World!" << std::endl;
21601   ;
21602   return 0;
21603 }
21604 _ACEOF
21605 rm -f conftest.$ac_objext conftest$ac_exeext
21606 if { (eval echo "$as_me:21606: \"$ac_link\"") >&5
21607   (eval $ac_link) 2>&5
21608   ac_status=$?
21609   echo "$as_me:21609: \$? = $ac_status" >&5
21610   (exit $ac_status); } &&
21611          { ac_try='test -s conftest$ac_exeext'
21612   { (eval echo "$as_me:21612: \"$ac_try\"") >&5
21613   (eval $ac_try) 2>&5
21614   ac_status=$?
21615   echo "$as_me:21615: \$? = $ac_status" >&5
21616   (exit $ac_status); }; }; then
21617   cf_cv_libstdcpp=yes
21618 else
21619   echo "$as_me: failed program was:" >&5
21620 cat conftest.$ac_ext >&5
21621 cf_cv_libstdcpp=no
21622 fi
21623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21624                         LIBS="$cf_save"
21625
21626 fi
21627 echo "$as_me:21627: result: $cf_cv_libstdcpp" >&5
21628 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
21629                 test "$cf_cv_libstdcpp" = yes && {
21630 cf_add_libs="-l$cf_stdcpp_libname"
21631 # Filter out duplicates - this happens with badly-designed ".pc" files...
21632 for cf_add_1lib in $CXXLIBS
21633 do
21634         for cf_add_2lib in $cf_add_libs
21635         do
21636                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21637                 then
21638                         cf_add_1lib=
21639                         break
21640                 fi
21641         done
21642         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21643 done
21644 CXXLIBS="$cf_add_libs"
21645  }
21646         fi
21647 fi
21648
21649         echo "$as_me:21649: checking whether $CXX understands -c and -o together" >&5
21650 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
21651 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
21652   echo $ECHO_N "(cached) $ECHO_C" >&6
21653 else
21654
21655 cat > conftest.$ac_ext <<CF_EOF
21656 int main(void)
21657 {
21658         ${cf_cv_main_return:-return}(0);
21659 }
21660 CF_EOF
21661 # We do the test twice because some compilers refuse to overwrite an
21662 # existing .o file with -o, though they will create one.
21663 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
21664 if { (eval echo "$as_me:21664: \"$ac_try\"") >&5
21665   (eval $ac_try) 2>&5
21666   ac_status=$?
21667   echo "$as_me:21667: \$? = $ac_status" >&5
21668   (exit $ac_status); } &&
21669   test -f conftest2.$ac_objext && { (eval echo "$as_me:21669: \"$ac_try\"") >&5
21670   (eval $ac_try) 2>&5
21671   ac_status=$?
21672   echo "$as_me:21672: \$? = $ac_status" >&5
21673   (exit $ac_status); };
21674 then
21675   eval cf_cv_prog_CXX_c_o=yes
21676 else
21677   eval cf_cv_prog_CXX_c_o=no
21678 fi
21679 rm -rf conftest*
21680
21681 fi
21682 if test $cf_cv_prog_CXX_c_o = yes; then
21683   echo "$as_me:21683: result: yes" >&5
21684 echo "${ECHO_T}yes" >&6
21685 else
21686   echo "$as_me:21686: result: no" >&5
21687 echo "${ECHO_T}no" >&6
21688 fi
21689
21690         case $GXX_VERSION in
21691         (1*|2.0-6*)
21692                 cf_cxx_library=yes
21693                 ;;
21694         (*-2.7*|2.7*)
21695
21696 cf_cxx_library=unknown
21697 case $cf_cv_system_name in
21698 (os2*)
21699         cf_gpp_libname=gpp
21700         ;;
21701 (*)
21702         cf_gpp_libname=g++
21703         ;;
21704 esac
21705 if test "$GXX" = yes; then
21706         echo "$as_me:21706: checking for lib$cf_gpp_libname" >&5
21707 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
21708         cf_save="$LIBS"
21709
21710 cf_add_libs="-l$cf_gpp_libname"
21711 # Filter out duplicates - this happens with badly-designed ".pc" files...
21712 for cf_add_1lib in $LIBS
21713 do
21714         for cf_add_2lib in $cf_add_libs
21715         do
21716                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21717                 then
21718                         cf_add_1lib=
21719                         break
21720                 fi
21721         done
21722         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21723 done
21724 LIBS="$cf_add_libs"
21725
21726         cat >conftest.$ac_ext <<_ACEOF
21727 #line 21727 "configure"
21728 #include "confdefs.h"
21729
21730 #include <$cf_gpp_libname/builtin.h>
21731
21732 int
21733 main (void)
21734 {
21735 two_arg_error_handler_t foo2 = lib_error_handler
21736   ;
21737   return 0;
21738 }
21739 _ACEOF
21740 rm -f conftest.$ac_objext conftest$ac_exeext
21741 if { (eval echo "$as_me:21741: \"$ac_link\"") >&5
21742   (eval $ac_link) 2>&5
21743   ac_status=$?
21744   echo "$as_me:21744: \$? = $ac_status" >&5
21745   (exit $ac_status); } &&
21746          { ac_try='test -s conftest$ac_exeext'
21747   { (eval echo "$as_me:21747: \"$ac_try\"") >&5
21748   (eval $ac_try) 2>&5
21749   ac_status=$?
21750   echo "$as_me:21750: \$? = $ac_status" >&5
21751   (exit $ac_status); }; }; then
21752   cf_cxx_library=yes
21753
21754 cf_add_libs="-l$cf_gpp_libname"
21755 # Filter out duplicates - this happens with badly-designed ".pc" files...
21756 for cf_add_1lib in $CXXLIBS
21757 do
21758         for cf_add_2lib in $cf_add_libs
21759         do
21760                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21761                 then
21762                         cf_add_1lib=
21763                         break
21764                 fi
21765         done
21766         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21767 done
21768 CXXLIBS="$cf_add_libs"
21769
21770          if test "$cf_gpp_libname" = cpp ; then
21771
21772 cat >>confdefs.h <<\EOF
21773 #define HAVE_GPP_BUILTIN_H 1
21774 EOF
21775
21776          else
21777
21778 cat >>confdefs.h <<\EOF
21779 #define HAVE_GXX_BUILTIN_H 1
21780 EOF
21781
21782          fi
21783 else
21784   echo "$as_me: failed program was:" >&5
21785 cat conftest.$ac_ext >&5
21786 cat >conftest.$ac_ext <<_ACEOF
21787 #line 21787 "configure"
21788 #include "confdefs.h"
21789
21790 #include <builtin.h>
21791
21792 int
21793 main (void)
21794 {
21795 two_arg_error_handler_t foo2 = lib_error_handler
21796   ;
21797   return 0;
21798 }
21799 _ACEOF
21800 rm -f conftest.$ac_objext conftest$ac_exeext
21801 if { (eval echo "$as_me:21801: \"$ac_link\"") >&5
21802   (eval $ac_link) 2>&5
21803   ac_status=$?
21804   echo "$as_me:21804: \$? = $ac_status" >&5
21805   (exit $ac_status); } &&
21806          { ac_try='test -s conftest$ac_exeext'
21807   { (eval echo "$as_me:21807: \"$ac_try\"") >&5
21808   (eval $ac_try) 2>&5
21809   ac_status=$?
21810   echo "$as_me:21810: \$? = $ac_status" >&5
21811   (exit $ac_status); }; }; then
21812   cf_cxx_library=yes
21813
21814 cf_add_libs="-l$cf_gpp_libname"
21815 # Filter out duplicates - this happens with badly-designed ".pc" files...
21816 for cf_add_1lib in $CXXLIBS
21817 do
21818         for cf_add_2lib in $cf_add_libs
21819         do
21820                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21821                 then
21822                         cf_add_1lib=
21823                         break
21824                 fi
21825         done
21826         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21827 done
21828 CXXLIBS="$cf_add_libs"
21829
21830 cat >>confdefs.h <<\EOF
21831 #define HAVE_BUILTIN_H 1
21832 EOF
21833
21834 else
21835   echo "$as_me: failed program was:" >&5
21836 cat conftest.$ac_ext >&5
21837 cf_cxx_library=no
21838 fi
21839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21840 fi
21841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21842         LIBS="$cf_save"
21843         echo "$as_me:21843: result: $cf_cxx_library" >&5
21844 echo "${ECHO_T}$cf_cxx_library" >&6
21845 fi
21846
21847                 ;;
21848         (*)
21849                 cf_cxx_library=no
21850                 ;;
21851         esac
21852
21853         ac_ext=cc
21854 ac_cpp='$CXXCPP $CPPFLAGS'
21855 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21856 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21857 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21858 ac_main_return=return
21859 echo "$as_me:21859: checking how to run the C++ preprocessor" >&5
21860 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
21861 if test -z "$CXXCPP"; then
21862   if test "${ac_cv_prog_CXXCPP+set}" = set; then
21863   echo $ECHO_N "(cached) $ECHO_C" >&6
21864 else
21865       # Double quotes because CXXCPP needs to be expanded
21866     for CXXCPP in "$CXX -E" "/lib/cpp"
21867     do
21868       ac_preproc_ok=false
21869 for ac_cxx_preproc_warn_flag in '' yes
21870 do
21871   # Use a header file that comes with gcc, so configuring glibc
21872   # with a fresh cross-compiler works.
21873   # On the NeXT, cc -E runs the code through the compiler's parser,
21874   # not just through cpp. "Syntax error" is here to catch this case.
21875   cat >conftest.$ac_ext <<_ACEOF
21876 #line 21876 "configure"
21877 #include "confdefs.h"
21878 #include <assert.h>
21879                      Syntax error
21880 _ACEOF
21881 if { (eval echo "$as_me:21881: \"$ac_cpp conftest.$ac_ext\"") >&5
21882   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21883   ac_status=$?
21884   egrep -v '^ *\+' conftest.er1 >conftest.err
21885   rm -f conftest.er1
21886   cat conftest.err >&5
21887   echo "$as_me:21887: \$? = $ac_status" >&5
21888   (exit $ac_status); } >/dev/null; then
21889   if test -s conftest.err; then
21890     ac_cpp_err=$ac_cxx_preproc_warn_flag
21891   else
21892     ac_cpp_err=
21893   fi
21894 else
21895   ac_cpp_err=yes
21896 fi
21897 if test -z "$ac_cpp_err"; then
21898   :
21899 else
21900   echo "$as_me: failed program was:" >&5
21901   cat conftest.$ac_ext >&5
21902   # Broken: fails on valid input.
21903 continue
21904 fi
21905 rm -f conftest.err conftest.$ac_ext
21906
21907   # OK, works on sane cases.  Now check whether non-existent headers
21908   # can be detected and how.
21909   cat >conftest.$ac_ext <<_ACEOF
21910 #line 21910 "configure"
21911 #include "confdefs.h"
21912 #include <ac_nonexistent.h>
21913 _ACEOF
21914 if { (eval echo "$as_me:21914: \"$ac_cpp conftest.$ac_ext\"") >&5
21915   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21916   ac_status=$?
21917   egrep -v '^ *\+' conftest.er1 >conftest.err
21918   rm -f conftest.er1
21919   cat conftest.err >&5
21920   echo "$as_me:21920: \$? = $ac_status" >&5
21921   (exit $ac_status); } >/dev/null; then
21922   if test -s conftest.err; then
21923     ac_cpp_err=$ac_cxx_preproc_warn_flag
21924   else
21925     ac_cpp_err=
21926   fi
21927 else
21928   ac_cpp_err=yes
21929 fi
21930 if test -z "$ac_cpp_err"; then
21931   # Broken: success on invalid input.
21932 continue
21933 else
21934   echo "$as_me: failed program was:" >&5
21935   cat conftest.$ac_ext >&5
21936   # Passes both tests.
21937 ac_preproc_ok=:
21938 break
21939 fi
21940 rm -f conftest.err conftest.$ac_ext
21941
21942 done
21943 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21944 rm -f conftest.err conftest.$ac_ext
21945 if $ac_preproc_ok; then
21946   break
21947 fi
21948
21949     done
21950     ac_cv_prog_CXXCPP=$CXXCPP
21951
21952 fi
21953   CXXCPP=$ac_cv_prog_CXXCPP
21954 else
21955   ac_cv_prog_CXXCPP=$CXXCPP
21956 fi
21957 echo "$as_me:21957: result: $CXXCPP" >&5
21958 echo "${ECHO_T}$CXXCPP" >&6
21959 ac_preproc_ok=false
21960 for ac_cxx_preproc_warn_flag in '' yes
21961 do
21962   # Use a header file that comes with gcc, so configuring glibc
21963   # with a fresh cross-compiler works.
21964   # On the NeXT, cc -E runs the code through the compiler's parser,
21965   # not just through cpp. "Syntax error" is here to catch this case.
21966   cat >conftest.$ac_ext <<_ACEOF
21967 #line 21967 "configure"
21968 #include "confdefs.h"
21969 #include <assert.h>
21970                      Syntax error
21971 _ACEOF
21972 if { (eval echo "$as_me:21972: \"$ac_cpp conftest.$ac_ext\"") >&5
21973   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21974   ac_status=$?
21975   egrep -v '^ *\+' conftest.er1 >conftest.err
21976   rm -f conftest.er1
21977   cat conftest.err >&5
21978   echo "$as_me:21978: \$? = $ac_status" >&5
21979   (exit $ac_status); } >/dev/null; then
21980   if test -s conftest.err; then
21981     ac_cpp_err=$ac_cxx_preproc_warn_flag
21982   else
21983     ac_cpp_err=
21984   fi
21985 else
21986   ac_cpp_err=yes
21987 fi
21988 if test -z "$ac_cpp_err"; then
21989   :
21990 else
21991   echo "$as_me: failed program was:" >&5
21992   cat conftest.$ac_ext >&5
21993   # Broken: fails on valid input.
21994 continue
21995 fi
21996 rm -f conftest.err conftest.$ac_ext
21997
21998   # OK, works on sane cases.  Now check whether non-existent headers
21999   # can be detected and how.
22000   cat >conftest.$ac_ext <<_ACEOF
22001 #line 22001 "configure"
22002 #include "confdefs.h"
22003 #include <ac_nonexistent.h>
22004 _ACEOF
22005 if { (eval echo "$as_me:22005: \"$ac_cpp conftest.$ac_ext\"") >&5
22006   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22007   ac_status=$?
22008   egrep -v '^ *\+' conftest.er1 >conftest.err
22009   rm -f conftest.er1
22010   cat conftest.err >&5
22011   echo "$as_me:22011: \$? = $ac_status" >&5
22012   (exit $ac_status); } >/dev/null; then
22013   if test -s conftest.err; then
22014     ac_cpp_err=$ac_cxx_preproc_warn_flag
22015   else
22016     ac_cpp_err=
22017   fi
22018 else
22019   ac_cpp_err=yes
22020 fi
22021 if test -z "$ac_cpp_err"; then
22022   # Broken: success on invalid input.
22023 continue
22024 else
22025   echo "$as_me: failed program was:" >&5
22026   cat conftest.$ac_ext >&5
22027   # Passes both tests.
22028 ac_preproc_ok=:
22029 break
22030 fi
22031 rm -f conftest.err conftest.$ac_ext
22032
22033 done
22034 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22035 rm -f conftest.err conftest.$ac_ext
22036 if $ac_preproc_ok; then
22037   :
22038 else
22039   { { echo "$as_me:22039: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
22040 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
22041    { (exit 1); exit 1; }; }
22042 fi
22043
22044 ac_ext=cc
22045 ac_cpp='$CXXCPP $CPPFLAGS'
22046 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22047 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22048 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22049 ac_main_return=return
22050
22051 for ac_header in typeinfo
22052 do
22053 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22054 echo "$as_me:22054: checking for $ac_header" >&5
22055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22057   echo $ECHO_N "(cached) $ECHO_C" >&6
22058 else
22059   cat >conftest.$ac_ext <<_ACEOF
22060 #line 22060 "configure"
22061 #include "confdefs.h"
22062 #include <$ac_header>
22063 _ACEOF
22064 if { (eval echo "$as_me:22064: \"$ac_cpp conftest.$ac_ext\"") >&5
22065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22066   ac_status=$?
22067   egrep -v '^ *\+' conftest.er1 >conftest.err
22068   rm -f conftest.er1
22069   cat conftest.err >&5
22070   echo "$as_me:22070: \$? = $ac_status" >&5
22071   (exit $ac_status); } >/dev/null; then
22072   if test -s conftest.err; then
22073     ac_cpp_err=$ac_cxx_preproc_warn_flag
22074   else
22075     ac_cpp_err=
22076   fi
22077 else
22078   ac_cpp_err=yes
22079 fi
22080 if test -z "$ac_cpp_err"; then
22081   eval "$as_ac_Header=yes"
22082 else
22083   echo "$as_me: failed program was:" >&5
22084   cat conftest.$ac_ext >&5
22085   eval "$as_ac_Header=no"
22086 fi
22087 rm -f conftest.err conftest.$ac_ext
22088 fi
22089 echo "$as_me:22089: result: `eval echo '${'$as_ac_Header'}'`" >&5
22090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22091 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22092   cat >>confdefs.h <<EOF
22093 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22094 EOF
22095
22096 fi
22097 done
22098
22099 for ac_header in iostream
22100 do
22101 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22102 echo "$as_me:22102: checking for $ac_header" >&5
22103 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22104 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22105   echo $ECHO_N "(cached) $ECHO_C" >&6
22106 else
22107   cat >conftest.$ac_ext <<_ACEOF
22108 #line 22108 "configure"
22109 #include "confdefs.h"
22110 #include <$ac_header>
22111 _ACEOF
22112 if { (eval echo "$as_me:22112: \"$ac_cpp conftest.$ac_ext\"") >&5
22113   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22114   ac_status=$?
22115   egrep -v '^ *\+' conftest.er1 >conftest.err
22116   rm -f conftest.er1
22117   cat conftest.err >&5
22118   echo "$as_me:22118: \$? = $ac_status" >&5
22119   (exit $ac_status); } >/dev/null; then
22120   if test -s conftest.err; then
22121     ac_cpp_err=$ac_cxx_preproc_warn_flag
22122   else
22123     ac_cpp_err=
22124   fi
22125 else
22126   ac_cpp_err=yes
22127 fi
22128 if test -z "$ac_cpp_err"; then
22129   eval "$as_ac_Header=yes"
22130 else
22131   echo "$as_me: failed program was:" >&5
22132   cat conftest.$ac_ext >&5
22133   eval "$as_ac_Header=no"
22134 fi
22135 rm -f conftest.err conftest.$ac_ext
22136 fi
22137 echo "$as_me:22137: result: `eval echo '${'$as_ac_Header'}'`" >&5
22138 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22139 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22140   cat >>confdefs.h <<EOF
22141 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22142 EOF
22143
22144 fi
22145 done
22146
22147 if test x"$ac_cv_header_iostream" = xyes ; then
22148         echo "$as_me:22148: checking if iostream uses std-namespace" >&5
22149 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
22150         cat >conftest.$ac_ext <<_ACEOF
22151 #line 22151 "configure"
22152 #include "confdefs.h"
22153
22154 #include <iostream>
22155 using std::endl;
22156 using std::cerr;
22157 int
22158 main (void)
22159 {
22160
22161 cerr << "testing" << endl;
22162
22163   ;
22164   return 0;
22165 }
22166 _ACEOF
22167 rm -f conftest.$ac_objext
22168 if { (eval echo "$as_me:22168: \"$ac_compile\"") >&5
22169   (eval $ac_compile) 2>&5
22170   ac_status=$?
22171   echo "$as_me:22171: \$? = $ac_status" >&5
22172   (exit $ac_status); } &&
22173          { ac_try='test -s conftest.$ac_objext'
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   cf_iostream_namespace=yes
22180 else
22181   echo "$as_me: failed program was:" >&5
22182 cat conftest.$ac_ext >&5
22183 cf_iostream_namespace=no
22184 fi
22185 rm -f conftest.$ac_objext conftest.$ac_ext
22186         echo "$as_me:22186: result: $cf_iostream_namespace" >&5
22187 echo "${ECHO_T}$cf_iostream_namespace" >&6
22188         if test "$cf_iostream_namespace" = yes ; then
22189
22190 cat >>confdefs.h <<\EOF
22191 #define IOSTREAM_NAMESPACE 1
22192 EOF
22193
22194         fi
22195 fi
22196
22197 echo "$as_me:22197: checking if we should include stdbool.h" >&5
22198 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22199
22200 if test "${cf_cv_header_stdbool_h+set}" = set; then
22201   echo $ECHO_N "(cached) $ECHO_C" >&6
22202 else
22203
22204         cat >conftest.$ac_ext <<_ACEOF
22205 #line 22205 "configure"
22206 #include "confdefs.h"
22207
22208 int
22209 main (void)
22210 {
22211 bool foo = false
22212   ;
22213   return 0;
22214 }
22215 _ACEOF
22216 rm -f conftest.$ac_objext
22217 if { (eval echo "$as_me:22217: \"$ac_compile\"") >&5
22218   (eval $ac_compile) 2>&5
22219   ac_status=$?
22220   echo "$as_me:22220: \$? = $ac_status" >&5
22221   (exit $ac_status); } &&
22222          { ac_try='test -s conftest.$ac_objext'
22223   { (eval echo "$as_me:22223: \"$ac_try\"") >&5
22224   (eval $ac_try) 2>&5
22225   ac_status=$?
22226   echo "$as_me:22226: \$? = $ac_status" >&5
22227   (exit $ac_status); }; }; then
22228   cf_cv_header_stdbool_h=0
22229 else
22230   echo "$as_me: failed program was:" >&5
22231 cat conftest.$ac_ext >&5
22232 cat >conftest.$ac_ext <<_ACEOF
22233 #line 22233 "configure"
22234 #include "confdefs.h"
22235
22236 #ifndef __BEOS__
22237 #include <stdbool.h>
22238 #endif
22239
22240 int
22241 main (void)
22242 {
22243 bool foo = false
22244   ;
22245   return 0;
22246 }
22247 _ACEOF
22248 rm -f conftest.$ac_objext
22249 if { (eval echo "$as_me:22249: \"$ac_compile\"") >&5
22250   (eval $ac_compile) 2>&5
22251   ac_status=$?
22252   echo "$as_me:22252: \$? = $ac_status" >&5
22253   (exit $ac_status); } &&
22254          { ac_try='test -s conftest.$ac_objext'
22255   { (eval echo "$as_me:22255: \"$ac_try\"") >&5
22256   (eval $ac_try) 2>&5
22257   ac_status=$?
22258   echo "$as_me:22258: \$? = $ac_status" >&5
22259   (exit $ac_status); }; }; then
22260   cf_cv_header_stdbool_h=1
22261 else
22262   echo "$as_me: failed program was:" >&5
22263 cat conftest.$ac_ext >&5
22264 cf_cv_header_stdbool_h=0
22265 fi
22266 rm -f conftest.$ac_objext conftest.$ac_ext
22267 fi
22268 rm -f conftest.$ac_objext conftest.$ac_ext
22269 fi
22270
22271 if test "$cf_cv_header_stdbool_h" = 1
22272 then    echo "$as_me:22272: result: yes" >&5
22273 echo "${ECHO_T}yes" >&6
22274 else    echo "$as_me:22274: result: no" >&5
22275 echo "${ECHO_T}no" >&6
22276 fi
22277
22278 echo "$as_me:22278: checking for builtin bool type" >&5
22279 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22280
22281 if test "${cf_cv_builtin_bool+set}" = set; then
22282   echo $ECHO_N "(cached) $ECHO_C" >&6
22283 else
22284
22285         cat >conftest.$ac_ext <<_ACEOF
22286 #line 22286 "configure"
22287 #include "confdefs.h"
22288
22289 #include <stdio.h>
22290 #include <sys/types.h>
22291
22292 int
22293 main (void)
22294 {
22295 bool x = false
22296   ;
22297   return 0;
22298 }
22299 _ACEOF
22300 rm -f conftest.$ac_objext
22301 if { (eval echo "$as_me:22301: \"$ac_compile\"") >&5
22302   (eval $ac_compile) 2>&5
22303   ac_status=$?
22304   echo "$as_me:22304: \$? = $ac_status" >&5
22305   (exit $ac_status); } &&
22306          { ac_try='test -s conftest.$ac_objext'
22307   { (eval echo "$as_me:22307: \"$ac_try\"") >&5
22308   (eval $ac_try) 2>&5
22309   ac_status=$?
22310   echo "$as_me:22310: \$? = $ac_status" >&5
22311   (exit $ac_status); }; }; then
22312   cf_cv_builtin_bool=1
22313 else
22314   echo "$as_me: failed program was:" >&5
22315 cat conftest.$ac_ext >&5
22316 cf_cv_builtin_bool=0
22317 fi
22318 rm -f conftest.$ac_objext conftest.$ac_ext
22319
22320 fi
22321
22322 if test "$cf_cv_builtin_bool" = 1
22323 then    echo "$as_me:22323: result: yes" >&5
22324 echo "${ECHO_T}yes" >&6
22325 else    echo "$as_me:22325: result: no" >&5
22326 echo "${ECHO_T}no" >&6
22327 fi
22328
22329 echo "$as_me:22329: checking for size of bool" >&5
22330 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22331 if test "${cf_cv_type_of_bool+set}" = set; then
22332   echo $ECHO_N "(cached) $ECHO_C" >&6
22333 else
22334
22335         rm -f cf_test.out
22336         if test "$cross_compiling" = yes; then
22337   cf_cv_type_of_bool=unknown
22338 else
22339   cat >conftest.$ac_ext <<_ACEOF
22340 #line 22340 "configure"
22341 #include "confdefs.h"
22342
22343 #include <stdlib.h>
22344 #include <stdio.h>
22345
22346 #if defined(__cplusplus)
22347
22348 #ifdef HAVE_GXX_BUILTIN_H
22349 #include <g++/builtin.h>
22350 #elif HAVE_GPP_BUILTIN_H
22351 #include <gpp/builtin.h>
22352 #elif HAVE_BUILTIN_H
22353 #include <builtin.h>
22354 #endif
22355
22356 #else
22357
22358 #if $cf_cv_header_stdbool_h
22359 #include <stdbool.h>
22360 #endif
22361
22362 #endif
22363
22364 int main(void)
22365 {
22366         FILE *fp = fopen("cf_test.out", "w");
22367         if (fp != 0) {
22368                 bool x = true;
22369                 if ((bool)(-x) >= 0)
22370                         fputs("unsigned ", fp);
22371                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22372                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22373                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22374                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22375                 fclose(fp);
22376         }
22377         ${cf_cv_main_return:-return}(0);
22378 }
22379
22380 _ACEOF
22381 rm -f conftest$ac_exeext
22382 if { (eval echo "$as_me:22382: \"$ac_link\"") >&5
22383   (eval $ac_link) 2>&5
22384   ac_status=$?
22385   echo "$as_me:22385: \$? = $ac_status" >&5
22386   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22387   { (eval echo "$as_me:22387: \"$ac_try\"") >&5
22388   (eval $ac_try) 2>&5
22389   ac_status=$?
22390   echo "$as_me:22390: \$? = $ac_status" >&5
22391   (exit $ac_status); }; }; then
22392   cf_cv_type_of_bool=`cat cf_test.out`
22393                  if test -z "$cf_cv_type_of_bool"; then
22394                    cf_cv_type_of_bool=unknown
22395                  fi
22396 else
22397   echo "$as_me: program exited with status $ac_status" >&5
22398 echo "$as_me: failed program was:" >&5
22399 cat conftest.$ac_ext >&5
22400 cf_cv_type_of_bool=unknown
22401 fi
22402 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22403 fi
22404
22405 fi
22406
22407         rm -f cf_test.out
22408 echo "$as_me:22408: result: $cf_cv_type_of_bool" >&5
22409 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22410 if test "$cf_cv_type_of_bool" = unknown ; then
22411         case .$NCURSES_BOOL in
22412         (.auto|.) NCURSES_BOOL=unsigned;;
22413         esac
22414         { echo "$as_me:22414: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22415 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22416         cf_cv_type_of_bool=$NCURSES_BOOL
22417 fi
22418
22419 echo "$as_me:22419: checking for special defines needed for etip.h" >&5
22420 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
22421 cf_save_CXXFLAGS="$CXXFLAGS"
22422 cf_result="none"
22423
22424 # etip.h includes ncurses.h which includes ncurses_dll.h
22425 # But ncurses_dll.h is generated - fix here.
22426 test -d include || mkdir include
22427 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
22428
22429 for cf_math in "" MATH_H
22430 do
22431 for cf_excp in "" MATH_EXCEPTION
22432 do
22433         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
22434         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
22435         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
22436 cat >conftest.$ac_ext <<_ACEOF
22437 #line 22437 "configure"
22438 #include "confdefs.h"
22439
22440 #include <etip.h.in>
22441
22442 int
22443 main (void)
22444 {
22445
22446   ;
22447   return 0;
22448 }
22449 _ACEOF
22450 rm -f conftest.$ac_objext
22451 if { (eval echo "$as_me:22451: \"$ac_compile\"") >&5
22452   (eval $ac_compile) 2>&5
22453   ac_status=$?
22454   echo "$as_me:22454: \$? = $ac_status" >&5
22455   (exit $ac_status); } &&
22456          { ac_try='test -s conftest.$ac_objext'
22457   { (eval echo "$as_me:22457: \"$ac_try\"") >&5
22458   (eval $ac_try) 2>&5
22459   ac_status=$?
22460   echo "$as_me:22460: \$? = $ac_status" >&5
22461   (exit $ac_status); }; }; then
22462
22463         test -n "$cf_math" && cat >>confdefs.h <<EOF
22464 #define ETIP_NEEDS_${cf_math} 1
22465 EOF
22466
22467         test -n "$cf_excp" && cat >>confdefs.h <<EOF
22468 #define ETIP_NEEDS_${cf_excp} 1
22469 EOF
22470
22471         cf_result="$cf_math $cf_excp"
22472         break 2
22473
22474 else
22475   echo "$as_me: failed program was:" >&5
22476 cat conftest.$ac_ext >&5
22477 fi
22478 rm -f conftest.$ac_objext conftest.$ac_ext
22479 done
22480 done
22481 echo "$as_me:22481: result: $cf_result" >&5
22482 echo "${ECHO_T}$cf_result" >&6
22483 CXXFLAGS="$cf_save_CXXFLAGS"
22484
22485 if test -n "$CXX"; then
22486 echo "$as_me:22486: checking if $CXX accepts parameter initialization" >&5
22487 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
22488 if test "${cf_cv_cpp_param_init+set}" = set; then
22489   echo $ECHO_N "(cached) $ECHO_C" >&6
22490 else
22491
22492         ac_ext=cc
22493 ac_cpp='$CXXCPP $CPPFLAGS'
22494 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22495 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22496 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22497 ac_main_return=return
22498
22499         if test "$cross_compiling" = yes; then
22500   cf_cv_cpp_param_init=unknown
22501 else
22502   cat >conftest.$ac_ext <<_ACEOF
22503 #line 22503 "configure"
22504 #include "confdefs.h"
22505
22506 class TEST {
22507 private:
22508         int value;
22509 public:
22510         TEST(int x = 1);
22511         ~TEST();
22512 };
22513
22514 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22515 {
22516         value = x;
22517 }
22518 int main(void) { }
22519
22520 _ACEOF
22521 rm -f conftest$ac_exeext
22522 if { (eval echo "$as_me:22522: \"$ac_link\"") >&5
22523   (eval $ac_link) 2>&5
22524   ac_status=$?
22525   echo "$as_me:22525: \$? = $ac_status" >&5
22526   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22527   { (eval echo "$as_me:22527: \"$ac_try\"") >&5
22528   (eval $ac_try) 2>&5
22529   ac_status=$?
22530   echo "$as_me:22530: \$? = $ac_status" >&5
22531   (exit $ac_status); }; }; then
22532   cf_cv_cpp_param_init=yes
22533 else
22534   echo "$as_me: program exited with status $ac_status" >&5
22535 echo "$as_me: failed program was:" >&5
22536 cat conftest.$ac_ext >&5
22537 cf_cv_cpp_param_init=no
22538 fi
22539 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22540 fi
22541         ac_ext=cc
22542 ac_cpp='$CXXCPP $CPPFLAGS'
22543 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22544 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22545 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22546 ac_main_return=return
22547
22548 fi
22549 echo "$as_me:22549: result: $cf_cv_cpp_param_init" >&5
22550 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22551 fi
22552 test "$cf_cv_cpp_param_init" = yes &&
22553 cat >>confdefs.h <<\EOF
22554 #define CPP_HAS_PARAM_INIT 1
22555 EOF
22556
22557 if test -n "$CXX"; then
22558
22559 echo "$as_me:22559: checking if $CXX accepts static_cast" >&5
22560 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22561 if test "${cf_cv_cpp_static_cast+set}" = set; then
22562   echo $ECHO_N "(cached) $ECHO_C" >&6
22563 else
22564
22565         ac_ext=cc
22566 ac_cpp='$CXXCPP $CPPFLAGS'
22567 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22568 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22569 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22570 ac_main_return=return
22571
22572         cat >conftest.$ac_ext <<_ACEOF
22573 #line 22573 "configure"
22574 #include "confdefs.h"
22575
22576 class NCursesPanel
22577 {
22578 public:
22579   NCursesPanel(int nlines,
22580                int ncols,
22581                int begin_y = 0,
22582                int begin_x = 0)
22583   {
22584   }
22585   NCursesPanel();
22586   ~NCursesPanel();
22587 };
22588
22589 template<class T> class NCursesUserPanel : public NCursesPanel
22590 {
22591 public:
22592   NCursesUserPanel (int nlines,
22593                     int ncols,
22594                     int begin_y = 0,
22595                     int begin_x = 0,
22596                     const T* p_UserData = static_cast<T*>(0))
22597     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22598   {
22599   };
22600   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22601   {
22602   };
22603
22604   virtual ~NCursesUserPanel() {};
22605 };
22606
22607 int
22608 main (void)
22609 {
22610
22611         const char* p_UserData = static_cast<char*>(0)
22612   ;
22613   return 0;
22614 }
22615 _ACEOF
22616 rm -f conftest.$ac_objext
22617 if { (eval echo "$as_me:22617: \"$ac_compile\"") >&5
22618   (eval $ac_compile) 2>&5
22619   ac_status=$?
22620   echo "$as_me:22620: \$? = $ac_status" >&5
22621   (exit $ac_status); } &&
22622          { ac_try='test -s conftest.$ac_objext'
22623   { (eval echo "$as_me:22623: \"$ac_try\"") >&5
22624   (eval $ac_try) 2>&5
22625   ac_status=$?
22626   echo "$as_me:22626: \$? = $ac_status" >&5
22627   (exit $ac_status); }; }; then
22628   cf_cv_cpp_static_cast=yes
22629 else
22630   echo "$as_me: failed program was:" >&5
22631 cat conftest.$ac_ext >&5
22632 cf_cv_cpp_static_cast=no
22633 fi
22634 rm -f conftest.$ac_objext conftest.$ac_ext
22635
22636         ac_ext=cc
22637 ac_cpp='$CXXCPP $CPPFLAGS'
22638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22641 ac_main_return=return
22642
22643 fi
22644 echo "$as_me:22644: result: $cf_cv_cpp_static_cast" >&5
22645 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
22646
22647 fi
22648
22649 test "$cf_cv_cpp_static_cast" = yes &&
22650 cat >>confdefs.h <<\EOF
22651 #define CPP_HAS_STATIC_CAST 1
22652 EOF
22653
22654         CXX_AR='$(AR)'
22655         CXX_ARFLAGS='$(ARFLAGS)'
22656         case $cf_cv_system_name in
22657         (irix*)
22658             if test "$GXX" != yes ; then
22659                 CXX_AR='$(CXX)'
22660                 CXX_ARFLAGS='-ar -o'
22661             fi
22662             ;;
22663         (sco3.2v5*)
22664             CXXLDFLAGS="-u main"
22665             ;;
22666         (solaris2*)
22667             if test "$GXX" != yes ; then
22668                 CXX_AR='$(CXX)'
22669                 CXX_ARFLAGS='-xar -o'
22670             fi
22671             ;;
22672         esac
22673
22674 else
22675         cf_cxx_library=no
22676         cf_cv_builtin_bool=1
22677
22678         # Just because we are not configuring against C++ right now does not
22679         # mean that a user will not want to use C++.  Some distributors disable
22680         # the C++ portion of this configuration as a shortcut (or just to avoid
22681         # compiling the demo in the c++ directory).  So we need a reasonable
22682         # default for the 'bool' type.
22683         #
22684         # Caveat: since the storage of the bool type is not standardized, it
22685         # may change.
22686
22687         if test "$NCURSES_BOOL" != auto ; then
22688                 cf_cv_type_of_bool=$NCURSES_BOOL
22689                 cf_cv_header_stdbool_h=0
22690         else
22691                 if test "$cf_cv_header_stdbool_h" = 1 ; then
22692
22693 echo "$as_me:22693: checking for size of bool" >&5
22694 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22695 if test "${cf_cv_type_of_bool+set}" = set; then
22696   echo $ECHO_N "(cached) $ECHO_C" >&6
22697 else
22698
22699         rm -f cf_test.out
22700         if test "$cross_compiling" = yes; then
22701   cf_cv_type_of_bool=unknown
22702 else
22703   cat >conftest.$ac_ext <<_ACEOF
22704 #line 22704 "configure"
22705 #include "confdefs.h"
22706
22707 #include <stdlib.h>
22708 #include <stdio.h>
22709
22710 #if defined(__cplusplus)
22711
22712 #ifdef HAVE_GXX_BUILTIN_H
22713 #include <g++/builtin.h>
22714 #elif HAVE_GPP_BUILTIN_H
22715 #include <gpp/builtin.h>
22716 #elif HAVE_BUILTIN_H
22717 #include <builtin.h>
22718 #endif
22719
22720 #else
22721
22722 #if $cf_cv_header_stdbool_h
22723 #include <stdbool.h>
22724 #endif
22725
22726 #endif
22727
22728 int main(void)
22729 {
22730         FILE *fp = fopen("cf_test.out", "w");
22731         if (fp != 0) {
22732                 bool x = true;
22733                 if ((bool)(-x) >= 0)
22734                         fputs("unsigned ", fp);
22735                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22736                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22737                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22738                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22739                 fclose(fp);
22740         }
22741         ${cf_cv_main_return:-return}(0);
22742 }
22743
22744 _ACEOF
22745 rm -f conftest$ac_exeext
22746 if { (eval echo "$as_me:22746: \"$ac_link\"") >&5
22747   (eval $ac_link) 2>&5
22748   ac_status=$?
22749   echo "$as_me:22749: \$? = $ac_status" >&5
22750   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22751   { (eval echo "$as_me:22751: \"$ac_try\"") >&5
22752   (eval $ac_try) 2>&5
22753   ac_status=$?
22754   echo "$as_me:22754: \$? = $ac_status" >&5
22755   (exit $ac_status); }; }; then
22756   cf_cv_type_of_bool=`cat cf_test.out`
22757                  if test -z "$cf_cv_type_of_bool"; then
22758                    cf_cv_type_of_bool=unknown
22759                  fi
22760 else
22761   echo "$as_me: program exited with status $ac_status" >&5
22762 echo "$as_me: failed program was:" >&5
22763 cat conftest.$ac_ext >&5
22764 cf_cv_type_of_bool=unknown
22765 fi
22766 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22767 fi
22768
22769 fi
22770
22771         rm -f cf_test.out
22772 echo "$as_me:22772: result: $cf_cv_type_of_bool" >&5
22773 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22774 if test "$cf_cv_type_of_bool" = unknown ; then
22775         case .$NCURSES_BOOL in
22776         (.auto|.) NCURSES_BOOL=unsigned;;
22777         esac
22778         { echo "$as_me:22778: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22779 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22780         cf_cv_type_of_bool=$NCURSES_BOOL
22781 fi
22782
22783                 else
22784                         echo "$as_me:22784: checking for fallback type of bool" >&5
22785 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
22786                         case "$host_cpu" in
22787                         (i?86)  cf_cv_type_of_bool=char ;;
22788                         (*)     cf_cv_type_of_bool=int  ;;
22789                         esac
22790                         echo "$as_me:22790: result: $cf_cv_type_of_bool" >&5
22791 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22792                 fi
22793         fi
22794 fi
22795
22796 # If the C compiler did not declare bool, and we did not determine that the C++
22797 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
22798 # ncurses library use the same type as C++ bool.  Note that this allows one to
22799 # specify the type of bool in a configure-script option and postpone
22800 # integration with the C++ compiler provided that the types are compatible.
22801 USE_CXX_BOOL=1
22802 if test $cf_cv_cc_bool_type = 1
22803 then
22804         # oops: C has a bool.  Unlikely, but C++ could differ.
22805         USE_CXX_BOOL=0
22806 elif test $cf_cv_builtin_bool = 0
22807 then
22808         # C++ has no bool
22809         USE_CXX_BOOL=0
22810 else
22811         # this is the normal case
22812         USE_CXX_BOOL='defined(__cplusplus)'
22813 fi
22814
22815 if test -f "${srcdir}/Ada95/Makefile.in" ; then
22816
22817         if test "$cf_with_ada" != "no" ; then
22818                 if test "$with_libtool" != "no"; then
22819                         { echo "$as_me:22819: WARNING: libtool does not support Ada - disabling feature" >&5
22820 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
22821                         cf_with_ada=no
22822                 fi
22823         fi
22824
22825         if test "$cf_with_ada" != "no" ; then
22826
22827 cf_ada_make=gnatmake
22828 cf_ada_config="#"
22829 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
22830 set dummy $cf_ada_make; ac_word=$2
22831 echo "$as_me:22831: checking for $ac_word" >&5
22832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22833 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
22834   echo $ECHO_N "(cached) $ECHO_C" >&6
22835 else
22836   if test -n "$gnatmake_exists"; then
22837   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
22838 else
22839   ac_save_IFS=$IFS; IFS=$ac_path_separator
22840 ac_dummy="$PATH"
22841 for ac_dir in $ac_dummy; do
22842   IFS=$ac_save_IFS
22843   test -z "$ac_dir" && ac_dir=.
22844   $as_executable_p "$ac_dir/$ac_word" || continue
22845 ac_cv_prog_gnatmake_exists="yes"
22846 echo "$as_me:22846: found $ac_dir/$ac_word" >&5
22847 break
22848 done
22849
22850   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
22851 fi
22852 fi
22853 gnatmake_exists=$ac_cv_prog_gnatmake_exists
22854 if test -n "$gnatmake_exists"; then
22855   echo "$as_me:22855: result: $gnatmake_exists" >&5
22856 echo "${ECHO_T}$gnatmake_exists" >&6
22857 else
22858   echo "$as_me:22858: result: no" >&5
22859 echo "${ECHO_T}no" >&6
22860 fi
22861
22862 if test "$ac_cv_prog_gnatmake_exists" = no; then
22863         cf_ada_make=
22864         cf_cv_prog_gnat_correct=no
22865 else
22866         # Extract the first word of "gprconfig", so it can be a program name with args.
22867 set dummy gprconfig; ac_word=$2
22868 echo "$as_me:22868: checking for $ac_word" >&5
22869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22870 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
22871   echo $ECHO_N "(cached) $ECHO_C" >&6
22872 else
22873   if test -n "$gprconfig_exists"; then
22874   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
22875 else
22876   ac_save_IFS=$IFS; IFS=$ac_path_separator
22877 ac_dummy="$PATH"
22878 for ac_dir in $ac_dummy; do
22879   IFS=$ac_save_IFS
22880   test -z "$ac_dir" && ac_dir=.
22881   $as_executable_p "$ac_dir/$ac_word" || continue
22882 ac_cv_prog_gprconfig_exists="yes"
22883 echo "$as_me:22883: found $ac_dir/$ac_word" >&5
22884 break
22885 done
22886
22887   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
22888 fi
22889 fi
22890 gprconfig_exists=$ac_cv_prog_gprconfig_exists
22891 if test -n "$gprconfig_exists"; then
22892   echo "$as_me:22892: result: $gprconfig_exists" >&5
22893 echo "${ECHO_T}$gprconfig_exists" >&6
22894 else
22895   echo "$as_me:22895: result: no" >&5
22896 echo "${ECHO_T}no" >&6
22897 fi
22898
22899         if test "$ac_cv_prog_gprconfig_exists" = yes
22900         then
22901                 rm -rf conftest* *~conftest*
22902                 if mkdir conftest.src
22903                 then
22904                         cf_ada_config=""
22905                         cd conftest.src
22906                         for cf_gprconfig in Ada C
22907                         do
22908                                 echo "$as_me:22908: checking for gprconfig name for $cf_gprconfig" >&5
22909 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
22910                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
22911                                 if test -n "$cf_gprconfig_value"
22912                                 then
22913                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
22914                                         echo "$as_me:22914: result: $cf_gprconfig_value" >&5
22915 echo "${ECHO_T}$cf_gprconfig_value" >&6
22916                                 else
22917                                         echo "$as_me:22917: result: missing" >&5
22918 echo "${ECHO_T}missing" >&6
22919                                         cf_ada_config="#"
22920                                         break
22921                                 fi
22922                         done
22923                         cd ..
22924                         rm -rf conftest* *~conftest*
22925                 fi
22926         else
22927                 # gprconfig is newer than gnatmake; we can continue...
22928                 cf_ada_config="##"
22929         fi
22930         if test "x$cf_ada_config" != "x#"
22931         then
22932
22933 echo "$as_me:22933: checking for gnat version" >&5
22934 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
22935 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
22936         grep '[0-9].[0-9][0-9]*' |\
22937         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
22938 echo "$as_me:22938: result: $cf_gnat_version" >&5
22939 echo "${ECHO_T}$cf_gnat_version" >&6
22940
22941 case $cf_gnat_version in
22942 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
22943         cf_cv_prog_gnat_correct=yes
22944         ;;
22945 (*)
22946         { echo "$as_me:22946: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
22947 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
22948         cf_cv_prog_gnat_correct=no
22949         ;;
22950 esac
22951
22952                 # Extract the first word of "m4", so it can be a program name with args.
22953 set dummy m4; ac_word=$2
22954 echo "$as_me:22954: checking for $ac_word" >&5
22955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22956 if test "${ac_cv_prog_M4_exists+set}" = set; then
22957   echo $ECHO_N "(cached) $ECHO_C" >&6
22958 else
22959   if test -n "$M4_exists"; then
22960   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
22961 else
22962   ac_save_IFS=$IFS; IFS=$ac_path_separator
22963 ac_dummy="$PATH"
22964 for ac_dir in $ac_dummy; do
22965   IFS=$ac_save_IFS
22966   test -z "$ac_dir" && ac_dir=.
22967   $as_executable_p "$ac_dir/$ac_word" || continue
22968 ac_cv_prog_M4_exists="yes"
22969 echo "$as_me:22969: found $ac_dir/$ac_word" >&5
22970 break
22971 done
22972
22973   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
22974 fi
22975 fi
22976 M4_exists=$ac_cv_prog_M4_exists
22977 if test -n "$M4_exists"; then
22978   echo "$as_me:22978: result: $M4_exists" >&5
22979 echo "${ECHO_T}$M4_exists" >&6
22980 else
22981   echo "$as_me:22981: result: no" >&5
22982 echo "${ECHO_T}no" >&6
22983 fi
22984
22985                 if test "$ac_cv_prog_M4_exists" = no; then
22986                         cf_cv_prog_gnat_correct=no
22987                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
22988                 fi
22989                 if test "$cf_cv_prog_gnat_correct" = yes; then
22990                         echo "$as_me:22990: checking if GNAT works" >&5
22991 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
22992
22993 rm -rf conftest* *~conftest*
22994 cat >>conftest.ads <<CF_EOF
22995 procedure conftest;
22996 CF_EOF
22997 cat >>conftest.adb <<CF_EOF
22998 with Text_IO;
22999 with GNAT.OS_Lib;
23000 procedure conftest is
23001 begin
23002    Text_IO.Put ("Hello World");
23003    Text_IO.New_Line;
23004    GNAT.OS_Lib.OS_Exit (0);
23005 end conftest;
23006 CF_EOF
23007 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23008    if ( ./conftest 1>&5 2>&1 ) ; then
23009       cf_cv_prog_gnat_correct=yes
23010    else
23011       cf_cv_prog_gnat_correct=no
23012    fi
23013 else
23014    cf_cv_prog_gnat_correct=no
23015 fi
23016 rm -rf conftest* *~conftest*
23017
23018                         echo "$as_me:23018: result: $cf_cv_prog_gnat_correct" >&5
23019 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
23020                 fi
23021         else
23022                 cf_cv_prog_gnat_correct=no
23023         fi
23024 fi
23025
23026                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
23027
23028         ADAFLAGS="$ADAFLAGS -gnatpn"
23029
23030         echo "$as_me:23030: checking optimization options for ADAFLAGS" >&5
23031 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
23032         case "$CFLAGS" in
23033         (*-g*)
23034
23035         ADAFLAGS="$ADAFLAGS -g"
23036
23037                 ;;
23038         esac
23039         case "$CFLAGS" in
23040         (*-O*)
23041                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
23042
23043         ADAFLAGS="$ADAFLAGS $cf_O_flag"
23044
23045                 ;;
23046         esac
23047         echo "$as_me:23047: result: $ADAFLAGS" >&5
23048 echo "${ECHO_T}$ADAFLAGS" >&6
23049
23050 echo "$as_me:23050: checking if GNATPREP supports -T option" >&5
23051 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
23052 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
23053   echo $ECHO_N "(cached) $ECHO_C" >&6
23054 else
23055
23056 cf_cv_gnatprep_opt_t=no
23057 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
23058
23059 fi
23060 echo "$as_me:23060: result: $cf_cv_gnatprep_opt_t" >&5
23061 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
23062 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
23063
23064 echo "$as_me:23064: checking if GNAT supports generics" >&5
23065 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
23066 case $cf_gnat_version in
23067 (3.[1-9]*|[4-9].*)
23068         cf_gnat_generics=yes
23069         ;;
23070 (*)
23071         cf_gnat_generics=no
23072         ;;
23073 esac
23074 echo "$as_me:23074: result: $cf_gnat_generics" >&5
23075 echo "${ECHO_T}$cf_gnat_generics" >&6
23076
23077 if test "$cf_gnat_generics" = yes
23078 then
23079         cf_compile_generics=generics
23080         cf_generic_objects="\${GENOBJS}"
23081 else
23082         cf_compile_generics=
23083         cf_generic_objects=
23084 fi
23085
23086 echo "$as_me:23086: checking if GNAT supports SIGINT" >&5
23087 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
23088 if test "${cf_cv_gnat_sigint+set}" = set; then
23089   echo $ECHO_N "(cached) $ECHO_C" >&6
23090 else
23091
23092 rm -rf conftest* *~conftest*
23093 cat >>conftest.ads <<CF_EOF
23094 with Ada.Interrupts.Names;
23095
23096 package ConfTest is
23097
23098    pragma Warnings (Off);  --  the next pragma exists since 3.11p
23099    pragma Unreserve_All_Interrupts;
23100    pragma Warnings (On);
23101
23102    protected Process is
23103       procedure Stop;
23104       function Continue return Boolean;
23105       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
23106    private
23107       Done : Boolean := False;
23108    end Process;
23109
23110 end ConfTest;
23111 CF_EOF
23112 cat >>conftest.adb <<CF_EOF
23113 package body ConfTest is
23114    protected body Process is
23115       procedure Stop is
23116       begin
23117          Done := True;
23118       end Stop;
23119       function Continue return Boolean is
23120       begin
23121          return not Done;
23122       end Continue;
23123    end Process;
23124 end ConfTest;
23125 CF_EOF
23126 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23127       cf_cv_gnat_sigint=yes
23128 else
23129    cf_cv_gnat_sigint=no
23130 fi
23131 rm -rf conftest* *~conftest*
23132
23133 fi
23134 echo "$as_me:23134: result: $cf_cv_gnat_sigint" >&5
23135 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
23136
23137 if test $cf_cv_gnat_sigint = yes ; then
23138         USE_GNAT_SIGINT=""
23139 else
23140         USE_GNAT_SIGINT="#"
23141 fi
23142
23143 cf_gnat_libraries=no
23144 cf_gnat_projects=no
23145
23146 if test "$enable_gnat_projects" != no ; then
23147 echo "$as_me:23147: checking if GNAT supports project files" >&5
23148 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
23149 case $cf_gnat_version in
23150 (3.[0-9]*)
23151         ;;
23152 (*)
23153         case $cf_cv_system_name in
23154         (cygwin*|msys*)
23155                 ;;
23156         (*)
23157                 rm -rf conftest* *~conftest*
23158                 if mkdir conftest.src conftest.bin conftest.lib
23159                 then
23160                         cd conftest.src
23161                         rm -rf conftest* *~conftest*
23162                         cat >>library.gpr <<CF_EOF
23163 project Library is
23164   Kind := External ("LIB_KIND");
23165   for Library_Name use "ConfTest";
23166   for Object_Dir use ".";
23167   for Library_ALI_Dir use External("LIBRARY_DIR");
23168   for Library_Version use External ("SONAME");
23169   for Library_Kind use Kind;
23170   for Library_Dir use External("BUILD_DIR");
23171   Source_Dir := External ("SOURCE_DIR");
23172   for Source_Dirs use (Source_Dir);
23173 end Library;
23174 CF_EOF
23175                         cat >>confpackage.ads <<CF_EOF
23176 package ConfPackage is
23177    procedure conftest;
23178 end ConfPackage;
23179 CF_EOF
23180                         cat >>confpackage.adb <<CF_EOF
23181 with Text_IO;
23182 package body ConfPackage is
23183    procedure conftest is
23184    begin
23185       Text_IO.Put ("Hello World");
23186       Text_IO.New_Line;
23187    end conftest;
23188 end ConfPackage;
23189 CF_EOF
23190                         if ( $cf_ada_make $ADAFLAGS \
23191                                         -Plibrary.gpr \
23192                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
23193                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
23194                                         -XSOURCE_DIR=`pwd` \
23195                                         -XSONAME=libConfTest.so.1 \
23196                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
23197                                 cf_gnat_projects=yes
23198                         fi
23199                         cd ..
23200                 fi
23201                 if test -f conftest.lib/confpackage.ali
23202                 then
23203                         cf_gnat_libraries=yes
23204                 fi
23205                 rm -rf conftest* *~conftest*
23206                 ;;
23207         esac
23208         ;;
23209 esac
23210 echo "$as_me:23210: result: $cf_gnat_projects" >&5
23211 echo "${ECHO_T}$cf_gnat_projects" >&6
23212 fi # enable_gnat_projects
23213
23214 if test $cf_gnat_projects = yes
23215 then
23216         echo "$as_me:23216: checking if GNAT supports libraries" >&5
23217 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
23218         echo "$as_me:23218: result: $cf_gnat_libraries" >&5
23219 echo "${ECHO_T}$cf_gnat_libraries" >&6
23220 fi
23221
23222 if test "$cf_gnat_projects" = yes
23223 then
23224         USE_OLD_MAKERULES="#"
23225         USE_GNAT_PROJECTS=""
23226 else
23227         USE_OLD_MAKERULES=""
23228         USE_GNAT_PROJECTS="#"
23229 fi
23230
23231 if test "$cf_gnat_libraries" = yes
23232 then
23233         USE_GNAT_LIBRARIES=""
23234 else
23235         USE_GNAT_LIBRARIES="#"
23236 fi
23237
23238 echo "$as_me:23238: checking for ada-compiler" >&5
23239 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
23240
23241 # Check whether --with-ada-compiler or --without-ada-compiler was given.
23242 if test "${with_ada_compiler+set}" = set; then
23243   withval="$with_ada_compiler"
23244   cf_ada_compiler=$withval
23245 else
23246   cf_ada_compiler=gnatmake
23247 fi;
23248
23249 echo "$as_me:23249: result: $cf_ada_compiler" >&5
23250 echo "${ECHO_T}$cf_ada_compiler" >&6
23251
23252                         cf_ada_package=terminal_interface
23253
23254 echo "$as_me:23254: checking for ada-include" >&5
23255 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
23256
23257 # Check whether --with-ada-include or --without-ada-include was given.
23258 if test "${with_ada_include+set}" = set; then
23259   withval="$with_ada_include"
23260
23261 else
23262   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
23263 fi; if test -n "$prefix/share/ada/adainclude" ; then
23264
23265 if test "x$prefix" != xNONE; then
23266         cf_path_syntax="$prefix"
23267 else
23268         cf_path_syntax="$ac_default_prefix"
23269 fi
23270
23271 case ".$withval" in
23272 (.\$\(*\)*|.\'*\'*)
23273         ;;
23274 (..|./*|.\\*)
23275         ;;
23276 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23277         ;;
23278 (.\${*prefix}*|.\${*dir}*)
23279         eval withval="$withval"
23280         case ".$withval" in
23281         (.NONE/*)
23282                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23283                 ;;
23284         esac
23285         ;;
23286 (.no|.NONE/*)
23287         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23288         ;;
23289 (*)
23290         { { echo "$as_me:23290: error: expected a pathname, not \"$withval\"" >&5
23291 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23292    { (exit 1); exit 1; }; }
23293         ;;
23294 esac
23295
23296 fi
23297 eval ADA_INCLUDE="$withval"
23298
23299 echo "$as_me:23299: result: $ADA_INCLUDE" >&5
23300 echo "${ECHO_T}$ADA_INCLUDE" >&6
23301
23302 echo "$as_me:23302: checking for ada-objects" >&5
23303 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
23304
23305 # Check whether --with-ada-objects or --without-ada-objects was given.
23306 if test "${with_ada_objects+set}" = set; then
23307   withval="$with_ada_objects"
23308
23309 else
23310   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
23311 fi; if test -n "$prefix/lib/ada/adalib" ; then
23312
23313 if test "x$prefix" != xNONE; then
23314         cf_path_syntax="$prefix"
23315 else
23316         cf_path_syntax="$ac_default_prefix"
23317 fi
23318
23319 case ".$withval" in
23320 (.\$\(*\)*|.\'*\'*)
23321         ;;
23322 (..|./*|.\\*)
23323         ;;
23324 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23325         ;;
23326 (.\${*prefix}*|.\${*dir}*)
23327         eval withval="$withval"
23328         case ".$withval" in
23329         (.NONE/*)
23330                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23331                 ;;
23332         esac
23333         ;;
23334 (.no|.NONE/*)
23335         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23336         ;;
23337 (*)
23338         { { echo "$as_me:23338: error: expected a pathname, not \"$withval\"" >&5
23339 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23340    { (exit 1); exit 1; }; }
23341         ;;
23342 esac
23343
23344 fi
23345 eval ADA_OBJECTS="$withval"
23346
23347 echo "$as_me:23347: result: $ADA_OBJECTS" >&5
23348 echo "${ECHO_T}$ADA_OBJECTS" >&6
23349
23350 echo "$as_me:23350: checking if an Ada95 shared-library should be built" >&5
23351 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
23352
23353 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
23354 if test "${with_ada_sharedlib+set}" = set; then
23355   withval="$with_ada_sharedlib"
23356   with_ada_sharedlib=$withval
23357 else
23358   with_ada_sharedlib=no
23359 fi;
23360 echo "$as_me:23360: result: $with_ada_sharedlib" >&5
23361 echo "${ECHO_T}$with_ada_sharedlib" >&6
23362
23363 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
23364 MAKE_ADA_SHAREDLIB="#"
23365
23366 if test "x$with_ada_sharedlib" != xno
23367 then
23368         MAKE_ADA_SHAREDLIB=
23369         if test "x$with_ada_sharedlib" != xyes
23370         then
23371                 ADA_SHAREDLIB="$with_ada_sharedlib"
23372         fi
23373 fi
23374
23375                 fi
23376         fi
23377 else
23378         cf_with_ada=no
23379 fi
23380
23381 # do this "late" to avoid conflict with header-checks
23382 if test "x$with_widec" = xyes ; then
23383         echo "$as_me:23383: checking for wchar_t" >&5
23384 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
23385 if test "${ac_cv_type_wchar_t+set}" = set; then
23386   echo $ECHO_N "(cached) $ECHO_C" >&6
23387 else
23388   cat >conftest.$ac_ext <<_ACEOF
23389 #line 23389 "configure"
23390 #include "confdefs.h"
23391 $ac_includes_default
23392 int
23393 main (void)
23394 {
23395 if ((wchar_t *) 0)
23396   return 0;
23397 if (sizeof (wchar_t))
23398   return 0;
23399   ;
23400   return 0;
23401 }
23402 _ACEOF
23403 rm -f conftest.$ac_objext
23404 if { (eval echo "$as_me:23404: \"$ac_compile\"") >&5
23405   (eval $ac_compile) 2>&5
23406   ac_status=$?
23407   echo "$as_me:23407: \$? = $ac_status" >&5
23408   (exit $ac_status); } &&
23409          { ac_try='test -s conftest.$ac_objext'
23410   { (eval echo "$as_me:23410: \"$ac_try\"") >&5
23411   (eval $ac_try) 2>&5
23412   ac_status=$?
23413   echo "$as_me:23413: \$? = $ac_status" >&5
23414   (exit $ac_status); }; }; then
23415   ac_cv_type_wchar_t=yes
23416 else
23417   echo "$as_me: failed program was:" >&5
23418 cat conftest.$ac_ext >&5
23419 ac_cv_type_wchar_t=no
23420 fi
23421 rm -f conftest.$ac_objext conftest.$ac_ext
23422 fi
23423 echo "$as_me:23423: result: $ac_cv_type_wchar_t" >&5
23424 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
23425
23426 echo "$as_me:23426: checking size of wchar_t" >&5
23427 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
23428 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
23429   echo $ECHO_N "(cached) $ECHO_C" >&6
23430 else
23431   if test "$ac_cv_type_wchar_t" = yes; then
23432   if test "$cross_compiling" = yes; then
23433   # Depending upon the size, compute the lo and hi bounds.
23434 cat >conftest.$ac_ext <<_ACEOF
23435 #line 23435 "configure"
23436 #include "confdefs.h"
23437 $ac_includes_default
23438 int
23439 main (void)
23440 {
23441 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
23442   ;
23443   return 0;
23444 }
23445 _ACEOF
23446 rm -f conftest.$ac_objext
23447 if { (eval echo "$as_me:23447: \"$ac_compile\"") >&5
23448   (eval $ac_compile) 2>&5
23449   ac_status=$?
23450   echo "$as_me:23450: \$? = $ac_status" >&5
23451   (exit $ac_status); } &&
23452          { ac_try='test -s conftest.$ac_objext'
23453   { (eval echo "$as_me:23453: \"$ac_try\"") >&5
23454   (eval $ac_try) 2>&5
23455   ac_status=$?
23456   echo "$as_me:23456: \$? = $ac_status" >&5
23457   (exit $ac_status); }; }; then
23458   ac_lo=0 ac_mid=0
23459   while :; do
23460     cat >conftest.$ac_ext <<_ACEOF
23461 #line 23461 "configure"
23462 #include "confdefs.h"
23463 $ac_includes_default
23464 int
23465 main (void)
23466 {
23467 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23468   ;
23469   return 0;
23470 }
23471 _ACEOF
23472 rm -f conftest.$ac_objext
23473 if { (eval echo "$as_me:23473: \"$ac_compile\"") >&5
23474   (eval $ac_compile) 2>&5
23475   ac_status=$?
23476   echo "$as_me:23476: \$? = $ac_status" >&5
23477   (exit $ac_status); } &&
23478          { ac_try='test -s conftest.$ac_objext'
23479   { (eval echo "$as_me:23479: \"$ac_try\"") >&5
23480   (eval $ac_try) 2>&5
23481   ac_status=$?
23482   echo "$as_me:23482: \$? = $ac_status" >&5
23483   (exit $ac_status); }; }; then
23484   ac_hi=$ac_mid; break
23485 else
23486   echo "$as_me: failed program was:" >&5
23487 cat conftest.$ac_ext >&5
23488 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
23489 fi
23490 rm -f conftest.$ac_objext conftest.$ac_ext
23491   done
23492 else
23493   echo "$as_me: failed program was:" >&5
23494 cat conftest.$ac_ext >&5
23495 ac_hi=-1 ac_mid=-1
23496   while :; do
23497     cat >conftest.$ac_ext <<_ACEOF
23498 #line 23498 "configure"
23499 #include "confdefs.h"
23500 $ac_includes_default
23501 int
23502 main (void)
23503 {
23504 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23505   ;
23506   return 0;
23507 }
23508 _ACEOF
23509 rm -f conftest.$ac_objext
23510 if { (eval echo "$as_me:23510: \"$ac_compile\"") >&5
23511   (eval $ac_compile) 2>&5
23512   ac_status=$?
23513   echo "$as_me:23513: \$? = $ac_status" >&5
23514   (exit $ac_status); } &&
23515          { ac_try='test -s conftest.$ac_objext'
23516   { (eval echo "$as_me:23516: \"$ac_try\"") >&5
23517   (eval $ac_try) 2>&5
23518   ac_status=$?
23519   echo "$as_me:23519: \$? = $ac_status" >&5
23520   (exit $ac_status); }; }; then
23521   ac_lo=$ac_mid; break
23522 else
23523   echo "$as_me: failed program was:" >&5
23524 cat conftest.$ac_ext >&5
23525 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23526 fi
23527 rm -f conftest.$ac_objext conftest.$ac_ext
23528   done
23529 fi
23530 rm -f conftest.$ac_objext conftest.$ac_ext
23531 # Binary search between lo and hi bounds.
23532 while test "x$ac_lo" != "x$ac_hi"; do
23533   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23534   cat >conftest.$ac_ext <<_ACEOF
23535 #line 23535 "configure"
23536 #include "confdefs.h"
23537 $ac_includes_default
23538 int
23539 main (void)
23540 {
23541 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23542   ;
23543   return 0;
23544 }
23545 _ACEOF
23546 rm -f conftest.$ac_objext
23547 if { (eval echo "$as_me:23547: \"$ac_compile\"") >&5
23548   (eval $ac_compile) 2>&5
23549   ac_status=$?
23550   echo "$as_me:23550: \$? = $ac_status" >&5
23551   (exit $ac_status); } &&
23552          { ac_try='test -s conftest.$ac_objext'
23553   { (eval echo "$as_me:23553: \"$ac_try\"") >&5
23554   (eval $ac_try) 2>&5
23555   ac_status=$?
23556   echo "$as_me:23556: \$? = $ac_status" >&5
23557   (exit $ac_status); }; }; then
23558   ac_hi=$ac_mid
23559 else
23560   echo "$as_me: failed program was:" >&5
23561 cat conftest.$ac_ext >&5
23562 ac_lo=`expr $ac_mid + 1`
23563 fi
23564 rm -f conftest.$ac_objext conftest.$ac_ext
23565 done
23566 ac_cv_sizeof_wchar_t=$ac_lo
23567 else
23568   if test "$cross_compiling" = yes; then
23569   { { echo "$as_me:23569: error: cannot run test program while cross compiling" >&5
23570 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23571    { (exit 1); exit 1; }; }
23572 else
23573   cat >conftest.$ac_ext <<_ACEOF
23574 #line 23574 "configure"
23575 #include "confdefs.h"
23576 $ac_includes_default
23577 int
23578 main (void)
23579 {
23580 FILE *f = fopen ("conftest.val", "w");
23581 if (!f)
23582   $ac_main_return (1);
23583 fprintf (f, "%d", (sizeof (wchar_t)));
23584 fclose (f);
23585   ;
23586   return 0;
23587 }
23588 _ACEOF
23589 rm -f conftest$ac_exeext
23590 if { (eval echo "$as_me:23590: \"$ac_link\"") >&5
23591   (eval $ac_link) 2>&5
23592   ac_status=$?
23593   echo "$as_me:23593: \$? = $ac_status" >&5
23594   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23595   { (eval echo "$as_me:23595: \"$ac_try\"") >&5
23596   (eval $ac_try) 2>&5
23597   ac_status=$?
23598   echo "$as_me:23598: \$? = $ac_status" >&5
23599   (exit $ac_status); }; }; then
23600   ac_cv_sizeof_wchar_t=`cat conftest.val`
23601 else
23602   echo "$as_me: program exited with status $ac_status" >&5
23603 echo "$as_me: failed program was:" >&5
23604 cat conftest.$ac_ext >&5
23605 fi
23606 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23607 fi
23608 fi
23609 rm -f conftest.val
23610 else
23611   ac_cv_sizeof_wchar_t=0
23612 fi
23613 fi
23614 echo "$as_me:23614: result: $ac_cv_sizeof_wchar_t" >&5
23615 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
23616 cat >>confdefs.h <<EOF
23617 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23618 EOF
23619
23620 fi
23621
23622 ### Construct the ncurses library-subsets, if any, from this set of keywords:
23623 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
23624 ###
23625 ### ticlib modules may be a separate library, otherwise contained in termlib.
23626 ### termlib modules may be a separate library, otherwise contained in ncurses.
23627 ###
23628 ### The of "+" or " " between the tokens controls the way the script
23629 ### chooses to split module lists into libraries.
23630 ###
23631 ### (see CF_LIB_RULES).
23632 echo "$as_me:23632: checking for library subsets" >&5
23633 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
23634 LIB_SUBSETS=
23635
23636 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
23637         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
23638         if test "$with_ticlib" != no ; then
23639                 LIB_SUBSETS="${LIB_SUBSETS} "
23640         else
23641                 LIB_SUBSETS="${LIB_SUBSETS}+"
23642         fi
23643 fi
23644
23645 LIB_SUBSETS="${LIB_SUBSETS}termlib"
23646 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
23647
23648 if test "$with_termlib" != no ; then
23649         LIB_SUBSETS="${LIB_SUBSETS} "
23650 else
23651         LIB_SUBSETS="${LIB_SUBSETS}+"
23652 fi
23653
23654 LIB_SUBSETS="${LIB_SUBSETS}base"
23655
23656 # Most term-driver calls are to tinfo, but some like init_pair are to the
23657 # base library (so it resides in base).
23658 if test "$with_term_driver" != no ; then
23659         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
23660         case $cf_cv_system_name in
23661         (*mingw32*|*mingw64*)
23662                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
23663                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
23664                 ;;
23665         (*)
23666                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
23667                 ;;
23668         esac
23669 fi
23670
23671 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
23672 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
23673
23674 echo "$as_me:23674: result: $LIB_SUBSETS" >&5
23675 echo "${ECHO_T}$LIB_SUBSETS" >&6
23676
23677 ### Construct the list of include-directories to be generated
23678
23679 if test "$srcdir" != "."; then
23680         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
23681 fi
23682 CPPFLAGS="-I../include $CPPFLAGS"
23683 if test "$srcdir" != "."; then
23684         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
23685 fi
23686 CPPFLAGS="-I. $CPPFLAGS"
23687
23688 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
23689 if test "$srcdir" != "."; then
23690         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
23691 fi
23692 if test "$GCC" != yes; then
23693         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23694 elif test "$includedir" != "/usr/include"; then
23695         if test "$includedir" = '${prefix}/include' ; then
23696                 if test x$prefix != x/usr ; then
23697                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23698                 fi
23699         else
23700                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23701         fi
23702 fi
23703
23704 ### Build up pieces for makefile rules
23705 echo "$as_me:23705: checking default library suffix" >&5
23706 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
23707
23708         case $DFT_LWR_MODEL in
23709         (libtool) DFT_ARG_SUFFIX=''   ;;
23710         (normal)  DFT_ARG_SUFFIX=''   ;;
23711         (debug)   DFT_ARG_SUFFIX='_g' ;;
23712         (profile) DFT_ARG_SUFFIX='_p' ;;
23713         (shared)  DFT_ARG_SUFFIX=''   ;;
23714         esac
23715         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
23716 echo "$as_me:23716: result: $DFT_ARG_SUFFIX" >&5
23717 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
23718
23719 echo "$as_me:23719: checking default library-dependency suffix" >&5
23720 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
23721
23722         case X$DFT_LWR_MODEL in
23723         (Xlibtool)
23724                 DFT_LIB_SUFFIX='.la'
23725                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23726                 ;;
23727         (Xdebug)
23728                 DFT_LIB_SUFFIX='_g.a'
23729                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23730                 ;;
23731         (Xprofile)
23732                 DFT_LIB_SUFFIX='_p.a'
23733                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23734                 ;;
23735         (Xshared)
23736                 case $cf_cv_system_name in
23737                 (aix[5-7]*)
23738                         DFT_LIB_SUFFIX='.so'
23739                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23740                         ;;
23741                 (cygwin*|msys*|mingw*)
23742                         DFT_LIB_SUFFIX='.dll'
23743                         DFT_DEP_SUFFIX='.dll.a'
23744                         ;;
23745                 (darwin*)
23746                         DFT_LIB_SUFFIX='.dylib'
23747                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23748                         ;;
23749                 (hpux*)
23750                         case $target in
23751                         (ia64*)
23752                                 DFT_LIB_SUFFIX='.so'
23753                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23754                                 ;;
23755                         (*)
23756                                 DFT_LIB_SUFFIX='.sl'
23757                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23758                                 ;;
23759                         esac
23760                         ;;
23761                 (*)
23762                         DFT_LIB_SUFFIX='.so'
23763                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23764                         ;;
23765                 esac
23766                 ;;
23767         (*)
23768                 DFT_LIB_SUFFIX='.a'
23769                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23770                 ;;
23771         esac
23772         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23773         then
23774                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
23775                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
23776         fi
23777 echo "$as_me:23777: result: $DFT_DEP_SUFFIX" >&5
23778 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
23779
23780 echo "$as_me:23780: checking default object directory" >&5
23781 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
23782
23783         case $DFT_LWR_MODEL in
23784         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
23785         (normal)  DFT_OBJ_SUBDIR='objects' ;;
23786         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
23787         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
23788         (shared)
23789                 case $cf_cv_system_name in
23790                 (cygwin|msys)
23791                         DFT_OBJ_SUBDIR='objects' ;;
23792                 (*)
23793                         DFT_OBJ_SUBDIR='obj_s' ;;
23794                 esac
23795         esac
23796 echo "$as_me:23796: result: $DFT_OBJ_SUBDIR" >&5
23797 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
23798
23799 if test "x$cf_with_cxx" = xyes ; then
23800 echo "$as_me:23800: checking c++ library-dependency suffix" >&5
23801 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
23802 if test "$with_libtool" != "no"; then
23803         # libtool thinks it can make c++ shared libraries (perhaps only g++)
23804         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23805 elif test "$with_shared_cxx" != "no"; then
23806         # also for g++ users...
23807         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23808 else
23809         # we normally make a static library because C/C++ library rules differ
23810
23811         case Xnormal in
23812         (Xlibtool)
23813                 CXX_LIB_SUFFIX='.la'
23814                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23815                 ;;
23816         (Xdebug)
23817                 CXX_LIB_SUFFIX='_g.a'
23818                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23819                 ;;
23820         (Xprofile)
23821                 CXX_LIB_SUFFIX='_p.a'
23822                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23823                 ;;
23824         (Xshared)
23825                 case $cf_cv_system_name in
23826                 (aix[5-7]*)
23827                         CXX_LIB_SUFFIX='.so'
23828                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23829                         ;;
23830                 (cygwin*|msys*|mingw*)
23831                         CXX_LIB_SUFFIX='.dll'
23832                         CXX_DEP_SUFFIX='.dll.a'
23833                         ;;
23834                 (darwin*)
23835                         CXX_LIB_SUFFIX='.dylib'
23836                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23837                         ;;
23838                 (hpux*)
23839                         case $target in
23840                         (ia64*)
23841                                 CXX_LIB_SUFFIX='.so'
23842                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23843                                 ;;
23844                         (*)
23845                                 CXX_LIB_SUFFIX='.sl'
23846                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23847                                 ;;
23848                         esac
23849                         ;;
23850                 (*)
23851                         CXX_LIB_SUFFIX='.so'
23852                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23853                         ;;
23854                 esac
23855                 ;;
23856         (*)
23857                 CXX_LIB_SUFFIX='.a'
23858                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23859                 ;;
23860         esac
23861         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23862         then
23863                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
23864                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
23865         fi
23866
23867 fi
23868 echo "$as_me:23868: result: $CXX_LIB_SUFFIX" >&5
23869 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
23870
23871 fi
23872
23873 # do not want -ldl in build except as needed for -lncurses dependency
23874 if test "x$with_dlsym" = xyes ; then
23875 if test $DFT_LWR_MODEL = shared || \
23876    test $DFT_LWR_MODEL = libtool ; then
23877
23878 # remove dl library from $LIBS
23879 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
23880
23881 fi
23882 fi
23883 ### Set up low-level terminfo dependencies for makefiles.
23884
23885 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
23886 # do not need libdl
23887 TICS_LIST=
23888 if test "x$with_dlsym" = xyes ; then
23889
23890 # remove dl library from $SHLIB_LIST
23891 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
23892
23893 fi
23894
23895 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
23896 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
23897 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
23898 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
23899 then
23900         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
23901 fi
23902
23903 if test "$with_ticlib" != no ; then
23904
23905         if test "x$with_ticlib" != xyes ; then
23906                 TICS_NAME=$with_ticlib
23907                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
23908                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23909                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23910                 TICS_LIB_SUFFIX="${with_ticlib}"
23911         else
23912                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
23913                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
23914                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
23915                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
23916         fi
23917         TICS_LDFLAGS="-L${LIB_DIR}"
23918         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
23919 else
23920         TICS_SUFFIX=${DFT_LIB_SUFFIX}
23921         TICS_LDFLAGS="-L${LIB_DIR}"
23922         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23923 fi
23924
23925 if test "$with_termlib" != no ; then
23926
23927         if test "x$with_termlib" != xyes ; then
23928                 TINFO_NAME=$with_termlib
23929                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
23930                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23931                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23932                 TINFO_LIB_SUFFIX="${with_termlib}"
23933         else
23934                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23935                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
23936                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
23937                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
23938         fi
23939
23940         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
23941         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
23942         if test "$DFT_LWR_MODEL" = "libtool"; then
23943                 TEST_ARGS="${TEST_DEPS}"
23944                 TEST_ARG2="${TEST_DEP2}"
23945                 TINFO_LDFLAGS="-L${LIB_DIR}"
23946                 TINFO_LIBS="$TEST_ARGS"
23947                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
23948                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
23949         else
23950                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
23951                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
23952                 if test "x$with_term_driver" != xno ; then
23953                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23954                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
23955                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23956                 else
23957                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23958                         TINFO_LIBS="$TEST_ARGS"
23959                 fi
23960                 TINFO_LDFLAGS="-L${LIB_DIR}"
23961                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23962         fi
23963 else
23964         # the next lines are needed for linking libtic over libncurses
23965         TINFO_NAME=${LIB_NAME}
23966         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23967         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
23968         if test "x$with_tic_depends" = xyes ; then
23969                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23970         else
23971                 TICS_LIST="$SHLIB_LIST"
23972         fi
23973
23974         TINFO_LDFLAGS="-L${LIB_DIR}"
23975         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23976 fi
23977
23978 if test "$DFT_LWR_MODEL" = shared ; then
23979         case $cf_cv_system_name in
23980         (cygwin*|msys*)
23981                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
23982                 TINFO_SUFFIX=.dll
23983                 ;;
23984         esac
23985 fi
23986
23987 if test "x$with_dlsym" = xyes ; then
23988
23989 # remove dl library from $TICS_LIST
23990 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
23991
23992 fi
23993
23994 if test "$DFT_LWR_MODEL" = "libtool"; then
23995         OBJEXT=lo
23996 fi
23997
23998 # needed for Ada95
23999 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
24000
24001 case $DFT_LWR_MODEL in
24002 (normal|debug|profile)
24003
24004 if test "$GCC" = yes ; then
24005         case $cf_cv_system_name in
24006         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
24007                 LDFLAGS_STATIC=
24008                 LDFLAGS_SHARED=
24009                 ;;
24010         (*)     # normally, except when broken
24011                 LDFLAGS_STATIC=-static
24012                 LDFLAGS_SHARED=-dynamic
24013                 ;;
24014         esac
24015 else
24016         case $cf_cv_system_name in
24017         (aix[4-7]*)     # from ld manpage
24018                 LDFLAGS_STATIC=-bstatic
24019                 LDFLAGS_SHARED=-bdynamic
24020                 ;;
24021         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
24022                 # We could also use just "archive" and "shared".
24023                 LDFLAGS_STATIC=-Wl,-a,archive_shared
24024                 LDFLAGS_SHARED=-Wl,-a,shared_archive
24025                 ;;
24026         (irix*)         # from ld manpage IRIX64
24027                 LDFLAGS_STATIC=-Bstatic
24028                 LDFLAGS_SHARED=-Bdynamic
24029                 ;;
24030         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
24031                 # alternative "-oldstyle_liblookup" (not in cc manpage)
24032                 LDFLAGS_STATIC=-noso
24033                 LDFLAGS_SHARED=-so_archive
24034                 ;;
24035         (solaris2*)
24036                 LDFLAGS_STATIC=-Bstatic
24037                 LDFLAGS_SHARED=-Bdynamic
24038                 ;;
24039         esac
24040 fi
24041
24042 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
24043 then
24044         echo "$as_me:24044: checking if linker supports switching between static/dynamic" >&5
24045 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
24046
24047         rm -f libconftest.a
24048         cat >conftest.$ac_ext <<EOF
24049 #line 24049 "configure"
24050 #include <stdio.h>
24051 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
24052 EOF
24053         if { (eval echo "$as_me:24053: \"$ac_compile\"") >&5
24054   (eval $ac_compile) 2>&5
24055   ac_status=$?
24056   echo "$as_me:24056: \$? = $ac_status" >&5
24057   (exit $ac_status); } ; then
24058                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
24059                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
24060         fi
24061         rm -f conftest.*
24062
24063         cf_save_LIBS="$LIBS"
24064
24065         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
24066         cat >conftest.$ac_ext <<_ACEOF
24067 #line 24067 "configure"
24068 #include "confdefs.h"
24069
24070 #line 24070 "configure"
24071 #include <stdio.h>
24072 int cf_ldflags_static(FILE *fp);
24073
24074 int
24075 main (void)
24076 {
24077
24078         return cf_ldflags_static(stdin);
24079
24080   ;
24081   return 0;
24082 }
24083 _ACEOF
24084 rm -f conftest.$ac_objext conftest$ac_exeext
24085 if { (eval echo "$as_me:24085: \"$ac_link\"") >&5
24086   (eval $ac_link) 2>&5
24087   ac_status=$?
24088   echo "$as_me:24088: \$? = $ac_status" >&5
24089   (exit $ac_status); } &&
24090          { ac_try='test -s conftest$ac_exeext'
24091   { (eval echo "$as_me:24091: \"$ac_try\"") >&5
24092   (eval $ac_try) 2>&5
24093   ac_status=$?
24094   echo "$as_me:24094: \$? = $ac_status" >&5
24095   (exit $ac_status); }; }; then
24096
24097         # some linkers simply ignore the -dynamic
24098         case x`file conftest$ac_exeext 2>/dev/null` in
24099         (*static*)
24100                 cf_ldflags_static=no
24101                 ;;
24102         (*)
24103                 cf_ldflags_static=yes
24104                 ;;
24105         esac
24106
24107 else
24108   echo "$as_me: failed program was:" >&5
24109 cat conftest.$ac_ext >&5
24110 cf_ldflags_static=no
24111 fi
24112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24113
24114         rm -f libconftest.*
24115         LIBS="$cf_save_LIBS"
24116
24117         echo "$as_me:24117: result: $cf_ldflags_static" >&5
24118 echo "${ECHO_T}$cf_ldflags_static" >&6
24119
24120         if test $cf_ldflags_static != yes
24121         then
24122                 LDFLAGS_STATIC=
24123                 LDFLAGS_SHARED=
24124         fi
24125 else
24126         LDFLAGS_STATIC=
24127         LDFLAGS_SHARED=
24128 fi
24129
24130         ;;
24131 esac
24132
24133 echo "$as_me:24133: checking where we will install curses.h" >&5
24134 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
24135
24136 includesubdir=
24137 if test "$with_overwrite" = no && \
24138  ( test "x$includedir" = 'x${prefix}/include' || \
24139    test "x$includedir" = "x${prefix}/include" )
24140 then
24141         includesubdir="/ncurses${USE_LIB_SUFFIX}"
24142 fi
24143 echo "$as_me:24143: result: ${includedir}${includesubdir}" >&5
24144 echo "${ECHO_T}${includedir}${includesubdir}" >&6
24145
24146 ### Resolve a conflict between normal and wide-curses by forcing applications
24147 ### that will need libutf8 to add it to their configure script.
24148 if test "$with_overwrite" != no ; then
24149 if test "$NCURSES_LIBUTF8" = 1 ; then
24150         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
24151         { echo "$as_me:24151: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
24152 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
24153 fi
24154 fi
24155 WITH_OVERWRITE=$with_overwrite
24156
24157 # used to separate tack out of the tree
24158 NCURSES_TREE=
24159
24160 ### predefined stuff for the test programs
24161
24162 cat >>confdefs.h <<\EOF
24163 #define HAVE_SLK_COLOR 1
24164 EOF
24165
24166 ### Construct the list of subdirectories for which we'll customize makefiles
24167 ### with the appropriate compile-rules.
24168
24169 echo "$as_me:24169: checking for src modules" >&5
24170 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
24171
24172 # dependencies and linker-arguments for test-programs
24173 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
24174 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
24175 if test "$DFT_LWR_MODEL" = "libtool"; then
24176         TEST_ARGS="${TEST_DEPS}"
24177         TEST_ARG2="${TEST_DEP2}"
24178 else
24179         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24180         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
24181 fi
24182
24183 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
24184 cf_cv_src_modules=
24185 for cf_dir in $modules_to_build
24186 do
24187         if test -f $srcdir/$cf_dir/modules; then
24188
24189                 # We may/may not have tack in the distribution, though the
24190                 # makefile is.
24191                 if test $cf_dir = tack ; then
24192                         if test "x$cf_with_tack" != "xyes"; then
24193                                 continue
24194                         fi
24195                 fi
24196
24197                 if test -z "$cf_cv_src_modules"; then
24198                         cf_cv_src_modules=$cf_dir
24199                 else
24200                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
24201                 fi
24202
24203                 # Make the ncurses_cfg.h file record the library interface files as
24204                 # well.  These are header files that are the same name as their
24205                 # directory.  Ncurses is the only library that does not follow
24206                 # that pattern.
24207                 if test $cf_dir = tack ; then
24208                         continue
24209                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
24210
24211 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24212
24213                         cat >>confdefs.h <<EOF
24214 #define HAVE_${cf_have_include}_H 1
24215 EOF
24216
24217                         cat >>confdefs.h <<EOF
24218 #define HAVE_LIB${cf_have_include} 1
24219 EOF
24220
24221                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
24222                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
24223                         if test "$DFT_LWR_MODEL" = "libtool"; then
24224                                 TEST_ARGS="${TEST_DEPS}"
24225                                 TEST_ARG2="${TEST_DEP2}"
24226                         else
24227                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
24228                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
24229                         fi
24230                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
24231                 fi
24232         fi
24233 done
24234 echo "$as_me:24234: result: $cf_cv_src_modules" >&5
24235 echo "${ECHO_T}$cf_cv_src_modules" >&6
24236
24237 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
24238 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
24239
24240 SRC_SUBDIRS=
24241 if test "x$cf_with_manpages" != xno ; then
24242         SRC_SUBDIRS="$SRC_SUBDIRS man"
24243 fi
24244 SRC_SUBDIRS="$SRC_SUBDIRS include"
24245 for cf_dir in $cf_cv_src_modules
24246 do
24247         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
24248 done
24249 if test "x$cf_with_tests" != "xno" ; then
24250         SRC_SUBDIRS="$SRC_SUBDIRS test"
24251 fi
24252 # always make this, to install the ncurses-config script
24253 SRC_SUBDIRS="$SRC_SUBDIRS misc"
24254 if test "$cf_with_cxx_binding" != no; then
24255         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
24256         SRC_SUBDIRS="$SRC_SUBDIRS c++"
24257 fi
24258
24259 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
24260 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
24261
24262 ADA_SUBDIRS=
24263 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
24264         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
24265         ADA_SUBDIRS="gen src"
24266         if test "x$cf_with_tests" != "xno" ; then
24267                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
24268         fi
24269 fi
24270
24271 SUB_MAKEFILES=
24272 for cf_dir in $SRC_SUBDIRS
24273 do
24274         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
24275 done
24276
24277 if test -n "$ADA_SUBDIRS"; then
24278         for cf_dir in $ADA_SUBDIRS
24279         do
24280                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
24281         done
24282
24283 fi
24284
24285 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24286    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
24287    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
24288 fi
24289
24290 DIRS_TO_MAKE="lib"
24291 for cf_item in $cf_list_models
24292 do
24293
24294         case $cf_item in
24295         (libtool) cf_subdir='obj_lo'  ;;
24296         (normal)  cf_subdir='objects' ;;
24297         (debug)   cf_subdir='obj_g' ;;
24298         (profile) cf_subdir='obj_p' ;;
24299         (shared)
24300                 case $cf_cv_system_name in
24301                 (cygwin|msys)
24302                         cf_subdir='objects' ;;
24303                 (*)
24304                         cf_subdir='obj_s' ;;
24305                 esac
24306         esac
24307
24308         for cf_item2 in $DIRS_TO_MAKE
24309         do
24310                 test $cf_item2 = $cf_subdir && break
24311         done
24312         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
24313 done
24314 for cf_dir in $DIRS_TO_MAKE
24315 do
24316         test ! -d $cf_dir && mkdir $cf_dir
24317 done
24318
24319 # symbols that differ when compiling Ada95 by itself.
24320 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
24321
24322 # values to use as strings
24323
24324 cat >>confdefs.h <<EOF
24325 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
24326 EOF
24327
24328 cat >>confdefs.h <<EOF
24329 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
24330 EOF
24331
24332 ### Now that we're done running tests, add the compiler-warnings, if any
24333
24334 cf_fix_cppflags=no
24335 cf_new_cflags=
24336 cf_new_cppflags=
24337 cf_new_extra_cppflags=
24338
24339 for cf_add_cflags in $EXTRA_CFLAGS
24340 do
24341 case $cf_fix_cppflags in
24342 (no)
24343         case $cf_add_cflags in
24344         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24345                 case $cf_add_cflags in
24346                 (-D*)
24347                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24348
24349                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24350                                 && test -z "${cf_tst_cflags}" \
24351                                 && cf_fix_cppflags=yes
24352
24353                         if test $cf_fix_cppflags = yes ; then
24354
24355         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24356         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24357
24358                                 continue
24359                         elif test "${cf_tst_cflags}" = "\"'" ; then
24360
24361         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24362         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24363
24364                                 continue
24365                         fi
24366                         ;;
24367                 esac
24368                 case "$CPPFLAGS" in
24369                 (*$cf_add_cflags)
24370                         ;;
24371                 (*)
24372                         case $cf_add_cflags in
24373                         (-D*)
24374                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24375
24376 CPPFLAGS=`echo "$CPPFLAGS" | \
24377         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
24378                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
24379
24380                                 ;;
24381                         esac
24382
24383         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24384         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24385
24386                         ;;
24387                 esac
24388                 ;;
24389         (*)
24390
24391         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24392         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24393
24394                 ;;
24395         esac
24396         ;;
24397 (yes)
24398
24399         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24400         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24401
24402         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
24403
24404         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24405                 && test -z "${cf_tst_cflags}" \
24406                 && cf_fix_cppflags=no
24407         ;;
24408 esac
24409 done
24410
24411 if test -n "$cf_new_cflags" ; then
24412
24413         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24414         CFLAGS="${CFLAGS}$cf_new_cflags"
24415
24416 fi
24417
24418 if test -n "$cf_new_cppflags" ; then
24419
24420         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24421         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24422
24423 fi
24424
24425 if test -n "$cf_new_extra_cppflags" ; then
24426
24427         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24428         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24429
24430 fi
24431
24432 ### Define substitutions for header files to avoid name-pollution
24433
24434 if test "x$cf_cv_have_tcgetattr" = xyes ; then
24435         HAVE_TCGETATTR=1
24436 else
24437         HAVE_TCGETATTR=0
24438 fi
24439
24440 if test "x$ac_cv_header_stdint_h" = xyes ; then
24441         HAVE_STDINT_H=1
24442 else
24443         HAVE_STDINT_H=0
24444 fi
24445
24446 if test "x$ac_cv_header_termio_h" = xyes ; then
24447         HAVE_TERMIO_H=1
24448 else
24449         HAVE_TERMIO_H=0
24450 fi
24451
24452 if test "x$ac_cv_header_termios_h" = xyes ; then
24453         HAVE_TERMIOS_H=1
24454 else
24455         HAVE_TERMIOS_H=0
24456 fi
24457
24458 ################################################################################
24459 test "x$use_database" = xyes && \
24460 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
24461
24462 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
24463 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
24464
24465 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
24466 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
24467 fi
24468
24469 # Extract the first word of "tic", so it can be a program name with args.
24470 set dummy tic; ac_word=$2
24471 echo "$as_me:24471: checking for $ac_word" >&5
24472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24473 if test "${ac_cv_path_TIC_PATH+set}" = set; then
24474   echo $ECHO_N "(cached) $ECHO_C" >&6
24475 else
24476   case $TIC_PATH in
24477   [\\/]* | ?:[\\/]*)
24478   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
24479   ;;
24480   *)
24481   ac_save_IFS=$IFS; IFS=$ac_path_separator
24482 ac_dummy="$PATH:/usr/local/ncurses/bin"
24483 for ac_dir in $ac_dummy; do
24484   IFS=$ac_save_IFS
24485   test -z "$ac_dir" && ac_dir=.
24486   if $as_executable_p "$ac_dir/$ac_word"; then
24487    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
24488    echo "$as_me:24488: found $ac_dir/$ac_word" >&5
24489    break
24490 fi
24491 done
24492
24493   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
24494   ;;
24495 esac
24496 fi
24497 TIC_PATH=$ac_cv_path_TIC_PATH
24498
24499 if test -n "$TIC_PATH"; then
24500   echo "$as_me:24500: result: $TIC_PATH" >&5
24501 echo "${ECHO_T}$TIC_PATH" >&6
24502 else
24503   echo "$as_me:24503: result: no" >&5
24504 echo "${ECHO_T}no" >&6
24505 fi
24506
24507 if test -n "$FALLBACK_LIST"
24508 then
24509         if test "$TIC_PATH" = unknown
24510         then
24511                 { echo "$as_me:24511: WARNING: no tic program found for fallbacks" >&5
24512 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24513         fi
24514 fi
24515
24516 if test "x$cf_with_tests" != xno ; then
24517         MAKE_TESTS=
24518 else
24519         MAKE_TESTS="#"
24520 fi
24521
24522 ADAHTML_DIR=../../doc/html/ada
24523
24524 # these could be configurable, but are not currently
24525 PANEL_NAME=panel
24526 MENU_NAME=menu
24527 FORM_NAME=form
24528 CXX_NAME=ncurses++
24529
24530 # workaround for OS/2 (20151017)
24531 case $cf_cv_system_name in
24532 (os2*)
24533         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24534         ;;
24535 (*)
24536         LIBTOOL_OPTS_CXX=
24537         ;;
24538 esac
24539
24540 # workaround for g++ versus Solaris (20131116)
24541 case $cf_cv_system_name in
24542 (solaris2*)
24543         case "x$CPPFLAGS" in
24544         (*-D_XOPEN_SOURCE_EXTENDED*)
24545                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24546
24547 echo "${as_me:-configure}:24547: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24548
24549                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24550                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24551                 ;;
24552         esac
24553         ;;
24554 esac
24555
24556 # Help to automatically enable the extended curses features when using either
24557 # the *-config or the ".pc" files by adding defines.
24558 echo "$as_me:24558: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24559 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24560 PKG_CFLAGS=
24561 for cf_loop1 in $CPPFLAGS_after_XOPEN
24562 do
24563         cf_found=no
24564         for cf_loop2 in $CPPFLAGS_before_XOPEN
24565         do
24566                 if test "x$cf_loop1" = "x$cf_loop2"
24567                 then
24568                         cf_found=yes
24569                         break
24570                 fi
24571         done
24572         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24573 done
24574 echo "$as_me:24574: result: $PKG_CFLAGS" >&5
24575 echo "${ECHO_T}$PKG_CFLAGS" >&6
24576
24577 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24578 case "x$NCURSES_OSPEED" in
24579 (*short*)
24580         cf_compatible=1
24581         ;;
24582 (*)
24583         cf_compatible=0
24584         ;;
24585 esac
24586
24587 cat >>confdefs.h <<EOF
24588 #define NCURSES_OSPEED_COMPAT $cf_compatible
24589 EOF
24590
24591 case "x$cf_cv_typeof_chtype" in
24592 (xshort|xint|xlong)
24593         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
24594         ;;
24595 esac
24596
24597 case "x$cf_cv_typeof_mmask_t" in
24598 (xshort|xint|xlong)
24599         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
24600         ;;
24601 esac
24602
24603 # substitute into misc/Makefile to suppress
24604 # (un)install.data from the
24605 # (un)install rules.
24606 if test "x$cf_with_db_install" = "xno"; then
24607         MISC_INSTALL_DATA=
24608         MISC_UNINSTALL_DATA=
24609 else
24610         MISC_INSTALL_DATA=install.data
24611         MISC_UNINSTALL_DATA=uninstall.data
24612 fi
24613
24614 SUB_SCRIPTS=
24615
24616 if test -n "$PACKAGE"
24617 then
24618         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
24619         export PACKAGE
24620         echo "package: $PACKAGE"
24621 fi
24622
24623 UNALTERED_SYMS=
24624 cf_filter_syms=no
24625
24626 if test -n "$RESULTING_SYMS"
24627 then
24628         cf_filter_syms=$cf_dft_filter_syms
24629         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
24630
24631 echo "${as_me:-configure}:24631: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
24632
24633 fi
24634
24635 if test "x$WILDCARD_SYMS" = xno
24636 then
24637         cf_filter_syms=yes
24638 fi
24639
24640 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
24641
24642 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
24643 if test $cf_filter_syms = yes
24644 then
24645         RESULTING_SYMS=resulting.map
24646 fi
24647
24648 if test "x$cross_compiling" = xyes ; then
24649         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
24650         CHECK_BUILD="#"
24651 else
24652         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
24653         CHECK_BUILD=
24654 fi
24655
24656 cat >>confdefs.h <<\EOF
24657 #define HAVE_CURSES_DATA_BOOLNAMES 1
24658 EOF
24659
24660 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"
24661 ac_config_commands="$ac_config_commands default"
24662 cat >confcache <<\_ACEOF
24663 # This file is a shell script that caches the results of configure
24664 # tests run on this system so they can be shared between configure
24665 # scripts and configure runs, see configure's option --config-cache.
24666 # It is not useful on other systems.  If it contains results you don't
24667 # want to keep, you may remove or edit it.
24668 #
24669 # config.status only pays attention to the cache file if you give it
24670 # the --recheck option to rerun configure.
24671 #
24672 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24673 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24674 # following values.
24675
24676 _ACEOF
24677
24678 # The following way of writing the cache mishandles newlines in values,
24679 # but we know of no workaround that is simple, portable, and efficient.
24680 # So, don't put newlines in cache variables' values.
24681 # Ultrix sh set writes to stderr and can't be redirected directly,
24682 # and sets the high bit in the cache file unless we assign to the vars.
24683 {
24684   (set) 2>&1 |
24685     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24686     *ac_space=\ *)
24687       # `set' does not quote correctly, so add quotes (double-quote
24688       # substitution turns \\\\ into \\, and sed turns \\ into \).
24689       sed -n \
24690         "s/'/'\\\\''/g;
24691           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24692       ;;
24693     *)
24694       # `set' quotes correctly as required by POSIX, so do not add quotes.
24695       sed -n \
24696         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24697       ;;
24698     esac;
24699 } |
24700   sed '
24701      t clear
24702      : clear
24703      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24704      t end
24705      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24706      : end' >>confcache
24707 if cmp -s $cache_file confcache; then :; else
24708   if test -w $cache_file; then
24709     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24710     cat confcache >$cache_file
24711   else
24712     echo "not updating unwritable cache $cache_file"
24713   fi
24714 fi
24715 rm -f confcache
24716
24717 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24718 # Let make expand exec_prefix.
24719 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24720
24721 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24722 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24723 # trailing colons and then remove the whole line if VPATH becomes empty
24724 # (actually we leave an empty line to preserve line numbers).
24725 if test "x$srcdir" = x.; then
24726   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24727 s/:*\$(srcdir):*/:/;
24728 s/:*\${srcdir}:*/:/;
24729 s/:*@srcdir@:*/:/;
24730 s/^\([^=]*=[    ]*\):*/\1/;
24731 s/:*$//;
24732 s/^[^=]*=[      ]*$//;
24733 }'
24734 fi
24735
24736 DEFS=-DHAVE_CONFIG_H
24737
24738 : ${CONFIG_STATUS=./config.status}
24739 ac_clean_files_save=$ac_clean_files
24740 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24741 { echo "$as_me:24741: creating $CONFIG_STATUS" >&5
24742 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24743 cat >$CONFIG_STATUS <<_ACEOF
24744 #! $SHELL
24745 # Generated automatically by configure.
24746 # Run this file to recreate the current configuration.
24747 # Compiler output produced by configure, useful for debugging
24748 # configure, is in config.log if it exists.
24749
24750 debug=false
24751 SHELL=\${CONFIG_SHELL-$SHELL}
24752 ac_cs_invocation="\$0 \$@"
24753
24754 _ACEOF
24755
24756 cat >>$CONFIG_STATUS <<\_ACEOF
24757 # Be Bourne compatible
24758 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24759   emulate sh
24760   NULLCMD=:
24761 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24762   set -o posix
24763 fi
24764
24765 # Name of the executable.
24766 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24767
24768 if expr a : '\(a\)' >/dev/null 2>&1; then
24769   as_expr=expr
24770 else
24771   as_expr=false
24772 fi
24773
24774 rm -f conf$$ conf$$.exe conf$$.file
24775 echo >conf$$.file
24776 if ln -s conf$$.file conf$$ 2>/dev/null; then
24777   # We could just check for DJGPP; but this test a) works b) is more generic
24778   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24779   if test -f conf$$.exe; then
24780     # Don't use ln at all; we don't have any links
24781     as_ln_s='cp -p'
24782   else
24783     as_ln_s='ln -s'
24784   fi
24785 elif ln conf$$.file conf$$ 2>/dev/null; then
24786   as_ln_s=ln
24787 else
24788   as_ln_s='cp -p'
24789 fi
24790 rm -f conf$$ conf$$.exe conf$$.file
24791
24792 as_executable_p="test -f"
24793
24794 # Support unset when possible.
24795 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24796   as_unset=unset
24797 else
24798   as_unset=false
24799 fi
24800
24801 # NLS nuisances.
24802 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24803 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24804 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24805 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24806 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24807 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24808 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24809 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24810
24811 # IFS
24812 # We need space, tab and new line, in precisely that order.
24813 as_nl='
24814 '
24815 IFS="   $as_nl"
24816
24817 # CDPATH.
24818 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24819
24820 exec 6>&1
24821
24822 _ACEOF
24823
24824 # Files that config.status was made for.
24825 if test -n "$ac_config_files"; then
24826   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24827 fi
24828
24829 if test -n "$ac_config_headers"; then
24830   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
24831 fi
24832
24833 if test -n "$ac_config_links"; then
24834   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
24835 fi
24836
24837 if test -n "$ac_config_commands"; then
24838   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
24839 fi
24840
24841 cat >>$CONFIG_STATUS <<\EOF
24842
24843 ac_cs_usage="\
24844 \`$as_me' instantiates files from templates according to the
24845 current configuration.
24846
24847 Usage: $0 [OPTIONS] [FILE]...
24848
24849   -h, --help       print this help, then exit
24850   -V, --version    print version number, then exit
24851   -d, --debug      don't remove temporary files
24852       --recheck    update $as_me by reconfiguring in the same conditions
24853   --file=FILE[:TEMPLATE]
24854                    instantiate the configuration file FILE
24855   --header=FILE[:TEMPLATE]
24856                    instantiate the configuration header FILE
24857
24858 Configuration files:
24859 $config_files
24860
24861 Configuration headers:
24862 $config_headers
24863
24864 Configuration commands:
24865 $config_commands
24866
24867 Report bugs to <dickey@invisible-island.net>."
24868 EOF
24869
24870 cat >>$CONFIG_STATUS <<EOF
24871 ac_cs_version="\\
24872 config.status
24873 configured by $0, generated by GNU Autoconf 2.52.20170501,
24874   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24875
24876 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24877 Free Software Foundation, Inc.
24878 This config.status script is free software; the Free Software Foundation
24879 gives unlimited permission to copy, distribute and modify it."
24880 srcdir=$srcdir
24881 INSTALL="$INSTALL"
24882 EOF
24883
24884 cat >>$CONFIG_STATUS <<\EOF
24885 # If no file are specified by the user, then we need to provide default
24886 # value.  By we need to know if files were specified by the user.
24887 ac_need_defaults=:
24888 while test $# != 0
24889 do
24890   case $1 in
24891   --*=*)
24892     ac_option=`expr "x$1" : 'x\([^=]*\)='`
24893     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24894     shift
24895     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24896     shift
24897     ;;
24898   -*);;
24899   *) # This is not an option, so the user has probably given explicit
24900      # arguments.
24901      ac_need_defaults=false;;
24902   esac
24903
24904   case $1 in
24905   # Handling of the options.
24906 EOF
24907 cat >>$CONFIG_STATUS <<EOF
24908   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24909     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24910     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24911 EOF
24912 cat >>$CONFIG_STATUS <<\EOF
24913   --version | --vers* | -V )
24914     echo "$ac_cs_version"; exit 0 ;;
24915   --he | --h)
24916     # Conflict between --help and --header
24917     { { echo "$as_me:24917: error: ambiguous option: $1
24918 Try \`$0 --help' for more information." >&5
24919 echo "$as_me: error: ambiguous option: $1
24920 Try \`$0 --help' for more information." >&2;}
24921    { (exit 1); exit 1; }; };;
24922   --help | --hel | -h )
24923     echo "$ac_cs_usage"; exit 0 ;;
24924   --debug | --d* | -d )
24925     debug=: ;;
24926   --file | --fil | --fi | --f )
24927     shift
24928     CONFIG_FILES="$CONFIG_FILES $1"
24929     ac_need_defaults=false;;
24930   --header | --heade | --head | --hea )
24931     shift
24932     CONFIG_HEADERS="$CONFIG_HEADERS $1"
24933     ac_need_defaults=false;;
24934
24935   # This is an error.
24936   -*) { { echo "$as_me:24936: error: unrecognized option: $1
24937 Try \`$0 --help' for more information." >&5
24938 echo "$as_me: error: unrecognized option: $1
24939 Try \`$0 --help' for more information." >&2;}
24940    { (exit 1); exit 1; }; } ;;
24941
24942   *) ac_config_targets="$ac_config_targets $1" ;;
24943
24944   esac
24945   shift
24946 done
24947
24948 exec 5>>config.log
24949 cat >&5 << _ACEOF
24950
24951 ## ----------------------- ##
24952 ## Running config.status.  ##
24953 ## ----------------------- ##
24954
24955 This file was extended by $as_me 2.52.20170501, executed with
24956   CONFIG_FILES    = $CONFIG_FILES
24957   CONFIG_HEADERS  = $CONFIG_HEADERS
24958   CONFIG_LINKS    = $CONFIG_LINKS
24959   CONFIG_COMMANDS = $CONFIG_COMMANDS
24960   > $ac_cs_invocation
24961 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24962
24963 _ACEOF
24964 EOF
24965
24966 cat >>$CONFIG_STATUS <<EOF
24967 #
24968 # INIT-COMMANDS section.
24969 #
24970
24971 ### Special initialization commands, used to pass information from the
24972 ### configuration-run into config.status
24973
24974 AWK="$AWK"
24975 ALTERNATE_SYMS="$ALTERNATE_SYMS"
24976 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
24977 DFT_LWR_MODEL="$DFT_LWR_MODEL"
24978 ECHO_LD="$ECHO_LD"
24979 EXTRA_SUFFIX="$EXTRA_SUFFIX"
24980 LDCONFIG="$LDCONFIG"
24981 LIBTOOL_VERSION="$LIBTOOL_VERSION"
24982 LIB_NAME="$LIB_NAME"
24983 LIB_PREFIX="$LIB_PREFIX"
24984 LIB_SUBSETS="$LIB_SUBSETS"
24985 LIB_SUFFIX="$LIB_SUFFIX"
24986 LIB_TRACING="$LIB_TRACING"
24987 LN_S="$LN_S"
24988 MAKE_TERMINFO="$MAKE_TERMINFO"
24989 NCURSES_MAJOR="$NCURSES_MAJOR"
24990 NCURSES_MINOR="$NCURSES_MINOR"
24991 NCURSES_OSPEED="$NCURSES_OSPEED"
24992 NCURSES_PATCH="$NCURSES_PATCH"
24993 SRC_SUBDIRS="$SRC_SUBDIRS"
24994 TERMINFO="$TERMINFO"
24995 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
24996 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
24997 TICS_NAME="$TICS_NAME"
24998 TICS_SUFFIX="$TICS_SUFFIX"
24999 TIC_PATH="$TIC_PATH"
25000 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
25001 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
25002 TINFO_NAME="$TINFO_NAME"
25003 TINFO_SUFFIX="$TINFO_SUFFIX"
25004 UNALTERED_SYMS="$UNALTERED_SYMS"
25005 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
25006 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
25007 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
25008 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
25009 WILDCARD_SYMS="$WILDCARD_SYMS"
25010 WITH_CURSES_H="$with_curses_h"
25011 WITH_ECHO="${enable_echo:=yes}"
25012 WITH_OVERWRITE="$with_overwrite"
25013 cf_LIST_MODELS="$cf_list_models"
25014 cf_cv_abi_version="$cf_cv_abi_version"
25015 cf_cv_do_relink="$cf_cv_do_relink"
25016 cf_cv_do_symlinks="$cf_cv_do_symlinks"
25017 cf_cv_enable_lp64="$cf_cv_enable_lp64"
25018 cf_cv_enable_opaque="$cf_cv_enable_opaque"
25019 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
25020 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
25021 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
25022 cf_cv_rel_version="$cf_cv_rel_version"
25023 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
25024 cf_cv_shared_soname='$cf_cv_shared_soname'
25025 cf_cv_shlib_version="$cf_cv_shlib_version"
25026 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
25027 cf_cv_system_name="$cf_cv_system_name"
25028 cf_cv_term_driver="$with_term_driver"
25029 cf_with_ada="$cf_with_ada"
25030 cf_with_cxx_binding="$cf_with_cxx_binding"
25031 cf_with_db_install="$cf_with_db_install"
25032 cf_with_manpages="$cf_with_manpages"
25033 cf_with_tests="$cf_with_tests"
25034 host="$host"
25035 target="$target"
25036 with_shared_cxx="$with_shared_cxx"
25037
25038 EOF
25039
25040 cat >>$CONFIG_STATUS <<\EOF
25041 for ac_config_target in $ac_config_targets
25042 do
25043   case "$ac_config_target" in
25044   # Handling of arguments.
25045   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
25046   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
25047   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
25048   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
25049   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
25050   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
25051   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
25052   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25053   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25054   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
25055   *) { { echo "$as_me:25055: error: invalid argument: $ac_config_target" >&5
25056 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25057    { (exit 1); exit 1; }; };;
25058   esac
25059 done
25060
25061 # If the user did not use the arguments to specify the items to instantiate,
25062 # then the envvar interface is used.  Set only those that are not.
25063 # We use the long form for the default assignment because of an extremely
25064 # bizarre bug on SunOS 4.1.3.
25065 if $ac_need_defaults; then
25066   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25067   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25068   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25069 fi
25070
25071 # Create a temporary directory, and hook for its removal unless debugging.
25072 $debug ||
25073 {
25074   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25075   trap '{ (exit 1); exit 1; }' 1 2 13 15
25076 }
25077
25078 # Create a (secure) tmp directory for tmp files.
25079 : ${TMPDIR=/tmp}
25080 {
25081   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25082   test -n "$tmp" && test -d "$tmp"
25083 }  ||
25084 {
25085   tmp=$TMPDIR/cs$$-$RANDOM
25086   (umask 077 && mkdir $tmp)
25087 } ||
25088 {
25089    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25090    { (exit 1); exit 1; }
25091 }
25092
25093 EOF
25094
25095 cat >>$CONFIG_STATUS <<EOF
25096
25097 #
25098 # CONFIG_FILES section.
25099 #
25100
25101 # No need to generate the scripts if there are no CONFIG_FILES.
25102 # This happens for instance when ./config.status config.h
25103 if test -n "\$CONFIG_FILES"; then
25104   # Protect against being on the right side of a sed subst in config.status.
25105   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25106    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25107 s,@SHELL@,$SHELL,;t t
25108 s,@exec_prefix@,$exec_prefix,;t t
25109 s,@prefix@,$prefix,;t t
25110 s,@program_transform_name@,$program_transform_name,;t t
25111 s,@bindir@,$bindir,;t t
25112 s,@sbindir@,$sbindir,;t t
25113 s,@libexecdir@,$libexecdir,;t t
25114 s,@datarootdir@,$datarootdir,;t t
25115 s,@datadir@,$datadir,;t t
25116 s,@sysconfdir@,$sysconfdir,;t t
25117 s,@sharedstatedir@,$sharedstatedir,;t t
25118 s,@localstatedir@,$localstatedir,;t t
25119 s,@libdir@,$libdir,;t t
25120 s,@includedir@,$includedir,;t t
25121 s,@oldincludedir@,$oldincludedir,;t t
25122 s,@infodir@,$infodir,;t t
25123 s,@mandir@,$mandir,;t t
25124 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25125 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25126 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25127 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25128 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25129 s,@build_alias@,$build_alias,;t t
25130 s,@host_alias@,$host_alias,;t t
25131 s,@target_alias@,$target_alias,;t t
25132 s,@ECHO_C@,$ECHO_C,;t t
25133 s,@ECHO_N@,$ECHO_N,;t t
25134 s,@ECHO_T@,$ECHO_T,;t t
25135 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25136 s,@DEFS@,$DEFS,;t t
25137 s,@LIBS@,$LIBS,;t t
25138 s,@top_builddir@,$top_builddir,;t t
25139 s,@EGREP@,$EGREP,;t t
25140 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
25141 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
25142 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
25143 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
25144 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
25145 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
25146 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
25147 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
25148 s,@VERSION@,$VERSION,;t t
25149 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25150 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25151 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25152 s,@PACKAGE@,$PACKAGE,;t t
25153 s,@build@,$build,;t t
25154 s,@build_cpu@,$build_cpu,;t t
25155 s,@build_vendor@,$build_vendor,;t t
25156 s,@build_os@,$build_os,;t t
25157 s,@host@,$host,;t t
25158 s,@host_cpu@,$host_cpu,;t t
25159 s,@host_vendor@,$host_vendor,;t t
25160 s,@host_os@,$host_os,;t t
25161 s,@target@,$target,;t t
25162 s,@target_cpu@,$target_cpu,;t t
25163 s,@target_vendor@,$target_vendor,;t t
25164 s,@target_os@,$target_os,;t t
25165 s,@CC@,$CC,;t t
25166 s,@CFLAGS@,$CFLAGS,;t t
25167 s,@LDFLAGS@,$LDFLAGS,;t t
25168 s,@CPPFLAGS@,$CPPFLAGS,;t t
25169 s,@ac_ct_CC@,$ac_ct_CC,;t t
25170 s,@EXEEXT@,$EXEEXT,;t t
25171 s,@OBJEXT@,$OBJEXT,;t t
25172 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25173 s,@CPP@,$CPP,;t t
25174 s,@LDCONFIG@,$LDCONFIG,;t t
25175 s,@CXX@,$CXX,;t t
25176 s,@CXXFLAGS@,$CXXFLAGS,;t t
25177 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
25178 s,@AWK@,$AWK,;t t
25179 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25180 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25181 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25182 s,@LINT@,$LINT,;t t
25183 s,@LINT_OPTS@,$LINT_OPTS,;t t
25184 s,@LN_S@,$LN_S,;t t
25185 s,@cf_config_suffix@,$cf_config_suffix,;t t
25186 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25187 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25188 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
25189 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
25190 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
25191 s,@SET_MAKE@,$SET_MAKE,;t t
25192 s,@CTAGS@,$CTAGS,;t t
25193 s,@ETAGS@,$ETAGS,;t t
25194 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25195 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25196 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25197 s,@RANLIB@,$RANLIB,;t t
25198 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25199 s,@LD@,$LD,;t t
25200 s,@ac_ct_LD@,$ac_ct_LD,;t t
25201 s,@AR@,$AR,;t t
25202 s,@ac_ct_AR@,$ac_ct_AR,;t t
25203 s,@NM@,$NM,;t t
25204 s,@ac_ct_NM@,$ac_ct_NM,;t t
25205 s,@ARFLAGS@,$ARFLAGS,;t t
25206 s,@DESTDIR@,$DESTDIR,;t t
25207 s,@BUILD_CC@,$BUILD_CC,;t t
25208 s,@BUILD_CPP@,$BUILD_CPP,;t t
25209 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
25210 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
25211 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
25212 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
25213 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
25214 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
25215 s,@cf_list_models@,$cf_list_models,;t t
25216 s,@ABI_VERSION@,$ABI_VERSION,;t t
25217 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25218 s,@LIBTOOL@,$LIBTOOL,;t t
25219 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25220 s,@LT_UNDEF@,$LT_UNDEF,;t t
25221 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25222 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25223 s,@LIB_CREATE@,$LIB_CREATE,;t t
25224 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25225 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25226 s,@LIB_PREP@,$LIB_PREP,;t t
25227 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25228 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25229 s,@LIB_LINK@,$LIB_LINK,;t t
25230 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25231 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25232 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25233 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
25234 s,@TICS_NAME@,$TICS_NAME,;t t
25235 s,@TINFO_NAME@,$TINFO_NAME,;t t
25236 s,@LIB_NAME@,$LIB_NAME,;t t
25237 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25238 s,@CC_G_OPT@,$CC_G_OPT,;t t
25239 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
25240 s,@LD_MODEL@,$LD_MODEL,;t t
25241 s,@shlibdir@,$shlibdir,;t t
25242 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25243 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25244 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25245 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25246 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25247 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25248 s,@LINK_PROGS@,$LINK_PROGS,;t t
25249 s,@LINK_TESTS@,$LINK_TESTS,;t t
25250 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25251 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25252 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25253 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25254 s,@RPATH_LIST@,$RPATH_LIST,;t t
25255 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25256 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25257 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25258 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25259 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25260 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
25261 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
25262 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
25263 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
25264 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
25265 s,@XTERM_KBS@,$XTERM_KBS,;t t
25266 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
25267 s,@TERMINFO@,$TERMINFO,;t t
25268 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
25269 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
25270 s,@TERMPATH@,$TERMPATH,;t t
25271 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
25272 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
25273 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
25274 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
25275 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
25276 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
25277 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
25278 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
25279 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
25280 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
25281 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
25282 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
25283 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
25284 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
25285 s,@RGB_PATH@,$RGB_PATH,;t t
25286 s,@no_x11_rgb@,$no_x11_rgb,;t t
25287 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
25288 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
25289 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
25290 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
25291 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
25292 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
25293 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
25294 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
25295 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
25296 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
25297 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
25298 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
25299 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
25300 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
25301 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
25302 s,@PTHREAD@,$PTHREAD,;t t
25303 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
25304 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
25305 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
25306 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
25307 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
25308 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
25309 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
25310 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
25311 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
25312 s,@ECHO_LT@,$ECHO_LT,;t t
25313 s,@ECHO_LD@,$ECHO_LD,;t t
25314 s,@RULE_CC@,$RULE_CC,;t t
25315 s,@SHOW_CC@,$SHOW_CC,;t t
25316 s,@ECHO_CC@,$ECHO_CC,;t t
25317 s,@ECHO_LINK@,$ECHO_LINK,;t t
25318 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
25319 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
25320 s,@ADAFLAGS@,$ADAFLAGS,;t t
25321 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25322 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
25323 s,@ADA_TRACE@,$ADA_TRACE,;t t
25324 s,@MATH_LIB@,$MATH_LIB,;t t
25325 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
25326 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
25327 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
25328 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
25329 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
25330 s,@TEST_LIBS@,$TEST_LIBS,;t t
25331 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
25332 s,@CXXCPP@,$CXXCPP,;t t
25333 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
25334 s,@CXX_AR@,$CXX_AR,;t t
25335 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
25336 s,@CXXLIBS@,$CXXLIBS,;t t
25337 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
25338 s,@gnatmake_exists@,$gnatmake_exists,;t t
25339 s,@gprconfig_exists@,$gprconfig_exists,;t t
25340 s,@M4_exists@,$M4_exists,;t t
25341 s,@cf_ada_make@,$cf_ada_make,;t t
25342 s,@cf_ada_config@,$cf_ada_config,;t t
25343 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
25344 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
25345 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
25346 s,@cf_compile_generics@,$cf_compile_generics,;t t
25347 s,@cf_generic_objects@,$cf_generic_objects,;t t
25348 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
25349 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
25350 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
25351 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
25352 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
25353 s,@cf_ada_package@,$cf_ada_package,;t t
25354 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
25355 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
25356 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
25357 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
25358 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
25359 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
25360 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25361 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
25362 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
25363 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
25364 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
25365 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
25366 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
25367 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
25368 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
25369 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
25370 s,@TICS_LIBS@,$TICS_LIBS,;t t
25371 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
25372 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
25373 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
25374 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
25375 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
25376 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
25377 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
25378 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
25379 s,@includesubdir@,$includesubdir,;t t
25380 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
25381 s,@TICS_LIST@,$TICS_LIST,;t t
25382 s,@TINFO_LIST@,$TINFO_LIST,;t t
25383 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
25384 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
25385 s,@TEST_ARGS@,$TEST_ARGS,;t t
25386 s,@TEST_DEPS@,$TEST_DEPS,;t t
25387 s,@TEST_ARG2@,$TEST_ARG2,;t t
25388 s,@TEST_DEP2@,$TEST_DEP2,;t t
25389 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
25390 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
25391 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
25392 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
25393 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
25394 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
25395 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
25396 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
25397 s,@cross_compiling@,$cross_compiling,;t t
25398 s,@TIC_PATH@,$TIC_PATH,;t t
25399 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
25400 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
25401 s,@PANEL_NAME@,$PANEL_NAME,;t t
25402 s,@MENU_NAME@,$MENU_NAME,;t t
25403 s,@FORM_NAME@,$FORM_NAME,;t t
25404 s,@CXX_NAME@,$CXX_NAME,;t t
25405 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
25406 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
25407 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
25408 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
25409 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
25410 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
25411 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
25412 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
25413 CEOF
25414
25415 EOF
25416
25417   cat >>$CONFIG_STATUS <<\EOF
25418   # Split the substitutions into bite-sized pieces for seds with
25419   # small command number limits, like on Digital OSF/1 and HP-UX.
25420   ac_max_sed_lines=48
25421   ac_sed_frag=1 # Number of current file.
25422   ac_beg=1 # First line for current file.
25423   ac_end=$ac_max_sed_lines # Line after last line for current file.
25424   ac_more_lines=:
25425   ac_sed_cmds=
25426   while $ac_more_lines; do
25427     if test $ac_beg -gt 1; then
25428       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25429     else
25430       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25431     fi
25432     if test ! -s $tmp/subs.frag; then
25433       ac_more_lines=false
25434     else
25435       # The purpose of the label and of the branching condition is to
25436       # speed up the sed processing (if there are no `@' at all, there
25437       # is no need to browse any of the substitutions).
25438       # These are the two extra sed commands mentioned above.
25439       (echo ':t
25440   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25441       # It is possible to make a multiline substitution using escaped newlines.
25442       # Ensure that we do not split the substitution between script fragments.
25443       ac_BEG=$ac_end
25444       ac_END=`expr $ac_end + $ac_max_sed_lines`
25445       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25446       if test -s $tmp/subs.next; then
25447         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25448         if test ! -s $tmp/subs.edit; then
25449           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25450           if test ! -s $tmp/subs.edit; then
25451             if test $ac_beg -gt 1; then
25452               ac_end=`expr $ac_end - 1`
25453               continue
25454             fi
25455           fi
25456         fi
25457       fi
25458
25459       if test -z "$ac_sed_cmds"; then
25460         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25461       else
25462         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25463       fi
25464       ac_sed_frag=`expr $ac_sed_frag + 1`
25465       ac_beg=$ac_end
25466       ac_end=`expr $ac_end + $ac_max_sed_lines`
25467     fi
25468   done
25469   if test -z "$ac_sed_cmds"; then
25470     ac_sed_cmds=cat
25471   fi
25472 fi # test -n "$CONFIG_FILES"
25473
25474 EOF
25475 cat >>$CONFIG_STATUS <<\EOF
25476 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25477   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25478   case $ac_file in
25479   - | *:- | *:-:* ) # input from stdin
25480         cat >$tmp/stdin
25481         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25482         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25483   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25484         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25485   * )   ac_file_in=$ac_file.in ;;
25486   esac
25487
25488   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25489   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25490          X"$ac_file" : 'X\(//\)[^/]' \| \
25491          X"$ac_file" : 'X\(//\)$' \| \
25492          X"$ac_file" : 'X\(/\)' \| \
25493          .     : '\(.\)' 2>/dev/null ||
25494 echo X"$ac_file" |
25495     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25496           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25497           /^X\(\/\/\)$/{ s//\1/; q; }
25498           /^X\(\/\).*/{ s//\1/; q; }
25499           s/.*/./; q'`
25500   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25501     { case "$ac_dir" in
25502   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25503   *)                      as_incr_dir=.;;
25504 esac
25505 as_dummy="$ac_dir"
25506 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25507   case $as_mkdir_dir in
25508     # Skip DOS drivespec
25509     ?:) as_incr_dir=$as_mkdir_dir ;;
25510     *)
25511       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25512       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25513     ;;
25514   esac
25515 done; }
25516
25517     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25518     # A "../" for each directory in $ac_dir_suffix.
25519     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25520   else
25521     ac_dir_suffix= ac_dots=
25522   fi
25523
25524   case $srcdir in
25525   .)  ac_srcdir=.
25526       if test -z "$ac_dots"; then
25527          ac_top_srcdir=.
25528       else
25529          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25530       fi ;;
25531   [\\/]* | ?:[\\/]* )
25532       ac_srcdir=$srcdir$ac_dir_suffix;
25533       ac_top_srcdir=$srcdir ;;
25534   *) # Relative path.
25535     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25536     ac_top_srcdir=$ac_dots$srcdir ;;
25537   esac
25538
25539   case $INSTALL in
25540   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25541   *) ac_INSTALL=$ac_dots$INSTALL ;;
25542   esac
25543
25544   if test x"$ac_file" != x-; then
25545     { echo "$as_me:25545: creating $ac_file" >&5
25546 echo "$as_me: creating $ac_file" >&6;}
25547     rm -f "$ac_file"
25548   fi
25549   # Let's still pretend it is `configure' which instantiates (i.e., don't
25550   # use $as_me), people would be surprised to read:
25551   #    /* config.h.  Generated automatically by config.status.  */
25552   configure_input="Generated automatically from `echo $ac_file_in |
25553                                                  sed 's,.*/,,'` by configure."
25554
25555   # First look for the input files in the build tree, otherwise in the
25556   # src tree.
25557   ac_file_inputs=`IFS=:
25558     for f in $ac_file_in; do
25559       case $f in
25560       -) echo $tmp/stdin ;;
25561       [\\/$]*)
25562          # Absolute (can't be DOS-style, as IFS=:)
25563          test -f "$f" || { { echo "$as_me:25563: error: cannot find input file: $f" >&5
25564 echo "$as_me: error: cannot find input file: $f" >&2;}
25565    { (exit 1); exit 1; }; }
25566          echo $f;;
25567       *) # Relative
25568          if test -f "$f"; then
25569            # Build tree
25570            echo $f
25571          elif test -f "$srcdir/$f"; then
25572            # Source tree
25573            echo $srcdir/$f
25574          else
25575            # /dev/null tree
25576            { { echo "$as_me:25576: error: cannot find input file: $f" >&5
25577 echo "$as_me: error: cannot find input file: $f" >&2;}
25578    { (exit 1); exit 1; }; }
25579          fi;;
25580       esac
25581     done` || { (exit 1); exit 1; }
25582 EOF
25583 cat >>$CONFIG_STATUS <<\EOF
25584   ac_warn_datarootdir=no
25585   if test x"$ac_file" != x-; then
25586     for ac_item in $ac_file_inputs
25587     do
25588       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25589       if test -n "$ac_seen"; then
25590         ac_used=`grep '@datarootdir@' $ac_item`
25591         if test -z "$ac_used"; then
25592           { echo "$as_me:25592: WARNING: datarootdir was used implicitly but not set:
25593 $ac_seen" >&5
25594 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25595 $ac_seen" >&2;}
25596           ac_warn_datarootdir=yes
25597         fi
25598       fi
25599       ac_seen=`grep '${datarootdir}' $ac_item`
25600       if test -n "$ac_seen"; then
25601         { echo "$as_me:25601: WARNING: datarootdir was used explicitly but not set:
25602 $ac_seen" >&5
25603 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25604 $ac_seen" >&2;}
25605         ac_warn_datarootdir=yes
25606       fi
25607     done
25608   fi
25609
25610 if test "x$ac_warn_datarootdir" = xyes; then
25611   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25612 fi
25613
25614 EOF
25615 cat >>$CONFIG_STATUS <<EOF
25616   sed "$ac_vpsub
25617 $extrasub
25618 EOF
25619 cat >>$CONFIG_STATUS <<\EOF
25620 :t
25621 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25622 s,@configure_input@,$configure_input,;t t
25623 s,@srcdir@,$ac_srcdir,;t t
25624 s,@top_srcdir@,$ac_top_srcdir,;t t
25625 s,@INSTALL@,$ac_INSTALL,;t t
25626 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25627   rm -f $tmp/stdin
25628   if test x"$ac_file" != x-; then
25629     cp $tmp/out $ac_file
25630
25631     for ac_name in prefix exec_prefix datarootdir
25632     do
25633         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25634         if test -n "$ac_seen"; then
25635             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25636             if test -z "$ac_init"; then
25637               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25638               { echo "$as_me:25638: WARNING: Variable $ac_name is used but was not set:
25639 $ac_seen" >&5
25640 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25641 $ac_seen" >&2;}
25642             fi
25643         fi
25644     done
25645     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25646     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25647     if test -s $tmp/out; then
25648       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25649       { echo "$as_me:25649: WARNING: Some variables may not be substituted:
25650 $ac_seen" >&5
25651 echo "$as_me: WARNING: Some variables may not be substituted:
25652 $ac_seen" >&2;}
25653     fi
25654   else
25655     cat $tmp/out
25656   fi
25657   rm -f $tmp/out
25658
25659 done
25660 EOF
25661 cat >>$CONFIG_STATUS <<\EOF
25662
25663 #
25664 # CONFIG_HEADER section.
25665 #
25666
25667 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25668 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25669 #
25670 # ac_d sets the value in "#define NAME VALUE" lines.
25671 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25672 ac_dB='[        ].*$,\1#\2'
25673 ac_dC=' '
25674 ac_dD=',;t'
25675 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25676 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25677 ac_iB='\([      ]\),\1#\2define\3'
25678 ac_iC=' '
25679 ac_iD='\4,;t'
25680 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25681 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25682 ac_uB='$,\1#\2define\3'
25683 ac_uC=' '
25684 ac_uD=',;t'
25685
25686 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25687   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25688   case $ac_file in
25689   - | *:- | *:-:* ) # input from stdin
25690         cat >$tmp/stdin
25691         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25692         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25693   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25694         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25695   * )   ac_file_in=$ac_file.in ;;
25696   esac
25697
25698   test x"$ac_file" != x- && { echo "$as_me:25698: creating $ac_file" >&5
25699 echo "$as_me: creating $ac_file" >&6;}
25700
25701   # First look for the input files in the build tree, otherwise in the
25702   # src tree.
25703   ac_file_inputs=`IFS=:
25704     for f in $ac_file_in; do
25705       case $f in
25706       -) echo $tmp/stdin ;;
25707       [\\/$]*)
25708          # Absolute (can't be DOS-style, as IFS=:)
25709          test -f "$f" || { { echo "$as_me:25709: error: cannot find input file: $f" >&5
25710 echo "$as_me: error: cannot find input file: $f" >&2;}
25711    { (exit 1); exit 1; }; }
25712          echo $f;;
25713       *) # Relative
25714          if test -f "$f"; then
25715            # Build tree
25716            echo $f
25717          elif test -f "$srcdir/$f"; then
25718            # Source tree
25719            echo $srcdir/$f
25720          else
25721            # /dev/null tree
25722            { { echo "$as_me:25722: error: cannot find input file: $f" >&5
25723 echo "$as_me: error: cannot find input file: $f" >&2;}
25724    { (exit 1); exit 1; }; }
25725          fi;;
25726       esac
25727     done` || { (exit 1); exit 1; }
25728   # Remove the trailing spaces.
25729   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25730
25731 EOF
25732
25733 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25734 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25735 # be either 'cat' or 'sort'.
25736 cat confdefs.h | uniq >conftest.vals
25737
25738 # Break up conftest.vals because some shells have a limit on
25739 # the size of here documents, and old seds have small limits too.
25740
25741 rm -f conftest.tail
25742 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25743 while grep . conftest.vals >/dev/null
25744 do
25745   # Write chunks of a limited-size here document to conftest.frag.
25746   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25747   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25748   echo 'CEOF' >> $CONFIG_STATUS
25749   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25750   rm -f conftest.vals
25751   mv conftest.tail conftest.vals
25752 done
25753 rm -f conftest.vals
25754
25755 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25756 # marker @DEFS@.
25757 echo '  cat >> conftest.edit <<CEOF
25758 /@DEFS@/r conftest.frag
25759 /@DEFS@/d
25760 CEOF
25761 sed -f conftest.edit $tmp/in > $tmp/out
25762 rm -f $tmp/in
25763 mv $tmp/out $tmp/in
25764 rm -f conftest.edit conftest.frag
25765 ' >> $CONFIG_STATUS
25766
25767 cat >>$CONFIG_STATUS <<\EOF
25768   # Let's still pretend it is `configure' which instantiates (i.e., don't
25769   # use $as_me), people would be surprised to read:
25770   #    /* config.h.  Generated automatically by config.status.  */
25771   if test x"$ac_file" = x-; then
25772     echo "/* Generated automatically by configure.  */" >$tmp/config.h
25773   else
25774     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25775   fi
25776   cat $tmp/in >>$tmp/config.h
25777   rm -f $tmp/in
25778   if test x"$ac_file" != x-; then
25779     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25780       { echo "$as_me:25780: $ac_file is unchanged" >&5
25781 echo "$as_me: $ac_file is unchanged" >&6;}
25782     else
25783       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25784          X"$ac_file" : 'X\(//\)[^/]' \| \
25785          X"$ac_file" : 'X\(//\)$' \| \
25786          X"$ac_file" : 'X\(/\)' \| \
25787          .     : '\(.\)' 2>/dev/null ||
25788 echo X"$ac_file" |
25789     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25790           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25791           /^X\(\/\/\)$/{ s//\1/; q; }
25792           /^X\(\/\).*/{ s//\1/; q; }
25793           s/.*/./; q'`
25794       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25795         { case "$ac_dir" in
25796   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25797   *)                      as_incr_dir=.;;
25798 esac
25799 as_dummy="$ac_dir"
25800 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25801   case $as_mkdir_dir in
25802     # Skip DOS drivespec
25803     ?:) as_incr_dir=$as_mkdir_dir ;;
25804     *)
25805       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25806       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25807     ;;
25808   esac
25809 done; }
25810
25811       fi
25812       rm -f $ac_file
25813       mv $tmp/config.h $ac_file
25814     fi
25815   else
25816     cat $tmp/config.h
25817     rm -f $tmp/config.h
25818   fi
25819 done
25820 EOF
25821 cat >>$CONFIG_STATUS <<\EOF
25822 #
25823 # CONFIG_COMMANDS section.
25824 #
25825 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25826   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25827   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25828
25829   case $ac_dest in
25830     default )
25831 if test "x$cf_with_tests" != xno ; then
25832
25833 for cf_dir in test
25834 do
25835         if test ! -d $srcdir/$cf_dir; then
25836                 continue
25837         elif test -f $srcdir/$cf_dir/programs; then
25838                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
25839         fi
25840 done
25841
25842 fi
25843
25844 cf_prefix=$LIB_PREFIX
25845
25846 case $cf_cv_shlib_version in
25847 (cygdll|msysdll|mingw)
25848         TINFO_NAME=$TINFO_ARG_SUFFIX
25849         TINFO_SUFFIX=.dll
25850         ;;
25851 esac
25852
25853 if test -n "$TINFO_SUFFIX" ; then
25854         case $TINFO_SUFFIX in
25855         (tw*)
25856                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
25857                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
25858                 ;;
25859         (t*)
25860                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
25861                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
25862                 ;;
25863         (w*)
25864                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
25865                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
25866                 ;;
25867         esac
25868 fi
25869
25870 for cf_dir in $SRC_SUBDIRS
25871 do
25872         if test ! -d $srcdir/$cf_dir ; then
25873                 continue
25874         elif test -f $srcdir/$cf_dir/modules; then
25875
25876                 SHARED_LIB=
25877                 Libs_To_Make=
25878                 cf_awk_program=
25879                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
25880                 then
25881                         cf_awk_program="$cf_awk_program\
25882 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
25883 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
25884 "
25885                 fi
25886
25887                 if test "x$WILDCARD_SYMS" = xno
25888                 then
25889                         cf_awk_program="$cf_awk_program\
25890 /[      ]_\\*;/ { skip=1; next; }\
25891 "
25892                 fi
25893
25894                 if test "x$cf_awk_program" != "x"
25895                 then
25896                         cat >>$cf_dir/Makefile <<CF_EOF
25897
25898 # Generated by CF_LIB_RULES
25899 resulting.map: $UNALTERED_SYMS
25900         $AWK 'BEGIN { skip = 1; last=""; } \
25901 $cf_awk_program \
25902 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
25903  skip = 0; last = \$\$0; } \
25904 END { print last; }' < $UNALTERED_SYMS >\$@
25905
25906 distclean::
25907         rm -f resulting.map
25908 CF_EOF
25909                 fi
25910
25911                 for cf_item in $cf_LIST_MODELS
25912                 do
25913
25914         case X$cf_item in
25915         (Xlibtool)
25916                 cf_suffix='.la'
25917                 cf_depsuf=$cf_suffix
25918                 ;;
25919         (Xdebug)
25920                 cf_suffix='_g.a'
25921                 cf_depsuf=$cf_suffix
25922                 ;;
25923         (Xprofile)
25924                 cf_suffix='_p.a'
25925                 cf_depsuf=$cf_suffix
25926                 ;;
25927         (Xshared)
25928                 case $cf_cv_system_name in
25929                 (aix[5-7]*)
25930                         cf_suffix='.so'
25931                         cf_depsuf=$cf_suffix
25932                         ;;
25933                 (cygwin*|msys*|mingw*)
25934                         cf_suffix='.dll'
25935                         cf_depsuf='.dll.a'
25936                         ;;
25937                 (darwin*)
25938                         cf_suffix='.dylib'
25939                         cf_depsuf=$cf_suffix
25940                         ;;
25941                 (hpux*)
25942                         case $target in
25943                         (ia64*)
25944                                 cf_suffix='.so'
25945                                 cf_depsuf=$cf_suffix
25946                                 ;;
25947                         (*)
25948                                 cf_suffix='.sl'
25949                                 cf_depsuf=$cf_suffix
25950                                 ;;
25951                         esac
25952                         ;;
25953                 (*)
25954                         cf_suffix='.so'
25955                         cf_depsuf=$cf_suffix
25956                         ;;
25957                 esac
25958                 ;;
25959         (*)
25960                 cf_suffix='.a'
25961                 cf_depsuf=$cf_suffix
25962                 ;;
25963         esac
25964         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25965         then
25966                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25967                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25968         fi
25969
25970                         cf_libname=$cf_dir
25971                         test "$cf_dir" = c++ && cf_libname=ncurses++
25972                         if test $cf_item = shared ; then
25973                                 if test -n "${LIB_SUFFIX}"
25974                                 then
25975                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25976                                 else
25977                                         cf_shared_suffix="$cf_suffix"
25978                                 fi
25979                                 if test "$cf_cv_do_symlinks" = yes ; then
25980                                         cf_version_name=
25981
25982                                         case "$cf_cv_shlib_version" in
25983                                         (rel)
25984                                                 cf_version_name=REL_VERSION
25985                                                 ;;
25986                                         (abi)
25987                                                 cf_version_name=ABI_VERSION
25988                                                 ;;
25989                                         esac
25990
25991                                         if test -n "$cf_version_name"
25992                                         then
25993                                                 case "$cf_cv_system_name" in
25994                                                 (darwin*)
25995                                                         # "w", etc?
25996                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
25997                                                         ;;
25998                                                 (*)
25999                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
26000                                                         ;;
26001                                                 esac
26002                                         fi
26003                                         if test -n "${USE_LIB_SUFFIX}"
26004                                         then
26005                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26006                                         else
26007                                                 cf_shared_suffix="$cf_suffix"
26008                                         fi
26009                                 fi
26010                                 # cygwin needs import library, and has unique naming convention
26011                                 # use autodetected ${cf_prefix} for import lib and static lib, but
26012                                 # use 'cyg' prefix for shared lib.
26013                                 case $cf_cv_shlib_version in
26014                                 (cygdll)
26015                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26016                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
26017                                         ;;
26018                                 (msysdll)
26019                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26020                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
26021                                         ;;
26022                                 (mingw)
26023                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26024                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
26025                                         ;;
26026                                 (*)
26027                                         cf_add_lib=
26028                                         ;;
26029                                 esac
26030                                 if test -n "$cf_add_lib"
26031                                 then
26032                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26033                                         continue
26034                                 fi
26035                         fi
26036                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
26037                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26038                 done
26039
26040                 if test $cf_dir = ncurses ; then
26041                         cf_subsets="$LIB_SUBSETS"
26042                         cf_r_parts="$cf_subsets"
26043                         cf_liblist="$Libs_To_Make"
26044
26045                         while test -n "$cf_r_parts"
26046                         do
26047                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
26048                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
26049                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
26050                                         cf_add_lib=
26051                                         case $cf_l_parts in
26052                                         (*termlib*)
26053                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
26054                                                 ;;
26055                                         (*ticlib*)
26056                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
26057                                                 ;;
26058                                         (*)
26059                                                 break
26060                                                 ;;
26061                                         esac
26062                                         if test -n "$cf_add_lib"; then
26063                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
26064                                         fi
26065                                 else
26066                                         break
26067                                 fi
26068                         done
26069                 else
26070                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
26071                 fi
26072
26073                 if test $cf_dir = c++; then
26074                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
26075                                 cf_list=
26076                                 for cf_item in $Libs_To_Make
26077                                 do
26078                                         case $cf_item in
26079                                         (*.a)
26080                                                 ;;
26081                                         (*)
26082                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
26083                                                 ;;
26084                                         esac
26085                                         for cf_test in $cf_list
26086                                         do
26087                                                 if test "$cf_test" = "$cf_item"
26088                                                 then
26089                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
26090                                                         cf_item=
26091                                                         break
26092                                                 fi
26093                                         done
26094                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
26095                                 done
26096                                 Libs_To_Make="$cf_list"
26097                         fi
26098                 fi
26099
26100                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
26101                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
26102                         $cf_dir/Makefile >$cf_dir/Makefile.out
26103                 mv $cf_dir/Makefile.out $cf_dir/Makefile
26104
26105                 $AWK -f $srcdir/mk-0th.awk \
26106                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
26107                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26108
26109                 for cf_subset in $cf_subsets
26110                 do
26111                         cf_subdirs=
26112                         for cf_item in $cf_LIST_MODELS
26113                         do
26114
26115                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
26116
26117 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26118
26119                         CXX_MODEL=$cf_ITEM
26120                         if test "$CXX_MODEL" = SHARED; then
26121                                 case $cf_cv_shlib_version in
26122                                 (cygdll|msysdll|mingw)
26123                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
26124
26125 echo "${as_me:-configure}:26125: testing overriding CXX_MODEL to SHARED ..." 1>&5
26126
26127                                         with_shared_cxx=yes
26128                                         ;;
26129                                 (*)
26130                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
26131                                         ;;
26132                                 esac
26133                         fi
26134
26135         case X$cf_item in
26136         (Xlibtool)
26137                 cf_suffix='.la'
26138                 cf_depsuf=$cf_suffix
26139                 ;;
26140         (Xdebug)
26141                 cf_suffix='_g.a'
26142                 cf_depsuf=$cf_suffix
26143                 ;;
26144         (Xprofile)
26145                 cf_suffix='_p.a'
26146                 cf_depsuf=$cf_suffix
26147                 ;;
26148         (Xshared)
26149                 case $cf_cv_system_name in
26150                 (aix[5-7]*)
26151                         cf_suffix='.so'
26152                         cf_depsuf=$cf_suffix
26153                         ;;
26154                 (cygwin*|msys*|mingw*)
26155                         cf_suffix='.dll'
26156                         cf_depsuf='.dll.a'
26157                         ;;
26158                 (darwin*)
26159                         cf_suffix='.dylib'
26160                         cf_depsuf=$cf_suffix
26161                         ;;
26162                 (hpux*)
26163                         case $target in
26164                         (ia64*)
26165                                 cf_suffix='.so'
26166                                 cf_depsuf=$cf_suffix
26167                                 ;;
26168                         (*)
26169                                 cf_suffix='.sl'
26170                                 cf_depsuf=$cf_suffix
26171                                 ;;
26172                         esac
26173                         ;;
26174                 (*)
26175                         cf_suffix='.so'
26176                         cf_depsuf=$cf_suffix
26177                         ;;
26178                 esac
26179                 ;;
26180         (*)
26181                 cf_suffix='.a'
26182                 cf_depsuf=$cf_suffix
26183                 ;;
26184         esac
26185         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26186         then
26187                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26188                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26189         fi
26190
26191         case $cf_item in
26192         (libtool) cf_subdir='obj_lo'  ;;
26193         (normal)  cf_subdir='objects' ;;
26194         (debug)   cf_subdir='obj_g' ;;
26195         (profile) cf_subdir='obj_p' ;;
26196         (shared)
26197                 case $cf_cv_system_name in
26198                 (cygwin|msys)
26199                         cf_subdir='objects' ;;
26200                 (*)
26201                         cf_subdir='obj_s' ;;
26202                 esac
26203         esac
26204
26205                         # Test for case where we build libtinfo with a different name.
26206                         cf_libname=$cf_dir
26207                         if test $cf_dir = ncurses ; then
26208                                 case $cf_subset in
26209                                 (*base*)
26210                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
26211                                         ;;
26212                                 (*termlib*)
26213                                         cf_libname=$TINFO_LIB_SUFFIX
26214                                         ;;
26215                                 (ticlib*)
26216                                         cf_libname=$TICS_LIB_SUFFIX
26217                                         ;;
26218                                 esac
26219                         elif test $cf_dir = c++ ; then
26220                                 cf_libname=ncurses++$USE_LIB_SUFFIX
26221                         else
26222                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
26223                         fi
26224                         if test -n "${USE_ARG_SUFFIX}" ; then
26225                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
26226                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
26227                         fi
26228
26229                         # These dependencies really are for development, not
26230                         # builds, but they are useful in porting, too.
26231                         cf_depend="../include/ncurses_cfg.h"
26232                         if test "$srcdir" = "."; then
26233                                 cf_reldir="."
26234                         else
26235                                 cf_reldir="\${srcdir}"
26236                         fi
26237
26238                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
26239                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
26240                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
26241                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
26242                         fi
26243
26244                         cf_dir_suffix=
26245                         old_cf_suffix="$cf_suffix"
26246                         if test "$cf_cv_shlib_version_infix" = yes ; then
26247                         if test -n "$USE_LIB_SUFFIX" ; then
26248                                 case $USE_LIB_SUFFIX in
26249                                 (tw*)
26250                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
26251                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
26252                                         cf_dir_suffix=tw$EXTRA_SUFFIX
26253                                         ;;
26254                                 (t*)
26255                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
26256                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
26257                                         cf_dir_suffix=t$EXTRA_SUFFIX
26258                                         ;;
26259                                 (w*)
26260                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
26261                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
26262                                         cf_dir_suffix=w$EXTRA_SUFFIX
26263                                         ;;
26264                                 (*)
26265                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
26266                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
26267                                         cf_dir_suffix=$EXTRA_SUFFIX
26268                                         ;;
26269                                 esac
26270                         fi
26271                         fi
26272
26273                         $AWK -f $srcdir/mk-1st.awk \
26274                                 name=${cf_libname}${cf_dir_suffix} \
26275                                 traces=$LIB_TRACING \
26276                                 MODEL=$cf_ITEM \
26277                                 CXX_MODEL=$CXX_MODEL \
26278                                 model=$cf_subdir \
26279                                 prefix=$cf_prefix \
26280                                 suffix=$cf_suffix \
26281                                 subset=$cf_subset \
26282                                 driver=$cf_cv_term_driver \
26283                                 SymLink="$LN_S" \
26284                                 TermlibRoot=$TINFO_NAME \
26285                                 TermlibSuffix=$TINFO_SUFFIX \
26286                                 ShlibVer=$cf_cv_shlib_version \
26287                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
26288                                 ReLink=${cf_cv_do_relink:-no} \
26289                                 DoLinks=$cf_cv_do_symlinks \
26290                                 rmSoLocs=$cf_cv_rm_so_locs \
26291                                 ldconfig="$LDCONFIG" \
26292                                 overwrite=$WITH_OVERWRITE \
26293                                 depend="$cf_depend" \
26294                                 host="$host" \
26295                                 libtool_version="$LIBTOOL_VERSION" \
26296                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26297
26298                         cf_suffix="$old_cf_suffix"
26299
26300                         for cf_subdir2 in $cf_subdirs lib
26301                         do
26302                                 test $cf_subdir = $cf_subdir2 && break
26303                         done
26304                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
26305                         $AWK -f $srcdir/mk-2nd.awk \
26306                                 name=$cf_dir \
26307                                 traces=$LIB_TRACING \
26308                                 MODEL=$cf_ITEM \
26309                                 model=$cf_subdir \
26310                                 subset=$cf_subset \
26311                                 srcdir=$srcdir \
26312                                 echo=$WITH_ECHO \
26313                                 crenames=$cf_cv_prog_CC_c_o \
26314                                 cxxrenames=$cf_cv_prog_CXX_c_o \
26315                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26316                         cf_subdirs="$cf_subdirs $cf_subdir"
26317                         done
26318                 done
26319         fi
26320
26321         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
26322 done
26323
26324 for cf_dir in $SRC_SUBDIRS
26325 do
26326         if test ! -d $srcdir/$cf_dir ; then
26327                 continue
26328         fi
26329
26330         if test -f $cf_dir/Makefile ; then
26331                 case "$cf_dir" in
26332                 (Ada95)
26333                         echo 'libs \' >> Makefile
26334                         echo 'install.libs \' >> Makefile
26335                         echo 'uninstall.libs ::' >> Makefile
26336                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
26337                         ;;
26338                 esac
26339         fi
26340
26341         if test -f $srcdir/$cf_dir/modules; then
26342                 echo >> Makefile
26343                 if test -f $srcdir/$cf_dir/headers; then
26344 cat >> Makefile <<CF_EOF
26345 install.includes \\
26346 uninstall.includes \\
26347 CF_EOF
26348                 fi
26349 if test "$cf_dir" != "c++" ; then
26350 echo 'lint \' >> Makefile
26351 fi
26352 cat >> Makefile <<CF_EOF
26353 libs \\
26354 lintlib \\
26355 install.libs \\
26356 uninstall.libs \\
26357 install.$cf_dir \\
26358 uninstall.$cf_dir ::
26359         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26360 CF_EOF
26361         elif test -f $srcdir/$cf_dir/headers; then
26362 cat >> Makefile <<CF_EOF
26363
26364 libs \\
26365 install.libs \\
26366 uninstall.libs \\
26367 install.includes \\
26368 uninstall.includes ::
26369         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26370 CF_EOF
26371 fi
26372 done
26373
26374 if test "x$cf_with_db_install" = xyes; then
26375 cat >> Makefile <<CF_EOF
26376
26377 install.libs uninstall.libs \\
26378 install.data uninstall.data ::
26379 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26380 CF_EOF
26381 else
26382 cat >> Makefile <<CF_EOF
26383
26384 install.libs uninstall.libs ::
26385         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26386 CF_EOF
26387 fi
26388
26389 if test "x$cf_with_manpages" = xyes; then
26390 cat >> Makefile <<CF_EOF
26391
26392 install.man \\
26393 uninstall.man ::
26394         cd man && \${MAKE} \${TOP_MFLAGS} \$@
26395 CF_EOF
26396 fi
26397
26398 cat >> Makefile <<CF_EOF
26399
26400 distclean ::
26401         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
26402         rm -f headers.sh headers.sed mk_shared_lib.sh
26403         rm -f edit_man.* man_alias.*
26404         rm -rf \${DIRS_TO_MAKE}
26405 CF_EOF
26406
26407 # Special case: tack's manpage lives in its own directory.
26408 if test "x$cf_with_manpages" = xyes; then
26409 if test "x$cf_with_tack" = "xyes"; then
26410 cat >> Makefile <<CF_EOF
26411
26412 install.man \\
26413 uninstall.man ::
26414         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
26415 CF_EOF
26416 fi
26417 fi
26418
26419 rm -f headers.sed headers.sh
26420
26421 echo creating headers.sh
26422 cat >headers.sh <<CF_EOF
26423 #! $SHELL
26424 # This shell script is generated by the 'configure' script.  It is invoked in a
26425 # subdirectory of the build tree.  It generates a sed-script in the parent
26426 # directory that is used to adjust includes for header files that reside in a
26427 # subdirectory of /usr/include, etc.
26428 PRG=""
26429 while test \$# != 3
26430 do
26431 PRG="\$PRG \$1"; shift
26432 done
26433 DST=\$1
26434 REF=\$2
26435 SRC=\$3
26436 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
26437 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
26438 echo installing \$SRC in \$DST
26439 CF_EOF
26440
26441 if test $WITH_CURSES_H = yes; then
26442         cat >>headers.sh <<CF_EOF
26443 case \$DST in
26444 (/*/include/*)
26445         END=\`basename \$DST\`
26446         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26447         do
26448                 NAME=\`basename \$i\`
26449                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26450         done
26451         ;;
26452 (*)
26453         echo "" >> \$TMPSED
26454         ;;
26455 esac
26456 CF_EOF
26457
26458 else
26459         cat >>headers.sh <<CF_EOF
26460 case \$DST in
26461 (/*/include/*)
26462         END=\`basename \$DST\`
26463         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26464         do
26465                 NAME=\`basename \$i\`
26466                 if test "\$NAME" = "curses.h"
26467                 then
26468                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26469                         NAME=ncurses.h
26470                 fi
26471                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26472         done
26473         ;;
26474 (*)
26475         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26476         ;;
26477 esac
26478 CF_EOF
26479 fi
26480 cat >>headers.sh <<CF_EOF
26481 rm -f \$TMPSRC
26482 sed -f \$TMPSED \$SRC > \$TMPSRC
26483 NAME=\`basename \$SRC\`
26484 CF_EOF
26485 if test $WITH_CURSES_H != yes; then
26486         cat >>headers.sh <<CF_EOF
26487 test "\$NAME" = "curses.h" && NAME=ncurses.h
26488 CF_EOF
26489 fi
26490 cat >>headers.sh <<CF_EOF
26491 # Just in case someone gzip'd manpages, remove the conflicting copy.
26492 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
26493
26494 eval \$PRG \$TMPSRC \$DST/\$NAME
26495 rm -f \$TMPSRC \$TMPSED
26496 CF_EOF
26497
26498 chmod 0755 headers.sh
26499
26500 for cf_dir in $SRC_SUBDIRS
26501 do
26502         if test ! -d $srcdir/$cf_dir ; then
26503                 continue
26504         fi
26505
26506         if test -f $srcdir/$cf_dir/headers; then
26507                 $AWK -f $srcdir/mk-hdr.awk \
26508                         subset="$LIB_SUBSETS" \
26509                         compat="$WITH_CURSES_H" \
26510                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26511         fi
26512
26513         if test -f $srcdir/$cf_dir/modules; then
26514                 if test "$cf_dir" != "c++" ; then
26515                         cat >>$cf_dir/Makefile <<"CF_EOF"
26516 depend : ${AUTO_SRC}
26517         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26518
26519 # DO NOT DELETE THIS LINE -- make depend depends on it.
26520 CF_EOF
26521                 fi
26522         fi
26523 done
26524
26525 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26526 if test -z "$USE_OLD_MAKERULES" ; then
26527         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26528 fi
26529 fi
26530  ;;
26531   esac
26532 done
26533 EOF
26534
26535 cat >>$CONFIG_STATUS <<\EOF
26536
26537 { (exit 0); exit 0; }
26538 EOF
26539 chmod +x $CONFIG_STATUS
26540 ac_clean_files=$ac_clean_files_save
26541
26542 # configure is writing to config.log, and then calls config.status.
26543 # config.status does its own redirection, appending to config.log.
26544 # Unfortunately, on DOS this fails, as config.log is still kept open
26545 # by configure, so config.status won't be able to write to it; its
26546 # output is simply discarded.  So we exec the FD to /dev/null,
26547 # effectively closing config.log, so it can be properly (re)opened and
26548 # appended to by config.status.  When coming back to configure, we
26549 # need to make the FD available again.
26550 if test "$no_create" != yes; then
26551   ac_cs_success=:
26552   exec 5>/dev/null
26553   $SHELL $CONFIG_STATUS || ac_cs_success=false
26554   exec 5>>config.log
26555   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26556   # would make configure fail if this is the last instruction.
26557   $ac_cs_success || { (exit 1); exit 1; }
26558 fi
26559 ${MAKE:-make} preinstall