]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20180609
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.658 .
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-sysmouse         use sysmouse (FreeBSD console)
749   --disable-lib-suffixes  disable library suffixes
750   --disable-rpath-hack    don't add rpath options for additional libraries
751 Fine-Tuning Your Configuration:
752   --with-extra-suffix=X   append extra suffix to header/library paths
753   --disable-overwrite     put headers in subdir, omit link to -lcurses
754   --disable-database      do not use terminfo, only fallbacks/termcap
755   --with-database=XXX     specify terminfo source to install
756   --with-hashed-db        specify hashed-database library
757   --with-fallbacks=XXX    specify list of fallback terminal descriptions
758   --without-xterm-new     specify if xterm terminfo should be old version
759   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
760   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
761   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
762   --disable-big-core      assume machine has little memory
763   --disable-big-strings   assume compiler has only standard-size strings
764   --enable-termcap        compile in termcap fallback support
765   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
766   --enable-getcap         fast termcap load, no xrefs to terminfo
767   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
768   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
769   --disable-root-environ  restrict environment when running as root
770   --enable-symlinks       make tic use symbolic links not hard links
771   --enable-broken_linker  compile with broken-linker support code
772   --enable-bsdpad         recognize BSD-style prefix padding
773   --enable-widec          compile with wide-char/UTF-8 code
774   --disable-lp64          allow chtype to be long (ignore _LP64)
775   --disable-largefile     omit support for large files
776   --disable-tparm-varargs compile tparm() without varargs interface
777   --disable-tic-depends   link tic library without explicit dependency on ncurses library
778   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
779   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
780   --with-bool=TYPE        override fallback type of bool variable
781   --with-caps=alt         compile with alternate Caps file
782   --with-chtype=TYPE      override type of chtype
783   --with-ospeed=TYPE      override type of ospeed variable
784   --with-mmask-t=TYPE     override type of mmask_t
785   --with-ccharw-max=XXX   override size CCHARW_MAX
786   --enable-signed-char    compile using signed Boolean's in term.h
787   --with-tparm-arg=TYPE   override parameter type of tparm
788   --with-rcs-ids          compile-in RCS identifiers
789 Options to Specify How Manpages are Installed:
790   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
791                           optionally formatted/catonly, e.g., gzip,formatted
792   --with-manpage-renames  specify manpage-renaming
793   --with-manpage-aliases  specify manpage-aliases using .so
794   --with-manpage-symlinks specify manpage-aliases using symlinks
795   --with-manpage-tbl      specify manpage processing with tbl
796 Extensions:
797   --disable-ext-funcs     disable function-extensions
798   --enable-sp-funcs       enable SCREEN-extensions
799   --enable-term-driver    enable terminal-driver
800   --enable-const          compile with extra/non-standard const
801   --enable-ext-colors     compile for 256-color support
802   --enable-ext-mouse      compile for extended mouse-encoding
803   --enable-ext-putwin     compile with extended putwin/screendump
804   --enable-no-padding     compile with $NCURSES_NO_PADDING code
805   --enable-sigwinch       compile with SIGWINCH handler
806   --enable-tcap-names     compile with user-definable terminal capabilities
807 Reentrant Code:
808   --with-pthread          use POSIX thread library
809   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
810   --enable-weak-symbols   enable weak-symbols for pthreads
811   --enable-reentrant      compile with reentrant code
812   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
813   --enable-opaque-form    make form-library structures "opaque"
814   --enable-opaque-menu    make menu-library structures "opaque"
815   --enable-opaque-panel   make panel-library structures "opaque"
816   --with-wrap-prefix=XXX  override prefix used for public variables
817 Development Code:
818   --without-develop       disable development options
819   --enable-hard-tabs      compile with hard-tabs code
820   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
821 Experimental Code:
822   --disable-assumed-color do not assume anything about default-colors
823   --disable-hashmap       compile without hashmap scrolling-optimization
824   --enable-colorfgbg      compile-in experimental $COLORFGBG code
825   --enable-interop        compile-in interop bindings
826   --enable-safe-sprintf   compile with experimental safe-sprintf code
827   --disable-scroll-hints  compile without scroll-hints code
828   --enable-wgetch-events  compile with wgetch-events code
829 Testing/development Options:
830   --disable-echo          do not display "compiling" commands
831   --disable-stripping     do not strip installed executables
832   --enable-warnings       build: turn on GCC compiler warnings
833   --enable-string-hacks   work around bogus compiler/loader warnings
834   --enable-assertions     test: turn on generation of assertion code
835   --with-dmalloc          test: use Gray Watson's dmalloc library
836   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
837   --with-valgrind         test: use valgrind
838   --disable-leaks         test: free permanent memory, analyze leaks
839   --enable-expanded       test: generate functions for certain macros
840   --disable-macros        test: use functions rather than macros
841   --with-trace            test: add trace() function to all models of ncurses
842   --disable-gnat-projects test: disable GNAT projects even if usable
843 Ada95 Binding Options:
844   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
845   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
846   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
847   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
848
849 Some influential environment variables:
850   CC          C compiler command
851   CFLAGS      C compiler flags
852   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
853               nonstandard directory <lib dir>
854   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
855               headers in a nonstandard directory <include dir>
856   CPP         C preprocessor
857   CXX         C++ compiler command
858   CXXFLAGS    C++ compiler flags
859   CXXCPP      C++ preprocessor
860
861 Use these variables to override the choices made by `configure' or to help
862 it to find libraries and programs with nonstandard names/locations.
863
864 EOF
865 fi
866
867 if test "$ac_init_help" = "recursive"; then
868   # If there are subdirs, report their specific --help.
869   ac_popdir=`pwd`
870   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
871     cd $ac_subdir
872     # A "../" for each directory in /$ac_subdir.
873     ac_dots=`echo $ac_subdir |
874              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
875
876     case $srcdir in
877     .) # No --srcdir option.  We are building in place.
878       ac_sub_srcdir=$srcdir ;;
879     [\\/]* | ?:[\\/]* ) # Absolute path.
880       ac_sub_srcdir=$srcdir/$ac_subdir ;;
881     *) # Relative path.
882       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
883     esac
884
885     # Check for guested configure; otherwise get Cygnus style configure.
886     if test -f $ac_sub_srcdir/configure.gnu; then
887       echo
888       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
889     elif test -f $ac_sub_srcdir/configure; then
890       echo
891       $SHELL $ac_sub_srcdir/configure  --help=recursive
892     elif test -f $ac_sub_srcdir/configure.ac ||
893            test -f $ac_sub_srcdir/configure.in; then
894       echo
895       $ac_configure --help
896     else
897       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
898     fi
899     cd $ac_popdir
900   done
901 fi
902
903 test -n "$ac_init_help" && exit 0
904 if $ac_init_version; then
905   cat <<\EOF
906
907 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
908 Free Software Foundation, Inc.
909 This configure script is free software; the Free Software Foundation
910 gives unlimited permission to copy, distribute and modify it.
911 EOF
912   exit 0
913 fi
914 exec 5>config.log
915 cat >&5 <<EOF
916 This file contains any messages produced by compilers while
917 running configure, to aid debugging if configure makes a mistake.
918
919 It was created by $as_me, which was
920 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
921
922   $ $0 $@
923
924 EOF
925 {
926 cat <<_ASUNAME
927 ## ---------- ##
928 ## Platform.  ##
929 ## ---------- ##
930
931 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
932 uname -m = `(uname -m) 2>/dev/null || echo unknown`
933 uname -r = `(uname -r) 2>/dev/null || echo unknown`
934 uname -s = `(uname -s) 2>/dev/null || echo unknown`
935 uname -v = `(uname -v) 2>/dev/null || echo unknown`
936
937 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
938 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
939
940 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
941 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
942 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
943 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
944 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
945 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
946 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
947
948 PATH = $PATH
949
950 _ASUNAME
951 } >&5
952
953 cat >&5 <<EOF
954 ## ------------ ##
955 ## Core tests.  ##
956 ## ------------ ##
957
958 EOF
959
960 # Keep a trace of the command line.
961 # Strip out --no-create and --no-recursion so they do not pile up.
962 # Also quote any args containing shell meta-characters.
963 ac_configure_args=
964 ac_sep=
965 for ac_arg
966 do
967   case $ac_arg in
968   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
969   | --no-cr | --no-c) ;;
970   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
971   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
972   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
973     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
974     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
975     ac_sep=" " ;;
976   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
977      ac_sep=" " ;;
978   esac
979   # Get rid of the leading space.
980 done
981
982 # When interrupted or exit'd, cleanup temporary files, and complete
983 # config.log.  We remove comments because anyway the quotes in there
984 # would cause problems or look ugly.
985 trap 'exit_status=$?
986   # Save into config.log some information that might help in debugging.
987   echo >&5
988   echo "## ----------------- ##" >&5
989   echo "## Cache variables.  ##" >&5
990   echo "## ----------------- ##" >&5
991   echo >&5
992   # The following way of writing the cache mishandles newlines in values,
993 {
994   (set) 2>&1 |
995     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
996     *ac_space=\ *)
997       sed -n \
998         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
999           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1000       ;;
1001     *)
1002       sed -n \
1003         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1004       ;;
1005     esac;
1006 } >&5
1007   sed "/^$/d" confdefs.h >conftest.log
1008   if test -s conftest.log; then
1009     echo >&5
1010     echo "## ------------ ##" >&5
1011     echo "## confdefs.h.  ##" >&5
1012     echo "## ------------ ##" >&5
1013     echo >&5
1014     cat conftest.log >&5
1015   fi
1016   (echo; echo) >&5
1017   test "$ac_signal" != 0 &&
1018     echo "$as_me: caught signal $ac_signal" >&5
1019   echo "$as_me: exit $exit_status" >&5
1020   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1021     exit $exit_status
1022      ' 0
1023 for ac_signal in 1 2 13 15; do
1024   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1025 done
1026 ac_signal=0
1027
1028 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1029 rm -rf conftest* confdefs.h
1030 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1031 echo >confdefs.h
1032
1033 # Let the site file select an alternate cache file if it wants to.
1034 # Prefer explicitly selected file to automatically selected ones.
1035 if test -z "$CONFIG_SITE"; then
1036   if test "x$prefix" != xNONE; then
1037     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1038   else
1039     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1040   fi
1041 fi
1042 for ac_site_file in $CONFIG_SITE; do
1043   if test -r "$ac_site_file"; then
1044     { echo "$as_me:1044: loading site script $ac_site_file" >&5
1045 echo "$as_me: loading site script $ac_site_file" >&6;}
1046     cat "$ac_site_file" >&5
1047     . "$ac_site_file"
1048   fi
1049 done
1050
1051 if test -r "$cache_file"; then
1052   # Some versions of bash will fail to source /dev/null (special
1053   # files actually), so we avoid doing that.
1054   if test -f "$cache_file"; then
1055     { echo "$as_me:1055: loading cache $cache_file" >&5
1056 echo "$as_me: loading cache $cache_file" >&6;}
1057     case $cache_file in
1058       [\\/]* | ?:[\\/]* ) . $cache_file;;
1059       *)                      . ./$cache_file;;
1060     esac
1061   fi
1062 else
1063   { echo "$as_me:1063: creating cache $cache_file" >&5
1064 echo "$as_me: creating cache $cache_file" >&6;}
1065   >$cache_file
1066 fi
1067
1068 # Check that the precious variables saved in the cache have kept the same
1069 # value.
1070 ac_cache_corrupted=false
1071 for ac_var in `(set) 2>&1 |
1072                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1073   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1074   eval ac_new_set=\$ac_env_${ac_var}_set
1075   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1076   eval ac_new_val="\$ac_env_${ac_var}_value"
1077   case $ac_old_set,$ac_new_set in
1078     set,)
1079       { echo "$as_me:1079: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1080 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1081       ac_cache_corrupted=: ;;
1082     ,set)
1083       { echo "$as_me:1083: error: \`$ac_var' was not set in the previous run" >&5
1084 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1085       ac_cache_corrupted=: ;;
1086     ,);;
1087     *)
1088       if test "x$ac_old_val" != "x$ac_new_val"; then
1089         { echo "$as_me:1089: error: \`$ac_var' has changed since the previous run:" >&5
1090 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1091         { echo "$as_me:1091:   former value:  $ac_old_val" >&5
1092 echo "$as_me:   former value:  $ac_old_val" >&2;}
1093         { echo "$as_me:1093:   current value: $ac_new_val" >&5
1094 echo "$as_me:   current value: $ac_new_val" >&2;}
1095         ac_cache_corrupted=:
1096       fi;;
1097   esac
1098   # Pass precious variables to config.status.  It doesn't matter if
1099   # we pass some twice (in addition to the command line arguments).
1100   if test "$ac_new_set" = set; then
1101     case $ac_new_val in
1102     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1103       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1104       ac_configure_args="$ac_configure_args '$ac_arg'"
1105       ;;
1106     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1107        ;;
1108     esac
1109   fi
1110 done
1111 if $ac_cache_corrupted; then
1112   { echo "$as_me:1112: error: changes in the environment can compromise the build" >&5
1113 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1114   { { echo "$as_me:1114: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1115 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1116    { (exit 1); exit 1; }; }
1117 fi
1118
1119 ac_ext=c
1120 ac_cpp='$CPP $CPPFLAGS'
1121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1124 ac_main_return=return
1125
1126 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1127   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1128                    ECHO_T='     ' ;;
1129   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1130   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1131 esac
1132 echo "#! $SHELL" >conftest.sh
1133 echo  "exit 0"   >>conftest.sh
1134 chmod +x conftest.sh
1135 if { (echo "$as_me:1135: PATH=\".;.\"; conftest.sh") >&5
1136   (PATH=".;."; conftest.sh) 2>&5
1137   ac_status=$?
1138   echo "$as_me:1138: \$? = $ac_status" >&5
1139   (exit $ac_status); }; then
1140   ac_path_separator=';'
1141 else
1142   ac_path_separator=:
1143 fi
1144 PATH_SEPARATOR="$ac_path_separator"
1145 rm -f conftest.sh
1146
1147 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1148
1149 top_builddir=`pwd`
1150
1151 echo "$as_me:1151: checking for egrep" >&5
1152 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1153 if test "${ac_cv_prog_egrep+set}" = set; then
1154   echo $ECHO_N "(cached) $ECHO_C" >&6
1155 else
1156   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1157                 then ac_cv_prog_egrep='grep -E'
1158                 else ac_cv_prog_egrep='egrep'
1159         fi
1160 fi
1161 echo "$as_me:1161: result: $ac_cv_prog_egrep" >&5
1162 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1163         EGREP=$ac_cv_prog_egrep
1164
1165         test -z "$EGREP" && { { echo "$as_me:1165: error: No egrep program found" >&5
1166 echo "$as_me: error: No egrep program found" >&2;}
1167    { (exit 1); exit 1; }; }
1168
1169 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1170 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1171 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1172 cf_cv_abi_version=${NCURSES_MAJOR}
1173 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1174 cf_cv_timestamp=`date`
1175 echo "$as_me:1175: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1176 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1177
1178 if test -f $srcdir/VERSION ; then
1179         echo "$as_me:1179: checking for package version" >&5
1180 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1181
1182         # if there are not enough fields, cut returns the last one...
1183         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1184         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1185         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1186
1187         # this is how CF_BUNDLED_INTL uses $VERSION:
1188         VERSION="$cf_field1"
1189
1190         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1191         test -z "$VERSION_MAJOR" && { { echo "$as_me:1191: error: missing major-version" >&5
1192 echo "$as_me: error: missing major-version" >&2;}
1193    { (exit 1); exit 1; }; }
1194
1195         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1196         test -z "$VERSION_MINOR" && { { echo "$as_me:1196: error: missing minor-version" >&5
1197 echo "$as_me: error: missing minor-version" >&2;}
1198    { (exit 1); exit 1; }; }
1199
1200         echo "$as_me:1200: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1201 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1202
1203         echo "$as_me:1203: checking for package patch date" >&5
1204 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1205         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1206         case .$VERSION_PATCH in
1207         (.)
1208                 { { echo "$as_me:1208: error: missing patch-date $VERSION_PATCH" >&5
1209 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1210    { (exit 1); exit 1; }; }
1211                 ;;
1212         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1213                 ;;
1214         (*)
1215                 { { echo "$as_me:1215: error: illegal patch-date $VERSION_PATCH" >&5
1216 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1217    { (exit 1); exit 1; }; }
1218                 ;;
1219         esac
1220         echo "$as_me:1220: result: $VERSION_PATCH" >&5
1221 echo "${ECHO_T}$VERSION_PATCH" >&6
1222 else
1223         { { echo "$as_me:1223: error: did not find $srcdir/VERSION" >&5
1224 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1225    { (exit 1); exit 1; }; }
1226 fi
1227
1228 # show the actual data that we have for versions:
1229 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing ABI VERSION $VERSION ..." 1>&5
1232
1233 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1234
1235 echo "${as_me:-configure}:1235: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1236
1237 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1238
1239 echo "${as_me:-configure}:1239: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1240
1241 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1242
1243 echo "${as_me:-configure}:1243: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1244
1245         cf_PACKAGE=NCURSES
1246         PACKAGE=ncurses
1247
1248 cat >>confdefs.h <<EOF
1249 #define PACKAGE "$PACKAGE"
1250 EOF
1251
1252 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1253
1254         cat >>confdefs.h <<EOF
1255 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1256 EOF
1257
1258         cat >>confdefs.h <<EOF
1259 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1260 EOF
1261
1262 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1263
1264 # Check whether --with-rel-version or --without-rel-version was given.
1265 if test "${with_rel_version+set}" = set; then
1266   withval="$with_rel_version"
1267   { echo "$as_me:1267: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1268 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1269  cf_cv_rel_version=$withval
1270 fi;
1271
1272  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1273  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1274
1275 if test -n "$NCURSES_MAJOR" ; then
1276   case $NCURSES_MAJOR in
1277   ([0-9]*)
1278         ;;
1279   (*)
1280         { { echo "$as_me:1280: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1281 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1282    { (exit 1); exit 1; }; }
1283         ;;
1284   esac
1285 else
1286   { { echo "$as_me:1286: error: Release major-version value is empty" >&5
1287 echo "$as_me: error: Release major-version value is empty" >&2;}
1288    { (exit 1); exit 1; }; }
1289 fi
1290
1291 if test -n "$NCURSES_MINOR" ; then
1292   case $NCURSES_MINOR in
1293   ([0-9]*)
1294         ;;
1295   (*)
1296         { { echo "$as_me:1296: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1297 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1298    { (exit 1); exit 1; }; }
1299         ;;
1300   esac
1301 else
1302   { { echo "$as_me:1302: error: Release minor-version value is empty" >&5
1303 echo "$as_me: error: Release minor-version value is empty" >&2;}
1304    { (exit 1); exit 1; }; }
1305 fi
1306
1307 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1308
1309 # Check whether --with-abi-version or --without-abi-version was given.
1310 if test "${with_abi_version+set}" = set; then
1311   withval="$with_abi_version"
1312
1313         if test "x$cf_cv_abi_version" != "x$withval"
1314         then
1315                 { echo "$as_me:1315: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1316 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1317                 case $cf_cv_rel_version in
1318                 (5.*)
1319                         cf_cv_rel_version=$withval.0
1320                         ;;
1321                 (6.*)
1322                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1323                         ;;
1324                 esac
1325         fi
1326         cf_cv_abi_version=$withval
1327 fi;
1328
1329 if test -n "$cf_cv_abi_version" ; then
1330   case $cf_cv_abi_version in
1331   ([0-9]*)
1332         ;;
1333   (*)
1334         { { echo "$as_me:1334: error: ABI version is not a number: $cf_cv_abi_version" >&5
1335 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1336    { (exit 1); exit 1; }; }
1337         ;;
1338   esac
1339 else
1340   { { echo "$as_me:1340: error: ABI version value is empty" >&5
1341 echo "$as_me: error: ABI version value is empty" >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344
1345 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1346 then
1347         case $cf_cv_rel_version in
1348         (5.*)
1349                 cf_cv_rel_version=$with_abi_version.0
1350                 ;;
1351         esac
1352 fi
1353
1354 ac_aux_dir=
1355 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1356   if test -f $ac_dir/install-sh; then
1357     ac_aux_dir=$ac_dir
1358     ac_install_sh="$ac_aux_dir/install-sh -c"
1359     break
1360   elif test -f $ac_dir/install.sh; then
1361     ac_aux_dir=$ac_dir
1362     ac_install_sh="$ac_aux_dir/install.sh -c"
1363     break
1364   elif test -f $ac_dir/shtool; then
1365     ac_aux_dir=$ac_dir
1366     ac_install_sh="$ac_aux_dir/shtool install -c"
1367     break
1368   fi
1369 done
1370 if test -z "$ac_aux_dir"; then
1371   { { echo "$as_me:1371: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1372 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1373    { (exit 1); exit 1; }; }
1374 fi
1375 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1376 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1377 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1378
1379 # Make sure we can run config.sub.
1380 $ac_config_sub sun4 >/dev/null 2>&1 ||
1381   { { echo "$as_me:1381: error: cannot run $ac_config_sub" >&5
1382 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1383    { (exit 1); exit 1; }; }
1384
1385 echo "$as_me:1385: checking build system type" >&5
1386 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1387 if test "${ac_cv_build+set}" = set; then
1388   echo $ECHO_N "(cached) $ECHO_C" >&6
1389 else
1390   ac_cv_build_alias=$build_alias
1391 test -z "$ac_cv_build_alias" &&
1392   ac_cv_build_alias=`$ac_config_guess`
1393 test -z "$ac_cv_build_alias" &&
1394   { { echo "$as_me:1394: error: cannot guess build type; you must specify one" >&5
1395 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1396    { (exit 1); exit 1; }; }
1397 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1398   { { echo "$as_me:1398: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1399 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1400    { (exit 1); exit 1; }; }
1401
1402 fi
1403 echo "$as_me:1403: result: $ac_cv_build" >&5
1404 echo "${ECHO_T}$ac_cv_build" >&6
1405 build=$ac_cv_build
1406 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1407 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1408 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1409
1410 echo "$as_me:1410: checking host system type" >&5
1411 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1412 if test "${ac_cv_host+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   ac_cv_host_alias=$host_alias
1416 test -z "$ac_cv_host_alias" &&
1417   ac_cv_host_alias=$ac_cv_build_alias
1418 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1419   { { echo "$as_me:1419: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:1424: result: $ac_cv_host" >&5
1425 echo "${ECHO_T}$ac_cv_host" >&6
1426 host=$ac_cv_host
1427 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1432         echo "$as_me:1432: checking target system type" >&5
1433 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1434 if test "${ac_cv_target+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_target_alias=$target_alias
1438 test "x$ac_cv_target_alias" = "x" &&
1439   ac_cv_target_alias=$ac_cv_host_alias
1440 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1441   { { echo "$as_me:1441: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:1446: result: $ac_cv_target" >&5
1447 echo "${ECHO_T}$ac_cv_target" >&6
1448 target=$ac_cv_target
1449 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453 # The aliases save the names the user supplied, while $host etc.
1454 # will get canonicalized.
1455 test -n "$target_alias" &&
1456   test "$program_prefix$program_suffix$program_transform_name" = \
1457     NONENONEs,x,x, &&
1458   program_prefix=${target_alias}-
1459         system_name="$host_os"
1460 else
1461         system_name="`(uname -s -r) 2>/dev/null`"
1462         if test -z "$system_name" ; then
1463                 system_name="`(hostname) 2>/dev/null`"
1464         fi
1465 fi
1466 test -n "$system_name" &&
1467 cat >>confdefs.h <<EOF
1468 #define SYSTEM_NAME "$system_name"
1469 EOF
1470
1471 if test "${cf_cv_system_name+set}" = set; then
1472   echo $ECHO_N "(cached) $ECHO_C" >&6
1473 else
1474   cf_cv_system_name="$system_name"
1475 fi
1476
1477 test -z "$system_name" && system_name="$cf_cv_system_name"
1478 test -n "$cf_cv_system_name" && echo "$as_me:1478: result: Configuring for $cf_cv_system_name" >&5
1479 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1480
1481 if test ".$system_name" != ".$cf_cv_system_name" ; then
1482         echo "$as_me:1482: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1483 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1484         { { echo "$as_me:1484: error: \"Please remove config.cache and try again.\"" >&5
1485 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1486    { (exit 1); exit 1; }; }
1487 fi
1488
1489 # Check whether --with-system-type or --without-system-type was given.
1490 if test "${with_system_type+set}" = set; then
1491   withval="$with_system_type"
1492   { echo "$as_me:1492: WARNING: overriding system type to $withval" >&5
1493 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1494         cf_cv_system_name=$withval
1495         host_os=$withval
1496
1497 fi;
1498
1499 ###     Save the given $CFLAGS to allow user-override.
1500 cf_user_CFLAGS="$CFLAGS"
1501
1502 ###     Default install-location
1503
1504 echo "$as_me:1504: checking for prefix" >&5
1505 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1506 if test "x$prefix" = "xNONE" ; then
1507         case "$cf_cv_system_name" in
1508                 # non-vendor systems don't have a conflict
1509         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1510                 prefix=/usr
1511                 ;;
1512         (*)     prefix=$ac_default_prefix
1513                 ;;
1514         esac
1515 fi
1516 echo "$as_me:1516: result: $prefix" >&5
1517 echo "${ECHO_T}$prefix" >&6
1518
1519 if test "x$prefix" = "xNONE" ; then
1520 echo "$as_me:1520: checking for default include-directory" >&5
1521 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1522 test -n "$verbose" && echo 1>&6
1523 for cf_symbol in \
1524         $includedir \
1525         $includedir/ncurses \
1526         $prefix/include \
1527         $prefix/include/ncurses \
1528         /usr/local/include \
1529         /usr/local/include/ncurses \
1530         /usr/include \
1531         /usr/include/ncurses
1532 do
1533         cf_dir=`eval echo $cf_symbol`
1534         if test -f $cf_dir/curses.h ; then
1535         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1536                 includedir="$cf_symbol"
1537                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1538                 break
1539         fi
1540         fi
1541         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1542 done
1543 echo "$as_me:1543: result: $includedir" >&5
1544 echo "${ECHO_T}$includedir" >&6
1545 fi
1546
1547 ### Defaults for ncurses ABI
1548
1549 case x$cf_cv_abi_version in
1550 (x[6789])
1551         cf_dft_ext_colors=yes
1552         cf_dft_ext_const=yes
1553         cf_dft_ext_mouse=yes
1554         cf_dft_ext_putwin=yes
1555         cf_dft_ext_spfuncs=yes
1556         cf_dft_filter_syms=yes
1557         cf_dft_chtype=uint32_t
1558         cf_dft_mmask_t=uint32_t
1559         cf_dft_interop=yes
1560         cf_dft_tparm_arg=intptr_t
1561         cf_dft_with_lp64=yes
1562         ;;
1563 (*)
1564         cf_dft_ext_colors=no
1565         cf_dft_ext_const=no
1566         cf_dft_ext_mouse=no
1567         cf_dft_ext_putwin=no
1568         cf_dft_ext_spfuncs=no
1569         cf_dft_filter_syms=no
1570         cf_dft_chtype=auto
1571         cf_dft_mmask_t=auto
1572         cf_dft_interop=no
1573         cf_dft_tparm_arg=long
1574         cf_dft_with_lp64=no
1575         ;;
1576 esac
1577
1578 ###     Checks for programs.
1579
1580 # Check whether --with-ada or --without-ada was given.
1581 if test "${with_ada+set}" = set; then
1582   withval="$with_ada"
1583   cf_with_ada=$withval
1584 else
1585   cf_with_ada=yes
1586 fi;
1587 if test "x$cf_with_ada" = xyes
1588 then
1589         cf_PROG_CC="gnatgcc gcc cc"
1590 else
1591         cf_PROG_CC="gcc cc"
1592 fi
1593
1594 ac_ext=c
1595 ac_cpp='$CPP $CPPFLAGS'
1596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1599 ac_main_return=return
1600 if test -n "$ac_tool_prefix"; then
1601   for ac_prog in $cf_PROG_CC
1602   do
1603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1605 echo "$as_me:1605: checking for $ac_word" >&5
1606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1607 if test "${ac_cv_prog_CC+set}" = set; then
1608   echo $ECHO_N "(cached) $ECHO_C" >&6
1609 else
1610   if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   ac_save_IFS=$IFS; IFS=$ac_path_separator
1614 ac_dummy="$PATH"
1615 for ac_dir in $ac_dummy; do
1616   IFS=$ac_save_IFS
1617   test -z "$ac_dir" && ac_dir=.
1618   $as_executable_p "$ac_dir/$ac_word" || continue
1619 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1620 echo "$as_me:1620: found $ac_dir/$ac_word" >&5
1621 break
1622 done
1623
1624 fi
1625 fi
1626 CC=$ac_cv_prog_CC
1627 if test -n "$CC"; then
1628   echo "$as_me:1628: result: $CC" >&5
1629 echo "${ECHO_T}$CC" >&6
1630 else
1631   echo "$as_me:1631: result: no" >&5
1632 echo "${ECHO_T}no" >&6
1633 fi
1634
1635     test -n "$CC" && break
1636   done
1637 fi
1638 if test -z "$CC"; then
1639   ac_ct_CC=$CC
1640   for ac_prog in $cf_PROG_CC
1641 do
1642   # Extract the first word of "$ac_prog", so it can be a program name with args.
1643 set dummy $ac_prog; ac_word=$2
1644 echo "$as_me:1644: checking for $ac_word" >&5
1645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   if test -n "$ac_ct_CC"; then
1650   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1651 else
1652   ac_save_IFS=$IFS; IFS=$ac_path_separator
1653 ac_dummy="$PATH"
1654 for ac_dir in $ac_dummy; do
1655   IFS=$ac_save_IFS
1656   test -z "$ac_dir" && ac_dir=.
1657   $as_executable_p "$ac_dir/$ac_word" || continue
1658 ac_cv_prog_ac_ct_CC="$ac_prog"
1659 echo "$as_me:1659: found $ac_dir/$ac_word" >&5
1660 break
1661 done
1662
1663 fi
1664 fi
1665 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1666 if test -n "$ac_ct_CC"; then
1667   echo "$as_me:1667: result: $ac_ct_CC" >&5
1668 echo "${ECHO_T}$ac_ct_CC" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$ac_ct_CC" && break
1675 done
1676
1677   CC=$ac_ct_CC
1678 fi
1679
1680 test -z "$CC" && { { echo "$as_me:1680: error: no acceptable cc found in \$PATH" >&5
1681 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1682    { (exit 1); exit 1; }; }
1683
1684 # Provide some information about the compiler.
1685 echo "$as_me:1685:" \
1686      "checking for C compiler version" >&5
1687 ac_compiler=`set X $ac_compile; echo $2`
1688 { (eval echo "$as_me:1688: \"$ac_compiler --version </dev/null >&5\"") >&5
1689   (eval $ac_compiler --version </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -v </dev/null >&5\"") >&5
1694   (eval $ac_compiler -v </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698 { (eval echo "$as_me:1698: \"$ac_compiler -V </dev/null >&5\"") >&5
1699   (eval $ac_compiler -V </dev/null >&5) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); }
1703
1704 cat >conftest.$ac_ext <<_ACEOF
1705 #line 1705 "configure"
1706 #include "confdefs.h"
1707
1708 int
1709 main (void)
1710 {
1711
1712   ;
1713   return 0;
1714 }
1715 _ACEOF
1716 ac_clean_files_save=$ac_clean_files
1717 ac_clean_files="$ac_clean_files a.out a.exe"
1718 # Try to create an executable without -o first, disregard a.out.
1719 # It will help us diagnose broken compilers, and finding out an intuition
1720 # of exeext.
1721 echo "$as_me:1721: checking for C compiler default output" >&5
1722 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1723 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1724 if { (eval echo "$as_me:1724: \"$ac_link_default\"") >&5
1725   (eval $ac_link_default) 2>&5
1726   ac_status=$?
1727   echo "$as_me:1727: \$? = $ac_status" >&5
1728   (exit $ac_status); }; then
1729   # Find the output, starting from the most likely.  This scheme is
1730 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1731 # resort.
1732 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1733                 ls a.out conftest 2>/dev/null;
1734                 ls a.* conftest.* 2>/dev/null`; do
1735   case $ac_file in
1736     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1737     a.out ) # We found the default executable, but exeext='' is most
1738             # certainly right.
1739             break;;
1740     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1741           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1742           export ac_cv_exeext
1743           break;;
1744     * ) break;;
1745   esac
1746 done
1747 else
1748   echo "$as_me: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1750 { { echo "$as_me:1750: error: C compiler cannot create executables" >&5
1751 echo "$as_me: error: C compiler cannot create executables" >&2;}
1752    { (exit 77); exit 77; }; }
1753 fi
1754
1755 ac_exeext=$ac_cv_exeext
1756 echo "$as_me:1756: result: $ac_file" >&5
1757 echo "${ECHO_T}$ac_file" >&6
1758
1759 # Check the compiler produces executables we can run.  If not, either
1760 # the compiler is broken, or we cross compile.
1761 echo "$as_me:1761: checking whether the C compiler works" >&5
1762 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1763 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764 # If not cross compiling, check that we can run a simple program.
1765 if test "$cross_compiling" != yes; then
1766   if { ac_try='./$ac_file'
1767   { (eval echo "$as_me:1767: \"$ac_try\"") >&5
1768   (eval $ac_try) 2>&5
1769   ac_status=$?
1770   echo "$as_me:1770: \$? = $ac_status" >&5
1771   (exit $ac_status); }; }; then
1772     cross_compiling=no
1773   else
1774     if test "$cross_compiling" = maybe; then
1775         cross_compiling=yes
1776     else
1777         { { echo "$as_me:1777: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&5
1779 echo "$as_me: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&2;}
1781    { (exit 1); exit 1; }; }
1782     fi
1783   fi
1784 fi
1785 echo "$as_me:1785: result: yes" >&5
1786 echo "${ECHO_T}yes" >&6
1787
1788 rm -f a.out a.exe conftest$ac_cv_exeext
1789 ac_clean_files=$ac_clean_files_save
1790 # Check the compiler produces executables we can run.  If not, either
1791 # the compiler is broken, or we cross compile.
1792 echo "$as_me:1792: checking whether we are cross compiling" >&5
1793 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794 echo "$as_me:1794: result: $cross_compiling" >&5
1795 echo "${ECHO_T}$cross_compiling" >&6
1796
1797 echo "$as_me:1797: checking for executable suffix" >&5
1798 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1799 if { (eval echo "$as_me:1799: \"$ac_link\"") >&5
1800   (eval $ac_link) 2>&5
1801   ac_status=$?
1802   echo "$as_me:1802: \$? = $ac_status" >&5
1803   (exit $ac_status); }; then
1804   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1806 # work properly (i.e., refer to `conftest.exe'), while it won't with
1807 # `rm'.
1808 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1809   case $ac_file in
1810     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1811     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1812           export ac_cv_exeext
1813           break;;
1814     * ) break;;
1815   esac
1816 done
1817 else
1818   { { echo "$as_me:1818: error: cannot compute EXEEXT: cannot compile and link" >&5
1819 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1820    { (exit 1); exit 1; }; }
1821 fi
1822
1823 rm -f conftest$ac_cv_exeext
1824 echo "$as_me:1824: result: $ac_cv_exeext" >&5
1825 echo "${ECHO_T}$ac_cv_exeext" >&6
1826
1827 rm -f conftest.$ac_ext
1828 EXEEXT=$ac_cv_exeext
1829 ac_exeext=$EXEEXT
1830 echo "$as_me:1830: checking for object suffix" >&5
1831 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1832 if test "${ac_cv_objext+set}" = set; then
1833   echo $ECHO_N "(cached) $ECHO_C" >&6
1834 else
1835   cat >conftest.$ac_ext <<_ACEOF
1836 #line 1836 "configure"
1837 #include "confdefs.h"
1838
1839 int
1840 main (void)
1841 {
1842
1843   ;
1844   return 0;
1845 }
1846 _ACEOF
1847 rm -f conftest.o conftest.obj
1848 if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5
1849   (eval $ac_compile) 2>&5
1850   ac_status=$?
1851   echo "$as_me:1851: \$? = $ac_status" >&5
1852   (exit $ac_status); }; then
1853   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1854   case $ac_file in
1855     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1856     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1857        break;;
1858   esac
1859 done
1860 else
1861   echo "$as_me: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1863 { { echo "$as_me:1863: error: cannot compute OBJEXT: cannot compile" >&5
1864 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1865    { (exit 1); exit 1; }; }
1866 fi
1867
1868 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1869 fi
1870 echo "$as_me:1870: result: $ac_cv_objext" >&5
1871 echo "${ECHO_T}$ac_cv_objext" >&6
1872 OBJEXT=$ac_cv_objext
1873 ac_objext=$OBJEXT
1874 echo "$as_me:1874: checking whether we are using the GNU C compiler" >&5
1875 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1876 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   cat >conftest.$ac_ext <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886 #ifndef __GNUC__
1887        choke me
1888 #endif
1889
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   ac_compiler_gnu=yes
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 ac_compiler_gnu=no
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1914
1915 fi
1916 echo "$as_me:1916: result: $ac_cv_c_compiler_gnu" >&5
1917 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1918 GCC=`test $ac_compiler_gnu = yes && echo yes`
1919 ac_test_CFLAGS=${CFLAGS+set}
1920 ac_save_CFLAGS=$CFLAGS
1921 CFLAGS="-g"
1922 echo "$as_me:1922: checking whether $CC accepts -g" >&5
1923 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1924 if test "${ac_cv_prog_cc_g+set}" = set; then
1925   echo $ECHO_N "(cached) $ECHO_C" >&6
1926 else
1927   cat >conftest.$ac_ext <<_ACEOF
1928 #line 1928 "configure"
1929 #include "confdefs.h"
1930
1931 int
1932 main (void)
1933 {
1934
1935   ;
1936   return 0;
1937 }
1938 _ACEOF
1939 rm -f conftest.$ac_objext
1940 if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
1941   (eval $ac_compile) 2>&5
1942   ac_status=$?
1943   echo "$as_me:1943: \$? = $ac_status" >&5
1944   (exit $ac_status); } &&
1945          { ac_try='test -s conftest.$ac_objext'
1946   { (eval echo "$as_me:1946: \"$ac_try\"") >&5
1947   (eval $ac_try) 2>&5
1948   ac_status=$?
1949   echo "$as_me:1949: \$? = $ac_status" >&5
1950   (exit $ac_status); }; }; then
1951   ac_cv_prog_cc_g=yes
1952 else
1953   echo "$as_me: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1955 ac_cv_prog_cc_g=no
1956 fi
1957 rm -f conftest.$ac_objext conftest.$ac_ext
1958 fi
1959 echo "$as_me:1959: result: $ac_cv_prog_cc_g" >&5
1960 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1961 if test "$ac_test_CFLAGS" = set; then
1962   CFLAGS=$ac_save_CFLAGS
1963 elif test $ac_cv_prog_cc_g = yes; then
1964   if test "$GCC" = yes; then
1965     CFLAGS="-g -O2"
1966   else
1967     CFLAGS="-g"
1968   fi
1969 else
1970   if test "$GCC" = yes; then
1971     CFLAGS="-O2"
1972   else
1973     CFLAGS=
1974   fi
1975 fi
1976 # Some people use a C++ compiler to compile C.  Since we use `exit',
1977 # in C++ we need to declare it.  In case someone uses the same compiler
1978 # for both compiling C and C++ we need to have the C++ compiler decide
1979 # the declaration of exit, since it's the most demanding environment.
1980 cat >conftest.$ac_ext <<_ACEOF
1981 #ifndef __cplusplus
1982   choke me
1983 #endif
1984 _ACEOF
1985 rm -f conftest.$ac_objext
1986 if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987   (eval $ac_compile) 2>&5
1988   ac_status=$?
1989   echo "$as_me:1989: \$? = $ac_status" >&5
1990   (exit $ac_status); } &&
1991          { ac_try='test -s conftest.$ac_objext'
1992   { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1993   (eval $ac_try) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit $ac_status); }; }; then
1997   for ac_declaration in \
1998    ''\
1999    '#include <stdlib.h>' \
2000    'extern "C" void std::exit (int) throw (); using std::exit;' \
2001    'extern "C" void std::exit (int); using std::exit;' \
2002    'extern "C" void exit (int) throw ();' \
2003    'extern "C" void exit (int);' \
2004    'void exit (int);'
2005 do
2006   cat >conftest.$ac_ext <<_ACEOF
2007 #line 2007 "configure"
2008 #include "confdefs.h"
2009 #include <stdlib.h>
2010 $ac_declaration
2011 int
2012 main (void)
2013 {
2014 exit (42);
2015   ;
2016   return 0;
2017 }
2018 _ACEOF
2019 rm -f conftest.$ac_objext
2020 if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
2021   (eval $ac_compile) 2>&5
2022   ac_status=$?
2023   echo "$as_me:2023: \$? = $ac_status" >&5
2024   (exit $ac_status); } &&
2025          { ac_try='test -s conftest.$ac_objext'
2026   { (eval echo "$as_me:2026: \"$ac_try\"") >&5
2027   (eval $ac_try) 2>&5
2028   ac_status=$?
2029   echo "$as_me:2029: \$? = $ac_status" >&5
2030   (exit $ac_status); }; }; then
2031   :
2032 else
2033   echo "$as_me: failed program was:" >&5
2034 cat conftest.$ac_ext >&5
2035 continue
2036 fi
2037 rm -f conftest.$ac_objext conftest.$ac_ext
2038   cat >conftest.$ac_ext <<_ACEOF
2039 #line 2039 "configure"
2040 #include "confdefs.h"
2041 $ac_declaration
2042 int
2043 main (void)
2044 {
2045 exit (42);
2046   ;
2047   return 0;
2048 }
2049 _ACEOF
2050 rm -f conftest.$ac_objext
2051 if { (eval echo "$as_me:2051: \"$ac_compile\"") >&5
2052   (eval $ac_compile) 2>&5
2053   ac_status=$?
2054   echo "$as_me:2054: \$? = $ac_status" >&5
2055   (exit $ac_status); } &&
2056          { ac_try='test -s conftest.$ac_objext'
2057   { (eval echo "$as_me:2057: \"$ac_try\"") >&5
2058   (eval $ac_try) 2>&5
2059   ac_status=$?
2060   echo "$as_me:2060: \$? = $ac_status" >&5
2061   (exit $ac_status); }; }; then
2062   break
2063 else
2064   echo "$as_me: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2066 fi
2067 rm -f conftest.$ac_objext conftest.$ac_ext
2068 done
2069 rm -rf conftest*
2070 if test -n "$ac_declaration"; then
2071   echo '#ifdef __cplusplus' >>confdefs.h
2072   echo $ac_declaration      >>confdefs.h
2073   echo '#endif'             >>confdefs.h
2074 fi
2075
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 ac_ext=c
2082 ac_cpp='$CPP $CPPFLAGS'
2083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2086 ac_main_return=return
2087
2088 GCC_VERSION=none
2089 if test "$GCC" = yes ; then
2090         echo "$as_me:2090: checking version of $CC" >&5
2091 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2092         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.].*//'`"
2093         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2094         echo "$as_me:2094: result: $GCC_VERSION" >&5
2095 echo "${ECHO_T}$GCC_VERSION" >&6
2096 fi
2097
2098 echo "$as_me:2098: checking for $CC option to accept ANSI C" >&5
2099 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2100 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2101   echo $ECHO_N "(cached) $ECHO_C" >&6
2102 else
2103   ac_cv_prog_cc_stdc=no
2104 ac_save_CC=$CC
2105 cat >conftest.$ac_ext <<_ACEOF
2106 #line 2106 "configure"
2107 #include "confdefs.h"
2108 #include <stdarg.h>
2109 #include <stdio.h>
2110 #include <sys/types.h>
2111 #include <sys/stat.h>
2112 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2113 struct buf { int x; };
2114 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2115 static char *e (p, i)
2116      char **p;
2117      int i;
2118 {
2119   return p[i];
2120 }
2121 static char *f (char * (*g) (char **, int), char **p, ...)
2122 {
2123   char *s;
2124   va_list v;
2125   va_start (v,p);
2126   s = g (p, va_arg (v,int));
2127   va_end (v);
2128   return s;
2129 }
2130 int test (int i, double x);
2131 struct s1 {int (*f) (int a);};
2132 struct s2 {int (*f) (double a);};
2133 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2134 int argc;
2135 char **argv;
2136 int
2137 main (void)
2138 {
2139 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2140   ;
2141   return 0;
2142 }
2143 _ACEOF
2144 # Don't try gcc -ansi; that turns off useful extensions and
2145 # breaks some systems' header files.
2146 # AIX                   -qlanglvl=ansi
2147 # Ultrix and OSF/1      -std1
2148 # HP-UX 10.20 and later -Ae
2149 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2150 # SVR4                  -Xc -D__EXTENSIONS__
2151 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2152 do
2153   CC="$ac_save_CC $ac_arg"
2154   rm -f conftest.$ac_objext
2155 if { (eval echo "$as_me:2155: \"$ac_compile\"") >&5
2156   (eval $ac_compile) 2>&5
2157   ac_status=$?
2158   echo "$as_me:2158: \$? = $ac_status" >&5
2159   (exit $ac_status); } &&
2160          { ac_try='test -s conftest.$ac_objext'
2161   { (eval echo "$as_me:2161: \"$ac_try\"") >&5
2162   (eval $ac_try) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit $ac_status); }; }; then
2166   ac_cv_prog_cc_stdc=$ac_arg
2167 break
2168 else
2169   echo "$as_me: failed program was:" >&5
2170 cat conftest.$ac_ext >&5
2171 fi
2172 rm -f conftest.$ac_objext
2173 done
2174 rm -f conftest.$ac_ext conftest.$ac_objext
2175 CC=$ac_save_CC
2176
2177 fi
2178
2179 case "x$ac_cv_prog_cc_stdc" in
2180   x|xno)
2181     echo "$as_me:2181: result: none needed" >&5
2182 echo "${ECHO_T}none needed" >&6 ;;
2183   *)
2184     echo "$as_me:2184: result: $ac_cv_prog_cc_stdc" >&5
2185 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2186     CC="$CC $ac_cv_prog_cc_stdc" ;;
2187 esac
2188
2189 # This should have been defined by AC_PROG_CC
2190 : ${CC:=cc}
2191
2192 echo "$as_me:2192: checking \$CC variable" >&5
2193 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2194 case "$CC" in
2195 (*[\ \  ]-*)
2196         echo "$as_me:2196: result: broken" >&5
2197 echo "${ECHO_T}broken" >&6
2198         { echo "$as_me:2198: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2199 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2200         # humor him...
2201         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2202         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2203         CC="$cf_prog"
2204         for cf_arg in $cf_flags
2205         do
2206                 case "x$cf_arg" in
2207                 (x-[IUDfgOW]*)
2208
2209 cf_fix_cppflags=no
2210 cf_new_cflags=
2211 cf_new_cppflags=
2212 cf_new_extra_cppflags=
2213
2214 for cf_add_cflags in $cf_arg
2215 do
2216 case $cf_fix_cppflags in
2217 (no)
2218         case $cf_add_cflags in
2219         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2220                 case $cf_add_cflags in
2221                 (-D*)
2222                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2223
2224                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2225                                 && test -z "${cf_tst_cflags}" \
2226                                 && cf_fix_cppflags=yes
2227
2228                         if test $cf_fix_cppflags = yes ; then
2229
2230         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2231         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2232
2233                                 continue
2234                         elif test "${cf_tst_cflags}" = "\"'" ; then
2235
2236         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2237         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2238
2239                                 continue
2240                         fi
2241                         ;;
2242                 esac
2243                 case "$CPPFLAGS" in
2244                 (*$cf_add_cflags)
2245                         ;;
2246                 (*)
2247                         case $cf_add_cflags in
2248                         (-D*)
2249                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2250
2251 CPPFLAGS=`echo "$CPPFLAGS" | \
2252         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2253                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2254
2255                                 ;;
2256                         esac
2257
2258         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2259         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2260
2261                         ;;
2262                 esac
2263                 ;;
2264         (*)
2265
2266         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2267         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2268
2269                 ;;
2270         esac
2271         ;;
2272 (yes)
2273
2274         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2275         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2276
2277         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2278
2279         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2280                 && test -z "${cf_tst_cflags}" \
2281                 && cf_fix_cppflags=no
2282         ;;
2283 esac
2284 done
2285
2286 if test -n "$cf_new_cflags" ; then
2287
2288         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2289         CFLAGS="${CFLAGS}$cf_new_cflags"
2290
2291 fi
2292
2293 if test -n "$cf_new_cppflags" ; then
2294
2295         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2296         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2297
2298 fi
2299
2300 if test -n "$cf_new_extra_cppflags" ; then
2301
2302         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2303         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2304
2305 fi
2306
2307                         ;;
2308                 (*)
2309                         CC="$CC $cf_arg"
2310                         ;;
2311                 esac
2312         done
2313         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2314
2315 echo "${as_me:-configure}:2315: testing resulting CC: '$CC' ..." 1>&5
2316
2317         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2318
2319 echo "${as_me:-configure}:2319: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2320
2321         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2322
2323 echo "${as_me:-configure}:2323: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2324
2325         ;;
2326 (*)
2327         echo "$as_me:2327: result: ok" >&5
2328 echo "${ECHO_T}ok" >&6
2329         ;;
2330 esac
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338 echo "$as_me:2338: checking how to run the C preprocessor" >&5
2339 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2340 # On Suns, sometimes $CPP names a directory.
2341 if test -n "$CPP" && test -d "$CPP"; then
2342   CPP=
2343 fi
2344 if test -z "$CPP"; then
2345   if test "${ac_cv_prog_CPP+set}" = set; then
2346   echo $ECHO_N "(cached) $ECHO_C" >&6
2347 else
2348       # Double quotes because CPP needs to be expanded
2349     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2350     do
2351       ac_preproc_ok=false
2352 for ac_c_preproc_warn_flag in '' yes
2353 do
2354   # Use a header file that comes with gcc, so configuring glibc
2355   # with a fresh cross-compiler works.
2356   # On the NeXT, cc -E runs the code through the compiler's parser,
2357   # not just through cpp. "Syntax error" is here to catch this case.
2358   cat >conftest.$ac_ext <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2361 #include <assert.h>
2362                      Syntax error
2363 _ACEOF
2364 if { (eval echo "$as_me:2364: \"$ac_cpp conftest.$ac_ext\"") >&5
2365   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2366   ac_status=$?
2367   egrep -v '^ *\+' conftest.er1 >conftest.err
2368   rm -f conftest.er1
2369   cat conftest.err >&5
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit $ac_status); } >/dev/null; then
2372   if test -s conftest.err; then
2373     ac_cpp_err=$ac_c_preproc_warn_flag
2374   else
2375     ac_cpp_err=
2376   fi
2377 else
2378   ac_cpp_err=yes
2379 fi
2380 if test -z "$ac_cpp_err"; then
2381   :
2382 else
2383   echo "$as_me: failed program was:" >&5
2384   cat conftest.$ac_ext >&5
2385   # Broken: fails on valid input.
2386 continue
2387 fi
2388 rm -f conftest.err conftest.$ac_ext
2389
2390   # OK, works on sane cases.  Now check whether non-existent headers
2391   # can be detected and how.
2392   cat >conftest.$ac_ext <<_ACEOF
2393 #line 2393 "configure"
2394 #include "confdefs.h"
2395 #include <ac_nonexistent.h>
2396 _ACEOF
2397 if { (eval echo "$as_me:2397: \"$ac_cpp conftest.$ac_ext\"") >&5
2398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2399   ac_status=$?
2400   egrep -v '^ *\+' conftest.er1 >conftest.err
2401   rm -f conftest.er1
2402   cat conftest.err >&5
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); } >/dev/null; then
2405   if test -s conftest.err; then
2406     ac_cpp_err=$ac_c_preproc_warn_flag
2407   else
2408     ac_cpp_err=
2409   fi
2410 else
2411   ac_cpp_err=yes
2412 fi
2413 if test -z "$ac_cpp_err"; then
2414   # Broken: success on invalid input.
2415 continue
2416 else
2417   echo "$as_me: failed program was:" >&5
2418   cat conftest.$ac_ext >&5
2419   # Passes both tests.
2420 ac_preproc_ok=:
2421 break
2422 fi
2423 rm -f conftest.err conftest.$ac_ext
2424
2425 done
2426 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2427 rm -f conftest.err conftest.$ac_ext
2428 if $ac_preproc_ok; then
2429   break
2430 fi
2431
2432     done
2433     ac_cv_prog_CPP=$CPP
2434
2435 fi
2436   CPP=$ac_cv_prog_CPP
2437 else
2438   ac_cv_prog_CPP=$CPP
2439 fi
2440 echo "$as_me:2440: result: $CPP" >&5
2441 echo "${ECHO_T}$CPP" >&6
2442 ac_preproc_ok=false
2443 for ac_c_preproc_warn_flag in '' yes
2444 do
2445   # Use a header file that comes with gcc, so configuring glibc
2446   # with a fresh cross-compiler works.
2447   # On the NeXT, cc -E runs the code through the compiler's parser,
2448   # not just through cpp. "Syntax error" is here to catch this case.
2449   cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2452 #include <assert.h>
2453                      Syntax error
2454 _ACEOF
2455 if { (eval echo "$as_me:2455: \"$ac_cpp conftest.$ac_ext\"") >&5
2456   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2457   ac_status=$?
2458   egrep -v '^ *\+' conftest.er1 >conftest.err
2459   rm -f conftest.er1
2460   cat conftest.err >&5
2461   echo "$as_me:2461: \$? = $ac_status" >&5
2462   (exit $ac_status); } >/dev/null; then
2463   if test -s conftest.err; then
2464     ac_cpp_err=$ac_c_preproc_warn_flag
2465   else
2466     ac_cpp_err=
2467   fi
2468 else
2469   ac_cpp_err=yes
2470 fi
2471 if test -z "$ac_cpp_err"; then
2472   :
2473 else
2474   echo "$as_me: failed program was:" >&5
2475   cat conftest.$ac_ext >&5
2476   # Broken: fails on valid input.
2477 continue
2478 fi
2479 rm -f conftest.err conftest.$ac_ext
2480
2481   # OK, works on sane cases.  Now check whether non-existent headers
2482   # can be detected and how.
2483   cat >conftest.$ac_ext <<_ACEOF
2484 #line 2484 "configure"
2485 #include "confdefs.h"
2486 #include <ac_nonexistent.h>
2487 _ACEOF
2488 if { (eval echo "$as_me:2488: \"$ac_cpp conftest.$ac_ext\"") >&5
2489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2490   ac_status=$?
2491   egrep -v '^ *\+' conftest.er1 >conftest.err
2492   rm -f conftest.er1
2493   cat conftest.err >&5
2494   echo "$as_me:2494: \$? = $ac_status" >&5
2495   (exit $ac_status); } >/dev/null; then
2496   if test -s conftest.err; then
2497     ac_cpp_err=$ac_c_preproc_warn_flag
2498   else
2499     ac_cpp_err=
2500   fi
2501 else
2502   ac_cpp_err=yes
2503 fi
2504 if test -z "$ac_cpp_err"; then
2505   # Broken: success on invalid input.
2506 continue
2507 else
2508   echo "$as_me: failed program was:" >&5
2509   cat conftest.$ac_ext >&5
2510   # Passes both tests.
2511 ac_preproc_ok=:
2512 break
2513 fi
2514 rm -f conftest.err conftest.$ac_ext
2515
2516 done
2517 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2518 rm -f conftest.err conftest.$ac_ext
2519 if $ac_preproc_ok; then
2520   :
2521 else
2522   { { echo "$as_me:2522: error: C preprocessor \"$CPP\" fails sanity check" >&5
2523 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2524    { (exit 1); exit 1; }; }
2525 fi
2526
2527 ac_ext=c
2528 ac_cpp='$CPP $CPPFLAGS'
2529 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2530 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2531 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2532 ac_main_return=return
2533
2534 if test $ac_cv_c_compiler_gnu = yes; then
2535     echo "$as_me:2535: checking whether $CC needs -traditional" >&5
2536 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2537 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2538   echo $ECHO_N "(cached) $ECHO_C" >&6
2539 else
2540     ac_pattern="Autoconf.*'x'"
2541   cat >conftest.$ac_ext <<_ACEOF
2542 #line 2542 "configure"
2543 #include "confdefs.h"
2544 #include <sgtty.h>
2545 int Autoconf = TIOCGETP;
2546 _ACEOF
2547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2548   egrep "$ac_pattern" >/dev/null 2>&1; then
2549   ac_cv_prog_gcc_traditional=yes
2550 else
2551   ac_cv_prog_gcc_traditional=no
2552 fi
2553 rm -rf conftest*
2554
2555   if test $ac_cv_prog_gcc_traditional = no; then
2556     cat >conftest.$ac_ext <<_ACEOF
2557 #line 2557 "configure"
2558 #include "confdefs.h"
2559 #include <termio.h>
2560 int Autoconf = TCGETA;
2561 _ACEOF
2562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2563   egrep "$ac_pattern" >/dev/null 2>&1; then
2564   ac_cv_prog_gcc_traditional=yes
2565 fi
2566 rm -rf conftest*
2567
2568   fi
2569 fi
2570 echo "$as_me:2570: result: $ac_cv_prog_gcc_traditional" >&5
2571 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2572   if test $ac_cv_prog_gcc_traditional = yes; then
2573     CC="$CC -traditional"
2574   fi
2575 fi
2576
2577 echo "$as_me:2577: checking whether $CC understands -c and -o together" >&5
2578 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2579 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2580   echo $ECHO_N "(cached) $ECHO_C" >&6
2581 else
2582
2583 cat > conftest.$ac_ext <<CF_EOF
2584 int main(void)
2585 {
2586         ${cf_cv_main_return:-return}(0);
2587 }
2588 CF_EOF
2589 # We do the test twice because some compilers refuse to overwrite an
2590 # existing .o file with -o, though they will create one.
2591 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2592 if { (eval echo "$as_me:2592: \"$ac_try\"") >&5
2593   (eval $ac_try) 2>&5
2594   ac_status=$?
2595   echo "$as_me:2595: \$? = $ac_status" >&5
2596   (exit $ac_status); } &&
2597   test -f conftest2.$ac_objext && { (eval echo "$as_me:2597: \"$ac_try\"") >&5
2598   (eval $ac_try) 2>&5
2599   ac_status=$?
2600   echo "$as_me:2600: \$? = $ac_status" >&5
2601   (exit $ac_status); };
2602 then
2603   eval cf_cv_prog_CC_c_o=yes
2604 else
2605   eval cf_cv_prog_CC_c_o=no
2606 fi
2607 rm -rf conftest*
2608
2609 fi
2610 if test $cf_cv_prog_CC_c_o = yes; then
2611   echo "$as_me:2611: result: yes" >&5
2612 echo "${ECHO_T}yes" >&6
2613 else
2614   echo "$as_me:2614: result: no" >&5
2615 echo "${ECHO_T}no" >&6
2616 fi
2617
2618 if test "$cross_compiling" = yes ; then
2619         LDCONFIG=:
2620 else
2621         case "$cf_cv_system_name" in
2622         (dragonfly*|mirbsd*|freebsd*)
2623                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2624                 ;;
2625         (*) LDPATH=$PATH:/sbin:/usr/sbin
2626                 # Extract the first word of "ldconfig", so it can be a program name with args.
2627 set dummy ldconfig; ac_word=$2
2628 echo "$as_me:2628: checking for $ac_word" >&5
2629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2630 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   case $LDCONFIG in
2634   [\\/]* | ?:[\\/]*)
2635   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2636   ;;
2637   *)
2638   ac_save_IFS=$IFS; IFS=$ac_path_separator
2639 ac_dummy="$LDPATH"
2640 for ac_dir in $ac_dummy; do
2641   IFS=$ac_save_IFS
2642   test -z "$ac_dir" && ac_dir=.
2643   if $as_executable_p "$ac_dir/$ac_word"; then
2644    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2645    echo "$as_me:2645: found $ac_dir/$ac_word" >&5
2646    break
2647 fi
2648 done
2649
2650   ;;
2651 esac
2652 fi
2653 LDCONFIG=$ac_cv_path_LDCONFIG
2654
2655 if test -n "$LDCONFIG"; then
2656   echo "$as_me:2656: result: $LDCONFIG" >&5
2657 echo "${ECHO_T}$LDCONFIG" >&6
2658 else
2659   echo "$as_me:2659: result: no" >&5
2660 echo "${ECHO_T}no" >&6
2661 fi
2662
2663                 ;;
2664         esac
2665 fi
2666
2667 echo "$as_me:2667: checking if you want to ensure bool is consistent with C++" >&5
2668 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2669
2670 # Check whether --with-cxx or --without-cxx was given.
2671 if test "${with_cxx+set}" = set; then
2672   withval="$with_cxx"
2673   cf_with_cxx=$withval
2674 else
2675   cf_with_cxx=yes
2676 fi;
2677 echo "$as_me:2677: result: $cf_with_cxx" >&5
2678 echo "${ECHO_T}$cf_with_cxx" >&6
2679 if test "X$cf_with_cxx" = Xno ; then
2680         CXX=""
2681         GXX=""
2682 else
2683         # with autoconf 2.13, we can change the error to a warning:
2684                 ac_ext=cc
2685 ac_cpp='$CXXCPP $CPPFLAGS'
2686 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2689 ac_main_return=return
2690 if test -n "$ac_tool_prefix"; then
2691   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2692   do
2693     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2694 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2695 echo "$as_me:2695: checking for $ac_word" >&5
2696 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2697 if test "${ac_cv_prog_CXX+set}" = set; then
2698   echo $ECHO_N "(cached) $ECHO_C" >&6
2699 else
2700   if test -n "$CXX"; then
2701   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2702 else
2703   ac_save_IFS=$IFS; IFS=$ac_path_separator
2704 ac_dummy="$PATH"
2705 for ac_dir in $ac_dummy; do
2706   IFS=$ac_save_IFS
2707   test -z "$ac_dir" && ac_dir=.
2708   $as_executable_p "$ac_dir/$ac_word" || continue
2709 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2710 echo "$as_me:2710: found $ac_dir/$ac_word" >&5
2711 break
2712 done
2713
2714 fi
2715 fi
2716 CXX=$ac_cv_prog_CXX
2717 if test -n "$CXX"; then
2718   echo "$as_me:2718: result: $CXX" >&5
2719 echo "${ECHO_T}$CXX" >&6
2720 else
2721   echo "$as_me:2721: result: no" >&5
2722 echo "${ECHO_T}no" >&6
2723 fi
2724
2725     test -n "$CXX" && break
2726   done
2727 fi
2728 if test -z "$CXX"; then
2729   ac_ct_CXX=$CXX
2730   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2731 do
2732   # Extract the first word of "$ac_prog", so it can be a program name with args.
2733 set dummy $ac_prog; ac_word=$2
2734 echo "$as_me:2734: checking for $ac_word" >&5
2735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2736 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2737   echo $ECHO_N "(cached) $ECHO_C" >&6
2738 else
2739   if test -n "$ac_ct_CXX"; then
2740   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2741 else
2742   ac_save_IFS=$IFS; IFS=$ac_path_separator
2743 ac_dummy="$PATH"
2744 for ac_dir in $ac_dummy; do
2745   IFS=$ac_save_IFS
2746   test -z "$ac_dir" && ac_dir=.
2747   $as_executable_p "$ac_dir/$ac_word" || continue
2748 ac_cv_prog_ac_ct_CXX="$ac_prog"
2749 echo "$as_me:2749: found $ac_dir/$ac_word" >&5
2750 break
2751 done
2752
2753 fi
2754 fi
2755 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2756 if test -n "$ac_ct_CXX"; then
2757   echo "$as_me:2757: result: $ac_ct_CXX" >&5
2758 echo "${ECHO_T}$ac_ct_CXX" >&6
2759 else
2760   echo "$as_me:2760: result: no" >&5
2761 echo "${ECHO_T}no" >&6
2762 fi
2763
2764   test -n "$ac_ct_CXX" && break
2765 done
2766 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2767
2768   CXX=$ac_ct_CXX
2769 fi
2770
2771 # Provide some information about the compiler.
2772 echo "$as_me:2772:" \
2773      "checking for C++ compiler version" >&5
2774 ac_compiler=`set X $ac_compile; echo $2`
2775 { (eval echo "$as_me:2775: \"$ac_compiler --version </dev/null >&5\"") >&5
2776   (eval $ac_compiler --version </dev/null >&5) 2>&5
2777   ac_status=$?
2778   echo "$as_me:2778: \$? = $ac_status" >&5
2779   (exit $ac_status); }
2780 { (eval echo "$as_me:2780: \"$ac_compiler -v </dev/null >&5\"") >&5
2781   (eval $ac_compiler -v </dev/null >&5) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); }
2785 { (eval echo "$as_me:2785: \"$ac_compiler -V </dev/null >&5\"") >&5
2786   (eval $ac_compiler -V </dev/null >&5) 2>&5
2787   ac_status=$?
2788   echo "$as_me:2788: \$? = $ac_status" >&5
2789   (exit $ac_status); }
2790
2791 echo "$as_me:2791: checking whether we are using the GNU C++ compiler" >&5
2792 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2793 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2794   echo $ECHO_N "(cached) $ECHO_C" >&6
2795 else
2796   cat >conftest.$ac_ext <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799
2800 int
2801 main (void)
2802 {
2803 #ifndef __GNUC__
2804        choke me
2805 #endif
2806
2807   ;
2808   return 0;
2809 }
2810 _ACEOF
2811 rm -f conftest.$ac_objext
2812 if { (eval echo "$as_me:2812: \"$ac_compile\"") >&5
2813   (eval $ac_compile) 2>&5
2814   ac_status=$?
2815   echo "$as_me:2815: \$? = $ac_status" >&5
2816   (exit $ac_status); } &&
2817          { ac_try='test -s conftest.$ac_objext'
2818   { (eval echo "$as_me:2818: \"$ac_try\"") >&5
2819   (eval $ac_try) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }; }; then
2823   ac_compiler_gnu=yes
2824 else
2825   echo "$as_me: failed program was:" >&5
2826 cat conftest.$ac_ext >&5
2827 ac_compiler_gnu=no
2828 fi
2829 rm -f conftest.$ac_objext conftest.$ac_ext
2830 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2831
2832 fi
2833 echo "$as_me:2833: result: $ac_cv_cxx_compiler_gnu" >&5
2834 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2835 GXX=`test $ac_compiler_gnu = yes && echo yes`
2836 ac_test_CXXFLAGS=${CXXFLAGS+set}
2837 ac_save_CXXFLAGS=$CXXFLAGS
2838 CXXFLAGS="-g"
2839 echo "$as_me:2839: checking whether $CXX accepts -g" >&5
2840 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2841 if test "${ac_cv_prog_cxx_g+set}" = set; then
2842   echo $ECHO_N "(cached) $ECHO_C" >&6
2843 else
2844   cat >conftest.$ac_ext <<_ACEOF
2845 #line 2845 "configure"
2846 #include "confdefs.h"
2847
2848 int
2849 main (void)
2850 {
2851
2852   ;
2853   return 0;
2854 }
2855 _ACEOF
2856 rm -f conftest.$ac_objext
2857 if { (eval echo "$as_me:2857: \"$ac_compile\"") >&5
2858   (eval $ac_compile) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); } &&
2862          { ac_try='test -s conftest.$ac_objext'
2863   { (eval echo "$as_me:2863: \"$ac_try\"") >&5
2864   (eval $ac_try) 2>&5
2865   ac_status=$?
2866   echo "$as_me:2866: \$? = $ac_status" >&5
2867   (exit $ac_status); }; }; then
2868   ac_cv_prog_cxx_g=yes
2869 else
2870   echo "$as_me: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872 ac_cv_prog_cxx_g=no
2873 fi
2874 rm -f conftest.$ac_objext conftest.$ac_ext
2875 fi
2876 echo "$as_me:2876: result: $ac_cv_prog_cxx_g" >&5
2877 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2878 if test "$ac_test_CXXFLAGS" = set; then
2879   CXXFLAGS=$ac_save_CXXFLAGS
2880 elif test $ac_cv_prog_cxx_g = yes; then
2881   if test "$GXX" = yes; then
2882     CXXFLAGS="-g -O2"
2883   else
2884     CXXFLAGS="-g"
2885   fi
2886 else
2887   if test "$GXX" = yes; then
2888     CXXFLAGS="-O2"
2889   else
2890     CXXFLAGS=
2891   fi
2892 fi
2893 for ac_declaration in \
2894    ''\
2895    '#include <stdlib.h>' \
2896    'extern "C" void std::exit (int) throw (); using std::exit;' \
2897    'extern "C" void std::exit (int); using std::exit;' \
2898    'extern "C" void exit (int) throw ();' \
2899    'extern "C" void exit (int);' \
2900    'void exit (int);'
2901 do
2902   cat >conftest.$ac_ext <<_ACEOF
2903 #line 2903 "configure"
2904 #include "confdefs.h"
2905 #include <stdlib.h>
2906 $ac_declaration
2907 int
2908 main (void)
2909 {
2910 exit (42);
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 rm -f conftest.$ac_objext
2916 if { (eval echo "$as_me:2916: \"$ac_compile\"") >&5
2917   (eval $ac_compile) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); } &&
2921          { ac_try='test -s conftest.$ac_objext'
2922   { (eval echo "$as_me:2922: \"$ac_try\"") >&5
2923   (eval $ac_try) 2>&5
2924   ac_status=$?
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit $ac_status); }; }; then
2927   :
2928 else
2929   echo "$as_me: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 continue
2932 fi
2933 rm -f conftest.$ac_objext conftest.$ac_ext
2934   cat >conftest.$ac_ext <<_ACEOF
2935 #line 2935 "configure"
2936 #include "confdefs.h"
2937 $ac_declaration
2938 int
2939 main (void)
2940 {
2941 exit (42);
2942   ;
2943   return 0;
2944 }
2945 _ACEOF
2946 rm -f conftest.$ac_objext
2947 if { (eval echo "$as_me:2947: \"$ac_compile\"") >&5
2948   (eval $ac_compile) 2>&5
2949   ac_status=$?
2950   echo "$as_me:2950: \$? = $ac_status" >&5
2951   (exit $ac_status); } &&
2952          { ac_try='test -s conftest.$ac_objext'
2953   { (eval echo "$as_me:2953: \"$ac_try\"") >&5
2954   (eval $ac_try) 2>&5
2955   ac_status=$?
2956   echo "$as_me:2956: \$? = $ac_status" >&5
2957   (exit $ac_status); }; }; then
2958   break
2959 else
2960   echo "$as_me: failed program was:" >&5
2961 cat conftest.$ac_ext >&5
2962 fi
2963 rm -f conftest.$ac_objext conftest.$ac_ext
2964 done
2965 rm -rf conftest*
2966 if test -n "$ac_declaration"; then
2967   echo '#ifdef __cplusplus' >>confdefs.h
2968   echo $ac_declaration      >>confdefs.h
2969   echo '#endif'             >>confdefs.h
2970 fi
2971
2972 ac_ext=c
2973 ac_cpp='$CPP $CPPFLAGS'
2974 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2975 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2976 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2977 ac_main_return=return
2978
2979         ac_ext=cc
2980 ac_cpp='$CXXCPP $CPPFLAGS'
2981 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2982 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2983 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2984 ac_main_return=return
2985
2986         if test "x$cf_with_cxx" != xno
2987         then
2988                 # Several of the C++ configurations do not work, particularly when
2989                 # cross-compiling (20140913 -TD)
2990                 echo "$as_me:2990: checking if $CXX works" >&5
2991 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2992
2993                 save_CPPFLAGS="$CPPFLAGS"
2994                 eval cf_includedir=${includedir}
2995                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2996
2997 cat >conftest.$ac_ext <<_ACEOF
2998 #line 2998 "configure"
2999 #include "confdefs.h"
3000
3001 #include <stdlib.h>
3002 #include <stdio.h>
3003
3004 int
3005 main (void)
3006 {
3007
3008                 printf("Hello world!\n")
3009
3010   ;
3011   return 0;
3012 }
3013 _ACEOF
3014 rm -f conftest.$ac_objext
3015 if { (eval echo "$as_me:3015: \"$ac_compile\"") >&5
3016   (eval $ac_compile) 2>&5
3017   ac_status=$?
3018   echo "$as_me:3018: \$? = $ac_status" >&5
3019   (exit $ac_status); } &&
3020          { ac_try='test -s conftest.$ac_objext'
3021   { (eval echo "$as_me:3021: \"$ac_try\"") >&5
3022   (eval $ac_try) 2>&5
3023   ac_status=$?
3024   echo "$as_me:3024: \$? = $ac_status" >&5
3025   (exit $ac_status); }; }; then
3026   cf_cxx_works=yes
3027 else
3028   echo "$as_me: failed program was:" >&5
3029 cat conftest.$ac_ext >&5
3030 cf_cxx_works=no
3031 fi
3032 rm -f conftest.$ac_objext conftest.$ac_ext
3033                 CPPFLAGS="$save_CPPFLAGS"
3034
3035                 echo "$as_me:3035: result: $cf_cxx_works" >&5
3036 echo "${ECHO_T}$cf_cxx_works" >&6
3037                 if test "x$cf_cxx_works" = xno
3038                 then
3039                         { echo "$as_me:3039: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3040 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3041                         cf_with_cxx=no; CXX=""; GXX="";
3042                 fi
3043         fi
3044         ac_ext=c
3045 ac_cpp='$CPP $CPPFLAGS'
3046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3049 ac_main_return=return
3050
3051         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3052         if test "$CXX" = "g++" ; then
3053                 # Extract the first word of "g++", so it can be a program name with args.
3054 set dummy g++; ac_word=$2
3055 echo "$as_me:3055: checking for $ac_word" >&5
3056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3057 if test "${ac_cv_path_CXX+set}" = set; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   case $CXX in
3061   [\\/]* | ?:[\\/]*)
3062   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3063   ;;
3064   *)
3065   ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068   IFS=$ac_save_IFS
3069   test -z "$ac_dir" && ac_dir=.
3070   if $as_executable_p "$ac_dir/$ac_word"; then
3071    ac_cv_path_CXX="$ac_dir/$ac_word"
3072    echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3073    break
3074 fi
3075 done
3076
3077   ;;
3078 esac
3079 fi
3080 CXX=$ac_cv_path_CXX
3081
3082 if test -n "$CXX"; then
3083   echo "$as_me:3083: result: $CXX" >&5
3084 echo "${ECHO_T}$CXX" >&6
3085 else
3086   echo "$as_me:3086: result: no" >&5
3087 echo "${ECHO_T}no" >&6
3088 fi
3089
3090         fi
3091         case "x$CXX" in
3092         (x|xg++)
3093                 { echo "$as_me:3093: WARNING: You don't have any C++ compiler, too bad" >&5
3094 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3095                 cf_with_cxx=no; CXX=""; GXX="";
3096                 ;;
3097         esac
3098 fi
3099
3100 GXX_VERSION=none
3101 if test "$GXX" = yes; then
3102         echo "$as_me:3102: checking version of ${CXX:-g++}" >&5
3103 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3104         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3105         if test -z "$GXX_VERSION"
3106         then
3107                 GXX_VERSION=unknown
3108                 GXX=no
3109         fi
3110         echo "$as_me:3110: result: $GXX_VERSION" >&5
3111 echo "${ECHO_T}$GXX_VERSION" >&6
3112 fi
3113
3114 case $GXX_VERSION in
3115 (1*|2.[0-6]*)
3116         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3117         # cf_cxx_library=no
3118         { echo "$as_me:3118: WARNING: templates do not work" >&5
3119 echo "$as_me: WARNING: templates do not work" >&2;}
3120         ;;
3121 esac
3122
3123 echo "$as_me:3123: checking if you want to build C++ binding and demo" >&5
3124 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3125
3126 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3127 if test "${with_cxx_binding+set}" = set; then
3128   withval="$with_cxx_binding"
3129   cf_with_cxx_binding=$withval
3130 else
3131   cf_with_cxx_binding=$cf_with_cxx
3132 fi;
3133 echo "$as_me:3133: result: $cf_with_cxx_binding" >&5
3134 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3135
3136 echo "$as_me:3136: checking if you want to build with Ada95" >&5
3137 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3138 echo "$as_me:3138: result: $cf_with_ada" >&5
3139 echo "${ECHO_T}$cf_with_ada" >&6
3140
3141 echo "$as_me:3141: checking if you want to install terminal database" >&5
3142 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3143
3144 # Check whether --enable-db-install or --disable-db-install was given.
3145 if test "${enable_db_install+set}" = set; then
3146   enableval="$enable_db_install"
3147   cf_with_db_install=$enableval
3148 else
3149   cf_with_db_install=yes
3150 fi;
3151 echo "$as_me:3151: result: $cf_with_db_install" >&5
3152 echo "${ECHO_T}$cf_with_db_install" >&6
3153
3154 echo "$as_me:3154: checking if you want to install manpages" >&5
3155 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3156
3157 # Check whether --with-manpages or --without-manpages was given.
3158 if test "${with_manpages+set}" = set; then
3159   withval="$with_manpages"
3160   cf_with_manpages=$withval
3161 else
3162   cf_with_manpages=yes
3163 fi;
3164 echo "$as_me:3164: result: $cf_with_manpages" >&5
3165 echo "${ECHO_T}$cf_with_manpages" >&6
3166
3167 echo "$as_me:3167: checking if you want to build programs such as tic" >&5
3168 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3169
3170 # Check whether --with-progs or --without-progs was given.
3171 if test "${with_progs+set}" = set; then
3172   withval="$with_progs"
3173   cf_with_progs=$withval
3174 else
3175   cf_with_progs=yes
3176 fi;
3177 echo "$as_me:3177: result: $cf_with_progs" >&5
3178 echo "${ECHO_T}$cf_with_progs" >&6
3179
3180 if test -f $srcdir/tack/tack.h; then
3181         if test "x$cross_compiling" = xyes ; then
3182                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3183
3184 echo "${as_me:-configure}:3184: testing ignoring tack because we are cross-compiling ..." 1>&5
3185
3186                 cf_with_tack=no
3187         else
3188                 echo "$as_me:3188: checking if you want to build the tack program" >&5
3189 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3190
3191 # Check whether --with-tack or --without-tack was given.
3192 if test "${with_tack+set}" = set; then
3193   withval="$with_tack"
3194   cf_with_tack=$withval
3195 else
3196   cf_with_tack=$cf_with_progs
3197 fi;
3198                 echo "$as_me:3198: result: $cf_with_tack" >&5
3199 echo "${ECHO_T}$cf_with_tack" >&6
3200         fi
3201 else
3202         cf_with_tack=no
3203 fi
3204
3205 echo "$as_me:3205: checking if you want to build test-programs" >&5
3206 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3207
3208 # Check whether --with-tests or --without-tests was given.
3209 if test "${with_tests+set}" = set; then
3210   withval="$with_tests"
3211   cf_with_tests=$withval
3212 else
3213   cf_with_tests=yes
3214 fi;
3215 echo "$as_me:3215: result: $cf_with_tests" >&5
3216 echo "${ECHO_T}$cf_with_tests" >&6
3217
3218 echo "$as_me:3218: checking if you wish to install curses.h" >&5
3219 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3220
3221 # Check whether --with-curses-h or --without-curses-h was given.
3222 if test "${with_curses_h+set}" = set; then
3223   withval="$with_curses_h"
3224   with_curses_h=$withval
3225 else
3226   with_curses_h=yes
3227 fi;
3228 echo "$as_me:3228: result: $with_curses_h" >&5
3229 echo "${ECHO_T}$with_curses_h" >&6
3230
3231 modules_to_build="ncurses"
3232 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3233 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3234 modules_to_build="$modules_to_build panel menu form"
3235
3236 test "$program_prefix" != NONE &&
3237   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3238 # Use a double $ so make ignores it.
3239 test "$program_suffix" != NONE &&
3240   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3241 # Double any \ or $.  echo might interpret backslashes.
3242 # By default was `s,x,x', remove it if useless.
3243 cat <<\_ACEOF >conftest.sed
3244 s/[\\$]/&&/g;s/;s,x,x,$//
3245 _ACEOF
3246 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3247 rm conftest.sed
3248
3249 for ac_prog in mawk gawk nawk awk
3250 do
3251   # Extract the first word of "$ac_prog", so it can be a program name with args.
3252 set dummy $ac_prog; ac_word=$2
3253 echo "$as_me:3253: checking for $ac_word" >&5
3254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3255 if test "${ac_cv_prog_AWK+set}" = set; then
3256   echo $ECHO_N "(cached) $ECHO_C" >&6
3257 else
3258   if test -n "$AWK"; then
3259   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3260 else
3261   ac_save_IFS=$IFS; IFS=$ac_path_separator
3262 ac_dummy="$PATH"
3263 for ac_dir in $ac_dummy; do
3264   IFS=$ac_save_IFS
3265   test -z "$ac_dir" && ac_dir=.
3266   $as_executable_p "$ac_dir/$ac_word" || continue
3267 ac_cv_prog_AWK="$ac_prog"
3268 echo "$as_me:3268: found $ac_dir/$ac_word" >&5
3269 break
3270 done
3271
3272 fi
3273 fi
3274 AWK=$ac_cv_prog_AWK
3275 if test -n "$AWK"; then
3276   echo "$as_me:3276: result: $AWK" >&5
3277 echo "${ECHO_T}$AWK" >&6
3278 else
3279   echo "$as_me:3279: result: no" >&5
3280 echo "${ECHO_T}no" >&6
3281 fi
3282
3283   test -n "$AWK" && break
3284 done
3285
3286 test -z "$AWK" && { { echo "$as_me:3286: error: No awk program found" >&5
3287 echo "$as_me: error: No awk program found" >&2;}
3288    { (exit 1); exit 1; }; }
3289
3290 echo "$as_me:3290: checking for egrep" >&5
3291 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3292 if test "${ac_cv_prog_egrep+set}" = set; then
3293   echo $ECHO_N "(cached) $ECHO_C" >&6
3294 else
3295   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3296                 then ac_cv_prog_egrep='grep -E'
3297                 else ac_cv_prog_egrep='egrep'
3298         fi
3299 fi
3300 echo "$as_me:3300: result: $ac_cv_prog_egrep" >&5
3301 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3302         EGREP=$ac_cv_prog_egrep
3303
3304         test -z "$EGREP" && { { echo "$as_me:3304: error: No egrep program found" >&5
3305 echo "$as_me: error: No egrep program found" >&2;}
3306    { (exit 1); exit 1; }; }
3307
3308 # Find a good install program.  We prefer a C program (faster),
3309 # so one script is as good as another.  But avoid the broken or
3310 # incompatible versions:
3311 # SysV /etc/install, /usr/sbin/install
3312 # SunOS /usr/etc/install
3313 # IRIX /sbin/install
3314 # AIX /bin/install
3315 # AmigaOS /C/install, which installs bootblocks on floppy discs
3316 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3317 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3318 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3319 # ./install, which can be erroneously created by make from ./install.sh.
3320 echo "$as_me:3320: checking for a BSD compatible install" >&5
3321 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3322 if test -z "$INSTALL"; then
3323 if test "${ac_cv_path_install+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326     ac_save_IFS=$IFS; IFS=$ac_path_separator
3327   for ac_dir in $PATH; do
3328     IFS=$ac_save_IFS
3329     # Account for people who put trailing slashes in PATH elements.
3330     case $ac_dir/ in
3331     / | ./ | .// | /cC/* \
3332     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3333     | /usr/ucb/* ) ;;
3334     *)
3335       # OSF1 and SCO ODT 3.0 have their own names for install.
3336       # Don't use installbsd from OSF since it installs stuff as root
3337       # by default.
3338       for ac_prog in ginstall scoinst install; do
3339         if $as_executable_p "$ac_dir/$ac_prog"; then
3340           if test $ac_prog = install &&
3341             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3342             # AIX install.  It has an incompatible calling convention.
3343             :
3344           elif test $ac_prog = install &&
3345             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3346             # program-specific install script used by HP pwplus--don't use.
3347             :
3348           else
3349             ac_cv_path_install="$ac_dir/$ac_prog -c"
3350             break 2
3351           fi
3352         fi
3353       done
3354       ;;
3355     esac
3356   done
3357
3358 fi
3359   if test "${ac_cv_path_install+set}" = set; then
3360     INSTALL=$ac_cv_path_install
3361   else
3362     # As a last resort, use the slow shell script.  We don't cache a
3363     # path for INSTALL within a source directory, because that will
3364     # break other packages using the cache if that directory is
3365     # removed, or if the path is relative.
3366     INSTALL=$ac_install_sh
3367   fi
3368 fi
3369 echo "$as_me:3369: result: $INSTALL" >&5
3370 echo "${ECHO_T}$INSTALL" >&6
3371
3372 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3373 # It thinks the first close brace ends the variable substitution.
3374 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3375
3376 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3377
3378 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3379
3380 case $INSTALL in
3381 (/*)
3382         ;;
3383 (*)
3384         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3385         test -z "$cf_dir" && cf_dir=.
3386         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3387         ;;
3388 esac
3389
3390 for ac_prog in lint cppcheck splint
3391 do
3392   # Extract the first word of "$ac_prog", so it can be a program name with args.
3393 set dummy $ac_prog; ac_word=$2
3394 echo "$as_me:3394: checking for $ac_word" >&5
3395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396 if test "${ac_cv_prog_LINT+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   if test -n "$LINT"; then
3400   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3401 else
3402   ac_save_IFS=$IFS; IFS=$ac_path_separator
3403 ac_dummy="$PATH"
3404 for ac_dir in $ac_dummy; do
3405   IFS=$ac_save_IFS
3406   test -z "$ac_dir" && ac_dir=.
3407   $as_executable_p "$ac_dir/$ac_word" || continue
3408 ac_cv_prog_LINT="$ac_prog"
3409 echo "$as_me:3409: found $ac_dir/$ac_word" >&5
3410 break
3411 done
3412
3413 fi
3414 fi
3415 LINT=$ac_cv_prog_LINT
3416 if test -n "$LINT"; then
3417   echo "$as_me:3417: result: $LINT" >&5
3418 echo "${ECHO_T}$LINT" >&6
3419 else
3420   echo "$as_me:3420: result: no" >&5
3421 echo "${ECHO_T}no" >&6
3422 fi
3423
3424   test -n "$LINT" && break
3425 done
3426
3427 echo "$as_me:3427: checking whether ln -s works" >&5
3428 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3429 LN_S=$as_ln_s
3430 if test "$LN_S" = "ln -s"; then
3431   echo "$as_me:3431: result: yes" >&5
3432 echo "${ECHO_T}yes" >&6
3433 else
3434   echo "$as_me:3434: result: no, using $LN_S" >&5
3435 echo "${ECHO_T}no, using $LN_S" >&6
3436 fi
3437
3438 echo "$as_me:3438: checking if $LN_S -f options work" >&5
3439 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3440
3441 rm -f conf$$.src conf$$dst
3442 echo >conf$$.dst
3443 echo first >conf$$.src
3444 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3445         cf_prog_ln_sf=yes
3446 else
3447         cf_prog_ln_sf=no
3448 fi
3449 rm -f conf$$.dst conf$$src
3450 echo "$as_me:3450: result: $cf_prog_ln_sf" >&5
3451 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3452
3453 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3454
3455 echo "$as_me:3455: checking for long file names" >&5
3456 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3457 if test "${ac_cv_sys_long_file_names+set}" = set; then
3458   echo $ECHO_N "(cached) $ECHO_C" >&6
3459 else
3460   ac_cv_sys_long_file_names=yes
3461 # Test for long file names in all the places we know might matter:
3462 #      .                the current directory, where building will happen
3463 #      $prefix/lib      where we will be installing things
3464 #      $exec_prefix/lib likewise
3465 # eval it to expand exec_prefix.
3466 #      $TMPDIR          if set, where it might want to write temporary files
3467 # if $TMPDIR is not set:
3468 #      /tmp             where it might want to write temporary files
3469 #      /var/tmp         likewise
3470 #      /usr/tmp         likewise
3471 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3472   ac_tmpdirs=$TMPDIR
3473 else
3474   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3475 fi
3476 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3477   test -d $ac_dir || continue
3478   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3479   ac_xdir=$ac_dir/cf$$
3480   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3481   ac_tf1=$ac_xdir/conftest9012345
3482   ac_tf2=$ac_xdir/conftest9012346
3483   (echo 1 >$ac_tf1) 2>/dev/null
3484   (echo 2 >$ac_tf2) 2>/dev/null
3485   ac_val=`cat $ac_tf1 2>/dev/null`
3486   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3487     ac_cv_sys_long_file_names=no
3488     rm -rf $ac_xdir 2>/dev/null
3489     break
3490   fi
3491   rm -rf $ac_xdir 2>/dev/null
3492 done
3493 fi
3494 echo "$as_me:3494: result: $ac_cv_sys_long_file_names" >&5
3495 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3496 if test $ac_cv_sys_long_file_names = yes; then
3497
3498 cat >>confdefs.h <<\EOF
3499 #define HAVE_LONG_FILE_NAMES 1
3500 EOF
3501
3502 fi
3503
3504 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3505 # of package conflict.
3506 cf_config_suffix=
3507
3508 # Check whether --with-config-suffix or --without-config-suffix was given.
3509 if test "${with_config_suffix+set}" = set; then
3510   withval="$with_config_suffix"
3511   case "x$withval" in
3512         (xyes|xno)
3513                 { echo "$as_me:3513: WARNING: expected a value for config-suffix option" >&5
3514 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3515                 ;;
3516         (*)     cf_config_suffix="$withval"
3517                 ;;
3518         esac
3519 fi;
3520
3521 # If we find pkg-config, check if we should install the ".pc" files.
3522
3523 echo "$as_me:3523: checking if you want to use pkg-config" >&5
3524 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3525
3526 # Check whether --with-pkg-config or --without-pkg-config was given.
3527 if test "${with_pkg_config+set}" = set; then
3528   withval="$with_pkg_config"
3529   cf_pkg_config=$withval
3530 else
3531   cf_pkg_config=yes
3532 fi;
3533 echo "$as_me:3533: result: $cf_pkg_config" >&5
3534 echo "${ECHO_T}$cf_pkg_config" >&6
3535
3536 case $cf_pkg_config in
3537 (no)
3538         PKG_CONFIG=none
3539         ;;
3540 (yes)
3541
3542 if test -n "$ac_tool_prefix"; then
3543   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3544 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3545 echo "$as_me:3545: checking for $ac_word" >&5
3546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3547 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3548   echo $ECHO_N "(cached) $ECHO_C" >&6
3549 else
3550   case $PKG_CONFIG in
3551   [\\/]* | ?:[\\/]*)
3552   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3553   ;;
3554   *)
3555   ac_save_IFS=$IFS; IFS=$ac_path_separator
3556 ac_dummy="$PATH"
3557 for ac_dir in $ac_dummy; do
3558   IFS=$ac_save_IFS
3559   test -z "$ac_dir" && ac_dir=.
3560   if $as_executable_p "$ac_dir/$ac_word"; then
3561    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3562    echo "$as_me:3562: found $ac_dir/$ac_word" >&5
3563    break
3564 fi
3565 done
3566
3567   ;;
3568 esac
3569 fi
3570 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3571
3572 if test -n "$PKG_CONFIG"; then
3573   echo "$as_me:3573: result: $PKG_CONFIG" >&5
3574 echo "${ECHO_T}$PKG_CONFIG" >&6
3575 else
3576   echo "$as_me:3576: result: no" >&5
3577 echo "${ECHO_T}no" >&6
3578 fi
3579
3580 fi
3581 if test -z "$ac_cv_path_PKG_CONFIG"; then
3582   ac_pt_PKG_CONFIG=$PKG_CONFIG
3583   # Extract the first word of "pkg-config", so it can be a program name with args.
3584 set dummy pkg-config; ac_word=$2
3585 echo "$as_me:3585: checking for $ac_word" >&5
3586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3587 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3588   echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590   case $ac_pt_PKG_CONFIG in
3591   [\\/]* | ?:[\\/]*)
3592   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3593   ;;
3594   *)
3595   ac_save_IFS=$IFS; IFS=$ac_path_separator
3596 ac_dummy="$PATH"
3597 for ac_dir in $ac_dummy; do
3598   IFS=$ac_save_IFS
3599   test -z "$ac_dir" && ac_dir=.
3600   if $as_executable_p "$ac_dir/$ac_word"; then
3601    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3602    echo "$as_me:3602: found $ac_dir/$ac_word" >&5
3603    break
3604 fi
3605 done
3606
3607   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3608   ;;
3609 esac
3610 fi
3611 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3612
3613 if test -n "$ac_pt_PKG_CONFIG"; then
3614   echo "$as_me:3614: result: $ac_pt_PKG_CONFIG" >&5
3615 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3616 else
3617   echo "$as_me:3617: result: no" >&5
3618 echo "${ECHO_T}no" >&6
3619 fi
3620
3621   PKG_CONFIG=$ac_pt_PKG_CONFIG
3622 else
3623   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3624 fi
3625
3626         ;;
3627 (*)
3628         PKG_CONFIG=$withval
3629         ;;
3630 esac
3631
3632 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3633 if test "$PKG_CONFIG" != none ; then
3634
3635 if test "x$prefix" != xNONE; then
3636         cf_path_syntax="$prefix"
3637 else
3638         cf_path_syntax="$ac_default_prefix"
3639 fi
3640
3641 case ".$PKG_CONFIG" in
3642 (.\$\(*\)*|.\'*\'*)
3643         ;;
3644 (..|./*|.\\*)
3645         ;;
3646 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3647         ;;
3648 (.\${*prefix}*|.\${*dir}*)
3649         eval PKG_CONFIG="$PKG_CONFIG"
3650         case ".$PKG_CONFIG" in
3651         (.NONE/*)
3652                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3653                 ;;
3654         esac
3655         ;;
3656 (.no|.NONE/*)
3657         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3658         ;;
3659 (*)
3660         { { echo "$as_me:3660: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3661 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3662    { (exit 1); exit 1; }; }
3663         ;;
3664 esac
3665
3666 elif test "x$cf_pkg_config" != xno ; then
3667         { echo "$as_me:3667: WARNING: pkg-config is not installed" >&5
3668 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3669 fi
3670
3671 case $PKG_CONFIG in
3672 (no|none|yes)
3673         echo "$as_me:3673: checking for pkg-config library directory" >&5
3674 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3675         ;;
3676 (*)
3677         echo "$as_me:3677: checking for $PKG_CONFIG library directory" >&5
3678 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3679         ;;
3680 esac
3681
3682 PKG_CONFIG_LIBDIR=no
3683
3684 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3685 if test "${with_pkg_config_libdir+set}" = set; then
3686   withval="$with_pkg_config_libdir"
3687   PKG_CONFIG_LIBDIR=$withval
3688 else
3689   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3690 fi;
3691
3692 case x$PKG_CONFIG_LIBDIR in
3693 (x/*)
3694         ;;
3695 (xyes)
3696         # Look for the library directory using the same prefix as the executable
3697         if test "x$PKG_CONFIG" = xnone
3698         then
3699                 cf_path=$prefix
3700         else
3701                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3702         fi
3703
3704         # If you don't like using the default architecture, you have to specify the
3705         # intended library directory and corresponding compiler/linker options.
3706         #
3707         # This case allows for Debian's 2014-flavor of multiarch, along with the
3708         # most common variations before that point.  Some other variants spell the
3709         # directory differently, e.g., "pkg-config", and put it in unusual places.
3710         # pkg-config has always been poorly standardized, which is ironic...
3711         case x`(arch) 2>/dev/null` in
3712         (*64)
3713                 cf_search_path="\
3714                         $cf_path/lib/*64-linux-gnu \
3715                         $cf_path/share \
3716                         $cf_path/lib64 \
3717                         $cf_path/lib32 \
3718                         $cf_path/lib"
3719                 ;;
3720         (*)
3721                 cf_search_path="\
3722                         $cf_path/lib/*-linux-gnu \
3723                         $cf_path/share \
3724                         $cf_path/lib32 \
3725                         $cf_path/lib \
3726                         $cf_path/libdata"
3727                 ;;
3728         esac
3729
3730         test -n "$verbose" && echo "    list..." 1>&6
3731
3732 echo "${as_me:-configure}:3732: testing list... ..." 1>&5
3733
3734         for cf_config in $cf_search_path
3735         do
3736                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3737
3738 echo "${as_me:-configure}:3738: testing checking $cf_config/pkgconfig ..." 1>&5
3739
3740                 if test -d $cf_config/pkgconfig
3741                 then
3742                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3743                         echo "$as_me:3743: checking done" >&5
3744 echo $ECHO_N "checking done... $ECHO_C" >&6
3745                         break
3746                 fi
3747         done
3748         ;;
3749 (*)
3750         ;;
3751 esac
3752
3753 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3754         echo "$as_me:3754: result: $PKG_CONFIG_LIBDIR" >&5
3755 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3756 fi
3757
3758 if test "x$PKG_CONFIG" != xnone
3759 then
3760         echo "$as_me:3760: checking if we should install .pc files for $PKG_CONFIG" >&5
3761 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3762 else
3763         echo "$as_me:3763: checking if we should install .pc files" >&5
3764 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3765 fi
3766
3767 # Check whether --enable-pc-files or --disable-pc-files was given.
3768 if test "${enable_pc_files+set}" = set; then
3769   enableval="$enable_pc_files"
3770   enable_pc_files=$enableval
3771 else
3772   enable_pc_files=no
3773 fi;
3774 echo "$as_me:3774: result: $enable_pc_files" >&5
3775 echo "${ECHO_T}$enable_pc_files" >&6
3776
3777 if test "x$enable_pc_files" != xno
3778 then
3779         MAKE_PC_FILES=
3780         case "x$PKG_CONFIG_LIBDIR" in
3781         (xno|xyes)
3782                 { echo "$as_me:3782: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3783 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3784                 ;;
3785         (*)
3786
3787 if test "x$prefix" != xNONE; then
3788         cf_path_syntax="$prefix"
3789 else
3790         cf_path_syntax="$ac_default_prefix"
3791 fi
3792
3793 case ".$PKG_CONFIG_LIBDIR" in
3794 (.\$\(*\)*|.\'*\'*)
3795         ;;
3796 (..|./*|.\\*)
3797         ;;
3798 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3799         ;;
3800 (.\${*prefix}*|.\${*dir}*)
3801         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3802         case ".$PKG_CONFIG_LIBDIR" in
3803         (.NONE/*)
3804                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3805                 ;;
3806         esac
3807         ;;
3808 (.no|.NONE/*)
3809         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3810         ;;
3811 (*)
3812         { { echo "$as_me:3812: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3813 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3814    { (exit 1); exit 1; }; }
3815         ;;
3816 esac
3817
3818                 ;;
3819         esac
3820 else
3821         MAKE_PC_FILES="#"
3822 fi
3823
3824 if test -z "$MAKE_PC_FILES"
3825 then
3826         echo "$as_me:3826: checking for suffix to add to pc-files" >&5
3827 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3828
3829 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3830 if test "${with_pc_suffix+set}" = set; then
3831   withval="$with_pc_suffix"
3832   case "x$withval" in
3833         (xyes|xno)
3834                 PC_MODULE_SUFFIX=
3835                 ;;
3836         (*)     PC_MODULE_SUFFIX="$withval"
3837                 ;;
3838         esac
3839 fi;
3840         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3841         echo "$as_me:3841: result: $PC_MODULE_SUFFIX" >&5
3842 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3843         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3844
3845 fi
3846
3847 echo "$as_me:3847: checking if we should assume mixed-case filenames" >&5
3848 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3849
3850 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3851 if test "${enable_mixed_case+set}" = set; then
3852   enableval="$enable_mixed_case"
3853   enable_mixedcase=$enableval
3854 else
3855   enable_mixedcase=auto
3856 fi;
3857 echo "$as_me:3857: result: $enable_mixedcase" >&5
3858 echo "${ECHO_T}$enable_mixedcase" >&6
3859 if test "$enable_mixedcase" = "auto" ; then
3860
3861 echo "$as_me:3861: checking if filesystem supports mixed-case filenames" >&5
3862 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3863 if test "${cf_cv_mixedcase+set}" = set; then
3864   echo $ECHO_N "(cached) $ECHO_C" >&6
3865 else
3866
3867 if test "$cross_compiling" = yes ; then
3868         case $target_alias in
3869         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3870                 cf_cv_mixedcase=no
3871                 ;;
3872         (*)
3873                 cf_cv_mixedcase=yes
3874                 ;;
3875         esac
3876 else
3877         rm -f conftest CONFTEST
3878         echo test >conftest
3879         if test -f CONFTEST ; then
3880                 cf_cv_mixedcase=no
3881         else
3882                 cf_cv_mixedcase=yes
3883         fi
3884         rm -f conftest CONFTEST
3885 fi
3886
3887 fi
3888 echo "$as_me:3888: result: $cf_cv_mixedcase" >&5
3889 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3890 test "$cf_cv_mixedcase" = yes &&
3891 cat >>confdefs.h <<\EOF
3892 #define MIXEDCASE_FILENAMES 1
3893 EOF
3894
3895 else
3896         cf_cv_mixedcase=$enable_mixedcase
3897         if test "x$enable_mixedcase" = "xyes" ; then
3898
3899 cat >>confdefs.h <<\EOF
3900 #define MIXEDCASE_FILENAMES 1
3901 EOF
3902
3903         fi
3904 fi
3905
3906 # do this after mixed-case option (tags/TAGS is not as important as tic).
3907 echo "$as_me:3907: checking whether ${MAKE-make} sets \${MAKE}" >&5
3908 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3909 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3910 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3911   echo $ECHO_N "(cached) $ECHO_C" >&6
3912 else
3913   cat >conftest.make <<\EOF
3914 all:
3915         @echo 'ac_maketemp="${MAKE}"'
3916 EOF
3917 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3918 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3919 if test -n "$ac_maketemp"; then
3920   eval ac_cv_prog_make_${ac_make}_set=yes
3921 else
3922   eval ac_cv_prog_make_${ac_make}_set=no
3923 fi
3924 rm -f conftest.make
3925 fi
3926 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3927   echo "$as_me:3927: result: yes" >&5
3928 echo "${ECHO_T}yes" >&6
3929   SET_MAKE=
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933   SET_MAKE="MAKE=${MAKE-make}"
3934 fi
3935
3936 for ac_prog in exctags ctags
3937 do
3938   # Extract the first word of "$ac_prog", so it can be a program name with args.
3939 set dummy $ac_prog; ac_word=$2
3940 echo "$as_me:3940: checking for $ac_word" >&5
3941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942 if test "${ac_cv_prog_CTAGS+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   if test -n "$CTAGS"; then
3946   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3947 else
3948   ac_save_IFS=$IFS; IFS=$ac_path_separator
3949 ac_dummy="$PATH"
3950 for ac_dir in $ac_dummy; do
3951   IFS=$ac_save_IFS
3952   test -z "$ac_dir" && ac_dir=.
3953   $as_executable_p "$ac_dir/$ac_word" || continue
3954 ac_cv_prog_CTAGS="$ac_prog"
3955 echo "$as_me:3955: found $ac_dir/$ac_word" >&5
3956 break
3957 done
3958
3959 fi
3960 fi
3961 CTAGS=$ac_cv_prog_CTAGS
3962 if test -n "$CTAGS"; then
3963   echo "$as_me:3963: result: $CTAGS" >&5
3964 echo "${ECHO_T}$CTAGS" >&6
3965 else
3966   echo "$as_me:3966: result: no" >&5
3967 echo "${ECHO_T}no" >&6
3968 fi
3969
3970   test -n "$CTAGS" && break
3971 done
3972
3973 for ac_prog in exetags etags
3974 do
3975   # Extract the first word of "$ac_prog", so it can be a program name with args.
3976 set dummy $ac_prog; ac_word=$2
3977 echo "$as_me:3977: checking for $ac_word" >&5
3978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3979 if test "${ac_cv_prog_ETAGS+set}" = set; then
3980   echo $ECHO_N "(cached) $ECHO_C" >&6
3981 else
3982   if test -n "$ETAGS"; then
3983   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3984 else
3985   ac_save_IFS=$IFS; IFS=$ac_path_separator
3986 ac_dummy="$PATH"
3987 for ac_dir in $ac_dummy; do
3988   IFS=$ac_save_IFS
3989   test -z "$ac_dir" && ac_dir=.
3990   $as_executable_p "$ac_dir/$ac_word" || continue
3991 ac_cv_prog_ETAGS="$ac_prog"
3992 echo "$as_me:3992: found $ac_dir/$ac_word" >&5
3993 break
3994 done
3995
3996 fi
3997 fi
3998 ETAGS=$ac_cv_prog_ETAGS
3999 if test -n "$ETAGS"; then
4000   echo "$as_me:4000: result: $ETAGS" >&5
4001 echo "${ECHO_T}$ETAGS" >&6
4002 else
4003   echo "$as_me:4003: result: no" >&5
4004 echo "${ECHO_T}no" >&6
4005 fi
4006
4007   test -n "$ETAGS" && break
4008 done
4009
4010 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4011 set dummy ${CTAGS:-ctags}; ac_word=$2
4012 echo "$as_me:4012: checking for $ac_word" >&5
4013 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4014 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4015   echo $ECHO_N "(cached) $ECHO_C" >&6
4016 else
4017   if test -n "$MAKE_LOWER_TAGS"; then
4018   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4019 else
4020   ac_save_IFS=$IFS; IFS=$ac_path_separator
4021 ac_dummy="$PATH"
4022 for ac_dir in $ac_dummy; do
4023   IFS=$ac_save_IFS
4024   test -z "$ac_dir" && ac_dir=.
4025   $as_executable_p "$ac_dir/$ac_word" || continue
4026 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4027 echo "$as_me:4027: found $ac_dir/$ac_word" >&5
4028 break
4029 done
4030
4031   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4032 fi
4033 fi
4034 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4035 if test -n "$MAKE_LOWER_TAGS"; then
4036   echo "$as_me:4036: result: $MAKE_LOWER_TAGS" >&5
4037 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4038 else
4039   echo "$as_me:4039: result: no" >&5
4040 echo "${ECHO_T}no" >&6
4041 fi
4042
4043 if test "$cf_cv_mixedcase" = yes ; then
4044         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4045 set dummy ${ETAGS:-etags}; ac_word=$2
4046 echo "$as_me:4046: checking for $ac_word" >&5
4047 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4048 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4049   echo $ECHO_N "(cached) $ECHO_C" >&6
4050 else
4051   if test -n "$MAKE_UPPER_TAGS"; then
4052   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4053 else
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   $as_executable_p "$ac_dir/$ac_word" || continue
4060 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4061 echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062 break
4063 done
4064
4065   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4066 fi
4067 fi
4068 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4069 if test -n "$MAKE_UPPER_TAGS"; then
4070   echo "$as_me:4070: result: $MAKE_UPPER_TAGS" >&5
4071 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4072 else
4073   echo "$as_me:4073: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 fi
4076
4077 else
4078         MAKE_UPPER_TAGS=no
4079 fi
4080
4081 if test "$MAKE_UPPER_TAGS" = yes ; then
4082         MAKE_UPPER_TAGS=
4083 else
4084         MAKE_UPPER_TAGS="#"
4085 fi
4086
4087 if test "$MAKE_LOWER_TAGS" = yes ; then
4088         MAKE_LOWER_TAGS=
4089 else
4090         MAKE_LOWER_TAGS="#"
4091 fi
4092
4093 echo "$as_me:4093: checking for makeflags variable" >&5
4094 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4095 if test "${cf_cv_makeflags+set}" = set; then
4096   echo $ECHO_N "(cached) $ECHO_C" >&6
4097 else
4098
4099         cf_cv_makeflags=''
4100         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4101         do
4102                 cat >cf_makeflags.tmp <<CF_EOF
4103 SHELL = $SHELL
4104 all :
4105         @ echo '.$cf_option'
4106 CF_EOF
4107                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4108                 case "$cf_result" in
4109                 (.*k|.*kw)
4110                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4111                         case "$cf_result" in
4112                         (.*CC=*)        cf_cv_makeflags=
4113                                 ;;
4114                         (*)     cf_cv_makeflags=$cf_option
4115                                 ;;
4116                         esac
4117                         break
4118                         ;;
4119                 (.-)    ;;
4120                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4121                         ;;
4122                 esac
4123         done
4124         rm -f cf_makeflags.tmp
4125
4126 fi
4127 echo "$as_me:4127: result: $cf_cv_makeflags" >&5
4128 echo "${ECHO_T}$cf_cv_makeflags" >&6
4129
4130 if test -n "$ac_tool_prefix"; then
4131   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4132 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4133 echo "$as_me:4133: checking for $ac_word" >&5
4134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4135 if test "${ac_cv_prog_RANLIB+set}" = set; then
4136   echo $ECHO_N "(cached) $ECHO_C" >&6
4137 else
4138   if test -n "$RANLIB"; then
4139   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4140 else
4141   ac_save_IFS=$IFS; IFS=$ac_path_separator
4142 ac_dummy="$PATH"
4143 for ac_dir in $ac_dummy; do
4144   IFS=$ac_save_IFS
4145   test -z "$ac_dir" && ac_dir=.
4146   $as_executable_p "$ac_dir/$ac_word" || continue
4147 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4148 echo "$as_me:4148: found $ac_dir/$ac_word" >&5
4149 break
4150 done
4151
4152 fi
4153 fi
4154 RANLIB=$ac_cv_prog_RANLIB
4155 if test -n "$RANLIB"; then
4156   echo "$as_me:4156: result: $RANLIB" >&5
4157 echo "${ECHO_T}$RANLIB" >&6
4158 else
4159   echo "$as_me:4159: result: no" >&5
4160 echo "${ECHO_T}no" >&6
4161 fi
4162
4163 fi
4164 if test -z "$ac_cv_prog_RANLIB"; then
4165   ac_ct_RANLIB=$RANLIB
4166   # Extract the first word of "ranlib", so it can be a program name with args.
4167 set dummy ranlib; ac_word=$2
4168 echo "$as_me:4168: checking for $ac_word" >&5
4169 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4170 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4171   echo $ECHO_N "(cached) $ECHO_C" >&6
4172 else
4173   if test -n "$ac_ct_RANLIB"; then
4174   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4175 else
4176   ac_save_IFS=$IFS; IFS=$ac_path_separator
4177 ac_dummy="$PATH"
4178 for ac_dir in $ac_dummy; do
4179   IFS=$ac_save_IFS
4180   test -z "$ac_dir" && ac_dir=.
4181   $as_executable_p "$ac_dir/$ac_word" || continue
4182 ac_cv_prog_ac_ct_RANLIB="ranlib"
4183 echo "$as_me:4183: found $ac_dir/$ac_word" >&5
4184 break
4185 done
4186
4187   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4188 fi
4189 fi
4190 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4191 if test -n "$ac_ct_RANLIB"; then
4192   echo "$as_me:4192: result: $ac_ct_RANLIB" >&5
4193 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4194 else
4195   echo "$as_me:4195: result: no" >&5
4196 echo "${ECHO_T}no" >&6
4197 fi
4198
4199   RANLIB=$ac_ct_RANLIB
4200 else
4201   RANLIB="$ac_cv_prog_RANLIB"
4202 fi
4203
4204 if test -n "$ac_tool_prefix"; then
4205   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4206 set dummy ${ac_tool_prefix}ld; ac_word=$2
4207 echo "$as_me:4207: checking for $ac_word" >&5
4208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4209 if test "${ac_cv_prog_LD+set}" = set; then
4210   echo $ECHO_N "(cached) $ECHO_C" >&6
4211 else
4212   if test -n "$LD"; then
4213   ac_cv_prog_LD="$LD" # Let the user override the test.
4214 else
4215   ac_save_IFS=$IFS; IFS=$ac_path_separator
4216 ac_dummy="$PATH"
4217 for ac_dir in $ac_dummy; do
4218   IFS=$ac_save_IFS
4219   test -z "$ac_dir" && ac_dir=.
4220   $as_executable_p "$ac_dir/$ac_word" || continue
4221 ac_cv_prog_LD="${ac_tool_prefix}ld"
4222 echo "$as_me:4222: found $ac_dir/$ac_word" >&5
4223 break
4224 done
4225
4226 fi
4227 fi
4228 LD=$ac_cv_prog_LD
4229 if test -n "$LD"; then
4230   echo "$as_me:4230: result: $LD" >&5
4231 echo "${ECHO_T}$LD" >&6
4232 else
4233   echo "$as_me:4233: result: no" >&5
4234 echo "${ECHO_T}no" >&6
4235 fi
4236
4237 fi
4238 if test -z "$ac_cv_prog_LD"; then
4239   ac_ct_LD=$LD
4240   # Extract the first word of "ld", so it can be a program name with args.
4241 set dummy ld; ac_word=$2
4242 echo "$as_me:4242: checking for $ac_word" >&5
4243 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4244 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4245   echo $ECHO_N "(cached) $ECHO_C" >&6
4246 else
4247   if test -n "$ac_ct_LD"; then
4248   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4249 else
4250   ac_save_IFS=$IFS; IFS=$ac_path_separator
4251 ac_dummy="$PATH"
4252 for ac_dir in $ac_dummy; do
4253   IFS=$ac_save_IFS
4254   test -z "$ac_dir" && ac_dir=.
4255   $as_executable_p "$ac_dir/$ac_word" || continue
4256 ac_cv_prog_ac_ct_LD="ld"
4257 echo "$as_me:4257: found $ac_dir/$ac_word" >&5
4258 break
4259 done
4260
4261   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4262 fi
4263 fi
4264 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4265 if test -n "$ac_ct_LD"; then
4266   echo "$as_me:4266: result: $ac_ct_LD" >&5
4267 echo "${ECHO_T}$ac_ct_LD" >&6
4268 else
4269   echo "$as_me:4269: result: no" >&5
4270 echo "${ECHO_T}no" >&6
4271 fi
4272
4273   LD=$ac_ct_LD
4274 else
4275   LD="$ac_cv_prog_LD"
4276 fi
4277
4278 if test -n "$ac_tool_prefix"; then
4279   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4280 set dummy ${ac_tool_prefix}ar; ac_word=$2
4281 echo "$as_me:4281: checking for $ac_word" >&5
4282 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4283 if test "${ac_cv_prog_AR+set}" = set; then
4284   echo $ECHO_N "(cached) $ECHO_C" >&6
4285 else
4286   if test -n "$AR"; then
4287   ac_cv_prog_AR="$AR" # Let the user override the test.
4288 else
4289   ac_save_IFS=$IFS; IFS=$ac_path_separator
4290 ac_dummy="$PATH"
4291 for ac_dir in $ac_dummy; do
4292   IFS=$ac_save_IFS
4293   test -z "$ac_dir" && ac_dir=.
4294   $as_executable_p "$ac_dir/$ac_word" || continue
4295 ac_cv_prog_AR="${ac_tool_prefix}ar"
4296 echo "$as_me:4296: found $ac_dir/$ac_word" >&5
4297 break
4298 done
4299
4300 fi
4301 fi
4302 AR=$ac_cv_prog_AR
4303 if test -n "$AR"; then
4304   echo "$as_me:4304: result: $AR" >&5
4305 echo "${ECHO_T}$AR" >&6
4306 else
4307   echo "$as_me:4307: result: no" >&5
4308 echo "${ECHO_T}no" >&6
4309 fi
4310
4311 fi
4312 if test -z "$ac_cv_prog_AR"; then
4313   ac_ct_AR=$AR
4314   # Extract the first word of "ar", so it can be a program name with args.
4315 set dummy ar; ac_word=$2
4316 echo "$as_me:4316: checking for $ac_word" >&5
4317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4318 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4319   echo $ECHO_N "(cached) $ECHO_C" >&6
4320 else
4321   if test -n "$ac_ct_AR"; then
4322   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4323 else
4324   ac_save_IFS=$IFS; IFS=$ac_path_separator
4325 ac_dummy="$PATH"
4326 for ac_dir in $ac_dummy; do
4327   IFS=$ac_save_IFS
4328   test -z "$ac_dir" && ac_dir=.
4329   $as_executable_p "$ac_dir/$ac_word" || continue
4330 ac_cv_prog_ac_ct_AR="ar"
4331 echo "$as_me:4331: found $ac_dir/$ac_word" >&5
4332 break
4333 done
4334
4335   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4336 fi
4337 fi
4338 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4339 if test -n "$ac_ct_AR"; then
4340   echo "$as_me:4340: result: $ac_ct_AR" >&5
4341 echo "${ECHO_T}$ac_ct_AR" >&6
4342 else
4343   echo "$as_me:4343: result: no" >&5
4344 echo "${ECHO_T}no" >&6
4345 fi
4346
4347   AR=$ac_ct_AR
4348 else
4349   AR="$ac_cv_prog_AR"
4350 fi
4351
4352 if test -n "$ac_tool_prefix"; then
4353   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4354 set dummy ${ac_tool_prefix}nm; ac_word=$2
4355 echo "$as_me:4355: checking for $ac_word" >&5
4356 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4357 if test "${ac_cv_prog_NM+set}" = set; then
4358   echo $ECHO_N "(cached) $ECHO_C" >&6
4359 else
4360   if test -n "$NM"; then
4361   ac_cv_prog_NM="$NM" # Let the user override the test.
4362 else
4363   ac_save_IFS=$IFS; IFS=$ac_path_separator
4364 ac_dummy="$PATH"
4365 for ac_dir in $ac_dummy; do
4366   IFS=$ac_save_IFS
4367   test -z "$ac_dir" && ac_dir=.
4368   $as_executable_p "$ac_dir/$ac_word" || continue
4369 ac_cv_prog_NM="${ac_tool_prefix}nm"
4370 echo "$as_me:4370: found $ac_dir/$ac_word" >&5
4371 break
4372 done
4373
4374 fi
4375 fi
4376 NM=$ac_cv_prog_NM
4377 if test -n "$NM"; then
4378   echo "$as_me:4378: result: $NM" >&5
4379 echo "${ECHO_T}$NM" >&6
4380 else
4381   echo "$as_me:4381: result: no" >&5
4382 echo "${ECHO_T}no" >&6
4383 fi
4384
4385 fi
4386 if test -z "$ac_cv_prog_NM"; then
4387   ac_ct_NM=$NM
4388   # Extract the first word of "nm", so it can be a program name with args.
4389 set dummy nm; ac_word=$2
4390 echo "$as_me:4390: checking for $ac_word" >&5
4391 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4392 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4393   echo $ECHO_N "(cached) $ECHO_C" >&6
4394 else
4395   if test -n "$ac_ct_NM"; then
4396   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4397 else
4398   ac_save_IFS=$IFS; IFS=$ac_path_separator
4399 ac_dummy="$PATH"
4400 for ac_dir in $ac_dummy; do
4401   IFS=$ac_save_IFS
4402   test -z "$ac_dir" && ac_dir=.
4403   $as_executable_p "$ac_dir/$ac_word" || continue
4404 ac_cv_prog_ac_ct_NM="nm"
4405 echo "$as_me:4405: found $ac_dir/$ac_word" >&5
4406 break
4407 done
4408
4409   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4410 fi
4411 fi
4412 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4413 if test -n "$ac_ct_NM"; then
4414   echo "$as_me:4414: result: $ac_ct_NM" >&5
4415 echo "${ECHO_T}$ac_ct_NM" >&6
4416 else
4417   echo "$as_me:4417: result: no" >&5
4418 echo "${ECHO_T}no" >&6
4419 fi
4420
4421   NM=$ac_ct_NM
4422 else
4423   NM="$ac_cv_prog_NM"
4424 fi
4425
4426 if test -n "$ac_tool_prefix"; then
4427   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4428 set dummy ${ac_tool_prefix}ar; ac_word=$2
4429 echo "$as_me:4429: checking for $ac_word" >&5
4430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4431 if test "${ac_cv_prog_AR+set}" = set; then
4432   echo $ECHO_N "(cached) $ECHO_C" >&6
4433 else
4434   if test -n "$AR"; then
4435   ac_cv_prog_AR="$AR" # Let the user override the test.
4436 else
4437   ac_save_IFS=$IFS; IFS=$ac_path_separator
4438 ac_dummy="$PATH"
4439 for ac_dir in $ac_dummy; do
4440   IFS=$ac_save_IFS
4441   test -z "$ac_dir" && ac_dir=.
4442   $as_executable_p "$ac_dir/$ac_word" || continue
4443 ac_cv_prog_AR="${ac_tool_prefix}ar"
4444 echo "$as_me:4444: found $ac_dir/$ac_word" >&5
4445 break
4446 done
4447
4448 fi
4449 fi
4450 AR=$ac_cv_prog_AR
4451 if test -n "$AR"; then
4452   echo "$as_me:4452: result: $AR" >&5
4453 echo "${ECHO_T}$AR" >&6
4454 else
4455   echo "$as_me:4455: result: no" >&5
4456 echo "${ECHO_T}no" >&6
4457 fi
4458
4459 fi
4460 if test -z "$ac_cv_prog_AR"; then
4461   ac_ct_AR=$AR
4462   # Extract the first word of "ar", so it can be a program name with args.
4463 set dummy ar; ac_word=$2
4464 echo "$as_me:4464: checking for $ac_word" >&5
4465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4466 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4467   echo $ECHO_N "(cached) $ECHO_C" >&6
4468 else
4469   if test -n "$ac_ct_AR"; then
4470   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4471 else
4472   ac_save_IFS=$IFS; IFS=$ac_path_separator
4473 ac_dummy="$PATH"
4474 for ac_dir in $ac_dummy; do
4475   IFS=$ac_save_IFS
4476   test -z "$ac_dir" && ac_dir=.
4477   $as_executable_p "$ac_dir/$ac_word" || continue
4478 ac_cv_prog_ac_ct_AR="ar"
4479 echo "$as_me:4479: found $ac_dir/$ac_word" >&5
4480 break
4481 done
4482
4483   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4484 fi
4485 fi
4486 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4487 if test -n "$ac_ct_AR"; then
4488   echo "$as_me:4488: result: $ac_ct_AR" >&5
4489 echo "${ECHO_T}$ac_ct_AR" >&6
4490 else
4491   echo "$as_me:4491: result: no" >&5
4492 echo "${ECHO_T}no" >&6
4493 fi
4494
4495   AR=$ac_ct_AR
4496 else
4497   AR="$ac_cv_prog_AR"
4498 fi
4499
4500 echo "$as_me:4500: checking for options to update archives" >&5
4501 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4502 if test "${cf_cv_ar_flags+set}" = set; then
4503   echo $ECHO_N "(cached) $ECHO_C" >&6
4504 else
4505
4506         cf_cv_ar_flags=unknown
4507         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4508         do
4509
4510                 # check if $ARFLAGS already contains this choice
4511                 if test "x$ARFLAGS" != "x" ; then
4512                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4513                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4514                                 cf_cv_ar_flags=
4515                                 break
4516                         fi
4517                 fi
4518
4519                 rm -f conftest.$ac_cv_objext
4520                 rm -f conftest.a
4521
4522                 cat >conftest.$ac_ext <<EOF
4523 #line 4523 "configure"
4524 int     testdata[3] = { 123, 456, 789 };
4525 EOF
4526                 if { (eval echo "$as_me:4526: \"$ac_compile\"") >&5
4527   (eval $ac_compile) 2>&5
4528   ac_status=$?
4529   echo "$as_me:4529: \$? = $ac_status" >&5
4530   (exit $ac_status); } ; then
4531                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4532                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4533                         if test -f conftest.a ; then
4534                                 cf_cv_ar_flags=$cf_ar_flags
4535                                 break
4536                         fi
4537                 else
4538                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4539
4540 echo "${as_me:-configure}:4540: testing cannot compile test-program ..." 1>&5
4541
4542                         break
4543                 fi
4544         done
4545         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4546
4547 fi
4548 echo "$as_me:4548: result: $cf_cv_ar_flags" >&5
4549 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4550
4551 if test -n "$ARFLAGS" ; then
4552         if test -n "$cf_cv_ar_flags" ; then
4553                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4554         fi
4555 else
4556         ARFLAGS=$cf_cv_ar_flags
4557 fi
4558
4559 echo "$as_me:4559: checking if you have specified an install-prefix" >&5
4560 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4561
4562 # Check whether --with-install-prefix or --without-install-prefix was given.
4563 if test "${with_install_prefix+set}" = set; then
4564   withval="$with_install_prefix"
4565   case "x$withval" in
4566         (xyes|xno)
4567                 ;;
4568         (*)     DESTDIR="$withval"
4569                 ;;
4570         esac
4571 fi;
4572 echo "$as_me:4572: result: $DESTDIR" >&5
4573 echo "${ECHO_T}$DESTDIR" >&6
4574
4575 ###############################################################################
4576
4577 # If we're cross-compiling, allow the user to override the tools and their
4578 # options.  The configure script is oriented toward identifying the host
4579 # compiler, etc., but we need a build compiler to generate parts of the source.
4580
4581 if test "$cross_compiling" = yes ; then
4582
4583         # defaults that we might want to override
4584         : ${BUILD_CFLAGS:=''}
4585         : ${BUILD_CPPFLAGS:=''}
4586         : ${BUILD_LDFLAGS:=''}
4587         : ${BUILD_LIBS:=''}
4588         : ${BUILD_EXEEXT:='$x'}
4589         : ${BUILD_OBJEXT:='o'}
4590
4591 # Check whether --with-build-cc or --without-build-cc was given.
4592 if test "${with_build_cc+set}" = set; then
4593   withval="$with_build_cc"
4594   BUILD_CC="$withval"
4595 else
4596   for ac_prog in gcc clang c99 c89 cc cl
4597 do
4598   # Extract the first word of "$ac_prog", so it can be a program name with args.
4599 set dummy $ac_prog; ac_word=$2
4600 echo "$as_me:4600: checking for $ac_word" >&5
4601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4602 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4603   echo $ECHO_N "(cached) $ECHO_C" >&6
4604 else
4605   if test -n "$BUILD_CC"; then
4606   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4607 else
4608   ac_save_IFS=$IFS; IFS=$ac_path_separator
4609 ac_dummy="$PATH"
4610 for ac_dir in $ac_dummy; do
4611   IFS=$ac_save_IFS
4612   test -z "$ac_dir" && ac_dir=.
4613   $as_executable_p "$ac_dir/$ac_word" || continue
4614 ac_cv_prog_BUILD_CC="$ac_prog"
4615 echo "$as_me:4615: found $ac_dir/$ac_word" >&5
4616 break
4617 done
4618
4619 fi
4620 fi
4621 BUILD_CC=$ac_cv_prog_BUILD_CC
4622 if test -n "$BUILD_CC"; then
4623   echo "$as_me:4623: result: $BUILD_CC" >&5
4624 echo "${ECHO_T}$BUILD_CC" >&6
4625 else
4626   echo "$as_me:4626: result: no" >&5
4627 echo "${ECHO_T}no" >&6
4628 fi
4629
4630   test -n "$BUILD_CC" && break
4631 done
4632 test -n "$BUILD_CC" || BUILD_CC="none"
4633
4634 fi;
4635         echo "$as_me:4635: checking for native build C compiler" >&5
4636 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4637         echo "$as_me:4637: result: $BUILD_CC" >&5
4638 echo "${ECHO_T}$BUILD_CC" >&6
4639
4640         echo "$as_me:4640: checking for native build C preprocessor" >&5
4641 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4642
4643 # Check whether --with-build-cpp or --without-build-cpp was given.
4644 if test "${with_build_cpp+set}" = set; then
4645   withval="$with_build_cpp"
4646   BUILD_CPP="$withval"
4647 else
4648   BUILD_CPP='${BUILD_CC} -E'
4649 fi;
4650         echo "$as_me:4650: result: $BUILD_CPP" >&5
4651 echo "${ECHO_T}$BUILD_CPP" >&6
4652
4653         echo "$as_me:4653: checking for native build C flags" >&5
4654 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4655
4656 # Check whether --with-build-cflags or --without-build-cflags was given.
4657 if test "${with_build_cflags+set}" = set; then
4658   withval="$with_build_cflags"
4659   BUILD_CFLAGS="$withval"
4660 fi;
4661         echo "$as_me:4661: result: $BUILD_CFLAGS" >&5
4662 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4663
4664         echo "$as_me:4664: checking for native build C preprocessor-flags" >&5
4665 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4666
4667 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4668 if test "${with_build_cppflags+set}" = set; then
4669   withval="$with_build_cppflags"
4670   BUILD_CPPFLAGS="$withval"
4671 fi;
4672         echo "$as_me:4672: result: $BUILD_CPPFLAGS" >&5
4673 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4674
4675         echo "$as_me:4675: checking for native build linker-flags" >&5
4676 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4677
4678 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4679 if test "${with_build_ldflags+set}" = set; then
4680   withval="$with_build_ldflags"
4681   BUILD_LDFLAGS="$withval"
4682 fi;
4683         echo "$as_me:4683: result: $BUILD_LDFLAGS" >&5
4684 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4685
4686         echo "$as_me:4686: checking for native build linker-libraries" >&5
4687 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4688
4689 # Check whether --with-build-libs or --without-build-libs was given.
4690 if test "${with_build_libs+set}" = set; then
4691   withval="$with_build_libs"
4692   BUILD_LIBS="$withval"
4693 fi;
4694         echo "$as_me:4694: result: $BUILD_LIBS" >&5
4695 echo "${ECHO_T}$BUILD_LIBS" >&6
4696
4697         # this assumes we're on Unix.
4698         BUILD_EXEEXT=
4699         BUILD_OBJEXT=o
4700
4701         : ${BUILD_CC:='${CC}'}
4702
4703         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4704                 { { echo "$as_me:4704: error: Cross-build requires two compilers.
4705 Use --with-build-cc to specify the native compiler." >&5
4706 echo "$as_me: error: Cross-build requires two compilers.
4707 Use --with-build-cc to specify the native compiler." >&2;}
4708    { (exit 1); exit 1; }; }
4709         fi
4710
4711 else
4712         : ${BUILD_CC:='${CC}'}
4713         : ${BUILD_CPP:='${CPP}'}
4714         : ${BUILD_CFLAGS:='${CFLAGS}'}
4715         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4716         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4717         : ${BUILD_LIBS:='${LIBS}'}
4718         : ${BUILD_EXEEXT:='$x'}
4719         : ${BUILD_OBJEXT:='o'}
4720 fi
4721
4722 ###############################################################################
4723
4724 ### Options to allow the user to specify the set of libraries which are used.
4725 ### Use "--without-normal --with-shared" to allow the default model to be
4726 ### shared, for example.
4727 cf_list_models=""
4728
4729 echo "$as_me:4729: checking if libtool -version-number should be used" >&5
4730 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4731
4732 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4733 if test "${enable_libtool_version+set}" = set; then
4734   enableval="$enable_libtool_version"
4735   test "$enableval" != no && enableval=yes
4736         if test "$enableval" != "yes" ; then
4737     cf_libtool_version=no
4738         else
4739                 cf_libtool_version=yes
4740         fi
4741 else
4742   enableval=yes
4743         cf_libtool_version=yes
4744
4745 fi;
4746 echo "$as_me:4746: result: $cf_libtool_version" >&5
4747 echo "${ECHO_T}$cf_libtool_version" >&6
4748
4749 if test "$cf_libtool_version" = yes ; then
4750         LIBTOOL_VERSION="-version-number"
4751 else
4752         LIBTOOL_VERSION="-version-info"
4753         case "x$VERSION" in
4754         (x)
4755                 { echo "$as_me:4755: WARNING: VERSION was not set" >&5
4756 echo "$as_me: WARNING: VERSION was not set" >&2;}
4757                 ;;
4758         (x*.*.*)
4759                 ABI_VERSION="$VERSION"
4760                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4761
4762 echo "${as_me:-configure}:4762: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4763
4764                 ;;
4765         (x*:*:*)
4766                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4767                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4768
4769 echo "${as_me:-configure}:4769: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4770
4771                 ;;
4772         (*)
4773                 { echo "$as_me:4773: WARNING: unexpected VERSION value: $VERSION" >&5
4774 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4775                 ;;
4776         esac
4777 fi
4778
4779 LIBTOOL=
4780
4781 # common library maintenance symbols that are convenient for libtool scripts:
4782 LIB_CREATE='${AR} -cr'
4783 LIB_OBJECT='${OBJECTS}'
4784 LIB_SUFFIX=.a
4785 LIB_PREP="$RANLIB"
4786
4787 # symbols used to prop libtool up to enable it to determine what it should be
4788 # doing:
4789 LIB_CLEAN=
4790 LIB_COMPILE=
4791 LIB_LINK='${CC}'
4792 LIB_INSTALL=
4793 LIB_UNINSTALL=
4794
4795 echo "$as_me:4795: checking if you want to build libraries with libtool" >&5
4796 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4797
4798 # Check whether --with-libtool or --without-libtool was given.
4799 if test "${with_libtool+set}" = set; then
4800   withval="$with_libtool"
4801   with_libtool=$withval
4802 else
4803   with_libtool=no
4804 fi;
4805 echo "$as_me:4805: result: $with_libtool" >&5
4806 echo "${ECHO_T}$with_libtool" >&6
4807 if test "$with_libtool" != "no"; then
4808
4809         if test "$with_libtool" != "yes" ; then
4810
4811 if test "x$prefix" != xNONE; then
4812         cf_path_syntax="$prefix"
4813 else
4814         cf_path_syntax="$ac_default_prefix"
4815 fi
4816
4817 case ".$with_libtool" in
4818 (.\$\(*\)*|.\'*\'*)
4819         ;;
4820 (..|./*|.\\*)
4821         ;;
4822 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4823         ;;
4824 (.\${*prefix}*|.\${*dir}*)
4825         eval with_libtool="$with_libtool"
4826         case ".$with_libtool" in
4827         (.NONE/*)
4828                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4829                 ;;
4830         esac
4831         ;;
4832 (.no|.NONE/*)
4833         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4834         ;;
4835 (*)
4836         { { echo "$as_me:4836: error: expected a pathname, not \"$with_libtool\"" >&5
4837 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4838    { (exit 1); exit 1; }; }
4839         ;;
4840 esac
4841
4842                 LIBTOOL=$with_libtool
4843         else
4844                 if test -n "$ac_tool_prefix"; then
4845   for ac_prog in libtool glibtool
4846   do
4847     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4848 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4849 echo "$as_me:4849: checking for $ac_word" >&5
4850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4851 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4852   echo $ECHO_N "(cached) $ECHO_C" >&6
4853 else
4854   if test -n "$LIBTOOL"; then
4855   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4856 else
4857   ac_save_IFS=$IFS; IFS=$ac_path_separator
4858 ac_dummy="$PATH"
4859 for ac_dir in $ac_dummy; do
4860   IFS=$ac_save_IFS
4861   test -z "$ac_dir" && ac_dir=.
4862   $as_executable_p "$ac_dir/$ac_word" || continue
4863 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4864 echo "$as_me:4864: found $ac_dir/$ac_word" >&5
4865 break
4866 done
4867
4868 fi
4869 fi
4870 LIBTOOL=$ac_cv_prog_LIBTOOL
4871 if test -n "$LIBTOOL"; then
4872   echo "$as_me:4872: result: $LIBTOOL" >&5
4873 echo "${ECHO_T}$LIBTOOL" >&6
4874 else
4875   echo "$as_me:4875: result: no" >&5
4876 echo "${ECHO_T}no" >&6
4877 fi
4878
4879     test -n "$LIBTOOL" && break
4880   done
4881 fi
4882 if test -z "$LIBTOOL"; then
4883   ac_ct_LIBTOOL=$LIBTOOL
4884   for ac_prog in libtool glibtool
4885 do
4886   # Extract the first word of "$ac_prog", so it can be a program name with args.
4887 set dummy $ac_prog; ac_word=$2
4888 echo "$as_me:4888: checking for $ac_word" >&5
4889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4890 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4891   echo $ECHO_N "(cached) $ECHO_C" >&6
4892 else
4893   if test -n "$ac_ct_LIBTOOL"; then
4894   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4895 else
4896   ac_save_IFS=$IFS; IFS=$ac_path_separator
4897 ac_dummy="$PATH"
4898 for ac_dir in $ac_dummy; do
4899   IFS=$ac_save_IFS
4900   test -z "$ac_dir" && ac_dir=.
4901   $as_executable_p "$ac_dir/$ac_word" || continue
4902 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4903 echo "$as_me:4903: found $ac_dir/$ac_word" >&5
4904 break
4905 done
4906
4907 fi
4908 fi
4909 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4910 if test -n "$ac_ct_LIBTOOL"; then
4911   echo "$as_me:4911: result: $ac_ct_LIBTOOL" >&5
4912 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4913 else
4914   echo "$as_me:4914: result: no" >&5
4915 echo "${ECHO_T}no" >&6
4916 fi
4917
4918   test -n "$ac_ct_LIBTOOL" && break
4919 done
4920 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4921
4922   LIBTOOL=$ac_ct_LIBTOOL
4923 fi
4924
4925 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4926 then
4927         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.].*//'`
4928 else
4929         cf_cv_libtool_version=
4930 fi
4931 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4932
4933                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4934                 then
4935
4936 unset ac_cv_prog_ac_ct_LIBTOOL
4937 unset ac_ct_LIBTOOL
4938 unset LIBTOOL
4939
4940                         if test -n "$ac_tool_prefix"; then
4941   for ac_prog in glibtool
4942   do
4943     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4944 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4945 echo "$as_me:4945: checking for $ac_word" >&5
4946 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4947 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4948   echo $ECHO_N "(cached) $ECHO_C" >&6
4949 else
4950   if test -n "$LIBTOOL"; then
4951   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4952 else
4953   ac_save_IFS=$IFS; IFS=$ac_path_separator
4954 ac_dummy="$PATH"
4955 for ac_dir in $ac_dummy; do
4956   IFS=$ac_save_IFS
4957   test -z "$ac_dir" && ac_dir=.
4958   $as_executable_p "$ac_dir/$ac_word" || continue
4959 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4960 echo "$as_me:4960: found $ac_dir/$ac_word" >&5
4961 break
4962 done
4963
4964 fi
4965 fi
4966 LIBTOOL=$ac_cv_prog_LIBTOOL
4967 if test -n "$LIBTOOL"; then
4968   echo "$as_me:4968: result: $LIBTOOL" >&5
4969 echo "${ECHO_T}$LIBTOOL" >&6
4970 else
4971   echo "$as_me:4971: result: no" >&5
4972 echo "${ECHO_T}no" >&6
4973 fi
4974
4975     test -n "$LIBTOOL" && break
4976   done
4977 fi
4978 if test -z "$LIBTOOL"; then
4979   ac_ct_LIBTOOL=$LIBTOOL
4980   for ac_prog in glibtool
4981 do
4982   # Extract the first word of "$ac_prog", so it can be a program name with args.
4983 set dummy $ac_prog; ac_word=$2
4984 echo "$as_me:4984: checking for $ac_word" >&5
4985 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4986 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4987   echo $ECHO_N "(cached) $ECHO_C" >&6
4988 else
4989   if test -n "$ac_ct_LIBTOOL"; then
4990   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4991 else
4992   ac_save_IFS=$IFS; IFS=$ac_path_separator
4993 ac_dummy="$PATH"
4994 for ac_dir in $ac_dummy; do
4995   IFS=$ac_save_IFS
4996   test -z "$ac_dir" && ac_dir=.
4997   $as_executable_p "$ac_dir/$ac_word" || continue
4998 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4999 echo "$as_me:4999: found $ac_dir/$ac_word" >&5
5000 break
5001 done
5002
5003 fi
5004 fi
5005 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5006 if test -n "$ac_ct_LIBTOOL"; then
5007   echo "$as_me:5007: result: $ac_ct_LIBTOOL" >&5
5008 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5009 else
5010   echo "$as_me:5010: result: no" >&5
5011 echo "${ECHO_T}no" >&6
5012 fi
5013
5014   test -n "$ac_ct_LIBTOOL" && break
5015 done
5016 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5017
5018   LIBTOOL=$ac_ct_LIBTOOL
5019 fi
5020
5021 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5022 then
5023         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.].*//'`
5024 else
5025         cf_cv_libtool_version=
5026 fi
5027 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5028
5029                 fi
5030         fi
5031         if test -z "$LIBTOOL" ; then
5032                 { { echo "$as_me:5032: error: Cannot find libtool" >&5
5033 echo "$as_me: error: Cannot find libtool" >&2;}
5034    { (exit 1); exit 1; }; }
5035         fi
5036         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5037         LIB_OBJECT='${OBJECTS:.o=.lo}'
5038         LIB_SUFFIX=.la
5039         LIB_CLEAN='${LIBTOOL} --mode=clean'
5040         LIB_COMPILE='${LIBTOOL} --mode=compile'
5041         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5042         LIB_INSTALL='${LIBTOOL} --mode=install'
5043         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5044         LIB_PREP=:
5045
5046 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5047 then
5048         echo "$as_me:5048: checking version of $LIBTOOL" >&5
5049 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5050
5051 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5052 then
5053         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.].*//'`
5054 else
5055         cf_cv_libtool_version=
5056 fi
5057 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5058
5059         echo "$as_me:5059: result: $cf_cv_libtool_version" >&5
5060 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5061         if test -z "$cf_cv_libtool_version" ; then
5062                 { { echo "$as_me:5062: error: This is not GNU libtool" >&5
5063 echo "$as_me: error: This is not GNU libtool" >&2;}
5064    { (exit 1); exit 1; }; }
5065         fi
5066 else
5067         { { echo "$as_me:5067: error: GNU libtool has not been found" >&5
5068 echo "$as_me: error: GNU libtool has not been found" >&2;}
5069    { (exit 1); exit 1; }; }
5070 fi
5071
5072         # special hack to add -no-undefined (which libtool should do for itself)
5073         LT_UNDEF=
5074         case "$cf_cv_system_name" in
5075         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5076                 LT_UNDEF=-no-undefined
5077                 ;;
5078         esac
5079
5080         # special hack to add --tag option for C++ compiler
5081         case $cf_cv_libtool_version in
5082         (1.[5-9]*|[2-9].[0-9.a-z]*)
5083                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5084                 LIBTOOL="$LIBTOOL --tag=CC"
5085                 ;;
5086         (*)
5087                 LIBTOOL_CXX="$LIBTOOL"
5088                 ;;
5089         esac
5090 else
5091         LIBTOOL=""
5092         LIBTOOL_CXX=""
5093 fi
5094
5095 test -z "$LIBTOOL" && ECHO_LT=
5096
5097 if test "$with_libtool" != "no" ; then
5098
5099 cf_list_models="$cf_list_models libtool"
5100
5101 else
5102
5103 echo "$as_me:5103: checking if you want to build shared libraries" >&5
5104 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5105
5106 # Check whether --with-shared or --without-shared was given.
5107 if test "${with_shared+set}" = set; then
5108   withval="$with_shared"
5109   with_shared=$withval
5110 else
5111   with_shared=no
5112 fi;
5113 echo "$as_me:5113: result: $with_shared" >&5
5114 echo "${ECHO_T}$with_shared" >&6
5115 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5116
5117 echo "$as_me:5117: checking if you want to build static libraries" >&5
5118 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5119
5120 # Check whether --with-normal or --without-normal was given.
5121 if test "${with_normal+set}" = set; then
5122   withval="$with_normal"
5123   with_normal=$withval
5124 else
5125   with_normal=yes
5126 fi;
5127 echo "$as_me:5127: result: $with_normal" >&5
5128 echo "${ECHO_T}$with_normal" >&6
5129 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5130
5131 echo "$as_me:5131: checking if you want to build debug libraries" >&5
5132 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5133
5134 # Check whether --with-debug or --without-debug was given.
5135 if test "${with_debug+set}" = set; then
5136   withval="$with_debug"
5137   with_debug=$withval
5138 else
5139   with_debug=yes
5140 fi;
5141 echo "$as_me:5141: result: $with_debug" >&5
5142 echo "${ECHO_T}$with_debug" >&6
5143 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5144
5145 echo "$as_me:5145: checking if you want to build profiling libraries" >&5
5146 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5147
5148 # Check whether --with-profile or --without-profile was given.
5149 if test "${with_profile+set}" = set; then
5150   withval="$with_profile"
5151   with_profile=$withval
5152 else
5153   with_profile=no
5154 fi;
5155 echo "$as_me:5155: result: $with_profile" >&5
5156 echo "${ECHO_T}$with_profile" >&6
5157 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5158
5159 fi
5160
5161 if test "X$cf_with_cxx_binding" != Xno; then
5162 if test "x$with_shared" = "xyes"; then
5163 echo "$as_me:5163: checking if you want to build C++ shared libraries" >&5
5164 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5165
5166 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5167 if test "${with_cxx_shared+set}" = set; then
5168   withval="$with_cxx_shared"
5169   with_shared_cxx=$withval
5170 else
5171   with_shared_cxx=no
5172 fi;
5173 echo "$as_me:5173: result: $with_shared_cxx" >&5
5174 echo "${ECHO_T}$with_shared_cxx" >&6
5175 fi
5176 fi
5177
5178 ###############################################################################
5179
5180 echo "$as_me:5180: checking for specified models" >&5
5181 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5182 test -z "$cf_list_models" && cf_list_models=normal
5183 test "$with_libtool" != "no" && cf_list_models=libtool
5184 echo "$as_me:5184: result: $cf_list_models" >&5
5185 echo "${ECHO_T}$cf_list_models" >&6
5186
5187 ### Use the first model as the default, and save its suffix for use in building
5188 ### up test-applications.
5189 echo "$as_me:5189: checking for default model" >&5
5190 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5191 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5192 echo "$as_me:5192: result: $DFT_LWR_MODEL" >&5
5193 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5194
5195 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5196
5197 TICS_NAME=tic
5198
5199 TINFO_NAME=tinfo
5200
5201 LIB_NAME=ncurses
5202
5203 LIB_DIR=../lib
5204 LIB_2ND=../../lib
5205
5206 echo "$as_me:5206: checking if you want to have a library-prefix" >&5
5207 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5208
5209 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5210 if test "${with_lib_prefix+set}" = set; then
5211   withval="$with_lib_prefix"
5212   with_lib_prefix=$withval
5213 else
5214   with_lib_prefix=auto
5215 fi;
5216 echo "$as_me:5216: result: $with_lib_prefix" >&5
5217 echo "${ECHO_T}$with_lib_prefix" >&6
5218
5219 if test $with_lib_prefix = auto
5220 then
5221
5222         case $cf_cv_system_name in
5223         (OS/2*|os2*)
5224                 if test "$DFT_LWR_MODEL" = libtool; then
5225                         LIB_PREFIX='lib'
5226                 else
5227                         LIB_PREFIX=''
5228                 fi
5229                 ;;
5230         (*)     LIB_PREFIX='lib'
5231                 ;;
5232         esac
5233 cf_prefix=$LIB_PREFIX
5234
5235 elif test $with_lib_prefix = no
5236 then
5237         LIB_PREFIX=
5238 else
5239         LIB_PREFIX=$with_lib_prefix
5240 fi
5241
5242 LIB_SUFFIX=
5243
5244         echo "$as_me:5244: checking for PATH separator" >&5
5245 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5246         case $cf_cv_system_name in
5247         (os2*)  PATH_SEPARATOR=';'  ;;
5248         (*)     ${PATH_SEPARATOR:=':'}  ;;
5249         esac
5250
5251         echo "$as_me:5251: result: $PATH_SEPARATOR" >&5
5252 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5253
5254 ###############################################################################
5255
5256 echo "$as_me:5256: checking if you want to build a separate terminfo library" >&5
5257 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5258
5259 # Check whether --with-termlib or --without-termlib was given.
5260 if test "${with_termlib+set}" = set; then
5261   withval="$with_termlib"
5262   with_termlib=$withval
5263 else
5264   with_termlib=no
5265 fi;
5266 echo "$as_me:5266: result: $with_termlib" >&5
5267 echo "${ECHO_T}$with_termlib" >&6
5268
5269 echo "$as_me:5269: checking if you want to build a separate tic library" >&5
5270 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5271
5272 # Check whether --with-ticlib or --without-ticlib was given.
5273 if test "${with_ticlib+set}" = set; then
5274   withval="$with_ticlib"
5275   with_ticlib=$withval
5276 else
5277   with_ticlib=no
5278 fi;
5279 echo "$as_me:5279: result: $with_ticlib" >&5
5280 echo "${ECHO_T}$with_ticlib" >&6
5281
5282 if test X"$CC_G_OPT" = X"" ; then
5283         CC_G_OPT='-g'
5284         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5285 fi
5286
5287 if test X"$CXX_G_OPT" = X"" ; then
5288         CXX_G_OPT='-g'
5289         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5290 fi
5291
5292 echo "$as_me:5292: checking for default loader flags" >&5
5293 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5294 case $DFT_LWR_MODEL in
5295 (libtool) LD_MODEL=''   ;;
5296 (normal)  LD_MODEL=''   ;;
5297 (debug)   LD_MODEL=$CC_G_OPT ;;
5298 (profile) LD_MODEL='-pg';;
5299 (shared)  LD_MODEL=''   ;;
5300 esac
5301 echo "$as_me:5301: result: $LD_MODEL" >&5
5302 echo "${ECHO_T}$LD_MODEL" >&6
5303
5304 case $DFT_LWR_MODEL in
5305 (shared)
5306
5307 echo "$as_me:5307: checking if rpath option should be used" >&5
5308 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5309
5310 # Check whether --enable-rpath or --disable-rpath was given.
5311 if test "${enable_rpath+set}" = set; then
5312   enableval="$enable_rpath"
5313   cf_cv_enable_rpath=$enableval
5314 else
5315   cf_cv_enable_rpath=no
5316 fi;
5317 echo "$as_me:5317: result: $cf_cv_enable_rpath" >&5
5318 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5319
5320 echo "$as_me:5320: checking if shared libraries should be relinked during install" >&5
5321 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5322
5323 # Check whether --enable-relink or --disable-relink was given.
5324 if test "${enable_relink+set}" = set; then
5325   enableval="$enable_relink"
5326   cf_cv_do_relink=$enableval
5327 else
5328   cf_cv_do_relink=yes
5329 fi;
5330 echo "$as_me:5330: result: $cf_cv_do_relink" >&5
5331 echo "${ECHO_T}$cf_cv_do_relink" >&6
5332         ;;
5333 esac
5334
5335 # we will build libraries one-level down.
5336 rel_builddir=..
5337
5338 LD_RPATH_OPT=
5339 echo "$as_me:5339: checking for an rpath option" >&5
5340 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5341 case $cf_cv_system_name in
5342 (irix*)
5343         if test "$GCC" = yes; then
5344                 LD_RPATH_OPT="-Wl,-rpath,"
5345         else
5346                 LD_RPATH_OPT="-rpath "
5347         fi
5348         ;;
5349 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5350         LD_RPATH_OPT="-Wl,-rpath,"
5351         ;;
5352 (openbsd[2-9].*|mirbsd*)
5353         LD_RPATH_OPT="-Wl,-rpath,"
5354         ;;
5355 (dragonfly*)
5356         LD_RPATH_OPT="-rpath "
5357         ;;
5358 (netbsd*)
5359         LD_RPATH_OPT="-Wl,-rpath,"
5360         ;;
5361 (osf*|mls+*)
5362         LD_RPATH_OPT="-rpath "
5363         ;;
5364 (solaris2*)
5365         LD_RPATH_OPT="-R"
5366         ;;
5367 (*)
5368         ;;
5369 esac
5370 echo "$as_me:5370: result: $LD_RPATH_OPT" >&5
5371 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5372
5373 case "x$LD_RPATH_OPT" in
5374 (x-R*)
5375         echo "$as_me:5375: checking if we need a space after rpath option" >&5
5376 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5377         cf_save_LIBS="$LIBS"
5378
5379 cf_add_libs="${LD_RPATH_OPT}$libdir"
5380 # Filter out duplicates - this happens with badly-designed ".pc" files...
5381 for cf_add_1lib in $LIBS
5382 do
5383         for cf_add_2lib in $cf_add_libs
5384         do
5385                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5386                 then
5387                         cf_add_1lib=
5388                         break
5389                 fi
5390         done
5391         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5392 done
5393 LIBS="$cf_add_libs"
5394
5395         cat >conftest.$ac_ext <<_ACEOF
5396 #line 5396 "configure"
5397 #include "confdefs.h"
5398
5399 int
5400 main (void)
5401 {
5402
5403   ;
5404   return 0;
5405 }
5406 _ACEOF
5407 rm -f conftest.$ac_objext conftest$ac_exeext
5408 if { (eval echo "$as_me:5408: \"$ac_link\"") >&5
5409   (eval $ac_link) 2>&5
5410   ac_status=$?
5411   echo "$as_me:5411: \$? = $ac_status" >&5
5412   (exit $ac_status); } &&
5413          { ac_try='test -s conftest$ac_exeext'
5414   { (eval echo "$as_me:5414: \"$ac_try\"") >&5
5415   (eval $ac_try) 2>&5
5416   ac_status=$?
5417   echo "$as_me:5417: \$? = $ac_status" >&5
5418   (exit $ac_status); }; }; then
5419   cf_rpath_space=no
5420 else
5421   echo "$as_me: failed program was:" >&5
5422 cat conftest.$ac_ext >&5
5423 cf_rpath_space=yes
5424 fi
5425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5426         LIBS="$cf_save_LIBS"
5427         echo "$as_me:5427: result: $cf_rpath_space" >&5
5428 echo "${ECHO_T}$cf_rpath_space" >&6
5429         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5430         ;;
5431 esac
5432
5433         RM_SHARED_OPTS=
5434         LOCAL_LDFLAGS=
5435         LOCAL_LDFLAGS2=
5436         LD_SHARED_OPTS=
5437         INSTALL_LIB="-m 644"
5438         : ${rel_builddir:=.}
5439
5440         shlibdir=$libdir
5441
5442         MAKE_DLLS="#"
5443
5444         cf_cv_do_symlinks=no
5445         cf_ld_rpath_opt=
5446         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5447
5448         echo "$as_me:5448: checking if release/abi version should be used for shared libs" >&5
5449 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5450
5451 # Check whether --with-shlib-version or --without-shlib-version was given.
5452 if test "${with_shlib_version+set}" = set; then
5453   withval="$with_shlib_version"
5454   test -z "$withval" && withval=auto
5455         case $withval in
5456         (yes)
5457                 cf_cv_shlib_version=auto
5458                 ;;
5459         (rel|abi|auto)
5460                 cf_cv_shlib_version=$withval
5461                 ;;
5462         (*)
5463                 echo "$as_me:5463: result: $withval" >&5
5464 echo "${ECHO_T}$withval" >&6
5465                 { { echo "$as_me:5465: error: option value must be one of: rel, abi, or auto" >&5
5466 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5467    { (exit 1); exit 1; }; }
5468                 ;;
5469         esac
5470
5471 else
5472   cf_cv_shlib_version=auto
5473 fi;
5474         echo "$as_me:5474: result: $cf_cv_shlib_version" >&5
5475 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5476
5477         cf_cv_rm_so_locs=no
5478         cf_try_cflags=
5479
5480         # Some less-capable ports of gcc support only -fpic
5481         CC_SHARED_OPTS=
5482
5483         cf_try_fPIC=no
5484         if test "$GCC" = yes
5485         then
5486                 cf_try_fPIC=yes
5487         else
5488                 case $cf_cv_system_name in
5489                 (*linux*)       # e.g., PGI compiler
5490                         cf_try_fPIC=yes
5491                         ;;
5492                 esac
5493         fi
5494
5495         if test "$cf_try_fPIC" = yes
5496         then
5497                 echo "$as_me:5497: checking which $CC option to use" >&5
5498 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5499                 cf_save_CFLAGS="$CFLAGS"
5500                 for CC_SHARED_OPTS in -fPIC -fpic ''
5501                 do
5502                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5503                         cat >conftest.$ac_ext <<_ACEOF
5504 #line 5504 "configure"
5505 #include "confdefs.h"
5506 #include <stdio.h>
5507 int
5508 main (void)
5509 {
5510 int x = 1
5511   ;
5512   return 0;
5513 }
5514 _ACEOF
5515 rm -f conftest.$ac_objext
5516 if { (eval echo "$as_me:5516: \"$ac_compile\"") >&5
5517   (eval $ac_compile) 2>&5
5518   ac_status=$?
5519   echo "$as_me:5519: \$? = $ac_status" >&5
5520   (exit $ac_status); } &&
5521          { ac_try='test -s conftest.$ac_objext'
5522   { (eval echo "$as_me:5522: \"$ac_try\"") >&5
5523   (eval $ac_try) 2>&5
5524   ac_status=$?
5525   echo "$as_me:5525: \$? = $ac_status" >&5
5526   (exit $ac_status); }; }; then
5527   break
5528 else
5529   echo "$as_me: failed program was:" >&5
5530 cat conftest.$ac_ext >&5
5531 fi
5532 rm -f conftest.$ac_objext conftest.$ac_ext
5533                 done
5534                 echo "$as_me:5534: result: $CC_SHARED_OPTS" >&5
5535 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5536                 CFLAGS="$cf_save_CFLAGS"
5537         fi
5538
5539         cf_cv_shlib_version_infix=no
5540
5541         case $cf_cv_system_name in
5542         (aix4.3-9*|aix[5-7]*)
5543                 if test "$GCC" = yes; then
5544                         CC_SHARED_OPTS='-Wl,-brtl'
5545                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5546                 else
5547                         CC_SHARED_OPTS='-brtl'
5548                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5549                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5550                 fi
5551                 ;;
5552         (beos*)
5553                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5554                 ;;
5555         (cygwin*)
5556                 CC_SHARED_OPTS=
5557                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5558                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5559                 cf_cv_shlib_version=cygdll
5560                 cf_cv_shlib_version_infix=cygdll
5561                 shlibdir=$bindir
5562                 MAKE_DLLS=
5563                 cat >mk_shared_lib.sh <<-CF_EOF
5564                 #!$SHELL
5565                 SHARED_LIB=\$1
5566                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5567                 shift
5568                 cat <<-EOF
5569                 Linking shared library
5570                 ** SHARED_LIB \$SHARED_LIB
5571                 ** IMPORT_LIB \$IMPORT_LIB
5572 EOF
5573                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5574 CF_EOF
5575                 chmod +x mk_shared_lib.sh
5576                 ;;
5577         (msys*)
5578                 CC_SHARED_OPTS=
5579                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5580                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5581                 cf_cv_shlib_version=msysdll
5582                 cf_cv_shlib_version_infix=msysdll
5583                 shlibdir=$bindir
5584                 MAKE_DLLS=
5585                 cat >mk_shared_lib.sh <<-CF_EOF
5586                 #!$SHELL
5587                 SHARED_LIB=\$1
5588                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5589                 shift
5590                 cat <<-EOF
5591                 Linking shared library
5592                 ** SHARED_LIB \$SHARED_LIB
5593                 ** IMPORT_LIB \$IMPORT_LIB
5594 EOF
5595                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5596 CF_EOF
5597                 chmod +x mk_shared_lib.sh
5598                 ;;
5599         (darwin*)
5600                 cf_try_cflags="no-cpp-precomp"
5601                 CC_SHARED_OPTS="-dynamic"
5602                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5603                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5604                 cf_cv_shlib_version_infix=yes
5605                 echo "$as_me:5605: checking if ld -search_paths_first works" >&5
5606 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5607 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5608   echo $ECHO_N "(cached) $ECHO_C" >&6
5609 else
5610
5611                         cf_save_LDFLAGS=$LDFLAGS
5612                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5613                         cat >conftest.$ac_ext <<_ACEOF
5614 #line 5614 "configure"
5615 #include "confdefs.h"
5616
5617 int
5618 main (void)
5619 {
5620 int i;
5621   ;
5622   return 0;
5623 }
5624 _ACEOF
5625 rm -f conftest.$ac_objext conftest$ac_exeext
5626 if { (eval echo "$as_me:5626: \"$ac_link\"") >&5
5627   (eval $ac_link) 2>&5
5628   ac_status=$?
5629   echo "$as_me:5629: \$? = $ac_status" >&5
5630   (exit $ac_status); } &&
5631          { ac_try='test -s conftest$ac_exeext'
5632   { (eval echo "$as_me:5632: \"$ac_try\"") >&5
5633   (eval $ac_try) 2>&5
5634   ac_status=$?
5635   echo "$as_me:5635: \$? = $ac_status" >&5
5636   (exit $ac_status); }; }; then
5637   cf_cv_ldflags_search_paths_first=yes
5638 else
5639   echo "$as_me: failed program was:" >&5
5640 cat conftest.$ac_ext >&5
5641 cf_cv_ldflags_search_paths_first=no
5642 fi
5643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5644                                 LDFLAGS=$cf_save_LDFLAGS
5645 fi
5646 echo "$as_me:5646: result: $cf_cv_ldflags_search_paths_first" >&5
5647 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5648                 if test $cf_cv_ldflags_search_paths_first = yes; then
5649                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5650                 fi
5651                 ;;
5652         (hpux[7-8]*)
5653                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5654                 if test "$GCC" != yes; then
5655                         CC_SHARED_OPTS='+Z'
5656                 fi
5657                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5658                 INSTALL_LIB="-m 555"
5659                 ;;
5660         (hpux*)
5661                 # (tested with gcc 2.7.2 -- I don't have c89)
5662                 if test "$GCC" = yes; then
5663                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5664                 else
5665                         CC_SHARED_OPTS='+Z'
5666                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5667                 fi
5668                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5669                 # HP-UX shared libraries must be executable, and should be
5670                 # readonly to exploit a quirk in the memory manager.
5671                 INSTALL_LIB="-m 555"
5672                 ;;
5673         (interix*)
5674                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5675                 if test "$cf_cv_shlib_version" = rel; then
5676                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5677                 else
5678                         cf_shared_soname='`basename $@`'
5679                 fi
5680                 CC_SHARED_OPTS=
5681                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5682                 ;;
5683         (irix*)
5684                 if test "$cf_cv_enable_rpath" = yes ; then
5685                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5686                 fi
5687                 # tested with IRIX 5.2 and 'cc'.
5688                 if test "$GCC" != yes; then
5689                         CC_SHARED_OPTS='-KPIC'
5690                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5691                 else
5692                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5693                 fi
5694                 cf_cv_rm_so_locs=yes
5695                 ;;
5696         (linux*|gnu*|k*bsd*-gnu)
5697                 if test "$DFT_LWR_MODEL" = "shared" ; then
5698                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5699                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5700                 fi
5701                 if test "$cf_cv_enable_rpath" = yes ; then
5702                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5703                 fi
5704
5705         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5706         if test "$cf_cv_shlib_version" = rel; then
5707                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5708         else
5709                 cf_cv_shared_soname='`basename $@`'
5710         fi
5711
5712                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5713                 ;;
5714         (mingw*)
5715                 cf_cv_shlib_version=mingw
5716                 cf_cv_shlib_version_infix=mingw
5717                 shlibdir=$bindir
5718                 MAKE_DLLS=
5719                 if test "$DFT_LWR_MODEL" = "shared" ; then
5720                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5721                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5722                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5723                 fi
5724                 CC_SHARED_OPTS=
5725                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5726                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5727                 cat >mk_shared_lib.sh <<-CF_EOF
5728                 #!$SHELL
5729                 SHARED_LIB=\$1
5730                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5731                 shift
5732                 cat <<-EOF
5733                 Linking shared library
5734                 ** SHARED_LIB \$SHARED_LIB
5735                 ** IMPORT_LIB \$IMPORT_LIB
5736 EOF
5737                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5738 CF_EOF
5739                 chmod +x mk_shared_lib.sh
5740                 ;;
5741         (openbsd[2-9].*|mirbsd*)
5742                 if test "$DFT_LWR_MODEL" = "shared" ; then
5743                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5744                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5745                 fi
5746                 if test "$cf_cv_enable_rpath" = yes ; then
5747                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5748                 fi
5749                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5750
5751         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5752         if test "$cf_cv_shlib_version" = rel; then
5753                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5754         else
5755                 cf_cv_shared_soname='`basename $@`'
5756         fi
5757
5758                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5759                 ;;
5760         (nto-qnx*|openbsd*|freebsd[12].*)
5761                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5762                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5763                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5764                 ;;
5765         (dragonfly*|freebsd*)
5766                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5767                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5768                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5769                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5770                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5771                 fi
5772
5773         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5774         if test "$cf_cv_shlib_version" = rel; then
5775                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5776         else
5777                 cf_cv_shared_soname='`basename $@`'
5778         fi
5779
5780                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5781                 ;;
5782         (netbsd*)
5783                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5784                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5785                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5786                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5787                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5788                         if test "$cf_cv_shlib_version" = auto; then
5789                         if test -f /usr/libexec/ld.elf_so; then
5790                                 cf_cv_shlib_version=abi
5791                         else
5792                                 cf_cv_shlib_version=rel
5793                         fi
5794                         fi
5795
5796         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5797         if test "$cf_cv_shlib_version" = rel; then
5798                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5799         else
5800                 cf_cv_shared_soname='`basename $@`'
5801         fi
5802
5803                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5804                 else
5805                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5806                 fi
5807                 ;;
5808         (osf*|mls+*)
5809                 # tested with OSF/1 V3.2 and 'cc'
5810                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5811                 # link with shared libs).
5812                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5813                 case $host_os in
5814                 (osf4*)
5815                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5816                         ;;
5817                 esac
5818                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5819                 if test "$DFT_LWR_MODEL" = "shared" ; then
5820                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5821                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5822                 fi
5823                 cf_cv_rm_so_locs=yes
5824                 ;;
5825         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5826                 # tested with osr5.0.5
5827                 if test "$GCC" != yes; then
5828                         CC_SHARED_OPTS='-belf -KPIC'
5829                 fi
5830                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5831                 if test "$cf_cv_enable_rpath" = yes ; then
5832                         # only way is to set LD_RUN_PATH but no switch for it
5833                         RUN_PATH=$libdir
5834                 fi
5835                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5836                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5837                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5838                 ;;
5839         (sunos4*)
5840                 # tested with SunOS 4.1.1 and gcc 2.7.0
5841                 if test "$GCC" != yes; then
5842                         CC_SHARED_OPTS='-KPIC'
5843                 fi
5844                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5845                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5846                 ;;
5847         (solaris2*)
5848                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5849                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5850                 if test "$DFT_LWR_MODEL" = "shared" ; then
5851                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5852                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5853                 fi
5854                 if test "$cf_cv_enable_rpath" = yes ; then
5855                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5856                 fi
5857
5858         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5859         if test "$cf_cv_shlib_version" = rel; then
5860                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5861         else
5862                 cf_cv_shared_soname='`basename $@`'
5863         fi
5864
5865                 if test "$GCC" != yes; then
5866                         cf_save_CFLAGS="$CFLAGS"
5867                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5868                         do
5869                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5870                                 cat >conftest.$ac_ext <<_ACEOF
5871 #line 5871 "configure"
5872 #include "confdefs.h"
5873 #include <stdio.h>
5874 int
5875 main (void)
5876 {
5877 printf("Hello\n");
5878   ;
5879   return 0;
5880 }
5881 _ACEOF
5882 rm -f conftest.$ac_objext
5883 if { (eval echo "$as_me:5883: \"$ac_compile\"") >&5
5884   (eval $ac_compile) 2>&5
5885   ac_status=$?
5886   echo "$as_me:5886: \$? = $ac_status" >&5
5887   (exit $ac_status); } &&
5888          { ac_try='test -s conftest.$ac_objext'
5889   { (eval echo "$as_me:5889: \"$ac_try\"") >&5
5890   (eval $ac_try) 2>&5
5891   ac_status=$?
5892   echo "$as_me:5892: \$? = $ac_status" >&5
5893   (exit $ac_status); }; }; then
5894   break
5895 else
5896   echo "$as_me: failed program was:" >&5
5897 cat conftest.$ac_ext >&5
5898 fi
5899 rm -f conftest.$ac_objext conftest.$ac_ext
5900                         done
5901                         CFLAGS="$cf_save_CFLAGS"
5902                         CC_SHARED_OPTS=$cf_shared_opts
5903                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
5904                 else
5905                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5906                 fi
5907                 ;;
5908         (sysv5uw7*|unix_sv*)
5909                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5910                 if test "$GCC" != yes; then
5911                         CC_SHARED_OPTS='-KPIC'
5912                 fi
5913                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
5914                 ;;
5915         (*)
5916                 CC_SHARED_OPTS='unknown'
5917                 MK_SHARED_LIB='echo unknown'
5918                 ;;
5919         esac
5920
5921         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5922         case "$cf_cv_shlib_version" in
5923         (rel|abi)
5924                 case "$MK_SHARED_LIB" in
5925                 (*'-o $@')
5926                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5927                         ;;
5928                 (*)
5929                         { echo "$as_me:5929: WARNING: ignored --with-shlib-version" >&5
5930 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5931                         ;;
5932                 esac
5933                 ;;
5934         esac
5935
5936         if test -n "$cf_try_cflags"
5937         then
5938 cat > conftest.$ac_ext <<EOF
5939 #line 5939 "${as_me:-configure}"
5940 #include <stdio.h>
5941 int main(int argc, char *argv[])
5942 {
5943         printf("hello\n");
5944         return (argv[argc-1] == 0) ;
5945 }
5946 EOF
5947                 cf_save_CFLAGS="$CFLAGS"
5948                 for cf_opt in $cf_try_cflags
5949                 do
5950                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5951                         echo "$as_me:5951: checking if CFLAGS option -$cf_opt works" >&5
5952 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5953                         if { (eval echo "$as_me:5953: \"$ac_compile\"") >&5
5954   (eval $ac_compile) 2>&5
5955   ac_status=$?
5956   echo "$as_me:5956: \$? = $ac_status" >&5
5957   (exit $ac_status); }; then
5958                                 echo "$as_me:5958: result: yes" >&5
5959 echo "${ECHO_T}yes" >&6
5960                                 cf_save_CFLAGS="$CFLAGS"
5961                         else
5962                                 echo "$as_me:5962: result: no" >&5
5963 echo "${ECHO_T}no" >&6
5964                         fi
5965                 done
5966                 CFLAGS="$cf_save_CFLAGS"
5967         fi
5968
5969         # RPATH_LIST is a colon-separated list of directories
5970         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5971         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5972
5973         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
5974
5975         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5976
5977 echo "${as_me:-configure}:5977: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5978
5979         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5980
5981 echo "${as_me:-configure}:5981: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5982
5983 for model in $cf_list_models; do
5984         case $model in
5985         (libtool)
5986
5987 echo "$as_me:5987: checking for additional libtool options" >&5
5988 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
5989
5990 # Check whether --with-libtool-opts or --without-libtool-opts was given.
5991 if test "${with_libtool_opts+set}" = set; then
5992   withval="$with_libtool_opts"
5993   with_libtool_opts=$withval
5994 else
5995   with_libtool_opts=no
5996 fi;
5997 echo "$as_me:5997: result: $with_libtool_opts" >&5
5998 echo "${ECHO_T}$with_libtool_opts" >&6
5999
6000 case .$with_libtool_opts in
6001 (.yes|.no|.)
6002         ;;
6003 (*)
6004         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6005         ;;
6006 esac
6007
6008 echo "$as_me:6008: checking if exported-symbols file should be used" >&5
6009 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6010
6011 # Check whether --with-export-syms or --without-export-syms was given.
6012 if test "${with_export_syms+set}" = set; then
6013   withval="$with_export_syms"
6014   with_export_syms=$withval
6015 else
6016   with_export_syms=no
6017 fi;
6018 if test "x$with_export_syms" = xyes
6019 then
6020         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6021
6022 fi
6023 echo "$as_me:6023: result: $with_export_syms" >&5
6024 echo "${ECHO_T}$with_export_syms" >&6
6025 if test "x$with_export_syms" != xno
6026 then
6027         EXPORT_SYMS="-export-symbols $with_export_syms"
6028
6029 fi
6030
6031                 ;;
6032         (shared)
6033                 if test "$CC_SHARED_OPTS" = "unknown"; then
6034                         { { echo "$as_me:6034: error: Shared libraries are not supported in this version" >&5
6035 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6036    { (exit 1); exit 1; }; }
6037                 fi
6038                 # workaround for inept transition to PIE vs PIC...
6039                 echo "$as_me:6039: checking if current CFLAGS link properly" >&5
6040 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6041                 cat >conftest.$ac_ext <<_ACEOF
6042 #line 6042 "configure"
6043 #include "confdefs.h"
6044 #include <stdio.h>
6045 int
6046 main (void)
6047 {
6048 printf("Hello work\n");
6049   ;
6050   return 0;
6051 }
6052 _ACEOF
6053 rm -f conftest.$ac_objext conftest$ac_exeext
6054 if { (eval echo "$as_me:6054: \"$ac_link\"") >&5
6055   (eval $ac_link) 2>&5
6056   ac_status=$?
6057   echo "$as_me:6057: \$? = $ac_status" >&5
6058   (exit $ac_status); } &&
6059          { ac_try='test -s conftest$ac_exeext'
6060   { (eval echo "$as_me:6060: \"$ac_try\"") >&5
6061   (eval $ac_try) 2>&5
6062   ac_status=$?
6063   echo "$as_me:6063: \$? = $ac_status" >&5
6064   (exit $ac_status); }; }; then
6065   cf_cflags_work=yes
6066 else
6067   echo "$as_me: failed program was:" >&5
6068 cat conftest.$ac_ext >&5
6069 cf_cflags_work=no
6070 fi
6071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6072                 echo "$as_me:6072: result: $cf_cflags_work" >&5
6073 echo "${ECHO_T}$cf_cflags_work" >&6
6074                 if test "$cf_cflags_work" = no
6075                 then
6076                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6077
6078 echo "${as_me:-configure}:6078: testing try to work around by appending shared-options ..." 1>&5
6079
6080                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6081                 fi
6082
6083 echo "$as_me:6083: checking if versioned-symbols file should be used" >&5
6084 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6085
6086 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6087 if test "${with_versioned_syms+set}" = set; then
6088   withval="$with_versioned_syms"
6089   with_versioned_syms=$withval
6090 else
6091   with_versioned_syms=no
6092 fi;
6093 if test "x$with_versioned_syms" = xyes
6094 then
6095         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6096
6097 fi
6098 echo "$as_me:6098: result: $with_versioned_syms" >&5
6099 echo "${ECHO_T}$with_versioned_syms" >&6
6100
6101 RESULTING_SYMS=
6102 VERSIONED_SYMS=
6103 WILDCARD_SYMS=
6104
6105 if test "x$with_versioned_syms" != xno
6106 then
6107         RESULTING_SYMS=$with_versioned_syms
6108         case "x$MK_SHARED_LIB" in
6109         (*-Wl,*)
6110                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6111                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6112                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6113
6114 echo "${as_me:-configure}:6114: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6115
6116                 ;;
6117         (*-dy\ *)
6118                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6119                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6120                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6121
6122 echo "${as_me:-configure}:6122: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6123
6124                 ;;
6125         (*)
6126                 { echo "$as_me:6126: WARNING: this system does not support versioned-symbols" >&5
6127 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6128                 ;;
6129         esac
6130
6131         # Linux ld can selectively override scope, e.g., of symbols beginning with
6132         # "_" by first declaring some as global, and then using a wildcard to
6133         # declare the others as local.  Some other loaders cannot do this.  Check
6134         # by constructing a (very) simple shared library and inspecting its
6135         # symbols.
6136         if test "x$VERSIONED_SYMS" != "x"
6137         then
6138                 echo "$as_me:6138: checking if wildcards can be used to selectively omit symbols" >&5
6139 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6140                 WILDCARD_SYMS=no
6141
6142                 # make sources
6143                 rm -f conftest.*
6144
6145                 cat >conftest.ver <<EOF
6146 module_1.0 {
6147 global:
6148         globalf1;
6149 local:
6150         localf1;
6151 };
6152 module_2.0 {
6153 global:
6154         globalf2;
6155 local:
6156         localf2;
6157         _*;
6158 } module_1.0;
6159 submodule_1.0 {
6160 global:
6161         subglobalf1;
6162         _ismissing;
6163 local:
6164         sublocalf1;
6165 };
6166 submodule_2.0 {
6167 global:
6168         subglobalf2;
6169 local:
6170         sublocalf2;
6171         _*;
6172 } submodule_1.0;
6173 EOF
6174                 cat >conftest.$ac_ext <<EOF
6175 #line 6175 "configure"
6176 int     _ismissing(void) { return 1; }
6177 int     _localf1(void) { return 1; }
6178 int     _localf2(void) { return 2; }
6179 int     globalf1(void) { return 1; }
6180 int     globalf2(void) { return 2; }
6181 int     _sublocalf1(void) { return 1; }
6182 int     _sublocalf2(void) { return 2; }
6183 int     subglobalf1(void) { return 1; }
6184 int     subglobalf2(void) { return 2; }
6185 EOF
6186                 cat >conftest.mk <<EOF
6187 CC=${CC}
6188 CFLAGS=${CFLAGS}
6189 CPPFLAGS=${CPPFLAGS}
6190 LDFLAGS=${LDFLAGS}
6191 LIBS=${LIBS}
6192 VERSIONED_SYMS=${VERSIONED_SYMS}
6193 RESULTING_SYMS=conftest.ver
6194 MK_SHARED_LIB=${MK_SHARED_LIB}
6195 conftest.so: conftest.$ac_cv_objext
6196                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6197 EOF
6198
6199                 # compile source, make library
6200                 if make -f conftest.mk 2>&5 >/dev/null
6201                 then
6202                         # test for missing symbol in either Data or Text section
6203                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6204                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6205                 fi
6206                 echo "$as_me:6206: result: $WILDCARD_SYMS" >&5
6207 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6208                 rm -f conftest.*
6209         fi
6210 fi
6211
6212                 ;;
6213         esac
6214 done
6215
6216 ### Checks for special libraries, must be done up-front.
6217 SHLIB_LIST=""
6218
6219 echo "$as_me:6219: checking if you want to link with the GPM mouse library" >&5
6220 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6221
6222 # Check whether --with-gpm or --without-gpm was given.
6223 if test "${with_gpm+set}" = set; then
6224   withval="$with_gpm"
6225   with_gpm=$withval
6226 else
6227   with_gpm=maybe
6228 fi;
6229 echo "$as_me:6229: result: $with_gpm" >&5
6230 echo "${ECHO_T}$with_gpm" >&6
6231
6232 if test "$with_gpm" != no ; then
6233         echo "$as_me:6233: checking for gpm.h" >&5
6234 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6235 if test "${ac_cv_header_gpm_h+set}" = set; then
6236   echo $ECHO_N "(cached) $ECHO_C" >&6
6237 else
6238   cat >conftest.$ac_ext <<_ACEOF
6239 #line 6239 "configure"
6240 #include "confdefs.h"
6241 #include <gpm.h>
6242 _ACEOF
6243 if { (eval echo "$as_me:6243: \"$ac_cpp conftest.$ac_ext\"") >&5
6244   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6245   ac_status=$?
6246   egrep -v '^ *\+' conftest.er1 >conftest.err
6247   rm -f conftest.er1
6248   cat conftest.err >&5
6249   echo "$as_me:6249: \$? = $ac_status" >&5
6250   (exit $ac_status); } >/dev/null; then
6251   if test -s conftest.err; then
6252     ac_cpp_err=$ac_c_preproc_warn_flag
6253   else
6254     ac_cpp_err=
6255   fi
6256 else
6257   ac_cpp_err=yes
6258 fi
6259 if test -z "$ac_cpp_err"; then
6260   ac_cv_header_gpm_h=yes
6261 else
6262   echo "$as_me: failed program was:" >&5
6263   cat conftest.$ac_ext >&5
6264   ac_cv_header_gpm_h=no
6265 fi
6266 rm -f conftest.err conftest.$ac_ext
6267 fi
6268 echo "$as_me:6268: result: $ac_cv_header_gpm_h" >&5
6269 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6270 if test $ac_cv_header_gpm_h = yes; then
6271
6272 cat >>confdefs.h <<\EOF
6273 #define HAVE_GPM_H 1
6274 EOF
6275
6276                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6277                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6278
6279 echo "${as_me:-configure}:6279: testing assuming we really have GPM library ..." 1>&5
6280
6281 cat >>confdefs.h <<\EOF
6282 #define HAVE_LIBGPM 1
6283 EOF
6284
6285                         with_gpm=yes
6286                 else
6287                         echo "$as_me:6287: checking for Gpm_Open in -lgpm" >&5
6288 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6289 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6290   echo $ECHO_N "(cached) $ECHO_C" >&6
6291 else
6292   ac_check_lib_save_LIBS=$LIBS
6293 LIBS="-lgpm  $LIBS"
6294 cat >conftest.$ac_ext <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297
6298 /* Override any gcc2 internal prototype to avoid an error.  */
6299 #ifdef __cplusplus
6300 extern "C"
6301 #endif
6302 /* We use char because int might match the return type of a gcc2
6303    builtin and then its argument prototype would still apply.  */
6304 char Gpm_Open ();
6305 int
6306 main (void)
6307 {
6308 Gpm_Open ();
6309   ;
6310   return 0;
6311 }
6312 _ACEOF
6313 rm -f conftest.$ac_objext conftest$ac_exeext
6314 if { (eval echo "$as_me:6314: \"$ac_link\"") >&5
6315   (eval $ac_link) 2>&5
6316   ac_status=$?
6317   echo "$as_me:6317: \$? = $ac_status" >&5
6318   (exit $ac_status); } &&
6319          { ac_try='test -s conftest$ac_exeext'
6320   { (eval echo "$as_me:6320: \"$ac_try\"") >&5
6321   (eval $ac_try) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit $ac_status); }; }; then
6325   ac_cv_lib_gpm_Gpm_Open=yes
6326 else
6327   echo "$as_me: failed program was:" >&5
6328 cat conftest.$ac_ext >&5
6329 ac_cv_lib_gpm_Gpm_Open=no
6330 fi
6331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6332 LIBS=$ac_check_lib_save_LIBS
6333 fi
6334 echo "$as_me:6334: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6335 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6336 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6337   with_gpm=yes
6338 else
6339
6340                                 if test "$with_gpm" = maybe; then
6341                                         { echo "$as_me:6341: WARNING: Cannot link with GPM library" >&5
6342 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6343                                         with_gpm=no
6344                                 else
6345                                         { { echo "$as_me:6345: error: Cannot link with GPM library" >&5
6346 echo "$as_me: error: Cannot link with GPM library" >&2;}
6347    { (exit 1); exit 1; }; }
6348                                 fi
6349
6350 fi
6351
6352                 fi
6353
6354 else
6355
6356                 test "$with_gpm" != maybe && { echo "$as_me:6356: WARNING: Cannot find GPM header" >&5
6357 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6358                 with_gpm=no
6359
6360 fi
6361
6362 fi
6363
6364 if test "$with_gpm" != no ; then
6365         echo "$as_me:6365: checking if you want to load GPM dynamically" >&5
6366 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6367
6368 # Check whether --with-dlsym or --without-dlsym was given.
6369 if test "${with_dlsym+set}" = set; then
6370   withval="$with_dlsym"
6371   with_dlsym=$withval
6372 else
6373   with_dlsym=yes
6374 fi;
6375         echo "$as_me:6375: result: $with_dlsym" >&5
6376 echo "${ECHO_T}$with_dlsym" >&6
6377         if test "x$with_dlsym" = xyes ; then
6378
6379 cf_have_dlsym=no
6380 echo "$as_me:6380: checking for dlsym" >&5
6381 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6382 if test "${ac_cv_func_dlsym+set}" = set; then
6383   echo $ECHO_N "(cached) $ECHO_C" >&6
6384 else
6385   cat >conftest.$ac_ext <<_ACEOF
6386 #line 6386 "configure"
6387 #include "confdefs.h"
6388 /* System header to define __stub macros and hopefully few prototypes,
6389     which can conflict with char dlsym (); below.  */
6390 #include <assert.h>
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 #ifdef __cplusplus
6393 extern "C"
6394 #endif
6395 /* We use char because int might match the return type of a gcc2
6396    builtin and then its argument prototype would still apply.  */
6397 char dlsym ();
6398 char (*f) ();
6399
6400 int
6401 main (void)
6402 {
6403 /* The GNU C library defines this for functions which it implements
6404     to always fail with ENOSYS.  Some functions are actually named
6405     something starting with __ and the normal name is an alias.  */
6406 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6407 choke me
6408 #else
6409 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6410 #endif
6411
6412   ;
6413   return 0;
6414 }
6415 _ACEOF
6416 rm -f conftest.$ac_objext conftest$ac_exeext
6417 if { (eval echo "$as_me:6417: \"$ac_link\"") >&5
6418   (eval $ac_link) 2>&5
6419   ac_status=$?
6420   echo "$as_me:6420: \$? = $ac_status" >&5
6421   (exit $ac_status); } &&
6422          { ac_try='test -s conftest$ac_exeext'
6423   { (eval echo "$as_me:6423: \"$ac_try\"") >&5
6424   (eval $ac_try) 2>&5
6425   ac_status=$?
6426   echo "$as_me:6426: \$? = $ac_status" >&5
6427   (exit $ac_status); }; }; then
6428   ac_cv_func_dlsym=yes
6429 else
6430   echo "$as_me: failed program was:" >&5
6431 cat conftest.$ac_ext >&5
6432 ac_cv_func_dlsym=no
6433 fi
6434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6435 fi
6436 echo "$as_me:6436: result: $ac_cv_func_dlsym" >&5
6437 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6438 if test $ac_cv_func_dlsym = yes; then
6439   cf_have_dlsym=yes
6440 else
6441
6442 cf_have_libdl=no
6443 echo "$as_me:6443: checking for dlsym in -ldl" >&5
6444 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6445 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6446   echo $ECHO_N "(cached) $ECHO_C" >&6
6447 else
6448   ac_check_lib_save_LIBS=$LIBS
6449 LIBS="-ldl  $LIBS"
6450 cat >conftest.$ac_ext <<_ACEOF
6451 #line 6451 "configure"
6452 #include "confdefs.h"
6453
6454 /* Override any gcc2 internal prototype to avoid an error.  */
6455 #ifdef __cplusplus
6456 extern "C"
6457 #endif
6458 /* We use char because int might match the return type of a gcc2
6459    builtin and then its argument prototype would still apply.  */
6460 char dlsym ();
6461 int
6462 main (void)
6463 {
6464 dlsym ();
6465   ;
6466   return 0;
6467 }
6468 _ACEOF
6469 rm -f conftest.$ac_objext conftest$ac_exeext
6470 if { (eval echo "$as_me:6470: \"$ac_link\"") >&5
6471   (eval $ac_link) 2>&5
6472   ac_status=$?
6473   echo "$as_me:6473: \$? = $ac_status" >&5
6474   (exit $ac_status); } &&
6475          { ac_try='test -s conftest$ac_exeext'
6476   { (eval echo "$as_me:6476: \"$ac_try\"") >&5
6477   (eval $ac_try) 2>&5
6478   ac_status=$?
6479   echo "$as_me:6479: \$? = $ac_status" >&5
6480   (exit $ac_status); }; }; then
6481   ac_cv_lib_dl_dlsym=yes
6482 else
6483   echo "$as_me: failed program was:" >&5
6484 cat conftest.$ac_ext >&5
6485 ac_cv_lib_dl_dlsym=no
6486 fi
6487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6488 LIBS=$ac_check_lib_save_LIBS
6489 fi
6490 echo "$as_me:6490: result: $ac_cv_lib_dl_dlsym" >&5
6491 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6492 if test $ac_cv_lib_dl_dlsym = yes; then
6493
6494         cf_have_dlsym=yes
6495         cf_have_libdl=yes
6496 fi
6497
6498 fi
6499
6500 if test "$cf_have_dlsym" = yes ; then
6501         test "$cf_have_libdl" = yes && {
6502 cf_add_libs="-ldl"
6503 # Filter out duplicates - this happens with badly-designed ".pc" files...
6504 for cf_add_1lib in $LIBS
6505 do
6506         for cf_add_2lib in $cf_add_libs
6507         do
6508                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6509                 then
6510                         cf_add_1lib=
6511                         break
6512                 fi
6513         done
6514         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6515 done
6516 LIBS="$cf_add_libs"
6517  }
6518
6519         echo "$as_me:6519: checking whether able to link to dl*() functions" >&5
6520 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6521         cat >conftest.$ac_ext <<_ACEOF
6522 #line 6522 "configure"
6523 #include "confdefs.h"
6524 #include <dlfcn.h>
6525 int
6526 main (void)
6527 {
6528
6529                 void *obj;
6530                 if ((obj = dlopen("filename", 0)) != 0) {
6531                         if (dlsym(obj, "symbolname") == 0) {
6532                         dlclose(obj);
6533                         }
6534                 }
6535   ;
6536   return 0;
6537 }
6538 _ACEOF
6539 rm -f conftest.$ac_objext conftest$ac_exeext
6540 if { (eval echo "$as_me:6540: \"$ac_link\"") >&5
6541   (eval $ac_link) 2>&5
6542   ac_status=$?
6543   echo "$as_me:6543: \$? = $ac_status" >&5
6544   (exit $ac_status); } &&
6545          { ac_try='test -s conftest$ac_exeext'
6546   { (eval echo "$as_me:6546: \"$ac_try\"") >&5
6547   (eval $ac_try) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); }; }; then
6551
6552 cat >>confdefs.h <<\EOF
6553 #define HAVE_LIBDL 1
6554 EOF
6555
6556 else
6557   echo "$as_me: failed program was:" >&5
6558 cat conftest.$ac_ext >&5
6559
6560                 { { echo "$as_me:6560: error: Cannot link test program for libdl" >&5
6561 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6562    { (exit 1); exit 1; }; }
6563 fi
6564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6565         echo "$as_me:6565: result: ok" >&5
6566 echo "${ECHO_T}ok" >&6
6567 else
6568         { { echo "$as_me:6568: error: Cannot find dlsym function" >&5
6569 echo "$as_me: error: Cannot find dlsym function" >&2;}
6570    { (exit 1); exit 1; }; }
6571 fi
6572
6573                 if test "x$with_gpm" != xyes ; then
6574                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6575
6576 echo "${as_me:-configure}:6576: testing assuming soname for gpm is $with_gpm ..." 1>&5
6577
6578                         cf_cv_gpm_soname="$with_gpm"
6579                 else
6580
6581 echo "$as_me:6581: checking for soname of gpm library" >&5
6582 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6583 if test "${cf_cv_gpm_soname+set}" = set; then
6584   echo $ECHO_N "(cached) $ECHO_C" >&6
6585 else
6586
6587 cf_cv_gpm_soname=unknown
6588 if test "$cross_compiling" != yes ; then
6589 cat >conftest.$ac_ext <<CF_EOF
6590 #include <gpm.h>
6591 int main(void)
6592 {
6593 if (Gpm_Open(0,0)) Gpm_Close();
6594         ${cf_cv_main_return:-return}(0);
6595 }
6596 CF_EOF
6597 cf_save_LIBS="$LIBS"
6598
6599 cf_add_libs="-lgpm"
6600 # Filter out duplicates - this happens with badly-designed ".pc" files...
6601 for cf_add_1lib in $LIBS
6602 do
6603         for cf_add_2lib in $cf_add_libs
6604         do
6605                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6606                 then
6607                         cf_add_1lib=
6608                         break
6609                 fi
6610         done
6611         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6612 done
6613 LIBS="$cf_add_libs"
6614
6615         if { (eval echo "$as_me:6615: \"$ac_compile\"") >&5
6616   (eval $ac_compile) 2>&5
6617   ac_status=$?
6618   echo "$as_me:6618: \$? = $ac_status" >&5
6619   (exit $ac_status); } ; then
6620                 if { (eval echo "$as_me:6620: \"$ac_link\"") >&5
6621   (eval $ac_link) 2>&5
6622   ac_status=$?
6623   echo "$as_me:6623: \$? = $ac_status" >&5
6624   (exit $ac_status); } ; then
6625                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6626                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6627                 fi
6628         fi
6629 rm -rf conftest*
6630 LIBS="$cf_save_LIBS"
6631 fi
6632
6633 fi
6634 echo "$as_me:6634: result: $cf_cv_gpm_soname" >&5
6635 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6636
6637                 fi
6638                 test "$cf_cv_gpm_soname" != "unknown" &&
6639 cat >>confdefs.h <<EOF
6640 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6641 EOF
6642
6643                 SHLIB_LIST="-ldl $SHLIB_LIST"
6644
6645 cf_add_libs="-ldl"
6646 # Filter out duplicates - this happens with badly-designed ".pc" files...
6647 for cf_add_1lib in $PRIVATE_LIBS
6648 do
6649         for cf_add_2lib in $cf_add_libs
6650         do
6651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6652                 then
6653                         cf_add_1lib=
6654                         break
6655                 fi
6656         done
6657         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6658 done
6659 PRIVATE_LIBS="$cf_add_libs"
6660
6661         else
6662                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6663
6664 cf_add_libs="-lgpm"
6665 # Filter out duplicates - this happens with badly-designed ".pc" files...
6666 for cf_add_1lib in $TEST_LIBS
6667 do
6668         for cf_add_2lib in $cf_add_libs
6669         do
6670                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6671                 then
6672                         cf_add_1lib=
6673                         break
6674                 fi
6675         done
6676         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6677 done
6678 TEST_LIBS="$cf_add_libs"
6679
6680 cf_add_libs="-lgpm"
6681 # Filter out duplicates - this happens with badly-designed ".pc" files...
6682 for cf_add_1lib in $PRIVATE_LIBS
6683 do
6684         for cf_add_2lib in $cf_add_libs
6685         do
6686                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6687                 then
6688                         cf_add_1lib=
6689                         break
6690                 fi
6691         done
6692         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6693 done
6694 PRIVATE_LIBS="$cf_add_libs"
6695
6696         fi
6697
6698 cat >>confdefs.h <<\EOF
6699 #define HAVE_LIBGPM 1
6700 EOF
6701
6702 echo "$as_me:6702: checking for Gpm_Wgetch in -lgpm" >&5
6703 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6704 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6705   echo $ECHO_N "(cached) $ECHO_C" >&6
6706 else
6707   ac_check_lib_save_LIBS=$LIBS
6708 LIBS="-lgpm  $LIBS"
6709 cat >conftest.$ac_ext <<_ACEOF
6710 #line 6710 "configure"
6711 #include "confdefs.h"
6712
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 #ifdef __cplusplus
6715 extern "C"
6716 #endif
6717 /* We use char because int might match the return type of a gcc2
6718    builtin and then its argument prototype would still apply.  */
6719 char Gpm_Wgetch ();
6720 int
6721 main (void)
6722 {
6723 Gpm_Wgetch ();
6724   ;
6725   return 0;
6726 }
6727 _ACEOF
6728 rm -f conftest.$ac_objext conftest$ac_exeext
6729 if { (eval echo "$as_me:6729: \"$ac_link\"") >&5
6730   (eval $ac_link) 2>&5
6731   ac_status=$?
6732   echo "$as_me:6732: \$? = $ac_status" >&5
6733   (exit $ac_status); } &&
6734          { ac_try='test -s conftest$ac_exeext'
6735   { (eval echo "$as_me:6735: \"$ac_try\"") >&5
6736   (eval $ac_try) 2>&5
6737   ac_status=$?
6738   echo "$as_me:6738: \$? = $ac_status" >&5
6739   (exit $ac_status); }; }; then
6740   ac_cv_lib_gpm_Gpm_Wgetch=yes
6741 else
6742   echo "$as_me: failed program was:" >&5
6743 cat conftest.$ac_ext >&5
6744 ac_cv_lib_gpm_Gpm_Wgetch=no
6745 fi
6746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6747 LIBS=$ac_check_lib_save_LIBS
6748 fi
6749 echo "$as_me:6749: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6750 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6751 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6752
6753 echo "$as_me:6753: checking if GPM is weakly bound to curses library" >&5
6754 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6755 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6756   echo $ECHO_N "(cached) $ECHO_C" >&6
6757 else
6758
6759 cf_cv_check_gpm_wgetch=unknown
6760 if test "$cross_compiling" != yes ; then
6761
6762 cat >conftest.$ac_ext <<CF_EOF
6763 #include <gpm.h>
6764 int main(void)
6765 {
6766         Gpm_Wgetch();
6767         ${cf_cv_main_return:-return}(0);
6768 }
6769 CF_EOF
6770
6771         cf_save_LIBS="$LIBS"
6772         # This only works if we can look at the symbol table.  If a shared
6773         # library is stripped for install, we cannot use that.  So we're forced
6774         # to rely on the static library, noting that some packagers may not
6775         # include it.
6776         LIBS="-static -lgpm -dynamic $LIBS"
6777         if { (eval echo "$as_me:6777: \"$ac_compile\"") >&5
6778   (eval $ac_compile) 2>&5
6779   ac_status=$?
6780   echo "$as_me:6780: \$? = $ac_status" >&5
6781   (exit $ac_status); } ; then
6782                 if { (eval echo "$as_me:6782: \"$ac_link\"") >&5
6783   (eval $ac_link) 2>&5
6784   ac_status=$?
6785   echo "$as_me:6785: \$? = $ac_status" >&5
6786   (exit $ac_status); } ; then
6787                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6788                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6789                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6790                 fi
6791         fi
6792         rm -rf conftest*
6793         LIBS="$cf_save_LIBS"
6794 fi
6795
6796 fi
6797 echo "$as_me:6797: result: $cf_cv_check_gpm_wgetch" >&5
6798 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6799
6800 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6801         { echo "$as_me:6801: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6802 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6803 fi
6804
6805 fi
6806
6807 fi
6808
6809 # not everyone has "test -c"
6810 if test -c /dev/sysmouse 2>/dev/null ; then
6811 echo "$as_me:6811: checking if you want to use sysmouse" >&5
6812 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
6813
6814 # Check whether --with-sysmouse or --without-sysmouse was given.
6815 if test "${with_sysmouse+set}" = set; then
6816   withval="$with_sysmouse"
6817   cf_with_sysmouse=$withval
6818 else
6819   cf_with_sysmouse=maybe
6820 fi;
6821         if test "$cf_with_sysmouse" != no ; then
6822         cat >conftest.$ac_ext <<_ACEOF
6823 #line 6823 "configure"
6824 #include "confdefs.h"
6825
6826 #include <osreldate.h>
6827 #if (__FreeBSD_version >= 400017)
6828 #include <sys/consio.h>
6829 #include <sys/fbio.h>
6830 #else
6831 #include <machine/console.h>
6832 #endif
6833
6834 int
6835 main (void)
6836 {
6837
6838         struct mouse_info the_mouse;
6839         ioctl(0, CONS_MOUSECTL, &the_mouse);
6840
6841   ;
6842   return 0;
6843 }
6844 _ACEOF
6845 rm -f conftest.$ac_objext
6846 if { (eval echo "$as_me:6846: \"$ac_compile\"") >&5
6847   (eval $ac_compile) 2>&5
6848   ac_status=$?
6849   echo "$as_me:6849: \$? = $ac_status" >&5
6850   (exit $ac_status); } &&
6851          { ac_try='test -s conftest.$ac_objext'
6852   { (eval echo "$as_me:6852: \"$ac_try\"") >&5
6853   (eval $ac_try) 2>&5
6854   ac_status=$?
6855   echo "$as_me:6855: \$? = $ac_status" >&5
6856   (exit $ac_status); }; }; then
6857   cf_with_sysmouse=yes
6858 else
6859   echo "$as_me: failed program was:" >&5
6860 cat conftest.$ac_ext >&5
6861 cf_with_sysmouse=no
6862 fi
6863 rm -f conftest.$ac_objext conftest.$ac_ext
6864         fi
6865 echo "$as_me:6865: result: $cf_with_sysmouse" >&5
6866 echo "${ECHO_T}$cf_with_sysmouse" >&6
6867 test "$cf_with_sysmouse" = yes &&
6868 cat >>confdefs.h <<\EOF
6869 #define USE_SYSMOUSE 1
6870 EOF
6871
6872 fi
6873
6874 # pretend that ncurses==ncursesw==ncursest
6875 echo "$as_me:6875: checking if you want to disable library suffixes" >&5
6876 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6877
6878 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6879 if test "${enable_lib_suffixes+set}" = set; then
6880   enableval="$enable_lib_suffixes"
6881   test "$enableval" != no && enableval=yes
6882         if test "$enableval" != "yes" ; then
6883     disable_lib_suffixes=yes
6884         else
6885                 disable_lib_suffixes=no
6886         fi
6887 else
6888   enableval=yes
6889         disable_lib_suffixes=no
6890
6891 fi;
6892 echo "$as_me:6892: result: $disable_lib_suffixes" >&5
6893 echo "${ECHO_T}$disable_lib_suffixes" >&6
6894
6895 ### If we're building with rpath, try to link non-standard libs that way too.
6896 if test "$DFT_LWR_MODEL" = "shared"; then
6897
6898 echo "$as_me:6898: checking if rpath-hack should be disabled" >&5
6899 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6900
6901 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6902 if test "${enable_rpath_hack+set}" = set; then
6903   enableval="$enable_rpath_hack"
6904   test "$enableval" != no && enableval=yes
6905         if test "$enableval" != "yes" ; then
6906     cf_disable_rpath_hack=yes
6907         else
6908                 cf_disable_rpath_hack=no
6909         fi
6910 else
6911   enableval=yes
6912         cf_disable_rpath_hack=no
6913
6914 fi;
6915 echo "$as_me:6915: result: $cf_disable_rpath_hack" >&5
6916 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6917 if test "$cf_disable_rpath_hack" = no ; then
6918
6919 echo "$as_me:6919: checking for updated LDFLAGS" >&5
6920 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6921 if test -n "$LD_RPATH_OPT" ; then
6922         echo "$as_me:6922: result: maybe" >&5
6923 echo "${ECHO_T}maybe" >&6
6924
6925         for ac_prog in ldd
6926 do
6927   # Extract the first word of "$ac_prog", so it can be a program name with args.
6928 set dummy $ac_prog; ac_word=$2
6929 echo "$as_me:6929: checking for $ac_word" >&5
6930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6931 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6932   echo $ECHO_N "(cached) $ECHO_C" >&6
6933 else
6934   if test -n "$cf_ldd_prog"; then
6935   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6936 else
6937   ac_save_IFS=$IFS; IFS=$ac_path_separator
6938 ac_dummy="$PATH"
6939 for ac_dir in $ac_dummy; do
6940   IFS=$ac_save_IFS
6941   test -z "$ac_dir" && ac_dir=.
6942   $as_executable_p "$ac_dir/$ac_word" || continue
6943 ac_cv_prog_cf_ldd_prog="$ac_prog"
6944 echo "$as_me:6944: found $ac_dir/$ac_word" >&5
6945 break
6946 done
6947
6948 fi
6949 fi
6950 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6951 if test -n "$cf_ldd_prog"; then
6952   echo "$as_me:6952: result: $cf_ldd_prog" >&5
6953 echo "${ECHO_T}$cf_ldd_prog" >&6
6954 else
6955   echo "$as_me:6955: result: no" >&5
6956 echo "${ECHO_T}no" >&6
6957 fi
6958
6959   test -n "$cf_ldd_prog" && break
6960 done
6961 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6962
6963         cf_rpath_list="/usr/lib /lib"
6964         if test "$cf_ldd_prog" != no
6965         then
6966                 cf_rpath_oops=
6967
6968 cat >conftest.$ac_ext <<_ACEOF
6969 #line 6969 "configure"
6970 #include "confdefs.h"
6971 #include <stdio.h>
6972 int
6973 main (void)
6974 {
6975 printf("Hello");
6976   ;
6977   return 0;
6978 }
6979 _ACEOF
6980 rm -f conftest.$ac_objext conftest$ac_exeext
6981 if { (eval echo "$as_me:6981: \"$ac_link\"") >&5
6982   (eval $ac_link) 2>&5
6983   ac_status=$?
6984   echo "$as_me:6984: \$? = $ac_status" >&5
6985   (exit $ac_status); } &&
6986          { ac_try='test -s conftest$ac_exeext'
6987   { (eval echo "$as_me:6987: \"$ac_try\"") >&5
6988   (eval $ac_try) 2>&5
6989   ac_status=$?
6990   echo "$as_me:6990: \$? = $ac_status" >&5
6991   (exit $ac_status); }; }; then
6992   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6993                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6994 else
6995   echo "$as_me: failed program was:" >&5
6996 cat conftest.$ac_ext >&5
6997 fi
6998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6999
7000                 # If we passed the link-test, but get a "not found" on a given library,
7001                 # this could be due to inept reconfiguration of gcc to make it only
7002                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7003                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7004                 # /usr/local libraries.
7005                 if test -n "$cf_rpath_oops"
7006                 then
7007                         for cf_rpath_src in $cf_rpath_oops
7008                         do
7009                                 for cf_rpath_dir in \
7010                                         /usr/local \
7011                                         /usr/pkg \
7012                                         /opt/sfw
7013                                 do
7014                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7015                                         then
7016                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7017
7018 echo "${as_me:-configure}:7018: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7019
7020                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7021                                                 break
7022                                         fi
7023                                 done
7024                         done
7025                 fi
7026         fi
7027
7028         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7029
7030 echo "${as_me:-configure}:7030: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7031
7032 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7033
7034 echo "${as_me:-configure}:7034: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7035
7036 cf_rpath_dst=
7037 for cf_rpath_src in $LDFLAGS
7038 do
7039         case $cf_rpath_src in
7040         (-L*)
7041
7042                 # check if this refers to a directory which we will ignore
7043                 cf_rpath_skip=no
7044                 if test -n "$cf_rpath_list"
7045                 then
7046                         for cf_rpath_item in $cf_rpath_list
7047                         do
7048                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7049                                 then
7050                                         cf_rpath_skip=yes
7051                                         break
7052                                 fi
7053                         done
7054                 fi
7055
7056                 if test "$cf_rpath_skip" = no
7057                 then
7058                         # transform the option
7059                         if test "$LD_RPATH_OPT" = "-R " ; then
7060                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7061                         else
7062                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7063                         fi
7064
7065                         # if we have not already added this, add it now
7066                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7067                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7068                         then
7069                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7070
7071 echo "${as_me:-configure}:7071: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7072
7073                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7074                         fi
7075                 fi
7076                 ;;
7077         esac
7078         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7079 done
7080 LDFLAGS=$cf_rpath_dst
7081
7082 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7083
7084 echo "${as_me:-configure}:7084: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7085
7086 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7087
7088 echo "${as_me:-configure}:7088: testing ...checking LIBS $LIBS ..." 1>&5
7089
7090 cf_rpath_dst=
7091 for cf_rpath_src in $LIBS
7092 do
7093         case $cf_rpath_src in
7094         (-L*)
7095
7096                 # check if this refers to a directory which we will ignore
7097                 cf_rpath_skip=no
7098                 if test -n "$cf_rpath_list"
7099                 then
7100                         for cf_rpath_item in $cf_rpath_list
7101                         do
7102                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7103                                 then
7104                                         cf_rpath_skip=yes
7105                                         break
7106                                 fi
7107                         done
7108                 fi
7109
7110                 if test "$cf_rpath_skip" = no
7111                 then
7112                         # transform the option
7113                         if test "$LD_RPATH_OPT" = "-R " ; then
7114                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7115                         else
7116                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7117                         fi
7118
7119                         # if we have not already added this, add it now
7120                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7121                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7122                         then
7123                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7124
7125 echo "${as_me:-configure}:7125: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7126
7127                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7128                         fi
7129                 fi
7130                 ;;
7131         esac
7132         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7133 done
7134 LIBS=$cf_rpath_dst
7135
7136 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7137
7138 echo "${as_me:-configure}:7138: testing ...checked LIBS $LIBS ..." 1>&5
7139
7140         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7141
7142 echo "${as_me:-configure}:7142: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7143
7144 else
7145         echo "$as_me:7145: result: no" >&5
7146 echo "${ECHO_T}no" >&6
7147 fi
7148
7149 fi
7150
7151 fi
7152
7153 ###############################################################################
7154
7155 ###     use option --with-extra-suffix to append suffix to headers and libraries
7156 echo "$as_me:7156: checking if you wish to append extra suffix to header/library paths" >&5
7157 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7158 EXTRA_SUFFIX=
7159
7160 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7161 if test "${with_extra_suffix+set}" = set; then
7162   withval="$with_extra_suffix"
7163   case x$withval in
7164         (no)
7165                 ;;
7166         (xyes|x)
7167                 EXTRA_SUFFIX=$cf_cv_abi_version
7168                 ;;
7169         (*)
7170                 EXTRA_SUFFIX=$withval
7171                 ;;
7172         esac
7173
7174 fi;
7175 echo "$as_me:7175: result: $EXTRA_SUFFIX" >&5
7176 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7177
7178 ###     use option --disable-overwrite to leave out the link to -lcurses
7179 echo "$as_me:7179: checking if you wish to install ncurses overwriting curses" >&5
7180 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7181
7182 # Check whether --enable-overwrite or --disable-overwrite was given.
7183 if test "${enable_overwrite+set}" = set; then
7184   enableval="$enable_overwrite"
7185   with_overwrite=$enableval
7186 else
7187   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7188 fi;
7189 echo "$as_me:7189: result: $with_overwrite" >&5
7190 echo "${ECHO_T}$with_overwrite" >&6
7191
7192 echo "$as_me:7192: checking if external terminfo-database is used" >&5
7193 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7194
7195 # Check whether --enable-database or --disable-database was given.
7196 if test "${enable_database+set}" = set; then
7197   enableval="$enable_database"
7198   use_database=$enableval
7199 else
7200   use_database=yes
7201 fi;
7202 echo "$as_me:7202: result: $use_database" >&5
7203 echo "${ECHO_T}$use_database" >&6
7204
7205 case $host_os in
7206 (os2*)
7207         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7208         ;;
7209 (*)
7210         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7211         ;;
7212 esac
7213
7214 NCURSES_USE_DATABASE=0
7215 if test "$use_database" != no ; then
7216         NCURSES_USE_DATABASE=1
7217
7218         echo "$as_me:7218: checking which terminfo source-file will be installed" >&5
7219 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7220
7221 # Check whether --with-database or --without-database was given.
7222 if test "${with_database+set}" = set; then
7223   withval="$with_database"
7224   TERMINFO_SRC=$withval
7225 fi;
7226         echo "$as_me:7226: result: $TERMINFO_SRC" >&5
7227 echo "${ECHO_T}$TERMINFO_SRC" >&6
7228
7229         echo "$as_me:7229: checking whether to use hashed database instead of directory/tree" >&5
7230 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7231
7232 # Check whether --with-hashed-db or --without-hashed-db was given.
7233 if test "${with_hashed_db+set}" = set; then
7234   withval="$with_hashed_db"
7235
7236 else
7237   with_hashed_db=no
7238 fi;
7239         echo "$as_me:7239: result: $with_hashed_db" >&5
7240 echo "${ECHO_T}$with_hashed_db" >&6
7241 else
7242         with_hashed_db=no
7243 fi
7244
7245 echo "$as_me:7245: checking for list of fallback descriptions" >&5
7246 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7247
7248 # Check whether --with-fallbacks or --without-fallbacks was given.
7249 if test "${with_fallbacks+set}" = set; then
7250   withval="$with_fallbacks"
7251   with_fallback=$withval
7252 else
7253   with_fallback=
7254 fi;
7255 echo "$as_me:7255: result: $with_fallback" >&5
7256 echo "${ECHO_T}$with_fallback" >&6
7257 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7258
7259 echo "$as_me:7259: checking if you want modern xterm or antique" >&5
7260 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7261
7262 # Check whether --with-xterm-new or --without-xterm-new was given.
7263 if test "${with_xterm_new+set}" = set; then
7264   withval="$with_xterm_new"
7265   with_xterm_new=$withval
7266 else
7267   with_xterm_new=yes
7268 fi;
7269 case $with_xterm_new in
7270 (no) with_xterm_new=xterm-old;;
7271 (*)      with_xterm_new=xterm-new;;
7272 esac
7273 echo "$as_me:7273: result: $with_xterm_new" >&5
7274 echo "${ECHO_T}$with_xterm_new" >&6
7275 WHICH_XTERM=$with_xterm_new
7276
7277 echo "$as_me:7277: checking if xterm backspace sends BS or DEL" >&5
7278 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7279
7280 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7281 if test "${with_xterm_kbs+set}" = set; then
7282   withval="$with_xterm_kbs"
7283   with_xterm_kbs=$withval
7284 else
7285   with_xterm_kbs=BS
7286 fi;
7287 case x$with_xterm_kbs in
7288 (xyes|xno|xBS|xbs|x8)
7289         with_xterm_kbs=BS
7290         ;;
7291 (xDEL|xdel|x127)
7292         with_xterm_kbs=DEL
7293         ;;
7294 (*)
7295         with_xterm_kbs=$withval
7296         ;;
7297 esac
7298 echo "$as_me:7298: result: $with_xterm_kbs" >&5
7299 echo "${ECHO_T}$with_xterm_kbs" >&6
7300 XTERM_KBS=$with_xterm_kbs
7301
7302 MAKE_TERMINFO=
7303 if test "$use_database" = no ; then
7304         TERMINFO="${datadir}/terminfo"
7305         MAKE_TERMINFO="#"
7306 else
7307
7308 echo "$as_me:7308: checking for list of terminfo directories" >&5
7309 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7310
7311 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7312 if test "${with_terminfo_dirs+set}" = set; then
7313   withval="$with_terminfo_dirs"
7314
7315 else
7316   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7317 fi;
7318 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7319 cf_dst_path=
7320 for cf_src_path in $withval
7321 do
7322
7323 if test "x$prefix" != xNONE; then
7324         cf_path_syntax="$prefix"
7325 else
7326         cf_path_syntax="$ac_default_prefix"
7327 fi
7328
7329 case ".$cf_src_path" in
7330 (.\$\(*\)*|.\'*\'*)
7331         ;;
7332 (..|./*|.\\*)
7333         ;;
7334 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7335         ;;
7336 (.\${*prefix}*|.\${*dir}*)
7337         eval cf_src_path="$cf_src_path"
7338         case ".$cf_src_path" in
7339         (.NONE/*)
7340                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7341                 ;;
7342         esac
7343         ;;
7344 (.no|.NONE/*)
7345         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7346         ;;
7347 (*)
7348         { { echo "$as_me:7348: error: expected a pathname, not \"$cf_src_path\"" >&5
7349 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7350    { (exit 1); exit 1; }; }
7351         ;;
7352 esac
7353
7354   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7355   cf_dst_path="${cf_dst_path}${cf_src_path}"
7356 done
7357 IFS="$ac_save_ifs"
7358
7359 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7360 # so we have to check/work around.  We do prefer the result of "eval"...
7361 eval cf_dst_eval="$cf_dst_path"
7362 case "x$cf_dst_eval" in
7363 (xNONE*)
7364         TERMINFO_DIRS=$cf_dst_path
7365         ;;
7366 (*)
7367         TERMINFO_DIRS="$cf_dst_eval"
7368         ;;
7369 esac
7370
7371 echo "$as_me:7371: result: $TERMINFO_DIRS" >&5
7372 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7373 test -n "$TERMINFO_DIRS" &&
7374 cat >>confdefs.h <<EOF
7375 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7376 EOF
7377
7378 echo "$as_me:7378: checking for default terminfo directory" >&5
7379 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7380
7381 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7382 if test "${with_default_terminfo_dir+set}" = set; then
7383   withval="$with_default_terminfo_dir"
7384
7385 else
7386   withval="${TERMINFO:-${datadir}/terminfo}"
7387 fi; if test -n "${datadir}/terminfo" ; then
7388
7389 if test "x$prefix" != xNONE; then
7390         cf_path_syntax="$prefix"
7391 else
7392         cf_path_syntax="$ac_default_prefix"
7393 fi
7394
7395 case ".$withval" in
7396 (.\$\(*\)*|.\'*\'*)
7397         ;;
7398 (..|./*|.\\*)
7399         ;;
7400 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7401         ;;
7402 (.\${*prefix}*|.\${*dir}*)
7403         eval withval="$withval"
7404         case ".$withval" in
7405         (.NONE/*)
7406                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7407                 ;;
7408         esac
7409         ;;
7410 (.no|.NONE/*)
7411         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7412         ;;
7413 (*)
7414         { { echo "$as_me:7414: error: expected a pathname, not \"$withval\"" >&5
7415 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7416    { (exit 1); exit 1; }; }
7417         ;;
7418 esac
7419
7420 fi
7421 eval TERMINFO="$withval"
7422
7423 echo "$as_me:7423: result: $TERMINFO" >&5
7424 echo "${ECHO_T}$TERMINFO" >&6
7425
7426 cat >>confdefs.h <<EOF
7427 #define TERMINFO "$TERMINFO"
7428 EOF
7429
7430 fi
7431
7432 ###     use option --disable-big-core to make tic run on small machines
7433 ###     We need 4Mb, check if we can allocate 50% more than that.
7434 echo "$as_me:7434: checking if big-core option selected" >&5
7435 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7436
7437 # Check whether --enable-big-core or --disable-big-core was given.
7438 if test "${enable_big_core+set}" = set; then
7439   enableval="$enable_big_core"
7440   with_big_core=$enableval
7441 else
7442   if test "$cross_compiling" = yes; then
7443   with_big_core=no
7444 else
7445   cat >conftest.$ac_ext <<_ACEOF
7446 #line 7446 "configure"
7447 #include "confdefs.h"
7448
7449 #include <stdlib.h>
7450 #include <string.h>
7451 int main() {
7452         unsigned long n = 6000000L;
7453         char *s = malloc(n);
7454         if (s != 0)
7455                 s[0] = s[n-1] = 0;
7456         ${cf_cv_main_return:-return}(s == 0);
7457 }
7458 _ACEOF
7459 rm -f conftest$ac_exeext
7460 if { (eval echo "$as_me:7460: \"$ac_link\"") >&5
7461   (eval $ac_link) 2>&5
7462   ac_status=$?
7463   echo "$as_me:7463: \$? = $ac_status" >&5
7464   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7465   { (eval echo "$as_me:7465: \"$ac_try\"") >&5
7466   (eval $ac_try) 2>&5
7467   ac_status=$?
7468   echo "$as_me:7468: \$? = $ac_status" >&5
7469   (exit $ac_status); }; }; then
7470   with_big_core=yes
7471 else
7472   echo "$as_me: program exited with status $ac_status" >&5
7473 echo "$as_me: failed program was:" >&5
7474 cat conftest.$ac_ext >&5
7475 with_big_core=no
7476 fi
7477 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7478 fi
7479 fi;
7480 echo "$as_me:7480: result: $with_big_core" >&5
7481 echo "${ECHO_T}$with_big_core" >&6
7482 test "x$with_big_core" = "xyes" &&
7483 cat >>confdefs.h <<\EOF
7484 #define HAVE_BIG_CORE 1
7485 EOF
7486
7487 ### ISO C only guarantees 512-char strings, we have tables which load faster
7488 ### when constructed using "big" strings.  More than the C compiler, the awk
7489 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7490 echo "$as_me:7490: checking if big-strings option selected" >&5
7491 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7492
7493 # Check whether --enable-big-strings or --disable-big-strings was given.
7494 if test "${enable_big_strings+set}" = set; then
7495   enableval="$enable_big_strings"
7496   with_big_strings=$enableval
7497 else
7498
7499         case x$AWK in
7500         (x)
7501                 eval with_big_strings=no
7502                 ;;
7503         (*)
7504                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7505                         | $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
7506                         eval with_big_strings=yes
7507                 else
7508                         eval with_big_strings=no
7509                 fi
7510                 ;;
7511         esac
7512
7513 fi;
7514 echo "$as_me:7514: result: $with_big_strings" >&5
7515 echo "${ECHO_T}$with_big_strings" >&6
7516
7517 USE_BIG_STRINGS=0
7518 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7519
7520 ###     use option --enable-termcap to compile in the termcap fallback support
7521 echo "$as_me:7521: checking if you want termcap-fallback support" >&5
7522 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7523
7524 # Check whether --enable-termcap or --disable-termcap was given.
7525 if test "${enable_termcap+set}" = set; then
7526   enableval="$enable_termcap"
7527   with_termcap=$enableval
7528 else
7529   with_termcap=no
7530 fi;
7531 echo "$as_me:7531: result: $with_termcap" >&5
7532 echo "${ECHO_T}$with_termcap" >&6
7533
7534 NCURSES_USE_TERMCAP=0
7535 if test "x$with_termcap" != "xyes" ; then
7536         if test "$use_database" = no ; then
7537                 if test -z "$with_fallback" ; then
7538                         { { echo "$as_me:7538: error: You have disabled the database w/o specifying fallbacks" >&5
7539 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7540    { (exit 1); exit 1; }; }
7541                 fi
7542         fi
7543
7544 cat >>confdefs.h <<\EOF
7545 #define PURE_TERMINFO 1
7546 EOF
7547
7548 else
7549
7550         if test "$with_ticlib" != no ; then
7551                 { { echo "$as_me:7551: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7552 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7553    { (exit 1); exit 1; }; }
7554         fi
7555
7556         NCURSES_USE_TERMCAP=1
7557         echo "$as_me:7557: checking for list of termcap files" >&5
7558 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7559
7560 # Check whether --with-termpath or --without-termpath was given.
7561 if test "${with_termpath+set}" = set; then
7562   withval="$with_termpath"
7563
7564 else
7565   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7566 fi;
7567 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7568 cf_dst_path=
7569 for cf_src_path in $withval
7570 do
7571
7572 if test "x$prefix" != xNONE; then
7573         cf_path_syntax="$prefix"
7574 else
7575         cf_path_syntax="$ac_default_prefix"
7576 fi
7577
7578 case ".$cf_src_path" in
7579 (.\$\(*\)*|.\'*\'*)
7580         ;;
7581 (..|./*|.\\*)
7582         ;;
7583 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7584         ;;
7585 (.\${*prefix}*|.\${*dir}*)
7586         eval cf_src_path="$cf_src_path"
7587         case ".$cf_src_path" in
7588         (.NONE/*)
7589                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7590                 ;;
7591         esac
7592         ;;
7593 (.no|.NONE/*)
7594         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7595         ;;
7596 (*)
7597         { { echo "$as_me:7597: error: expected a pathname, not \"$cf_src_path\"" >&5
7598 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7599    { (exit 1); exit 1; }; }
7600         ;;
7601 esac
7602
7603   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7604   cf_dst_path="${cf_dst_path}${cf_src_path}"
7605 done
7606 IFS="$ac_save_ifs"
7607
7608 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7609 # so we have to check/work around.  We do prefer the result of "eval"...
7610 eval cf_dst_eval="$cf_dst_path"
7611 case "x$cf_dst_eval" in
7612 (xNONE*)
7613         TERMPATH=$cf_dst_path
7614         ;;
7615 (*)
7616         TERMPATH="$cf_dst_eval"
7617         ;;
7618 esac
7619
7620         echo "$as_me:7620: result: $TERMPATH" >&5
7621 echo "${ECHO_T}$TERMPATH" >&6
7622         test -n "$TERMPATH" &&
7623 cat >>confdefs.h <<EOF
7624 #define TERMPATH "$TERMPATH"
7625 EOF
7626
7627         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7628         echo "$as_me:7628: checking if fast termcap-loader is needed" >&5
7629 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7630
7631 # Check whether --enable-getcap or --disable-getcap was given.
7632 if test "${enable_getcap+set}" = set; then
7633   enableval="$enable_getcap"
7634   with_getcap=$enableval
7635 else
7636   with_getcap=no
7637 fi;
7638         echo "$as_me:7638: result: $with_getcap" >&5
7639 echo "${ECHO_T}$with_getcap" >&6
7640         test "x$with_getcap" = "xyes" &&
7641 cat >>confdefs.h <<\EOF
7642 #define USE_GETCAP 1
7643 EOF
7644
7645         echo "$as_me:7645: checking if translated termcaps will be cached in ~/.terminfo" >&5
7646 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7647
7648 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7649 if test "${enable_getcap_cache+set}" = set; then
7650   enableval="$enable_getcap_cache"
7651   with_getcap_cache=$enableval
7652 else
7653   with_getcap_cache=no
7654 fi;
7655         echo "$as_me:7655: result: $with_getcap_cache" >&5
7656 echo "${ECHO_T}$with_getcap_cache" >&6
7657         test "x$with_getcap_cache" = "xyes" &&
7658 cat >>confdefs.h <<\EOF
7659 #define USE_GETCAP_CACHE 1
7660 EOF
7661
7662 fi
7663
7664 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7665 echo "$as_me:7665: checking if ~/.terminfo is wanted" >&5
7666 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7667
7668 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7669 if test "${enable_home_terminfo+set}" = set; then
7670   enableval="$enable_home_terminfo"
7671   with_home_terminfo=$enableval
7672 else
7673   with_home_terminfo=yes
7674 fi;
7675 echo "$as_me:7675: result: $with_home_terminfo" >&5
7676 echo "${ECHO_T}$with_home_terminfo" >&6
7677 test "x$with_home_terminfo" = "xyes" &&
7678 cat >>confdefs.h <<\EOF
7679 #define USE_HOME_TERMINFO 1
7680 EOF
7681
7682 echo "$as_me:7682: checking if you want to use restricted environment when running as root" >&5
7683 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7684
7685 # Check whether --enable-root-environ or --disable-root-environ was given.
7686 if test "${enable_root_environ+set}" = set; then
7687   enableval="$enable_root_environ"
7688   with_root_environ=$enableval
7689 else
7690   with_root_environ=yes
7691 fi;
7692 echo "$as_me:7692: result: $with_root_environ" >&5
7693 echo "${ECHO_T}$with_root_environ" >&6
7694 test "x$with_root_environ" = xyes &&
7695 cat >>confdefs.h <<\EOF
7696 #define USE_ROOT_ENVIRON 1
7697 EOF
7698
7699 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7700 ###   to reduce storage requirements for the terminfo database.
7701
7702 for ac_header in \
7703 unistd.h \
7704
7705 do
7706 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7707 echo "$as_me:7707: checking for $ac_header" >&5
7708 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7709 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7710   echo $ECHO_N "(cached) $ECHO_C" >&6
7711 else
7712   cat >conftest.$ac_ext <<_ACEOF
7713 #line 7713 "configure"
7714 #include "confdefs.h"
7715 #include <$ac_header>
7716 _ACEOF
7717 if { (eval echo "$as_me:7717: \"$ac_cpp conftest.$ac_ext\"") >&5
7718   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7719   ac_status=$?
7720   egrep -v '^ *\+' conftest.er1 >conftest.err
7721   rm -f conftest.er1
7722   cat conftest.err >&5
7723   echo "$as_me:7723: \$? = $ac_status" >&5
7724   (exit $ac_status); } >/dev/null; then
7725   if test -s conftest.err; then
7726     ac_cpp_err=$ac_c_preproc_warn_flag
7727   else
7728     ac_cpp_err=
7729   fi
7730 else
7731   ac_cpp_err=yes
7732 fi
7733 if test -z "$ac_cpp_err"; then
7734   eval "$as_ac_Header=yes"
7735 else
7736   echo "$as_me: failed program was:" >&5
7737   cat conftest.$ac_ext >&5
7738   eval "$as_ac_Header=no"
7739 fi
7740 rm -f conftest.err conftest.$ac_ext
7741 fi
7742 echo "$as_me:7742: result: `eval echo '${'$as_ac_Header'}'`" >&5
7743 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7744 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7745   cat >>confdefs.h <<EOF
7746 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7747 EOF
7748
7749 fi
7750 done
7751
7752 for ac_func in \
7753         remove \
7754         unlink
7755 do
7756 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7757 echo "$as_me:7757: checking for $ac_func" >&5
7758 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7759 if eval "test \"\${$as_ac_var+set}\" = set"; then
7760   echo $ECHO_N "(cached) $ECHO_C" >&6
7761 else
7762   cat >conftest.$ac_ext <<_ACEOF
7763 #line 7763 "configure"
7764 #include "confdefs.h"
7765 /* System header to define __stub macros and hopefully few prototypes,
7766     which can conflict with char $ac_func (); below.  */
7767 #include <assert.h>
7768 /* Override any gcc2 internal prototype to avoid an error.  */
7769 #ifdef __cplusplus
7770 extern "C"
7771 #endif
7772 /* We use char because int might match the return type of a gcc2
7773    builtin and then its argument prototype would still apply.  */
7774 char $ac_func ();
7775 char (*f) ();
7776
7777 int
7778 main (void)
7779 {
7780 /* The GNU C library defines this for functions which it implements
7781     to always fail with ENOSYS.  Some functions are actually named
7782     something starting with __ and the normal name is an alias.  */
7783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7784 choke me
7785 #else
7786 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7787 #endif
7788
7789   ;
7790   return 0;
7791 }
7792 _ACEOF
7793 rm -f conftest.$ac_objext conftest$ac_exeext
7794 if { (eval echo "$as_me:7794: \"$ac_link\"") >&5
7795   (eval $ac_link) 2>&5
7796   ac_status=$?
7797   echo "$as_me:7797: \$? = $ac_status" >&5
7798   (exit $ac_status); } &&
7799          { ac_try='test -s conftest$ac_exeext'
7800   { (eval echo "$as_me:7800: \"$ac_try\"") >&5
7801   (eval $ac_try) 2>&5
7802   ac_status=$?
7803   echo "$as_me:7803: \$? = $ac_status" >&5
7804   (exit $ac_status); }; }; then
7805   eval "$as_ac_var=yes"
7806 else
7807   echo "$as_me: failed program was:" >&5
7808 cat conftest.$ac_ext >&5
7809 eval "$as_ac_var=no"
7810 fi
7811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7812 fi
7813 echo "$as_me:7813: result: `eval echo '${'$as_ac_var'}'`" >&5
7814 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7815 if test `eval echo '${'$as_ac_var'}'` = yes; then
7816   cat >>confdefs.h <<EOF
7817 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7818 EOF
7819
7820 fi
7821 done
7822
7823 if test "$cross_compiling" = yes ; then
7824
7825 for ac_func in \
7826                 link \
7827                 symlink
7828 do
7829 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7830 echo "$as_me:7830: checking for $ac_func" >&5
7831 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7832 if eval "test \"\${$as_ac_var+set}\" = set"; then
7833   echo $ECHO_N "(cached) $ECHO_C" >&6
7834 else
7835   cat >conftest.$ac_ext <<_ACEOF
7836 #line 7836 "configure"
7837 #include "confdefs.h"
7838 /* System header to define __stub macros and hopefully few prototypes,
7839     which can conflict with char $ac_func (); below.  */
7840 #include <assert.h>
7841 /* Override any gcc2 internal prototype to avoid an error.  */
7842 #ifdef __cplusplus
7843 extern "C"
7844 #endif
7845 /* We use char because int might match the return type of a gcc2
7846    builtin and then its argument prototype would still apply.  */
7847 char $ac_func ();
7848 char (*f) ();
7849
7850 int
7851 main (void)
7852 {
7853 /* The GNU C library defines this for functions which it implements
7854     to always fail with ENOSYS.  Some functions are actually named
7855     something starting with __ and the normal name is an alias.  */
7856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7857 choke me
7858 #else
7859 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7860 #endif
7861
7862   ;
7863   return 0;
7864 }
7865 _ACEOF
7866 rm -f conftest.$ac_objext conftest$ac_exeext
7867 if { (eval echo "$as_me:7867: \"$ac_link\"") >&5
7868   (eval $ac_link) 2>&5
7869   ac_status=$?
7870   echo "$as_me:7870: \$? = $ac_status" >&5
7871   (exit $ac_status); } &&
7872          { ac_try='test -s conftest$ac_exeext'
7873   { (eval echo "$as_me:7873: \"$ac_try\"") >&5
7874   (eval $ac_try) 2>&5
7875   ac_status=$?
7876   echo "$as_me:7876: \$? = $ac_status" >&5
7877   (exit $ac_status); }; }; then
7878   eval "$as_ac_var=yes"
7879 else
7880   echo "$as_me: failed program was:" >&5
7881 cat conftest.$ac_ext >&5
7882 eval "$as_ac_var=no"
7883 fi
7884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7885 fi
7886 echo "$as_me:7886: result: `eval echo '${'$as_ac_var'}'`" >&5
7887 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7888 if test `eval echo '${'$as_ac_var'}'` = yes; then
7889   cat >>confdefs.h <<EOF
7890 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7891 EOF
7892
7893 fi
7894 done
7895
7896 else
7897         echo "$as_me:7897: checking if link/symlink functions work" >&5
7898 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7899 if test "${cf_cv_link_funcs+set}" = set; then
7900   echo $ECHO_N "(cached) $ECHO_C" >&6
7901 else
7902
7903                 cf_cv_link_funcs=
7904                 for cf_func in link symlink ; do
7905                         if test "$cross_compiling" = yes; then
7906
7907                         eval 'ac_cv_func_'$cf_func'=error'
7908 else
7909   cat >conftest.$ac_ext <<_ACEOF
7910 #line 7910 "configure"
7911 #include "confdefs.h"
7912
7913 #include <sys/types.h>
7914 #include <sys/stat.h>
7915 #ifdef HAVE_UNISTD_H
7916 #include <unistd.h>
7917 #endif
7918 int main(void)
7919 {
7920         int fail = 0;
7921         char *src = "config.log";
7922         char *dst = "conftest.chk";
7923         struct stat src_sb;
7924         struct stat dst_sb;
7925
7926         stat(src, &src_sb);
7927         fail = ($cf_func("config.log", "conftest.chk") < 0)
7928             || (stat(dst, &dst_sb) < 0)
7929             || (dst_sb.st_mtime != src_sb.st_mtime);
7930 #ifdef HAVE_UNLINK
7931         unlink(dst);
7932 #else
7933         remove(dst);
7934 #endif
7935         ${cf_cv_main_return:-return} (fail);
7936 }
7937
7938 _ACEOF
7939 rm -f conftest$ac_exeext
7940 if { (eval echo "$as_me:7940: \"$ac_link\"") >&5
7941   (eval $ac_link) 2>&5
7942   ac_status=$?
7943   echo "$as_me:7943: \$? = $ac_status" >&5
7944   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7945   { (eval echo "$as_me:7945: \"$ac_try\"") >&5
7946   (eval $ac_try) 2>&5
7947   ac_status=$?
7948   echo "$as_me:7948: \$? = $ac_status" >&5
7949   (exit $ac_status); }; }; then
7950
7951                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7952                         eval 'ac_cv_func_'$cf_func'=yes'
7953 else
7954   echo "$as_me: program exited with status $ac_status" >&5
7955 echo "$as_me: failed program was:" >&5
7956 cat conftest.$ac_ext >&5
7957
7958                         eval 'ac_cv_func_'$cf_func'=no'
7959 fi
7960 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7961 fi
7962                 done
7963                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7964
7965 fi
7966 echo "$as_me:7966: result: $cf_cv_link_funcs" >&5
7967 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7968         test "$ac_cv_func_link"    = yes &&
7969 cat >>confdefs.h <<\EOF
7970 #define HAVE_LINK 1
7971 EOF
7972
7973         test "$ac_cv_func_symlink" = yes &&
7974 cat >>confdefs.h <<\EOF
7975 #define HAVE_SYMLINK 1
7976 EOF
7977
7978 fi
7979
7980 with_links=no
7981 with_symlinks=no
7982
7983 # soft links (symbolic links) are useful for some systems where hard links do
7984 # not work, or to make it simpler to copy terminfo trees around.
7985 if test "x$ac_cv_func_symlink" = xyes ; then
7986         echo "$as_me:7986: checking if tic should use symbolic links" >&5
7987 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7988
7989 # Check whether --enable-symlinks or --disable-symlinks was given.
7990 if test "${enable_symlinks+set}" = set; then
7991   enableval="$enable_symlinks"
7992   with_symlinks=$enableval
7993 else
7994   with_symlinks=no
7995 fi;
7996         echo "$as_me:7996: result: $with_symlinks" >&5
7997 echo "${ECHO_T}$with_symlinks" >&6
7998 fi
7999
8000 # If we have hard links and did not choose to use soft links instead, there is
8001 # no reason to make this choice optional - use the hard links.
8002 if test "$with_symlinks" = no ; then
8003         echo "$as_me:8003: checking if tic should use hard links" >&5
8004 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8005         if test "x$ac_cv_func_link" = xyes ; then
8006                 with_links=yes
8007         else
8008                 with_links=no
8009         fi
8010         echo "$as_me:8010: result: $with_links" >&5
8011 echo "${ECHO_T}$with_links" >&6
8012 fi
8013
8014 test "x$with_links" = xyes &&
8015 cat >>confdefs.h <<\EOF
8016 #define USE_LINKS 1
8017 EOF
8018
8019 test "x$with_symlinks" = xyes &&
8020 cat >>confdefs.h <<\EOF
8021 #define USE_SYMLINKS 1
8022 EOF
8023
8024 ###   use option --enable-broken-linker to force on use of broken-linker support
8025 echo "$as_me:8025: checking if you want broken-linker support code" >&5
8026 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8027
8028 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8029 if test "${enable_broken_linker+set}" = set; then
8030   enableval="$enable_broken_linker"
8031   with_broken_linker=$enableval
8032 else
8033   with_broken_linker=${BROKEN_LINKER:-no}
8034 fi;
8035 echo "$as_me:8035: result: $with_broken_linker" >&5
8036 echo "${ECHO_T}$with_broken_linker" >&6
8037
8038 BROKEN_LINKER=0
8039 if test "x$with_broken_linker" = xyes ; then
8040
8041 cat >>confdefs.h <<\EOF
8042 #define BROKEN_LINKER 1
8043 EOF
8044
8045         BROKEN_LINKER=1
8046 elif test "$DFT_LWR_MODEL" = shared ; then
8047         case $cf_cv_system_name in
8048         (cygwin*)
8049
8050 cat >>confdefs.h <<\EOF
8051 #define BROKEN_LINKER 1
8052 EOF
8053
8054                 BROKEN_LINKER=1
8055                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8056
8057 echo "${as_me:-configure}:8057: testing cygwin linker is broken anyway ..." 1>&5
8058
8059                 ;;
8060         esac
8061 fi
8062
8063 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8064 echo "$as_me:8064: checking if tputs should process BSD-style prefix padding" >&5
8065 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8066
8067 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8068 if test "${enable_bsdpad+set}" = set; then
8069   enableval="$enable_bsdpad"
8070   with_bsdpad=$enableval
8071 else
8072   with_bsdpad=no
8073 fi;
8074 echo "$as_me:8074: result: $with_bsdpad" >&5
8075 echo "${ECHO_T}$with_bsdpad" >&6
8076 test "x$with_bsdpad" = xyes &&
8077 cat >>confdefs.h <<\EOF
8078 #define BSD_TPUTS 1
8079 EOF
8080
8081 ###   use option --enable-widec to turn on use of wide-character support
8082 NCURSES_CH_T=chtype
8083 NCURSES_LIBUTF8=0
8084
8085 NEED_WCHAR_H=0
8086 NCURSES_MBSTATE_T=0
8087 NCURSES_WCHAR_T=0
8088 NCURSES_WINT_T=0
8089
8090 # Check to define _XOPEN_SOURCE "automatically"
8091 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8092
8093 cf_XOPEN_SOURCE=500
8094 cf_POSIX_C_SOURCE=199506L
8095 cf_xopen_source=
8096
8097 case $host_os in
8098 (aix[4-7]*)
8099         cf_xopen_source="-D_ALL_SOURCE"
8100         ;;
8101 (msys)
8102         cf_XOPEN_SOURCE=600
8103         ;;
8104 (darwin[0-8].*)
8105         cf_xopen_source="-D_APPLE_C_SOURCE"
8106         ;;
8107 (darwin*)
8108         cf_xopen_source="-D_DARWIN_C_SOURCE"
8109         cf_XOPEN_SOURCE=
8110         ;;
8111 (freebsd*|dragonfly*)
8112         # 5.x headers associate
8113         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8114         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8115         cf_POSIX_C_SOURCE=200112L
8116         cf_XOPEN_SOURCE=600
8117         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8118         ;;
8119 (hpux11*)
8120         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8121         ;;
8122 (hpux*)
8123         cf_xopen_source="-D_HPUX_SOURCE"
8124         ;;
8125 (irix[56].*)
8126         cf_xopen_source="-D_SGI_SOURCE"
8127         cf_XOPEN_SOURCE=
8128         ;;
8129 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8130
8131 echo "$as_me:8131: checking if we must define _GNU_SOURCE" >&5
8132 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8133 if test "${cf_cv_gnu_source+set}" = set; then
8134   echo $ECHO_N "(cached) $ECHO_C" >&6
8135 else
8136
8137 cat >conftest.$ac_ext <<_ACEOF
8138 #line 8138 "configure"
8139 #include "confdefs.h"
8140 #include <sys/types.h>
8141 int
8142 main (void)
8143 {
8144
8145 #ifndef _XOPEN_SOURCE
8146 make an error
8147 #endif
8148   ;
8149   return 0;
8150 }
8151 _ACEOF
8152 rm -f conftest.$ac_objext
8153 if { (eval echo "$as_me:8153: \"$ac_compile\"") >&5
8154   (eval $ac_compile) 2>&5
8155   ac_status=$?
8156   echo "$as_me:8156: \$? = $ac_status" >&5
8157   (exit $ac_status); } &&
8158          { ac_try='test -s conftest.$ac_objext'
8159   { (eval echo "$as_me:8159: \"$ac_try\"") >&5
8160   (eval $ac_try) 2>&5
8161   ac_status=$?
8162   echo "$as_me:8162: \$? = $ac_status" >&5
8163   (exit $ac_status); }; }; then
8164   cf_cv_gnu_source=no
8165 else
8166   echo "$as_me: failed program was:" >&5
8167 cat conftest.$ac_ext >&5
8168 cf_save="$CPPFLAGS"
8169          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8170          cat >conftest.$ac_ext <<_ACEOF
8171 #line 8171 "configure"
8172 #include "confdefs.h"
8173 #include <sys/types.h>
8174 int
8175 main (void)
8176 {
8177
8178 #ifdef _XOPEN_SOURCE
8179 make an error
8180 #endif
8181   ;
8182   return 0;
8183 }
8184 _ACEOF
8185 rm -f conftest.$ac_objext
8186 if { (eval echo "$as_me:8186: \"$ac_compile\"") >&5
8187   (eval $ac_compile) 2>&5
8188   ac_status=$?
8189   echo "$as_me:8189: \$? = $ac_status" >&5
8190   (exit $ac_status); } &&
8191          { ac_try='test -s conftest.$ac_objext'
8192   { (eval echo "$as_me:8192: \"$ac_try\"") >&5
8193   (eval $ac_try) 2>&5
8194   ac_status=$?
8195   echo "$as_me:8195: \$? = $ac_status" >&5
8196   (exit $ac_status); }; }; then
8197   cf_cv_gnu_source=no
8198 else
8199   echo "$as_me: failed program was:" >&5
8200 cat conftest.$ac_ext >&5
8201 cf_cv_gnu_source=yes
8202 fi
8203 rm -f conftest.$ac_objext conftest.$ac_ext
8204         CPPFLAGS="$cf_save"
8205
8206 fi
8207 rm -f conftest.$ac_objext conftest.$ac_ext
8208
8209 fi
8210 echo "$as_me:8210: result: $cf_cv_gnu_source" >&5
8211 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8212
8213 if test "$cf_cv_gnu_source" = yes
8214 then
8215 echo "$as_me:8215: checking if we should also define _DEFAULT_SOURCE" >&5
8216 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8217 if test "${cf_cv_default_source+set}" = set; then
8218   echo $ECHO_N "(cached) $ECHO_C" >&6
8219 else
8220
8221 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8222         cat >conftest.$ac_ext <<_ACEOF
8223 #line 8223 "configure"
8224 #include "confdefs.h"
8225 #include <sys/types.h>
8226 int
8227 main (void)
8228 {
8229
8230 #ifdef _DEFAULT_SOURCE
8231 make an error
8232 #endif
8233   ;
8234   return 0;
8235 }
8236 _ACEOF
8237 rm -f conftest.$ac_objext
8238 if { (eval echo "$as_me:8238: \"$ac_compile\"") >&5
8239   (eval $ac_compile) 2>&5
8240   ac_status=$?
8241   echo "$as_me:8241: \$? = $ac_status" >&5
8242   (exit $ac_status); } &&
8243          { ac_try='test -s conftest.$ac_objext'
8244   { (eval echo "$as_me:8244: \"$ac_try\"") >&5
8245   (eval $ac_try) 2>&5
8246   ac_status=$?
8247   echo "$as_me:8247: \$? = $ac_status" >&5
8248   (exit $ac_status); }; }; then
8249   cf_cv_default_source=no
8250 else
8251   echo "$as_me: failed program was:" >&5
8252 cat conftest.$ac_ext >&5
8253 cf_cv_default_source=yes
8254 fi
8255 rm -f conftest.$ac_objext conftest.$ac_ext
8256
8257 fi
8258 echo "$as_me:8258: result: $cf_cv_default_source" >&5
8259 echo "${ECHO_T}$cf_cv_default_source" >&6
8260 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8261 fi
8262
8263         ;;
8264 (minix*)
8265         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8266         ;;
8267 (mirbsd*)
8268         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8269         cf_XOPEN_SOURCE=
8270
8271 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8272
8273 cf_save_CFLAGS="$CFLAGS"
8274 cf_save_CPPFLAGS="$CPPFLAGS"
8275
8276 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8277         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8278                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8279
8280 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8281         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8282                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8283
8284 echo "$as_me:8284: checking if we should define _POSIX_C_SOURCE" >&5
8285 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8286 if test "${cf_cv_posix_c_source+set}" = set; then
8287   echo $ECHO_N "(cached) $ECHO_C" >&6
8288 else
8289
8290 echo "${as_me:-configure}:8290: testing if the symbol is already defined go no further ..." 1>&5
8291
8292         cat >conftest.$ac_ext <<_ACEOF
8293 #line 8293 "configure"
8294 #include "confdefs.h"
8295 #include <sys/types.h>
8296 int
8297 main (void)
8298 {
8299
8300 #ifndef _POSIX_C_SOURCE
8301 make an error
8302 #endif
8303   ;
8304   return 0;
8305 }
8306 _ACEOF
8307 rm -f conftest.$ac_objext
8308 if { (eval echo "$as_me:8308: \"$ac_compile\"") >&5
8309   (eval $ac_compile) 2>&5
8310   ac_status=$?
8311   echo "$as_me:8311: \$? = $ac_status" >&5
8312   (exit $ac_status); } &&
8313          { ac_try='test -s conftest.$ac_objext'
8314   { (eval echo "$as_me:8314: \"$ac_try\"") >&5
8315   (eval $ac_try) 2>&5
8316   ac_status=$?
8317   echo "$as_me:8317: \$? = $ac_status" >&5
8318   (exit $ac_status); }; }; then
8319   cf_cv_posix_c_source=no
8320 else
8321   echo "$as_me: failed program was:" >&5
8322 cat conftest.$ac_ext >&5
8323 cf_want_posix_source=no
8324          case .$cf_POSIX_C_SOURCE in
8325          (.[12]??*)
8326                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8327                 ;;
8328          (.2)
8329                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8330                 cf_want_posix_source=yes
8331                 ;;
8332          (.*)
8333                 cf_want_posix_source=yes
8334                 ;;
8335          esac
8336          if test "$cf_want_posix_source" = yes ; then
8337                 cat >conftest.$ac_ext <<_ACEOF
8338 #line 8338 "configure"
8339 #include "confdefs.h"
8340 #include <sys/types.h>
8341 int
8342 main (void)
8343 {
8344
8345 #ifdef _POSIX_SOURCE
8346 make an error
8347 #endif
8348   ;
8349   return 0;
8350 }
8351 _ACEOF
8352 rm -f conftest.$ac_objext
8353 if { (eval echo "$as_me:8353: \"$ac_compile\"") >&5
8354   (eval $ac_compile) 2>&5
8355   ac_status=$?
8356   echo "$as_me:8356: \$? = $ac_status" >&5
8357   (exit $ac_status); } &&
8358          { ac_try='test -s conftest.$ac_objext'
8359   { (eval echo "$as_me:8359: \"$ac_try\"") >&5
8360   (eval $ac_try) 2>&5
8361   ac_status=$?
8362   echo "$as_me:8362: \$? = $ac_status" >&5
8363   (exit $ac_status); }; }; then
8364   :
8365 else
8366   echo "$as_me: failed program was:" >&5
8367 cat conftest.$ac_ext >&5
8368 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8369 fi
8370 rm -f conftest.$ac_objext conftest.$ac_ext
8371          fi
8372
8373 echo "${as_me:-configure}:8373: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8374
8375          CFLAGS="$cf_trim_CFLAGS"
8376          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8377
8378 echo "${as_me:-configure}:8378: testing if the second compile does not leave our definition intact error ..." 1>&5
8379
8380          cat >conftest.$ac_ext <<_ACEOF
8381 #line 8381 "configure"
8382 #include "confdefs.h"
8383 #include <sys/types.h>
8384 int
8385 main (void)
8386 {
8387
8388 #ifndef _POSIX_C_SOURCE
8389 make an error
8390 #endif
8391   ;
8392   return 0;
8393 }
8394 _ACEOF
8395 rm -f conftest.$ac_objext
8396 if { (eval echo "$as_me:8396: \"$ac_compile\"") >&5
8397   (eval $ac_compile) 2>&5
8398   ac_status=$?
8399   echo "$as_me:8399: \$? = $ac_status" >&5
8400   (exit $ac_status); } &&
8401          { ac_try='test -s conftest.$ac_objext'
8402   { (eval echo "$as_me:8402: \"$ac_try\"") >&5
8403   (eval $ac_try) 2>&5
8404   ac_status=$?
8405   echo "$as_me:8405: \$? = $ac_status" >&5
8406   (exit $ac_status); }; }; then
8407   :
8408 else
8409   echo "$as_me: failed program was:" >&5
8410 cat conftest.$ac_ext >&5
8411 cf_cv_posix_c_source=no
8412 fi
8413 rm -f conftest.$ac_objext conftest.$ac_ext
8414          CFLAGS="$cf_save_CFLAGS"
8415          CPPFLAGS="$cf_save_CPPFLAGS"
8416
8417 fi
8418 rm -f conftest.$ac_objext conftest.$ac_ext
8419
8420 fi
8421 echo "$as_me:8421: result: $cf_cv_posix_c_source" >&5
8422 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8423
8424 if test "$cf_cv_posix_c_source" != no ; then
8425         CFLAGS="$cf_trim_CFLAGS"
8426         CPPFLAGS="$cf_trim_CPPFLAGS"
8427
8428 cf_fix_cppflags=no
8429 cf_new_cflags=
8430 cf_new_cppflags=
8431 cf_new_extra_cppflags=
8432
8433 for cf_add_cflags in $cf_cv_posix_c_source
8434 do
8435 case $cf_fix_cppflags in
8436 (no)
8437         case $cf_add_cflags in
8438         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8439                 case $cf_add_cflags in
8440                 (-D*)
8441                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8442
8443                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8444                                 && test -z "${cf_tst_cflags}" \
8445                                 && cf_fix_cppflags=yes
8446
8447                         if test $cf_fix_cppflags = yes ; then
8448
8449         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8450         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8451
8452                                 continue
8453                         elif test "${cf_tst_cflags}" = "\"'" ; then
8454
8455         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8456         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8457
8458                                 continue
8459                         fi
8460                         ;;
8461                 esac
8462                 case "$CPPFLAGS" in
8463                 (*$cf_add_cflags)
8464                         ;;
8465                 (*)
8466                         case $cf_add_cflags in
8467                         (-D*)
8468                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8469
8470 CPPFLAGS=`echo "$CPPFLAGS" | \
8471         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8472                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8473
8474                                 ;;
8475                         esac
8476
8477         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8478         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8479
8480                         ;;
8481                 esac
8482                 ;;
8483         (*)
8484
8485         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8486         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8487
8488                 ;;
8489         esac
8490         ;;
8491 (yes)
8492
8493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8495
8496         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8497
8498         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8499                 && test -z "${cf_tst_cflags}" \
8500                 && cf_fix_cppflags=no
8501         ;;
8502 esac
8503 done
8504
8505 if test -n "$cf_new_cflags" ; then
8506
8507         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8508         CFLAGS="${CFLAGS}$cf_new_cflags"
8509
8510 fi
8511
8512 if test -n "$cf_new_cppflags" ; then
8513
8514         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8515         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8516
8517 fi
8518
8519 if test -n "$cf_new_extra_cppflags" ; then
8520
8521         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8522         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8523
8524 fi
8525
8526 fi
8527
8528         ;;
8529 (netbsd*)
8530         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8531         ;;
8532 (openbsd[4-9]*)
8533         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8534         cf_xopen_source="-D_BSD_SOURCE"
8535         cf_XOPEN_SOURCE=600
8536         ;;
8537 (openbsd*)
8538         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8539         ;;
8540 (osf[45]*)
8541         cf_xopen_source="-D_OSF_SOURCE"
8542         ;;
8543 (nto-qnx*)
8544         cf_xopen_source="-D_QNX_SOURCE"
8545         ;;
8546 (sco*)
8547         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8548         ;;
8549 (solaris2.*)
8550         cf_xopen_source="-D__EXTENSIONS__"
8551         cf_cv_xopen_source=broken
8552         ;;
8553 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8554         cf_XOPEN_SOURCE=
8555         cf_POSIX_C_SOURCE=
8556         ;;
8557 (*)
8558
8559 echo "$as_me:8559: checking if we should define _XOPEN_SOURCE" >&5
8560 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8561 if test "${cf_cv_xopen_source+set}" = set; then
8562   echo $ECHO_N "(cached) $ECHO_C" >&6
8563 else
8564
8565         cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568
8569 #include <stdlib.h>
8570 #include <string.h>
8571 #include <sys/types.h>
8572
8573 int
8574 main (void)
8575 {
8576
8577 #ifndef _XOPEN_SOURCE
8578 make an error
8579 #endif
8580   ;
8581   return 0;
8582 }
8583 _ACEOF
8584 rm -f conftest.$ac_objext
8585 if { (eval echo "$as_me:8585: \"$ac_compile\"") >&5
8586   (eval $ac_compile) 2>&5
8587   ac_status=$?
8588   echo "$as_me:8588: \$? = $ac_status" >&5
8589   (exit $ac_status); } &&
8590          { ac_try='test -s conftest.$ac_objext'
8591   { (eval echo "$as_me:8591: \"$ac_try\"") >&5
8592   (eval $ac_try) 2>&5
8593   ac_status=$?
8594   echo "$as_me:8594: \$? = $ac_status" >&5
8595   (exit $ac_status); }; }; then
8596   cf_cv_xopen_source=no
8597 else
8598   echo "$as_me: failed program was:" >&5
8599 cat conftest.$ac_ext >&5
8600 cf_save="$CPPFLAGS"
8601          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8602          cat >conftest.$ac_ext <<_ACEOF
8603 #line 8603 "configure"
8604 #include "confdefs.h"
8605
8606 #include <stdlib.h>
8607 #include <string.h>
8608 #include <sys/types.h>
8609
8610 int
8611 main (void)
8612 {
8613
8614 #ifdef _XOPEN_SOURCE
8615 make an error
8616 #endif
8617   ;
8618   return 0;
8619 }
8620 _ACEOF
8621 rm -f conftest.$ac_objext
8622 if { (eval echo "$as_me:8622: \"$ac_compile\"") >&5
8623   (eval $ac_compile) 2>&5
8624   ac_status=$?
8625   echo "$as_me:8625: \$? = $ac_status" >&5
8626   (exit $ac_status); } &&
8627          { ac_try='test -s conftest.$ac_objext'
8628   { (eval echo "$as_me:8628: \"$ac_try\"") >&5
8629   (eval $ac_try) 2>&5
8630   ac_status=$?
8631   echo "$as_me:8631: \$? = $ac_status" >&5
8632   (exit $ac_status); }; }; then
8633   cf_cv_xopen_source=no
8634 else
8635   echo "$as_me: failed program was:" >&5
8636 cat conftest.$ac_ext >&5
8637 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8638 fi
8639 rm -f conftest.$ac_objext conftest.$ac_ext
8640         CPPFLAGS="$cf_save"
8641
8642 fi
8643 rm -f conftest.$ac_objext conftest.$ac_ext
8644
8645 fi
8646 echo "$as_me:8646: result: $cf_cv_xopen_source" >&5
8647 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8648
8649 if test "$cf_cv_xopen_source" != no ; then
8650
8651 CFLAGS=`echo "$CFLAGS" | \
8652         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8653                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8654
8655 CPPFLAGS=`echo "$CPPFLAGS" | \
8656         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8657                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8658
8659         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8660
8661 cf_fix_cppflags=no
8662 cf_new_cflags=
8663 cf_new_cppflags=
8664 cf_new_extra_cppflags=
8665
8666 for cf_add_cflags in $cf_temp_xopen_source
8667 do
8668 case $cf_fix_cppflags in
8669 (no)
8670         case $cf_add_cflags in
8671         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8672                 case $cf_add_cflags in
8673                 (-D*)
8674                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8675
8676                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8677                                 && test -z "${cf_tst_cflags}" \
8678                                 && cf_fix_cppflags=yes
8679
8680                         if test $cf_fix_cppflags = yes ; then
8681
8682         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8683         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8684
8685                                 continue
8686                         elif test "${cf_tst_cflags}" = "\"'" ; then
8687
8688         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8689         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8690
8691                                 continue
8692                         fi
8693                         ;;
8694                 esac
8695                 case "$CPPFLAGS" in
8696                 (*$cf_add_cflags)
8697                         ;;
8698                 (*)
8699                         case $cf_add_cflags in
8700                         (-D*)
8701                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8702
8703 CPPFLAGS=`echo "$CPPFLAGS" | \
8704         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8705                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8706
8707                                 ;;
8708                         esac
8709
8710         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8711         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8712
8713                         ;;
8714                 esac
8715                 ;;
8716         (*)
8717
8718         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8719         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8720
8721                 ;;
8722         esac
8723         ;;
8724 (yes)
8725
8726         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8727         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8728
8729         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8730
8731         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8732                 && test -z "${cf_tst_cflags}" \
8733                 && cf_fix_cppflags=no
8734         ;;
8735 esac
8736 done
8737
8738 if test -n "$cf_new_cflags" ; then
8739
8740         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8741         CFLAGS="${CFLAGS}$cf_new_cflags"
8742
8743 fi
8744
8745 if test -n "$cf_new_cppflags" ; then
8746
8747         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8748         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8749
8750 fi
8751
8752 if test -n "$cf_new_extra_cppflags" ; then
8753
8754         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8755         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8756
8757 fi
8758
8759 fi
8760
8761 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8762
8763 cf_save_CFLAGS="$CFLAGS"
8764 cf_save_CPPFLAGS="$CPPFLAGS"
8765
8766 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8767         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8768                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8769
8770 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8771         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8772                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8773
8774 echo "$as_me:8774: checking if we should define _POSIX_C_SOURCE" >&5
8775 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8776 if test "${cf_cv_posix_c_source+set}" = set; then
8777   echo $ECHO_N "(cached) $ECHO_C" >&6
8778 else
8779
8780 echo "${as_me:-configure}:8780: testing if the symbol is already defined go no further ..." 1>&5
8781
8782         cat >conftest.$ac_ext <<_ACEOF
8783 #line 8783 "configure"
8784 #include "confdefs.h"
8785 #include <sys/types.h>
8786 int
8787 main (void)
8788 {
8789
8790 #ifndef _POSIX_C_SOURCE
8791 make an error
8792 #endif
8793   ;
8794   return 0;
8795 }
8796 _ACEOF
8797 rm -f conftest.$ac_objext
8798 if { (eval echo "$as_me:8798: \"$ac_compile\"") >&5
8799   (eval $ac_compile) 2>&5
8800   ac_status=$?
8801   echo "$as_me:8801: \$? = $ac_status" >&5
8802   (exit $ac_status); } &&
8803          { ac_try='test -s conftest.$ac_objext'
8804   { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8805   (eval $ac_try) 2>&5
8806   ac_status=$?
8807   echo "$as_me:8807: \$? = $ac_status" >&5
8808   (exit $ac_status); }; }; then
8809   cf_cv_posix_c_source=no
8810 else
8811   echo "$as_me: failed program was:" >&5
8812 cat conftest.$ac_ext >&5
8813 cf_want_posix_source=no
8814          case .$cf_POSIX_C_SOURCE in
8815          (.[12]??*)
8816                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8817                 ;;
8818          (.2)
8819                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8820                 cf_want_posix_source=yes
8821                 ;;
8822          (.*)
8823                 cf_want_posix_source=yes
8824                 ;;
8825          esac
8826          if test "$cf_want_posix_source" = yes ; then
8827                 cat >conftest.$ac_ext <<_ACEOF
8828 #line 8828 "configure"
8829 #include "confdefs.h"
8830 #include <sys/types.h>
8831 int
8832 main (void)
8833 {
8834
8835 #ifdef _POSIX_SOURCE
8836 make an error
8837 #endif
8838   ;
8839   return 0;
8840 }
8841 _ACEOF
8842 rm -f conftest.$ac_objext
8843 if { (eval echo "$as_me:8843: \"$ac_compile\"") >&5
8844   (eval $ac_compile) 2>&5
8845   ac_status=$?
8846   echo "$as_me:8846: \$? = $ac_status" >&5
8847   (exit $ac_status); } &&
8848          { ac_try='test -s conftest.$ac_objext'
8849   { (eval echo "$as_me:8849: \"$ac_try\"") >&5
8850   (eval $ac_try) 2>&5
8851   ac_status=$?
8852   echo "$as_me:8852: \$? = $ac_status" >&5
8853   (exit $ac_status); }; }; then
8854   :
8855 else
8856   echo "$as_me: failed program was:" >&5
8857 cat conftest.$ac_ext >&5
8858 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8859 fi
8860 rm -f conftest.$ac_objext conftest.$ac_ext
8861          fi
8862
8863 echo "${as_me:-configure}:8863: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8864
8865          CFLAGS="$cf_trim_CFLAGS"
8866          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8867
8868 echo "${as_me:-configure}:8868: testing if the second compile does not leave our definition intact error ..." 1>&5
8869
8870          cat >conftest.$ac_ext <<_ACEOF
8871 #line 8871 "configure"
8872 #include "confdefs.h"
8873 #include <sys/types.h>
8874 int
8875 main (void)
8876 {
8877
8878 #ifndef _POSIX_C_SOURCE
8879 make an error
8880 #endif
8881   ;
8882   return 0;
8883 }
8884 _ACEOF
8885 rm -f conftest.$ac_objext
8886 if { (eval echo "$as_me:8886: \"$ac_compile\"") >&5
8887   (eval $ac_compile) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); } &&
8891          { ac_try='test -s conftest.$ac_objext'
8892   { (eval echo "$as_me:8892: \"$ac_try\"") >&5
8893   (eval $ac_try) 2>&5
8894   ac_status=$?
8895   echo "$as_me:8895: \$? = $ac_status" >&5
8896   (exit $ac_status); }; }; then
8897   :
8898 else
8899   echo "$as_me: failed program was:" >&5
8900 cat conftest.$ac_ext >&5
8901 cf_cv_posix_c_source=no
8902 fi
8903 rm -f conftest.$ac_objext conftest.$ac_ext
8904          CFLAGS="$cf_save_CFLAGS"
8905          CPPFLAGS="$cf_save_CPPFLAGS"
8906
8907 fi
8908 rm -f conftest.$ac_objext conftest.$ac_ext
8909
8910 fi
8911 echo "$as_me:8911: result: $cf_cv_posix_c_source" >&5
8912 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8913
8914 if test "$cf_cv_posix_c_source" != no ; then
8915         CFLAGS="$cf_trim_CFLAGS"
8916         CPPFLAGS="$cf_trim_CPPFLAGS"
8917
8918 cf_fix_cppflags=no
8919 cf_new_cflags=
8920 cf_new_cppflags=
8921 cf_new_extra_cppflags=
8922
8923 for cf_add_cflags in $cf_cv_posix_c_source
8924 do
8925 case $cf_fix_cppflags in
8926 (no)
8927         case $cf_add_cflags in
8928         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8929                 case $cf_add_cflags in
8930                 (-D*)
8931                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8932
8933                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8934                                 && test -z "${cf_tst_cflags}" \
8935                                 && cf_fix_cppflags=yes
8936
8937                         if test $cf_fix_cppflags = yes ; then
8938
8939         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8940         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8941
8942                                 continue
8943                         elif test "${cf_tst_cflags}" = "\"'" ; then
8944
8945         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8946         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8947
8948                                 continue
8949                         fi
8950                         ;;
8951                 esac
8952                 case "$CPPFLAGS" in
8953                 (*$cf_add_cflags)
8954                         ;;
8955                 (*)
8956                         case $cf_add_cflags in
8957                         (-D*)
8958                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8959
8960 CPPFLAGS=`echo "$CPPFLAGS" | \
8961         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8962                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8963
8964                                 ;;
8965                         esac
8966
8967         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8968         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8969
8970                         ;;
8971                 esac
8972                 ;;
8973         (*)
8974
8975         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8976         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8977
8978                 ;;
8979         esac
8980         ;;
8981 (yes)
8982
8983         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8984         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8985
8986         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8987
8988         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8989                 && test -z "${cf_tst_cflags}" \
8990                 && cf_fix_cppflags=no
8991         ;;
8992 esac
8993 done
8994
8995 if test -n "$cf_new_cflags" ; then
8996
8997         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8998         CFLAGS="${CFLAGS}$cf_new_cflags"
8999
9000 fi
9001
9002 if test -n "$cf_new_cppflags" ; then
9003
9004         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9005         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9006
9007 fi
9008
9009 if test -n "$cf_new_extra_cppflags" ; then
9010
9011         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9012         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9013
9014 fi
9015
9016 fi
9017
9018         ;;
9019 esac
9020
9021 if test -n "$cf_xopen_source" ; then
9022
9023 cf_fix_cppflags=no
9024 cf_new_cflags=
9025 cf_new_cppflags=
9026 cf_new_extra_cppflags=
9027
9028 for cf_add_cflags in $cf_xopen_source
9029 do
9030 case $cf_fix_cppflags in
9031 (no)
9032         case $cf_add_cflags in
9033         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9034                 case $cf_add_cflags in
9035                 (-D*)
9036                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9037
9038                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9039                                 && test -z "${cf_tst_cflags}" \
9040                                 && cf_fix_cppflags=yes
9041
9042                         if test $cf_fix_cppflags = yes ; then
9043
9044         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9045         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9046
9047                                 continue
9048                         elif test "${cf_tst_cflags}" = "\"'" ; then
9049
9050         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9051         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9052
9053                                 continue
9054                         fi
9055                         ;;
9056                 esac
9057                 case "$CPPFLAGS" in
9058                 (*$cf_add_cflags)
9059                         ;;
9060                 (*)
9061                         case $cf_add_cflags in
9062                         (-D*)
9063                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9064
9065 CPPFLAGS=`echo "$CPPFLAGS" | \
9066         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9067                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9068
9069                                 ;;
9070                         esac
9071
9072         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9073         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9074
9075                         ;;
9076                 esac
9077                 ;;
9078         (*)
9079
9080         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9081         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9082
9083                 ;;
9084         esac
9085         ;;
9086 (yes)
9087
9088         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9089         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9090
9091         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9092
9093         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9094                 && test -z "${cf_tst_cflags}" \
9095                 && cf_fix_cppflags=no
9096         ;;
9097 esac
9098 done
9099
9100 if test -n "$cf_new_cflags" ; then
9101         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9102
9103 echo "${as_me:-configure}:9103: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9104
9105         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9106         CFLAGS="${CFLAGS}$cf_new_cflags"
9107
9108 fi
9109
9110 if test -n "$cf_new_cppflags" ; then
9111         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9112
9113 echo "${as_me:-configure}:9113: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9114
9115         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9116         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9117
9118 fi
9119
9120 if test -n "$cf_new_extra_cppflags" ; then
9121         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9122
9123 echo "${as_me:-configure}:9123: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9124
9125         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9126         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9127
9128 fi
9129
9130 fi
9131
9132 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9133         echo "$as_me:9133: checking if _XOPEN_SOURCE really is set" >&5
9134 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9135         cat >conftest.$ac_ext <<_ACEOF
9136 #line 9136 "configure"
9137 #include "confdefs.h"
9138 #include <stdlib.h>
9139 int
9140 main (void)
9141 {
9142
9143 #ifndef _XOPEN_SOURCE
9144 make an error
9145 #endif
9146   ;
9147   return 0;
9148 }
9149 _ACEOF
9150 rm -f conftest.$ac_objext
9151 if { (eval echo "$as_me:9151: \"$ac_compile\"") >&5
9152   (eval $ac_compile) 2>&5
9153   ac_status=$?
9154   echo "$as_me:9154: \$? = $ac_status" >&5
9155   (exit $ac_status); } &&
9156          { ac_try='test -s conftest.$ac_objext'
9157   { (eval echo "$as_me:9157: \"$ac_try\"") >&5
9158   (eval $ac_try) 2>&5
9159   ac_status=$?
9160   echo "$as_me:9160: \$? = $ac_status" >&5
9161   (exit $ac_status); }; }; then
9162   cf_XOPEN_SOURCE_set=yes
9163 else
9164   echo "$as_me: failed program was:" >&5
9165 cat conftest.$ac_ext >&5
9166 cf_XOPEN_SOURCE_set=no
9167 fi
9168 rm -f conftest.$ac_objext conftest.$ac_ext
9169         echo "$as_me:9169: result: $cf_XOPEN_SOURCE_set" >&5
9170 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9171         if test $cf_XOPEN_SOURCE_set = yes
9172         then
9173                 cat >conftest.$ac_ext <<_ACEOF
9174 #line 9174 "configure"
9175 #include "confdefs.h"
9176 #include <stdlib.h>
9177 int
9178 main (void)
9179 {
9180
9181 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9182 make an error
9183 #endif
9184   ;
9185   return 0;
9186 }
9187 _ACEOF
9188 rm -f conftest.$ac_objext
9189 if { (eval echo "$as_me:9189: \"$ac_compile\"") >&5
9190   (eval $ac_compile) 2>&5
9191   ac_status=$?
9192   echo "$as_me:9192: \$? = $ac_status" >&5
9193   (exit $ac_status); } &&
9194          { ac_try='test -s conftest.$ac_objext'
9195   { (eval echo "$as_me:9195: \"$ac_try\"") >&5
9196   (eval $ac_try) 2>&5
9197   ac_status=$?
9198   echo "$as_me:9198: \$? = $ac_status" >&5
9199   (exit $ac_status); }; }; then
9200   cf_XOPEN_SOURCE_set_ok=yes
9201 else
9202   echo "$as_me: failed program was:" >&5
9203 cat conftest.$ac_ext >&5
9204 cf_XOPEN_SOURCE_set_ok=no
9205 fi
9206 rm -f conftest.$ac_objext conftest.$ac_ext
9207                 if test $cf_XOPEN_SOURCE_set_ok = no
9208                 then
9209                         { echo "$as_me:9209: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9210 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9211                 fi
9212         else
9213
9214 echo "$as_me:9214: checking if we should define _XOPEN_SOURCE" >&5
9215 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9216 if test "${cf_cv_xopen_source+set}" = set; then
9217   echo $ECHO_N "(cached) $ECHO_C" >&6
9218 else
9219
9220         cat >conftest.$ac_ext <<_ACEOF
9221 #line 9221 "configure"
9222 #include "confdefs.h"
9223
9224 #include <stdlib.h>
9225 #include <string.h>
9226 #include <sys/types.h>
9227
9228 int
9229 main (void)
9230 {
9231
9232 #ifndef _XOPEN_SOURCE
9233 make an error
9234 #endif
9235   ;
9236   return 0;
9237 }
9238 _ACEOF
9239 rm -f conftest.$ac_objext
9240 if { (eval echo "$as_me:9240: \"$ac_compile\"") >&5
9241   (eval $ac_compile) 2>&5
9242   ac_status=$?
9243   echo "$as_me:9243: \$? = $ac_status" >&5
9244   (exit $ac_status); } &&
9245          { ac_try='test -s conftest.$ac_objext'
9246   { (eval echo "$as_me:9246: \"$ac_try\"") >&5
9247   (eval $ac_try) 2>&5
9248   ac_status=$?
9249   echo "$as_me:9249: \$? = $ac_status" >&5
9250   (exit $ac_status); }; }; then
9251   cf_cv_xopen_source=no
9252 else
9253   echo "$as_me: failed program was:" >&5
9254 cat conftest.$ac_ext >&5
9255 cf_save="$CPPFLAGS"
9256          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9257          cat >conftest.$ac_ext <<_ACEOF
9258 #line 9258 "configure"
9259 #include "confdefs.h"
9260
9261 #include <stdlib.h>
9262 #include <string.h>
9263 #include <sys/types.h>
9264
9265 int
9266 main (void)
9267 {
9268
9269 #ifdef _XOPEN_SOURCE
9270 make an error
9271 #endif
9272   ;
9273   return 0;
9274 }
9275 _ACEOF
9276 rm -f conftest.$ac_objext
9277 if { (eval echo "$as_me:9277: \"$ac_compile\"") >&5
9278   (eval $ac_compile) 2>&5
9279   ac_status=$?
9280   echo "$as_me:9280: \$? = $ac_status" >&5
9281   (exit $ac_status); } &&
9282          { ac_try='test -s conftest.$ac_objext'
9283   { (eval echo "$as_me:9283: \"$ac_try\"") >&5
9284   (eval $ac_try) 2>&5
9285   ac_status=$?
9286   echo "$as_me:9286: \$? = $ac_status" >&5
9287   (exit $ac_status); }; }; then
9288   cf_cv_xopen_source=no
9289 else
9290   echo "$as_me: failed program was:" >&5
9291 cat conftest.$ac_ext >&5
9292 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9293 fi
9294 rm -f conftest.$ac_objext conftest.$ac_ext
9295         CPPFLAGS="$cf_save"
9296
9297 fi
9298 rm -f conftest.$ac_objext conftest.$ac_ext
9299
9300 fi
9301 echo "$as_me:9301: result: $cf_cv_xopen_source" >&5
9302 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9303
9304 if test "$cf_cv_xopen_source" != no ; then
9305
9306 CFLAGS=`echo "$CFLAGS" | \
9307         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9308                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9309
9310 CPPFLAGS=`echo "$CPPFLAGS" | \
9311         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9312                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9313
9314         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9315
9316 cf_fix_cppflags=no
9317 cf_new_cflags=
9318 cf_new_cppflags=
9319 cf_new_extra_cppflags=
9320
9321 for cf_add_cflags in $cf_temp_xopen_source
9322 do
9323 case $cf_fix_cppflags in
9324 (no)
9325         case $cf_add_cflags in
9326         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9327                 case $cf_add_cflags in
9328                 (-D*)
9329                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9330
9331                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9332                                 && test -z "${cf_tst_cflags}" \
9333                                 && cf_fix_cppflags=yes
9334
9335                         if test $cf_fix_cppflags = yes ; then
9336
9337         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9338         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9339
9340                                 continue
9341                         elif test "${cf_tst_cflags}" = "\"'" ; then
9342
9343         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9344         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9345
9346                                 continue
9347                         fi
9348                         ;;
9349                 esac
9350                 case "$CPPFLAGS" in
9351                 (*$cf_add_cflags)
9352                         ;;
9353                 (*)
9354                         case $cf_add_cflags in
9355                         (-D*)
9356                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9357
9358 CPPFLAGS=`echo "$CPPFLAGS" | \
9359         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9360                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9361
9362                                 ;;
9363                         esac
9364
9365         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9366         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9367
9368                         ;;
9369                 esac
9370                 ;;
9371         (*)
9372
9373         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9374         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9375
9376                 ;;
9377         esac
9378         ;;
9379 (yes)
9380
9381         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9382         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9383
9384         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9385
9386         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9387                 && test -z "${cf_tst_cflags}" \
9388                 && cf_fix_cppflags=no
9389         ;;
9390 esac
9391 done
9392
9393 if test -n "$cf_new_cflags" ; then
9394
9395         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9396         CFLAGS="${CFLAGS}$cf_new_cflags"
9397
9398 fi
9399
9400 if test -n "$cf_new_cppflags" ; then
9401
9402         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9403         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9404
9405 fi
9406
9407 if test -n "$cf_new_extra_cppflags" ; then
9408
9409         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9410         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9411
9412 fi
9413
9414 fi
9415
9416         fi
9417 fi
9418
9419 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9420
9421 # Work around breakage on OS X
9422
9423 echo "$as_me:9423: checking if SIGWINCH is defined" >&5
9424 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9425 if test "${cf_cv_define_sigwinch+set}" = set; then
9426   echo $ECHO_N "(cached) $ECHO_C" >&6
9427 else
9428
9429         cat >conftest.$ac_ext <<_ACEOF
9430 #line 9430 "configure"
9431 #include "confdefs.h"
9432
9433 #include <sys/types.h>
9434 #include <sys/signal.h>
9435
9436 int
9437 main (void)
9438 {
9439 int x = SIGWINCH
9440   ;
9441   return 0;
9442 }
9443 _ACEOF
9444 rm -f conftest.$ac_objext
9445 if { (eval echo "$as_me:9445: \"$ac_compile\"") >&5
9446   (eval $ac_compile) 2>&5
9447   ac_status=$?
9448   echo "$as_me:9448: \$? = $ac_status" >&5
9449   (exit $ac_status); } &&
9450          { ac_try='test -s conftest.$ac_objext'
9451   { (eval echo "$as_me:9451: \"$ac_try\"") >&5
9452   (eval $ac_try) 2>&5
9453   ac_status=$?
9454   echo "$as_me:9454: \$? = $ac_status" >&5
9455   (exit $ac_status); }; }; then
9456   cf_cv_define_sigwinch=yes
9457 else
9458   echo "$as_me: failed program was:" >&5
9459 cat conftest.$ac_ext >&5
9460 cat >conftest.$ac_ext <<_ACEOF
9461 #line 9461 "configure"
9462 #include "confdefs.h"
9463
9464 #undef _XOPEN_SOURCE
9465 #undef _POSIX_SOURCE
9466 #undef _POSIX_C_SOURCE
9467 #include <sys/types.h>
9468 #include <sys/signal.h>
9469
9470 int
9471 main (void)
9472 {
9473 int x = SIGWINCH
9474   ;
9475   return 0;
9476 }
9477 _ACEOF
9478 rm -f conftest.$ac_objext
9479 if { (eval echo "$as_me:9479: \"$ac_compile\"") >&5
9480   (eval $ac_compile) 2>&5
9481   ac_status=$?
9482   echo "$as_me:9482: \$? = $ac_status" >&5
9483   (exit $ac_status); } &&
9484          { ac_try='test -s conftest.$ac_objext'
9485   { (eval echo "$as_me:9485: \"$ac_try\"") >&5
9486   (eval $ac_try) 2>&5
9487   ac_status=$?
9488   echo "$as_me:9488: \$? = $ac_status" >&5
9489   (exit $ac_status); }; }; then
9490   cf_cv_define_sigwinch=maybe
9491 else
9492   echo "$as_me: failed program was:" >&5
9493 cat conftest.$ac_ext >&5
9494 cf_cv_define_sigwinch=no
9495 fi
9496 rm -f conftest.$ac_objext conftest.$ac_ext
9497
9498 fi
9499 rm -f conftest.$ac_objext conftest.$ac_ext
9500
9501 fi
9502 echo "$as_me:9502: result: $cf_cv_define_sigwinch" >&5
9503 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9504
9505 if test "$cf_cv_define_sigwinch" = maybe ; then
9506 echo "$as_me:9506: checking for actual SIGWINCH definition" >&5
9507 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9508 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9509   echo $ECHO_N "(cached) $ECHO_C" >&6
9510 else
9511
9512 cf_cv_fixup_sigwinch=unknown
9513 cf_sigwinch=32
9514 while test $cf_sigwinch != 1
9515 do
9516         cat >conftest.$ac_ext <<_ACEOF
9517 #line 9517 "configure"
9518 #include "confdefs.h"
9519
9520 #undef _XOPEN_SOURCE
9521 #undef _POSIX_SOURCE
9522 #undef _POSIX_C_SOURCE
9523 #include <sys/types.h>
9524 #include <sys/signal.h>
9525
9526 int
9527 main (void)
9528 {
9529
9530 #if SIGWINCH != $cf_sigwinch
9531 make an error
9532 #endif
9533 int x = SIGWINCH
9534   ;
9535   return 0;
9536 }
9537 _ACEOF
9538 rm -f conftest.$ac_objext
9539 if { (eval echo "$as_me:9539: \"$ac_compile\"") >&5
9540   (eval $ac_compile) 2>&5
9541   ac_status=$?
9542   echo "$as_me:9542: \$? = $ac_status" >&5
9543   (exit $ac_status); } &&
9544          { ac_try='test -s conftest.$ac_objext'
9545   { (eval echo "$as_me:9545: \"$ac_try\"") >&5
9546   (eval $ac_try) 2>&5
9547   ac_status=$?
9548   echo "$as_me:9548: \$? = $ac_status" >&5
9549   (exit $ac_status); }; }; then
9550   cf_cv_fixup_sigwinch=$cf_sigwinch
9551          break
9552 else
9553   echo "$as_me: failed program was:" >&5
9554 cat conftest.$ac_ext >&5
9555 fi
9556 rm -f conftest.$ac_objext conftest.$ac_ext
9557
9558 cf_sigwinch=`expr $cf_sigwinch - 1`
9559 done
9560
9561 fi
9562 echo "$as_me:9562: result: $cf_cv_fixup_sigwinch" >&5
9563 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9564
9565         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9566                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9567         fi
9568 fi
9569
9570 # Checks for CODESET support.
9571
9572 echo "$as_me:9572: checking for nl_langinfo and CODESET" >&5
9573 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9574 if test "${am_cv_langinfo_codeset+set}" = set; then
9575   echo $ECHO_N "(cached) $ECHO_C" >&6
9576 else
9577   cat >conftest.$ac_ext <<_ACEOF
9578 #line 9578 "configure"
9579 #include "confdefs.h"
9580 #include <langinfo.h>
9581 int
9582 main (void)
9583 {
9584 char* cs = nl_langinfo(CODESET);
9585   ;
9586   return 0;
9587 }
9588 _ACEOF
9589 rm -f conftest.$ac_objext conftest$ac_exeext
9590 if { (eval echo "$as_me:9590: \"$ac_link\"") >&5
9591   (eval $ac_link) 2>&5
9592   ac_status=$?
9593   echo "$as_me:9593: \$? = $ac_status" >&5
9594   (exit $ac_status); } &&
9595          { ac_try='test -s conftest$ac_exeext'
9596   { (eval echo "$as_me:9596: \"$ac_try\"") >&5
9597   (eval $ac_try) 2>&5
9598   ac_status=$?
9599   echo "$as_me:9599: \$? = $ac_status" >&5
9600   (exit $ac_status); }; }; then
9601   am_cv_langinfo_codeset=yes
9602 else
9603   echo "$as_me: failed program was:" >&5
9604 cat conftest.$ac_ext >&5
9605 am_cv_langinfo_codeset=no
9606 fi
9607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9608
9609 fi
9610 echo "$as_me:9610: result: $am_cv_langinfo_codeset" >&5
9611 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9612         if test $am_cv_langinfo_codeset = yes; then
9613
9614 cat >>confdefs.h <<\EOF
9615 #define HAVE_LANGINFO_CODESET 1
9616 EOF
9617
9618         fi
9619
9620 # use these variables to work around a defect in gcc's fixincludes.
9621 NCURSES_OK_WCHAR_T=
9622 NCURSES_OK_WINT_T=
9623
9624 echo "$as_me:9624: checking if you want wide-character code" >&5
9625 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9626
9627 # Check whether --enable-widec or --disable-widec was given.
9628 if test "${enable_widec+set}" = set; then
9629   enableval="$enable_widec"
9630   with_widec=$enableval
9631 else
9632   with_widec=no
9633 fi;
9634 echo "$as_me:9634: result: $with_widec" >&5
9635 echo "${ECHO_T}$with_widec" >&6
9636
9637 NCURSES_WCWIDTH_GRAPHICS=1
9638
9639 if test "x$with_widec" = xyes ; then
9640         if test "x$disable_lib_suffixes" = xno ; then
9641                 LIB_SUFFIX="w${LIB_SUFFIX}"
9642         fi
9643
9644 cat >>confdefs.h <<\EOF
9645 #define USE_WIDEC_SUPPORT 1
9646 EOF
9647
9648 cat >>confdefs.h <<\EOF
9649 #define NCURSES_WIDECHAR 1
9650 EOF
9651
9652 for ac_header in \
9653 wchar.h \
9654 wctype.h \
9655
9656 do
9657 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9658 echo "$as_me:9658: checking for $ac_header" >&5
9659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9661   echo $ECHO_N "(cached) $ECHO_C" >&6
9662 else
9663   cat >conftest.$ac_ext <<_ACEOF
9664 #line 9664 "configure"
9665 #include "confdefs.h"
9666 #include <$ac_header>
9667 _ACEOF
9668 if { (eval echo "$as_me:9668: \"$ac_cpp conftest.$ac_ext\"") >&5
9669   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9670   ac_status=$?
9671   egrep -v '^ *\+' conftest.er1 >conftest.err
9672   rm -f conftest.er1
9673   cat conftest.err >&5
9674   echo "$as_me:9674: \$? = $ac_status" >&5
9675   (exit $ac_status); } >/dev/null; then
9676   if test -s conftest.err; then
9677     ac_cpp_err=$ac_c_preproc_warn_flag
9678   else
9679     ac_cpp_err=
9680   fi
9681 else
9682   ac_cpp_err=yes
9683 fi
9684 if test -z "$ac_cpp_err"; then
9685   eval "$as_ac_Header=yes"
9686 else
9687   echo "$as_me: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   eval "$as_ac_Header=no"
9690 fi
9691 rm -f conftest.err conftest.$ac_ext
9692 fi
9693 echo "$as_me:9693: result: `eval echo '${'$as_ac_Header'}'`" >&5
9694 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9695 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9696   cat >>confdefs.h <<EOF
9697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9698 EOF
9699
9700 fi
9701 done
9702
9703 echo "$as_me:9703: checking if wchar.h can be used as is" >&5
9704 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9705 if test "${cf_cv_wchar_h_okay+set}" = set; then
9706   echo $ECHO_N "(cached) $ECHO_C" >&6
9707 else
9708
9709 cat >conftest.$ac_ext <<_ACEOF
9710 #line 9710 "configure"
9711 #include "confdefs.h"
9712
9713 #include <stdlib.h>
9714 #ifdef HAVE_WCHAR_H
9715 #include <wchar.h>
9716 #endif
9717 #ifdef HAVE_WCTYPE_H
9718 #include <wctype.h>
9719 #endif
9720
9721 int
9722 main (void)
9723 {
9724
9725         wint_t foo = 0;
9726         int bar = iswpunct(foo)
9727   ;
9728   return 0;
9729 }
9730 _ACEOF
9731 rm -f conftest.$ac_objext
9732 if { (eval echo "$as_me:9732: \"$ac_compile\"") >&5
9733   (eval $ac_compile) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit $ac_status); } &&
9737          { ac_try='test -s conftest.$ac_objext'
9738   { (eval echo "$as_me:9738: \"$ac_try\"") >&5
9739   (eval $ac_try) 2>&5
9740   ac_status=$?
9741   echo "$as_me:9741: \$? = $ac_status" >&5
9742   (exit $ac_status); }; }; then
9743   cf_cv_wchar_h_okay=yes
9744 else
9745   echo "$as_me: failed program was:" >&5
9746 cat conftest.$ac_ext >&5
9747 cf_cv_wchar_h_okay=no
9748 fi
9749 rm -f conftest.$ac_objext conftest.$ac_ext
9750 fi
9751 echo "$as_me:9751: result: $cf_cv_wchar_h_okay" >&5
9752 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9753
9754 if test $cf_cv_wchar_h_okay = no
9755 then
9756
9757 echo "$as_me:9757: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9758 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9759 cat >conftest.$ac_ext <<_ACEOF
9760 #line 9760 "configure"
9761 #include "confdefs.h"
9762 #include <sys/types.h>
9763
9764 int
9765 main (void)
9766 {
9767
9768 #ifndef _XOPEN_SOURCE_EXTENDED
9769 make an error
9770 #endif
9771   ;
9772   return 0;
9773 }
9774 _ACEOF
9775 rm -f conftest.$ac_objext
9776 if { (eval echo "$as_me:9776: \"$ac_compile\"") >&5
9777   (eval $ac_compile) 2>&5
9778   ac_status=$?
9779   echo "$as_me:9779: \$? = $ac_status" >&5
9780   (exit $ac_status); } &&
9781          { ac_try='test -s conftest.$ac_objext'
9782   { (eval echo "$as_me:9782: \"$ac_try\"") >&5
9783   (eval $ac_try) 2>&5
9784   ac_status=$?
9785   echo "$as_me:9785: \$? = $ac_status" >&5
9786   (exit $ac_status); }; }; then
9787   cf_result=no
9788 else
9789   echo "$as_me: failed program was:" >&5
9790 cat conftest.$ac_ext >&5
9791 cf_result=yes
9792 fi
9793 rm -f conftest.$ac_objext conftest.$ac_ext
9794 echo "$as_me:9794: result: $cf_result" >&5
9795 echo "${ECHO_T}$cf_result" >&6
9796
9797 if test "$cf_result" = yes ; then
9798         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9799 elif test "x" != "x" ; then
9800         echo "$as_me:9800: checking checking for compatible value versus " >&5
9801 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9802         cat >conftest.$ac_ext <<_ACEOF
9803 #line 9803 "configure"
9804 #include "confdefs.h"
9805 #include <sys/types.h>
9806
9807 int
9808 main (void)
9809 {
9810
9811 #if _XOPEN_SOURCE_EXTENDED- < 0
9812 make an error
9813 #endif
9814   ;
9815   return 0;
9816 }
9817 _ACEOF
9818 rm -f conftest.$ac_objext
9819 if { (eval echo "$as_me:9819: \"$ac_compile\"") >&5
9820   (eval $ac_compile) 2>&5
9821   ac_status=$?
9822   echo "$as_me:9822: \$? = $ac_status" >&5
9823   (exit $ac_status); } &&
9824          { ac_try='test -s conftest.$ac_objext'
9825   { (eval echo "$as_me:9825: \"$ac_try\"") >&5
9826   (eval $ac_try) 2>&5
9827   ac_status=$?
9828   echo "$as_me:9828: \$? = $ac_status" >&5
9829   (exit $ac_status); }; }; then
9830   cf_result=yes
9831 else
9832   echo "$as_me: failed program was:" >&5
9833 cat conftest.$ac_ext >&5
9834 cf_result=no
9835 fi
9836 rm -f conftest.$ac_objext conftest.$ac_ext
9837         echo "$as_me:9837: result: $cf_result" >&5
9838 echo "${ECHO_T}$cf_result" >&6
9839         if test "$cf_result" = no ; then
9840                 # perhaps we can override it - try...
9841                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9842         fi
9843 fi
9844
9845 fi
9846
9847 echo "$as_me:9847: checking if wcwidth agrees graphics are single-width" >&5
9848 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9849 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9850   echo $ECHO_N "(cached) $ECHO_C" >&6
9851 else
9852
9853 cat >conftest.in <<CF_EOF
9854 -       VT100 symbols
9855 0x250c  upper left corner
9856 0x2514  lower left corner
9857 0x2510  upper right corner
9858 0x2518  lower right corner
9859 0x251c  tee pointing left
9860 0x2524  tee pointing right
9861 0x2534  tee pointing up
9862 0x252c  tee pointing down
9863 0x2500  horizontal line
9864 0x2502  vertical line
9865 0x253c  large plus or crossover
9866 0x23ba  scan line 1
9867 0x23bd  scan line 9
9868 0x25c6  diamond
9869 0x2592  checker board (stipple)
9870 0x00b0  degree symbol
9871 0x00b1  plus/minus
9872 0x00b7  bullet
9873 -       Teletype 5410v1 symbols
9874 0x2190  arrow pointing left
9875 0x2192  arrow pointing right
9876 0x2193  arrow pointing down
9877 0x2191  arrow pointing up
9878 0x2592  board of squares
9879 0x2603  lantern symbol
9880 0x25ae  solid square block
9881 -       these defaults were invented for ncurses
9882 0x23bb  scan line 3
9883 0x23bc  scan line 7
9884 0x2264  less-than-or-equal-to
9885 0x2265  greater-than-or-equal-to
9886 0x03c0  greek pi
9887 0x2260  not-equal
9888 0x00a3  pound-sterling symbol
9889 -       thick-line-drawing
9890 0x250f  upper left corner
9891 0x2517  lower left corner
9892 0x2513  upper right corner
9893 0x251b  lower right corner
9894 0x2523  tee pointing left
9895 0x252b  tee pointing right
9896 0x253b  tee pointing up
9897 0x2533  tee pointing down
9898 0x2501  horizontal line
9899 0x2503  vertical line
9900 0x254b  large plus or crossover
9901 -       double-line-drawing
9902 0x2554  upper left corner
9903 0x255a  lower left corner
9904 0x2557  upper right corner
9905 0x255d  lower right corner
9906 0x2563  tee pointing left
9907 0x2560  tee pointing right
9908 0x2569  tee pointing up
9909 0x2566  tee pointing down
9910 0x2550  horizontal line
9911 0x2551  vertical line
9912 0x256c  large plus or crossover
9913 CF_EOF
9914 if test "$cross_compiling" = yes; then
9915   cf_cv_wcwidth_graphics=unknown
9916 else
9917   cat >conftest.$ac_ext <<_ACEOF
9918 #line 9918 "configure"
9919 #include "confdefs.h"
9920
9921 #include <locale.h>
9922 #include <stdio.h>
9923 #include <wchar.h>
9924
9925 #define MY_LEN 80
9926
9927 int
9928 main(void)
9929 {
9930         FILE *fp;
9931         int value;
9932         char buffer[MY_LEN + 1];
9933         char notes[MY_LEN + 1];
9934         int totals = 0;
9935         int passed = 0;
9936
9937         if (setlocale(LC_ALL, "en_US.UTF8") ||
9938                 setlocale(LC_ALL, "en_US.UTF-8") ||
9939                 setlocale(LC_ALL, "en_US.utf8") ||
9940                 setlocale(LC_ALL, "en_US.utf-8")) {
9941                 if ((fp = fopen("conftest.in", "r")) != 0) {
9942                         while (fgets(buffer, MY_LEN, fp) != 0) {
9943                                 if (*buffer == '-') {
9944                                         fprintf(stderr, "\t%s", buffer);
9945                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9946                                         ++totals;
9947                                         if (wcwidth(value) == 1)
9948                                                 ++passed;
9949                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9950                                 } else {
9951                                         fprintf(stderr, "?\t%s", buffer);
9952                                 }
9953                         }
9954                 }
9955         }
9956         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9957         return (totals == passed) ? 0 : 1;
9958 }
9959
9960 _ACEOF
9961 rm -f conftest$ac_exeext
9962 if { (eval echo "$as_me:9962: \"$ac_link\"") >&5
9963   (eval $ac_link) 2>&5
9964   ac_status=$?
9965   echo "$as_me:9965: \$? = $ac_status" >&5
9966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9967   { (eval echo "$as_me:9967: \"$ac_try\"") >&5
9968   (eval $ac_try) 2>&5
9969   ac_status=$?
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit $ac_status); }; }; then
9972   cf_cv_wcwidth_graphics=yes
9973 else
9974   echo "$as_me: program exited with status $ac_status" >&5
9975 echo "$as_me: failed program was:" >&5
9976 cat conftest.$ac_ext >&5
9977 cf_cv_wcwidth_graphics=no
9978 fi
9979 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9980 fi
9981
9982 fi
9983 echo "$as_me:9983: result: $cf_cv_wcwidth_graphics" >&5
9984 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9985
9986         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9987
9988         # with_overwrite=no
9989         NCURSES_CH_T=cchar_t
9990
9991 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9992 do
9993 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9994 echo "$as_me:9994: checking for $ac_func" >&5
9995 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9996 if eval "test \"\${$as_ac_var+set}\" = set"; then
9997   echo $ECHO_N "(cached) $ECHO_C" >&6
9998 else
9999   cat >conftest.$ac_ext <<_ACEOF
10000 #line 10000 "configure"
10001 #include "confdefs.h"
10002 /* System header to define __stub macros and hopefully few prototypes,
10003     which can conflict with char $ac_func (); below.  */
10004 #include <assert.h>
10005 /* Override any gcc2 internal prototype to avoid an error.  */
10006 #ifdef __cplusplus
10007 extern "C"
10008 #endif
10009 /* We use char because int might match the return type of a gcc2
10010    builtin and then its argument prototype would still apply.  */
10011 char $ac_func ();
10012 char (*f) ();
10013
10014 int
10015 main (void)
10016 {
10017 /* The GNU C library defines this for functions which it implements
10018     to always fail with ENOSYS.  Some functions are actually named
10019     something starting with __ and the normal name is an alias.  */
10020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10021 choke me
10022 #else
10023 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10024 #endif
10025
10026   ;
10027   return 0;
10028 }
10029 _ACEOF
10030 rm -f conftest.$ac_objext conftest$ac_exeext
10031 if { (eval echo "$as_me:10031: \"$ac_link\"") >&5
10032   (eval $ac_link) 2>&5
10033   ac_status=$?
10034   echo "$as_me:10034: \$? = $ac_status" >&5
10035   (exit $ac_status); } &&
10036          { ac_try='test -s conftest$ac_exeext'
10037   { (eval echo "$as_me:10037: \"$ac_try\"") >&5
10038   (eval $ac_try) 2>&5
10039   ac_status=$?
10040   echo "$as_me:10040: \$? = $ac_status" >&5
10041   (exit $ac_status); }; }; then
10042   eval "$as_ac_var=yes"
10043 else
10044   echo "$as_me: failed program was:" >&5
10045 cat conftest.$ac_ext >&5
10046 eval "$as_ac_var=no"
10047 fi
10048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10049 fi
10050 echo "$as_me:10050: result: `eval echo '${'$as_ac_var'}'`" >&5
10051 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10052 if test `eval echo '${'$as_ac_var'}'` = yes; then
10053   cat >>confdefs.h <<EOF
10054 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10055 EOF
10056
10057 fi
10058 done
10059
10060         if test "x$ac_cv_func_putwc" != xyes ; then
10061
10062 echo "$as_me:10062: checking for multibyte character support" >&5
10063 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10064 if test "${cf_cv_utf8_lib+set}" = set; then
10065   echo $ECHO_N "(cached) $ECHO_C" >&6
10066 else
10067
10068         cf_save_LIBS="$LIBS"
10069         cat >conftest.$ac_ext <<_ACEOF
10070 #line 10070 "configure"
10071 #include "confdefs.h"
10072
10073 #include <stdlib.h>
10074 int
10075 main (void)
10076 {
10077 putwc(0,0);
10078   ;
10079   return 0;
10080 }
10081 _ACEOF
10082 rm -f conftest.$ac_objext conftest$ac_exeext
10083 if { (eval echo "$as_me:10083: \"$ac_link\"") >&5
10084   (eval $ac_link) 2>&5
10085   ac_status=$?
10086   echo "$as_me:10086: \$? = $ac_status" >&5
10087   (exit $ac_status); } &&
10088          { ac_try='test -s conftest$ac_exeext'
10089   { (eval echo "$as_me:10089: \"$ac_try\"") >&5
10090   (eval $ac_try) 2>&5
10091   ac_status=$?
10092   echo "$as_me:10092: \$? = $ac_status" >&5
10093   (exit $ac_status); }; }; then
10094   cf_cv_utf8_lib=yes
10095 else
10096   echo "$as_me: failed program was:" >&5
10097 cat conftest.$ac_ext >&5
10098
10099 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10100 # will be set on completion of the AC_TRY_LINK below.
10101 cf_cv_header_path_utf8=
10102 cf_cv_library_path_utf8=
10103
10104 echo "${as_me:-configure}:10104: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10105
10106 cf_save_LIBS="$LIBS"
10107
10108 cat >conftest.$ac_ext <<_ACEOF
10109 #line 10109 "configure"
10110 #include "confdefs.h"
10111
10112 #include <libutf8.h>
10113 int
10114 main (void)
10115 {
10116 putwc(0,0);
10117   ;
10118   return 0;
10119 }
10120 _ACEOF
10121 rm -f conftest.$ac_objext conftest$ac_exeext
10122 if { (eval echo "$as_me:10122: \"$ac_link\"") >&5
10123   (eval $ac_link) 2>&5
10124   ac_status=$?
10125   echo "$as_me:10125: \$? = $ac_status" >&5
10126   (exit $ac_status); } &&
10127          { ac_try='test -s conftest$ac_exeext'
10128   { (eval echo "$as_me:10128: \"$ac_try\"") >&5
10129   (eval $ac_try) 2>&5
10130   ac_status=$?
10131   echo "$as_me:10131: \$? = $ac_status" >&5
10132   (exit $ac_status); }; }; then
10133
10134         cf_cv_find_linkage_utf8=yes
10135         cf_cv_header_path_utf8=/usr/include
10136         cf_cv_library_path_utf8=/usr/lib
10137
10138 else
10139   echo "$as_me: failed program was:" >&5
10140 cat conftest.$ac_ext >&5
10141
10142 LIBS="-lutf8  $cf_save_LIBS"
10143
10144 cat >conftest.$ac_ext <<_ACEOF
10145 #line 10145 "configure"
10146 #include "confdefs.h"
10147
10148 #include <libutf8.h>
10149 int
10150 main (void)
10151 {
10152 putwc(0,0);
10153   ;
10154   return 0;
10155 }
10156 _ACEOF
10157 rm -f conftest.$ac_objext conftest$ac_exeext
10158 if { (eval echo "$as_me:10158: \"$ac_link\"") >&5
10159   (eval $ac_link) 2>&5
10160   ac_status=$?
10161   echo "$as_me:10161: \$? = $ac_status" >&5
10162   (exit $ac_status); } &&
10163          { ac_try='test -s conftest$ac_exeext'
10164   { (eval echo "$as_me:10164: \"$ac_try\"") >&5
10165   (eval $ac_try) 2>&5
10166   ac_status=$?
10167   echo "$as_me:10167: \$? = $ac_status" >&5
10168   (exit $ac_status); }; }; then
10169
10170         cf_cv_find_linkage_utf8=yes
10171         cf_cv_header_path_utf8=/usr/include
10172         cf_cv_library_path_utf8=/usr/lib
10173         cf_cv_library_file_utf8="-lutf8"
10174
10175 else
10176   echo "$as_me: failed program was:" >&5
10177 cat conftest.$ac_ext >&5
10178
10179         cf_cv_find_linkage_utf8=no
10180         LIBS="$cf_save_LIBS"
10181
10182         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10183
10184 echo "${as_me:-configure}:10184: testing find linkage for utf8 library ..." 1>&5
10185
10186 echo "${as_me:-configure}:10186: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10187
10188         cf_save_CPPFLAGS="$CPPFLAGS"
10189         cf_test_CPPFLAGS="$CPPFLAGS"
10190
10191 cf_search=
10192
10193 # collect the current set of include-directories from compiler flags
10194 cf_header_path_list=""
10195 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10196         for cf_header_path in $CPPFLAGS $CFLAGS
10197         do
10198                 case $cf_header_path in
10199                 (-I*)
10200                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10201
10202 test "x$cf_header_path" != "xNONE" && \
10203 test -d "$cf_header_path" && \
10204  {
10205         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10206         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10207         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10208         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10209         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10210         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10211 }
10212
10213                         cf_header_path_list="$cf_header_path_list $cf_search"
10214                         ;;
10215                 esac
10216         done
10217 fi
10218
10219 # add the variations for the package we are looking for
10220
10221 cf_search=
10222
10223 test "x$prefix" != "xNONE" && \
10224 test -d "$prefix" && \
10225  {
10226         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10227         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10228         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10229         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10230         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10231         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10232 }
10233
10234 for cf_subdir_prefix in \
10235         /usr \
10236         /usr/local \
10237         /usr/pkg \
10238         /opt \
10239         /opt/local \
10240         $HOME
10241 do
10242
10243 test "x$cf_subdir_prefix" != "x$prefix" && \
10244 test -d "$cf_subdir_prefix" && \
10245 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10246         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10247         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10248         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10249         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10250         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10251         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10252 }
10253
10254 done
10255
10256 test "$includedir" != NONE && \
10257 test "$includedir" != "/usr/include" && \
10258 test -d "$includedir" && {
10259         test -d $includedir &&    cf_search="$cf_search $includedir"
10260         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10261 }
10262
10263 test "$oldincludedir" != NONE && \
10264 test "$oldincludedir" != "/usr/include" && \
10265 test -d "$oldincludedir" && {
10266         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10267         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10268 }
10269
10270 cf_search="$cf_search $cf_header_path_list"
10271
10272         for cf_cv_header_path_utf8 in $cf_search
10273         do
10274                 if test -d $cf_cv_header_path_utf8 ; then
10275                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10276
10277 echo "${as_me:-configure}:10277: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10278
10279                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10280                         cat >conftest.$ac_ext <<_ACEOF
10281 #line 10281 "configure"
10282 #include "confdefs.h"
10283
10284 #include <libutf8.h>
10285 int
10286 main (void)
10287 {
10288 putwc(0,0);
10289   ;
10290   return 0;
10291 }
10292 _ACEOF
10293 rm -f conftest.$ac_objext
10294 if { (eval echo "$as_me:10294: \"$ac_compile\"") >&5
10295   (eval $ac_compile) 2>&5
10296   ac_status=$?
10297   echo "$as_me:10297: \$? = $ac_status" >&5
10298   (exit $ac_status); } &&
10299          { ac_try='test -s conftest.$ac_objext'
10300   { (eval echo "$as_me:10300: \"$ac_try\"") >&5
10301   (eval $ac_try) 2>&5
10302   ac_status=$?
10303   echo "$as_me:10303: \$? = $ac_status" >&5
10304   (exit $ac_status); }; }; then
10305
10306                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10307
10308 echo "${as_me:-configure}:10308: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10309
10310                                 cf_cv_find_linkage_utf8=maybe
10311                                 cf_test_CPPFLAGS="$CPPFLAGS"
10312                                 break
10313 else
10314   echo "$as_me: failed program was:" >&5
10315 cat conftest.$ac_ext >&5
10316
10317                                 CPPFLAGS="$cf_save_CPPFLAGS"
10318
10319 fi
10320 rm -f conftest.$ac_objext conftest.$ac_ext
10321                 fi
10322         done
10323
10324         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10325
10326 echo "${as_me:-configure}:10326: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10327
10328                 cf_save_LIBS="$LIBS"
10329                 cf_save_LDFLAGS="$LDFLAGS"
10330
10331                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10332
10333 cf_search=
10334 cf_library_path_list=""
10335 if test -n "${LDFLAGS}${LIBS}" ; then
10336         for cf_library_path in $LDFLAGS $LIBS
10337         do
10338                 case $cf_library_path in
10339                 (-L*)
10340                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10341
10342 test "x$cf_library_path" != "xNONE" && \
10343 test -d "$cf_library_path" && \
10344  {
10345         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10346         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10347         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10348         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10349         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10350         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10351 }
10352
10353                         cf_library_path_list="$cf_library_path_list $cf_search"
10354                         ;;
10355                 esac
10356         done
10357 fi
10358
10359 cf_search=
10360
10361 test "x$prefix" != "xNONE" && \
10362 test -d "$prefix" && \
10363  {
10364         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10365         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10366         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10367         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10368         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10369         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10370 }
10371
10372 for cf_subdir_prefix in \
10373         /usr \
10374         /usr/local \
10375         /usr/pkg \
10376         /opt \
10377         /opt/local \
10378         $HOME
10379 do
10380
10381 test "x$cf_subdir_prefix" != "x$prefix" && \
10382 test -d "$cf_subdir_prefix" && \
10383 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10384         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10385         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10386         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10387         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10388         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10389         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10390 }
10391
10392 done
10393
10394 cf_search="$cf_library_path_list $cf_search"
10395
10396                         for cf_cv_library_path_utf8 in $cf_search
10397                         do
10398                                 if test -d $cf_cv_library_path_utf8 ; then
10399                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10400
10401 echo "${as_me:-configure}:10401: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10402
10403                                         CPPFLAGS="$cf_test_CPPFLAGS"
10404                                         LIBS="-lutf8  $cf_save_LIBS"
10405                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10406                                         cat >conftest.$ac_ext <<_ACEOF
10407 #line 10407 "configure"
10408 #include "confdefs.h"
10409
10410 #include <libutf8.h>
10411 int
10412 main (void)
10413 {
10414 putwc(0,0);
10415   ;
10416   return 0;
10417 }
10418 _ACEOF
10419 rm -f conftest.$ac_objext conftest$ac_exeext
10420 if { (eval echo "$as_me:10420: \"$ac_link\"") >&5
10421   (eval $ac_link) 2>&5
10422   ac_status=$?
10423   echo "$as_me:10423: \$? = $ac_status" >&5
10424   (exit $ac_status); } &&
10425          { ac_try='test -s conftest$ac_exeext'
10426   { (eval echo "$as_me:10426: \"$ac_try\"") >&5
10427   (eval $ac_try) 2>&5
10428   ac_status=$?
10429   echo "$as_me:10429: \$? = $ac_status" >&5
10430   (exit $ac_status); }; }; then
10431
10432                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10433
10434 echo "${as_me:-configure}:10434: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10435
10436                                         cf_cv_find_linkage_utf8=yes
10437                                         cf_cv_library_file_utf8="-lutf8"
10438                                         break
10439 else
10440   echo "$as_me: failed program was:" >&5
10441 cat conftest.$ac_ext >&5
10442
10443                                         CPPFLAGS="$cf_save_CPPFLAGS"
10444                                         LIBS="$cf_save_LIBS"
10445                                         LDFLAGS="$cf_save_LDFLAGS"
10446
10447 fi
10448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10449                                 fi
10450                         done
10451                         CPPFLAGS="$cf_save_CPPFLAGS"
10452                         LDFLAGS="$cf_save_LDFLAGS"
10453                 fi
10454
10455         else
10456                 cf_cv_find_linkage_utf8=no
10457         fi
10458
10459 fi
10460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10461
10462 fi
10463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10464
10465 LIBS="$cf_save_LIBS"
10466
10467 if test "$cf_cv_find_linkage_utf8" = yes ; then
10468 cf_cv_utf8_lib=add-on
10469 else
10470 cf_cv_utf8_lib=no
10471 fi
10472
10473 fi
10474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10475 fi
10476 echo "$as_me:10476: result: $cf_cv_utf8_lib" >&5
10477 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10478
10479 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10480 # ncurses/ncursesw:
10481 if test "$cf_cv_utf8_lib" = "add-on" ; then
10482
10483 cat >>confdefs.h <<\EOF
10484 #define HAVE_LIBUTF8_H 1
10485 EOF
10486
10487 if test -n "$cf_cv_header_path_utf8" ; then
10488   for cf_add_incdir in $cf_cv_header_path_utf8
10489   do
10490         while test $cf_add_incdir != /usr/include
10491         do
10492           if test -d $cf_add_incdir
10493           then
10494                 cf_have_incdir=no
10495                 if test -n "$CFLAGS$CPPFLAGS" ; then
10496                   # a loop is needed to ensure we can add subdirs of existing dirs
10497                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10498                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10499                           cf_have_incdir=yes; break
10500                         fi
10501                   done
10502                 fi
10503
10504                 if test "$cf_have_incdir" = no ; then
10505                   if test "$cf_add_incdir" = /usr/local/include ; then
10506                         if test "$GCC" = yes
10507                         then
10508                           cf_save_CPPFLAGS=$CPPFLAGS
10509                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10510                           cat >conftest.$ac_ext <<_ACEOF
10511 #line 10511 "configure"
10512 #include "confdefs.h"
10513 #include <stdio.h>
10514 int
10515 main (void)
10516 {
10517 printf("Hello")
10518   ;
10519   return 0;
10520 }
10521 _ACEOF
10522 rm -f conftest.$ac_objext
10523 if { (eval echo "$as_me:10523: \"$ac_compile\"") >&5
10524   (eval $ac_compile) 2>&5
10525   ac_status=$?
10526   echo "$as_me:10526: \$? = $ac_status" >&5
10527   (exit $ac_status); } &&
10528          { ac_try='test -s conftest.$ac_objext'
10529   { (eval echo "$as_me:10529: \"$ac_try\"") >&5
10530   (eval $ac_try) 2>&5
10531   ac_status=$?
10532   echo "$as_me:10532: \$? = $ac_status" >&5
10533   (exit $ac_status); }; }; then
10534   :
10535 else
10536   echo "$as_me: failed program was:" >&5
10537 cat conftest.$ac_ext >&5
10538 cf_have_incdir=yes
10539 fi
10540 rm -f conftest.$ac_objext conftest.$ac_ext
10541                           CPPFLAGS=$cf_save_CPPFLAGS
10542                         fi
10543                   fi
10544                 fi
10545
10546                 if test "$cf_have_incdir" = no ; then
10547                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10548
10549 echo "${as_me:-configure}:10549: testing adding $cf_add_incdir to include-path ..." 1>&5
10550
10551                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10552
10553                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10554                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10555                   cf_add_incdir="$cf_top_incdir"
10556                 else
10557                   break
10558                 fi
10559           else
10560                 break
10561           fi
10562         done
10563   done
10564 fi
10565
10566 if test -n "$cf_cv_library_path_utf8" ; then
10567         for cf_add_libdir in $cf_cv_library_path_utf8
10568         do
10569                 if test $cf_add_libdir = /usr/lib ; then
10570                         :
10571                 elif test -d $cf_add_libdir
10572                 then
10573                         cf_have_libdir=no
10574                         if test -n "$LDFLAGS$LIBS" ; then
10575                                 # a loop is needed to ensure we can add subdirs of existing dirs
10576                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10577                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10578                                                 cf_have_libdir=yes; break
10579                                         fi
10580                                 done
10581                         fi
10582                         if test "$cf_have_libdir" = no ; then
10583                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10584
10585 echo "${as_me:-configure}:10585: testing adding $cf_add_libdir to library-path ..." 1>&5
10586
10587                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10588                         fi
10589                 fi
10590         done
10591 fi
10592
10593 cf_add_libs="$cf_cv_library_file_utf8"
10594 # Filter out duplicates - this happens with badly-designed ".pc" files...
10595 for cf_add_1lib in $LIBS
10596 do
10597         for cf_add_2lib in $cf_add_libs
10598         do
10599                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10600                 then
10601                         cf_add_1lib=
10602                         break
10603                 fi
10604         done
10605         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10606 done
10607 LIBS="$cf_add_libs"
10608
10609 fi
10610
10611                 if test "$cf_cv_utf8_lib" != no ; then
10612                         NCURSES_LIBUTF8=1
10613                 fi
10614         fi
10615
10616 # This is needed on Tru64 5.0 to declare mbstate_t
10617 echo "$as_me:10617: checking if we must include wchar.h to declare mbstate_t" >&5
10618 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10619 if test "${cf_cv_mbstate_t+set}" = set; then
10620   echo $ECHO_N "(cached) $ECHO_C" >&6
10621 else
10622
10623 cat >conftest.$ac_ext <<_ACEOF
10624 #line 10624 "configure"
10625 #include "confdefs.h"
10626
10627 #include <stdlib.h>
10628 #include <stdarg.h>
10629 #include <stdio.h>
10630 #ifdef HAVE_LIBUTF8_H
10631 #include <libutf8.h>
10632 #endif
10633 int
10634 main (void)
10635 {
10636 mbstate_t state
10637   ;
10638   return 0;
10639 }
10640 _ACEOF
10641 rm -f conftest.$ac_objext
10642 if { (eval echo "$as_me:10642: \"$ac_compile\"") >&5
10643   (eval $ac_compile) 2>&5
10644   ac_status=$?
10645   echo "$as_me:10645: \$? = $ac_status" >&5
10646   (exit $ac_status); } &&
10647          { ac_try='test -s conftest.$ac_objext'
10648   { (eval echo "$as_me:10648: \"$ac_try\"") >&5
10649   (eval $ac_try) 2>&5
10650   ac_status=$?
10651   echo "$as_me:10651: \$? = $ac_status" >&5
10652   (exit $ac_status); }; }; then
10653   cf_cv_mbstate_t=no
10654 else
10655   echo "$as_me: failed program was:" >&5
10656 cat conftest.$ac_ext >&5
10657 cat >conftest.$ac_ext <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10660
10661 #include <stdlib.h>
10662 #include <stdarg.h>
10663 #include <stdio.h>
10664 #include <wchar.h>
10665 #ifdef HAVE_LIBUTF8_H
10666 #include <libutf8.h>
10667 #endif
10668 int
10669 main (void)
10670 {
10671 mbstate_t value
10672   ;
10673   return 0;
10674 }
10675 _ACEOF
10676 rm -f conftest.$ac_objext
10677 if { (eval echo "$as_me:10677: \"$ac_compile\"") >&5
10678   (eval $ac_compile) 2>&5
10679   ac_status=$?
10680   echo "$as_me:10680: \$? = $ac_status" >&5
10681   (exit $ac_status); } &&
10682          { ac_try='test -s conftest.$ac_objext'
10683   { (eval echo "$as_me:10683: \"$ac_try\"") >&5
10684   (eval $ac_try) 2>&5
10685   ac_status=$?
10686   echo "$as_me:10686: \$? = $ac_status" >&5
10687   (exit $ac_status); }; }; then
10688   cf_cv_mbstate_t=yes
10689 else
10690   echo "$as_me: failed program was:" >&5
10691 cat conftest.$ac_ext >&5
10692 cf_cv_mbstate_t=unknown
10693 fi
10694 rm -f conftest.$ac_objext conftest.$ac_ext
10695 fi
10696 rm -f conftest.$ac_objext conftest.$ac_ext
10697 fi
10698 echo "$as_me:10698: result: $cf_cv_mbstate_t" >&5
10699 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10700
10701 if test "$cf_cv_mbstate_t" = yes ; then
10702
10703 cat >>confdefs.h <<\EOF
10704 #define NEED_WCHAR_H 1
10705 EOF
10706
10707         NEED_WCHAR_H=1
10708 fi
10709
10710 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10711 if test "$cf_cv_mbstate_t" = unknown ; then
10712         NCURSES_MBSTATE_T=1
10713 fi
10714
10715 # This is needed on Tru64 5.0 to declare wchar_t
10716 echo "$as_me:10716: checking if we must include wchar.h to declare wchar_t" >&5
10717 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10718 if test "${cf_cv_wchar_t+set}" = set; then
10719   echo $ECHO_N "(cached) $ECHO_C" >&6
10720 else
10721
10722 cat >conftest.$ac_ext <<_ACEOF
10723 #line 10723 "configure"
10724 #include "confdefs.h"
10725
10726 #include <stdlib.h>
10727 #include <stdarg.h>
10728 #include <stdio.h>
10729 #ifdef HAVE_LIBUTF8_H
10730 #include <libutf8.h>
10731 #endif
10732 int
10733 main (void)
10734 {
10735 wchar_t state
10736   ;
10737   return 0;
10738 }
10739 _ACEOF
10740 rm -f conftest.$ac_objext
10741 if { (eval echo "$as_me:10741: \"$ac_compile\"") >&5
10742   (eval $ac_compile) 2>&5
10743   ac_status=$?
10744   echo "$as_me:10744: \$? = $ac_status" >&5
10745   (exit $ac_status); } &&
10746          { ac_try='test -s conftest.$ac_objext'
10747   { (eval echo "$as_me:10747: \"$ac_try\"") >&5
10748   (eval $ac_try) 2>&5
10749   ac_status=$?
10750   echo "$as_me:10750: \$? = $ac_status" >&5
10751   (exit $ac_status); }; }; then
10752   cf_cv_wchar_t=no
10753 else
10754   echo "$as_me: failed program was:" >&5
10755 cat conftest.$ac_ext >&5
10756 cat >conftest.$ac_ext <<_ACEOF
10757 #line 10757 "configure"
10758 #include "confdefs.h"
10759
10760 #include <stdlib.h>
10761 #include <stdarg.h>
10762 #include <stdio.h>
10763 #include <wchar.h>
10764 #ifdef HAVE_LIBUTF8_H
10765 #include <libutf8.h>
10766 #endif
10767 int
10768 main (void)
10769 {
10770 wchar_t value
10771   ;
10772   return 0;
10773 }
10774 _ACEOF
10775 rm -f conftest.$ac_objext
10776 if { (eval echo "$as_me:10776: \"$ac_compile\"") >&5
10777   (eval $ac_compile) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit $ac_status); } &&
10781          { ac_try='test -s conftest.$ac_objext'
10782   { (eval echo "$as_me:10782: \"$ac_try\"") >&5
10783   (eval $ac_try) 2>&5
10784   ac_status=$?
10785   echo "$as_me:10785: \$? = $ac_status" >&5
10786   (exit $ac_status); }; }; then
10787   cf_cv_wchar_t=yes
10788 else
10789   echo "$as_me: failed program was:" >&5
10790 cat conftest.$ac_ext >&5
10791 cf_cv_wchar_t=unknown
10792 fi
10793 rm -f conftest.$ac_objext conftest.$ac_ext
10794 fi
10795 rm -f conftest.$ac_objext conftest.$ac_ext
10796 fi
10797 echo "$as_me:10797: result: $cf_cv_wchar_t" >&5
10798 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10799
10800 if test "$cf_cv_wchar_t" = yes ; then
10801
10802 cat >>confdefs.h <<\EOF
10803 #define NEED_WCHAR_H 1
10804 EOF
10805
10806         NEED_WCHAR_H=1
10807 fi
10808
10809 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10810 if test "$cf_cv_wchar_t" = unknown ; then
10811         NCURSES_WCHAR_T=1
10812 fi
10813
10814 # if we find wchar_t in either place, use substitution to provide a fallback.
10815 if test "$cf_cv_wchar_t" != unknown ; then
10816         NCURSES_OK_WCHAR_T=1
10817 fi
10818
10819 # This is needed on Tru64 5.0 to declare wint_t
10820 echo "$as_me:10820: checking if we must include wchar.h to declare wint_t" >&5
10821 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10822 if test "${cf_cv_wint_t+set}" = set; then
10823   echo $ECHO_N "(cached) $ECHO_C" >&6
10824 else
10825
10826 cat >conftest.$ac_ext <<_ACEOF
10827 #line 10827 "configure"
10828 #include "confdefs.h"
10829
10830 #include <stdlib.h>
10831 #include <stdarg.h>
10832 #include <stdio.h>
10833 #ifdef HAVE_LIBUTF8_H
10834 #include <libutf8.h>
10835 #endif
10836 int
10837 main (void)
10838 {
10839 wint_t state
10840   ;
10841   return 0;
10842 }
10843 _ACEOF
10844 rm -f conftest.$ac_objext
10845 if { (eval echo "$as_me:10845: \"$ac_compile\"") >&5
10846   (eval $ac_compile) 2>&5
10847   ac_status=$?
10848   echo "$as_me:10848: \$? = $ac_status" >&5
10849   (exit $ac_status); } &&
10850          { ac_try='test -s conftest.$ac_objext'
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_wint_t=no
10857 else
10858   echo "$as_me: failed program was:" >&5
10859 cat conftest.$ac_ext >&5
10860 cat >conftest.$ac_ext <<_ACEOF
10861 #line 10861 "configure"
10862 #include "confdefs.h"
10863
10864 #include <stdlib.h>
10865 #include <stdarg.h>
10866 #include <stdio.h>
10867 #include <wchar.h>
10868 #ifdef HAVE_LIBUTF8_H
10869 #include <libutf8.h>
10870 #endif
10871 int
10872 main (void)
10873 {
10874 wint_t value
10875   ;
10876   return 0;
10877 }
10878 _ACEOF
10879 rm -f conftest.$ac_objext
10880 if { (eval echo "$as_me:10880: \"$ac_compile\"") >&5
10881   (eval $ac_compile) 2>&5
10882   ac_status=$?
10883   echo "$as_me:10883: \$? = $ac_status" >&5
10884   (exit $ac_status); } &&
10885          { ac_try='test -s conftest.$ac_objext'
10886   { (eval echo "$as_me:10886: \"$ac_try\"") >&5
10887   (eval $ac_try) 2>&5
10888   ac_status=$?
10889   echo "$as_me:10889: \$? = $ac_status" >&5
10890   (exit $ac_status); }; }; then
10891   cf_cv_wint_t=yes
10892 else
10893   echo "$as_me: failed program was:" >&5
10894 cat conftest.$ac_ext >&5
10895 cf_cv_wint_t=unknown
10896 fi
10897 rm -f conftest.$ac_objext conftest.$ac_ext
10898 fi
10899 rm -f conftest.$ac_objext conftest.$ac_ext
10900 fi
10901 echo "$as_me:10901: result: $cf_cv_wint_t" >&5
10902 echo "${ECHO_T}$cf_cv_wint_t" >&6
10903
10904 if test "$cf_cv_wint_t" = yes ; then
10905
10906 cat >>confdefs.h <<\EOF
10907 #define NEED_WCHAR_H 1
10908 EOF
10909
10910         NEED_WCHAR_H=1
10911 fi
10912
10913 # if we do not find wint_t in either place, use substitution to provide a fallback.
10914 if test "$cf_cv_wint_t" = unknown ; then
10915         NCURSES_WINT_T=1
10916 fi
10917
10918 # if we find wint_t in either place, use substitution to provide a fallback.
10919 if test "$cf_cv_wint_t" != unknown ; then
10920         NCURSES_OK_WINT_T=1
10921 fi
10922
10923         if test "$NCURSES_MBSTATE_T" != 0; then
10924
10925 cat >>confdefs.h <<\EOF
10926 #define NEED_MBSTATE_T_DEF 1
10927 EOF
10928
10929         fi
10930 fi
10931
10932 ###   use option --disable-lp64 to allow long chtype
10933 echo "$as_me:10933: checking whether to enable _LP64 definition in curses.h" >&5
10934 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10935
10936 # Check whether --enable-lp64 or --disable-lp64 was given.
10937 if test "${enable_lp64+set}" = set; then
10938   enableval="$enable_lp64"
10939   with_lp64=$enableval
10940 else
10941   with_lp64=$cf_dft_with_lp64
10942 fi;
10943 echo "$as_me:10943: result: $with_lp64" >&5
10944 echo "${ECHO_T}$with_lp64" >&6
10945
10946 if test "x$with_lp64" = xyes ; then
10947         cf_cv_enable_lp64=1
10948 else
10949         cf_cv_enable_lp64=0
10950 fi
10951
10952 # Check whether --enable-largefile or --disable-largefile was given.
10953 if test "${enable_largefile+set}" = set; then
10954   enableval="$enable_largefile"
10955
10956 fi;
10957 if test "$enable_largefile" != no; then
10958
10959   echo "$as_me:10959: checking for special C compiler options needed for large files" >&5
10960 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10961 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10962   echo $ECHO_N "(cached) $ECHO_C" >&6
10963 else
10964   ac_cv_sys_largefile_CC=no
10965      if test "$GCC" != yes; then
10966        ac_save_CC=$CC
10967        while :; do
10968          # IRIX 6.2 and later do not support large files by default,
10969          # so use the C compiler's -n32 option if that helps.
10970          cat >conftest.$ac_ext <<_ACEOF
10971 #line 10971 "configure"
10972 #include "confdefs.h"
10973 #include <sys/types.h>
10974  /* Check that off_t can represent 2**63 - 1 correctly.
10975     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10976     since some C++ compilers masquerading as C compilers
10977     incorrectly reject 9223372036854775807.  */
10978 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10979   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10980                        && LARGE_OFF_T % 2147483647 == 1)
10981                       ? 1 : -1];
10982 int
10983 main (void)
10984 {
10985
10986   ;
10987   return 0;
10988 }
10989 _ACEOF
10990          rm -f conftest.$ac_objext
10991 if { (eval echo "$as_me:10991: \"$ac_compile\"") >&5
10992   (eval $ac_compile) 2>&5
10993   ac_status=$?
10994   echo "$as_me:10994: \$? = $ac_status" >&5
10995   (exit $ac_status); } &&
10996          { ac_try='test -s conftest.$ac_objext'
10997   { (eval echo "$as_me:10997: \"$ac_try\"") >&5
10998   (eval $ac_try) 2>&5
10999   ac_status=$?
11000   echo "$as_me:11000: \$? = $ac_status" >&5
11001   (exit $ac_status); }; }; then
11002   break
11003 else
11004   echo "$as_me: failed program was:" >&5
11005 cat conftest.$ac_ext >&5
11006 fi
11007 rm -f conftest.$ac_objext
11008          CC="$CC -n32"
11009          rm -f conftest.$ac_objext
11010 if { (eval echo "$as_me:11010: \"$ac_compile\"") >&5
11011   (eval $ac_compile) 2>&5
11012   ac_status=$?
11013   echo "$as_me:11013: \$? = $ac_status" >&5
11014   (exit $ac_status); } &&
11015          { ac_try='test -s conftest.$ac_objext'
11016   { (eval echo "$as_me:11016: \"$ac_try\"") >&5
11017   (eval $ac_try) 2>&5
11018   ac_status=$?
11019   echo "$as_me:11019: \$? = $ac_status" >&5
11020   (exit $ac_status); }; }; then
11021   ac_cv_sys_largefile_CC=' -n32'; break
11022 else
11023   echo "$as_me: failed program was:" >&5
11024 cat conftest.$ac_ext >&5
11025 fi
11026 rm -f conftest.$ac_objext
11027          break
11028        done
11029        CC=$ac_save_CC
11030        rm -f conftest.$ac_ext
11031     fi
11032 fi
11033 echo "$as_me:11033: result: $ac_cv_sys_largefile_CC" >&5
11034 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11035   if test "$ac_cv_sys_largefile_CC" != no; then
11036     CC=$CC$ac_cv_sys_largefile_CC
11037   fi
11038
11039   echo "$as_me:11039: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11040 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11041 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11042   echo $ECHO_N "(cached) $ECHO_C" >&6
11043 else
11044   while :; do
11045   ac_cv_sys_file_offset_bits=no
11046   cat >conftest.$ac_ext <<_ACEOF
11047 #line 11047 "configure"
11048 #include "confdefs.h"
11049 #include <sys/types.h>
11050  /* Check that off_t can represent 2**63 - 1 correctly.
11051     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11052     since some C++ compilers masquerading as C compilers
11053     incorrectly reject 9223372036854775807.  */
11054 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11055   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11056                        && LARGE_OFF_T % 2147483647 == 1)
11057                       ? 1 : -1];
11058 int
11059 main (void)
11060 {
11061
11062   ;
11063   return 0;
11064 }
11065 _ACEOF
11066 rm -f conftest.$ac_objext
11067 if { (eval echo "$as_me:11067: \"$ac_compile\"") >&5
11068   (eval $ac_compile) 2>&5
11069   ac_status=$?
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit $ac_status); } &&
11072          { ac_try='test -s conftest.$ac_objext'
11073   { (eval echo "$as_me:11073: \"$ac_try\"") >&5
11074   (eval $ac_try) 2>&5
11075   ac_status=$?
11076   echo "$as_me:11076: \$? = $ac_status" >&5
11077   (exit $ac_status); }; }; then
11078   break
11079 else
11080   echo "$as_me: failed program was:" >&5
11081 cat conftest.$ac_ext >&5
11082 fi
11083 rm -f conftest.$ac_objext conftest.$ac_ext
11084   cat >conftest.$ac_ext <<_ACEOF
11085 #line 11085 "configure"
11086 #include "confdefs.h"
11087 #define _FILE_OFFSET_BITS 64
11088 #include <sys/types.h>
11089  /* Check that off_t can represent 2**63 - 1 correctly.
11090     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11091     since some C++ compilers masquerading as C compilers
11092     incorrectly reject 9223372036854775807.  */
11093 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11094   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11095                        && LARGE_OFF_T % 2147483647 == 1)
11096                       ? 1 : -1];
11097 int
11098 main (void)
11099 {
11100
11101   ;
11102   return 0;
11103 }
11104 _ACEOF
11105 rm -f conftest.$ac_objext
11106 if { (eval echo "$as_me:11106: \"$ac_compile\"") >&5
11107   (eval $ac_compile) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); } &&
11111          { ac_try='test -s conftest.$ac_objext'
11112   { (eval echo "$as_me:11112: \"$ac_try\"") >&5
11113   (eval $ac_try) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); }; }; then
11117   ac_cv_sys_file_offset_bits=64; break
11118 else
11119   echo "$as_me: failed program was:" >&5
11120 cat conftest.$ac_ext >&5
11121 fi
11122 rm -f conftest.$ac_objext conftest.$ac_ext
11123   break
11124 done
11125 fi
11126 echo "$as_me:11126: result: $ac_cv_sys_file_offset_bits" >&5
11127 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11128 if test "$ac_cv_sys_file_offset_bits" != no; then
11129
11130 cat >>confdefs.h <<EOF
11131 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11132 EOF
11133
11134 fi
11135 rm -rf conftest*
11136   echo "$as_me:11136: checking for _LARGE_FILES value needed for large files" >&5
11137 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11138 if test "${ac_cv_sys_large_files+set}" = set; then
11139   echo $ECHO_N "(cached) $ECHO_C" >&6
11140 else
11141   while :; do
11142   ac_cv_sys_large_files=no
11143   cat >conftest.$ac_ext <<_ACEOF
11144 #line 11144 "configure"
11145 #include "confdefs.h"
11146 #include <sys/types.h>
11147  /* Check that off_t can represent 2**63 - 1 correctly.
11148     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11149     since some C++ compilers masquerading as C compilers
11150     incorrectly reject 9223372036854775807.  */
11151 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11152   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11153                        && LARGE_OFF_T % 2147483647 == 1)
11154                       ? 1 : -1];
11155 int
11156 main (void)
11157 {
11158
11159   ;
11160   return 0;
11161 }
11162 _ACEOF
11163 rm -f conftest.$ac_objext
11164 if { (eval echo "$as_me:11164: \"$ac_compile\"") >&5
11165   (eval $ac_compile) 2>&5
11166   ac_status=$?
11167   echo "$as_me:11167: \$? = $ac_status" >&5
11168   (exit $ac_status); } &&
11169          { ac_try='test -s conftest.$ac_objext'
11170   { (eval echo "$as_me:11170: \"$ac_try\"") >&5
11171   (eval $ac_try) 2>&5
11172   ac_status=$?
11173   echo "$as_me:11173: \$? = $ac_status" >&5
11174   (exit $ac_status); }; }; then
11175   break
11176 else
11177   echo "$as_me: failed program was:" >&5
11178 cat conftest.$ac_ext >&5
11179 fi
11180 rm -f conftest.$ac_objext conftest.$ac_ext
11181   cat >conftest.$ac_ext <<_ACEOF
11182 #line 11182 "configure"
11183 #include "confdefs.h"
11184 #define _LARGE_FILES 1
11185 #include <sys/types.h>
11186  /* Check that off_t can represent 2**63 - 1 correctly.
11187     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11188     since some C++ compilers masquerading as C compilers
11189     incorrectly reject 9223372036854775807.  */
11190 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11191   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11192                        && LARGE_OFF_T % 2147483647 == 1)
11193                       ? 1 : -1];
11194 int
11195 main (void)
11196 {
11197
11198   ;
11199   return 0;
11200 }
11201 _ACEOF
11202 rm -f conftest.$ac_objext
11203 if { (eval echo "$as_me:11203: \"$ac_compile\"") >&5
11204   (eval $ac_compile) 2>&5
11205   ac_status=$?
11206   echo "$as_me:11206: \$? = $ac_status" >&5
11207   (exit $ac_status); } &&
11208          { ac_try='test -s conftest.$ac_objext'
11209   { (eval echo "$as_me:11209: \"$ac_try\"") >&5
11210   (eval $ac_try) 2>&5
11211   ac_status=$?
11212   echo "$as_me:11212: \$? = $ac_status" >&5
11213   (exit $ac_status); }; }; then
11214   ac_cv_sys_large_files=1; break
11215 else
11216   echo "$as_me: failed program was:" >&5
11217 cat conftest.$ac_ext >&5
11218 fi
11219 rm -f conftest.$ac_objext conftest.$ac_ext
11220   break
11221 done
11222 fi
11223 echo "$as_me:11223: result: $ac_cv_sys_large_files" >&5
11224 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11225 if test "$ac_cv_sys_large_files" != no; then
11226
11227 cat >>confdefs.h <<EOF
11228 #define _LARGE_FILES $ac_cv_sys_large_files
11229 EOF
11230
11231 fi
11232 rm -rf conftest*
11233 fi
11234
11235         if test "$enable_largefile" != no ; then
11236         echo "$as_me:11236: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11237 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11238 if test "${ac_cv_sys_largefile_source+set}" = set; then
11239   echo $ECHO_N "(cached) $ECHO_C" >&6
11240 else
11241   while :; do
11242   ac_cv_sys_largefile_source=no
11243   cat >conftest.$ac_ext <<_ACEOF
11244 #line 11244 "configure"
11245 #include "confdefs.h"
11246 #include <stdio.h>
11247 int
11248 main (void)
11249 {
11250 return !fseeko;
11251   ;
11252   return 0;
11253 }
11254 _ACEOF
11255 rm -f conftest.$ac_objext
11256 if { (eval echo "$as_me:11256: \"$ac_compile\"") >&5
11257   (eval $ac_compile) 2>&5
11258   ac_status=$?
11259   echo "$as_me:11259: \$? = $ac_status" >&5
11260   (exit $ac_status); } &&
11261          { ac_try='test -s conftest.$ac_objext'
11262   { (eval echo "$as_me:11262: \"$ac_try\"") >&5
11263   (eval $ac_try) 2>&5
11264   ac_status=$?
11265   echo "$as_me:11265: \$? = $ac_status" >&5
11266   (exit $ac_status); }; }; then
11267   break
11268 else
11269   echo "$as_me: failed program was:" >&5
11270 cat conftest.$ac_ext >&5
11271 fi
11272 rm -f conftest.$ac_objext conftest.$ac_ext
11273   cat >conftest.$ac_ext <<_ACEOF
11274 #line 11274 "configure"
11275 #include "confdefs.h"
11276 #define _LARGEFILE_SOURCE 1
11277 #include <stdio.h>
11278 int
11279 main (void)
11280 {
11281 return !fseeko;
11282   ;
11283   return 0;
11284 }
11285 _ACEOF
11286 rm -f conftest.$ac_objext
11287 if { (eval echo "$as_me:11287: \"$ac_compile\"") >&5
11288   (eval $ac_compile) 2>&5
11289   ac_status=$?
11290   echo "$as_me:11290: \$? = $ac_status" >&5
11291   (exit $ac_status); } &&
11292          { ac_try='test -s conftest.$ac_objext'
11293   { (eval echo "$as_me:11293: \"$ac_try\"") >&5
11294   (eval $ac_try) 2>&5
11295   ac_status=$?
11296   echo "$as_me:11296: \$? = $ac_status" >&5
11297   (exit $ac_status); }; }; then
11298   ac_cv_sys_largefile_source=1; break
11299 else
11300   echo "$as_me: failed program was:" >&5
11301 cat conftest.$ac_ext >&5
11302 fi
11303 rm -f conftest.$ac_objext conftest.$ac_ext
11304   break
11305 done
11306 fi
11307 echo "$as_me:11307: result: $ac_cv_sys_largefile_source" >&5
11308 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11309 if test "$ac_cv_sys_largefile_source" != no; then
11310
11311 cat >>confdefs.h <<EOF
11312 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11313 EOF
11314
11315 fi
11316 rm -rf conftest*
11317
11318 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11319 # in glibc 2.1.3, but that breaks too many other things.
11320 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11321 echo "$as_me:11321: checking for fseeko" >&5
11322 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11323 if test "${ac_cv_func_fseeko+set}" = set; then
11324   echo $ECHO_N "(cached) $ECHO_C" >&6
11325 else
11326   cat >conftest.$ac_ext <<_ACEOF
11327 #line 11327 "configure"
11328 #include "confdefs.h"
11329 #include <stdio.h>
11330 int
11331 main (void)
11332 {
11333 return fseeko && fseeko (stdin, 0, 0);
11334   ;
11335   return 0;
11336 }
11337 _ACEOF
11338 rm -f conftest.$ac_objext conftest$ac_exeext
11339 if { (eval echo "$as_me:11339: \"$ac_link\"") >&5
11340   (eval $ac_link) 2>&5
11341   ac_status=$?
11342   echo "$as_me:11342: \$? = $ac_status" >&5
11343   (exit $ac_status); } &&
11344          { ac_try='test -s conftest$ac_exeext'
11345   { (eval echo "$as_me:11345: \"$ac_try\"") >&5
11346   (eval $ac_try) 2>&5
11347   ac_status=$?
11348   echo "$as_me:11348: \$? = $ac_status" >&5
11349   (exit $ac_status); }; }; then
11350   ac_cv_func_fseeko=yes
11351 else
11352   echo "$as_me: failed program was:" >&5
11353 cat conftest.$ac_ext >&5
11354 ac_cv_func_fseeko=no
11355 fi
11356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11357 fi
11358 echo "$as_me:11358: result: $ac_cv_func_fseeko" >&5
11359 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11360 if test $ac_cv_func_fseeko = yes; then
11361
11362 cat >>confdefs.h <<\EOF
11363 #define HAVE_FSEEKO 1
11364 EOF
11365
11366 fi
11367
11368         # Normally we would collect these definitions in the config.h,
11369         # but (like _XOPEN_SOURCE), some environments rely on having these
11370         # defined before any of the system headers are included.  Another
11371         # case comes up with C++, e.g., on AIX the compiler compiles the
11372         # header files by themselves before looking at the body files it is
11373         # told to compile.  For ncurses, those header files do not include
11374         # the config.h
11375         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11376         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11377         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11378
11379         echo "$as_me:11379: checking whether to use struct dirent64" >&5
11380 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11381 if test "${cf_cv_struct_dirent64+set}" = set; then
11382   echo $ECHO_N "(cached) $ECHO_C" >&6
11383 else
11384
11385                 cat >conftest.$ac_ext <<_ACEOF
11386 #line 11386 "configure"
11387 #include "confdefs.h"
11388
11389 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11390 #include <sys/types.h>
11391 #include <dirent.h>
11392
11393 int
11394 main (void)
11395 {
11396
11397                 /* if transitional largefile support is setup, this is true */
11398                 extern struct dirent64 * readdir(DIR *);
11399                 struct dirent64 *x = readdir((DIR *)0);
11400                 struct dirent *y = readdir((DIR *)0);
11401                 int z = x - y;
11402
11403   ;
11404   return 0;
11405 }
11406 _ACEOF
11407 rm -f conftest.$ac_objext
11408 if { (eval echo "$as_me:11408: \"$ac_compile\"") >&5
11409   (eval $ac_compile) 2>&5
11410   ac_status=$?
11411   echo "$as_me:11411: \$? = $ac_status" >&5
11412   (exit $ac_status); } &&
11413          { ac_try='test -s conftest.$ac_objext'
11414   { (eval echo "$as_me:11414: \"$ac_try\"") >&5
11415   (eval $ac_try) 2>&5
11416   ac_status=$?
11417   echo "$as_me:11417: \$? = $ac_status" >&5
11418   (exit $ac_status); }; }; then
11419   cf_cv_struct_dirent64=yes
11420 else
11421   echo "$as_me: failed program was:" >&5
11422 cat conftest.$ac_ext >&5
11423 cf_cv_struct_dirent64=no
11424 fi
11425 rm -f conftest.$ac_objext conftest.$ac_ext
11426
11427 fi
11428 echo "$as_me:11428: result: $cf_cv_struct_dirent64" >&5
11429 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11430         test "$cf_cv_struct_dirent64" = yes &&
11431 cat >>confdefs.h <<\EOF
11432 #define HAVE_STRUCT_DIRENT64 1
11433 EOF
11434
11435         fi
11436
11437 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11438 echo "$as_me:11438: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11439 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11440
11441 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11442 if test "${enable_tparm_varargs+set}" = set; then
11443   enableval="$enable_tparm_varargs"
11444   with_tparm_varargs=$enableval
11445 else
11446   with_tparm_varargs=yes
11447 fi;
11448 echo "$as_me:11448: result: $with_tparm_varargs" >&5
11449 echo "${ECHO_T}$with_tparm_varargs" >&6
11450 NCURSES_TPARM_VARARGS=0
11451 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11452
11453 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11454 if test "$with_ticlib" != no ; then
11455 echo "$as_me:11455: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11456 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11457
11458 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11459 if test "${enable_tic_depends+set}" = set; then
11460   enableval="$enable_tic_depends"
11461   with_tic_depends=$enableval
11462 else
11463   with_tic_depends=yes
11464 fi;
11465 echo "$as_me:11465: result: $with_tic_depends" >&5
11466 echo "${ECHO_T}$with_tic_depends" >&6
11467 else
11468         with_tic_depends=no
11469 fi
11470
11471 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11472 echo "$as_me:11472: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11473 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11474
11475 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11476 if test "${enable_wattr_macros+set}" = set; then
11477   enableval="$enable_wattr_macros"
11478   with_wattr_macros=$enableval
11479 else
11480   with_wattr_macros=yes
11481 fi;
11482 if [ "x$with_wattr_macros" != xyes ]; then
11483         NCURSES_WATTR_MACROS=0
11484         echo "$as_me:11484: result: yes" >&5
11485 echo "${ECHO_T}yes" >&6
11486 else
11487         NCURSES_WATTR_MACROS=1
11488         echo "$as_me:11488: result: no" >&5
11489 echo "${ECHO_T}no" >&6
11490 fi
11491
11492 echo "$as_me:11492: checking for X11 rgb file" >&5
11493 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
11494
11495 # Check whether --with-x11-rgb or --without-x11-rgb was given.
11496 if test "${with_x11_rgb+set}" = set; then
11497   withval="$with_x11_rgb"
11498   RGB_PATH=$withval
11499 else
11500   RGB_PATH=auto
11501 fi;
11502
11503 if test "x$RGB_PATH" = xauto
11504 then
11505         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
11506         for cf_path in \
11507                 /opt/local/share/X11/rgb.txt \
11508                 /opt/X11/share/X11/rgb.txt \
11509                 /usr/share/X11/rgb.txt \
11510                 /usr/X11/share/X11/rgb.txt \
11511                 /usr/X11/lib/X11/rgb.txt \
11512                 /usr/lib/X11/rgb.txt \
11513                 /etc/X11/rgb.txt \
11514                 /usr/pkg/lib/X11/rgb.txt \
11515                 /usr/X11R7/lib/X11/rgb.txt \
11516                 /usr/X11R6/lib/X11/rgb.txt \
11517                 /usr/X11R5/lib/X11/rgb.txt \
11518                 /usr/X11R4/lib/X11/rgb.txt \
11519                 /usr/local/lib/X11/rgb.txt \
11520                 /usr/local/share/X11/rgb.txt \
11521                 /usr/lib64/X11/rgb.txt
11522         do
11523                 if test -f "$cf_path" ; then
11524                         RGB_PATH="$cf_path"
11525                         break
11526                 fi
11527         done
11528 else
11529         cf_path=$RGB_PATH
11530
11531 if test "x$prefix" != xNONE; then
11532         cf_path_syntax="$prefix"
11533 else
11534         cf_path_syntax="$ac_default_prefix"
11535 fi
11536
11537 case ".$cf_path" in
11538 (.\$\(*\)*|.\'*\'*)
11539         ;;
11540 (..|./*|.\\*)
11541         ;;
11542 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11543         ;;
11544 (.\${*prefix}*|.\${*dir}*)
11545         eval cf_path="$cf_path"
11546         case ".$cf_path" in
11547         (.NONE/*)
11548                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11549                 ;;
11550         esac
11551         ;;
11552 (.no|.NONE/*)
11553         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11554         ;;
11555 (*)
11556         { { echo "$as_me:11556: error: expected a pathname, not \"$cf_path\"" >&5
11557 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
11558    { (exit 1); exit 1; }; }
11559         ;;
11560 esac
11561
11562 fi
11563
11564 echo "$as_me:11564: result: $RGB_PATH" >&5
11565 echo "${ECHO_T}$RGB_PATH" >&6
11566
11567 cat >>confdefs.h <<EOF
11568 #define RGB_PATH "$cf_path"
11569 EOF
11570
11571 no_x11_rgb=
11572 if test "$RGB_PATH" = no
11573 then
11574         no_x11_rgb="#"
11575 fi
11576
11577 ###   use option --with-bool to override bool's type
11578 echo "$as_me:11578: checking for type of bool" >&5
11579 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11580
11581 # Check whether --with-bool or --without-bool was given.
11582 if test "${with_bool+set}" = set; then
11583   withval="$with_bool"
11584   NCURSES_BOOL="$withval"
11585 else
11586   NCURSES_BOOL=auto
11587 fi;
11588 echo "$as_me:11588: result: $NCURSES_BOOL" >&5
11589 echo "${ECHO_T}$NCURSES_BOOL" >&6
11590
11591 echo "$as_me:11591: checking for alternate terminal capabilities file" >&5
11592 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11593
11594 # Check whether --with-caps or --without-caps was given.
11595 if test "${with_caps+set}" = set; then
11596   withval="$with_caps"
11597   TERMINFO_CAPS=Caps.$withval
11598 else
11599   TERMINFO_CAPS=Caps
11600 fi;
11601 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11602 echo "$as_me:11602: result: $TERMINFO_CAPS" >&5
11603 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11604
11605 ###   use option --with-chtype to override chtype's type
11606 echo "$as_me:11606: checking for type of chtype" >&5
11607 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11608
11609 # Check whether --with-chtype or --without-chtype was given.
11610 if test "${with_chtype+set}" = set; then
11611   withval="$with_chtype"
11612   NCURSES_CHTYPE="$withval"
11613 else
11614   NCURSES_CHTYPE=$cf_dft_chtype
11615 fi;
11616 echo "$as_me:11616: result: $NCURSES_CHTYPE" >&5
11617 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11618
11619 ###   use option --with-ospeed to override ospeed's type
11620 echo "$as_me:11620: checking for type of ospeed" >&5
11621 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11622
11623 # Check whether --with-ospeed or --without-ospeed was given.
11624 if test "${with_ospeed+set}" = set; then
11625   withval="$with_ospeed"
11626   NCURSES_OSPEED="$withval"
11627 else
11628   NCURSES_OSPEED=short
11629 fi;
11630 echo "$as_me:11630: result: $NCURSES_OSPEED" >&5
11631 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11632
11633 ###   use option --with-mmask-t to override mmask_t's type
11634 echo "$as_me:11634: checking for type of mmask_t" >&5
11635 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11636
11637 # Check whether --with-mmask-t or --without-mmask-t was given.
11638 if test "${with_mmask_t+set}" = set; then
11639   withval="$with_mmask_t"
11640   NCURSES_MMASK_T="$withval"
11641 else
11642   NCURSES_MMASK_T=$cf_dft_mmask_t
11643 fi;
11644 echo "$as_me:11644: result: $NCURSES_MMASK_T" >&5
11645 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11646
11647 ###   use option --with-ccharw-max to override CCHARW_MAX size
11648 echo "$as_me:11648: checking for size CCHARW_MAX" >&5
11649 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11650
11651 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11652 if test "${with_ccharw_max+set}" = set; then
11653   withval="$with_ccharw_max"
11654   NCURSES_CCHARW_MAX="$withval"
11655 else
11656   NCURSES_CCHARW_MAX=5
11657 fi;
11658 echo "$as_me:11658: result: $NCURSES_CCHARW_MAX" >&5
11659 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11660
11661 echo "$as_me:11661: checking for ANSI C header files" >&5
11662 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11663 if test "${ac_cv_header_stdc+set}" = set; then
11664   echo $ECHO_N "(cached) $ECHO_C" >&6
11665 else
11666   cat >conftest.$ac_ext <<_ACEOF
11667 #line 11667 "configure"
11668 #include "confdefs.h"
11669 #include <stdlib.h>
11670 #include <stdarg.h>
11671 #include <string.h>
11672 #include <float.h>
11673
11674 _ACEOF
11675 if { (eval echo "$as_me:11675: \"$ac_cpp conftest.$ac_ext\"") >&5
11676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11677   ac_status=$?
11678   egrep -v '^ *\+' conftest.er1 >conftest.err
11679   rm -f conftest.er1
11680   cat conftest.err >&5
11681   echo "$as_me:11681: \$? = $ac_status" >&5
11682   (exit $ac_status); } >/dev/null; then
11683   if test -s conftest.err; then
11684     ac_cpp_err=$ac_c_preproc_warn_flag
11685   else
11686     ac_cpp_err=
11687   fi
11688 else
11689   ac_cpp_err=yes
11690 fi
11691 if test -z "$ac_cpp_err"; then
11692   ac_cv_header_stdc=yes
11693 else
11694   echo "$as_me: failed program was:" >&5
11695   cat conftest.$ac_ext >&5
11696   ac_cv_header_stdc=no
11697 fi
11698 rm -f conftest.err conftest.$ac_ext
11699
11700 if test $ac_cv_header_stdc = yes; then
11701   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11702   cat >conftest.$ac_ext <<_ACEOF
11703 #line 11703 "configure"
11704 #include "confdefs.h"
11705 #include <string.h>
11706
11707 _ACEOF
11708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11709   egrep "memchr" >/dev/null 2>&1; then
11710   :
11711 else
11712   ac_cv_header_stdc=no
11713 fi
11714 rm -rf conftest*
11715
11716 fi
11717
11718 if test $ac_cv_header_stdc = yes; then
11719   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11720   cat >conftest.$ac_ext <<_ACEOF
11721 #line 11721 "configure"
11722 #include "confdefs.h"
11723 #include <stdlib.h>
11724
11725 _ACEOF
11726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11727   egrep "free" >/dev/null 2>&1; then
11728   :
11729 else
11730   ac_cv_header_stdc=no
11731 fi
11732 rm -rf conftest*
11733
11734 fi
11735
11736 if test $ac_cv_header_stdc = yes; then
11737   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11738   if test "$cross_compiling" = yes; then
11739   :
11740 else
11741   cat >conftest.$ac_ext <<_ACEOF
11742 #line 11742 "configure"
11743 #include "confdefs.h"
11744 #include <ctype.h>
11745 #if ((' ' & 0x0FF) == 0x020)
11746 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11747 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11748 #else
11749 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11750                      || ('j' <= (c) && (c) <= 'r') \
11751                      || ('s' <= (c) && (c) <= 'z'))
11752 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11753 #endif
11754
11755 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11756 int
11757 main (void)
11758 {
11759   int i;
11760   for (i = 0; i < 256; i++)
11761     if (XOR (islower (i), ISLOWER (i))
11762         || toupper (i) != TOUPPER (i))
11763       $ac_main_return(2);
11764   $ac_main_return (0);
11765 }
11766 _ACEOF
11767 rm -f conftest$ac_exeext
11768 if { (eval echo "$as_me:11768: \"$ac_link\"") >&5
11769   (eval $ac_link) 2>&5
11770   ac_status=$?
11771   echo "$as_me:11771: \$? = $ac_status" >&5
11772   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11773   { (eval echo "$as_me:11773: \"$ac_try\"") >&5
11774   (eval $ac_try) 2>&5
11775   ac_status=$?
11776   echo "$as_me:11776: \$? = $ac_status" >&5
11777   (exit $ac_status); }; }; then
11778   :
11779 else
11780   echo "$as_me: program exited with status $ac_status" >&5
11781 echo "$as_me: failed program was:" >&5
11782 cat conftest.$ac_ext >&5
11783 ac_cv_header_stdc=no
11784 fi
11785 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11786 fi
11787 fi
11788 fi
11789 echo "$as_me:11789: result: $ac_cv_header_stdc" >&5
11790 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11791 if test $ac_cv_header_stdc = yes; then
11792
11793 cat >>confdefs.h <<\EOF
11794 #define STDC_HEADERS 1
11795 EOF
11796
11797 fi
11798
11799 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11800
11801 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11802                   inttypes.h stdint.h unistd.h
11803 do
11804 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11805 echo "$as_me:11805: checking for $ac_header" >&5
11806 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11807 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11808   echo $ECHO_N "(cached) $ECHO_C" >&6
11809 else
11810   cat >conftest.$ac_ext <<_ACEOF
11811 #line 11811 "configure"
11812 #include "confdefs.h"
11813 $ac_includes_default
11814 #include <$ac_header>
11815 _ACEOF
11816 rm -f conftest.$ac_objext
11817 if { (eval echo "$as_me:11817: \"$ac_compile\"") >&5
11818   (eval $ac_compile) 2>&5
11819   ac_status=$?
11820   echo "$as_me:11820: \$? = $ac_status" >&5
11821   (exit $ac_status); } &&
11822          { ac_try='test -s conftest.$ac_objext'
11823   { (eval echo "$as_me:11823: \"$ac_try\"") >&5
11824   (eval $ac_try) 2>&5
11825   ac_status=$?
11826   echo "$as_me:11826: \$? = $ac_status" >&5
11827   (exit $ac_status); }; }; then
11828   eval "$as_ac_Header=yes"
11829 else
11830   echo "$as_me: failed program was:" >&5
11831 cat conftest.$ac_ext >&5
11832 eval "$as_ac_Header=no"
11833 fi
11834 rm -f conftest.$ac_objext conftest.$ac_ext
11835 fi
11836 echo "$as_me:11836: result: `eval echo '${'$as_ac_Header'}'`" >&5
11837 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11838 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11839   cat >>confdefs.h <<EOF
11840 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11841 EOF
11842
11843 fi
11844 done
11845
11846 echo "$as_me:11846: checking for signed char" >&5
11847 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11848 if test "${ac_cv_type_signed_char+set}" = set; then
11849   echo $ECHO_N "(cached) $ECHO_C" >&6
11850 else
11851   cat >conftest.$ac_ext <<_ACEOF
11852 #line 11852 "configure"
11853 #include "confdefs.h"
11854 $ac_includes_default
11855 int
11856 main (void)
11857 {
11858 if ((signed char *) 0)
11859   return 0;
11860 if (sizeof (signed char))
11861   return 0;
11862   ;
11863   return 0;
11864 }
11865 _ACEOF
11866 rm -f conftest.$ac_objext
11867 if { (eval echo "$as_me:11867: \"$ac_compile\"") >&5
11868   (eval $ac_compile) 2>&5
11869   ac_status=$?
11870   echo "$as_me:11870: \$? = $ac_status" >&5
11871   (exit $ac_status); } &&
11872          { ac_try='test -s conftest.$ac_objext'
11873   { (eval echo "$as_me:11873: \"$ac_try\"") >&5
11874   (eval $ac_try) 2>&5
11875   ac_status=$?
11876   echo "$as_me:11876: \$? = $ac_status" >&5
11877   (exit $ac_status); }; }; then
11878   ac_cv_type_signed_char=yes
11879 else
11880   echo "$as_me: failed program was:" >&5
11881 cat conftest.$ac_ext >&5
11882 ac_cv_type_signed_char=no
11883 fi
11884 rm -f conftest.$ac_objext conftest.$ac_ext
11885 fi
11886 echo "$as_me:11886: result: $ac_cv_type_signed_char" >&5
11887 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11888
11889 echo "$as_me:11889: checking size of signed char" >&5
11890 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11891 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11892   echo $ECHO_N "(cached) $ECHO_C" >&6
11893 else
11894   if test "$ac_cv_type_signed_char" = yes; then
11895   if test "$cross_compiling" = yes; then
11896   # Depending upon the size, compute the lo and hi bounds.
11897 cat >conftest.$ac_ext <<_ACEOF
11898 #line 11898 "configure"
11899 #include "confdefs.h"
11900 $ac_includes_default
11901 int
11902 main (void)
11903 {
11904 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11905   ;
11906   return 0;
11907 }
11908 _ACEOF
11909 rm -f conftest.$ac_objext
11910 if { (eval echo "$as_me:11910: \"$ac_compile\"") >&5
11911   (eval $ac_compile) 2>&5
11912   ac_status=$?
11913   echo "$as_me:11913: \$? = $ac_status" >&5
11914   (exit $ac_status); } &&
11915          { ac_try='test -s conftest.$ac_objext'
11916   { (eval echo "$as_me:11916: \"$ac_try\"") >&5
11917   (eval $ac_try) 2>&5
11918   ac_status=$?
11919   echo "$as_me:11919: \$? = $ac_status" >&5
11920   (exit $ac_status); }; }; then
11921   ac_lo=0 ac_mid=0
11922   while :; do
11923     cat >conftest.$ac_ext <<_ACEOF
11924 #line 11924 "configure"
11925 #include "confdefs.h"
11926 $ac_includes_default
11927 int
11928 main (void)
11929 {
11930 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11931   ;
11932   return 0;
11933 }
11934 _ACEOF
11935 rm -f conftest.$ac_objext
11936 if { (eval echo "$as_me:11936: \"$ac_compile\"") >&5
11937   (eval $ac_compile) 2>&5
11938   ac_status=$?
11939   echo "$as_me:11939: \$? = $ac_status" >&5
11940   (exit $ac_status); } &&
11941          { ac_try='test -s conftest.$ac_objext'
11942   { (eval echo "$as_me:11942: \"$ac_try\"") >&5
11943   (eval $ac_try) 2>&5
11944   ac_status=$?
11945   echo "$as_me:11945: \$? = $ac_status" >&5
11946   (exit $ac_status); }; }; then
11947   ac_hi=$ac_mid; break
11948 else
11949   echo "$as_me: failed program was:" >&5
11950 cat conftest.$ac_ext >&5
11951 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11952 fi
11953 rm -f conftest.$ac_objext conftest.$ac_ext
11954   done
11955 else
11956   echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11958 ac_hi=-1 ac_mid=-1
11959   while :; do
11960     cat >conftest.$ac_ext <<_ACEOF
11961 #line 11961 "configure"
11962 #include "confdefs.h"
11963 $ac_includes_default
11964 int
11965 main (void)
11966 {
11967 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11968   ;
11969   return 0;
11970 }
11971 _ACEOF
11972 rm -f conftest.$ac_objext
11973 if { (eval echo "$as_me:11973: \"$ac_compile\"") >&5
11974   (eval $ac_compile) 2>&5
11975   ac_status=$?
11976   echo "$as_me:11976: \$? = $ac_status" >&5
11977   (exit $ac_status); } &&
11978          { ac_try='test -s conftest.$ac_objext'
11979   { (eval echo "$as_me:11979: \"$ac_try\"") >&5
11980   (eval $ac_try) 2>&5
11981   ac_status=$?
11982   echo "$as_me:11982: \$? = $ac_status" >&5
11983   (exit $ac_status); }; }; then
11984   ac_lo=$ac_mid; break
11985 else
11986   echo "$as_me: failed program was:" >&5
11987 cat conftest.$ac_ext >&5
11988 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11989 fi
11990 rm -f conftest.$ac_objext conftest.$ac_ext
11991   done
11992 fi
11993 rm -f conftest.$ac_objext conftest.$ac_ext
11994 # Binary search between lo and hi bounds.
11995 while test "x$ac_lo" != "x$ac_hi"; do
11996   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11997   cat >conftest.$ac_ext <<_ACEOF
11998 #line 11998 "configure"
11999 #include "confdefs.h"
12000 $ac_includes_default
12001 int
12002 main (void)
12003 {
12004 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12005   ;
12006   return 0;
12007 }
12008 _ACEOF
12009 rm -f conftest.$ac_objext
12010 if { (eval echo "$as_me:12010: \"$ac_compile\"") >&5
12011   (eval $ac_compile) 2>&5
12012   ac_status=$?
12013   echo "$as_me:12013: \$? = $ac_status" >&5
12014   (exit $ac_status); } &&
12015          { ac_try='test -s conftest.$ac_objext'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); }; }; then
12021   ac_hi=$ac_mid
12022 else
12023   echo "$as_me: failed program was:" >&5
12024 cat conftest.$ac_ext >&5
12025 ac_lo=`expr $ac_mid + 1`
12026 fi
12027 rm -f conftest.$ac_objext conftest.$ac_ext
12028 done
12029 ac_cv_sizeof_signed_char=$ac_lo
12030 else
12031   if test "$cross_compiling" = yes; then
12032   { { echo "$as_me:12032: error: cannot run test program while cross compiling" >&5
12033 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12034    { (exit 1); exit 1; }; }
12035 else
12036   cat >conftest.$ac_ext <<_ACEOF
12037 #line 12037 "configure"
12038 #include "confdefs.h"
12039 $ac_includes_default
12040 int
12041 main (void)
12042 {
12043 FILE *f = fopen ("conftest.val", "w");
12044 if (!f)
12045   $ac_main_return (1);
12046 fprintf (f, "%d", (sizeof (signed char)));
12047 fclose (f);
12048   ;
12049   return 0;
12050 }
12051 _ACEOF
12052 rm -f conftest$ac_exeext
12053 if { (eval echo "$as_me:12053: \"$ac_link\"") >&5
12054   (eval $ac_link) 2>&5
12055   ac_status=$?
12056   echo "$as_me:12056: \$? = $ac_status" >&5
12057   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12058   { (eval echo "$as_me:12058: \"$ac_try\"") >&5
12059   (eval $ac_try) 2>&5
12060   ac_status=$?
12061   echo "$as_me:12061: \$? = $ac_status" >&5
12062   (exit $ac_status); }; }; then
12063   ac_cv_sizeof_signed_char=`cat conftest.val`
12064 else
12065   echo "$as_me: program exited with status $ac_status" >&5
12066 echo "$as_me: failed program was:" >&5
12067 cat conftest.$ac_ext >&5
12068 fi
12069 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12070 fi
12071 fi
12072 rm -f conftest.val
12073 else
12074   ac_cv_sizeof_signed_char=0
12075 fi
12076 fi
12077 echo "$as_me:12077: result: $ac_cv_sizeof_signed_char" >&5
12078 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12079 cat >>confdefs.h <<EOF
12080 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12081 EOF
12082
12083 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12084         NCURSES_SBOOL="signed char"
12085 else
12086         NCURSES_SBOOL="char"
12087 fi
12088 echo "$as_me:12088: checking if you want to use signed Boolean array in term.h" >&5
12089 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12090
12091 # Check whether --enable-signed-char or --disable-signed-char was given.
12092 if test "${enable_signed_char+set}" = set; then
12093   enableval="$enable_signed_char"
12094   with_signed_char=$enableval
12095 else
12096   with_signed_char=no
12097 fi;
12098 echo "$as_me:12098: result: $with_signed_char" >&5
12099 echo "${ECHO_T}$with_signed_char" >&6
12100 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12101
12102 ###   use option --with-tparm-arg to override tparm's argument type
12103 echo "$as_me:12103: checking for type of tparm args" >&5
12104 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
12105
12106 # Check whether --with-tparm-arg or --without-tparm-arg was given.
12107 if test "${with_tparm_arg+set}" = set; then
12108   withval="$with_tparm_arg"
12109   NCURSES_TPARM_ARG="$withval"
12110 else
12111   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
12112 fi;
12113 echo "$as_me:12113: result: $NCURSES_TPARM_ARG" >&5
12114 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
12115
12116 ### Enable compiling-in rcs id's
12117 echo "$as_me:12117: checking if RCS identifiers should be compiled-in" >&5
12118 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
12119
12120 # Check whether --with-rcs-ids or --without-rcs-ids was given.
12121 if test "${with_rcs_ids+set}" = set; then
12122   withval="$with_rcs_ids"
12123   with_rcs_ids=$withval
12124 else
12125   with_rcs_ids=no
12126 fi;
12127 echo "$as_me:12127: result: $with_rcs_ids" >&5
12128 echo "${ECHO_T}$with_rcs_ids" >&6
12129 test "x$with_rcs_ids" = xyes &&
12130 cat >>confdefs.h <<\EOF
12131 #define USE_RCS_IDS 1
12132 EOF
12133
12134 ###############################################################################
12135
12136 echo "$as_me:12136: checking format of man-pages" >&5
12137 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
12138
12139 # Check whether --with-manpage-format or --without-manpage-format was given.
12140 if test "${with_manpage_format+set}" = set; then
12141   withval="$with_manpage_format"
12142   MANPAGE_FORMAT=$withval
12143 else
12144   MANPAGE_FORMAT=unknown
12145 fi;
12146
12147 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
12148 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
12149
12150 cf_unknown=
12151
12152 case $MANPAGE_FORMAT in
12153 (unknown)
12154         if test -z "$MANPATH" ; then
12155                 MANPATH="/usr/man:/usr/share/man"
12156         fi
12157
12158         # look for the 'date' man-page (it's most likely to be installed!)
12159         MANPAGE_FORMAT=
12160         cf_preform=no
12161         cf_catonly=yes
12162         cf_example=date
12163
12164         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
12165         for cf_dir in $MANPATH; do
12166                 test -z "$cf_dir" && cf_dir=/usr/man
12167                 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
12168                 do
12169                         cf_test=`echo $cf_name | sed -e 's/*//'`
12170                         if test "x$cf_test" = "x$cf_name" ; then
12171
12172                                 case "$cf_name" in
12173                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
12174                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
12175                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
12176                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
12177                                 esac
12178
12179                                 case "$cf_name" in
12180                                 ($cf_dir/man*)
12181                                         cf_catonly=no
12182                                         ;;
12183                                 ($cf_dir/cat*)
12184                                         cf_preform=yes
12185                                         ;;
12186                                 esac
12187                                 break
12188                         fi
12189
12190                         # if we found a match in either man* or cat*, stop looking
12191                         if test -n "$MANPAGE_FORMAT" ; then
12192                                 cf_found=no
12193                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
12194                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
12195                                 case "$cf_name" in
12196                                 ($cf_dir/cat*)
12197                                         cf_found=yes
12198                                         ;;
12199                                 esac
12200                                 test $cf_found=yes && break
12201                         fi
12202                 done
12203                 # only check the first directory in $MANPATH where we find manpages
12204                 if test -n "$MANPAGE_FORMAT" ; then
12205                         break
12206                 fi
12207         done
12208         # if we did not find the example, just assume it is normal
12209         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
12210         IFS="$ac_save_ifs"
12211         ;;
12212 (*)
12213         for cf_option in $MANPAGE_FORMAT; do
12214         case $cf_option in
12215         (gzip|compress|BSDI|normal|formatted|catonly)
12216                 ;;
12217         (*)
12218                 cf_unknown="$cf_unknown $cf_option"
12219                 ;;
12220         esac
12221         done
12222         ;;
12223 esac
12224
12225 echo "$as_me:12225: result: $MANPAGE_FORMAT" >&5
12226 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
12227 if test -n "$cf_unknown" ; then
12228         { echo "$as_me:12228: WARNING: Unexpected manpage-format $cf_unknown" >&5
12229 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
12230 fi
12231
12232 echo "$as_me:12232: checking for manpage renaming" >&5
12233 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
12234
12235 # Check whether --with-manpage-renames or --without-manpage-renames was given.
12236 if test "${with_manpage_renames+set}" = set; then
12237   withval="$with_manpage_renames"
12238   MANPAGE_RENAMES=$withval
12239 else
12240   MANPAGE_RENAMES=yes
12241 fi;
12242
12243 case ".$MANPAGE_RENAMES" in
12244 (.no)
12245         ;;
12246 (.|.yes)
12247         # Debian 'man' program?
12248         if test -f /etc/debian_version ; then
12249                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
12250         else
12251                 MANPAGE_RENAMES=no
12252         fi
12253         ;;
12254 esac
12255
12256 if test "$MANPAGE_RENAMES" != no ; then
12257         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
12258                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
12259         elif test ! -f $MANPAGE_RENAMES ; then
12260                 { { echo "$as_me:12260: error: not a filename: $MANPAGE_RENAMES" >&5
12261 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
12262    { (exit 1); exit 1; }; }
12263         fi
12264
12265         test ! -d man && mkdir man
12266
12267         # Construct a sed-script to perform renaming within man-pages
12268         if test -n "$MANPAGE_RENAMES" ; then
12269                 test ! -d man && mkdir man
12270                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
12271         fi
12272 fi
12273
12274 echo "$as_me:12274: result: $MANPAGE_RENAMES" >&5
12275 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
12276
12277 echo "$as_me:12277: checking if manpage aliases will be installed" >&5
12278 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
12279
12280 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
12281 if test "${with_manpage_aliases+set}" = set; then
12282   withval="$with_manpage_aliases"
12283   MANPAGE_ALIASES=$withval
12284 else
12285   MANPAGE_ALIASES=yes
12286 fi;
12287
12288 echo "$as_me:12288: result: $MANPAGE_ALIASES" >&5
12289 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
12290
12291 case "x$LN_S" in
12292 (xln*)
12293         cf_use_symlinks=yes
12294         ;;
12295 (*)
12296         cf_use_symlinks=no
12297         ;;
12298 esac
12299
12300 MANPAGE_SYMLINKS=no
12301 if test "$MANPAGE_ALIASES" = yes ; then
12302 echo "$as_me:12302: checking if manpage symlinks should be used" >&5
12303 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
12304
12305 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
12306 if test "${with_manpage_symlinks+set}" = set; then
12307   withval="$with_manpage_symlinks"
12308   MANPAGE_SYMLINKS=$withval
12309 else
12310   MANPAGE_SYMLINKS=$cf_use_symlinks
12311 fi;
12312
12313 if test "$$cf_use_symlinks" = no; then
12314 if test "$MANPAGE_SYMLINKS" = yes ; then
12315         { echo "$as_me:12315: WARNING: cannot make symlinks" >&5
12316 echo "$as_me: WARNING: cannot make symlinks" >&2;}
12317         MANPAGE_SYMLINKS=no
12318 fi
12319 fi
12320
12321 echo "$as_me:12321: result: $MANPAGE_SYMLINKS" >&5
12322 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
12323 fi
12324
12325 echo "$as_me:12325: checking for manpage tbl" >&5
12326 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
12327
12328 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
12329 if test "${with_manpage_tbl+set}" = set; then
12330   withval="$with_manpage_tbl"
12331   MANPAGE_TBL=$withval
12332 else
12333   MANPAGE_TBL=no
12334 fi;
12335
12336 echo "$as_me:12336: result: $MANPAGE_TBL" >&5
12337 echo "${ECHO_T}$MANPAGE_TBL" >&6
12338
12339 if test "$prefix" = "NONE" ; then
12340         cf_prefix="$ac_default_prefix"
12341 else
12342         cf_prefix="$prefix"
12343 fi
12344
12345 case "$MANPAGE_FORMAT" in
12346 (*catonly*)
12347         cf_format=yes
12348         cf_inboth=no
12349         ;;
12350 (*formatted*)
12351         cf_format=yes
12352         cf_inboth=yes
12353         ;;
12354 (*)
12355         cf_format=no
12356         cf_inboth=no
12357         ;;
12358 esac
12359
12360 test ! -d man && mkdir man
12361
12362 cf_so_strip=
12363 cf_compress=
12364 case "$MANPAGE_FORMAT" in
12365 (*compress*)
12366         cf_so_strip="Z"
12367         cf_compress=compress
12368         ;;
12369 (*gzip*)
12370         cf_so_strip="gz"
12371         cf_compress=gzip
12372         ;;
12373 esac
12374
12375 cf_edit_man=./edit_man.sh
12376 cf_man_alias=`pwd`/man_alias.sed
12377
12378 cat >$cf_edit_man <<CF_EOF
12379 #! $SHELL
12380 # this script is generated by the configure-script CF_MAN_PAGES macro.
12381
12382 prefix="$cf_prefix"
12383 datarootdir="$datarootdir"
12384 datadir="$datadir"
12385
12386 NCURSES_MAJOR="$NCURSES_MAJOR"
12387 NCURSES_MINOR="$NCURSES_MINOR"
12388 NCURSES_PATCH="$NCURSES_PATCH"
12389
12390 NCURSES_OSPEED="$NCURSES_OSPEED"
12391 TERMINFO="$TERMINFO"
12392
12393 INSTALL="$INSTALL"
12394 INSTALL_DATA="$INSTALL_DATA"
12395
12396 transform="$program_transform_name"
12397
12398 TMP=\${TMPDIR:=/tmp}/man\$\$
12399 trap "rm -f \$TMP" 0 1 2 3 15
12400
12401 form=\$1
12402 shift || exit 1
12403
12404 verb=\$1
12405 shift || exit 1
12406
12407 mandir=\$1
12408 shift || exit 1
12409
12410 srcdir=\$1
12411 top_srcdir=\$srcdir/..
12412 shift || exit 1
12413
12414 if test "\$form" = normal ; then
12415         if test "$cf_format" = yes ; then
12416         if test "$cf_inboth" = no ; then
12417                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12418                 exit $?
12419         fi
12420         fi
12421         cf_subdir=\$mandir/man
12422         cf_tables=$MANPAGE_TBL
12423 else
12424         cf_subdir=\$mandir/cat
12425         cf_tables=yes
12426 fi
12427
12428 # process the list of source-files
12429 for i in \$* ; do
12430 case \$i in
12431 (*.orig|*.rej) ;;
12432 (*.[0-9]*)
12433         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
12434         if test \$verb = installing ; then
12435         if test ! -d \$cf_subdir\${section} ; then
12436                 mkdir -p \$cf_subdir\$section
12437         fi
12438         fi
12439
12440         # replace variables in man page
12441         if test ! -f $cf_man_alias ; then
12442 cat >>$cf_man_alias <<-CF_EOF2
12443                 s,@DATADIR@,\$datadir,g
12444                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
12445                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
12446                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
12447                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
12448                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
12449                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
12450 CF_EOF
12451
12452         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
12453         do
12454                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12455                 cf_name=`echo $cf_name|sed "$program_transform_name"`
12456 cat >>$cf_edit_man <<-CF_EOF
12457                 s,@$cf_NAME@,$cf_name,g
12458 CF_EOF
12459         done
12460
12461 cat >>$cf_edit_man <<CF_EOF
12462 CF_EOF2
12463                 echo "...made $cf_man_alias"
12464         fi
12465
12466         aliases=
12467         cf_source=\`basename \$i\`
12468         inalias=\$cf_source
12469         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
12470         if test ! -f \$inalias ; then
12471                 echo .. skipped \$cf_source
12472                 continue
12473         fi
12474 CF_EOF
12475
12476 if test "$MANPAGE_ALIASES" != no ; then
12477 cat >>$cf_edit_man <<CF_EOF
12478         nCurses=ignore.3x
12479         test $with_curses_h = yes && nCurses=ncurses.3x
12480         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
12481 CF_EOF
12482 fi
12483
12484 if test "$MANPAGE_RENAMES" = no ; then
12485 cat >>$cf_edit_man <<CF_EOF
12486         # perform program transformations for section 1 man pages
12487         if test \$section = 1 ; then
12488                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
12489         else
12490                 cf_target=\$cf_subdir\${section}/\$cf_source
12491         fi
12492 CF_EOF
12493 else
12494 cat >>$cf_edit_man <<CF_EOF
12495         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
12496         if test -z "\$cf_target" ; then
12497                 echo '? missing rename for '\$cf_source
12498                 cf_target="\$cf_source"
12499         fi
12500         cf_target="\$cf_subdir\${section}/\${cf_target}"
12501
12502 CF_EOF
12503 fi
12504
12505 cat >>$cf_edit_man <<CF_EOF
12506         sed     -f $cf_man_alias \\
12507 CF_EOF
12508
12509 if test -f $MANPAGE_RENAMES ; then
12510 cat >>$cf_edit_man <<CF_EOF
12511                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
12512 CF_EOF
12513 else
12514 cat >>$cf_edit_man <<CF_EOF
12515                 < \$i >\$TMP
12516 CF_EOF
12517 fi
12518
12519 cat >>$cf_edit_man <<CF_EOF
12520 if test \$cf_tables = yes ; then
12521         tbl \$TMP >\$TMP.out
12522         mv \$TMP.out \$TMP
12523 fi
12524 CF_EOF
12525
12526 if test $with_overwrite != yes ; then
12527 cat >>$cf_edit_man <<CF_EOF
12528         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
12529         mv \$TMP.out \$TMP
12530 CF_EOF
12531 fi
12532
12533 if test $with_curses_h != yes ; then
12534 cat >>$cf_edit_man <<CF_EOF
12535         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
12536         mv \$TMP.out \$TMP
12537 CF_EOF
12538 fi
12539
12540 cat >>$cf_edit_man <<CF_EOF
12541         if test \$form = format ; then
12542                 nroff -man \$TMP >\$TMP.out
12543                 mv \$TMP.out \$TMP
12544         fi
12545 CF_EOF
12546
12547 if test -n "$cf_compress" ; then
12548 cat >>$cf_edit_man <<CF_EOF
12549         if test \$verb = installing ; then
12550         if ( $cf_compress -f \$TMP )
12551         then
12552                 mv \$TMP.$cf_so_strip \$TMP
12553         fi
12554         fi
12555         cf_target="\$cf_target.$cf_so_strip"
12556 CF_EOF
12557 fi
12558
12559 case "$MANPAGE_FORMAT" in
12560 (*BSDI*)
12561 cat >>$cf_edit_man <<CF_EOF
12562         if test \$form = format ; then
12563                 # BSDI installs only .0 suffixes in the cat directories
12564                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
12565         fi
12566 CF_EOF
12567   ;;
12568 esac
12569
12570 cat >>$cf_edit_man <<CF_EOF
12571         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
12572         if test \$verb = installing ; then
12573                 echo \$verb \$cf_target
12574                 \$INSTALL_DATA \$TMP \$cf_target
12575                 test -d \$cf_subdir\${section} &&
12576                 test -n "\$aliases" && (
12577                         cd \$cf_subdir\${section} && (
12578                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
12579                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
12580                                 cf_target=\`basename \$cf_target\`
12581                                 for cf_alias in \$aliases
12582                                 do
12583                                         if test \$section = 1 ; then
12584                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12585                                         fi
12586
12587                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12588                                                 if test -f \$cf_alias\${suffix} ; then
12589                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12590                                                         then
12591                                                                 continue
12592                                                         fi
12593                                                 fi
12594                                                 echo .. \$verb alias \$cf_alias\${suffix}
12595 CF_EOF
12596 case "x$LN_S" in
12597 (*-f)
12598 cat >>$cf_edit_man <<CF_EOF
12599                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12600 CF_EOF
12601         ;;
12602 (*)
12603 cat >>$cf_edit_man <<CF_EOF
12604                                                 rm -f \$cf_alias\${suffix}
12605                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12606 CF_EOF
12607         ;;
12608 esac
12609 cat >>$cf_edit_man <<CF_EOF
12610                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12611                                                 echo ".so \$cf_source" >\$TMP
12612 CF_EOF
12613 if test -n "$cf_compress" ; then
12614 cat >>$cf_edit_man <<CF_EOF
12615                                                 if test -n "$cf_so_strip" ; then
12616                                                         $cf_compress -f \$TMP
12617                                                         mv \$TMP.$cf_so_strip \$TMP
12618                                                 fi
12619 CF_EOF
12620 fi
12621 cat >>$cf_edit_man <<CF_EOF
12622                                                 echo .. \$verb alias \$cf_alias\${suffix}
12623                                                 rm -f \$cf_alias\${suffix}
12624                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12625                                         fi
12626                                 done
12627                         )
12628                 )
12629         elif test \$verb = removing ; then
12630                 test -f \$cf_target && (
12631                         echo \$verb \$cf_target
12632                         rm -f \$cf_target
12633                 )
12634                 test -d \$cf_subdir\${section} &&
12635                 test -n "\$aliases" && (
12636                         cd \$cf_subdir\${section} && (
12637                                 for cf_alias in \$aliases
12638                                 do
12639                                         if test \$section = 1 ; then
12640                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12641                                         fi
12642
12643                                         echo .. \$verb alias \$cf_alias\${suffix}
12644                                         rm -f \$cf_alias\${suffix}
12645                                 done
12646                         )
12647                 )
12648         else
12649 #               echo ".hy 0"
12650                 cat \$TMP
12651         fi
12652         ;;
12653 esac
12654 done
12655
12656 if test $cf_inboth = yes ; then
12657 if test \$form != format ; then
12658         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12659 fi
12660 fi
12661
12662 exit 0
12663 CF_EOF
12664 chmod 755 $cf_edit_man
12665
12666 ###############################################################################
12667
12668 ### Note that some functions (such as const) are normally disabled anyway.
12669 echo "$as_me:12669: checking if you want to build with function extensions" >&5
12670 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12671
12672 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12673 if test "${enable_ext_funcs+set}" = set; then
12674   enableval="$enable_ext_funcs"
12675   with_ext_funcs=$enableval
12676 else
12677   with_ext_funcs=yes
12678 fi;
12679 echo "$as_me:12679: result: $with_ext_funcs" >&5
12680 echo "${ECHO_T}$with_ext_funcs" >&6
12681 if test "x$with_ext_funcs" = xyes ; then
12682         NCURSES_EXT_FUNCS=1
12683
12684 cat >>confdefs.h <<\EOF
12685 #define NCURSES_EXT_FUNCS 1
12686 EOF
12687
12688 cat >>confdefs.h <<\EOF
12689 #define HAVE_ASSUME_DEFAULT_COLORS 1
12690 EOF
12691
12692 cat >>confdefs.h <<\EOF
12693 #define HAVE_CURSES_VERSION 1
12694 EOF
12695
12696 cat >>confdefs.h <<\EOF
12697 #define HAVE_HAS_KEY 1
12698 EOF
12699
12700 cat >>confdefs.h <<\EOF
12701 #define HAVE_RESIZETERM 1
12702 EOF
12703
12704 cat >>confdefs.h <<\EOF
12705 #define HAVE_RESIZE_TERM 1
12706 EOF
12707
12708 cat >>confdefs.h <<\EOF
12709 #define HAVE_TERM_ENTRY_H 1
12710 EOF
12711
12712 cat >>confdefs.h <<\EOF
12713 #define HAVE_USE_DEFAULT_COLORS 1
12714 EOF
12715
12716 cat >>confdefs.h <<\EOF
12717 #define HAVE_USE_EXTENDED_NAMES 1
12718 EOF
12719
12720 cat >>confdefs.h <<\EOF
12721 #define HAVE_USE_SCREEN 1
12722 EOF
12723
12724 cat >>confdefs.h <<\EOF
12725 #define HAVE_USE_WINDOW 1
12726 EOF
12727
12728 cat >>confdefs.h <<\EOF
12729 #define HAVE_WRESIZE 1
12730 EOF
12731
12732         GENERATED_EXT_FUNCS=generated
12733         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12734 else
12735         NCURSES_EXT_FUNCS=0
12736         GENERATED_EXT_FUNCS=
12737 fi
12738
12739 echo "$as_me:12739: checking if you want to build with SCREEN extensions" >&5
12740 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12741
12742 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12743 if test "${enable_sp_funcs+set}" = set; then
12744   enableval="$enable_sp_funcs"
12745   with_sp_funcs=$enableval
12746 else
12747   with_sp_funcs=$cf_dft_ext_spfuncs
12748 fi;
12749 echo "$as_me:12749: result: $with_sp_funcs" >&5
12750 echo "${ECHO_T}$with_sp_funcs" >&6
12751 if test "x$with_sp_funcs" = xyes ; then
12752         NCURSES_SP_FUNCS=1
12753
12754 cat >>confdefs.h <<\EOF
12755 #define NCURSES_SP_FUNCS 1
12756 EOF
12757
12758 cat >>confdefs.h <<\EOF
12759 #define HAVE_TPUTS_SP 1
12760 EOF
12761
12762         GENERATED_SP_FUNCS=generated
12763 else
12764         NCURSES_SP_FUNCS=0
12765         GENERATED_SP_FUNCS=
12766 fi
12767
12768 echo "$as_me:12768: checking if you want to build with terminal-driver" >&5
12769 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12770
12771 # Check whether --enable-term-driver or --disable-term-driver was given.
12772 if test "${enable_term_driver+set}" = set; then
12773   enableval="$enable_term_driver"
12774   with_term_driver=$enableval
12775 else
12776   with_term_driver=no
12777 fi;
12778 echo "$as_me:12778: result: $with_term_driver" >&5
12779 echo "${ECHO_T}$with_term_driver" >&6
12780 if test "x$with_term_driver" = xyes ; then
12781
12782 cat >>confdefs.h <<\EOF
12783 #define USE_TERM_DRIVER 1
12784 EOF
12785
12786         if test "x$with_termlib" != xno ; then
12787                 { { echo "$as_me:12787: error: The term-driver option conflicts with the termlib option" >&5
12788 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12789    { (exit 1); exit 1; }; }
12790         fi
12791         if test "x$with_sp_funcs" != xyes ; then
12792                 { { echo "$as_me:12792: error: The term-driver option relies upon sp-funcs" >&5
12793 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12794    { (exit 1); exit 1; }; }
12795         fi
12796 fi
12797
12798 ###   use option --enable-const to turn on use of const beyond that in XSI.
12799 echo "$as_me:12799: checking for extended use of const keyword" >&5
12800 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12801
12802 # Check whether --enable-const or --disable-const was given.
12803 if test "${enable_const+set}" = set; then
12804   enableval="$enable_const"
12805   with_ext_const=$enableval
12806 else
12807   with_ext_const=$cf_dft_ext_const
12808 fi;
12809 echo "$as_me:12809: result: $with_ext_const" >&5
12810 echo "${ECHO_T}$with_ext_const" >&6
12811 NCURSES_CONST='/*nothing*/'
12812 if test "x$with_ext_const" = xyes ; then
12813         NCURSES_CONST=const
12814 fi
12815
12816 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12817 echo "$as_me:12817: checking if you want to use extended colors" >&5
12818 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12819
12820 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12821 if test "${enable_ext_colors+set}" = set; then
12822   enableval="$enable_ext_colors"
12823   with_ext_colors=$enableval
12824 else
12825   with_ext_colors=$cf_dft_ext_colors
12826 fi;
12827 echo "$as_me:12827: result: $with_ext_colors" >&5
12828 echo "${ECHO_T}$with_ext_colors" >&6
12829 NCURSES_EXT_COLORS=0
12830 if test "x$with_ext_colors" = xyes ; then
12831         if test "x$with_widec" != xyes ; then
12832                 { echo "$as_me:12832: WARNING: This option applies only to wide-character library" >&5
12833 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12834         else
12835                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12836
12837 if test "${with_abi_version+set}" != set; then
12838         case $cf_cv_rel_version in
12839         (5.*)
12840                 cf_cv_rel_version=6.0
12841                 cf_cv_abi_version=6
12842                 { echo "$as_me:12842: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12843 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12844                 ;;
12845         esac
12846 fi
12847
12848                 NCURSES_EXT_COLORS=1
12849
12850 cat >>confdefs.h <<\EOF
12851 #define NCURSES_EXT_COLORS 1
12852 EOF
12853
12854 cat >>confdefs.h <<\EOF
12855 #define HAVE_ALLOC_PAIR 1
12856 EOF
12857
12858 cat >>confdefs.h <<\EOF
12859 #define HAVE_INIT_EXTENDED_COLOR 1
12860 EOF
12861
12862 cat >>confdefs.h <<\EOF
12863 #define HAVE_RESET_COLOR_PAIRS 1
12864 EOF
12865
12866         fi
12867 fi
12868
12869 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12870 echo "$as_me:12870: checking if you want to use extended mouse encoding" >&5
12871 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12872
12873 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12874 if test "${enable_ext_mouse+set}" = set; then
12875   enableval="$enable_ext_mouse"
12876   with_ext_mouse=$enableval
12877 else
12878   with_ext_mouse=$cf_dft_ext_mouse
12879 fi;
12880 echo "$as_me:12880: result: $with_ext_mouse" >&5
12881 echo "${ECHO_T}$with_ext_mouse" >&6
12882 NCURSES_MOUSE_VERSION=1
12883 if test "x$with_ext_mouse" = xyes ; then
12884         NCURSES_MOUSE_VERSION=2
12885
12886 if test "${with_abi_version+set}" != set; then
12887         case $cf_cv_rel_version in
12888         (5.*)
12889                 cf_cv_rel_version=6.0
12890                 cf_cv_abi_version=6
12891                 { echo "$as_me:12891: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12892 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12893                 ;;
12894         esac
12895 fi
12896
12897 fi
12898
12899 ###   use option --enable-ext-putwin to turn on extended screendumps
12900 echo "$as_me:12900: checking if you want to use extended putwin/screendump" >&5
12901 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12902
12903 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12904 if test "${enable_ext_putwin+set}" = set; then
12905   enableval="$enable_ext_putwin"
12906   with_ext_putwin=$enableval
12907 else
12908   with_ext_putwin=$cf_dft_ext_putwin
12909 fi;
12910 echo "$as_me:12910: result: $with_ext_putwin" >&5
12911 echo "${ECHO_T}$with_ext_putwin" >&6
12912 if test "x$with_ext_putwin" = xyes ; then
12913
12914 cat >>confdefs.h <<\EOF
12915 #define NCURSES_EXT_PUTWIN 1
12916 EOF
12917
12918 fi
12919
12920 echo "$as_me:12920: checking if you want \$NCURSES_NO_PADDING code" >&5
12921 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12922
12923 # Check whether --enable-no-padding or --disable-no-padding was given.
12924 if test "${enable_no_padding+set}" = set; then
12925   enableval="$enable_no_padding"
12926   with_no_padding=$enableval
12927 else
12928   with_no_padding=$with_ext_funcs
12929 fi;
12930 echo "$as_me:12930: result: $with_no_padding" >&5
12931 echo "${ECHO_T}$with_no_padding" >&6
12932 test "x$with_no_padding" = xyes &&
12933 cat >>confdefs.h <<\EOF
12934 #define NCURSES_NO_PADDING 1
12935 EOF
12936
12937 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12938 echo "$as_me:12938: checking if you want SIGWINCH handler" >&5
12939 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12940
12941 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12942 if test "${enable_sigwinch+set}" = set; then
12943   enableval="$enable_sigwinch"
12944   with_sigwinch=$enableval
12945 else
12946   with_sigwinch=$with_ext_funcs
12947 fi;
12948 echo "$as_me:12948: result: $with_sigwinch" >&5
12949 echo "${ECHO_T}$with_sigwinch" >&6
12950 test "x$with_sigwinch" = xyes &&
12951 cat >>confdefs.h <<\EOF
12952 #define USE_SIGWINCH 1
12953 EOF
12954
12955 ###   use option --enable-tcap-names to allow user to define new capabilities
12956 echo "$as_me:12956: checking if you want user-definable terminal capabilities like termcap" >&5
12957 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12958
12959 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12960 if test "${enable_tcap_names+set}" = set; then
12961   enableval="$enable_tcap_names"
12962   with_tcap_names=$enableval
12963 else
12964   with_tcap_names=$with_ext_funcs
12965 fi;
12966 echo "$as_me:12966: result: $with_tcap_names" >&5
12967 echo "${ECHO_T}$with_tcap_names" >&6
12968 NCURSES_XNAMES=0
12969 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12970
12971 ##############################################################################
12972
12973 echo "$as_me:12973: checking if you want to link with the pthread library" >&5
12974 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12975
12976 # Check whether --with-pthread or --without-pthread was given.
12977 if test "${with_pthread+set}" = set; then
12978   withval="$with_pthread"
12979   with_pthread=$withval
12980 else
12981   with_pthread=no
12982 fi;
12983 echo "$as_me:12983: result: $with_pthread" >&5
12984 echo "${ECHO_T}$with_pthread" >&6
12985
12986 if test "$with_pthread" != no ; then
12987         echo "$as_me:12987: checking for pthread.h" >&5
12988 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12989 if test "${ac_cv_header_pthread_h+set}" = set; then
12990   echo $ECHO_N "(cached) $ECHO_C" >&6
12991 else
12992   cat >conftest.$ac_ext <<_ACEOF
12993 #line 12993 "configure"
12994 #include "confdefs.h"
12995 #include <pthread.h>
12996 _ACEOF
12997 if { (eval echo "$as_me:12997: \"$ac_cpp conftest.$ac_ext\"") >&5
12998   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12999   ac_status=$?
13000   egrep -v '^ *\+' conftest.er1 >conftest.err
13001   rm -f conftest.er1
13002   cat conftest.err >&5
13003   echo "$as_me:13003: \$? = $ac_status" >&5
13004   (exit $ac_status); } >/dev/null; then
13005   if test -s conftest.err; then
13006     ac_cpp_err=$ac_c_preproc_warn_flag
13007   else
13008     ac_cpp_err=
13009   fi
13010 else
13011   ac_cpp_err=yes
13012 fi
13013 if test -z "$ac_cpp_err"; then
13014   ac_cv_header_pthread_h=yes
13015 else
13016   echo "$as_me: failed program was:" >&5
13017   cat conftest.$ac_ext >&5
13018   ac_cv_header_pthread_h=no
13019 fi
13020 rm -f conftest.err conftest.$ac_ext
13021 fi
13022 echo "$as_me:13022: result: $ac_cv_header_pthread_h" >&5
13023 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13024 if test $ac_cv_header_pthread_h = yes; then
13025
13026 cat >>confdefs.h <<\EOF
13027 #define HAVE_PTHREADS_H 1
13028 EOF
13029
13030         for cf_lib_pthread in pthread c_r
13031         do
13032             echo "$as_me:13032: checking if we can link with the $cf_lib_pthread library" >&5
13033 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13034             cf_save_LIBS="$LIBS"
13035
13036 cf_add_libs="-l$cf_lib_pthread"
13037 # Filter out duplicates - this happens with badly-designed ".pc" files...
13038 for cf_add_1lib in $LIBS
13039 do
13040         for cf_add_2lib in $cf_add_libs
13041         do
13042                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13043                 then
13044                         cf_add_1lib=
13045                         break
13046                 fi
13047         done
13048         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13049 done
13050 LIBS="$cf_add_libs"
13051
13052             cat >conftest.$ac_ext <<_ACEOF
13053 #line 13053 "configure"
13054 #include "confdefs.h"
13055
13056 #include <pthread.h>
13057
13058 int
13059 main (void)
13060 {
13061
13062                 int rc = pthread_create(0,0,0,0);
13063                 int r2 = pthread_mutexattr_settype(0, 0);
13064
13065   ;
13066   return 0;
13067 }
13068 _ACEOF
13069 rm -f conftest.$ac_objext conftest$ac_exeext
13070 if { (eval echo "$as_me:13070: \"$ac_link\"") >&5
13071   (eval $ac_link) 2>&5
13072   ac_status=$?
13073   echo "$as_me:13073: \$? = $ac_status" >&5
13074   (exit $ac_status); } &&
13075          { ac_try='test -s conftest$ac_exeext'
13076   { (eval echo "$as_me:13076: \"$ac_try\"") >&5
13077   (eval $ac_try) 2>&5
13078   ac_status=$?
13079   echo "$as_me:13079: \$? = $ac_status" >&5
13080   (exit $ac_status); }; }; then
13081   with_pthread=yes
13082 else
13083   echo "$as_me: failed program was:" >&5
13084 cat conftest.$ac_ext >&5
13085 with_pthread=no
13086 fi
13087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13088             LIBS="$cf_save_LIBS"
13089             echo "$as_me:13089: result: $with_pthread" >&5
13090 echo "${ECHO_T}$with_pthread" >&6
13091             test "$with_pthread" = yes && break
13092         done
13093
13094         if test "$with_pthread" = yes ; then
13095
13096 cf_add_libs="-l$cf_lib_pthread"
13097 # Filter out duplicates - this happens with badly-designed ".pc" files...
13098 for cf_add_1lib in $LIBS
13099 do
13100         for cf_add_2lib in $cf_add_libs
13101         do
13102                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13103                 then
13104                         cf_add_1lib=
13105                         break
13106                 fi
13107         done
13108         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13109 done
13110 LIBS="$cf_add_libs"
13111
13112 cat >>confdefs.h <<\EOF
13113 #define HAVE_LIBPTHREADS 1
13114 EOF
13115
13116         else
13117             { { echo "$as_me:13117: error: Cannot link with pthread library" >&5
13118 echo "$as_me: error: Cannot link with pthread library" >&2;}
13119    { (exit 1); exit 1; }; }
13120         fi
13121
13122 fi
13123
13124 fi
13125
13126 if test "x$with_pthread" != xno; then
13127         echo "$as_me:13127: checking for pthread_kill" >&5
13128 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
13129 if test "${ac_cv_func_pthread_kill+set}" = set; then
13130   echo $ECHO_N "(cached) $ECHO_C" >&6
13131 else
13132   cat >conftest.$ac_ext <<_ACEOF
13133 #line 13133 "configure"
13134 #include "confdefs.h"
13135 /* System header to define __stub macros and hopefully few prototypes,
13136     which can conflict with char pthread_kill (); below.  */
13137 #include <assert.h>
13138 /* Override any gcc2 internal prototype to avoid an error.  */
13139 #ifdef __cplusplus
13140 extern "C"
13141 #endif
13142 /* We use char because int might match the return type of a gcc2
13143    builtin and then its argument prototype would still apply.  */
13144 char pthread_kill ();
13145 char (*f) ();
13146
13147 int
13148 main (void)
13149 {
13150 /* The GNU C library defines this for functions which it implements
13151     to always fail with ENOSYS.  Some functions are actually named
13152     something starting with __ and the normal name is an alias.  */
13153 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13154 choke me
13155 #else
13156 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13157 #endif
13158
13159   ;
13160   return 0;
13161 }
13162 _ACEOF
13163 rm -f conftest.$ac_objext conftest$ac_exeext
13164 if { (eval echo "$as_me:13164: \"$ac_link\"") >&5
13165   (eval $ac_link) 2>&5
13166   ac_status=$?
13167   echo "$as_me:13167: \$? = $ac_status" >&5
13168   (exit $ac_status); } &&
13169          { ac_try='test -s conftest$ac_exeext'
13170   { (eval echo "$as_me:13170: \"$ac_try\"") >&5
13171   (eval $ac_try) 2>&5
13172   ac_status=$?
13173   echo "$as_me:13173: \$? = $ac_status" >&5
13174   (exit $ac_status); }; }; then
13175   ac_cv_func_pthread_kill=yes
13176 else
13177   echo "$as_me: failed program was:" >&5
13178 cat conftest.$ac_ext >&5
13179 ac_cv_func_pthread_kill=no
13180 fi
13181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13182 fi
13183 echo "$as_me:13183: result: $ac_cv_func_pthread_kill" >&5
13184 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13185 if test $ac_cv_func_pthread_kill = yes; then
13186
13187                 echo "$as_me:13187: checking if you want to allow EINTR in wgetch with pthreads" >&5
13188 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13189
13190 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13191 if test "${enable_pthreads_eintr+set}" = set; then
13192   enableval="$enable_pthreads_eintr"
13193   use_pthreads_eintr=$enableval
13194 else
13195   use_pthreads_eintr=no
13196 fi;
13197                 echo "$as_me:13197: result: $use_pthreads_eintr" >&5
13198 echo "${ECHO_T}$use_pthreads_eintr" >&6
13199                 if test "x$use_pthreads_eintr" = xyes ; then
13200
13201 cat >>confdefs.h <<\EOF
13202 #define USE_PTHREADS_EINTR 1
13203 EOF
13204
13205                 fi
13206 fi
13207
13208         echo "$as_me:13208: checking if you want to use weak-symbols for pthreads" >&5
13209 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13210
13211 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13212 if test "${enable_weak_symbols+set}" = set; then
13213   enableval="$enable_weak_symbols"
13214   use_weak_symbols=$enableval
13215 else
13216   use_weak_symbols=no
13217 fi;
13218         echo "$as_me:13218: result: $use_weak_symbols" >&5
13219 echo "${ECHO_T}$use_weak_symbols" >&6
13220         if test "x$use_weak_symbols" = xyes ; then
13221
13222 echo "$as_me:13222: checking if $CC supports weak symbols" >&5
13223 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13224 if test "${cf_cv_weak_symbols+set}" = set; then
13225   echo $ECHO_N "(cached) $ECHO_C" >&6
13226 else
13227
13228 cat >conftest.$ac_ext <<_ACEOF
13229 #line 13229 "configure"
13230 #include "confdefs.h"
13231
13232 #include <stdio.h>
13233 int
13234 main (void)
13235 {
13236
13237 #if defined(__GNUC__)
13238 #  if defined __USE_ISOC99
13239 #    define _cat_pragma(exp)    _Pragma(#exp)
13240 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13241 #  else
13242 #    define _weak_pragma(exp)
13243 #  endif
13244 #  define _declare(name)        __extension__ extern __typeof__(name) name
13245 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13246 #endif
13247
13248 weak_symbol(fopen);
13249
13250   ;
13251   return 0;
13252 }
13253 _ACEOF
13254 rm -f conftest.$ac_objext
13255 if { (eval echo "$as_me:13255: \"$ac_compile\"") >&5
13256   (eval $ac_compile) 2>&5
13257   ac_status=$?
13258   echo "$as_me:13258: \$? = $ac_status" >&5
13259   (exit $ac_status); } &&
13260          { ac_try='test -s conftest.$ac_objext'
13261   { (eval echo "$as_me:13261: \"$ac_try\"") >&5
13262   (eval $ac_try) 2>&5
13263   ac_status=$?
13264   echo "$as_me:13264: \$? = $ac_status" >&5
13265   (exit $ac_status); }; }; then
13266   cf_cv_weak_symbols=yes
13267 else
13268   echo "$as_me: failed program was:" >&5
13269 cat conftest.$ac_ext >&5
13270 cf_cv_weak_symbols=no
13271 fi
13272 rm -f conftest.$ac_objext conftest.$ac_ext
13273
13274 fi
13275 echo "$as_me:13275: result: $cf_cv_weak_symbols" >&5
13276 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13277
13278         else
13279                 cf_cv_weak_symbols=no
13280         fi
13281
13282         if test "x$cf_cv_weak_symbols" = xyes ; then
13283
13284 cat >>confdefs.h <<\EOF
13285 #define USE_WEAK_SYMBOLS 1
13286 EOF
13287
13288         fi
13289 fi
13290
13291 PTHREAD=
13292 if test "x$with_pthread" = "xyes" ; then
13293
13294 cat >>confdefs.h <<\EOF
13295 #define USE_PTHREADS 1
13296 EOF
13297
13298         enable_reentrant=yes
13299         if test "x$cf_cv_weak_symbols" = xyes ; then
13300                 PTHREAD=-lpthread
13301
13302 cf_add_libs="-lpthread"
13303 # Filter out duplicates - this happens with badly-designed ".pc" files...
13304 for cf_add_1lib in $PRIVATE_LIBS
13305 do
13306         for cf_add_2lib in $cf_add_libs
13307         do
13308                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13309                 then
13310                         cf_add_1lib=
13311                         break
13312                 fi
13313         done
13314         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13315 done
13316 PRIVATE_LIBS="$cf_add_libs"
13317
13318         fi
13319 fi
13320
13321 # Reentrant code has to be opaque; there's little advantage to making ncurses
13322 # opaque outside of that, so there is no --enable-opaque option.  We can use
13323 # this option without --with-pthreads, but this will be always set for
13324 # pthreads.
13325 echo "$as_me:13325: checking if you want reentrant code" >&5
13326 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13327
13328 # Check whether --enable-reentrant or --disable-reentrant was given.
13329 if test "${enable_reentrant+set}" = set; then
13330   enableval="$enable_reentrant"
13331   with_reentrant=$enableval
13332 else
13333   with_reentrant=no
13334 fi;
13335 echo "$as_me:13335: result: $with_reentrant" >&5
13336 echo "${ECHO_T}$with_reentrant" >&6
13337 if test "x$with_reentrant" = xyes ; then
13338         cf_cv_enable_reentrant=1
13339         cf_cv_enable_opaque="NCURSES_INTERNALS"
13340         NCURSES_SIZE_T=int
13341         if test "x$cf_cv_weak_symbols" = xyes ; then
13342
13343 # remove pthread library from $LIBS
13344 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13345
13346 cf_add_libs="-lpthread"
13347 # Filter out duplicates - this happens with badly-designed ".pc" files...
13348 for cf_add_1lib in $TEST_LIBS
13349 do
13350         for cf_add_2lib in $cf_add_libs
13351         do
13352                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13353                 then
13354                         cf_add_1lib=
13355                         break
13356                 fi
13357         done
13358         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13359 done
13360 TEST_LIBS="$cf_add_libs"
13361
13362 cf_add_libs="-lpthread"
13363 # Filter out duplicates - this happens with badly-designed ".pc" files...
13364 for cf_add_1lib in $TEST_LIBS2
13365 do
13366         for cf_add_2lib in $cf_add_libs
13367         do
13368                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13369                 then
13370                         cf_add_1lib=
13371                         break
13372                 fi
13373         done
13374         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13375 done
13376 TEST_LIBS2="$cf_add_libs"
13377
13378 cf_add_libs="-lpthread"
13379 # Filter out duplicates - this happens with badly-designed ".pc" files...
13380 for cf_add_1lib in $PRIVATE_LIBS
13381 do
13382         for cf_add_2lib in $cf_add_libs
13383         do
13384                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13385                 then
13386                         cf_add_1lib=
13387                         break
13388                 fi
13389         done
13390         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13391 done
13392 PRIVATE_LIBS="$cf_add_libs"
13393
13394         else
13395                 # when not using weak symbols but with_reentrant,
13396                 # add 't' to the library suffix on all platforms
13397                 # except cygwin, where we only do that if ALSO
13398                 # compiling with full thread support.
13399                 case "$host" in
13400                 (*cygwin* | *msys*)
13401                         if test "$with_pthread" = "yes" ; then
13402                                 if test "x$disable_lib_suffixes" = "xno" ; then
13403                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13404                                 fi
13405                         fi ;;
13406                 (*)
13407                         if test "x$disable_lib_suffixes" = "xno" ; then
13408                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13409                         fi
13410                         ;;
13411                 esac
13412         fi
13413
13414 cat >>confdefs.h <<\EOF
13415 #define USE_REENTRANT 1
13416 EOF
13417
13418 if test "${with_abi_version+set}" != set; then
13419         case $cf_cv_rel_version in
13420         (5.*)
13421                 cf_cv_rel_version=6.0
13422                 cf_cv_abi_version=6
13423                 { echo "$as_me:13423: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13424 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13425                 ;;
13426         esac
13427 fi
13428
13429 else
13430         cf_cv_enable_reentrant=0
13431         cf_cv_enable_opaque="NCURSES_OPAQUE"
13432         NCURSES_SIZE_T=short
13433 fi
13434
13435 echo "$as_me:13435: checking if you want opaque curses-library structures" >&5
13436 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13437
13438 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13439 if test "${enable_opaque_curses+set}" = set; then
13440   enableval="$enable_opaque_curses"
13441   test "$enableval" != yes && enableval=no
13442         if test "$enableval" != "no" ; then
13443     enable_opaque_curses=yes
13444         else
13445
13446          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13447          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13448
13449         fi
13450 else
13451   enableval=no
13452
13453          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13454          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13455
13456 fi;
13457 echo "$as_me:13457: result: $enable_opaque_curses" >&5
13458 echo "${ECHO_T}$enable_opaque_curses" >&6
13459
13460 test "$cf_cv_enable_reentrant" = 1 && \
13461 test "$enable_opaque_curses" = no && \
13462 { { echo "$as_me:13462: error: reentrant configuration requires opaque library" >&5
13463 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13464    { (exit 1); exit 1; }; }
13465
13466 echo "$as_me:13466: checking if you want opaque form-library structures" >&5
13467 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13468
13469 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13470 if test "${enable_opaque_form+set}" = set; then
13471   enableval="$enable_opaque_form"
13472   enable_opaque_form=yes
13473 else
13474   enable_opaque_form=no
13475 fi;
13476 echo "$as_me:13476: result: $enable_opaque_form" >&5
13477 echo "${ECHO_T}$enable_opaque_form" >&6
13478
13479 echo "$as_me:13479: checking if you want opaque menu-library structures" >&5
13480 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13481
13482 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13483 if test "${enable_opaque_menu+set}" = set; then
13484   enableval="$enable_opaque_menu"
13485   enable_opaque_menu=yes
13486 else
13487   enable_opaque_menu=no
13488 fi;
13489 echo "$as_me:13489: result: $enable_opaque_menu" >&5
13490 echo "${ECHO_T}$enable_opaque_menu" >&6
13491
13492 echo "$as_me:13492: checking if you want opaque panel-library structures" >&5
13493 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13494
13495 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13496 if test "${enable_opaque_panel+set}" = set; then
13497   enableval="$enable_opaque_panel"
13498   enable_opaque_panel=yes
13499 else
13500   enable_opaque_panel=no
13501 fi;
13502 echo "$as_me:13502: result: $enable_opaque_panel" >&5
13503 echo "${ECHO_T}$enable_opaque_panel" >&6
13504
13505 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13506 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13507 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13508 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13509
13510 ### Allow using a different wrap-prefix
13511 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13512         echo "$as_me:13512: checking for prefix used to wrap public variables" >&5
13513 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13514
13515 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13516 if test "${with_wrap_prefix+set}" = set; then
13517   withval="$with_wrap_prefix"
13518   NCURSES_WRAP_PREFIX=$withval
13519 else
13520   NCURSES_WRAP_PREFIX=_nc_
13521 fi;
13522         echo "$as_me:13522: result: $NCURSES_WRAP_PREFIX" >&5
13523 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13524 else
13525         NCURSES_WRAP_PREFIX=_nc_
13526 fi
13527
13528 cat >>confdefs.h <<EOF
13529 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13530 EOF
13531
13532 ###############################################################################
13533 # These options are relatively safe to experiment with.
13534
13535 echo "$as_me:13535: checking if you want all development code" >&5
13536 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13537
13538 # Check whether --with-develop or --without-develop was given.
13539 if test "${with_develop+set}" = set; then
13540   withval="$with_develop"
13541   with_develop=$withval
13542 else
13543   with_develop=no
13544 fi;
13545 echo "$as_me:13545: result: $with_develop" >&5
13546 echo "${ECHO_T}$with_develop" >&6
13547
13548 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13549 echo "$as_me:13549: checking if you want hard-tabs code" >&5
13550 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13551
13552 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13553 if test "${enable_hard_tabs+set}" = set; then
13554   enableval="$enable_hard_tabs"
13555
13556 else
13557   enable_hard_tabs=$with_develop
13558 fi;
13559 echo "$as_me:13559: result: $enable_hard_tabs" >&5
13560 echo "${ECHO_T}$enable_hard_tabs" >&6
13561 test "x$enable_hard_tabs" = xyes &&
13562 cat >>confdefs.h <<\EOF
13563 #define USE_HARD_TABS 1
13564 EOF
13565
13566 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13567 echo "$as_me:13567: checking if you want limited support for xmc" >&5
13568 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13569
13570 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13571 if test "${enable_xmc_glitch+set}" = set; then
13572   enableval="$enable_xmc_glitch"
13573
13574 else
13575   enable_xmc_glitch=$with_develop
13576 fi;
13577 echo "$as_me:13577: result: $enable_xmc_glitch" >&5
13578 echo "${ECHO_T}$enable_xmc_glitch" >&6
13579 test "x$enable_xmc_glitch" = xyes &&
13580 cat >>confdefs.h <<\EOF
13581 #define USE_XMC_SUPPORT 1
13582 EOF
13583
13584 ###############################################################################
13585 # These are just experimental, probably should not be in a package:
13586
13587 echo "$as_me:13587: checking if you do not want to assume colors are white-on-black" >&5
13588 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13589
13590 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13591 if test "${enable_assumed_color+set}" = set; then
13592   enableval="$enable_assumed_color"
13593   with_assumed_color=$enableval
13594 else
13595   with_assumed_color=yes
13596 fi;
13597 echo "$as_me:13597: result: $with_assumed_color" >&5
13598 echo "${ECHO_T}$with_assumed_color" >&6
13599 test "x$with_assumed_color" = xyes &&
13600 cat >>confdefs.h <<\EOF
13601 #define USE_ASSUMED_COLOR 1
13602 EOF
13603
13604 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13605 echo "$as_me:13605: checking if you want hashmap scrolling-optimization code" >&5
13606 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13607
13608 # Check whether --enable-hashmap or --disable-hashmap was given.
13609 if test "${enable_hashmap+set}" = set; then
13610   enableval="$enable_hashmap"
13611   with_hashmap=$enableval
13612 else
13613   with_hashmap=yes
13614 fi;
13615 echo "$as_me:13615: result: $with_hashmap" >&5
13616 echo "${ECHO_T}$with_hashmap" >&6
13617 test "x$with_hashmap" = xyes &&
13618 cat >>confdefs.h <<\EOF
13619 #define USE_HASHMAP 1
13620 EOF
13621
13622 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13623 echo "$as_me:13623: checking if you want colorfgbg code" >&5
13624 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13625
13626 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13627 if test "${enable_colorfgbg+set}" = set; then
13628   enableval="$enable_colorfgbg"
13629   with_colorfgbg=$enableval
13630 else
13631   with_colorfgbg=no
13632 fi;
13633 echo "$as_me:13633: result: $with_colorfgbg" >&5
13634 echo "${ECHO_T}$with_colorfgbg" >&6
13635 test "x$with_colorfgbg" = xyes &&
13636 cat >>confdefs.h <<\EOF
13637 #define USE_COLORFGBG 1
13638 EOF
13639
13640 ###   use option --enable-interop to turn on use of bindings used for interop
13641 echo "$as_me:13641: checking if you want interop bindings" >&5
13642 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13643
13644 # Check whether --enable-interop or --disable-interop was given.
13645 if test "${enable_interop+set}" = set; then
13646   enableval="$enable_interop"
13647   with_exp_interop=$enableval
13648 else
13649   with_exp_interop=$cf_dft_interop
13650 fi;
13651 echo "$as_me:13651: result: $with_exp_interop" >&5
13652 echo "${ECHO_T}$with_exp_interop" >&6
13653
13654 NCURSES_INTEROP_FUNCS=0
13655 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13656
13657 echo "$as_me:13657: checking if you want experimental safe-sprintf code" >&5
13658 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13659
13660 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13661 if test "${enable_safe_sprintf+set}" = set; then
13662   enableval="$enable_safe_sprintf"
13663   with_safe_sprintf=$enableval
13664 else
13665   with_safe_sprintf=no
13666 fi;
13667 echo "$as_me:13667: result: $with_safe_sprintf" >&5
13668 echo "${ECHO_T}$with_safe_sprintf" >&6
13669
13670 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13671 # when hashmap is used scroll hints are useless
13672 if test "$with_hashmap" = no ; then
13673 echo "$as_me:13673: checking if you want to experiment without scrolling-hints code" >&5
13674 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13675
13676 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13677 if test "${enable_scroll_hints+set}" = set; then
13678   enableval="$enable_scroll_hints"
13679   with_scroll_hints=$enableval
13680 else
13681   with_scroll_hints=yes
13682 fi;
13683 echo "$as_me:13683: result: $with_scroll_hints" >&5
13684 echo "${ECHO_T}$with_scroll_hints" >&6
13685 test "x$with_scroll_hints" = xyes &&
13686 cat >>confdefs.h <<\EOF
13687 #define USE_SCROLL_HINTS 1
13688 EOF
13689
13690 fi
13691
13692 echo "$as_me:13692: checking if you want wgetch-events code" >&5
13693 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13694
13695 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13696 if test "${enable_wgetch_events+set}" = set; then
13697   enableval="$enable_wgetch_events"
13698   with_wgetch_events=$enableval
13699 else
13700   with_wgetch_events=no
13701 fi;
13702 echo "$as_me:13702: result: $with_wgetch_events" >&5
13703 echo "${ECHO_T}$with_wgetch_events" >&6
13704 test "x$with_wgetch_events" = xyes &&
13705 cat >>confdefs.h <<\EOF
13706 #define NCURSES_WGETCH_EVENTS 1
13707 EOF
13708
13709 ###############################################################################
13710
13711 ###     use option --disable-echo to suppress full display compiling commands
13712
13713 echo "$as_me:13713: checking if you want to see long compiling messages" >&5
13714 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13715
13716 # Check whether --enable-echo or --disable-echo was given.
13717 if test "${enable_echo+set}" = set; then
13718   enableval="$enable_echo"
13719   test "$enableval" != no && enableval=yes
13720         if test "$enableval" != "yes" ; then
13721
13722         ECHO_LT='--silent'
13723         ECHO_LD='@echo linking $@;'
13724         RULE_CC='@echo compiling $<'
13725         SHOW_CC='@echo compiling $@'
13726         ECHO_CC='@'
13727
13728         else
13729
13730         ECHO_LT=''
13731         ECHO_LD=''
13732         RULE_CC=''
13733         SHOW_CC=''
13734         ECHO_CC=''
13735
13736         fi
13737 else
13738   enableval=yes
13739
13740         ECHO_LT=''
13741         ECHO_LD=''
13742         RULE_CC=''
13743         SHOW_CC=''
13744         ECHO_CC=''
13745
13746 fi;
13747 echo "$as_me:13747: result: $enableval" >&5
13748 echo "${ECHO_T}$enableval" >&6
13749
13750 if test "x$enable_echo" = xyes; then
13751         ECHO_LINK=
13752 else
13753         ECHO_LINK='@ echo linking $@ ... ;'
13754         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13755         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13756 fi
13757
13758 # --disable-stripping is used for debugging
13759
13760 echo "$as_me:13760: checking if you want to install stripped executables" >&5
13761 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
13762
13763 # Check whether --enable-stripping or --disable-stripping was given.
13764 if test "${enable_stripping+set}" = set; then
13765   enableval="$enable_stripping"
13766   test "$enableval" != no && enableval=yes
13767         if test "$enableval" != "yes" ; then
13768     with_stripping=no
13769         else
13770                 with_stripping=yes
13771         fi
13772 else
13773   enableval=yes
13774         with_stripping=yes
13775
13776 fi;
13777 echo "$as_me:13777: result: $with_stripping" >&5
13778 echo "${ECHO_T}$with_stripping" >&6
13779
13780 if test "$with_stripping" = yes
13781 then
13782         INSTALL_OPT_S="-s"
13783 else
13784         INSTALL_OPT_S=
13785 fi
13786
13787 echo "$as_me:13787: checking if install needs to be told about ownership" >&5
13788 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
13789 case `$ac_config_guess` in
13790 (*minix)
13791         with_install_o=yes
13792         ;;
13793 (*)
13794         with_install_o=no
13795         ;;
13796 esac
13797
13798 echo "$as_me:13798: result: $with_install_o" >&5
13799 echo "${ECHO_T}$with_install_o" >&6
13800 if test "x$with_install_o" = xyes
13801 then
13802         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'`
13803 else
13804         INSTALL_OPT_O=
13805 fi
13806
13807 ###     use option --enable-warnings to turn on all gcc warnings
13808 echo "$as_me:13808: checking if you want to see compiler warnings" >&5
13809 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13810
13811 # Check whether --enable-warnings or --disable-warnings was given.
13812 if test "${enable_warnings+set}" = set; then
13813   enableval="$enable_warnings"
13814   with_warnings=$enableval
13815 fi;
13816 echo "$as_me:13816: result: $with_warnings" >&5
13817 echo "${ECHO_T}$with_warnings" >&6
13818
13819 if test "x$with_warnings" = "xyes"; then
13820
13821         ADAFLAGS="$ADAFLAGS -gnatg"
13822
13823 INTEL_COMPILER=no
13824
13825 if test "$GCC" = yes ; then
13826         case $host_os in
13827         (linux*|gnu*)
13828                 echo "$as_me:13828: checking if this is really Intel C compiler" >&5
13829 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13830                 cf_save_CFLAGS="$CFLAGS"
13831                 CFLAGS="$CFLAGS -no-gcc"
13832                 cat >conftest.$ac_ext <<_ACEOF
13833 #line 13833 "configure"
13834 #include "confdefs.h"
13835
13836 int
13837 main (void)
13838 {
13839
13840 #ifdef __INTEL_COMPILER
13841 #else
13842 make an error
13843 #endif
13844
13845   ;
13846   return 0;
13847 }
13848 _ACEOF
13849 rm -f conftest.$ac_objext
13850 if { (eval echo "$as_me:13850: \"$ac_compile\"") >&5
13851   (eval $ac_compile) 2>&5
13852   ac_status=$?
13853   echo "$as_me:13853: \$? = $ac_status" >&5
13854   (exit $ac_status); } &&
13855          { ac_try='test -s conftest.$ac_objext'
13856   { (eval echo "$as_me:13856: \"$ac_try\"") >&5
13857   (eval $ac_try) 2>&5
13858   ac_status=$?
13859   echo "$as_me:13859: \$? = $ac_status" >&5
13860   (exit $ac_status); }; }; then
13861   INTEL_COMPILER=yes
13862 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13863
13864 else
13865   echo "$as_me: failed program was:" >&5
13866 cat conftest.$ac_ext >&5
13867 fi
13868 rm -f conftest.$ac_objext conftest.$ac_ext
13869                 CFLAGS="$cf_save_CFLAGS"
13870                 echo "$as_me:13870: result: $INTEL_COMPILER" >&5
13871 echo "${ECHO_T}$INTEL_COMPILER" >&6
13872                 ;;
13873         esac
13874 fi
13875
13876 CLANG_COMPILER=no
13877
13878 if test "$GCC" = yes ; then
13879         echo "$as_me:13879: checking if this is really Clang C compiler" >&5
13880 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13881         cf_save_CFLAGS="$CFLAGS"
13882         CFLAGS="$CFLAGS -Qunused-arguments"
13883         cat >conftest.$ac_ext <<_ACEOF
13884 #line 13884 "configure"
13885 #include "confdefs.h"
13886
13887 int
13888 main (void)
13889 {
13890
13891 #ifdef __clang__
13892 #else
13893 make an error
13894 #endif
13895
13896   ;
13897   return 0;
13898 }
13899 _ACEOF
13900 rm -f conftest.$ac_objext
13901 if { (eval echo "$as_me:13901: \"$ac_compile\"") >&5
13902   (eval $ac_compile) 2>&5
13903   ac_status=$?
13904   echo "$as_me:13904: \$? = $ac_status" >&5
13905   (exit $ac_status); } &&
13906          { ac_try='test -s conftest.$ac_objext'
13907   { (eval echo "$as_me:13907: \"$ac_try\"") >&5
13908   (eval $ac_try) 2>&5
13909   ac_status=$?
13910   echo "$as_me:13910: \$? = $ac_status" >&5
13911   (exit $ac_status); }; }; then
13912   CLANG_COMPILER=yes
13913 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13914
13915 else
13916   echo "$as_me: failed program was:" >&5
13917 cat conftest.$ac_ext >&5
13918 fi
13919 rm -f conftest.$ac_objext conftest.$ac_ext
13920         CFLAGS="$cf_save_CFLAGS"
13921         echo "$as_me:13921: result: $CLANG_COMPILER" >&5
13922 echo "${ECHO_T}$CLANG_COMPILER" >&6
13923 fi
13924
13925 cat > conftest.$ac_ext <<EOF
13926 #line 13926 "${as_me:-configure}"
13927 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13928 EOF
13929
13930 if test "$INTEL_COMPILER" = yes
13931 then
13932 # The "-wdXXX" options suppress warnings:
13933 # remark #1419: external declaration in primary source file
13934 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13935 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13936 # remark #193: zero used for undefined preprocessing identifier
13937 # remark #593: variable "curs_sb_left_arrow" was set but never used
13938 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13939 # remark #869: parameter "tw" was never referenced
13940 # remark #981: operands are evaluated in unspecified order
13941 # warning #279: controlling expression is constant
13942
13943         { echo "$as_me:13943: checking for $CC warning options..." >&5
13944 echo "$as_me: checking for $CC warning options..." >&6;}
13945         cf_save_CFLAGS="$CFLAGS"
13946         EXTRA_CFLAGS="-Wall"
13947         for cf_opt in \
13948                 wd1419 \
13949                 wd1683 \
13950                 wd1684 \
13951                 wd193 \
13952                 wd593 \
13953                 wd279 \
13954                 wd810 \
13955                 wd869 \
13956                 wd981
13957         do
13958                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13959                 if { (eval echo "$as_me:13959: \"$ac_compile\"") >&5
13960   (eval $ac_compile) 2>&5
13961   ac_status=$?
13962   echo "$as_me:13962: \$? = $ac_status" >&5
13963   (exit $ac_status); }; then
13964                         test -n "$verbose" && echo "$as_me:13964: result: ... -$cf_opt" >&5
13965 echo "${ECHO_T}... -$cf_opt" >&6
13966                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13967                 fi
13968         done
13969         CFLAGS="$cf_save_CFLAGS"
13970
13971 elif test "$GCC" = yes
13972 then
13973         { echo "$as_me:13973: checking for $CC warning options..." >&5
13974 echo "$as_me: checking for $CC warning options..." >&6;}
13975         cf_save_CFLAGS="$CFLAGS"
13976         EXTRA_CFLAGS=
13977         cf_warn_CONST=""
13978         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13979         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13980         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13981         for cf_opt in W Wall \
13982                 Wbad-function-cast \
13983                 Wcast-align \
13984                 Wcast-qual \
13985                 Wdeclaration-after-statement \
13986                 Wextra \
13987                 Winline \
13988                 Wmissing-declarations \
13989                 Wmissing-prototypes \
13990                 Wnested-externs \
13991                 Wpointer-arith \
13992                 Wshadow \
13993                 Wstrict-prototypes \
13994                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13995         do
13996                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13997                 if { (eval echo "$as_me:13997: \"$ac_compile\"") >&5
13998   (eval $ac_compile) 2>&5
13999   ac_status=$?
14000   echo "$as_me:14000: \$? = $ac_status" >&5
14001   (exit $ac_status); }; then
14002                         test -n "$verbose" && echo "$as_me:14002: result: ... -$cf_opt" >&5
14003 echo "${ECHO_T}... -$cf_opt" >&6
14004                         case $cf_opt in
14005                         (Wcast-qual)
14006                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
14007                                 ;;
14008                         (Winline)
14009                                 case $GCC_VERSION in
14010                                 ([34].*)
14011                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
14012
14013 echo "${as_me:-configure}:14013: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14014
14015                                         continue;;
14016                                 esac
14017                                 ;;
14018                         (Wpointer-arith)
14019                                 case $GCC_VERSION in
14020                                 ([12].*)
14021                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
14022
14023 echo "${as_me:-configure}:14023: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14024
14025                                         continue;;
14026                                 esac
14027                                 ;;
14028                         esac
14029                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14030                 fi
14031         done
14032         CFLAGS="$cf_save_CFLAGS"
14033 fi
14034 rm -rf conftest*
14035
14036         if test "x$cf_with_cxx" = xyes ; then
14037
14038 INTEL_CPLUSPLUS=no
14039
14040 if test "$GCC" = yes ; then
14041         case $host_os in
14042         (linux*|gnu*)
14043                 echo "$as_me:14043: checking if this is really Intel C++ compiler" >&5
14044 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
14045                 cf_save_CFLAGS="$CXXFLAGS"
14046                 CXXFLAGS="$CXXFLAGS -no-gcc"
14047                 cat >conftest.$ac_ext <<_ACEOF
14048 #line 14048 "configure"
14049 #include "confdefs.h"
14050
14051 int
14052 main (void)
14053 {
14054
14055 #ifdef __INTEL_COMPILER
14056 #else
14057 make an error
14058 #endif
14059
14060   ;
14061   return 0;
14062 }
14063 _ACEOF
14064 rm -f conftest.$ac_objext
14065 if { (eval echo "$as_me:14065: \"$ac_compile\"") >&5
14066   (eval $ac_compile) 2>&5
14067   ac_status=$?
14068   echo "$as_me:14068: \$? = $ac_status" >&5
14069   (exit $ac_status); } &&
14070          { ac_try='test -s conftest.$ac_objext'
14071   { (eval echo "$as_me:14071: \"$ac_try\"") >&5
14072   (eval $ac_try) 2>&5
14073   ac_status=$?
14074   echo "$as_me:14074: \$? = $ac_status" >&5
14075   (exit $ac_status); }; }; then
14076   INTEL_CPLUSPLUS=yes
14077 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14078
14079 else
14080   echo "$as_me: failed program was:" >&5
14081 cat conftest.$ac_ext >&5
14082 fi
14083 rm -f conftest.$ac_objext conftest.$ac_ext
14084                 CXXFLAGS="$cf_save_CFLAGS"
14085                 echo "$as_me:14085: result: $INTEL_CPLUSPLUS" >&5
14086 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
14087                 ;;
14088         esac
14089 fi
14090
14091 CLANG_CPLUSPLUS=no
14092
14093 if test "$GCC" = yes ; then
14094         echo "$as_me:14094: checking if this is really Clang C++ compiler" >&5
14095 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
14096         cf_save_CFLAGS="$CXXFLAGS"
14097         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
14098         cat >conftest.$ac_ext <<_ACEOF
14099 #line 14099 "configure"
14100 #include "confdefs.h"
14101
14102 int
14103 main (void)
14104 {
14105
14106 #ifdef __clang__
14107 #else
14108 make an error
14109 #endif
14110
14111   ;
14112   return 0;
14113 }
14114 _ACEOF
14115 rm -f conftest.$ac_objext
14116 if { (eval echo "$as_me:14116: \"$ac_compile\"") >&5
14117   (eval $ac_compile) 2>&5
14118   ac_status=$?
14119   echo "$as_me:14119: \$? = $ac_status" >&5
14120   (exit $ac_status); } &&
14121          { ac_try='test -s conftest.$ac_objext'
14122   { (eval echo "$as_me:14122: \"$ac_try\"") >&5
14123   (eval $ac_try) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit $ac_status); }; }; then
14127   CLANG_CPLUSPLUS=yes
14128 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14129
14130 else
14131   echo "$as_me: failed program was:" >&5
14132 cat conftest.$ac_ext >&5
14133 fi
14134 rm -f conftest.$ac_objext conftest.$ac_ext
14135         CXXFLAGS="$cf_save_CFLAGS"
14136         echo "$as_me:14136: result: $CLANG_CPLUSPLUS" >&5
14137 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
14138 fi
14139
14140 ac_ext=cc
14141 ac_cpp='$CXXCPP $CPPFLAGS'
14142 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14143 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14144 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14145 ac_main_return=return
14146
14147 cat > conftest.$ac_ext <<EOF
14148 #line 14148 "configure"
14149 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14150 EOF
14151
14152 if test "$INTEL_CPLUSPLUS" = yes
14153 then
14154 # The "-wdXXX" options suppress warnings:
14155 # remark #1419: external declaration in primary source file
14156 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14157 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14158 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14159 # remark #193: zero used for undefined preprocessing identifier
14160 # remark #593: variable "curs_sb_left_arrow" was set but never used
14161 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14162 # remark #869: parameter "tw" was never referenced
14163 # remark #981: operands are evaluated in unspecified order
14164 # warning #269: invalid format string conversion
14165
14166         { echo "$as_me:14166: checking for $CC warning options..." >&5
14167 echo "$as_me: checking for $CC warning options..." >&6;}
14168         cf_save_CXXFLAGS="$CXXFLAGS"
14169         EXTRA_CXXFLAGS="-Wall"
14170         for cf_opt in \
14171                 wd1419 \
14172                 wd1682 \
14173                 wd1683 \
14174                 wd1684 \
14175                 wd193 \
14176                 wd279 \
14177                 wd593 \
14178                 wd810 \
14179                 wd869 \
14180                 wd981
14181         do
14182                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
14183                 if { (eval echo "$as_me:14183: \"$ac_compile\"") >&5
14184   (eval $ac_compile) 2>&5
14185   ac_status=$?
14186   echo "$as_me:14186: \$? = $ac_status" >&5
14187   (exit $ac_status); }; then
14188                         test -n "$verbose" && echo "$as_me:14188: result: ... -$cf_opt" >&5
14189 echo "${ECHO_T}... -$cf_opt" >&6
14190                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14191                 fi
14192         done
14193         CXXFLAGS="$cf_save_CXXFLAGS"
14194
14195 elif test "$GXX" = yes
14196 then
14197         { echo "$as_me:14197: checking for $CXX warning options..." >&5
14198 echo "$as_me: checking for $CXX warning options..." >&6;}
14199         cf_save_CXXFLAGS="$CXXFLAGS"
14200         EXTRA_CXXFLAGS="-W -Wall"
14201         cf_gxx_extra_warnings=""
14202         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
14203         case "$GCC_VERSION" in
14204         ([1-2].*)
14205                 ;;
14206         (*)
14207                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
14208                 ;;
14209         esac
14210         for cf_opt in \
14211                 Wabi \
14212                 fabi-version=0 \
14213                 Wextra \
14214                 Wignored-qualifiers \
14215                 Wlogical-op \
14216                 Woverloaded-virtual \
14217                 Wsign-promo \
14218                 Wsynth \
14219                 Wold-style-cast \
14220                 Wcast-align \
14221                 Wcast-qual \
14222                 Wpointer-arith \
14223                 Wshadow \
14224                 Wundef $cf_gxx_extra_warnings Wno-unused
14225         do
14226                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14227                 if { (eval echo "$as_me:14227: \"$ac_compile\"") >&5
14228   (eval $ac_compile) 2>&5
14229   ac_status=$?
14230   echo "$as_me:14230: \$? = $ac_status" >&5
14231   (exit $ac_status); }; then
14232                         test -n "$verbose" && echo "$as_me:14232: result: ... -$cf_opt" >&5
14233 echo "${ECHO_T}... -$cf_opt" >&6
14234                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14235                 else
14236                         test -n "$verbose" && echo "$as_me:14236: result: ... no -$cf_opt" >&5
14237 echo "${ECHO_T}... no -$cf_opt" >&6
14238                 fi
14239         done
14240         CXXFLAGS="$cf_save_CXXFLAGS"
14241 fi
14242
14243 rm -rf conftest*
14244 ac_ext=c
14245 ac_cpp='$CPP $CPPFLAGS'
14246 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14247 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14248 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14249 ac_main_return=return
14250
14251         fi
14252 fi
14253
14254 if test "$GCC" = yes
14255 then
14256 cat > conftest.i <<EOF
14257 #ifndef GCC_PRINTF
14258 #define GCC_PRINTF 0
14259 #endif
14260 #ifndef GCC_SCANF
14261 #define GCC_SCANF 0
14262 #endif
14263 #ifndef GCC_NORETURN
14264 #define GCC_NORETURN /* nothing */
14265 #endif
14266 #ifndef GCC_UNUSED
14267 #define GCC_UNUSED /* nothing */
14268 #endif
14269 EOF
14270 if test "$GCC" = yes
14271 then
14272         { echo "$as_me:14272: checking for $CC __attribute__ directives..." >&5
14273 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14274 cat > conftest.$ac_ext <<EOF
14275 #line 14275 "${as_me:-configure}"
14276 #include "confdefs.h"
14277 #include "conftest.h"
14278 #include "conftest.i"
14279 #if     GCC_PRINTF
14280 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14281 #else
14282 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14283 #endif
14284 #if     GCC_SCANF
14285 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14286 #else
14287 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14288 #endif
14289 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14290 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14291 extern void foo(void) GCC_NORETURN;
14292 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14293 EOF
14294         cf_printf_attribute=no
14295         cf_scanf_attribute=no
14296         for cf_attribute in scanf printf unused noreturn
14297         do
14298
14299 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14300
14301                 cf_directive="__attribute__(($cf_attribute))"
14302                 echo "checking for $CC $cf_directive" 1>&5
14303
14304                 case $cf_attribute in
14305                 (printf)
14306                         cf_printf_attribute=yes
14307                         cat >conftest.h <<EOF
14308 #define GCC_$cf_ATTRIBUTE 1
14309 EOF
14310                         ;;
14311                 (scanf)
14312                         cf_scanf_attribute=yes
14313                         cat >conftest.h <<EOF
14314 #define GCC_$cf_ATTRIBUTE 1
14315 EOF
14316                         ;;
14317                 (*)
14318                         cat >conftest.h <<EOF
14319 #define GCC_$cf_ATTRIBUTE $cf_directive
14320 EOF
14321                         ;;
14322                 esac
14323
14324                 if { (eval echo "$as_me:14324: \"$ac_compile\"") >&5
14325   (eval $ac_compile) 2>&5
14326   ac_status=$?
14327   echo "$as_me:14327: \$? = $ac_status" >&5
14328   (exit $ac_status); }; then
14329                         test -n "$verbose" && echo "$as_me:14329: result: ... $cf_attribute" >&5
14330 echo "${ECHO_T}... $cf_attribute" >&6
14331                         cat conftest.h >>confdefs.h
14332                         case $cf_attribute in
14333                         (noreturn)
14334
14335 cat >>confdefs.h <<EOF
14336 #define GCC_NORETURN $cf_directive
14337 EOF
14338
14339                                 ;;
14340                         (printf)
14341                                 cf_value='/* nothing */'
14342                                 if test "$cf_printf_attribute" != no ; then
14343                                         cf_value='__attribute__((format(printf,fmt,var)))'
14344
14345 cat >>confdefs.h <<\EOF
14346 #define GCC_PRINTF 1
14347 EOF
14348
14349                                 fi
14350
14351 cat >>confdefs.h <<EOF
14352 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14353 EOF
14354
14355                                 ;;
14356                         (scanf)
14357                                 cf_value='/* nothing */'
14358                                 if test "$cf_scanf_attribute" != no ; then
14359                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14360
14361 cat >>confdefs.h <<\EOF
14362 #define GCC_SCANF 1
14363 EOF
14364
14365                                 fi
14366
14367 cat >>confdefs.h <<EOF
14368 #define GCC_SCANFLIKE(fmt,var) $cf_value
14369 EOF
14370
14371                                 ;;
14372                         (unused)
14373
14374 cat >>confdefs.h <<EOF
14375 #define GCC_UNUSED $cf_directive
14376 EOF
14377
14378                                 ;;
14379                         esac
14380                 fi
14381         done
14382 else
14383         fgrep define conftest.i >>confdefs.h
14384 fi
14385 rm -rf conftest*
14386 fi
14387
14388 echo "$as_me:14388: checking if you want to work around bogus compiler/loader warnings" >&5
14389 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14390
14391 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14392 if test "${enable_string_hacks+set}" = set; then
14393   enableval="$enable_string_hacks"
14394   with_string_hacks=$enableval
14395 else
14396   with_string_hacks=no
14397 fi;
14398 echo "$as_me:14398: result: $with_string_hacks" >&5
14399 echo "${ECHO_T}$with_string_hacks" >&6
14400
14401 if test "x$with_string_hacks" = "xyes"; then
14402
14403 cat >>confdefs.h <<\EOF
14404 #define USE_STRING_HACKS 1
14405 EOF
14406
14407         { echo "$as_me:14407: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14408 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14409         echo "$as_me:14409: checking for strlcat" >&5
14410 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14411 if test "${ac_cv_func_strlcat+set}" = set; then
14412   echo $ECHO_N "(cached) $ECHO_C" >&6
14413 else
14414   cat >conftest.$ac_ext <<_ACEOF
14415 #line 14415 "configure"
14416 #include "confdefs.h"
14417 /* System header to define __stub macros and hopefully few prototypes,
14418     which can conflict with char strlcat (); below.  */
14419 #include <assert.h>
14420 /* Override any gcc2 internal prototype to avoid an error.  */
14421 #ifdef __cplusplus
14422 extern "C"
14423 #endif
14424 /* We use char because int might match the return type of a gcc2
14425    builtin and then its argument prototype would still apply.  */
14426 char strlcat ();
14427 char (*f) ();
14428
14429 int
14430 main (void)
14431 {
14432 /* The GNU C library defines this for functions which it implements
14433     to always fail with ENOSYS.  Some functions are actually named
14434     something starting with __ and the normal name is an alias.  */
14435 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14436 choke me
14437 #else
14438 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14439 #endif
14440
14441   ;
14442   return 0;
14443 }
14444 _ACEOF
14445 rm -f conftest.$ac_objext conftest$ac_exeext
14446 if { (eval echo "$as_me:14446: \"$ac_link\"") >&5
14447   (eval $ac_link) 2>&5
14448   ac_status=$?
14449   echo "$as_me:14449: \$? = $ac_status" >&5
14450   (exit $ac_status); } &&
14451          { ac_try='test -s conftest$ac_exeext'
14452   { (eval echo "$as_me:14452: \"$ac_try\"") >&5
14453   (eval $ac_try) 2>&5
14454   ac_status=$?
14455   echo "$as_me:14455: \$? = $ac_status" >&5
14456   (exit $ac_status); }; }; then
14457   ac_cv_func_strlcat=yes
14458 else
14459   echo "$as_me: failed program was:" >&5
14460 cat conftest.$ac_ext >&5
14461 ac_cv_func_strlcat=no
14462 fi
14463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14464 fi
14465 echo "$as_me:14465: result: $ac_cv_func_strlcat" >&5
14466 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14467 if test $ac_cv_func_strlcat = yes; then
14468
14469 cat >>confdefs.h <<\EOF
14470 #define HAVE_STRLCAT 1
14471 EOF
14472
14473 else
14474
14475                 echo "$as_me:14475: checking for strlcat in -lbsd" >&5
14476 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14477 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14478   echo $ECHO_N "(cached) $ECHO_C" >&6
14479 else
14480   ac_check_lib_save_LIBS=$LIBS
14481 LIBS="-lbsd  $LIBS"
14482 cat >conftest.$ac_ext <<_ACEOF
14483 #line 14483 "configure"
14484 #include "confdefs.h"
14485
14486 /* Override any gcc2 internal prototype to avoid an error.  */
14487 #ifdef __cplusplus
14488 extern "C"
14489 #endif
14490 /* We use char because int might match the return type of a gcc2
14491    builtin and then its argument prototype would still apply.  */
14492 char strlcat ();
14493 int
14494 main (void)
14495 {
14496 strlcat ();
14497   ;
14498   return 0;
14499 }
14500 _ACEOF
14501 rm -f conftest.$ac_objext conftest$ac_exeext
14502 if { (eval echo "$as_me:14502: \"$ac_link\"") >&5
14503   (eval $ac_link) 2>&5
14504   ac_status=$?
14505   echo "$as_me:14505: \$? = $ac_status" >&5
14506   (exit $ac_status); } &&
14507          { ac_try='test -s conftest$ac_exeext'
14508   { (eval echo "$as_me:14508: \"$ac_try\"") >&5
14509   (eval $ac_try) 2>&5
14510   ac_status=$?
14511   echo "$as_me:14511: \$? = $ac_status" >&5
14512   (exit $ac_status); }; }; then
14513   ac_cv_lib_bsd_strlcat=yes
14514 else
14515   echo "$as_me: failed program was:" >&5
14516 cat conftest.$ac_ext >&5
14517 ac_cv_lib_bsd_strlcat=no
14518 fi
14519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14520 LIBS=$ac_check_lib_save_LIBS
14521 fi
14522 echo "$as_me:14522: result: $ac_cv_lib_bsd_strlcat" >&5
14523 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14524 if test $ac_cv_lib_bsd_strlcat = yes; then
14525
14526 cf_add_libs="-lbsd"
14527 # Filter out duplicates - this happens with badly-designed ".pc" files...
14528 for cf_add_1lib in $LIBS
14529 do
14530         for cf_add_2lib in $cf_add_libs
14531         do
14532                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14533                 then
14534                         cf_add_1lib=
14535                         break
14536                 fi
14537         done
14538         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14539 done
14540 LIBS="$cf_add_libs"
14541
14542 for ac_header in bsd/string.h
14543 do
14544 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14545 echo "$as_me:14545: checking for $ac_header" >&5
14546 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14548   echo $ECHO_N "(cached) $ECHO_C" >&6
14549 else
14550   cat >conftest.$ac_ext <<_ACEOF
14551 #line 14551 "configure"
14552 #include "confdefs.h"
14553 #include <$ac_header>
14554 _ACEOF
14555 if { (eval echo "$as_me:14555: \"$ac_cpp conftest.$ac_ext\"") >&5
14556   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14557   ac_status=$?
14558   egrep -v '^ *\+' conftest.er1 >conftest.err
14559   rm -f conftest.er1
14560   cat conftest.err >&5
14561   echo "$as_me:14561: \$? = $ac_status" >&5
14562   (exit $ac_status); } >/dev/null; then
14563   if test -s conftest.err; then
14564     ac_cpp_err=$ac_c_preproc_warn_flag
14565   else
14566     ac_cpp_err=
14567   fi
14568 else
14569   ac_cpp_err=yes
14570 fi
14571 if test -z "$ac_cpp_err"; then
14572   eval "$as_ac_Header=yes"
14573 else
14574   echo "$as_me: failed program was:" >&5
14575   cat conftest.$ac_ext >&5
14576   eval "$as_ac_Header=no"
14577 fi
14578 rm -f conftest.err conftest.$ac_ext
14579 fi
14580 echo "$as_me:14580: result: `eval echo '${'$as_ac_Header'}'`" >&5
14581 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14582 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14583   cat >>confdefs.h <<EOF
14584 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14585 EOF
14586
14587 fi
14588 done
14589
14590 cat >>confdefs.h <<\EOF
14591 #define HAVE_STRLCAT 1
14592 EOF
14593
14594 fi
14595
14596 fi
14597
14598 for ac_func in strlcpy snprintf
14599 do
14600 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14601 echo "$as_me:14601: checking for $ac_func" >&5
14602 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14603 if eval "test \"\${$as_ac_var+set}\" = set"; then
14604   echo $ECHO_N "(cached) $ECHO_C" >&6
14605 else
14606   cat >conftest.$ac_ext <<_ACEOF
14607 #line 14607 "configure"
14608 #include "confdefs.h"
14609 /* System header to define __stub macros and hopefully few prototypes,
14610     which can conflict with char $ac_func (); below.  */
14611 #include <assert.h>
14612 /* Override any gcc2 internal prototype to avoid an error.  */
14613 #ifdef __cplusplus
14614 extern "C"
14615 #endif
14616 /* We use char because int might match the return type of a gcc2
14617    builtin and then its argument prototype would still apply.  */
14618 char $ac_func ();
14619 char (*f) ();
14620
14621 int
14622 main (void)
14623 {
14624 /* The GNU C library defines this for functions which it implements
14625     to always fail with ENOSYS.  Some functions are actually named
14626     something starting with __ and the normal name is an alias.  */
14627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14628 choke me
14629 #else
14630 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14631 #endif
14632
14633   ;
14634   return 0;
14635 }
14636 _ACEOF
14637 rm -f conftest.$ac_objext conftest$ac_exeext
14638 if { (eval echo "$as_me:14638: \"$ac_link\"") >&5
14639   (eval $ac_link) 2>&5
14640   ac_status=$?
14641   echo "$as_me:14641: \$? = $ac_status" >&5
14642   (exit $ac_status); } &&
14643          { ac_try='test -s conftest$ac_exeext'
14644   { (eval echo "$as_me:14644: \"$ac_try\"") >&5
14645   (eval $ac_try) 2>&5
14646   ac_status=$?
14647   echo "$as_me:14647: \$? = $ac_status" >&5
14648   (exit $ac_status); }; }; then
14649   eval "$as_ac_var=yes"
14650 else
14651   echo "$as_me: failed program was:" >&5
14652 cat conftest.$ac_ext >&5
14653 eval "$as_ac_var=no"
14654 fi
14655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14656 fi
14657 echo "$as_me:14657: result: `eval echo '${'$as_ac_var'}'`" >&5
14658 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14659 if test `eval echo '${'$as_ac_var'}'` = yes; then
14660   cat >>confdefs.h <<EOF
14661 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14662 EOF
14663
14664 fi
14665 done
14666
14667 fi
14668
14669 ###     use option --enable-assertions to turn on generation of assertion code
14670 echo "$as_me:14670: checking if you want to enable runtime assertions" >&5
14671 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14672
14673 # Check whether --enable-assertions or --disable-assertions was given.
14674 if test "${enable_assertions+set}" = set; then
14675   enableval="$enable_assertions"
14676   with_assertions=$enableval
14677 else
14678   with_assertions=no
14679 fi;
14680 echo "$as_me:14680: result: $with_assertions" >&5
14681 echo "${ECHO_T}$with_assertions" >&6
14682 if test -n "$GCC"
14683 then
14684         if test "$with_assertions" = no
14685         then
14686                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14687         else
14688
14689         ADAFLAGS="$ADAFLAGS -gnata"
14690
14691         fi
14692 fi
14693
14694 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14695
14696 echo "$as_me:14696: checking if you want to use dmalloc for testing" >&5
14697 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14698
14699 # Check whether --with-dmalloc or --without-dmalloc was given.
14700 if test "${with_dmalloc+set}" = set; then
14701   withval="$with_dmalloc"
14702
14703 cat >>confdefs.h <<EOF
14704 #define USE_DMALLOC 1
14705 EOF
14706
14707         : ${with_cflags:=-g}
14708         : ${with_no_leaks:=yes}
14709          with_dmalloc=yes
14710 else
14711   with_dmalloc=
14712 fi;
14713 echo "$as_me:14713: result: ${with_dmalloc:-no}" >&5
14714 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14715
14716 case .$with_cflags in
14717 (.*-g*)
14718         case .$CFLAGS in
14719         (.*-g*)
14720                 ;;
14721         (*)
14722
14723 cf_fix_cppflags=no
14724 cf_new_cflags=
14725 cf_new_cppflags=
14726 cf_new_extra_cppflags=
14727
14728 for cf_add_cflags in -g
14729 do
14730 case $cf_fix_cppflags in
14731 (no)
14732         case $cf_add_cflags in
14733         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14734                 case $cf_add_cflags in
14735                 (-D*)
14736                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14737
14738                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14739                                 && test -z "${cf_tst_cflags}" \
14740                                 && cf_fix_cppflags=yes
14741
14742                         if test $cf_fix_cppflags = yes ; then
14743
14744         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14745         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14746
14747                                 continue
14748                         elif test "${cf_tst_cflags}" = "\"'" ; then
14749
14750         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14751         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14752
14753                                 continue
14754                         fi
14755                         ;;
14756                 esac
14757                 case "$CPPFLAGS" in
14758                 (*$cf_add_cflags)
14759                         ;;
14760                 (*)
14761                         case $cf_add_cflags in
14762                         (-D*)
14763                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14764
14765 CPPFLAGS=`echo "$CPPFLAGS" | \
14766         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14767                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14768
14769                                 ;;
14770                         esac
14771
14772         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14773         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14774
14775                         ;;
14776                 esac
14777                 ;;
14778         (*)
14779
14780         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14781         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14782
14783                 ;;
14784         esac
14785         ;;
14786 (yes)
14787
14788         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14789         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14790
14791         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14792
14793         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14794                 && test -z "${cf_tst_cflags}" \
14795                 && cf_fix_cppflags=no
14796         ;;
14797 esac
14798 done
14799
14800 if test -n "$cf_new_cflags" ; then
14801
14802         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14803         CFLAGS="${CFLAGS}$cf_new_cflags"
14804
14805 fi
14806
14807 if test -n "$cf_new_cppflags" ; then
14808
14809         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14810         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14811
14812 fi
14813
14814 if test -n "$cf_new_extra_cppflags" ; then
14815
14816         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14817         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14818
14819 fi
14820
14821                 ;;
14822         esac
14823         ;;
14824 esac
14825
14826 if test "$with_dmalloc" = yes ; then
14827         echo "$as_me:14827: checking for dmalloc.h" >&5
14828 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14829 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14830   echo $ECHO_N "(cached) $ECHO_C" >&6
14831 else
14832   cat >conftest.$ac_ext <<_ACEOF
14833 #line 14833 "configure"
14834 #include "confdefs.h"
14835 #include <dmalloc.h>
14836 _ACEOF
14837 if { (eval echo "$as_me:14837: \"$ac_cpp conftest.$ac_ext\"") >&5
14838   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14839   ac_status=$?
14840   egrep -v '^ *\+' conftest.er1 >conftest.err
14841   rm -f conftest.er1
14842   cat conftest.err >&5
14843   echo "$as_me:14843: \$? = $ac_status" >&5
14844   (exit $ac_status); } >/dev/null; then
14845   if test -s conftest.err; then
14846     ac_cpp_err=$ac_c_preproc_warn_flag
14847   else
14848     ac_cpp_err=
14849   fi
14850 else
14851   ac_cpp_err=yes
14852 fi
14853 if test -z "$ac_cpp_err"; then
14854   ac_cv_header_dmalloc_h=yes
14855 else
14856   echo "$as_me: failed program was:" >&5
14857   cat conftest.$ac_ext >&5
14858   ac_cv_header_dmalloc_h=no
14859 fi
14860 rm -f conftest.err conftest.$ac_ext
14861 fi
14862 echo "$as_me:14862: result: $ac_cv_header_dmalloc_h" >&5
14863 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14864 if test $ac_cv_header_dmalloc_h = yes; then
14865
14866 echo "$as_me:14866: checking for dmalloc_debug in -ldmalloc" >&5
14867 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14868 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14869   echo $ECHO_N "(cached) $ECHO_C" >&6
14870 else
14871   ac_check_lib_save_LIBS=$LIBS
14872 LIBS="-ldmalloc  $LIBS"
14873 cat >conftest.$ac_ext <<_ACEOF
14874 #line 14874 "configure"
14875 #include "confdefs.h"
14876
14877 /* Override any gcc2 internal prototype to avoid an error.  */
14878 #ifdef __cplusplus
14879 extern "C"
14880 #endif
14881 /* We use char because int might match the return type of a gcc2
14882    builtin and then its argument prototype would still apply.  */
14883 char dmalloc_debug ();
14884 int
14885 main (void)
14886 {
14887 dmalloc_debug ();
14888   ;
14889   return 0;
14890 }
14891 _ACEOF
14892 rm -f conftest.$ac_objext conftest$ac_exeext
14893 if { (eval echo "$as_me:14893: \"$ac_link\"") >&5
14894   (eval $ac_link) 2>&5
14895   ac_status=$?
14896   echo "$as_me:14896: \$? = $ac_status" >&5
14897   (exit $ac_status); } &&
14898          { ac_try='test -s conftest$ac_exeext'
14899   { (eval echo "$as_me:14899: \"$ac_try\"") >&5
14900   (eval $ac_try) 2>&5
14901   ac_status=$?
14902   echo "$as_me:14902: \$? = $ac_status" >&5
14903   (exit $ac_status); }; }; then
14904   ac_cv_lib_dmalloc_dmalloc_debug=yes
14905 else
14906   echo "$as_me: failed program was:" >&5
14907 cat conftest.$ac_ext >&5
14908 ac_cv_lib_dmalloc_dmalloc_debug=no
14909 fi
14910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14911 LIBS=$ac_check_lib_save_LIBS
14912 fi
14913 echo "$as_me:14913: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14914 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14915 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14916   cat >>confdefs.h <<EOF
14917 #define HAVE_LIBDMALLOC 1
14918 EOF
14919
14920   LIBS="-ldmalloc $LIBS"
14921
14922 fi
14923
14924 fi
14925
14926 fi
14927
14928 echo "$as_me:14928: checking if you want to use dbmalloc for testing" >&5
14929 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14930
14931 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14932 if test "${with_dbmalloc+set}" = set; then
14933   withval="$with_dbmalloc"
14934
14935 cat >>confdefs.h <<EOF
14936 #define USE_DBMALLOC 1
14937 EOF
14938
14939         : ${with_cflags:=-g}
14940         : ${with_no_leaks:=yes}
14941          with_dbmalloc=yes
14942 else
14943   with_dbmalloc=
14944 fi;
14945 echo "$as_me:14945: result: ${with_dbmalloc:-no}" >&5
14946 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14947
14948 case .$with_cflags in
14949 (.*-g*)
14950         case .$CFLAGS in
14951         (.*-g*)
14952                 ;;
14953         (*)
14954
14955 cf_fix_cppflags=no
14956 cf_new_cflags=
14957 cf_new_cppflags=
14958 cf_new_extra_cppflags=
14959
14960 for cf_add_cflags in -g
14961 do
14962 case $cf_fix_cppflags in
14963 (no)
14964         case $cf_add_cflags in
14965         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14966                 case $cf_add_cflags in
14967                 (-D*)
14968                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14969
14970                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14971                                 && test -z "${cf_tst_cflags}" \
14972                                 && cf_fix_cppflags=yes
14973
14974                         if test $cf_fix_cppflags = yes ; then
14975
14976         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14977         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14978
14979                                 continue
14980                         elif test "${cf_tst_cflags}" = "\"'" ; then
14981
14982         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14983         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14984
14985                                 continue
14986                         fi
14987                         ;;
14988                 esac
14989                 case "$CPPFLAGS" in
14990                 (*$cf_add_cflags)
14991                         ;;
14992                 (*)
14993                         case $cf_add_cflags in
14994                         (-D*)
14995                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14996
14997 CPPFLAGS=`echo "$CPPFLAGS" | \
14998         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14999                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15000
15001                                 ;;
15002                         esac
15003
15004         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15005         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15006
15007                         ;;
15008                 esac
15009                 ;;
15010         (*)
15011
15012         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15013         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15014
15015                 ;;
15016         esac
15017         ;;
15018 (yes)
15019
15020         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15021         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15022
15023         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15024
15025         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15026                 && test -z "${cf_tst_cflags}" \
15027                 && cf_fix_cppflags=no
15028         ;;
15029 esac
15030 done
15031
15032 if test -n "$cf_new_cflags" ; then
15033
15034         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15035         CFLAGS="${CFLAGS}$cf_new_cflags"
15036
15037 fi
15038
15039 if test -n "$cf_new_cppflags" ; then
15040
15041         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15042         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15043
15044 fi
15045
15046 if test -n "$cf_new_extra_cppflags" ; then
15047
15048         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15049         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15050
15051 fi
15052
15053                 ;;
15054         esac
15055         ;;
15056 esac
15057
15058 if test "$with_dbmalloc" = yes ; then
15059         echo "$as_me:15059: checking for dbmalloc.h" >&5
15060 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
15061 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
15062   echo $ECHO_N "(cached) $ECHO_C" >&6
15063 else
15064   cat >conftest.$ac_ext <<_ACEOF
15065 #line 15065 "configure"
15066 #include "confdefs.h"
15067 #include <dbmalloc.h>
15068 _ACEOF
15069 if { (eval echo "$as_me:15069: \"$ac_cpp conftest.$ac_ext\"") >&5
15070   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15071   ac_status=$?
15072   egrep -v '^ *\+' conftest.er1 >conftest.err
15073   rm -f conftest.er1
15074   cat conftest.err >&5
15075   echo "$as_me:15075: \$? = $ac_status" >&5
15076   (exit $ac_status); } >/dev/null; then
15077   if test -s conftest.err; then
15078     ac_cpp_err=$ac_c_preproc_warn_flag
15079   else
15080     ac_cpp_err=
15081   fi
15082 else
15083   ac_cpp_err=yes
15084 fi
15085 if test -z "$ac_cpp_err"; then
15086   ac_cv_header_dbmalloc_h=yes
15087 else
15088   echo "$as_me: failed program was:" >&5
15089   cat conftest.$ac_ext >&5
15090   ac_cv_header_dbmalloc_h=no
15091 fi
15092 rm -f conftest.err conftest.$ac_ext
15093 fi
15094 echo "$as_me:15094: result: $ac_cv_header_dbmalloc_h" >&5
15095 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
15096 if test $ac_cv_header_dbmalloc_h = yes; then
15097
15098 echo "$as_me:15098: checking for debug_malloc in -ldbmalloc" >&5
15099 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
15100 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
15101   echo $ECHO_N "(cached) $ECHO_C" >&6
15102 else
15103   ac_check_lib_save_LIBS=$LIBS
15104 LIBS="-ldbmalloc  $LIBS"
15105 cat >conftest.$ac_ext <<_ACEOF
15106 #line 15106 "configure"
15107 #include "confdefs.h"
15108
15109 /* Override any gcc2 internal prototype to avoid an error.  */
15110 #ifdef __cplusplus
15111 extern "C"
15112 #endif
15113 /* We use char because int might match the return type of a gcc2
15114    builtin and then its argument prototype would still apply.  */
15115 char debug_malloc ();
15116 int
15117 main (void)
15118 {
15119 debug_malloc ();
15120   ;
15121   return 0;
15122 }
15123 _ACEOF
15124 rm -f conftest.$ac_objext conftest$ac_exeext
15125 if { (eval echo "$as_me:15125: \"$ac_link\"") >&5
15126   (eval $ac_link) 2>&5
15127   ac_status=$?
15128   echo "$as_me:15128: \$? = $ac_status" >&5
15129   (exit $ac_status); } &&
15130          { ac_try='test -s conftest$ac_exeext'
15131   { (eval echo "$as_me:15131: \"$ac_try\"") >&5
15132   (eval $ac_try) 2>&5
15133   ac_status=$?
15134   echo "$as_me:15134: \$? = $ac_status" >&5
15135   (exit $ac_status); }; }; then
15136   ac_cv_lib_dbmalloc_debug_malloc=yes
15137 else
15138   echo "$as_me: failed program was:" >&5
15139 cat conftest.$ac_ext >&5
15140 ac_cv_lib_dbmalloc_debug_malloc=no
15141 fi
15142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15143 LIBS=$ac_check_lib_save_LIBS
15144 fi
15145 echo "$as_me:15145: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
15146 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
15147 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
15148   cat >>confdefs.h <<EOF
15149 #define HAVE_LIBDBMALLOC 1
15150 EOF
15151
15152   LIBS="-ldbmalloc $LIBS"
15153
15154 fi
15155
15156 fi
15157
15158 fi
15159
15160 echo "$as_me:15160: checking if you want to use valgrind for testing" >&5
15161 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
15162
15163 # Check whether --with-valgrind or --without-valgrind was given.
15164 if test "${with_valgrind+set}" = set; then
15165   withval="$with_valgrind"
15166
15167 cat >>confdefs.h <<EOF
15168 #define USE_VALGRIND 1
15169 EOF
15170
15171         : ${with_cflags:=-g}
15172         : ${with_no_leaks:=yes}
15173          with_valgrind=yes
15174 else
15175   with_valgrind=
15176 fi;
15177 echo "$as_me:15177: result: ${with_valgrind:-no}" >&5
15178 echo "${ECHO_T}${with_valgrind:-no}" >&6
15179
15180 case .$with_cflags in
15181 (.*-g*)
15182         case .$CFLAGS in
15183         (.*-g*)
15184                 ;;
15185         (*)
15186
15187 cf_fix_cppflags=no
15188 cf_new_cflags=
15189 cf_new_cppflags=
15190 cf_new_extra_cppflags=
15191
15192 for cf_add_cflags in -g
15193 do
15194 case $cf_fix_cppflags in
15195 (no)
15196         case $cf_add_cflags in
15197         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15198                 case $cf_add_cflags in
15199                 (-D*)
15200                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15201
15202                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15203                                 && test -z "${cf_tst_cflags}" \
15204                                 && cf_fix_cppflags=yes
15205
15206                         if test $cf_fix_cppflags = yes ; then
15207
15208         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15209         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15210
15211                                 continue
15212                         elif test "${cf_tst_cflags}" = "\"'" ; then
15213
15214         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15215         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15216
15217                                 continue
15218                         fi
15219                         ;;
15220                 esac
15221                 case "$CPPFLAGS" in
15222                 (*$cf_add_cflags)
15223                         ;;
15224                 (*)
15225                         case $cf_add_cflags in
15226                         (-D*)
15227                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15228
15229 CPPFLAGS=`echo "$CPPFLAGS" | \
15230         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15231                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15232
15233                                 ;;
15234                         esac
15235
15236         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15237         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15238
15239                         ;;
15240                 esac
15241                 ;;
15242         (*)
15243
15244         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15245         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15246
15247                 ;;
15248         esac
15249         ;;
15250 (yes)
15251
15252         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15253         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15254
15255         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15256
15257         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15258                 && test -z "${cf_tst_cflags}" \
15259                 && cf_fix_cppflags=no
15260         ;;
15261 esac
15262 done
15263
15264 if test -n "$cf_new_cflags" ; then
15265
15266         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15267         CFLAGS="${CFLAGS}$cf_new_cflags"
15268
15269 fi
15270
15271 if test -n "$cf_new_cppflags" ; then
15272
15273         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15274         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15275
15276 fi
15277
15278 if test -n "$cf_new_extra_cppflags" ; then
15279
15280         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15281         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15282
15283 fi
15284
15285                 ;;
15286         esac
15287         ;;
15288 esac
15289
15290 echo "$as_me:15290: checking if you want to perform memory-leak testing" >&5
15291 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15292
15293 # Check whether --enable-leaks or --disable-leaks was given.
15294 if test "${enable_leaks+set}" = set; then
15295   enableval="$enable_leaks"
15296   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15297 else
15298   : ${with_no_leaks:=no}
15299 fi;
15300 echo "$as_me:15300: result: $with_no_leaks" >&5
15301 echo "${ECHO_T}$with_no_leaks" >&6
15302
15303 if test "$with_no_leaks" = yes ; then
15304
15305 cat >>confdefs.h <<\EOF
15306 #define NO_LEAKS 1
15307 EOF
15308
15309 cat >>confdefs.h <<\EOF
15310 #define YY_NO_LEAKS 1
15311 EOF
15312
15313 fi
15314
15315 cat >>confdefs.h <<\EOF
15316 #define HAVE_NC_ALLOC_H 1
15317 EOF
15318
15319 ###     use option --enable-expanded to generate certain macros as functions
15320
15321 # Check whether --enable-expanded or --disable-expanded was given.
15322 if test "${enable_expanded+set}" = set; then
15323   enableval="$enable_expanded"
15324   test "x$enableval" = xyes &&
15325 cat >>confdefs.h <<\EOF
15326 #define NCURSES_EXPANDED 1
15327 EOF
15328
15329 fi;
15330
15331 ###     use option --disable-macros to suppress macros in favor of functions
15332
15333 # Check whether --enable-macros or --disable-macros was given.
15334 if test "${enable_macros+set}" = set; then
15335   enableval="$enable_macros"
15336   test "$enableval" = no &&
15337 cat >>confdefs.h <<\EOF
15338 #define NCURSES_NOMACROS 1
15339 EOF
15340
15341 fi;
15342
15343 # Normally we only add trace() to the debug-library.  Allow this to be
15344 # extended to all models of the ncurses library:
15345 cf_all_traces=no
15346 case "$CFLAGS $CPPFLAGS" in
15347 (*-DTRACE*)
15348         cf_all_traces=yes
15349         ;;
15350 esac
15351
15352 echo "$as_me:15352: checking whether to add trace feature to all models" >&5
15353 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15354
15355 # Check whether --with-trace or --without-trace was given.
15356 if test "${with_trace+set}" = set; then
15357   withval="$with_trace"
15358   cf_with_trace=$withval
15359 else
15360   cf_with_trace=$cf_all_traces
15361 fi;
15362 echo "$as_me:15362: result: $cf_with_trace" >&5
15363 echo "${ECHO_T}$cf_with_trace" >&6
15364
15365 if test "x$cf_with_trace" = xyes ; then
15366         LIB_TRACING=all
15367         ADA_TRACE=TRUE
15368
15369 cf_fix_cppflags=no
15370 cf_new_cflags=
15371 cf_new_cppflags=
15372 cf_new_extra_cppflags=
15373
15374 for cf_add_cflags in -DTRACE
15375 do
15376 case $cf_fix_cppflags in
15377 (no)
15378         case $cf_add_cflags in
15379         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15380                 case $cf_add_cflags in
15381                 (-D*)
15382                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15383
15384                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15385                                 && test -z "${cf_tst_cflags}" \
15386                                 && cf_fix_cppflags=yes
15387
15388                         if test $cf_fix_cppflags = yes ; then
15389
15390         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15391         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15392
15393                                 continue
15394                         elif test "${cf_tst_cflags}" = "\"'" ; then
15395
15396         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15397         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15398
15399                                 continue
15400                         fi
15401                         ;;
15402                 esac
15403                 case "$CPPFLAGS" in
15404                 (*$cf_add_cflags)
15405                         ;;
15406                 (*)
15407                         case $cf_add_cflags in
15408                         (-D*)
15409                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15410
15411 CPPFLAGS=`echo "$CPPFLAGS" | \
15412         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15413                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15414
15415                                 ;;
15416                         esac
15417
15418         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15419         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15420
15421                         ;;
15422                 esac
15423                 ;;
15424         (*)
15425
15426         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15427         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15428
15429                 ;;
15430         esac
15431         ;;
15432 (yes)
15433
15434         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15435         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15436
15437         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15438
15439         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15440                 && test -z "${cf_tst_cflags}" \
15441                 && cf_fix_cppflags=no
15442         ;;
15443 esac
15444 done
15445
15446 if test -n "$cf_new_cflags" ; then
15447
15448         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15449         CFLAGS="${CFLAGS}$cf_new_cflags"
15450
15451 fi
15452
15453 if test -n "$cf_new_cppflags" ; then
15454
15455         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15456         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15457
15458 fi
15459
15460 if test -n "$cf_new_extra_cppflags" ; then
15461
15462         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15463         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15464
15465 fi
15466
15467 cat >>confdefs.h <<\EOF
15468 #define HAVE__TRACEF 1
15469 EOF
15470
15471 else
15472         LIB_TRACING=DEBUG
15473         ADA_TRACE=FALSE
15474 fi
15475
15476 echo "$as_me:15476: checking if we want to use GNAT projects" >&5
15477 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15478
15479 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15480 if test "${enable_gnat_projects+set}" = set; then
15481   enableval="$enable_gnat_projects"
15482   test "$enableval" != no && enableval=yes
15483         if test "$enableval" != "yes" ; then
15484     enable_gnat_projects=no
15485         else
15486                 enable_gnat_projects=yes
15487         fi
15488 else
15489   enableval=yes
15490         enable_gnat_projects=yes
15491
15492 fi;
15493 echo "$as_me:15493: result: $enable_gnat_projects" >&5
15494 echo "${ECHO_T}$enable_gnat_projects" >&6
15495
15496 ###     Checks for libraries.
15497 case $cf_cv_system_name in
15498 (*mingw32*|*mingw64*)
15499         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15500         LIBS=" -lpsapi $LIBS"
15501         ;;
15502 (*)
15503 echo "$as_me:15503: checking for gettimeofday" >&5
15504 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15505 if test "${ac_cv_func_gettimeofday+set}" = set; then
15506   echo $ECHO_N "(cached) $ECHO_C" >&6
15507 else
15508   cat >conftest.$ac_ext <<_ACEOF
15509 #line 15509 "configure"
15510 #include "confdefs.h"
15511 /* System header to define __stub macros and hopefully few prototypes,
15512     which can conflict with char gettimeofday (); below.  */
15513 #include <assert.h>
15514 /* Override any gcc2 internal prototype to avoid an error.  */
15515 #ifdef __cplusplus
15516 extern "C"
15517 #endif
15518 /* We use char because int might match the return type of a gcc2
15519    builtin and then its argument prototype would still apply.  */
15520 char gettimeofday ();
15521 char (*f) ();
15522
15523 int
15524 main (void)
15525 {
15526 /* The GNU C library defines this for functions which it implements
15527     to always fail with ENOSYS.  Some functions are actually named
15528     something starting with __ and the normal name is an alias.  */
15529 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15530 choke me
15531 #else
15532 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15533 #endif
15534
15535   ;
15536   return 0;
15537 }
15538 _ACEOF
15539 rm -f conftest.$ac_objext conftest$ac_exeext
15540 if { (eval echo "$as_me:15540: \"$ac_link\"") >&5
15541   (eval $ac_link) 2>&5
15542   ac_status=$?
15543   echo "$as_me:15543: \$? = $ac_status" >&5
15544   (exit $ac_status); } &&
15545          { ac_try='test -s conftest$ac_exeext'
15546   { (eval echo "$as_me:15546: \"$ac_try\"") >&5
15547   (eval $ac_try) 2>&5
15548   ac_status=$?
15549   echo "$as_me:15549: \$? = $ac_status" >&5
15550   (exit $ac_status); }; }; then
15551   ac_cv_func_gettimeofday=yes
15552 else
15553   echo "$as_me: failed program was:" >&5
15554 cat conftest.$ac_ext >&5
15555 ac_cv_func_gettimeofday=no
15556 fi
15557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15558 fi
15559 echo "$as_me:15559: result: $ac_cv_func_gettimeofday" >&5
15560 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15561 if test $ac_cv_func_gettimeofday = yes; then
15562
15563 cat >>confdefs.h <<\EOF
15564 #define HAVE_GETTIMEOFDAY 1
15565 EOF
15566
15567 else
15568
15569 echo "$as_me:15569: checking for gettimeofday in -lbsd" >&5
15570 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15571 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15572   echo $ECHO_N "(cached) $ECHO_C" >&6
15573 else
15574   ac_check_lib_save_LIBS=$LIBS
15575 LIBS="-lbsd  $LIBS"
15576 cat >conftest.$ac_ext <<_ACEOF
15577 #line 15577 "configure"
15578 #include "confdefs.h"
15579
15580 /* Override any gcc2 internal prototype to avoid an error.  */
15581 #ifdef __cplusplus
15582 extern "C"
15583 #endif
15584 /* We use char because int might match the return type of a gcc2
15585    builtin and then its argument prototype would still apply.  */
15586 char gettimeofday ();
15587 int
15588 main (void)
15589 {
15590 gettimeofday ();
15591   ;
15592   return 0;
15593 }
15594 _ACEOF
15595 rm -f conftest.$ac_objext conftest$ac_exeext
15596 if { (eval echo "$as_me:15596: \"$ac_link\"") >&5
15597   (eval $ac_link) 2>&5
15598   ac_status=$?
15599   echo "$as_me:15599: \$? = $ac_status" >&5
15600   (exit $ac_status); } &&
15601          { ac_try='test -s conftest$ac_exeext'
15602   { (eval echo "$as_me:15602: \"$ac_try\"") >&5
15603   (eval $ac_try) 2>&5
15604   ac_status=$?
15605   echo "$as_me:15605: \$? = $ac_status" >&5
15606   (exit $ac_status); }; }; then
15607   ac_cv_lib_bsd_gettimeofday=yes
15608 else
15609   echo "$as_me: failed program was:" >&5
15610 cat conftest.$ac_ext >&5
15611 ac_cv_lib_bsd_gettimeofday=no
15612 fi
15613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15614 LIBS=$ac_check_lib_save_LIBS
15615 fi
15616 echo "$as_me:15616: result: $ac_cv_lib_bsd_gettimeofday" >&5
15617 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15618 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15619
15620 cat >>confdefs.h <<\EOF
15621 #define HAVE_GETTIMEOFDAY 1
15622 EOF
15623
15624 cf_add_libs="-lbsd"
15625 # Filter out duplicates - this happens with badly-designed ".pc" files...
15626 for cf_add_1lib in $LIBS
15627 do
15628         for cf_add_2lib in $cf_add_libs
15629         do
15630                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15631                 then
15632                         cf_add_1lib=
15633                         break
15634                 fi
15635         done
15636         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15637 done
15638 LIBS="$cf_add_libs"
15639
15640 fi
15641
15642 fi
15643         ;;
15644 esac
15645
15646 echo "$as_me:15646: checking if -lm needed for math functions" >&5
15647 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15648 if test "${cf_cv_need_libm+set}" = set; then
15649   echo $ECHO_N "(cached) $ECHO_C" >&6
15650 else
15651
15652         cat >conftest.$ac_ext <<_ACEOF
15653 #line 15653 "configure"
15654 #include "confdefs.h"
15655
15656         #include <stdio.h>
15657         #include <stdlib.h>
15658         #include <math.h>
15659
15660 int
15661 main (void)
15662 {
15663 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15664   ;
15665   return 0;
15666 }
15667 _ACEOF
15668 rm -f conftest.$ac_objext conftest$ac_exeext
15669 if { (eval echo "$as_me:15669: \"$ac_link\"") >&5
15670   (eval $ac_link) 2>&5
15671   ac_status=$?
15672   echo "$as_me:15672: \$? = $ac_status" >&5
15673   (exit $ac_status); } &&
15674          { ac_try='test -s conftest$ac_exeext'
15675   { (eval echo "$as_me:15675: \"$ac_try\"") >&5
15676   (eval $ac_try) 2>&5
15677   ac_status=$?
15678   echo "$as_me:15678: \$? = $ac_status" >&5
15679   (exit $ac_status); }; }; then
15680   cf_cv_need_libm=no
15681 else
15682   echo "$as_me: failed program was:" >&5
15683 cat conftest.$ac_ext >&5
15684 cf_cv_need_libm=yes
15685 fi
15686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15687 fi
15688 echo "$as_me:15688: result: $cf_cv_need_libm" >&5
15689 echo "${ECHO_T}$cf_cv_need_libm" >&6
15690 if test "$cf_cv_need_libm" = yes
15691 then
15692 MATH_LIB=-lm
15693 fi
15694
15695 ###     Checks for header files.
15696 echo "$as_me:15696: checking for ANSI C header files" >&5
15697 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15698 if test "${ac_cv_header_stdc+set}" = set; then
15699   echo $ECHO_N "(cached) $ECHO_C" >&6
15700 else
15701   cat >conftest.$ac_ext <<_ACEOF
15702 #line 15702 "configure"
15703 #include "confdefs.h"
15704 #include <stdlib.h>
15705 #include <stdarg.h>
15706 #include <string.h>
15707 #include <float.h>
15708
15709 _ACEOF
15710 if { (eval echo "$as_me:15710: \"$ac_cpp conftest.$ac_ext\"") >&5
15711   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15712   ac_status=$?
15713   egrep -v '^ *\+' conftest.er1 >conftest.err
15714   rm -f conftest.er1
15715   cat conftest.err >&5
15716   echo "$as_me:15716: \$? = $ac_status" >&5
15717   (exit $ac_status); } >/dev/null; then
15718   if test -s conftest.err; then
15719     ac_cpp_err=$ac_c_preproc_warn_flag
15720   else
15721     ac_cpp_err=
15722   fi
15723 else
15724   ac_cpp_err=yes
15725 fi
15726 if test -z "$ac_cpp_err"; then
15727   ac_cv_header_stdc=yes
15728 else
15729   echo "$as_me: failed program was:" >&5
15730   cat conftest.$ac_ext >&5
15731   ac_cv_header_stdc=no
15732 fi
15733 rm -f conftest.err conftest.$ac_ext
15734
15735 if test $ac_cv_header_stdc = yes; then
15736   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15737   cat >conftest.$ac_ext <<_ACEOF
15738 #line 15738 "configure"
15739 #include "confdefs.h"
15740 #include <string.h>
15741
15742 _ACEOF
15743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15744   egrep "memchr" >/dev/null 2>&1; then
15745   :
15746 else
15747   ac_cv_header_stdc=no
15748 fi
15749 rm -rf conftest*
15750
15751 fi
15752
15753 if test $ac_cv_header_stdc = yes; then
15754   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15755   cat >conftest.$ac_ext <<_ACEOF
15756 #line 15756 "configure"
15757 #include "confdefs.h"
15758 #include <stdlib.h>
15759
15760 _ACEOF
15761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15762   egrep "free" >/dev/null 2>&1; then
15763   :
15764 else
15765   ac_cv_header_stdc=no
15766 fi
15767 rm -rf conftest*
15768
15769 fi
15770
15771 if test $ac_cv_header_stdc = yes; then
15772   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15773   if test "$cross_compiling" = yes; then
15774   :
15775 else
15776   cat >conftest.$ac_ext <<_ACEOF
15777 #line 15777 "configure"
15778 #include "confdefs.h"
15779 #include <ctype.h>
15780 #if ((' ' & 0x0FF) == 0x020)
15781 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15782 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15783 #else
15784 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15785                      || ('j' <= (c) && (c) <= 'r') \
15786                      || ('s' <= (c) && (c) <= 'z'))
15787 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15788 #endif
15789
15790 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15791 int
15792 main (void)
15793 {
15794   int i;
15795   for (i = 0; i < 256; i++)
15796     if (XOR (islower (i), ISLOWER (i))
15797         || toupper (i) != TOUPPER (i))
15798       $ac_main_return(2);
15799   $ac_main_return (0);
15800 }
15801 _ACEOF
15802 rm -f conftest$ac_exeext
15803 if { (eval echo "$as_me:15803: \"$ac_link\"") >&5
15804   (eval $ac_link) 2>&5
15805   ac_status=$?
15806   echo "$as_me:15806: \$? = $ac_status" >&5
15807   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15808   { (eval echo "$as_me:15808: \"$ac_try\"") >&5
15809   (eval $ac_try) 2>&5
15810   ac_status=$?
15811   echo "$as_me:15811: \$? = $ac_status" >&5
15812   (exit $ac_status); }; }; then
15813   :
15814 else
15815   echo "$as_me: program exited with status $ac_status" >&5
15816 echo "$as_me: failed program was:" >&5
15817 cat conftest.$ac_ext >&5
15818 ac_cv_header_stdc=no
15819 fi
15820 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15821 fi
15822 fi
15823 fi
15824 echo "$as_me:15824: result: $ac_cv_header_stdc" >&5
15825 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15826 if test $ac_cv_header_stdc = yes; then
15827
15828 cat >>confdefs.h <<\EOF
15829 #define STDC_HEADERS 1
15830 EOF
15831
15832 fi
15833
15834 ac_header_dirent=no
15835 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15836   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15837 echo "$as_me:15837: checking for $ac_hdr that defines DIR" >&5
15838 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15839 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15840   echo $ECHO_N "(cached) $ECHO_C" >&6
15841 else
15842   cat >conftest.$ac_ext <<_ACEOF
15843 #line 15843 "configure"
15844 #include "confdefs.h"
15845 #include <sys/types.h>
15846 #include <$ac_hdr>
15847
15848 int
15849 main (void)
15850 {
15851 if ((DIR *) 0)
15852 return 0;
15853   ;
15854   return 0;
15855 }
15856 _ACEOF
15857 rm -f conftest.$ac_objext
15858 if { (eval echo "$as_me:15858: \"$ac_compile\"") >&5
15859   (eval $ac_compile) 2>&5
15860   ac_status=$?
15861   echo "$as_me:15861: \$? = $ac_status" >&5
15862   (exit $ac_status); } &&
15863          { ac_try='test -s conftest.$ac_objext'
15864   { (eval echo "$as_me:15864: \"$ac_try\"") >&5
15865   (eval $ac_try) 2>&5
15866   ac_status=$?
15867   echo "$as_me:15867: \$? = $ac_status" >&5
15868   (exit $ac_status); }; }; then
15869   eval "$as_ac_Header=yes"
15870 else
15871   echo "$as_me: failed program was:" >&5
15872 cat conftest.$ac_ext >&5
15873 eval "$as_ac_Header=no"
15874 fi
15875 rm -f conftest.$ac_objext conftest.$ac_ext
15876 fi
15877 echo "$as_me:15877: result: `eval echo '${'$as_ac_Header'}'`" >&5
15878 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15879 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15880   cat >>confdefs.h <<EOF
15881 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15882 EOF
15883
15884 ac_header_dirent=$ac_hdr; break
15885 fi
15886
15887 done
15888 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15889 if test $ac_header_dirent = dirent.h; then
15890   echo "$as_me:15890: checking for opendir in -ldir" >&5
15891 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15892 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15893   echo $ECHO_N "(cached) $ECHO_C" >&6
15894 else
15895   ac_check_lib_save_LIBS=$LIBS
15896 LIBS="-ldir  $LIBS"
15897 cat >conftest.$ac_ext <<_ACEOF
15898 #line 15898 "configure"
15899 #include "confdefs.h"
15900
15901 /* Override any gcc2 internal prototype to avoid an error.  */
15902 #ifdef __cplusplus
15903 extern "C"
15904 #endif
15905 /* We use char because int might match the return type of a gcc2
15906    builtin and then its argument prototype would still apply.  */
15907 char opendir ();
15908 int
15909 main (void)
15910 {
15911 opendir ();
15912   ;
15913   return 0;
15914 }
15915 _ACEOF
15916 rm -f conftest.$ac_objext conftest$ac_exeext
15917 if { (eval echo "$as_me:15917: \"$ac_link\"") >&5
15918   (eval $ac_link) 2>&5
15919   ac_status=$?
15920   echo "$as_me:15920: \$? = $ac_status" >&5
15921   (exit $ac_status); } &&
15922          { ac_try='test -s conftest$ac_exeext'
15923   { (eval echo "$as_me:15923: \"$ac_try\"") >&5
15924   (eval $ac_try) 2>&5
15925   ac_status=$?
15926   echo "$as_me:15926: \$? = $ac_status" >&5
15927   (exit $ac_status); }; }; then
15928   ac_cv_lib_dir_opendir=yes
15929 else
15930   echo "$as_me: failed program was:" >&5
15931 cat conftest.$ac_ext >&5
15932 ac_cv_lib_dir_opendir=no
15933 fi
15934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15935 LIBS=$ac_check_lib_save_LIBS
15936 fi
15937 echo "$as_me:15937: result: $ac_cv_lib_dir_opendir" >&5
15938 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15939 if test $ac_cv_lib_dir_opendir = yes; then
15940   LIBS="$LIBS -ldir"
15941 fi
15942
15943 else
15944   echo "$as_me:15944: checking for opendir in -lx" >&5
15945 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15946 if test "${ac_cv_lib_x_opendir+set}" = set; then
15947   echo $ECHO_N "(cached) $ECHO_C" >&6
15948 else
15949   ac_check_lib_save_LIBS=$LIBS
15950 LIBS="-lx  $LIBS"
15951 cat >conftest.$ac_ext <<_ACEOF
15952 #line 15952 "configure"
15953 #include "confdefs.h"
15954
15955 /* Override any gcc2 internal prototype to avoid an error.  */
15956 #ifdef __cplusplus
15957 extern "C"
15958 #endif
15959 /* We use char because int might match the return type of a gcc2
15960    builtin and then its argument prototype would still apply.  */
15961 char opendir ();
15962 int
15963 main (void)
15964 {
15965 opendir ();
15966   ;
15967   return 0;
15968 }
15969 _ACEOF
15970 rm -f conftest.$ac_objext conftest$ac_exeext
15971 if { (eval echo "$as_me:15971: \"$ac_link\"") >&5
15972   (eval $ac_link) 2>&5
15973   ac_status=$?
15974   echo "$as_me:15974: \$? = $ac_status" >&5
15975   (exit $ac_status); } &&
15976          { ac_try='test -s conftest$ac_exeext'
15977   { (eval echo "$as_me:15977: \"$ac_try\"") >&5
15978   (eval $ac_try) 2>&5
15979   ac_status=$?
15980   echo "$as_me:15980: \$? = $ac_status" >&5
15981   (exit $ac_status); }; }; then
15982   ac_cv_lib_x_opendir=yes
15983 else
15984   echo "$as_me: failed program was:" >&5
15985 cat conftest.$ac_ext >&5
15986 ac_cv_lib_x_opendir=no
15987 fi
15988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15989 LIBS=$ac_check_lib_save_LIBS
15990 fi
15991 echo "$as_me:15991: result: $ac_cv_lib_x_opendir" >&5
15992 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15993 if test $ac_cv_lib_x_opendir = yes; then
15994   LIBS="$LIBS -lx"
15995 fi
15996
15997 fi
15998
15999 echo "$as_me:15999: checking whether time.h and sys/time.h may both be included" >&5
16000 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16001 if test "${ac_cv_header_time+set}" = set; then
16002   echo $ECHO_N "(cached) $ECHO_C" >&6
16003 else
16004   cat >conftest.$ac_ext <<_ACEOF
16005 #line 16005 "configure"
16006 #include "confdefs.h"
16007 #include <sys/types.h>
16008 #include <sys/time.h>
16009 #include <time.h>
16010
16011 int
16012 main (void)
16013 {
16014 if ((struct tm *) 0)
16015 return 0;
16016   ;
16017   return 0;
16018 }
16019 _ACEOF
16020 rm -f conftest.$ac_objext
16021 if { (eval echo "$as_me:16021: \"$ac_compile\"") >&5
16022   (eval $ac_compile) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit $ac_status); } &&
16026          { ac_try='test -s conftest.$ac_objext'
16027   { (eval echo "$as_me:16027: \"$ac_try\"") >&5
16028   (eval $ac_try) 2>&5
16029   ac_status=$?
16030   echo "$as_me:16030: \$? = $ac_status" >&5
16031   (exit $ac_status); }; }; then
16032   ac_cv_header_time=yes
16033 else
16034   echo "$as_me: failed program was:" >&5
16035 cat conftest.$ac_ext >&5
16036 ac_cv_header_time=no
16037 fi
16038 rm -f conftest.$ac_objext conftest.$ac_ext
16039 fi
16040 echo "$as_me:16040: result: $ac_cv_header_time" >&5
16041 echo "${ECHO_T}$ac_cv_header_time" >&6
16042 if test $ac_cv_header_time = yes; then
16043
16044 cat >>confdefs.h <<\EOF
16045 #define TIME_WITH_SYS_TIME 1
16046 EOF
16047
16048 fi
16049
16050 cf_regex_func=no
16051
16052 cf_regex_libs="regex re"
16053 case $host_os in
16054 (mingw*)
16055         cf_regex_libs="gnurx $cf_regex_libs"
16056         ;;
16057 esac
16058
16059 echo "$as_me:16059: checking for regcomp" >&5
16060 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
16061 if test "${ac_cv_func_regcomp+set}" = set; then
16062   echo $ECHO_N "(cached) $ECHO_C" >&6
16063 else
16064   cat >conftest.$ac_ext <<_ACEOF
16065 #line 16065 "configure"
16066 #include "confdefs.h"
16067 /* System header to define __stub macros and hopefully few prototypes,
16068     which can conflict with char regcomp (); below.  */
16069 #include <assert.h>
16070 /* Override any gcc2 internal prototype to avoid an error.  */
16071 #ifdef __cplusplus
16072 extern "C"
16073 #endif
16074 /* We use char because int might match the return type of a gcc2
16075    builtin and then its argument prototype would still apply.  */
16076 char regcomp ();
16077 char (*f) ();
16078
16079 int
16080 main (void)
16081 {
16082 /* The GNU C library defines this for functions which it implements
16083     to always fail with ENOSYS.  Some functions are actually named
16084     something starting with __ and the normal name is an alias.  */
16085 #if defined (__stub_regcomp) || defined (__stub___regcomp)
16086 choke me
16087 #else
16088 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16089 #endif
16090
16091   ;
16092   return 0;
16093 }
16094 _ACEOF
16095 rm -f conftest.$ac_objext conftest$ac_exeext
16096 if { (eval echo "$as_me:16096: \"$ac_link\"") >&5
16097   (eval $ac_link) 2>&5
16098   ac_status=$?
16099   echo "$as_me:16099: \$? = $ac_status" >&5
16100   (exit $ac_status); } &&
16101          { ac_try='test -s conftest$ac_exeext'
16102   { (eval echo "$as_me:16102: \"$ac_try\"") >&5
16103   (eval $ac_try) 2>&5
16104   ac_status=$?
16105   echo "$as_me:16105: \$? = $ac_status" >&5
16106   (exit $ac_status); }; }; then
16107   ac_cv_func_regcomp=yes
16108 else
16109   echo "$as_me: failed program was:" >&5
16110 cat conftest.$ac_ext >&5
16111 ac_cv_func_regcomp=no
16112 fi
16113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16114 fi
16115 echo "$as_me:16115: result: $ac_cv_func_regcomp" >&5
16116 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
16117 if test $ac_cv_func_regcomp = yes; then
16118   cf_regex_func=regcomp
16119 else
16120
16121         for cf_regex_lib in $cf_regex_libs
16122         do
16123                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
16124 echo "$as_me:16124: checking for regcomp in -l$cf_regex_lib" >&5
16125 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
16126 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16127   echo $ECHO_N "(cached) $ECHO_C" >&6
16128 else
16129   ac_check_lib_save_LIBS=$LIBS
16130 LIBS="-l$cf_regex_lib  $LIBS"
16131 cat >conftest.$ac_ext <<_ACEOF
16132 #line 16132 "configure"
16133 #include "confdefs.h"
16134
16135 /* Override any gcc2 internal prototype to avoid an error.  */
16136 #ifdef __cplusplus
16137 extern "C"
16138 #endif
16139 /* We use char because int might match the return type of a gcc2
16140    builtin and then its argument prototype would still apply.  */
16141 char regcomp ();
16142 int
16143 main (void)
16144 {
16145 regcomp ();
16146   ;
16147   return 0;
16148 }
16149 _ACEOF
16150 rm -f conftest.$ac_objext conftest$ac_exeext
16151 if { (eval echo "$as_me:16151: \"$ac_link\"") >&5
16152   (eval $ac_link) 2>&5
16153   ac_status=$?
16154   echo "$as_me:16154: \$? = $ac_status" >&5
16155   (exit $ac_status); } &&
16156          { ac_try='test -s conftest$ac_exeext'
16157   { (eval echo "$as_me:16157: \"$ac_try\"") >&5
16158   (eval $ac_try) 2>&5
16159   ac_status=$?
16160   echo "$as_me:16160: \$? = $ac_status" >&5
16161   (exit $ac_status); }; }; then
16162   eval "$as_ac_Lib=yes"
16163 else
16164   echo "$as_me: failed program was:" >&5
16165 cat conftest.$ac_ext >&5
16166 eval "$as_ac_Lib=no"
16167 fi
16168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16169 LIBS=$ac_check_lib_save_LIBS
16170 fi
16171 echo "$as_me:16171: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16172 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16173 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16174
16175 cf_add_libs="-l$cf_regex_lib"
16176 # Filter out duplicates - this happens with badly-designed ".pc" files...
16177 for cf_add_1lib in $LIBS
16178 do
16179         for cf_add_2lib in $cf_add_libs
16180         do
16181                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16182                 then
16183                         cf_add_1lib=
16184                         break
16185                 fi
16186         done
16187         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16188 done
16189 LIBS="$cf_add_libs"
16190
16191                                 cf_regex_func=regcomp
16192                                 break
16193 fi
16194
16195         done
16196
16197 fi
16198
16199 if test "$cf_regex_func" = no ; then
16200         echo "$as_me:16200: checking for compile" >&5
16201 echo $ECHO_N "checking for compile... $ECHO_C" >&6
16202 if test "${ac_cv_func_compile+set}" = set; then
16203   echo $ECHO_N "(cached) $ECHO_C" >&6
16204 else
16205   cat >conftest.$ac_ext <<_ACEOF
16206 #line 16206 "configure"
16207 #include "confdefs.h"
16208 /* System header to define __stub macros and hopefully few prototypes,
16209     which can conflict with char compile (); below.  */
16210 #include <assert.h>
16211 /* Override any gcc2 internal prototype to avoid an error.  */
16212 #ifdef __cplusplus
16213 extern "C"
16214 #endif
16215 /* We use char because int might match the return type of a gcc2
16216    builtin and then its argument prototype would still apply.  */
16217 char compile ();
16218 char (*f) ();
16219
16220 int
16221 main (void)
16222 {
16223 /* The GNU C library defines this for functions which it implements
16224     to always fail with ENOSYS.  Some functions are actually named
16225     something starting with __ and the normal name is an alias.  */
16226 #if defined (__stub_compile) || defined (__stub___compile)
16227 choke me
16228 #else
16229 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16230 #endif
16231
16232   ;
16233   return 0;
16234 }
16235 _ACEOF
16236 rm -f conftest.$ac_objext conftest$ac_exeext
16237 if { (eval echo "$as_me:16237: \"$ac_link\"") >&5
16238   (eval $ac_link) 2>&5
16239   ac_status=$?
16240   echo "$as_me:16240: \$? = $ac_status" >&5
16241   (exit $ac_status); } &&
16242          { ac_try='test -s conftest$ac_exeext'
16243   { (eval echo "$as_me:16243: \"$ac_try\"") >&5
16244   (eval $ac_try) 2>&5
16245   ac_status=$?
16246   echo "$as_me:16246: \$? = $ac_status" >&5
16247   (exit $ac_status); }; }; then
16248   ac_cv_func_compile=yes
16249 else
16250   echo "$as_me: failed program was:" >&5
16251 cat conftest.$ac_ext >&5
16252 ac_cv_func_compile=no
16253 fi
16254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16255 fi
16256 echo "$as_me:16256: result: $ac_cv_func_compile" >&5
16257 echo "${ECHO_T}$ac_cv_func_compile" >&6
16258 if test $ac_cv_func_compile = yes; then
16259   cf_regex_func=compile
16260 else
16261
16262                 echo "$as_me:16262: checking for compile in -lgen" >&5
16263 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16264 if test "${ac_cv_lib_gen_compile+set}" = set; then
16265   echo $ECHO_N "(cached) $ECHO_C" >&6
16266 else
16267   ac_check_lib_save_LIBS=$LIBS
16268 LIBS="-lgen  $LIBS"
16269 cat >conftest.$ac_ext <<_ACEOF
16270 #line 16270 "configure"
16271 #include "confdefs.h"
16272
16273 /* Override any gcc2 internal prototype to avoid an error.  */
16274 #ifdef __cplusplus
16275 extern "C"
16276 #endif
16277 /* We use char because int might match the return type of a gcc2
16278    builtin and then its argument prototype would still apply.  */
16279 char compile ();
16280 int
16281 main (void)
16282 {
16283 compile ();
16284   ;
16285   return 0;
16286 }
16287 _ACEOF
16288 rm -f conftest.$ac_objext conftest$ac_exeext
16289 if { (eval echo "$as_me:16289: \"$ac_link\"") >&5
16290   (eval $ac_link) 2>&5
16291   ac_status=$?
16292   echo "$as_me:16292: \$? = $ac_status" >&5
16293   (exit $ac_status); } &&
16294          { ac_try='test -s conftest$ac_exeext'
16295   { (eval echo "$as_me:16295: \"$ac_try\"") >&5
16296   (eval $ac_try) 2>&5
16297   ac_status=$?
16298   echo "$as_me:16298: \$? = $ac_status" >&5
16299   (exit $ac_status); }; }; then
16300   ac_cv_lib_gen_compile=yes
16301 else
16302   echo "$as_me: failed program was:" >&5
16303 cat conftest.$ac_ext >&5
16304 ac_cv_lib_gen_compile=no
16305 fi
16306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16307 LIBS=$ac_check_lib_save_LIBS
16308 fi
16309 echo "$as_me:16309: result: $ac_cv_lib_gen_compile" >&5
16310 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16311 if test $ac_cv_lib_gen_compile = yes; then
16312
16313 cf_add_libs="-lgen"
16314 # Filter out duplicates - this happens with badly-designed ".pc" files...
16315 for cf_add_1lib in $LIBS
16316 do
16317         for cf_add_2lib in $cf_add_libs
16318         do
16319                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16320                 then
16321                         cf_add_1lib=
16322                         break
16323                 fi
16324         done
16325         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16326 done
16327 LIBS="$cf_add_libs"
16328
16329                                 cf_regex_func=compile
16330 fi
16331
16332 fi
16333
16334 fi
16335
16336 if test "$cf_regex_func" = no ; then
16337         { echo "$as_me:16337: WARNING: cannot find regular expression library" >&5
16338 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16339 fi
16340
16341 echo "$as_me:16341: checking for regular-expression headers" >&5
16342 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16343 if test "${cf_cv_regex_hdrs+set}" = set; then
16344   echo $ECHO_N "(cached) $ECHO_C" >&6
16345 else
16346
16347 cf_cv_regex_hdrs=no
16348 case $cf_regex_func in
16349 (compile)
16350         for cf_regex_hdr in regexp.h regexpr.h
16351         do
16352                 cat >conftest.$ac_ext <<_ACEOF
16353 #line 16353 "configure"
16354 #include "confdefs.h"
16355 #include <$cf_regex_hdr>
16356 int
16357 main (void)
16358 {
16359
16360                         char *p = compile("", "", "", 0);
16361                         int x = step("", "");
16362
16363   ;
16364   return 0;
16365 }
16366 _ACEOF
16367 rm -f conftest.$ac_objext conftest$ac_exeext
16368 if { (eval echo "$as_me:16368: \"$ac_link\"") >&5
16369   (eval $ac_link) 2>&5
16370   ac_status=$?
16371   echo "$as_me:16371: \$? = $ac_status" >&5
16372   (exit $ac_status); } &&
16373          { ac_try='test -s conftest$ac_exeext'
16374   { (eval echo "$as_me:16374: \"$ac_try\"") >&5
16375   (eval $ac_try) 2>&5
16376   ac_status=$?
16377   echo "$as_me:16377: \$? = $ac_status" >&5
16378   (exit $ac_status); }; }; then
16379
16380                         cf_cv_regex_hdrs=$cf_regex_hdr
16381                         break
16382
16383 else
16384   echo "$as_me: failed program was:" >&5
16385 cat conftest.$ac_ext >&5
16386 fi
16387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16388         done
16389         ;;
16390 (*)
16391         for cf_regex_hdr in regex.h
16392         do
16393                 cat >conftest.$ac_ext <<_ACEOF
16394 #line 16394 "configure"
16395 #include "confdefs.h"
16396 #include <sys/types.h>
16397 #include <$cf_regex_hdr>
16398 int
16399 main (void)
16400 {
16401
16402                         regex_t *p;
16403                         int x = regcomp(p, "", 0);
16404                         int y = regexec(p, "", 0, 0, 0);
16405                         regfree(p);
16406
16407   ;
16408   return 0;
16409 }
16410 _ACEOF
16411 rm -f conftest.$ac_objext conftest$ac_exeext
16412 if { (eval echo "$as_me:16412: \"$ac_link\"") >&5
16413   (eval $ac_link) 2>&5
16414   ac_status=$?
16415   echo "$as_me:16415: \$? = $ac_status" >&5
16416   (exit $ac_status); } &&
16417          { ac_try='test -s conftest$ac_exeext'
16418   { (eval echo "$as_me:16418: \"$ac_try\"") >&5
16419   (eval $ac_try) 2>&5
16420   ac_status=$?
16421   echo "$as_me:16421: \$? = $ac_status" >&5
16422   (exit $ac_status); }; }; then
16423
16424                         cf_cv_regex_hdrs=$cf_regex_hdr
16425                         break
16426
16427 else
16428   echo "$as_me: failed program was:" >&5
16429 cat conftest.$ac_ext >&5
16430 fi
16431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16432         done
16433         ;;
16434 esac
16435
16436 fi
16437 echo "$as_me:16437: result: $cf_cv_regex_hdrs" >&5
16438 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16439
16440 case $cf_cv_regex_hdrs in
16441         (no)            { echo "$as_me:16441: WARNING: no regular expression header found" >&5
16442 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16443         (regex.h)
16444 cat >>confdefs.h <<\EOF
16445 #define HAVE_REGEX_H_FUNCS 1
16446 EOF
16447  ;;
16448         (regexp.h)
16449 cat >>confdefs.h <<\EOF
16450 #define HAVE_REGEXP_H_FUNCS 1
16451 EOF
16452  ;;
16453         (regexpr.h)
16454 cat >>confdefs.h <<\EOF
16455 #define HAVE_REGEXPR_H_FUNCS 1
16456 EOF
16457  ;;
16458 esac
16459
16460 for ac_header in \
16461 fcntl.h \
16462 getopt.h \
16463 limits.h \
16464 locale.h \
16465 math.h \
16466 poll.h \
16467 sys/bsdtypes.h \
16468 sys/ioctl.h \
16469 sys/param.h \
16470 sys/poll.h \
16471 sys/select.h \
16472 sys/time.h \
16473 sys/times.h \
16474 ttyent.h \
16475 unistd.h \
16476 wctype.h \
16477
16478 do
16479 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16480 echo "$as_me:16480: checking for $ac_header" >&5
16481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16483   echo $ECHO_N "(cached) $ECHO_C" >&6
16484 else
16485   cat >conftest.$ac_ext <<_ACEOF
16486 #line 16486 "configure"
16487 #include "confdefs.h"
16488 #include <$ac_header>
16489 _ACEOF
16490 if { (eval echo "$as_me:16490: \"$ac_cpp conftest.$ac_ext\"") >&5
16491   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16492   ac_status=$?
16493   egrep -v '^ *\+' conftest.er1 >conftest.err
16494   rm -f conftest.er1
16495   cat conftest.err >&5
16496   echo "$as_me:16496: \$? = $ac_status" >&5
16497   (exit $ac_status); } >/dev/null; then
16498   if test -s conftest.err; then
16499     ac_cpp_err=$ac_c_preproc_warn_flag
16500   else
16501     ac_cpp_err=
16502   fi
16503 else
16504   ac_cpp_err=yes
16505 fi
16506 if test -z "$ac_cpp_err"; then
16507   eval "$as_ac_Header=yes"
16508 else
16509   echo "$as_me: failed program was:" >&5
16510   cat conftest.$ac_ext >&5
16511   eval "$as_ac_Header=no"
16512 fi
16513 rm -f conftest.err conftest.$ac_ext
16514 fi
16515 echo "$as_me:16515: result: `eval echo '${'$as_ac_Header'}'`" >&5
16516 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16517 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16518   cat >>confdefs.h <<EOF
16519 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16520 EOF
16521
16522 fi
16523 done
16524
16525 for ac_header in unistd.h getopt.h
16526 do
16527 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16528 echo "$as_me:16528: checking for $ac_header" >&5
16529 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16530 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16531   echo $ECHO_N "(cached) $ECHO_C" >&6
16532 else
16533   cat >conftest.$ac_ext <<_ACEOF
16534 #line 16534 "configure"
16535 #include "confdefs.h"
16536 #include <$ac_header>
16537 _ACEOF
16538 if { (eval echo "$as_me:16538: \"$ac_cpp conftest.$ac_ext\"") >&5
16539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16540   ac_status=$?
16541   egrep -v '^ *\+' conftest.er1 >conftest.err
16542   rm -f conftest.er1
16543   cat conftest.err >&5
16544   echo "$as_me:16544: \$? = $ac_status" >&5
16545   (exit $ac_status); } >/dev/null; then
16546   if test -s conftest.err; then
16547     ac_cpp_err=$ac_c_preproc_warn_flag
16548   else
16549     ac_cpp_err=
16550   fi
16551 else
16552   ac_cpp_err=yes
16553 fi
16554 if test -z "$ac_cpp_err"; then
16555   eval "$as_ac_Header=yes"
16556 else
16557   echo "$as_me: failed program was:" >&5
16558   cat conftest.$ac_ext >&5
16559   eval "$as_ac_Header=no"
16560 fi
16561 rm -f conftest.err conftest.$ac_ext
16562 fi
16563 echo "$as_me:16563: result: `eval echo '${'$as_ac_Header'}'`" >&5
16564 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16565 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16566   cat >>confdefs.h <<EOF
16567 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16568 EOF
16569
16570 fi
16571 done
16572
16573 echo "$as_me:16573: checking for header declaring getopt variables" >&5
16574 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16575 if test "${cf_cv_getopt_header+set}" = set; then
16576   echo $ECHO_N "(cached) $ECHO_C" >&6
16577 else
16578
16579 cf_cv_getopt_header=none
16580 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16581 do
16582 cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585
16586 #include <$cf_header>
16587 int
16588 main (void)
16589 {
16590 int x = optind; char *y = optarg
16591   ;
16592   return 0;
16593 }
16594 _ACEOF
16595 rm -f conftest.$ac_objext
16596 if { (eval echo "$as_me:16596: \"$ac_compile\"") >&5
16597   (eval $ac_compile) 2>&5
16598   ac_status=$?
16599   echo "$as_me:16599: \$? = $ac_status" >&5
16600   (exit $ac_status); } &&
16601          { ac_try='test -s conftest.$ac_objext'
16602   { (eval echo "$as_me:16602: \"$ac_try\"") >&5
16603   (eval $ac_try) 2>&5
16604   ac_status=$?
16605   echo "$as_me:16605: \$? = $ac_status" >&5
16606   (exit $ac_status); }; }; then
16607   cf_cv_getopt_header=$cf_header
16608  break
16609 else
16610   echo "$as_me: failed program was:" >&5
16611 cat conftest.$ac_ext >&5
16612 fi
16613 rm -f conftest.$ac_objext conftest.$ac_ext
16614 done
16615
16616 fi
16617 echo "$as_me:16617: result: $cf_cv_getopt_header" >&5
16618 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16619 if test $cf_cv_getopt_header != none ; then
16620
16621 cat >>confdefs.h <<\EOF
16622 #define HAVE_GETOPT_HEADER 1
16623 EOF
16624
16625 fi
16626 if test $cf_cv_getopt_header = getopt.h ; then
16627
16628 cat >>confdefs.h <<\EOF
16629 #define NEED_GETOPT_H 1
16630 EOF
16631
16632 fi
16633
16634 # check for ISC (this may also define _POSIX_SOURCE)
16635 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16636 if test "x$ISC" = xyes ; then
16637
16638 echo "$as_me:16638: checking for main in -lcposix" >&5
16639 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16640 if test "${ac_cv_lib_cposix_main+set}" = set; then
16641   echo $ECHO_N "(cached) $ECHO_C" >&6
16642 else
16643   ac_check_lib_save_LIBS=$LIBS
16644 LIBS="-lcposix  $LIBS"
16645 cat >conftest.$ac_ext <<_ACEOF
16646 #line 16646 "configure"
16647 #include "confdefs.h"
16648
16649 int
16650 main (void)
16651 {
16652 main ();
16653   ;
16654   return 0;
16655 }
16656 _ACEOF
16657 rm -f conftest.$ac_objext conftest$ac_exeext
16658 if { (eval echo "$as_me:16658: \"$ac_link\"") >&5
16659   (eval $ac_link) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); } &&
16663          { ac_try='test -s conftest$ac_exeext'
16664   { (eval echo "$as_me:16664: \"$ac_try\"") >&5
16665   (eval $ac_try) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); }; }; then
16669   ac_cv_lib_cposix_main=yes
16670 else
16671   echo "$as_me: failed program was:" >&5
16672 cat conftest.$ac_ext >&5
16673 ac_cv_lib_cposix_main=no
16674 fi
16675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16676 LIBS=$ac_check_lib_save_LIBS
16677 fi
16678 echo "$as_me:16678: result: $ac_cv_lib_cposix_main" >&5
16679 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16680 if test $ac_cv_lib_cposix_main = yes; then
16681   cat >>confdefs.h <<EOF
16682 #define HAVE_LIBCPOSIX 1
16683 EOF
16684
16685   LIBS="-lcposix $LIBS"
16686
16687 fi
16688
16689         echo "$as_me:16689: checking for bzero in -linet" >&5
16690 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16691 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16692   echo $ECHO_N "(cached) $ECHO_C" >&6
16693 else
16694   ac_check_lib_save_LIBS=$LIBS
16695 LIBS="-linet  $LIBS"
16696 cat >conftest.$ac_ext <<_ACEOF
16697 #line 16697 "configure"
16698 #include "confdefs.h"
16699
16700 /* Override any gcc2 internal prototype to avoid an error.  */
16701 #ifdef __cplusplus
16702 extern "C"
16703 #endif
16704 /* We use char because int might match the return type of a gcc2
16705    builtin and then its argument prototype would still apply.  */
16706 char bzero ();
16707 int
16708 main (void)
16709 {
16710 bzero ();
16711   ;
16712   return 0;
16713 }
16714 _ACEOF
16715 rm -f conftest.$ac_objext conftest$ac_exeext
16716 if { (eval echo "$as_me:16716: \"$ac_link\"") >&5
16717   (eval $ac_link) 2>&5
16718   ac_status=$?
16719   echo "$as_me:16719: \$? = $ac_status" >&5
16720   (exit $ac_status); } &&
16721          { ac_try='test -s conftest$ac_exeext'
16722   { (eval echo "$as_me:16722: \"$ac_try\"") >&5
16723   (eval $ac_try) 2>&5
16724   ac_status=$?
16725   echo "$as_me:16725: \$? = $ac_status" >&5
16726   (exit $ac_status); }; }; then
16727   ac_cv_lib_inet_bzero=yes
16728 else
16729   echo "$as_me: failed program was:" >&5
16730 cat conftest.$ac_ext >&5
16731 ac_cv_lib_inet_bzero=no
16732 fi
16733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16734 LIBS=$ac_check_lib_save_LIBS
16735 fi
16736 echo "$as_me:16736: result: $ac_cv_lib_inet_bzero" >&5
16737 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16738 if test $ac_cv_lib_inet_bzero = yes; then
16739
16740 cf_add_libs="-linet"
16741 # Filter out duplicates - this happens with badly-designed ".pc" files...
16742 for cf_add_1lib in $LIBS
16743 do
16744         for cf_add_2lib in $cf_add_libs
16745         do
16746                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16747                 then
16748                         cf_add_1lib=
16749                         break
16750                 fi
16751         done
16752         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16753 done
16754 LIBS="$cf_add_libs"
16755
16756 fi
16757 fi
16758
16759 echo "$as_me:16759: checking if sys/time.h works with sys/select.h" >&5
16760 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16761 if test "${cf_cv_sys_time_select+set}" = set; then
16762   echo $ECHO_N "(cached) $ECHO_C" >&6
16763 else
16764
16765 cat >conftest.$ac_ext <<_ACEOF
16766 #line 16766 "configure"
16767 #include "confdefs.h"
16768
16769 #include <sys/types.h>
16770 #ifdef HAVE_SYS_TIME_H
16771 #include <sys/time.h>
16772 #endif
16773 #ifdef HAVE_SYS_SELECT_H
16774 #include <sys/select.h>
16775 #endif
16776
16777 int
16778 main (void)
16779 {
16780
16781   ;
16782   return 0;
16783 }
16784 _ACEOF
16785 rm -f conftest.$ac_objext
16786 if { (eval echo "$as_me:16786: \"$ac_compile\"") >&5
16787   (eval $ac_compile) 2>&5
16788   ac_status=$?
16789   echo "$as_me:16789: \$? = $ac_status" >&5
16790   (exit $ac_status); } &&
16791          { ac_try='test -s conftest.$ac_objext'
16792   { (eval echo "$as_me:16792: \"$ac_try\"") >&5
16793   (eval $ac_try) 2>&5
16794   ac_status=$?
16795   echo "$as_me:16795: \$? = $ac_status" >&5
16796   (exit $ac_status); }; }; then
16797   cf_cv_sys_time_select=yes
16798 else
16799   echo "$as_me: failed program was:" >&5
16800 cat conftest.$ac_ext >&5
16801 cf_cv_sys_time_select=no
16802 fi
16803 rm -f conftest.$ac_objext conftest.$ac_ext
16804
16805 fi
16806
16807 echo "$as_me:16807: result: $cf_cv_sys_time_select" >&5
16808 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16809 test "$cf_cv_sys_time_select" = yes &&
16810 cat >>confdefs.h <<\EOF
16811 #define HAVE_SYS_TIME_SELECT 1
16812 EOF
16813
16814 ###     checks for compiler characteristics
16815 ac_ext=c
16816 ac_cpp='$CPP $CPPFLAGS'
16817 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16818 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16819 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16820 ac_main_return=return
16821
16822 echo "$as_me:16822: checking for an ANSI C-conforming const" >&5
16823 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16824 if test "${ac_cv_c_const+set}" = set; then
16825   echo $ECHO_N "(cached) $ECHO_C" >&6
16826 else
16827   cat >conftest.$ac_ext <<_ACEOF
16828 #line 16828 "configure"
16829 #include "confdefs.h"
16830
16831 int
16832 main (void)
16833 {
16834 /* FIXME: Include the comments suggested by Paul. */
16835 #ifndef __cplusplus
16836   /* Ultrix mips cc rejects this.  */
16837   typedef int charset[2];
16838   const charset x;
16839   /* SunOS 4.1.1 cc rejects this.  */
16840   char const *const *ccp;
16841   char **p;
16842   /* NEC SVR4.0.2 mips cc rejects this.  */
16843   struct point {int x, y;};
16844   static struct point const zero = {0,0};
16845   /* AIX XL C 1.02.0.0 rejects this.
16846      It does not let you subtract one const X* pointer from another in
16847      an arm of an if-expression whose if-part is not a constant
16848      expression */
16849   const char *g = "string";
16850   ccp = &g + (g ? g-g : 0);
16851   /* HPUX 7.0 cc rejects these. */
16852   ++ccp;
16853   p = (char**) ccp;
16854   ccp = (char const *const *) p;
16855   { /* SCO 3.2v4 cc rejects this.  */
16856     char *t;
16857     char const *s = 0 ? (char *) 0 : (char const *) 0;
16858
16859     *t++ = 0;
16860   }
16861   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16862     int x[] = {25, 17};
16863     const int *foo = &x[0];
16864     ++foo;
16865   }
16866   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16867     typedef const int *iptr;
16868     iptr p = 0;
16869     ++p;
16870   }
16871   { /* AIX XL C 1.02.0.0 rejects this saying
16872        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16873     struct s { int j; const int *ap[3]; };
16874     struct s *b; b->j = 5;
16875   }
16876   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16877     const int foo = 10;
16878   }
16879 #endif
16880
16881   ;
16882   return 0;
16883 }
16884 _ACEOF
16885 rm -f conftest.$ac_objext
16886 if { (eval echo "$as_me:16886: \"$ac_compile\"") >&5
16887   (eval $ac_compile) 2>&5
16888   ac_status=$?
16889   echo "$as_me:16889: \$? = $ac_status" >&5
16890   (exit $ac_status); } &&
16891          { ac_try='test -s conftest.$ac_objext'
16892   { (eval echo "$as_me:16892: \"$ac_try\"") >&5
16893   (eval $ac_try) 2>&5
16894   ac_status=$?
16895   echo "$as_me:16895: \$? = $ac_status" >&5
16896   (exit $ac_status); }; }; then
16897   ac_cv_c_const=yes
16898 else
16899   echo "$as_me: failed program was:" >&5
16900 cat conftest.$ac_ext >&5
16901 ac_cv_c_const=no
16902 fi
16903 rm -f conftest.$ac_objext conftest.$ac_ext
16904 fi
16905 echo "$as_me:16905: result: $ac_cv_c_const" >&5
16906 echo "${ECHO_T}$ac_cv_c_const" >&6
16907 if test $ac_cv_c_const = no; then
16908
16909 cat >>confdefs.h <<\EOF
16910 #define const
16911 EOF
16912
16913 fi
16914
16915 echo "$as_me:16915: checking for inline" >&5
16916 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16917 if test "${ac_cv_c_inline+set}" = set; then
16918   echo $ECHO_N "(cached) $ECHO_C" >&6
16919 else
16920   ac_cv_c_inline=no
16921 for ac_kw in inline __inline__ __inline; do
16922   cat >conftest.$ac_ext <<_ACEOF
16923 #line 16923 "configure"
16924 #include "confdefs.h"
16925 #ifndef __cplusplus
16926 static $ac_kw int static_foo () {return 0; }
16927 $ac_kw int foo () {return 0; }
16928 #endif
16929
16930 _ACEOF
16931 rm -f conftest.$ac_objext
16932 if { (eval echo "$as_me:16932: \"$ac_compile\"") >&5
16933   (eval $ac_compile) 2>&5
16934   ac_status=$?
16935   echo "$as_me:16935: \$? = $ac_status" >&5
16936   (exit $ac_status); } &&
16937          { ac_try='test -s conftest.$ac_objext'
16938   { (eval echo "$as_me:16938: \"$ac_try\"") >&5
16939   (eval $ac_try) 2>&5
16940   ac_status=$?
16941   echo "$as_me:16941: \$? = $ac_status" >&5
16942   (exit $ac_status); }; }; then
16943   ac_cv_c_inline=$ac_kw; break
16944 else
16945   echo "$as_me: failed program was:" >&5
16946 cat conftest.$ac_ext >&5
16947 fi
16948 rm -f conftest.$ac_objext conftest.$ac_ext
16949 done
16950
16951 fi
16952 echo "$as_me:16952: result: $ac_cv_c_inline" >&5
16953 echo "${ECHO_T}$ac_cv_c_inline" >&6
16954 case $ac_cv_c_inline in
16955   inline | yes) ;;
16956   no)
16957 cat >>confdefs.h <<\EOF
16958 #define inline
16959 EOF
16960  ;;
16961   *)  cat >>confdefs.h <<EOF
16962 #define inline $ac_cv_c_inline
16963 EOF
16964  ;;
16965 esac
16966
16967 NCURSES_INLINE=
16968 if test "$ac_cv_c_inline" != no ; then
16969         NCURSES_INLINE=inline
16970         if test "$INTEL_COMPILER" = yes
16971         then
16972                 :
16973         elif test "$CLANG_COMPILER" = yes
16974         then
16975                 :
16976         elif test "$GCC" = yes
16977         then
16978                 echo "$as_me:16978: checking if $CC supports options to tune inlining" >&5
16979 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16980 if test "${cf_cv_gcc_inline+set}" = set; then
16981   echo $ECHO_N "(cached) $ECHO_C" >&6
16982 else
16983
16984                 cf_save_CFLAGS=$CFLAGS
16985                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16986                 cat >conftest.$ac_ext <<_ACEOF
16987 #line 16987 "configure"
16988 #include "confdefs.h"
16989 inline int foo(void) { return 1; }
16990 int
16991 main (void)
16992 {
16993 ${cf_cv_main_return:-return} foo()
16994   ;
16995   return 0;
16996 }
16997 _ACEOF
16998 rm -f conftest.$ac_objext
16999 if { (eval echo "$as_me:16999: \"$ac_compile\"") >&5
17000   (eval $ac_compile) 2>&5
17001   ac_status=$?
17002   echo "$as_me:17002: \$? = $ac_status" >&5
17003   (exit $ac_status); } &&
17004          { ac_try='test -s conftest.$ac_objext'
17005   { (eval echo "$as_me:17005: \"$ac_try\"") >&5
17006   (eval $ac_try) 2>&5
17007   ac_status=$?
17008   echo "$as_me:17008: \$? = $ac_status" >&5
17009   (exit $ac_status); }; }; then
17010   cf_cv_gcc_inline=yes
17011 else
17012   echo "$as_me: failed program was:" >&5
17013 cat conftest.$ac_ext >&5
17014 cf_cv_gcc_inline=no
17015 fi
17016 rm -f conftest.$ac_objext conftest.$ac_ext
17017                 CFLAGS=$cf_save_CFLAGS
17018
17019 fi
17020 echo "$as_me:17020: result: $cf_cv_gcc_inline" >&5
17021 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
17022                 if test "$cf_cv_gcc_inline" = yes ; then
17023
17024 cf_fix_cppflags=no
17025 cf_new_cflags=
17026 cf_new_cppflags=
17027 cf_new_extra_cppflags=
17028
17029 for cf_add_cflags in --param max-inline-insns-single=1200
17030 do
17031 case $cf_fix_cppflags in
17032 (no)
17033         case $cf_add_cflags in
17034         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17035                 case $cf_add_cflags in
17036                 (-D*)
17037                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17038
17039                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17040                                 && test -z "${cf_tst_cflags}" \
17041                                 && cf_fix_cppflags=yes
17042
17043                         if test $cf_fix_cppflags = yes ; then
17044
17045         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17046         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17047
17048                                 continue
17049                         elif test "${cf_tst_cflags}" = "\"'" ; then
17050
17051         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17052         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17053
17054                                 continue
17055                         fi
17056                         ;;
17057                 esac
17058                 case "$CPPFLAGS" in
17059                 (*$cf_add_cflags)
17060                         ;;
17061                 (*)
17062                         case $cf_add_cflags in
17063                         (-D*)
17064                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17065
17066 CPPFLAGS=`echo "$CPPFLAGS" | \
17067         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17068                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17069
17070                                 ;;
17071                         esac
17072
17073         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17074         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17075
17076                         ;;
17077                 esac
17078                 ;;
17079         (*)
17080
17081         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17082         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17083
17084                 ;;
17085         esac
17086         ;;
17087 (yes)
17088
17089         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17090         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17091
17092         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17093
17094         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17095                 && test -z "${cf_tst_cflags}" \
17096                 && cf_fix_cppflags=no
17097         ;;
17098 esac
17099 done
17100
17101 if test -n "$cf_new_cflags" ; then
17102
17103         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17104         CFLAGS="${CFLAGS}$cf_new_cflags"
17105
17106 fi
17107
17108 if test -n "$cf_new_cppflags" ; then
17109
17110         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17111         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17112
17113 fi
17114
17115 if test -n "$cf_new_extra_cppflags" ; then
17116
17117         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17118         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17119
17120 fi
17121
17122                 fi
17123         fi
17124 fi
17125
17126 echo "$as_me:17126: checking for signal global datatype" >&5
17127 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
17128 if test "${cf_cv_sig_atomic_t+set}" = set; then
17129   echo $ECHO_N "(cached) $ECHO_C" >&6
17130 else
17131
17132         for cf_type in \
17133                 "volatile sig_atomic_t" \
17134                 "sig_atomic_t" \
17135                 "int"
17136         do
17137         cat >conftest.$ac_ext <<_ACEOF
17138 #line 17138 "configure"
17139 #include "confdefs.h"
17140
17141 #include <sys/types.h>
17142 #include <signal.h>
17143 #include <stdio.h>
17144
17145 extern $cf_type x;
17146 $cf_type x;
17147 static void handler(int sig)
17148 {
17149         x = 5;
17150 }
17151 int
17152 main (void)
17153 {
17154 signal(SIGINT, handler);
17155                  x = 1
17156   ;
17157   return 0;
17158 }
17159 _ACEOF
17160 rm -f conftest.$ac_objext
17161 if { (eval echo "$as_me:17161: \"$ac_compile\"") >&5
17162   (eval $ac_compile) 2>&5
17163   ac_status=$?
17164   echo "$as_me:17164: \$? = $ac_status" >&5
17165   (exit $ac_status); } &&
17166          { ac_try='test -s conftest.$ac_objext'
17167   { (eval echo "$as_me:17167: \"$ac_try\"") >&5
17168   (eval $ac_try) 2>&5
17169   ac_status=$?
17170   echo "$as_me:17170: \$? = $ac_status" >&5
17171   (exit $ac_status); }; }; then
17172   cf_cv_sig_atomic_t=$cf_type
17173 else
17174   echo "$as_me: failed program was:" >&5
17175 cat conftest.$ac_ext >&5
17176 cf_cv_sig_atomic_t=no
17177 fi
17178 rm -f conftest.$ac_objext conftest.$ac_ext
17179                 test "$cf_cv_sig_atomic_t" != no && break
17180         done
17181
17182 fi
17183
17184 echo "$as_me:17184: result: $cf_cv_sig_atomic_t" >&5
17185 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
17186 test "$cf_cv_sig_atomic_t" != no &&
17187 cat >>confdefs.h <<EOF
17188 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
17189 EOF
17190
17191 if test $NCURSES_CHTYPE = auto ; then
17192
17193 echo "$as_me:17193: checking for type of chtype" >&5
17194 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
17195 if test "${cf_cv_typeof_chtype+set}" = set; then
17196   echo $ECHO_N "(cached) $ECHO_C" >&6
17197 else
17198
17199                 if test "$cross_compiling" = yes; then
17200   cf_cv_typeof_chtype=long
17201 else
17202   cat >conftest.$ac_ext <<_ACEOF
17203 #line 17203 "configure"
17204 #include "confdefs.h"
17205
17206 #define WANT_BITS 31
17207 #include <stdio.h>
17208 int main(void)
17209 {
17210         FILE *fp = fopen("cf_test.out", "w");
17211         if (fp != 0) {
17212                 char *result = "long";
17213                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
17214                         int n;
17215                         unsigned int x, y;
17216                         for (n = 0; n < WANT_BITS; n++) {
17217                                 x = (1 << n);
17218                                 y = (x >> n);
17219                                 if (y != 1 || x == 0) {
17220                                         x = 0;
17221                                         break;
17222                                 }
17223                         }
17224                         /*
17225                          * If x is nonzero, an int is big enough for the bits
17226                          * that we want.
17227                          */
17228                         result = (x != 0) ? "int" : "long";
17229                 }
17230                 fputs(result, fp);
17231                 fclose(fp);
17232         }
17233         ${cf_cv_main_return:-return}(0);
17234 }
17235
17236 _ACEOF
17237 rm -f conftest$ac_exeext
17238 if { (eval echo "$as_me:17238: \"$ac_link\"") >&5
17239   (eval $ac_link) 2>&5
17240   ac_status=$?
17241   echo "$as_me:17241: \$? = $ac_status" >&5
17242   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17243   { (eval echo "$as_me:17243: \"$ac_try\"") >&5
17244   (eval $ac_try) 2>&5
17245   ac_status=$?
17246   echo "$as_me:17246: \$? = $ac_status" >&5
17247   (exit $ac_status); }; }; then
17248   cf_cv_typeof_chtype=`cat cf_test.out`
17249 else
17250   echo "$as_me: program exited with status $ac_status" >&5
17251 echo "$as_me: failed program was:" >&5
17252 cat conftest.$ac_ext >&5
17253 cf_cv_typeof_chtype=long
17254 fi
17255 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17256 fi
17257                 rm -f cf_test.out
17258
17259 fi
17260
17261 echo "$as_me:17261: result: $cf_cv_typeof_chtype" >&5
17262 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17263
17264 cat >>confdefs.h <<EOF
17265 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17266 EOF
17267
17268 else
17269         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17270 fi
17271 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17272
17273 echo "$as_me:17273: checking if unsigned literals are legal" >&5
17274 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17275 if test "${cf_cv_unsigned_literals+set}" = set; then
17276   echo $ECHO_N "(cached) $ECHO_C" >&6
17277 else
17278
17279         cat >conftest.$ac_ext <<_ACEOF
17280 #line 17280 "configure"
17281 #include "confdefs.h"
17282
17283 int
17284 main (void)
17285 {
17286 long x = 1L + 1UL + 1U + 1
17287   ;
17288   return 0;
17289 }
17290 _ACEOF
17291 rm -f conftest.$ac_objext
17292 if { (eval echo "$as_me:17292: \"$ac_compile\"") >&5
17293   (eval $ac_compile) 2>&5
17294   ac_status=$?
17295   echo "$as_me:17295: \$? = $ac_status" >&5
17296   (exit $ac_status); } &&
17297          { ac_try='test -s conftest.$ac_objext'
17298   { (eval echo "$as_me:17298: \"$ac_try\"") >&5
17299   (eval $ac_try) 2>&5
17300   ac_status=$?
17301   echo "$as_me:17301: \$? = $ac_status" >&5
17302   (exit $ac_status); }; }; then
17303   cf_cv_unsigned_literals=yes
17304 else
17305   echo "$as_me: failed program was:" >&5
17306 cat conftest.$ac_ext >&5
17307 cf_cv_unsigned_literals=no
17308 fi
17309 rm -f conftest.$ac_objext conftest.$ac_ext
17310
17311 fi
17312
17313 echo "$as_me:17313: result: $cf_cv_unsigned_literals" >&5
17314 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17315
17316 cf_cv_1UL="1"
17317 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17318 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17319
17320 if test $NCURSES_MMASK_T = auto ; then
17321         cf_cv_typeof_mmask_t=long
17322 else
17323         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17324 fi
17325 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17326
17327 ###     Checks for external-data
17328
17329 echo "$as_me:17329: checking if external errno is declared" >&5
17330 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17331 if test "${cf_cv_dcl_errno+set}" = set; then
17332   echo $ECHO_N "(cached) $ECHO_C" >&6
17333 else
17334
17335         cat >conftest.$ac_ext <<_ACEOF
17336 #line 17336 "configure"
17337 #include "confdefs.h"
17338
17339 #ifdef HAVE_STDLIB_H
17340 #include <stdlib.h>
17341 #endif
17342 #include <stdio.h>
17343 #include <sys/types.h>
17344 #include <errno.h>
17345 int
17346 main (void)
17347 {
17348 int x = (int) errno
17349   ;
17350   return 0;
17351 }
17352 _ACEOF
17353 rm -f conftest.$ac_objext
17354 if { (eval echo "$as_me:17354: \"$ac_compile\"") >&5
17355   (eval $ac_compile) 2>&5
17356   ac_status=$?
17357   echo "$as_me:17357: \$? = $ac_status" >&5
17358   (exit $ac_status); } &&
17359          { ac_try='test -s conftest.$ac_objext'
17360   { (eval echo "$as_me:17360: \"$ac_try\"") >&5
17361   (eval $ac_try) 2>&5
17362   ac_status=$?
17363   echo "$as_me:17363: \$? = $ac_status" >&5
17364   (exit $ac_status); }; }; then
17365   cf_cv_dcl_errno=yes
17366 else
17367   echo "$as_me: failed program was:" >&5
17368 cat conftest.$ac_ext >&5
17369 cf_cv_dcl_errno=no
17370 fi
17371 rm -f conftest.$ac_objext conftest.$ac_ext
17372
17373 fi
17374 echo "$as_me:17374: result: $cf_cv_dcl_errno" >&5
17375 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17376
17377 if test "$cf_cv_dcl_errno" = no ; then
17378
17379 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17380
17381         cat >>confdefs.h <<EOF
17382 #define $cf_result 1
17383 EOF
17384
17385 fi
17386
17387 # It's possible (for near-UNIX clones) that the data doesn't exist
17388
17389 echo "$as_me:17389: checking if external errno exists" >&5
17390 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17391 if test "${cf_cv_have_errno+set}" = set; then
17392   echo $ECHO_N "(cached) $ECHO_C" >&6
17393 else
17394
17395         cat >conftest.$ac_ext <<_ACEOF
17396 #line 17396 "configure"
17397 #include "confdefs.h"
17398
17399 #undef errno
17400 extern int errno;
17401
17402 int
17403 main (void)
17404 {
17405 errno = 2
17406   ;
17407   return 0;
17408 }
17409 _ACEOF
17410 rm -f conftest.$ac_objext conftest$ac_exeext
17411 if { (eval echo "$as_me:17411: \"$ac_link\"") >&5
17412   (eval $ac_link) 2>&5
17413   ac_status=$?
17414   echo "$as_me:17414: \$? = $ac_status" >&5
17415   (exit $ac_status); } &&
17416          { ac_try='test -s conftest$ac_exeext'
17417   { (eval echo "$as_me:17417: \"$ac_try\"") >&5
17418   (eval $ac_try) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit $ac_status); }; }; then
17422   cf_cv_have_errno=yes
17423 else
17424   echo "$as_me: failed program was:" >&5
17425 cat conftest.$ac_ext >&5
17426 cf_cv_have_errno=no
17427 fi
17428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17429
17430 fi
17431 echo "$as_me:17431: result: $cf_cv_have_errno" >&5
17432 echo "${ECHO_T}$cf_cv_have_errno" >&6
17433
17434 if test "$cf_cv_have_errno" = yes ; then
17435
17436 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17437
17438         cat >>confdefs.h <<EOF
17439 #define $cf_result 1
17440 EOF
17441
17442 fi
17443
17444 echo "$as_me:17444: checking if data-only library module links" >&5
17445 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17446 if test "${cf_cv_link_dataonly+set}" = set; then
17447   echo $ECHO_N "(cached) $ECHO_C" >&6
17448 else
17449
17450         rm -f conftest.a
17451         cat >conftest.$ac_ext <<EOF
17452 #line 17452 "configure"
17453 int     testdata[3] = { 123, 456, 789 };
17454 EOF
17455         if { (eval echo "$as_me:17455: \"$ac_compile\"") >&5
17456   (eval $ac_compile) 2>&5
17457   ac_status=$?
17458   echo "$as_me:17458: \$? = $ac_status" >&5
17459   (exit $ac_status); } ; then
17460                 mv conftest.o data.o && \
17461                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17462         fi
17463         rm -f conftest.$ac_ext data.o
17464         cat >conftest.$ac_ext <<EOF
17465 #line 17465 "configure"
17466 int     testfunc(void)
17467 {
17468 #if defined(NeXT)
17469         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17470 #else
17471         extern int testdata[3];
17472         return testdata[0] == 123
17473            &&  testdata[1] == 456
17474            &&  testdata[2] == 789;
17475 #endif
17476 }
17477 EOF
17478         if { (eval echo "$as_me:17478: \"$ac_compile\"") >&5
17479   (eval $ac_compile) 2>&5
17480   ac_status=$?
17481   echo "$as_me:17481: \$? = $ac_status" >&5
17482   (exit $ac_status); }; then
17483                 mv conftest.o func.o && \
17484                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17485         fi
17486         rm -f conftest.$ac_ext func.o
17487         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17488         cf_saveLIBS="$LIBS"
17489         LIBS="conftest.a $LIBS"
17490         if test "$cross_compiling" = yes; then
17491   cf_cv_link_dataonly=unknown
17492 else
17493   cat >conftest.$ac_ext <<_ACEOF
17494 #line 17494 "configure"
17495 #include "confdefs.h"
17496
17497         int main(void)
17498         {
17499                 extern int testfunc();
17500                 ${cf_cv_main_return:-return} (!testfunc());
17501         }
17502
17503 _ACEOF
17504 rm -f conftest$ac_exeext
17505 if { (eval echo "$as_me:17505: \"$ac_link\"") >&5
17506   (eval $ac_link) 2>&5
17507   ac_status=$?
17508   echo "$as_me:17508: \$? = $ac_status" >&5
17509   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17510   { (eval echo "$as_me:17510: \"$ac_try\"") >&5
17511   (eval $ac_try) 2>&5
17512   ac_status=$?
17513   echo "$as_me:17513: \$? = $ac_status" >&5
17514   (exit $ac_status); }; }; then
17515   cf_cv_link_dataonly=yes
17516 else
17517   echo "$as_me: program exited with status $ac_status" >&5
17518 echo "$as_me: failed program was:" >&5
17519 cat conftest.$ac_ext >&5
17520 cf_cv_link_dataonly=no
17521 fi
17522 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17523 fi
17524         LIBS="$cf_saveLIBS"
17525
17526 fi
17527
17528 echo "$as_me:17528: result: $cf_cv_link_dataonly" >&5
17529 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17530
17531 if test "$cf_cv_link_dataonly" = no ; then
17532
17533 cat >>confdefs.h <<\EOF
17534 #define BROKEN_LINKER 1
17535 EOF
17536
17537         BROKEN_LINKER=1
17538 fi
17539
17540 ###     Checks for library functions.
17541
17542 for ac_func in \
17543 getcwd \
17544 getegid \
17545 geteuid \
17546 getopt \
17547 getttynam \
17548 issetugid \
17549 poll \
17550 putenv \
17551 remove \
17552 select \
17553 setbuf \
17554 setbuffer \
17555 setenv \
17556 setvbuf \
17557 sigaction \
17558 sigvec \
17559 strdup \
17560 strstr \
17561 tcgetpgrp \
17562 tdestroy \
17563 times \
17564 tsearch \
17565 vsnprintf \
17566
17567 do
17568 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17569 echo "$as_me:17569: checking for $ac_func" >&5
17570 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17571 if eval "test \"\${$as_ac_var+set}\" = set"; then
17572   echo $ECHO_N "(cached) $ECHO_C" >&6
17573 else
17574   cat >conftest.$ac_ext <<_ACEOF
17575 #line 17575 "configure"
17576 #include "confdefs.h"
17577 /* System header to define __stub macros and hopefully few prototypes,
17578     which can conflict with char $ac_func (); below.  */
17579 #include <assert.h>
17580 /* Override any gcc2 internal prototype to avoid an error.  */
17581 #ifdef __cplusplus
17582 extern "C"
17583 #endif
17584 /* We use char because int might match the return type of a gcc2
17585    builtin and then its argument prototype would still apply.  */
17586 char $ac_func ();
17587 char (*f) ();
17588
17589 int
17590 main (void)
17591 {
17592 /* The GNU C library defines this for functions which it implements
17593     to always fail with ENOSYS.  Some functions are actually named
17594     something starting with __ and the normal name is an alias.  */
17595 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17596 choke me
17597 #else
17598 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17599 #endif
17600
17601   ;
17602   return 0;
17603 }
17604 _ACEOF
17605 rm -f conftest.$ac_objext conftest$ac_exeext
17606 if { (eval echo "$as_me:17606: \"$ac_link\"") >&5
17607   (eval $ac_link) 2>&5
17608   ac_status=$?
17609   echo "$as_me:17609: \$? = $ac_status" >&5
17610   (exit $ac_status); } &&
17611          { ac_try='test -s conftest$ac_exeext'
17612   { (eval echo "$as_me:17612: \"$ac_try\"") >&5
17613   (eval $ac_try) 2>&5
17614   ac_status=$?
17615   echo "$as_me:17615: \$? = $ac_status" >&5
17616   (exit $ac_status); }; }; then
17617   eval "$as_ac_var=yes"
17618 else
17619   echo "$as_me: failed program was:" >&5
17620 cat conftest.$ac_ext >&5
17621 eval "$as_ac_var=no"
17622 fi
17623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17624 fi
17625 echo "$as_me:17625: result: `eval echo '${'$as_ac_var'}'`" >&5
17626 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17627 if test `eval echo '${'$as_ac_var'}'` = yes; then
17628   cat >>confdefs.h <<EOF
17629 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17630 EOF
17631
17632 fi
17633 done
17634
17635 if test "x$ac_cv_func_getopt" = xno && \
17636    test "x$cf_with_progs$cf_with_tests" != xnono; then
17637         { { echo "$as_me:17637: error: getopt is required for building programs" >&5
17638 echo "$as_me: error: getopt is required for building programs" >&2;}
17639    { (exit 1); exit 1; }; }
17640 fi
17641
17642 if test "x$with_safe_sprintf" = xyes
17643 then
17644         if test "x$ac_cv_func_vsnprintf" = xyes
17645         then
17646                 { echo "$as_me:17646: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
17647 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
17648         else
17649
17650 cat >>confdefs.h <<\EOF
17651 #define USE_SAFE_SPRINTF 1
17652 EOF
17653
17654         fi
17655 fi
17656
17657 if test "x$with_getcap" = "xyes" ; then
17658
17659 echo "$as_me:17659: checking for terminal-capability database functions" >&5
17660 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17661 if test "${cf_cv_cgetent+set}" = set; then
17662   echo $ECHO_N "(cached) $ECHO_C" >&6
17663 else
17664
17665 cat >conftest.$ac_ext <<_ACEOF
17666 #line 17666 "configure"
17667 #include "confdefs.h"
17668
17669 #include <stdlib.h>
17670 int
17671 main (void)
17672 {
17673
17674         char temp[128];
17675         char *buf = temp;
17676         char *db_array = temp;
17677         cgetent(&buf, &db_array, "vt100");
17678         cgetcap(buf, "tc", '=');
17679         cgetmatch(buf, "tc");
17680
17681   ;
17682   return 0;
17683 }
17684 _ACEOF
17685 rm -f conftest.$ac_objext conftest$ac_exeext
17686 if { (eval echo "$as_me:17686: \"$ac_link\"") >&5
17687   (eval $ac_link) 2>&5
17688   ac_status=$?
17689   echo "$as_me:17689: \$? = $ac_status" >&5
17690   (exit $ac_status); } &&
17691          { ac_try='test -s conftest$ac_exeext'
17692   { (eval echo "$as_me:17692: \"$ac_try\"") >&5
17693   (eval $ac_try) 2>&5
17694   ac_status=$?
17695   echo "$as_me:17695: \$? = $ac_status" >&5
17696   (exit $ac_status); }; }; then
17697   cf_cv_cgetent=yes
17698 else
17699   echo "$as_me: failed program was:" >&5
17700 cat conftest.$ac_ext >&5
17701 cf_cv_cgetent=no
17702 fi
17703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17704
17705 fi
17706 echo "$as_me:17706: result: $cf_cv_cgetent" >&5
17707 echo "${ECHO_T}$cf_cv_cgetent" >&6
17708
17709 if test "$cf_cv_cgetent" = yes
17710 then
17711
17712 cat >>confdefs.h <<\EOF
17713 #define HAVE_BSD_CGETENT 1
17714 EOF
17715
17716 echo "$as_me:17716: checking if cgetent uses const parameter" >&5
17717 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17718 if test "${cf_cv_cgetent_const+set}" = set; then
17719   echo $ECHO_N "(cached) $ECHO_C" >&6
17720 else
17721
17722 cat >conftest.$ac_ext <<_ACEOF
17723 #line 17723 "configure"
17724 #include "confdefs.h"
17725
17726 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17727 #include <stdlib.h>
17728 int
17729 main (void)
17730 {
17731
17732         char temp[128];
17733         char *buf = temp;
17734 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17735         const char *db_array = temp;
17736         cgetent(&buf, &db_array, "vt100");
17737 #endif
17738         cgetcap(buf, "tc", '=');
17739         cgetmatch(buf, "tc");
17740
17741   ;
17742   return 0;
17743 }
17744 _ACEOF
17745 rm -f conftest.$ac_objext conftest$ac_exeext
17746 if { (eval echo "$as_me:17746: \"$ac_link\"") >&5
17747   (eval $ac_link) 2>&5
17748   ac_status=$?
17749   echo "$as_me:17749: \$? = $ac_status" >&5
17750   (exit $ac_status); } &&
17751          { ac_try='test -s conftest$ac_exeext'
17752   { (eval echo "$as_me:17752: \"$ac_try\"") >&5
17753   (eval $ac_try) 2>&5
17754   ac_status=$?
17755   echo "$as_me:17755: \$? = $ac_status" >&5
17756   (exit $ac_status); }; }; then
17757   cf_cv_cgetent_const=yes
17758 else
17759   echo "$as_me: failed program was:" >&5
17760 cat conftest.$ac_ext >&5
17761 cf_cv_cgetent_const=no
17762 fi
17763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17764
17765 fi
17766 echo "$as_me:17766: result: $cf_cv_cgetent_const" >&5
17767 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17768         if test "$cf_cv_cgetent_const" = yes
17769         then
17770
17771 cat >>confdefs.h <<EOF
17772 #define CGETENT_CONST const
17773 EOF
17774
17775         fi
17776 fi
17777
17778 fi
17779
17780 echo "$as_me:17780: checking for isascii" >&5
17781 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17782 if test "${cf_cv_have_isascii+set}" = set; then
17783   echo $ECHO_N "(cached) $ECHO_C" >&6
17784 else
17785
17786         cat >conftest.$ac_ext <<_ACEOF
17787 #line 17787 "configure"
17788 #include "confdefs.h"
17789 #include <ctype.h>
17790 int
17791 main (void)
17792 {
17793 int x = isascii(' ')
17794   ;
17795   return 0;
17796 }
17797 _ACEOF
17798 rm -f conftest.$ac_objext conftest$ac_exeext
17799 if { (eval echo "$as_me:17799: \"$ac_link\"") >&5
17800   (eval $ac_link) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit $ac_status); } &&
17804          { ac_try='test -s conftest$ac_exeext'
17805   { (eval echo "$as_me:17805: \"$ac_try\"") >&5
17806   (eval $ac_try) 2>&5
17807   ac_status=$?
17808   echo "$as_me:17808: \$? = $ac_status" >&5
17809   (exit $ac_status); }; }; then
17810   cf_cv_have_isascii=yes
17811 else
17812   echo "$as_me: failed program was:" >&5
17813 cat conftest.$ac_ext >&5
17814 cf_cv_have_isascii=no
17815 fi
17816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17817
17818 fi
17819 echo "$as_me:17819: result: $cf_cv_have_isascii" >&5
17820 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17821 test "$cf_cv_have_isascii" = yes &&
17822 cat >>confdefs.h <<\EOF
17823 #define HAVE_ISASCII 1
17824 EOF
17825
17826 if test "$ac_cv_func_sigaction" = yes; then
17827 echo "$as_me:17827: checking whether sigaction needs _POSIX_SOURCE" >&5
17828 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17829 cat >conftest.$ac_ext <<_ACEOF
17830 #line 17830 "configure"
17831 #include "confdefs.h"
17832
17833 #include <sys/types.h>
17834 #include <signal.h>
17835 int
17836 main (void)
17837 {
17838 struct sigaction act
17839   ;
17840   return 0;
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   sigact_bad=no
17856 else
17857   echo "$as_me: failed program was:" >&5
17858 cat conftest.$ac_ext >&5
17859
17860 cat >conftest.$ac_ext <<_ACEOF
17861 #line 17861 "configure"
17862 #include "confdefs.h"
17863
17864 #define _POSIX_SOURCE
17865 #include <sys/types.h>
17866 #include <signal.h>
17867 int
17868 main (void)
17869 {
17870 struct sigaction act
17871   ;
17872   return 0;
17873 }
17874 _ACEOF
17875 rm -f conftest.$ac_objext
17876 if { (eval echo "$as_me:17876: \"$ac_compile\"") >&5
17877   (eval $ac_compile) 2>&5
17878   ac_status=$?
17879   echo "$as_me:17879: \$? = $ac_status" >&5
17880   (exit $ac_status); } &&
17881          { ac_try='test -s conftest.$ac_objext'
17882   { (eval echo "$as_me:17882: \"$ac_try\"") >&5
17883   (eval $ac_try) 2>&5
17884   ac_status=$?
17885   echo "$as_me:17885: \$? = $ac_status" >&5
17886   (exit $ac_status); }; }; then
17887   sigact_bad=yes
17888
17889 cat >>confdefs.h <<\EOF
17890 #define _POSIX_SOURCE 1
17891 EOF
17892
17893 else
17894   echo "$as_me: failed program was:" >&5
17895 cat conftest.$ac_ext >&5
17896 sigact_bad=unknown
17897 fi
17898 rm -f conftest.$ac_objext conftest.$ac_ext
17899 fi
17900 rm -f conftest.$ac_objext conftest.$ac_ext
17901 echo "$as_me:17901: result: $sigact_bad" >&5
17902 echo "${ECHO_T}$sigact_bad" >&6
17903 fi
17904
17905 echo "$as_me:17905: checking if nanosleep really works" >&5
17906 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17907 if test "${cf_cv_func_nanosleep+set}" = set; then
17908   echo $ECHO_N "(cached) $ECHO_C" >&6
17909 else
17910
17911 if test "$cross_compiling" = yes; then
17912   cf_cv_func_nanosleep=unknown
17913 else
17914   cat >conftest.$ac_ext <<_ACEOF
17915 #line 17915 "configure"
17916 #include "confdefs.h"
17917
17918 #include <stdio.h>
17919 #include <errno.h>
17920 #include <time.h>
17921
17922 #ifdef HAVE_SYS_TIME_H
17923 #include <sys/time.h>
17924 #endif
17925
17926 int main(void) {
17927         struct timespec ts1, ts2;
17928         int code;
17929         ts1.tv_sec  = 0;
17930         ts1.tv_nsec = 750000000;
17931         ts2.tv_sec  = 0;
17932         ts2.tv_nsec = 0;
17933         errno = 0;
17934         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17935         ${cf_cv_main_return:-return}(code != 0);
17936 }
17937
17938 _ACEOF
17939 rm -f conftest$ac_exeext
17940 if { (eval echo "$as_me:17940: \"$ac_link\"") >&5
17941   (eval $ac_link) 2>&5
17942   ac_status=$?
17943   echo "$as_me:17943: \$? = $ac_status" >&5
17944   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17945   { (eval echo "$as_me:17945: \"$ac_try\"") >&5
17946   (eval $ac_try) 2>&5
17947   ac_status=$?
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit $ac_status); }; }; then
17950   cf_cv_func_nanosleep=yes
17951 else
17952   echo "$as_me: program exited with status $ac_status" >&5
17953 echo "$as_me: failed program was:" >&5
17954 cat conftest.$ac_ext >&5
17955 cf_cv_func_nanosleep=no
17956 fi
17957 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17958 fi
17959 fi
17960 echo "$as_me:17960: result: $cf_cv_func_nanosleep" >&5
17961 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17962
17963 test "$cf_cv_func_nanosleep" = "yes" &&
17964 cat >>confdefs.h <<\EOF
17965 #define HAVE_NANOSLEEP 1
17966 EOF
17967
17968 for ac_header in \
17969 termio.h \
17970 termios.h \
17971 unistd.h \
17972
17973 do
17974 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17975 echo "$as_me:17975: checking for $ac_header" >&5
17976 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17977 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17978   echo $ECHO_N "(cached) $ECHO_C" >&6
17979 else
17980   cat >conftest.$ac_ext <<_ACEOF
17981 #line 17981 "configure"
17982 #include "confdefs.h"
17983 #include <$ac_header>
17984 _ACEOF
17985 if { (eval echo "$as_me:17985: \"$ac_cpp conftest.$ac_ext\"") >&5
17986   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17987   ac_status=$?
17988   egrep -v '^ *\+' conftest.er1 >conftest.err
17989   rm -f conftest.er1
17990   cat conftest.err >&5
17991   echo "$as_me:17991: \$? = $ac_status" >&5
17992   (exit $ac_status); } >/dev/null; then
17993   if test -s conftest.err; then
17994     ac_cpp_err=$ac_c_preproc_warn_flag
17995   else
17996     ac_cpp_err=
17997   fi
17998 else
17999   ac_cpp_err=yes
18000 fi
18001 if test -z "$ac_cpp_err"; then
18002   eval "$as_ac_Header=yes"
18003 else
18004   echo "$as_me: failed program was:" >&5
18005   cat conftest.$ac_ext >&5
18006   eval "$as_ac_Header=no"
18007 fi
18008 rm -f conftest.err conftest.$ac_ext
18009 fi
18010 echo "$as_me:18010: result: `eval echo '${'$as_ac_Header'}'`" >&5
18011 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18012 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18013   cat >>confdefs.h <<EOF
18014 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18015 EOF
18016
18017 fi
18018 done
18019
18020 if test "$ISC" = yes ; then
18021
18022 for ac_header in sys/termio.h
18023 do
18024 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18025 echo "$as_me:18025: checking for $ac_header" >&5
18026 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18027 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18028   echo $ECHO_N "(cached) $ECHO_C" >&6
18029 else
18030   cat >conftest.$ac_ext <<_ACEOF
18031 #line 18031 "configure"
18032 #include "confdefs.h"
18033 #include <$ac_header>
18034 _ACEOF
18035 if { (eval echo "$as_me:18035: \"$ac_cpp conftest.$ac_ext\"") >&5
18036   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18037   ac_status=$?
18038   egrep -v '^ *\+' conftest.er1 >conftest.err
18039   rm -f conftest.er1
18040   cat conftest.err >&5
18041   echo "$as_me:18041: \$? = $ac_status" >&5
18042   (exit $ac_status); } >/dev/null; then
18043   if test -s conftest.err; then
18044     ac_cpp_err=$ac_c_preproc_warn_flag
18045   else
18046     ac_cpp_err=
18047   fi
18048 else
18049   ac_cpp_err=yes
18050 fi
18051 if test -z "$ac_cpp_err"; then
18052   eval "$as_ac_Header=yes"
18053 else
18054   echo "$as_me: failed program was:" >&5
18055   cat conftest.$ac_ext >&5
18056   eval "$as_ac_Header=no"
18057 fi
18058 rm -f conftest.err conftest.$ac_ext
18059 fi
18060 echo "$as_me:18060: result: `eval echo '${'$as_ac_Header'}'`" >&5
18061 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18062 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18063   cat >>confdefs.h <<EOF
18064 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18065 EOF
18066
18067 fi
18068 done
18069
18070 fi
18071 if test "$ac_cv_header_termios_h" = yes ; then
18072         case "$CFLAGS $CPPFLAGS" in
18073         (*-D_POSIX_SOURCE*)
18074                 termios_bad=dunno ;;
18075         (*)     termios_bad=maybe ;;
18076         esac
18077         if test "$termios_bad" = maybe ; then
18078         echo "$as_me:18078: checking whether termios.h needs _POSIX_SOURCE" >&5
18079 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
18080         cat >conftest.$ac_ext <<_ACEOF
18081 #line 18081 "configure"
18082 #include "confdefs.h"
18083 #include <termios.h>
18084 int
18085 main (void)
18086 {
18087 struct termios foo; int x = foo.c_iflag
18088   ;
18089   return 0;
18090 }
18091 _ACEOF
18092 rm -f conftest.$ac_objext
18093 if { (eval echo "$as_me:18093: \"$ac_compile\"") >&5
18094   (eval $ac_compile) 2>&5
18095   ac_status=$?
18096   echo "$as_me:18096: \$? = $ac_status" >&5
18097   (exit $ac_status); } &&
18098          { ac_try='test -s conftest.$ac_objext'
18099   { (eval echo "$as_me:18099: \"$ac_try\"") >&5
18100   (eval $ac_try) 2>&5
18101   ac_status=$?
18102   echo "$as_me:18102: \$? = $ac_status" >&5
18103   (exit $ac_status); }; }; then
18104   termios_bad=no
18105 else
18106   echo "$as_me: failed program was:" >&5
18107 cat conftest.$ac_ext >&5
18108
18109                 cat >conftest.$ac_ext <<_ACEOF
18110 #line 18110 "configure"
18111 #include "confdefs.h"
18112
18113 #define _POSIX_SOURCE
18114 #include <termios.h>
18115 int
18116 main (void)
18117 {
18118 struct termios foo; int x = foo.c_iflag
18119   ;
18120   return 0;
18121 }
18122 _ACEOF
18123 rm -f conftest.$ac_objext
18124 if { (eval echo "$as_me:18124: \"$ac_compile\"") >&5
18125   (eval $ac_compile) 2>&5
18126   ac_status=$?
18127   echo "$as_me:18127: \$? = $ac_status" >&5
18128   (exit $ac_status); } &&
18129          { ac_try='test -s conftest.$ac_objext'
18130   { (eval echo "$as_me:18130: \"$ac_try\"") >&5
18131   (eval $ac_try) 2>&5
18132   ac_status=$?
18133   echo "$as_me:18133: \$? = $ac_status" >&5
18134   (exit $ac_status); }; }; then
18135   termios_bad=unknown
18136 else
18137   echo "$as_me: failed program was:" >&5
18138 cat conftest.$ac_ext >&5
18139 termios_bad=yes
18140 cat >>confdefs.h <<\EOF
18141 #define _POSIX_SOURCE 1
18142 EOF
18143
18144 fi
18145 rm -f conftest.$ac_objext conftest.$ac_ext
18146
18147 fi
18148 rm -f conftest.$ac_objext conftest.$ac_ext
18149         echo "$as_me:18149: result: $termios_bad" >&5
18150 echo "${ECHO_T}$termios_bad" >&6
18151         fi
18152 fi
18153
18154 echo "$as_me:18154: checking for tcgetattr" >&5
18155 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
18156 if test "${cf_cv_have_tcgetattr+set}" = set; then
18157   echo $ECHO_N "(cached) $ECHO_C" >&6
18158 else
18159
18160 cat >conftest.$ac_ext <<_ACEOF
18161 #line 18161 "configure"
18162 #include "confdefs.h"
18163
18164 #include <sys/types.h>
18165 #ifdef HAVE_UNISTD_H
18166 #include <unistd.h>
18167 #endif
18168 #ifdef HAVE_TERMIOS_H
18169 #include <termios.h>
18170 #define TTY struct termios
18171 #else
18172 #ifdef HAVE_TERMIO_H
18173 #include <termio.h>
18174 #define TTY struct termio
18175 #endif
18176 #endif
18177
18178 int
18179 main (void)
18180 {
18181
18182 TTY foo;
18183 tcgetattr(1, &foo);
18184   ;
18185   return 0;
18186 }
18187 _ACEOF
18188 rm -f conftest.$ac_objext conftest$ac_exeext
18189 if { (eval echo "$as_me:18189: \"$ac_link\"") >&5
18190   (eval $ac_link) 2>&5
18191   ac_status=$?
18192   echo "$as_me:18192: \$? = $ac_status" >&5
18193   (exit $ac_status); } &&
18194          { ac_try='test -s conftest$ac_exeext'
18195   { (eval echo "$as_me:18195: \"$ac_try\"") >&5
18196   (eval $ac_try) 2>&5
18197   ac_status=$?
18198   echo "$as_me:18198: \$? = $ac_status" >&5
18199   (exit $ac_status); }; }; then
18200   cf_cv_have_tcgetattr=yes
18201 else
18202   echo "$as_me: failed program was:" >&5
18203 cat conftest.$ac_ext >&5
18204 cf_cv_have_tcgetattr=no
18205 fi
18206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18207 fi
18208 echo "$as_me:18208: result: $cf_cv_have_tcgetattr" >&5
18209 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
18210 test "$cf_cv_have_tcgetattr" = yes &&
18211 cat >>confdefs.h <<\EOF
18212 #define HAVE_TCGETATTR 1
18213 EOF
18214
18215 echo "$as_me:18215: checking for vsscanf function or workaround" >&5
18216 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
18217 if test "${cf_cv_func_vsscanf+set}" = set; then
18218   echo $ECHO_N "(cached) $ECHO_C" >&6
18219 else
18220
18221 cat >conftest.$ac_ext <<_ACEOF
18222 #line 18222 "configure"
18223 #include "confdefs.h"
18224
18225 #include <stdarg.h>
18226 #include <stdio.h>
18227 int
18228 main (void)
18229 {
18230
18231         va_list ap;
18232         vsscanf("from", "%d", ap)
18233   ;
18234   return 0;
18235 }
18236 _ACEOF
18237 rm -f conftest.$ac_objext conftest$ac_exeext
18238 if { (eval echo "$as_me:18238: \"$ac_link\"") >&5
18239   (eval $ac_link) 2>&5
18240   ac_status=$?
18241   echo "$as_me:18241: \$? = $ac_status" >&5
18242   (exit $ac_status); } &&
18243          { ac_try='test -s conftest$ac_exeext'
18244   { (eval echo "$as_me:18244: \"$ac_try\"") >&5
18245   (eval $ac_try) 2>&5
18246   ac_status=$?
18247   echo "$as_me:18247: \$? = $ac_status" >&5
18248   (exit $ac_status); }; }; then
18249   cf_cv_func_vsscanf=vsscanf
18250 else
18251   echo "$as_me: failed program was:" >&5
18252 cat conftest.$ac_ext >&5
18253
18254 cat >conftest.$ac_ext <<_ACEOF
18255 #line 18255 "configure"
18256 #include "confdefs.h"
18257
18258 #include <stdarg.h>
18259 #include <stdio.h>
18260 int
18261 main (void)
18262 {
18263
18264         FILE strbuf;
18265         char *str = "from";
18266
18267         strbuf._flag = _IOREAD;
18268         strbuf._ptr = strbuf._base = (unsigned char *) str;
18269         strbuf._cnt = strlen(str);
18270         strbuf._file = _NFILE;
18271         return (vfscanf(&strbuf, "%d", ap))
18272   ;
18273   return 0;
18274 }
18275 _ACEOF
18276 rm -f conftest.$ac_objext conftest$ac_exeext
18277 if { (eval echo "$as_me:18277: \"$ac_link\"") >&5
18278   (eval $ac_link) 2>&5
18279   ac_status=$?
18280   echo "$as_me:18280: \$? = $ac_status" >&5
18281   (exit $ac_status); } &&
18282          { ac_try='test -s conftest$ac_exeext'
18283   { (eval echo "$as_me:18283: \"$ac_try\"") >&5
18284   (eval $ac_try) 2>&5
18285   ac_status=$?
18286   echo "$as_me:18286: \$? = $ac_status" >&5
18287   (exit $ac_status); }; }; then
18288   cf_cv_func_vsscanf=vfscanf
18289 else
18290   echo "$as_me: failed program was:" >&5
18291 cat conftest.$ac_ext >&5
18292
18293 cat >conftest.$ac_ext <<_ACEOF
18294 #line 18294 "configure"
18295 #include "confdefs.h"
18296
18297 #include <stdarg.h>
18298 #include <stdio.h>
18299 int
18300 main (void)
18301 {
18302
18303         FILE strbuf;
18304         char *str = "from";
18305
18306         strbuf._flag = _IOREAD;
18307         strbuf._ptr = strbuf._base = (unsigned char *) str;
18308         strbuf._cnt = strlen(str);
18309         strbuf._file = _NFILE;
18310         return (_doscan(&strbuf, "%d", ap))
18311   ;
18312   return 0;
18313 }
18314 _ACEOF
18315 rm -f conftest.$ac_objext conftest$ac_exeext
18316 if { (eval echo "$as_me:18316: \"$ac_link\"") >&5
18317   (eval $ac_link) 2>&5
18318   ac_status=$?
18319   echo "$as_me:18319: \$? = $ac_status" >&5
18320   (exit $ac_status); } &&
18321          { ac_try='test -s conftest$ac_exeext'
18322   { (eval echo "$as_me:18322: \"$ac_try\"") >&5
18323   (eval $ac_try) 2>&5
18324   ac_status=$?
18325   echo "$as_me:18325: \$? = $ac_status" >&5
18326   (exit $ac_status); }; }; then
18327   cf_cv_func_vsscanf=_doscan
18328 else
18329   echo "$as_me: failed program was:" >&5
18330 cat conftest.$ac_ext >&5
18331
18332 cf_cv_func_vsscanf=no
18333 fi
18334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18335 fi
18336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18337 fi
18338 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18339 fi
18340 echo "$as_me:18340: result: $cf_cv_func_vsscanf" >&5
18341 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18342
18343 case $cf_cv_func_vsscanf in
18344 (vsscanf)
18345 cat >>confdefs.h <<\EOF
18346 #define HAVE_VSSCANF 1
18347 EOF
18348 ;;
18349 (vfscanf)
18350 cat >>confdefs.h <<\EOF
18351 #define HAVE_VFSCANF 1
18352 EOF
18353 ;;
18354 (_doscan)
18355 cat >>confdefs.h <<\EOF
18356 #define HAVE__DOSCAN 1
18357 EOF
18358 ;;
18359 esac
18360
18361 for ac_header in \
18362 unistd.h \
18363
18364 do
18365 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18366 echo "$as_me:18366: checking for $ac_header" >&5
18367 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18368 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18369   echo $ECHO_N "(cached) $ECHO_C" >&6
18370 else
18371   cat >conftest.$ac_ext <<_ACEOF
18372 #line 18372 "configure"
18373 #include "confdefs.h"
18374 #include <$ac_header>
18375 _ACEOF
18376 if { (eval echo "$as_me:18376: \"$ac_cpp conftest.$ac_ext\"") >&5
18377   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18378   ac_status=$?
18379   egrep -v '^ *\+' conftest.er1 >conftest.err
18380   rm -f conftest.er1
18381   cat conftest.err >&5
18382   echo "$as_me:18382: \$? = $ac_status" >&5
18383   (exit $ac_status); } >/dev/null; then
18384   if test -s conftest.err; then
18385     ac_cpp_err=$ac_c_preproc_warn_flag
18386   else
18387     ac_cpp_err=
18388   fi
18389 else
18390   ac_cpp_err=yes
18391 fi
18392 if test -z "$ac_cpp_err"; then
18393   eval "$as_ac_Header=yes"
18394 else
18395   echo "$as_me: failed program was:" >&5
18396   cat conftest.$ac_ext >&5
18397   eval "$as_ac_Header=no"
18398 fi
18399 rm -f conftest.err conftest.$ac_ext
18400 fi
18401 echo "$as_me:18401: result: `eval echo '${'$as_ac_Header'}'`" >&5
18402 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18403 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18404   cat >>confdefs.h <<EOF
18405 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18406 EOF
18407
18408 fi
18409 done
18410
18411 echo "$as_me:18411: checking for working mkstemp" >&5
18412 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18413 if test "${cf_cv_func_mkstemp+set}" = set; then
18414   echo $ECHO_N "(cached) $ECHO_C" >&6
18415 else
18416
18417 rm -rf conftest*
18418 if test "$cross_compiling" = yes; then
18419   cf_cv_func_mkstemp=maybe
18420 else
18421   cat >conftest.$ac_ext <<_ACEOF
18422 #line 18422 "configure"
18423 #include "confdefs.h"
18424
18425 #include <sys/types.h>
18426 #ifdef HAVE_UNISTD_H
18427 #include <unistd.h>
18428 #endif
18429 #include <stdlib.h>
18430 #include <stdio.h>
18431 #include <string.h>
18432 #include <sys/stat.h>
18433 int main(void)
18434 {
18435         char *tmpl = "conftestXXXXXX";
18436         char name[2][80];
18437         int n;
18438         int result = 0;
18439         int fd;
18440         struct stat sb;
18441
18442         umask(077);
18443         for (n = 0; n < 2; ++n) {
18444                 strcpy(name[n], tmpl);
18445                 if ((fd = mkstemp(name[n])) >= 0) {
18446                         if (!strcmp(name[n], tmpl)
18447                          || stat(name[n], &sb) != 0
18448                          || (sb.st_mode & S_IFMT) != S_IFREG
18449                          || (sb.st_mode & 077) != 0) {
18450                                 result = 1;
18451                         }
18452                         close(fd);
18453                 }
18454         }
18455         if (result == 0
18456          && !strcmp(name[0], name[1]))
18457                 result = 1;
18458         ${cf_cv_main_return:-return}(result);
18459 }
18460
18461 _ACEOF
18462 rm -f conftest$ac_exeext
18463 if { (eval echo "$as_me:18463: \"$ac_link\"") >&5
18464   (eval $ac_link) 2>&5
18465   ac_status=$?
18466   echo "$as_me:18466: \$? = $ac_status" >&5
18467   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18468   { (eval echo "$as_me:18468: \"$ac_try\"") >&5
18469   (eval $ac_try) 2>&5
18470   ac_status=$?
18471   echo "$as_me:18471: \$? = $ac_status" >&5
18472   (exit $ac_status); }; }; then
18473   cf_cv_func_mkstemp=yes
18474
18475 else
18476   echo "$as_me: program exited with status $ac_status" >&5
18477 echo "$as_me: failed program was:" >&5
18478 cat conftest.$ac_ext >&5
18479 cf_cv_func_mkstemp=no
18480
18481 fi
18482 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18483 fi
18484
18485 fi
18486 echo "$as_me:18486: result: $cf_cv_func_mkstemp" >&5
18487 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18488 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18489         echo "$as_me:18489: checking for mkstemp" >&5
18490 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18491 if test "${ac_cv_func_mkstemp+set}" = set; then
18492   echo $ECHO_N "(cached) $ECHO_C" >&6
18493 else
18494   cat >conftest.$ac_ext <<_ACEOF
18495 #line 18495 "configure"
18496 #include "confdefs.h"
18497 /* System header to define __stub macros and hopefully few prototypes,
18498     which can conflict with char mkstemp (); below.  */
18499 #include <assert.h>
18500 /* Override any gcc2 internal prototype to avoid an error.  */
18501 #ifdef __cplusplus
18502 extern "C"
18503 #endif
18504 /* We use char because int might match the return type of a gcc2
18505    builtin and then its argument prototype would still apply.  */
18506 char mkstemp ();
18507 char (*f) ();
18508
18509 int
18510 main (void)
18511 {
18512 /* The GNU C library defines this for functions which it implements
18513     to always fail with ENOSYS.  Some functions are actually named
18514     something starting with __ and the normal name is an alias.  */
18515 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18516 choke me
18517 #else
18518 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18519 #endif
18520
18521   ;
18522   return 0;
18523 }
18524 _ACEOF
18525 rm -f conftest.$ac_objext conftest$ac_exeext
18526 if { (eval echo "$as_me:18526: \"$ac_link\"") >&5
18527   (eval $ac_link) 2>&5
18528   ac_status=$?
18529   echo "$as_me:18529: \$? = $ac_status" >&5
18530   (exit $ac_status); } &&
18531          { ac_try='test -s conftest$ac_exeext'
18532   { (eval echo "$as_me:18532: \"$ac_try\"") >&5
18533   (eval $ac_try) 2>&5
18534   ac_status=$?
18535   echo "$as_me:18535: \$? = $ac_status" >&5
18536   (exit $ac_status); }; }; then
18537   ac_cv_func_mkstemp=yes
18538 else
18539   echo "$as_me: failed program was:" >&5
18540 cat conftest.$ac_ext >&5
18541 ac_cv_func_mkstemp=no
18542 fi
18543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18544 fi
18545 echo "$as_me:18545: result: $ac_cv_func_mkstemp" >&5
18546 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18547
18548 fi
18549 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18550
18551 cat >>confdefs.h <<\EOF
18552 #define HAVE_MKSTEMP 1
18553 EOF
18554
18555 fi
18556
18557 # setup for prototype of fallback for vsscanf()
18558
18559 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18560         HAVE_VSSCANF=1
18561 else
18562         HAVE_VSSCANF=0
18563 fi
18564
18565 if test "x$cross_compiling" = xyes ; then
18566         { echo "$as_me:18566: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18567 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18568 else
18569         echo "$as_me:18569: checking whether setvbuf arguments are reversed" >&5
18570 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18571 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18572   echo $ECHO_N "(cached) $ECHO_C" >&6
18573 else
18574   if test "$cross_compiling" = yes; then
18575   { { echo "$as_me:18575: error: cannot run test program while cross compiling" >&5
18576 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18577    { (exit 1); exit 1; }; }
18578 else
18579   cat >conftest.$ac_ext <<_ACEOF
18580 #line 18580 "configure"
18581 #include "confdefs.h"
18582 #include <stdio.h>
18583 /* If setvbuf has the reversed format, exit 0. */
18584 int
18585 main (void)
18586 {
18587   /* This call has the arguments reversed.
18588      A reversed system may check and see that the address of main
18589      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18590   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18591     $ac_main_return(1);
18592   putc('\r', stdout);
18593   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18594 }
18595 _ACEOF
18596 rm -f conftest$ac_exeext
18597 if { (eval echo "$as_me:18597: \"$ac_link\"") >&5
18598   (eval $ac_link) 2>&5
18599   ac_status=$?
18600   echo "$as_me:18600: \$? = $ac_status" >&5
18601   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18602   { (eval echo "$as_me:18602: \"$ac_try\"") >&5
18603   (eval $ac_try) 2>&5
18604   ac_status=$?
18605   echo "$as_me:18605: \$? = $ac_status" >&5
18606   (exit $ac_status); }; }; then
18607   ac_cv_func_setvbuf_reversed=yes
18608 else
18609   echo "$as_me: program exited with status $ac_status" >&5
18610 echo "$as_me: failed program was:" >&5
18611 cat conftest.$ac_ext >&5
18612 ac_cv_func_setvbuf_reversed=no
18613 fi
18614 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18615 fi
18616 rm -f core core.* *.core
18617 fi
18618 echo "$as_me:18618: result: $ac_cv_func_setvbuf_reversed" >&5
18619 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18620 if test $ac_cv_func_setvbuf_reversed = yes; then
18621
18622 cat >>confdefs.h <<\EOF
18623 #define SETVBUF_REVERSED 1
18624 EOF
18625
18626 fi
18627
18628 fi
18629 echo "$as_me:18629: checking for intptr_t" >&5
18630 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18631 if test "${ac_cv_type_intptr_t+set}" = set; then
18632   echo $ECHO_N "(cached) $ECHO_C" >&6
18633 else
18634   cat >conftest.$ac_ext <<_ACEOF
18635 #line 18635 "configure"
18636 #include "confdefs.h"
18637 $ac_includes_default
18638 int
18639 main (void)
18640 {
18641 if ((intptr_t *) 0)
18642   return 0;
18643 if (sizeof (intptr_t))
18644   return 0;
18645   ;
18646   return 0;
18647 }
18648 _ACEOF
18649 rm -f conftest.$ac_objext
18650 if { (eval echo "$as_me:18650: \"$ac_compile\"") >&5
18651   (eval $ac_compile) 2>&5
18652   ac_status=$?
18653   echo "$as_me:18653: \$? = $ac_status" >&5
18654   (exit $ac_status); } &&
18655          { ac_try='test -s conftest.$ac_objext'
18656   { (eval echo "$as_me:18656: \"$ac_try\"") >&5
18657   (eval $ac_try) 2>&5
18658   ac_status=$?
18659   echo "$as_me:18659: \$? = $ac_status" >&5
18660   (exit $ac_status); }; }; then
18661   ac_cv_type_intptr_t=yes
18662 else
18663   echo "$as_me: failed program was:" >&5
18664 cat conftest.$ac_ext >&5
18665 ac_cv_type_intptr_t=no
18666 fi
18667 rm -f conftest.$ac_objext conftest.$ac_ext
18668 fi
18669 echo "$as_me:18669: result: $ac_cv_type_intptr_t" >&5
18670 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18671 if test $ac_cv_type_intptr_t = yes; then
18672   :
18673 else
18674
18675 cat >>confdefs.h <<EOF
18676 #define intptr_t long
18677 EOF
18678
18679 fi
18680
18681 echo "$as_me:18681: checking for ssize_t" >&5
18682 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18683 if test "${ac_cv_type_ssize_t+set}" = set; then
18684   echo $ECHO_N "(cached) $ECHO_C" >&6
18685 else
18686   cat >conftest.$ac_ext <<_ACEOF
18687 #line 18687 "configure"
18688 #include "confdefs.h"
18689 $ac_includes_default
18690 int
18691 main (void)
18692 {
18693 if ((ssize_t *) 0)
18694   return 0;
18695 if (sizeof (ssize_t))
18696   return 0;
18697   ;
18698   return 0;
18699 }
18700 _ACEOF
18701 rm -f conftest.$ac_objext
18702 if { (eval echo "$as_me:18702: \"$ac_compile\"") >&5
18703   (eval $ac_compile) 2>&5
18704   ac_status=$?
18705   echo "$as_me:18705: \$? = $ac_status" >&5
18706   (exit $ac_status); } &&
18707          { ac_try='test -s conftest.$ac_objext'
18708   { (eval echo "$as_me:18708: \"$ac_try\"") >&5
18709   (eval $ac_try) 2>&5
18710   ac_status=$?
18711   echo "$as_me:18711: \$? = $ac_status" >&5
18712   (exit $ac_status); }; }; then
18713   ac_cv_type_ssize_t=yes
18714 else
18715   echo "$as_me: failed program was:" >&5
18716 cat conftest.$ac_ext >&5
18717 ac_cv_type_ssize_t=no
18718 fi
18719 rm -f conftest.$ac_objext conftest.$ac_ext
18720 fi
18721 echo "$as_me:18721: result: $ac_cv_type_ssize_t" >&5
18722 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18723 if test $ac_cv_type_ssize_t = yes; then
18724   :
18725 else
18726
18727 cat >>confdefs.h <<EOF
18728 #define ssize_t int
18729 EOF
18730
18731 fi
18732
18733 echo "$as_me:18733: checking for type sigaction_t" >&5
18734 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18735 if test "${cf_cv_type_sigaction+set}" = set; then
18736   echo $ECHO_N "(cached) $ECHO_C" >&6
18737 else
18738
18739         cat >conftest.$ac_ext <<_ACEOF
18740 #line 18740 "configure"
18741 #include "confdefs.h"
18742
18743 #include <signal.h>
18744 int
18745 main (void)
18746 {
18747 sigaction_t x
18748   ;
18749   return 0;
18750 }
18751 _ACEOF
18752 rm -f conftest.$ac_objext
18753 if { (eval echo "$as_me:18753: \"$ac_compile\"") >&5
18754   (eval $ac_compile) 2>&5
18755   ac_status=$?
18756   echo "$as_me:18756: \$? = $ac_status" >&5
18757   (exit $ac_status); } &&
18758          { ac_try='test -s conftest.$ac_objext'
18759   { (eval echo "$as_me:18759: \"$ac_try\"") >&5
18760   (eval $ac_try) 2>&5
18761   ac_status=$?
18762   echo "$as_me:18762: \$? = $ac_status" >&5
18763   (exit $ac_status); }; }; then
18764   cf_cv_type_sigaction=yes
18765 else
18766   echo "$as_me: failed program was:" >&5
18767 cat conftest.$ac_ext >&5
18768 cf_cv_type_sigaction=no
18769 fi
18770 rm -f conftest.$ac_objext conftest.$ac_ext
18771 fi
18772
18773 echo "$as_me:18773: result: $cf_cv_type_sigaction" >&5
18774 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18775 test "$cf_cv_type_sigaction" = yes &&
18776 cat >>confdefs.h <<\EOF
18777 #define HAVE_TYPE_SIGACTION 1
18778 EOF
18779
18780 echo "$as_me:18780: checking declaration of size-change" >&5
18781 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18782 if test "${cf_cv_sizechange+set}" = set; then
18783   echo $ECHO_N "(cached) $ECHO_C" >&6
18784 else
18785
18786         cf_cv_sizechange=unknown
18787         cf_save_CPPFLAGS="$CPPFLAGS"
18788
18789 for cf_opts in "" "NEED_PTEM_H"
18790 do
18791
18792         CPPFLAGS="$cf_save_CPPFLAGS"
18793         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18794         cat >conftest.$ac_ext <<_ACEOF
18795 #line 18795 "configure"
18796 #include "confdefs.h"
18797 #include <sys/types.h>
18798 #ifdef HAVE_TERMIOS_H
18799 #include <termios.h>
18800 #else
18801 #ifdef HAVE_TERMIO_H
18802 #include <termio.h>
18803 #endif
18804 #endif
18805 #ifdef NEED_PTEM_H
18806 /* This is a workaround for SCO:  they neglected to define struct winsize in
18807  * termios.h -- it's only in termio.h and ptem.h
18808  */
18809 #include        <sys/stream.h>
18810 #include        <sys/ptem.h>
18811 #endif
18812 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18813 #include <sys/ioctl.h>
18814 #endif
18815
18816 int
18817 main (void)
18818 {
18819
18820 #ifdef TIOCGSIZE
18821         struct ttysize win;     /* FIXME: what system is this? */
18822         int y = win.ts_lines;
18823         int x = win.ts_cols;
18824 #else
18825 #ifdef TIOCGWINSZ
18826         struct winsize win;
18827         int y = win.ws_row;
18828         int x = win.ws_col;
18829 #else
18830         no TIOCGSIZE or TIOCGWINSZ
18831 #endif /* TIOCGWINSZ */
18832 #endif /* TIOCGSIZE */
18833
18834   ;
18835   return 0;
18836 }
18837 _ACEOF
18838 rm -f conftest.$ac_objext
18839 if { (eval echo "$as_me:18839: \"$ac_compile\"") >&5
18840   (eval $ac_compile) 2>&5
18841   ac_status=$?
18842   echo "$as_me:18842: \$? = $ac_status" >&5
18843   (exit $ac_status); } &&
18844          { ac_try='test -s conftest.$ac_objext'
18845   { (eval echo "$as_me:18845: \"$ac_try\"") >&5
18846   (eval $ac_try) 2>&5
18847   ac_status=$?
18848   echo "$as_me:18848: \$? = $ac_status" >&5
18849   (exit $ac_status); }; }; then
18850   cf_cv_sizechange=yes
18851 else
18852   echo "$as_me: failed program was:" >&5
18853 cat conftest.$ac_ext >&5
18854 cf_cv_sizechange=no
18855 fi
18856 rm -f conftest.$ac_objext conftest.$ac_ext
18857
18858         CPPFLAGS="$cf_save_CPPFLAGS"
18859         if test "$cf_cv_sizechange" = yes ; then
18860                 echo "size-change succeeded ($cf_opts)" >&5
18861                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18862                 break
18863         fi
18864 done
18865
18866 fi
18867 echo "$as_me:18867: result: $cf_cv_sizechange" >&5
18868 echo "${ECHO_T}$cf_cv_sizechange" >&6
18869 if test "$cf_cv_sizechange" != no ; then
18870
18871 cat >>confdefs.h <<\EOF
18872 #define HAVE_SIZECHANGE 1
18873 EOF
18874
18875         case $cf_cv_sizechange in
18876         (NEED*)
18877                 cat >>confdefs.h <<EOF
18878 #define $cf_cv_sizechange  1
18879 EOF
18880
18881                 ;;
18882         esac
18883 fi
18884
18885 echo "$as_me:18885: checking for memmove" >&5
18886 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18887 if test "${ac_cv_func_memmove+set}" = set; then
18888   echo $ECHO_N "(cached) $ECHO_C" >&6
18889 else
18890   cat >conftest.$ac_ext <<_ACEOF
18891 #line 18891 "configure"
18892 #include "confdefs.h"
18893 /* System header to define __stub macros and hopefully few prototypes,
18894     which can conflict with char memmove (); below.  */
18895 #include <assert.h>
18896 /* Override any gcc2 internal prototype to avoid an error.  */
18897 #ifdef __cplusplus
18898 extern "C"
18899 #endif
18900 /* We use char because int might match the return type of a gcc2
18901    builtin and then its argument prototype would still apply.  */
18902 char memmove ();
18903 char (*f) ();
18904
18905 int
18906 main (void)
18907 {
18908 /* The GNU C library defines this for functions which it implements
18909     to always fail with ENOSYS.  Some functions are actually named
18910     something starting with __ and the normal name is an alias.  */
18911 #if defined (__stub_memmove) || defined (__stub___memmove)
18912 choke me
18913 #else
18914 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18915 #endif
18916
18917   ;
18918   return 0;
18919 }
18920 _ACEOF
18921 rm -f conftest.$ac_objext conftest$ac_exeext
18922 if { (eval echo "$as_me:18922: \"$ac_link\"") >&5
18923   (eval $ac_link) 2>&5
18924   ac_status=$?
18925   echo "$as_me:18925: \$? = $ac_status" >&5
18926   (exit $ac_status); } &&
18927          { ac_try='test -s conftest$ac_exeext'
18928   { (eval echo "$as_me:18928: \"$ac_try\"") >&5
18929   (eval $ac_try) 2>&5
18930   ac_status=$?
18931   echo "$as_me:18931: \$? = $ac_status" >&5
18932   (exit $ac_status); }; }; then
18933   ac_cv_func_memmove=yes
18934 else
18935   echo "$as_me: failed program was:" >&5
18936 cat conftest.$ac_ext >&5
18937 ac_cv_func_memmove=no
18938 fi
18939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18940 fi
18941 echo "$as_me:18941: result: $ac_cv_func_memmove" >&5
18942 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18943 if test $ac_cv_func_memmove = yes; then
18944   :
18945 else
18946
18947 echo "$as_me:18947: checking for bcopy" >&5
18948 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18949 if test "${ac_cv_func_bcopy+set}" = set; then
18950   echo $ECHO_N "(cached) $ECHO_C" >&6
18951 else
18952   cat >conftest.$ac_ext <<_ACEOF
18953 #line 18953 "configure"
18954 #include "confdefs.h"
18955 /* System header to define __stub macros and hopefully few prototypes,
18956     which can conflict with char bcopy (); below.  */
18957 #include <assert.h>
18958 /* Override any gcc2 internal prototype to avoid an error.  */
18959 #ifdef __cplusplus
18960 extern "C"
18961 #endif
18962 /* We use char because int might match the return type of a gcc2
18963    builtin and then its argument prototype would still apply.  */
18964 char bcopy ();
18965 char (*f) ();
18966
18967 int
18968 main (void)
18969 {
18970 /* The GNU C library defines this for functions which it implements
18971     to always fail with ENOSYS.  Some functions are actually named
18972     something starting with __ and the normal name is an alias.  */
18973 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18974 choke me
18975 #else
18976 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18977 #endif
18978
18979   ;
18980   return 0;
18981 }
18982 _ACEOF
18983 rm -f conftest.$ac_objext conftest$ac_exeext
18984 if { (eval echo "$as_me:18984: \"$ac_link\"") >&5
18985   (eval $ac_link) 2>&5
18986   ac_status=$?
18987   echo "$as_me:18987: \$? = $ac_status" >&5
18988   (exit $ac_status); } &&
18989          { ac_try='test -s conftest$ac_exeext'
18990   { (eval echo "$as_me:18990: \"$ac_try\"") >&5
18991   (eval $ac_try) 2>&5
18992   ac_status=$?
18993   echo "$as_me:18993: \$? = $ac_status" >&5
18994   (exit $ac_status); }; }; then
18995   ac_cv_func_bcopy=yes
18996 else
18997   echo "$as_me: failed program was:" >&5
18998 cat conftest.$ac_ext >&5
18999 ac_cv_func_bcopy=no
19000 fi
19001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19002 fi
19003 echo "$as_me:19003: result: $ac_cv_func_bcopy" >&5
19004 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
19005 if test $ac_cv_func_bcopy = yes; then
19006
19007         echo "$as_me:19007: checking if bcopy does overlapping moves" >&5
19008 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
19009 if test "${cf_cv_good_bcopy+set}" = set; then
19010   echo $ECHO_N "(cached) $ECHO_C" >&6
19011 else
19012
19013                 if test "$cross_compiling" = yes; then
19014   cf_cv_good_bcopy=unknown
19015 else
19016   cat >conftest.$ac_ext <<_ACEOF
19017 #line 19017 "configure"
19018 #include "confdefs.h"
19019
19020 int main(void) {
19021         static char data[] = "abcdefghijklmnopqrstuwwxyz";
19022         char temp[40];
19023         bcopy(data, temp, sizeof(data));
19024         bcopy(temp+10, temp, 15);
19025         bcopy(temp+5, temp+15, 10);
19026         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
19027 }
19028
19029 _ACEOF
19030 rm -f conftest$ac_exeext
19031 if { (eval echo "$as_me:19031: \"$ac_link\"") >&5
19032   (eval $ac_link) 2>&5
19033   ac_status=$?
19034   echo "$as_me:19034: \$? = $ac_status" >&5
19035   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19036   { (eval echo "$as_me:19036: \"$ac_try\"") >&5
19037   (eval $ac_try) 2>&5
19038   ac_status=$?
19039   echo "$as_me:19039: \$? = $ac_status" >&5
19040   (exit $ac_status); }; }; then
19041   cf_cv_good_bcopy=yes
19042 else
19043   echo "$as_me: program exited with status $ac_status" >&5
19044 echo "$as_me: failed program was:" >&5
19045 cat conftest.$ac_ext >&5
19046 cf_cv_good_bcopy=no
19047 fi
19048 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19049 fi
19050
19051 fi
19052 echo "$as_me:19052: result: $cf_cv_good_bcopy" >&5
19053 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
19054
19055 else
19056   cf_cv_good_bcopy=no
19057 fi
19058
19059         if test "$cf_cv_good_bcopy" = yes ; then
19060
19061 cat >>confdefs.h <<\EOF
19062 #define USE_OK_BCOPY 1
19063 EOF
19064
19065         else
19066
19067 cat >>confdefs.h <<\EOF
19068 #define USE_MY_MEMMOVE 1
19069 EOF
19070
19071         fi
19072
19073 fi
19074
19075 tty 2>&1 >/dev/null || {
19076 for ac_func in posix_openpt
19077 do
19078 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19079 echo "$as_me:19079: checking for $ac_func" >&5
19080 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19081 if eval "test \"\${$as_ac_var+set}\" = set"; then
19082   echo $ECHO_N "(cached) $ECHO_C" >&6
19083 else
19084   cat >conftest.$ac_ext <<_ACEOF
19085 #line 19085 "configure"
19086 #include "confdefs.h"
19087 /* System header to define __stub macros and hopefully few prototypes,
19088     which can conflict with char $ac_func (); below.  */
19089 #include <assert.h>
19090 /* Override any gcc2 internal prototype to avoid an error.  */
19091 #ifdef __cplusplus
19092 extern "C"
19093 #endif
19094 /* We use char because int might match the return type of a gcc2
19095    builtin and then its argument prototype would still apply.  */
19096 char $ac_func ();
19097 char (*f) ();
19098
19099 int
19100 main (void)
19101 {
19102 /* The GNU C library defines this for functions which it implements
19103     to always fail with ENOSYS.  Some functions are actually named
19104     something starting with __ and the normal name is an alias.  */
19105 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19106 choke me
19107 #else
19108 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19109 #endif
19110
19111   ;
19112   return 0;
19113 }
19114 _ACEOF
19115 rm -f conftest.$ac_objext conftest$ac_exeext
19116 if { (eval echo "$as_me:19116: \"$ac_link\"") >&5
19117   (eval $ac_link) 2>&5
19118   ac_status=$?
19119   echo "$as_me:19119: \$? = $ac_status" >&5
19120   (exit $ac_status); } &&
19121          { ac_try='test -s conftest$ac_exeext'
19122   { (eval echo "$as_me:19122: \"$ac_try\"") >&5
19123   (eval $ac_try) 2>&5
19124   ac_status=$?
19125   echo "$as_me:19125: \$? = $ac_status" >&5
19126   (exit $ac_status); }; }; then
19127   eval "$as_ac_var=yes"
19128 else
19129   echo "$as_me: failed program was:" >&5
19130 cat conftest.$ac_ext >&5
19131 eval "$as_ac_var=no"
19132 fi
19133 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19134 fi
19135 echo "$as_me:19135: result: `eval echo '${'$as_ac_var'}'`" >&5
19136 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19137 if test `eval echo '${'$as_ac_var'}'` = yes; then
19138   cat >>confdefs.h <<EOF
19139 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19140 EOF
19141
19142 fi
19143 done
19144  }
19145 echo "$as_me:19145: checking if poll really works" >&5
19146 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
19147 if test "${cf_cv_working_poll+set}" = set; then
19148   echo $ECHO_N "(cached) $ECHO_C" >&6
19149 else
19150
19151 if test "$cross_compiling" = yes; then
19152   cf_cv_working_poll=unknown
19153 else
19154   cat >conftest.$ac_ext <<_ACEOF
19155 #line 19155 "configure"
19156 #include "confdefs.h"
19157
19158 #include <stdlib.h>
19159 #include <stdio.h>
19160 #include <unistd.h>
19161 #include <fcntl.h>
19162 #ifdef HAVE_POLL_H
19163 #include <poll.h>
19164 #else
19165 #include <sys/poll.h>
19166 #endif
19167 int main(void) {
19168         struct pollfd myfds;
19169         int ret;
19170
19171         /* check for Darwin bug with respect to "devices" */
19172         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
19173         if (myfds.fd < 0)
19174                 myfds.fd = 0;
19175         myfds.events = POLLIN;
19176         myfds.revents = 0;
19177
19178         ret = poll(&myfds, 1, 100);
19179
19180         if (ret < 0 || (myfds.revents & POLLNVAL)) {
19181                 ret = -1;
19182         } else {
19183                 int fd = 0;
19184                 if (!isatty(fd)) {
19185                         fd = open("/dev/tty", 2);       /* O_RDWR */
19186                 }
19187 #ifdef HAVE_POSIX_OPENPT
19188                 if (fd < 0) {
19189                         fd = posix_openpt(O_RDWR);
19190                 }
19191 #endif
19192
19193                 if (fd >= 0) {
19194                         /* also check with standard input */
19195                         myfds.fd = fd;
19196                         myfds.events = POLLIN;
19197                         myfds.revents = 0;
19198                         ret = poll(&myfds, 1, 100);
19199                 } else {
19200                         ret = -1;
19201                 }
19202         }
19203         ${cf_cv_main_return:-return}(ret < 0);
19204 }
19205 _ACEOF
19206 rm -f conftest$ac_exeext
19207 if { (eval echo "$as_me:19207: \"$ac_link\"") >&5
19208   (eval $ac_link) 2>&5
19209   ac_status=$?
19210   echo "$as_me:19210: \$? = $ac_status" >&5
19211   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19212   { (eval echo "$as_me:19212: \"$ac_try\"") >&5
19213   (eval $ac_try) 2>&5
19214   ac_status=$?
19215   echo "$as_me:19215: \$? = $ac_status" >&5
19216   (exit $ac_status); }; }; then
19217   cf_cv_working_poll=yes
19218 else
19219   echo "$as_me: program exited with status $ac_status" >&5
19220 echo "$as_me: failed program was:" >&5
19221 cat conftest.$ac_ext >&5
19222 cf_cv_working_poll=no
19223 fi
19224 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19225 fi
19226 fi
19227 echo "$as_me:19227: result: $cf_cv_working_poll" >&5
19228 echo "${ECHO_T}$cf_cv_working_poll" >&6
19229 test "$cf_cv_working_poll" = "yes" &&
19230 cat >>confdefs.h <<\EOF
19231 #define HAVE_WORKING_POLL 1
19232 EOF
19233
19234 echo "$as_me:19234: checking for va_copy" >&5
19235 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
19236 if test "${cf_cv_have_va_copy+set}" = set; then
19237   echo $ECHO_N "(cached) $ECHO_C" >&6
19238 else
19239
19240 cat >conftest.$ac_ext <<_ACEOF
19241 #line 19241 "configure"
19242 #include "confdefs.h"
19243
19244 #include <stdarg.h>
19245
19246 int
19247 main (void)
19248 {
19249
19250         static va_list dst;
19251         static va_list src;
19252         va_copy(dst, src)
19253   ;
19254   return 0;
19255 }
19256 _ACEOF
19257 rm -f conftest.$ac_objext conftest$ac_exeext
19258 if { (eval echo "$as_me:19258: \"$ac_link\"") >&5
19259   (eval $ac_link) 2>&5
19260   ac_status=$?
19261   echo "$as_me:19261: \$? = $ac_status" >&5
19262   (exit $ac_status); } &&
19263          { ac_try='test -s conftest$ac_exeext'
19264   { (eval echo "$as_me:19264: \"$ac_try\"") >&5
19265   (eval $ac_try) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit $ac_status); }; }; then
19269   cf_cv_have_va_copy=yes
19270 else
19271   echo "$as_me: failed program was:" >&5
19272 cat conftest.$ac_ext >&5
19273 cf_cv_have_va_copy=no
19274 fi
19275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19276 fi
19277 echo "$as_me:19277: result: $cf_cv_have_va_copy" >&5
19278 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19279
19280 test "$cf_cv_have_va_copy" = yes &&
19281 cat >>confdefs.h <<\EOF
19282 #define HAVE_VA_COPY 1
19283 EOF
19284
19285 echo "$as_me:19285: checking for __va_copy" >&5
19286 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19287 if test "${cf_cv_have___va_copy+set}" = set; then
19288   echo $ECHO_N "(cached) $ECHO_C" >&6
19289 else
19290
19291 cat >conftest.$ac_ext <<_ACEOF
19292 #line 19292 "configure"
19293 #include "confdefs.h"
19294
19295 #include <stdarg.h>
19296
19297 int
19298 main (void)
19299 {
19300
19301         static va_list dst;
19302         static va_list src;
19303         __va_copy(dst, src)
19304   ;
19305   return 0;
19306 }
19307 _ACEOF
19308 rm -f conftest.$ac_objext conftest$ac_exeext
19309 if { (eval echo "$as_me:19309: \"$ac_link\"") >&5
19310   (eval $ac_link) 2>&5
19311   ac_status=$?
19312   echo "$as_me:19312: \$? = $ac_status" >&5
19313   (exit $ac_status); } &&
19314          { ac_try='test -s conftest$ac_exeext'
19315   { (eval echo "$as_me:19315: \"$ac_try\"") >&5
19316   (eval $ac_try) 2>&5
19317   ac_status=$?
19318   echo "$as_me:19318: \$? = $ac_status" >&5
19319   (exit $ac_status); }; }; then
19320   cf_cv_have___va_copy=yes
19321 else
19322   echo "$as_me: failed program was:" >&5
19323 cat conftest.$ac_ext >&5
19324 cf_cv_have___va_copy=no
19325 fi
19326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19327 fi
19328 echo "$as_me:19328: result: $cf_cv_have___va_copy" >&5
19329 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19330
19331 test "$cf_cv_have___va_copy" = yes &&
19332 cat >>confdefs.h <<\EOF
19333 #define HAVE___VA_COPY 1
19334 EOF
19335
19336 echo "$as_me:19336: checking for pid_t" >&5
19337 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19338 if test "${ac_cv_type_pid_t+set}" = set; then
19339   echo $ECHO_N "(cached) $ECHO_C" >&6
19340 else
19341   cat >conftest.$ac_ext <<_ACEOF
19342 #line 19342 "configure"
19343 #include "confdefs.h"
19344 $ac_includes_default
19345 int
19346 main (void)
19347 {
19348 if ((pid_t *) 0)
19349   return 0;
19350 if (sizeof (pid_t))
19351   return 0;
19352   ;
19353   return 0;
19354 }
19355 _ACEOF
19356 rm -f conftest.$ac_objext
19357 if { (eval echo "$as_me:19357: \"$ac_compile\"") >&5
19358   (eval $ac_compile) 2>&5
19359   ac_status=$?
19360   echo "$as_me:19360: \$? = $ac_status" >&5
19361   (exit $ac_status); } &&
19362          { ac_try='test -s conftest.$ac_objext'
19363   { (eval echo "$as_me:19363: \"$ac_try\"") >&5
19364   (eval $ac_try) 2>&5
19365   ac_status=$?
19366   echo "$as_me:19366: \$? = $ac_status" >&5
19367   (exit $ac_status); }; }; then
19368   ac_cv_type_pid_t=yes
19369 else
19370   echo "$as_me: failed program was:" >&5
19371 cat conftest.$ac_ext >&5
19372 ac_cv_type_pid_t=no
19373 fi
19374 rm -f conftest.$ac_objext conftest.$ac_ext
19375 fi
19376 echo "$as_me:19376: result: $ac_cv_type_pid_t" >&5
19377 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19378 if test $ac_cv_type_pid_t = yes; then
19379   :
19380 else
19381
19382 cat >>confdefs.h <<EOF
19383 #define pid_t int
19384 EOF
19385
19386 fi
19387
19388 for ac_header in unistd.h vfork.h
19389 do
19390 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19391 echo "$as_me:19391: checking for $ac_header" >&5
19392 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19393 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19394   echo $ECHO_N "(cached) $ECHO_C" >&6
19395 else
19396   cat >conftest.$ac_ext <<_ACEOF
19397 #line 19397 "configure"
19398 #include "confdefs.h"
19399 #include <$ac_header>
19400 _ACEOF
19401 if { (eval echo "$as_me:19401: \"$ac_cpp conftest.$ac_ext\"") >&5
19402   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19403   ac_status=$?
19404   egrep -v '^ *\+' conftest.er1 >conftest.err
19405   rm -f conftest.er1
19406   cat conftest.err >&5
19407   echo "$as_me:19407: \$? = $ac_status" >&5
19408   (exit $ac_status); } >/dev/null; then
19409   if test -s conftest.err; then
19410     ac_cpp_err=$ac_c_preproc_warn_flag
19411   else
19412     ac_cpp_err=
19413   fi
19414 else
19415   ac_cpp_err=yes
19416 fi
19417 if test -z "$ac_cpp_err"; then
19418   eval "$as_ac_Header=yes"
19419 else
19420   echo "$as_me: failed program was:" >&5
19421   cat conftest.$ac_ext >&5
19422   eval "$as_ac_Header=no"
19423 fi
19424 rm -f conftest.err conftest.$ac_ext
19425 fi
19426 echo "$as_me:19426: result: `eval echo '${'$as_ac_Header'}'`" >&5
19427 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19428 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19429   cat >>confdefs.h <<EOF
19430 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19431 EOF
19432
19433 fi
19434 done
19435
19436 for ac_func in fork vfork
19437 do
19438 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19439 echo "$as_me:19439: checking for $ac_func" >&5
19440 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19441 if eval "test \"\${$as_ac_var+set}\" = set"; then
19442   echo $ECHO_N "(cached) $ECHO_C" >&6
19443 else
19444   cat >conftest.$ac_ext <<_ACEOF
19445 #line 19445 "configure"
19446 #include "confdefs.h"
19447 /* System header to define __stub macros and hopefully few prototypes,
19448     which can conflict with char $ac_func (); below.  */
19449 #include <assert.h>
19450 /* Override any gcc2 internal prototype to avoid an error.  */
19451 #ifdef __cplusplus
19452 extern "C"
19453 #endif
19454 /* We use char because int might match the return type of a gcc2
19455    builtin and then its argument prototype would still apply.  */
19456 char $ac_func ();
19457 char (*f) ();
19458
19459 int
19460 main (void)
19461 {
19462 /* The GNU C library defines this for functions which it implements
19463     to always fail with ENOSYS.  Some functions are actually named
19464     something starting with __ and the normal name is an alias.  */
19465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19466 choke me
19467 #else
19468 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19469 #endif
19470
19471   ;
19472   return 0;
19473 }
19474 _ACEOF
19475 rm -f conftest.$ac_objext conftest$ac_exeext
19476 if { (eval echo "$as_me:19476: \"$ac_link\"") >&5
19477   (eval $ac_link) 2>&5
19478   ac_status=$?
19479   echo "$as_me:19479: \$? = $ac_status" >&5
19480   (exit $ac_status); } &&
19481          { ac_try='test -s conftest$ac_exeext'
19482   { (eval echo "$as_me:19482: \"$ac_try\"") >&5
19483   (eval $ac_try) 2>&5
19484   ac_status=$?
19485   echo "$as_me:19485: \$? = $ac_status" >&5
19486   (exit $ac_status); }; }; then
19487   eval "$as_ac_var=yes"
19488 else
19489   echo "$as_me: failed program was:" >&5
19490 cat conftest.$ac_ext >&5
19491 eval "$as_ac_var=no"
19492 fi
19493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19494 fi
19495 echo "$as_me:19495: result: `eval echo '${'$as_ac_var'}'`" >&5
19496 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19497 if test `eval echo '${'$as_ac_var'}'` = yes; then
19498   cat >>confdefs.h <<EOF
19499 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19500 EOF
19501
19502 fi
19503 done
19504
19505 ac_cv_func_fork_works=$ac_cv_func_fork
19506 if test "x$ac_cv_func_fork" = xyes; then
19507   echo "$as_me:19507: checking for working fork" >&5
19508 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19509 if test "${ac_cv_func_fork_works+set}" = set; then
19510   echo $ECHO_N "(cached) $ECHO_C" >&6
19511 else
19512   if test "$cross_compiling" = yes; then
19513   ac_cv_func_fork_works=cross
19514 else
19515   cat >conftest.$ac_ext <<_ACEOF
19516 /* By Rüdiger Kuhlmann. */
19517       #include <sys/types.h>
19518       #if HAVE_UNISTD_H
19519       # include <unistd.h>
19520       #endif
19521       /* Some systems only have a dummy stub for fork() */
19522       int main (void)
19523       {
19524         if (fork() < 0)
19525           $ac_main_return (1);
19526         $ac_main_return (0);
19527       }
19528 _ACEOF
19529 rm -f conftest$ac_exeext
19530 if { (eval echo "$as_me:19530: \"$ac_link\"") >&5
19531   (eval $ac_link) 2>&5
19532   ac_status=$?
19533   echo "$as_me:19533: \$? = $ac_status" >&5
19534   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19535   { (eval echo "$as_me:19535: \"$ac_try\"") >&5
19536   (eval $ac_try) 2>&5
19537   ac_status=$?
19538   echo "$as_me:19538: \$? = $ac_status" >&5
19539   (exit $ac_status); }; }; then
19540   ac_cv_func_fork_works=yes
19541 else
19542   echo "$as_me: program exited with status $ac_status" >&5
19543 echo "$as_me: failed program was:" >&5
19544 cat conftest.$ac_ext >&5
19545 ac_cv_func_fork_works=no
19546 fi
19547 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19548 fi
19549 fi
19550 echo "$as_me:19550: result: $ac_cv_func_fork_works" >&5
19551 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19552
19553 fi
19554 if test "x$ac_cv_func_fork_works" = xcross; then
19555   case $host in
19556     *-*-amigaos* | *-*-msdosdjgpp*)
19557       # Override, as these systems have only a dummy fork() stub
19558       ac_cv_func_fork_works=no
19559       ;;
19560     *)
19561       ac_cv_func_fork_works=yes
19562       ;;
19563   esac
19564   { echo "$as_me:19564: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19565 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19566 fi
19567 ac_cv_func_vfork_works=$ac_cv_func_vfork
19568 if test "x$ac_cv_func_vfork" = xyes; then
19569   echo "$as_me:19569: checking for working vfork" >&5
19570 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19571 if test "${ac_cv_func_vfork_works+set}" = set; then
19572   echo $ECHO_N "(cached) $ECHO_C" >&6
19573 else
19574   if test "$cross_compiling" = yes; then
19575   ac_cv_func_vfork_works=cross
19576 else
19577   cat >conftest.$ac_ext <<_ACEOF
19578 #line 19578 "configure"
19579 #include "confdefs.h"
19580 /* Thanks to Paul Eggert for this test.  */
19581 #include <stdio.h>
19582 #include <sys/types.h>
19583 #include <sys/stat.h>
19584 #if HAVE_UNISTD_H
19585 # include <unistd.h>
19586 #endif
19587 #if HAVE_VFORK_H
19588 # include <vfork.h>
19589 #endif
19590 /* On some sparc systems, changes by the child to local and incoming
19591    argument registers are propagated back to the parent.  The compiler
19592    is told about this with #include <vfork.h>, but some compilers
19593    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19594    static variable whose address is put into a register that is
19595    clobbered by the vfork.  */
19596 static
19597 #ifdef __cplusplus
19598 sparc_address_test (int arg)
19599 # else
19600 sparc_address_test (arg) int arg;
19601 #endif
19602 {
19603   static pid_t child;
19604   if (!child) {
19605     child = vfork ();
19606     if (child < 0) {
19607       perror ("vfork");
19608       _exit(2);
19609     }
19610     if (!child) {
19611       arg = getpid();
19612       write(-1, "", 0);
19613       _exit (arg);
19614     }
19615   }
19616 }
19617
19618 int
19619 main (void)
19620 {
19621   pid_t parent = getpid ();
19622   pid_t child;
19623
19624   sparc_address_test ();
19625
19626   child = vfork ();
19627
19628   if (child == 0) {
19629     /* Here is another test for sparc vfork register problems.  This
19630        test uses lots of local variables, at least as many local
19631        variables as main has allocated so far including compiler
19632        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19633        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19634        reuse the register of parent for one of the local variables,
19635        since it will think that parent can't possibly be used any more
19636        in this routine.  Assigning to the local variable will thus
19637        munge parent in the parent process.  */
19638     pid_t
19639       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19640       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19641     /* Convince the compiler that p..p7 are live; otherwise, it might
19642        use the same hardware register for all 8 local variables.  */
19643     if (p != p1 || p != p2 || p != p3 || p != p4
19644         || p != p5 || p != p6 || p != p7)
19645       _exit(1);
19646
19647     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19648        from child file descriptors.  If the child closes a descriptor
19649        before it execs or exits, this munges the parent's descriptor
19650        as well.  Test for this by closing stdout in the child.  */
19651     _exit(close(fileno(stdout)) != 0);
19652   } else {
19653     int status;
19654     struct stat st;
19655
19656     while (wait(&status) != child)
19657       ;
19658     $ac_main_return(
19659          /* Was there some problem with vforking?  */
19660          child < 0
19661
19662          /* Did the child fail?  (This shouldn't happen.)  */
19663          || status
19664
19665          /* Did the vfork/compiler bug occur?  */
19666          || parent != getpid()
19667
19668          /* Did the file descriptor bug occur?  */
19669          || fstat(fileno(stdout), &st) != 0
19670          );
19671   }
19672 }
19673 _ACEOF
19674 rm -f conftest$ac_exeext
19675 if { (eval echo "$as_me:19675: \"$ac_link\"") >&5
19676   (eval $ac_link) 2>&5
19677   ac_status=$?
19678   echo "$as_me:19678: \$? = $ac_status" >&5
19679   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19680   { (eval echo "$as_me:19680: \"$ac_try\"") >&5
19681   (eval $ac_try) 2>&5
19682   ac_status=$?
19683   echo "$as_me:19683: \$? = $ac_status" >&5
19684   (exit $ac_status); }; }; then
19685   ac_cv_func_vfork_works=yes
19686 else
19687   echo "$as_me: program exited with status $ac_status" >&5
19688 echo "$as_me: failed program was:" >&5
19689 cat conftest.$ac_ext >&5
19690 ac_cv_func_vfork_works=no
19691 fi
19692 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19693 fi
19694 fi
19695 echo "$as_me:19695: result: $ac_cv_func_vfork_works" >&5
19696 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19697
19698 fi;
19699 if test "x$ac_cv_func_fork_works" = xcross; then
19700   ac_cv_func_vfork_works=ac_cv_func_vfork
19701   { echo "$as_me:19701: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19702 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19703 fi
19704
19705 if test "x$ac_cv_func_vfork_works" = xyes; then
19706
19707 cat >>confdefs.h <<\EOF
19708 #define HAVE_WORKING_VFORK 1
19709 EOF
19710
19711 else
19712
19713 cat >>confdefs.h <<\EOF
19714 #define vfork fork
19715 EOF
19716
19717 fi
19718 if test "x$ac_cv_func_fork_works" = xyes; then
19719
19720 cat >>confdefs.h <<\EOF
19721 #define HAVE_WORKING_FORK 1
19722 EOF
19723
19724 fi
19725
19726 # special check for test/ditto.c
19727
19728 echo "$as_me:19728: checking for openpty in -lutil" >&5
19729 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19730 if test "${ac_cv_lib_util_openpty+set}" = set; then
19731   echo $ECHO_N "(cached) $ECHO_C" >&6
19732 else
19733   ac_check_lib_save_LIBS=$LIBS
19734 LIBS="-lutil  $LIBS"
19735 cat >conftest.$ac_ext <<_ACEOF
19736 #line 19736 "configure"
19737 #include "confdefs.h"
19738
19739 /* Override any gcc2 internal prototype to avoid an error.  */
19740 #ifdef __cplusplus
19741 extern "C"
19742 #endif
19743 /* We use char because int might match the return type of a gcc2
19744    builtin and then its argument prototype would still apply.  */
19745 char openpty ();
19746 int
19747 main (void)
19748 {
19749 openpty ();
19750   ;
19751   return 0;
19752 }
19753 _ACEOF
19754 rm -f conftest.$ac_objext conftest$ac_exeext
19755 if { (eval echo "$as_me:19755: \"$ac_link\"") >&5
19756   (eval $ac_link) 2>&5
19757   ac_status=$?
19758   echo "$as_me:19758: \$? = $ac_status" >&5
19759   (exit $ac_status); } &&
19760          { ac_try='test -s conftest$ac_exeext'
19761   { (eval echo "$as_me:19761: \"$ac_try\"") >&5
19762   (eval $ac_try) 2>&5
19763   ac_status=$?
19764   echo "$as_me:19764: \$? = $ac_status" >&5
19765   (exit $ac_status); }; }; then
19766   ac_cv_lib_util_openpty=yes
19767 else
19768   echo "$as_me: failed program was:" >&5
19769 cat conftest.$ac_ext >&5
19770 ac_cv_lib_util_openpty=no
19771 fi
19772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19773 LIBS=$ac_check_lib_save_LIBS
19774 fi
19775 echo "$as_me:19775: result: $ac_cv_lib_util_openpty" >&5
19776 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19777 if test $ac_cv_lib_util_openpty = yes; then
19778   cf_cv_lib_util=yes
19779 else
19780   cf_cv_lib_util=no
19781 fi
19782
19783 echo "$as_me:19783: checking for openpty header" >&5
19784 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19785 if test "${cf_cv_func_openpty+set}" = set; then
19786   echo $ECHO_N "(cached) $ECHO_C" >&6
19787 else
19788
19789         cf_save_LIBS="$LIBS"
19790         test $cf_cv_lib_util = yes && {
19791 cf_add_libs="-lutil"
19792 # Filter out duplicates - this happens with badly-designed ".pc" files...
19793 for cf_add_1lib in $LIBS
19794 do
19795         for cf_add_2lib in $cf_add_libs
19796         do
19797                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19798                 then
19799                         cf_add_1lib=
19800                         break
19801                 fi
19802         done
19803         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19804 done
19805 LIBS="$cf_add_libs"
19806  }
19807         for cf_header in pty.h libutil.h util.h
19808         do
19809         cat >conftest.$ac_ext <<_ACEOF
19810 #line 19810 "configure"
19811 #include "confdefs.h"
19812
19813 #include <$cf_header>
19814
19815 int
19816 main (void)
19817 {
19818
19819         int x = openpty((int *)0, (int *)0, (char *)0,
19820                                    (struct termios *)0, (struct winsize *)0);
19821
19822   ;
19823   return 0;
19824 }
19825 _ACEOF
19826 rm -f conftest.$ac_objext conftest$ac_exeext
19827 if { (eval echo "$as_me:19827: \"$ac_link\"") >&5
19828   (eval $ac_link) 2>&5
19829   ac_status=$?
19830   echo "$as_me:19830: \$? = $ac_status" >&5
19831   (exit $ac_status); } &&
19832          { ac_try='test -s conftest$ac_exeext'
19833   { (eval echo "$as_me:19833: \"$ac_try\"") >&5
19834   (eval $ac_try) 2>&5
19835   ac_status=$?
19836   echo "$as_me:19836: \$? = $ac_status" >&5
19837   (exit $ac_status); }; }; then
19838
19839                 cf_cv_func_openpty=$cf_header
19840                 break
19841
19842 else
19843   echo "$as_me: failed program was:" >&5
19844 cat conftest.$ac_ext >&5
19845
19846                 cf_cv_func_openpty=no
19847
19848 fi
19849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19850         done
19851         LIBS="$cf_save_LIBS"
19852
19853 fi
19854 echo "$as_me:19854: result: $cf_cv_func_openpty" >&5
19855 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19856
19857 if test "$cf_cv_func_openpty" != no ; then
19858
19859 cat >>confdefs.h <<EOF
19860 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19861 EOF
19862
19863 cat >>confdefs.h <<\EOF
19864 #define USE_XTERM_PTY 1
19865 EOF
19866
19867         if test "x$cf_cv_lib_util" = xyes ; then
19868
19869 cf_add_libs="-lutil"
19870 # Filter out duplicates - this happens with badly-designed ".pc" files...
19871 for cf_add_1lib in $TEST_LIBS
19872 do
19873         for cf_add_2lib in $cf_add_libs
19874         do
19875                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19876                 then
19877                         cf_add_1lib=
19878                         break
19879                 fi
19880         done
19881         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19882 done
19883 TEST_LIBS="$cf_add_libs"
19884
19885         fi
19886 fi
19887
19888 if test "$with_hashed_db" != no ; then
19889
19890 cat >>confdefs.h <<\EOF
19891 #define USE_HASHED_DB 1
19892 EOF
19893
19894 case $with_hashed_db in
19895 (yes|*able*)
19896         ;;
19897 (*)
19898         if test -d "$with_hashed_db" ; then
19899
19900 if test -n "$with_hashed_db/include" ; then
19901   for cf_add_incdir in $with_hashed_db/include
19902   do
19903         while test $cf_add_incdir != /usr/include
19904         do
19905           if test -d $cf_add_incdir
19906           then
19907                 cf_have_incdir=no
19908                 if test -n "$CFLAGS$CPPFLAGS" ; then
19909                   # a loop is needed to ensure we can add subdirs of existing dirs
19910                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19911                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19912                           cf_have_incdir=yes; break
19913                         fi
19914                   done
19915                 fi
19916
19917                 if test "$cf_have_incdir" = no ; then
19918                   if test "$cf_add_incdir" = /usr/local/include ; then
19919                         if test "$GCC" = yes
19920                         then
19921                           cf_save_CPPFLAGS=$CPPFLAGS
19922                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19923                           cat >conftest.$ac_ext <<_ACEOF
19924 #line 19924 "configure"
19925 #include "confdefs.h"
19926 #include <stdio.h>
19927 int
19928 main (void)
19929 {
19930 printf("Hello")
19931   ;
19932   return 0;
19933 }
19934 _ACEOF
19935 rm -f conftest.$ac_objext
19936 if { (eval echo "$as_me:19936: \"$ac_compile\"") >&5
19937   (eval $ac_compile) 2>&5
19938   ac_status=$?
19939   echo "$as_me:19939: \$? = $ac_status" >&5
19940   (exit $ac_status); } &&
19941          { ac_try='test -s conftest.$ac_objext'
19942   { (eval echo "$as_me:19942: \"$ac_try\"") >&5
19943   (eval $ac_try) 2>&5
19944   ac_status=$?
19945   echo "$as_me:19945: \$? = $ac_status" >&5
19946   (exit $ac_status); }; }; then
19947   :
19948 else
19949   echo "$as_me: failed program was:" >&5
19950 cat conftest.$ac_ext >&5
19951 cf_have_incdir=yes
19952 fi
19953 rm -f conftest.$ac_objext conftest.$ac_ext
19954                           CPPFLAGS=$cf_save_CPPFLAGS
19955                         fi
19956                   fi
19957                 fi
19958
19959                 if test "$cf_have_incdir" = no ; then
19960                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19961
19962 echo "${as_me:-configure}:19962: testing adding $cf_add_incdir to include-path ..." 1>&5
19963
19964                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19965
19966                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19967                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19968                   cf_add_incdir="$cf_top_incdir"
19969                 else
19970                   break
19971                 fi
19972           else
19973                 break
19974           fi
19975         done
19976   done
19977 fi
19978
19979 if test -n "$with_hashed_db/lib" ; then
19980         for cf_add_libdir in $with_hashed_db/lib
19981         do
19982                 if test $cf_add_libdir = /usr/lib ; then
19983                         :
19984                 elif test -d $cf_add_libdir
19985                 then
19986                         cf_have_libdir=no
19987                         if test -n "$LDFLAGS$LIBS" ; then
19988                                 # a loop is needed to ensure we can add subdirs of existing dirs
19989                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19990                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19991                                                 cf_have_libdir=yes; break
19992                                         fi
19993                                 done
19994                         fi
19995                         if test "$cf_have_libdir" = no ; then
19996                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19997
19998 echo "${as_me:-configure}:19998: testing adding $cf_add_libdir to library-path ..." 1>&5
19999
20000                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20001                         fi
20002                 fi
20003         done
20004 fi
20005
20006         else
20007                 case "$with_hashed_db" in
20008                 (./*|../*|/*)
20009                         { echo "$as_me:20009: WARNING: no such directory $with_hashed_db" >&5
20010 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
20011                         ;;
20012                 (*)
20013
20014 cf_search=
20015
20016 test "x$prefix" != "xNONE" && \
20017 test -d "$prefix" && \
20018  {
20019         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
20020         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
20021         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
20022         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
20023         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
20024         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
20025 }
20026
20027 for cf_subdir_prefix in \
20028         /usr \
20029         /usr/local \
20030         /usr/pkg \
20031         /opt \
20032         /opt/local \
20033         $HOME
20034 do
20035
20036 test "x$cf_subdir_prefix" != "x$prefix" && \
20037 test -d "$cf_subdir_prefix" && \
20038 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20039         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
20040         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
20041         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
20042         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
20043         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
20044         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"
20045 }
20046
20047 done
20048
20049         for cf_item in $cf_search
20050         do
20051                 case $cf_item in
20052                 (*/$with_hashed_db)
20053
20054 if test -n "$cf_item" ; then
20055   for cf_add_incdir in $cf_item
20056   do
20057         while test $cf_add_incdir != /usr/include
20058         do
20059           if test -d $cf_add_incdir
20060           then
20061                 cf_have_incdir=no
20062                 if test -n "$CFLAGS$CPPFLAGS" ; then
20063                   # a loop is needed to ensure we can add subdirs of existing dirs
20064                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20065                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20066                           cf_have_incdir=yes; break
20067                         fi
20068                   done
20069                 fi
20070
20071                 if test "$cf_have_incdir" = no ; then
20072                   if test "$cf_add_incdir" = /usr/local/include ; then
20073                         if test "$GCC" = yes
20074                         then
20075                           cf_save_CPPFLAGS=$CPPFLAGS
20076                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20077                           cat >conftest.$ac_ext <<_ACEOF
20078 #line 20078 "configure"
20079 #include "confdefs.h"
20080 #include <stdio.h>
20081 int
20082 main (void)
20083 {
20084 printf("Hello")
20085   ;
20086   return 0;
20087 }
20088 _ACEOF
20089 rm -f conftest.$ac_objext
20090 if { (eval echo "$as_me:20090: \"$ac_compile\"") >&5
20091   (eval $ac_compile) 2>&5
20092   ac_status=$?
20093   echo "$as_me:20093: \$? = $ac_status" >&5
20094   (exit $ac_status); } &&
20095          { ac_try='test -s conftest.$ac_objext'
20096   { (eval echo "$as_me:20096: \"$ac_try\"") >&5
20097   (eval $ac_try) 2>&5
20098   ac_status=$?
20099   echo "$as_me:20099: \$? = $ac_status" >&5
20100   (exit $ac_status); }; }; then
20101   :
20102 else
20103   echo "$as_me: failed program was:" >&5
20104 cat conftest.$ac_ext >&5
20105 cf_have_incdir=yes
20106 fi
20107 rm -f conftest.$ac_objext conftest.$ac_ext
20108                           CPPFLAGS=$cf_save_CPPFLAGS
20109                         fi
20110                   fi
20111                 fi
20112
20113                 if test "$cf_have_incdir" = no ; then
20114                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20115
20116 echo "${as_me:-configure}:20116: testing adding $cf_add_incdir to include-path ..." 1>&5
20117
20118                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20119
20120                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20121                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20122                   cf_add_incdir="$cf_top_incdir"
20123                 else
20124                   break
20125                 fi
20126           else
20127                 break
20128           fi
20129         done
20130   done
20131 fi
20132
20133                         ;;
20134                 esac
20135         done
20136
20137 cf_search=
20138
20139 test "x$prefix" != "xNONE" && \
20140 test -d "$prefix" && \
20141  {
20142         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
20143         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
20144         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
20145         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
20146         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
20147         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
20148 }
20149
20150 for cf_subdir_prefix in \
20151         /usr \
20152         /usr/local \
20153         /usr/pkg \
20154         /opt \
20155         /opt/local \
20156         $HOME
20157 do
20158
20159 test "x$cf_subdir_prefix" != "x$prefix" && \
20160 test -d "$cf_subdir_prefix" && \
20161 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20162         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
20163         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20164         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
20165         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
20166         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
20167         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"
20168 }
20169
20170 done
20171
20172         for cf_item in $cf_search
20173         do
20174                 case $cf_item in
20175                 (*/$with_hashed_db)
20176
20177 if test -n "$cf_item" ; then
20178         for cf_add_libdir in $cf_item
20179         do
20180                 if test $cf_add_libdir = /usr/lib ; then
20181                         :
20182                 elif test -d $cf_add_libdir
20183                 then
20184                         cf_have_libdir=no
20185                         if test -n "$LDFLAGS$LIBS" ; then
20186                                 # a loop is needed to ensure we can add subdirs of existing dirs
20187                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20188                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20189                                                 cf_have_libdir=yes; break
20190                                         fi
20191                                 done
20192                         fi
20193                         if test "$cf_have_libdir" = no ; then
20194                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20195
20196 echo "${as_me:-configure}:20196: testing adding $cf_add_libdir to library-path ..." 1>&5
20197
20198                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20199                         fi
20200                 fi
20201         done
20202 fi
20203
20204                         ;;
20205                 esac
20206         done
20207
20208                         ;;
20209                 esac
20210         fi
20211 esac
20212
20213 echo "$as_me:20213: checking for db.h" >&5
20214 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
20215 if test "${ac_cv_header_db_h+set}" = set; then
20216   echo $ECHO_N "(cached) $ECHO_C" >&6
20217 else
20218   cat >conftest.$ac_ext <<_ACEOF
20219 #line 20219 "configure"
20220 #include "confdefs.h"
20221 #include <db.h>
20222 _ACEOF
20223 if { (eval echo "$as_me:20223: \"$ac_cpp conftest.$ac_ext\"") >&5
20224   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20225   ac_status=$?
20226   egrep -v '^ *\+' conftest.er1 >conftest.err
20227   rm -f conftest.er1
20228   cat conftest.err >&5
20229   echo "$as_me:20229: \$? = $ac_status" >&5
20230   (exit $ac_status); } >/dev/null; then
20231   if test -s conftest.err; then
20232     ac_cpp_err=$ac_c_preproc_warn_flag
20233   else
20234     ac_cpp_err=
20235   fi
20236 else
20237   ac_cpp_err=yes
20238 fi
20239 if test -z "$ac_cpp_err"; then
20240   ac_cv_header_db_h=yes
20241 else
20242   echo "$as_me: failed program was:" >&5
20243   cat conftest.$ac_ext >&5
20244   ac_cv_header_db_h=no
20245 fi
20246 rm -f conftest.err conftest.$ac_ext
20247 fi
20248 echo "$as_me:20248: result: $ac_cv_header_db_h" >&5
20249 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20250 if test $ac_cv_header_db_h = yes; then
20251
20252 echo "$as_me:20252: checking for version of db" >&5
20253 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20254 if test "${cf_cv_hashed_db_version+set}" = set; then
20255   echo $ECHO_N "(cached) $ECHO_C" >&6
20256 else
20257
20258 cf_cv_hashed_db_version=unknown
20259
20260 for cf_db_version in 1 2 3 4 5 6
20261 do
20262
20263 echo "${as_me:-configure}:20263: testing checking for db version $cf_db_version ..." 1>&5
20264
20265         cat >conftest.$ac_ext <<_ACEOF
20266 #line 20266 "configure"
20267 #include "confdefs.h"
20268
20269 $ac_includes_default
20270 #include <db.h>
20271
20272 #ifdef DB_VERSION_MAJOR
20273         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20274 #if $cf_db_version == DB_VERSION_MAJOR
20275         /* ok */
20276 #else
20277         make an error
20278 #endif
20279 #else
20280 #if $cf_db_version == 1
20281         /* ok: assuming this is DB 1.8.5 */
20282 #else
20283         make an error
20284 #endif
20285 #endif
20286
20287 int
20288 main (void)
20289 {
20290 DBT *foo = 0
20291   ;
20292   return 0;
20293 }
20294 _ACEOF
20295 rm -f conftest.$ac_objext
20296 if { (eval echo "$as_me:20296: \"$ac_compile\"") >&5
20297   (eval $ac_compile) 2>&5
20298   ac_status=$?
20299   echo "$as_me:20299: \$? = $ac_status" >&5
20300   (exit $ac_status); } &&
20301          { ac_try='test -s conftest.$ac_objext'
20302   { (eval echo "$as_me:20302: \"$ac_try\"") >&5
20303   (eval $ac_try) 2>&5
20304   ac_status=$?
20305   echo "$as_me:20305: \$? = $ac_status" >&5
20306   (exit $ac_status); }; }; then
20307
20308         cf_cv_hashed_db_version=$cf_db_version
20309         break
20310
20311 else
20312   echo "$as_me: failed program was:" >&5
20313 cat conftest.$ac_ext >&5
20314 fi
20315 rm -f conftest.$ac_objext conftest.$ac_ext
20316 done
20317
20318 fi
20319 echo "$as_me:20319: result: $cf_cv_hashed_db_version" >&5
20320 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20321
20322 if test "$cf_cv_hashed_db_version" = unknown ; then
20323         { { echo "$as_me:20323: error: Cannot determine version of db" >&5
20324 echo "$as_me: error: Cannot determine version of db" >&2;}
20325    { (exit 1); exit 1; }; }
20326 else
20327
20328 echo "$as_me:20328: checking for db libraries" >&5
20329 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20330 if test "${cf_cv_hashed_db_libs+set}" = set; then
20331   echo $ECHO_N "(cached) $ECHO_C" >&6
20332 else
20333
20334 cf_cv_hashed_db_libs=unknown
20335 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20336 do
20337         cf_save_libs="$LIBS"
20338         if test -n "$cf_db_libs"; then
20339
20340 cf_add_libs="-l$cf_db_libs"
20341 # Filter out duplicates - this happens with badly-designed ".pc" files...
20342 for cf_add_1lib in $LIBS
20343 do
20344         for cf_add_2lib in $cf_add_libs
20345         do
20346                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20347                 then
20348                         cf_add_1lib=
20349                         break
20350                 fi
20351         done
20352         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20353 done
20354 LIBS="$cf_add_libs"
20355
20356         fi
20357
20358 echo "${as_me:-configure}:20358: testing checking for library "$cf_db_libs" ..." 1>&5
20359
20360         cat >conftest.$ac_ext <<_ACEOF
20361 #line 20361 "configure"
20362 #include "confdefs.h"
20363
20364 $ac_includes_default
20365 #include <db.h>
20366
20367 int
20368 main (void)
20369 {
20370
20371         char *path = "/tmp/foo";
20372 #ifdef DB_VERSION_MAJOR
20373 #if DB_VERSION_MAJOR >= 4
20374         DB *result = 0;
20375         db_create(&result, NULL, 0);
20376         result->open(result,
20377                 NULL,
20378                 path,
20379                 path,
20380                 DB_HASH,
20381                 DB_CREATE,
20382                 0644);
20383 #elif DB_VERSION_MAJOR >= 3
20384         DB *result = 0;
20385         db_create(&result, NULL, 0);
20386         result->open(result,
20387                 path,
20388                 path,
20389                 DB_HASH,
20390                 DB_CREATE,
20391                 0644);
20392 #elif DB_VERSION_MAJOR >= 2
20393         DB *result = 0;
20394         db_open(path,
20395                 DB_HASH,
20396                 DB_CREATE,
20397                 0644,
20398                 (DB_ENV *) 0,
20399                 (DB_INFO *) 0,
20400                 &result);
20401 #endif /* DB_VERSION_MAJOR */
20402 #else
20403         DB *result = dbopen(path,
20404                      2,
20405                      0644,
20406                      DB_HASH,
20407                      0);
20408 #endif
20409         ${cf_cv_main_return:-return}(result != 0)
20410
20411   ;
20412   return 0;
20413 }
20414 _ACEOF
20415 rm -f conftest.$ac_objext conftest$ac_exeext
20416 if { (eval echo "$as_me:20416: \"$ac_link\"") >&5
20417   (eval $ac_link) 2>&5
20418   ac_status=$?
20419   echo "$as_me:20419: \$? = $ac_status" >&5
20420   (exit $ac_status); } &&
20421          { ac_try='test -s conftest$ac_exeext'
20422   { (eval echo "$as_me:20422: \"$ac_try\"") >&5
20423   (eval $ac_try) 2>&5
20424   ac_status=$?
20425   echo "$as_me:20425: \$? = $ac_status" >&5
20426   (exit $ac_status); }; }; then
20427
20428         if test -n "$cf_db_libs" ; then
20429                 cf_cv_hashed_db_libs=$cf_db_libs
20430         else
20431                 cf_cv_hashed_db_libs=default
20432         fi
20433         LIBS="$cf_save_libs"
20434         break
20435
20436 else
20437   echo "$as_me: failed program was:" >&5
20438 cat conftest.$ac_ext >&5
20439 fi
20440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20441         LIBS="$cf_save_libs"
20442 done
20443
20444 fi
20445 echo "$as_me:20445: result: $cf_cv_hashed_db_libs" >&5
20446 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20447
20448         if test "$cf_cv_hashed_db_libs" = unknown ; then
20449                 { { echo "$as_me:20449: error: Cannot determine library for db" >&5
20450 echo "$as_me: error: Cannot determine library for db" >&2;}
20451    { (exit 1); exit 1; }; }
20452         elif test "$cf_cv_hashed_db_libs" != default ; then
20453
20454 cf_add_libs="-l$cf_cv_hashed_db_libs"
20455 # Filter out duplicates - this happens with badly-designed ".pc" files...
20456 for cf_add_1lib in $LIBS
20457 do
20458         for cf_add_2lib in $cf_add_libs
20459         do
20460                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20461                 then
20462                         cf_add_1lib=
20463                         break
20464                 fi
20465         done
20466         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20467 done
20468 LIBS="$cf_add_libs"
20469
20470         fi
20471 fi
20472
20473 else
20474
20475         { { echo "$as_me:20475: error: Cannot find db.h" >&5
20476 echo "$as_me: error: Cannot find db.h" >&2;}
20477    { (exit 1); exit 1; }; }
20478
20479 fi
20480
20481 fi
20482
20483 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20484         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20485         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20486 fi
20487
20488 # Just in case, check if the C compiler has a bool type.
20489
20490 echo "$as_me:20490: checking if we should include stdbool.h" >&5
20491 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20492
20493 if test "${cf_cv_header_stdbool_h+set}" = set; then
20494   echo $ECHO_N "(cached) $ECHO_C" >&6
20495 else
20496
20497         cat >conftest.$ac_ext <<_ACEOF
20498 #line 20498 "configure"
20499 #include "confdefs.h"
20500
20501 int
20502 main (void)
20503 {
20504 bool foo = false
20505   ;
20506   return 0;
20507 }
20508 _ACEOF
20509 rm -f conftest.$ac_objext
20510 if { (eval echo "$as_me:20510: \"$ac_compile\"") >&5
20511   (eval $ac_compile) 2>&5
20512   ac_status=$?
20513   echo "$as_me:20513: \$? = $ac_status" >&5
20514   (exit $ac_status); } &&
20515          { ac_try='test -s conftest.$ac_objext'
20516   { (eval echo "$as_me:20516: \"$ac_try\"") >&5
20517   (eval $ac_try) 2>&5
20518   ac_status=$?
20519   echo "$as_me:20519: \$? = $ac_status" >&5
20520   (exit $ac_status); }; }; then
20521   cf_cv_header_stdbool_h=0
20522 else
20523   echo "$as_me: failed program was:" >&5
20524 cat conftest.$ac_ext >&5
20525 cat >conftest.$ac_ext <<_ACEOF
20526 #line 20526 "configure"
20527 #include "confdefs.h"
20528
20529 #ifndef __BEOS__
20530 #include <stdbool.h>
20531 #endif
20532
20533 int
20534 main (void)
20535 {
20536 bool foo = false
20537   ;
20538   return 0;
20539 }
20540 _ACEOF
20541 rm -f conftest.$ac_objext
20542 if { (eval echo "$as_me:20542: \"$ac_compile\"") >&5
20543   (eval $ac_compile) 2>&5
20544   ac_status=$?
20545   echo "$as_me:20545: \$? = $ac_status" >&5
20546   (exit $ac_status); } &&
20547          { ac_try='test -s conftest.$ac_objext'
20548   { (eval echo "$as_me:20548: \"$ac_try\"") >&5
20549   (eval $ac_try) 2>&5
20550   ac_status=$?
20551   echo "$as_me:20551: \$? = $ac_status" >&5
20552   (exit $ac_status); }; }; then
20553   cf_cv_header_stdbool_h=1
20554 else
20555   echo "$as_me: failed program was:" >&5
20556 cat conftest.$ac_ext >&5
20557 cf_cv_header_stdbool_h=0
20558 fi
20559 rm -f conftest.$ac_objext conftest.$ac_ext
20560 fi
20561 rm -f conftest.$ac_objext conftest.$ac_ext
20562 fi
20563
20564 if test "$cf_cv_header_stdbool_h" = 1
20565 then    echo "$as_me:20565: result: yes" >&5
20566 echo "${ECHO_T}yes" >&6
20567 else    echo "$as_me:20567: result: no" >&5
20568 echo "${ECHO_T}no" >&6
20569 fi
20570
20571 echo "$as_me:20571: checking for builtin bool type" >&5
20572 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20573
20574 if test "${cf_cv_cc_bool_type+set}" = set; then
20575   echo $ECHO_N "(cached) $ECHO_C" >&6
20576 else
20577
20578         cat >conftest.$ac_ext <<_ACEOF
20579 #line 20579 "configure"
20580 #include "confdefs.h"
20581
20582 #include <stdio.h>
20583 #include <sys/types.h>
20584
20585 int
20586 main (void)
20587 {
20588 bool x = false
20589   ;
20590   return 0;
20591 }
20592 _ACEOF
20593 rm -f conftest.$ac_objext
20594 if { (eval echo "$as_me:20594: \"$ac_compile\"") >&5
20595   (eval $ac_compile) 2>&5
20596   ac_status=$?
20597   echo "$as_me:20597: \$? = $ac_status" >&5
20598   (exit $ac_status); } &&
20599          { ac_try='test -s conftest.$ac_objext'
20600   { (eval echo "$as_me:20600: \"$ac_try\"") >&5
20601   (eval $ac_try) 2>&5
20602   ac_status=$?
20603   echo "$as_me:20603: \$? = $ac_status" >&5
20604   (exit $ac_status); }; }; then
20605   cf_cv_cc_bool_type=1
20606 else
20607   echo "$as_me: failed program was:" >&5
20608 cat conftest.$ac_ext >&5
20609 cf_cv_cc_bool_type=0
20610 fi
20611 rm -f conftest.$ac_objext conftest.$ac_ext
20612
20613 fi
20614
20615 if test "$cf_cv_cc_bool_type" = 1
20616 then    echo "$as_me:20616: result: yes" >&5
20617 echo "${ECHO_T}yes" >&6
20618 else    echo "$as_me:20618: result: no" >&5
20619 echo "${ECHO_T}no" >&6
20620 fi
20621
20622 # Check for C++ compiler characteristics (and ensure that it's there!)
20623 if test -n "$CXX" ; then
20624         ac_ext=cc
20625 ac_cpp='$CXXCPP $CPPFLAGS'
20626 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20627 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20628 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20629 ac_main_return=return
20630
20631 if test -n "$GXX" ; then
20632
20633         cf_save="$LIBS"
20634         LIBS="$LIBS $CXXLIBS"
20635         echo "$as_me:20635: checking if we already have C++ library" >&5
20636 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20637         cat >conftest.$ac_ext <<_ACEOF
20638 #line 20638 "configure"
20639 #include "confdefs.h"
20640
20641                         #include <iostream>
20642 int
20643 main (void)
20644 {
20645
20646                         std::cout << "Hello World!" << std::endl;
20647   ;
20648   return 0;
20649 }
20650 _ACEOF
20651 rm -f conftest.$ac_objext conftest$ac_exeext
20652 if { (eval echo "$as_me:20652: \"$ac_link\"") >&5
20653   (eval $ac_link) 2>&5
20654   ac_status=$?
20655   echo "$as_me:20655: \$? = $ac_status" >&5
20656   (exit $ac_status); } &&
20657          { ac_try='test -s conftest$ac_exeext'
20658   { (eval echo "$as_me:20658: \"$ac_try\"") >&5
20659   (eval $ac_try) 2>&5
20660   ac_status=$?
20661   echo "$as_me:20661: \$? = $ac_status" >&5
20662   (exit $ac_status); }; }; then
20663   cf_have_libstdcpp=yes
20664 else
20665   echo "$as_me: failed program was:" >&5
20666 cat conftest.$ac_ext >&5
20667 cf_have_libstdcpp=no
20668 fi
20669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20670         echo "$as_me:20670: result: $cf_have_libstdcpp" >&5
20671 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20672         LIBS="$cf_save"
20673
20674         if test $cf_have_libstdcpp != yes
20675         then
20676                 case $cf_cv_system_name in
20677                 (os2*)
20678                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20679                                 cf_stdcpp_libname=stdcpp
20680                         else
20681                                 cf_stdcpp_libname=stdc++
20682                         fi
20683                         ;;
20684                 (*)
20685                         cf_stdcpp_libname=stdc++
20686                         ;;
20687                 esac
20688
20689                 echo "$as_me:20689: checking for library $cf_stdcpp_libname" >&5
20690 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20691 if test "${cf_cv_libstdcpp+set}" = set; then
20692   echo $ECHO_N "(cached) $ECHO_C" >&6
20693 else
20694
20695                         cf_save="$LIBS"
20696                         LIBS="$LIBS $CXXLIBS"
20697
20698 cf_add_libs="-l$cf_stdcpp_libname"
20699 # Filter out duplicates - this happens with badly-designed ".pc" files...
20700 for cf_add_1lib in $LIBS
20701 do
20702         for cf_add_2lib in $cf_add_libs
20703         do
20704                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20705                 then
20706                         cf_add_1lib=
20707                         break
20708                 fi
20709         done
20710         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20711 done
20712 LIBS="$cf_add_libs"
20713
20714                 cat >conftest.$ac_ext <<_ACEOF
20715 #line 20715 "configure"
20716 #include "confdefs.h"
20717
20718                                 #include <iostream>
20719 int
20720 main (void)
20721 {
20722
20723                                 std::cout << "Hello World!" << std::endl;
20724   ;
20725   return 0;
20726 }
20727 _ACEOF
20728 rm -f conftest.$ac_objext conftest$ac_exeext
20729 if { (eval echo "$as_me:20729: \"$ac_link\"") >&5
20730   (eval $ac_link) 2>&5
20731   ac_status=$?
20732   echo "$as_me:20732: \$? = $ac_status" >&5
20733   (exit $ac_status); } &&
20734          { ac_try='test -s conftest$ac_exeext'
20735   { (eval echo "$as_me:20735: \"$ac_try\"") >&5
20736   (eval $ac_try) 2>&5
20737   ac_status=$?
20738   echo "$as_me:20738: \$? = $ac_status" >&5
20739   (exit $ac_status); }; }; then
20740   cf_cv_libstdcpp=yes
20741 else
20742   echo "$as_me: failed program was:" >&5
20743 cat conftest.$ac_ext >&5
20744 cf_cv_libstdcpp=no
20745 fi
20746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20747                         LIBS="$cf_save"
20748
20749 fi
20750 echo "$as_me:20750: result: $cf_cv_libstdcpp" >&5
20751 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20752                 test "$cf_cv_libstdcpp" = yes && {
20753 cf_add_libs="-l$cf_stdcpp_libname"
20754 # Filter out duplicates - this happens with badly-designed ".pc" files...
20755 for cf_add_1lib in $CXXLIBS
20756 do
20757         for cf_add_2lib in $cf_add_libs
20758         do
20759                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20760                 then
20761                         cf_add_1lib=
20762                         break
20763                 fi
20764         done
20765         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20766 done
20767 CXXLIBS="$cf_add_libs"
20768  }
20769         fi
20770 fi
20771
20772         echo "$as_me:20772: checking whether $CXX understands -c and -o together" >&5
20773 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20774 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20775   echo $ECHO_N "(cached) $ECHO_C" >&6
20776 else
20777
20778 cat > conftest.$ac_ext <<CF_EOF
20779 int main(void)
20780 {
20781         ${cf_cv_main_return:-return}(0);
20782 }
20783 CF_EOF
20784 # We do the test twice because some compilers refuse to overwrite an
20785 # existing .o file with -o, though they will create one.
20786 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20787 if { (eval echo "$as_me:20787: \"$ac_try\"") >&5
20788   (eval $ac_try) 2>&5
20789   ac_status=$?
20790   echo "$as_me:20790: \$? = $ac_status" >&5
20791   (exit $ac_status); } &&
20792   test -f conftest2.$ac_objext && { (eval echo "$as_me:20792: \"$ac_try\"") >&5
20793   (eval $ac_try) 2>&5
20794   ac_status=$?
20795   echo "$as_me:20795: \$? = $ac_status" >&5
20796   (exit $ac_status); };
20797 then
20798   eval cf_cv_prog_CXX_c_o=yes
20799 else
20800   eval cf_cv_prog_CXX_c_o=no
20801 fi
20802 rm -rf conftest*
20803
20804 fi
20805 if test $cf_cv_prog_CXX_c_o = yes; then
20806   echo "$as_me:20806: result: yes" >&5
20807 echo "${ECHO_T}yes" >&6
20808 else
20809   echo "$as_me:20809: result: no" >&5
20810 echo "${ECHO_T}no" >&6
20811 fi
20812
20813         case $GXX_VERSION in
20814         (1*|2.0-6*)
20815                 cf_cxx_library=yes
20816                 ;;
20817         (*-2.7*|2.7*)
20818
20819 cf_cxx_library=unknown
20820 case $cf_cv_system_name in
20821 (os2*)
20822         cf_gpp_libname=gpp
20823         ;;
20824 (*)
20825         cf_gpp_libname=g++
20826         ;;
20827 esac
20828 if test "$GXX" = yes; then
20829         echo "$as_me:20829: checking for lib$cf_gpp_libname" >&5
20830 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20831         cf_save="$LIBS"
20832
20833 cf_add_libs="-l$cf_gpp_libname"
20834 # Filter out duplicates - this happens with badly-designed ".pc" files...
20835 for cf_add_1lib in $LIBS
20836 do
20837         for cf_add_2lib in $cf_add_libs
20838         do
20839                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20840                 then
20841                         cf_add_1lib=
20842                         break
20843                 fi
20844         done
20845         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20846 done
20847 LIBS="$cf_add_libs"
20848
20849         cat >conftest.$ac_ext <<_ACEOF
20850 #line 20850 "configure"
20851 #include "confdefs.h"
20852
20853 #include <$cf_gpp_libname/builtin.h>
20854
20855 int
20856 main (void)
20857 {
20858 two_arg_error_handler_t foo2 = lib_error_handler
20859   ;
20860   return 0;
20861 }
20862 _ACEOF
20863 rm -f conftest.$ac_objext conftest$ac_exeext
20864 if { (eval echo "$as_me:20864: \"$ac_link\"") >&5
20865   (eval $ac_link) 2>&5
20866   ac_status=$?
20867   echo "$as_me:20867: \$? = $ac_status" >&5
20868   (exit $ac_status); } &&
20869          { ac_try='test -s conftest$ac_exeext'
20870   { (eval echo "$as_me:20870: \"$ac_try\"") >&5
20871   (eval $ac_try) 2>&5
20872   ac_status=$?
20873   echo "$as_me:20873: \$? = $ac_status" >&5
20874   (exit $ac_status); }; }; then
20875   cf_cxx_library=yes
20876
20877 cf_add_libs="-l$cf_gpp_libname"
20878 # Filter out duplicates - this happens with badly-designed ".pc" files...
20879 for cf_add_1lib in $CXXLIBS
20880 do
20881         for cf_add_2lib in $cf_add_libs
20882         do
20883                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20884                 then
20885                         cf_add_1lib=
20886                         break
20887                 fi
20888         done
20889         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20890 done
20891 CXXLIBS="$cf_add_libs"
20892
20893          if test "$cf_gpp_libname" = cpp ; then
20894
20895 cat >>confdefs.h <<\EOF
20896 #define HAVE_GPP_BUILTIN_H 1
20897 EOF
20898
20899          else
20900
20901 cat >>confdefs.h <<\EOF
20902 #define HAVE_GXX_BUILTIN_H 1
20903 EOF
20904
20905          fi
20906 else
20907   echo "$as_me: failed program was:" >&5
20908 cat conftest.$ac_ext >&5
20909 cat >conftest.$ac_ext <<_ACEOF
20910 #line 20910 "configure"
20911 #include "confdefs.h"
20912
20913 #include <builtin.h>
20914
20915 int
20916 main (void)
20917 {
20918 two_arg_error_handler_t foo2 = lib_error_handler
20919   ;
20920   return 0;
20921 }
20922 _ACEOF
20923 rm -f conftest.$ac_objext conftest$ac_exeext
20924 if { (eval echo "$as_me:20924: \"$ac_link\"") >&5
20925   (eval $ac_link) 2>&5
20926   ac_status=$?
20927   echo "$as_me:20927: \$? = $ac_status" >&5
20928   (exit $ac_status); } &&
20929          { ac_try='test -s conftest$ac_exeext'
20930   { (eval echo "$as_me:20930: \"$ac_try\"") >&5
20931   (eval $ac_try) 2>&5
20932   ac_status=$?
20933   echo "$as_me:20933: \$? = $ac_status" >&5
20934   (exit $ac_status); }; }; then
20935   cf_cxx_library=yes
20936
20937 cf_add_libs="-l$cf_gpp_libname"
20938 # Filter out duplicates - this happens with badly-designed ".pc" files...
20939 for cf_add_1lib in $CXXLIBS
20940 do
20941         for cf_add_2lib in $cf_add_libs
20942         do
20943                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20944                 then
20945                         cf_add_1lib=
20946                         break
20947                 fi
20948         done
20949         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20950 done
20951 CXXLIBS="$cf_add_libs"
20952
20953 cat >>confdefs.h <<\EOF
20954 #define HAVE_BUILTIN_H 1
20955 EOF
20956
20957 else
20958   echo "$as_me: failed program was:" >&5
20959 cat conftest.$ac_ext >&5
20960 cf_cxx_library=no
20961 fi
20962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20963 fi
20964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20965         LIBS="$cf_save"
20966         echo "$as_me:20966: result: $cf_cxx_library" >&5
20967 echo "${ECHO_T}$cf_cxx_library" >&6
20968 fi
20969
20970                 ;;
20971         (*)
20972                 cf_cxx_library=no
20973                 ;;
20974         esac
20975
20976         ac_ext=cc
20977 ac_cpp='$CXXCPP $CPPFLAGS'
20978 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20979 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20980 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20981 ac_main_return=return
20982 echo "$as_me:20982: checking how to run the C++ preprocessor" >&5
20983 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20984 if test -z "$CXXCPP"; then
20985   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20986   echo $ECHO_N "(cached) $ECHO_C" >&6
20987 else
20988       # Double quotes because CXXCPP needs to be expanded
20989     for CXXCPP in "$CXX -E" "/lib/cpp"
20990     do
20991       ac_preproc_ok=false
20992 for ac_cxx_preproc_warn_flag in '' yes
20993 do
20994   # Use a header file that comes with gcc, so configuring glibc
20995   # with a fresh cross-compiler works.
20996   # On the NeXT, cc -E runs the code through the compiler's parser,
20997   # not just through cpp. "Syntax error" is here to catch this case.
20998   cat >conftest.$ac_ext <<_ACEOF
20999 #line 20999 "configure"
21000 #include "confdefs.h"
21001 #include <assert.h>
21002                      Syntax error
21003 _ACEOF
21004 if { (eval echo "$as_me:21004: \"$ac_cpp conftest.$ac_ext\"") >&5
21005   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21006   ac_status=$?
21007   egrep -v '^ *\+' conftest.er1 >conftest.err
21008   rm -f conftest.er1
21009   cat conftest.err >&5
21010   echo "$as_me:21010: \$? = $ac_status" >&5
21011   (exit $ac_status); } >/dev/null; then
21012   if test -s conftest.err; then
21013     ac_cpp_err=$ac_cxx_preproc_warn_flag
21014   else
21015     ac_cpp_err=
21016   fi
21017 else
21018   ac_cpp_err=yes
21019 fi
21020 if test -z "$ac_cpp_err"; then
21021   :
21022 else
21023   echo "$as_me: failed program was:" >&5
21024   cat conftest.$ac_ext >&5
21025   # Broken: fails on valid input.
21026 continue
21027 fi
21028 rm -f conftest.err conftest.$ac_ext
21029
21030   # OK, works on sane cases.  Now check whether non-existent headers
21031   # can be detected and how.
21032   cat >conftest.$ac_ext <<_ACEOF
21033 #line 21033 "configure"
21034 #include "confdefs.h"
21035 #include <ac_nonexistent.h>
21036 _ACEOF
21037 if { (eval echo "$as_me:21037: \"$ac_cpp conftest.$ac_ext\"") >&5
21038   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21039   ac_status=$?
21040   egrep -v '^ *\+' conftest.er1 >conftest.err
21041   rm -f conftest.er1
21042   cat conftest.err >&5
21043   echo "$as_me:21043: \$? = $ac_status" >&5
21044   (exit $ac_status); } >/dev/null; then
21045   if test -s conftest.err; then
21046     ac_cpp_err=$ac_cxx_preproc_warn_flag
21047   else
21048     ac_cpp_err=
21049   fi
21050 else
21051   ac_cpp_err=yes
21052 fi
21053 if test -z "$ac_cpp_err"; then
21054   # Broken: success on invalid input.
21055 continue
21056 else
21057   echo "$as_me: failed program was:" >&5
21058   cat conftest.$ac_ext >&5
21059   # Passes both tests.
21060 ac_preproc_ok=:
21061 break
21062 fi
21063 rm -f conftest.err conftest.$ac_ext
21064
21065 done
21066 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21067 rm -f conftest.err conftest.$ac_ext
21068 if $ac_preproc_ok; then
21069   break
21070 fi
21071
21072     done
21073     ac_cv_prog_CXXCPP=$CXXCPP
21074
21075 fi
21076   CXXCPP=$ac_cv_prog_CXXCPP
21077 else
21078   ac_cv_prog_CXXCPP=$CXXCPP
21079 fi
21080 echo "$as_me:21080: result: $CXXCPP" >&5
21081 echo "${ECHO_T}$CXXCPP" >&6
21082 ac_preproc_ok=false
21083 for ac_cxx_preproc_warn_flag in '' yes
21084 do
21085   # Use a header file that comes with gcc, so configuring glibc
21086   # with a fresh cross-compiler works.
21087   # On the NeXT, cc -E runs the code through the compiler's parser,
21088   # not just through cpp. "Syntax error" is here to catch this case.
21089   cat >conftest.$ac_ext <<_ACEOF
21090 #line 21090 "configure"
21091 #include "confdefs.h"
21092 #include <assert.h>
21093                      Syntax error
21094 _ACEOF
21095 if { (eval echo "$as_me:21095: \"$ac_cpp conftest.$ac_ext\"") >&5
21096   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21097   ac_status=$?
21098   egrep -v '^ *\+' conftest.er1 >conftest.err
21099   rm -f conftest.er1
21100   cat conftest.err >&5
21101   echo "$as_me:21101: \$? = $ac_status" >&5
21102   (exit $ac_status); } >/dev/null; then
21103   if test -s conftest.err; then
21104     ac_cpp_err=$ac_cxx_preproc_warn_flag
21105   else
21106     ac_cpp_err=
21107   fi
21108 else
21109   ac_cpp_err=yes
21110 fi
21111 if test -z "$ac_cpp_err"; then
21112   :
21113 else
21114   echo "$as_me: failed program was:" >&5
21115   cat conftest.$ac_ext >&5
21116   # Broken: fails on valid input.
21117 continue
21118 fi
21119 rm -f conftest.err conftest.$ac_ext
21120
21121   # OK, works on sane cases.  Now check whether non-existent headers
21122   # can be detected and how.
21123   cat >conftest.$ac_ext <<_ACEOF
21124 #line 21124 "configure"
21125 #include "confdefs.h"
21126 #include <ac_nonexistent.h>
21127 _ACEOF
21128 if { (eval echo "$as_me:21128: \"$ac_cpp conftest.$ac_ext\"") >&5
21129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21130   ac_status=$?
21131   egrep -v '^ *\+' conftest.er1 >conftest.err
21132   rm -f conftest.er1
21133   cat conftest.err >&5
21134   echo "$as_me:21134: \$? = $ac_status" >&5
21135   (exit $ac_status); } >/dev/null; then
21136   if test -s conftest.err; then
21137     ac_cpp_err=$ac_cxx_preproc_warn_flag
21138   else
21139     ac_cpp_err=
21140   fi
21141 else
21142   ac_cpp_err=yes
21143 fi
21144 if test -z "$ac_cpp_err"; then
21145   # Broken: success on invalid input.
21146 continue
21147 else
21148   echo "$as_me: failed program was:" >&5
21149   cat conftest.$ac_ext >&5
21150   # Passes both tests.
21151 ac_preproc_ok=:
21152 break
21153 fi
21154 rm -f conftest.err conftest.$ac_ext
21155
21156 done
21157 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21158 rm -f conftest.err conftest.$ac_ext
21159 if $ac_preproc_ok; then
21160   :
21161 else
21162   { { echo "$as_me:21162: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
21163 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
21164    { (exit 1); exit 1; }; }
21165 fi
21166
21167 ac_ext=cc
21168 ac_cpp='$CXXCPP $CPPFLAGS'
21169 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21170 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21171 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21172 ac_main_return=return
21173
21174 for ac_header in typeinfo
21175 do
21176 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21177 echo "$as_me:21177: checking for $ac_header" >&5
21178 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21179 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21180   echo $ECHO_N "(cached) $ECHO_C" >&6
21181 else
21182   cat >conftest.$ac_ext <<_ACEOF
21183 #line 21183 "configure"
21184 #include "confdefs.h"
21185 #include <$ac_header>
21186 _ACEOF
21187 if { (eval echo "$as_me:21187: \"$ac_cpp conftest.$ac_ext\"") >&5
21188   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21189   ac_status=$?
21190   egrep -v '^ *\+' conftest.er1 >conftest.err
21191   rm -f conftest.er1
21192   cat conftest.err >&5
21193   echo "$as_me:21193: \$? = $ac_status" >&5
21194   (exit $ac_status); } >/dev/null; then
21195   if test -s conftest.err; then
21196     ac_cpp_err=$ac_cxx_preproc_warn_flag
21197   else
21198     ac_cpp_err=
21199   fi
21200 else
21201   ac_cpp_err=yes
21202 fi
21203 if test -z "$ac_cpp_err"; then
21204   eval "$as_ac_Header=yes"
21205 else
21206   echo "$as_me: failed program was:" >&5
21207   cat conftest.$ac_ext >&5
21208   eval "$as_ac_Header=no"
21209 fi
21210 rm -f conftest.err conftest.$ac_ext
21211 fi
21212 echo "$as_me:21212: result: `eval echo '${'$as_ac_Header'}'`" >&5
21213 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21214 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21215   cat >>confdefs.h <<EOF
21216 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21217 EOF
21218
21219 fi
21220 done
21221
21222 for ac_header in iostream
21223 do
21224 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21225 echo "$as_me:21225: checking for $ac_header" >&5
21226 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21227 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21228   echo $ECHO_N "(cached) $ECHO_C" >&6
21229 else
21230   cat >conftest.$ac_ext <<_ACEOF
21231 #line 21231 "configure"
21232 #include "confdefs.h"
21233 #include <$ac_header>
21234 _ACEOF
21235 if { (eval echo "$as_me:21235: \"$ac_cpp conftest.$ac_ext\"") >&5
21236   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21237   ac_status=$?
21238   egrep -v '^ *\+' conftest.er1 >conftest.err
21239   rm -f conftest.er1
21240   cat conftest.err >&5
21241   echo "$as_me:21241: \$? = $ac_status" >&5
21242   (exit $ac_status); } >/dev/null; then
21243   if test -s conftest.err; then
21244     ac_cpp_err=$ac_cxx_preproc_warn_flag
21245   else
21246     ac_cpp_err=
21247   fi
21248 else
21249   ac_cpp_err=yes
21250 fi
21251 if test -z "$ac_cpp_err"; then
21252   eval "$as_ac_Header=yes"
21253 else
21254   echo "$as_me: failed program was:" >&5
21255   cat conftest.$ac_ext >&5
21256   eval "$as_ac_Header=no"
21257 fi
21258 rm -f conftest.err conftest.$ac_ext
21259 fi
21260 echo "$as_me:21260: result: `eval echo '${'$as_ac_Header'}'`" >&5
21261 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21262 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21263   cat >>confdefs.h <<EOF
21264 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21265 EOF
21266
21267 fi
21268 done
21269
21270 if test x"$ac_cv_header_iostream" = xyes ; then
21271         echo "$as_me:21271: checking if iostream uses std-namespace" >&5
21272 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21273         cat >conftest.$ac_ext <<_ACEOF
21274 #line 21274 "configure"
21275 #include "confdefs.h"
21276
21277 #include <iostream>
21278 using std::endl;
21279 using std::cerr;
21280 int
21281 main (void)
21282 {
21283
21284 cerr << "testing" << endl;
21285
21286   ;
21287   return 0;
21288 }
21289 _ACEOF
21290 rm -f conftest.$ac_objext
21291 if { (eval echo "$as_me:21291: \"$ac_compile\"") >&5
21292   (eval $ac_compile) 2>&5
21293   ac_status=$?
21294   echo "$as_me:21294: \$? = $ac_status" >&5
21295   (exit $ac_status); } &&
21296          { ac_try='test -s conftest.$ac_objext'
21297   { (eval echo "$as_me:21297: \"$ac_try\"") >&5
21298   (eval $ac_try) 2>&5
21299   ac_status=$?
21300   echo "$as_me:21300: \$? = $ac_status" >&5
21301   (exit $ac_status); }; }; then
21302   cf_iostream_namespace=yes
21303 else
21304   echo "$as_me: failed program was:" >&5
21305 cat conftest.$ac_ext >&5
21306 cf_iostream_namespace=no
21307 fi
21308 rm -f conftest.$ac_objext conftest.$ac_ext
21309         echo "$as_me:21309: result: $cf_iostream_namespace" >&5
21310 echo "${ECHO_T}$cf_iostream_namespace" >&6
21311         if test "$cf_iostream_namespace" = yes ; then
21312
21313 cat >>confdefs.h <<\EOF
21314 #define IOSTREAM_NAMESPACE 1
21315 EOF
21316
21317         fi
21318 fi
21319
21320 echo "$as_me:21320: checking if we should include stdbool.h" >&5
21321 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21322
21323 if test "${cf_cv_header_stdbool_h+set}" = set; then
21324   echo $ECHO_N "(cached) $ECHO_C" >&6
21325 else
21326
21327         cat >conftest.$ac_ext <<_ACEOF
21328 #line 21328 "configure"
21329 #include "confdefs.h"
21330
21331 int
21332 main (void)
21333 {
21334 bool foo = false
21335   ;
21336   return 0;
21337 }
21338 _ACEOF
21339 rm -f conftest.$ac_objext
21340 if { (eval echo "$as_me:21340: \"$ac_compile\"") >&5
21341   (eval $ac_compile) 2>&5
21342   ac_status=$?
21343   echo "$as_me:21343: \$? = $ac_status" >&5
21344   (exit $ac_status); } &&
21345          { ac_try='test -s conftest.$ac_objext'
21346   { (eval echo "$as_me:21346: \"$ac_try\"") >&5
21347   (eval $ac_try) 2>&5
21348   ac_status=$?
21349   echo "$as_me:21349: \$? = $ac_status" >&5
21350   (exit $ac_status); }; }; then
21351   cf_cv_header_stdbool_h=0
21352 else
21353   echo "$as_me: failed program was:" >&5
21354 cat conftest.$ac_ext >&5
21355 cat >conftest.$ac_ext <<_ACEOF
21356 #line 21356 "configure"
21357 #include "confdefs.h"
21358
21359 #ifndef __BEOS__
21360 #include <stdbool.h>
21361 #endif
21362
21363 int
21364 main (void)
21365 {
21366 bool foo = false
21367   ;
21368   return 0;
21369 }
21370 _ACEOF
21371 rm -f conftest.$ac_objext
21372 if { (eval echo "$as_me:21372: \"$ac_compile\"") >&5
21373   (eval $ac_compile) 2>&5
21374   ac_status=$?
21375   echo "$as_me:21375: \$? = $ac_status" >&5
21376   (exit $ac_status); } &&
21377          { ac_try='test -s conftest.$ac_objext'
21378   { (eval echo "$as_me:21378: \"$ac_try\"") >&5
21379   (eval $ac_try) 2>&5
21380   ac_status=$?
21381   echo "$as_me:21381: \$? = $ac_status" >&5
21382   (exit $ac_status); }; }; then
21383   cf_cv_header_stdbool_h=1
21384 else
21385   echo "$as_me: failed program was:" >&5
21386 cat conftest.$ac_ext >&5
21387 cf_cv_header_stdbool_h=0
21388 fi
21389 rm -f conftest.$ac_objext conftest.$ac_ext
21390 fi
21391 rm -f conftest.$ac_objext conftest.$ac_ext
21392 fi
21393
21394 if test "$cf_cv_header_stdbool_h" = 1
21395 then    echo "$as_me:21395: result: yes" >&5
21396 echo "${ECHO_T}yes" >&6
21397 else    echo "$as_me:21397: result: no" >&5
21398 echo "${ECHO_T}no" >&6
21399 fi
21400
21401 echo "$as_me:21401: checking for builtin bool type" >&5
21402 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21403
21404 if test "${cf_cv_builtin_bool+set}" = set; then
21405   echo $ECHO_N "(cached) $ECHO_C" >&6
21406 else
21407
21408         cat >conftest.$ac_ext <<_ACEOF
21409 #line 21409 "configure"
21410 #include "confdefs.h"
21411
21412 #include <stdio.h>
21413 #include <sys/types.h>
21414
21415 int
21416 main (void)
21417 {
21418 bool x = false
21419   ;
21420   return 0;
21421 }
21422 _ACEOF
21423 rm -f conftest.$ac_objext
21424 if { (eval echo "$as_me:21424: \"$ac_compile\"") >&5
21425   (eval $ac_compile) 2>&5
21426   ac_status=$?
21427   echo "$as_me:21427: \$? = $ac_status" >&5
21428   (exit $ac_status); } &&
21429          { ac_try='test -s conftest.$ac_objext'
21430   { (eval echo "$as_me:21430: \"$ac_try\"") >&5
21431   (eval $ac_try) 2>&5
21432   ac_status=$?
21433   echo "$as_me:21433: \$? = $ac_status" >&5
21434   (exit $ac_status); }; }; then
21435   cf_cv_builtin_bool=1
21436 else
21437   echo "$as_me: failed program was:" >&5
21438 cat conftest.$ac_ext >&5
21439 cf_cv_builtin_bool=0
21440 fi
21441 rm -f conftest.$ac_objext conftest.$ac_ext
21442
21443 fi
21444
21445 if test "$cf_cv_builtin_bool" = 1
21446 then    echo "$as_me:21446: result: yes" >&5
21447 echo "${ECHO_T}yes" >&6
21448 else    echo "$as_me:21448: result: no" >&5
21449 echo "${ECHO_T}no" >&6
21450 fi
21451
21452 echo "$as_me:21452: checking for size of bool" >&5
21453 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21454 if test "${cf_cv_type_of_bool+set}" = set; then
21455   echo $ECHO_N "(cached) $ECHO_C" >&6
21456 else
21457
21458         rm -f cf_test.out
21459         if test "$cross_compiling" = yes; then
21460   cf_cv_type_of_bool=unknown
21461 else
21462   cat >conftest.$ac_ext <<_ACEOF
21463 #line 21463 "configure"
21464 #include "confdefs.h"
21465
21466 #include <stdlib.h>
21467 #include <stdio.h>
21468
21469 #if defined(__cplusplus)
21470
21471 #ifdef HAVE_GXX_BUILTIN_H
21472 #include <g++/builtin.h>
21473 #elif HAVE_GPP_BUILTIN_H
21474 #include <gpp/builtin.h>
21475 #elif HAVE_BUILTIN_H
21476 #include <builtin.h>
21477 #endif
21478
21479 #else
21480
21481 #if $cf_cv_header_stdbool_h
21482 #include <stdbool.h>
21483 #endif
21484
21485 #endif
21486
21487 int main(void)
21488 {
21489         FILE *fp = fopen("cf_test.out", "w");
21490         if (fp != 0) {
21491                 bool x = true;
21492                 if ((bool)(-x) >= 0)
21493                         fputs("unsigned ", fp);
21494                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21495                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21496                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21497                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21498                 fclose(fp);
21499         }
21500         ${cf_cv_main_return:-return}(0);
21501 }
21502
21503 _ACEOF
21504 rm -f conftest$ac_exeext
21505 if { (eval echo "$as_me:21505: \"$ac_link\"") >&5
21506   (eval $ac_link) 2>&5
21507   ac_status=$?
21508   echo "$as_me:21508: \$? = $ac_status" >&5
21509   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21510   { (eval echo "$as_me:21510: \"$ac_try\"") >&5
21511   (eval $ac_try) 2>&5
21512   ac_status=$?
21513   echo "$as_me:21513: \$? = $ac_status" >&5
21514   (exit $ac_status); }; }; then
21515   cf_cv_type_of_bool=`cat cf_test.out`
21516                  if test -z "$cf_cv_type_of_bool"; then
21517                    cf_cv_type_of_bool=unknown
21518                  fi
21519 else
21520   echo "$as_me: program exited with status $ac_status" >&5
21521 echo "$as_me: failed program was:" >&5
21522 cat conftest.$ac_ext >&5
21523 cf_cv_type_of_bool=unknown
21524 fi
21525 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21526 fi
21527
21528 fi
21529
21530         rm -f cf_test.out
21531 echo "$as_me:21531: result: $cf_cv_type_of_bool" >&5
21532 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21533 if test "$cf_cv_type_of_bool" = unknown ; then
21534         case .$NCURSES_BOOL in
21535         (.auto|.) NCURSES_BOOL=unsigned;;
21536         esac
21537         { echo "$as_me:21537: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21538 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21539         cf_cv_type_of_bool=$NCURSES_BOOL
21540 fi
21541
21542 echo "$as_me:21542: checking for special defines needed for etip.h" >&5
21543 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21544 cf_save_CXXFLAGS="$CXXFLAGS"
21545 cf_result="none"
21546
21547 # etip.h includes ncurses.h which includes ncurses_dll.h
21548 # But ncurses_dll.h is generated - fix here.
21549 test -d include || mkdir include
21550 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
21551
21552 for cf_math in "" MATH_H
21553 do
21554 for cf_excp in "" MATH_EXCEPTION
21555 do
21556         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21557         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21558         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21559 cat >conftest.$ac_ext <<_ACEOF
21560 #line 21560 "configure"
21561 #include "confdefs.h"
21562
21563 #include <etip.h.in>
21564
21565 int
21566 main (void)
21567 {
21568
21569   ;
21570   return 0;
21571 }
21572 _ACEOF
21573 rm -f conftest.$ac_objext
21574 if { (eval echo "$as_me:21574: \"$ac_compile\"") >&5
21575   (eval $ac_compile) 2>&5
21576   ac_status=$?
21577   echo "$as_me:21577: \$? = $ac_status" >&5
21578   (exit $ac_status); } &&
21579          { ac_try='test -s conftest.$ac_objext'
21580   { (eval echo "$as_me:21580: \"$ac_try\"") >&5
21581   (eval $ac_try) 2>&5
21582   ac_status=$?
21583   echo "$as_me:21583: \$? = $ac_status" >&5
21584   (exit $ac_status); }; }; then
21585
21586         test -n "$cf_math" && cat >>confdefs.h <<EOF
21587 #define ETIP_NEEDS_${cf_math} 1
21588 EOF
21589
21590         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21591 #define ETIP_NEEDS_${cf_excp} 1
21592 EOF
21593
21594         cf_result="$cf_math $cf_excp"
21595         break 2
21596
21597 else
21598   echo "$as_me: failed program was:" >&5
21599 cat conftest.$ac_ext >&5
21600 fi
21601 rm -f conftest.$ac_objext conftest.$ac_ext
21602 done
21603 done
21604 echo "$as_me:21604: result: $cf_result" >&5
21605 echo "${ECHO_T}$cf_result" >&6
21606 CXXFLAGS="$cf_save_CXXFLAGS"
21607
21608 if test -n "$CXX"; then
21609 echo "$as_me:21609: checking if $CXX accepts parameter initialization" >&5
21610 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21611 if test "${cf_cv_cpp_param_init+set}" = set; then
21612   echo $ECHO_N "(cached) $ECHO_C" >&6
21613 else
21614
21615         ac_ext=cc
21616 ac_cpp='$CXXCPP $CPPFLAGS'
21617 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21618 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21619 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21620 ac_main_return=return
21621
21622         if test "$cross_compiling" = yes; then
21623   cf_cv_cpp_param_init=unknown
21624 else
21625   cat >conftest.$ac_ext <<_ACEOF
21626 #line 21626 "configure"
21627 #include "confdefs.h"
21628
21629 class TEST {
21630 private:
21631         int value;
21632 public:
21633         TEST(int x = 1);
21634         ~TEST();
21635 };
21636
21637 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21638 {
21639         value = x;
21640 }
21641 int main(void) { }
21642
21643 _ACEOF
21644 rm -f conftest$ac_exeext
21645 if { (eval echo "$as_me:21645: \"$ac_link\"") >&5
21646   (eval $ac_link) 2>&5
21647   ac_status=$?
21648   echo "$as_me:21648: \$? = $ac_status" >&5
21649   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21650   { (eval echo "$as_me:21650: \"$ac_try\"") >&5
21651   (eval $ac_try) 2>&5
21652   ac_status=$?
21653   echo "$as_me:21653: \$? = $ac_status" >&5
21654   (exit $ac_status); }; }; then
21655   cf_cv_cpp_param_init=yes
21656 else
21657   echo "$as_me: program exited with status $ac_status" >&5
21658 echo "$as_me: failed program was:" >&5
21659 cat conftest.$ac_ext >&5
21660 cf_cv_cpp_param_init=no
21661 fi
21662 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21663 fi
21664         ac_ext=cc
21665 ac_cpp='$CXXCPP $CPPFLAGS'
21666 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21667 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21668 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21669 ac_main_return=return
21670
21671 fi
21672 echo "$as_me:21672: result: $cf_cv_cpp_param_init" >&5
21673 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21674 fi
21675 test "$cf_cv_cpp_param_init" = yes &&
21676 cat >>confdefs.h <<\EOF
21677 #define CPP_HAS_PARAM_INIT 1
21678 EOF
21679
21680 if test -n "$CXX"; then
21681
21682 echo "$as_me:21682: checking if $CXX accepts static_cast" >&5
21683 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21684 if test "${cf_cv_cpp_static_cast+set}" = set; then
21685   echo $ECHO_N "(cached) $ECHO_C" >&6
21686 else
21687
21688         ac_ext=cc
21689 ac_cpp='$CXXCPP $CPPFLAGS'
21690 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21691 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21692 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21693 ac_main_return=return
21694
21695         cat >conftest.$ac_ext <<_ACEOF
21696 #line 21696 "configure"
21697 #include "confdefs.h"
21698
21699 class NCursesPanel
21700 {
21701 public:
21702   NCursesPanel(int nlines,
21703                int ncols,
21704                int begin_y = 0,
21705                int begin_x = 0)
21706   {
21707   }
21708   NCursesPanel();
21709   ~NCursesPanel();
21710 };
21711
21712 template<class T> class NCursesUserPanel : public NCursesPanel
21713 {
21714 public:
21715   NCursesUserPanel (int nlines,
21716                     int ncols,
21717                     int begin_y = 0,
21718                     int begin_x = 0,
21719                     const T* p_UserData = static_cast<T*>(0))
21720     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21721   {
21722   };
21723   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21724   {
21725   };
21726
21727   virtual ~NCursesUserPanel() {};
21728 };
21729
21730 int
21731 main (void)
21732 {
21733
21734         const char* p_UserData = static_cast<char*>(0)
21735   ;
21736   return 0;
21737 }
21738 _ACEOF
21739 rm -f conftest.$ac_objext
21740 if { (eval echo "$as_me:21740: \"$ac_compile\"") >&5
21741   (eval $ac_compile) 2>&5
21742   ac_status=$?
21743   echo "$as_me:21743: \$? = $ac_status" >&5
21744   (exit $ac_status); } &&
21745          { ac_try='test -s conftest.$ac_objext'
21746   { (eval echo "$as_me:21746: \"$ac_try\"") >&5
21747   (eval $ac_try) 2>&5
21748   ac_status=$?
21749   echo "$as_me:21749: \$? = $ac_status" >&5
21750   (exit $ac_status); }; }; then
21751   cf_cv_cpp_static_cast=yes
21752 else
21753   echo "$as_me: failed program was:" >&5
21754 cat conftest.$ac_ext >&5
21755 cf_cv_cpp_static_cast=no
21756 fi
21757 rm -f conftest.$ac_objext conftest.$ac_ext
21758
21759         ac_ext=cc
21760 ac_cpp='$CXXCPP $CPPFLAGS'
21761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21762 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21764 ac_main_return=return
21765
21766 fi
21767 echo "$as_me:21767: result: $cf_cv_cpp_static_cast" >&5
21768 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21769
21770 fi
21771
21772 test "$cf_cv_cpp_static_cast" = yes &&
21773 cat >>confdefs.h <<\EOF
21774 #define CPP_HAS_STATIC_CAST 1
21775 EOF
21776
21777         CXX_AR='$(AR)'
21778         CXX_ARFLAGS='$(ARFLAGS)'
21779         case $cf_cv_system_name in
21780         (irix*)
21781             if test "$GXX" != yes ; then
21782                 CXX_AR='$(CXX)'
21783                 CXX_ARFLAGS='-ar -o'
21784             fi
21785             ;;
21786         (sco3.2v5*)
21787             CXXLDFLAGS="-u main"
21788             ;;
21789         (solaris2*)
21790             if test "$GXX" != yes ; then
21791                 CXX_AR='$(CXX)'
21792                 CXX_ARFLAGS='-xar -o'
21793             fi
21794             ;;
21795         esac
21796
21797 else
21798         cf_cxx_library=no
21799         cf_cv_builtin_bool=1
21800
21801         # Just because we are not configuring against C++ right now does not
21802         # mean that a user will not want to use C++.  Some distributors disable
21803         # the C++ portion of this configuration as a shortcut (or just to avoid
21804         # compiling the demo in the c++ directory).  So we need a reasonable
21805         # default for the 'bool' type.
21806         #
21807         # Caveat: since the storage of the bool type is not standardized, it
21808         # may change.
21809
21810         if test "$NCURSES_BOOL" != auto ; then
21811                 cf_cv_type_of_bool=$NCURSES_BOOL
21812                 cf_cv_header_stdbool_h=0
21813         else
21814                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21815
21816 echo "$as_me:21816: checking for size of bool" >&5
21817 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21818 if test "${cf_cv_type_of_bool+set}" = set; then
21819   echo $ECHO_N "(cached) $ECHO_C" >&6
21820 else
21821
21822         rm -f cf_test.out
21823         if test "$cross_compiling" = yes; then
21824   cf_cv_type_of_bool=unknown
21825 else
21826   cat >conftest.$ac_ext <<_ACEOF
21827 #line 21827 "configure"
21828 #include "confdefs.h"
21829
21830 #include <stdlib.h>
21831 #include <stdio.h>
21832
21833 #if defined(__cplusplus)
21834
21835 #ifdef HAVE_GXX_BUILTIN_H
21836 #include <g++/builtin.h>
21837 #elif HAVE_GPP_BUILTIN_H
21838 #include <gpp/builtin.h>
21839 #elif HAVE_BUILTIN_H
21840 #include <builtin.h>
21841 #endif
21842
21843 #else
21844
21845 #if $cf_cv_header_stdbool_h
21846 #include <stdbool.h>
21847 #endif
21848
21849 #endif
21850
21851 int main(void)
21852 {
21853         FILE *fp = fopen("cf_test.out", "w");
21854         if (fp != 0) {
21855                 bool x = true;
21856                 if ((bool)(-x) >= 0)
21857                         fputs("unsigned ", fp);
21858                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21859                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21860                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21861                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21862                 fclose(fp);
21863         }
21864         ${cf_cv_main_return:-return}(0);
21865 }
21866
21867 _ACEOF
21868 rm -f conftest$ac_exeext
21869 if { (eval echo "$as_me:21869: \"$ac_link\"") >&5
21870   (eval $ac_link) 2>&5
21871   ac_status=$?
21872   echo "$as_me:21872: \$? = $ac_status" >&5
21873   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21874   { (eval echo "$as_me:21874: \"$ac_try\"") >&5
21875   (eval $ac_try) 2>&5
21876   ac_status=$?
21877   echo "$as_me:21877: \$? = $ac_status" >&5
21878   (exit $ac_status); }; }; then
21879   cf_cv_type_of_bool=`cat cf_test.out`
21880                  if test -z "$cf_cv_type_of_bool"; then
21881                    cf_cv_type_of_bool=unknown
21882                  fi
21883 else
21884   echo "$as_me: program exited with status $ac_status" >&5
21885 echo "$as_me: failed program was:" >&5
21886 cat conftest.$ac_ext >&5
21887 cf_cv_type_of_bool=unknown
21888 fi
21889 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21890 fi
21891
21892 fi
21893
21894         rm -f cf_test.out
21895 echo "$as_me:21895: result: $cf_cv_type_of_bool" >&5
21896 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21897 if test "$cf_cv_type_of_bool" = unknown ; then
21898         case .$NCURSES_BOOL in
21899         (.auto|.) NCURSES_BOOL=unsigned;;
21900         esac
21901         { echo "$as_me:21901: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21902 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21903         cf_cv_type_of_bool=$NCURSES_BOOL
21904 fi
21905
21906                 else
21907                         echo "$as_me:21907: checking for fallback type of bool" >&5
21908 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21909                         case "$host_cpu" in
21910                         (i?86)  cf_cv_type_of_bool=char ;;
21911                         (*)     cf_cv_type_of_bool=int  ;;
21912                         esac
21913                         echo "$as_me:21913: result: $cf_cv_type_of_bool" >&5
21914 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21915                 fi
21916         fi
21917 fi
21918
21919 # If the C compiler did not declare bool, and we did not determine that the C++
21920 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21921 # ncurses library use the same type as C++ bool.  Note that this allows one to
21922 # specify the type of bool in a configure-script option and postpone
21923 # integration with the C++ compiler provided that the types are compatible.
21924 USE_CXX_BOOL=1
21925 if test $cf_cv_cc_bool_type = 1
21926 then
21927         # oops: C has a bool.  Unlikely, but C++ could differ.
21928         USE_CXX_BOOL=0
21929 elif test $cf_cv_builtin_bool = 0
21930 then
21931         # C++ has no bool
21932         USE_CXX_BOOL=0
21933 else
21934         # this is the normal case
21935         USE_CXX_BOOL='defined(__cplusplus)'
21936 fi
21937
21938 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21939
21940         if test "$cf_with_ada" != "no" ; then
21941                 if test "$with_libtool" != "no"; then
21942                         { echo "$as_me:21942: WARNING: libtool does not support Ada - disabling feature" >&5
21943 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21944                         cf_with_ada=no
21945                 fi
21946         fi
21947
21948         if test "$cf_with_ada" != "no" ; then
21949
21950 cf_ada_make=gnatmake
21951 cf_ada_config="#"
21952 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21953 set dummy $cf_ada_make; ac_word=$2
21954 echo "$as_me:21954: checking for $ac_word" >&5
21955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21956 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
21957   echo $ECHO_N "(cached) $ECHO_C" >&6
21958 else
21959   if test -n "$gnatmake_exists"; then
21960   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
21961 else
21962   ac_save_IFS=$IFS; IFS=$ac_path_separator
21963 ac_dummy="$PATH"
21964 for ac_dir in $ac_dummy; do
21965   IFS=$ac_save_IFS
21966   test -z "$ac_dir" && ac_dir=.
21967   $as_executable_p "$ac_dir/$ac_word" || continue
21968 ac_cv_prog_gnatmake_exists="yes"
21969 echo "$as_me:21969: found $ac_dir/$ac_word" >&5
21970 break
21971 done
21972
21973   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
21974 fi
21975 fi
21976 gnatmake_exists=$ac_cv_prog_gnatmake_exists
21977 if test -n "$gnatmake_exists"; then
21978   echo "$as_me:21978: result: $gnatmake_exists" >&5
21979 echo "${ECHO_T}$gnatmake_exists" >&6
21980 else
21981   echo "$as_me:21981: result: no" >&5
21982 echo "${ECHO_T}no" >&6
21983 fi
21984
21985 if test "$ac_cv_prog_gnatmake_exists" = no; then
21986         cf_ada_make=
21987         cf_cv_prog_gnat_correct=no
21988 else
21989         # Extract the first word of "gprconfig", so it can be a program name with args.
21990 set dummy gprconfig; ac_word=$2
21991 echo "$as_me:21991: checking for $ac_word" >&5
21992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21993 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
21994   echo $ECHO_N "(cached) $ECHO_C" >&6
21995 else
21996   if test -n "$gprconfig_exists"; then
21997   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
21998 else
21999   ac_save_IFS=$IFS; IFS=$ac_path_separator
22000 ac_dummy="$PATH"
22001 for ac_dir in $ac_dummy; do
22002   IFS=$ac_save_IFS
22003   test -z "$ac_dir" && ac_dir=.
22004   $as_executable_p "$ac_dir/$ac_word" || continue
22005 ac_cv_prog_gprconfig_exists="yes"
22006 echo "$as_me:22006: found $ac_dir/$ac_word" >&5
22007 break
22008 done
22009
22010   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
22011 fi
22012 fi
22013 gprconfig_exists=$ac_cv_prog_gprconfig_exists
22014 if test -n "$gprconfig_exists"; then
22015   echo "$as_me:22015: result: $gprconfig_exists" >&5
22016 echo "${ECHO_T}$gprconfig_exists" >&6
22017 else
22018   echo "$as_me:22018: result: no" >&5
22019 echo "${ECHO_T}no" >&6
22020 fi
22021
22022         if test "$ac_cv_prog_gprconfig_exists" = yes
22023         then
22024                 rm -rf conftest* *~conftest*
22025                 if mkdir conftest.src
22026                 then
22027                         cf_ada_config=""
22028                         cd conftest.src
22029                         for cf_gprconfig in Ada C
22030                         do
22031                                 echo "$as_me:22031: checking for gprconfig name for $cf_gprconfig" >&5
22032 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
22033                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
22034                                 if test -n "$cf_gprconfig_value"
22035                                 then
22036                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
22037                                         echo "$as_me:22037: result: $cf_gprconfig_value" >&5
22038 echo "${ECHO_T}$cf_gprconfig_value" >&6
22039                                 else
22040                                         echo "$as_me:22040: result: missing" >&5
22041 echo "${ECHO_T}missing" >&6
22042                                         cf_ada_config="#"
22043                                         break
22044                                 fi
22045                         done
22046                         cd ..
22047                         rm -rf conftest* *~conftest*
22048                 fi
22049         else
22050                 # gprconfig is newer than gnatmake; we can continue...
22051                 cf_ada_config="##"
22052         fi
22053         if test "x$cf_ada_config" != "x#"
22054         then
22055
22056 echo "$as_me:22056: checking for gnat version" >&5
22057 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
22058 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
22059         grep '[0-9].[0-9][0-9]*' |\
22060         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
22061 echo "$as_me:22061: result: $cf_gnat_version" >&5
22062 echo "${ECHO_T}$cf_gnat_version" >&6
22063
22064 case $cf_gnat_version in
22065 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
22066         cf_cv_prog_gnat_correct=yes
22067         ;;
22068 (*)
22069         { echo "$as_me:22069: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
22070 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
22071         cf_cv_prog_gnat_correct=no
22072         ;;
22073 esac
22074
22075                 # Extract the first word of "m4", so it can be a program name with args.
22076 set dummy m4; ac_word=$2
22077 echo "$as_me:22077: checking for $ac_word" >&5
22078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22079 if test "${ac_cv_prog_M4_exists+set}" = set; then
22080   echo $ECHO_N "(cached) $ECHO_C" >&6
22081 else
22082   if test -n "$M4_exists"; then
22083   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
22084 else
22085   ac_save_IFS=$IFS; IFS=$ac_path_separator
22086 ac_dummy="$PATH"
22087 for ac_dir in $ac_dummy; do
22088   IFS=$ac_save_IFS
22089   test -z "$ac_dir" && ac_dir=.
22090   $as_executable_p "$ac_dir/$ac_word" || continue
22091 ac_cv_prog_M4_exists="yes"
22092 echo "$as_me:22092: found $ac_dir/$ac_word" >&5
22093 break
22094 done
22095
22096   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
22097 fi
22098 fi
22099 M4_exists=$ac_cv_prog_M4_exists
22100 if test -n "$M4_exists"; then
22101   echo "$as_me:22101: result: $M4_exists" >&5
22102 echo "${ECHO_T}$M4_exists" >&6
22103 else
22104   echo "$as_me:22104: result: no" >&5
22105 echo "${ECHO_T}no" >&6
22106 fi
22107
22108                 if test "$ac_cv_prog_M4_exists" = no; then
22109                         cf_cv_prog_gnat_correct=no
22110                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
22111                 fi
22112                 if test "$cf_cv_prog_gnat_correct" = yes; then
22113                         echo "$as_me:22113: checking if GNAT works" >&5
22114 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
22115
22116 rm -rf conftest* *~conftest*
22117 cat >>conftest.ads <<CF_EOF
22118 procedure conftest;
22119 CF_EOF
22120 cat >>conftest.adb <<CF_EOF
22121 with Text_IO;
22122 with GNAT.OS_Lib;
22123 procedure conftest is
22124 begin
22125    Text_IO.Put ("Hello World");
22126    Text_IO.New_Line;
22127    GNAT.OS_Lib.OS_Exit (0);
22128 end conftest;
22129 CF_EOF
22130 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22131    if ( ./conftest 1>&5 2>&1 ) ; then
22132       cf_cv_prog_gnat_correct=yes
22133    else
22134       cf_cv_prog_gnat_correct=no
22135    fi
22136 else
22137    cf_cv_prog_gnat_correct=no
22138 fi
22139 rm -rf conftest* *~conftest*
22140
22141                         echo "$as_me:22141: result: $cf_cv_prog_gnat_correct" >&5
22142 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
22143                 fi
22144         else
22145                 cf_cv_prog_gnat_correct=no
22146         fi
22147 fi
22148
22149                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
22150
22151         ADAFLAGS="$ADAFLAGS -gnatpn"
22152
22153         echo "$as_me:22153: checking optimization options for ADAFLAGS" >&5
22154 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
22155         case "$CFLAGS" in
22156         (*-g*)
22157
22158         ADAFLAGS="$ADAFLAGS -g"
22159
22160                 ;;
22161         esac
22162         case "$CFLAGS" in
22163         (*-O*)
22164                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
22165
22166         ADAFLAGS="$ADAFLAGS $cf_O_flag"
22167
22168                 ;;
22169         esac
22170         echo "$as_me:22170: result: $ADAFLAGS" >&5
22171 echo "${ECHO_T}$ADAFLAGS" >&6
22172
22173 echo "$as_me:22173: checking if GNATPREP supports -T option" >&5
22174 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
22175 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
22176   echo $ECHO_N "(cached) $ECHO_C" >&6
22177 else
22178
22179 cf_cv_gnatprep_opt_t=no
22180 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
22181
22182 fi
22183 echo "$as_me:22183: result: $cf_cv_gnatprep_opt_t" >&5
22184 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
22185 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
22186
22187 echo "$as_me:22187: checking if GNAT supports generics" >&5
22188 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
22189 case $cf_gnat_version in
22190 (3.[1-9]*|[4-9].*)
22191         cf_gnat_generics=yes
22192         ;;
22193 (*)
22194         cf_gnat_generics=no
22195         ;;
22196 esac
22197 echo "$as_me:22197: result: $cf_gnat_generics" >&5
22198 echo "${ECHO_T}$cf_gnat_generics" >&6
22199
22200 if test "$cf_gnat_generics" = yes
22201 then
22202         cf_compile_generics=generics
22203         cf_generic_objects="\${GENOBJS}"
22204 else
22205         cf_compile_generics=
22206         cf_generic_objects=
22207 fi
22208
22209 echo "$as_me:22209: checking if GNAT supports SIGINT" >&5
22210 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
22211 if test "${cf_cv_gnat_sigint+set}" = set; then
22212   echo $ECHO_N "(cached) $ECHO_C" >&6
22213 else
22214
22215 rm -rf conftest* *~conftest*
22216 cat >>conftest.ads <<CF_EOF
22217 with Ada.Interrupts.Names;
22218
22219 package ConfTest is
22220
22221    pragma Warnings (Off);  --  the next pragma exists since 3.11p
22222    pragma Unreserve_All_Interrupts;
22223    pragma Warnings (On);
22224
22225    protected Process is
22226       procedure Stop;
22227       function Continue return Boolean;
22228       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
22229    private
22230       Done : Boolean := False;
22231    end Process;
22232
22233 end ConfTest;
22234 CF_EOF
22235 cat >>conftest.adb <<CF_EOF
22236 package body ConfTest is
22237    protected body Process is
22238       procedure Stop is
22239       begin
22240          Done := True;
22241       end Stop;
22242       function Continue return Boolean is
22243       begin
22244          return not Done;
22245       end Continue;
22246    end Process;
22247 end ConfTest;
22248 CF_EOF
22249 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22250       cf_cv_gnat_sigint=yes
22251 else
22252    cf_cv_gnat_sigint=no
22253 fi
22254 rm -rf conftest* *~conftest*
22255
22256 fi
22257 echo "$as_me:22257: result: $cf_cv_gnat_sigint" >&5
22258 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
22259
22260 if test $cf_cv_gnat_sigint = yes ; then
22261         USE_GNAT_SIGINT=""
22262 else
22263         USE_GNAT_SIGINT="#"
22264 fi
22265
22266 cf_gnat_libraries=no
22267 cf_gnat_projects=no
22268
22269 if test "$enable_gnat_projects" != no ; then
22270 echo "$as_me:22270: checking if GNAT supports project files" >&5
22271 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
22272 case $cf_gnat_version in
22273 (3.[0-9]*)
22274         ;;
22275 (*)
22276         case $cf_cv_system_name in
22277         (cygwin*|msys*)
22278                 ;;
22279         (*)
22280                 rm -rf conftest* *~conftest*
22281                 if mkdir conftest.src conftest.bin conftest.lib
22282                 then
22283                         cd conftest.src
22284                         rm -rf conftest* *~conftest*
22285                         cat >>library.gpr <<CF_EOF
22286 project Library is
22287   Kind := External ("LIB_KIND");
22288   for Library_Name use "ConfTest";
22289   for Object_Dir use ".";
22290   for Library_ALI_Dir use External("LIBRARY_DIR");
22291   for Library_Version use External ("SONAME");
22292   for Library_Kind use Kind;
22293   for Library_Dir use External("BUILD_DIR");
22294   Source_Dir := External ("SOURCE_DIR");
22295   for Source_Dirs use (Source_Dir);
22296 end Library;
22297 CF_EOF
22298                         cat >>confpackage.ads <<CF_EOF
22299 package ConfPackage is
22300    procedure conftest;
22301 end ConfPackage;
22302 CF_EOF
22303                         cat >>confpackage.adb <<CF_EOF
22304 with Text_IO;
22305 package body ConfPackage is
22306    procedure conftest is
22307    begin
22308       Text_IO.Put ("Hello World");
22309       Text_IO.New_Line;
22310    end conftest;
22311 end ConfPackage;
22312 CF_EOF
22313                         if ( $cf_ada_make $ADAFLAGS \
22314                                         -Plibrary.gpr \
22315                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22316                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22317                                         -XSOURCE_DIR=`pwd` \
22318                                         -XSONAME=libConfTest.so.1 \
22319                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
22320                                 cf_gnat_projects=yes
22321                         fi
22322                         cd ..
22323                 fi
22324                 if test -f conftest.lib/confpackage.ali
22325                 then
22326                         cf_gnat_libraries=yes
22327                 fi
22328                 rm -rf conftest* *~conftest*
22329                 ;;
22330         esac
22331         ;;
22332 esac
22333 echo "$as_me:22333: result: $cf_gnat_projects" >&5
22334 echo "${ECHO_T}$cf_gnat_projects" >&6
22335 fi # enable_gnat_projects
22336
22337 if test $cf_gnat_projects = yes
22338 then
22339         echo "$as_me:22339: checking if GNAT supports libraries" >&5
22340 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22341         echo "$as_me:22341: result: $cf_gnat_libraries" >&5
22342 echo "${ECHO_T}$cf_gnat_libraries" >&6
22343 fi
22344
22345 if test "$cf_gnat_projects" = yes
22346 then
22347         USE_OLD_MAKERULES="#"
22348         USE_GNAT_PROJECTS=""
22349 else
22350         USE_OLD_MAKERULES=""
22351         USE_GNAT_PROJECTS="#"
22352 fi
22353
22354 if test "$cf_gnat_libraries" = yes
22355 then
22356         USE_GNAT_LIBRARIES=""
22357 else
22358         USE_GNAT_LIBRARIES="#"
22359 fi
22360
22361 echo "$as_me:22361: checking for ada-compiler" >&5
22362 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22363
22364 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22365 if test "${with_ada_compiler+set}" = set; then
22366   withval="$with_ada_compiler"
22367   cf_ada_compiler=$withval
22368 else
22369   cf_ada_compiler=gnatmake
22370 fi;
22371
22372 echo "$as_me:22372: result: $cf_ada_compiler" >&5
22373 echo "${ECHO_T}$cf_ada_compiler" >&6
22374
22375                         cf_ada_package=terminal_interface
22376
22377 echo "$as_me:22377: checking for ada-include" >&5
22378 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22379
22380 # Check whether --with-ada-include or --without-ada-include was given.
22381 if test "${with_ada_include+set}" = set; then
22382   withval="$with_ada_include"
22383
22384 else
22385   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22386 fi; if test -n "$prefix/share/ada/adainclude" ; then
22387
22388 if test "x$prefix" != xNONE; then
22389         cf_path_syntax="$prefix"
22390 else
22391         cf_path_syntax="$ac_default_prefix"
22392 fi
22393
22394 case ".$withval" in
22395 (.\$\(*\)*|.\'*\'*)
22396         ;;
22397 (..|./*|.\\*)
22398         ;;
22399 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22400         ;;
22401 (.\${*prefix}*|.\${*dir}*)
22402         eval withval="$withval"
22403         case ".$withval" in
22404         (.NONE/*)
22405                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22406                 ;;
22407         esac
22408         ;;
22409 (.no|.NONE/*)
22410         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22411         ;;
22412 (*)
22413         { { echo "$as_me:22413: error: expected a pathname, not \"$withval\"" >&5
22414 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22415    { (exit 1); exit 1; }; }
22416         ;;
22417 esac
22418
22419 fi
22420 eval ADA_INCLUDE="$withval"
22421
22422 echo "$as_me:22422: result: $ADA_INCLUDE" >&5
22423 echo "${ECHO_T}$ADA_INCLUDE" >&6
22424
22425 echo "$as_me:22425: checking for ada-objects" >&5
22426 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22427
22428 # Check whether --with-ada-objects or --without-ada-objects was given.
22429 if test "${with_ada_objects+set}" = set; then
22430   withval="$with_ada_objects"
22431
22432 else
22433   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22434 fi; if test -n "$prefix/lib/ada/adalib" ; then
22435
22436 if test "x$prefix" != xNONE; then
22437         cf_path_syntax="$prefix"
22438 else
22439         cf_path_syntax="$ac_default_prefix"
22440 fi
22441
22442 case ".$withval" in
22443 (.\$\(*\)*|.\'*\'*)
22444         ;;
22445 (..|./*|.\\*)
22446         ;;
22447 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22448         ;;
22449 (.\${*prefix}*|.\${*dir}*)
22450         eval withval="$withval"
22451         case ".$withval" in
22452         (.NONE/*)
22453                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22454                 ;;
22455         esac
22456         ;;
22457 (.no|.NONE/*)
22458         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22459         ;;
22460 (*)
22461         { { echo "$as_me:22461: error: expected a pathname, not \"$withval\"" >&5
22462 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22463    { (exit 1); exit 1; }; }
22464         ;;
22465 esac
22466
22467 fi
22468 eval ADA_OBJECTS="$withval"
22469
22470 echo "$as_me:22470: result: $ADA_OBJECTS" >&5
22471 echo "${ECHO_T}$ADA_OBJECTS" >&6
22472
22473 echo "$as_me:22473: checking if an Ada95 shared-library should be built" >&5
22474 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22475
22476 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22477 if test "${with_ada_sharedlib+set}" = set; then
22478   withval="$with_ada_sharedlib"
22479   with_ada_sharedlib=$withval
22480 else
22481   with_ada_sharedlib=no
22482 fi;
22483 echo "$as_me:22483: result: $with_ada_sharedlib" >&5
22484 echo "${ECHO_T}$with_ada_sharedlib" >&6
22485
22486 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22487 MAKE_ADA_SHAREDLIB="#"
22488
22489 if test "x$with_ada_sharedlib" != xno
22490 then
22491         MAKE_ADA_SHAREDLIB=
22492         if test "x$with_ada_sharedlib" != xyes
22493         then
22494                 ADA_SHAREDLIB="$with_ada_sharedlib"
22495         fi
22496 fi
22497
22498                 fi
22499         fi
22500 else
22501         cf_with_ada=no
22502 fi
22503
22504 # do this "late" to avoid conflict with header-checks
22505 if test "x$with_widec" = xyes ; then
22506         echo "$as_me:22506: checking for wchar_t" >&5
22507 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22508 if test "${ac_cv_type_wchar_t+set}" = set; then
22509   echo $ECHO_N "(cached) $ECHO_C" >&6
22510 else
22511   cat >conftest.$ac_ext <<_ACEOF
22512 #line 22512 "configure"
22513 #include "confdefs.h"
22514 $ac_includes_default
22515 int
22516 main (void)
22517 {
22518 if ((wchar_t *) 0)
22519   return 0;
22520 if (sizeof (wchar_t))
22521   return 0;
22522   ;
22523   return 0;
22524 }
22525 _ACEOF
22526 rm -f conftest.$ac_objext
22527 if { (eval echo "$as_me:22527: \"$ac_compile\"") >&5
22528   (eval $ac_compile) 2>&5
22529   ac_status=$?
22530   echo "$as_me:22530: \$? = $ac_status" >&5
22531   (exit $ac_status); } &&
22532          { ac_try='test -s conftest.$ac_objext'
22533   { (eval echo "$as_me:22533: \"$ac_try\"") >&5
22534   (eval $ac_try) 2>&5
22535   ac_status=$?
22536   echo "$as_me:22536: \$? = $ac_status" >&5
22537   (exit $ac_status); }; }; then
22538   ac_cv_type_wchar_t=yes
22539 else
22540   echo "$as_me: failed program was:" >&5
22541 cat conftest.$ac_ext >&5
22542 ac_cv_type_wchar_t=no
22543 fi
22544 rm -f conftest.$ac_objext conftest.$ac_ext
22545 fi
22546 echo "$as_me:22546: result: $ac_cv_type_wchar_t" >&5
22547 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22548
22549 echo "$as_me:22549: checking size of wchar_t" >&5
22550 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22551 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22552   echo $ECHO_N "(cached) $ECHO_C" >&6
22553 else
22554   if test "$ac_cv_type_wchar_t" = yes; then
22555   if test "$cross_compiling" = yes; then
22556   # Depending upon the size, compute the lo and hi bounds.
22557 cat >conftest.$ac_ext <<_ACEOF
22558 #line 22558 "configure"
22559 #include "confdefs.h"
22560 $ac_includes_default
22561 int
22562 main (void)
22563 {
22564 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22565   ;
22566   return 0;
22567 }
22568 _ACEOF
22569 rm -f conftest.$ac_objext
22570 if { (eval echo "$as_me:22570: \"$ac_compile\"") >&5
22571   (eval $ac_compile) 2>&5
22572   ac_status=$?
22573   echo "$as_me:22573: \$? = $ac_status" >&5
22574   (exit $ac_status); } &&
22575          { ac_try='test -s conftest.$ac_objext'
22576   { (eval echo "$as_me:22576: \"$ac_try\"") >&5
22577   (eval $ac_try) 2>&5
22578   ac_status=$?
22579   echo "$as_me:22579: \$? = $ac_status" >&5
22580   (exit $ac_status); }; }; then
22581   ac_lo=0 ac_mid=0
22582   while :; do
22583     cat >conftest.$ac_ext <<_ACEOF
22584 #line 22584 "configure"
22585 #include "confdefs.h"
22586 $ac_includes_default
22587 int
22588 main (void)
22589 {
22590 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22591   ;
22592   return 0;
22593 }
22594 _ACEOF
22595 rm -f conftest.$ac_objext
22596 if { (eval echo "$as_me:22596: \"$ac_compile\"") >&5
22597   (eval $ac_compile) 2>&5
22598   ac_status=$?
22599   echo "$as_me:22599: \$? = $ac_status" >&5
22600   (exit $ac_status); } &&
22601          { ac_try='test -s conftest.$ac_objext'
22602   { (eval echo "$as_me:22602: \"$ac_try\"") >&5
22603   (eval $ac_try) 2>&5
22604   ac_status=$?
22605   echo "$as_me:22605: \$? = $ac_status" >&5
22606   (exit $ac_status); }; }; then
22607   ac_hi=$ac_mid; break
22608 else
22609   echo "$as_me: failed program was:" >&5
22610 cat conftest.$ac_ext >&5
22611 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22612 fi
22613 rm -f conftest.$ac_objext conftest.$ac_ext
22614   done
22615 else
22616   echo "$as_me: failed program was:" >&5
22617 cat conftest.$ac_ext >&5
22618 ac_hi=-1 ac_mid=-1
22619   while :; do
22620     cat >conftest.$ac_ext <<_ACEOF
22621 #line 22621 "configure"
22622 #include "confdefs.h"
22623 $ac_includes_default
22624 int
22625 main (void)
22626 {
22627 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22628   ;
22629   return 0;
22630 }
22631 _ACEOF
22632 rm -f conftest.$ac_objext
22633 if { (eval echo "$as_me:22633: \"$ac_compile\"") >&5
22634   (eval $ac_compile) 2>&5
22635   ac_status=$?
22636   echo "$as_me:22636: \$? = $ac_status" >&5
22637   (exit $ac_status); } &&
22638          { ac_try='test -s conftest.$ac_objext'
22639   { (eval echo "$as_me:22639: \"$ac_try\"") >&5
22640   (eval $ac_try) 2>&5
22641   ac_status=$?
22642   echo "$as_me:22642: \$? = $ac_status" >&5
22643   (exit $ac_status); }; }; then
22644   ac_lo=$ac_mid; break
22645 else
22646   echo "$as_me: failed program was:" >&5
22647 cat conftest.$ac_ext >&5
22648 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22649 fi
22650 rm -f conftest.$ac_objext conftest.$ac_ext
22651   done
22652 fi
22653 rm -f conftest.$ac_objext conftest.$ac_ext
22654 # Binary search between lo and hi bounds.
22655 while test "x$ac_lo" != "x$ac_hi"; do
22656   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22657   cat >conftest.$ac_ext <<_ACEOF
22658 #line 22658 "configure"
22659 #include "confdefs.h"
22660 $ac_includes_default
22661 int
22662 main (void)
22663 {
22664 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22665   ;
22666   return 0;
22667 }
22668 _ACEOF
22669 rm -f conftest.$ac_objext
22670 if { (eval echo "$as_me:22670: \"$ac_compile\"") >&5
22671   (eval $ac_compile) 2>&5
22672   ac_status=$?
22673   echo "$as_me:22673: \$? = $ac_status" >&5
22674   (exit $ac_status); } &&
22675          { ac_try='test -s conftest.$ac_objext'
22676   { (eval echo "$as_me:22676: \"$ac_try\"") >&5
22677   (eval $ac_try) 2>&5
22678   ac_status=$?
22679   echo "$as_me:22679: \$? = $ac_status" >&5
22680   (exit $ac_status); }; }; then
22681   ac_hi=$ac_mid
22682 else
22683   echo "$as_me: failed program was:" >&5
22684 cat conftest.$ac_ext >&5
22685 ac_lo=`expr $ac_mid + 1`
22686 fi
22687 rm -f conftest.$ac_objext conftest.$ac_ext
22688 done
22689 ac_cv_sizeof_wchar_t=$ac_lo
22690 else
22691   if test "$cross_compiling" = yes; then
22692   { { echo "$as_me:22692: error: cannot run test program while cross compiling" >&5
22693 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22694    { (exit 1); exit 1; }; }
22695 else
22696   cat >conftest.$ac_ext <<_ACEOF
22697 #line 22697 "configure"
22698 #include "confdefs.h"
22699 $ac_includes_default
22700 int
22701 main (void)
22702 {
22703 FILE *f = fopen ("conftest.val", "w");
22704 if (!f)
22705   $ac_main_return (1);
22706 fprintf (f, "%d", (sizeof (wchar_t)));
22707 fclose (f);
22708   ;
22709   return 0;
22710 }
22711 _ACEOF
22712 rm -f conftest$ac_exeext
22713 if { (eval echo "$as_me:22713: \"$ac_link\"") >&5
22714   (eval $ac_link) 2>&5
22715   ac_status=$?
22716   echo "$as_me:22716: \$? = $ac_status" >&5
22717   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22718   { (eval echo "$as_me:22718: \"$ac_try\"") >&5
22719   (eval $ac_try) 2>&5
22720   ac_status=$?
22721   echo "$as_me:22721: \$? = $ac_status" >&5
22722   (exit $ac_status); }; }; then
22723   ac_cv_sizeof_wchar_t=`cat conftest.val`
22724 else
22725   echo "$as_me: program exited with status $ac_status" >&5
22726 echo "$as_me: failed program was:" >&5
22727 cat conftest.$ac_ext >&5
22728 fi
22729 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22730 fi
22731 fi
22732 rm -f conftest.val
22733 else
22734   ac_cv_sizeof_wchar_t=0
22735 fi
22736 fi
22737 echo "$as_me:22737: result: $ac_cv_sizeof_wchar_t" >&5
22738 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22739 cat >>confdefs.h <<EOF
22740 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22741 EOF
22742
22743 fi
22744
22745 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22746 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22747 ###
22748 ### ticlib modules may be a separate library, otherwise contained in termlib.
22749 ### termlib modules may be a separate library, otherwise contained in ncurses.
22750 ###
22751 ### The of "+" or " " between the tokens controls the way the script
22752 ### chooses to split module lists into libraries.
22753 ###
22754 ### (see CF_LIB_RULES).
22755 echo "$as_me:22755: checking for library subsets" >&5
22756 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22757 LIB_SUBSETS=
22758
22759 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22760         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22761         if test "$with_ticlib" != no ; then
22762                 LIB_SUBSETS="${LIB_SUBSETS} "
22763         else
22764                 LIB_SUBSETS="${LIB_SUBSETS}+"
22765         fi
22766 fi
22767
22768 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22769 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22770
22771 if test "$with_termlib" != no ; then
22772         LIB_SUBSETS="${LIB_SUBSETS} "
22773 else
22774         LIB_SUBSETS="${LIB_SUBSETS}+"
22775 fi
22776
22777 LIB_SUBSETS="${LIB_SUBSETS}base"
22778
22779 # Most term-driver calls are to tinfo, but some like init_pair are to the
22780 # base library (so it resides in base).
22781 if test "$with_term_driver" != no ; then
22782         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22783         case $cf_cv_system_name in
22784         (*mingw32*|*mingw64*)
22785                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22786                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22787                 ;;
22788         (*)
22789                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22790                 ;;
22791         esac
22792 fi
22793
22794 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22795 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22796
22797 echo "$as_me:22797: result: $LIB_SUBSETS" >&5
22798 echo "${ECHO_T}$LIB_SUBSETS" >&6
22799
22800 ### Construct the list of include-directories to be generated
22801
22802 if test "$srcdir" != "."; then
22803         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22804 fi
22805 CPPFLAGS="-I../include $CPPFLAGS"
22806 if test "$srcdir" != "."; then
22807         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22808 fi
22809 CPPFLAGS="-I. $CPPFLAGS"
22810
22811 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22812 if test "$srcdir" != "."; then
22813         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22814 fi
22815 if test "$GCC" != yes; then
22816         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22817 elif test "$includedir" != "/usr/include"; then
22818         if test "$includedir" = '${prefix}/include' ; then
22819                 if test x$prefix != x/usr ; then
22820                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22821                 fi
22822         else
22823                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22824         fi
22825 fi
22826
22827 ### Build up pieces for makefile rules
22828 echo "$as_me:22828: checking default library suffix" >&5
22829 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22830
22831         case $DFT_LWR_MODEL in
22832         (libtool) DFT_ARG_SUFFIX=''   ;;
22833         (normal)  DFT_ARG_SUFFIX=''   ;;
22834         (debug)   DFT_ARG_SUFFIX='_g' ;;
22835         (profile) DFT_ARG_SUFFIX='_p' ;;
22836         (shared)  DFT_ARG_SUFFIX=''   ;;
22837         esac
22838         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22839 echo "$as_me:22839: result: $DFT_ARG_SUFFIX" >&5
22840 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22841
22842 echo "$as_me:22842: checking default library-dependency suffix" >&5
22843 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22844
22845         case X$DFT_LWR_MODEL in
22846         (Xlibtool)
22847                 DFT_LIB_SUFFIX='.la'
22848                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22849                 ;;
22850         (Xdebug)
22851                 DFT_LIB_SUFFIX='_g.a'
22852                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22853                 ;;
22854         (Xprofile)
22855                 DFT_LIB_SUFFIX='_p.a'
22856                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22857                 ;;
22858         (Xshared)
22859                 case $cf_cv_system_name in
22860                 (aix[5-7]*)
22861                         DFT_LIB_SUFFIX='.so'
22862                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22863                         ;;
22864                 (cygwin*|msys*|mingw*)
22865                         DFT_LIB_SUFFIX='.dll'
22866                         DFT_DEP_SUFFIX='.dll.a'
22867                         ;;
22868                 (darwin*)
22869                         DFT_LIB_SUFFIX='.dylib'
22870                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22871                         ;;
22872                 (hpux*)
22873                         case $target in
22874                         (ia64*)
22875                                 DFT_LIB_SUFFIX='.so'
22876                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22877                                 ;;
22878                         (*)
22879                                 DFT_LIB_SUFFIX='.sl'
22880                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22881                                 ;;
22882                         esac
22883                         ;;
22884                 (*)
22885                         DFT_LIB_SUFFIX='.so'
22886                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22887                         ;;
22888                 esac
22889                 ;;
22890         (*)
22891                 DFT_LIB_SUFFIX='.a'
22892                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22893                 ;;
22894         esac
22895         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22896         then
22897                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22898                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22899         fi
22900 echo "$as_me:22900: result: $DFT_DEP_SUFFIX" >&5
22901 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22902
22903 echo "$as_me:22903: checking default object directory" >&5
22904 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22905
22906         case $DFT_LWR_MODEL in
22907         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22908         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22909         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22910         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22911         (shared)
22912                 case $cf_cv_system_name in
22913                 (cygwin|msys)
22914                         DFT_OBJ_SUBDIR='objects' ;;
22915                 (*)
22916                         DFT_OBJ_SUBDIR='obj_s' ;;
22917                 esac
22918         esac
22919 echo "$as_me:22919: result: $DFT_OBJ_SUBDIR" >&5
22920 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22921
22922 if test "x$cf_with_cxx" = xyes ; then
22923 echo "$as_me:22923: checking c++ library-dependency suffix" >&5
22924 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22925 if test "$with_libtool" != "no"; then
22926         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22927         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22928 elif test "$with_shared_cxx" != "no"; then
22929         # also for g++ users...
22930         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22931 else
22932         # we normally make a static library because C/C++ library rules differ
22933
22934         case Xnormal in
22935         (Xlibtool)
22936                 CXX_LIB_SUFFIX='.la'
22937                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22938                 ;;
22939         (Xdebug)
22940                 CXX_LIB_SUFFIX='_g.a'
22941                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22942                 ;;
22943         (Xprofile)
22944                 CXX_LIB_SUFFIX='_p.a'
22945                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22946                 ;;
22947         (Xshared)
22948                 case $cf_cv_system_name in
22949                 (aix[5-7]*)
22950                         CXX_LIB_SUFFIX='.so'
22951                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22952                         ;;
22953                 (cygwin*|msys*|mingw*)
22954                         CXX_LIB_SUFFIX='.dll'
22955                         CXX_DEP_SUFFIX='.dll.a'
22956                         ;;
22957                 (darwin*)
22958                         CXX_LIB_SUFFIX='.dylib'
22959                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22960                         ;;
22961                 (hpux*)
22962                         case $target in
22963                         (ia64*)
22964                                 CXX_LIB_SUFFIX='.so'
22965                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22966                                 ;;
22967                         (*)
22968                                 CXX_LIB_SUFFIX='.sl'
22969                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22970                                 ;;
22971                         esac
22972                         ;;
22973                 (*)
22974                         CXX_LIB_SUFFIX='.so'
22975                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22976                         ;;
22977                 esac
22978                 ;;
22979         (*)
22980                 CXX_LIB_SUFFIX='.a'
22981                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22982                 ;;
22983         esac
22984         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22985         then
22986                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22987                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22988         fi
22989
22990 fi
22991 echo "$as_me:22991: result: $CXX_LIB_SUFFIX" >&5
22992 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22993
22994 fi
22995
22996 # do not want -ldl in build except as needed for -lncurses dependency
22997 if test "x$with_dlsym" = xyes ; then
22998 if test $DFT_LWR_MODEL = shared || \
22999    test $DFT_LWR_MODEL = libtool ; then
23000
23001 # remove dl library from $LIBS
23002 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
23003
23004 fi
23005 fi
23006 ### Set up low-level terminfo dependencies for makefiles.
23007
23008 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
23009 # do not need libdl
23010 TICS_LIST=
23011 if test "x$with_dlsym" = xyes ; then
23012
23013 # remove dl library from $SHLIB_LIST
23014 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
23015
23016 fi
23017
23018 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
23019 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
23020 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
23021 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
23022 then
23023         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
23024 fi
23025
23026 if test "$with_ticlib" != no ; then
23027
23028         if test "x$with_ticlib" != xyes ; then
23029                 TICS_NAME=$with_ticlib
23030                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
23031                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23032                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23033                 TICS_LIB_SUFFIX="${with_ticlib}"
23034         else
23035                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
23036                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
23037                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
23038                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
23039         fi
23040         TICS_LDFLAGS="-L${LIB_DIR}"
23041         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
23042 else
23043         TICS_SUFFIX=${DFT_LIB_SUFFIX}
23044         TICS_LDFLAGS="-L${LIB_DIR}"
23045         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23046 fi
23047
23048 if test "$with_termlib" != no ; then
23049
23050         if test "x$with_termlib" != xyes ; then
23051                 TINFO_NAME=$with_termlib
23052                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
23053                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23054                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23055                 TINFO_LIB_SUFFIX="${with_termlib}"
23056         else
23057                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23058                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
23059                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
23060                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
23061         fi
23062
23063         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
23064         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
23065         if test "$DFT_LWR_MODEL" = "libtool"; then
23066                 TEST_ARGS="${TEST_DEPS}"
23067                 TEST_ARG2="${TEST_DEP2}"
23068                 TINFO_LDFLAGS="-L${LIB_DIR}"
23069                 TINFO_LIBS="$TEST_ARGS"
23070                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
23071                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
23072         else
23073                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
23074                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
23075                 if test "x$with_term_driver" != xno ; then
23076                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23077                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
23078                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23079                 else
23080                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23081                         TINFO_LIBS="$TEST_ARGS"
23082                 fi
23083                 TINFO_LDFLAGS="-L${LIB_DIR}"
23084                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23085         fi
23086 else
23087         # the next lines are needed for linking libtic over libncurses
23088         TINFO_NAME=${LIB_NAME}
23089         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23090         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
23091         if test "x$with_tic_depends" = xyes ; then
23092                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23093         else
23094                 TICS_LIST="$SHLIB_LIST"
23095         fi
23096
23097         TINFO_LDFLAGS="-L${LIB_DIR}"
23098         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23099 fi
23100
23101 if test "$DFT_LWR_MODEL" = shared ; then
23102         case $cf_cv_system_name in
23103         (cygwin*|msys*)
23104                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
23105                 TINFO_SUFFIX=.dll
23106                 ;;
23107         esac
23108 fi
23109
23110 if test "x$with_dlsym" = xyes ; then
23111
23112 # remove dl library from $TICS_LIST
23113 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
23114
23115 fi
23116
23117 if test "$DFT_LWR_MODEL" = "libtool"; then
23118         OBJEXT=lo
23119 fi
23120
23121 # needed for Ada95
23122 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
23123
23124 case $DFT_LWR_MODEL in
23125 (normal|debug|profile)
23126
23127 if test "$GCC" = yes ; then
23128         case $cf_cv_system_name in
23129         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
23130                 LDFLAGS_STATIC=
23131                 LDFLAGS_SHARED=
23132                 ;;
23133         (*)     # normally, except when broken
23134                 LDFLAGS_STATIC=-static
23135                 LDFLAGS_SHARED=-dynamic
23136                 ;;
23137         esac
23138 else
23139         case $cf_cv_system_name in
23140         (aix[4-7]*)     # from ld manpage
23141                 LDFLAGS_STATIC=-bstatic
23142                 LDFLAGS_SHARED=-bdynamic
23143                 ;;
23144         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
23145                 # We could also use just "archive" and "shared".
23146                 LDFLAGS_STATIC=-Wl,-a,archive_shared
23147                 LDFLAGS_SHARED=-Wl,-a,shared_archive
23148                 ;;
23149         (irix*)         # from ld manpage IRIX64
23150                 LDFLAGS_STATIC=-Bstatic
23151                 LDFLAGS_SHARED=-Bdynamic
23152                 ;;
23153         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
23154                 # alternative "-oldstyle_liblookup" (not in cc manpage)
23155                 LDFLAGS_STATIC=-noso
23156                 LDFLAGS_SHARED=-so_archive
23157                 ;;
23158         (solaris2*)
23159                 LDFLAGS_STATIC=-Bstatic
23160                 LDFLAGS_SHARED=-Bdynamic
23161                 ;;
23162         esac
23163 fi
23164
23165 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
23166 then
23167         echo "$as_me:23167: checking if linker supports switching between static/dynamic" >&5
23168 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
23169
23170         rm -f libconftest.a
23171         cat >conftest.$ac_ext <<EOF
23172 #line 23172 "configure"
23173 #include <stdio.h>
23174 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
23175 EOF
23176         if { (eval echo "$as_me:23176: \"$ac_compile\"") >&5
23177   (eval $ac_compile) 2>&5
23178   ac_status=$?
23179   echo "$as_me:23179: \$? = $ac_status" >&5
23180   (exit $ac_status); } ; then
23181                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
23182                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
23183         fi
23184         rm -f conftest.*
23185
23186         cf_save_LIBS="$LIBS"
23187
23188         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
23189         cat >conftest.$ac_ext <<_ACEOF
23190 #line 23190 "configure"
23191 #include "confdefs.h"
23192
23193 #line 23193 "configure"
23194 #include <stdio.h>
23195 int cf_ldflags_static(FILE *fp);
23196
23197 int
23198 main (void)
23199 {
23200
23201         return cf_ldflags_static(stdin);
23202
23203   ;
23204   return 0;
23205 }
23206 _ACEOF
23207 rm -f conftest.$ac_objext conftest$ac_exeext
23208 if { (eval echo "$as_me:23208: \"$ac_link\"") >&5
23209   (eval $ac_link) 2>&5
23210   ac_status=$?
23211   echo "$as_me:23211: \$? = $ac_status" >&5
23212   (exit $ac_status); } &&
23213          { ac_try='test -s conftest$ac_exeext'
23214   { (eval echo "$as_me:23214: \"$ac_try\"") >&5
23215   (eval $ac_try) 2>&5
23216   ac_status=$?
23217   echo "$as_me:23217: \$? = $ac_status" >&5
23218   (exit $ac_status); }; }; then
23219
23220         # some linkers simply ignore the -dynamic
23221         case x`file conftest$ac_exeext 2>/dev/null` in
23222         (*static*)
23223                 cf_ldflags_static=no
23224                 ;;
23225         (*)
23226                 cf_ldflags_static=yes
23227                 ;;
23228         esac
23229
23230 else
23231   echo "$as_me: failed program was:" >&5
23232 cat conftest.$ac_ext >&5
23233 cf_ldflags_static=no
23234 fi
23235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23236
23237         rm -f libconftest.*
23238         LIBS="$cf_save_LIBS"
23239
23240         echo "$as_me:23240: result: $cf_ldflags_static" >&5
23241 echo "${ECHO_T}$cf_ldflags_static" >&6
23242
23243         if test $cf_ldflags_static != yes
23244         then
23245                 LDFLAGS_STATIC=
23246                 LDFLAGS_SHARED=
23247         fi
23248 else
23249         LDFLAGS_STATIC=
23250         LDFLAGS_SHARED=
23251 fi
23252
23253         ;;
23254 esac
23255
23256 echo "$as_me:23256: checking where we will install curses.h" >&5
23257 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
23258
23259 includesubdir=
23260 if test "$with_overwrite" = no && \
23261  ( test "x$includedir" = 'x${prefix}/include' || \
23262    test "x$includedir" = "x${prefix}/include" )
23263 then
23264         includesubdir="/ncurses${USE_LIB_SUFFIX}"
23265 fi
23266 echo "$as_me:23266: result: ${includedir}${includesubdir}" >&5
23267 echo "${ECHO_T}${includedir}${includesubdir}" >&6
23268
23269 ### Resolve a conflict between normal and wide-curses by forcing applications
23270 ### that will need libutf8 to add it to their configure script.
23271 if test "$with_overwrite" != no ; then
23272 if test "$NCURSES_LIBUTF8" = 1 ; then
23273         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
23274         { echo "$as_me:23274: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
23275 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
23276 fi
23277 fi
23278 WITH_OVERWRITE=$with_overwrite
23279
23280 # used to separate tack out of the tree
23281 NCURSES_TREE=
23282
23283 ### predefined stuff for the test programs
23284
23285 cat >>confdefs.h <<\EOF
23286 #define HAVE_SLK_COLOR 1
23287 EOF
23288
23289 ### Construct the list of subdirectories for which we'll customize makefiles
23290 ### with the appropriate compile-rules.
23291
23292 echo "$as_me:23292: checking for src modules" >&5
23293 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
23294
23295 # dependencies and linker-arguments for test-programs
23296 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
23297 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
23298 if test "$DFT_LWR_MODEL" = "libtool"; then
23299         TEST_ARGS="${TEST_DEPS}"
23300         TEST_ARG2="${TEST_DEP2}"
23301 else
23302         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23303         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
23304 fi
23305
23306 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
23307 cf_cv_src_modules=
23308 for cf_dir in $modules_to_build
23309 do
23310         if test -f $srcdir/$cf_dir/modules; then
23311
23312                 # We may/may not have tack in the distribution, though the
23313                 # makefile is.
23314                 if test $cf_dir = tack ; then
23315                         if test "x$cf_with_tack" != "xyes"; then
23316                                 continue
23317                         fi
23318                 fi
23319
23320                 if test -z "$cf_cv_src_modules"; then
23321                         cf_cv_src_modules=$cf_dir
23322                 else
23323                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23324                 fi
23325
23326                 # Make the ncurses_cfg.h file record the library interface files as
23327                 # well.  These are header files that are the same name as their
23328                 # directory.  Ncurses is the only library that does not follow
23329                 # that pattern.
23330                 if test $cf_dir = tack ; then
23331                         continue
23332                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23333
23334 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23335
23336                         cat >>confdefs.h <<EOF
23337 #define HAVE_${cf_have_include}_H 1
23338 EOF
23339
23340                         cat >>confdefs.h <<EOF
23341 #define HAVE_LIB${cf_have_include} 1
23342 EOF
23343
23344                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23345                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23346                         if test "$DFT_LWR_MODEL" = "libtool"; then
23347                                 TEST_ARGS="${TEST_DEPS}"
23348                                 TEST_ARG2="${TEST_DEP2}"
23349                         else
23350                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23351                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23352                         fi
23353                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23354                 fi
23355         fi
23356 done
23357 echo "$as_me:23357: result: $cf_cv_src_modules" >&5
23358 echo "${ECHO_T}$cf_cv_src_modules" >&6
23359
23360 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23361 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23362
23363 SRC_SUBDIRS=
23364 if test "x$cf_with_manpages" != xno ; then
23365         SRC_SUBDIRS="$SRC_SUBDIRS man"
23366 fi
23367 SRC_SUBDIRS="$SRC_SUBDIRS include"
23368 for cf_dir in $cf_cv_src_modules
23369 do
23370         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23371 done
23372 if test "x$cf_with_tests" != "xno" ; then
23373         SRC_SUBDIRS="$SRC_SUBDIRS test"
23374 fi
23375 # always make this, to install the ncurses-config script
23376 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23377 if test "$cf_with_cxx_binding" != no; then
23378         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23379         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23380 fi
23381
23382 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23383 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23384
23385 ADA_SUBDIRS=
23386 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23387         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23388         ADA_SUBDIRS="gen src"
23389         if test "x$cf_with_tests" != "xno" ; then
23390                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23391         fi
23392 fi
23393
23394 SUB_MAKEFILES=
23395 for cf_dir in $SRC_SUBDIRS
23396 do
23397         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23398 done
23399
23400 if test -n "$ADA_SUBDIRS"; then
23401         for cf_dir in $ADA_SUBDIRS
23402         do
23403                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23404         done
23405
23406 fi
23407
23408 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23409    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23410    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23411 fi
23412
23413 DIRS_TO_MAKE="lib"
23414 for cf_item in $cf_list_models
23415 do
23416
23417         case $cf_item in
23418         (libtool) cf_subdir='obj_lo'  ;;
23419         (normal)  cf_subdir='objects' ;;
23420         (debug)   cf_subdir='obj_g' ;;
23421         (profile) cf_subdir='obj_p' ;;
23422         (shared)
23423                 case $cf_cv_system_name in
23424                 (cygwin|msys)
23425                         cf_subdir='objects' ;;
23426                 (*)
23427                         cf_subdir='obj_s' ;;
23428                 esac
23429         esac
23430
23431         for cf_item2 in $DIRS_TO_MAKE
23432         do
23433                 test $cf_item2 = $cf_subdir && break
23434         done
23435         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23436 done
23437 for cf_dir in $DIRS_TO_MAKE
23438 do
23439         test ! -d $cf_dir && mkdir $cf_dir
23440 done
23441
23442 # symbols that differ when compiling Ada95 by itself.
23443 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23444
23445 # values to use as strings
23446
23447 cat >>confdefs.h <<EOF
23448 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23449 EOF
23450
23451 cat >>confdefs.h <<EOF
23452 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23453 EOF
23454
23455 ### Now that we're done running tests, add the compiler-warnings, if any
23456
23457 cf_fix_cppflags=no
23458 cf_new_cflags=
23459 cf_new_cppflags=
23460 cf_new_extra_cppflags=
23461
23462 for cf_add_cflags in $EXTRA_CFLAGS
23463 do
23464 case $cf_fix_cppflags in
23465 (no)
23466         case $cf_add_cflags in
23467         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23468                 case $cf_add_cflags in
23469                 (-D*)
23470                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23471
23472                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23473                                 && test -z "${cf_tst_cflags}" \
23474                                 && cf_fix_cppflags=yes
23475
23476                         if test $cf_fix_cppflags = yes ; then
23477
23478         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23479         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23480
23481                                 continue
23482                         elif test "${cf_tst_cflags}" = "\"'" ; then
23483
23484         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23485         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23486
23487                                 continue
23488                         fi
23489                         ;;
23490                 esac
23491                 case "$CPPFLAGS" in
23492                 (*$cf_add_cflags)
23493                         ;;
23494                 (*)
23495                         case $cf_add_cflags in
23496                         (-D*)
23497                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23498
23499 CPPFLAGS=`echo "$CPPFLAGS" | \
23500         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23501                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23502
23503                                 ;;
23504                         esac
23505
23506         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23507         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23508
23509                         ;;
23510                 esac
23511                 ;;
23512         (*)
23513
23514         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23515         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23516
23517                 ;;
23518         esac
23519         ;;
23520 (yes)
23521
23522         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23523         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23524
23525         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23526
23527         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23528                 && test -z "${cf_tst_cflags}" \
23529                 && cf_fix_cppflags=no
23530         ;;
23531 esac
23532 done
23533
23534 if test -n "$cf_new_cflags" ; then
23535
23536         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23537         CFLAGS="${CFLAGS}$cf_new_cflags"
23538
23539 fi
23540
23541 if test -n "$cf_new_cppflags" ; then
23542
23543         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23544         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23545
23546 fi
23547
23548 if test -n "$cf_new_extra_cppflags" ; then
23549
23550         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23551         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23552
23553 fi
23554
23555 ### Define substitutions for header files to avoid name-pollution
23556
23557 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23558         HAVE_TCGETATTR=1
23559 else
23560         HAVE_TCGETATTR=0
23561 fi
23562
23563 if test "x$ac_cv_header_stdint_h" = xyes ; then
23564         HAVE_STDINT_H=1
23565 else
23566         HAVE_STDINT_H=0
23567 fi
23568
23569 if test "x$ac_cv_header_termio_h" = xyes ; then
23570         HAVE_TERMIO_H=1
23571 else
23572         HAVE_TERMIO_H=0
23573 fi
23574
23575 if test "x$ac_cv_header_termios_h" = xyes ; then
23576         HAVE_TERMIOS_H=1
23577 else
23578         HAVE_TERMIOS_H=0
23579 fi
23580
23581 ################################################################################
23582 test "x$use_database" = xyes && \
23583 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23584
23585 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23586 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23587
23588 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23589 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23590 fi
23591
23592 # Extract the first word of "tic", so it can be a program name with args.
23593 set dummy tic; ac_word=$2
23594 echo "$as_me:23594: checking for $ac_word" >&5
23595 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23596 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23597   echo $ECHO_N "(cached) $ECHO_C" >&6
23598 else
23599   case $TIC_PATH in
23600   [\\/]* | ?:[\\/]*)
23601   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23602   ;;
23603   *)
23604   ac_save_IFS=$IFS; IFS=$ac_path_separator
23605 ac_dummy="$PATH:/usr/local/ncurses/bin"
23606 for ac_dir in $ac_dummy; do
23607   IFS=$ac_save_IFS
23608   test -z "$ac_dir" && ac_dir=.
23609   if $as_executable_p "$ac_dir/$ac_word"; then
23610    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23611    echo "$as_me:23611: found $ac_dir/$ac_word" >&5
23612    break
23613 fi
23614 done
23615
23616   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23617   ;;
23618 esac
23619 fi
23620 TIC_PATH=$ac_cv_path_TIC_PATH
23621
23622 if test -n "$TIC_PATH"; then
23623   echo "$as_me:23623: result: $TIC_PATH" >&5
23624 echo "${ECHO_T}$TIC_PATH" >&6
23625 else
23626   echo "$as_me:23626: result: no" >&5
23627 echo "${ECHO_T}no" >&6
23628 fi
23629
23630 if test -n "$FALLBACK_LIST"
23631 then
23632         if test "$TIC_PATH" = unknown
23633         then
23634                 { echo "$as_me:23634: WARNING: no tic program found for fallbacks" >&5
23635 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23636         fi
23637 fi
23638
23639 if test "x$cf_with_tests" != xno ; then
23640         MAKE_TESTS=
23641 else
23642         MAKE_TESTS="#"
23643 fi
23644
23645 ADAHTML_DIR=../../doc/html/ada
23646
23647 # these could be configurable, but are not currently
23648 PANEL_NAME=panel
23649 MENU_NAME=menu
23650 FORM_NAME=form
23651 CXX_NAME=ncurses++
23652
23653 # workaround for OS/2 (20151017)
23654 case $cf_cv_system_name in
23655 (os2*)
23656         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23657         ;;
23658 (*)
23659         LIBTOOL_OPTS_CXX=
23660         ;;
23661 esac
23662
23663 # workaround for g++ versus Solaris (20131116)
23664 case $cf_cv_system_name in
23665 (solaris2*)
23666         case "x$CPPFLAGS" in
23667         (*-D_XOPEN_SOURCE_EXTENDED*)
23668                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23669
23670 echo "${as_me:-configure}:23670: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23671
23672                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23673                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23674                 ;;
23675         esac
23676         ;;
23677 esac
23678
23679 # Help to automatically enable the extended curses features when using either
23680 # the *-config or the ".pc" files by adding defines.
23681 echo "$as_me:23681: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23682 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23683 PKG_CFLAGS=
23684 for cf_loop1 in $CPPFLAGS_after_XOPEN
23685 do
23686         cf_found=no
23687         for cf_loop2 in $CPPFLAGS_before_XOPEN
23688         do
23689                 if test "x$cf_loop1" = "x$cf_loop2"
23690                 then
23691                         cf_found=yes
23692                         break
23693                 fi
23694         done
23695         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23696 done
23697 echo "$as_me:23697: result: $PKG_CFLAGS" >&5
23698 echo "${ECHO_T}$PKG_CFLAGS" >&6
23699
23700 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23701 case "x$NCURSES_OSPEED" in
23702 (*short*)
23703         cf_compatible=1
23704         ;;
23705 (*)
23706         cf_compatible=0
23707         ;;
23708 esac
23709
23710 cat >>confdefs.h <<EOF
23711 #define NCURSES_OSPEED_COMPAT $cf_compatible
23712 EOF
23713
23714 case "x$cf_cv_typeof_chtype" in
23715 (xshort|xint|xlong)
23716         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23717         ;;
23718 esac
23719
23720 case "x$cf_cv_typeof_mmask_t" in
23721 (xshort|xint|xlong)
23722         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23723         ;;
23724 esac
23725
23726 # substitute into misc/Makefile to suppress
23727 # (un)install.data from the
23728 # (un)install rules.
23729 if test "x$cf_with_db_install" = "xno"; then
23730         MISC_INSTALL_DATA=
23731         MISC_UNINSTALL_DATA=
23732 else
23733         MISC_INSTALL_DATA=install.data
23734         MISC_UNINSTALL_DATA=uninstall.data
23735 fi
23736
23737 SUB_SCRIPTS=
23738
23739 if test -n "$PACKAGE"
23740 then
23741         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23742         export PACKAGE
23743         echo "package: $PACKAGE"
23744 fi
23745
23746 UNALTERED_SYMS=
23747 cf_filter_syms=no
23748
23749 if test -n "$RESULTING_SYMS"
23750 then
23751         cf_filter_syms=$cf_dft_filter_syms
23752         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23753
23754 echo "${as_me:-configure}:23754: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23755
23756 fi
23757
23758 if test "x$WILDCARD_SYMS" = xno
23759 then
23760         cf_filter_syms=yes
23761 fi
23762
23763 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23764
23765 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23766 if test $cf_filter_syms = yes
23767 then
23768         RESULTING_SYMS=resulting.map
23769 fi
23770
23771 if test "x$cross_compiling" = xyes ; then
23772         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23773         CHECK_BUILD="#"
23774 else
23775         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23776         CHECK_BUILD=
23777 fi
23778
23779 cat >>confdefs.h <<\EOF
23780 #define HAVE_CURSES_DATA_BOOLNAMES 1
23781 EOF
23782
23783 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"
23784 ac_config_commands="$ac_config_commands default"
23785 cat >confcache <<\_ACEOF
23786 # This file is a shell script that caches the results of configure
23787 # tests run on this system so they can be shared between configure
23788 # scripts and configure runs, see configure's option --config-cache.
23789 # It is not useful on other systems.  If it contains results you don't
23790 # want to keep, you may remove or edit it.
23791 #
23792 # config.status only pays attention to the cache file if you give it
23793 # the --recheck option to rerun configure.
23794 #
23795 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23796 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23797 # following values.
23798
23799 _ACEOF
23800
23801 # The following way of writing the cache mishandles newlines in values,
23802 # but we know of no workaround that is simple, portable, and efficient.
23803 # So, don't put newlines in cache variables' values.
23804 # Ultrix sh set writes to stderr and can't be redirected directly,
23805 # and sets the high bit in the cache file unless we assign to the vars.
23806 {
23807   (set) 2>&1 |
23808     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23809     *ac_space=\ *)
23810       # `set' does not quote correctly, so add quotes (double-quote
23811       # substitution turns \\\\ into \\, and sed turns \\ into \).
23812       sed -n \
23813         "s/'/'\\\\''/g;
23814           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23815       ;;
23816     *)
23817       # `set' quotes correctly as required by POSIX, so do not add quotes.
23818       sed -n \
23819         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23820       ;;
23821     esac;
23822 } |
23823   sed '
23824      t clear
23825      : clear
23826      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23827      t end
23828      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23829      : end' >>confcache
23830 if cmp -s $cache_file confcache; then :; else
23831   if test -w $cache_file; then
23832     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23833     cat confcache >$cache_file
23834   else
23835     echo "not updating unwritable cache $cache_file"
23836   fi
23837 fi
23838 rm -f confcache
23839
23840 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23841 # Let make expand exec_prefix.
23842 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23843
23844 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23845 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23846 # trailing colons and then remove the whole line if VPATH becomes empty
23847 # (actually we leave an empty line to preserve line numbers).
23848 if test "x$srcdir" = x.; then
23849   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23850 s/:*\$(srcdir):*/:/;
23851 s/:*\${srcdir}:*/:/;
23852 s/:*@srcdir@:*/:/;
23853 s/^\([^=]*=[    ]*\):*/\1/;
23854 s/:*$//;
23855 s/^[^=]*=[      ]*$//;
23856 }'
23857 fi
23858
23859 DEFS=-DHAVE_CONFIG_H
23860
23861 : ${CONFIG_STATUS=./config.status}
23862 ac_clean_files_save=$ac_clean_files
23863 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23864 { echo "$as_me:23864: creating $CONFIG_STATUS" >&5
23865 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23866 cat >$CONFIG_STATUS <<_ACEOF
23867 #! $SHELL
23868 # Generated automatically by configure.
23869 # Run this file to recreate the current configuration.
23870 # Compiler output produced by configure, useful for debugging
23871 # configure, is in config.log if it exists.
23872
23873 debug=false
23874 SHELL=\${CONFIG_SHELL-$SHELL}
23875 ac_cs_invocation="\$0 \$@"
23876
23877 _ACEOF
23878
23879 cat >>$CONFIG_STATUS <<\_ACEOF
23880 # Be Bourne compatible
23881 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23882   emulate sh
23883   NULLCMD=:
23884 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23885   set -o posix
23886 fi
23887
23888 # Name of the executable.
23889 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23890
23891 if expr a : '\(a\)' >/dev/null 2>&1; then
23892   as_expr=expr
23893 else
23894   as_expr=false
23895 fi
23896
23897 rm -f conf$$ conf$$.exe conf$$.file
23898 echo >conf$$.file
23899 if ln -s conf$$.file conf$$ 2>/dev/null; then
23900   # We could just check for DJGPP; but this test a) works b) is more generic
23901   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23902   if test -f conf$$.exe; then
23903     # Don't use ln at all; we don't have any links
23904     as_ln_s='cp -p'
23905   else
23906     as_ln_s='ln -s'
23907   fi
23908 elif ln conf$$.file conf$$ 2>/dev/null; then
23909   as_ln_s=ln
23910 else
23911   as_ln_s='cp -p'
23912 fi
23913 rm -f conf$$ conf$$.exe conf$$.file
23914
23915 as_executable_p="test -f"
23916
23917 # Support unset when possible.
23918 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23919   as_unset=unset
23920 else
23921   as_unset=false
23922 fi
23923
23924 # NLS nuisances.
23925 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23926 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23927 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23928 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23929 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23930 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23931 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23932 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23933
23934 # IFS
23935 # We need space, tab and new line, in precisely that order.
23936 as_nl='
23937 '
23938 IFS="   $as_nl"
23939
23940 # CDPATH.
23941 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23942
23943 exec 6>&1
23944
23945 _ACEOF
23946
23947 # Files that config.status was made for.
23948 if test -n "$ac_config_files"; then
23949   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23950 fi
23951
23952 if test -n "$ac_config_headers"; then
23953   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23954 fi
23955
23956 if test -n "$ac_config_links"; then
23957   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23958 fi
23959
23960 if test -n "$ac_config_commands"; then
23961   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23962 fi
23963
23964 cat >>$CONFIG_STATUS <<\EOF
23965
23966 ac_cs_usage="\
23967 \`$as_me' instantiates files from templates according to the
23968 current configuration.
23969
23970 Usage: $0 [OPTIONS] [FILE]...
23971
23972   -h, --help       print this help, then exit
23973   -V, --version    print version number, then exit
23974   -d, --debug      don't remove temporary files
23975       --recheck    update $as_me by reconfiguring in the same conditions
23976   --file=FILE[:TEMPLATE]
23977                    instantiate the configuration file FILE
23978   --header=FILE[:TEMPLATE]
23979                    instantiate the configuration header FILE
23980
23981 Configuration files:
23982 $config_files
23983
23984 Configuration headers:
23985 $config_headers
23986
23987 Configuration commands:
23988 $config_commands
23989
23990 Report bugs to <dickey@invisible-island.net>."
23991 EOF
23992
23993 cat >>$CONFIG_STATUS <<EOF
23994 ac_cs_version="\\
23995 config.status
23996 configured by $0, generated by GNU Autoconf 2.52.20170501,
23997   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23998
23999 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24000 Free Software Foundation, Inc.
24001 This config.status script is free software; the Free Software Foundation
24002 gives unlimited permission to copy, distribute and modify it."
24003 srcdir=$srcdir
24004 INSTALL="$INSTALL"
24005 EOF
24006
24007 cat >>$CONFIG_STATUS <<\EOF
24008 # If no file are specified by the user, then we need to provide default
24009 # value.  By we need to know if files were specified by the user.
24010 ac_need_defaults=:
24011 while test $# != 0
24012 do
24013   case $1 in
24014   --*=*)
24015     ac_option=`expr "x$1" : 'x\([^=]*\)='`
24016     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24017     shift
24018     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24019     shift
24020     ;;
24021   -*);;
24022   *) # This is not an option, so the user has probably given explicit
24023      # arguments.
24024      ac_need_defaults=false;;
24025   esac
24026
24027   case $1 in
24028   # Handling of the options.
24029 EOF
24030 cat >>$CONFIG_STATUS <<EOF
24031   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24032     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24033     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24034 EOF
24035 cat >>$CONFIG_STATUS <<\EOF
24036   --version | --vers* | -V )
24037     echo "$ac_cs_version"; exit 0 ;;
24038   --he | --h)
24039     # Conflict between --help and --header
24040     { { echo "$as_me:24040: error: ambiguous option: $1
24041 Try \`$0 --help' for more information." >&5
24042 echo "$as_me: error: ambiguous option: $1
24043 Try \`$0 --help' for more information." >&2;}
24044    { (exit 1); exit 1; }; };;
24045   --help | --hel | -h )
24046     echo "$ac_cs_usage"; exit 0 ;;
24047   --debug | --d* | -d )
24048     debug=: ;;
24049   --file | --fil | --fi | --f )
24050     shift
24051     CONFIG_FILES="$CONFIG_FILES $1"
24052     ac_need_defaults=false;;
24053   --header | --heade | --head | --hea )
24054     shift
24055     CONFIG_HEADERS="$CONFIG_HEADERS $1"
24056     ac_need_defaults=false;;
24057
24058   # This is an error.
24059   -*) { { echo "$as_me:24059: error: unrecognized option: $1
24060 Try \`$0 --help' for more information." >&5
24061 echo "$as_me: error: unrecognized option: $1
24062 Try \`$0 --help' for more information." >&2;}
24063    { (exit 1); exit 1; }; } ;;
24064
24065   *) ac_config_targets="$ac_config_targets $1" ;;
24066
24067   esac
24068   shift
24069 done
24070
24071 exec 5>>config.log
24072 cat >&5 << _ACEOF
24073
24074 ## ----------------------- ##
24075 ## Running config.status.  ##
24076 ## ----------------------- ##
24077
24078 This file was extended by $as_me 2.52.20170501, executed with
24079   CONFIG_FILES    = $CONFIG_FILES
24080   CONFIG_HEADERS  = $CONFIG_HEADERS
24081   CONFIG_LINKS    = $CONFIG_LINKS
24082   CONFIG_COMMANDS = $CONFIG_COMMANDS
24083   > $ac_cs_invocation
24084 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24085
24086 _ACEOF
24087 EOF
24088
24089 cat >>$CONFIG_STATUS <<EOF
24090 #
24091 # INIT-COMMANDS section.
24092 #
24093
24094 ### Special initialization commands, used to pass information from the
24095 ### configuration-run into config.status
24096
24097 AWK="$AWK"
24098 ALTERNATE_SYMS="$ALTERNATE_SYMS"
24099 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
24100 DFT_LWR_MODEL="$DFT_LWR_MODEL"
24101 ECHO_LD="$ECHO_LD"
24102 EXTRA_SUFFIX="$EXTRA_SUFFIX"
24103 LDCONFIG="$LDCONFIG"
24104 LIBTOOL_VERSION="$LIBTOOL_VERSION"
24105 LIB_NAME="$LIB_NAME"
24106 LIB_PREFIX="$LIB_PREFIX"
24107 LIB_SUBSETS="$LIB_SUBSETS"
24108 LIB_SUFFIX="$LIB_SUFFIX"
24109 LIB_TRACING="$LIB_TRACING"
24110 LN_S="$LN_S"
24111 MAKE_TERMINFO="$MAKE_TERMINFO"
24112 NCURSES_MAJOR="$NCURSES_MAJOR"
24113 NCURSES_MINOR="$NCURSES_MINOR"
24114 NCURSES_OSPEED="$NCURSES_OSPEED"
24115 NCURSES_PATCH="$NCURSES_PATCH"
24116 SRC_SUBDIRS="$SRC_SUBDIRS"
24117 TERMINFO="$TERMINFO"
24118 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
24119 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
24120 TICS_NAME="$TICS_NAME"
24121 TICS_SUFFIX="$TICS_SUFFIX"
24122 TIC_PATH="$TIC_PATH"
24123 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
24124 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
24125 TINFO_NAME="$TINFO_NAME"
24126 TINFO_SUFFIX="$TINFO_SUFFIX"
24127 UNALTERED_SYMS="$UNALTERED_SYMS"
24128 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
24129 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
24130 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
24131 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
24132 WILDCARD_SYMS="$WILDCARD_SYMS"
24133 WITH_CURSES_H="$with_curses_h"
24134 WITH_ECHO="${enable_echo:=yes}"
24135 WITH_OVERWRITE="$with_overwrite"
24136 cf_LIST_MODELS="$cf_list_models"
24137 cf_cv_abi_version="$cf_cv_abi_version"
24138 cf_cv_do_relink="$cf_cv_do_relink"
24139 cf_cv_do_symlinks="$cf_cv_do_symlinks"
24140 cf_cv_enable_lp64="$cf_cv_enable_lp64"
24141 cf_cv_enable_opaque="$cf_cv_enable_opaque"
24142 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
24143 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
24144 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
24145 cf_cv_rel_version="$cf_cv_rel_version"
24146 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
24147 cf_cv_shared_soname='$cf_cv_shared_soname'
24148 cf_cv_shlib_version="$cf_cv_shlib_version"
24149 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
24150 cf_cv_system_name="$cf_cv_system_name"
24151 cf_cv_term_driver="$with_term_driver"
24152 cf_with_ada="$cf_with_ada"
24153 cf_with_cxx_binding="$cf_with_cxx_binding"
24154 cf_with_db_install="$cf_with_db_install"
24155 cf_with_manpages="$cf_with_manpages"
24156 cf_with_tests="$cf_with_tests"
24157 host="$host"
24158 target="$target"
24159 with_shared_cxx="$with_shared_cxx"
24160
24161 EOF
24162
24163 cat >>$CONFIG_STATUS <<\EOF
24164 for ac_config_target in $ac_config_targets
24165 do
24166   case "$ac_config_target" in
24167   # Handling of arguments.
24168   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
24169   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
24170   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
24171   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
24172   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
24173   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
24174   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
24175   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24176   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24177   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
24178   *) { { echo "$as_me:24178: error: invalid argument: $ac_config_target" >&5
24179 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24180    { (exit 1); exit 1; }; };;
24181   esac
24182 done
24183
24184 # If the user did not use the arguments to specify the items to instantiate,
24185 # then the envvar interface is used.  Set only those that are not.
24186 # We use the long form for the default assignment because of an extremely
24187 # bizarre bug on SunOS 4.1.3.
24188 if $ac_need_defaults; then
24189   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24190   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24191   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24192 fi
24193
24194 # Create a temporary directory, and hook for its removal unless debugging.
24195 $debug ||
24196 {
24197   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24198   trap '{ (exit 1); exit 1; }' 1 2 13 15
24199 }
24200
24201 # Create a (secure) tmp directory for tmp files.
24202 : ${TMPDIR=/tmp}
24203 {
24204   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24205   test -n "$tmp" && test -d "$tmp"
24206 }  ||
24207 {
24208   tmp=$TMPDIR/cs$$-$RANDOM
24209   (umask 077 && mkdir $tmp)
24210 } ||
24211 {
24212    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24213    { (exit 1); exit 1; }
24214 }
24215
24216 EOF
24217
24218 cat >>$CONFIG_STATUS <<EOF
24219
24220 #
24221 # CONFIG_FILES section.
24222 #
24223
24224 # No need to generate the scripts if there are no CONFIG_FILES.
24225 # This happens for instance when ./config.status config.h
24226 if test -n "\$CONFIG_FILES"; then
24227   # Protect against being on the right side of a sed subst in config.status.
24228   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24229    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24230 s,@SHELL@,$SHELL,;t t
24231 s,@exec_prefix@,$exec_prefix,;t t
24232 s,@prefix@,$prefix,;t t
24233 s,@program_transform_name@,$program_transform_name,;t t
24234 s,@bindir@,$bindir,;t t
24235 s,@sbindir@,$sbindir,;t t
24236 s,@libexecdir@,$libexecdir,;t t
24237 s,@datarootdir@,$datarootdir,;t t
24238 s,@datadir@,$datadir,;t t
24239 s,@sysconfdir@,$sysconfdir,;t t
24240 s,@sharedstatedir@,$sharedstatedir,;t t
24241 s,@localstatedir@,$localstatedir,;t t
24242 s,@libdir@,$libdir,;t t
24243 s,@includedir@,$includedir,;t t
24244 s,@oldincludedir@,$oldincludedir,;t t
24245 s,@infodir@,$infodir,;t t
24246 s,@mandir@,$mandir,;t t
24247 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24248 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24249 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24250 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24251 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24252 s,@build_alias@,$build_alias,;t t
24253 s,@host_alias@,$host_alias,;t t
24254 s,@target_alias@,$target_alias,;t t
24255 s,@ECHO_C@,$ECHO_C,;t t
24256 s,@ECHO_N@,$ECHO_N,;t t
24257 s,@ECHO_T@,$ECHO_T,;t t
24258 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24259 s,@DEFS@,$DEFS,;t t
24260 s,@LIBS@,$LIBS,;t t
24261 s,@top_builddir@,$top_builddir,;t t
24262 s,@EGREP@,$EGREP,;t t
24263 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
24264 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
24265 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
24266 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24267 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24268 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
24269 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
24270 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
24271 s,@VERSION@,$VERSION,;t t
24272 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
24273 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
24274 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
24275 s,@PACKAGE@,$PACKAGE,;t t
24276 s,@build@,$build,;t t
24277 s,@build_cpu@,$build_cpu,;t t
24278 s,@build_vendor@,$build_vendor,;t t
24279 s,@build_os@,$build_os,;t t
24280 s,@host@,$host,;t t
24281 s,@host_cpu@,$host_cpu,;t t
24282 s,@host_vendor@,$host_vendor,;t t
24283 s,@host_os@,$host_os,;t t
24284 s,@target@,$target,;t t
24285 s,@target_cpu@,$target_cpu,;t t
24286 s,@target_vendor@,$target_vendor,;t t
24287 s,@target_os@,$target_os,;t t
24288 s,@CC@,$CC,;t t
24289 s,@CFLAGS@,$CFLAGS,;t t
24290 s,@LDFLAGS@,$LDFLAGS,;t t
24291 s,@CPPFLAGS@,$CPPFLAGS,;t t
24292 s,@ac_ct_CC@,$ac_ct_CC,;t t
24293 s,@EXEEXT@,$EXEEXT,;t t
24294 s,@OBJEXT@,$OBJEXT,;t t
24295 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24296 s,@CPP@,$CPP,;t t
24297 s,@LDCONFIG@,$LDCONFIG,;t t
24298 s,@CXX@,$CXX,;t t
24299 s,@CXXFLAGS@,$CXXFLAGS,;t t
24300 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
24301 s,@AWK@,$AWK,;t t
24302 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24303 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24304 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24305 s,@LINT@,$LINT,;t t
24306 s,@LINT_OPTS@,$LINT_OPTS,;t t
24307 s,@LN_S@,$LN_S,;t t
24308 s,@cf_config_suffix@,$cf_config_suffix,;t t
24309 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24310 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24311 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24312 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24313 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24314 s,@SET_MAKE@,$SET_MAKE,;t t
24315 s,@CTAGS@,$CTAGS,;t t
24316 s,@ETAGS@,$ETAGS,;t t
24317 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24318 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24319 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24320 s,@RANLIB@,$RANLIB,;t t
24321 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24322 s,@LD@,$LD,;t t
24323 s,@ac_ct_LD@,$ac_ct_LD,;t t
24324 s,@AR@,$AR,;t t
24325 s,@ac_ct_AR@,$ac_ct_AR,;t t
24326 s,@NM@,$NM,;t t
24327 s,@ac_ct_NM@,$ac_ct_NM,;t t
24328 s,@ARFLAGS@,$ARFLAGS,;t t
24329 s,@DESTDIR@,$DESTDIR,;t t
24330 s,@BUILD_CC@,$BUILD_CC,;t t
24331 s,@BUILD_CPP@,$BUILD_CPP,;t t
24332 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24333 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24334 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24335 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24336 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24337 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24338 s,@cf_list_models@,$cf_list_models,;t t
24339 s,@ABI_VERSION@,$ABI_VERSION,;t t
24340 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24341 s,@LIBTOOL@,$LIBTOOL,;t t
24342 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24343 s,@LT_UNDEF@,$LT_UNDEF,;t t
24344 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24345 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24346 s,@LIB_CREATE@,$LIB_CREATE,;t t
24347 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24348 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24349 s,@LIB_PREP@,$LIB_PREP,;t t
24350 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24351 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24352 s,@LIB_LINK@,$LIB_LINK,;t t
24353 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24354 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24355 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24356 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24357 s,@TICS_NAME@,$TICS_NAME,;t t
24358 s,@TINFO_NAME@,$TINFO_NAME,;t t
24359 s,@LIB_NAME@,$LIB_NAME,;t t
24360 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24361 s,@CC_G_OPT@,$CC_G_OPT,;t t
24362 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24363 s,@LD_MODEL@,$LD_MODEL,;t t
24364 s,@shlibdir@,$shlibdir,;t t
24365 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24366 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24367 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24368 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24369 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24370 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24371 s,@LINK_PROGS@,$LINK_PROGS,;t t
24372 s,@LINK_TESTS@,$LINK_TESTS,;t t
24373 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24374 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24375 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24376 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24377 s,@RPATH_LIST@,$RPATH_LIST,;t t
24378 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24379 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24380 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24381 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24382 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24383 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24384 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24385 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24386 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24387 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24388 s,@XTERM_KBS@,$XTERM_KBS,;t t
24389 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24390 s,@TERMINFO@,$TERMINFO,;t t
24391 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24392 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24393 s,@TERMPATH@,$TERMPATH,;t t
24394 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24395 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24396 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24397 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24398 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24399 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24400 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24401 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24402 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24403 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24404 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24405 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24406 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24407 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24408 s,@RGB_PATH@,$RGB_PATH,;t t
24409 s,@no_x11_rgb@,$no_x11_rgb,;t t
24410 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24411 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24412 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24413 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24414 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24415 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24416 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24417 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24418 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24419 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24420 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24421 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24422 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24423 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24424 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24425 s,@PTHREAD@,$PTHREAD,;t t
24426 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24427 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24428 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24429 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24430 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24431 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24432 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24433 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24434 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24435 s,@ECHO_LT@,$ECHO_LT,;t t
24436 s,@ECHO_LD@,$ECHO_LD,;t t
24437 s,@RULE_CC@,$RULE_CC,;t t
24438 s,@SHOW_CC@,$SHOW_CC,;t t
24439 s,@ECHO_CC@,$ECHO_CC,;t t
24440 s,@ECHO_LINK@,$ECHO_LINK,;t t
24441 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
24442 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
24443 s,@ADAFLAGS@,$ADAFLAGS,;t t
24444 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24445 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24446 s,@ADA_TRACE@,$ADA_TRACE,;t t
24447 s,@MATH_LIB@,$MATH_LIB,;t t
24448 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24449 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24450 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24451 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24452 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24453 s,@TEST_LIBS@,$TEST_LIBS,;t t
24454 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24455 s,@CXXCPP@,$CXXCPP,;t t
24456 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24457 s,@CXX_AR@,$CXX_AR,;t t
24458 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24459 s,@CXXLIBS@,$CXXLIBS,;t t
24460 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24461 s,@gnatmake_exists@,$gnatmake_exists,;t t
24462 s,@gprconfig_exists@,$gprconfig_exists,;t t
24463 s,@M4_exists@,$M4_exists,;t t
24464 s,@cf_ada_make@,$cf_ada_make,;t t
24465 s,@cf_ada_config@,$cf_ada_config,;t t
24466 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
24467 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
24468 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24469 s,@cf_compile_generics@,$cf_compile_generics,;t t
24470 s,@cf_generic_objects@,$cf_generic_objects,;t t
24471 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24472 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24473 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24474 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24475 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24476 s,@cf_ada_package@,$cf_ada_package,;t t
24477 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24478 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24479 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24480 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24481 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24482 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24483 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24484 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24485 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24486 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24487 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24488 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24489 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24490 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24491 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24492 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24493 s,@TICS_LIBS@,$TICS_LIBS,;t t
24494 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24495 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24496 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24497 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24498 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24499 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24500 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24501 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24502 s,@includesubdir@,$includesubdir,;t t
24503 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24504 s,@TICS_LIST@,$TICS_LIST,;t t
24505 s,@TINFO_LIST@,$TINFO_LIST,;t t
24506 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24507 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24508 s,@TEST_ARGS@,$TEST_ARGS,;t t
24509 s,@TEST_DEPS@,$TEST_DEPS,;t t
24510 s,@TEST_ARG2@,$TEST_ARG2,;t t
24511 s,@TEST_DEP2@,$TEST_DEP2,;t t
24512 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24513 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24514 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24515 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24516 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24517 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24518 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24519 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24520 s,@cross_compiling@,$cross_compiling,;t t
24521 s,@TIC_PATH@,$TIC_PATH,;t t
24522 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24523 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24524 s,@PANEL_NAME@,$PANEL_NAME,;t t
24525 s,@MENU_NAME@,$MENU_NAME,;t t
24526 s,@FORM_NAME@,$FORM_NAME,;t t
24527 s,@CXX_NAME@,$CXX_NAME,;t t
24528 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24529 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24530 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24531 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24532 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24533 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24534 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24535 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
24536 CEOF
24537
24538 EOF
24539
24540   cat >>$CONFIG_STATUS <<\EOF
24541   # Split the substitutions into bite-sized pieces for seds with
24542   # small command number limits, like on Digital OSF/1 and HP-UX.
24543   ac_max_sed_lines=48
24544   ac_sed_frag=1 # Number of current file.
24545   ac_beg=1 # First line for current file.
24546   ac_end=$ac_max_sed_lines # Line after last line for current file.
24547   ac_more_lines=:
24548   ac_sed_cmds=
24549   while $ac_more_lines; do
24550     if test $ac_beg -gt 1; then
24551       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24552     else
24553       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24554     fi
24555     if test ! -s $tmp/subs.frag; then
24556       ac_more_lines=false
24557     else
24558       # The purpose of the label and of the branching condition is to
24559       # speed up the sed processing (if there are no `@' at all, there
24560       # is no need to browse any of the substitutions).
24561       # These are the two extra sed commands mentioned above.
24562       (echo ':t
24563   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24564       # It is possible to make a multiline substitution using escaped newlines.
24565       # Ensure that we do not split the substitution between script fragments.
24566       ac_BEG=$ac_end
24567       ac_END=`expr $ac_end + $ac_max_sed_lines`
24568       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24569       if test -s $tmp/subs.next; then
24570         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24571         if test ! -s $tmp/subs.edit; then
24572           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24573           if test ! -s $tmp/subs.edit; then
24574             if test $ac_beg -gt 1; then
24575               ac_end=`expr $ac_end - 1`
24576               continue
24577             fi
24578           fi
24579         fi
24580       fi
24581
24582       if test -z "$ac_sed_cmds"; then
24583         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24584       else
24585         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24586       fi
24587       ac_sed_frag=`expr $ac_sed_frag + 1`
24588       ac_beg=$ac_end
24589       ac_end=`expr $ac_end + $ac_max_sed_lines`
24590     fi
24591   done
24592   if test -z "$ac_sed_cmds"; then
24593     ac_sed_cmds=cat
24594   fi
24595 fi # test -n "$CONFIG_FILES"
24596
24597 EOF
24598 cat >>$CONFIG_STATUS <<\EOF
24599 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24600   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24601   case $ac_file in
24602   - | *:- | *:-:* ) # input from stdin
24603         cat >$tmp/stdin
24604         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24605         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24606   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24607         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24608   * )   ac_file_in=$ac_file.in ;;
24609   esac
24610
24611   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24612   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24613          X"$ac_file" : 'X\(//\)[^/]' \| \
24614          X"$ac_file" : 'X\(//\)$' \| \
24615          X"$ac_file" : 'X\(/\)' \| \
24616          .     : '\(.\)' 2>/dev/null ||
24617 echo X"$ac_file" |
24618     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24619           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24620           /^X\(\/\/\)$/{ s//\1/; q; }
24621           /^X\(\/\).*/{ s//\1/; q; }
24622           s/.*/./; q'`
24623   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24624     { case "$ac_dir" in
24625   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24626   *)                      as_incr_dir=.;;
24627 esac
24628 as_dummy="$ac_dir"
24629 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24630   case $as_mkdir_dir in
24631     # Skip DOS drivespec
24632     ?:) as_incr_dir=$as_mkdir_dir ;;
24633     *)
24634       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24635       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24636     ;;
24637   esac
24638 done; }
24639
24640     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24641     # A "../" for each directory in $ac_dir_suffix.
24642     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24643   else
24644     ac_dir_suffix= ac_dots=
24645   fi
24646
24647   case $srcdir in
24648   .)  ac_srcdir=.
24649       if test -z "$ac_dots"; then
24650          ac_top_srcdir=.
24651       else
24652          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24653       fi ;;
24654   [\\/]* | ?:[\\/]* )
24655       ac_srcdir=$srcdir$ac_dir_suffix;
24656       ac_top_srcdir=$srcdir ;;
24657   *) # Relative path.
24658     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24659     ac_top_srcdir=$ac_dots$srcdir ;;
24660   esac
24661
24662   case $INSTALL in
24663   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24664   *) ac_INSTALL=$ac_dots$INSTALL ;;
24665   esac
24666
24667   if test x"$ac_file" != x-; then
24668     { echo "$as_me:24668: creating $ac_file" >&5
24669 echo "$as_me: creating $ac_file" >&6;}
24670     rm -f "$ac_file"
24671   fi
24672   # Let's still pretend it is `configure' which instantiates (i.e., don't
24673   # use $as_me), people would be surprised to read:
24674   #    /* config.h.  Generated automatically by config.status.  */
24675   configure_input="Generated automatically from `echo $ac_file_in |
24676                                                  sed 's,.*/,,'` by configure."
24677
24678   # First look for the input files in the build tree, otherwise in the
24679   # src tree.
24680   ac_file_inputs=`IFS=:
24681     for f in $ac_file_in; do
24682       case $f in
24683       -) echo $tmp/stdin ;;
24684       [\\/$]*)
24685          # Absolute (can't be DOS-style, as IFS=:)
24686          test -f "$f" || { { echo "$as_me:24686: error: cannot find input file: $f" >&5
24687 echo "$as_me: error: cannot find input file: $f" >&2;}
24688    { (exit 1); exit 1; }; }
24689          echo $f;;
24690       *) # Relative
24691          if test -f "$f"; then
24692            # Build tree
24693            echo $f
24694          elif test -f "$srcdir/$f"; then
24695            # Source tree
24696            echo $srcdir/$f
24697          else
24698            # /dev/null tree
24699            { { echo "$as_me:24699: error: cannot find input file: $f" >&5
24700 echo "$as_me: error: cannot find input file: $f" >&2;}
24701    { (exit 1); exit 1; }; }
24702          fi;;
24703       esac
24704     done` || { (exit 1); exit 1; }
24705 EOF
24706 cat >>$CONFIG_STATUS <<\EOF
24707   ac_warn_datarootdir=no
24708   if test x"$ac_file" != x-; then
24709     for ac_item in $ac_file_inputs
24710     do
24711       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24712       if test -n "$ac_seen"; then
24713         ac_used=`grep '@datarootdir@' $ac_item`
24714         if test -z "$ac_used"; then
24715           { echo "$as_me:24715: WARNING: datarootdir was used implicitly but not set:
24716 $ac_seen" >&5
24717 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24718 $ac_seen" >&2;}
24719           ac_warn_datarootdir=yes
24720         fi
24721       fi
24722       ac_seen=`grep '${datarootdir}' $ac_item`
24723       if test -n "$ac_seen"; then
24724         { echo "$as_me:24724: WARNING: datarootdir was used explicitly but not set:
24725 $ac_seen" >&5
24726 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24727 $ac_seen" >&2;}
24728         ac_warn_datarootdir=yes
24729       fi
24730     done
24731   fi
24732
24733 if test "x$ac_warn_datarootdir" = xyes; then
24734   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24735 fi
24736
24737 EOF
24738 cat >>$CONFIG_STATUS <<EOF
24739   sed "$ac_vpsub
24740 $extrasub
24741 EOF
24742 cat >>$CONFIG_STATUS <<\EOF
24743 :t
24744 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24745 s,@configure_input@,$configure_input,;t t
24746 s,@srcdir@,$ac_srcdir,;t t
24747 s,@top_srcdir@,$ac_top_srcdir,;t t
24748 s,@INSTALL@,$ac_INSTALL,;t t
24749 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24750   rm -f $tmp/stdin
24751   if test x"$ac_file" != x-; then
24752     cp $tmp/out $ac_file
24753
24754     for ac_name in prefix exec_prefix datarootdir
24755     do
24756         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24757         if test -n "$ac_seen"; then
24758             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24759             if test -z "$ac_init"; then
24760               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24761               { echo "$as_me:24761: WARNING: Variable $ac_name is used but was not set:
24762 $ac_seen" >&5
24763 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24764 $ac_seen" >&2;}
24765             fi
24766         fi
24767     done
24768     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24769     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24770     if test -s $tmp/out; then
24771       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24772       { echo "$as_me:24772: WARNING: Some variables may not be substituted:
24773 $ac_seen" >&5
24774 echo "$as_me: WARNING: Some variables may not be substituted:
24775 $ac_seen" >&2;}
24776     fi
24777   else
24778     cat $tmp/out
24779   fi
24780   rm -f $tmp/out
24781
24782 done
24783 EOF
24784 cat >>$CONFIG_STATUS <<\EOF
24785
24786 #
24787 # CONFIG_HEADER section.
24788 #
24789
24790 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24791 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24792 #
24793 # ac_d sets the value in "#define NAME VALUE" lines.
24794 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24795 ac_dB='[        ].*$,\1#\2'
24796 ac_dC=' '
24797 ac_dD=',;t'
24798 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24799 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24800 ac_iB='\([      ]\),\1#\2define\3'
24801 ac_iC=' '
24802 ac_iD='\4,;t'
24803 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24804 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24805 ac_uB='$,\1#\2define\3'
24806 ac_uC=' '
24807 ac_uD=',;t'
24808
24809 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24810   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24811   case $ac_file in
24812   - | *:- | *:-:* ) # input from stdin
24813         cat >$tmp/stdin
24814         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24815         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24816   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24817         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24818   * )   ac_file_in=$ac_file.in ;;
24819   esac
24820
24821   test x"$ac_file" != x- && { echo "$as_me:24821: creating $ac_file" >&5
24822 echo "$as_me: creating $ac_file" >&6;}
24823
24824   # First look for the input files in the build tree, otherwise in the
24825   # src tree.
24826   ac_file_inputs=`IFS=:
24827     for f in $ac_file_in; do
24828       case $f in
24829       -) echo $tmp/stdin ;;
24830       [\\/$]*)
24831          # Absolute (can't be DOS-style, as IFS=:)
24832          test -f "$f" || { { echo "$as_me:24832: error: cannot find input file: $f" >&5
24833 echo "$as_me: error: cannot find input file: $f" >&2;}
24834    { (exit 1); exit 1; }; }
24835          echo $f;;
24836       *) # Relative
24837          if test -f "$f"; then
24838            # Build tree
24839            echo $f
24840          elif test -f "$srcdir/$f"; then
24841            # Source tree
24842            echo $srcdir/$f
24843          else
24844            # /dev/null tree
24845            { { echo "$as_me:24845: error: cannot find input file: $f" >&5
24846 echo "$as_me: error: cannot find input file: $f" >&2;}
24847    { (exit 1); exit 1; }; }
24848          fi;;
24849       esac
24850     done` || { (exit 1); exit 1; }
24851   # Remove the trailing spaces.
24852   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24853
24854 EOF
24855
24856 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24857 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24858 # be either 'cat' or 'sort'.
24859 cat confdefs.h | uniq >conftest.vals
24860
24861 # Break up conftest.vals because some shells have a limit on
24862 # the size of here documents, and old seds have small limits too.
24863
24864 rm -f conftest.tail
24865 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24866 while grep . conftest.vals >/dev/null
24867 do
24868   # Write chunks of a limited-size here document to conftest.frag.
24869   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24870   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24871   echo 'CEOF' >> $CONFIG_STATUS
24872   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24873   rm -f conftest.vals
24874   mv conftest.tail conftest.vals
24875 done
24876 rm -f conftest.vals
24877
24878 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24879 # marker @DEFS@.
24880 echo '  cat >> conftest.edit <<CEOF
24881 /@DEFS@/r conftest.frag
24882 /@DEFS@/d
24883 CEOF
24884 sed -f conftest.edit $tmp/in > $tmp/out
24885 rm -f $tmp/in
24886 mv $tmp/out $tmp/in
24887 rm -f conftest.edit conftest.frag
24888 ' >> $CONFIG_STATUS
24889
24890 cat >>$CONFIG_STATUS <<\EOF
24891   # Let's still pretend it is `configure' which instantiates (i.e., don't
24892   # use $as_me), people would be surprised to read:
24893   #    /* config.h.  Generated automatically by config.status.  */
24894   if test x"$ac_file" = x-; then
24895     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24896   else
24897     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24898   fi
24899   cat $tmp/in >>$tmp/config.h
24900   rm -f $tmp/in
24901   if test x"$ac_file" != x-; then
24902     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24903       { echo "$as_me:24903: $ac_file is unchanged" >&5
24904 echo "$as_me: $ac_file is unchanged" >&6;}
24905     else
24906       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24907          X"$ac_file" : 'X\(//\)[^/]' \| \
24908          X"$ac_file" : 'X\(//\)$' \| \
24909          X"$ac_file" : 'X\(/\)' \| \
24910          .     : '\(.\)' 2>/dev/null ||
24911 echo X"$ac_file" |
24912     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24913           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24914           /^X\(\/\/\)$/{ s//\1/; q; }
24915           /^X\(\/\).*/{ s//\1/; q; }
24916           s/.*/./; q'`
24917       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24918         { case "$ac_dir" in
24919   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24920   *)                      as_incr_dir=.;;
24921 esac
24922 as_dummy="$ac_dir"
24923 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24924   case $as_mkdir_dir in
24925     # Skip DOS drivespec
24926     ?:) as_incr_dir=$as_mkdir_dir ;;
24927     *)
24928       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24929       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24930     ;;
24931   esac
24932 done; }
24933
24934       fi
24935       rm -f $ac_file
24936       mv $tmp/config.h $ac_file
24937     fi
24938   else
24939     cat $tmp/config.h
24940     rm -f $tmp/config.h
24941   fi
24942 done
24943 EOF
24944 cat >>$CONFIG_STATUS <<\EOF
24945 #
24946 # CONFIG_COMMANDS section.
24947 #
24948 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24949   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24950   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24951
24952   case $ac_dest in
24953     default )
24954 if test "x$cf_with_tests" != xno ; then
24955
24956 for cf_dir in test
24957 do
24958         if test ! -d $srcdir/$cf_dir; then
24959                 continue
24960         elif test -f $srcdir/$cf_dir/programs; then
24961                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24962         fi
24963 done
24964
24965 fi
24966
24967 cf_prefix=$LIB_PREFIX
24968
24969 case $cf_cv_shlib_version in
24970 (cygdll|msysdll|mingw)
24971         TINFO_NAME=$TINFO_ARG_SUFFIX
24972         TINFO_SUFFIX=.dll
24973         ;;
24974 esac
24975
24976 if test -n "$TINFO_SUFFIX" ; then
24977         case $TINFO_SUFFIX in
24978         (tw*)
24979                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24980                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24981                 ;;
24982         (t*)
24983                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24984                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24985                 ;;
24986         (w*)
24987                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24988                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24989                 ;;
24990         esac
24991 fi
24992
24993 for cf_dir in $SRC_SUBDIRS
24994 do
24995         if test ! -d $srcdir/$cf_dir ; then
24996                 continue
24997         elif test -f $srcdir/$cf_dir/modules; then
24998
24999                 SHARED_LIB=
25000                 Libs_To_Make=
25001                 cf_awk_program=
25002                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
25003                 then
25004                         cf_awk_program="$cf_awk_program\
25005 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
25006 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
25007 "
25008                 fi
25009
25010                 if test "x$WILDCARD_SYMS" = xno
25011                 then
25012                         cf_awk_program="$cf_awk_program\
25013 /[      ]_\\*;/ { skip=1; next; }\
25014 "
25015                 fi
25016
25017                 if test "x$cf_awk_program" != "x"
25018                 then
25019                         cat >>$cf_dir/Makefile <<CF_EOF
25020
25021 # Generated by CF_LIB_RULES
25022 resulting.map: $UNALTERED_SYMS
25023         $AWK 'BEGIN { skip = 1; last=""; } \
25024 $cf_awk_program \
25025 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
25026  skip = 0; last = \$\$0; } \
25027 END { print last; }' < $UNALTERED_SYMS >\$@
25028
25029 distclean::
25030         rm -f resulting.map
25031 CF_EOF
25032                 fi
25033
25034                 for cf_item in $cf_LIST_MODELS
25035                 do
25036
25037         case X$cf_item in
25038         (Xlibtool)
25039                 cf_suffix='.la'
25040                 cf_depsuf=$cf_suffix
25041                 ;;
25042         (Xdebug)
25043                 cf_suffix='_g.a'
25044                 cf_depsuf=$cf_suffix
25045                 ;;
25046         (Xprofile)
25047                 cf_suffix='_p.a'
25048                 cf_depsuf=$cf_suffix
25049                 ;;
25050         (Xshared)
25051                 case $cf_cv_system_name in
25052                 (aix[5-7]*)
25053                         cf_suffix='.so'
25054                         cf_depsuf=$cf_suffix
25055                         ;;
25056                 (cygwin*|msys*|mingw*)
25057                         cf_suffix='.dll'
25058                         cf_depsuf='.dll.a'
25059                         ;;
25060                 (darwin*)
25061                         cf_suffix='.dylib'
25062                         cf_depsuf=$cf_suffix
25063                         ;;
25064                 (hpux*)
25065                         case $target in
25066                         (ia64*)
25067                                 cf_suffix='.so'
25068                                 cf_depsuf=$cf_suffix
25069                                 ;;
25070                         (*)
25071                                 cf_suffix='.sl'
25072                                 cf_depsuf=$cf_suffix
25073                                 ;;
25074                         esac
25075                         ;;
25076                 (*)
25077                         cf_suffix='.so'
25078                         cf_depsuf=$cf_suffix
25079                         ;;
25080                 esac
25081                 ;;
25082         (*)
25083                 cf_suffix='.a'
25084                 cf_depsuf=$cf_suffix
25085                 ;;
25086         esac
25087         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25088         then
25089                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25090                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25091         fi
25092
25093                         cf_libname=$cf_dir
25094                         test "$cf_dir" = c++ && cf_libname=ncurses++
25095                         if test $cf_item = shared ; then
25096                                 if test -n "${LIB_SUFFIX}"
25097                                 then
25098                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25099                                 else
25100                                         cf_shared_suffix="$cf_suffix"
25101                                 fi
25102                                 if test "$cf_cv_do_symlinks" = yes ; then
25103                                         cf_version_name=
25104
25105                                         case "$cf_cv_shlib_version" in
25106                                         (rel)
25107                                                 cf_version_name=REL_VERSION
25108                                                 ;;
25109                                         (abi)
25110                                                 cf_version_name=ABI_VERSION
25111                                                 ;;
25112                                         esac
25113
25114                                         if test -n "$cf_version_name"
25115                                         then
25116                                                 case "$cf_cv_system_name" in
25117                                                 (darwin*)
25118                                                         # "w", etc?
25119                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
25120                                                         ;;
25121                                                 (*)
25122                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
25123                                                         ;;
25124                                                 esac
25125                                         fi
25126                                         if test -n "${USE_LIB_SUFFIX}"
25127                                         then
25128                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25129                                         else
25130                                                 cf_shared_suffix="$cf_suffix"
25131                                         fi
25132                                 fi
25133                                 # cygwin needs import library, and has unique naming convention
25134                                 # use autodetected ${cf_prefix} for import lib and static lib, but
25135                                 # use 'cyg' prefix for shared lib.
25136                                 case $cf_cv_shlib_version in
25137                                 (cygdll)
25138                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25139                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
25140                                         ;;
25141                                 (msysdll)
25142                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25143                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
25144                                         ;;
25145                                 (mingw)
25146                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25147                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
25148                                         ;;
25149                                 (*)
25150                                         cf_add_lib=
25151                                         ;;
25152                                 esac
25153                                 if test -n "$cf_add_lib"
25154                                 then
25155                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25156                                         continue
25157                                 fi
25158                         fi
25159                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
25160                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25161                 done
25162
25163                 if test $cf_dir = ncurses ; then
25164                         cf_subsets="$LIB_SUBSETS"
25165                         cf_r_parts="$cf_subsets"
25166                         cf_liblist="$Libs_To_Make"
25167
25168                         while test -n "$cf_r_parts"
25169                         do
25170                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
25171                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
25172                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
25173                                         cf_add_lib=
25174                                         case $cf_l_parts in
25175                                         (*termlib*)
25176                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
25177                                                 ;;
25178                                         (*ticlib*)
25179                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
25180                                                 ;;
25181                                         (*)
25182                                                 break
25183                                                 ;;
25184                                         esac
25185                                         if test -n "$cf_add_lib"; then
25186                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
25187                                         fi
25188                                 else
25189                                         break
25190                                 fi
25191                         done
25192                 else
25193                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
25194                 fi
25195
25196                 if test $cf_dir = c++; then
25197                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
25198                                 cf_list=
25199                                 for cf_item in $Libs_To_Make
25200                                 do
25201                                         case $cf_item in
25202                                         (*.a)
25203                                                 ;;
25204                                         (*)
25205                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
25206                                                 ;;
25207                                         esac
25208                                         for cf_test in $cf_list
25209                                         do
25210                                                 if test "$cf_test" = "$cf_item"
25211                                                 then
25212                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
25213                                                         cf_item=
25214                                                         break
25215                                                 fi
25216                                         done
25217                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
25218                                 done
25219                                 Libs_To_Make="$cf_list"
25220                         fi
25221                 fi
25222
25223                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
25224                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
25225                         $cf_dir/Makefile >$cf_dir/Makefile.out
25226                 mv $cf_dir/Makefile.out $cf_dir/Makefile
25227
25228                 $AWK -f $srcdir/mk-0th.awk \
25229                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
25230                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25231
25232                 for cf_subset in $cf_subsets
25233                 do
25234                         cf_subdirs=
25235                         for cf_item in $cf_LIST_MODELS
25236                         do
25237
25238                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
25239
25240 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25241
25242                         CXX_MODEL=$cf_ITEM
25243                         if test "$CXX_MODEL" = SHARED; then
25244                                 case $cf_cv_shlib_version in
25245                                 (cygdll|msysdll|mingw)
25246                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
25247
25248 echo "${as_me:-configure}:25248: testing overriding CXX_MODEL to SHARED ..." 1>&5
25249
25250                                         with_shared_cxx=yes
25251                                         ;;
25252                                 (*)
25253                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
25254                                         ;;
25255                                 esac
25256                         fi
25257
25258         case X$cf_item in
25259         (Xlibtool)
25260                 cf_suffix='.la'
25261                 cf_depsuf=$cf_suffix
25262                 ;;
25263         (Xdebug)
25264                 cf_suffix='_g.a'
25265                 cf_depsuf=$cf_suffix
25266                 ;;
25267         (Xprofile)
25268                 cf_suffix='_p.a'
25269                 cf_depsuf=$cf_suffix
25270                 ;;
25271         (Xshared)
25272                 case $cf_cv_system_name in
25273                 (aix[5-7]*)
25274                         cf_suffix='.so'
25275                         cf_depsuf=$cf_suffix
25276                         ;;
25277                 (cygwin*|msys*|mingw*)
25278                         cf_suffix='.dll'
25279                         cf_depsuf='.dll.a'
25280                         ;;
25281                 (darwin*)
25282                         cf_suffix='.dylib'
25283                         cf_depsuf=$cf_suffix
25284                         ;;
25285                 (hpux*)
25286                         case $target in
25287                         (ia64*)
25288                                 cf_suffix='.so'
25289                                 cf_depsuf=$cf_suffix
25290                                 ;;
25291                         (*)
25292                                 cf_suffix='.sl'
25293                                 cf_depsuf=$cf_suffix
25294                                 ;;
25295                         esac
25296                         ;;
25297                 (*)
25298                         cf_suffix='.so'
25299                         cf_depsuf=$cf_suffix
25300                         ;;
25301                 esac
25302                 ;;
25303         (*)
25304                 cf_suffix='.a'
25305                 cf_depsuf=$cf_suffix
25306                 ;;
25307         esac
25308         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25309         then
25310                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25311                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25312         fi
25313
25314         case $cf_item in
25315         (libtool) cf_subdir='obj_lo'  ;;
25316         (normal)  cf_subdir='objects' ;;
25317         (debug)   cf_subdir='obj_g' ;;
25318         (profile) cf_subdir='obj_p' ;;
25319         (shared)
25320                 case $cf_cv_system_name in
25321                 (cygwin|msys)
25322                         cf_subdir='objects' ;;
25323                 (*)
25324                         cf_subdir='obj_s' ;;
25325                 esac
25326         esac
25327
25328                         # Test for case where we build libtinfo with a different name.
25329                         cf_libname=$cf_dir
25330                         if test $cf_dir = ncurses ; then
25331                                 case $cf_subset in
25332                                 (*base*)
25333                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25334                                         ;;
25335                                 (*termlib*)
25336                                         cf_libname=$TINFO_LIB_SUFFIX
25337                                         ;;
25338                                 (ticlib*)
25339                                         cf_libname=$TICS_LIB_SUFFIX
25340                                         ;;
25341                                 esac
25342                         elif test $cf_dir = c++ ; then
25343                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25344                         else
25345                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25346                         fi
25347                         if test -n "${USE_ARG_SUFFIX}" ; then
25348                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25349                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25350                         fi
25351
25352                         # These dependencies really are for development, not
25353                         # builds, but they are useful in porting, too.
25354                         cf_depend="../include/ncurses_cfg.h"
25355                         if test "$srcdir" = "."; then
25356                                 cf_reldir="."
25357                         else
25358                                 cf_reldir="\${srcdir}"
25359                         fi
25360
25361                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25362                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25363                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25364                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25365                         fi
25366
25367                         cf_dir_suffix=
25368                         old_cf_suffix="$cf_suffix"
25369                         if test "$cf_cv_shlib_version_infix" = yes ; then
25370                         if test -n "$USE_LIB_SUFFIX" ; then
25371                                 case $USE_LIB_SUFFIX in
25372                                 (tw*)
25373                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25374                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25375                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25376                                         ;;
25377                                 (t*)
25378                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25379                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25380                                         cf_dir_suffix=t$EXTRA_SUFFIX
25381                                         ;;
25382                                 (w*)
25383                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25384                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25385                                         cf_dir_suffix=w$EXTRA_SUFFIX
25386                                         ;;
25387                                 (*)
25388                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25389                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25390                                         cf_dir_suffix=$EXTRA_SUFFIX
25391                                         ;;
25392                                 esac
25393                         fi
25394                         fi
25395
25396                         $AWK -f $srcdir/mk-1st.awk \
25397                                 name=${cf_libname}${cf_dir_suffix} \
25398                                 traces=$LIB_TRACING \
25399                                 MODEL=$cf_ITEM \
25400                                 CXX_MODEL=$CXX_MODEL \
25401                                 model=$cf_subdir \
25402                                 prefix=$cf_prefix \
25403                                 suffix=$cf_suffix \
25404                                 subset=$cf_subset \
25405                                 driver=$cf_cv_term_driver \
25406                                 SymLink="$LN_S" \
25407                                 TermlibRoot=$TINFO_NAME \
25408                                 TermlibSuffix=$TINFO_SUFFIX \
25409                                 ShlibVer=$cf_cv_shlib_version \
25410                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25411                                 ReLink=${cf_cv_do_relink:-no} \
25412                                 DoLinks=$cf_cv_do_symlinks \
25413                                 rmSoLocs=$cf_cv_rm_so_locs \
25414                                 ldconfig="$LDCONFIG" \
25415                                 overwrite=$WITH_OVERWRITE \
25416                                 depend="$cf_depend" \
25417                                 host="$host" \
25418                                 libtool_version="$LIBTOOL_VERSION" \
25419                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25420
25421                         cf_suffix="$old_cf_suffix"
25422
25423                         for cf_subdir2 in $cf_subdirs lib
25424                         do
25425                                 test $cf_subdir = $cf_subdir2 && break
25426                         done
25427                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25428                         $AWK -f $srcdir/mk-2nd.awk \
25429                                 name=$cf_dir \
25430                                 traces=$LIB_TRACING \
25431                                 MODEL=$cf_ITEM \
25432                                 model=$cf_subdir \
25433                                 subset=$cf_subset \
25434                                 srcdir=$srcdir \
25435                                 echo=$WITH_ECHO \
25436                                 crenames=$cf_cv_prog_CC_c_o \
25437                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25438                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25439                         cf_subdirs="$cf_subdirs $cf_subdir"
25440                         done
25441                 done
25442         fi
25443
25444         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25445 done
25446
25447 for cf_dir in $SRC_SUBDIRS
25448 do
25449         if test ! -d $srcdir/$cf_dir ; then
25450                 continue
25451         fi
25452
25453         if test -f $cf_dir/Makefile ; then
25454                 case "$cf_dir" in
25455                 (Ada95)
25456                         echo 'libs \' >> Makefile
25457                         echo 'install.libs \' >> Makefile
25458                         echo 'uninstall.libs ::' >> Makefile
25459                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25460                         ;;
25461                 esac
25462         fi
25463
25464         if test -f $srcdir/$cf_dir/modules; then
25465                 echo >> Makefile
25466                 if test -f $srcdir/$cf_dir/headers; then
25467 cat >> Makefile <<CF_EOF
25468 install.includes \\
25469 uninstall.includes \\
25470 CF_EOF
25471                 fi
25472 if test "$cf_dir" != "c++" ; then
25473 echo 'lint \' >> Makefile
25474 fi
25475 cat >> Makefile <<CF_EOF
25476 libs \\
25477 lintlib \\
25478 install.libs \\
25479 uninstall.libs \\
25480 install.$cf_dir \\
25481 uninstall.$cf_dir ::
25482         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25483 CF_EOF
25484         elif test -f $srcdir/$cf_dir/headers; then
25485 cat >> Makefile <<CF_EOF
25486
25487 libs \\
25488 install.libs \\
25489 uninstall.libs \\
25490 install.includes \\
25491 uninstall.includes ::
25492         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25493 CF_EOF
25494 fi
25495 done
25496
25497 if test "x$cf_with_db_install" = xyes; then
25498 cat >> Makefile <<CF_EOF
25499
25500 install.libs uninstall.libs \\
25501 install.data uninstall.data ::
25502 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25503 CF_EOF
25504 else
25505 cat >> Makefile <<CF_EOF
25506
25507 install.libs uninstall.libs ::
25508         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25509 CF_EOF
25510 fi
25511
25512 if test "x$cf_with_manpages" = xyes; then
25513 cat >> Makefile <<CF_EOF
25514
25515 install.man \\
25516 uninstall.man ::
25517         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25518 CF_EOF
25519 fi
25520
25521 cat >> Makefile <<CF_EOF
25522
25523 distclean ::
25524         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25525         rm -f headers.sh headers.sed mk_shared_lib.sh
25526         rm -f edit_man.* man_alias.*
25527         rm -rf \${DIRS_TO_MAKE}
25528 CF_EOF
25529
25530 # Special case: tack's manpage lives in its own directory.
25531 if test "x$cf_with_manpages" = xyes; then
25532 if test "x$cf_with_tack" = "xyes"; then
25533 cat >> Makefile <<CF_EOF
25534
25535 install.man \\
25536 uninstall.man ::
25537         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25538 CF_EOF
25539 fi
25540 fi
25541
25542 rm -f headers.sed headers.sh
25543
25544 echo creating headers.sh
25545 cat >headers.sh <<CF_EOF
25546 #! $SHELL
25547 # This shell script is generated by the 'configure' script.  It is invoked in a
25548 # subdirectory of the build tree.  It generates a sed-script in the parent
25549 # directory that is used to adjust includes for header files that reside in a
25550 # subdirectory of /usr/include, etc.
25551 PRG=""
25552 while test \$# != 3
25553 do
25554 PRG="\$PRG \$1"; shift
25555 done
25556 DST=\$1
25557 REF=\$2
25558 SRC=\$3
25559 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25560 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25561 echo installing \$SRC in \$DST
25562 CF_EOF
25563
25564 if test $WITH_CURSES_H = yes; then
25565         cat >>headers.sh <<CF_EOF
25566 case \$DST in
25567 (/*/include/*)
25568         END=\`basename \$DST\`
25569         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25570         do
25571                 NAME=\`basename \$i\`
25572                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25573         done
25574         ;;
25575 (*)
25576         echo "" >> \$TMPSED
25577         ;;
25578 esac
25579 CF_EOF
25580
25581 else
25582         cat >>headers.sh <<CF_EOF
25583 case \$DST in
25584 (/*/include/*)
25585         END=\`basename \$DST\`
25586         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25587         do
25588                 NAME=\`basename \$i\`
25589                 if test "\$NAME" = "curses.h"
25590                 then
25591                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25592                         NAME=ncurses.h
25593                 fi
25594                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25595         done
25596         ;;
25597 (*)
25598         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25599         ;;
25600 esac
25601 CF_EOF
25602 fi
25603 cat >>headers.sh <<CF_EOF
25604 rm -f \$TMPSRC
25605 sed -f \$TMPSED \$SRC > \$TMPSRC
25606 NAME=\`basename \$SRC\`
25607 CF_EOF
25608 if test $WITH_CURSES_H != yes; then
25609         cat >>headers.sh <<CF_EOF
25610 test "\$NAME" = "curses.h" && NAME=ncurses.h
25611 CF_EOF
25612 fi
25613 cat >>headers.sh <<CF_EOF
25614 # Just in case someone gzip'd manpages, remove the conflicting copy.
25615 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25616
25617 eval \$PRG \$TMPSRC \$DST/\$NAME
25618 rm -f \$TMPSRC \$TMPSED
25619 CF_EOF
25620
25621 chmod 0755 headers.sh
25622
25623 for cf_dir in $SRC_SUBDIRS
25624 do
25625         if test ! -d $srcdir/$cf_dir ; then
25626                 continue
25627         fi
25628
25629         if test -f $srcdir/$cf_dir/headers; then
25630                 $AWK -f $srcdir/mk-hdr.awk \
25631                         subset="$LIB_SUBSETS" \
25632                         compat="$WITH_CURSES_H" \
25633                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25634         fi
25635
25636         if test -f $srcdir/$cf_dir/modules; then
25637                 if test "$cf_dir" != "c++" ; then
25638                         cat >>$cf_dir/Makefile <<"CF_EOF"
25639 depend : ${AUTO_SRC}
25640         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25641
25642 # DO NOT DELETE THIS LINE -- make depend depends on it.
25643 CF_EOF
25644                 fi
25645         fi
25646 done
25647
25648 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25649 if test -z "$USE_OLD_MAKERULES" ; then
25650         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25651 fi
25652 fi
25653  ;;
25654   esac
25655 done
25656 EOF
25657
25658 cat >>$CONFIG_STATUS <<\EOF
25659
25660 { (exit 0); exit 0; }
25661 EOF
25662 chmod +x $CONFIG_STATUS
25663 ac_clean_files=$ac_clean_files_save
25664
25665 # configure is writing to config.log, and then calls config.status.
25666 # config.status does its own redirection, appending to config.log.
25667 # Unfortunately, on DOS this fails, as config.log is still kept open
25668 # by configure, so config.status won't be able to write to it; its
25669 # output is simply discarded.  So we exec the FD to /dev/null,
25670 # effectively closing config.log, so it can be properly (re)opened and
25671 # appended to by config.status.  When coming back to configure, we
25672 # need to make the FD available again.
25673 if test "$no_create" != yes; then
25674   ac_cs_success=:
25675   exec 5>/dev/null
25676   $SHELL $CONFIG_STATUS || ac_cs_success=false
25677   exec 5>>config.log
25678   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25679   # would make configure fail if this is the last instruction.
25680   $ac_cs_success || { (exit 1); exit 1; }
25681 fi
25682 ${MAKE:-make} preinstall