]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20171216
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.647 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-pkg-config{=path} enable/disable use of pkg-config
716   --with-pkg-config-libdir=XXX use given directory for installing pc-files
717   --enable-pc-files       generate and install .pc files for pkg-config
718   --with-pc-suffix        suffixes pc-files
719   --enable-mixed-case     tic should assume mixed-case filenames
720   --with-install-prefix   prefixes actual install-location ($DESTDIR)
721 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
722   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
723   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
724   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
725   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
726   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
727   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
728 Options to Specify the Libraries Built/Used:
729   --disable-libtool-version  enable to use libtool's incompatible naming scheme
730   --with-libtool          generate libraries with libtool
731   --with-shared           generate shared-libraries
732   --with-normal           generate normal-libraries (default)
733   --with-debug            generate debug-libraries (default)
734   --with-profile          generate profile-libraries
735   --with-cxx-shared       generate C++ shared-libraries
736   --with-lib-prefix       override library-prefix
737   --with-termlib          generate separate terminfo library
738   --with-ticlib           generate separate tic library
739   --with-gpm              use Alessandro Rubini's GPM library
740   --without-dlsym         do not use dlsym() to load GPM dynamically
741   --with-sysmouse         use sysmouse (FreeBSD console)
742   --enable-rpath          use rpath option when generating shared libraries
743   --disable-relink        relink shared libraries during install
744   --with-shlib-version=X  Specify rel or abi version for shared libs
745   --with-libtool-opts=XXX specify additional libtool options
746   --with-export-syms=XXX  limit exported symbols using libtool
747   --with-versioned-syms=X markup versioned symbols using ld
748   --disable-lib-suffixes  disable library suffixes
749   --disable-rpath-hack    don't add rpath options for additional libraries
750 Fine-Tuning Your Configuration:
751   --with-extra-suffix=X   append extra suffix to header/library paths
752   --disable-overwrite     put headers in subdir, omit link to -lcurses
753   --disable-database      do not use terminfo, only fallbacks/termcap
754   --with-database=XXX     specify terminfo source to install
755   --with-hashed-db        specify hashed-database library
756   --with-fallbacks=XXX    specify list of fallback terminal descriptions
757   --without-xterm-new     specify if xterm terminfo should be old version
758   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
759   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
760   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
761   --disable-big-core      assume machine has little memory
762   --disable-big-strings   assume compiler has only standard-size strings
763   --enable-termcap        compile in termcap fallback support
764   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
765   --enable-getcap         fast termcap load, no xrefs to terminfo
766   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
767   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
768   --disable-root-environ  restrict environment when running as root
769   --enable-symlinks       make tic use symbolic links not hard links
770   --enable-broken_linker  compile with broken-linker support code
771   --enable-bsdpad         recognize BSD-style prefix padding
772   --enable-widec          compile with wide-char/UTF-8 code
773   --disable-lp64          allow chtype to be long (ignore _LP64)
774   --disable-largefile     omit support for large files
775   --disable-tparm-varargs compile tparm() without varargs interface
776   --disable-tic-depends   link tic library without explicit dependency on ncurses library
777   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
778   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
779   --with-bool=TYPE        override fallback type of bool variable
780   --with-caps=alt         compile with alternate Caps file
781   --with-chtype=TYPE      override type of chtype
782   --with-ospeed=TYPE      override type of ospeed variable
783   --with-mmask-t=TYPE     override type of mmask_t
784   --with-ccharw-max=XXX   override size CCHARW_MAX
785   --with-tparm-arg=TYPE   override parameter type of tparm
786   --with-rcs-ids          compile-in RCS identifiers
787 Options to Specify How Manpages are Installed:
788   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
789                           optionally formatted/catonly, e.g., gzip,formatted
790   --with-manpage-renames  specify manpage-renaming
791   --with-manpage-aliases  specify manpage-aliases using .so
792   --with-manpage-symlinks specify manpage-aliases using symlinks
793   --with-manpage-tbl      specify manpage processing with tbl
794 Extensions:
795   --disable-ext-funcs     disable function-extensions
796   --enable-sp-funcs       enable SCREEN-extensions
797   --enable-term-driver    enable terminal-driver
798   --enable-const          compile with extra/non-standard const
799   --enable-ext-colors     compile for 256-color support
800   --enable-ext-mouse      compile for extended mouse-encoding
801   --enable-ext-putwin     compile with extended putwin/screendump
802   --enable-no-padding     compile with $NCURSES_NO_PADDING code
803   --enable-signed-char    compile using signed Boolean's in term.h
804   --enable-sigwinch       compile with SIGWINCH handler
805   --enable-tcap-names     compile with user-definable terminal capabilities
806   --with-pthread          use POSIX thread library
807   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
808   --enable-weak-symbols   enable weak-symbols for pthreads
809   --enable-reentrant      compile with reentrant code
810   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
811   --enable-opaque-form    make form-library structures "opaque"
812   --enable-opaque-menu    make menu-library structures "opaque"
813   --enable-opaque-panel   make panel-library structures "opaque"
814   --with-wrap-prefix=XXX  override prefix used for public variables
815 Development Code:
816   --without-develop       disable development options
817   --enable-hard-tabs      compile with hard-tabs code
818   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
819 Experimental Code:
820   --disable-assumed-color do not assume anything about default-colors
821   --disable-hashmap       compile without hashmap scrolling-optimization
822   --enable-colorfgbg      compile-in experimental $COLORFGBG code
823   --enable-interop        compile-in interop bindings
824   --enable-safe-sprintf   compile with experimental safe-sprintf code
825   --disable-scroll-hints  compile without scroll-hints code
826   --enable-wgetch-events  compile with wgetch-events code
827 Testing/development Options:
828   --disable-echo          do not display "compiling" commands
829   --enable-warnings       build: turn on GCC compiler warnings
830   --enable-string-hacks   work around bogus compiler/loader warnings
831   --enable-assertions     test: turn on generation of assertion code
832   --with-dmalloc          test: use Gray Watson's dmalloc library
833   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
834   --with-valgrind         test: use valgrind
835   --disable-leaks         test: free permanent memory, analyze leaks
836   --enable-expanded       test: generate functions for certain macros
837   --disable-macros        test: use functions rather than macros
838   --with-trace            test: add trace() function to all models of ncurses
839   --disable-gnat-projects test: disable GNAT projects even if usable
840 Ada95 Binding Options:
841   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
842   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
843   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
844   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
845
846 Some influential environment variables:
847   CC          C compiler command
848   CFLAGS      C compiler flags
849   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
850               nonstandard directory <lib dir>
851   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
852               headers in a nonstandard directory <include dir>
853   CPP         C preprocessor
854   CXX         C++ compiler command
855   CXXFLAGS    C++ compiler flags
856   CXXCPP      C++ preprocessor
857
858 Use these variables to override the choices made by `configure' or to help
859 it to find libraries and programs with nonstandard names/locations.
860
861 EOF
862 fi
863
864 if test "$ac_init_help" = "recursive"; then
865   # If there are subdirs, report their specific --help.
866   ac_popdir=`pwd`
867   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
868     cd $ac_subdir
869     # A "../" for each directory in /$ac_subdir.
870     ac_dots=`echo $ac_subdir |
871              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
872
873     case $srcdir in
874     .) # No --srcdir option.  We are building in place.
875       ac_sub_srcdir=$srcdir ;;
876     [\\/]* | ?:[\\/]* ) # Absolute path.
877       ac_sub_srcdir=$srcdir/$ac_subdir ;;
878     *) # Relative path.
879       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
880     esac
881
882     # Check for guested configure; otherwise get Cygnus style configure.
883     if test -f $ac_sub_srcdir/configure.gnu; then
884       echo
885       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
886     elif test -f $ac_sub_srcdir/configure; then
887       echo
888       $SHELL $ac_sub_srcdir/configure  --help=recursive
889     elif test -f $ac_sub_srcdir/configure.ac ||
890            test -f $ac_sub_srcdir/configure.in; then
891       echo
892       $ac_configure --help
893     else
894       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
895     fi
896     cd $ac_popdir
897   done
898 fi
899
900 test -n "$ac_init_help" && exit 0
901 if $ac_init_version; then
902   cat <<\EOF
903
904 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
905 Free Software Foundation, Inc.
906 This configure script is free software; the Free Software Foundation
907 gives unlimited permission to copy, distribute and modify it.
908 EOF
909   exit 0
910 fi
911 exec 5>config.log
912 cat >&5 <<EOF
913 This file contains any messages produced by compilers while
914 running configure, to aid debugging if configure makes a mistake.
915
916 It was created by $as_me, which was
917 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
918
919   $ $0 $@
920
921 EOF
922 {
923 cat <<_ASUNAME
924 ## ---------- ##
925 ## Platform.  ##
926 ## ---------- ##
927
928 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
929 uname -m = `(uname -m) 2>/dev/null || echo unknown`
930 uname -r = `(uname -r) 2>/dev/null || echo unknown`
931 uname -s = `(uname -s) 2>/dev/null || echo unknown`
932 uname -v = `(uname -v) 2>/dev/null || echo unknown`
933
934 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
935 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
936
937 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
938 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
939 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
940 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
941 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
942 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
943 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
944
945 PATH = $PATH
946
947 _ASUNAME
948 } >&5
949
950 cat >&5 <<EOF
951 ## ------------ ##
952 ## Core tests.  ##
953 ## ------------ ##
954
955 EOF
956
957 # Keep a trace of the command line.
958 # Strip out --no-create and --no-recursion so they do not pile up.
959 # Also quote any args containing shell meta-characters.
960 ac_configure_args=
961 ac_sep=
962 for ac_arg
963 do
964   case $ac_arg in
965   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
966   | --no-cr | --no-c) ;;
967   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
968   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
969   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
970     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
971     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
972     ac_sep=" " ;;
973   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
974      ac_sep=" " ;;
975   esac
976   # Get rid of the leading space.
977 done
978
979 # When interrupted or exit'd, cleanup temporary files, and complete
980 # config.log.  We remove comments because anyway the quotes in there
981 # would cause problems or look ugly.
982 trap 'exit_status=$?
983   # Save into config.log some information that might help in debugging.
984   echo >&5
985   echo "## ----------------- ##" >&5
986   echo "## Cache variables.  ##" >&5
987   echo "## ----------------- ##" >&5
988   echo >&5
989   # The following way of writing the cache mishandles newlines in values,
990 {
991   (set) 2>&1 |
992     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
993     *ac_space=\ *)
994       sed -n \
995         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
996           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
997       ;;
998     *)
999       sed -n \
1000         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1001       ;;
1002     esac;
1003 } >&5
1004   sed "/^$/d" confdefs.h >conftest.log
1005   if test -s conftest.log; then
1006     echo >&5
1007     echo "## ------------ ##" >&5
1008     echo "## confdefs.h.  ##" >&5
1009     echo "## ------------ ##" >&5
1010     echo >&5
1011     cat conftest.log >&5
1012   fi
1013   (echo; echo) >&5
1014   test "$ac_signal" != 0 &&
1015     echo "$as_me: caught signal $ac_signal" >&5
1016   echo "$as_me: exit $exit_status" >&5
1017   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1018     exit $exit_status
1019      ' 0
1020 for ac_signal in 1 2 13 15; do
1021   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1022 done
1023 ac_signal=0
1024
1025 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1026 rm -rf conftest* confdefs.h
1027 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1028 echo >confdefs.h
1029
1030 # Let the site file select an alternate cache file if it wants to.
1031 # Prefer explicitly selected file to automatically selected ones.
1032 if test -z "$CONFIG_SITE"; then
1033   if test "x$prefix" != xNONE; then
1034     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1035   else
1036     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1037   fi
1038 fi
1039 for ac_site_file in $CONFIG_SITE; do
1040   if test -r "$ac_site_file"; then
1041     { echo "$as_me:1041: loading site script $ac_site_file" >&5
1042 echo "$as_me: loading site script $ac_site_file" >&6;}
1043     cat "$ac_site_file" >&5
1044     . "$ac_site_file"
1045   fi
1046 done
1047
1048 if test -r "$cache_file"; then
1049   # Some versions of bash will fail to source /dev/null (special
1050   # files actually), so we avoid doing that.
1051   if test -f "$cache_file"; then
1052     { echo "$as_me:1052: loading cache $cache_file" >&5
1053 echo "$as_me: loading cache $cache_file" >&6;}
1054     case $cache_file in
1055       [\\/]* | ?:[\\/]* ) . $cache_file;;
1056       *)                      . ./$cache_file;;
1057     esac
1058   fi
1059 else
1060   { echo "$as_me:1060: creating cache $cache_file" >&5
1061 echo "$as_me: creating cache $cache_file" >&6;}
1062   >$cache_file
1063 fi
1064
1065 # Check that the precious variables saved in the cache have kept the same
1066 # value.
1067 ac_cache_corrupted=false
1068 for ac_var in `(set) 2>&1 |
1069                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1070   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1071   eval ac_new_set=\$ac_env_${ac_var}_set
1072   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1073   eval ac_new_val="\$ac_env_${ac_var}_value"
1074   case $ac_old_set,$ac_new_set in
1075     set,)
1076       { echo "$as_me:1076: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1077 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1078       ac_cache_corrupted=: ;;
1079     ,set)
1080       { echo "$as_me:1080: error: \`$ac_var' was not set in the previous run" >&5
1081 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1082       ac_cache_corrupted=: ;;
1083     ,);;
1084     *)
1085       if test "x$ac_old_val" != "x$ac_new_val"; then
1086         { echo "$as_me:1086: error: \`$ac_var' has changed since the previous run:" >&5
1087 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1088         { echo "$as_me:1088:   former value:  $ac_old_val" >&5
1089 echo "$as_me:   former value:  $ac_old_val" >&2;}
1090         { echo "$as_me:1090:   current value: $ac_new_val" >&5
1091 echo "$as_me:   current value: $ac_new_val" >&2;}
1092         ac_cache_corrupted=:
1093       fi;;
1094   esac
1095   # Pass precious variables to config.status.  It doesn't matter if
1096   # we pass some twice (in addition to the command line arguments).
1097   if test "$ac_new_set" = set; then
1098     case $ac_new_val in
1099     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1100       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1101       ac_configure_args="$ac_configure_args '$ac_arg'"
1102       ;;
1103     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1104        ;;
1105     esac
1106   fi
1107 done
1108 if $ac_cache_corrupted; then
1109   { echo "$as_me:1109: error: changes in the environment can compromise the build" >&5
1110 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1111   { { echo "$as_me:1111: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1112 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1113    { (exit 1); exit 1; }; }
1114 fi
1115
1116 ac_ext=c
1117 ac_cpp='$CPP $CPPFLAGS'
1118 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1119 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1120 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1121 ac_main_return=return
1122
1123 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1124   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1125                    ECHO_T='     ' ;;
1126   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1127   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1128 esac
1129 echo "#! $SHELL" >conftest.sh
1130 echo  "exit 0"   >>conftest.sh
1131 chmod +x conftest.sh
1132 if { (echo "$as_me:1132: PATH=\".;.\"; conftest.sh") >&5
1133   (PATH=".;."; conftest.sh) 2>&5
1134   ac_status=$?
1135   echo "$as_me:1135: \$? = $ac_status" >&5
1136   (exit $ac_status); }; then
1137   ac_path_separator=';'
1138 else
1139   ac_path_separator=:
1140 fi
1141 PATH_SEPARATOR="$ac_path_separator"
1142 rm -f conftest.sh
1143
1144 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1145
1146 top_builddir=`pwd`
1147
1148 echo "$as_me:1148: checking for egrep" >&5
1149 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1150 if test "${ac_cv_prog_egrep+set}" = set; then
1151   echo $ECHO_N "(cached) $ECHO_C" >&6
1152 else
1153   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1154                 then ac_cv_prog_egrep='grep -E'
1155                 else ac_cv_prog_egrep='egrep'
1156         fi
1157 fi
1158 echo "$as_me:1158: result: $ac_cv_prog_egrep" >&5
1159 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1160         EGREP=$ac_cv_prog_egrep
1161
1162         test -z "$EGREP" && { { echo "$as_me:1162: error: No egrep program found" >&5
1163 echo "$as_me: error: No egrep program found" >&2;}
1164    { (exit 1); exit 1; }; }
1165
1166 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1167 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1168 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1169 cf_cv_abi_version=${NCURSES_MAJOR}
1170 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1171 cf_cv_timestamp=`date`
1172 echo "$as_me:1172: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1173 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1174
1175 if test -f $srcdir/VERSION ; then
1176         echo "$as_me:1176: checking for package version" >&5
1177 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1178
1179         # if there are not enough fields, cut returns the last one...
1180         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1181         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1182         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1183
1184         # this is how CF_BUNDLED_INTL uses $VERSION:
1185         VERSION="$cf_field1"
1186
1187         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1188         test -z "$VERSION_MAJOR" && { { echo "$as_me:1188: error: missing major-version" >&5
1189 echo "$as_me: error: missing major-version" >&2;}
1190    { (exit 1); exit 1; }; }
1191
1192         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1193         test -z "$VERSION_MINOR" && { { echo "$as_me:1193: error: missing minor-version" >&5
1194 echo "$as_me: error: missing minor-version" >&2;}
1195    { (exit 1); exit 1; }; }
1196
1197         echo "$as_me:1197: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1198 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1199
1200         echo "$as_me:1200: checking for package patch date" >&5
1201 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1202         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1203         case .$VERSION_PATCH in
1204         (.)
1205                 { { echo "$as_me:1205: error: missing patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1210                 ;;
1211         (*)
1212                 { { echo "$as_me:1212: error: illegal patch-date $VERSION_PATCH" >&5
1213 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1214    { (exit 1); exit 1; }; }
1215                 ;;
1216         esac
1217         echo "$as_me:1217: result: $VERSION_PATCH" >&5
1218 echo "${ECHO_T}$VERSION_PATCH" >&6
1219 else
1220         { { echo "$as_me:1220: error: did not find $srcdir/VERSION" >&5
1221 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1222    { (exit 1); exit 1; }; }
1223 fi
1224
1225 # show the actual data that we have for versions:
1226 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1227
1228 echo "${as_me:-configure}:1228: testing ABI VERSION $VERSION ..." 1>&5
1229
1230 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1231
1232 echo "${as_me:-configure}:1232: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1233
1234 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1235
1236 echo "${as_me:-configure}:1236: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1237
1238 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1239
1240 echo "${as_me:-configure}:1240: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1241
1242         cf_PACKAGE=NCURSES
1243         PACKAGE=ncurses
1244
1245 cat >>confdefs.h <<EOF
1246 #define PACKAGE "$PACKAGE"
1247 EOF
1248
1249 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1250
1251         cat >>confdefs.h <<EOF
1252 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1253 EOF
1254
1255         cat >>confdefs.h <<EOF
1256 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1257 EOF
1258
1259 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1260
1261 # Check whether --with-rel-version or --without-rel-version was given.
1262 if test "${with_rel_version+set}" = set; then
1263   withval="$with_rel_version"
1264   { echo "$as_me:1264: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1265 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1266  cf_cv_rel_version=$withval
1267 fi;
1268
1269  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1270  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1271
1272 if test -n "$NCURSES_MAJOR" ; then
1273   case $NCURSES_MAJOR in
1274   ([0-9]*)
1275         ;;
1276   (*)
1277         { { echo "$as_me:1277: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1278 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1279    { (exit 1); exit 1; }; }
1280         ;;
1281   esac
1282 else
1283   { { echo "$as_me:1283: error: Release major-version value is empty" >&5
1284 echo "$as_me: error: Release major-version value is empty" >&2;}
1285    { (exit 1); exit 1; }; }
1286 fi
1287
1288 if test -n "$NCURSES_MINOR" ; then
1289   case $NCURSES_MINOR in
1290   ([0-9]*)
1291         ;;
1292   (*)
1293         { { echo "$as_me:1293: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1294 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1295    { (exit 1); exit 1; }; }
1296         ;;
1297   esac
1298 else
1299   { { echo "$as_me:1299: error: Release minor-version value is empty" >&5
1300 echo "$as_me: error: Release minor-version value is empty" >&2;}
1301    { (exit 1); exit 1; }; }
1302 fi
1303
1304 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1305
1306 # Check whether --with-abi-version or --without-abi-version was given.
1307 if test "${with_abi_version+set}" = set; then
1308   withval="$with_abi_version"
1309
1310         if test "x$cf_cv_abi_version" != "x$withval"
1311         then
1312                 { echo "$as_me:1312: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1313 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1314                 case $cf_cv_rel_version in
1315                 (5.*)
1316                         cf_cv_rel_version=$withval.0
1317                         ;;
1318                 (6.*)
1319                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1320                         ;;
1321                 esac
1322         fi
1323         cf_cv_abi_version=$withval
1324 fi;
1325
1326 if test -n "$cf_cv_abi_version" ; then
1327   case $cf_cv_abi_version in
1328   ([0-9]*)
1329         ;;
1330   (*)
1331         { { echo "$as_me:1331: error: ABI version is not a number: $cf_cv_abi_version" >&5
1332 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1333    { (exit 1); exit 1; }; }
1334         ;;
1335   esac
1336 else
1337   { { echo "$as_me:1337: error: ABI version value is empty" >&5
1338 echo "$as_me: error: ABI version value is empty" >&2;}
1339    { (exit 1); exit 1; }; }
1340 fi
1341
1342 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1343 then
1344         case $cf_cv_rel_version in
1345         (5.*)
1346                 cf_cv_rel_version=$with_abi_version.0
1347                 ;;
1348         esac
1349 fi
1350
1351 ac_aux_dir=
1352 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1353   if test -f $ac_dir/install-sh; then
1354     ac_aux_dir=$ac_dir
1355     ac_install_sh="$ac_aux_dir/install-sh -c"
1356     break
1357   elif test -f $ac_dir/install.sh; then
1358     ac_aux_dir=$ac_dir
1359     ac_install_sh="$ac_aux_dir/install.sh -c"
1360     break
1361   elif test -f $ac_dir/shtool; then
1362     ac_aux_dir=$ac_dir
1363     ac_install_sh="$ac_aux_dir/shtool install -c"
1364     break
1365   fi
1366 done
1367 if test -z "$ac_aux_dir"; then
1368   { { echo "$as_me:1368: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1369 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1370    { (exit 1); exit 1; }; }
1371 fi
1372 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1373 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1374 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1375
1376 # Make sure we can run config.sub.
1377 $ac_config_sub sun4 >/dev/null 2>&1 ||
1378   { { echo "$as_me:1378: error: cannot run $ac_config_sub" >&5
1379 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1380    { (exit 1); exit 1; }; }
1381
1382 echo "$as_me:1382: checking build system type" >&5
1383 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1384 if test "${ac_cv_build+set}" = set; then
1385   echo $ECHO_N "(cached) $ECHO_C" >&6
1386 else
1387   ac_cv_build_alias=$build_alias
1388 test -z "$ac_cv_build_alias" &&
1389   ac_cv_build_alias=`$ac_config_guess`
1390 test -z "$ac_cv_build_alias" &&
1391   { { echo "$as_me:1391: error: cannot guess build type; you must specify one" >&5
1392 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1393    { (exit 1); exit 1; }; }
1394 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1395   { { echo "$as_me:1395: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1396 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1397    { (exit 1); exit 1; }; }
1398
1399 fi
1400 echo "$as_me:1400: result: $ac_cv_build" >&5
1401 echo "${ECHO_T}$ac_cv_build" >&6
1402 build=$ac_cv_build
1403 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1404 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1405 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1406
1407 echo "$as_me:1407: checking host system type" >&5
1408 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1409 if test "${ac_cv_host+set}" = set; then
1410   echo $ECHO_N "(cached) $ECHO_C" >&6
1411 else
1412   ac_cv_host_alias=$host_alias
1413 test -z "$ac_cv_host_alias" &&
1414   ac_cv_host_alias=$ac_cv_build_alias
1415 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1416   { { echo "$as_me:1416: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1417 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1418    { (exit 1); exit 1; }; }
1419
1420 fi
1421 echo "$as_me:1421: result: $ac_cv_host" >&5
1422 echo "${ECHO_T}$ac_cv_host" >&6
1423 host=$ac_cv_host
1424 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1425 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1426 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1427
1428 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1429         echo "$as_me:1429: checking target system type" >&5
1430 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1431 if test "${ac_cv_target+set}" = set; then
1432   echo $ECHO_N "(cached) $ECHO_C" >&6
1433 else
1434   ac_cv_target_alias=$target_alias
1435 test "x$ac_cv_target_alias" = "x" &&
1436   ac_cv_target_alias=$ac_cv_host_alias
1437 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1438   { { echo "$as_me:1438: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1439 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1440    { (exit 1); exit 1; }; }
1441
1442 fi
1443 echo "$as_me:1443: result: $ac_cv_target" >&5
1444 echo "${ECHO_T}$ac_cv_target" >&6
1445 target=$ac_cv_target
1446 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1447 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1448 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1449
1450 # The aliases save the names the user supplied, while $host etc.
1451 # will get canonicalized.
1452 test -n "$target_alias" &&
1453   test "$program_prefix$program_suffix$program_transform_name" = \
1454     NONENONEs,x,x, &&
1455   program_prefix=${target_alias}-
1456         system_name="$host_os"
1457 else
1458         system_name="`(uname -s -r) 2>/dev/null`"
1459         if test -z "$system_name" ; then
1460                 system_name="`(hostname) 2>/dev/null`"
1461         fi
1462 fi
1463 test -n "$system_name" &&
1464 cat >>confdefs.h <<EOF
1465 #define SYSTEM_NAME "$system_name"
1466 EOF
1467
1468 if test "${cf_cv_system_name+set}" = set; then
1469   echo $ECHO_N "(cached) $ECHO_C" >&6
1470 else
1471   cf_cv_system_name="$system_name"
1472 fi
1473
1474 test -z "$system_name" && system_name="$cf_cv_system_name"
1475 test -n "$cf_cv_system_name" && echo "$as_me:1475: result: Configuring for $cf_cv_system_name" >&5
1476 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1477
1478 if test ".$system_name" != ".$cf_cv_system_name" ; then
1479         echo "$as_me:1479: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1480 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1481         { { echo "$as_me:1481: error: \"Please remove config.cache and try again.\"" >&5
1482 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1483    { (exit 1); exit 1; }; }
1484 fi
1485
1486 # Check whether --with-system-type or --without-system-type was given.
1487 if test "${with_system_type+set}" = set; then
1488   withval="$with_system_type"
1489   { echo "$as_me:1489: WARNING: overriding system type to $withval" >&5
1490 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1491         cf_cv_system_name=$withval
1492         host_os=$withval
1493
1494 fi;
1495
1496 ###     Save the given $CFLAGS to allow user-override.
1497 cf_user_CFLAGS="$CFLAGS"
1498
1499 ###     Default install-location
1500
1501 echo "$as_me:1501: checking for prefix" >&5
1502 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1503 if test "x$prefix" = "xNONE" ; then
1504         case "$cf_cv_system_name" in
1505                 # non-vendor systems don't have a conflict
1506         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1507                 prefix=/usr
1508                 ;;
1509         (*)     prefix=$ac_default_prefix
1510                 ;;
1511         esac
1512 fi
1513 echo "$as_me:1513: result: $prefix" >&5
1514 echo "${ECHO_T}$prefix" >&6
1515
1516 if test "x$prefix" = "xNONE" ; then
1517 echo "$as_me:1517: checking for default include-directory" >&5
1518 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1519 test -n "$verbose" && echo 1>&6
1520 for cf_symbol in \
1521         $includedir \
1522         $includedir/ncurses \
1523         $prefix/include \
1524         $prefix/include/ncurses \
1525         /usr/local/include \
1526         /usr/local/include/ncurses \
1527         /usr/include \
1528         /usr/include/ncurses
1529 do
1530         cf_dir=`eval echo $cf_symbol`
1531         if test -f $cf_dir/curses.h ; then
1532         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1533                 includedir="$cf_symbol"
1534                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1535                 break
1536         fi
1537         fi
1538         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1539 done
1540 echo "$as_me:1540: result: $includedir" >&5
1541 echo "${ECHO_T}$includedir" >&6
1542 fi
1543
1544 ### Defaults for ncurses ABI
1545
1546 case x$cf_cv_abi_version in
1547 (x[6789])
1548         cf_dft_ext_colors=yes
1549         cf_dft_ext_const=yes
1550         cf_dft_ext_mouse=yes
1551         cf_dft_ext_putwin=yes
1552         cf_dft_ext_spfuncs=yes
1553         cf_dft_filter_syms=yes
1554         cf_dft_chtype=uint32_t
1555         cf_dft_mmask_t=uint32_t
1556         cf_dft_interop=yes
1557         cf_dft_tparm_arg=intptr_t
1558         cf_dft_with_lp64=yes
1559         ;;
1560 (*)
1561         cf_dft_ext_colors=no
1562         cf_dft_ext_const=no
1563         cf_dft_ext_mouse=no
1564         cf_dft_ext_putwin=no
1565         cf_dft_ext_spfuncs=no
1566         cf_dft_filter_syms=no
1567         cf_dft_chtype=auto
1568         cf_dft_mmask_t=auto
1569         cf_dft_interop=no
1570         cf_dft_tparm_arg=long
1571         cf_dft_with_lp64=no
1572         ;;
1573 esac
1574
1575 ###     Checks for programs.
1576
1577 # Check whether --with-ada or --without-ada was given.
1578 if test "${with_ada+set}" = set; then
1579   withval="$with_ada"
1580   cf_with_ada=$withval
1581 else
1582   cf_with_ada=yes
1583 fi;
1584 if test "x$cf_with_ada" = xyes
1585 then
1586         cf_PROG_CC="gnatgcc gcc cc"
1587 else
1588         cf_PROG_CC="gcc cc"
1589 fi
1590
1591 ac_ext=c
1592 ac_cpp='$CPP $CPPFLAGS'
1593 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1594 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1595 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1596 ac_main_return=return
1597 if test -n "$ac_tool_prefix"; then
1598   for ac_prog in $cf_PROG_CC
1599   do
1600     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1601 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1602 echo "$as_me:1602: checking for $ac_word" >&5
1603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1604 if test "${ac_cv_prog_CC+set}" = set; then
1605   echo $ECHO_N "(cached) $ECHO_C" >&6
1606 else
1607   if test -n "$CC"; then
1608   ac_cv_prog_CC="$CC" # Let the user override the test.
1609 else
1610   ac_save_IFS=$IFS; IFS=$ac_path_separator
1611 ac_dummy="$PATH"
1612 for ac_dir in $ac_dummy; do
1613   IFS=$ac_save_IFS
1614   test -z "$ac_dir" && ac_dir=.
1615   $as_executable_p "$ac_dir/$ac_word" || continue
1616 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1617 echo "$as_me:1617: found $ac_dir/$ac_word" >&5
1618 break
1619 done
1620
1621 fi
1622 fi
1623 CC=$ac_cv_prog_CC
1624 if test -n "$CC"; then
1625   echo "$as_me:1625: result: $CC" >&5
1626 echo "${ECHO_T}$CC" >&6
1627 else
1628   echo "$as_me:1628: result: no" >&5
1629 echo "${ECHO_T}no" >&6
1630 fi
1631
1632     test -n "$CC" && break
1633   done
1634 fi
1635 if test -z "$CC"; then
1636   ac_ct_CC=$CC
1637   for ac_prog in $cf_PROG_CC
1638 do
1639   # Extract the first word of "$ac_prog", so it can be a program name with args.
1640 set dummy $ac_prog; ac_word=$2
1641 echo "$as_me:1641: checking for $ac_word" >&5
1642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1643 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1644   echo $ECHO_N "(cached) $ECHO_C" >&6
1645 else
1646   if test -n "$ac_ct_CC"; then
1647   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1648 else
1649   ac_save_IFS=$IFS; IFS=$ac_path_separator
1650 ac_dummy="$PATH"
1651 for ac_dir in $ac_dummy; do
1652   IFS=$ac_save_IFS
1653   test -z "$ac_dir" && ac_dir=.
1654   $as_executable_p "$ac_dir/$ac_word" || continue
1655 ac_cv_prog_ac_ct_CC="$ac_prog"
1656 echo "$as_me:1656: found $ac_dir/$ac_word" >&5
1657 break
1658 done
1659
1660 fi
1661 fi
1662 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1663 if test -n "$ac_ct_CC"; then
1664   echo "$as_me:1664: result: $ac_ct_CC" >&5
1665 echo "${ECHO_T}$ac_ct_CC" >&6
1666 else
1667   echo "$as_me:1667: result: no" >&5
1668 echo "${ECHO_T}no" >&6
1669 fi
1670
1671   test -n "$ac_ct_CC" && break
1672 done
1673
1674   CC=$ac_ct_CC
1675 fi
1676
1677 test -z "$CC" && { { echo "$as_me:1677: error: no acceptable cc found in \$PATH" >&5
1678 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1679    { (exit 1); exit 1; }; }
1680
1681 # Provide some information about the compiler.
1682 echo "$as_me:1682:" \
1683      "checking for C compiler version" >&5
1684 ac_compiler=`set X $ac_compile; echo $2`
1685 { (eval echo "$as_me:1685: \"$ac_compiler --version </dev/null >&5\"") >&5
1686   (eval $ac_compiler --version </dev/null >&5) 2>&5
1687   ac_status=$?
1688   echo "$as_me:1688: \$? = $ac_status" >&5
1689   (exit $ac_status); }
1690 { (eval echo "$as_me:1690: \"$ac_compiler -v </dev/null >&5\"") >&5
1691   (eval $ac_compiler -v </dev/null >&5) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }
1695 { (eval echo "$as_me:1695: \"$ac_compiler -V </dev/null >&5\"") >&5
1696   (eval $ac_compiler -V </dev/null >&5) 2>&5
1697   ac_status=$?
1698   echo "$as_me:1698: \$? = $ac_status" >&5
1699   (exit $ac_status); }
1700
1701 cat >conftest.$ac_ext <<_ACEOF
1702 #line 1702 "configure"
1703 #include "confdefs.h"
1704
1705 int
1706 main (void)
1707 {
1708
1709   ;
1710   return 0;
1711 }
1712 _ACEOF
1713 ac_clean_files_save=$ac_clean_files
1714 ac_clean_files="$ac_clean_files a.out a.exe"
1715 # Try to create an executable without -o first, disregard a.out.
1716 # It will help us diagnose broken compilers, and finding out an intuition
1717 # of exeext.
1718 echo "$as_me:1718: checking for C compiler default output" >&5
1719 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1720 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1721 if { (eval echo "$as_me:1721: \"$ac_link_default\"") >&5
1722   (eval $ac_link_default) 2>&5
1723   ac_status=$?
1724   echo "$as_me:1724: \$? = $ac_status" >&5
1725   (exit $ac_status); }; then
1726   # Find the output, starting from the most likely.  This scheme is
1727 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1728 # resort.
1729 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1730                 ls a.out conftest 2>/dev/null;
1731                 ls a.* conftest.* 2>/dev/null`; do
1732   case $ac_file in
1733     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1734     a.out ) # We found the default executable, but exeext='' is most
1735             # certainly right.
1736             break;;
1737     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1738           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1739           export ac_cv_exeext
1740           break;;
1741     * ) break;;
1742   esac
1743 done
1744 else
1745   echo "$as_me: failed program was:" >&5
1746 cat conftest.$ac_ext >&5
1747 { { echo "$as_me:1747: error: C compiler cannot create executables" >&5
1748 echo "$as_me: error: C compiler cannot create executables" >&2;}
1749    { (exit 77); exit 77; }; }
1750 fi
1751
1752 ac_exeext=$ac_cv_exeext
1753 echo "$as_me:1753: result: $ac_file" >&5
1754 echo "${ECHO_T}$ac_file" >&6
1755
1756 # Check the compiler produces executables we can run.  If not, either
1757 # the compiler is broken, or we cross compile.
1758 echo "$as_me:1758: checking whether the C compiler works" >&5
1759 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1760 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1761 # If not cross compiling, check that we can run a simple program.
1762 if test "$cross_compiling" != yes; then
1763   if { ac_try='./$ac_file'
1764   { (eval echo "$as_me:1764: \"$ac_try\"") >&5
1765   (eval $ac_try) 2>&5
1766   ac_status=$?
1767   echo "$as_me:1767: \$? = $ac_status" >&5
1768   (exit $ac_status); }; }; then
1769     cross_compiling=no
1770   else
1771     if test "$cross_compiling" = maybe; then
1772         cross_compiling=yes
1773     else
1774         { { echo "$as_me:1774: error: cannot run C compiled programs.
1775 If you meant to cross compile, use \`--host'." >&5
1776 echo "$as_me: error: cannot run C compiled programs.
1777 If you meant to cross compile, use \`--host'." >&2;}
1778    { (exit 1); exit 1; }; }
1779     fi
1780   fi
1781 fi
1782 echo "$as_me:1782: result: yes" >&5
1783 echo "${ECHO_T}yes" >&6
1784
1785 rm -f a.out a.exe conftest$ac_cv_exeext
1786 ac_clean_files=$ac_clean_files_save
1787 # Check the compiler produces executables we can run.  If not, either
1788 # the compiler is broken, or we cross compile.
1789 echo "$as_me:1789: checking whether we are cross compiling" >&5
1790 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1791 echo "$as_me:1791: result: $cross_compiling" >&5
1792 echo "${ECHO_T}$cross_compiling" >&6
1793
1794 echo "$as_me:1794: checking for executable suffix" >&5
1795 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1796 if { (eval echo "$as_me:1796: \"$ac_link\"") >&5
1797   (eval $ac_link) 2>&5
1798   ac_status=$?
1799   echo "$as_me:1799: \$? = $ac_status" >&5
1800   (exit $ac_status); }; then
1801   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1802 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1803 # work properly (i.e., refer to `conftest.exe'), while it won't with
1804 # `rm'.
1805 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1806   case $ac_file in
1807     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1808     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1809           export ac_cv_exeext
1810           break;;
1811     * ) break;;
1812   esac
1813 done
1814 else
1815   { { echo "$as_me:1815: error: cannot compute EXEEXT: cannot compile and link" >&5
1816 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1817    { (exit 1); exit 1; }; }
1818 fi
1819
1820 rm -f conftest$ac_cv_exeext
1821 echo "$as_me:1821: result: $ac_cv_exeext" >&5
1822 echo "${ECHO_T}$ac_cv_exeext" >&6
1823
1824 rm -f conftest.$ac_ext
1825 EXEEXT=$ac_cv_exeext
1826 ac_exeext=$EXEEXT
1827 echo "$as_me:1827: checking for object suffix" >&5
1828 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1829 if test "${ac_cv_objext+set}" = set; then
1830   echo $ECHO_N "(cached) $ECHO_C" >&6
1831 else
1832   cat >conftest.$ac_ext <<_ACEOF
1833 #line 1833 "configure"
1834 #include "confdefs.h"
1835
1836 int
1837 main (void)
1838 {
1839
1840   ;
1841   return 0;
1842 }
1843 _ACEOF
1844 rm -f conftest.o conftest.obj
1845 if { (eval echo "$as_me:1845: \"$ac_compile\"") >&5
1846   (eval $ac_compile) 2>&5
1847   ac_status=$?
1848   echo "$as_me:1848: \$? = $ac_status" >&5
1849   (exit $ac_status); }; then
1850   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1851   case $ac_file in
1852     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1853     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1854        break;;
1855   esac
1856 done
1857 else
1858   echo "$as_me: failed program was:" >&5
1859 cat conftest.$ac_ext >&5
1860 { { echo "$as_me:1860: error: cannot compute OBJEXT: cannot compile" >&5
1861 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1862    { (exit 1); exit 1; }; }
1863 fi
1864
1865 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1866 fi
1867 echo "$as_me:1867: result: $ac_cv_objext" >&5
1868 echo "${ECHO_T}$ac_cv_objext" >&6
1869 OBJEXT=$ac_cv_objext
1870 ac_objext=$OBJEXT
1871 echo "$as_me:1871: checking whether we are using the GNU C compiler" >&5
1872 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1873 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1874   echo $ECHO_N "(cached) $ECHO_C" >&6
1875 else
1876   cat >conftest.$ac_ext <<_ACEOF
1877 #line 1877 "configure"
1878 #include "confdefs.h"
1879
1880 int
1881 main (void)
1882 {
1883 #ifndef __GNUC__
1884        choke me
1885 #endif
1886
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 rm -f conftest.$ac_objext
1892 if { (eval echo "$as_me:1892: \"$ac_compile\"") >&5
1893   (eval $ac_compile) 2>&5
1894   ac_status=$?
1895   echo "$as_me:1895: \$? = $ac_status" >&5
1896   (exit $ac_status); } &&
1897          { ac_try='test -s conftest.$ac_objext'
1898   { (eval echo "$as_me:1898: \"$ac_try\"") >&5
1899   (eval $ac_try) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit $ac_status); }; }; then
1903   ac_compiler_gnu=yes
1904 else
1905   echo "$as_me: failed program was:" >&5
1906 cat conftest.$ac_ext >&5
1907 ac_compiler_gnu=no
1908 fi
1909 rm -f conftest.$ac_objext conftest.$ac_ext
1910 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1911
1912 fi
1913 echo "$as_me:1913: result: $ac_cv_c_compiler_gnu" >&5
1914 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1915 GCC=`test $ac_compiler_gnu = yes && echo yes`
1916 ac_test_CFLAGS=${CFLAGS+set}
1917 ac_save_CFLAGS=$CFLAGS
1918 CFLAGS="-g"
1919 echo "$as_me:1919: checking whether $CC accepts -g" >&5
1920 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1921 if test "${ac_cv_prog_cc_g+set}" = set; then
1922   echo $ECHO_N "(cached) $ECHO_C" >&6
1923 else
1924   cat >conftest.$ac_ext <<_ACEOF
1925 #line 1925 "configure"
1926 #include "confdefs.h"
1927
1928 int
1929 main (void)
1930 {
1931
1932   ;
1933   return 0;
1934 }
1935 _ACEOF
1936 rm -f conftest.$ac_objext
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938   (eval $ac_compile) 2>&5
1939   ac_status=$?
1940   echo "$as_me:1940: \$? = $ac_status" >&5
1941   (exit $ac_status); } &&
1942          { ac_try='test -s conftest.$ac_objext'
1943   { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1944   (eval $ac_try) 2>&5
1945   ac_status=$?
1946   echo "$as_me:1946: \$? = $ac_status" >&5
1947   (exit $ac_status); }; }; then
1948   ac_cv_prog_cc_g=yes
1949 else
1950   echo "$as_me: failed program was:" >&5
1951 cat conftest.$ac_ext >&5
1952 ac_cv_prog_cc_g=no
1953 fi
1954 rm -f conftest.$ac_objext conftest.$ac_ext
1955 fi
1956 echo "$as_me:1956: result: $ac_cv_prog_cc_g" >&5
1957 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1958 if test "$ac_test_CFLAGS" = set; then
1959   CFLAGS=$ac_save_CFLAGS
1960 elif test $ac_cv_prog_cc_g = yes; then
1961   if test "$GCC" = yes; then
1962     CFLAGS="-g -O2"
1963   else
1964     CFLAGS="-g"
1965   fi
1966 else
1967   if test "$GCC" = yes; then
1968     CFLAGS="-O2"
1969   else
1970     CFLAGS=
1971   fi
1972 fi
1973 # Some people use a C++ compiler to compile C.  Since we use `exit',
1974 # in C++ we need to declare it.  In case someone uses the same compiler
1975 # for both compiling C and C++ we need to have the C++ compiler decide
1976 # the declaration of exit, since it's the most demanding environment.
1977 cat >conftest.$ac_ext <<_ACEOF
1978 #ifndef __cplusplus
1979   choke me
1980 #endif
1981 _ACEOF
1982 rm -f conftest.$ac_objext
1983 if { (eval echo "$as_me:1983: \"$ac_compile\"") >&5
1984   (eval $ac_compile) 2>&5
1985   ac_status=$?
1986   echo "$as_me:1986: \$? = $ac_status" >&5
1987   (exit $ac_status); } &&
1988          { ac_try='test -s conftest.$ac_objext'
1989   { (eval echo "$as_me:1989: \"$ac_try\"") >&5
1990   (eval $ac_try) 2>&5
1991   ac_status=$?
1992   echo "$as_me:1992: \$? = $ac_status" >&5
1993   (exit $ac_status); }; }; then
1994   for ac_declaration in \
1995    ''\
1996    '#include <stdlib.h>' \
1997    'extern "C" void std::exit (int) throw (); using std::exit;' \
1998    'extern "C" void std::exit (int); using std::exit;' \
1999    'extern "C" void exit (int) throw ();' \
2000    'extern "C" void exit (int);' \
2001    'void exit (int);'
2002 do
2003   cat >conftest.$ac_ext <<_ACEOF
2004 #line 2004 "configure"
2005 #include "confdefs.h"
2006 #include <stdlib.h>
2007 $ac_declaration
2008 int
2009 main (void)
2010 {
2011 exit (42);
2012   ;
2013   return 0;
2014 }
2015 _ACEOF
2016 rm -f conftest.$ac_objext
2017 if { (eval echo "$as_me:2017: \"$ac_compile\"") >&5
2018   (eval $ac_compile) 2>&5
2019   ac_status=$?
2020   echo "$as_me:2020: \$? = $ac_status" >&5
2021   (exit $ac_status); } &&
2022          { ac_try='test -s conftest.$ac_objext'
2023   { (eval echo "$as_me:2023: \"$ac_try\"") >&5
2024   (eval $ac_try) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit $ac_status); }; }; then
2028   :
2029 else
2030   echo "$as_me: failed program was:" >&5
2031 cat conftest.$ac_ext >&5
2032 continue
2033 fi
2034 rm -f conftest.$ac_objext conftest.$ac_ext
2035   cat >conftest.$ac_ext <<_ACEOF
2036 #line 2036 "configure"
2037 #include "confdefs.h"
2038 $ac_declaration
2039 int
2040 main (void)
2041 {
2042 exit (42);
2043   ;
2044   return 0;
2045 }
2046 _ACEOF
2047 rm -f conftest.$ac_objext
2048 if { (eval echo "$as_me:2048: \"$ac_compile\"") >&5
2049   (eval $ac_compile) 2>&5
2050   ac_status=$?
2051   echo "$as_me:2051: \$? = $ac_status" >&5
2052   (exit $ac_status); } &&
2053          { ac_try='test -s conftest.$ac_objext'
2054   { (eval echo "$as_me:2054: \"$ac_try\"") >&5
2055   (eval $ac_try) 2>&5
2056   ac_status=$?
2057   echo "$as_me:2057: \$? = $ac_status" >&5
2058   (exit $ac_status); }; }; then
2059   break
2060 else
2061   echo "$as_me: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 fi
2064 rm -f conftest.$ac_objext conftest.$ac_ext
2065 done
2066 rm -rf conftest*
2067 if test -n "$ac_declaration"; then
2068   echo '#ifdef __cplusplus' >>confdefs.h
2069   echo $ac_declaration      >>confdefs.h
2070   echo '#endif'             >>confdefs.h
2071 fi
2072
2073 else
2074   echo "$as_me: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2076 fi
2077 rm -f conftest.$ac_objext conftest.$ac_ext
2078 ac_ext=c
2079 ac_cpp='$CPP $CPPFLAGS'
2080 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2081 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2082 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2083 ac_main_return=return
2084
2085 GCC_VERSION=none
2086 if test "$GCC" = yes ; then
2087         echo "$as_me:2087: checking version of $CC" >&5
2088 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2089         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.].*//'`"
2090         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2091         echo "$as_me:2091: result: $GCC_VERSION" >&5
2092 echo "${ECHO_T}$GCC_VERSION" >&6
2093 fi
2094
2095 echo "$as_me:2095: checking for $CC option to accept ANSI C" >&5
2096 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2097 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2098   echo $ECHO_N "(cached) $ECHO_C" >&6
2099 else
2100   ac_cv_prog_cc_stdc=no
2101 ac_save_CC=$CC
2102 cat >conftest.$ac_ext <<_ACEOF
2103 #line 2103 "configure"
2104 #include "confdefs.h"
2105 #include <stdarg.h>
2106 #include <stdio.h>
2107 #include <sys/types.h>
2108 #include <sys/stat.h>
2109 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2110 struct buf { int x; };
2111 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2112 static char *e (p, i)
2113      char **p;
2114      int i;
2115 {
2116   return p[i];
2117 }
2118 static char *f (char * (*g) (char **, int), char **p, ...)
2119 {
2120   char *s;
2121   va_list v;
2122   va_start (v,p);
2123   s = g (p, va_arg (v,int));
2124   va_end (v);
2125   return s;
2126 }
2127 int test (int i, double x);
2128 struct s1 {int (*f) (int a);};
2129 struct s2 {int (*f) (double a);};
2130 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2131 int argc;
2132 char **argv;
2133 int
2134 main (void)
2135 {
2136 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2137   ;
2138   return 0;
2139 }
2140 _ACEOF
2141 # Don't try gcc -ansi; that turns off useful extensions and
2142 # breaks some systems' header files.
2143 # AIX                   -qlanglvl=ansi
2144 # Ultrix and OSF/1      -std1
2145 # HP-UX 10.20 and later -Ae
2146 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2147 # SVR4                  -Xc -D__EXTENSIONS__
2148 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2149 do
2150   CC="$ac_save_CC $ac_arg"
2151   rm -f conftest.$ac_objext
2152 if { (eval echo "$as_me:2152: \"$ac_compile\"") >&5
2153   (eval $ac_compile) 2>&5
2154   ac_status=$?
2155   echo "$as_me:2155: \$? = $ac_status" >&5
2156   (exit $ac_status); } &&
2157          { ac_try='test -s conftest.$ac_objext'
2158   { (eval echo "$as_me:2158: \"$ac_try\"") >&5
2159   (eval $ac_try) 2>&5
2160   ac_status=$?
2161   echo "$as_me:2161: \$? = $ac_status" >&5
2162   (exit $ac_status); }; }; then
2163   ac_cv_prog_cc_stdc=$ac_arg
2164 break
2165 else
2166   echo "$as_me: failed program was:" >&5
2167 cat conftest.$ac_ext >&5
2168 fi
2169 rm -f conftest.$ac_objext
2170 done
2171 rm -f conftest.$ac_ext conftest.$ac_objext
2172 CC=$ac_save_CC
2173
2174 fi
2175
2176 case "x$ac_cv_prog_cc_stdc" in
2177   x|xno)
2178     echo "$as_me:2178: result: none needed" >&5
2179 echo "${ECHO_T}none needed" >&6 ;;
2180   *)
2181     echo "$as_me:2181: result: $ac_cv_prog_cc_stdc" >&5
2182 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2183     CC="$CC $ac_cv_prog_cc_stdc" ;;
2184 esac
2185
2186 # This should have been defined by AC_PROG_CC
2187 : ${CC:=cc}
2188
2189 echo "$as_me:2189: checking \$CC variable" >&5
2190 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2191 case "$CC" in
2192 (*[\ \  ]-*)
2193         echo "$as_me:2193: result: broken" >&5
2194 echo "${ECHO_T}broken" >&6
2195         { echo "$as_me:2195: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2196 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2197         # humor him...
2198         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2199         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2200         CC="$cf_prog"
2201         for cf_arg in $cf_flags
2202         do
2203                 case "x$cf_arg" in
2204                 (x-[IUDfgOW]*)
2205
2206 cf_fix_cppflags=no
2207 cf_new_cflags=
2208 cf_new_cppflags=
2209 cf_new_extra_cppflags=
2210
2211 for cf_add_cflags in $cf_arg
2212 do
2213 case $cf_fix_cppflags in
2214 (no)
2215         case $cf_add_cflags in
2216         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2217                 case $cf_add_cflags in
2218                 (-D*)
2219                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2220
2221                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2222                                 && test -z "${cf_tst_cflags}" \
2223                                 && cf_fix_cppflags=yes
2224
2225                         if test $cf_fix_cppflags = yes ; then
2226
2227         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2228         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2229
2230                                 continue
2231                         elif test "${cf_tst_cflags}" = "\"'" ; then
2232
2233         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2234         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2235
2236                                 continue
2237                         fi
2238                         ;;
2239                 esac
2240                 case "$CPPFLAGS" in
2241                 (*$cf_add_cflags)
2242                         ;;
2243                 (*)
2244                         case $cf_add_cflags in
2245                         (-D*)
2246                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2247
2248 CPPFLAGS=`echo "$CPPFLAGS" | \
2249         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2250                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2251
2252                                 ;;
2253                         esac
2254
2255         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2256         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2257
2258                         ;;
2259                 esac
2260                 ;;
2261         (*)
2262
2263         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2264         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2265
2266                 ;;
2267         esac
2268         ;;
2269 (yes)
2270
2271         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2272         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2273
2274         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2275
2276         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2277                 && test -z "${cf_tst_cflags}" \
2278                 && cf_fix_cppflags=no
2279         ;;
2280 esac
2281 done
2282
2283 if test -n "$cf_new_cflags" ; then
2284
2285         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2286         CFLAGS="${CFLAGS}$cf_new_cflags"
2287
2288 fi
2289
2290 if test -n "$cf_new_cppflags" ; then
2291
2292         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2293         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2294
2295 fi
2296
2297 if test -n "$cf_new_extra_cppflags" ; then
2298
2299         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2300         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2301
2302 fi
2303
2304                         ;;
2305                 (*)
2306                         CC="$CC $cf_arg"
2307                         ;;
2308                 esac
2309         done
2310         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2311
2312 echo "${as_me:-configure}:2312: testing resulting CC: '$CC' ..." 1>&5
2313
2314         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2315
2316 echo "${as_me:-configure}:2316: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2317
2318         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2319
2320 echo "${as_me:-configure}:2320: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2321
2322         ;;
2323 (*)
2324         echo "$as_me:2324: result: ok" >&5
2325 echo "${ECHO_T}ok" >&6
2326         ;;
2327 esac
2328
2329 ac_ext=c
2330 ac_cpp='$CPP $CPPFLAGS'
2331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334 ac_main_return=return
2335 echo "$as_me:2335: checking how to run the C preprocessor" >&5
2336 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2337 # On Suns, sometimes $CPP names a directory.
2338 if test -n "$CPP" && test -d "$CPP"; then
2339   CPP=
2340 fi
2341 if test -z "$CPP"; then
2342   if test "${ac_cv_prog_CPP+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345       # Double quotes because CPP needs to be expanded
2346     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2347     do
2348       ac_preproc_ok=false
2349 for ac_c_preproc_warn_flag in '' yes
2350 do
2351   # Use a header file that comes with gcc, so configuring glibc
2352   # with a fresh cross-compiler works.
2353   # On the NeXT, cc -E runs the code through the compiler's parser,
2354   # not just through cpp. "Syntax error" is here to catch this case.
2355   cat >conftest.$ac_ext <<_ACEOF
2356 #line 2356 "configure"
2357 #include "confdefs.h"
2358 #include <assert.h>
2359                      Syntax error
2360 _ACEOF
2361 if { (eval echo "$as_me:2361: \"$ac_cpp conftest.$ac_ext\"") >&5
2362   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2363   ac_status=$?
2364   egrep -v '^ *\+' conftest.er1 >conftest.err
2365   rm -f conftest.er1
2366   cat conftest.err >&5
2367   echo "$as_me:2367: \$? = $ac_status" >&5
2368   (exit $ac_status); } >/dev/null; then
2369   if test -s conftest.err; then
2370     ac_cpp_err=$ac_c_preproc_warn_flag
2371   else
2372     ac_cpp_err=
2373   fi
2374 else
2375   ac_cpp_err=yes
2376 fi
2377 if test -z "$ac_cpp_err"; then
2378   :
2379 else
2380   echo "$as_me: failed program was:" >&5
2381   cat conftest.$ac_ext >&5
2382   # Broken: fails on valid input.
2383 continue
2384 fi
2385 rm -f conftest.err conftest.$ac_ext
2386
2387   # OK, works on sane cases.  Now check whether non-existent headers
2388   # can be detected and how.
2389   cat >conftest.$ac_ext <<_ACEOF
2390 #line 2390 "configure"
2391 #include "confdefs.h"
2392 #include <ac_nonexistent.h>
2393 _ACEOF
2394 if { (eval echo "$as_me:2394: \"$ac_cpp conftest.$ac_ext\"") >&5
2395   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2396   ac_status=$?
2397   egrep -v '^ *\+' conftest.er1 >conftest.err
2398   rm -f conftest.er1
2399   cat conftest.err >&5
2400   echo "$as_me:2400: \$? = $ac_status" >&5
2401   (exit $ac_status); } >/dev/null; then
2402   if test -s conftest.err; then
2403     ac_cpp_err=$ac_c_preproc_warn_flag
2404   else
2405     ac_cpp_err=
2406   fi
2407 else
2408   ac_cpp_err=yes
2409 fi
2410 if test -z "$ac_cpp_err"; then
2411   # Broken: success on invalid input.
2412 continue
2413 else
2414   echo "$as_me: failed program was:" >&5
2415   cat conftest.$ac_ext >&5
2416   # Passes both tests.
2417 ac_preproc_ok=:
2418 break
2419 fi
2420 rm -f conftest.err conftest.$ac_ext
2421
2422 done
2423 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2424 rm -f conftest.err conftest.$ac_ext
2425 if $ac_preproc_ok; then
2426   break
2427 fi
2428
2429     done
2430     ac_cv_prog_CPP=$CPP
2431
2432 fi
2433   CPP=$ac_cv_prog_CPP
2434 else
2435   ac_cv_prog_CPP=$CPP
2436 fi
2437 echo "$as_me:2437: result: $CPP" >&5
2438 echo "${ECHO_T}$CPP" >&6
2439 ac_preproc_ok=false
2440 for ac_c_preproc_warn_flag in '' yes
2441 do
2442   # Use a header file that comes with gcc, so configuring glibc
2443   # with a fresh cross-compiler works.
2444   # On the NeXT, cc -E runs the code through the compiler's parser,
2445   # not just through cpp. "Syntax error" is here to catch this case.
2446   cat >conftest.$ac_ext <<_ACEOF
2447 #line 2447 "configure"
2448 #include "confdefs.h"
2449 #include <assert.h>
2450                      Syntax error
2451 _ACEOF
2452 if { (eval echo "$as_me:2452: \"$ac_cpp conftest.$ac_ext\"") >&5
2453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2454   ac_status=$?
2455   egrep -v '^ *\+' conftest.er1 >conftest.err
2456   rm -f conftest.er1
2457   cat conftest.err >&5
2458   echo "$as_me:2458: \$? = $ac_status" >&5
2459   (exit $ac_status); } >/dev/null; then
2460   if test -s conftest.err; then
2461     ac_cpp_err=$ac_c_preproc_warn_flag
2462   else
2463     ac_cpp_err=
2464   fi
2465 else
2466   ac_cpp_err=yes
2467 fi
2468 if test -z "$ac_cpp_err"; then
2469   :
2470 else
2471   echo "$as_me: failed program was:" >&5
2472   cat conftest.$ac_ext >&5
2473   # Broken: fails on valid input.
2474 continue
2475 fi
2476 rm -f conftest.err conftest.$ac_ext
2477
2478   # OK, works on sane cases.  Now check whether non-existent headers
2479   # can be detected and how.
2480   cat >conftest.$ac_ext <<_ACEOF
2481 #line 2481 "configure"
2482 #include "confdefs.h"
2483 #include <ac_nonexistent.h>
2484 _ACEOF
2485 if { (eval echo "$as_me:2485: \"$ac_cpp conftest.$ac_ext\"") >&5
2486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2487   ac_status=$?
2488   egrep -v '^ *\+' conftest.er1 >conftest.err
2489   rm -f conftest.er1
2490   cat conftest.err >&5
2491   echo "$as_me:2491: \$? = $ac_status" >&5
2492   (exit $ac_status); } >/dev/null; then
2493   if test -s conftest.err; then
2494     ac_cpp_err=$ac_c_preproc_warn_flag
2495   else
2496     ac_cpp_err=
2497   fi
2498 else
2499   ac_cpp_err=yes
2500 fi
2501 if test -z "$ac_cpp_err"; then
2502   # Broken: success on invalid input.
2503 continue
2504 else
2505   echo "$as_me: failed program was:" >&5
2506   cat conftest.$ac_ext >&5
2507   # Passes both tests.
2508 ac_preproc_ok=:
2509 break
2510 fi
2511 rm -f conftest.err conftest.$ac_ext
2512
2513 done
2514 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2515 rm -f conftest.err conftest.$ac_ext
2516 if $ac_preproc_ok; then
2517   :
2518 else
2519   { { echo "$as_me:2519: error: C preprocessor \"$CPP\" fails sanity check" >&5
2520 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2521    { (exit 1); exit 1; }; }
2522 fi
2523
2524 ac_ext=c
2525 ac_cpp='$CPP $CPPFLAGS'
2526 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2527 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2528 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2529 ac_main_return=return
2530
2531 if test $ac_cv_c_compiler_gnu = yes; then
2532     echo "$as_me:2532: checking whether $CC needs -traditional" >&5
2533 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2534 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2535   echo $ECHO_N "(cached) $ECHO_C" >&6
2536 else
2537     ac_pattern="Autoconf.*'x'"
2538   cat >conftest.$ac_ext <<_ACEOF
2539 #line 2539 "configure"
2540 #include "confdefs.h"
2541 #include <sgtty.h>
2542 int Autoconf = TIOCGETP;
2543 _ACEOF
2544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2545   egrep "$ac_pattern" >/dev/null 2>&1; then
2546   ac_cv_prog_gcc_traditional=yes
2547 else
2548   ac_cv_prog_gcc_traditional=no
2549 fi
2550 rm -rf conftest*
2551
2552   if test $ac_cv_prog_gcc_traditional = no; then
2553     cat >conftest.$ac_ext <<_ACEOF
2554 #line 2554 "configure"
2555 #include "confdefs.h"
2556 #include <termio.h>
2557 int Autoconf = TCGETA;
2558 _ACEOF
2559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2560   egrep "$ac_pattern" >/dev/null 2>&1; then
2561   ac_cv_prog_gcc_traditional=yes
2562 fi
2563 rm -rf conftest*
2564
2565   fi
2566 fi
2567 echo "$as_me:2567: result: $ac_cv_prog_gcc_traditional" >&5
2568 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2569   if test $ac_cv_prog_gcc_traditional = yes; then
2570     CC="$CC -traditional"
2571   fi
2572 fi
2573
2574 echo "$as_me:2574: checking whether $CC understands -c and -o together" >&5
2575 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2576 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2577   echo $ECHO_N "(cached) $ECHO_C" >&6
2578 else
2579
2580 cat > conftest.$ac_ext <<CF_EOF
2581 int main(void)
2582 {
2583         ${cf_cv_main_return:-return}(0);
2584 }
2585 CF_EOF
2586 # We do the test twice because some compilers refuse to overwrite an
2587 # existing .o file with -o, though they will create one.
2588 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2589 if { (eval echo "$as_me:2589: \"$ac_try\"") >&5
2590   (eval $ac_try) 2>&5
2591   ac_status=$?
2592   echo "$as_me:2592: \$? = $ac_status" >&5
2593   (exit $ac_status); } &&
2594   test -f conftest2.$ac_objext && { (eval echo "$as_me:2594: \"$ac_try\"") >&5
2595   (eval $ac_try) 2>&5
2596   ac_status=$?
2597   echo "$as_me:2597: \$? = $ac_status" >&5
2598   (exit $ac_status); };
2599 then
2600   eval cf_cv_prog_CC_c_o=yes
2601 else
2602   eval cf_cv_prog_CC_c_o=no
2603 fi
2604 rm -rf conftest*
2605
2606 fi
2607 if test $cf_cv_prog_CC_c_o = yes; then
2608   echo "$as_me:2608: result: yes" >&5
2609 echo "${ECHO_T}yes" >&6
2610 else
2611   echo "$as_me:2611: result: no" >&5
2612 echo "${ECHO_T}no" >&6
2613 fi
2614
2615 if test "$cross_compiling" = yes ; then
2616         LDCONFIG=:
2617 else
2618         case "$cf_cv_system_name" in
2619         (dragonfly*|mirbsd*|freebsd*)
2620                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2621                 ;;
2622         (*) LDPATH=$PATH:/sbin:/usr/sbin
2623                 # Extract the first word of "ldconfig", so it can be a program name with args.
2624 set dummy ldconfig; ac_word=$2
2625 echo "$as_me:2625: checking for $ac_word" >&5
2626 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2627 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2628   echo $ECHO_N "(cached) $ECHO_C" >&6
2629 else
2630   case $LDCONFIG in
2631   [\\/]* | ?:[\\/]*)
2632   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2633   ;;
2634   *)
2635   ac_save_IFS=$IFS; IFS=$ac_path_separator
2636 ac_dummy="$LDPATH"
2637 for ac_dir in $ac_dummy; do
2638   IFS=$ac_save_IFS
2639   test -z "$ac_dir" && ac_dir=.
2640   if $as_executable_p "$ac_dir/$ac_word"; then
2641    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2642    echo "$as_me:2642: found $ac_dir/$ac_word" >&5
2643    break
2644 fi
2645 done
2646
2647   ;;
2648 esac
2649 fi
2650 LDCONFIG=$ac_cv_path_LDCONFIG
2651
2652 if test -n "$LDCONFIG"; then
2653   echo "$as_me:2653: result: $LDCONFIG" >&5
2654 echo "${ECHO_T}$LDCONFIG" >&6
2655 else
2656   echo "$as_me:2656: result: no" >&5
2657 echo "${ECHO_T}no" >&6
2658 fi
2659
2660                 ;;
2661         esac
2662 fi
2663
2664 echo "$as_me:2664: checking if you want to ensure bool is consistent with C++" >&5
2665 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2666
2667 # Check whether --with-cxx or --without-cxx was given.
2668 if test "${with_cxx+set}" = set; then
2669   withval="$with_cxx"
2670   cf_with_cxx=$withval
2671 else
2672   cf_with_cxx=yes
2673 fi;
2674 echo "$as_me:2674: result: $cf_with_cxx" >&5
2675 echo "${ECHO_T}$cf_with_cxx" >&6
2676 if test "X$cf_with_cxx" = Xno ; then
2677         CXX=""
2678         GXX=""
2679 else
2680         # with autoconf 2.13, we can change the error to a warning:
2681                 ac_ext=cc
2682 ac_cpp='$CXXCPP $CPPFLAGS'
2683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2686 ac_main_return=return
2687 if test -n "$ac_tool_prefix"; then
2688   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2689   do
2690     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2691 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2692 echo "$as_me:2692: checking for $ac_word" >&5
2693 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2694 if test "${ac_cv_prog_CXX+set}" = set; then
2695   echo $ECHO_N "(cached) $ECHO_C" >&6
2696 else
2697   if test -n "$CXX"; then
2698   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2699 else
2700   ac_save_IFS=$IFS; IFS=$ac_path_separator
2701 ac_dummy="$PATH"
2702 for ac_dir in $ac_dummy; do
2703   IFS=$ac_save_IFS
2704   test -z "$ac_dir" && ac_dir=.
2705   $as_executable_p "$ac_dir/$ac_word" || continue
2706 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2707 echo "$as_me:2707: found $ac_dir/$ac_word" >&5
2708 break
2709 done
2710
2711 fi
2712 fi
2713 CXX=$ac_cv_prog_CXX
2714 if test -n "$CXX"; then
2715   echo "$as_me:2715: result: $CXX" >&5
2716 echo "${ECHO_T}$CXX" >&6
2717 else
2718   echo "$as_me:2718: result: no" >&5
2719 echo "${ECHO_T}no" >&6
2720 fi
2721
2722     test -n "$CXX" && break
2723   done
2724 fi
2725 if test -z "$CXX"; then
2726   ac_ct_CXX=$CXX
2727   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2728 do
2729   # Extract the first word of "$ac_prog", so it can be a program name with args.
2730 set dummy $ac_prog; ac_word=$2
2731 echo "$as_me:2731: checking for $ac_word" >&5
2732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2733 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2734   echo $ECHO_N "(cached) $ECHO_C" >&6
2735 else
2736   if test -n "$ac_ct_CXX"; then
2737   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2738 else
2739   ac_save_IFS=$IFS; IFS=$ac_path_separator
2740 ac_dummy="$PATH"
2741 for ac_dir in $ac_dummy; do
2742   IFS=$ac_save_IFS
2743   test -z "$ac_dir" && ac_dir=.
2744   $as_executable_p "$ac_dir/$ac_word" || continue
2745 ac_cv_prog_ac_ct_CXX="$ac_prog"
2746 echo "$as_me:2746: found $ac_dir/$ac_word" >&5
2747 break
2748 done
2749
2750 fi
2751 fi
2752 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2753 if test -n "$ac_ct_CXX"; then
2754   echo "$as_me:2754: result: $ac_ct_CXX" >&5
2755 echo "${ECHO_T}$ac_ct_CXX" >&6
2756 else
2757   echo "$as_me:2757: result: no" >&5
2758 echo "${ECHO_T}no" >&6
2759 fi
2760
2761   test -n "$ac_ct_CXX" && break
2762 done
2763 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2764
2765   CXX=$ac_ct_CXX
2766 fi
2767
2768 # Provide some information about the compiler.
2769 echo "$as_me:2769:" \
2770      "checking for C++ compiler version" >&5
2771 ac_compiler=`set X $ac_compile; echo $2`
2772 { (eval echo "$as_me:2772: \"$ac_compiler --version </dev/null >&5\"") >&5
2773   (eval $ac_compiler --version </dev/null >&5) 2>&5
2774   ac_status=$?
2775   echo "$as_me:2775: \$? = $ac_status" >&5
2776   (exit $ac_status); }
2777 { (eval echo "$as_me:2777: \"$ac_compiler -v </dev/null >&5\"") >&5
2778   (eval $ac_compiler -v </dev/null >&5) 2>&5
2779   ac_status=$?
2780   echo "$as_me:2780: \$? = $ac_status" >&5
2781   (exit $ac_status); }
2782 { (eval echo "$as_me:2782: \"$ac_compiler -V </dev/null >&5\"") >&5
2783   (eval $ac_compiler -V </dev/null >&5) 2>&5
2784   ac_status=$?
2785   echo "$as_me:2785: \$? = $ac_status" >&5
2786   (exit $ac_status); }
2787
2788 echo "$as_me:2788: checking whether we are using the GNU C++ compiler" >&5
2789 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2790 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2791   echo $ECHO_N "(cached) $ECHO_C" >&6
2792 else
2793   cat >conftest.$ac_ext <<_ACEOF
2794 #line 2794 "configure"
2795 #include "confdefs.h"
2796
2797 int
2798 main (void)
2799 {
2800 #ifndef __GNUC__
2801        choke me
2802 #endif
2803
2804   ;
2805   return 0;
2806 }
2807 _ACEOF
2808 rm -f conftest.$ac_objext
2809 if { (eval echo "$as_me:2809: \"$ac_compile\"") >&5
2810   (eval $ac_compile) 2>&5
2811   ac_status=$?
2812   echo "$as_me:2812: \$? = $ac_status" >&5
2813   (exit $ac_status); } &&
2814          { ac_try='test -s conftest.$ac_objext'
2815   { (eval echo "$as_me:2815: \"$ac_try\"") >&5
2816   (eval $ac_try) 2>&5
2817   ac_status=$?
2818   echo "$as_me:2818: \$? = $ac_status" >&5
2819   (exit $ac_status); }; }; then
2820   ac_compiler_gnu=yes
2821 else
2822   echo "$as_me: failed program was:" >&5
2823 cat conftest.$ac_ext >&5
2824 ac_compiler_gnu=no
2825 fi
2826 rm -f conftest.$ac_objext conftest.$ac_ext
2827 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2828
2829 fi
2830 echo "$as_me:2830: result: $ac_cv_cxx_compiler_gnu" >&5
2831 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2832 GXX=`test $ac_compiler_gnu = yes && echo yes`
2833 ac_test_CXXFLAGS=${CXXFLAGS+set}
2834 ac_save_CXXFLAGS=$CXXFLAGS
2835 CXXFLAGS="-g"
2836 echo "$as_me:2836: checking whether $CXX accepts -g" >&5
2837 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2838 if test "${ac_cv_prog_cxx_g+set}" = set; then
2839   echo $ECHO_N "(cached) $ECHO_C" >&6
2840 else
2841   cat >conftest.$ac_ext <<_ACEOF
2842 #line 2842 "configure"
2843 #include "confdefs.h"
2844
2845 int
2846 main (void)
2847 {
2848
2849   ;
2850   return 0;
2851 }
2852 _ACEOF
2853 rm -f conftest.$ac_objext
2854 if { (eval echo "$as_me:2854: \"$ac_compile\"") >&5
2855   (eval $ac_compile) 2>&5
2856   ac_status=$?
2857   echo "$as_me:2857: \$? = $ac_status" >&5
2858   (exit $ac_status); } &&
2859          { ac_try='test -s conftest.$ac_objext'
2860   { (eval echo "$as_me:2860: \"$ac_try\"") >&5
2861   (eval $ac_try) 2>&5
2862   ac_status=$?
2863   echo "$as_me:2863: \$? = $ac_status" >&5
2864   (exit $ac_status); }; }; then
2865   ac_cv_prog_cxx_g=yes
2866 else
2867   echo "$as_me: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2869 ac_cv_prog_cxx_g=no
2870 fi
2871 rm -f conftest.$ac_objext conftest.$ac_ext
2872 fi
2873 echo "$as_me:2873: result: $ac_cv_prog_cxx_g" >&5
2874 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2875 if test "$ac_test_CXXFLAGS" = set; then
2876   CXXFLAGS=$ac_save_CXXFLAGS
2877 elif test $ac_cv_prog_cxx_g = yes; then
2878   if test "$GXX" = yes; then
2879     CXXFLAGS="-g -O2"
2880   else
2881     CXXFLAGS="-g"
2882   fi
2883 else
2884   if test "$GXX" = yes; then
2885     CXXFLAGS="-O2"
2886   else
2887     CXXFLAGS=
2888   fi
2889 fi
2890 for ac_declaration in \
2891    ''\
2892    '#include <stdlib.h>' \
2893    'extern "C" void std::exit (int) throw (); using std::exit;' \
2894    'extern "C" void std::exit (int); using std::exit;' \
2895    'extern "C" void exit (int) throw ();' \
2896    'extern "C" void exit (int);' \
2897    'void exit (int);'
2898 do
2899   cat >conftest.$ac_ext <<_ACEOF
2900 #line 2900 "configure"
2901 #include "confdefs.h"
2902 #include <stdlib.h>
2903 $ac_declaration
2904 int
2905 main (void)
2906 {
2907 exit (42);
2908   ;
2909   return 0;
2910 }
2911 _ACEOF
2912 rm -f conftest.$ac_objext
2913 if { (eval echo "$as_me:2913: \"$ac_compile\"") >&5
2914   (eval $ac_compile) 2>&5
2915   ac_status=$?
2916   echo "$as_me:2916: \$? = $ac_status" >&5
2917   (exit $ac_status); } &&
2918          { ac_try='test -s conftest.$ac_objext'
2919   { (eval echo "$as_me:2919: \"$ac_try\"") >&5
2920   (eval $ac_try) 2>&5
2921   ac_status=$?
2922   echo "$as_me:2922: \$? = $ac_status" >&5
2923   (exit $ac_status); }; }; then
2924   :
2925 else
2926   echo "$as_me: failed program was:" >&5
2927 cat conftest.$ac_ext >&5
2928 continue
2929 fi
2930 rm -f conftest.$ac_objext conftest.$ac_ext
2931   cat >conftest.$ac_ext <<_ACEOF
2932 #line 2932 "configure"
2933 #include "confdefs.h"
2934 $ac_declaration
2935 int
2936 main (void)
2937 {
2938 exit (42);
2939   ;
2940   return 0;
2941 }
2942 _ACEOF
2943 rm -f conftest.$ac_objext
2944 if { (eval echo "$as_me:2944: \"$ac_compile\"") >&5
2945   (eval $ac_compile) 2>&5
2946   ac_status=$?
2947   echo "$as_me:2947: \$? = $ac_status" >&5
2948   (exit $ac_status); } &&
2949          { ac_try='test -s conftest.$ac_objext'
2950   { (eval echo "$as_me:2950: \"$ac_try\"") >&5
2951   (eval $ac_try) 2>&5
2952   ac_status=$?
2953   echo "$as_me:2953: \$? = $ac_status" >&5
2954   (exit $ac_status); }; }; then
2955   break
2956 else
2957   echo "$as_me: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 fi
2960 rm -f conftest.$ac_objext conftest.$ac_ext
2961 done
2962 rm -rf conftest*
2963 if test -n "$ac_declaration"; then
2964   echo '#ifdef __cplusplus' >>confdefs.h
2965   echo $ac_declaration      >>confdefs.h
2966   echo '#endif'             >>confdefs.h
2967 fi
2968
2969 ac_ext=c
2970 ac_cpp='$CPP $CPPFLAGS'
2971 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2972 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2973 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2974 ac_main_return=return
2975
2976         ac_ext=cc
2977 ac_cpp='$CXXCPP $CPPFLAGS'
2978 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2979 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2980 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2981 ac_main_return=return
2982
2983         if test "x$cf_with_cxx" != xno
2984         then
2985                 # Several of the C++ configurations do not work, particularly when
2986                 # cross-compiling (20140913 -TD)
2987                 echo "$as_me:2987: checking if $CXX works" >&5
2988 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2989
2990                 save_CPPFLAGS="$CPPFLAGS"
2991                 eval cf_includedir=${includedir}
2992                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2993
2994 cat >conftest.$ac_ext <<_ACEOF
2995 #line 2995 "configure"
2996 #include "confdefs.h"
2997
2998 #include <stdlib.h>
2999 #include <stdio.h>
3000
3001 int
3002 main (void)
3003 {
3004
3005                 printf("Hello world!\n")
3006
3007   ;
3008   return 0;
3009 }
3010 _ACEOF
3011 rm -f conftest.$ac_objext
3012 if { (eval echo "$as_me:3012: \"$ac_compile\"") >&5
3013   (eval $ac_compile) 2>&5
3014   ac_status=$?
3015   echo "$as_me:3015: \$? = $ac_status" >&5
3016   (exit $ac_status); } &&
3017          { ac_try='test -s conftest.$ac_objext'
3018   { (eval echo "$as_me:3018: \"$ac_try\"") >&5
3019   (eval $ac_try) 2>&5
3020   ac_status=$?
3021   echo "$as_me:3021: \$? = $ac_status" >&5
3022   (exit $ac_status); }; }; then
3023   cf_cxx_works=yes
3024 else
3025   echo "$as_me: failed program was:" >&5
3026 cat conftest.$ac_ext >&5
3027 cf_cxx_works=no
3028 fi
3029 rm -f conftest.$ac_objext conftest.$ac_ext
3030                 CPPFLAGS="$save_CPPFLAGS"
3031
3032                 echo "$as_me:3032: result: $cf_cxx_works" >&5
3033 echo "${ECHO_T}$cf_cxx_works" >&6
3034                 if test "x$cf_cxx_works" = xno
3035                 then
3036                         { echo "$as_me:3036: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3037 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3038                         cf_with_cxx=no; CXX=""; GXX="";
3039                 fi
3040         fi
3041         ac_ext=c
3042 ac_cpp='$CPP $CPPFLAGS'
3043 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3044 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3045 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3046 ac_main_return=return
3047
3048         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3049         if test "$CXX" = "g++" ; then
3050                 # Extract the first word of "g++", so it can be a program name with args.
3051 set dummy g++; ac_word=$2
3052 echo "$as_me:3052: checking for $ac_word" >&5
3053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3054 if test "${ac_cv_path_CXX+set}" = set; then
3055   echo $ECHO_N "(cached) $ECHO_C" >&6
3056 else
3057   case $CXX in
3058   [\\/]* | ?:[\\/]*)
3059   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3060   ;;
3061   *)
3062   ac_save_IFS=$IFS; IFS=$ac_path_separator
3063 ac_dummy="$PATH"
3064 for ac_dir in $ac_dummy; do
3065   IFS=$ac_save_IFS
3066   test -z "$ac_dir" && ac_dir=.
3067   if $as_executable_p "$ac_dir/$ac_word"; then
3068    ac_cv_path_CXX="$ac_dir/$ac_word"
3069    echo "$as_me:3069: found $ac_dir/$ac_word" >&5
3070    break
3071 fi
3072 done
3073
3074   ;;
3075 esac
3076 fi
3077 CXX=$ac_cv_path_CXX
3078
3079 if test -n "$CXX"; then
3080   echo "$as_me:3080: result: $CXX" >&5
3081 echo "${ECHO_T}$CXX" >&6
3082 else
3083   echo "$as_me:3083: result: no" >&5
3084 echo "${ECHO_T}no" >&6
3085 fi
3086
3087         fi
3088         case "x$CXX" in
3089         (x|xg++)
3090                 { echo "$as_me:3090: WARNING: You don't have any C++ compiler, too bad" >&5
3091 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3092                 cf_with_cxx=no; CXX=""; GXX="";
3093                 ;;
3094         esac
3095 fi
3096
3097 GXX_VERSION=none
3098 if test "$GXX" = yes; then
3099         echo "$as_me:3099: checking version of ${CXX:-g++}" >&5
3100 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3101         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3102         if test -z "$GXX_VERSION"
3103         then
3104                 GXX_VERSION=unknown
3105                 GXX=no
3106         fi
3107         echo "$as_me:3107: result: $GXX_VERSION" >&5
3108 echo "${ECHO_T}$GXX_VERSION" >&6
3109 fi
3110
3111 case $GXX_VERSION in
3112 (1*|2.[0-6]*)
3113         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3114         # cf_cxx_library=no
3115         { echo "$as_me:3115: WARNING: templates do not work" >&5
3116 echo "$as_me: WARNING: templates do not work" >&2;}
3117         ;;
3118 esac
3119
3120 echo "$as_me:3120: checking if you want to build C++ binding and demo" >&5
3121 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3122
3123 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3124 if test "${with_cxx_binding+set}" = set; then
3125   withval="$with_cxx_binding"
3126   cf_with_cxx_binding=$withval
3127 else
3128   cf_with_cxx_binding=$cf_with_cxx
3129 fi;
3130 echo "$as_me:3130: result: $cf_with_cxx_binding" >&5
3131 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3132
3133 echo "$as_me:3133: checking if you want to build with Ada95" >&5
3134 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3135 echo "$as_me:3135: result: $cf_with_ada" >&5
3136 echo "${ECHO_T}$cf_with_ada" >&6
3137
3138 echo "$as_me:3138: checking if you want to install terminal database" >&5
3139 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3140
3141 # Check whether --enable-db-install or --disable-db-install was given.
3142 if test "${enable_db_install+set}" = set; then
3143   enableval="$enable_db_install"
3144   cf_with_db_install=$enableval
3145 else
3146   cf_with_db_install=yes
3147 fi;
3148 echo "$as_me:3148: result: $cf_with_db_install" >&5
3149 echo "${ECHO_T}$cf_with_db_install" >&6
3150
3151 echo "$as_me:3151: checking if you want to install manpages" >&5
3152 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3153
3154 # Check whether --with-manpages or --without-manpages was given.
3155 if test "${with_manpages+set}" = set; then
3156   withval="$with_manpages"
3157   cf_with_manpages=$withval
3158 else
3159   cf_with_manpages=yes
3160 fi;
3161 echo "$as_me:3161: result: $cf_with_manpages" >&5
3162 echo "${ECHO_T}$cf_with_manpages" >&6
3163
3164 echo "$as_me:3164: checking if you want to build programs such as tic" >&5
3165 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3166
3167 # Check whether --with-progs or --without-progs was given.
3168 if test "${with_progs+set}" = set; then
3169   withval="$with_progs"
3170   cf_with_progs=$withval
3171 else
3172   cf_with_progs=yes
3173 fi;
3174 echo "$as_me:3174: result: $cf_with_progs" >&5
3175 echo "${ECHO_T}$cf_with_progs" >&6
3176
3177 if test -f $srcdir/tack/tack.h; then
3178         if test "x$cross_compiling" = xyes ; then
3179                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3180
3181 echo "${as_me:-configure}:3181: testing ignoring tack because we are cross-compiling ..." 1>&5
3182
3183                 cf_with_tack=no
3184         else
3185                 echo "$as_me:3185: checking if you want to build the tack program" >&5
3186 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3187
3188 # Check whether --with-tack or --without-tack was given.
3189 if test "${with_tack+set}" = set; then
3190   withval="$with_tack"
3191   cf_with_tack=$withval
3192 else
3193   cf_with_tack=$cf_with_progs
3194 fi;
3195                 echo "$as_me:3195: result: $cf_with_tack" >&5
3196 echo "${ECHO_T}$cf_with_tack" >&6
3197         fi
3198 else
3199         cf_with_tack=no
3200 fi
3201
3202 echo "$as_me:3202: checking if you want to build test-programs" >&5
3203 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3204
3205 # Check whether --with-tests or --without-tests was given.
3206 if test "${with_tests+set}" = set; then
3207   withval="$with_tests"
3208   cf_with_tests=$withval
3209 else
3210   cf_with_tests=yes
3211 fi;
3212 echo "$as_me:3212: result: $cf_with_tests" >&5
3213 echo "${ECHO_T}$cf_with_tests" >&6
3214
3215 echo "$as_me:3215: checking if you wish to install curses.h" >&5
3216 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3217
3218 # Check whether --with-curses-h or --without-curses-h was given.
3219 if test "${with_curses_h+set}" = set; then
3220   withval="$with_curses_h"
3221   with_curses_h=$withval
3222 else
3223   with_curses_h=yes
3224 fi;
3225 echo "$as_me:3225: result: $with_curses_h" >&5
3226 echo "${ECHO_T}$with_curses_h" >&6
3227
3228 modules_to_build="ncurses"
3229 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3230 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3231 modules_to_build="$modules_to_build panel menu form"
3232
3233 test "$program_prefix" != NONE &&
3234   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3235 # Use a double $ so make ignores it.
3236 test "$program_suffix" != NONE &&
3237   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3238 # Double any \ or $.  echo might interpret backslashes.
3239 # By default was `s,x,x', remove it if useless.
3240 cat <<\_ACEOF >conftest.sed
3241 s/[\\$]/&&/g;s/;s,x,x,$//
3242 _ACEOF
3243 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3244 rm conftest.sed
3245
3246 for ac_prog in mawk gawk nawk awk
3247 do
3248   # Extract the first word of "$ac_prog", so it can be a program name with args.
3249 set dummy $ac_prog; ac_word=$2
3250 echo "$as_me:3250: checking for $ac_word" >&5
3251 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3252 if test "${ac_cv_prog_AWK+set}" = set; then
3253   echo $ECHO_N "(cached) $ECHO_C" >&6
3254 else
3255   if test -n "$AWK"; then
3256   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3257 else
3258   ac_save_IFS=$IFS; IFS=$ac_path_separator
3259 ac_dummy="$PATH"
3260 for ac_dir in $ac_dummy; do
3261   IFS=$ac_save_IFS
3262   test -z "$ac_dir" && ac_dir=.
3263   $as_executable_p "$ac_dir/$ac_word" || continue
3264 ac_cv_prog_AWK="$ac_prog"
3265 echo "$as_me:3265: found $ac_dir/$ac_word" >&5
3266 break
3267 done
3268
3269 fi
3270 fi
3271 AWK=$ac_cv_prog_AWK
3272 if test -n "$AWK"; then
3273   echo "$as_me:3273: result: $AWK" >&5
3274 echo "${ECHO_T}$AWK" >&6
3275 else
3276   echo "$as_me:3276: result: no" >&5
3277 echo "${ECHO_T}no" >&6
3278 fi
3279
3280   test -n "$AWK" && break
3281 done
3282
3283 test -z "$AWK" && { { echo "$as_me:3283: error: No awk program found" >&5
3284 echo "$as_me: error: No awk program found" >&2;}
3285    { (exit 1); exit 1; }; }
3286
3287 echo "$as_me:3287: checking for egrep" >&5
3288 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3289 if test "${ac_cv_prog_egrep+set}" = set; then
3290   echo $ECHO_N "(cached) $ECHO_C" >&6
3291 else
3292   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3293                 then ac_cv_prog_egrep='grep -E'
3294                 else ac_cv_prog_egrep='egrep'
3295         fi
3296 fi
3297 echo "$as_me:3297: result: $ac_cv_prog_egrep" >&5
3298 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3299         EGREP=$ac_cv_prog_egrep
3300
3301         test -z "$EGREP" && { { echo "$as_me:3301: error: No egrep program found" >&5
3302 echo "$as_me: error: No egrep program found" >&2;}
3303    { (exit 1); exit 1; }; }
3304
3305 # Find a good install program.  We prefer a C program (faster),
3306 # so one script is as good as another.  But avoid the broken or
3307 # incompatible versions:
3308 # SysV /etc/install, /usr/sbin/install
3309 # SunOS /usr/etc/install
3310 # IRIX /sbin/install
3311 # AIX /bin/install
3312 # AmigaOS /C/install, which installs bootblocks on floppy discs
3313 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3314 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3315 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3316 # ./install, which can be erroneously created by make from ./install.sh.
3317 echo "$as_me:3317: checking for a BSD compatible install" >&5
3318 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3319 if test -z "$INSTALL"; then
3320 if test "${ac_cv_path_install+set}" = set; then
3321   echo $ECHO_N "(cached) $ECHO_C" >&6
3322 else
3323     ac_save_IFS=$IFS; IFS=$ac_path_separator
3324   for ac_dir in $PATH; do
3325     IFS=$ac_save_IFS
3326     # Account for people who put trailing slashes in PATH elements.
3327     case $ac_dir/ in
3328     / | ./ | .// | /cC/* \
3329     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3330     | /usr/ucb/* ) ;;
3331     *)
3332       # OSF1 and SCO ODT 3.0 have their own names for install.
3333       # Don't use installbsd from OSF since it installs stuff as root
3334       # by default.
3335       for ac_prog in ginstall scoinst install; do
3336         if $as_executable_p "$ac_dir/$ac_prog"; then
3337           if test $ac_prog = install &&
3338             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3339             # AIX install.  It has an incompatible calling convention.
3340             :
3341           elif test $ac_prog = install &&
3342             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3343             # program-specific install script used by HP pwplus--don't use.
3344             :
3345           else
3346             ac_cv_path_install="$ac_dir/$ac_prog -c"
3347             break 2
3348           fi
3349         fi
3350       done
3351       ;;
3352     esac
3353   done
3354
3355 fi
3356   if test "${ac_cv_path_install+set}" = set; then
3357     INSTALL=$ac_cv_path_install
3358   else
3359     # As a last resort, use the slow shell script.  We don't cache a
3360     # path for INSTALL within a source directory, because that will
3361     # break other packages using the cache if that directory is
3362     # removed, or if the path is relative.
3363     INSTALL=$ac_install_sh
3364   fi
3365 fi
3366 echo "$as_me:3366: result: $INSTALL" >&5
3367 echo "${ECHO_T}$INSTALL" >&6
3368
3369 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3370 # It thinks the first close brace ends the variable substitution.
3371 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3372
3373 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3374
3375 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3376
3377 case $INSTALL in
3378 (/*)
3379         ;;
3380 (*)
3381         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3382         test -z "$cf_dir" && cf_dir=.
3383         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3384         ;;
3385 esac
3386
3387 for ac_prog in lint cppcheck splint
3388 do
3389   # Extract the first word of "$ac_prog", so it can be a program name with args.
3390 set dummy $ac_prog; ac_word=$2
3391 echo "$as_me:3391: checking for $ac_word" >&5
3392 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3393 if test "${ac_cv_prog_LINT+set}" = set; then
3394   echo $ECHO_N "(cached) $ECHO_C" >&6
3395 else
3396   if test -n "$LINT"; then
3397   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3398 else
3399   ac_save_IFS=$IFS; IFS=$ac_path_separator
3400 ac_dummy="$PATH"
3401 for ac_dir in $ac_dummy; do
3402   IFS=$ac_save_IFS
3403   test -z "$ac_dir" && ac_dir=.
3404   $as_executable_p "$ac_dir/$ac_word" || continue
3405 ac_cv_prog_LINT="$ac_prog"
3406 echo "$as_me:3406: found $ac_dir/$ac_word" >&5
3407 break
3408 done
3409
3410 fi
3411 fi
3412 LINT=$ac_cv_prog_LINT
3413 if test -n "$LINT"; then
3414   echo "$as_me:3414: result: $LINT" >&5
3415 echo "${ECHO_T}$LINT" >&6
3416 else
3417   echo "$as_me:3417: result: no" >&5
3418 echo "${ECHO_T}no" >&6
3419 fi
3420
3421   test -n "$LINT" && break
3422 done
3423
3424 echo "$as_me:3424: checking whether ln -s works" >&5
3425 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3426 LN_S=$as_ln_s
3427 if test "$LN_S" = "ln -s"; then
3428   echo "$as_me:3428: result: yes" >&5
3429 echo "${ECHO_T}yes" >&6
3430 else
3431   echo "$as_me:3431: result: no, using $LN_S" >&5
3432 echo "${ECHO_T}no, using $LN_S" >&6
3433 fi
3434
3435 echo "$as_me:3435: checking if $LN_S -f options work" >&5
3436 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3437
3438 rm -f conf$$.src conf$$dst
3439 echo >conf$$.dst
3440 echo first >conf$$.src
3441 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3442         cf_prog_ln_sf=yes
3443 else
3444         cf_prog_ln_sf=no
3445 fi
3446 rm -f conf$$.dst conf$$src
3447 echo "$as_me:3447: result: $cf_prog_ln_sf" >&5
3448 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3449
3450 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3451
3452 echo "$as_me:3452: checking for long file names" >&5
3453 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3454 if test "${ac_cv_sys_long_file_names+set}" = set; then
3455   echo $ECHO_N "(cached) $ECHO_C" >&6
3456 else
3457   ac_cv_sys_long_file_names=yes
3458 # Test for long file names in all the places we know might matter:
3459 #      .                the current directory, where building will happen
3460 #      $prefix/lib      where we will be installing things
3461 #      $exec_prefix/lib likewise
3462 # eval it to expand exec_prefix.
3463 #      $TMPDIR          if set, where it might want to write temporary files
3464 # if $TMPDIR is not set:
3465 #      /tmp             where it might want to write temporary files
3466 #      /var/tmp         likewise
3467 #      /usr/tmp         likewise
3468 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3469   ac_tmpdirs=$TMPDIR
3470 else
3471   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3472 fi
3473 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3474   test -d $ac_dir || continue
3475   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3476   ac_xdir=$ac_dir/cf$$
3477   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3478   ac_tf1=$ac_xdir/conftest9012345
3479   ac_tf2=$ac_xdir/conftest9012346
3480   (echo 1 >$ac_tf1) 2>/dev/null
3481   (echo 2 >$ac_tf2) 2>/dev/null
3482   ac_val=`cat $ac_tf1 2>/dev/null`
3483   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3484     ac_cv_sys_long_file_names=no
3485     rm -rf $ac_xdir 2>/dev/null
3486     break
3487   fi
3488   rm -rf $ac_xdir 2>/dev/null
3489 done
3490 fi
3491 echo "$as_me:3491: result: $ac_cv_sys_long_file_names" >&5
3492 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3493 if test $ac_cv_sys_long_file_names = yes; then
3494
3495 cat >>confdefs.h <<\EOF
3496 #define HAVE_LONG_FILE_NAMES 1
3497 EOF
3498
3499 fi
3500
3501 # if we find pkg-config, check if we should install the ".pc" files.
3502
3503 echo "$as_me:3503: checking if you want to use pkg-config" >&5
3504 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3505
3506 # Check whether --with-pkg-config or --without-pkg-config was given.
3507 if test "${with_pkg_config+set}" = set; then
3508   withval="$with_pkg_config"
3509   cf_pkg_config=$withval
3510 else
3511   cf_pkg_config=yes
3512 fi;
3513 echo "$as_me:3513: result: $cf_pkg_config" >&5
3514 echo "${ECHO_T}$cf_pkg_config" >&6
3515
3516 case $cf_pkg_config in
3517 (no)
3518         PKG_CONFIG=none
3519         ;;
3520 (yes)
3521
3522 if test -n "$ac_tool_prefix"; then
3523   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3524 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   case $PKG_CONFIG in
3531   [\\/]* | ?:[\\/]*)
3532   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3533   ;;
3534   *)
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   if $as_executable_p "$ac_dir/$ac_word"; then
3541    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3542    echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543    break
3544 fi
3545 done
3546
3547   ;;
3548 esac
3549 fi
3550 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3551
3552 if test -n "$PKG_CONFIG"; then
3553   echo "$as_me:3553: result: $PKG_CONFIG" >&5
3554 echo "${ECHO_T}$PKG_CONFIG" >&6
3555 else
3556   echo "$as_me:3556: result: no" >&5
3557 echo "${ECHO_T}no" >&6
3558 fi
3559
3560 fi
3561 if test -z "$ac_cv_path_PKG_CONFIG"; then
3562   ac_pt_PKG_CONFIG=$PKG_CONFIG
3563   # Extract the first word of "pkg-config", so it can be a program name with args.
3564 set dummy pkg-config; ac_word=$2
3565 echo "$as_me:3565: checking for $ac_word" >&5
3566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3567 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570   case $ac_pt_PKG_CONFIG in
3571   [\\/]* | ?:[\\/]*)
3572   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3573   ;;
3574   *)
3575   ac_save_IFS=$IFS; IFS=$ac_path_separator
3576 ac_dummy="$PATH"
3577 for ac_dir in $ac_dummy; do
3578   IFS=$ac_save_IFS
3579   test -z "$ac_dir" && ac_dir=.
3580   if $as_executable_p "$ac_dir/$ac_word"; then
3581    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3582    echo "$as_me:3582: found $ac_dir/$ac_word" >&5
3583    break
3584 fi
3585 done
3586
3587   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3588   ;;
3589 esac
3590 fi
3591 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3592
3593 if test -n "$ac_pt_PKG_CONFIG"; then
3594   echo "$as_me:3594: result: $ac_pt_PKG_CONFIG" >&5
3595 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3596 else
3597   echo "$as_me:3597: result: no" >&5
3598 echo "${ECHO_T}no" >&6
3599 fi
3600
3601   PKG_CONFIG=$ac_pt_PKG_CONFIG
3602 else
3603   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3604 fi
3605
3606         ;;
3607 (*)
3608         PKG_CONFIG=$withval
3609         ;;
3610 esac
3611
3612 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3613 if test "$PKG_CONFIG" != none ; then
3614
3615 if test "x$prefix" != xNONE; then
3616         cf_path_syntax="$prefix"
3617 else
3618         cf_path_syntax="$ac_default_prefix"
3619 fi
3620
3621 case ".$PKG_CONFIG" in
3622 (.\$\(*\)*|.\'*\'*)
3623         ;;
3624 (..|./*|.\\*)
3625         ;;
3626 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3627         ;;
3628 (.\${*prefix}*|.\${*dir}*)
3629         eval PKG_CONFIG="$PKG_CONFIG"
3630         case ".$PKG_CONFIG" in
3631         (.NONE/*)
3632                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3633                 ;;
3634         esac
3635         ;;
3636 (.no|.NONE/*)
3637         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3638         ;;
3639 (*)
3640         { { echo "$as_me:3640: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3641 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3642    { (exit 1); exit 1; }; }
3643         ;;
3644 esac
3645
3646 elif test "x$cf_pkg_config" != xno ; then
3647         { echo "$as_me:3647: WARNING: pkg-config is not installed" >&5
3648 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3649 fi
3650
3651 case $PKG_CONFIG in
3652 (no|none|yes)
3653         echo "$as_me:3653: checking for pkg-config library directory" >&5
3654 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3655         ;;
3656 (*)
3657         echo "$as_me:3657: checking for $PKG_CONFIG library directory" >&5
3658 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3659         ;;
3660 esac
3661
3662 PKG_CONFIG_LIBDIR=no
3663
3664 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3665 if test "${with_pkg_config_libdir+set}" = set; then
3666   withval="$with_pkg_config_libdir"
3667   PKG_CONFIG_LIBDIR=$withval
3668 else
3669   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3670 fi;
3671
3672 case x$PKG_CONFIG_LIBDIR in
3673 (x/*)
3674         ;;
3675 (xyes)
3676         # Look for the library directory using the same prefix as the executable
3677         if test "x$PKG_CONFIG" = xnone
3678         then
3679                 cf_path=$prefix
3680         else
3681                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3682         fi
3683
3684         # If you don't like using the default architecture, you have to specify the
3685         # intended library directory and corresponding compiler/linker options.
3686         #
3687         # This case allows for Debian's 2014-flavor of multiarch, along with the
3688         # most common variations before that point.  Some other variants spell the
3689         # directory differently, e.g., "pkg-config", and put it in unusual places.
3690         # pkg-config has always been poorly standardized, which is ironic...
3691         case x`(arch) 2>/dev/null` in
3692         (*64)
3693                 cf_search_path="\
3694                         $cf_path/lib/*64-linux-gnu \
3695                         $cf_path/share \
3696                         $cf_path/lib64 \
3697                         $cf_path/lib32 \
3698                         $cf_path/lib"
3699                 ;;
3700         (*)
3701                 cf_search_path="\
3702                         $cf_path/lib/*-linux-gnu \
3703                         $cf_path/share \
3704                         $cf_path/lib32 \
3705                         $cf_path/lib \
3706                         $cf_path/libdata"
3707                 ;;
3708         esac
3709
3710         test -n "$verbose" && echo "    list..." 1>&6
3711
3712 echo "${as_me:-configure}:3712: testing list... ..." 1>&5
3713
3714         for cf_config in $cf_search_path
3715         do
3716                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3717
3718 echo "${as_me:-configure}:3718: testing checking $cf_config/pkgconfig ..." 1>&5
3719
3720                 if test -d $cf_config/pkgconfig
3721                 then
3722                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3723                         echo "$as_me:3723: checking done" >&5
3724 echo $ECHO_N "checking done... $ECHO_C" >&6
3725                         break
3726                 fi
3727         done
3728         ;;
3729 (*)
3730         ;;
3731 esac
3732
3733 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3734         echo "$as_me:3734: result: $PKG_CONFIG_LIBDIR" >&5
3735 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3736 fi
3737
3738 if test "x$PKG_CONFIG" != xnone
3739 then
3740         echo "$as_me:3740: checking if we should install .pc files for $PKG_CONFIG" >&5
3741 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3742 else
3743         echo "$as_me:3743: checking if we should install .pc files" >&5
3744 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3745 fi
3746
3747 # Check whether --enable-pc-files or --disable-pc-files was given.
3748 if test "${enable_pc_files+set}" = set; then
3749   enableval="$enable_pc_files"
3750   enable_pc_files=$enableval
3751 else
3752   enable_pc_files=no
3753 fi;
3754 echo "$as_me:3754: result: $enable_pc_files" >&5
3755 echo "${ECHO_T}$enable_pc_files" >&6
3756
3757 if test "x$enable_pc_files" != xno
3758 then
3759         MAKE_PC_FILES=
3760         case "x$PKG_CONFIG_LIBDIR" in
3761         (xno|xyes)
3762                 { echo "$as_me:3762: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3763 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3764                 ;;
3765         (*)
3766
3767 if test "x$prefix" != xNONE; then
3768         cf_path_syntax="$prefix"
3769 else
3770         cf_path_syntax="$ac_default_prefix"
3771 fi
3772
3773 case ".$PKG_CONFIG_LIBDIR" in
3774 (.\$\(*\)*|.\'*\'*)
3775         ;;
3776 (..|./*|.\\*)
3777         ;;
3778 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3779         ;;
3780 (.\${*prefix}*|.\${*dir}*)
3781         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3782         case ".$PKG_CONFIG_LIBDIR" in
3783         (.NONE/*)
3784                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3785                 ;;
3786         esac
3787         ;;
3788 (.no|.NONE/*)
3789         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3790         ;;
3791 (*)
3792         { { echo "$as_me:3792: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3793 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3794    { (exit 1); exit 1; }; }
3795         ;;
3796 esac
3797
3798                 ;;
3799         esac
3800 else
3801         MAKE_PC_FILES="#"
3802 fi
3803
3804 if test -z "$MAKE_PC_FILES"
3805 then
3806         echo "$as_me:3806: checking for suffix to add to pc-files" >&5
3807 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3808
3809 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3810 if test "${with_pc_suffix+set}" = set; then
3811   withval="$with_pc_suffix"
3812   case "x$withval" in
3813         (xyes|xno)
3814                 PC_MODULE_SUFFIX=
3815                 ;;
3816         (*)     PC_MODULE_SUFFIX="$withval"
3817                 ;;
3818         esac
3819 fi;
3820         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3821         echo "$as_me:3821: result: $PC_MODULE_SUFFIX" >&5
3822 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3823         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3824
3825 fi
3826
3827 echo "$as_me:3827: checking if we should assume mixed-case filenames" >&5
3828 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3829
3830 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3831 if test "${enable_mixed_case+set}" = set; then
3832   enableval="$enable_mixed_case"
3833   enable_mixedcase=$enableval
3834 else
3835   enable_mixedcase=auto
3836 fi;
3837 echo "$as_me:3837: result: $enable_mixedcase" >&5
3838 echo "${ECHO_T}$enable_mixedcase" >&6
3839 if test "$enable_mixedcase" = "auto" ; then
3840
3841 echo "$as_me:3841: checking if filesystem supports mixed-case filenames" >&5
3842 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3843 if test "${cf_cv_mixedcase+set}" = set; then
3844   echo $ECHO_N "(cached) $ECHO_C" >&6
3845 else
3846
3847 if test "$cross_compiling" = yes ; then
3848         case $target_alias in
3849         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3850                 cf_cv_mixedcase=no
3851                 ;;
3852         (*)
3853                 cf_cv_mixedcase=yes
3854                 ;;
3855         esac
3856 else
3857         rm -f conftest CONFTEST
3858         echo test >conftest
3859         if test -f CONFTEST ; then
3860                 cf_cv_mixedcase=no
3861         else
3862                 cf_cv_mixedcase=yes
3863         fi
3864         rm -f conftest CONFTEST
3865 fi
3866
3867 fi
3868 echo "$as_me:3868: result: $cf_cv_mixedcase" >&5
3869 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3870 test "$cf_cv_mixedcase" = yes &&
3871 cat >>confdefs.h <<\EOF
3872 #define MIXEDCASE_FILENAMES 1
3873 EOF
3874
3875 else
3876         cf_cv_mixedcase=$enable_mixedcase
3877         if test "x$enable_mixedcase" = "xyes" ; then
3878
3879 cat >>confdefs.h <<\EOF
3880 #define MIXEDCASE_FILENAMES 1
3881 EOF
3882
3883         fi
3884 fi
3885
3886 # do this after mixed-case option (tags/TAGS is not as important as tic).
3887 echo "$as_me:3887: checking whether ${MAKE-make} sets \${MAKE}" >&5
3888 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3889 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3890 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3891   echo $ECHO_N "(cached) $ECHO_C" >&6
3892 else
3893   cat >conftest.make <<\EOF
3894 all:
3895         @echo 'ac_maketemp="${MAKE}"'
3896 EOF
3897 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3898 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3899 if test -n "$ac_maketemp"; then
3900   eval ac_cv_prog_make_${ac_make}_set=yes
3901 else
3902   eval ac_cv_prog_make_${ac_make}_set=no
3903 fi
3904 rm -f conftest.make
3905 fi
3906 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3907   echo "$as_me:3907: result: yes" >&5
3908 echo "${ECHO_T}yes" >&6
3909   SET_MAKE=
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913   SET_MAKE="MAKE=${MAKE-make}"
3914 fi
3915
3916 for ac_prog in exctags ctags
3917 do
3918   # Extract the first word of "$ac_prog", so it can be a program name with args.
3919 set dummy $ac_prog; ac_word=$2
3920 echo "$as_me:3920: checking for $ac_word" >&5
3921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3922 if test "${ac_cv_prog_CTAGS+set}" = set; then
3923   echo $ECHO_N "(cached) $ECHO_C" >&6
3924 else
3925   if test -n "$CTAGS"; then
3926   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3927 else
3928   ac_save_IFS=$IFS; IFS=$ac_path_separator
3929 ac_dummy="$PATH"
3930 for ac_dir in $ac_dummy; do
3931   IFS=$ac_save_IFS
3932   test -z "$ac_dir" && ac_dir=.
3933   $as_executable_p "$ac_dir/$ac_word" || continue
3934 ac_cv_prog_CTAGS="$ac_prog"
3935 echo "$as_me:3935: found $ac_dir/$ac_word" >&5
3936 break
3937 done
3938
3939 fi
3940 fi
3941 CTAGS=$ac_cv_prog_CTAGS
3942 if test -n "$CTAGS"; then
3943   echo "$as_me:3943: result: $CTAGS" >&5
3944 echo "${ECHO_T}$CTAGS" >&6
3945 else
3946   echo "$as_me:3946: result: no" >&5
3947 echo "${ECHO_T}no" >&6
3948 fi
3949
3950   test -n "$CTAGS" && break
3951 done
3952
3953 for ac_prog in exetags etags
3954 do
3955   # Extract the first word of "$ac_prog", so it can be a program name with args.
3956 set dummy $ac_prog; ac_word=$2
3957 echo "$as_me:3957: checking for $ac_word" >&5
3958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3959 if test "${ac_cv_prog_ETAGS+set}" = set; then
3960   echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962   if test -n "$ETAGS"; then
3963   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3964 else
3965   ac_save_IFS=$IFS; IFS=$ac_path_separator
3966 ac_dummy="$PATH"
3967 for ac_dir in $ac_dummy; do
3968   IFS=$ac_save_IFS
3969   test -z "$ac_dir" && ac_dir=.
3970   $as_executable_p "$ac_dir/$ac_word" || continue
3971 ac_cv_prog_ETAGS="$ac_prog"
3972 echo "$as_me:3972: found $ac_dir/$ac_word" >&5
3973 break
3974 done
3975
3976 fi
3977 fi
3978 ETAGS=$ac_cv_prog_ETAGS
3979 if test -n "$ETAGS"; then
3980   echo "$as_me:3980: result: $ETAGS" >&5
3981 echo "${ECHO_T}$ETAGS" >&6
3982 else
3983   echo "$as_me:3983: result: no" >&5
3984 echo "${ECHO_T}no" >&6
3985 fi
3986
3987   test -n "$ETAGS" && break
3988 done
3989
3990 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3991 set dummy ${CTAGS:-ctags}; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3995   echo $ECHO_N "(cached) $ECHO_C" >&6
3996 else
3997   if test -n "$MAKE_LOWER_TAGS"; then
3998   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3999 else
4000   ac_save_IFS=$IFS; IFS=$ac_path_separator
4001 ac_dummy="$PATH"
4002 for ac_dir in $ac_dummy; do
4003   IFS=$ac_save_IFS
4004   test -z "$ac_dir" && ac_dir=.
4005   $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4008 break
4009 done
4010
4011   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4012 fi
4013 fi
4014 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4015 if test -n "$MAKE_LOWER_TAGS"; then
4016   echo "$as_me:4016: result: $MAKE_LOWER_TAGS" >&5
4017 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4018 else
4019   echo "$as_me:4019: result: no" >&5
4020 echo "${ECHO_T}no" >&6
4021 fi
4022
4023 if test "$cf_cv_mixedcase" = yes ; then
4024         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4025 set dummy ${ETAGS:-etags}; ac_word=$2
4026 echo "$as_me:4026: checking for $ac_word" >&5
4027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4028 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4029   echo $ECHO_N "(cached) $ECHO_C" >&6
4030 else
4031   if test -n "$MAKE_UPPER_TAGS"; then
4032   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4033 else
4034   ac_save_IFS=$IFS; IFS=$ac_path_separator
4035 ac_dummy="$PATH"
4036 for ac_dir in $ac_dummy; do
4037   IFS=$ac_save_IFS
4038   test -z "$ac_dir" && ac_dir=.
4039   $as_executable_p "$ac_dir/$ac_word" || continue
4040 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4041 echo "$as_me:4041: found $ac_dir/$ac_word" >&5
4042 break
4043 done
4044
4045   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4046 fi
4047 fi
4048 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4049 if test -n "$MAKE_UPPER_TAGS"; then
4050   echo "$as_me:4050: result: $MAKE_UPPER_TAGS" >&5
4051 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4052 else
4053   echo "$as_me:4053: result: no" >&5
4054 echo "${ECHO_T}no" >&6
4055 fi
4056
4057 else
4058         MAKE_UPPER_TAGS=no
4059 fi
4060
4061 if test "$MAKE_UPPER_TAGS" = yes ; then
4062         MAKE_UPPER_TAGS=
4063 else
4064         MAKE_UPPER_TAGS="#"
4065 fi
4066
4067 if test "$MAKE_LOWER_TAGS" = yes ; then
4068         MAKE_LOWER_TAGS=
4069 else
4070         MAKE_LOWER_TAGS="#"
4071 fi
4072
4073 echo "$as_me:4073: checking for makeflags variable" >&5
4074 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4075 if test "${cf_cv_makeflags+set}" = set; then
4076   echo $ECHO_N "(cached) $ECHO_C" >&6
4077 else
4078
4079         cf_cv_makeflags=''
4080         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4081         do
4082                 cat >cf_makeflags.tmp <<CF_EOF
4083 SHELL = $SHELL
4084 all :
4085         @ echo '.$cf_option'
4086 CF_EOF
4087                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4088                 case "$cf_result" in
4089                 (.*k|.*kw)
4090                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4091                         case "$cf_result" in
4092                         (.*CC=*)        cf_cv_makeflags=
4093                                 ;;
4094                         (*)     cf_cv_makeflags=$cf_option
4095                                 ;;
4096                         esac
4097                         break
4098                         ;;
4099                 (.-)    ;;
4100                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4101                         ;;
4102                 esac
4103         done
4104         rm -f cf_makeflags.tmp
4105
4106 fi
4107 echo "$as_me:4107: result: $cf_cv_makeflags" >&5
4108 echo "${ECHO_T}$cf_cv_makeflags" >&6
4109
4110 if test -n "$ac_tool_prefix"; then
4111   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4112 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4113 echo "$as_me:4113: checking for $ac_word" >&5
4114 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4115 if test "${ac_cv_prog_RANLIB+set}" = set; then
4116   echo $ECHO_N "(cached) $ECHO_C" >&6
4117 else
4118   if test -n "$RANLIB"; then
4119   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4120 else
4121   ac_save_IFS=$IFS; IFS=$ac_path_separator
4122 ac_dummy="$PATH"
4123 for ac_dir in $ac_dummy; do
4124   IFS=$ac_save_IFS
4125   test -z "$ac_dir" && ac_dir=.
4126   $as_executable_p "$ac_dir/$ac_word" || continue
4127 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4128 echo "$as_me:4128: found $ac_dir/$ac_word" >&5
4129 break
4130 done
4131
4132 fi
4133 fi
4134 RANLIB=$ac_cv_prog_RANLIB
4135 if test -n "$RANLIB"; then
4136   echo "$as_me:4136: result: $RANLIB" >&5
4137 echo "${ECHO_T}$RANLIB" >&6
4138 else
4139   echo "$as_me:4139: result: no" >&5
4140 echo "${ECHO_T}no" >&6
4141 fi
4142
4143 fi
4144 if test -z "$ac_cv_prog_RANLIB"; then
4145   ac_ct_RANLIB=$RANLIB
4146   # Extract the first word of "ranlib", so it can be a program name with args.
4147 set dummy ranlib; ac_word=$2
4148 echo "$as_me:4148: checking for $ac_word" >&5
4149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4150 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153   if test -n "$ac_ct_RANLIB"; then
4154   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4155 else
4156   ac_save_IFS=$IFS; IFS=$ac_path_separator
4157 ac_dummy="$PATH"
4158 for ac_dir in $ac_dummy; do
4159   IFS=$ac_save_IFS
4160   test -z "$ac_dir" && ac_dir=.
4161   $as_executable_p "$ac_dir/$ac_word" || continue
4162 ac_cv_prog_ac_ct_RANLIB="ranlib"
4163 echo "$as_me:4163: found $ac_dir/$ac_word" >&5
4164 break
4165 done
4166
4167   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4168 fi
4169 fi
4170 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4171 if test -n "$ac_ct_RANLIB"; then
4172   echo "$as_me:4172: result: $ac_ct_RANLIB" >&5
4173 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4174 else
4175   echo "$as_me:4175: result: no" >&5
4176 echo "${ECHO_T}no" >&6
4177 fi
4178
4179   RANLIB=$ac_ct_RANLIB
4180 else
4181   RANLIB="$ac_cv_prog_RANLIB"
4182 fi
4183
4184 if test -n "$ac_tool_prefix"; then
4185   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4186 set dummy ${ac_tool_prefix}ld; ac_word=$2
4187 echo "$as_me:4187: checking for $ac_word" >&5
4188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4189 if test "${ac_cv_prog_LD+set}" = set; then
4190   echo $ECHO_N "(cached) $ECHO_C" >&6
4191 else
4192   if test -n "$LD"; then
4193   ac_cv_prog_LD="$LD" # Let the user override the test.
4194 else
4195   ac_save_IFS=$IFS; IFS=$ac_path_separator
4196 ac_dummy="$PATH"
4197 for ac_dir in $ac_dummy; do
4198   IFS=$ac_save_IFS
4199   test -z "$ac_dir" && ac_dir=.
4200   $as_executable_p "$ac_dir/$ac_word" || continue
4201 ac_cv_prog_LD="${ac_tool_prefix}ld"
4202 echo "$as_me:4202: found $ac_dir/$ac_word" >&5
4203 break
4204 done
4205
4206 fi
4207 fi
4208 LD=$ac_cv_prog_LD
4209 if test -n "$LD"; then
4210   echo "$as_me:4210: result: $LD" >&5
4211 echo "${ECHO_T}$LD" >&6
4212 else
4213   echo "$as_me:4213: result: no" >&5
4214 echo "${ECHO_T}no" >&6
4215 fi
4216
4217 fi
4218 if test -z "$ac_cv_prog_LD"; then
4219   ac_ct_LD=$LD
4220   # Extract the first word of "ld", so it can be a program name with args.
4221 set dummy ld; ac_word=$2
4222 echo "$as_me:4222: checking for $ac_word" >&5
4223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4224 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4225   echo $ECHO_N "(cached) $ECHO_C" >&6
4226 else
4227   if test -n "$ac_ct_LD"; then
4228   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4229 else
4230   ac_save_IFS=$IFS; IFS=$ac_path_separator
4231 ac_dummy="$PATH"
4232 for ac_dir in $ac_dummy; do
4233   IFS=$ac_save_IFS
4234   test -z "$ac_dir" && ac_dir=.
4235   $as_executable_p "$ac_dir/$ac_word" || continue
4236 ac_cv_prog_ac_ct_LD="ld"
4237 echo "$as_me:4237: found $ac_dir/$ac_word" >&5
4238 break
4239 done
4240
4241   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4242 fi
4243 fi
4244 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4245 if test -n "$ac_ct_LD"; then
4246   echo "$as_me:4246: result: $ac_ct_LD" >&5
4247 echo "${ECHO_T}$ac_ct_LD" >&6
4248 else
4249   echo "$as_me:4249: result: no" >&5
4250 echo "${ECHO_T}no" >&6
4251 fi
4252
4253   LD=$ac_ct_LD
4254 else
4255   LD="$ac_cv_prog_LD"
4256 fi
4257
4258 if test -n "$ac_tool_prefix"; then
4259   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4260 set dummy ${ac_tool_prefix}ar; ac_word=$2
4261 echo "$as_me:4261: checking for $ac_word" >&5
4262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4263 if test "${ac_cv_prog_AR+set}" = set; then
4264   echo $ECHO_N "(cached) $ECHO_C" >&6
4265 else
4266   if test -n "$AR"; then
4267   ac_cv_prog_AR="$AR" # Let the user override the test.
4268 else
4269   ac_save_IFS=$IFS; IFS=$ac_path_separator
4270 ac_dummy="$PATH"
4271 for ac_dir in $ac_dummy; do
4272   IFS=$ac_save_IFS
4273   test -z "$ac_dir" && ac_dir=.
4274   $as_executable_p "$ac_dir/$ac_word" || continue
4275 ac_cv_prog_AR="${ac_tool_prefix}ar"
4276 echo "$as_me:4276: found $ac_dir/$ac_word" >&5
4277 break
4278 done
4279
4280 fi
4281 fi
4282 AR=$ac_cv_prog_AR
4283 if test -n "$AR"; then
4284   echo "$as_me:4284: result: $AR" >&5
4285 echo "${ECHO_T}$AR" >&6
4286 else
4287   echo "$as_me:4287: result: no" >&5
4288 echo "${ECHO_T}no" >&6
4289 fi
4290
4291 fi
4292 if test -z "$ac_cv_prog_AR"; then
4293   ac_ct_AR=$AR
4294   # Extract the first word of "ar", so it can be a program name with args.
4295 set dummy ar; ac_word=$2
4296 echo "$as_me:4296: checking for $ac_word" >&5
4297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4298 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4299   echo $ECHO_N "(cached) $ECHO_C" >&6
4300 else
4301   if test -n "$ac_ct_AR"; then
4302   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4303 else
4304   ac_save_IFS=$IFS; IFS=$ac_path_separator
4305 ac_dummy="$PATH"
4306 for ac_dir in $ac_dummy; do
4307   IFS=$ac_save_IFS
4308   test -z "$ac_dir" && ac_dir=.
4309   $as_executable_p "$ac_dir/$ac_word" || continue
4310 ac_cv_prog_ac_ct_AR="ar"
4311 echo "$as_me:4311: found $ac_dir/$ac_word" >&5
4312 break
4313 done
4314
4315   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4316 fi
4317 fi
4318 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4319 if test -n "$ac_ct_AR"; then
4320   echo "$as_me:4320: result: $ac_ct_AR" >&5
4321 echo "${ECHO_T}$ac_ct_AR" >&6
4322 else
4323   echo "$as_me:4323: result: no" >&5
4324 echo "${ECHO_T}no" >&6
4325 fi
4326
4327   AR=$ac_ct_AR
4328 else
4329   AR="$ac_cv_prog_AR"
4330 fi
4331
4332 if test -n "$ac_tool_prefix"; then
4333   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4334 set dummy ${ac_tool_prefix}nm; ac_word=$2
4335 echo "$as_me:4335: checking for $ac_word" >&5
4336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4337 if test "${ac_cv_prog_NM+set}" = set; then
4338   echo $ECHO_N "(cached) $ECHO_C" >&6
4339 else
4340   if test -n "$NM"; then
4341   ac_cv_prog_NM="$NM" # Let the user override the test.
4342 else
4343   ac_save_IFS=$IFS; IFS=$ac_path_separator
4344 ac_dummy="$PATH"
4345 for ac_dir in $ac_dummy; do
4346   IFS=$ac_save_IFS
4347   test -z "$ac_dir" && ac_dir=.
4348   $as_executable_p "$ac_dir/$ac_word" || continue
4349 ac_cv_prog_NM="${ac_tool_prefix}nm"
4350 echo "$as_me:4350: found $ac_dir/$ac_word" >&5
4351 break
4352 done
4353
4354 fi
4355 fi
4356 NM=$ac_cv_prog_NM
4357 if test -n "$NM"; then
4358   echo "$as_me:4358: result: $NM" >&5
4359 echo "${ECHO_T}$NM" >&6
4360 else
4361   echo "$as_me:4361: result: no" >&5
4362 echo "${ECHO_T}no" >&6
4363 fi
4364
4365 fi
4366 if test -z "$ac_cv_prog_NM"; then
4367   ac_ct_NM=$NM
4368   # Extract the first word of "nm", so it can be a program name with args.
4369 set dummy nm; ac_word=$2
4370 echo "$as_me:4370: checking for $ac_word" >&5
4371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4372 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4373   echo $ECHO_N "(cached) $ECHO_C" >&6
4374 else
4375   if test -n "$ac_ct_NM"; then
4376   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4377 else
4378   ac_save_IFS=$IFS; IFS=$ac_path_separator
4379 ac_dummy="$PATH"
4380 for ac_dir in $ac_dummy; do
4381   IFS=$ac_save_IFS
4382   test -z "$ac_dir" && ac_dir=.
4383   $as_executable_p "$ac_dir/$ac_word" || continue
4384 ac_cv_prog_ac_ct_NM="nm"
4385 echo "$as_me:4385: found $ac_dir/$ac_word" >&5
4386 break
4387 done
4388
4389   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4390 fi
4391 fi
4392 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4393 if test -n "$ac_ct_NM"; then
4394   echo "$as_me:4394: result: $ac_ct_NM" >&5
4395 echo "${ECHO_T}$ac_ct_NM" >&6
4396 else
4397   echo "$as_me:4397: result: no" >&5
4398 echo "${ECHO_T}no" >&6
4399 fi
4400
4401   NM=$ac_ct_NM
4402 else
4403   NM="$ac_cv_prog_NM"
4404 fi
4405
4406 if test -n "$ac_tool_prefix"; then
4407   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4408 set dummy ${ac_tool_prefix}ar; ac_word=$2
4409 echo "$as_me:4409: checking for $ac_word" >&5
4410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4411 if test "${ac_cv_prog_AR+set}" = set; then
4412   echo $ECHO_N "(cached) $ECHO_C" >&6
4413 else
4414   if test -n "$AR"; then
4415   ac_cv_prog_AR="$AR" # Let the user override the test.
4416 else
4417   ac_save_IFS=$IFS; IFS=$ac_path_separator
4418 ac_dummy="$PATH"
4419 for ac_dir in $ac_dummy; do
4420   IFS=$ac_save_IFS
4421   test -z "$ac_dir" && ac_dir=.
4422   $as_executable_p "$ac_dir/$ac_word" || continue
4423 ac_cv_prog_AR="${ac_tool_prefix}ar"
4424 echo "$as_me:4424: found $ac_dir/$ac_word" >&5
4425 break
4426 done
4427
4428 fi
4429 fi
4430 AR=$ac_cv_prog_AR
4431 if test -n "$AR"; then
4432   echo "$as_me:4432: result: $AR" >&5
4433 echo "${ECHO_T}$AR" >&6
4434 else
4435   echo "$as_me:4435: result: no" >&5
4436 echo "${ECHO_T}no" >&6
4437 fi
4438
4439 fi
4440 if test -z "$ac_cv_prog_AR"; then
4441   ac_ct_AR=$AR
4442   # Extract the first word of "ar", so it can be a program name with args.
4443 set dummy ar; ac_word=$2
4444 echo "$as_me:4444: checking for $ac_word" >&5
4445 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4446 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4447   echo $ECHO_N "(cached) $ECHO_C" >&6
4448 else
4449   if test -n "$ac_ct_AR"; then
4450   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4451 else
4452   ac_save_IFS=$IFS; IFS=$ac_path_separator
4453 ac_dummy="$PATH"
4454 for ac_dir in $ac_dummy; do
4455   IFS=$ac_save_IFS
4456   test -z "$ac_dir" && ac_dir=.
4457   $as_executable_p "$ac_dir/$ac_word" || continue
4458 ac_cv_prog_ac_ct_AR="ar"
4459 echo "$as_me:4459: found $ac_dir/$ac_word" >&5
4460 break
4461 done
4462
4463   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4464 fi
4465 fi
4466 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4467 if test -n "$ac_ct_AR"; then
4468   echo "$as_me:4468: result: $ac_ct_AR" >&5
4469 echo "${ECHO_T}$ac_ct_AR" >&6
4470 else
4471   echo "$as_me:4471: result: no" >&5
4472 echo "${ECHO_T}no" >&6
4473 fi
4474
4475   AR=$ac_ct_AR
4476 else
4477   AR="$ac_cv_prog_AR"
4478 fi
4479
4480 echo "$as_me:4480: checking for options to update archives" >&5
4481 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4482 if test "${cf_cv_ar_flags+set}" = set; then
4483   echo $ECHO_N "(cached) $ECHO_C" >&6
4484 else
4485
4486         cf_cv_ar_flags=unknown
4487         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4488         do
4489
4490                 # check if $ARFLAGS already contains this choice
4491                 if test "x$ARFLAGS" != "x" ; then
4492                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4493                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4494                                 cf_cv_ar_flags=
4495                                 break
4496                         fi
4497                 fi
4498
4499                 rm -f conftest.$ac_cv_objext
4500                 rm -f conftest.a
4501
4502                 cat >conftest.$ac_ext <<EOF
4503 #line 4503 "configure"
4504 int     testdata[3] = { 123, 456, 789 };
4505 EOF
4506                 if { (eval echo "$as_me:4506: \"$ac_compile\"") >&5
4507   (eval $ac_compile) 2>&5
4508   ac_status=$?
4509   echo "$as_me:4509: \$? = $ac_status" >&5
4510   (exit $ac_status); } ; then
4511                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4512                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4513                         if test -f conftest.a ; then
4514                                 cf_cv_ar_flags=$cf_ar_flags
4515                                 break
4516                         fi
4517                 else
4518                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4519
4520 echo "${as_me:-configure}:4520: testing cannot compile test-program ..." 1>&5
4521
4522                         break
4523                 fi
4524         done
4525         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4526
4527 fi
4528 echo "$as_me:4528: result: $cf_cv_ar_flags" >&5
4529 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4530
4531 if test -n "$ARFLAGS" ; then
4532         if test -n "$cf_cv_ar_flags" ; then
4533                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4534         fi
4535 else
4536         ARFLAGS=$cf_cv_ar_flags
4537 fi
4538
4539 echo "$as_me:4539: checking if you have specified an install-prefix" >&5
4540 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4541
4542 # Check whether --with-install-prefix or --without-install-prefix was given.
4543 if test "${with_install_prefix+set}" = set; then
4544   withval="$with_install_prefix"
4545   case "x$withval" in
4546         (xyes|xno)
4547                 ;;
4548         (*)     DESTDIR="$withval"
4549                 ;;
4550         esac
4551 fi;
4552 echo "$as_me:4552: result: $DESTDIR" >&5
4553 echo "${ECHO_T}$DESTDIR" >&6
4554
4555 ###############################################################################
4556
4557 # If we're cross-compiling, allow the user to override the tools and their
4558 # options.  The configure script is oriented toward identifying the host
4559 # compiler, etc., but we need a build compiler to generate parts of the source.
4560
4561 if test "$cross_compiling" = yes ; then
4562
4563         # defaults that we might want to override
4564         : ${BUILD_CFLAGS:=''}
4565         : ${BUILD_CPPFLAGS:=''}
4566         : ${BUILD_LDFLAGS:=''}
4567         : ${BUILD_LIBS:=''}
4568         : ${BUILD_EXEEXT:='$x'}
4569         : ${BUILD_OBJEXT:='o'}
4570
4571 # Check whether --with-build-cc or --without-build-cc was given.
4572 if test "${with_build_cc+set}" = set; then
4573   withval="$with_build_cc"
4574   BUILD_CC="$withval"
4575 else
4576   for ac_prog in gcc cc cl
4577 do
4578   # Extract the first word of "$ac_prog", so it can be a program name with args.
4579 set dummy $ac_prog; ac_word=$2
4580 echo "$as_me:4580: checking for $ac_word" >&5
4581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4582 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4583   echo $ECHO_N "(cached) $ECHO_C" >&6
4584 else
4585   if test -n "$BUILD_CC"; then
4586   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4587 else
4588   ac_save_IFS=$IFS; IFS=$ac_path_separator
4589 ac_dummy="$PATH"
4590 for ac_dir in $ac_dummy; do
4591   IFS=$ac_save_IFS
4592   test -z "$ac_dir" && ac_dir=.
4593   $as_executable_p "$ac_dir/$ac_word" || continue
4594 ac_cv_prog_BUILD_CC="$ac_prog"
4595 echo "$as_me:4595: found $ac_dir/$ac_word" >&5
4596 break
4597 done
4598
4599 fi
4600 fi
4601 BUILD_CC=$ac_cv_prog_BUILD_CC
4602 if test -n "$BUILD_CC"; then
4603   echo "$as_me:4603: result: $BUILD_CC" >&5
4604 echo "${ECHO_T}$BUILD_CC" >&6
4605 else
4606   echo "$as_me:4606: result: no" >&5
4607 echo "${ECHO_T}no" >&6
4608 fi
4609
4610   test -n "$BUILD_CC" && break
4611 done
4612
4613 fi;
4614         echo "$as_me:4614: checking for native build C compiler" >&5
4615 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4616         echo "$as_me:4616: result: $BUILD_CC" >&5
4617 echo "${ECHO_T}$BUILD_CC" >&6
4618
4619         echo "$as_me:4619: checking for native build C preprocessor" >&5
4620 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4621
4622 # Check whether --with-build-cpp or --without-build-cpp was given.
4623 if test "${with_build_cpp+set}" = set; then
4624   withval="$with_build_cpp"
4625   BUILD_CPP="$withval"
4626 else
4627   BUILD_CPP='${BUILD_CC} -E'
4628 fi;
4629         echo "$as_me:4629: result: $BUILD_CPP" >&5
4630 echo "${ECHO_T}$BUILD_CPP" >&6
4631
4632         echo "$as_me:4632: checking for native build C flags" >&5
4633 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4634
4635 # Check whether --with-build-cflags or --without-build-cflags was given.
4636 if test "${with_build_cflags+set}" = set; then
4637   withval="$with_build_cflags"
4638   BUILD_CFLAGS="$withval"
4639 fi;
4640         echo "$as_me:4640: result: $BUILD_CFLAGS" >&5
4641 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4642
4643         echo "$as_me:4643: checking for native build C preprocessor-flags" >&5
4644 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4645
4646 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4647 if test "${with_build_cppflags+set}" = set; then
4648   withval="$with_build_cppflags"
4649   BUILD_CPPFLAGS="$withval"
4650 fi;
4651         echo "$as_me:4651: result: $BUILD_CPPFLAGS" >&5
4652 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4653
4654         echo "$as_me:4654: checking for native build linker-flags" >&5
4655 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4656
4657 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4658 if test "${with_build_ldflags+set}" = set; then
4659   withval="$with_build_ldflags"
4660   BUILD_LDFLAGS="$withval"
4661 fi;
4662         echo "$as_me:4662: result: $BUILD_LDFLAGS" >&5
4663 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4664
4665         echo "$as_me:4665: checking for native build linker-libraries" >&5
4666 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4667
4668 # Check whether --with-build-libs or --without-build-libs was given.
4669 if test "${with_build_libs+set}" = set; then
4670   withval="$with_build_libs"
4671   BUILD_LIBS="$withval"
4672 fi;
4673         echo "$as_me:4673: result: $BUILD_LIBS" >&5
4674 echo "${ECHO_T}$BUILD_LIBS" >&6
4675
4676         # this assumes we're on Unix.
4677         BUILD_EXEEXT=
4678         BUILD_OBJEXT=o
4679
4680         : ${BUILD_CC:='${CC}'}
4681
4682         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4683                 { { echo "$as_me:4683: error: Cross-build requires two compilers.
4684 Use --with-build-cc to specify the native compiler." >&5
4685 echo "$as_me: error: Cross-build requires two compilers.
4686 Use --with-build-cc to specify the native compiler." >&2;}
4687    { (exit 1); exit 1; }; }
4688         fi
4689
4690 else
4691         : ${BUILD_CC:='${CC}'}
4692         : ${BUILD_CPP:='${CPP}'}
4693         : ${BUILD_CFLAGS:='${CFLAGS}'}
4694         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4695         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4696         : ${BUILD_LIBS:='${LIBS}'}
4697         : ${BUILD_EXEEXT:='$x'}
4698         : ${BUILD_OBJEXT:='o'}
4699 fi
4700
4701 ###############################################################################
4702
4703 ### Options to allow the user to specify the set of libraries which are used.
4704 ### Use "--without-normal --with-shared" to allow the default model to be
4705 ### shared, for example.
4706 cf_list_models=""
4707
4708 echo "$as_me:4708: checking if libtool -version-number should be used" >&5
4709 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4710
4711 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4712 if test "${enable_libtool_version+set}" = set; then
4713   enableval="$enable_libtool_version"
4714   test "$enableval" != no && enableval=yes
4715         if test "$enableval" != "yes" ; then
4716     cf_libtool_version=no
4717         else
4718                 cf_libtool_version=yes
4719         fi
4720 else
4721   enableval=yes
4722         cf_libtool_version=yes
4723
4724 fi;
4725 echo "$as_me:4725: result: $cf_libtool_version" >&5
4726 echo "${ECHO_T}$cf_libtool_version" >&6
4727
4728 if test "$cf_libtool_version" = yes ; then
4729         LIBTOOL_VERSION="-version-number"
4730 else
4731         LIBTOOL_VERSION="-version-info"
4732         case "x$VERSION" in
4733         (x)
4734                 { echo "$as_me:4734: WARNING: VERSION was not set" >&5
4735 echo "$as_me: WARNING: VERSION was not set" >&2;}
4736                 ;;
4737         (x*.*.*)
4738                 ABI_VERSION="$VERSION"
4739                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4740
4741 echo "${as_me:-configure}:4741: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4742
4743                 ;;
4744         (x*:*:*)
4745                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4746                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4747
4748 echo "${as_me:-configure}:4748: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4749
4750                 ;;
4751         (*)
4752                 { echo "$as_me:4752: WARNING: unexpected VERSION value: $VERSION" >&5
4753 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4754                 ;;
4755         esac
4756 fi
4757
4758 LIBTOOL=
4759
4760 # common library maintenance symbols that are convenient for libtool scripts:
4761 LIB_CREATE='${AR} -cr'
4762 LIB_OBJECT='${OBJECTS}'
4763 LIB_SUFFIX=.a
4764 LIB_PREP="$RANLIB"
4765
4766 # symbols used to prop libtool up to enable it to determine what it should be
4767 # doing:
4768 LIB_CLEAN=
4769 LIB_COMPILE=
4770 LIB_LINK='${CC}'
4771 LIB_INSTALL=
4772 LIB_UNINSTALL=
4773
4774 echo "$as_me:4774: checking if you want to build libraries with libtool" >&5
4775 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4776
4777 # Check whether --with-libtool or --without-libtool was given.
4778 if test "${with_libtool+set}" = set; then
4779   withval="$with_libtool"
4780   with_libtool=$withval
4781 else
4782   with_libtool=no
4783 fi;
4784 echo "$as_me:4784: result: $with_libtool" >&5
4785 echo "${ECHO_T}$with_libtool" >&6
4786 if test "$with_libtool" != "no"; then
4787
4788         if test "$with_libtool" != "yes" ; then
4789
4790 if test "x$prefix" != xNONE; then
4791         cf_path_syntax="$prefix"
4792 else
4793         cf_path_syntax="$ac_default_prefix"
4794 fi
4795
4796 case ".$with_libtool" in
4797 (.\$\(*\)*|.\'*\'*)
4798         ;;
4799 (..|./*|.\\*)
4800         ;;
4801 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4802         ;;
4803 (.\${*prefix}*|.\${*dir}*)
4804         eval with_libtool="$with_libtool"
4805         case ".$with_libtool" in
4806         (.NONE/*)
4807                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4808                 ;;
4809         esac
4810         ;;
4811 (.no|.NONE/*)
4812         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4813         ;;
4814 (*)
4815         { { echo "$as_me:4815: error: expected a pathname, not \"$with_libtool\"" >&5
4816 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4817    { (exit 1); exit 1; }; }
4818         ;;
4819 esac
4820
4821                 LIBTOOL=$with_libtool
4822         else
4823                 if test -n "$ac_tool_prefix"; then
4824   for ac_prog in libtool glibtool
4825   do
4826     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4827 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4828 echo "$as_me:4828: checking for $ac_word" >&5
4829 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4830 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4831   echo $ECHO_N "(cached) $ECHO_C" >&6
4832 else
4833   if test -n "$LIBTOOL"; then
4834   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4835 else
4836   ac_save_IFS=$IFS; IFS=$ac_path_separator
4837 ac_dummy="$PATH"
4838 for ac_dir in $ac_dummy; do
4839   IFS=$ac_save_IFS
4840   test -z "$ac_dir" && ac_dir=.
4841   $as_executable_p "$ac_dir/$ac_word" || continue
4842 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4843 echo "$as_me:4843: found $ac_dir/$ac_word" >&5
4844 break
4845 done
4846
4847 fi
4848 fi
4849 LIBTOOL=$ac_cv_prog_LIBTOOL
4850 if test -n "$LIBTOOL"; then
4851   echo "$as_me:4851: result: $LIBTOOL" >&5
4852 echo "${ECHO_T}$LIBTOOL" >&6
4853 else
4854   echo "$as_me:4854: result: no" >&5
4855 echo "${ECHO_T}no" >&6
4856 fi
4857
4858     test -n "$LIBTOOL" && break
4859   done
4860 fi
4861 if test -z "$LIBTOOL"; then
4862   ac_ct_LIBTOOL=$LIBTOOL
4863   for ac_prog in libtool glibtool
4864 do
4865   # Extract the first word of "$ac_prog", so it can be a program name with args.
4866 set dummy $ac_prog; ac_word=$2
4867 echo "$as_me:4867: checking for $ac_word" >&5
4868 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4869 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4870   echo $ECHO_N "(cached) $ECHO_C" >&6
4871 else
4872   if test -n "$ac_ct_LIBTOOL"; then
4873   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4874 else
4875   ac_save_IFS=$IFS; IFS=$ac_path_separator
4876 ac_dummy="$PATH"
4877 for ac_dir in $ac_dummy; do
4878   IFS=$ac_save_IFS
4879   test -z "$ac_dir" && ac_dir=.
4880   $as_executable_p "$ac_dir/$ac_word" || continue
4881 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4882 echo "$as_me:4882: found $ac_dir/$ac_word" >&5
4883 break
4884 done
4885
4886 fi
4887 fi
4888 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4889 if test -n "$ac_ct_LIBTOOL"; then
4890   echo "$as_me:4890: result: $ac_ct_LIBTOOL" >&5
4891 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4892 else
4893   echo "$as_me:4893: result: no" >&5
4894 echo "${ECHO_T}no" >&6
4895 fi
4896
4897   test -n "$ac_ct_LIBTOOL" && break
4898 done
4899 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4900
4901   LIBTOOL=$ac_ct_LIBTOOL
4902 fi
4903
4904 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4905 then
4906         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.].*//'`
4907 else
4908         cf_cv_libtool_version=
4909 fi
4910 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4911
4912                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4913                 then
4914
4915 unset ac_cv_prog_ac_ct_LIBTOOL
4916 unset ac_ct_LIBTOOL
4917 unset LIBTOOL
4918
4919                         if test -n "$ac_tool_prefix"; then
4920   for ac_prog in glibtool
4921   do
4922     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4923 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4924 echo "$as_me:4924: checking for $ac_word" >&5
4925 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4926 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4927   echo $ECHO_N "(cached) $ECHO_C" >&6
4928 else
4929   if test -n "$LIBTOOL"; then
4930   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4931 else
4932   ac_save_IFS=$IFS; IFS=$ac_path_separator
4933 ac_dummy="$PATH"
4934 for ac_dir in $ac_dummy; do
4935   IFS=$ac_save_IFS
4936   test -z "$ac_dir" && ac_dir=.
4937   $as_executable_p "$ac_dir/$ac_word" || continue
4938 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4939 echo "$as_me:4939: found $ac_dir/$ac_word" >&5
4940 break
4941 done
4942
4943 fi
4944 fi
4945 LIBTOOL=$ac_cv_prog_LIBTOOL
4946 if test -n "$LIBTOOL"; then
4947   echo "$as_me:4947: result: $LIBTOOL" >&5
4948 echo "${ECHO_T}$LIBTOOL" >&6
4949 else
4950   echo "$as_me:4950: result: no" >&5
4951 echo "${ECHO_T}no" >&6
4952 fi
4953
4954     test -n "$LIBTOOL" && break
4955   done
4956 fi
4957 if test -z "$LIBTOOL"; then
4958   ac_ct_LIBTOOL=$LIBTOOL
4959   for ac_prog in glibtool
4960 do
4961   # Extract the first word of "$ac_prog", so it can be a program name with args.
4962 set dummy $ac_prog; ac_word=$2
4963 echo "$as_me:4963: checking for $ac_word" >&5
4964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4965 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4966   echo $ECHO_N "(cached) $ECHO_C" >&6
4967 else
4968   if test -n "$ac_ct_LIBTOOL"; then
4969   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4970 else
4971   ac_save_IFS=$IFS; IFS=$ac_path_separator
4972 ac_dummy="$PATH"
4973 for ac_dir in $ac_dummy; do
4974   IFS=$ac_save_IFS
4975   test -z "$ac_dir" && ac_dir=.
4976   $as_executable_p "$ac_dir/$ac_word" || continue
4977 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4978 echo "$as_me:4978: found $ac_dir/$ac_word" >&5
4979 break
4980 done
4981
4982 fi
4983 fi
4984 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4985 if test -n "$ac_ct_LIBTOOL"; then
4986   echo "$as_me:4986: result: $ac_ct_LIBTOOL" >&5
4987 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4988 else
4989   echo "$as_me:4989: result: no" >&5
4990 echo "${ECHO_T}no" >&6
4991 fi
4992
4993   test -n "$ac_ct_LIBTOOL" && break
4994 done
4995 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4996
4997   LIBTOOL=$ac_ct_LIBTOOL
4998 fi
4999
5000 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5001 then
5002         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.].*//'`
5003 else
5004         cf_cv_libtool_version=
5005 fi
5006 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5007
5008                 fi
5009         fi
5010         if test -z "$LIBTOOL" ; then
5011                 { { echo "$as_me:5011: error: Cannot find libtool" >&5
5012 echo "$as_me: error: Cannot find libtool" >&2;}
5013    { (exit 1); exit 1; }; }
5014         fi
5015         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5016         LIB_OBJECT='${OBJECTS:.o=.lo}'
5017         LIB_SUFFIX=.la
5018         LIB_CLEAN='${LIBTOOL} --mode=clean'
5019         LIB_COMPILE='${LIBTOOL} --mode=compile'
5020         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5021         LIB_INSTALL='${LIBTOOL} --mode=install'
5022         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5023         LIB_PREP=:
5024
5025 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5026 then
5027         echo "$as_me:5027: checking version of $LIBTOOL" >&5
5028 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5029
5030 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5031 then
5032         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.].*//'`
5033 else
5034         cf_cv_libtool_version=
5035 fi
5036 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5037
5038         echo "$as_me:5038: result: $cf_cv_libtool_version" >&5
5039 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5040         if test -z "$cf_cv_libtool_version" ; then
5041                 { { echo "$as_me:5041: error: This is not GNU libtool" >&5
5042 echo "$as_me: error: This is not GNU libtool" >&2;}
5043    { (exit 1); exit 1; }; }
5044         fi
5045 else
5046         { { echo "$as_me:5046: error: GNU libtool has not been found" >&5
5047 echo "$as_me: error: GNU libtool has not been found" >&2;}
5048    { (exit 1); exit 1; }; }
5049 fi
5050
5051         # special hack to add -no-undefined (which libtool should do for itself)
5052         LT_UNDEF=
5053         case "$cf_cv_system_name" in
5054         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5055                 LT_UNDEF=-no-undefined
5056                 ;;
5057         esac
5058
5059         # special hack to add --tag option for C++ compiler
5060         case $cf_cv_libtool_version in
5061         (1.[5-9]*|[2-9].[0-9.a-z]*)
5062                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5063                 LIBTOOL="$LIBTOOL --tag=CC"
5064                 ;;
5065         (*)
5066                 LIBTOOL_CXX="$LIBTOOL"
5067                 ;;
5068         esac
5069 else
5070         LIBTOOL=""
5071         LIBTOOL_CXX=""
5072 fi
5073
5074 test -z "$LIBTOOL" && ECHO_LT=
5075
5076 if test "$with_libtool" != "no" ; then
5077
5078 cf_list_models="$cf_list_models libtool"
5079
5080 else
5081
5082 echo "$as_me:5082: checking if you want to build shared libraries" >&5
5083 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5084
5085 # Check whether --with-shared or --without-shared was given.
5086 if test "${with_shared+set}" = set; then
5087   withval="$with_shared"
5088   with_shared=$withval
5089 else
5090   with_shared=no
5091 fi;
5092 echo "$as_me:5092: result: $with_shared" >&5
5093 echo "${ECHO_T}$with_shared" >&6
5094 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5095
5096 echo "$as_me:5096: checking if you want to build static libraries" >&5
5097 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5098
5099 # Check whether --with-normal or --without-normal was given.
5100 if test "${with_normal+set}" = set; then
5101   withval="$with_normal"
5102   with_normal=$withval
5103 else
5104   with_normal=yes
5105 fi;
5106 echo "$as_me:5106: result: $with_normal" >&5
5107 echo "${ECHO_T}$with_normal" >&6
5108 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5109
5110 echo "$as_me:5110: checking if you want to build debug libraries" >&5
5111 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5112
5113 # Check whether --with-debug or --without-debug was given.
5114 if test "${with_debug+set}" = set; then
5115   withval="$with_debug"
5116   with_debug=$withval
5117 else
5118   with_debug=yes
5119 fi;
5120 echo "$as_me:5120: result: $with_debug" >&5
5121 echo "${ECHO_T}$with_debug" >&6
5122 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5123
5124 echo "$as_me:5124: checking if you want to build profiling libraries" >&5
5125 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5126
5127 # Check whether --with-profile or --without-profile was given.
5128 if test "${with_profile+set}" = set; then
5129   withval="$with_profile"
5130   with_profile=$withval
5131 else
5132   with_profile=no
5133 fi;
5134 echo "$as_me:5134: result: $with_profile" >&5
5135 echo "${ECHO_T}$with_profile" >&6
5136 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5137
5138 fi
5139
5140 if test "X$cf_with_cxx_binding" != Xno; then
5141 if test "x$with_shared" = "xyes"; then
5142 echo "$as_me:5142: checking if you want to build C++ shared libraries" >&5
5143 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5144
5145 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5146 if test "${with_cxx_shared+set}" = set; then
5147   withval="$with_cxx_shared"
5148   with_shared_cxx=$withval
5149 else
5150   with_shared_cxx=no
5151 fi;
5152 echo "$as_me:5152: result: $with_shared_cxx" >&5
5153 echo "${ECHO_T}$with_shared_cxx" >&6
5154 fi
5155 fi
5156
5157 ###############################################################################
5158
5159 echo "$as_me:5159: checking for specified models" >&5
5160 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5161 test -z "$cf_list_models" && cf_list_models=normal
5162 test "$with_libtool" != "no" && cf_list_models=libtool
5163 echo "$as_me:5163: result: $cf_list_models" >&5
5164 echo "${ECHO_T}$cf_list_models" >&6
5165
5166 ### Use the first model as the default, and save its suffix for use in building
5167 ### up test-applications.
5168 echo "$as_me:5168: checking for default model" >&5
5169 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5170 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5171 echo "$as_me:5171: result: $DFT_LWR_MODEL" >&5
5172 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5173
5174 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5175
5176 TICS_NAME=tic
5177
5178 TINFO_NAME=tinfo
5179
5180 LIB_NAME=ncurses
5181
5182 LIB_DIR=../lib
5183 LIB_2ND=../../lib
5184
5185 echo "$as_me:5185: checking if you want to have a library-prefix" >&5
5186 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5187
5188 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5189 if test "${with_lib_prefix+set}" = set; then
5190   withval="$with_lib_prefix"
5191   with_lib_prefix=$withval
5192 else
5193   with_lib_prefix=auto
5194 fi;
5195 echo "$as_me:5195: result: $with_lib_prefix" >&5
5196 echo "${ECHO_T}$with_lib_prefix" >&6
5197
5198 if test $with_lib_prefix = auto
5199 then
5200
5201         case $cf_cv_system_name in
5202         (OS/2*|os2*)
5203                 if test "$DFT_LWR_MODEL" = libtool; then
5204                         LIB_PREFIX='lib'
5205                 else
5206                         LIB_PREFIX=''
5207                 fi
5208                 ;;
5209         (*)     LIB_PREFIX='lib'
5210                 ;;
5211         esac
5212 cf_prefix=$LIB_PREFIX
5213
5214 elif test $with_lib_prefix = no
5215 then
5216         LIB_PREFIX=
5217 else
5218         LIB_PREFIX=$with_lib_prefix
5219 fi
5220
5221 LIB_SUFFIX=
5222
5223         echo "$as_me:5223: checking for PATH separator" >&5
5224 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5225         case $cf_cv_system_name in
5226         (os2*)  PATH_SEPARATOR=';'  ;;
5227         (*)     ${PATH_SEPARATOR:=':'}  ;;
5228         esac
5229
5230         echo "$as_me:5230: result: $PATH_SEPARATOR" >&5
5231 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5232
5233 ###############################################################################
5234
5235 echo "$as_me:5235: checking if you want to build a separate terminfo library" >&5
5236 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5237
5238 # Check whether --with-termlib or --without-termlib was given.
5239 if test "${with_termlib+set}" = set; then
5240   withval="$with_termlib"
5241   with_termlib=$withval
5242 else
5243   with_termlib=no
5244 fi;
5245 echo "$as_me:5245: result: $with_termlib" >&5
5246 echo "${ECHO_T}$with_termlib" >&6
5247
5248 echo "$as_me:5248: checking if you want to build a separate tic library" >&5
5249 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5250
5251 # Check whether --with-ticlib or --without-ticlib was given.
5252 if test "${with_ticlib+set}" = set; then
5253   withval="$with_ticlib"
5254   with_ticlib=$withval
5255 else
5256   with_ticlib=no
5257 fi;
5258 echo "$as_me:5258: result: $with_ticlib" >&5
5259 echo "${ECHO_T}$with_ticlib" >&6
5260
5261 ### Checks for special libraries, must be done up-front.
5262 SHLIB_LIST=""
5263
5264 echo "$as_me:5264: checking if you want to link with the GPM mouse library" >&5
5265 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5266
5267 # Check whether --with-gpm or --without-gpm was given.
5268 if test "${with_gpm+set}" = set; then
5269   withval="$with_gpm"
5270   with_gpm=$withval
5271 else
5272   with_gpm=maybe
5273 fi;
5274 echo "$as_me:5274: result: $with_gpm" >&5
5275 echo "${ECHO_T}$with_gpm" >&6
5276
5277 if test "$with_gpm" != no ; then
5278         echo "$as_me:5278: checking for gpm.h" >&5
5279 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5280 if test "${ac_cv_header_gpm_h+set}" = set; then
5281   echo $ECHO_N "(cached) $ECHO_C" >&6
5282 else
5283   cat >conftest.$ac_ext <<_ACEOF
5284 #line 5284 "configure"
5285 #include "confdefs.h"
5286 #include <gpm.h>
5287 _ACEOF
5288 if { (eval echo "$as_me:5288: \"$ac_cpp conftest.$ac_ext\"") >&5
5289   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5290   ac_status=$?
5291   egrep -v '^ *\+' conftest.er1 >conftest.err
5292   rm -f conftest.er1
5293   cat conftest.err >&5
5294   echo "$as_me:5294: \$? = $ac_status" >&5
5295   (exit $ac_status); } >/dev/null; then
5296   if test -s conftest.err; then
5297     ac_cpp_err=$ac_c_preproc_warn_flag
5298   else
5299     ac_cpp_err=
5300   fi
5301 else
5302   ac_cpp_err=yes
5303 fi
5304 if test -z "$ac_cpp_err"; then
5305   ac_cv_header_gpm_h=yes
5306 else
5307   echo "$as_me: failed program was:" >&5
5308   cat conftest.$ac_ext >&5
5309   ac_cv_header_gpm_h=no
5310 fi
5311 rm -f conftest.err conftest.$ac_ext
5312 fi
5313 echo "$as_me:5313: result: $ac_cv_header_gpm_h" >&5
5314 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5315 if test $ac_cv_header_gpm_h = yes; then
5316
5317 cat >>confdefs.h <<\EOF
5318 #define HAVE_GPM_H 1
5319 EOF
5320
5321                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5322                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5323
5324 echo "${as_me:-configure}:5324: testing assuming we really have GPM library ..." 1>&5
5325
5326 cat >>confdefs.h <<\EOF
5327 #define HAVE_LIBGPM 1
5328 EOF
5329
5330                         with_gpm=yes
5331                 else
5332                         echo "$as_me:5332: checking for Gpm_Open in -lgpm" >&5
5333 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5334 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5335   echo $ECHO_N "(cached) $ECHO_C" >&6
5336 else
5337   ac_check_lib_save_LIBS=$LIBS
5338 LIBS="-lgpm  $LIBS"
5339 cat >conftest.$ac_ext <<_ACEOF
5340 #line 5340 "configure"
5341 #include "confdefs.h"
5342
5343 /* Override any gcc2 internal prototype to avoid an error.  */
5344 #ifdef __cplusplus
5345 extern "C"
5346 #endif
5347 /* We use char because int might match the return type of a gcc2
5348    builtin and then its argument prototype would still apply.  */
5349 char Gpm_Open ();
5350 int
5351 main (void)
5352 {
5353 Gpm_Open ();
5354   ;
5355   return 0;
5356 }
5357 _ACEOF
5358 rm -f conftest.$ac_objext conftest$ac_exeext
5359 if { (eval echo "$as_me:5359: \"$ac_link\"") >&5
5360   (eval $ac_link) 2>&5
5361   ac_status=$?
5362   echo "$as_me:5362: \$? = $ac_status" >&5
5363   (exit $ac_status); } &&
5364          { ac_try='test -s conftest$ac_exeext'
5365   { (eval echo "$as_me:5365: \"$ac_try\"") >&5
5366   (eval $ac_try) 2>&5
5367   ac_status=$?
5368   echo "$as_me:5368: \$? = $ac_status" >&5
5369   (exit $ac_status); }; }; then
5370   ac_cv_lib_gpm_Gpm_Open=yes
5371 else
5372   echo "$as_me: failed program was:" >&5
5373 cat conftest.$ac_ext >&5
5374 ac_cv_lib_gpm_Gpm_Open=no
5375 fi
5376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5377 LIBS=$ac_check_lib_save_LIBS
5378 fi
5379 echo "$as_me:5379: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5380 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5381 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5382   with_gpm=yes
5383 else
5384
5385                                 if test "$with_gpm" = maybe; then
5386                                         { echo "$as_me:5386: WARNING: Cannot link with GPM library" >&5
5387 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5388                                         with_gpm=no
5389                                 else
5390                                         { { echo "$as_me:5390: error: Cannot link with GPM library" >&5
5391 echo "$as_me: error: Cannot link with GPM library" >&2;}
5392    { (exit 1); exit 1; }; }
5393                                 fi
5394
5395 fi
5396
5397                 fi
5398
5399 else
5400
5401                 test "$with_gpm" != maybe && { echo "$as_me:5401: WARNING: Cannot find GPM header" >&5
5402 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5403                 with_gpm=no
5404
5405 fi
5406
5407 fi
5408
5409 if test "$with_gpm" != no ; then
5410         echo "$as_me:5410: checking if you want to load GPM dynamically" >&5
5411 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5412
5413 # Check whether --with-dlsym or --without-dlsym was given.
5414 if test "${with_dlsym+set}" = set; then
5415   withval="$with_dlsym"
5416   with_dlsym=$withval
5417 else
5418   with_dlsym=yes
5419 fi;
5420         echo "$as_me:5420: result: $with_dlsym" >&5
5421 echo "${ECHO_T}$with_dlsym" >&6
5422         if test "x$with_dlsym" = xyes ; then
5423
5424 cf_have_dlsym=no
5425 echo "$as_me:5425: checking for dlsym" >&5
5426 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5427 if test "${ac_cv_func_dlsym+set}" = set; then
5428   echo $ECHO_N "(cached) $ECHO_C" >&6
5429 else
5430   cat >conftest.$ac_ext <<_ACEOF
5431 #line 5431 "configure"
5432 #include "confdefs.h"
5433 /* System header to define __stub macros and hopefully few prototypes,
5434     which can conflict with char dlsym (); below.  */
5435 #include <assert.h>
5436 /* Override any gcc2 internal prototype to avoid an error.  */
5437 #ifdef __cplusplus
5438 extern "C"
5439 #endif
5440 /* We use char because int might match the return type of a gcc2
5441    builtin and then its argument prototype would still apply.  */
5442 char dlsym ();
5443 char (*f) ();
5444
5445 int
5446 main (void)
5447 {
5448 /* The GNU C library defines this for functions which it implements
5449     to always fail with ENOSYS.  Some functions are actually named
5450     something starting with __ and the normal name is an alias.  */
5451 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5452 choke me
5453 #else
5454 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5455 #endif
5456
5457   ;
5458   return 0;
5459 }
5460 _ACEOF
5461 rm -f conftest.$ac_objext conftest$ac_exeext
5462 if { (eval echo "$as_me:5462: \"$ac_link\"") >&5
5463   (eval $ac_link) 2>&5
5464   ac_status=$?
5465   echo "$as_me:5465: \$? = $ac_status" >&5
5466   (exit $ac_status); } &&
5467          { ac_try='test -s conftest$ac_exeext'
5468   { (eval echo "$as_me:5468: \"$ac_try\"") >&5
5469   (eval $ac_try) 2>&5
5470   ac_status=$?
5471   echo "$as_me:5471: \$? = $ac_status" >&5
5472   (exit $ac_status); }; }; then
5473   ac_cv_func_dlsym=yes
5474 else
5475   echo "$as_me: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 ac_cv_func_dlsym=no
5478 fi
5479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5480 fi
5481 echo "$as_me:5481: result: $ac_cv_func_dlsym" >&5
5482 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5483 if test $ac_cv_func_dlsym = yes; then
5484   cf_have_dlsym=yes
5485 else
5486
5487 cf_have_libdl=no
5488 echo "$as_me:5488: checking for dlsym in -ldl" >&5
5489 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5490 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5491   echo $ECHO_N "(cached) $ECHO_C" >&6
5492 else
5493   ac_check_lib_save_LIBS=$LIBS
5494 LIBS="-ldl  $LIBS"
5495 cat >conftest.$ac_ext <<_ACEOF
5496 #line 5496 "configure"
5497 #include "confdefs.h"
5498
5499 /* Override any gcc2 internal prototype to avoid an error.  */
5500 #ifdef __cplusplus
5501 extern "C"
5502 #endif
5503 /* We use char because int might match the return type of a gcc2
5504    builtin and then its argument prototype would still apply.  */
5505 char dlsym ();
5506 int
5507 main (void)
5508 {
5509 dlsym ();
5510   ;
5511   return 0;
5512 }
5513 _ACEOF
5514 rm -f conftest.$ac_objext conftest$ac_exeext
5515 if { (eval echo "$as_me:5515: \"$ac_link\"") >&5
5516   (eval $ac_link) 2>&5
5517   ac_status=$?
5518   echo "$as_me:5518: \$? = $ac_status" >&5
5519   (exit $ac_status); } &&
5520          { ac_try='test -s conftest$ac_exeext'
5521   { (eval echo "$as_me:5521: \"$ac_try\"") >&5
5522   (eval $ac_try) 2>&5
5523   ac_status=$?
5524   echo "$as_me:5524: \$? = $ac_status" >&5
5525   (exit $ac_status); }; }; then
5526   ac_cv_lib_dl_dlsym=yes
5527 else
5528   echo "$as_me: failed program was:" >&5
5529 cat conftest.$ac_ext >&5
5530 ac_cv_lib_dl_dlsym=no
5531 fi
5532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5533 LIBS=$ac_check_lib_save_LIBS
5534 fi
5535 echo "$as_me:5535: result: $ac_cv_lib_dl_dlsym" >&5
5536 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5537 if test $ac_cv_lib_dl_dlsym = yes; then
5538
5539         cf_have_dlsym=yes
5540         cf_have_libdl=yes
5541 fi
5542
5543 fi
5544
5545 if test "$cf_have_dlsym" = yes ; then
5546         test "$cf_have_libdl" = yes && {
5547 cf_add_libs="-ldl"
5548 # Filter out duplicates - this happens with badly-designed ".pc" files...
5549 for cf_add_1lib in $LIBS
5550 do
5551         for cf_add_2lib in $cf_add_libs
5552         do
5553                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5554                 then
5555                         cf_add_1lib=
5556                         break
5557                 fi
5558         done
5559         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5560 done
5561 LIBS="$cf_add_libs"
5562  }
5563
5564         echo "$as_me:5564: checking whether able to link to dl*() functions" >&5
5565 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5566         cat >conftest.$ac_ext <<_ACEOF
5567 #line 5567 "configure"
5568 #include "confdefs.h"
5569 #include <dlfcn.h>
5570 int
5571 main (void)
5572 {
5573
5574                 void *obj;
5575                 if ((obj = dlopen("filename", 0)) != 0) {
5576                         if (dlsym(obj, "symbolname") == 0) {
5577                         dlclose(obj);
5578                         }
5579                 }
5580   ;
5581   return 0;
5582 }
5583 _ACEOF
5584 rm -f conftest.$ac_objext conftest$ac_exeext
5585 if { (eval echo "$as_me:5585: \"$ac_link\"") >&5
5586   (eval $ac_link) 2>&5
5587   ac_status=$?
5588   echo "$as_me:5588: \$? = $ac_status" >&5
5589   (exit $ac_status); } &&
5590          { ac_try='test -s conftest$ac_exeext'
5591   { (eval echo "$as_me:5591: \"$ac_try\"") >&5
5592   (eval $ac_try) 2>&5
5593   ac_status=$?
5594   echo "$as_me:5594: \$? = $ac_status" >&5
5595   (exit $ac_status); }; }; then
5596
5597 cat >>confdefs.h <<\EOF
5598 #define HAVE_LIBDL 1
5599 EOF
5600
5601 else
5602   echo "$as_me: failed program was:" >&5
5603 cat conftest.$ac_ext >&5
5604
5605                 { { echo "$as_me:5605: error: Cannot link test program for libdl" >&5
5606 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5607    { (exit 1); exit 1; }; }
5608 fi
5609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5610         echo "$as_me:5610: result: ok" >&5
5611 echo "${ECHO_T}ok" >&6
5612 else
5613         { { echo "$as_me:5613: error: Cannot find dlsym function" >&5
5614 echo "$as_me: error: Cannot find dlsym function" >&2;}
5615    { (exit 1); exit 1; }; }
5616 fi
5617
5618                 if test "x$with_gpm" != xyes ; then
5619                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5620
5621 echo "${as_me:-configure}:5621: testing assuming soname for gpm is $with_gpm ..." 1>&5
5622
5623                         cf_cv_gpm_soname="$with_gpm"
5624                 else
5625
5626 echo "$as_me:5626: checking for soname of gpm library" >&5
5627 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5628 if test "${cf_cv_gpm_soname+set}" = set; then
5629   echo $ECHO_N "(cached) $ECHO_C" >&6
5630 else
5631
5632 cf_cv_gpm_soname=unknown
5633 if test "$cross_compiling" != yes ; then
5634 cat >conftest.$ac_ext <<CF_EOF
5635 #include <gpm.h>
5636 int main(void)
5637 {
5638 if (Gpm_Open(0,0)) Gpm_Close();
5639         ${cf_cv_main_return:-return}(0);
5640 }
5641 CF_EOF
5642 cf_save_LIBS="$LIBS"
5643
5644 cf_add_libs="-lgpm"
5645 # Filter out duplicates - this happens with badly-designed ".pc" files...
5646 for cf_add_1lib in $LIBS
5647 do
5648         for cf_add_2lib in $cf_add_libs
5649         do
5650                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5651                 then
5652                         cf_add_1lib=
5653                         break
5654                 fi
5655         done
5656         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5657 done
5658 LIBS="$cf_add_libs"
5659
5660         if { (eval echo "$as_me:5660: \"$ac_compile\"") >&5
5661   (eval $ac_compile) 2>&5
5662   ac_status=$?
5663   echo "$as_me:5663: \$? = $ac_status" >&5
5664   (exit $ac_status); } ; then
5665                 if { (eval echo "$as_me:5665: \"$ac_link\"") >&5
5666   (eval $ac_link) 2>&5
5667   ac_status=$?
5668   echo "$as_me:5668: \$? = $ac_status" >&5
5669   (exit $ac_status); } ; then
5670                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5671                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5672                 fi
5673         fi
5674 rm -rf conftest*
5675 LIBS="$cf_save_LIBS"
5676 fi
5677
5678 fi
5679 echo "$as_me:5679: result: $cf_cv_gpm_soname" >&5
5680 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5681
5682                 fi
5683                 test "$cf_cv_gpm_soname" != "unknown" &&
5684 cat >>confdefs.h <<EOF
5685 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5686 EOF
5687
5688                 SHLIB_LIST="-ldl $SHLIB_LIST"
5689         else
5690                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5691
5692 cf_add_libs="-lgpm"
5693 # Filter out duplicates - this happens with badly-designed ".pc" files...
5694 for cf_add_1lib in $TEST_LIBS
5695 do
5696         for cf_add_2lib in $cf_add_libs
5697         do
5698                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5699                 then
5700                         cf_add_1lib=
5701                         break
5702                 fi
5703         done
5704         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5705 done
5706 TEST_LIBS="$cf_add_libs"
5707
5708         fi
5709
5710 cat >>confdefs.h <<\EOF
5711 #define HAVE_LIBGPM 1
5712 EOF
5713
5714 echo "$as_me:5714: checking for Gpm_Wgetch in -lgpm" >&5
5715 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5716 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5717   echo $ECHO_N "(cached) $ECHO_C" >&6
5718 else
5719   ac_check_lib_save_LIBS=$LIBS
5720 LIBS="-lgpm  $LIBS"
5721 cat >conftest.$ac_ext <<_ACEOF
5722 #line 5722 "configure"
5723 #include "confdefs.h"
5724
5725 /* Override any gcc2 internal prototype to avoid an error.  */
5726 #ifdef __cplusplus
5727 extern "C"
5728 #endif
5729 /* We use char because int might match the return type of a gcc2
5730    builtin and then its argument prototype would still apply.  */
5731 char Gpm_Wgetch ();
5732 int
5733 main (void)
5734 {
5735 Gpm_Wgetch ();
5736   ;
5737   return 0;
5738 }
5739 _ACEOF
5740 rm -f conftest.$ac_objext conftest$ac_exeext
5741 if { (eval echo "$as_me:5741: \"$ac_link\"") >&5
5742   (eval $ac_link) 2>&5
5743   ac_status=$?
5744   echo "$as_me:5744: \$? = $ac_status" >&5
5745   (exit $ac_status); } &&
5746          { ac_try='test -s conftest$ac_exeext'
5747   { (eval echo "$as_me:5747: \"$ac_try\"") >&5
5748   (eval $ac_try) 2>&5
5749   ac_status=$?
5750   echo "$as_me:5750: \$? = $ac_status" >&5
5751   (exit $ac_status); }; }; then
5752   ac_cv_lib_gpm_Gpm_Wgetch=yes
5753 else
5754   echo "$as_me: failed program was:" >&5
5755 cat conftest.$ac_ext >&5
5756 ac_cv_lib_gpm_Gpm_Wgetch=no
5757 fi
5758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5759 LIBS=$ac_check_lib_save_LIBS
5760 fi
5761 echo "$as_me:5761: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5762 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5763 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5764
5765 echo "$as_me:5765: checking if GPM is weakly bound to curses library" >&5
5766 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5767 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5768   echo $ECHO_N "(cached) $ECHO_C" >&6
5769 else
5770
5771 cf_cv_check_gpm_wgetch=unknown
5772 if test "$cross_compiling" != yes ; then
5773
5774 cat >conftest.$ac_ext <<CF_EOF
5775 #include <gpm.h>
5776 int main(void)
5777 {
5778         Gpm_Wgetch();
5779         ${cf_cv_main_return:-return}(0);
5780 }
5781 CF_EOF
5782
5783         cf_save_LIBS="$LIBS"
5784         # This only works if we can look at the symbol table.  If a shared
5785         # library is stripped for install, we cannot use that.  So we're forced
5786         # to rely on the static library, noting that some packagers may not
5787         # include it.
5788         LIBS="-static -lgpm -dynamic $LIBS"
5789         if { (eval echo "$as_me:5789: \"$ac_compile\"") >&5
5790   (eval $ac_compile) 2>&5
5791   ac_status=$?
5792   echo "$as_me:5792: \$? = $ac_status" >&5
5793   (exit $ac_status); } ; then
5794                 if { (eval echo "$as_me:5794: \"$ac_link\"") >&5
5795   (eval $ac_link) 2>&5
5796   ac_status=$?
5797   echo "$as_me:5797: \$? = $ac_status" >&5
5798   (exit $ac_status); } ; then
5799                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5800                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5801                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5802                 fi
5803         fi
5804         rm -rf conftest*
5805         LIBS="$cf_save_LIBS"
5806 fi
5807
5808 fi
5809 echo "$as_me:5809: result: $cf_cv_check_gpm_wgetch" >&5
5810 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5811
5812 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5813         { echo "$as_me:5813: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5814 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5815 fi
5816
5817 fi
5818
5819 fi
5820
5821 # not everyone has "test -c"
5822 if test -c /dev/sysmouse 2>/dev/null ; then
5823 echo "$as_me:5823: checking if you want to use sysmouse" >&5
5824 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5825
5826 # Check whether --with-sysmouse or --without-sysmouse was given.
5827 if test "${with_sysmouse+set}" = set; then
5828   withval="$with_sysmouse"
5829   cf_with_sysmouse=$withval
5830 else
5831   cf_with_sysmouse=maybe
5832 fi;
5833         if test "$cf_with_sysmouse" != no ; then
5834         cat >conftest.$ac_ext <<_ACEOF
5835 #line 5835 "configure"
5836 #include "confdefs.h"
5837
5838 #include <osreldate.h>
5839 #if (__FreeBSD_version >= 400017)
5840 #include <sys/consio.h>
5841 #include <sys/fbio.h>
5842 #else
5843 #include <machine/console.h>
5844 #endif
5845
5846 int
5847 main (void)
5848 {
5849
5850         struct mouse_info the_mouse;
5851         ioctl(0, CONS_MOUSECTL, &the_mouse);
5852
5853   ;
5854   return 0;
5855 }
5856 _ACEOF
5857 rm -f conftest.$ac_objext
5858 if { (eval echo "$as_me:5858: \"$ac_compile\"") >&5
5859   (eval $ac_compile) 2>&5
5860   ac_status=$?
5861   echo "$as_me:5861: \$? = $ac_status" >&5
5862   (exit $ac_status); } &&
5863          { ac_try='test -s conftest.$ac_objext'
5864   { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5865   (eval $ac_try) 2>&5
5866   ac_status=$?
5867   echo "$as_me:5867: \$? = $ac_status" >&5
5868   (exit $ac_status); }; }; then
5869   cf_with_sysmouse=yes
5870 else
5871   echo "$as_me: failed program was:" >&5
5872 cat conftest.$ac_ext >&5
5873 cf_with_sysmouse=no
5874 fi
5875 rm -f conftest.$ac_objext conftest.$ac_ext
5876         fi
5877 echo "$as_me:5877: result: $cf_with_sysmouse" >&5
5878 echo "${ECHO_T}$cf_with_sysmouse" >&6
5879 test "$cf_with_sysmouse" = yes &&
5880 cat >>confdefs.h <<\EOF
5881 #define USE_SYSMOUSE 1
5882 EOF
5883
5884 fi
5885
5886 if test X"$CC_G_OPT" = X"" ; then
5887         CC_G_OPT='-g'
5888         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5889 fi
5890
5891 if test X"$CXX_G_OPT" = X"" ; then
5892         CXX_G_OPT='-g'
5893         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5894 fi
5895
5896 echo "$as_me:5896: checking for default loader flags" >&5
5897 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5898 case $DFT_LWR_MODEL in
5899 (libtool) LD_MODEL=''   ;;
5900 (normal)  LD_MODEL=''   ;;
5901 (debug)   LD_MODEL=$CC_G_OPT ;;
5902 (profile) LD_MODEL='-pg';;
5903 (shared)  LD_MODEL=''   ;;
5904 esac
5905 echo "$as_me:5905: result: $LD_MODEL" >&5
5906 echo "${ECHO_T}$LD_MODEL" >&6
5907
5908 case $DFT_LWR_MODEL in
5909 (shared)
5910
5911 echo "$as_me:5911: checking if rpath option should be used" >&5
5912 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5913
5914 # Check whether --enable-rpath or --disable-rpath was given.
5915 if test "${enable_rpath+set}" = set; then
5916   enableval="$enable_rpath"
5917   cf_cv_enable_rpath=$enableval
5918 else
5919   cf_cv_enable_rpath=no
5920 fi;
5921 echo "$as_me:5921: result: $cf_cv_enable_rpath" >&5
5922 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5923
5924 echo "$as_me:5924: checking if shared libraries should be relinked during install" >&5
5925 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5926
5927 # Check whether --enable-relink or --disable-relink was given.
5928 if test "${enable_relink+set}" = set; then
5929   enableval="$enable_relink"
5930   cf_cv_do_relink=$enableval
5931 else
5932   cf_cv_do_relink=yes
5933 fi;
5934 echo "$as_me:5934: result: $cf_cv_do_relink" >&5
5935 echo "${ECHO_T}$cf_cv_do_relink" >&6
5936         ;;
5937 esac
5938
5939 # we will build libraries one-level down.
5940 rel_builddir=..
5941
5942 LD_RPATH_OPT=
5943 echo "$as_me:5943: checking for an rpath option" >&5
5944 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5945 case $cf_cv_system_name in
5946 (irix*)
5947         if test "$GCC" = yes; then
5948                 LD_RPATH_OPT="-Wl,-rpath,"
5949         else
5950                 LD_RPATH_OPT="-rpath "
5951         fi
5952         ;;
5953 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5954         LD_RPATH_OPT="-Wl,-rpath,"
5955         ;;
5956 (openbsd[2-9].*|mirbsd*)
5957         LD_RPATH_OPT="-Wl,-rpath,"
5958         ;;
5959 (dragonfly*)
5960         LD_RPATH_OPT="-rpath "
5961         ;;
5962 (netbsd*)
5963         LD_RPATH_OPT="-Wl,-rpath,"
5964         ;;
5965 (osf*|mls+*)
5966         LD_RPATH_OPT="-rpath "
5967         ;;
5968 (solaris2*)
5969         LD_RPATH_OPT="-R"
5970         ;;
5971 (*)
5972         ;;
5973 esac
5974 echo "$as_me:5974: result: $LD_RPATH_OPT" >&5
5975 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5976
5977 case "x$LD_RPATH_OPT" in
5978 (x-R*)
5979         echo "$as_me:5979: checking if we need a space after rpath option" >&5
5980 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5981         cf_save_LIBS="$LIBS"
5982
5983 cf_add_libs="${LD_RPATH_OPT}$libdir"
5984 # Filter out duplicates - this happens with badly-designed ".pc" files...
5985 for cf_add_1lib in $LIBS
5986 do
5987         for cf_add_2lib in $cf_add_libs
5988         do
5989                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5990                 then
5991                         cf_add_1lib=
5992                         break
5993                 fi
5994         done
5995         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5996 done
5997 LIBS="$cf_add_libs"
5998
5999         cat >conftest.$ac_ext <<_ACEOF
6000 #line 6000 "configure"
6001 #include "confdefs.h"
6002
6003 int
6004 main (void)
6005 {
6006
6007   ;
6008   return 0;
6009 }
6010 _ACEOF
6011 rm -f conftest.$ac_objext conftest$ac_exeext
6012 if { (eval echo "$as_me:6012: \"$ac_link\"") >&5
6013   (eval $ac_link) 2>&5
6014   ac_status=$?
6015   echo "$as_me:6015: \$? = $ac_status" >&5
6016   (exit $ac_status); } &&
6017          { ac_try='test -s conftest$ac_exeext'
6018   { (eval echo "$as_me:6018: \"$ac_try\"") >&5
6019   (eval $ac_try) 2>&5
6020   ac_status=$?
6021   echo "$as_me:6021: \$? = $ac_status" >&5
6022   (exit $ac_status); }; }; then
6023   cf_rpath_space=no
6024 else
6025   echo "$as_me: failed program was:" >&5
6026 cat conftest.$ac_ext >&5
6027 cf_rpath_space=yes
6028 fi
6029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6030         LIBS="$cf_save_LIBS"
6031         echo "$as_me:6031: result: $cf_rpath_space" >&5
6032 echo "${ECHO_T}$cf_rpath_space" >&6
6033         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6034         ;;
6035 esac
6036
6037         RM_SHARED_OPTS=
6038         LOCAL_LDFLAGS=
6039         LOCAL_LDFLAGS2=
6040         LD_SHARED_OPTS=
6041         INSTALL_LIB="-m 644"
6042         : ${rel_builddir:=.}
6043
6044         shlibdir=$libdir
6045
6046         MAKE_DLLS="#"
6047
6048         cf_cv_do_symlinks=no
6049         cf_ld_rpath_opt=
6050         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6051
6052         echo "$as_me:6052: checking if release/abi version should be used for shared libs" >&5
6053 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6054
6055 # Check whether --with-shlib-version or --without-shlib-version was given.
6056 if test "${with_shlib_version+set}" = set; then
6057   withval="$with_shlib_version"
6058   test -z "$withval" && withval=auto
6059         case $withval in
6060         (yes)
6061                 cf_cv_shlib_version=auto
6062                 ;;
6063         (rel|abi|auto)
6064                 cf_cv_shlib_version=$withval
6065                 ;;
6066         (*)
6067                 echo "$as_me:6067: result: $withval" >&5
6068 echo "${ECHO_T}$withval" >&6
6069                 { { echo "$as_me:6069: error: option value must be one of: rel, abi, or auto" >&5
6070 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6071    { (exit 1); exit 1; }; }
6072                 ;;
6073         esac
6074
6075 else
6076   cf_cv_shlib_version=auto
6077 fi;
6078         echo "$as_me:6078: result: $cf_cv_shlib_version" >&5
6079 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6080
6081         cf_cv_rm_so_locs=no
6082         cf_try_cflags=
6083
6084         # Some less-capable ports of gcc support only -fpic
6085         CC_SHARED_OPTS=
6086
6087         cf_try_fPIC=no
6088         if test "$GCC" = yes
6089         then
6090                 cf_try_fPIC=yes
6091         else
6092                 case $cf_cv_system_name in
6093                 (*linux*)       # e.g., PGI compiler
6094                         cf_try_fPIC=yes
6095                         ;;
6096                 esac
6097         fi
6098
6099         if test "$cf_try_fPIC" = yes
6100         then
6101                 echo "$as_me:6101: checking which $CC option to use" >&5
6102 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6103                 cf_save_CFLAGS="$CFLAGS"
6104                 for CC_SHARED_OPTS in -fPIC -fpic ''
6105                 do
6106                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6107                         cat >conftest.$ac_ext <<_ACEOF
6108 #line 6108 "configure"
6109 #include "confdefs.h"
6110 #include <stdio.h>
6111 int
6112 main (void)
6113 {
6114 int x = 1
6115   ;
6116   return 0;
6117 }
6118 _ACEOF
6119 rm -f conftest.$ac_objext
6120 if { (eval echo "$as_me:6120: \"$ac_compile\"") >&5
6121   (eval $ac_compile) 2>&5
6122   ac_status=$?
6123   echo "$as_me:6123: \$? = $ac_status" >&5
6124   (exit $ac_status); } &&
6125          { ac_try='test -s conftest.$ac_objext'
6126   { (eval echo "$as_me:6126: \"$ac_try\"") >&5
6127   (eval $ac_try) 2>&5
6128   ac_status=$?
6129   echo "$as_me:6129: \$? = $ac_status" >&5
6130   (exit $ac_status); }; }; then
6131   break
6132 else
6133   echo "$as_me: failed program was:" >&5
6134 cat conftest.$ac_ext >&5
6135 fi
6136 rm -f conftest.$ac_objext conftest.$ac_ext
6137                 done
6138                 echo "$as_me:6138: result: $CC_SHARED_OPTS" >&5
6139 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6140                 CFLAGS="$cf_save_CFLAGS"
6141         fi
6142
6143         cf_cv_shlib_version_infix=no
6144
6145         case $cf_cv_system_name in
6146         (aix4.3-9*|aix[5-7]*)
6147                 if test "$GCC" = yes; then
6148                         CC_SHARED_OPTS='-Wl,-brtl'
6149                         MK_SHARED_LIB='${CC} ${LDFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6150                 else
6151                         CC_SHARED_OPTS='-brtl'
6152                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6153                         MK_SHARED_LIB='${CC} ${LDFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6154                 fi
6155                 ;;
6156         (beos*)
6157                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6158                 ;;
6159         (cygwin*)
6160                 CC_SHARED_OPTS=
6161                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6162                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6163                 cf_cv_shlib_version=cygdll
6164                 cf_cv_shlib_version_infix=cygdll
6165                 shlibdir=$bindir
6166                 MAKE_DLLS=
6167                 cat >mk_shared_lib.sh <<-CF_EOF
6168                 #!$SHELL
6169                 SHARED_LIB=\$1
6170                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6171                 shift
6172                 cat <<-EOF
6173                 Linking shared library
6174                 ** SHARED_LIB \$SHARED_LIB
6175                 ** IMPORT_LIB \$IMPORT_LIB
6176 EOF
6177                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6178 CF_EOF
6179                 chmod +x mk_shared_lib.sh
6180                 ;;
6181         (msys*)
6182                 CC_SHARED_OPTS=
6183                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6184                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6185                 cf_cv_shlib_version=msysdll
6186                 cf_cv_shlib_version_infix=msysdll
6187                 shlibdir=$bindir
6188                 MAKE_DLLS=
6189                 cat >mk_shared_lib.sh <<-CF_EOF
6190                 #!$SHELL
6191                 SHARED_LIB=\$1
6192                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6193                 shift
6194                 cat <<-EOF
6195                 Linking shared library
6196                 ** SHARED_LIB \$SHARED_LIB
6197                 ** IMPORT_LIB \$IMPORT_LIB
6198 EOF
6199                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6200 CF_EOF
6201                 chmod +x mk_shared_lib.sh
6202                 ;;
6203         (darwin*)
6204                 cf_try_cflags="no-cpp-precomp"
6205                 CC_SHARED_OPTS="-dynamic"
6206                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6207                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6208                 cf_cv_shlib_version_infix=yes
6209                 echo "$as_me:6209: checking if ld -search_paths_first works" >&5
6210 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6211 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6212   echo $ECHO_N "(cached) $ECHO_C" >&6
6213 else
6214
6215                         cf_save_LDFLAGS=$LDFLAGS
6216                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6217                         cat >conftest.$ac_ext <<_ACEOF
6218 #line 6218 "configure"
6219 #include "confdefs.h"
6220
6221 int
6222 main (void)
6223 {
6224 int i;
6225   ;
6226   return 0;
6227 }
6228 _ACEOF
6229 rm -f conftest.$ac_objext conftest$ac_exeext
6230 if { (eval echo "$as_me:6230: \"$ac_link\"") >&5
6231   (eval $ac_link) 2>&5
6232   ac_status=$?
6233   echo "$as_me:6233: \$? = $ac_status" >&5
6234   (exit $ac_status); } &&
6235          { ac_try='test -s conftest$ac_exeext'
6236   { (eval echo "$as_me:6236: \"$ac_try\"") >&5
6237   (eval $ac_try) 2>&5
6238   ac_status=$?
6239   echo "$as_me:6239: \$? = $ac_status" >&5
6240   (exit $ac_status); }; }; then
6241   cf_cv_ldflags_search_paths_first=yes
6242 else
6243   echo "$as_me: failed program was:" >&5
6244 cat conftest.$ac_ext >&5
6245 cf_cv_ldflags_search_paths_first=no
6246 fi
6247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6248                                 LDFLAGS=$cf_save_LDFLAGS
6249 fi
6250 echo "$as_me:6250: result: $cf_cv_ldflags_search_paths_first" >&5
6251 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6252                 if test $cf_cv_ldflags_search_paths_first = yes; then
6253                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6254                 fi
6255                 ;;
6256         (hpux[7-8]*)
6257                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6258                 if test "$GCC" != yes; then
6259                         CC_SHARED_OPTS='+Z'
6260                 fi
6261                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6262                 INSTALL_LIB="-m 555"
6263                 ;;
6264         (hpux*)
6265                 # (tested with gcc 2.7.2 -- I don't have c89)
6266                 if test "$GCC" = yes; then
6267                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6268                 else
6269                         CC_SHARED_OPTS='+Z'
6270                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6271                 fi
6272                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6273                 # HP-UX shared libraries must be executable, and should be
6274                 # readonly to exploit a quirk in the memory manager.
6275                 INSTALL_LIB="-m 555"
6276                 ;;
6277         (interix*)
6278                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6279                 if test "$cf_cv_shlib_version" = rel; then
6280                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6281                 else
6282                         cf_shared_soname='`basename $@`'
6283                 fi
6284                 CC_SHARED_OPTS=
6285                 MK_SHARED_LIB='${CC} ${LDFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6286                 ;;
6287         (irix*)
6288                 if test "$cf_cv_enable_rpath" = yes ; then
6289                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6290                 fi
6291                 # tested with IRIX 5.2 and 'cc'.
6292                 if test "$GCC" != yes; then
6293                         CC_SHARED_OPTS='-KPIC'
6294                         MK_SHARED_LIB='${CC} ${LDFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6295                 else
6296                         MK_SHARED_LIB='${CC} ${LDFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6297                 fi
6298                 cf_cv_rm_so_locs=yes
6299                 ;;
6300         (linux*|gnu*|k*bsd*-gnu)
6301                 if test "$DFT_LWR_MODEL" = "shared" ; then
6302                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6303                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6304                 fi
6305                 if test "$cf_cv_enable_rpath" = yes ; then
6306                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6307                 fi
6308
6309         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6310         if test "$cf_cv_shlib_version" = rel; then
6311                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6312         else
6313                 cf_cv_shared_soname='`basename $@`'
6314         fi
6315
6316                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6317                 ;;
6318         (mingw*)
6319                 cf_cv_shlib_version=mingw
6320                 cf_cv_shlib_version_infix=mingw
6321                 shlibdir=$bindir
6322                 MAKE_DLLS=
6323                 if test "$DFT_LWR_MODEL" = "shared" ; then
6324                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6325                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6326                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6327                 fi
6328                 CC_SHARED_OPTS=
6329                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6330                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6331                 cat >mk_shared_lib.sh <<-CF_EOF
6332                 #!$SHELL
6333                 SHARED_LIB=\$1
6334                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6335                 shift
6336                 cat <<-EOF
6337                 Linking shared library
6338                 ** SHARED_LIB \$SHARED_LIB
6339                 ** IMPORT_LIB \$IMPORT_LIB
6340 EOF
6341                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6342 CF_EOF
6343                 chmod +x mk_shared_lib.sh
6344                 ;;
6345         (openbsd[2-9].*|mirbsd*)
6346                 if test "$DFT_LWR_MODEL" = "shared" ; then
6347                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6348                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6349                 fi
6350                 if test "$cf_cv_enable_rpath" = yes ; then
6351                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6352                 fi
6353                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6354
6355         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6356         if test "$cf_cv_shlib_version" = rel; then
6357                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6358         else
6359                 cf_cv_shared_soname='`basename $@`'
6360         fi
6361
6362                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6363                 ;;
6364         (nto-qnx*|openbsd*|freebsd[12].*)
6365                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6366                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6367                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6368                 ;;
6369         (dragonfly*|freebsd*)
6370                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6371                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6372                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6373                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6374                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6375                 fi
6376
6377         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6378         if test "$cf_cv_shlib_version" = rel; then
6379                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6380         else
6381                 cf_cv_shared_soname='`basename $@`'
6382         fi
6383
6384                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6385                 ;;
6386         (netbsd*)
6387                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6388                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6389                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6390                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6391                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6392                         if test "$cf_cv_shlib_version" = auto; then
6393                         if test -f /usr/libexec/ld.elf_so; then
6394                                 cf_cv_shlib_version=abi
6395                         else
6396                                 cf_cv_shlib_version=rel
6397                         fi
6398                         fi
6399
6400         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6401         if test "$cf_cv_shlib_version" = rel; then
6402                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6403         else
6404                 cf_cv_shared_soname='`basename $@`'
6405         fi
6406
6407                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6408                 else
6409                         MK_SHARED_LIB='${CC} ${LDFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6410                 fi
6411                 ;;
6412         (osf*|mls+*)
6413                 # tested with OSF/1 V3.2 and 'cc'
6414                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6415                 # link with shared libs).
6416                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6417                 case $host_os in
6418                 (osf4*)
6419                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6420                         ;;
6421                 esac
6422                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6423                 if test "$DFT_LWR_MODEL" = "shared" ; then
6424                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6425                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6426                 fi
6427                 cf_cv_rm_so_locs=yes
6428                 ;;
6429         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6430                 # tested with osr5.0.5
6431                 if test "$GCC" != yes; then
6432                         CC_SHARED_OPTS='-belf -KPIC'
6433                 fi
6434                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6435                 if test "$cf_cv_enable_rpath" = yes ; then
6436                         # only way is to set LD_RUN_PATH but no switch for it
6437                         RUN_PATH=$libdir
6438                 fi
6439                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6440                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6441                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6442                 ;;
6443         (sunos4*)
6444                 # tested with SunOS 4.1.1 and gcc 2.7.0
6445                 if test "$GCC" != yes; then
6446                         CC_SHARED_OPTS='-KPIC'
6447                 fi
6448                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6449                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6450                 ;;
6451         (solaris2*)
6452                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6453                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6454                 if test "$DFT_LWR_MODEL" = "shared" ; then
6455                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6456                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6457                 fi
6458                 if test "$cf_cv_enable_rpath" = yes ; then
6459                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6460                 fi
6461
6462         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6463         if test "$cf_cv_shlib_version" = rel; then
6464                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6465         else
6466                 cf_cv_shared_soname='`basename $@`'
6467         fi
6468
6469                 if test "$GCC" != yes; then
6470                         cf_save_CFLAGS="$CFLAGS"
6471                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6472                         do
6473                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6474                                 cat >conftest.$ac_ext <<_ACEOF
6475 #line 6475 "configure"
6476 #include "confdefs.h"
6477 #include <stdio.h>
6478 int
6479 main (void)
6480 {
6481 printf("Hello\n");
6482   ;
6483   return 0;
6484 }
6485 _ACEOF
6486 rm -f conftest.$ac_objext
6487 if { (eval echo "$as_me:6487: \"$ac_compile\"") >&5
6488   (eval $ac_compile) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit $ac_status); } &&
6492          { ac_try='test -s conftest.$ac_objext'
6493   { (eval echo "$as_me:6493: \"$ac_try\"") >&5
6494   (eval $ac_try) 2>&5
6495   ac_status=$?
6496   echo "$as_me:6496: \$? = $ac_status" >&5
6497   (exit $ac_status); }; }; then
6498   break
6499 else
6500   echo "$as_me: failed program was:" >&5
6501 cat conftest.$ac_ext >&5
6502 fi
6503 rm -f conftest.$ac_objext conftest.$ac_ext
6504                         done
6505                         CFLAGS="$cf_save_CFLAGS"
6506                         CC_SHARED_OPTS=$cf_shared_opts
6507                         MK_SHARED_LIB='${CC} ${LDFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6508                 else
6509                         MK_SHARED_LIB='${CC} ${LDFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6510                 fi
6511                 ;;
6512         (sysv5uw7*|unix_sv*)
6513                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6514                 if test "$GCC" != yes; then
6515                         CC_SHARED_OPTS='-KPIC'
6516                 fi
6517                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6518                 ;;
6519         (*)
6520                 CC_SHARED_OPTS='unknown'
6521                 MK_SHARED_LIB='echo unknown'
6522                 ;;
6523         esac
6524
6525         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6526         case "$cf_cv_shlib_version" in
6527         (rel|abi)
6528                 case "$MK_SHARED_LIB" in
6529                 (*'-o $@')
6530                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6531                         ;;
6532                 (*)
6533                         { echo "$as_me:6533: WARNING: ignored --with-shlib-version" >&5
6534 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6535                         ;;
6536                 esac
6537                 ;;
6538         esac
6539
6540         if test -n "$cf_try_cflags"
6541         then
6542 cat > conftest.$ac_ext <<EOF
6543 #line 6543 "${as_me:-configure}"
6544 #include <stdio.h>
6545 int main(int argc, char *argv[])
6546 {
6547         printf("hello\n");
6548         return (argv[argc-1] == 0) ;
6549 }
6550 EOF
6551                 cf_save_CFLAGS="$CFLAGS"
6552                 for cf_opt in $cf_try_cflags
6553                 do
6554                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6555                         echo "$as_me:6555: checking if CFLAGS option -$cf_opt works" >&5
6556 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6557                         if { (eval echo "$as_me:6557: \"$ac_compile\"") >&5
6558   (eval $ac_compile) 2>&5
6559   ac_status=$?
6560   echo "$as_me:6560: \$? = $ac_status" >&5
6561   (exit $ac_status); }; then
6562                                 echo "$as_me:6562: result: yes" >&5
6563 echo "${ECHO_T}yes" >&6
6564                                 cf_save_CFLAGS="$CFLAGS"
6565                         else
6566                                 echo "$as_me:6566: result: no" >&5
6567 echo "${ECHO_T}no" >&6
6568                         fi
6569                 done
6570                 CFLAGS="$cf_save_CFLAGS"
6571         fi
6572
6573         # RPATH_LIST is a colon-separated list of directories
6574         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6575         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6576
6577         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6578
6579         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6580
6581 echo "${as_me:-configure}:6581: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6582
6583         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6584
6585 echo "${as_me:-configure}:6585: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6586
6587 for model in $cf_list_models; do
6588         case $model in
6589         (libtool)
6590
6591 echo "$as_me:6591: checking for additional libtool options" >&5
6592 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6593
6594 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6595 if test "${with_libtool_opts+set}" = set; then
6596   withval="$with_libtool_opts"
6597   with_libtool_opts=$withval
6598 else
6599   with_libtool_opts=no
6600 fi;
6601 echo "$as_me:6601: result: $with_libtool_opts" >&5
6602 echo "${ECHO_T}$with_libtool_opts" >&6
6603
6604 case .$with_libtool_opts in
6605 (.yes|.no|.)
6606         ;;
6607 (*)
6608         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6609         ;;
6610 esac
6611
6612 echo "$as_me:6612: checking if exported-symbols file should be used" >&5
6613 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6614
6615 # Check whether --with-export-syms or --without-export-syms was given.
6616 if test "${with_export_syms+set}" = set; then
6617   withval="$with_export_syms"
6618   with_export_syms=$withval
6619 else
6620   with_export_syms=no
6621 fi;
6622 if test "x$with_export_syms" = xyes
6623 then
6624         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6625
6626 fi
6627 echo "$as_me:6627: result: $with_export_syms" >&5
6628 echo "${ECHO_T}$with_export_syms" >&6
6629 if test "x$with_export_syms" != xno
6630 then
6631         EXPORT_SYMS="-export-symbols $with_export_syms"
6632
6633 fi
6634
6635                 ;;
6636         (shared)
6637                 if test "$CC_SHARED_OPTS" = "unknown"; then
6638                         { { echo "$as_me:6638: error: Shared libraries are not supported in this version" >&5
6639 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6640    { (exit 1); exit 1; }; }
6641                 fi
6642                 # workaround for inept transition to PIE vs PIC...
6643                 echo "$as_me:6643: checking if current CFLAGS link properly" >&5
6644 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6645                 cat >conftest.$ac_ext <<_ACEOF
6646 #line 6646 "configure"
6647 #include "confdefs.h"
6648 #include <stdio.h>
6649 int
6650 main (void)
6651 {
6652 printf("Hello work\n");
6653   ;
6654   return 0;
6655 }
6656 _ACEOF
6657 rm -f conftest.$ac_objext conftest$ac_exeext
6658 if { (eval echo "$as_me:6658: \"$ac_link\"") >&5
6659   (eval $ac_link) 2>&5
6660   ac_status=$?
6661   echo "$as_me:6661: \$? = $ac_status" >&5
6662   (exit $ac_status); } &&
6663          { ac_try='test -s conftest$ac_exeext'
6664   { (eval echo "$as_me:6664: \"$ac_try\"") >&5
6665   (eval $ac_try) 2>&5
6666   ac_status=$?
6667   echo "$as_me:6667: \$? = $ac_status" >&5
6668   (exit $ac_status); }; }; then
6669   cf_cflags_work=yes
6670 else
6671   echo "$as_me: failed program was:" >&5
6672 cat conftest.$ac_ext >&5
6673 cf_cflags_work=no
6674 fi
6675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6676                 echo "$as_me:6676: result: $cf_cflags_work" >&5
6677 echo "${ECHO_T}$cf_cflags_work" >&6
6678                 if test "$cf_cflags_work" = no
6679                 then
6680                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6681
6682 echo "${as_me:-configure}:6682: testing try to work around by appending shared-options ..." 1>&5
6683
6684                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6685                 fi
6686
6687 echo "$as_me:6687: checking if versioned-symbols file should be used" >&5
6688 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6689
6690 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6691 if test "${with_versioned_syms+set}" = set; then
6692   withval="$with_versioned_syms"
6693   with_versioned_syms=$withval
6694 else
6695   with_versioned_syms=no
6696 fi;
6697 if test "x$with_versioned_syms" = xyes
6698 then
6699         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6700
6701 fi
6702 echo "$as_me:6702: result: $with_versioned_syms" >&5
6703 echo "${ECHO_T}$with_versioned_syms" >&6
6704
6705 RESULTING_SYMS=
6706 VERSIONED_SYMS=
6707 WILDCARD_SYMS=
6708
6709 if test "x$with_versioned_syms" != xno
6710 then
6711         RESULTING_SYMS=$with_versioned_syms
6712         case "x$MK_SHARED_LIB" in
6713         (*-Wl,*)
6714                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6715                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6716                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6717
6718 echo "${as_me:-configure}:6718: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6719
6720                 ;;
6721         (*-dy\ *)
6722                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6723                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6724                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6725
6726 echo "${as_me:-configure}:6726: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6727
6728                 ;;
6729         (*)
6730                 { echo "$as_me:6730: WARNING: this system does not support versioned-symbols" >&5
6731 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6732                 ;;
6733         esac
6734
6735         # Linux ld can selectively override scope, e.g., of symbols beginning with
6736         # "_" by first declaring some as global, and then using a wildcard to
6737         # declare the others as local.  Some other loaders cannot do this.  Check
6738         # by constructing a (very) simple shared library and inspecting its
6739         # symbols.
6740         if test "x$VERSIONED_SYMS" != "x"
6741         then
6742                 echo "$as_me:6742: checking if wildcards can be used to selectively omit symbols" >&5
6743 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6744                 WILDCARD_SYMS=no
6745
6746                 # make sources
6747                 rm -f conftest.*
6748
6749                 cat >conftest.ver <<EOF
6750 module_1.0 {
6751 global:
6752         globalf1;
6753 local:
6754         localf1;
6755 };
6756 module_2.0 {
6757 global:
6758         globalf2;
6759 local:
6760         localf2;
6761         _*;
6762 } module_1.0;
6763 submodule_1.0 {
6764 global:
6765         subglobalf1;
6766         _ismissing;
6767 local:
6768         sublocalf1;
6769 };
6770 submodule_2.0 {
6771 global:
6772         subglobalf2;
6773 local:
6774         sublocalf2;
6775         _*;
6776 } submodule_1.0;
6777 EOF
6778                 cat >conftest.$ac_ext <<EOF
6779 #line 6779 "configure"
6780 int     _ismissing(void) { return 1; }
6781 int     _localf1(void) { return 1; }
6782 int     _localf2(void) { return 2; }
6783 int     globalf1(void) { return 1; }
6784 int     globalf2(void) { return 2; }
6785 int     _sublocalf1(void) { return 1; }
6786 int     _sublocalf2(void) { return 2; }
6787 int     subglobalf1(void) { return 1; }
6788 int     subglobalf2(void) { return 2; }
6789 EOF
6790                 cat >conftest.mk <<EOF
6791 CC=${CC}
6792 CFLAGS=${CFLAGS}
6793 CPPFLAGS=${CPPFLAGS}
6794 LDFLAGS=${LDFLAGS}
6795 LIBS=${LIBS}
6796 VERSIONED_SYMS=${VERSIONED_SYMS}
6797 RESULTING_SYMS=conftest.ver
6798 MK_SHARED_LIB=${MK_SHARED_LIB}
6799 conftest.so: conftest.$ac_cv_objext
6800                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6801 EOF
6802
6803                 # compile source, make library
6804                 if make -f conftest.mk 2>&5 >/dev/null
6805                 then
6806                         # test for missing symbol in either Data or Text section
6807                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6808                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6809                 fi
6810                 echo "$as_me:6810: result: $WILDCARD_SYMS" >&5
6811 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6812                 rm -f conftest.*
6813         fi
6814 fi
6815
6816                 ;;
6817         esac
6818 done
6819
6820 # pretend that ncurses==ncursesw==ncursest
6821 echo "$as_me:6821: checking if you want to disable library suffixes" >&5
6822 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6823
6824 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6825 if test "${enable_lib_suffixes+set}" = set; then
6826   enableval="$enable_lib_suffixes"
6827   test "$enableval" != no && enableval=yes
6828         if test "$enableval" != "yes" ; then
6829     disable_lib_suffixes=yes
6830         else
6831                 disable_lib_suffixes=no
6832         fi
6833 else
6834   enableval=yes
6835         disable_lib_suffixes=no
6836
6837 fi;
6838 echo "$as_me:6838: result: $disable_lib_suffixes" >&5
6839 echo "${ECHO_T}$disable_lib_suffixes" >&6
6840
6841 ### If we're building with rpath, try to link non-standard libs that way too.
6842 if test "$DFT_LWR_MODEL" = "shared"; then
6843
6844 echo "$as_me:6844: checking if rpath-hack should be disabled" >&5
6845 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6846
6847 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6848 if test "${enable_rpath_hack+set}" = set; then
6849   enableval="$enable_rpath_hack"
6850   test "$enableval" != no && enableval=yes
6851         if test "$enableval" != "yes" ; then
6852     cf_disable_rpath_hack=yes
6853         else
6854                 cf_disable_rpath_hack=no
6855         fi
6856 else
6857   enableval=yes
6858         cf_disable_rpath_hack=no
6859
6860 fi;
6861 echo "$as_me:6861: result: $cf_disable_rpath_hack" >&5
6862 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6863 if test "$cf_disable_rpath_hack" = no ; then
6864
6865 echo "$as_me:6865: checking for updated LDFLAGS" >&5
6866 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6867 if test -n "$LD_RPATH_OPT" ; then
6868         echo "$as_me:6868: result: maybe" >&5
6869 echo "${ECHO_T}maybe" >&6
6870
6871         for ac_prog in ldd
6872 do
6873   # Extract the first word of "$ac_prog", so it can be a program name with args.
6874 set dummy $ac_prog; ac_word=$2
6875 echo "$as_me:6875: checking for $ac_word" >&5
6876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6877 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6878   echo $ECHO_N "(cached) $ECHO_C" >&6
6879 else
6880   if test -n "$cf_ldd_prog"; then
6881   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6882 else
6883   ac_save_IFS=$IFS; IFS=$ac_path_separator
6884 ac_dummy="$PATH"
6885 for ac_dir in $ac_dummy; do
6886   IFS=$ac_save_IFS
6887   test -z "$ac_dir" && ac_dir=.
6888   $as_executable_p "$ac_dir/$ac_word" || continue
6889 ac_cv_prog_cf_ldd_prog="$ac_prog"
6890 echo "$as_me:6890: found $ac_dir/$ac_word" >&5
6891 break
6892 done
6893
6894 fi
6895 fi
6896 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6897 if test -n "$cf_ldd_prog"; then
6898   echo "$as_me:6898: result: $cf_ldd_prog" >&5
6899 echo "${ECHO_T}$cf_ldd_prog" >&6
6900 else
6901   echo "$as_me:6901: result: no" >&5
6902 echo "${ECHO_T}no" >&6
6903 fi
6904
6905   test -n "$cf_ldd_prog" && break
6906 done
6907 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6908
6909         cf_rpath_list="/usr/lib /lib"
6910         if test "$cf_ldd_prog" != no
6911         then
6912                 cf_rpath_oops=
6913
6914 cat >conftest.$ac_ext <<_ACEOF
6915 #line 6915 "configure"
6916 #include "confdefs.h"
6917 #include <stdio.h>
6918 int
6919 main (void)
6920 {
6921 printf("Hello");
6922   ;
6923   return 0;
6924 }
6925 _ACEOF
6926 rm -f conftest.$ac_objext conftest$ac_exeext
6927 if { (eval echo "$as_me:6927: \"$ac_link\"") >&5
6928   (eval $ac_link) 2>&5
6929   ac_status=$?
6930   echo "$as_me:6930: \$? = $ac_status" >&5
6931   (exit $ac_status); } &&
6932          { ac_try='test -s conftest$ac_exeext'
6933   { (eval echo "$as_me:6933: \"$ac_try\"") >&5
6934   (eval $ac_try) 2>&5
6935   ac_status=$?
6936   echo "$as_me:6936: \$? = $ac_status" >&5
6937   (exit $ac_status); }; }; then
6938   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6939                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6940 else
6941   echo "$as_me: failed program was:" >&5
6942 cat conftest.$ac_ext >&5
6943 fi
6944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6945
6946                 # If we passed the link-test, but get a "not found" on a given library,
6947                 # this could be due to inept reconfiguration of gcc to make it only
6948                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6949                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6950                 # /usr/local libraries.
6951                 if test -n "$cf_rpath_oops"
6952                 then
6953                         for cf_rpath_src in $cf_rpath_oops
6954                         do
6955                                 for cf_rpath_dir in \
6956                                         /usr/local \
6957                                         /usr/pkg \
6958                                         /opt/sfw
6959                                 do
6960                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6961                                         then
6962                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6963
6964 echo "${as_me:-configure}:6964: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6965
6966                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6967                                                 break
6968                                         fi
6969                                 done
6970                         done
6971                 fi
6972         fi
6973
6974         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6975
6976 echo "${as_me:-configure}:6976: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6977
6978 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6979
6980 echo "${as_me:-configure}:6980: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6981
6982 cf_rpath_dst=
6983 for cf_rpath_src in $LDFLAGS
6984 do
6985         case $cf_rpath_src in
6986         (-L*)
6987
6988                 # check if this refers to a directory which we will ignore
6989                 cf_rpath_skip=no
6990                 if test -n "$cf_rpath_list"
6991                 then
6992                         for cf_rpath_item in $cf_rpath_list
6993                         do
6994                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6995                                 then
6996                                         cf_rpath_skip=yes
6997                                         break
6998                                 fi
6999                         done
7000                 fi
7001
7002                 if test "$cf_rpath_skip" = no
7003                 then
7004                         # transform the option
7005                         if test "$LD_RPATH_OPT" = "-R " ; then
7006                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7007                         else
7008                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7009                         fi
7010
7011                         # if we have not already added this, add it now
7012                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7013                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7014                         then
7015                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7016
7017 echo "${as_me:-configure}:7017: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7018
7019                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7020                         fi
7021                 fi
7022                 ;;
7023         esac
7024         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7025 done
7026 LDFLAGS=$cf_rpath_dst
7027
7028 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7029
7030 echo "${as_me:-configure}:7030: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7031
7032 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7033
7034 echo "${as_me:-configure}:7034: testing ...checking LIBS $LIBS ..." 1>&5
7035
7036 cf_rpath_dst=
7037 for cf_rpath_src in $LIBS
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 LIBS=$cf_rpath_dst
7081
7082 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7083
7084 echo "${as_me:-configure}:7084: testing ...checked LIBS $LIBS ..." 1>&5
7085
7086         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7087
7088 echo "${as_me:-configure}:7088: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7089
7090 else
7091         echo "$as_me:7091: result: no" >&5
7092 echo "${ECHO_T}no" >&6
7093 fi
7094
7095 fi
7096
7097 fi
7098
7099 ###############################################################################
7100
7101 ###     use option --with-extra-suffix to append suffix to headers and libraries
7102 echo "$as_me:7102: checking if you wish to append extra suffix to header/library paths" >&5
7103 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7104 EXTRA_SUFFIX=
7105
7106 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7107 if test "${with_extra_suffix+set}" = set; then
7108   withval="$with_extra_suffix"
7109   case x$withval in
7110         (no)
7111                 ;;
7112         (xyes|x)
7113                 EXTRA_SUFFIX=$cf_cv_abi_version
7114                 ;;
7115         (*)
7116                 EXTRA_SUFFIX=$withval
7117                 ;;
7118         esac
7119
7120 fi;
7121 echo "$as_me:7121: result: $EXTRA_SUFFIX" >&5
7122 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7123
7124 ###     use option --disable-overwrite to leave out the link to -lcurses
7125 echo "$as_me:7125: checking if you wish to install ncurses overwriting curses" >&5
7126 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7127
7128 # Check whether --enable-overwrite or --disable-overwrite was given.
7129 if test "${enable_overwrite+set}" = set; then
7130   enableval="$enable_overwrite"
7131   with_overwrite=$enableval
7132 else
7133   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7134 fi;
7135 echo "$as_me:7135: result: $with_overwrite" >&5
7136 echo "${ECHO_T}$with_overwrite" >&6
7137
7138 echo "$as_me:7138: checking if external terminfo-database is used" >&5
7139 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7140
7141 # Check whether --enable-database or --disable-database was given.
7142 if test "${enable_database+set}" = set; then
7143   enableval="$enable_database"
7144   use_database=$enableval
7145 else
7146   use_database=yes
7147 fi;
7148 echo "$as_me:7148: result: $use_database" >&5
7149 echo "${ECHO_T}$use_database" >&6
7150
7151 case $host_os in
7152 (os2*)
7153         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7154         ;;
7155 (*)
7156         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7157         ;;
7158 esac
7159
7160 NCURSES_USE_DATABASE=0
7161 if test "$use_database" != no ; then
7162         NCURSES_USE_DATABASE=1
7163
7164         echo "$as_me:7164: checking which terminfo source-file will be installed" >&5
7165 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7166
7167 # Check whether --with-database or --without-database was given.
7168 if test "${with_database+set}" = set; then
7169   withval="$with_database"
7170   TERMINFO_SRC=$withval
7171 fi;
7172         echo "$as_me:7172: result: $TERMINFO_SRC" >&5
7173 echo "${ECHO_T}$TERMINFO_SRC" >&6
7174
7175         echo "$as_me:7175: checking whether to use hashed database instead of directory/tree" >&5
7176 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7177
7178 # Check whether --with-hashed-db or --without-hashed-db was given.
7179 if test "${with_hashed_db+set}" = set; then
7180   withval="$with_hashed_db"
7181
7182 else
7183   with_hashed_db=no
7184 fi;
7185         echo "$as_me:7185: result: $with_hashed_db" >&5
7186 echo "${ECHO_T}$with_hashed_db" >&6
7187 else
7188         with_hashed_db=no
7189 fi
7190
7191 echo "$as_me:7191: checking for list of fallback descriptions" >&5
7192 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7193
7194 # Check whether --with-fallbacks or --without-fallbacks was given.
7195 if test "${with_fallbacks+set}" = set; then
7196   withval="$with_fallbacks"
7197   with_fallback=$withval
7198 else
7199   with_fallback=
7200 fi;
7201 echo "$as_me:7201: result: $with_fallback" >&5
7202 echo "${ECHO_T}$with_fallback" >&6
7203 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7204
7205 echo "$as_me:7205: checking if you want modern xterm or antique" >&5
7206 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7207
7208 # Check whether --with-xterm-new or --without-xterm-new was given.
7209 if test "${with_xterm_new+set}" = set; then
7210   withval="$with_xterm_new"
7211   with_xterm_new=$withval
7212 else
7213   with_xterm_new=yes
7214 fi;
7215 case $with_xterm_new in
7216 (no) with_xterm_new=xterm-old;;
7217 (*)      with_xterm_new=xterm-new;;
7218 esac
7219 echo "$as_me:7219: result: $with_xterm_new" >&5
7220 echo "${ECHO_T}$with_xterm_new" >&6
7221 WHICH_XTERM=$with_xterm_new
7222
7223 echo "$as_me:7223: checking if xterm backspace sends BS or DEL" >&5
7224 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7225
7226 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7227 if test "${with_xterm_kbs+set}" = set; then
7228   withval="$with_xterm_kbs"
7229   with_xterm_kbs=$withval
7230 else
7231   with_xterm_kbs=BS
7232 fi;
7233 case x$with_xterm_kbs in
7234 (xyes|xno|xBS|xbs|x8)
7235         with_xterm_kbs=BS
7236         ;;
7237 (xDEL|xdel|x127)
7238         with_xterm_kbs=DEL
7239         ;;
7240 (*)
7241         with_xterm_kbs=$withval
7242         ;;
7243 esac
7244 echo "$as_me:7244: result: $with_xterm_kbs" >&5
7245 echo "${ECHO_T}$with_xterm_kbs" >&6
7246 XTERM_KBS=$with_xterm_kbs
7247
7248 MAKE_TERMINFO=
7249 if test "$use_database" = no ; then
7250         TERMINFO="${datadir}/terminfo"
7251         MAKE_TERMINFO="#"
7252 else
7253
7254 echo "$as_me:7254: checking for list of terminfo directories" >&5
7255 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7256
7257 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7258 if test "${with_terminfo_dirs+set}" = set; then
7259   withval="$with_terminfo_dirs"
7260
7261 else
7262   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7263 fi;
7264 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7265 cf_dst_path=
7266 for cf_src_path in $withval
7267 do
7268
7269 if test "x$prefix" != xNONE; then
7270         cf_path_syntax="$prefix"
7271 else
7272         cf_path_syntax="$ac_default_prefix"
7273 fi
7274
7275 case ".$cf_src_path" in
7276 (.\$\(*\)*|.\'*\'*)
7277         ;;
7278 (..|./*|.\\*)
7279         ;;
7280 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7281         ;;
7282 (.\${*prefix}*|.\${*dir}*)
7283         eval cf_src_path="$cf_src_path"
7284         case ".$cf_src_path" in
7285         (.NONE/*)
7286                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7287                 ;;
7288         esac
7289         ;;
7290 (.no|.NONE/*)
7291         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7292         ;;
7293 (*)
7294         { { echo "$as_me:7294: error: expected a pathname, not \"$cf_src_path\"" >&5
7295 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7296    { (exit 1); exit 1; }; }
7297         ;;
7298 esac
7299
7300   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7301   cf_dst_path="${cf_dst_path}${cf_src_path}"
7302 done
7303 IFS="$ac_save_ifs"
7304
7305 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7306 # so we have to check/work around.  We do prefer the result of "eval"...
7307 eval cf_dst_eval="$cf_dst_path"
7308 case "x$cf_dst_eval" in
7309 (xNONE*)
7310         TERMINFO_DIRS=$cf_dst_path
7311         ;;
7312 (*)
7313         TERMINFO_DIRS="$cf_dst_eval"
7314         ;;
7315 esac
7316
7317 echo "$as_me:7317: result: $TERMINFO_DIRS" >&5
7318 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7319 test -n "$TERMINFO_DIRS" &&
7320 cat >>confdefs.h <<EOF
7321 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7322 EOF
7323
7324 echo "$as_me:7324: checking for default terminfo directory" >&5
7325 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7326
7327 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7328 if test "${with_default_terminfo_dir+set}" = set; then
7329   withval="$with_default_terminfo_dir"
7330
7331 else
7332   withval="${TERMINFO:-${datadir}/terminfo}"
7333 fi; if test -n "${datadir}/terminfo" ; then
7334
7335 if test "x$prefix" != xNONE; then
7336         cf_path_syntax="$prefix"
7337 else
7338         cf_path_syntax="$ac_default_prefix"
7339 fi
7340
7341 case ".$withval" in
7342 (.\$\(*\)*|.\'*\'*)
7343         ;;
7344 (..|./*|.\\*)
7345         ;;
7346 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7347         ;;
7348 (.\${*prefix}*|.\${*dir}*)
7349         eval withval="$withval"
7350         case ".$withval" in
7351         (.NONE/*)
7352                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7353                 ;;
7354         esac
7355         ;;
7356 (.no|.NONE/*)
7357         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7358         ;;
7359 (*)
7360         { { echo "$as_me:7360: error: expected a pathname, not \"$withval\"" >&5
7361 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7362    { (exit 1); exit 1; }; }
7363         ;;
7364 esac
7365
7366 fi
7367 eval TERMINFO="$withval"
7368
7369 echo "$as_me:7369: result: $TERMINFO" >&5
7370 echo "${ECHO_T}$TERMINFO" >&6
7371
7372 cat >>confdefs.h <<EOF
7373 #define TERMINFO "$TERMINFO"
7374 EOF
7375
7376 fi
7377
7378 ###     use option --disable-big-core to make tic run on small machines
7379 ###     We need 4Mb, check if we can allocate 50% more than that.
7380 echo "$as_me:7380: checking if big-core option selected" >&5
7381 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7382
7383 # Check whether --enable-big-core or --disable-big-core was given.
7384 if test "${enable_big_core+set}" = set; then
7385   enableval="$enable_big_core"
7386   with_big_core=$enableval
7387 else
7388   if test "$cross_compiling" = yes; then
7389   with_big_core=no
7390 else
7391   cat >conftest.$ac_ext <<_ACEOF
7392 #line 7392 "configure"
7393 #include "confdefs.h"
7394
7395 #include <stdlib.h>
7396 #include <string.h>
7397 int main() {
7398         unsigned long n = 6000000L;
7399         char *s = malloc(n);
7400         if (s != 0)
7401                 s[0] = s[n-1] = 0;
7402         ${cf_cv_main_return:-return}(s == 0);
7403 }
7404 _ACEOF
7405 rm -f conftest$ac_exeext
7406 if { (eval echo "$as_me:7406: \"$ac_link\"") >&5
7407   (eval $ac_link) 2>&5
7408   ac_status=$?
7409   echo "$as_me:7409: \$? = $ac_status" >&5
7410   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7411   { (eval echo "$as_me:7411: \"$ac_try\"") >&5
7412   (eval $ac_try) 2>&5
7413   ac_status=$?
7414   echo "$as_me:7414: \$? = $ac_status" >&5
7415   (exit $ac_status); }; }; then
7416   with_big_core=yes
7417 else
7418   echo "$as_me: program exited with status $ac_status" >&5
7419 echo "$as_me: failed program was:" >&5
7420 cat conftest.$ac_ext >&5
7421 with_big_core=no
7422 fi
7423 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7424 fi
7425 fi;
7426 echo "$as_me:7426: result: $with_big_core" >&5
7427 echo "${ECHO_T}$with_big_core" >&6
7428 test "x$with_big_core" = "xyes" &&
7429 cat >>confdefs.h <<\EOF
7430 #define HAVE_BIG_CORE 1
7431 EOF
7432
7433 ### ISO C only guarantees 512-char strings, we have tables which load faster
7434 ### when constructed using "big" strings.  More than the C compiler, the awk
7435 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7436 echo "$as_me:7436: checking if big-strings option selected" >&5
7437 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7438
7439 # Check whether --enable-big-strings or --disable-big-strings was given.
7440 if test "${enable_big_strings+set}" = set; then
7441   enableval="$enable_big_strings"
7442   with_big_strings=$enableval
7443 else
7444
7445         case x$AWK in
7446         (x)
7447                 eval with_big_strings=no
7448                 ;;
7449         (*)
7450                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7451                         | $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
7452                         eval with_big_strings=yes
7453                 else
7454                         eval with_big_strings=no
7455                 fi
7456                 ;;
7457         esac
7458
7459 fi;
7460 echo "$as_me:7460: result: $with_big_strings" >&5
7461 echo "${ECHO_T}$with_big_strings" >&6
7462
7463 USE_BIG_STRINGS=0
7464 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7465
7466 ###     use option --enable-termcap to compile in the termcap fallback support
7467 echo "$as_me:7467: checking if you want termcap-fallback support" >&5
7468 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7469
7470 # Check whether --enable-termcap or --disable-termcap was given.
7471 if test "${enable_termcap+set}" = set; then
7472   enableval="$enable_termcap"
7473   with_termcap=$enableval
7474 else
7475   with_termcap=no
7476 fi;
7477 echo "$as_me:7477: result: $with_termcap" >&5
7478 echo "${ECHO_T}$with_termcap" >&6
7479
7480 NCURSES_USE_TERMCAP=0
7481 if test "x$with_termcap" != "xyes" ; then
7482         if test "$use_database" = no ; then
7483                 if test -z "$with_fallback" ; then
7484                         { { echo "$as_me:7484: error: You have disabled the database w/o specifying fallbacks" >&5
7485 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7486    { (exit 1); exit 1; }; }
7487                 fi
7488         fi
7489
7490 cat >>confdefs.h <<\EOF
7491 #define PURE_TERMINFO 1
7492 EOF
7493
7494 else
7495
7496         if test "$with_ticlib" != no ; then
7497                 { { echo "$as_me:7497: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7498 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7499    { (exit 1); exit 1; }; }
7500         fi
7501
7502         NCURSES_USE_TERMCAP=1
7503         echo "$as_me:7503: checking for list of termcap files" >&5
7504 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7505
7506 # Check whether --with-termpath or --without-termpath was given.
7507 if test "${with_termpath+set}" = set; then
7508   withval="$with_termpath"
7509
7510 else
7511   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7512 fi;
7513 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7514 cf_dst_path=
7515 for cf_src_path in $withval
7516 do
7517
7518 if test "x$prefix" != xNONE; then
7519         cf_path_syntax="$prefix"
7520 else
7521         cf_path_syntax="$ac_default_prefix"
7522 fi
7523
7524 case ".$cf_src_path" in
7525 (.\$\(*\)*|.\'*\'*)
7526         ;;
7527 (..|./*|.\\*)
7528         ;;
7529 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7530         ;;
7531 (.\${*prefix}*|.\${*dir}*)
7532         eval cf_src_path="$cf_src_path"
7533         case ".$cf_src_path" in
7534         (.NONE/*)
7535                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7536                 ;;
7537         esac
7538         ;;
7539 (.no|.NONE/*)
7540         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7541         ;;
7542 (*)
7543         { { echo "$as_me:7543: error: expected a pathname, not \"$cf_src_path\"" >&5
7544 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7545    { (exit 1); exit 1; }; }
7546         ;;
7547 esac
7548
7549   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7550   cf_dst_path="${cf_dst_path}${cf_src_path}"
7551 done
7552 IFS="$ac_save_ifs"
7553
7554 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7555 # so we have to check/work around.  We do prefer the result of "eval"...
7556 eval cf_dst_eval="$cf_dst_path"
7557 case "x$cf_dst_eval" in
7558 (xNONE*)
7559         TERMPATH=$cf_dst_path
7560         ;;
7561 (*)
7562         TERMPATH="$cf_dst_eval"
7563         ;;
7564 esac
7565
7566         echo "$as_me:7566: result: $TERMPATH" >&5
7567 echo "${ECHO_T}$TERMPATH" >&6
7568         test -n "$TERMPATH" &&
7569 cat >>confdefs.h <<EOF
7570 #define TERMPATH "$TERMPATH"
7571 EOF
7572
7573         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7574         echo "$as_me:7574: checking if fast termcap-loader is needed" >&5
7575 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7576
7577 # Check whether --enable-getcap or --disable-getcap was given.
7578 if test "${enable_getcap+set}" = set; then
7579   enableval="$enable_getcap"
7580   with_getcap=$enableval
7581 else
7582   with_getcap=no
7583 fi;
7584         echo "$as_me:7584: result: $with_getcap" >&5
7585 echo "${ECHO_T}$with_getcap" >&6
7586         test "x$with_getcap" = "xyes" &&
7587 cat >>confdefs.h <<\EOF
7588 #define USE_GETCAP 1
7589 EOF
7590
7591         echo "$as_me:7591: checking if translated termcaps will be cached in ~/.terminfo" >&5
7592 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7593
7594 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7595 if test "${enable_getcap_cache+set}" = set; then
7596   enableval="$enable_getcap_cache"
7597   with_getcap_cache=$enableval
7598 else
7599   with_getcap_cache=no
7600 fi;
7601         echo "$as_me:7601: result: $with_getcap_cache" >&5
7602 echo "${ECHO_T}$with_getcap_cache" >&6
7603         test "x$with_getcap_cache" = "xyes" &&
7604 cat >>confdefs.h <<\EOF
7605 #define USE_GETCAP_CACHE 1
7606 EOF
7607
7608 fi
7609
7610 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7611 echo "$as_me:7611: checking if ~/.terminfo is wanted" >&5
7612 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7613
7614 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7615 if test "${enable_home_terminfo+set}" = set; then
7616   enableval="$enable_home_terminfo"
7617   with_home_terminfo=$enableval
7618 else
7619   with_home_terminfo=yes
7620 fi;
7621 echo "$as_me:7621: result: $with_home_terminfo" >&5
7622 echo "${ECHO_T}$with_home_terminfo" >&6
7623 test "x$with_home_terminfo" = "xyes" &&
7624 cat >>confdefs.h <<\EOF
7625 #define USE_HOME_TERMINFO 1
7626 EOF
7627
7628 echo "$as_me:7628: checking if you want to use restricted environment when running as root" >&5
7629 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7630
7631 # Check whether --enable-root-environ or --disable-root-environ was given.
7632 if test "${enable_root_environ+set}" = set; then
7633   enableval="$enable_root_environ"
7634   with_root_environ=$enableval
7635 else
7636   with_root_environ=yes
7637 fi;
7638 echo "$as_me:7638: result: $with_root_environ" >&5
7639 echo "${ECHO_T}$with_root_environ" >&6
7640 test "x$with_root_environ" = xyes &&
7641 cat >>confdefs.h <<\EOF
7642 #define USE_ROOT_ENVIRON 1
7643 EOF
7644
7645 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7646 ###   to reduce storage requirements for the terminfo database.
7647
7648 for ac_header in \
7649 unistd.h \
7650
7651 do
7652 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7653 echo "$as_me:7653: checking for $ac_header" >&5
7654 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7655 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7656   echo $ECHO_N "(cached) $ECHO_C" >&6
7657 else
7658   cat >conftest.$ac_ext <<_ACEOF
7659 #line 7659 "configure"
7660 #include "confdefs.h"
7661 #include <$ac_header>
7662 _ACEOF
7663 if { (eval echo "$as_me:7663: \"$ac_cpp conftest.$ac_ext\"") >&5
7664   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7665   ac_status=$?
7666   egrep -v '^ *\+' conftest.er1 >conftest.err
7667   rm -f conftest.er1
7668   cat conftest.err >&5
7669   echo "$as_me:7669: \$? = $ac_status" >&5
7670   (exit $ac_status); } >/dev/null; then
7671   if test -s conftest.err; then
7672     ac_cpp_err=$ac_c_preproc_warn_flag
7673   else
7674     ac_cpp_err=
7675   fi
7676 else
7677   ac_cpp_err=yes
7678 fi
7679 if test -z "$ac_cpp_err"; then
7680   eval "$as_ac_Header=yes"
7681 else
7682   echo "$as_me: failed program was:" >&5
7683   cat conftest.$ac_ext >&5
7684   eval "$as_ac_Header=no"
7685 fi
7686 rm -f conftest.err conftest.$ac_ext
7687 fi
7688 echo "$as_me:7688: result: `eval echo '${'$as_ac_Header'}'`" >&5
7689 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7690 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7691   cat >>confdefs.h <<EOF
7692 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7693 EOF
7694
7695 fi
7696 done
7697
7698 for ac_func in \
7699         remove \
7700         unlink
7701 do
7702 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7703 echo "$as_me:7703: checking for $ac_func" >&5
7704 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7705 if eval "test \"\${$as_ac_var+set}\" = set"; then
7706   echo $ECHO_N "(cached) $ECHO_C" >&6
7707 else
7708   cat >conftest.$ac_ext <<_ACEOF
7709 #line 7709 "configure"
7710 #include "confdefs.h"
7711 /* System header to define __stub macros and hopefully few prototypes,
7712     which can conflict with char $ac_func (); below.  */
7713 #include <assert.h>
7714 /* Override any gcc2 internal prototype to avoid an error.  */
7715 #ifdef __cplusplus
7716 extern "C"
7717 #endif
7718 /* We use char because int might match the return type of a gcc2
7719    builtin and then its argument prototype would still apply.  */
7720 char $ac_func ();
7721 char (*f) ();
7722
7723 int
7724 main (void)
7725 {
7726 /* The GNU C library defines this for functions which it implements
7727     to always fail with ENOSYS.  Some functions are actually named
7728     something starting with __ and the normal name is an alias.  */
7729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7730 choke me
7731 #else
7732 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7733 #endif
7734
7735   ;
7736   return 0;
7737 }
7738 _ACEOF
7739 rm -f conftest.$ac_objext conftest$ac_exeext
7740 if { (eval echo "$as_me:7740: \"$ac_link\"") >&5
7741   (eval $ac_link) 2>&5
7742   ac_status=$?
7743   echo "$as_me:7743: \$? = $ac_status" >&5
7744   (exit $ac_status); } &&
7745          { ac_try='test -s conftest$ac_exeext'
7746   { (eval echo "$as_me:7746: \"$ac_try\"") >&5
7747   (eval $ac_try) 2>&5
7748   ac_status=$?
7749   echo "$as_me:7749: \$? = $ac_status" >&5
7750   (exit $ac_status); }; }; then
7751   eval "$as_ac_var=yes"
7752 else
7753   echo "$as_me: failed program was:" >&5
7754 cat conftest.$ac_ext >&5
7755 eval "$as_ac_var=no"
7756 fi
7757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7758 fi
7759 echo "$as_me:7759: result: `eval echo '${'$as_ac_var'}'`" >&5
7760 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7761 if test `eval echo '${'$as_ac_var'}'` = yes; then
7762   cat >>confdefs.h <<EOF
7763 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7764 EOF
7765
7766 fi
7767 done
7768
7769 if test "$cross_compiling" = yes ; then
7770
7771 for ac_func in \
7772                 link \
7773                 symlink
7774 do
7775 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7776 echo "$as_me:7776: checking for $ac_func" >&5
7777 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7778 if eval "test \"\${$as_ac_var+set}\" = set"; then
7779   echo $ECHO_N "(cached) $ECHO_C" >&6
7780 else
7781   cat >conftest.$ac_ext <<_ACEOF
7782 #line 7782 "configure"
7783 #include "confdefs.h"
7784 /* System header to define __stub macros and hopefully few prototypes,
7785     which can conflict with char $ac_func (); below.  */
7786 #include <assert.h>
7787 /* Override any gcc2 internal prototype to avoid an error.  */
7788 #ifdef __cplusplus
7789 extern "C"
7790 #endif
7791 /* We use char because int might match the return type of a gcc2
7792    builtin and then its argument prototype would still apply.  */
7793 char $ac_func ();
7794 char (*f) ();
7795
7796 int
7797 main (void)
7798 {
7799 /* The GNU C library defines this for functions which it implements
7800     to always fail with ENOSYS.  Some functions are actually named
7801     something starting with __ and the normal name is an alias.  */
7802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7803 choke me
7804 #else
7805 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7806 #endif
7807
7808   ;
7809   return 0;
7810 }
7811 _ACEOF
7812 rm -f conftest.$ac_objext conftest$ac_exeext
7813 if { (eval echo "$as_me:7813: \"$ac_link\"") >&5
7814   (eval $ac_link) 2>&5
7815   ac_status=$?
7816   echo "$as_me:7816: \$? = $ac_status" >&5
7817   (exit $ac_status); } &&
7818          { ac_try='test -s conftest$ac_exeext'
7819   { (eval echo "$as_me:7819: \"$ac_try\"") >&5
7820   (eval $ac_try) 2>&5
7821   ac_status=$?
7822   echo "$as_me:7822: \$? = $ac_status" >&5
7823   (exit $ac_status); }; }; then
7824   eval "$as_ac_var=yes"
7825 else
7826   echo "$as_me: failed program was:" >&5
7827 cat conftest.$ac_ext >&5
7828 eval "$as_ac_var=no"
7829 fi
7830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7831 fi
7832 echo "$as_me:7832: result: `eval echo '${'$as_ac_var'}'`" >&5
7833 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7834 if test `eval echo '${'$as_ac_var'}'` = yes; then
7835   cat >>confdefs.h <<EOF
7836 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7837 EOF
7838
7839 fi
7840 done
7841
7842 else
7843         echo "$as_me:7843: checking if link/symlink functions work" >&5
7844 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7845 if test "${cf_cv_link_funcs+set}" = set; then
7846   echo $ECHO_N "(cached) $ECHO_C" >&6
7847 else
7848
7849                 cf_cv_link_funcs=
7850                 for cf_func in link symlink ; do
7851                         if test "$cross_compiling" = yes; then
7852
7853                         eval 'ac_cv_func_'$cf_func'=error'
7854 else
7855   cat >conftest.$ac_ext <<_ACEOF
7856 #line 7856 "configure"
7857 #include "confdefs.h"
7858
7859 #include <sys/types.h>
7860 #include <sys/stat.h>
7861 #ifdef HAVE_UNISTD_H
7862 #include <unistd.h>
7863 #endif
7864 int main(void)
7865 {
7866         int fail = 0;
7867         char *src = "config.log";
7868         char *dst = "conftest.chk";
7869         struct stat src_sb;
7870         struct stat dst_sb;
7871
7872         stat(src, &src_sb);
7873         fail = ($cf_func("config.log", "conftest.chk") < 0)
7874             || (stat(dst, &dst_sb) < 0)
7875             || (dst_sb.st_mtime != src_sb.st_mtime);
7876 #ifdef HAVE_UNLINK
7877         unlink(dst);
7878 #else
7879         remove(dst);
7880 #endif
7881         ${cf_cv_main_return:-return} (fail);
7882 }
7883
7884 _ACEOF
7885 rm -f conftest$ac_exeext
7886 if { (eval echo "$as_me:7886: \"$ac_link\"") >&5
7887   (eval $ac_link) 2>&5
7888   ac_status=$?
7889   echo "$as_me:7889: \$? = $ac_status" >&5
7890   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7891   { (eval echo "$as_me:7891: \"$ac_try\"") >&5
7892   (eval $ac_try) 2>&5
7893   ac_status=$?
7894   echo "$as_me:7894: \$? = $ac_status" >&5
7895   (exit $ac_status); }; }; then
7896
7897                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7898                         eval 'ac_cv_func_'$cf_func'=yes'
7899 else
7900   echo "$as_me: program exited with status $ac_status" >&5
7901 echo "$as_me: failed program was:" >&5
7902 cat conftest.$ac_ext >&5
7903
7904                         eval 'ac_cv_func_'$cf_func'=no'
7905 fi
7906 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7907 fi
7908                 done
7909                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7910
7911 fi
7912 echo "$as_me:7912: result: $cf_cv_link_funcs" >&5
7913 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7914         test "$ac_cv_func_link"    = yes &&
7915 cat >>confdefs.h <<\EOF
7916 #define HAVE_LINK 1
7917 EOF
7918
7919         test "$ac_cv_func_symlink" = yes &&
7920 cat >>confdefs.h <<\EOF
7921 #define HAVE_SYMLINK 1
7922 EOF
7923
7924 fi
7925
7926 with_links=no
7927 with_symlinks=no
7928
7929 # soft links (symbolic links) are useful for some systems where hard links do
7930 # not work, or to make it simpler to copy terminfo trees around.
7931 if test "x$ac_cv_func_symlink" = xyes ; then
7932         echo "$as_me:7932: checking if tic should use symbolic links" >&5
7933 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7934
7935 # Check whether --enable-symlinks or --disable-symlinks was given.
7936 if test "${enable_symlinks+set}" = set; then
7937   enableval="$enable_symlinks"
7938   with_symlinks=$enableval
7939 else
7940   with_symlinks=no
7941 fi;
7942         echo "$as_me:7942: result: $with_symlinks" >&5
7943 echo "${ECHO_T}$with_symlinks" >&6
7944 fi
7945
7946 # If we have hard links and did not choose to use soft links instead, there is
7947 # no reason to make this choice optional - use the hard links.
7948 if test "$with_symlinks" = no ; then
7949         echo "$as_me:7949: checking if tic should use hard links" >&5
7950 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7951         if test "x$ac_cv_func_link" = xyes ; then
7952                 with_links=yes
7953         else
7954                 with_links=no
7955         fi
7956         echo "$as_me:7956: result: $with_links" >&5
7957 echo "${ECHO_T}$with_links" >&6
7958 fi
7959
7960 test "x$with_links" = xyes &&
7961 cat >>confdefs.h <<\EOF
7962 #define USE_LINKS 1
7963 EOF
7964
7965 test "x$with_symlinks" = xyes &&
7966 cat >>confdefs.h <<\EOF
7967 #define USE_SYMLINKS 1
7968 EOF
7969
7970 ###   use option --enable-broken-linker to force on use of broken-linker support
7971 echo "$as_me:7971: checking if you want broken-linker support code" >&5
7972 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7973
7974 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7975 if test "${enable_broken_linker+set}" = set; then
7976   enableval="$enable_broken_linker"
7977   with_broken_linker=$enableval
7978 else
7979   with_broken_linker=${BROKEN_LINKER:-no}
7980 fi;
7981 echo "$as_me:7981: result: $with_broken_linker" >&5
7982 echo "${ECHO_T}$with_broken_linker" >&6
7983
7984 BROKEN_LINKER=0
7985 if test "x$with_broken_linker" = xyes ; then
7986
7987 cat >>confdefs.h <<\EOF
7988 #define BROKEN_LINKER 1
7989 EOF
7990
7991         BROKEN_LINKER=1
7992 elif test "$DFT_LWR_MODEL" = shared ; then
7993         case $cf_cv_system_name in
7994         (cygwin*)
7995
7996 cat >>confdefs.h <<\EOF
7997 #define BROKEN_LINKER 1
7998 EOF
7999
8000                 BROKEN_LINKER=1
8001                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8002
8003 echo "${as_me:-configure}:8003: testing cygwin linker is broken anyway ..." 1>&5
8004
8005                 ;;
8006         esac
8007 fi
8008
8009 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8010 echo "$as_me:8010: checking if tputs should process BSD-style prefix padding" >&5
8011 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8012
8013 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8014 if test "${enable_bsdpad+set}" = set; then
8015   enableval="$enable_bsdpad"
8016   with_bsdpad=$enableval
8017 else
8018   with_bsdpad=no
8019 fi;
8020 echo "$as_me:8020: result: $with_bsdpad" >&5
8021 echo "${ECHO_T}$with_bsdpad" >&6
8022 test "x$with_bsdpad" = xyes &&
8023 cat >>confdefs.h <<\EOF
8024 #define BSD_TPUTS 1
8025 EOF
8026
8027 ###   use option --enable-widec to turn on use of wide-character support
8028 NCURSES_CH_T=chtype
8029 NCURSES_LIBUTF8=0
8030
8031 NEED_WCHAR_H=0
8032 NCURSES_MBSTATE_T=0
8033 NCURSES_WCHAR_T=0
8034 NCURSES_WINT_T=0
8035
8036 # Check to define _XOPEN_SOURCE "automatically"
8037 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8038
8039 cf_XOPEN_SOURCE=500
8040 cf_POSIX_C_SOURCE=199506L
8041 cf_xopen_source=
8042
8043 case $host_os in
8044 (aix[4-7]*)
8045         cf_xopen_source="-D_ALL_SOURCE"
8046         ;;
8047 (msys)
8048         cf_XOPEN_SOURCE=600
8049         ;;
8050 (darwin[0-8].*)
8051         cf_xopen_source="-D_APPLE_C_SOURCE"
8052         ;;
8053 (darwin*)
8054         cf_xopen_source="-D_DARWIN_C_SOURCE"
8055         cf_XOPEN_SOURCE=
8056         ;;
8057 (freebsd*|dragonfly*)
8058         # 5.x headers associate
8059         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8060         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8061         cf_POSIX_C_SOURCE=200112L
8062         cf_XOPEN_SOURCE=600
8063         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8064         ;;
8065 (hpux11*)
8066         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8067         ;;
8068 (hpux*)
8069         cf_xopen_source="-D_HPUX_SOURCE"
8070         ;;
8071 (irix[56].*)
8072         cf_xopen_source="-D_SGI_SOURCE"
8073         cf_XOPEN_SOURCE=
8074         ;;
8075 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8076
8077 echo "$as_me:8077: checking if we must define _GNU_SOURCE" >&5
8078 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8079 if test "${cf_cv_gnu_source+set}" = set; then
8080   echo $ECHO_N "(cached) $ECHO_C" >&6
8081 else
8082
8083 cat >conftest.$ac_ext <<_ACEOF
8084 #line 8084 "configure"
8085 #include "confdefs.h"
8086 #include <sys/types.h>
8087 int
8088 main (void)
8089 {
8090
8091 #ifndef _XOPEN_SOURCE
8092 make an error
8093 #endif
8094   ;
8095   return 0;
8096 }
8097 _ACEOF
8098 rm -f conftest.$ac_objext
8099 if { (eval echo "$as_me:8099: \"$ac_compile\"") >&5
8100   (eval $ac_compile) 2>&5
8101   ac_status=$?
8102   echo "$as_me:8102: \$? = $ac_status" >&5
8103   (exit $ac_status); } &&
8104          { ac_try='test -s conftest.$ac_objext'
8105   { (eval echo "$as_me:8105: \"$ac_try\"") >&5
8106   (eval $ac_try) 2>&5
8107   ac_status=$?
8108   echo "$as_me:8108: \$? = $ac_status" >&5
8109   (exit $ac_status); }; }; then
8110   cf_cv_gnu_source=no
8111 else
8112   echo "$as_me: failed program was:" >&5
8113 cat conftest.$ac_ext >&5
8114 cf_save="$CPPFLAGS"
8115          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8116          cat >conftest.$ac_ext <<_ACEOF
8117 #line 8117 "configure"
8118 #include "confdefs.h"
8119 #include <sys/types.h>
8120 int
8121 main (void)
8122 {
8123
8124 #ifdef _XOPEN_SOURCE
8125 make an error
8126 #endif
8127   ;
8128   return 0;
8129 }
8130 _ACEOF
8131 rm -f conftest.$ac_objext
8132 if { (eval echo "$as_me:8132: \"$ac_compile\"") >&5
8133   (eval $ac_compile) 2>&5
8134   ac_status=$?
8135   echo "$as_me:8135: \$? = $ac_status" >&5
8136   (exit $ac_status); } &&
8137          { ac_try='test -s conftest.$ac_objext'
8138   { (eval echo "$as_me:8138: \"$ac_try\"") >&5
8139   (eval $ac_try) 2>&5
8140   ac_status=$?
8141   echo "$as_me:8141: \$? = $ac_status" >&5
8142   (exit $ac_status); }; }; then
8143   cf_cv_gnu_source=no
8144 else
8145   echo "$as_me: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8147 cf_cv_gnu_source=yes
8148 fi
8149 rm -f conftest.$ac_objext conftest.$ac_ext
8150         CPPFLAGS="$cf_save"
8151
8152 fi
8153 rm -f conftest.$ac_objext conftest.$ac_ext
8154
8155 fi
8156 echo "$as_me:8156: result: $cf_cv_gnu_source" >&5
8157 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8158
8159 if test "$cf_cv_gnu_source" = yes
8160 then
8161 echo "$as_me:8161: checking if we should also define _DEFAULT_SOURCE" >&5
8162 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8163 if test "${cf_cv_default_source+set}" = set; then
8164   echo $ECHO_N "(cached) $ECHO_C" >&6
8165 else
8166
8167 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8168         cat >conftest.$ac_ext <<_ACEOF
8169 #line 8169 "configure"
8170 #include "confdefs.h"
8171 #include <sys/types.h>
8172 int
8173 main (void)
8174 {
8175
8176 #ifdef _DEFAULT_SOURCE
8177 make an error
8178 #endif
8179   ;
8180   return 0;
8181 }
8182 _ACEOF
8183 rm -f conftest.$ac_objext
8184 if { (eval echo "$as_me:8184: \"$ac_compile\"") >&5
8185   (eval $ac_compile) 2>&5
8186   ac_status=$?
8187   echo "$as_me:8187: \$? = $ac_status" >&5
8188   (exit $ac_status); } &&
8189          { ac_try='test -s conftest.$ac_objext'
8190   { (eval echo "$as_me:8190: \"$ac_try\"") >&5
8191   (eval $ac_try) 2>&5
8192   ac_status=$?
8193   echo "$as_me:8193: \$? = $ac_status" >&5
8194   (exit $ac_status); }; }; then
8195   cf_cv_default_source=no
8196 else
8197   echo "$as_me: failed program was:" >&5
8198 cat conftest.$ac_ext >&5
8199 cf_cv_default_source=yes
8200 fi
8201 rm -f conftest.$ac_objext conftest.$ac_ext
8202
8203 fi
8204 echo "$as_me:8204: result: $cf_cv_default_source" >&5
8205 echo "${ECHO_T}$cf_cv_default_source" >&6
8206 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8207 fi
8208
8209         ;;
8210 (minix*)
8211         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8212         ;;
8213 (mirbsd*)
8214         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8215         cf_XOPEN_SOURCE=
8216
8217 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8218
8219 cf_save_CFLAGS="$CFLAGS"
8220 cf_save_CPPFLAGS="$CPPFLAGS"
8221
8222 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8223         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8224                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8225
8226 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8227         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8228                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8229
8230 echo "$as_me:8230: checking if we should define _POSIX_C_SOURCE" >&5
8231 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8232 if test "${cf_cv_posix_c_source+set}" = set; then
8233   echo $ECHO_N "(cached) $ECHO_C" >&6
8234 else
8235
8236 echo "${as_me:-configure}:8236: testing if the symbol is already defined go no further ..." 1>&5
8237
8238         cat >conftest.$ac_ext <<_ACEOF
8239 #line 8239 "configure"
8240 #include "confdefs.h"
8241 #include <sys/types.h>
8242 int
8243 main (void)
8244 {
8245
8246 #ifndef _POSIX_C_SOURCE
8247 make an error
8248 #endif
8249   ;
8250   return 0;
8251 }
8252 _ACEOF
8253 rm -f conftest.$ac_objext
8254 if { (eval echo "$as_me:8254: \"$ac_compile\"") >&5
8255   (eval $ac_compile) 2>&5
8256   ac_status=$?
8257   echo "$as_me:8257: \$? = $ac_status" >&5
8258   (exit $ac_status); } &&
8259          { ac_try='test -s conftest.$ac_objext'
8260   { (eval echo "$as_me:8260: \"$ac_try\"") >&5
8261   (eval $ac_try) 2>&5
8262   ac_status=$?
8263   echo "$as_me:8263: \$? = $ac_status" >&5
8264   (exit $ac_status); }; }; then
8265   cf_cv_posix_c_source=no
8266 else
8267   echo "$as_me: failed program was:" >&5
8268 cat conftest.$ac_ext >&5
8269 cf_want_posix_source=no
8270          case .$cf_POSIX_C_SOURCE in
8271          (.[12]??*)
8272                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8273                 ;;
8274          (.2)
8275                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8276                 cf_want_posix_source=yes
8277                 ;;
8278          (.*)
8279                 cf_want_posix_source=yes
8280                 ;;
8281          esac
8282          if test "$cf_want_posix_source" = yes ; then
8283                 cat >conftest.$ac_ext <<_ACEOF
8284 #line 8284 "configure"
8285 #include "confdefs.h"
8286 #include <sys/types.h>
8287 int
8288 main (void)
8289 {
8290
8291 #ifdef _POSIX_SOURCE
8292 make an error
8293 #endif
8294   ;
8295   return 0;
8296 }
8297 _ACEOF
8298 rm -f conftest.$ac_objext
8299 if { (eval echo "$as_me:8299: \"$ac_compile\"") >&5
8300   (eval $ac_compile) 2>&5
8301   ac_status=$?
8302   echo "$as_me:8302: \$? = $ac_status" >&5
8303   (exit $ac_status); } &&
8304          { ac_try='test -s conftest.$ac_objext'
8305   { (eval echo "$as_me:8305: \"$ac_try\"") >&5
8306   (eval $ac_try) 2>&5
8307   ac_status=$?
8308   echo "$as_me:8308: \$? = $ac_status" >&5
8309   (exit $ac_status); }; }; then
8310   :
8311 else
8312   echo "$as_me: failed program was:" >&5
8313 cat conftest.$ac_ext >&5
8314 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8315 fi
8316 rm -f conftest.$ac_objext conftest.$ac_ext
8317          fi
8318
8319 echo "${as_me:-configure}:8319: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8320
8321          CFLAGS="$cf_trim_CFLAGS"
8322          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8323
8324 echo "${as_me:-configure}:8324: testing if the second compile does not leave our definition intact error ..." 1>&5
8325
8326          cat >conftest.$ac_ext <<_ACEOF
8327 #line 8327 "configure"
8328 #include "confdefs.h"
8329 #include <sys/types.h>
8330 int
8331 main (void)
8332 {
8333
8334 #ifndef _POSIX_C_SOURCE
8335 make an error
8336 #endif
8337   ;
8338   return 0;
8339 }
8340 _ACEOF
8341 rm -f conftest.$ac_objext
8342 if { (eval echo "$as_me:8342: \"$ac_compile\"") >&5
8343   (eval $ac_compile) 2>&5
8344   ac_status=$?
8345   echo "$as_me:8345: \$? = $ac_status" >&5
8346   (exit $ac_status); } &&
8347          { ac_try='test -s conftest.$ac_objext'
8348   { (eval echo "$as_me:8348: \"$ac_try\"") >&5
8349   (eval $ac_try) 2>&5
8350   ac_status=$?
8351   echo "$as_me:8351: \$? = $ac_status" >&5
8352   (exit $ac_status); }; }; then
8353   :
8354 else
8355   echo "$as_me: failed program was:" >&5
8356 cat conftest.$ac_ext >&5
8357 cf_cv_posix_c_source=no
8358 fi
8359 rm -f conftest.$ac_objext conftest.$ac_ext
8360          CFLAGS="$cf_save_CFLAGS"
8361          CPPFLAGS="$cf_save_CPPFLAGS"
8362
8363 fi
8364 rm -f conftest.$ac_objext conftest.$ac_ext
8365
8366 fi
8367 echo "$as_me:8367: result: $cf_cv_posix_c_source" >&5
8368 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8369
8370 if test "$cf_cv_posix_c_source" != no ; then
8371         CFLAGS="$cf_trim_CFLAGS"
8372         CPPFLAGS="$cf_trim_CPPFLAGS"
8373
8374 cf_fix_cppflags=no
8375 cf_new_cflags=
8376 cf_new_cppflags=
8377 cf_new_extra_cppflags=
8378
8379 for cf_add_cflags in $cf_cv_posix_c_source
8380 do
8381 case $cf_fix_cppflags in
8382 (no)
8383         case $cf_add_cflags in
8384         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8385                 case $cf_add_cflags in
8386                 (-D*)
8387                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8388
8389                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8390                                 && test -z "${cf_tst_cflags}" \
8391                                 && cf_fix_cppflags=yes
8392
8393                         if test $cf_fix_cppflags = yes ; then
8394
8395         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8396         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8397
8398                                 continue
8399                         elif test "${cf_tst_cflags}" = "\"'" ; then
8400
8401         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8402         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8403
8404                                 continue
8405                         fi
8406                         ;;
8407                 esac
8408                 case "$CPPFLAGS" in
8409                 (*$cf_add_cflags)
8410                         ;;
8411                 (*)
8412                         case $cf_add_cflags in
8413                         (-D*)
8414                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8415
8416 CPPFLAGS=`echo "$CPPFLAGS" | \
8417         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8418                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8419
8420                                 ;;
8421                         esac
8422
8423         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8424         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8425
8426                         ;;
8427                 esac
8428                 ;;
8429         (*)
8430
8431         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8432         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8433
8434                 ;;
8435         esac
8436         ;;
8437 (yes)
8438
8439         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8440         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8441
8442         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8443
8444         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8445                 && test -z "${cf_tst_cflags}" \
8446                 && cf_fix_cppflags=no
8447         ;;
8448 esac
8449 done
8450
8451 if test -n "$cf_new_cflags" ; then
8452
8453         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8454         CFLAGS="${CFLAGS}$cf_new_cflags"
8455
8456 fi
8457
8458 if test -n "$cf_new_cppflags" ; then
8459
8460         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8461         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8462
8463 fi
8464
8465 if test -n "$cf_new_extra_cppflags" ; then
8466
8467         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8468         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8469
8470 fi
8471
8472 fi
8473
8474         ;;
8475 (netbsd*)
8476         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8477         ;;
8478 (openbsd[4-9]*)
8479         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8480         cf_xopen_source="-D_BSD_SOURCE"
8481         cf_XOPEN_SOURCE=600
8482         ;;
8483 (openbsd*)
8484         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8485         ;;
8486 (osf[45]*)
8487         cf_xopen_source="-D_OSF_SOURCE"
8488         ;;
8489 (nto-qnx*)
8490         cf_xopen_source="-D_QNX_SOURCE"
8491         ;;
8492 (sco*)
8493         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8494         ;;
8495 (solaris2.*)
8496         cf_xopen_source="-D__EXTENSIONS__"
8497         cf_cv_xopen_source=broken
8498         ;;
8499 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8500         cf_XOPEN_SOURCE=
8501         cf_POSIX_C_SOURCE=
8502         ;;
8503 (*)
8504
8505 echo "$as_me:8505: checking if we should define _XOPEN_SOURCE" >&5
8506 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8507 if test "${cf_cv_xopen_source+set}" = set; then
8508   echo $ECHO_N "(cached) $ECHO_C" >&6
8509 else
8510
8511         cat >conftest.$ac_ext <<_ACEOF
8512 #line 8512 "configure"
8513 #include "confdefs.h"
8514
8515 #include <stdlib.h>
8516 #include <string.h>
8517 #include <sys/types.h>
8518
8519 int
8520 main (void)
8521 {
8522
8523 #ifndef _XOPEN_SOURCE
8524 make an error
8525 #endif
8526   ;
8527   return 0;
8528 }
8529 _ACEOF
8530 rm -f conftest.$ac_objext
8531 if { (eval echo "$as_me:8531: \"$ac_compile\"") >&5
8532   (eval $ac_compile) 2>&5
8533   ac_status=$?
8534   echo "$as_me:8534: \$? = $ac_status" >&5
8535   (exit $ac_status); } &&
8536          { ac_try='test -s conftest.$ac_objext'
8537   { (eval echo "$as_me:8537: \"$ac_try\"") >&5
8538   (eval $ac_try) 2>&5
8539   ac_status=$?
8540   echo "$as_me:8540: \$? = $ac_status" >&5
8541   (exit $ac_status); }; }; then
8542   cf_cv_xopen_source=no
8543 else
8544   echo "$as_me: failed program was:" >&5
8545 cat conftest.$ac_ext >&5
8546 cf_save="$CPPFLAGS"
8547          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8548          cat >conftest.$ac_ext <<_ACEOF
8549 #line 8549 "configure"
8550 #include "confdefs.h"
8551
8552 #include <stdlib.h>
8553 #include <string.h>
8554 #include <sys/types.h>
8555
8556 int
8557 main (void)
8558 {
8559
8560 #ifdef _XOPEN_SOURCE
8561 make an error
8562 #endif
8563   ;
8564   return 0;
8565 }
8566 _ACEOF
8567 rm -f conftest.$ac_objext
8568 if { (eval echo "$as_me:8568: \"$ac_compile\"") >&5
8569   (eval $ac_compile) 2>&5
8570   ac_status=$?
8571   echo "$as_me:8571: \$? = $ac_status" >&5
8572   (exit $ac_status); } &&
8573          { ac_try='test -s conftest.$ac_objext'
8574   { (eval echo "$as_me:8574: \"$ac_try\"") >&5
8575   (eval $ac_try) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); }; }; then
8579   cf_cv_xopen_source=no
8580 else
8581   echo "$as_me: failed program was:" >&5
8582 cat conftest.$ac_ext >&5
8583 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8584 fi
8585 rm -f conftest.$ac_objext conftest.$ac_ext
8586         CPPFLAGS="$cf_save"
8587
8588 fi
8589 rm -f conftest.$ac_objext conftest.$ac_ext
8590
8591 fi
8592 echo "$as_me:8592: result: $cf_cv_xopen_source" >&5
8593 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8594
8595 if test "$cf_cv_xopen_source" != no ; then
8596
8597 CFLAGS=`echo "$CFLAGS" | \
8598         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8599                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8600
8601 CPPFLAGS=`echo "$CPPFLAGS" | \
8602         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8603                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8604
8605         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8606
8607 cf_fix_cppflags=no
8608 cf_new_cflags=
8609 cf_new_cppflags=
8610 cf_new_extra_cppflags=
8611
8612 for cf_add_cflags in $cf_temp_xopen_source
8613 do
8614 case $cf_fix_cppflags in
8615 (no)
8616         case $cf_add_cflags in
8617         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8618                 case $cf_add_cflags in
8619                 (-D*)
8620                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8621
8622                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8623                                 && test -z "${cf_tst_cflags}" \
8624                                 && cf_fix_cppflags=yes
8625
8626                         if test $cf_fix_cppflags = yes ; then
8627
8628         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8629         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8630
8631                                 continue
8632                         elif test "${cf_tst_cflags}" = "\"'" ; then
8633
8634         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8635         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8636
8637                                 continue
8638                         fi
8639                         ;;
8640                 esac
8641                 case "$CPPFLAGS" in
8642                 (*$cf_add_cflags)
8643                         ;;
8644                 (*)
8645                         case $cf_add_cflags in
8646                         (-D*)
8647                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8648
8649 CPPFLAGS=`echo "$CPPFLAGS" | \
8650         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8651                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8652
8653                                 ;;
8654                         esac
8655
8656         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8657         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8658
8659                         ;;
8660                 esac
8661                 ;;
8662         (*)
8663
8664         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8665         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8666
8667                 ;;
8668         esac
8669         ;;
8670 (yes)
8671
8672         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8673         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8674
8675         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8676
8677         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8678                 && test -z "${cf_tst_cflags}" \
8679                 && cf_fix_cppflags=no
8680         ;;
8681 esac
8682 done
8683
8684 if test -n "$cf_new_cflags" ; then
8685
8686         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8687         CFLAGS="${CFLAGS}$cf_new_cflags"
8688
8689 fi
8690
8691 if test -n "$cf_new_cppflags" ; then
8692
8693         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8694         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8695
8696 fi
8697
8698 if test -n "$cf_new_extra_cppflags" ; then
8699
8700         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8701         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8702
8703 fi
8704
8705 fi
8706
8707 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8708
8709 cf_save_CFLAGS="$CFLAGS"
8710 cf_save_CPPFLAGS="$CPPFLAGS"
8711
8712 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8713         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8714                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8715
8716 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8717         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8718                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8719
8720 echo "$as_me:8720: checking if we should define _POSIX_C_SOURCE" >&5
8721 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8722 if test "${cf_cv_posix_c_source+set}" = set; then
8723   echo $ECHO_N "(cached) $ECHO_C" >&6
8724 else
8725
8726 echo "${as_me:-configure}:8726: testing if the symbol is already defined go no further ..." 1>&5
8727
8728         cat >conftest.$ac_ext <<_ACEOF
8729 #line 8729 "configure"
8730 #include "confdefs.h"
8731 #include <sys/types.h>
8732 int
8733 main (void)
8734 {
8735
8736 #ifndef _POSIX_C_SOURCE
8737 make an error
8738 #endif
8739   ;
8740   return 0;
8741 }
8742 _ACEOF
8743 rm -f conftest.$ac_objext
8744 if { (eval echo "$as_me:8744: \"$ac_compile\"") >&5
8745   (eval $ac_compile) 2>&5
8746   ac_status=$?
8747   echo "$as_me:8747: \$? = $ac_status" >&5
8748   (exit $ac_status); } &&
8749          { ac_try='test -s conftest.$ac_objext'
8750   { (eval echo "$as_me:8750: \"$ac_try\"") >&5
8751   (eval $ac_try) 2>&5
8752   ac_status=$?
8753   echo "$as_me:8753: \$? = $ac_status" >&5
8754   (exit $ac_status); }; }; then
8755   cf_cv_posix_c_source=no
8756 else
8757   echo "$as_me: failed program was:" >&5
8758 cat conftest.$ac_ext >&5
8759 cf_want_posix_source=no
8760          case .$cf_POSIX_C_SOURCE in
8761          (.[12]??*)
8762                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8763                 ;;
8764          (.2)
8765                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8766                 cf_want_posix_source=yes
8767                 ;;
8768          (.*)
8769                 cf_want_posix_source=yes
8770                 ;;
8771          esac
8772          if test "$cf_want_posix_source" = yes ; then
8773                 cat >conftest.$ac_ext <<_ACEOF
8774 #line 8774 "configure"
8775 #include "confdefs.h"
8776 #include <sys/types.h>
8777 int
8778 main (void)
8779 {
8780
8781 #ifdef _POSIX_SOURCE
8782 make an error
8783 #endif
8784   ;
8785   return 0;
8786 }
8787 _ACEOF
8788 rm -f conftest.$ac_objext
8789 if { (eval echo "$as_me:8789: \"$ac_compile\"") >&5
8790   (eval $ac_compile) 2>&5
8791   ac_status=$?
8792   echo "$as_me:8792: \$? = $ac_status" >&5
8793   (exit $ac_status); } &&
8794          { ac_try='test -s conftest.$ac_objext'
8795   { (eval echo "$as_me:8795: \"$ac_try\"") >&5
8796   (eval $ac_try) 2>&5
8797   ac_status=$?
8798   echo "$as_me:8798: \$? = $ac_status" >&5
8799   (exit $ac_status); }; }; then
8800   :
8801 else
8802   echo "$as_me: failed program was:" >&5
8803 cat conftest.$ac_ext >&5
8804 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8805 fi
8806 rm -f conftest.$ac_objext conftest.$ac_ext
8807          fi
8808
8809 echo "${as_me:-configure}:8809: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8810
8811          CFLAGS="$cf_trim_CFLAGS"
8812          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8813
8814 echo "${as_me:-configure}:8814: testing if the second compile does not leave our definition intact error ..." 1>&5
8815
8816          cat >conftest.$ac_ext <<_ACEOF
8817 #line 8817 "configure"
8818 #include "confdefs.h"
8819 #include <sys/types.h>
8820 int
8821 main (void)
8822 {
8823
8824 #ifndef _POSIX_C_SOURCE
8825 make an error
8826 #endif
8827   ;
8828   return 0;
8829 }
8830 _ACEOF
8831 rm -f conftest.$ac_objext
8832 if { (eval echo "$as_me:8832: \"$ac_compile\"") >&5
8833   (eval $ac_compile) 2>&5
8834   ac_status=$?
8835   echo "$as_me:8835: \$? = $ac_status" >&5
8836   (exit $ac_status); } &&
8837          { ac_try='test -s conftest.$ac_objext'
8838   { (eval echo "$as_me:8838: \"$ac_try\"") >&5
8839   (eval $ac_try) 2>&5
8840   ac_status=$?
8841   echo "$as_me:8841: \$? = $ac_status" >&5
8842   (exit $ac_status); }; }; then
8843   :
8844 else
8845   echo "$as_me: failed program was:" >&5
8846 cat conftest.$ac_ext >&5
8847 cf_cv_posix_c_source=no
8848 fi
8849 rm -f conftest.$ac_objext conftest.$ac_ext
8850          CFLAGS="$cf_save_CFLAGS"
8851          CPPFLAGS="$cf_save_CPPFLAGS"
8852
8853 fi
8854 rm -f conftest.$ac_objext conftest.$ac_ext
8855
8856 fi
8857 echo "$as_me:8857: result: $cf_cv_posix_c_source" >&5
8858 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8859
8860 if test "$cf_cv_posix_c_source" != no ; then
8861         CFLAGS="$cf_trim_CFLAGS"
8862         CPPFLAGS="$cf_trim_CPPFLAGS"
8863
8864 cf_fix_cppflags=no
8865 cf_new_cflags=
8866 cf_new_cppflags=
8867 cf_new_extra_cppflags=
8868
8869 for cf_add_cflags in $cf_cv_posix_c_source
8870 do
8871 case $cf_fix_cppflags in
8872 (no)
8873         case $cf_add_cflags in
8874         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8875                 case $cf_add_cflags in
8876                 (-D*)
8877                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8878
8879                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8880                                 && test -z "${cf_tst_cflags}" \
8881                                 && cf_fix_cppflags=yes
8882
8883                         if test $cf_fix_cppflags = yes ; then
8884
8885         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8886         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8887
8888                                 continue
8889                         elif test "${cf_tst_cflags}" = "\"'" ; then
8890
8891         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8892         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8893
8894                                 continue
8895                         fi
8896                         ;;
8897                 esac
8898                 case "$CPPFLAGS" in
8899                 (*$cf_add_cflags)
8900                         ;;
8901                 (*)
8902                         case $cf_add_cflags in
8903                         (-D*)
8904                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8905
8906 CPPFLAGS=`echo "$CPPFLAGS" | \
8907         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8908                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8909
8910                                 ;;
8911                         esac
8912
8913         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8914         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8915
8916                         ;;
8917                 esac
8918                 ;;
8919         (*)
8920
8921         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8922         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8923
8924                 ;;
8925         esac
8926         ;;
8927 (yes)
8928
8929         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8930         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8931
8932         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8933
8934         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8935                 && test -z "${cf_tst_cflags}" \
8936                 && cf_fix_cppflags=no
8937         ;;
8938 esac
8939 done
8940
8941 if test -n "$cf_new_cflags" ; then
8942
8943         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8944         CFLAGS="${CFLAGS}$cf_new_cflags"
8945
8946 fi
8947
8948 if test -n "$cf_new_cppflags" ; then
8949
8950         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8951         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8952
8953 fi
8954
8955 if test -n "$cf_new_extra_cppflags" ; then
8956
8957         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8958         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8959
8960 fi
8961
8962 fi
8963
8964         ;;
8965 esac
8966
8967 if test -n "$cf_xopen_source" ; then
8968
8969 cf_fix_cppflags=no
8970 cf_new_cflags=
8971 cf_new_cppflags=
8972 cf_new_extra_cppflags=
8973
8974 for cf_add_cflags in $cf_xopen_source
8975 do
8976 case $cf_fix_cppflags in
8977 (no)
8978         case $cf_add_cflags in
8979         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8980                 case $cf_add_cflags in
8981                 (-D*)
8982                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8983
8984                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8985                                 && test -z "${cf_tst_cflags}" \
8986                                 && cf_fix_cppflags=yes
8987
8988                         if test $cf_fix_cppflags = yes ; then
8989
8990         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8991         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8992
8993                                 continue
8994                         elif test "${cf_tst_cflags}" = "\"'" ; then
8995
8996         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8997         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8998
8999                                 continue
9000                         fi
9001                         ;;
9002                 esac
9003                 case "$CPPFLAGS" in
9004                 (*$cf_add_cflags)
9005                         ;;
9006                 (*)
9007                         case $cf_add_cflags in
9008                         (-D*)
9009                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9010
9011 CPPFLAGS=`echo "$CPPFLAGS" | \
9012         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9013                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9014
9015                                 ;;
9016                         esac
9017
9018         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9019         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9020
9021                         ;;
9022                 esac
9023                 ;;
9024         (*)
9025
9026         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9027         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9028
9029                 ;;
9030         esac
9031         ;;
9032 (yes)
9033
9034         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9035         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9036
9037         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9038
9039         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9040                 && test -z "${cf_tst_cflags}" \
9041                 && cf_fix_cppflags=no
9042         ;;
9043 esac
9044 done
9045
9046 if test -n "$cf_new_cflags" ; then
9047         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9048
9049 echo "${as_me:-configure}:9049: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9050
9051         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9052         CFLAGS="${CFLAGS}$cf_new_cflags"
9053
9054 fi
9055
9056 if test -n "$cf_new_cppflags" ; then
9057         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9058
9059 echo "${as_me:-configure}:9059: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9060
9061         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9062         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9063
9064 fi
9065
9066 if test -n "$cf_new_extra_cppflags" ; then
9067         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9068
9069 echo "${as_me:-configure}:9069: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9070
9071         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9072         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9073
9074 fi
9075
9076 fi
9077
9078 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9079         echo "$as_me:9079: checking if _XOPEN_SOURCE really is set" >&5
9080 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9081         cat >conftest.$ac_ext <<_ACEOF
9082 #line 9082 "configure"
9083 #include "confdefs.h"
9084 #include <stdlib.h>
9085 int
9086 main (void)
9087 {
9088
9089 #ifndef _XOPEN_SOURCE
9090 make an error
9091 #endif
9092   ;
9093   return 0;
9094 }
9095 _ACEOF
9096 rm -f conftest.$ac_objext
9097 if { (eval echo "$as_me:9097: \"$ac_compile\"") >&5
9098   (eval $ac_compile) 2>&5
9099   ac_status=$?
9100   echo "$as_me:9100: \$? = $ac_status" >&5
9101   (exit $ac_status); } &&
9102          { ac_try='test -s conftest.$ac_objext'
9103   { (eval echo "$as_me:9103: \"$ac_try\"") >&5
9104   (eval $ac_try) 2>&5
9105   ac_status=$?
9106   echo "$as_me:9106: \$? = $ac_status" >&5
9107   (exit $ac_status); }; }; then
9108   cf_XOPEN_SOURCE_set=yes
9109 else
9110   echo "$as_me: failed program was:" >&5
9111 cat conftest.$ac_ext >&5
9112 cf_XOPEN_SOURCE_set=no
9113 fi
9114 rm -f conftest.$ac_objext conftest.$ac_ext
9115         echo "$as_me:9115: result: $cf_XOPEN_SOURCE_set" >&5
9116 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9117         if test $cf_XOPEN_SOURCE_set = yes
9118         then
9119                 cat >conftest.$ac_ext <<_ACEOF
9120 #line 9120 "configure"
9121 #include "confdefs.h"
9122 #include <stdlib.h>
9123 int
9124 main (void)
9125 {
9126
9127 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9128 make an error
9129 #endif
9130   ;
9131   return 0;
9132 }
9133 _ACEOF
9134 rm -f conftest.$ac_objext
9135 if { (eval echo "$as_me:9135: \"$ac_compile\"") >&5
9136   (eval $ac_compile) 2>&5
9137   ac_status=$?
9138   echo "$as_me:9138: \$? = $ac_status" >&5
9139   (exit $ac_status); } &&
9140          { ac_try='test -s conftest.$ac_objext'
9141   { (eval echo "$as_me:9141: \"$ac_try\"") >&5
9142   (eval $ac_try) 2>&5
9143   ac_status=$?
9144   echo "$as_me:9144: \$? = $ac_status" >&5
9145   (exit $ac_status); }; }; then
9146   cf_XOPEN_SOURCE_set_ok=yes
9147 else
9148   echo "$as_me: failed program was:" >&5
9149 cat conftest.$ac_ext >&5
9150 cf_XOPEN_SOURCE_set_ok=no
9151 fi
9152 rm -f conftest.$ac_objext conftest.$ac_ext
9153                 if test $cf_XOPEN_SOURCE_set_ok = no
9154                 then
9155                         { echo "$as_me:9155: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9156 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9157                 fi
9158         else
9159
9160 echo "$as_me:9160: checking if we should define _XOPEN_SOURCE" >&5
9161 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9162 if test "${cf_cv_xopen_source+set}" = set; then
9163   echo $ECHO_N "(cached) $ECHO_C" >&6
9164 else
9165
9166         cat >conftest.$ac_ext <<_ACEOF
9167 #line 9167 "configure"
9168 #include "confdefs.h"
9169
9170 #include <stdlib.h>
9171 #include <string.h>
9172 #include <sys/types.h>
9173
9174 int
9175 main (void)
9176 {
9177
9178 #ifndef _XOPEN_SOURCE
9179 make an error
9180 #endif
9181   ;
9182   return 0;
9183 }
9184 _ACEOF
9185 rm -f conftest.$ac_objext
9186 if { (eval echo "$as_me:9186: \"$ac_compile\"") >&5
9187   (eval $ac_compile) 2>&5
9188   ac_status=$?
9189   echo "$as_me:9189: \$? = $ac_status" >&5
9190   (exit $ac_status); } &&
9191          { ac_try='test -s conftest.$ac_objext'
9192   { (eval echo "$as_me:9192: \"$ac_try\"") >&5
9193   (eval $ac_try) 2>&5
9194   ac_status=$?
9195   echo "$as_me:9195: \$? = $ac_status" >&5
9196   (exit $ac_status); }; }; then
9197   cf_cv_xopen_source=no
9198 else
9199   echo "$as_me: failed program was:" >&5
9200 cat conftest.$ac_ext >&5
9201 cf_save="$CPPFLAGS"
9202          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9203          cat >conftest.$ac_ext <<_ACEOF
9204 #line 9204 "configure"
9205 #include "confdefs.h"
9206
9207 #include <stdlib.h>
9208 #include <string.h>
9209 #include <sys/types.h>
9210
9211 int
9212 main (void)
9213 {
9214
9215 #ifdef _XOPEN_SOURCE
9216 make an error
9217 #endif
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 rm -f conftest.$ac_objext
9223 if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
9224   (eval $ac_compile) 2>&5
9225   ac_status=$?
9226   echo "$as_me:9226: \$? = $ac_status" >&5
9227   (exit $ac_status); } &&
9228          { ac_try='test -s conftest.$ac_objext'
9229   { (eval echo "$as_me:9229: \"$ac_try\"") >&5
9230   (eval $ac_try) 2>&5
9231   ac_status=$?
9232   echo "$as_me:9232: \$? = $ac_status" >&5
9233   (exit $ac_status); }; }; then
9234   cf_cv_xopen_source=no
9235 else
9236   echo "$as_me: failed program was:" >&5
9237 cat conftest.$ac_ext >&5
9238 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9239 fi
9240 rm -f conftest.$ac_objext conftest.$ac_ext
9241         CPPFLAGS="$cf_save"
9242
9243 fi
9244 rm -f conftest.$ac_objext conftest.$ac_ext
9245
9246 fi
9247 echo "$as_me:9247: result: $cf_cv_xopen_source" >&5
9248 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9249
9250 if test "$cf_cv_xopen_source" != no ; then
9251
9252 CFLAGS=`echo "$CFLAGS" | \
9253         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9254                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9255
9256 CPPFLAGS=`echo "$CPPFLAGS" | \
9257         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9258                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9259
9260         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9261
9262 cf_fix_cppflags=no
9263 cf_new_cflags=
9264 cf_new_cppflags=
9265 cf_new_extra_cppflags=
9266
9267 for cf_add_cflags in $cf_temp_xopen_source
9268 do
9269 case $cf_fix_cppflags in
9270 (no)
9271         case $cf_add_cflags in
9272         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9273                 case $cf_add_cflags in
9274                 (-D*)
9275                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9276
9277                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9278                                 && test -z "${cf_tst_cflags}" \
9279                                 && cf_fix_cppflags=yes
9280
9281                         if test $cf_fix_cppflags = yes ; then
9282
9283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9285
9286                                 continue
9287                         elif test "${cf_tst_cflags}" = "\"'" ; then
9288
9289         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9290         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9291
9292                                 continue
9293                         fi
9294                         ;;
9295                 esac
9296                 case "$CPPFLAGS" in
9297                 (*$cf_add_cflags)
9298                         ;;
9299                 (*)
9300                         case $cf_add_cflags in
9301                         (-D*)
9302                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9303
9304 CPPFLAGS=`echo "$CPPFLAGS" | \
9305         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9306                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9307
9308                                 ;;
9309                         esac
9310
9311         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9312         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9313
9314                         ;;
9315                 esac
9316                 ;;
9317         (*)
9318
9319         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9320         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9321
9322                 ;;
9323         esac
9324         ;;
9325 (yes)
9326
9327         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9328         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9329
9330         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9331
9332         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9333                 && test -z "${cf_tst_cflags}" \
9334                 && cf_fix_cppflags=no
9335         ;;
9336 esac
9337 done
9338
9339 if test -n "$cf_new_cflags" ; then
9340
9341         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9342         CFLAGS="${CFLAGS}$cf_new_cflags"
9343
9344 fi
9345
9346 if test -n "$cf_new_cppflags" ; then
9347
9348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9349         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9350
9351 fi
9352
9353 if test -n "$cf_new_extra_cppflags" ; then
9354
9355         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9356         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9357
9358 fi
9359
9360 fi
9361
9362         fi
9363 fi
9364
9365 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9366
9367 # Work around breakage on OS X
9368
9369 echo "$as_me:9369: checking if SIGWINCH is defined" >&5
9370 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9371 if test "${cf_cv_define_sigwinch+set}" = set; then
9372   echo $ECHO_N "(cached) $ECHO_C" >&6
9373 else
9374
9375         cat >conftest.$ac_ext <<_ACEOF
9376 #line 9376 "configure"
9377 #include "confdefs.h"
9378
9379 #include <sys/types.h>
9380 #include <sys/signal.h>
9381
9382 int
9383 main (void)
9384 {
9385 int x = SIGWINCH
9386   ;
9387   return 0;
9388 }
9389 _ACEOF
9390 rm -f conftest.$ac_objext
9391 if { (eval echo "$as_me:9391: \"$ac_compile\"") >&5
9392   (eval $ac_compile) 2>&5
9393   ac_status=$?
9394   echo "$as_me:9394: \$? = $ac_status" >&5
9395   (exit $ac_status); } &&
9396          { ac_try='test -s conftest.$ac_objext'
9397   { (eval echo "$as_me:9397: \"$ac_try\"") >&5
9398   (eval $ac_try) 2>&5
9399   ac_status=$?
9400   echo "$as_me:9400: \$? = $ac_status" >&5
9401   (exit $ac_status); }; }; then
9402   cf_cv_define_sigwinch=yes
9403 else
9404   echo "$as_me: failed program was:" >&5
9405 cat conftest.$ac_ext >&5
9406 cat >conftest.$ac_ext <<_ACEOF
9407 #line 9407 "configure"
9408 #include "confdefs.h"
9409
9410 #undef _XOPEN_SOURCE
9411 #undef _POSIX_SOURCE
9412 #undef _POSIX_C_SOURCE
9413 #include <sys/types.h>
9414 #include <sys/signal.h>
9415
9416 int
9417 main (void)
9418 {
9419 int x = SIGWINCH
9420   ;
9421   return 0;
9422 }
9423 _ACEOF
9424 rm -f conftest.$ac_objext
9425 if { (eval echo "$as_me:9425: \"$ac_compile\"") >&5
9426   (eval $ac_compile) 2>&5
9427   ac_status=$?
9428   echo "$as_me:9428: \$? = $ac_status" >&5
9429   (exit $ac_status); } &&
9430          { ac_try='test -s conftest.$ac_objext'
9431   { (eval echo "$as_me:9431: \"$ac_try\"") >&5
9432   (eval $ac_try) 2>&5
9433   ac_status=$?
9434   echo "$as_me:9434: \$? = $ac_status" >&5
9435   (exit $ac_status); }; }; then
9436   cf_cv_define_sigwinch=maybe
9437 else
9438   echo "$as_me: failed program was:" >&5
9439 cat conftest.$ac_ext >&5
9440 cf_cv_define_sigwinch=no
9441 fi
9442 rm -f conftest.$ac_objext conftest.$ac_ext
9443
9444 fi
9445 rm -f conftest.$ac_objext conftest.$ac_ext
9446
9447 fi
9448 echo "$as_me:9448: result: $cf_cv_define_sigwinch" >&5
9449 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9450
9451 if test "$cf_cv_define_sigwinch" = maybe ; then
9452 echo "$as_me:9452: checking for actual SIGWINCH definition" >&5
9453 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9454 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9455   echo $ECHO_N "(cached) $ECHO_C" >&6
9456 else
9457
9458 cf_cv_fixup_sigwinch=unknown
9459 cf_sigwinch=32
9460 while test $cf_sigwinch != 1
9461 do
9462         cat >conftest.$ac_ext <<_ACEOF
9463 #line 9463 "configure"
9464 #include "confdefs.h"
9465
9466 #undef _XOPEN_SOURCE
9467 #undef _POSIX_SOURCE
9468 #undef _POSIX_C_SOURCE
9469 #include <sys/types.h>
9470 #include <sys/signal.h>
9471
9472 int
9473 main (void)
9474 {
9475
9476 #if SIGWINCH != $cf_sigwinch
9477 make an error
9478 #endif
9479 int x = SIGWINCH
9480   ;
9481   return 0;
9482 }
9483 _ACEOF
9484 rm -f conftest.$ac_objext
9485 if { (eval echo "$as_me:9485: \"$ac_compile\"") >&5
9486   (eval $ac_compile) 2>&5
9487   ac_status=$?
9488   echo "$as_me:9488: \$? = $ac_status" >&5
9489   (exit $ac_status); } &&
9490          { ac_try='test -s conftest.$ac_objext'
9491   { (eval echo "$as_me:9491: \"$ac_try\"") >&5
9492   (eval $ac_try) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); }; }; then
9496   cf_cv_fixup_sigwinch=$cf_sigwinch
9497          break
9498 else
9499   echo "$as_me: failed program was:" >&5
9500 cat conftest.$ac_ext >&5
9501 fi
9502 rm -f conftest.$ac_objext conftest.$ac_ext
9503
9504 cf_sigwinch=`expr $cf_sigwinch - 1`
9505 done
9506
9507 fi
9508 echo "$as_me:9508: result: $cf_cv_fixup_sigwinch" >&5
9509 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9510
9511         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9512                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9513         fi
9514 fi
9515
9516 # Checks for CODESET support.
9517
9518 echo "$as_me:9518: checking for nl_langinfo and CODESET" >&5
9519 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9520 if test "${am_cv_langinfo_codeset+set}" = set; then
9521   echo $ECHO_N "(cached) $ECHO_C" >&6
9522 else
9523   cat >conftest.$ac_ext <<_ACEOF
9524 #line 9524 "configure"
9525 #include "confdefs.h"
9526 #include <langinfo.h>
9527 int
9528 main (void)
9529 {
9530 char* cs = nl_langinfo(CODESET);
9531   ;
9532   return 0;
9533 }
9534 _ACEOF
9535 rm -f conftest.$ac_objext conftest$ac_exeext
9536 if { (eval echo "$as_me:9536: \"$ac_link\"") >&5
9537   (eval $ac_link) 2>&5
9538   ac_status=$?
9539   echo "$as_me:9539: \$? = $ac_status" >&5
9540   (exit $ac_status); } &&
9541          { ac_try='test -s conftest$ac_exeext'
9542   { (eval echo "$as_me:9542: \"$ac_try\"") >&5
9543   (eval $ac_try) 2>&5
9544   ac_status=$?
9545   echo "$as_me:9545: \$? = $ac_status" >&5
9546   (exit $ac_status); }; }; then
9547   am_cv_langinfo_codeset=yes
9548 else
9549   echo "$as_me: failed program was:" >&5
9550 cat conftest.$ac_ext >&5
9551 am_cv_langinfo_codeset=no
9552 fi
9553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9554
9555 fi
9556 echo "$as_me:9556: result: $am_cv_langinfo_codeset" >&5
9557 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9558         if test $am_cv_langinfo_codeset = yes; then
9559
9560 cat >>confdefs.h <<\EOF
9561 #define HAVE_LANGINFO_CODESET 1
9562 EOF
9563
9564         fi
9565
9566 # use these variables to work around a defect in gcc's fixincludes.
9567 NCURSES_OK_WCHAR_T=
9568 NCURSES_OK_WINT_T=
9569
9570 echo "$as_me:9570: checking if you want wide-character code" >&5
9571 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9572
9573 # Check whether --enable-widec or --disable-widec was given.
9574 if test "${enable_widec+set}" = set; then
9575   enableval="$enable_widec"
9576   with_widec=$enableval
9577 else
9578   with_widec=no
9579 fi;
9580 echo "$as_me:9580: result: $with_widec" >&5
9581 echo "${ECHO_T}$with_widec" >&6
9582
9583 NCURSES_WCWIDTH_GRAPHICS=1
9584
9585 if test "x$with_widec" = xyes ; then
9586         if test "x$disable_lib_suffixes" = xno ; then
9587                 LIB_SUFFIX="w${LIB_SUFFIX}"
9588         fi
9589
9590 cat >>confdefs.h <<\EOF
9591 #define USE_WIDEC_SUPPORT 1
9592 EOF
9593
9594 cat >>confdefs.h <<\EOF
9595 #define NCURSES_WIDECHAR 1
9596 EOF
9597
9598 for ac_header in \
9599 wchar.h \
9600 wctype.h \
9601
9602 do
9603 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9604 echo "$as_me:9604: checking for $ac_header" >&5
9605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9607   echo $ECHO_N "(cached) $ECHO_C" >&6
9608 else
9609   cat >conftest.$ac_ext <<_ACEOF
9610 #line 9610 "configure"
9611 #include "confdefs.h"
9612 #include <$ac_header>
9613 _ACEOF
9614 if { (eval echo "$as_me:9614: \"$ac_cpp conftest.$ac_ext\"") >&5
9615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9616   ac_status=$?
9617   egrep -v '^ *\+' conftest.er1 >conftest.err
9618   rm -f conftest.er1
9619   cat conftest.err >&5
9620   echo "$as_me:9620: \$? = $ac_status" >&5
9621   (exit $ac_status); } >/dev/null; then
9622   if test -s conftest.err; then
9623     ac_cpp_err=$ac_c_preproc_warn_flag
9624   else
9625     ac_cpp_err=
9626   fi
9627 else
9628   ac_cpp_err=yes
9629 fi
9630 if test -z "$ac_cpp_err"; then
9631   eval "$as_ac_Header=yes"
9632 else
9633   echo "$as_me: failed program was:" >&5
9634   cat conftest.$ac_ext >&5
9635   eval "$as_ac_Header=no"
9636 fi
9637 rm -f conftest.err conftest.$ac_ext
9638 fi
9639 echo "$as_me:9639: result: `eval echo '${'$as_ac_Header'}'`" >&5
9640 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9641 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9642   cat >>confdefs.h <<EOF
9643 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9644 EOF
9645
9646 fi
9647 done
9648
9649 echo "$as_me:9649: checking if wchar.h can be used as is" >&5
9650 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9651 if test "${cf_cv_wchar_h_okay+set}" = set; then
9652   echo $ECHO_N "(cached) $ECHO_C" >&6
9653 else
9654
9655 cat >conftest.$ac_ext <<_ACEOF
9656 #line 9656 "configure"
9657 #include "confdefs.h"
9658
9659 #include <stdlib.h>
9660 #ifdef HAVE_WCHAR_H
9661 #include <wchar.h>
9662 #endif
9663 #ifdef HAVE_WCTYPE_H
9664 #include <wctype.h>
9665 #endif
9666
9667 int
9668 main (void)
9669 {
9670
9671         wint_t foo = 0;
9672         int bar = iswpunct(foo)
9673   ;
9674   return 0;
9675 }
9676 _ACEOF
9677 rm -f conftest.$ac_objext
9678 if { (eval echo "$as_me:9678: \"$ac_compile\"") >&5
9679   (eval $ac_compile) 2>&5
9680   ac_status=$?
9681   echo "$as_me:9681: \$? = $ac_status" >&5
9682   (exit $ac_status); } &&
9683          { ac_try='test -s conftest.$ac_objext'
9684   { (eval echo "$as_me:9684: \"$ac_try\"") >&5
9685   (eval $ac_try) 2>&5
9686   ac_status=$?
9687   echo "$as_me:9687: \$? = $ac_status" >&5
9688   (exit $ac_status); }; }; then
9689   cf_cv_wchar_h_okay=yes
9690 else
9691   echo "$as_me: failed program was:" >&5
9692 cat conftest.$ac_ext >&5
9693 cf_cv_wchar_h_okay=no
9694 fi
9695 rm -f conftest.$ac_objext conftest.$ac_ext
9696 fi
9697 echo "$as_me:9697: result: $cf_cv_wchar_h_okay" >&5
9698 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9699
9700 if test $cf_cv_wchar_h_okay = no
9701 then
9702
9703 echo "$as_me:9703: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9704 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9705 cat >conftest.$ac_ext <<_ACEOF
9706 #line 9706 "configure"
9707 #include "confdefs.h"
9708 #include <sys/types.h>
9709
9710 int
9711 main (void)
9712 {
9713
9714 #ifndef _XOPEN_SOURCE_EXTENDED
9715 make an error
9716 #endif
9717   ;
9718   return 0;
9719 }
9720 _ACEOF
9721 rm -f conftest.$ac_objext
9722 if { (eval echo "$as_me:9722: \"$ac_compile\"") >&5
9723   (eval $ac_compile) 2>&5
9724   ac_status=$?
9725   echo "$as_me:9725: \$? = $ac_status" >&5
9726   (exit $ac_status); } &&
9727          { ac_try='test -s conftest.$ac_objext'
9728   { (eval echo "$as_me:9728: \"$ac_try\"") >&5
9729   (eval $ac_try) 2>&5
9730   ac_status=$?
9731   echo "$as_me:9731: \$? = $ac_status" >&5
9732   (exit $ac_status); }; }; then
9733   cf_result=no
9734 else
9735   echo "$as_me: failed program was:" >&5
9736 cat conftest.$ac_ext >&5
9737 cf_result=yes
9738 fi
9739 rm -f conftest.$ac_objext conftest.$ac_ext
9740 echo "$as_me:9740: result: $cf_result" >&5
9741 echo "${ECHO_T}$cf_result" >&6
9742
9743 if test "$cf_result" = yes ; then
9744         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9745 elif test "x" != "x" ; then
9746         echo "$as_me:9746: checking checking for compatible value versus " >&5
9747 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9748         cat >conftest.$ac_ext <<_ACEOF
9749 #line 9749 "configure"
9750 #include "confdefs.h"
9751 #include <sys/types.h>
9752
9753 int
9754 main (void)
9755 {
9756
9757 #if _XOPEN_SOURCE_EXTENDED- < 0
9758 make an error
9759 #endif
9760   ;
9761   return 0;
9762 }
9763 _ACEOF
9764 rm -f conftest.$ac_objext
9765 if { (eval echo "$as_me:9765: \"$ac_compile\"") >&5
9766   (eval $ac_compile) 2>&5
9767   ac_status=$?
9768   echo "$as_me:9768: \$? = $ac_status" >&5
9769   (exit $ac_status); } &&
9770          { ac_try='test -s conftest.$ac_objext'
9771   { (eval echo "$as_me:9771: \"$ac_try\"") >&5
9772   (eval $ac_try) 2>&5
9773   ac_status=$?
9774   echo "$as_me:9774: \$? = $ac_status" >&5
9775   (exit $ac_status); }; }; then
9776   cf_result=yes
9777 else
9778   echo "$as_me: failed program was:" >&5
9779 cat conftest.$ac_ext >&5
9780 cf_result=no
9781 fi
9782 rm -f conftest.$ac_objext conftest.$ac_ext
9783         echo "$as_me:9783: result: $cf_result" >&5
9784 echo "${ECHO_T}$cf_result" >&6
9785         if test "$cf_result" = no ; then
9786                 # perhaps we can override it - try...
9787                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9788         fi
9789 fi
9790
9791 fi
9792
9793 echo "$as_me:9793: checking if wcwidth agrees graphics are single-width" >&5
9794 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9795 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9796   echo $ECHO_N "(cached) $ECHO_C" >&6
9797 else
9798
9799 cat >conftest.in <<CF_EOF
9800 -       VT100 symbols
9801 0x250c  upper left corner
9802 0x2514  lower left corner
9803 0x2510  upper right corner
9804 0x2518  lower right corner
9805 0x251c  tee pointing left
9806 0x2524  tee pointing right
9807 0x2534  tee pointing up
9808 0x252c  tee pointing down
9809 0x2500  horizontal line
9810 0x2502  vertical line
9811 0x253c  large plus or crossover
9812 0x23ba  scan line 1
9813 0x23bd  scan line 9
9814 0x25c6  diamond
9815 0x2592  checker board (stipple)
9816 0x00b0  degree symbol
9817 0x00b1  plus/minus
9818 0x00b7  bullet
9819 -       Teletype 5410v1 symbols
9820 0x2190  arrow pointing left
9821 0x2192  arrow pointing right
9822 0x2193  arrow pointing down
9823 0x2191  arrow pointing up
9824 0x2592  board of squares
9825 0x2603  lantern symbol
9826 0x25ae  solid square block
9827 -       these defaults were invented for ncurses
9828 0x23bb  scan line 3
9829 0x23bc  scan line 7
9830 0x2264  less-than-or-equal-to
9831 0x2265  greater-than-or-equal-to
9832 0x03c0  greek pi
9833 0x2260  not-equal
9834 0x00a3  pound-sterling symbol
9835 -       thick-line-drawing
9836 0x250f  upper left corner
9837 0x2517  lower left corner
9838 0x2513  upper right corner
9839 0x251b  lower right corner
9840 0x2523  tee pointing left
9841 0x252b  tee pointing right
9842 0x253b  tee pointing up
9843 0x2533  tee pointing down
9844 0x2501  horizontal line
9845 0x2503  vertical line
9846 0x254b  large plus or crossover
9847 -       double-line-drawing
9848 0x2554  upper left corner
9849 0x255a  lower left corner
9850 0x2557  upper right corner
9851 0x255d  lower right corner
9852 0x2563  tee pointing left
9853 0x2560  tee pointing right
9854 0x2569  tee pointing up
9855 0x2566  tee pointing down
9856 0x2550  horizontal line
9857 0x2551  vertical line
9858 0x256c  large plus or crossover
9859 CF_EOF
9860 if test "$cross_compiling" = yes; then
9861   cf_cv_wcwidth_graphics=unknown
9862 else
9863   cat >conftest.$ac_ext <<_ACEOF
9864 #line 9864 "configure"
9865 #include "confdefs.h"
9866
9867 #include <locale.h>
9868 #include <stdio.h>
9869 #include <wchar.h>
9870
9871 #define MY_LEN 80
9872
9873 int
9874 main(void)
9875 {
9876         FILE *fp;
9877         int value;
9878         char buffer[MY_LEN + 1];
9879         char notes[MY_LEN + 1];
9880         int totals = 0;
9881         int passed = 0;
9882
9883         if (setlocale(LC_ALL, "en_US.UTF8") ||
9884                 setlocale(LC_ALL, "en_US.UTF-8") ||
9885                 setlocale(LC_ALL, "en_US.utf8") ||
9886                 setlocale(LC_ALL, "en_US.utf-8")) {
9887                 if ((fp = fopen("conftest.in", "r")) != 0) {
9888                         while (fgets(buffer, MY_LEN, fp) != 0) {
9889                                 if (*buffer == '-') {
9890                                         fprintf(stderr, "\t%s", buffer);
9891                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9892                                         ++totals;
9893                                         if (wcwidth(value) == 1)
9894                                                 ++passed;
9895                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9896                                 } else {
9897                                         fprintf(stderr, "?\t%s", buffer);
9898                                 }
9899                         }
9900                 }
9901         }
9902         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9903         return (totals == passed) ? 0 : 1;
9904 }
9905
9906 _ACEOF
9907 rm -f conftest$ac_exeext
9908 if { (eval echo "$as_me:9908: \"$ac_link\"") >&5
9909   (eval $ac_link) 2>&5
9910   ac_status=$?
9911   echo "$as_me:9911: \$? = $ac_status" >&5
9912   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9913   { (eval echo "$as_me:9913: \"$ac_try\"") >&5
9914   (eval $ac_try) 2>&5
9915   ac_status=$?
9916   echo "$as_me:9916: \$? = $ac_status" >&5
9917   (exit $ac_status); }; }; then
9918   cf_cv_wcwidth_graphics=yes
9919 else
9920   echo "$as_me: program exited with status $ac_status" >&5
9921 echo "$as_me: failed program was:" >&5
9922 cat conftest.$ac_ext >&5
9923 cf_cv_wcwidth_graphics=no
9924 fi
9925 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9926 fi
9927
9928 fi
9929 echo "$as_me:9929: result: $cf_cv_wcwidth_graphics" >&5
9930 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9931
9932         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9933
9934         # with_overwrite=no
9935         NCURSES_CH_T=cchar_t
9936
9937 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9938 do
9939 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9940 echo "$as_me:9940: checking for $ac_func" >&5
9941 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9942 if eval "test \"\${$as_ac_var+set}\" = set"; then
9943   echo $ECHO_N "(cached) $ECHO_C" >&6
9944 else
9945   cat >conftest.$ac_ext <<_ACEOF
9946 #line 9946 "configure"
9947 #include "confdefs.h"
9948 /* System header to define __stub macros and hopefully few prototypes,
9949     which can conflict with char $ac_func (); below.  */
9950 #include <assert.h>
9951 /* Override any gcc2 internal prototype to avoid an error.  */
9952 #ifdef __cplusplus
9953 extern "C"
9954 #endif
9955 /* We use char because int might match the return type of a gcc2
9956    builtin and then its argument prototype would still apply.  */
9957 char $ac_func ();
9958 char (*f) ();
9959
9960 int
9961 main (void)
9962 {
9963 /* The GNU C library defines this for functions which it implements
9964     to always fail with ENOSYS.  Some functions are actually named
9965     something starting with __ and the normal name is an alias.  */
9966 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9967 choke me
9968 #else
9969 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9970 #endif
9971
9972   ;
9973   return 0;
9974 }
9975 _ACEOF
9976 rm -f conftest.$ac_objext conftest$ac_exeext
9977 if { (eval echo "$as_me:9977: \"$ac_link\"") >&5
9978   (eval $ac_link) 2>&5
9979   ac_status=$?
9980   echo "$as_me:9980: \$? = $ac_status" >&5
9981   (exit $ac_status); } &&
9982          { ac_try='test -s conftest$ac_exeext'
9983   { (eval echo "$as_me:9983: \"$ac_try\"") >&5
9984   (eval $ac_try) 2>&5
9985   ac_status=$?
9986   echo "$as_me:9986: \$? = $ac_status" >&5
9987   (exit $ac_status); }; }; then
9988   eval "$as_ac_var=yes"
9989 else
9990   echo "$as_me: failed program was:" >&5
9991 cat conftest.$ac_ext >&5
9992 eval "$as_ac_var=no"
9993 fi
9994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9995 fi
9996 echo "$as_me:9996: result: `eval echo '${'$as_ac_var'}'`" >&5
9997 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9998 if test `eval echo '${'$as_ac_var'}'` = yes; then
9999   cat >>confdefs.h <<EOF
10000 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10001 EOF
10002
10003 fi
10004 done
10005
10006         if test "x$ac_cv_func_putwc" != xyes ; then
10007
10008 echo "$as_me:10008: checking for multibyte character support" >&5
10009 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10010 if test "${cf_cv_utf8_lib+set}" = set; then
10011   echo $ECHO_N "(cached) $ECHO_C" >&6
10012 else
10013
10014         cf_save_LIBS="$LIBS"
10015         cat >conftest.$ac_ext <<_ACEOF
10016 #line 10016 "configure"
10017 #include "confdefs.h"
10018
10019 #include <stdlib.h>
10020 int
10021 main (void)
10022 {
10023 putwc(0,0);
10024   ;
10025   return 0;
10026 }
10027 _ACEOF
10028 rm -f conftest.$ac_objext conftest$ac_exeext
10029 if { (eval echo "$as_me:10029: \"$ac_link\"") >&5
10030   (eval $ac_link) 2>&5
10031   ac_status=$?
10032   echo "$as_me:10032: \$? = $ac_status" >&5
10033   (exit $ac_status); } &&
10034          { ac_try='test -s conftest$ac_exeext'
10035   { (eval echo "$as_me:10035: \"$ac_try\"") >&5
10036   (eval $ac_try) 2>&5
10037   ac_status=$?
10038   echo "$as_me:10038: \$? = $ac_status" >&5
10039   (exit $ac_status); }; }; then
10040   cf_cv_utf8_lib=yes
10041 else
10042   echo "$as_me: failed program was:" >&5
10043 cat conftest.$ac_ext >&5
10044
10045 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10046 # will be set on completion of the AC_TRY_LINK below.
10047 cf_cv_header_path_utf8=
10048 cf_cv_library_path_utf8=
10049
10050 echo "${as_me:-configure}:10050: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10051
10052 cf_save_LIBS="$LIBS"
10053
10054 cat >conftest.$ac_ext <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10057
10058 #include <libutf8.h>
10059 int
10060 main (void)
10061 {
10062 putwc(0,0);
10063   ;
10064   return 0;
10065 }
10066 _ACEOF
10067 rm -f conftest.$ac_objext conftest$ac_exeext
10068 if { (eval echo "$as_me:10068: \"$ac_link\"") >&5
10069   (eval $ac_link) 2>&5
10070   ac_status=$?
10071   echo "$as_me:10071: \$? = $ac_status" >&5
10072   (exit $ac_status); } &&
10073          { ac_try='test -s conftest$ac_exeext'
10074   { (eval echo "$as_me:10074: \"$ac_try\"") >&5
10075   (eval $ac_try) 2>&5
10076   ac_status=$?
10077   echo "$as_me:10077: \$? = $ac_status" >&5
10078   (exit $ac_status); }; }; then
10079
10080         cf_cv_find_linkage_utf8=yes
10081         cf_cv_header_path_utf8=/usr/include
10082         cf_cv_library_path_utf8=/usr/lib
10083
10084 else
10085   echo "$as_me: failed program was:" >&5
10086 cat conftest.$ac_ext >&5
10087
10088 LIBS="-lutf8  $cf_save_LIBS"
10089
10090 cat >conftest.$ac_ext <<_ACEOF
10091 #line 10091 "configure"
10092 #include "confdefs.h"
10093
10094 #include <libutf8.h>
10095 int
10096 main (void)
10097 {
10098 putwc(0,0);
10099   ;
10100   return 0;
10101 }
10102 _ACEOF
10103 rm -f conftest.$ac_objext conftest$ac_exeext
10104 if { (eval echo "$as_me:10104: \"$ac_link\"") >&5
10105   (eval $ac_link) 2>&5
10106   ac_status=$?
10107   echo "$as_me:10107: \$? = $ac_status" >&5
10108   (exit $ac_status); } &&
10109          { ac_try='test -s conftest$ac_exeext'
10110   { (eval echo "$as_me:10110: \"$ac_try\"") >&5
10111   (eval $ac_try) 2>&5
10112   ac_status=$?
10113   echo "$as_me:10113: \$? = $ac_status" >&5
10114   (exit $ac_status); }; }; then
10115
10116         cf_cv_find_linkage_utf8=yes
10117         cf_cv_header_path_utf8=/usr/include
10118         cf_cv_library_path_utf8=/usr/lib
10119         cf_cv_library_file_utf8="-lutf8"
10120
10121 else
10122   echo "$as_me: failed program was:" >&5
10123 cat conftest.$ac_ext >&5
10124
10125         cf_cv_find_linkage_utf8=no
10126         LIBS="$cf_save_LIBS"
10127
10128         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10129
10130 echo "${as_me:-configure}:10130: testing find linkage for utf8 library ..." 1>&5
10131
10132 echo "${as_me:-configure}:10132: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10133
10134         cf_save_CPPFLAGS="$CPPFLAGS"
10135         cf_test_CPPFLAGS="$CPPFLAGS"
10136
10137 cf_search=
10138
10139 # collect the current set of include-directories from compiler flags
10140 cf_header_path_list=""
10141 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10142         for cf_header_path in $CPPFLAGS $CFLAGS
10143         do
10144                 case $cf_header_path in
10145                 (-I*)
10146                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10147
10148 test "x$cf_header_path" != "xNONE" && \
10149 test -d "$cf_header_path" && \
10150  {
10151         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10152         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10153         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10154         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10155         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10156         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10157 }
10158
10159                         cf_header_path_list="$cf_header_path_list $cf_search"
10160                         ;;
10161                 esac
10162         done
10163 fi
10164
10165 # add the variations for the package we are looking for
10166
10167 cf_search=
10168
10169 test "x$prefix" != "xNONE" && \
10170 test -d "$prefix" && \
10171  {
10172         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10173         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10174         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10175         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10176         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10177         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10178 }
10179
10180 for cf_subdir_prefix in \
10181         /usr \
10182         /usr/local \
10183         /usr/pkg \
10184         /opt \
10185         /opt/local \
10186         $HOME
10187 do
10188
10189 test "x$cf_subdir_prefix" != "x$prefix" && \
10190 test -d "$cf_subdir_prefix" && \
10191 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10192         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10193         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10194         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10195         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10196         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10197         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10198 }
10199
10200 done
10201
10202 test "$includedir" != NONE && \
10203 test "$includedir" != "/usr/include" && \
10204 test -d "$includedir" && {
10205         test -d $includedir &&    cf_search="$cf_search $includedir"
10206         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10207 }
10208
10209 test "$oldincludedir" != NONE && \
10210 test "$oldincludedir" != "/usr/include" && \
10211 test -d "$oldincludedir" && {
10212         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10213         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10214 }
10215
10216 cf_search="$cf_search $cf_header_path_list"
10217
10218         for cf_cv_header_path_utf8 in $cf_search
10219         do
10220                 if test -d $cf_cv_header_path_utf8 ; then
10221                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10222
10223 echo "${as_me:-configure}:10223: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10224
10225                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10226                         cat >conftest.$ac_ext <<_ACEOF
10227 #line 10227 "configure"
10228 #include "confdefs.h"
10229
10230 #include <libutf8.h>
10231 int
10232 main (void)
10233 {
10234 putwc(0,0);
10235   ;
10236   return 0;
10237 }
10238 _ACEOF
10239 rm -f conftest.$ac_objext
10240 if { (eval echo "$as_me:10240: \"$ac_compile\"") >&5
10241   (eval $ac_compile) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit $ac_status); } &&
10245          { ac_try='test -s conftest.$ac_objext'
10246   { (eval echo "$as_me:10246: \"$ac_try\"") >&5
10247   (eval $ac_try) 2>&5
10248   ac_status=$?
10249   echo "$as_me:10249: \$? = $ac_status" >&5
10250   (exit $ac_status); }; }; then
10251
10252                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10253
10254 echo "${as_me:-configure}:10254: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10255
10256                                 cf_cv_find_linkage_utf8=maybe
10257                                 cf_test_CPPFLAGS="$CPPFLAGS"
10258                                 break
10259 else
10260   echo "$as_me: failed program was:" >&5
10261 cat conftest.$ac_ext >&5
10262
10263                                 CPPFLAGS="$cf_save_CPPFLAGS"
10264
10265 fi
10266 rm -f conftest.$ac_objext conftest.$ac_ext
10267                 fi
10268         done
10269
10270         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10271
10272 echo "${as_me:-configure}:10272: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10273
10274                 cf_save_LIBS="$LIBS"
10275                 cf_save_LDFLAGS="$LDFLAGS"
10276
10277                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10278
10279 cf_search=
10280 cf_library_path_list=""
10281 if test -n "${LDFLAGS}${LIBS}" ; then
10282         for cf_library_path in $LDFLAGS $LIBS
10283         do
10284                 case $cf_library_path in
10285                 (-L*)
10286                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10287
10288 test "x$cf_library_path" != "xNONE" && \
10289 test -d "$cf_library_path" && \
10290  {
10291         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10292         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10293         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10294         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10295         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10296         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10297 }
10298
10299                         cf_library_path_list="$cf_library_path_list $cf_search"
10300                         ;;
10301                 esac
10302         done
10303 fi
10304
10305 cf_search=
10306
10307 test "x$prefix" != "xNONE" && \
10308 test -d "$prefix" && \
10309  {
10310         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10311         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10312         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10313         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10314         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10315         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10316 }
10317
10318 for cf_subdir_prefix in \
10319         /usr \
10320         /usr/local \
10321         /usr/pkg \
10322         /opt \
10323         /opt/local \
10324         $HOME
10325 do
10326
10327 test "x$cf_subdir_prefix" != "x$prefix" && \
10328 test -d "$cf_subdir_prefix" && \
10329 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10330         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10331         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10332         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10333         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10334         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10335         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10336 }
10337
10338 done
10339
10340 cf_search="$cf_library_path_list $cf_search"
10341
10342                         for cf_cv_library_path_utf8 in $cf_search
10343                         do
10344                                 if test -d $cf_cv_library_path_utf8 ; then
10345                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10346
10347 echo "${as_me:-configure}:10347: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10348
10349                                         CPPFLAGS="$cf_test_CPPFLAGS"
10350                                         LIBS="-lutf8  $cf_save_LIBS"
10351                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10352                                         cat >conftest.$ac_ext <<_ACEOF
10353 #line 10353 "configure"
10354 #include "confdefs.h"
10355
10356 #include <libutf8.h>
10357 int
10358 main (void)
10359 {
10360 putwc(0,0);
10361   ;
10362   return 0;
10363 }
10364 _ACEOF
10365 rm -f conftest.$ac_objext conftest$ac_exeext
10366 if { (eval echo "$as_me:10366: \"$ac_link\"") >&5
10367   (eval $ac_link) 2>&5
10368   ac_status=$?
10369   echo "$as_me:10369: \$? = $ac_status" >&5
10370   (exit $ac_status); } &&
10371          { ac_try='test -s conftest$ac_exeext'
10372   { (eval echo "$as_me:10372: \"$ac_try\"") >&5
10373   (eval $ac_try) 2>&5
10374   ac_status=$?
10375   echo "$as_me:10375: \$? = $ac_status" >&5
10376   (exit $ac_status); }; }; then
10377
10378                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10379
10380 echo "${as_me:-configure}:10380: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10381
10382                                         cf_cv_find_linkage_utf8=yes
10383                                         cf_cv_library_file_utf8="-lutf8"
10384                                         break
10385 else
10386   echo "$as_me: failed program was:" >&5
10387 cat conftest.$ac_ext >&5
10388
10389                                         CPPFLAGS="$cf_save_CPPFLAGS"
10390                                         LIBS="$cf_save_LIBS"
10391                                         LDFLAGS="$cf_save_LDFLAGS"
10392
10393 fi
10394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10395                                 fi
10396                         done
10397                         CPPFLAGS="$cf_save_CPPFLAGS"
10398                         LDFLAGS="$cf_save_LDFLAGS"
10399                 fi
10400
10401         else
10402                 cf_cv_find_linkage_utf8=no
10403         fi
10404
10405 fi
10406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10407
10408 fi
10409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10410
10411 LIBS="$cf_save_LIBS"
10412
10413 if test "$cf_cv_find_linkage_utf8" = yes ; then
10414 cf_cv_utf8_lib=add-on
10415 else
10416 cf_cv_utf8_lib=no
10417 fi
10418
10419 fi
10420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10421 fi
10422 echo "$as_me:10422: result: $cf_cv_utf8_lib" >&5
10423 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10424
10425 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10426 # ncurses/ncursesw:
10427 if test "$cf_cv_utf8_lib" = "add-on" ; then
10428
10429 cat >>confdefs.h <<\EOF
10430 #define HAVE_LIBUTF8_H 1
10431 EOF
10432
10433 if test -n "$cf_cv_header_path_utf8" ; then
10434   for cf_add_incdir in $cf_cv_header_path_utf8
10435   do
10436         while test $cf_add_incdir != /usr/include
10437         do
10438           if test -d $cf_add_incdir
10439           then
10440                 cf_have_incdir=no
10441                 if test -n "$CFLAGS$CPPFLAGS" ; then
10442                   # a loop is needed to ensure we can add subdirs of existing dirs
10443                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10444                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10445                           cf_have_incdir=yes; break
10446                         fi
10447                   done
10448                 fi
10449
10450                 if test "$cf_have_incdir" = no ; then
10451                   if test "$cf_add_incdir" = /usr/local/include ; then
10452                         if test "$GCC" = yes
10453                         then
10454                           cf_save_CPPFLAGS=$CPPFLAGS
10455                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10456                           cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459 #include <stdio.h>
10460 int
10461 main (void)
10462 {
10463 printf("Hello")
10464   ;
10465   return 0;
10466 }
10467 _ACEOF
10468 rm -f conftest.$ac_objext
10469 if { (eval echo "$as_me:10469: \"$ac_compile\"") >&5
10470   (eval $ac_compile) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit $ac_status); } &&
10474          { ac_try='test -s conftest.$ac_objext'
10475   { (eval echo "$as_me:10475: \"$ac_try\"") >&5
10476   (eval $ac_try) 2>&5
10477   ac_status=$?
10478   echo "$as_me:10478: \$? = $ac_status" >&5
10479   (exit $ac_status); }; }; then
10480   :
10481 else
10482   echo "$as_me: failed program was:" >&5
10483 cat conftest.$ac_ext >&5
10484 cf_have_incdir=yes
10485 fi
10486 rm -f conftest.$ac_objext conftest.$ac_ext
10487                           CPPFLAGS=$cf_save_CPPFLAGS
10488                         fi
10489                   fi
10490                 fi
10491
10492                 if test "$cf_have_incdir" = no ; then
10493                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10494
10495 echo "${as_me:-configure}:10495: testing adding $cf_add_incdir to include-path ..." 1>&5
10496
10497                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10498
10499                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10500                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10501                   cf_add_incdir="$cf_top_incdir"
10502                 else
10503                   break
10504                 fi
10505           else
10506                 break
10507           fi
10508         done
10509   done
10510 fi
10511
10512 if test -n "$cf_cv_library_path_utf8" ; then
10513         for cf_add_libdir in $cf_cv_library_path_utf8
10514         do
10515                 if test $cf_add_libdir = /usr/lib ; then
10516                         :
10517                 elif test -d $cf_add_libdir
10518                 then
10519                         cf_have_libdir=no
10520                         if test -n "$LDFLAGS$LIBS" ; then
10521                                 # a loop is needed to ensure we can add subdirs of existing dirs
10522                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10523                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10524                                                 cf_have_libdir=yes; break
10525                                         fi
10526                                 done
10527                         fi
10528                         if test "$cf_have_libdir" = no ; then
10529                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10530
10531 echo "${as_me:-configure}:10531: testing adding $cf_add_libdir to library-path ..." 1>&5
10532
10533                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10534                         fi
10535                 fi
10536         done
10537 fi
10538
10539 cf_add_libs="$cf_cv_library_file_utf8"
10540 # Filter out duplicates - this happens with badly-designed ".pc" files...
10541 for cf_add_1lib in $LIBS
10542 do
10543         for cf_add_2lib in $cf_add_libs
10544         do
10545                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10546                 then
10547                         cf_add_1lib=
10548                         break
10549                 fi
10550         done
10551         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10552 done
10553 LIBS="$cf_add_libs"
10554
10555 fi
10556
10557                 if test "$cf_cv_utf8_lib" != no ; then
10558                         NCURSES_LIBUTF8=1
10559                 fi
10560         fi
10561
10562 # This is needed on Tru64 5.0 to declare mbstate_t
10563 echo "$as_me:10563: checking if we must include wchar.h to declare mbstate_t" >&5
10564 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10565 if test "${cf_cv_mbstate_t+set}" = set; then
10566   echo $ECHO_N "(cached) $ECHO_C" >&6
10567 else
10568
10569 cat >conftest.$ac_ext <<_ACEOF
10570 #line 10570 "configure"
10571 #include "confdefs.h"
10572
10573 #include <stdlib.h>
10574 #include <stdarg.h>
10575 #include <stdio.h>
10576 #ifdef HAVE_LIBUTF8_H
10577 #include <libutf8.h>
10578 #endif
10579 int
10580 main (void)
10581 {
10582 mbstate_t state
10583   ;
10584   return 0;
10585 }
10586 _ACEOF
10587 rm -f conftest.$ac_objext
10588 if { (eval echo "$as_me:10588: \"$ac_compile\"") >&5
10589   (eval $ac_compile) 2>&5
10590   ac_status=$?
10591   echo "$as_me:10591: \$? = $ac_status" >&5
10592   (exit $ac_status); } &&
10593          { ac_try='test -s conftest.$ac_objext'
10594   { (eval echo "$as_me:10594: \"$ac_try\"") >&5
10595   (eval $ac_try) 2>&5
10596   ac_status=$?
10597   echo "$as_me:10597: \$? = $ac_status" >&5
10598   (exit $ac_status); }; }; then
10599   cf_cv_mbstate_t=no
10600 else
10601   echo "$as_me: failed program was:" >&5
10602 cat conftest.$ac_ext >&5
10603 cat >conftest.$ac_ext <<_ACEOF
10604 #line 10604 "configure"
10605 #include "confdefs.h"
10606
10607 #include <stdlib.h>
10608 #include <stdarg.h>
10609 #include <stdio.h>
10610 #include <wchar.h>
10611 #ifdef HAVE_LIBUTF8_H
10612 #include <libutf8.h>
10613 #endif
10614 int
10615 main (void)
10616 {
10617 mbstate_t value
10618   ;
10619   return 0;
10620 }
10621 _ACEOF
10622 rm -f conftest.$ac_objext
10623 if { (eval echo "$as_me:10623: \"$ac_compile\"") >&5
10624   (eval $ac_compile) 2>&5
10625   ac_status=$?
10626   echo "$as_me:10626: \$? = $ac_status" >&5
10627   (exit $ac_status); } &&
10628          { ac_try='test -s conftest.$ac_objext'
10629   { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630   (eval $ac_try) 2>&5
10631   ac_status=$?
10632   echo "$as_me:10632: \$? = $ac_status" >&5
10633   (exit $ac_status); }; }; then
10634   cf_cv_mbstate_t=yes
10635 else
10636   echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 cf_cv_mbstate_t=unknown
10639 fi
10640 rm -f conftest.$ac_objext conftest.$ac_ext
10641 fi
10642 rm -f conftest.$ac_objext conftest.$ac_ext
10643 fi
10644 echo "$as_me:10644: result: $cf_cv_mbstate_t" >&5
10645 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10646
10647 if test "$cf_cv_mbstate_t" = yes ; then
10648
10649 cat >>confdefs.h <<\EOF
10650 #define NEED_WCHAR_H 1
10651 EOF
10652
10653         NEED_WCHAR_H=1
10654 fi
10655
10656 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10657 if test "$cf_cv_mbstate_t" = unknown ; then
10658         NCURSES_MBSTATE_T=1
10659 fi
10660
10661 # This is needed on Tru64 5.0 to declare wchar_t
10662 echo "$as_me:10662: checking if we must include wchar.h to declare wchar_t" >&5
10663 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10664 if test "${cf_cv_wchar_t+set}" = set; then
10665   echo $ECHO_N "(cached) $ECHO_C" >&6
10666 else
10667
10668 cat >conftest.$ac_ext <<_ACEOF
10669 #line 10669 "configure"
10670 #include "confdefs.h"
10671
10672 #include <stdlib.h>
10673 #include <stdarg.h>
10674 #include <stdio.h>
10675 #ifdef HAVE_LIBUTF8_H
10676 #include <libutf8.h>
10677 #endif
10678 int
10679 main (void)
10680 {
10681 wchar_t state
10682   ;
10683   return 0;
10684 }
10685 _ACEOF
10686 rm -f conftest.$ac_objext
10687 if { (eval echo "$as_me:10687: \"$ac_compile\"") >&5
10688   (eval $ac_compile) 2>&5
10689   ac_status=$?
10690   echo "$as_me:10690: \$? = $ac_status" >&5
10691   (exit $ac_status); } &&
10692          { ac_try='test -s conftest.$ac_objext'
10693   { (eval echo "$as_me:10693: \"$ac_try\"") >&5
10694   (eval $ac_try) 2>&5
10695   ac_status=$?
10696   echo "$as_me:10696: \$? = $ac_status" >&5
10697   (exit $ac_status); }; }; then
10698   cf_cv_wchar_t=no
10699 else
10700   echo "$as_me: failed program was:" >&5
10701 cat conftest.$ac_ext >&5
10702 cat >conftest.$ac_ext <<_ACEOF
10703 #line 10703 "configure"
10704 #include "confdefs.h"
10705
10706 #include <stdlib.h>
10707 #include <stdarg.h>
10708 #include <stdio.h>
10709 #include <wchar.h>
10710 #ifdef HAVE_LIBUTF8_H
10711 #include <libutf8.h>
10712 #endif
10713 int
10714 main (void)
10715 {
10716 wchar_t value
10717   ;
10718   return 0;
10719 }
10720 _ACEOF
10721 rm -f conftest.$ac_objext
10722 if { (eval echo "$as_me:10722: \"$ac_compile\"") >&5
10723   (eval $ac_compile) 2>&5
10724   ac_status=$?
10725   echo "$as_me:10725: \$? = $ac_status" >&5
10726   (exit $ac_status); } &&
10727          { ac_try='test -s conftest.$ac_objext'
10728   { (eval echo "$as_me:10728: \"$ac_try\"") >&5
10729   (eval $ac_try) 2>&5
10730   ac_status=$?
10731   echo "$as_me:10731: \$? = $ac_status" >&5
10732   (exit $ac_status); }; }; then
10733   cf_cv_wchar_t=yes
10734 else
10735   echo "$as_me: failed program was:" >&5
10736 cat conftest.$ac_ext >&5
10737 cf_cv_wchar_t=unknown
10738 fi
10739 rm -f conftest.$ac_objext conftest.$ac_ext
10740 fi
10741 rm -f conftest.$ac_objext conftest.$ac_ext
10742 fi
10743 echo "$as_me:10743: result: $cf_cv_wchar_t" >&5
10744 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10745
10746 if test "$cf_cv_wchar_t" = yes ; then
10747
10748 cat >>confdefs.h <<\EOF
10749 #define NEED_WCHAR_H 1
10750 EOF
10751
10752         NEED_WCHAR_H=1
10753 fi
10754
10755 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10756 if test "$cf_cv_wchar_t" = unknown ; then
10757         NCURSES_WCHAR_T=1
10758 fi
10759
10760 # if we find wchar_t in either place, use substitution to provide a fallback.
10761 if test "$cf_cv_wchar_t" != unknown ; then
10762         NCURSES_OK_WCHAR_T=1
10763 fi
10764
10765 # This is needed on Tru64 5.0 to declare wint_t
10766 echo "$as_me:10766: checking if we must include wchar.h to declare wint_t" >&5
10767 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10768 if test "${cf_cv_wint_t+set}" = set; then
10769   echo $ECHO_N "(cached) $ECHO_C" >&6
10770 else
10771
10772 cat >conftest.$ac_ext <<_ACEOF
10773 #line 10773 "configure"
10774 #include "confdefs.h"
10775
10776 #include <stdlib.h>
10777 #include <stdarg.h>
10778 #include <stdio.h>
10779 #ifdef HAVE_LIBUTF8_H
10780 #include <libutf8.h>
10781 #endif
10782 int
10783 main (void)
10784 {
10785 wint_t state
10786   ;
10787   return 0;
10788 }
10789 _ACEOF
10790 rm -f conftest.$ac_objext
10791 if { (eval echo "$as_me:10791: \"$ac_compile\"") >&5
10792   (eval $ac_compile) 2>&5
10793   ac_status=$?
10794   echo "$as_me:10794: \$? = $ac_status" >&5
10795   (exit $ac_status); } &&
10796          { ac_try='test -s conftest.$ac_objext'
10797   { (eval echo "$as_me:10797: \"$ac_try\"") >&5
10798   (eval $ac_try) 2>&5
10799   ac_status=$?
10800   echo "$as_me:10800: \$? = $ac_status" >&5
10801   (exit $ac_status); }; }; then
10802   cf_cv_wint_t=no
10803 else
10804   echo "$as_me: failed program was:" >&5
10805 cat conftest.$ac_ext >&5
10806 cat >conftest.$ac_ext <<_ACEOF
10807 #line 10807 "configure"
10808 #include "confdefs.h"
10809
10810 #include <stdlib.h>
10811 #include <stdarg.h>
10812 #include <stdio.h>
10813 #include <wchar.h>
10814 #ifdef HAVE_LIBUTF8_H
10815 #include <libutf8.h>
10816 #endif
10817 int
10818 main (void)
10819 {
10820 wint_t value
10821   ;
10822   return 0;
10823 }
10824 _ACEOF
10825 rm -f conftest.$ac_objext
10826 if { (eval echo "$as_me:10826: \"$ac_compile\"") >&5
10827   (eval $ac_compile) 2>&5
10828   ac_status=$?
10829   echo "$as_me:10829: \$? = $ac_status" >&5
10830   (exit $ac_status); } &&
10831          { ac_try='test -s conftest.$ac_objext'
10832   { (eval echo "$as_me:10832: \"$ac_try\"") >&5
10833   (eval $ac_try) 2>&5
10834   ac_status=$?
10835   echo "$as_me:10835: \$? = $ac_status" >&5
10836   (exit $ac_status); }; }; then
10837   cf_cv_wint_t=yes
10838 else
10839   echo "$as_me: failed program was:" >&5
10840 cat conftest.$ac_ext >&5
10841 cf_cv_wint_t=unknown
10842 fi
10843 rm -f conftest.$ac_objext conftest.$ac_ext
10844 fi
10845 rm -f conftest.$ac_objext conftest.$ac_ext
10846 fi
10847 echo "$as_me:10847: result: $cf_cv_wint_t" >&5
10848 echo "${ECHO_T}$cf_cv_wint_t" >&6
10849
10850 if test "$cf_cv_wint_t" = yes ; then
10851
10852 cat >>confdefs.h <<\EOF
10853 #define NEED_WCHAR_H 1
10854 EOF
10855
10856         NEED_WCHAR_H=1
10857 fi
10858
10859 # if we do not find wint_t in either place, use substitution to provide a fallback.
10860 if test "$cf_cv_wint_t" = unknown ; then
10861         NCURSES_WINT_T=1
10862 fi
10863
10864 # if we find wint_t in either place, use substitution to provide a fallback.
10865 if test "$cf_cv_wint_t" != unknown ; then
10866         NCURSES_OK_WINT_T=1
10867 fi
10868
10869         if test "$NCURSES_MBSTATE_T" != 0; then
10870
10871 cat >>confdefs.h <<\EOF
10872 #define NEED_MBSTATE_T_DEF 1
10873 EOF
10874
10875         fi
10876 fi
10877
10878 ###   use option --disable-lp64 to allow long chtype
10879 echo "$as_me:10879: checking whether to enable _LP64 definition in curses.h" >&5
10880 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10881
10882 # Check whether --enable-lp64 or --disable-lp64 was given.
10883 if test "${enable_lp64+set}" = set; then
10884   enableval="$enable_lp64"
10885   with_lp64=$enableval
10886 else
10887   with_lp64=$cf_dft_with_lp64
10888 fi;
10889 echo "$as_me:10889: result: $with_lp64" >&5
10890 echo "${ECHO_T}$with_lp64" >&6
10891
10892 if test "x$with_lp64" = xyes ; then
10893         cf_cv_enable_lp64=1
10894 else
10895         cf_cv_enable_lp64=0
10896 fi
10897
10898 # Check whether --enable-largefile or --disable-largefile was given.
10899 if test "${enable_largefile+set}" = set; then
10900   enableval="$enable_largefile"
10901
10902 fi;
10903 if test "$enable_largefile" != no; then
10904
10905   echo "$as_me:10905: checking for special C compiler options needed for large files" >&5
10906 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10907 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10908   echo $ECHO_N "(cached) $ECHO_C" >&6
10909 else
10910   ac_cv_sys_largefile_CC=no
10911      if test "$GCC" != yes; then
10912        ac_save_CC=$CC
10913        while :; do
10914          # IRIX 6.2 and later do not support large files by default,
10915          # so use the C compiler's -n32 option if that helps.
10916          cat >conftest.$ac_ext <<_ACEOF
10917 #line 10917 "configure"
10918 #include "confdefs.h"
10919 #include <sys/types.h>
10920  /* Check that off_t can represent 2**63 - 1 correctly.
10921     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10922     since some C++ compilers masquerading as C compilers
10923     incorrectly reject 9223372036854775807.  */
10924 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10925   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10926                        && LARGE_OFF_T % 2147483647 == 1)
10927                       ? 1 : -1];
10928 int
10929 main (void)
10930 {
10931
10932   ;
10933   return 0;
10934 }
10935 _ACEOF
10936          rm -f conftest.$ac_objext
10937 if { (eval echo "$as_me:10937: \"$ac_compile\"") >&5
10938   (eval $ac_compile) 2>&5
10939   ac_status=$?
10940   echo "$as_me:10940: \$? = $ac_status" >&5
10941   (exit $ac_status); } &&
10942          { ac_try='test -s conftest.$ac_objext'
10943   { (eval echo "$as_me:10943: \"$ac_try\"") >&5
10944   (eval $ac_try) 2>&5
10945   ac_status=$?
10946   echo "$as_me:10946: \$? = $ac_status" >&5
10947   (exit $ac_status); }; }; then
10948   break
10949 else
10950   echo "$as_me: failed program was:" >&5
10951 cat conftest.$ac_ext >&5
10952 fi
10953 rm -f conftest.$ac_objext
10954          CC="$CC -n32"
10955          rm -f conftest.$ac_objext
10956 if { (eval echo "$as_me:10956: \"$ac_compile\"") >&5
10957   (eval $ac_compile) 2>&5
10958   ac_status=$?
10959   echo "$as_me:10959: \$? = $ac_status" >&5
10960   (exit $ac_status); } &&
10961          { ac_try='test -s conftest.$ac_objext'
10962   { (eval echo "$as_me:10962: \"$ac_try\"") >&5
10963   (eval $ac_try) 2>&5
10964   ac_status=$?
10965   echo "$as_me:10965: \$? = $ac_status" >&5
10966   (exit $ac_status); }; }; then
10967   ac_cv_sys_largefile_CC=' -n32'; break
10968 else
10969   echo "$as_me: failed program was:" >&5
10970 cat conftest.$ac_ext >&5
10971 fi
10972 rm -f conftest.$ac_objext
10973          break
10974        done
10975        CC=$ac_save_CC
10976        rm -f conftest.$ac_ext
10977     fi
10978 fi
10979 echo "$as_me:10979: result: $ac_cv_sys_largefile_CC" >&5
10980 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10981   if test "$ac_cv_sys_largefile_CC" != no; then
10982     CC=$CC$ac_cv_sys_largefile_CC
10983   fi
10984
10985   echo "$as_me:10985: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10986 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10987 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10988   echo $ECHO_N "(cached) $ECHO_C" >&6
10989 else
10990   while :; do
10991   ac_cv_sys_file_offset_bits=no
10992   cat >conftest.$ac_ext <<_ACEOF
10993 #line 10993 "configure"
10994 #include "confdefs.h"
10995 #include <sys/types.h>
10996  /* Check that off_t can represent 2**63 - 1 correctly.
10997     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10998     since some C++ compilers masquerading as C compilers
10999     incorrectly reject 9223372036854775807.  */
11000 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11001   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11002                        && LARGE_OFF_T % 2147483647 == 1)
11003                       ? 1 : -1];
11004 int
11005 main (void)
11006 {
11007
11008   ;
11009   return 0;
11010 }
11011 _ACEOF
11012 rm -f conftest.$ac_objext
11013 if { (eval echo "$as_me:11013: \"$ac_compile\"") >&5
11014   (eval $ac_compile) 2>&5
11015   ac_status=$?
11016   echo "$as_me:11016: \$? = $ac_status" >&5
11017   (exit $ac_status); } &&
11018          { ac_try='test -s conftest.$ac_objext'
11019   { (eval echo "$as_me:11019: \"$ac_try\"") >&5
11020   (eval $ac_try) 2>&5
11021   ac_status=$?
11022   echo "$as_me:11022: \$? = $ac_status" >&5
11023   (exit $ac_status); }; }; then
11024   break
11025 else
11026   echo "$as_me: failed program was:" >&5
11027 cat conftest.$ac_ext >&5
11028 fi
11029 rm -f conftest.$ac_objext conftest.$ac_ext
11030   cat >conftest.$ac_ext <<_ACEOF
11031 #line 11031 "configure"
11032 #include "confdefs.h"
11033 #define _FILE_OFFSET_BITS 64
11034 #include <sys/types.h>
11035  /* Check that off_t can represent 2**63 - 1 correctly.
11036     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11037     since some C++ compilers masquerading as C compilers
11038     incorrectly reject 9223372036854775807.  */
11039 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11040   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11041                        && LARGE_OFF_T % 2147483647 == 1)
11042                       ? 1 : -1];
11043 int
11044 main (void)
11045 {
11046
11047   ;
11048   return 0;
11049 }
11050 _ACEOF
11051 rm -f conftest.$ac_objext
11052 if { (eval echo "$as_me:11052: \"$ac_compile\"") >&5
11053   (eval $ac_compile) 2>&5
11054   ac_status=$?
11055   echo "$as_me:11055: \$? = $ac_status" >&5
11056   (exit $ac_status); } &&
11057          { ac_try='test -s conftest.$ac_objext'
11058   { (eval echo "$as_me:11058: \"$ac_try\"") >&5
11059   (eval $ac_try) 2>&5
11060   ac_status=$?
11061   echo "$as_me:11061: \$? = $ac_status" >&5
11062   (exit $ac_status); }; }; then
11063   ac_cv_sys_file_offset_bits=64; break
11064 else
11065   echo "$as_me: failed program was:" >&5
11066 cat conftest.$ac_ext >&5
11067 fi
11068 rm -f conftest.$ac_objext conftest.$ac_ext
11069   break
11070 done
11071 fi
11072 echo "$as_me:11072: result: $ac_cv_sys_file_offset_bits" >&5
11073 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11074 if test "$ac_cv_sys_file_offset_bits" != no; then
11075
11076 cat >>confdefs.h <<EOF
11077 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11078 EOF
11079
11080 fi
11081 rm -rf conftest*
11082   echo "$as_me:11082: checking for _LARGE_FILES value needed for large files" >&5
11083 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11084 if test "${ac_cv_sys_large_files+set}" = set; then
11085   echo $ECHO_N "(cached) $ECHO_C" >&6
11086 else
11087   while :; do
11088   ac_cv_sys_large_files=no
11089   cat >conftest.$ac_ext <<_ACEOF
11090 #line 11090 "configure"
11091 #include "confdefs.h"
11092 #include <sys/types.h>
11093  /* Check that off_t can represent 2**63 - 1 correctly.
11094     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11095     since some C++ compilers masquerading as C compilers
11096     incorrectly reject 9223372036854775807.  */
11097 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11098   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11099                        && LARGE_OFF_T % 2147483647 == 1)
11100                       ? 1 : -1];
11101 int
11102 main (void)
11103 {
11104
11105   ;
11106   return 0;
11107 }
11108 _ACEOF
11109 rm -f conftest.$ac_objext
11110 if { (eval echo "$as_me:11110: \"$ac_compile\"") >&5
11111   (eval $ac_compile) 2>&5
11112   ac_status=$?
11113   echo "$as_me:11113: \$? = $ac_status" >&5
11114   (exit $ac_status); } &&
11115          { ac_try='test -s conftest.$ac_objext'
11116   { (eval echo "$as_me:11116: \"$ac_try\"") >&5
11117   (eval $ac_try) 2>&5
11118   ac_status=$?
11119   echo "$as_me:11119: \$? = $ac_status" >&5
11120   (exit $ac_status); }; }; then
11121   break
11122 else
11123   echo "$as_me: failed program was:" >&5
11124 cat conftest.$ac_ext >&5
11125 fi
11126 rm -f conftest.$ac_objext conftest.$ac_ext
11127   cat >conftest.$ac_ext <<_ACEOF
11128 #line 11128 "configure"
11129 #include "confdefs.h"
11130 #define _LARGE_FILES 1
11131 #include <sys/types.h>
11132  /* Check that off_t can represent 2**63 - 1 correctly.
11133     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11134     since some C++ compilers masquerading as C compilers
11135     incorrectly reject 9223372036854775807.  */
11136 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11137   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11138                        && LARGE_OFF_T % 2147483647 == 1)
11139                       ? 1 : -1];
11140 int
11141 main (void)
11142 {
11143
11144   ;
11145   return 0;
11146 }
11147 _ACEOF
11148 rm -f conftest.$ac_objext
11149 if { (eval echo "$as_me:11149: \"$ac_compile\"") >&5
11150   (eval $ac_compile) 2>&5
11151   ac_status=$?
11152   echo "$as_me:11152: \$? = $ac_status" >&5
11153   (exit $ac_status); } &&
11154          { ac_try='test -s conftest.$ac_objext'
11155   { (eval echo "$as_me:11155: \"$ac_try\"") >&5
11156   (eval $ac_try) 2>&5
11157   ac_status=$?
11158   echo "$as_me:11158: \$? = $ac_status" >&5
11159   (exit $ac_status); }; }; then
11160   ac_cv_sys_large_files=1; break
11161 else
11162   echo "$as_me: failed program was:" >&5
11163 cat conftest.$ac_ext >&5
11164 fi
11165 rm -f conftest.$ac_objext conftest.$ac_ext
11166   break
11167 done
11168 fi
11169 echo "$as_me:11169: result: $ac_cv_sys_large_files" >&5
11170 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11171 if test "$ac_cv_sys_large_files" != no; then
11172
11173 cat >>confdefs.h <<EOF
11174 #define _LARGE_FILES $ac_cv_sys_large_files
11175 EOF
11176
11177 fi
11178 rm -rf conftest*
11179 fi
11180
11181         if test "$enable_largefile" != no ; then
11182         echo "$as_me:11182: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11183 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11184 if test "${ac_cv_sys_largefile_source+set}" = set; then
11185   echo $ECHO_N "(cached) $ECHO_C" >&6
11186 else
11187   while :; do
11188   ac_cv_sys_largefile_source=no
11189   cat >conftest.$ac_ext <<_ACEOF
11190 #line 11190 "configure"
11191 #include "confdefs.h"
11192 #include <stdio.h>
11193 int
11194 main (void)
11195 {
11196 return !fseeko;
11197   ;
11198   return 0;
11199 }
11200 _ACEOF
11201 rm -f conftest.$ac_objext
11202 if { (eval echo "$as_me:11202: \"$ac_compile\"") >&5
11203   (eval $ac_compile) 2>&5
11204   ac_status=$?
11205   echo "$as_me:11205: \$? = $ac_status" >&5
11206   (exit $ac_status); } &&
11207          { ac_try='test -s conftest.$ac_objext'
11208   { (eval echo "$as_me:11208: \"$ac_try\"") >&5
11209   (eval $ac_try) 2>&5
11210   ac_status=$?
11211   echo "$as_me:11211: \$? = $ac_status" >&5
11212   (exit $ac_status); }; }; then
11213   break
11214 else
11215   echo "$as_me: failed program was:" >&5
11216 cat conftest.$ac_ext >&5
11217 fi
11218 rm -f conftest.$ac_objext conftest.$ac_ext
11219   cat >conftest.$ac_ext <<_ACEOF
11220 #line 11220 "configure"
11221 #include "confdefs.h"
11222 #define _LARGEFILE_SOURCE 1
11223 #include <stdio.h>
11224 int
11225 main (void)
11226 {
11227 return !fseeko;
11228   ;
11229   return 0;
11230 }
11231 _ACEOF
11232 rm -f conftest.$ac_objext
11233 if { (eval echo "$as_me:11233: \"$ac_compile\"") >&5
11234   (eval $ac_compile) 2>&5
11235   ac_status=$?
11236   echo "$as_me:11236: \$? = $ac_status" >&5
11237   (exit $ac_status); } &&
11238          { ac_try='test -s conftest.$ac_objext'
11239   { (eval echo "$as_me:11239: \"$ac_try\"") >&5
11240   (eval $ac_try) 2>&5
11241   ac_status=$?
11242   echo "$as_me:11242: \$? = $ac_status" >&5
11243   (exit $ac_status); }; }; then
11244   ac_cv_sys_largefile_source=1; break
11245 else
11246   echo "$as_me: failed program was:" >&5
11247 cat conftest.$ac_ext >&5
11248 fi
11249 rm -f conftest.$ac_objext conftest.$ac_ext
11250   break
11251 done
11252 fi
11253 echo "$as_me:11253: result: $ac_cv_sys_largefile_source" >&5
11254 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11255 if test "$ac_cv_sys_largefile_source" != no; then
11256
11257 cat >>confdefs.h <<EOF
11258 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11259 EOF
11260
11261 fi
11262 rm -rf conftest*
11263
11264 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11265 # in glibc 2.1.3, but that breaks too many other things.
11266 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11267 echo "$as_me:11267: checking for fseeko" >&5
11268 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11269 if test "${ac_cv_func_fseeko+set}" = set; then
11270   echo $ECHO_N "(cached) $ECHO_C" >&6
11271 else
11272   cat >conftest.$ac_ext <<_ACEOF
11273 #line 11273 "configure"
11274 #include "confdefs.h"
11275 #include <stdio.h>
11276 int
11277 main (void)
11278 {
11279 return fseeko && fseeko (stdin, 0, 0);
11280   ;
11281   return 0;
11282 }
11283 _ACEOF
11284 rm -f conftest.$ac_objext conftest$ac_exeext
11285 if { (eval echo "$as_me:11285: \"$ac_link\"") >&5
11286   (eval $ac_link) 2>&5
11287   ac_status=$?
11288   echo "$as_me:11288: \$? = $ac_status" >&5
11289   (exit $ac_status); } &&
11290          { ac_try='test -s conftest$ac_exeext'
11291   { (eval echo "$as_me:11291: \"$ac_try\"") >&5
11292   (eval $ac_try) 2>&5
11293   ac_status=$?
11294   echo "$as_me:11294: \$? = $ac_status" >&5
11295   (exit $ac_status); }; }; then
11296   ac_cv_func_fseeko=yes
11297 else
11298   echo "$as_me: failed program was:" >&5
11299 cat conftest.$ac_ext >&5
11300 ac_cv_func_fseeko=no
11301 fi
11302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11303 fi
11304 echo "$as_me:11304: result: $ac_cv_func_fseeko" >&5
11305 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11306 if test $ac_cv_func_fseeko = yes; then
11307
11308 cat >>confdefs.h <<\EOF
11309 #define HAVE_FSEEKO 1
11310 EOF
11311
11312 fi
11313
11314         # Normally we would collect these definitions in the config.h,
11315         # but (like _XOPEN_SOURCE), some environments rely on having these
11316         # defined before any of the system headers are included.  Another
11317         # case comes up with C++, e.g., on AIX the compiler compiles the
11318         # header files by themselves before looking at the body files it is
11319         # told to compile.  For ncurses, those header files do not include
11320         # the config.h
11321         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11322         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11323         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11324
11325         echo "$as_me:11325: checking whether to use struct dirent64" >&5
11326 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11327 if test "${cf_cv_struct_dirent64+set}" = set; then
11328   echo $ECHO_N "(cached) $ECHO_C" >&6
11329 else
11330
11331                 cat >conftest.$ac_ext <<_ACEOF
11332 #line 11332 "configure"
11333 #include "confdefs.h"
11334
11335 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11336 #include <sys/types.h>
11337 #include <dirent.h>
11338
11339 int
11340 main (void)
11341 {
11342
11343                 /* if transitional largefile support is setup, this is true */
11344                 extern struct dirent64 * readdir(DIR *);
11345                 struct dirent64 *x = readdir((DIR *)0);
11346                 struct dirent *y = readdir((DIR *)0);
11347                 int z = x - y;
11348
11349   ;
11350   return 0;
11351 }
11352 _ACEOF
11353 rm -f conftest.$ac_objext
11354 if { (eval echo "$as_me:11354: \"$ac_compile\"") >&5
11355   (eval $ac_compile) 2>&5
11356   ac_status=$?
11357   echo "$as_me:11357: \$? = $ac_status" >&5
11358   (exit $ac_status); } &&
11359          { ac_try='test -s conftest.$ac_objext'
11360   { (eval echo "$as_me:11360: \"$ac_try\"") >&5
11361   (eval $ac_try) 2>&5
11362   ac_status=$?
11363   echo "$as_me:11363: \$? = $ac_status" >&5
11364   (exit $ac_status); }; }; then
11365   cf_cv_struct_dirent64=yes
11366 else
11367   echo "$as_me: failed program was:" >&5
11368 cat conftest.$ac_ext >&5
11369 cf_cv_struct_dirent64=no
11370 fi
11371 rm -f conftest.$ac_objext conftest.$ac_ext
11372
11373 fi
11374 echo "$as_me:11374: result: $cf_cv_struct_dirent64" >&5
11375 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11376         test "$cf_cv_struct_dirent64" = yes &&
11377 cat >>confdefs.h <<\EOF
11378 #define HAVE_STRUCT_DIRENT64 1
11379 EOF
11380
11381         fi
11382
11383 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11384 echo "$as_me:11384: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11385 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11386
11387 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11388 if test "${enable_tparm_varargs+set}" = set; then
11389   enableval="$enable_tparm_varargs"
11390   with_tparm_varargs=$enableval
11391 else
11392   with_tparm_varargs=yes
11393 fi;
11394 echo "$as_me:11394: result: $with_tparm_varargs" >&5
11395 echo "${ECHO_T}$with_tparm_varargs" >&6
11396 NCURSES_TPARM_VARARGS=0
11397 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11398
11399 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11400 if test "$with_ticlib" != no ; then
11401 echo "$as_me:11401: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11402 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11403
11404 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11405 if test "${enable_tic_depends+set}" = set; then
11406   enableval="$enable_tic_depends"
11407   with_tic_depends=$enableval
11408 else
11409   with_tic_depends=yes
11410 fi;
11411 echo "$as_me:11411: result: $with_tic_depends" >&5
11412 echo "${ECHO_T}$with_tic_depends" >&6
11413 else
11414         with_tic_depends=no
11415 fi
11416
11417 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11418 echo "$as_me:11418: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11419 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11420
11421 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11422 if test "${enable_wattr_macros+set}" = set; then
11423   enableval="$enable_wattr_macros"
11424   with_wattr_macros=$enableval
11425 else
11426   with_wattr_macros=yes
11427 fi;
11428 if [ "x$with_wattr_macros" != xyes ]; then
11429         NCURSES_WATTR_MACROS=0
11430         echo "$as_me:11430: result: yes" >&5
11431 echo "${ECHO_T}yes" >&6
11432 else
11433         NCURSES_WATTR_MACROS=1
11434         echo "$as_me:11434: result: no" >&5
11435 echo "${ECHO_T}no" >&6
11436 fi
11437
11438 echo "$as_me:11438: checking for X11 rgb file" >&5
11439 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
11440
11441 # Check whether --with-x11-rgb or --without-x11-rgb was given.
11442 if test "${with_x11_rgb+set}" = set; then
11443   withval="$with_x11_rgb"
11444   RGB_PATH=$withval
11445 else
11446   RGB_PATH=auto
11447 fi;
11448
11449 if test "x$RGB_PATH" = xauto
11450 then
11451         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
11452         for cf_path in \
11453                 /opt/local/share/X11/rgb.txt \
11454                 /opt/X11/share/X11/rgb.txt \
11455                 /usr/share/X11/rgb.txt \
11456                 /usr/X11/share/X11/rgb.txt \
11457                 /usr/X11/lib/X11/rgb.txt \
11458                 /usr/lib/X11/rgb.txt \
11459                 /etc/X11/rgb.txt \
11460                 /usr/pkg/lib/X11/rgb.txt \
11461                 /usr/X11R7/lib/X11/rgb.txt \
11462                 /usr/X11R6/lib/X11/rgb.txt \
11463                 /usr/X11R5/lib/X11/rgb.txt \
11464                 /usr/X11R4/lib/X11/rgb.txt \
11465                 /usr/local/lib/X11/rgb.txt \
11466                 /usr/local/share/X11/rgb.txt \
11467                 /usr/lib64/X11/rgb.txt
11468         do
11469                 if test -f "$cf_path" ; then
11470                         RGB_PATH="$cf_path"
11471                         break
11472                 fi
11473         done
11474 else
11475         cf_path=$RGB_PATH
11476
11477 if test "x$prefix" != xNONE; then
11478         cf_path_syntax="$prefix"
11479 else
11480         cf_path_syntax="$ac_default_prefix"
11481 fi
11482
11483 case ".$cf_path" in
11484 (.\$\(*\)*|.\'*\'*)
11485         ;;
11486 (..|./*|.\\*)
11487         ;;
11488 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11489         ;;
11490 (.\${*prefix}*|.\${*dir}*)
11491         eval cf_path="$cf_path"
11492         case ".$cf_path" in
11493         (.NONE/*)
11494                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11495                 ;;
11496         esac
11497         ;;
11498 (.no|.NONE/*)
11499         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11500         ;;
11501 (*)
11502         { { echo "$as_me:11502: error: expected a pathname, not \"$cf_path\"" >&5
11503 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
11504    { (exit 1); exit 1; }; }
11505         ;;
11506 esac
11507
11508 fi
11509
11510 echo "$as_me:11510: result: $RGB_PATH" >&5
11511 echo "${ECHO_T}$RGB_PATH" >&6
11512
11513 cat >>confdefs.h <<EOF
11514 #define RGB_PATH "$cf_path"
11515 EOF
11516
11517 no_x11_rgb=
11518 if test "$RGB_PATH" = no
11519 then
11520         no_x11_rgb="#"
11521 fi
11522
11523 ###   use option --with-bool to override bool's type
11524 echo "$as_me:11524: checking for type of bool" >&5
11525 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11526
11527 # Check whether --with-bool or --without-bool was given.
11528 if test "${with_bool+set}" = set; then
11529   withval="$with_bool"
11530   NCURSES_BOOL="$withval"
11531 else
11532   NCURSES_BOOL=auto
11533 fi;
11534 echo "$as_me:11534: result: $NCURSES_BOOL" >&5
11535 echo "${ECHO_T}$NCURSES_BOOL" >&6
11536
11537 echo "$as_me:11537: checking for alternate terminal capabilities file" >&5
11538 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11539
11540 # Check whether --with-caps or --without-caps was given.
11541 if test "${with_caps+set}" = set; then
11542   withval="$with_caps"
11543   TERMINFO_CAPS=Caps.$withval
11544 else
11545   TERMINFO_CAPS=Caps
11546 fi;
11547 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11548 echo "$as_me:11548: result: $TERMINFO_CAPS" >&5
11549 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11550
11551 ###   use option --with-chtype to override chtype's type
11552 echo "$as_me:11552: checking for type of chtype" >&5
11553 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11554
11555 # Check whether --with-chtype or --without-chtype was given.
11556 if test "${with_chtype+set}" = set; then
11557   withval="$with_chtype"
11558   NCURSES_CHTYPE="$withval"
11559 else
11560   NCURSES_CHTYPE=$cf_dft_chtype
11561 fi;
11562 echo "$as_me:11562: result: $NCURSES_CHTYPE" >&5
11563 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11564
11565 ###   use option --with-ospeed to override ospeed's type
11566 echo "$as_me:11566: checking for type of ospeed" >&5
11567 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11568
11569 # Check whether --with-ospeed or --without-ospeed was given.
11570 if test "${with_ospeed+set}" = set; then
11571   withval="$with_ospeed"
11572   NCURSES_OSPEED="$withval"
11573 else
11574   NCURSES_OSPEED=short
11575 fi;
11576 echo "$as_me:11576: result: $NCURSES_OSPEED" >&5
11577 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11578
11579 ###   use option --with-mmask-t to override mmask_t's type
11580 echo "$as_me:11580: checking for type of mmask_t" >&5
11581 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11582
11583 # Check whether --with-mmask-t or --without-mmask-t was given.
11584 if test "${with_mmask_t+set}" = set; then
11585   withval="$with_mmask_t"
11586   NCURSES_MMASK_T="$withval"
11587 else
11588   NCURSES_MMASK_T=$cf_dft_mmask_t
11589 fi;
11590 echo "$as_me:11590: result: $NCURSES_MMASK_T" >&5
11591 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11592
11593 ###   use option --with-ccharw-max to override CCHARW_MAX size
11594 echo "$as_me:11594: checking for size CCHARW_MAX" >&5
11595 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11596
11597 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11598 if test "${with_ccharw_max+set}" = set; then
11599   withval="$with_ccharw_max"
11600   NCURSES_CCHARW_MAX="$withval"
11601 else
11602   NCURSES_CCHARW_MAX=5
11603 fi;
11604 echo "$as_me:11604: result: $NCURSES_CCHARW_MAX" >&5
11605 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11606
11607 ###   use option --with-tparm-arg to override tparm's argument type
11608 echo "$as_me:11608: checking for type of tparm args" >&5
11609 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11610
11611 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11612 if test "${with_tparm_arg+set}" = set; then
11613   withval="$with_tparm_arg"
11614   NCURSES_TPARM_ARG="$withval"
11615 else
11616   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11617 fi;
11618 echo "$as_me:11618: result: $NCURSES_TPARM_ARG" >&5
11619 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11620
11621 ### Enable compiling-in rcs id's
11622 echo "$as_me:11622: checking if RCS identifiers should be compiled-in" >&5
11623 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11624
11625 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11626 if test "${with_rcs_ids+set}" = set; then
11627   withval="$with_rcs_ids"
11628   with_rcs_ids=$withval
11629 else
11630   with_rcs_ids=no
11631 fi;
11632 echo "$as_me:11632: result: $with_rcs_ids" >&5
11633 echo "${ECHO_T}$with_rcs_ids" >&6
11634 test "x$with_rcs_ids" = xyes &&
11635 cat >>confdefs.h <<\EOF
11636 #define USE_RCS_IDS 1
11637 EOF
11638
11639 ###############################################################################
11640
11641 echo "$as_me:11641: checking format of man-pages" >&5
11642 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11643
11644 # Check whether --with-manpage-format or --without-manpage-format was given.
11645 if test "${with_manpage_format+set}" = set; then
11646   withval="$with_manpage_format"
11647   MANPAGE_FORMAT=$withval
11648 else
11649   MANPAGE_FORMAT=unknown
11650 fi;
11651
11652 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11653 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11654
11655 cf_unknown=
11656
11657 case $MANPAGE_FORMAT in
11658 (unknown)
11659         if test -z "$MANPATH" ; then
11660                 MANPATH="/usr/man:/usr/share/man"
11661         fi
11662
11663         # look for the 'date' man-page (it's most likely to be installed!)
11664         MANPAGE_FORMAT=
11665         cf_preform=no
11666         cf_catonly=yes
11667         cf_example=date
11668
11669         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11670         for cf_dir in $MANPATH; do
11671                 test -z "$cf_dir" && cf_dir=/usr/man
11672                 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
11673                 do
11674                         cf_test=`echo $cf_name | sed -e 's/*//'`
11675                         if test "x$cf_test" = "x$cf_name" ; then
11676
11677                                 case "$cf_name" in
11678                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11679                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11680                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11681                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11682                                 esac
11683
11684                                 case "$cf_name" in
11685                                 ($cf_dir/man*)
11686                                         cf_catonly=no
11687                                         ;;
11688                                 ($cf_dir/cat*)
11689                                         cf_preform=yes
11690                                         ;;
11691                                 esac
11692                                 break
11693                         fi
11694
11695                         # if we found a match in either man* or cat*, stop looking
11696                         if test -n "$MANPAGE_FORMAT" ; then
11697                                 cf_found=no
11698                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11699                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11700                                 case "$cf_name" in
11701                                 ($cf_dir/cat*)
11702                                         cf_found=yes
11703                                         ;;
11704                                 esac
11705                                 test $cf_found=yes && break
11706                         fi
11707                 done
11708                 # only check the first directory in $MANPATH where we find manpages
11709                 if test -n "$MANPAGE_FORMAT" ; then
11710                         break
11711                 fi
11712         done
11713         # if we did not find the example, just assume it is normal
11714         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11715         IFS="$ac_save_ifs"
11716         ;;
11717 (*)
11718         for cf_option in $MANPAGE_FORMAT; do
11719         case $cf_option in
11720         (gzip|compress|BSDI|normal|formatted|catonly)
11721                 ;;
11722         (*)
11723                 cf_unknown="$cf_unknown $cf_option"
11724                 ;;
11725         esac
11726         done
11727         ;;
11728 esac
11729
11730 echo "$as_me:11730: result: $MANPAGE_FORMAT" >&5
11731 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11732 if test -n "$cf_unknown" ; then
11733         { echo "$as_me:11733: WARNING: Unexpected manpage-format $cf_unknown" >&5
11734 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11735 fi
11736
11737 echo "$as_me:11737: checking for manpage renaming" >&5
11738 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11739
11740 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11741 if test "${with_manpage_renames+set}" = set; then
11742   withval="$with_manpage_renames"
11743   MANPAGE_RENAMES=$withval
11744 else
11745   MANPAGE_RENAMES=yes
11746 fi;
11747
11748 case ".$MANPAGE_RENAMES" in
11749 (.no)
11750         ;;
11751 (.|.yes)
11752         # Debian 'man' program?
11753         if test -f /etc/debian_version ; then
11754                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11755         else
11756                 MANPAGE_RENAMES=no
11757         fi
11758         ;;
11759 esac
11760
11761 if test "$MANPAGE_RENAMES" != no ; then
11762         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11763                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11764         elif test ! -f $MANPAGE_RENAMES ; then
11765                 { { echo "$as_me:11765: error: not a filename: $MANPAGE_RENAMES" >&5
11766 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11767    { (exit 1); exit 1; }; }
11768         fi
11769
11770         test ! -d man && mkdir man
11771
11772         # Construct a sed-script to perform renaming within man-pages
11773         if test -n "$MANPAGE_RENAMES" ; then
11774                 test ! -d man && mkdir man
11775                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11776         fi
11777 fi
11778
11779 echo "$as_me:11779: result: $MANPAGE_RENAMES" >&5
11780 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11781
11782 echo "$as_me:11782: checking if manpage aliases will be installed" >&5
11783 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11784
11785 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11786 if test "${with_manpage_aliases+set}" = set; then
11787   withval="$with_manpage_aliases"
11788   MANPAGE_ALIASES=$withval
11789 else
11790   MANPAGE_ALIASES=yes
11791 fi;
11792
11793 echo "$as_me:11793: result: $MANPAGE_ALIASES" >&5
11794 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11795
11796 case "x$LN_S" in
11797 (xln*)
11798         cf_use_symlinks=yes
11799         ;;
11800 (*)
11801         cf_use_symlinks=no
11802         ;;
11803 esac
11804
11805 MANPAGE_SYMLINKS=no
11806 if test "$MANPAGE_ALIASES" = yes ; then
11807 echo "$as_me:11807: checking if manpage symlinks should be used" >&5
11808 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11809
11810 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11811 if test "${with_manpage_symlinks+set}" = set; then
11812   withval="$with_manpage_symlinks"
11813   MANPAGE_SYMLINKS=$withval
11814 else
11815   MANPAGE_SYMLINKS=$cf_use_symlinks
11816 fi;
11817
11818 if test "$$cf_use_symlinks" = no; then
11819 if test "$MANPAGE_SYMLINKS" = yes ; then
11820         { echo "$as_me:11820: WARNING: cannot make symlinks" >&5
11821 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11822         MANPAGE_SYMLINKS=no
11823 fi
11824 fi
11825
11826 echo "$as_me:11826: result: $MANPAGE_SYMLINKS" >&5
11827 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11828 fi
11829
11830 echo "$as_me:11830: checking for manpage tbl" >&5
11831 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11832
11833 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11834 if test "${with_manpage_tbl+set}" = set; then
11835   withval="$with_manpage_tbl"
11836   MANPAGE_TBL=$withval
11837 else
11838   MANPAGE_TBL=no
11839 fi;
11840
11841 echo "$as_me:11841: result: $MANPAGE_TBL" >&5
11842 echo "${ECHO_T}$MANPAGE_TBL" >&6
11843
11844 if test "$prefix" = "NONE" ; then
11845         cf_prefix="$ac_default_prefix"
11846 else
11847         cf_prefix="$prefix"
11848 fi
11849
11850 case "$MANPAGE_FORMAT" in
11851 (*catonly*)
11852         cf_format=yes
11853         cf_inboth=no
11854         ;;
11855 (*formatted*)
11856         cf_format=yes
11857         cf_inboth=yes
11858         ;;
11859 (*)
11860         cf_format=no
11861         cf_inboth=no
11862         ;;
11863 esac
11864
11865 test ! -d man && mkdir man
11866
11867 cf_so_strip=
11868 cf_compress=
11869 case "$MANPAGE_FORMAT" in
11870 (*compress*)
11871         cf_so_strip="Z"
11872         cf_compress=compress
11873         ;;
11874 (*gzip*)
11875         cf_so_strip="gz"
11876         cf_compress=gzip
11877         ;;
11878 esac
11879
11880 cf_edit_man=./edit_man.sh
11881 cf_man_alias=`pwd`/man_alias.sed
11882
11883 cat >$cf_edit_man <<CF_EOF
11884 #! $SHELL
11885 # this script is generated by the configure-script CF_MAN_PAGES macro.
11886
11887 prefix="$cf_prefix"
11888 datarootdir="$datarootdir"
11889 datadir="$datadir"
11890
11891 NCURSES_MAJOR="$NCURSES_MAJOR"
11892 NCURSES_MINOR="$NCURSES_MINOR"
11893 NCURSES_PATCH="$NCURSES_PATCH"
11894
11895 NCURSES_OSPEED="$NCURSES_OSPEED"
11896 TERMINFO="$TERMINFO"
11897
11898 INSTALL="$INSTALL"
11899 INSTALL_DATA="$INSTALL_DATA"
11900
11901 transform="$program_transform_name"
11902
11903 TMP=\${TMPDIR:=/tmp}/man\$\$
11904 trap "rm -f \$TMP" 0 1 2 3 15
11905
11906 form=\$1
11907 shift || exit 1
11908
11909 verb=\$1
11910 shift || exit 1
11911
11912 mandir=\$1
11913 shift || exit 1
11914
11915 srcdir=\$1
11916 top_srcdir=\$srcdir/..
11917 shift || exit 1
11918
11919 if test "\$form" = normal ; then
11920         if test "$cf_format" = yes ; then
11921         if test "$cf_inboth" = no ; then
11922                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11923                 exit $?
11924         fi
11925         fi
11926         cf_subdir=\$mandir/man
11927         cf_tables=$MANPAGE_TBL
11928 else
11929         cf_subdir=\$mandir/cat
11930         cf_tables=yes
11931 fi
11932
11933 # process the list of source-files
11934 for i in \$* ; do
11935 case \$i in
11936 (*.orig|*.rej) ;;
11937 (*.[0-9]*)
11938         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11939         if test \$verb = installing ; then
11940         if test ! -d \$cf_subdir\${section} ; then
11941                 mkdir -p \$cf_subdir\$section
11942         fi
11943         fi
11944
11945         # replace variables in man page
11946         if test ! -f $cf_man_alias ; then
11947 cat >>$cf_man_alias <<-CF_EOF2
11948                 s,@DATADIR@,\$datadir,g
11949                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11950                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11951                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11952                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11953                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11954                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11955 CF_EOF
11956
11957         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11958         do
11959                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11960                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11961 cat >>$cf_edit_man <<-CF_EOF
11962                 s,@$cf_NAME@,$cf_name,g
11963 CF_EOF
11964         done
11965
11966 cat >>$cf_edit_man <<CF_EOF
11967 CF_EOF2
11968                 echo "...made $cf_man_alias"
11969         fi
11970
11971         aliases=
11972         cf_source=\`basename \$i\`
11973         inalias=\$cf_source
11974         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11975         if test ! -f \$inalias ; then
11976                 echo .. skipped \$cf_source
11977                 continue
11978         fi
11979 CF_EOF
11980
11981 if test "$MANPAGE_ALIASES" != no ; then
11982 cat >>$cf_edit_man <<CF_EOF
11983         nCurses=ignore.3x
11984         test $with_curses_h = yes && nCurses=ncurses.3x
11985         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11986 CF_EOF
11987 fi
11988
11989 if test "$MANPAGE_RENAMES" = no ; then
11990 cat >>$cf_edit_man <<CF_EOF
11991         # perform program transformations for section 1 man pages
11992         if test \$section = 1 ; then
11993                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11994         else
11995                 cf_target=\$cf_subdir\${section}/\$cf_source
11996         fi
11997 CF_EOF
11998 else
11999 cat >>$cf_edit_man <<CF_EOF
12000         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
12001         if test -z "\$cf_target" ; then
12002                 echo '? missing rename for '\$cf_source
12003                 cf_target="\$cf_source"
12004         fi
12005         cf_target="\$cf_subdir\${section}/\${cf_target}"
12006
12007 CF_EOF
12008 fi
12009
12010 cat >>$cf_edit_man <<CF_EOF
12011         sed     -f $cf_man_alias \\
12012 CF_EOF
12013
12014 if test -f $MANPAGE_RENAMES ; then
12015 cat >>$cf_edit_man <<CF_EOF
12016                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
12017 CF_EOF
12018 else
12019 cat >>$cf_edit_man <<CF_EOF
12020                 < \$i >\$TMP
12021 CF_EOF
12022 fi
12023
12024 cat >>$cf_edit_man <<CF_EOF
12025 if test \$cf_tables = yes ; then
12026         tbl \$TMP >\$TMP.out
12027         mv \$TMP.out \$TMP
12028 fi
12029 CF_EOF
12030
12031 if test $with_overwrite != yes ; then
12032 cat >>$cf_edit_man <<CF_EOF
12033         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
12034         mv \$TMP.out \$TMP
12035 CF_EOF
12036 fi
12037
12038 if test $with_curses_h != yes ; then
12039 cat >>$cf_edit_man <<CF_EOF
12040         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
12041         mv \$TMP.out \$TMP
12042 CF_EOF
12043 fi
12044
12045 cat >>$cf_edit_man <<CF_EOF
12046         if test \$form = format ; then
12047                 nroff -man \$TMP >\$TMP.out
12048                 mv \$TMP.out \$TMP
12049         fi
12050 CF_EOF
12051
12052 if test -n "$cf_compress" ; then
12053 cat >>$cf_edit_man <<CF_EOF
12054         if test \$verb = installing ; then
12055         if ( $cf_compress -f \$TMP )
12056         then
12057                 mv \$TMP.$cf_so_strip \$TMP
12058         fi
12059         fi
12060         cf_target="\$cf_target.$cf_so_strip"
12061 CF_EOF
12062 fi
12063
12064 case "$MANPAGE_FORMAT" in
12065 (*BSDI*)
12066 cat >>$cf_edit_man <<CF_EOF
12067         if test \$form = format ; then
12068                 # BSDI installs only .0 suffixes in the cat directories
12069                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
12070         fi
12071 CF_EOF
12072   ;;
12073 esac
12074
12075 cat >>$cf_edit_man <<CF_EOF
12076         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
12077         if test \$verb = installing ; then
12078                 echo \$verb \$cf_target
12079                 \$INSTALL_DATA \$TMP \$cf_target
12080                 test -d \$cf_subdir\${section} &&
12081                 test -n "\$aliases" && (
12082                         cd \$cf_subdir\${section} && (
12083                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
12084                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
12085                                 cf_target=\`basename \$cf_target\`
12086                                 for cf_alias in \$aliases
12087                                 do
12088                                         if test \$section = 1 ; then
12089                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12090                                         fi
12091
12092                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12093                                                 if test -f \$cf_alias\${suffix} ; then
12094                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12095                                                         then
12096                                                                 continue
12097                                                         fi
12098                                                 fi
12099                                                 echo .. \$verb alias \$cf_alias\${suffix}
12100 CF_EOF
12101 case "x$LN_S" in
12102 (*-f)
12103 cat >>$cf_edit_man <<CF_EOF
12104                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12105 CF_EOF
12106         ;;
12107 (*)
12108 cat >>$cf_edit_man <<CF_EOF
12109                                                 rm -f \$cf_alias\${suffix}
12110                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12111 CF_EOF
12112         ;;
12113 esac
12114 cat >>$cf_edit_man <<CF_EOF
12115                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12116                                                 echo ".so \$cf_source" >\$TMP
12117 CF_EOF
12118 if test -n "$cf_compress" ; then
12119 cat >>$cf_edit_man <<CF_EOF
12120                                                 if test -n "$cf_so_strip" ; then
12121                                                         $cf_compress -f \$TMP
12122                                                         mv \$TMP.$cf_so_strip \$TMP
12123                                                 fi
12124 CF_EOF
12125 fi
12126 cat >>$cf_edit_man <<CF_EOF
12127                                                 echo .. \$verb alias \$cf_alias\${suffix}
12128                                                 rm -f \$cf_alias\${suffix}
12129                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12130                                         fi
12131                                 done
12132                         )
12133                 )
12134         elif test \$verb = removing ; then
12135                 test -f \$cf_target && (
12136                         echo \$verb \$cf_target
12137                         rm -f \$cf_target
12138                 )
12139                 test -d \$cf_subdir\${section} &&
12140                 test -n "\$aliases" && (
12141                         cd \$cf_subdir\${section} && (
12142                                 for cf_alias in \$aliases
12143                                 do
12144                                         if test \$section = 1 ; then
12145                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12146                                         fi
12147
12148                                         echo .. \$verb alias \$cf_alias\${suffix}
12149                                         rm -f \$cf_alias\${suffix}
12150                                 done
12151                         )
12152                 )
12153         else
12154 #               echo ".hy 0"
12155                 cat \$TMP
12156         fi
12157         ;;
12158 esac
12159 done
12160
12161 if test $cf_inboth = yes ; then
12162 if test \$form != format ; then
12163         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12164 fi
12165 fi
12166
12167 exit 0
12168 CF_EOF
12169 chmod 755 $cf_edit_man
12170
12171 ###############################################################################
12172
12173 ### Note that some functions (such as const) are normally disabled anyway.
12174 echo "$as_me:12174: checking if you want to build with function extensions" >&5
12175 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12176
12177 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12178 if test "${enable_ext_funcs+set}" = set; then
12179   enableval="$enable_ext_funcs"
12180   with_ext_funcs=$enableval
12181 else
12182   with_ext_funcs=yes
12183 fi;
12184 echo "$as_me:12184: result: $with_ext_funcs" >&5
12185 echo "${ECHO_T}$with_ext_funcs" >&6
12186 if test "x$with_ext_funcs" = xyes ; then
12187         NCURSES_EXT_FUNCS=1
12188
12189 cat >>confdefs.h <<\EOF
12190 #define NCURSES_EXT_FUNCS 1
12191 EOF
12192
12193 cat >>confdefs.h <<\EOF
12194 #define HAVE_ASSUME_DEFAULT_COLORS 1
12195 EOF
12196
12197 cat >>confdefs.h <<\EOF
12198 #define HAVE_CURSES_VERSION 1
12199 EOF
12200
12201 cat >>confdefs.h <<\EOF
12202 #define HAVE_HAS_KEY 1
12203 EOF
12204
12205 cat >>confdefs.h <<\EOF
12206 #define HAVE_RESIZETERM 1
12207 EOF
12208
12209 cat >>confdefs.h <<\EOF
12210 #define HAVE_RESIZE_TERM 1
12211 EOF
12212
12213 cat >>confdefs.h <<\EOF
12214 #define HAVE_TERM_ENTRY_H 1
12215 EOF
12216
12217 cat >>confdefs.h <<\EOF
12218 #define HAVE_USE_DEFAULT_COLORS 1
12219 EOF
12220
12221 cat >>confdefs.h <<\EOF
12222 #define HAVE_USE_EXTENDED_NAMES 1
12223 EOF
12224
12225 cat >>confdefs.h <<\EOF
12226 #define HAVE_USE_SCREEN 1
12227 EOF
12228
12229 cat >>confdefs.h <<\EOF
12230 #define HAVE_USE_WINDOW 1
12231 EOF
12232
12233 cat >>confdefs.h <<\EOF
12234 #define HAVE_WRESIZE 1
12235 EOF
12236
12237         GENERATED_EXT_FUNCS=generated
12238         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12239 else
12240         NCURSES_EXT_FUNCS=0
12241         GENERATED_EXT_FUNCS=
12242 fi
12243
12244 echo "$as_me:12244: checking if you want to build with SCREEN extensions" >&5
12245 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12246
12247 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12248 if test "${enable_sp_funcs+set}" = set; then
12249   enableval="$enable_sp_funcs"
12250   with_sp_funcs=$enableval
12251 else
12252   with_sp_funcs=$cf_dft_ext_spfuncs
12253 fi;
12254 echo "$as_me:12254: result: $with_sp_funcs" >&5
12255 echo "${ECHO_T}$with_sp_funcs" >&6
12256 if test "x$with_sp_funcs" = xyes ; then
12257         NCURSES_SP_FUNCS=1
12258
12259 cat >>confdefs.h <<\EOF
12260 #define NCURSES_SP_FUNCS 1
12261 EOF
12262
12263 cat >>confdefs.h <<\EOF
12264 #define HAVE_TPUTS_SP 1
12265 EOF
12266
12267         GENERATED_SP_FUNCS=generated
12268 else
12269         NCURSES_SP_FUNCS=0
12270         GENERATED_SP_FUNCS=
12271 fi
12272
12273 echo "$as_me:12273: checking if you want to build with terminal-driver" >&5
12274 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12275
12276 # Check whether --enable-term-driver or --disable-term-driver was given.
12277 if test "${enable_term_driver+set}" = set; then
12278   enableval="$enable_term_driver"
12279   with_term_driver=$enableval
12280 else
12281   with_term_driver=no
12282 fi;
12283 echo "$as_me:12283: result: $with_term_driver" >&5
12284 echo "${ECHO_T}$with_term_driver" >&6
12285 if test "x$with_term_driver" = xyes ; then
12286
12287 cat >>confdefs.h <<\EOF
12288 #define USE_TERM_DRIVER 1
12289 EOF
12290
12291         if test "x$with_termlib" != xno ; then
12292                 { { echo "$as_me:12292: error: The term-driver option conflicts with the termlib option" >&5
12293 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12294    { (exit 1); exit 1; }; }
12295         fi
12296         if test "x$with_sp_funcs" != xyes ; then
12297                 { { echo "$as_me:12297: error: The term-driver option relies upon sp-funcs" >&5
12298 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12299    { (exit 1); exit 1; }; }
12300         fi
12301 fi
12302
12303 ###   use option --enable-const to turn on use of const beyond that in XSI.
12304 echo "$as_me:12304: checking for extended use of const keyword" >&5
12305 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12306
12307 # Check whether --enable-const or --disable-const was given.
12308 if test "${enable_const+set}" = set; then
12309   enableval="$enable_const"
12310   with_ext_const=$enableval
12311 else
12312   with_ext_const=$cf_dft_ext_const
12313 fi;
12314 echo "$as_me:12314: result: $with_ext_const" >&5
12315 echo "${ECHO_T}$with_ext_const" >&6
12316 NCURSES_CONST='/*nothing*/'
12317 if test "x$with_ext_const" = xyes ; then
12318         NCURSES_CONST=const
12319 fi
12320
12321 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12322 echo "$as_me:12322: checking if you want to use extended colors" >&5
12323 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12324
12325 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12326 if test "${enable_ext_colors+set}" = set; then
12327   enableval="$enable_ext_colors"
12328   with_ext_colors=$enableval
12329 else
12330   with_ext_colors=$cf_dft_ext_colors
12331 fi;
12332 echo "$as_me:12332: result: $with_ext_colors" >&5
12333 echo "${ECHO_T}$with_ext_colors" >&6
12334 NCURSES_EXT_COLORS=0
12335 if test "x$with_ext_colors" = xyes ; then
12336         if test "x$with_widec" != xyes ; then
12337                 { echo "$as_me:12337: WARNING: This option applies only to wide-character library" >&5
12338 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12339         else
12340                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12341
12342 if test "${with_abi_version+set}" != set; then
12343         case $cf_cv_rel_version in
12344         (5.*)
12345                 cf_cv_rel_version=6.0
12346                 cf_cv_abi_version=6
12347                 { echo "$as_me:12347: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12348 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12349                 ;;
12350         esac
12351 fi
12352
12353                 NCURSES_EXT_COLORS=1
12354
12355 cat >>confdefs.h <<\EOF
12356 #define NCURSES_EXT_COLORS 1
12357 EOF
12358
12359 cat >>confdefs.h <<\EOF
12360 #define HAVE_ALLOC_PAIR 1
12361 EOF
12362
12363 cat >>confdefs.h <<\EOF
12364 #define HAVE_INIT_EXTENDED_COLOR 1
12365 EOF
12366
12367         fi
12368 fi
12369
12370 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12371 echo "$as_me:12371: checking if you want to use extended mouse encoding" >&5
12372 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12373
12374 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12375 if test "${enable_ext_mouse+set}" = set; then
12376   enableval="$enable_ext_mouse"
12377   with_ext_mouse=$enableval
12378 else
12379   with_ext_mouse=$cf_dft_ext_mouse
12380 fi;
12381 echo "$as_me:12381: result: $with_ext_mouse" >&5
12382 echo "${ECHO_T}$with_ext_mouse" >&6
12383 NCURSES_MOUSE_VERSION=1
12384 if test "x$with_ext_mouse" = xyes ; then
12385         NCURSES_MOUSE_VERSION=2
12386
12387 if test "${with_abi_version+set}" != set; then
12388         case $cf_cv_rel_version in
12389         (5.*)
12390                 cf_cv_rel_version=6.0
12391                 cf_cv_abi_version=6
12392                 { echo "$as_me:12392: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12393 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12394                 ;;
12395         esac
12396 fi
12397
12398 fi
12399
12400 ###   use option --enable-ext-putwin to turn on extended screendumps
12401 echo "$as_me:12401: checking if you want to use extended putwin/screendump" >&5
12402 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12403
12404 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12405 if test "${enable_ext_putwin+set}" = set; then
12406   enableval="$enable_ext_putwin"
12407   with_ext_putwin=$enableval
12408 else
12409   with_ext_putwin=$cf_dft_ext_putwin
12410 fi;
12411 echo "$as_me:12411: result: $with_ext_putwin" >&5
12412 echo "${ECHO_T}$with_ext_putwin" >&6
12413 if test "x$with_ext_putwin" = xyes ; then
12414
12415 cat >>confdefs.h <<\EOF
12416 #define NCURSES_EXT_PUTWIN 1
12417 EOF
12418
12419 fi
12420
12421 echo "$as_me:12421: checking if you want \$NCURSES_NO_PADDING code" >&5
12422 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12423
12424 # Check whether --enable-no-padding or --disable-no-padding was given.
12425 if test "${enable_no_padding+set}" = set; then
12426   enableval="$enable_no_padding"
12427   with_no_padding=$enableval
12428 else
12429   with_no_padding=$with_ext_funcs
12430 fi;
12431 echo "$as_me:12431: result: $with_no_padding" >&5
12432 echo "${ECHO_T}$with_no_padding" >&6
12433 test "x$with_no_padding" = xyes &&
12434 cat >>confdefs.h <<\EOF
12435 #define NCURSES_NO_PADDING 1
12436 EOF
12437
12438 echo "$as_me:12438: checking for ANSI C header files" >&5
12439 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12440 if test "${ac_cv_header_stdc+set}" = set; then
12441   echo $ECHO_N "(cached) $ECHO_C" >&6
12442 else
12443   cat >conftest.$ac_ext <<_ACEOF
12444 #line 12444 "configure"
12445 #include "confdefs.h"
12446 #include <stdlib.h>
12447 #include <stdarg.h>
12448 #include <string.h>
12449 #include <float.h>
12450
12451 _ACEOF
12452 if { (eval echo "$as_me:12452: \"$ac_cpp conftest.$ac_ext\"") >&5
12453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12454   ac_status=$?
12455   egrep -v '^ *\+' conftest.er1 >conftest.err
12456   rm -f conftest.er1
12457   cat conftest.err >&5
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); } >/dev/null; then
12460   if test -s conftest.err; then
12461     ac_cpp_err=$ac_c_preproc_warn_flag
12462   else
12463     ac_cpp_err=
12464   fi
12465 else
12466   ac_cpp_err=yes
12467 fi
12468 if test -z "$ac_cpp_err"; then
12469   ac_cv_header_stdc=yes
12470 else
12471   echo "$as_me: failed program was:" >&5
12472   cat conftest.$ac_ext >&5
12473   ac_cv_header_stdc=no
12474 fi
12475 rm -f conftest.err conftest.$ac_ext
12476
12477 if test $ac_cv_header_stdc = yes; then
12478   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12479   cat >conftest.$ac_ext <<_ACEOF
12480 #line 12480 "configure"
12481 #include "confdefs.h"
12482 #include <string.h>
12483
12484 _ACEOF
12485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12486   egrep "memchr" >/dev/null 2>&1; then
12487   :
12488 else
12489   ac_cv_header_stdc=no
12490 fi
12491 rm -rf conftest*
12492
12493 fi
12494
12495 if test $ac_cv_header_stdc = yes; then
12496   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12497   cat >conftest.$ac_ext <<_ACEOF
12498 #line 12498 "configure"
12499 #include "confdefs.h"
12500 #include <stdlib.h>
12501
12502 _ACEOF
12503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12504   egrep "free" >/dev/null 2>&1; then
12505   :
12506 else
12507   ac_cv_header_stdc=no
12508 fi
12509 rm -rf conftest*
12510
12511 fi
12512
12513 if test $ac_cv_header_stdc = yes; then
12514   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12515   if test "$cross_compiling" = yes; then
12516   :
12517 else
12518   cat >conftest.$ac_ext <<_ACEOF
12519 #line 12519 "configure"
12520 #include "confdefs.h"
12521 #include <ctype.h>
12522 #if ((' ' & 0x0FF) == 0x020)
12523 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12524 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12525 #else
12526 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12527                      || ('j' <= (c) && (c) <= 'r') \
12528                      || ('s' <= (c) && (c) <= 'z'))
12529 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12530 #endif
12531
12532 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12533 int
12534 main (void)
12535 {
12536   int i;
12537   for (i = 0; i < 256; i++)
12538     if (XOR (islower (i), ISLOWER (i))
12539         || toupper (i) != TOUPPER (i))
12540       $ac_main_return(2);
12541   $ac_main_return (0);
12542 }
12543 _ACEOF
12544 rm -f conftest$ac_exeext
12545 if { (eval echo "$as_me:12545: \"$ac_link\"") >&5
12546   (eval $ac_link) 2>&5
12547   ac_status=$?
12548   echo "$as_me:12548: \$? = $ac_status" >&5
12549   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12550   { (eval echo "$as_me:12550: \"$ac_try\"") >&5
12551   (eval $ac_try) 2>&5
12552   ac_status=$?
12553   echo "$as_me:12553: \$? = $ac_status" >&5
12554   (exit $ac_status); }; }; then
12555   :
12556 else
12557   echo "$as_me: program exited with status $ac_status" >&5
12558 echo "$as_me: failed program was:" >&5
12559 cat conftest.$ac_ext >&5
12560 ac_cv_header_stdc=no
12561 fi
12562 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12563 fi
12564 fi
12565 fi
12566 echo "$as_me:12566: result: $ac_cv_header_stdc" >&5
12567 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12568 if test $ac_cv_header_stdc = yes; then
12569
12570 cat >>confdefs.h <<\EOF
12571 #define STDC_HEADERS 1
12572 EOF
12573
12574 fi
12575
12576 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12577
12578 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12579                   inttypes.h stdint.h unistd.h
12580 do
12581 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12582 echo "$as_me:12582: checking for $ac_header" >&5
12583 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12584 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12585   echo $ECHO_N "(cached) $ECHO_C" >&6
12586 else
12587   cat >conftest.$ac_ext <<_ACEOF
12588 #line 12588 "configure"
12589 #include "confdefs.h"
12590 $ac_includes_default
12591 #include <$ac_header>
12592 _ACEOF
12593 rm -f conftest.$ac_objext
12594 if { (eval echo "$as_me:12594: \"$ac_compile\"") >&5
12595   (eval $ac_compile) 2>&5
12596   ac_status=$?
12597   echo "$as_me:12597: \$? = $ac_status" >&5
12598   (exit $ac_status); } &&
12599          { ac_try='test -s conftest.$ac_objext'
12600   { (eval echo "$as_me:12600: \"$ac_try\"") >&5
12601   (eval $ac_try) 2>&5
12602   ac_status=$?
12603   echo "$as_me:12603: \$? = $ac_status" >&5
12604   (exit $ac_status); }; }; then
12605   eval "$as_ac_Header=yes"
12606 else
12607   echo "$as_me: failed program was:" >&5
12608 cat conftest.$ac_ext >&5
12609 eval "$as_ac_Header=no"
12610 fi
12611 rm -f conftest.$ac_objext conftest.$ac_ext
12612 fi
12613 echo "$as_me:12613: result: `eval echo '${'$as_ac_Header'}'`" >&5
12614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12616   cat >>confdefs.h <<EOF
12617 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12618 EOF
12619
12620 fi
12621 done
12622
12623 echo "$as_me:12623: checking for signed char" >&5
12624 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12625 if test "${ac_cv_type_signed_char+set}" = set; then
12626   echo $ECHO_N "(cached) $ECHO_C" >&6
12627 else
12628   cat >conftest.$ac_ext <<_ACEOF
12629 #line 12629 "configure"
12630 #include "confdefs.h"
12631 $ac_includes_default
12632 int
12633 main (void)
12634 {
12635 if ((signed char *) 0)
12636   return 0;
12637 if (sizeof (signed char))
12638   return 0;
12639   ;
12640   return 0;
12641 }
12642 _ACEOF
12643 rm -f conftest.$ac_objext
12644 if { (eval echo "$as_me:12644: \"$ac_compile\"") >&5
12645   (eval $ac_compile) 2>&5
12646   ac_status=$?
12647   echo "$as_me:12647: \$? = $ac_status" >&5
12648   (exit $ac_status); } &&
12649          { ac_try='test -s conftest.$ac_objext'
12650   { (eval echo "$as_me:12650: \"$ac_try\"") >&5
12651   (eval $ac_try) 2>&5
12652   ac_status=$?
12653   echo "$as_me:12653: \$? = $ac_status" >&5
12654   (exit $ac_status); }; }; then
12655   ac_cv_type_signed_char=yes
12656 else
12657   echo "$as_me: failed program was:" >&5
12658 cat conftest.$ac_ext >&5
12659 ac_cv_type_signed_char=no
12660 fi
12661 rm -f conftest.$ac_objext conftest.$ac_ext
12662 fi
12663 echo "$as_me:12663: result: $ac_cv_type_signed_char" >&5
12664 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12665
12666 echo "$as_me:12666: checking size of signed char" >&5
12667 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12668 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12669   echo $ECHO_N "(cached) $ECHO_C" >&6
12670 else
12671   if test "$ac_cv_type_signed_char" = yes; then
12672   if test "$cross_compiling" = yes; then
12673   # Depending upon the size, compute the lo and hi bounds.
12674 cat >conftest.$ac_ext <<_ACEOF
12675 #line 12675 "configure"
12676 #include "confdefs.h"
12677 $ac_includes_default
12678 int
12679 main (void)
12680 {
12681 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12682   ;
12683   return 0;
12684 }
12685 _ACEOF
12686 rm -f conftest.$ac_objext
12687 if { (eval echo "$as_me:12687: \"$ac_compile\"") >&5
12688   (eval $ac_compile) 2>&5
12689   ac_status=$?
12690   echo "$as_me:12690: \$? = $ac_status" >&5
12691   (exit $ac_status); } &&
12692          { ac_try='test -s conftest.$ac_objext'
12693   { (eval echo "$as_me:12693: \"$ac_try\"") >&5
12694   (eval $ac_try) 2>&5
12695   ac_status=$?
12696   echo "$as_me:12696: \$? = $ac_status" >&5
12697   (exit $ac_status); }; }; then
12698   ac_lo=0 ac_mid=0
12699   while :; do
12700     cat >conftest.$ac_ext <<_ACEOF
12701 #line 12701 "configure"
12702 #include "confdefs.h"
12703 $ac_includes_default
12704 int
12705 main (void)
12706 {
12707 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12708   ;
12709   return 0;
12710 }
12711 _ACEOF
12712 rm -f conftest.$ac_objext
12713 if { (eval echo "$as_me:12713: \"$ac_compile\"") >&5
12714   (eval $ac_compile) 2>&5
12715   ac_status=$?
12716   echo "$as_me:12716: \$? = $ac_status" >&5
12717   (exit $ac_status); } &&
12718          { ac_try='test -s conftest.$ac_objext'
12719   { (eval echo "$as_me:12719: \"$ac_try\"") >&5
12720   (eval $ac_try) 2>&5
12721   ac_status=$?
12722   echo "$as_me:12722: \$? = $ac_status" >&5
12723   (exit $ac_status); }; }; then
12724   ac_hi=$ac_mid; break
12725 else
12726   echo "$as_me: failed program was:" >&5
12727 cat conftest.$ac_ext >&5
12728 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12729 fi
12730 rm -f conftest.$ac_objext conftest.$ac_ext
12731   done
12732 else
12733   echo "$as_me: failed program was:" >&5
12734 cat conftest.$ac_ext >&5
12735 ac_hi=-1 ac_mid=-1
12736   while :; do
12737     cat >conftest.$ac_ext <<_ACEOF
12738 #line 12738 "configure"
12739 #include "confdefs.h"
12740 $ac_includes_default
12741 int
12742 main (void)
12743 {
12744 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12745   ;
12746   return 0;
12747 }
12748 _ACEOF
12749 rm -f conftest.$ac_objext
12750 if { (eval echo "$as_me:12750: \"$ac_compile\"") >&5
12751   (eval $ac_compile) 2>&5
12752   ac_status=$?
12753   echo "$as_me:12753: \$? = $ac_status" >&5
12754   (exit $ac_status); } &&
12755          { ac_try='test -s conftest.$ac_objext'
12756   { (eval echo "$as_me:12756: \"$ac_try\"") >&5
12757   (eval $ac_try) 2>&5
12758   ac_status=$?
12759   echo "$as_me:12759: \$? = $ac_status" >&5
12760   (exit $ac_status); }; }; then
12761   ac_lo=$ac_mid; break
12762 else
12763   echo "$as_me: failed program was:" >&5
12764 cat conftest.$ac_ext >&5
12765 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12766 fi
12767 rm -f conftest.$ac_objext conftest.$ac_ext
12768   done
12769 fi
12770 rm -f conftest.$ac_objext conftest.$ac_ext
12771 # Binary search between lo and hi bounds.
12772 while test "x$ac_lo" != "x$ac_hi"; do
12773   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12774   cat >conftest.$ac_ext <<_ACEOF
12775 #line 12775 "configure"
12776 #include "confdefs.h"
12777 $ac_includes_default
12778 int
12779 main (void)
12780 {
12781 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12782   ;
12783   return 0;
12784 }
12785 _ACEOF
12786 rm -f conftest.$ac_objext
12787 if { (eval echo "$as_me:12787: \"$ac_compile\"") >&5
12788   (eval $ac_compile) 2>&5
12789   ac_status=$?
12790   echo "$as_me:12790: \$? = $ac_status" >&5
12791   (exit $ac_status); } &&
12792          { ac_try='test -s conftest.$ac_objext'
12793   { (eval echo "$as_me:12793: \"$ac_try\"") >&5
12794   (eval $ac_try) 2>&5
12795   ac_status=$?
12796   echo "$as_me:12796: \$? = $ac_status" >&5
12797   (exit $ac_status); }; }; then
12798   ac_hi=$ac_mid
12799 else
12800   echo "$as_me: failed program was:" >&5
12801 cat conftest.$ac_ext >&5
12802 ac_lo=`expr $ac_mid + 1`
12803 fi
12804 rm -f conftest.$ac_objext conftest.$ac_ext
12805 done
12806 ac_cv_sizeof_signed_char=$ac_lo
12807 else
12808   if test "$cross_compiling" = yes; then
12809   { { echo "$as_me:12809: error: cannot run test program while cross compiling" >&5
12810 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12811    { (exit 1); exit 1; }; }
12812 else
12813   cat >conftest.$ac_ext <<_ACEOF
12814 #line 12814 "configure"
12815 #include "confdefs.h"
12816 $ac_includes_default
12817 int
12818 main (void)
12819 {
12820 FILE *f = fopen ("conftest.val", "w");
12821 if (!f)
12822   $ac_main_return (1);
12823 fprintf (f, "%d", (sizeof (signed char)));
12824 fclose (f);
12825   ;
12826   return 0;
12827 }
12828 _ACEOF
12829 rm -f conftest$ac_exeext
12830 if { (eval echo "$as_me:12830: \"$ac_link\"") >&5
12831   (eval $ac_link) 2>&5
12832   ac_status=$?
12833   echo "$as_me:12833: \$? = $ac_status" >&5
12834   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12835   { (eval echo "$as_me:12835: \"$ac_try\"") >&5
12836   (eval $ac_try) 2>&5
12837   ac_status=$?
12838   echo "$as_me:12838: \$? = $ac_status" >&5
12839   (exit $ac_status); }; }; then
12840   ac_cv_sizeof_signed_char=`cat conftest.val`
12841 else
12842   echo "$as_me: program exited with status $ac_status" >&5
12843 echo "$as_me: failed program was:" >&5
12844 cat conftest.$ac_ext >&5
12845 fi
12846 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12847 fi
12848 fi
12849 rm -f conftest.val
12850 else
12851   ac_cv_sizeof_signed_char=0
12852 fi
12853 fi
12854 echo "$as_me:12854: result: $ac_cv_sizeof_signed_char" >&5
12855 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12856 cat >>confdefs.h <<EOF
12857 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12858 EOF
12859
12860 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12861         NCURSES_SBOOL="signed char"
12862 else
12863         NCURSES_SBOOL="char"
12864 fi
12865 echo "$as_me:12865: checking if you want to use signed Boolean array in term.h" >&5
12866 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12867
12868 # Check whether --enable-signed-char or --disable-signed-char was given.
12869 if test "${enable_signed_char+set}" = set; then
12870   enableval="$enable_signed_char"
12871   with_signed_char=$enableval
12872 else
12873   with_signed_char=no
12874 fi;
12875 echo "$as_me:12875: result: $with_signed_char" >&5
12876 echo "${ECHO_T}$with_signed_char" >&6
12877 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12878
12879 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12880 echo "$as_me:12880: checking if you want SIGWINCH handler" >&5
12881 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12882
12883 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12884 if test "${enable_sigwinch+set}" = set; then
12885   enableval="$enable_sigwinch"
12886   with_sigwinch=$enableval
12887 else
12888   with_sigwinch=$with_ext_funcs
12889 fi;
12890 echo "$as_me:12890: result: $with_sigwinch" >&5
12891 echo "${ECHO_T}$with_sigwinch" >&6
12892 test "x$with_sigwinch" = xyes &&
12893 cat >>confdefs.h <<\EOF
12894 #define USE_SIGWINCH 1
12895 EOF
12896
12897 ###   use option --enable-tcap-names to allow user to define new capabilities
12898 echo "$as_me:12898: checking if you want user-definable terminal capabilities like termcap" >&5
12899 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12900
12901 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12902 if test "${enable_tcap_names+set}" = set; then
12903   enableval="$enable_tcap_names"
12904   with_tcap_names=$enableval
12905 else
12906   with_tcap_names=$with_ext_funcs
12907 fi;
12908 echo "$as_me:12908: result: $with_tcap_names" >&5
12909 echo "${ECHO_T}$with_tcap_names" >&6
12910 NCURSES_XNAMES=0
12911 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12912
12913 ##############################################################################
12914
12915 echo "$as_me:12915: checking if you want to link with the pthread library" >&5
12916 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12917
12918 # Check whether --with-pthread or --without-pthread was given.
12919 if test "${with_pthread+set}" = set; then
12920   withval="$with_pthread"
12921   with_pthread=$withval
12922 else
12923   with_pthread=no
12924 fi;
12925 echo "$as_me:12925: result: $with_pthread" >&5
12926 echo "${ECHO_T}$with_pthread" >&6
12927
12928 if test "$with_pthread" != no ; then
12929         echo "$as_me:12929: checking for pthread.h" >&5
12930 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12931 if test "${ac_cv_header_pthread_h+set}" = set; then
12932   echo $ECHO_N "(cached) $ECHO_C" >&6
12933 else
12934   cat >conftest.$ac_ext <<_ACEOF
12935 #line 12935 "configure"
12936 #include "confdefs.h"
12937 #include <pthread.h>
12938 _ACEOF
12939 if { (eval echo "$as_me:12939: \"$ac_cpp conftest.$ac_ext\"") >&5
12940   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12941   ac_status=$?
12942   egrep -v '^ *\+' conftest.er1 >conftest.err
12943   rm -f conftest.er1
12944   cat conftest.err >&5
12945   echo "$as_me:12945: \$? = $ac_status" >&5
12946   (exit $ac_status); } >/dev/null; then
12947   if test -s conftest.err; then
12948     ac_cpp_err=$ac_c_preproc_warn_flag
12949   else
12950     ac_cpp_err=
12951   fi
12952 else
12953   ac_cpp_err=yes
12954 fi
12955 if test -z "$ac_cpp_err"; then
12956   ac_cv_header_pthread_h=yes
12957 else
12958   echo "$as_me: failed program was:" >&5
12959   cat conftest.$ac_ext >&5
12960   ac_cv_header_pthread_h=no
12961 fi
12962 rm -f conftest.err conftest.$ac_ext
12963 fi
12964 echo "$as_me:12964: result: $ac_cv_header_pthread_h" >&5
12965 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12966 if test $ac_cv_header_pthread_h = yes; then
12967
12968 cat >>confdefs.h <<\EOF
12969 #define HAVE_PTHREADS_H 1
12970 EOF
12971
12972         for cf_lib_pthread in pthread c_r
12973         do
12974             echo "$as_me:12974: checking if we can link with the $cf_lib_pthread library" >&5
12975 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12976             cf_save_LIBS="$LIBS"
12977
12978 cf_add_libs="-l$cf_lib_pthread"
12979 # Filter out duplicates - this happens with badly-designed ".pc" files...
12980 for cf_add_1lib in $LIBS
12981 do
12982         for cf_add_2lib in $cf_add_libs
12983         do
12984                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12985                 then
12986                         cf_add_1lib=
12987                         break
12988                 fi
12989         done
12990         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12991 done
12992 LIBS="$cf_add_libs"
12993
12994             cat >conftest.$ac_ext <<_ACEOF
12995 #line 12995 "configure"
12996 #include "confdefs.h"
12997
12998 #include <pthread.h>
12999
13000 int
13001 main (void)
13002 {
13003
13004                 int rc = pthread_create(0,0,0,0);
13005                 int r2 = pthread_mutexattr_settype(0, 0);
13006
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f conftest.$ac_objext conftest$ac_exeext
13012 if { (eval echo "$as_me:13012: \"$ac_link\"") >&5
13013   (eval $ac_link) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit $ac_status); } &&
13017          { ac_try='test -s conftest$ac_exeext'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit $ac_status); }; }; then
13023   with_pthread=yes
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 cat conftest.$ac_ext >&5
13027 with_pthread=no
13028 fi
13029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13030             LIBS="$cf_save_LIBS"
13031             echo "$as_me:13031: result: $with_pthread" >&5
13032 echo "${ECHO_T}$with_pthread" >&6
13033             test "$with_pthread" = yes && break
13034         done
13035
13036         if test "$with_pthread" = yes ; then
13037
13038 cf_add_libs="-l$cf_lib_pthread"
13039 # Filter out duplicates - this happens with badly-designed ".pc" files...
13040 for cf_add_1lib in $LIBS
13041 do
13042         for cf_add_2lib in $cf_add_libs
13043         do
13044                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13045                 then
13046                         cf_add_1lib=
13047                         break
13048                 fi
13049         done
13050         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13051 done
13052 LIBS="$cf_add_libs"
13053
13054 cat >>confdefs.h <<\EOF
13055 #define HAVE_LIBPTHREADS 1
13056 EOF
13057
13058         else
13059             { { echo "$as_me:13059: error: Cannot link with pthread library" >&5
13060 echo "$as_me: error: Cannot link with pthread library" >&2;}
13061    { (exit 1); exit 1; }; }
13062         fi
13063
13064 fi
13065
13066 fi
13067
13068 if test "x$with_pthread" != xno; then
13069         echo "$as_me:13069: checking for pthread_kill" >&5
13070 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
13071 if test "${ac_cv_func_pthread_kill+set}" = set; then
13072   echo $ECHO_N "(cached) $ECHO_C" >&6
13073 else
13074   cat >conftest.$ac_ext <<_ACEOF
13075 #line 13075 "configure"
13076 #include "confdefs.h"
13077 /* System header to define __stub macros and hopefully few prototypes,
13078     which can conflict with char pthread_kill (); below.  */
13079 #include <assert.h>
13080 /* Override any gcc2 internal prototype to avoid an error.  */
13081 #ifdef __cplusplus
13082 extern "C"
13083 #endif
13084 /* We use char because int might match the return type of a gcc2
13085    builtin and then its argument prototype would still apply.  */
13086 char pthread_kill ();
13087 char (*f) ();
13088
13089 int
13090 main (void)
13091 {
13092 /* The GNU C library defines this for functions which it implements
13093     to always fail with ENOSYS.  Some functions are actually named
13094     something starting with __ and the normal name is an alias.  */
13095 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13096 choke me
13097 #else
13098 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13099 #endif
13100
13101   ;
13102   return 0;
13103 }
13104 _ACEOF
13105 rm -f conftest.$ac_objext conftest$ac_exeext
13106 if { (eval echo "$as_me:13106: \"$ac_link\"") >&5
13107   (eval $ac_link) 2>&5
13108   ac_status=$?
13109   echo "$as_me:13109: \$? = $ac_status" >&5
13110   (exit $ac_status); } &&
13111          { ac_try='test -s conftest$ac_exeext'
13112   { (eval echo "$as_me:13112: \"$ac_try\"") >&5
13113   (eval $ac_try) 2>&5
13114   ac_status=$?
13115   echo "$as_me:13115: \$? = $ac_status" >&5
13116   (exit $ac_status); }; }; then
13117   ac_cv_func_pthread_kill=yes
13118 else
13119   echo "$as_me: failed program was:" >&5
13120 cat conftest.$ac_ext >&5
13121 ac_cv_func_pthread_kill=no
13122 fi
13123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13124 fi
13125 echo "$as_me:13125: result: $ac_cv_func_pthread_kill" >&5
13126 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13127 if test $ac_cv_func_pthread_kill = yes; then
13128
13129                 echo "$as_me:13129: checking if you want to allow EINTR in wgetch with pthreads" >&5
13130 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13131
13132 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13133 if test "${enable_pthreads_eintr+set}" = set; then
13134   enableval="$enable_pthreads_eintr"
13135   use_pthreads_eintr=$enableval
13136 else
13137   use_pthreads_eintr=no
13138 fi;
13139                 echo "$as_me:13139: result: $use_pthreads_eintr" >&5
13140 echo "${ECHO_T}$use_pthreads_eintr" >&6
13141                 if test "x$use_pthreads_eintr" = xyes ; then
13142
13143 cat >>confdefs.h <<\EOF
13144 #define USE_PTHREADS_EINTR 1
13145 EOF
13146
13147                 fi
13148 fi
13149
13150         echo "$as_me:13150: checking if you want to use weak-symbols for pthreads" >&5
13151 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13152
13153 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13154 if test "${enable_weak_symbols+set}" = set; then
13155   enableval="$enable_weak_symbols"
13156   use_weak_symbols=$enableval
13157 else
13158   use_weak_symbols=no
13159 fi;
13160         echo "$as_me:13160: result: $use_weak_symbols" >&5
13161 echo "${ECHO_T}$use_weak_symbols" >&6
13162         if test "x$use_weak_symbols" = xyes ; then
13163
13164 echo "$as_me:13164: checking if $CC supports weak symbols" >&5
13165 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13166 if test "${cf_cv_weak_symbols+set}" = set; then
13167   echo $ECHO_N "(cached) $ECHO_C" >&6
13168 else
13169
13170 cat >conftest.$ac_ext <<_ACEOF
13171 #line 13171 "configure"
13172 #include "confdefs.h"
13173
13174 #include <stdio.h>
13175 int
13176 main (void)
13177 {
13178
13179 #if defined(__GNUC__)
13180 #  if defined __USE_ISOC99
13181 #    define _cat_pragma(exp)    _Pragma(#exp)
13182 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13183 #  else
13184 #    define _weak_pragma(exp)
13185 #  endif
13186 #  define _declare(name)        __extension__ extern __typeof__(name) name
13187 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13188 #endif
13189
13190 weak_symbol(fopen);
13191
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f conftest.$ac_objext
13197 if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
13198   (eval $ac_compile) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit $ac_status); } &&
13202          { ac_try='test -s conftest.$ac_objext'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit $ac_status); }; }; then
13208   cf_cv_weak_symbols=yes
13209 else
13210   echo "$as_me: failed program was:" >&5
13211 cat conftest.$ac_ext >&5
13212 cf_cv_weak_symbols=no
13213 fi
13214 rm -f conftest.$ac_objext conftest.$ac_ext
13215
13216 fi
13217 echo "$as_me:13217: result: $cf_cv_weak_symbols" >&5
13218 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13219
13220         else
13221                 cf_cv_weak_symbols=no
13222         fi
13223
13224         if test "x$cf_cv_weak_symbols" = xyes ; then
13225
13226 cat >>confdefs.h <<\EOF
13227 #define USE_WEAK_SYMBOLS 1
13228 EOF
13229
13230         fi
13231 fi
13232
13233 PTHREAD=
13234 if test "x$with_pthread" = "xyes" ; then
13235
13236 cat >>confdefs.h <<\EOF
13237 #define USE_PTHREADS 1
13238 EOF
13239
13240         enable_reentrant=yes
13241         if test "x$cf_cv_weak_symbols" = xyes ; then
13242                 PTHREAD=-lpthread
13243         fi
13244 fi
13245
13246 # Reentrant code has to be opaque; there's little advantage to making ncurses
13247 # opaque outside of that, so there is no --enable-opaque option.  We can use
13248 # this option without --with-pthreads, but this will be always set for
13249 # pthreads.
13250 echo "$as_me:13250: checking if you want reentrant code" >&5
13251 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13252
13253 # Check whether --enable-reentrant or --disable-reentrant was given.
13254 if test "${enable_reentrant+set}" = set; then
13255   enableval="$enable_reentrant"
13256   with_reentrant=$enableval
13257 else
13258   with_reentrant=no
13259 fi;
13260 echo "$as_me:13260: result: $with_reentrant" >&5
13261 echo "${ECHO_T}$with_reentrant" >&6
13262 if test "x$with_reentrant" = xyes ; then
13263         cf_cv_enable_reentrant=1
13264         cf_cv_enable_opaque="NCURSES_INTERNALS"
13265         NCURSES_SIZE_T=int
13266         if test "x$cf_cv_weak_symbols" = xyes ; then
13267
13268 # remove pthread library from $LIBS
13269 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13270
13271 cf_add_libs="-lpthread"
13272 # Filter out duplicates - this happens with badly-designed ".pc" files...
13273 for cf_add_1lib in $TEST_LIBS
13274 do
13275         for cf_add_2lib in $cf_add_libs
13276         do
13277                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13278                 then
13279                         cf_add_1lib=
13280                         break
13281                 fi
13282         done
13283         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13284 done
13285 TEST_LIBS="$cf_add_libs"
13286
13287 cf_add_libs="-lpthread"
13288 # Filter out duplicates - this happens with badly-designed ".pc" files...
13289 for cf_add_1lib in $TEST_LIBS2
13290 do
13291         for cf_add_2lib in $cf_add_libs
13292         do
13293                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13294                 then
13295                         cf_add_1lib=
13296                         break
13297                 fi
13298         done
13299         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13300 done
13301 TEST_LIBS2="$cf_add_libs"
13302
13303         else
13304                 # when not using weak symbols but with_reentrant,
13305                 # add 't' to the library suffix on all platforms
13306                 # except cygwin, where we only do that if ALSO
13307                 # compiling with full thread support.
13308                 case "$host" in
13309                 (*cygwin* | *msys*)
13310                         if test "$with_pthread" = "yes" ; then
13311                                 if test "x$disable_lib_suffixes" = "xno" ; then
13312                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13313                                 fi
13314                         fi ;;
13315                 (*)
13316                         if test "x$disable_lib_suffixes" = "xno" ; then
13317                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13318                         fi
13319                         ;;
13320                 esac
13321         fi
13322
13323 cat >>confdefs.h <<\EOF
13324 #define USE_REENTRANT 1
13325 EOF
13326
13327 if test "${with_abi_version+set}" != set; then
13328         case $cf_cv_rel_version in
13329         (5.*)
13330                 cf_cv_rel_version=6.0
13331                 cf_cv_abi_version=6
13332                 { echo "$as_me:13332: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13333 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13334                 ;;
13335         esac
13336 fi
13337
13338 else
13339         cf_cv_enable_reentrant=0
13340         cf_cv_enable_opaque="NCURSES_OPAQUE"
13341         NCURSES_SIZE_T=short
13342 fi
13343
13344 echo "$as_me:13344: checking if you want opaque curses-library structures" >&5
13345 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13346
13347 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13348 if test "${enable_opaque_curses+set}" = set; then
13349   enableval="$enable_opaque_curses"
13350   test "$enableval" != yes && enableval=no
13351         if test "$enableval" != "no" ; then
13352     enable_opaque_curses=yes
13353         else
13354
13355          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13356          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13357
13358         fi
13359 else
13360   enableval=no
13361
13362          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13363          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13364
13365 fi;
13366 echo "$as_me:13366: result: $enable_opaque_curses" >&5
13367 echo "${ECHO_T}$enable_opaque_curses" >&6
13368
13369 test "$cf_cv_enable_reentrant" = 1 && \
13370 test "$enable_opaque_curses" = no && \
13371 { { echo "$as_me:13371: error: reentrant configuration requires opaque library" >&5
13372 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13373    { (exit 1); exit 1; }; }
13374
13375 echo "$as_me:13375: checking if you want opaque form-library structures" >&5
13376 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13377
13378 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13379 if test "${enable_opaque_form+set}" = set; then
13380   enableval="$enable_opaque_form"
13381   enable_opaque_form=yes
13382 else
13383   enable_opaque_form=no
13384 fi;
13385 echo "$as_me:13385: result: $enable_opaque_form" >&5
13386 echo "${ECHO_T}$enable_opaque_form" >&6
13387
13388 echo "$as_me:13388: checking if you want opaque menu-library structures" >&5
13389 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13390
13391 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13392 if test "${enable_opaque_menu+set}" = set; then
13393   enableval="$enable_opaque_menu"
13394   enable_opaque_menu=yes
13395 else
13396   enable_opaque_menu=no
13397 fi;
13398 echo "$as_me:13398: result: $enable_opaque_menu" >&5
13399 echo "${ECHO_T}$enable_opaque_menu" >&6
13400
13401 echo "$as_me:13401: checking if you want opaque panel-library structures" >&5
13402 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13403
13404 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13405 if test "${enable_opaque_panel+set}" = set; then
13406   enableval="$enable_opaque_panel"
13407   enable_opaque_panel=yes
13408 else
13409   enable_opaque_panel=no
13410 fi;
13411 echo "$as_me:13411: result: $enable_opaque_panel" >&5
13412 echo "${ECHO_T}$enable_opaque_panel" >&6
13413
13414 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13415 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13416 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13417 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13418
13419 ### Allow using a different wrap-prefix
13420 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13421         echo "$as_me:13421: checking for prefix used to wrap public variables" >&5
13422 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13423
13424 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13425 if test "${with_wrap_prefix+set}" = set; then
13426   withval="$with_wrap_prefix"
13427   NCURSES_WRAP_PREFIX=$withval
13428 else
13429   NCURSES_WRAP_PREFIX=_nc_
13430 fi;
13431         echo "$as_me:13431: result: $NCURSES_WRAP_PREFIX" >&5
13432 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13433 else
13434         NCURSES_WRAP_PREFIX=_nc_
13435 fi
13436
13437 cat >>confdefs.h <<EOF
13438 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13439 EOF
13440
13441 ###############################################################################
13442 # These options are relatively safe to experiment with.
13443
13444 echo "$as_me:13444: checking if you want all development code" >&5
13445 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13446
13447 # Check whether --with-develop or --without-develop was given.
13448 if test "${with_develop+set}" = set; then
13449   withval="$with_develop"
13450   with_develop=$withval
13451 else
13452   with_develop=no
13453 fi;
13454 echo "$as_me:13454: result: $with_develop" >&5
13455 echo "${ECHO_T}$with_develop" >&6
13456
13457 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13458 echo "$as_me:13458: checking if you want hard-tabs code" >&5
13459 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13460
13461 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13462 if test "${enable_hard_tabs+set}" = set; then
13463   enableval="$enable_hard_tabs"
13464
13465 else
13466   enable_hard_tabs=$with_develop
13467 fi;
13468 echo "$as_me:13468: result: $enable_hard_tabs" >&5
13469 echo "${ECHO_T}$enable_hard_tabs" >&6
13470 test "x$enable_hard_tabs" = xyes &&
13471 cat >>confdefs.h <<\EOF
13472 #define USE_HARD_TABS 1
13473 EOF
13474
13475 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13476 echo "$as_me:13476: checking if you want limited support for xmc" >&5
13477 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13478
13479 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13480 if test "${enable_xmc_glitch+set}" = set; then
13481   enableval="$enable_xmc_glitch"
13482
13483 else
13484   enable_xmc_glitch=$with_develop
13485 fi;
13486 echo "$as_me:13486: result: $enable_xmc_glitch" >&5
13487 echo "${ECHO_T}$enable_xmc_glitch" >&6
13488 test "x$enable_xmc_glitch" = xyes &&
13489 cat >>confdefs.h <<\EOF
13490 #define USE_XMC_SUPPORT 1
13491 EOF
13492
13493 ###############################################################################
13494 # These are just experimental, probably should not be in a package:
13495
13496 echo "$as_me:13496: checking if you do not want to assume colors are white-on-black" >&5
13497 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13498
13499 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13500 if test "${enable_assumed_color+set}" = set; then
13501   enableval="$enable_assumed_color"
13502   with_assumed_color=$enableval
13503 else
13504   with_assumed_color=yes
13505 fi;
13506 echo "$as_me:13506: result: $with_assumed_color" >&5
13507 echo "${ECHO_T}$with_assumed_color" >&6
13508 test "x$with_assumed_color" = xyes &&
13509 cat >>confdefs.h <<\EOF
13510 #define USE_ASSUMED_COLOR 1
13511 EOF
13512
13513 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13514 echo "$as_me:13514: checking if you want hashmap scrolling-optimization code" >&5
13515 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13516
13517 # Check whether --enable-hashmap or --disable-hashmap was given.
13518 if test "${enable_hashmap+set}" = set; then
13519   enableval="$enable_hashmap"
13520   with_hashmap=$enableval
13521 else
13522   with_hashmap=yes
13523 fi;
13524 echo "$as_me:13524: result: $with_hashmap" >&5
13525 echo "${ECHO_T}$with_hashmap" >&6
13526 test "x$with_hashmap" = xyes &&
13527 cat >>confdefs.h <<\EOF
13528 #define USE_HASHMAP 1
13529 EOF
13530
13531 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13532 echo "$as_me:13532: checking if you want colorfgbg code" >&5
13533 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13534
13535 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13536 if test "${enable_colorfgbg+set}" = set; then
13537   enableval="$enable_colorfgbg"
13538   with_colorfgbg=$enableval
13539 else
13540   with_colorfgbg=no
13541 fi;
13542 echo "$as_me:13542: result: $with_colorfgbg" >&5
13543 echo "${ECHO_T}$with_colorfgbg" >&6
13544 test "x$with_colorfgbg" = xyes &&
13545 cat >>confdefs.h <<\EOF
13546 #define USE_COLORFGBG 1
13547 EOF
13548
13549 ###   use option --enable-interop to turn on use of bindings used for interop
13550 echo "$as_me:13550: checking if you want interop bindings" >&5
13551 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13552
13553 # Check whether --enable-interop or --disable-interop was given.
13554 if test "${enable_interop+set}" = set; then
13555   enableval="$enable_interop"
13556   with_exp_interop=$enableval
13557 else
13558   with_exp_interop=$cf_dft_interop
13559 fi;
13560 echo "$as_me:13560: result: $with_exp_interop" >&5
13561 echo "${ECHO_T}$with_exp_interop" >&6
13562
13563 NCURSES_INTEROP_FUNCS=0
13564 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13565
13566 echo "$as_me:13566: checking if you want experimental safe-sprintf code" >&5
13567 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13568
13569 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13570 if test "${enable_safe_sprintf+set}" = set; then
13571   enableval="$enable_safe_sprintf"
13572   with_safe_sprintf=$enableval
13573 else
13574   with_safe_sprintf=no
13575 fi;
13576 echo "$as_me:13576: result: $with_safe_sprintf" >&5
13577 echo "${ECHO_T}$with_safe_sprintf" >&6
13578 test "x$with_safe_sprintf" = xyes &&
13579 cat >>confdefs.h <<\EOF
13580 #define USE_SAFE_SPRINTF 1
13581 EOF
13582
13583 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13584 # when hashmap is used scroll hints are useless
13585 if test "$with_hashmap" = no ; then
13586 echo "$as_me:13586: checking if you want to experiment without scrolling-hints code" >&5
13587 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13588
13589 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13590 if test "${enable_scroll_hints+set}" = set; then
13591   enableval="$enable_scroll_hints"
13592   with_scroll_hints=$enableval
13593 else
13594   with_scroll_hints=yes
13595 fi;
13596 echo "$as_me:13596: result: $with_scroll_hints" >&5
13597 echo "${ECHO_T}$with_scroll_hints" >&6
13598 test "x$with_scroll_hints" = xyes &&
13599 cat >>confdefs.h <<\EOF
13600 #define USE_SCROLL_HINTS 1
13601 EOF
13602
13603 fi
13604
13605 echo "$as_me:13605: checking if you want wgetch-events code" >&5
13606 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13607
13608 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13609 if test "${enable_wgetch_events+set}" = set; then
13610   enableval="$enable_wgetch_events"
13611   with_wgetch_events=$enableval
13612 else
13613   with_wgetch_events=no
13614 fi;
13615 echo "$as_me:13615: result: $with_wgetch_events" >&5
13616 echo "${ECHO_T}$with_wgetch_events" >&6
13617 test "x$with_wgetch_events" = xyes &&
13618 cat >>confdefs.h <<\EOF
13619 #define NCURSES_WGETCH_EVENTS 1
13620 EOF
13621
13622 ###############################################################################
13623
13624 ###     use option --disable-echo to suppress full display compiling commands
13625
13626 echo "$as_me:13626: checking if you want to see long compiling messages" >&5
13627 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13628
13629 # Check whether --enable-echo or --disable-echo was given.
13630 if test "${enable_echo+set}" = set; then
13631   enableval="$enable_echo"
13632   test "$enableval" != no && enableval=yes
13633         if test "$enableval" != "yes" ; then
13634
13635         ECHO_LT='--silent'
13636         ECHO_LD='@echo linking $@;'
13637         RULE_CC='@echo compiling $<'
13638         SHOW_CC='@echo compiling $@'
13639         ECHO_CC='@'
13640
13641         else
13642
13643         ECHO_LT=''
13644         ECHO_LD=''
13645         RULE_CC=''
13646         SHOW_CC=''
13647         ECHO_CC=''
13648
13649         fi
13650 else
13651   enableval=yes
13652
13653         ECHO_LT=''
13654         ECHO_LD=''
13655         RULE_CC=''
13656         SHOW_CC=''
13657         ECHO_CC=''
13658
13659 fi;
13660 echo "$as_me:13660: result: $enableval" >&5
13661 echo "${ECHO_T}$enableval" >&6
13662
13663 if test "x$enable_echo" = xyes; then
13664         ECHO_LINK=
13665 else
13666         ECHO_LINK='@ echo linking $@ ... ;'
13667         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13668         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13669 fi
13670
13671 ###     use option --enable-warnings to turn on all gcc warnings
13672 echo "$as_me:13672: checking if you want to see compiler warnings" >&5
13673 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13674
13675 # Check whether --enable-warnings or --disable-warnings was given.
13676 if test "${enable_warnings+set}" = set; then
13677   enableval="$enable_warnings"
13678   with_warnings=$enableval
13679 fi;
13680 echo "$as_me:13680: result: $with_warnings" >&5
13681 echo "${ECHO_T}$with_warnings" >&6
13682
13683 if test "x$with_warnings" = "xyes"; then
13684
13685         ADAFLAGS="$ADAFLAGS -gnatg"
13686
13687 INTEL_COMPILER=no
13688
13689 if test "$GCC" = yes ; then
13690         case $host_os in
13691         (linux*|gnu*)
13692                 echo "$as_me:13692: checking if this is really Intel C compiler" >&5
13693 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13694                 cf_save_CFLAGS="$CFLAGS"
13695                 CFLAGS="$CFLAGS -no-gcc"
13696                 cat >conftest.$ac_ext <<_ACEOF
13697 #line 13697 "configure"
13698 #include "confdefs.h"
13699
13700 int
13701 main (void)
13702 {
13703
13704 #ifdef __INTEL_COMPILER
13705 #else
13706 make an error
13707 #endif
13708
13709   ;
13710   return 0;
13711 }
13712 _ACEOF
13713 rm -f conftest.$ac_objext
13714 if { (eval echo "$as_me:13714: \"$ac_compile\"") >&5
13715   (eval $ac_compile) 2>&5
13716   ac_status=$?
13717   echo "$as_me:13717: \$? = $ac_status" >&5
13718   (exit $ac_status); } &&
13719          { ac_try='test -s conftest.$ac_objext'
13720   { (eval echo "$as_me:13720: \"$ac_try\"") >&5
13721   (eval $ac_try) 2>&5
13722   ac_status=$?
13723   echo "$as_me:13723: \$? = $ac_status" >&5
13724   (exit $ac_status); }; }; then
13725   INTEL_COMPILER=yes
13726 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13727
13728 else
13729   echo "$as_me: failed program was:" >&5
13730 cat conftest.$ac_ext >&5
13731 fi
13732 rm -f conftest.$ac_objext conftest.$ac_ext
13733                 CFLAGS="$cf_save_CFLAGS"
13734                 echo "$as_me:13734: result: $INTEL_COMPILER" >&5
13735 echo "${ECHO_T}$INTEL_COMPILER" >&6
13736                 ;;
13737         esac
13738 fi
13739
13740 CLANG_COMPILER=no
13741
13742 if test "$GCC" = yes ; then
13743         echo "$as_me:13743: checking if this is really Clang C compiler" >&5
13744 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13745         cf_save_CFLAGS="$CFLAGS"
13746         CFLAGS="$CFLAGS -Qunused-arguments"
13747         cat >conftest.$ac_ext <<_ACEOF
13748 #line 13748 "configure"
13749 #include "confdefs.h"
13750
13751 int
13752 main (void)
13753 {
13754
13755 #ifdef __clang__
13756 #else
13757 make an error
13758 #endif
13759
13760   ;
13761   return 0;
13762 }
13763 _ACEOF
13764 rm -f conftest.$ac_objext
13765 if { (eval echo "$as_me:13765: \"$ac_compile\"") >&5
13766   (eval $ac_compile) 2>&5
13767   ac_status=$?
13768   echo "$as_me:13768: \$? = $ac_status" >&5
13769   (exit $ac_status); } &&
13770          { ac_try='test -s conftest.$ac_objext'
13771   { (eval echo "$as_me:13771: \"$ac_try\"") >&5
13772   (eval $ac_try) 2>&5
13773   ac_status=$?
13774   echo "$as_me:13774: \$? = $ac_status" >&5
13775   (exit $ac_status); }; }; then
13776   CLANG_COMPILER=yes
13777 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13778
13779 else
13780   echo "$as_me: failed program was:" >&5
13781 cat conftest.$ac_ext >&5
13782 fi
13783 rm -f conftest.$ac_objext conftest.$ac_ext
13784         CFLAGS="$cf_save_CFLAGS"
13785         echo "$as_me:13785: result: $CLANG_COMPILER" >&5
13786 echo "${ECHO_T}$CLANG_COMPILER" >&6
13787 fi
13788
13789 cat > conftest.$ac_ext <<EOF
13790 #line 13790 "${as_me:-configure}"
13791 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13792 EOF
13793
13794 if test "$INTEL_COMPILER" = yes
13795 then
13796 # The "-wdXXX" options suppress warnings:
13797 # remark #1419: external declaration in primary source file
13798 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13799 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13800 # remark #193: zero used for undefined preprocessing identifier
13801 # remark #593: variable "curs_sb_left_arrow" was set but never used
13802 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13803 # remark #869: parameter "tw" was never referenced
13804 # remark #981: operands are evaluated in unspecified order
13805 # warning #279: controlling expression is constant
13806
13807         { echo "$as_me:13807: checking for $CC warning options..." >&5
13808 echo "$as_me: checking for $CC warning options..." >&6;}
13809         cf_save_CFLAGS="$CFLAGS"
13810         EXTRA_CFLAGS="-Wall"
13811         for cf_opt in \
13812                 wd1419 \
13813                 wd1683 \
13814                 wd1684 \
13815                 wd193 \
13816                 wd593 \
13817                 wd279 \
13818                 wd810 \
13819                 wd869 \
13820                 wd981
13821         do
13822                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13823                 if { (eval echo "$as_me:13823: \"$ac_compile\"") >&5
13824   (eval $ac_compile) 2>&5
13825   ac_status=$?
13826   echo "$as_me:13826: \$? = $ac_status" >&5
13827   (exit $ac_status); }; then
13828                         test -n "$verbose" && echo "$as_me:13828: result: ... -$cf_opt" >&5
13829 echo "${ECHO_T}... -$cf_opt" >&6
13830                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13831                 fi
13832         done
13833         CFLAGS="$cf_save_CFLAGS"
13834
13835 elif test "$GCC" = yes
13836 then
13837         { echo "$as_me:13837: checking for $CC warning options..." >&5
13838 echo "$as_me: checking for $CC warning options..." >&6;}
13839         cf_save_CFLAGS="$CFLAGS"
13840         EXTRA_CFLAGS=
13841         cf_warn_CONST=""
13842         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13843         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13844         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13845         for cf_opt in W Wall \
13846                 Wbad-function-cast \
13847                 Wcast-align \
13848                 Wcast-qual \
13849                 Wdeclaration-after-statement \
13850                 Wextra \
13851                 Winline \
13852                 Wmissing-declarations \
13853                 Wmissing-prototypes \
13854                 Wnested-externs \
13855                 Wpointer-arith \
13856                 Wshadow \
13857                 Wstrict-prototypes \
13858                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13859         do
13860                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13861                 if { (eval echo "$as_me:13861: \"$ac_compile\"") >&5
13862   (eval $ac_compile) 2>&5
13863   ac_status=$?
13864   echo "$as_me:13864: \$? = $ac_status" >&5
13865   (exit $ac_status); }; then
13866                         test -n "$verbose" && echo "$as_me:13866: result: ... -$cf_opt" >&5
13867 echo "${ECHO_T}... -$cf_opt" >&6
13868                         case $cf_opt in
13869                         (Wcast-qual)
13870                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13871                                 ;;
13872                         (Winline)
13873                                 case $GCC_VERSION in
13874                                 ([34].*)
13875                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13876
13877 echo "${as_me:-configure}:13877: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13878
13879                                         continue;;
13880                                 esac
13881                                 ;;
13882                         (Wpointer-arith)
13883                                 case $GCC_VERSION in
13884                                 ([12].*)
13885                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13886
13887 echo "${as_me:-configure}:13887: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13888
13889                                         continue;;
13890                                 esac
13891                                 ;;
13892                         esac
13893                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13894                 fi
13895         done
13896         CFLAGS="$cf_save_CFLAGS"
13897 fi
13898 rm -rf conftest*
13899
13900         if test "x$cf_with_cxx" = xyes ; then
13901
13902 INTEL_CPLUSPLUS=no
13903
13904 if test "$GCC" = yes ; then
13905         case $host_os in
13906         (linux*|gnu*)
13907                 echo "$as_me:13907: checking if this is really Intel C++ compiler" >&5
13908 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13909                 cf_save_CFLAGS="$CXXFLAGS"
13910                 CXXFLAGS="$CXXFLAGS -no-gcc"
13911                 cat >conftest.$ac_ext <<_ACEOF
13912 #line 13912 "configure"
13913 #include "confdefs.h"
13914
13915 int
13916 main (void)
13917 {
13918
13919 #ifdef __INTEL_COMPILER
13920 #else
13921 make an error
13922 #endif
13923
13924   ;
13925   return 0;
13926 }
13927 _ACEOF
13928 rm -f conftest.$ac_objext
13929 if { (eval echo "$as_me:13929: \"$ac_compile\"") >&5
13930   (eval $ac_compile) 2>&5
13931   ac_status=$?
13932   echo "$as_me:13932: \$? = $ac_status" >&5
13933   (exit $ac_status); } &&
13934          { ac_try='test -s conftest.$ac_objext'
13935   { (eval echo "$as_me:13935: \"$ac_try\"") >&5
13936   (eval $ac_try) 2>&5
13937   ac_status=$?
13938   echo "$as_me:13938: \$? = $ac_status" >&5
13939   (exit $ac_status); }; }; then
13940   INTEL_CPLUSPLUS=yes
13941 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13942
13943 else
13944   echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13946 fi
13947 rm -f conftest.$ac_objext conftest.$ac_ext
13948                 CXXFLAGS="$cf_save_CFLAGS"
13949                 echo "$as_me:13949: result: $INTEL_CPLUSPLUS" >&5
13950 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13951                 ;;
13952         esac
13953 fi
13954
13955 CLANG_CPLUSPLUS=no
13956
13957 if test "$GCC" = yes ; then
13958         echo "$as_me:13958: checking if this is really Clang C++ compiler" >&5
13959 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13960         cf_save_CFLAGS="$CXXFLAGS"
13961         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13962         cat >conftest.$ac_ext <<_ACEOF
13963 #line 13963 "configure"
13964 #include "confdefs.h"
13965
13966 int
13967 main (void)
13968 {
13969
13970 #ifdef __clang__
13971 #else
13972 make an error
13973 #endif
13974
13975   ;
13976   return 0;
13977 }
13978 _ACEOF
13979 rm -f conftest.$ac_objext
13980 if { (eval echo "$as_me:13980: \"$ac_compile\"") >&5
13981   (eval $ac_compile) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit $ac_status); } &&
13985          { ac_try='test -s conftest.$ac_objext'
13986   { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit $ac_status); }; }; then
13991   CLANG_CPLUSPLUS=yes
13992 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13993
13994 else
13995   echo "$as_me: failed program was:" >&5
13996 cat conftest.$ac_ext >&5
13997 fi
13998 rm -f conftest.$ac_objext conftest.$ac_ext
13999         CXXFLAGS="$cf_save_CFLAGS"
14000         echo "$as_me:14000: result: $CLANG_CPLUSPLUS" >&5
14001 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
14002 fi
14003
14004 ac_ext=cc
14005 ac_cpp='$CXXCPP $CPPFLAGS'
14006 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14007 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14008 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14009 ac_main_return=return
14010
14011 cat > conftest.$ac_ext <<EOF
14012 #line 14012 "configure"
14013 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14014 EOF
14015
14016 if test "$INTEL_CPLUSPLUS" = yes
14017 then
14018 # The "-wdXXX" options suppress warnings:
14019 # remark #1419: external declaration in primary source file
14020 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14021 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14022 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14023 # remark #193: zero used for undefined preprocessing identifier
14024 # remark #593: variable "curs_sb_left_arrow" was set but never used
14025 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14026 # remark #869: parameter "tw" was never referenced
14027 # remark #981: operands are evaluated in unspecified order
14028 # warning #269: invalid format string conversion
14029
14030         { echo "$as_me:14030: checking for $CC warning options..." >&5
14031 echo "$as_me: checking for $CC warning options..." >&6;}
14032         cf_save_CXXFLAGS="$CXXFLAGS"
14033         EXTRA_CXXFLAGS="-Wall"
14034         for cf_opt in \
14035                 wd1419 \
14036                 wd1682 \
14037                 wd1683 \
14038                 wd1684 \
14039                 wd193 \
14040                 wd279 \
14041                 wd593 \
14042                 wd810 \
14043                 wd869 \
14044                 wd981
14045         do
14046                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
14047                 if { (eval echo "$as_me:14047: \"$ac_compile\"") >&5
14048   (eval $ac_compile) 2>&5
14049   ac_status=$?
14050   echo "$as_me:14050: \$? = $ac_status" >&5
14051   (exit $ac_status); }; then
14052                         test -n "$verbose" && echo "$as_me:14052: result: ... -$cf_opt" >&5
14053 echo "${ECHO_T}... -$cf_opt" >&6
14054                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14055                 fi
14056         done
14057         CXXFLAGS="$cf_save_CXXFLAGS"
14058
14059 elif test "$GXX" = yes
14060 then
14061         { echo "$as_me:14061: checking for $CXX warning options..." >&5
14062 echo "$as_me: checking for $CXX warning options..." >&6;}
14063         cf_save_CXXFLAGS="$CXXFLAGS"
14064         EXTRA_CXXFLAGS="-W -Wall"
14065         cf_gxx_extra_warnings=""
14066         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
14067         case "$GCC_VERSION" in
14068         ([1-2].*)
14069                 ;;
14070         (*)
14071                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
14072                 ;;
14073         esac
14074         for cf_opt in \
14075                 Wabi \
14076                 fabi-version=0 \
14077                 Wextra \
14078                 Wignored-qualifiers \
14079                 Wlogical-op \
14080                 Woverloaded-virtual \
14081                 Wsign-promo \
14082                 Wsynth \
14083                 Wold-style-cast \
14084                 Wcast-align \
14085                 Wcast-qual \
14086                 Wpointer-arith \
14087                 Wshadow \
14088                 Wundef $cf_gxx_extra_warnings Wno-unused
14089         do
14090                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14091                 if { (eval echo "$as_me:14091: \"$ac_compile\"") >&5
14092   (eval $ac_compile) 2>&5
14093   ac_status=$?
14094   echo "$as_me:14094: \$? = $ac_status" >&5
14095   (exit $ac_status); }; then
14096                         test -n "$verbose" && echo "$as_me:14096: result: ... -$cf_opt" >&5
14097 echo "${ECHO_T}... -$cf_opt" >&6
14098                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14099                 else
14100                         test -n "$verbose" && echo "$as_me:14100: result: ... no -$cf_opt" >&5
14101 echo "${ECHO_T}... no -$cf_opt" >&6
14102                 fi
14103         done
14104         CXXFLAGS="$cf_save_CXXFLAGS"
14105 fi
14106
14107 rm -rf conftest*
14108 ac_ext=c
14109 ac_cpp='$CPP $CPPFLAGS'
14110 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14111 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14112 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14113 ac_main_return=return
14114
14115         fi
14116 fi
14117
14118 if test "$GCC" = yes
14119 then
14120 cat > conftest.i <<EOF
14121 #ifndef GCC_PRINTF
14122 #define GCC_PRINTF 0
14123 #endif
14124 #ifndef GCC_SCANF
14125 #define GCC_SCANF 0
14126 #endif
14127 #ifndef GCC_NORETURN
14128 #define GCC_NORETURN /* nothing */
14129 #endif
14130 #ifndef GCC_UNUSED
14131 #define GCC_UNUSED /* nothing */
14132 #endif
14133 EOF
14134 if test "$GCC" = yes
14135 then
14136         { echo "$as_me:14136: checking for $CC __attribute__ directives..." >&5
14137 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14138 cat > conftest.$ac_ext <<EOF
14139 #line 14139 "${as_me:-configure}"
14140 #include "confdefs.h"
14141 #include "conftest.h"
14142 #include "conftest.i"
14143 #if     GCC_PRINTF
14144 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14145 #else
14146 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14147 #endif
14148 #if     GCC_SCANF
14149 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14150 #else
14151 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14152 #endif
14153 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14154 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14155 extern void foo(void) GCC_NORETURN;
14156 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14157 EOF
14158         cf_printf_attribute=no
14159         cf_scanf_attribute=no
14160         for cf_attribute in scanf printf unused noreturn
14161         do
14162
14163 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14164
14165                 cf_directive="__attribute__(($cf_attribute))"
14166                 echo "checking for $CC $cf_directive" 1>&5
14167
14168                 case $cf_attribute in
14169                 (printf)
14170                         cf_printf_attribute=yes
14171                         cat >conftest.h <<EOF
14172 #define GCC_$cf_ATTRIBUTE 1
14173 EOF
14174                         ;;
14175                 (scanf)
14176                         cf_scanf_attribute=yes
14177                         cat >conftest.h <<EOF
14178 #define GCC_$cf_ATTRIBUTE 1
14179 EOF
14180                         ;;
14181                 (*)
14182                         cat >conftest.h <<EOF
14183 #define GCC_$cf_ATTRIBUTE $cf_directive
14184 EOF
14185                         ;;
14186                 esac
14187
14188                 if { (eval echo "$as_me:14188: \"$ac_compile\"") >&5
14189   (eval $ac_compile) 2>&5
14190   ac_status=$?
14191   echo "$as_me:14191: \$? = $ac_status" >&5
14192   (exit $ac_status); }; then
14193                         test -n "$verbose" && echo "$as_me:14193: result: ... $cf_attribute" >&5
14194 echo "${ECHO_T}... $cf_attribute" >&6
14195                         cat conftest.h >>confdefs.h
14196                         case $cf_attribute in
14197                         (noreturn)
14198
14199 cat >>confdefs.h <<EOF
14200 #define GCC_NORETURN $cf_directive
14201 EOF
14202
14203                                 ;;
14204                         (printf)
14205                                 cf_value='/* nothing */'
14206                                 if test "$cf_printf_attribute" != no ; then
14207                                         cf_value='__attribute__((format(printf,fmt,var)))'
14208
14209 cat >>confdefs.h <<\EOF
14210 #define GCC_PRINTF 1
14211 EOF
14212
14213                                 fi
14214
14215 cat >>confdefs.h <<EOF
14216 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14217 EOF
14218
14219                                 ;;
14220                         (scanf)
14221                                 cf_value='/* nothing */'
14222                                 if test "$cf_scanf_attribute" != no ; then
14223                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14224
14225 cat >>confdefs.h <<\EOF
14226 #define GCC_SCANF 1
14227 EOF
14228
14229                                 fi
14230
14231 cat >>confdefs.h <<EOF
14232 #define GCC_SCANFLIKE(fmt,var) $cf_value
14233 EOF
14234
14235                                 ;;
14236                         (unused)
14237
14238 cat >>confdefs.h <<EOF
14239 #define GCC_UNUSED $cf_directive
14240 EOF
14241
14242                                 ;;
14243                         esac
14244                 fi
14245         done
14246 else
14247         fgrep define conftest.i >>confdefs.h
14248 fi
14249 rm -rf conftest*
14250 fi
14251
14252 echo "$as_me:14252: checking if you want to work around bogus compiler/loader warnings" >&5
14253 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14254
14255 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14256 if test "${enable_string_hacks+set}" = set; then
14257   enableval="$enable_string_hacks"
14258   with_string_hacks=$enableval
14259 else
14260   with_string_hacks=no
14261 fi;
14262 echo "$as_me:14262: result: $with_string_hacks" >&5
14263 echo "${ECHO_T}$with_string_hacks" >&6
14264
14265 if test "x$with_string_hacks" = "xyes"; then
14266
14267 cat >>confdefs.h <<\EOF
14268 #define USE_STRING_HACKS 1
14269 EOF
14270
14271         { echo "$as_me:14271: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14272 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14273         echo "$as_me:14273: checking for strlcat" >&5
14274 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14275 if test "${ac_cv_func_strlcat+set}" = set; then
14276   echo $ECHO_N "(cached) $ECHO_C" >&6
14277 else
14278   cat >conftest.$ac_ext <<_ACEOF
14279 #line 14279 "configure"
14280 #include "confdefs.h"
14281 /* System header to define __stub macros and hopefully few prototypes,
14282     which can conflict with char strlcat (); below.  */
14283 #include <assert.h>
14284 /* Override any gcc2 internal prototype to avoid an error.  */
14285 #ifdef __cplusplus
14286 extern "C"
14287 #endif
14288 /* We use char because int might match the return type of a gcc2
14289    builtin and then its argument prototype would still apply.  */
14290 char strlcat ();
14291 char (*f) ();
14292
14293 int
14294 main (void)
14295 {
14296 /* The GNU C library defines this for functions which it implements
14297     to always fail with ENOSYS.  Some functions are actually named
14298     something starting with __ and the normal name is an alias.  */
14299 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14300 choke me
14301 #else
14302 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14303 #endif
14304
14305   ;
14306   return 0;
14307 }
14308 _ACEOF
14309 rm -f conftest.$ac_objext conftest$ac_exeext
14310 if { (eval echo "$as_me:14310: \"$ac_link\"") >&5
14311   (eval $ac_link) 2>&5
14312   ac_status=$?
14313   echo "$as_me:14313: \$? = $ac_status" >&5
14314   (exit $ac_status); } &&
14315          { ac_try='test -s conftest$ac_exeext'
14316   { (eval echo "$as_me:14316: \"$ac_try\"") >&5
14317   (eval $ac_try) 2>&5
14318   ac_status=$?
14319   echo "$as_me:14319: \$? = $ac_status" >&5
14320   (exit $ac_status); }; }; then
14321   ac_cv_func_strlcat=yes
14322 else
14323   echo "$as_me: failed program was:" >&5
14324 cat conftest.$ac_ext >&5
14325 ac_cv_func_strlcat=no
14326 fi
14327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14328 fi
14329 echo "$as_me:14329: result: $ac_cv_func_strlcat" >&5
14330 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14331 if test $ac_cv_func_strlcat = yes; then
14332
14333 cat >>confdefs.h <<\EOF
14334 #define HAVE_STRLCAT 1
14335 EOF
14336
14337 else
14338
14339                 echo "$as_me:14339: checking for strlcat in -lbsd" >&5
14340 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14341 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14342   echo $ECHO_N "(cached) $ECHO_C" >&6
14343 else
14344   ac_check_lib_save_LIBS=$LIBS
14345 LIBS="-lbsd  $LIBS"
14346 cat >conftest.$ac_ext <<_ACEOF
14347 #line 14347 "configure"
14348 #include "confdefs.h"
14349
14350 /* Override any gcc2 internal prototype to avoid an error.  */
14351 #ifdef __cplusplus
14352 extern "C"
14353 #endif
14354 /* We use char because int might match the return type of a gcc2
14355    builtin and then its argument prototype would still apply.  */
14356 char strlcat ();
14357 int
14358 main (void)
14359 {
14360 strlcat ();
14361   ;
14362   return 0;
14363 }
14364 _ACEOF
14365 rm -f conftest.$ac_objext conftest$ac_exeext
14366 if { (eval echo "$as_me:14366: \"$ac_link\"") >&5
14367   (eval $ac_link) 2>&5
14368   ac_status=$?
14369   echo "$as_me:14369: \$? = $ac_status" >&5
14370   (exit $ac_status); } &&
14371          { ac_try='test -s conftest$ac_exeext'
14372   { (eval echo "$as_me:14372: \"$ac_try\"") >&5
14373   (eval $ac_try) 2>&5
14374   ac_status=$?
14375   echo "$as_me:14375: \$? = $ac_status" >&5
14376   (exit $ac_status); }; }; then
14377   ac_cv_lib_bsd_strlcat=yes
14378 else
14379   echo "$as_me: failed program was:" >&5
14380 cat conftest.$ac_ext >&5
14381 ac_cv_lib_bsd_strlcat=no
14382 fi
14383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14384 LIBS=$ac_check_lib_save_LIBS
14385 fi
14386 echo "$as_me:14386: result: $ac_cv_lib_bsd_strlcat" >&5
14387 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14388 if test $ac_cv_lib_bsd_strlcat = yes; then
14389
14390 cf_add_libs="-lbsd"
14391 # Filter out duplicates - this happens with badly-designed ".pc" files...
14392 for cf_add_1lib in $LIBS
14393 do
14394         for cf_add_2lib in $cf_add_libs
14395         do
14396                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14397                 then
14398                         cf_add_1lib=
14399                         break
14400                 fi
14401         done
14402         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14403 done
14404 LIBS="$cf_add_libs"
14405
14406 for ac_header in bsd/string.h
14407 do
14408 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14409 echo "$as_me:14409: checking for $ac_header" >&5
14410 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14411 if eval "test \"\${$as_ac_Header+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 #include <$ac_header>
14418 _ACEOF
14419 if { (eval echo "$as_me:14419: \"$ac_cpp conftest.$ac_ext\"") >&5
14420   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14421   ac_status=$?
14422   egrep -v '^ *\+' conftest.er1 >conftest.err
14423   rm -f conftest.er1
14424   cat conftest.err >&5
14425   echo "$as_me:14425: \$? = $ac_status" >&5
14426   (exit $ac_status); } >/dev/null; then
14427   if test -s conftest.err; then
14428     ac_cpp_err=$ac_c_preproc_warn_flag
14429   else
14430     ac_cpp_err=
14431   fi
14432 else
14433   ac_cpp_err=yes
14434 fi
14435 if test -z "$ac_cpp_err"; then
14436   eval "$as_ac_Header=yes"
14437 else
14438   echo "$as_me: failed program was:" >&5
14439   cat conftest.$ac_ext >&5
14440   eval "$as_ac_Header=no"
14441 fi
14442 rm -f conftest.err conftest.$ac_ext
14443 fi
14444 echo "$as_me:14444: result: `eval echo '${'$as_ac_Header'}'`" >&5
14445 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14446 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14447   cat >>confdefs.h <<EOF
14448 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14449 EOF
14450
14451 fi
14452 done
14453
14454 cat >>confdefs.h <<\EOF
14455 #define HAVE_STRLCAT 1
14456 EOF
14457
14458 fi
14459
14460 fi
14461
14462 for ac_func in strlcpy snprintf
14463 do
14464 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14465 echo "$as_me:14465: checking for $ac_func" >&5
14466 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14467 if eval "test \"\${$as_ac_var+set}\" = set"; then
14468   echo $ECHO_N "(cached) $ECHO_C" >&6
14469 else
14470   cat >conftest.$ac_ext <<_ACEOF
14471 #line 14471 "configure"
14472 #include "confdefs.h"
14473 /* System header to define __stub macros and hopefully few prototypes,
14474     which can conflict with char $ac_func (); below.  */
14475 #include <assert.h>
14476 /* Override any gcc2 internal prototype to avoid an error.  */
14477 #ifdef __cplusplus
14478 extern "C"
14479 #endif
14480 /* We use char because int might match the return type of a gcc2
14481    builtin and then its argument prototype would still apply.  */
14482 char $ac_func ();
14483 char (*f) ();
14484
14485 int
14486 main (void)
14487 {
14488 /* The GNU C library defines this for functions which it implements
14489     to always fail with ENOSYS.  Some functions are actually named
14490     something starting with __ and the normal name is an alias.  */
14491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14492 choke me
14493 #else
14494 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14495 #endif
14496
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   eval "$as_ac_var=yes"
14514 else
14515   echo "$as_me: failed program was:" >&5
14516 cat conftest.$ac_ext >&5
14517 eval "$as_ac_var=no"
14518 fi
14519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14520 fi
14521 echo "$as_me:14521: result: `eval echo '${'$as_ac_var'}'`" >&5
14522 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14523 if test `eval echo '${'$as_ac_var'}'` = yes; then
14524   cat >>confdefs.h <<EOF
14525 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14526 EOF
14527
14528 fi
14529 done
14530
14531 fi
14532
14533 ###     use option --enable-assertions to turn on generation of assertion code
14534 echo "$as_me:14534: checking if you want to enable runtime assertions" >&5
14535 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14536
14537 # Check whether --enable-assertions or --disable-assertions was given.
14538 if test "${enable_assertions+set}" = set; then
14539   enableval="$enable_assertions"
14540   with_assertions=$enableval
14541 else
14542   with_assertions=no
14543 fi;
14544 echo "$as_me:14544: result: $with_assertions" >&5
14545 echo "${ECHO_T}$with_assertions" >&6
14546 if test -n "$GCC"
14547 then
14548         if test "$with_assertions" = no
14549         then
14550                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14551         else
14552
14553         ADAFLAGS="$ADAFLAGS -gnata"
14554
14555         fi
14556 fi
14557
14558 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14559
14560 echo "$as_me:14560: checking if you want to use dmalloc for testing" >&5
14561 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14562
14563 # Check whether --with-dmalloc or --without-dmalloc was given.
14564 if test "${with_dmalloc+set}" = set; then
14565   withval="$with_dmalloc"
14566
14567 cat >>confdefs.h <<EOF
14568 #define USE_DMALLOC 1
14569 EOF
14570
14571         : ${with_cflags:=-g}
14572         : ${with_no_leaks:=yes}
14573          with_dmalloc=yes
14574 else
14575   with_dmalloc=
14576 fi;
14577 echo "$as_me:14577: result: ${with_dmalloc:-no}" >&5
14578 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14579
14580 case .$with_cflags in
14581 (.*-g*)
14582         case .$CFLAGS in
14583         (.*-g*)
14584                 ;;
14585         (*)
14586
14587 cf_fix_cppflags=no
14588 cf_new_cflags=
14589 cf_new_cppflags=
14590 cf_new_extra_cppflags=
14591
14592 for cf_add_cflags in -g
14593 do
14594 case $cf_fix_cppflags in
14595 (no)
14596         case $cf_add_cflags in
14597         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14598                 case $cf_add_cflags in
14599                 (-D*)
14600                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14601
14602                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14603                                 && test -z "${cf_tst_cflags}" \
14604                                 && cf_fix_cppflags=yes
14605
14606                         if test $cf_fix_cppflags = yes ; then
14607
14608         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14609         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14610
14611                                 continue
14612                         elif test "${cf_tst_cflags}" = "\"'" ; then
14613
14614         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14615         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14616
14617                                 continue
14618                         fi
14619                         ;;
14620                 esac
14621                 case "$CPPFLAGS" in
14622                 (*$cf_add_cflags)
14623                         ;;
14624                 (*)
14625                         case $cf_add_cflags in
14626                         (-D*)
14627                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14628
14629 CPPFLAGS=`echo "$CPPFLAGS" | \
14630         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14631                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14632
14633                                 ;;
14634                         esac
14635
14636         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14637         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14638
14639                         ;;
14640                 esac
14641                 ;;
14642         (*)
14643
14644         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14645         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14646
14647                 ;;
14648         esac
14649         ;;
14650 (yes)
14651
14652         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14653         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14654
14655         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14656
14657         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14658                 && test -z "${cf_tst_cflags}" \
14659                 && cf_fix_cppflags=no
14660         ;;
14661 esac
14662 done
14663
14664 if test -n "$cf_new_cflags" ; then
14665
14666         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14667         CFLAGS="${CFLAGS}$cf_new_cflags"
14668
14669 fi
14670
14671 if test -n "$cf_new_cppflags" ; then
14672
14673         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14674         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14675
14676 fi
14677
14678 if test -n "$cf_new_extra_cppflags" ; then
14679
14680         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14681         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14682
14683 fi
14684
14685                 ;;
14686         esac
14687         ;;
14688 esac
14689
14690 if test "$with_dmalloc" = yes ; then
14691         echo "$as_me:14691: checking for dmalloc.h" >&5
14692 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14693 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14694   echo $ECHO_N "(cached) $ECHO_C" >&6
14695 else
14696   cat >conftest.$ac_ext <<_ACEOF
14697 #line 14697 "configure"
14698 #include "confdefs.h"
14699 #include <dmalloc.h>
14700 _ACEOF
14701 if { (eval echo "$as_me:14701: \"$ac_cpp conftest.$ac_ext\"") >&5
14702   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14703   ac_status=$?
14704   egrep -v '^ *\+' conftest.er1 >conftest.err
14705   rm -f conftest.er1
14706   cat conftest.err >&5
14707   echo "$as_me:14707: \$? = $ac_status" >&5
14708   (exit $ac_status); } >/dev/null; then
14709   if test -s conftest.err; then
14710     ac_cpp_err=$ac_c_preproc_warn_flag
14711   else
14712     ac_cpp_err=
14713   fi
14714 else
14715   ac_cpp_err=yes
14716 fi
14717 if test -z "$ac_cpp_err"; then
14718   ac_cv_header_dmalloc_h=yes
14719 else
14720   echo "$as_me: failed program was:" >&5
14721   cat conftest.$ac_ext >&5
14722   ac_cv_header_dmalloc_h=no
14723 fi
14724 rm -f conftest.err conftest.$ac_ext
14725 fi
14726 echo "$as_me:14726: result: $ac_cv_header_dmalloc_h" >&5
14727 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14728 if test $ac_cv_header_dmalloc_h = yes; then
14729
14730 echo "$as_me:14730: checking for dmalloc_debug in -ldmalloc" >&5
14731 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14732 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14733   echo $ECHO_N "(cached) $ECHO_C" >&6
14734 else
14735   ac_check_lib_save_LIBS=$LIBS
14736 LIBS="-ldmalloc  $LIBS"
14737 cat >conftest.$ac_ext <<_ACEOF
14738 #line 14738 "configure"
14739 #include "confdefs.h"
14740
14741 /* Override any gcc2 internal prototype to avoid an error.  */
14742 #ifdef __cplusplus
14743 extern "C"
14744 #endif
14745 /* We use char because int might match the return type of a gcc2
14746    builtin and then its argument prototype would still apply.  */
14747 char dmalloc_debug ();
14748 int
14749 main (void)
14750 {
14751 dmalloc_debug ();
14752   ;
14753   return 0;
14754 }
14755 _ACEOF
14756 rm -f conftest.$ac_objext conftest$ac_exeext
14757 if { (eval echo "$as_me:14757: \"$ac_link\"") >&5
14758   (eval $ac_link) 2>&5
14759   ac_status=$?
14760   echo "$as_me:14760: \$? = $ac_status" >&5
14761   (exit $ac_status); } &&
14762          { ac_try='test -s conftest$ac_exeext'
14763   { (eval echo "$as_me:14763: \"$ac_try\"") >&5
14764   (eval $ac_try) 2>&5
14765   ac_status=$?
14766   echo "$as_me:14766: \$? = $ac_status" >&5
14767   (exit $ac_status); }; }; then
14768   ac_cv_lib_dmalloc_dmalloc_debug=yes
14769 else
14770   echo "$as_me: failed program was:" >&5
14771 cat conftest.$ac_ext >&5
14772 ac_cv_lib_dmalloc_dmalloc_debug=no
14773 fi
14774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14775 LIBS=$ac_check_lib_save_LIBS
14776 fi
14777 echo "$as_me:14777: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14778 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14779 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14780   cat >>confdefs.h <<EOF
14781 #define HAVE_LIBDMALLOC 1
14782 EOF
14783
14784   LIBS="-ldmalloc $LIBS"
14785
14786 fi
14787
14788 fi
14789
14790 fi
14791
14792 echo "$as_me:14792: checking if you want to use dbmalloc for testing" >&5
14793 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14794
14795 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14796 if test "${with_dbmalloc+set}" = set; then
14797   withval="$with_dbmalloc"
14798
14799 cat >>confdefs.h <<EOF
14800 #define USE_DBMALLOC 1
14801 EOF
14802
14803         : ${with_cflags:=-g}
14804         : ${with_no_leaks:=yes}
14805          with_dbmalloc=yes
14806 else
14807   with_dbmalloc=
14808 fi;
14809 echo "$as_me:14809: result: ${with_dbmalloc:-no}" >&5
14810 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14811
14812 case .$with_cflags in
14813 (.*-g*)
14814         case .$CFLAGS in
14815         (.*-g*)
14816                 ;;
14817         (*)
14818
14819 cf_fix_cppflags=no
14820 cf_new_cflags=
14821 cf_new_cppflags=
14822 cf_new_extra_cppflags=
14823
14824 for cf_add_cflags in -g
14825 do
14826 case $cf_fix_cppflags in
14827 (no)
14828         case $cf_add_cflags in
14829         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14830                 case $cf_add_cflags in
14831                 (-D*)
14832                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14833
14834                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14835                                 && test -z "${cf_tst_cflags}" \
14836                                 && cf_fix_cppflags=yes
14837
14838                         if test $cf_fix_cppflags = yes ; then
14839
14840         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14841         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14842
14843                                 continue
14844                         elif test "${cf_tst_cflags}" = "\"'" ; then
14845
14846         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14847         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14848
14849                                 continue
14850                         fi
14851                         ;;
14852                 esac
14853                 case "$CPPFLAGS" in
14854                 (*$cf_add_cflags)
14855                         ;;
14856                 (*)
14857                         case $cf_add_cflags in
14858                         (-D*)
14859                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14860
14861 CPPFLAGS=`echo "$CPPFLAGS" | \
14862         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14863                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14864
14865                                 ;;
14866                         esac
14867
14868         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14869         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14870
14871                         ;;
14872                 esac
14873                 ;;
14874         (*)
14875
14876         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14877         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14878
14879                 ;;
14880         esac
14881         ;;
14882 (yes)
14883
14884         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14885         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14886
14887         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14888
14889         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14890                 && test -z "${cf_tst_cflags}" \
14891                 && cf_fix_cppflags=no
14892         ;;
14893 esac
14894 done
14895
14896 if test -n "$cf_new_cflags" ; then
14897
14898         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14899         CFLAGS="${CFLAGS}$cf_new_cflags"
14900
14901 fi
14902
14903 if test -n "$cf_new_cppflags" ; then
14904
14905         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14906         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14907
14908 fi
14909
14910 if test -n "$cf_new_extra_cppflags" ; then
14911
14912         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14913         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14914
14915 fi
14916
14917                 ;;
14918         esac
14919         ;;
14920 esac
14921
14922 if test "$with_dbmalloc" = yes ; then
14923         echo "$as_me:14923: checking for dbmalloc.h" >&5
14924 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14925 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14926   echo $ECHO_N "(cached) $ECHO_C" >&6
14927 else
14928   cat >conftest.$ac_ext <<_ACEOF
14929 #line 14929 "configure"
14930 #include "confdefs.h"
14931 #include <dbmalloc.h>
14932 _ACEOF
14933 if { (eval echo "$as_me:14933: \"$ac_cpp conftest.$ac_ext\"") >&5
14934   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14935   ac_status=$?
14936   egrep -v '^ *\+' conftest.er1 >conftest.err
14937   rm -f conftest.er1
14938   cat conftest.err >&5
14939   echo "$as_me:14939: \$? = $ac_status" >&5
14940   (exit $ac_status); } >/dev/null; then
14941   if test -s conftest.err; then
14942     ac_cpp_err=$ac_c_preproc_warn_flag
14943   else
14944     ac_cpp_err=
14945   fi
14946 else
14947   ac_cpp_err=yes
14948 fi
14949 if test -z "$ac_cpp_err"; then
14950   ac_cv_header_dbmalloc_h=yes
14951 else
14952   echo "$as_me: failed program was:" >&5
14953   cat conftest.$ac_ext >&5
14954   ac_cv_header_dbmalloc_h=no
14955 fi
14956 rm -f conftest.err conftest.$ac_ext
14957 fi
14958 echo "$as_me:14958: result: $ac_cv_header_dbmalloc_h" >&5
14959 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14960 if test $ac_cv_header_dbmalloc_h = yes; then
14961
14962 echo "$as_me:14962: checking for debug_malloc in -ldbmalloc" >&5
14963 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14964 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14965   echo $ECHO_N "(cached) $ECHO_C" >&6
14966 else
14967   ac_check_lib_save_LIBS=$LIBS
14968 LIBS="-ldbmalloc  $LIBS"
14969 cat >conftest.$ac_ext <<_ACEOF
14970 #line 14970 "configure"
14971 #include "confdefs.h"
14972
14973 /* Override any gcc2 internal prototype to avoid an error.  */
14974 #ifdef __cplusplus
14975 extern "C"
14976 #endif
14977 /* We use char because int might match the return type of a gcc2
14978    builtin and then its argument prototype would still apply.  */
14979 char debug_malloc ();
14980 int
14981 main (void)
14982 {
14983 debug_malloc ();
14984   ;
14985   return 0;
14986 }
14987 _ACEOF
14988 rm -f conftest.$ac_objext conftest$ac_exeext
14989 if { (eval echo "$as_me:14989: \"$ac_link\"") >&5
14990   (eval $ac_link) 2>&5
14991   ac_status=$?
14992   echo "$as_me:14992: \$? = $ac_status" >&5
14993   (exit $ac_status); } &&
14994          { ac_try='test -s conftest$ac_exeext'
14995   { (eval echo "$as_me:14995: \"$ac_try\"") >&5
14996   (eval $ac_try) 2>&5
14997   ac_status=$?
14998   echo "$as_me:14998: \$? = $ac_status" >&5
14999   (exit $ac_status); }; }; then
15000   ac_cv_lib_dbmalloc_debug_malloc=yes
15001 else
15002   echo "$as_me: failed program was:" >&5
15003 cat conftest.$ac_ext >&5
15004 ac_cv_lib_dbmalloc_debug_malloc=no
15005 fi
15006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15007 LIBS=$ac_check_lib_save_LIBS
15008 fi
15009 echo "$as_me:15009: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
15010 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
15011 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
15012   cat >>confdefs.h <<EOF
15013 #define HAVE_LIBDBMALLOC 1
15014 EOF
15015
15016   LIBS="-ldbmalloc $LIBS"
15017
15018 fi
15019
15020 fi
15021
15022 fi
15023
15024 echo "$as_me:15024: checking if you want to use valgrind for testing" >&5
15025 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
15026
15027 # Check whether --with-valgrind or --without-valgrind was given.
15028 if test "${with_valgrind+set}" = set; then
15029   withval="$with_valgrind"
15030
15031 cat >>confdefs.h <<EOF
15032 #define USE_VALGRIND 1
15033 EOF
15034
15035         : ${with_cflags:=-g}
15036         : ${with_no_leaks:=yes}
15037          with_valgrind=yes
15038 else
15039   with_valgrind=
15040 fi;
15041 echo "$as_me:15041: result: ${with_valgrind:-no}" >&5
15042 echo "${ECHO_T}${with_valgrind:-no}" >&6
15043
15044 case .$with_cflags in
15045 (.*-g*)
15046         case .$CFLAGS in
15047         (.*-g*)
15048                 ;;
15049         (*)
15050
15051 cf_fix_cppflags=no
15052 cf_new_cflags=
15053 cf_new_cppflags=
15054 cf_new_extra_cppflags=
15055
15056 for cf_add_cflags in -g
15057 do
15058 case $cf_fix_cppflags in
15059 (no)
15060         case $cf_add_cflags in
15061         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15062                 case $cf_add_cflags in
15063                 (-D*)
15064                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15065
15066                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15067                                 && test -z "${cf_tst_cflags}" \
15068                                 && cf_fix_cppflags=yes
15069
15070                         if test $cf_fix_cppflags = yes ; then
15071
15072         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15073         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15074
15075                                 continue
15076                         elif test "${cf_tst_cflags}" = "\"'" ; then
15077
15078         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15079         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15080
15081                                 continue
15082                         fi
15083                         ;;
15084                 esac
15085                 case "$CPPFLAGS" in
15086                 (*$cf_add_cflags)
15087                         ;;
15088                 (*)
15089                         case $cf_add_cflags in
15090                         (-D*)
15091                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15092
15093 CPPFLAGS=`echo "$CPPFLAGS" | \
15094         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15095                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15096
15097                                 ;;
15098                         esac
15099
15100         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15101         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15102
15103                         ;;
15104                 esac
15105                 ;;
15106         (*)
15107
15108         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15109         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15110
15111                 ;;
15112         esac
15113         ;;
15114 (yes)
15115
15116         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15117         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15118
15119         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15120
15121         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15122                 && test -z "${cf_tst_cflags}" \
15123                 && cf_fix_cppflags=no
15124         ;;
15125 esac
15126 done
15127
15128 if test -n "$cf_new_cflags" ; then
15129
15130         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15131         CFLAGS="${CFLAGS}$cf_new_cflags"
15132
15133 fi
15134
15135 if test -n "$cf_new_cppflags" ; then
15136
15137         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15138         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15139
15140 fi
15141
15142 if test -n "$cf_new_extra_cppflags" ; then
15143
15144         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15145         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15146
15147 fi
15148
15149                 ;;
15150         esac
15151         ;;
15152 esac
15153
15154 echo "$as_me:15154: checking if you want to perform memory-leak testing" >&5
15155 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15156
15157 # Check whether --enable-leaks or --disable-leaks was given.
15158 if test "${enable_leaks+set}" = set; then
15159   enableval="$enable_leaks"
15160   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15161 else
15162   : ${with_no_leaks:=no}
15163 fi;
15164 echo "$as_me:15164: result: $with_no_leaks" >&5
15165 echo "${ECHO_T}$with_no_leaks" >&6
15166
15167 if test "$with_no_leaks" = yes ; then
15168
15169 cat >>confdefs.h <<\EOF
15170 #define NO_LEAKS 1
15171 EOF
15172
15173 cat >>confdefs.h <<\EOF
15174 #define YY_NO_LEAKS 1
15175 EOF
15176
15177 fi
15178
15179 cat >>confdefs.h <<\EOF
15180 #define HAVE_NC_ALLOC_H 1
15181 EOF
15182
15183 ###     use option --enable-expanded to generate certain macros as functions
15184
15185 # Check whether --enable-expanded or --disable-expanded was given.
15186 if test "${enable_expanded+set}" = set; then
15187   enableval="$enable_expanded"
15188   test "x$enableval" = xyes &&
15189 cat >>confdefs.h <<\EOF
15190 #define NCURSES_EXPANDED 1
15191 EOF
15192
15193 fi;
15194
15195 ###     use option --disable-macros to suppress macros in favor of functions
15196
15197 # Check whether --enable-macros or --disable-macros was given.
15198 if test "${enable_macros+set}" = set; then
15199   enableval="$enable_macros"
15200   test "$enableval" = no &&
15201 cat >>confdefs.h <<\EOF
15202 #define NCURSES_NOMACROS 1
15203 EOF
15204
15205 fi;
15206
15207 # Normally we only add trace() to the debug-library.  Allow this to be
15208 # extended to all models of the ncurses library:
15209 cf_all_traces=no
15210 case "$CFLAGS $CPPFLAGS" in
15211 (*-DTRACE*)
15212         cf_all_traces=yes
15213         ;;
15214 esac
15215
15216 echo "$as_me:15216: checking whether to add trace feature to all models" >&5
15217 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15218
15219 # Check whether --with-trace or --without-trace was given.
15220 if test "${with_trace+set}" = set; then
15221   withval="$with_trace"
15222   cf_with_trace=$withval
15223 else
15224   cf_with_trace=$cf_all_traces
15225 fi;
15226 echo "$as_me:15226: result: $cf_with_trace" >&5
15227 echo "${ECHO_T}$cf_with_trace" >&6
15228
15229 if test "x$cf_with_trace" = xyes ; then
15230         LIB_TRACING=all
15231         ADA_TRACE=TRUE
15232
15233 cf_fix_cppflags=no
15234 cf_new_cflags=
15235 cf_new_cppflags=
15236 cf_new_extra_cppflags=
15237
15238 for cf_add_cflags in -DTRACE
15239 do
15240 case $cf_fix_cppflags in
15241 (no)
15242         case $cf_add_cflags in
15243         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15244                 case $cf_add_cflags in
15245                 (-D*)
15246                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15247
15248                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15249                                 && test -z "${cf_tst_cflags}" \
15250                                 && cf_fix_cppflags=yes
15251
15252                         if test $cf_fix_cppflags = yes ; then
15253
15254         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15255         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15256
15257                                 continue
15258                         elif test "${cf_tst_cflags}" = "\"'" ; then
15259
15260         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15261         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15262
15263                                 continue
15264                         fi
15265                         ;;
15266                 esac
15267                 case "$CPPFLAGS" in
15268                 (*$cf_add_cflags)
15269                         ;;
15270                 (*)
15271                         case $cf_add_cflags in
15272                         (-D*)
15273                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15274
15275 CPPFLAGS=`echo "$CPPFLAGS" | \
15276         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15277                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15278
15279                                 ;;
15280                         esac
15281
15282         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15283         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15284
15285                         ;;
15286                 esac
15287                 ;;
15288         (*)
15289
15290         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15291         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15292
15293                 ;;
15294         esac
15295         ;;
15296 (yes)
15297
15298         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15299         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15300
15301         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15302
15303         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15304                 && test -z "${cf_tst_cflags}" \
15305                 && cf_fix_cppflags=no
15306         ;;
15307 esac
15308 done
15309
15310 if test -n "$cf_new_cflags" ; then
15311
15312         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15313         CFLAGS="${CFLAGS}$cf_new_cflags"
15314
15315 fi
15316
15317 if test -n "$cf_new_cppflags" ; then
15318
15319         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15320         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15321
15322 fi
15323
15324 if test -n "$cf_new_extra_cppflags" ; then
15325
15326         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15327         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15328
15329 fi
15330
15331 cat >>confdefs.h <<\EOF
15332 #define HAVE__TRACEF 1
15333 EOF
15334
15335 else
15336         LIB_TRACING=DEBUG
15337         ADA_TRACE=FALSE
15338 fi
15339
15340 echo "$as_me:15340: checking if we want to use GNAT projects" >&5
15341 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15342
15343 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15344 if test "${enable_gnat_projects+set}" = set; then
15345   enableval="$enable_gnat_projects"
15346   test "$enableval" != no && enableval=yes
15347         if test "$enableval" != "yes" ; then
15348     enable_gnat_projects=no
15349         else
15350                 enable_gnat_projects=yes
15351         fi
15352 else
15353   enableval=yes
15354         enable_gnat_projects=yes
15355
15356 fi;
15357 echo "$as_me:15357: result: $enable_gnat_projects" >&5
15358 echo "${ECHO_T}$enable_gnat_projects" >&6
15359
15360 ###     Checks for libraries.
15361 case $cf_cv_system_name in
15362 (*mingw32*|*mingw64*)
15363         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15364         LIBS=" -lpsapi $LIBS"
15365         ;;
15366 (*)
15367 echo "$as_me:15367: checking for gettimeofday" >&5
15368 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15369 if test "${ac_cv_func_gettimeofday+set}" = set; then
15370   echo $ECHO_N "(cached) $ECHO_C" >&6
15371 else
15372   cat >conftest.$ac_ext <<_ACEOF
15373 #line 15373 "configure"
15374 #include "confdefs.h"
15375 /* System header to define __stub macros and hopefully few prototypes,
15376     which can conflict with char gettimeofday (); below.  */
15377 #include <assert.h>
15378 /* Override any gcc2 internal prototype to avoid an error.  */
15379 #ifdef __cplusplus
15380 extern "C"
15381 #endif
15382 /* We use char because int might match the return type of a gcc2
15383    builtin and then its argument prototype would still apply.  */
15384 char gettimeofday ();
15385 char (*f) ();
15386
15387 int
15388 main (void)
15389 {
15390 /* The GNU C library defines this for functions which it implements
15391     to always fail with ENOSYS.  Some functions are actually named
15392     something starting with __ and the normal name is an alias.  */
15393 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15394 choke me
15395 #else
15396 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15397 #endif
15398
15399   ;
15400   return 0;
15401 }
15402 _ACEOF
15403 rm -f conftest.$ac_objext conftest$ac_exeext
15404 if { (eval echo "$as_me:15404: \"$ac_link\"") >&5
15405   (eval $ac_link) 2>&5
15406   ac_status=$?
15407   echo "$as_me:15407: \$? = $ac_status" >&5
15408   (exit $ac_status); } &&
15409          { ac_try='test -s conftest$ac_exeext'
15410   { (eval echo "$as_me:15410: \"$ac_try\"") >&5
15411   (eval $ac_try) 2>&5
15412   ac_status=$?
15413   echo "$as_me:15413: \$? = $ac_status" >&5
15414   (exit $ac_status); }; }; then
15415   ac_cv_func_gettimeofday=yes
15416 else
15417   echo "$as_me: failed program was:" >&5
15418 cat conftest.$ac_ext >&5
15419 ac_cv_func_gettimeofday=no
15420 fi
15421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15422 fi
15423 echo "$as_me:15423: result: $ac_cv_func_gettimeofday" >&5
15424 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15425 if test $ac_cv_func_gettimeofday = yes; then
15426
15427 cat >>confdefs.h <<\EOF
15428 #define HAVE_GETTIMEOFDAY 1
15429 EOF
15430
15431 else
15432
15433 echo "$as_me:15433: checking for gettimeofday in -lbsd" >&5
15434 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15435 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15436   echo $ECHO_N "(cached) $ECHO_C" >&6
15437 else
15438   ac_check_lib_save_LIBS=$LIBS
15439 LIBS="-lbsd  $LIBS"
15440 cat >conftest.$ac_ext <<_ACEOF
15441 #line 15441 "configure"
15442 #include "confdefs.h"
15443
15444 /* Override any gcc2 internal prototype to avoid an error.  */
15445 #ifdef __cplusplus
15446 extern "C"
15447 #endif
15448 /* We use char because int might match the return type of a gcc2
15449    builtin and then its argument prototype would still apply.  */
15450 char gettimeofday ();
15451 int
15452 main (void)
15453 {
15454 gettimeofday ();
15455   ;
15456   return 0;
15457 }
15458 _ACEOF
15459 rm -f conftest.$ac_objext conftest$ac_exeext
15460 if { (eval echo "$as_me:15460: \"$ac_link\"") >&5
15461   (eval $ac_link) 2>&5
15462   ac_status=$?
15463   echo "$as_me:15463: \$? = $ac_status" >&5
15464   (exit $ac_status); } &&
15465          { ac_try='test -s conftest$ac_exeext'
15466   { (eval echo "$as_me:15466: \"$ac_try\"") >&5
15467   (eval $ac_try) 2>&5
15468   ac_status=$?
15469   echo "$as_me:15469: \$? = $ac_status" >&5
15470   (exit $ac_status); }; }; then
15471   ac_cv_lib_bsd_gettimeofday=yes
15472 else
15473   echo "$as_me: failed program was:" >&5
15474 cat conftest.$ac_ext >&5
15475 ac_cv_lib_bsd_gettimeofday=no
15476 fi
15477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15478 LIBS=$ac_check_lib_save_LIBS
15479 fi
15480 echo "$as_me:15480: result: $ac_cv_lib_bsd_gettimeofday" >&5
15481 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15482 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15483
15484 cat >>confdefs.h <<\EOF
15485 #define HAVE_GETTIMEOFDAY 1
15486 EOF
15487
15488 cf_add_libs="-lbsd"
15489 # Filter out duplicates - this happens with badly-designed ".pc" files...
15490 for cf_add_1lib in $LIBS
15491 do
15492         for cf_add_2lib in $cf_add_libs
15493         do
15494                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15495                 then
15496                         cf_add_1lib=
15497                         break
15498                 fi
15499         done
15500         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15501 done
15502 LIBS="$cf_add_libs"
15503
15504 fi
15505
15506 fi
15507         ;;
15508 esac
15509
15510 echo "$as_me:15510: checking if -lm needed for math functions" >&5
15511 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15512 if test "${cf_cv_need_libm+set}" = set; then
15513   echo $ECHO_N "(cached) $ECHO_C" >&6
15514 else
15515
15516         cat >conftest.$ac_ext <<_ACEOF
15517 #line 15517 "configure"
15518 #include "confdefs.h"
15519
15520         #include <stdio.h>
15521         #include <stdlib.h>
15522         #include <math.h>
15523
15524 int
15525 main (void)
15526 {
15527 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15528   ;
15529   return 0;
15530 }
15531 _ACEOF
15532 rm -f conftest.$ac_objext conftest$ac_exeext
15533 if { (eval echo "$as_me:15533: \"$ac_link\"") >&5
15534   (eval $ac_link) 2>&5
15535   ac_status=$?
15536   echo "$as_me:15536: \$? = $ac_status" >&5
15537   (exit $ac_status); } &&
15538          { ac_try='test -s conftest$ac_exeext'
15539   { (eval echo "$as_me:15539: \"$ac_try\"") >&5
15540   (eval $ac_try) 2>&5
15541   ac_status=$?
15542   echo "$as_me:15542: \$? = $ac_status" >&5
15543   (exit $ac_status); }; }; then
15544   cf_cv_need_libm=no
15545 else
15546   echo "$as_me: failed program was:" >&5
15547 cat conftest.$ac_ext >&5
15548 cf_cv_need_libm=yes
15549 fi
15550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15551 fi
15552 echo "$as_me:15552: result: $cf_cv_need_libm" >&5
15553 echo "${ECHO_T}$cf_cv_need_libm" >&6
15554 if test "$cf_cv_need_libm" = yes
15555 then
15556 MATH_LIB=-lm
15557 fi
15558
15559 ###     Checks for header files.
15560 echo "$as_me:15560: checking for ANSI C header files" >&5
15561 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15562 if test "${ac_cv_header_stdc+set}" = set; then
15563   echo $ECHO_N "(cached) $ECHO_C" >&6
15564 else
15565   cat >conftest.$ac_ext <<_ACEOF
15566 #line 15566 "configure"
15567 #include "confdefs.h"
15568 #include <stdlib.h>
15569 #include <stdarg.h>
15570 #include <string.h>
15571 #include <float.h>
15572
15573 _ACEOF
15574 if { (eval echo "$as_me:15574: \"$ac_cpp conftest.$ac_ext\"") >&5
15575   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15576   ac_status=$?
15577   egrep -v '^ *\+' conftest.er1 >conftest.err
15578   rm -f conftest.er1
15579   cat conftest.err >&5
15580   echo "$as_me:15580: \$? = $ac_status" >&5
15581   (exit $ac_status); } >/dev/null; then
15582   if test -s conftest.err; then
15583     ac_cpp_err=$ac_c_preproc_warn_flag
15584   else
15585     ac_cpp_err=
15586   fi
15587 else
15588   ac_cpp_err=yes
15589 fi
15590 if test -z "$ac_cpp_err"; then
15591   ac_cv_header_stdc=yes
15592 else
15593   echo "$as_me: failed program was:" >&5
15594   cat conftest.$ac_ext >&5
15595   ac_cv_header_stdc=no
15596 fi
15597 rm -f conftest.err conftest.$ac_ext
15598
15599 if test $ac_cv_header_stdc = yes; then
15600   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15601   cat >conftest.$ac_ext <<_ACEOF
15602 #line 15602 "configure"
15603 #include "confdefs.h"
15604 #include <string.h>
15605
15606 _ACEOF
15607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15608   egrep "memchr" >/dev/null 2>&1; then
15609   :
15610 else
15611   ac_cv_header_stdc=no
15612 fi
15613 rm -rf conftest*
15614
15615 fi
15616
15617 if test $ac_cv_header_stdc = yes; then
15618   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15619   cat >conftest.$ac_ext <<_ACEOF
15620 #line 15620 "configure"
15621 #include "confdefs.h"
15622 #include <stdlib.h>
15623
15624 _ACEOF
15625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15626   egrep "free" >/dev/null 2>&1; then
15627   :
15628 else
15629   ac_cv_header_stdc=no
15630 fi
15631 rm -rf conftest*
15632
15633 fi
15634
15635 if test $ac_cv_header_stdc = yes; then
15636   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15637   if test "$cross_compiling" = yes; then
15638   :
15639 else
15640   cat >conftest.$ac_ext <<_ACEOF
15641 #line 15641 "configure"
15642 #include "confdefs.h"
15643 #include <ctype.h>
15644 #if ((' ' & 0x0FF) == 0x020)
15645 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15646 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15647 #else
15648 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15649                      || ('j' <= (c) && (c) <= 'r') \
15650                      || ('s' <= (c) && (c) <= 'z'))
15651 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15652 #endif
15653
15654 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15655 int
15656 main (void)
15657 {
15658   int i;
15659   for (i = 0; i < 256; i++)
15660     if (XOR (islower (i), ISLOWER (i))
15661         || toupper (i) != TOUPPER (i))
15662       $ac_main_return(2);
15663   $ac_main_return (0);
15664 }
15665 _ACEOF
15666 rm -f conftest$ac_exeext
15667 if { (eval echo "$as_me:15667: \"$ac_link\"") >&5
15668   (eval $ac_link) 2>&5
15669   ac_status=$?
15670   echo "$as_me:15670: \$? = $ac_status" >&5
15671   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15672   { (eval echo "$as_me:15672: \"$ac_try\"") >&5
15673   (eval $ac_try) 2>&5
15674   ac_status=$?
15675   echo "$as_me:15675: \$? = $ac_status" >&5
15676   (exit $ac_status); }; }; then
15677   :
15678 else
15679   echo "$as_me: program exited with status $ac_status" >&5
15680 echo "$as_me: failed program was:" >&5
15681 cat conftest.$ac_ext >&5
15682 ac_cv_header_stdc=no
15683 fi
15684 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15685 fi
15686 fi
15687 fi
15688 echo "$as_me:15688: result: $ac_cv_header_stdc" >&5
15689 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15690 if test $ac_cv_header_stdc = yes; then
15691
15692 cat >>confdefs.h <<\EOF
15693 #define STDC_HEADERS 1
15694 EOF
15695
15696 fi
15697
15698 ac_header_dirent=no
15699 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15700   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15701 echo "$as_me:15701: checking for $ac_hdr that defines DIR" >&5
15702 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15703 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15704   echo $ECHO_N "(cached) $ECHO_C" >&6
15705 else
15706   cat >conftest.$ac_ext <<_ACEOF
15707 #line 15707 "configure"
15708 #include "confdefs.h"
15709 #include <sys/types.h>
15710 #include <$ac_hdr>
15711
15712 int
15713 main (void)
15714 {
15715 if ((DIR *) 0)
15716 return 0;
15717   ;
15718   return 0;
15719 }
15720 _ACEOF
15721 rm -f conftest.$ac_objext
15722 if { (eval echo "$as_me:15722: \"$ac_compile\"") >&5
15723   (eval $ac_compile) 2>&5
15724   ac_status=$?
15725   echo "$as_me:15725: \$? = $ac_status" >&5
15726   (exit $ac_status); } &&
15727          { ac_try='test -s conftest.$ac_objext'
15728   { (eval echo "$as_me:15728: \"$ac_try\"") >&5
15729   (eval $ac_try) 2>&5
15730   ac_status=$?
15731   echo "$as_me:15731: \$? = $ac_status" >&5
15732   (exit $ac_status); }; }; then
15733   eval "$as_ac_Header=yes"
15734 else
15735   echo "$as_me: failed program was:" >&5
15736 cat conftest.$ac_ext >&5
15737 eval "$as_ac_Header=no"
15738 fi
15739 rm -f conftest.$ac_objext conftest.$ac_ext
15740 fi
15741 echo "$as_me:15741: result: `eval echo '${'$as_ac_Header'}'`" >&5
15742 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15743 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15744   cat >>confdefs.h <<EOF
15745 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15746 EOF
15747
15748 ac_header_dirent=$ac_hdr; break
15749 fi
15750
15751 done
15752 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15753 if test $ac_header_dirent = dirent.h; then
15754   echo "$as_me:15754: checking for opendir in -ldir" >&5
15755 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15756 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15757   echo $ECHO_N "(cached) $ECHO_C" >&6
15758 else
15759   ac_check_lib_save_LIBS=$LIBS
15760 LIBS="-ldir  $LIBS"
15761 cat >conftest.$ac_ext <<_ACEOF
15762 #line 15762 "configure"
15763 #include "confdefs.h"
15764
15765 /* Override any gcc2 internal prototype to avoid an error.  */
15766 #ifdef __cplusplus
15767 extern "C"
15768 #endif
15769 /* We use char because int might match the return type of a gcc2
15770    builtin and then its argument prototype would still apply.  */
15771 char opendir ();
15772 int
15773 main (void)
15774 {
15775 opendir ();
15776   ;
15777   return 0;
15778 }
15779 _ACEOF
15780 rm -f conftest.$ac_objext conftest$ac_exeext
15781 if { (eval echo "$as_me:15781: \"$ac_link\"") >&5
15782   (eval $ac_link) 2>&5
15783   ac_status=$?
15784   echo "$as_me:15784: \$? = $ac_status" >&5
15785   (exit $ac_status); } &&
15786          { ac_try='test -s conftest$ac_exeext'
15787   { (eval echo "$as_me:15787: \"$ac_try\"") >&5
15788   (eval $ac_try) 2>&5
15789   ac_status=$?
15790   echo "$as_me:15790: \$? = $ac_status" >&5
15791   (exit $ac_status); }; }; then
15792   ac_cv_lib_dir_opendir=yes
15793 else
15794   echo "$as_me: failed program was:" >&5
15795 cat conftest.$ac_ext >&5
15796 ac_cv_lib_dir_opendir=no
15797 fi
15798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15799 LIBS=$ac_check_lib_save_LIBS
15800 fi
15801 echo "$as_me:15801: result: $ac_cv_lib_dir_opendir" >&5
15802 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15803 if test $ac_cv_lib_dir_opendir = yes; then
15804   LIBS="$LIBS -ldir"
15805 fi
15806
15807 else
15808   echo "$as_me:15808: checking for opendir in -lx" >&5
15809 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15810 if test "${ac_cv_lib_x_opendir+set}" = set; then
15811   echo $ECHO_N "(cached) $ECHO_C" >&6
15812 else
15813   ac_check_lib_save_LIBS=$LIBS
15814 LIBS="-lx  $LIBS"
15815 cat >conftest.$ac_ext <<_ACEOF
15816 #line 15816 "configure"
15817 #include "confdefs.h"
15818
15819 /* Override any gcc2 internal prototype to avoid an error.  */
15820 #ifdef __cplusplus
15821 extern "C"
15822 #endif
15823 /* We use char because int might match the return type of a gcc2
15824    builtin and then its argument prototype would still apply.  */
15825 char opendir ();
15826 int
15827 main (void)
15828 {
15829 opendir ();
15830   ;
15831   return 0;
15832 }
15833 _ACEOF
15834 rm -f conftest.$ac_objext conftest$ac_exeext
15835 if { (eval echo "$as_me:15835: \"$ac_link\"") >&5
15836   (eval $ac_link) 2>&5
15837   ac_status=$?
15838   echo "$as_me:15838: \$? = $ac_status" >&5
15839   (exit $ac_status); } &&
15840          { ac_try='test -s conftest$ac_exeext'
15841   { (eval echo "$as_me:15841: \"$ac_try\"") >&5
15842   (eval $ac_try) 2>&5
15843   ac_status=$?
15844   echo "$as_me:15844: \$? = $ac_status" >&5
15845   (exit $ac_status); }; }; then
15846   ac_cv_lib_x_opendir=yes
15847 else
15848   echo "$as_me: failed program was:" >&5
15849 cat conftest.$ac_ext >&5
15850 ac_cv_lib_x_opendir=no
15851 fi
15852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15853 LIBS=$ac_check_lib_save_LIBS
15854 fi
15855 echo "$as_me:15855: result: $ac_cv_lib_x_opendir" >&5
15856 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15857 if test $ac_cv_lib_x_opendir = yes; then
15858   LIBS="$LIBS -lx"
15859 fi
15860
15861 fi
15862
15863 echo "$as_me:15863: checking whether time.h and sys/time.h may both be included" >&5
15864 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15865 if test "${ac_cv_header_time+set}" = set; then
15866   echo $ECHO_N "(cached) $ECHO_C" >&6
15867 else
15868   cat >conftest.$ac_ext <<_ACEOF
15869 #line 15869 "configure"
15870 #include "confdefs.h"
15871 #include <sys/types.h>
15872 #include <sys/time.h>
15873 #include <time.h>
15874
15875 int
15876 main (void)
15877 {
15878 if ((struct tm *) 0)
15879 return 0;
15880   ;
15881   return 0;
15882 }
15883 _ACEOF
15884 rm -f conftest.$ac_objext
15885 if { (eval echo "$as_me:15885: \"$ac_compile\"") >&5
15886   (eval $ac_compile) 2>&5
15887   ac_status=$?
15888   echo "$as_me:15888: \$? = $ac_status" >&5
15889   (exit $ac_status); } &&
15890          { ac_try='test -s conftest.$ac_objext'
15891   { (eval echo "$as_me:15891: \"$ac_try\"") >&5
15892   (eval $ac_try) 2>&5
15893   ac_status=$?
15894   echo "$as_me:15894: \$? = $ac_status" >&5
15895   (exit $ac_status); }; }; then
15896   ac_cv_header_time=yes
15897 else
15898   echo "$as_me: failed program was:" >&5
15899 cat conftest.$ac_ext >&5
15900 ac_cv_header_time=no
15901 fi
15902 rm -f conftest.$ac_objext conftest.$ac_ext
15903 fi
15904 echo "$as_me:15904: result: $ac_cv_header_time" >&5
15905 echo "${ECHO_T}$ac_cv_header_time" >&6
15906 if test $ac_cv_header_time = yes; then
15907
15908 cat >>confdefs.h <<\EOF
15909 #define TIME_WITH_SYS_TIME 1
15910 EOF
15911
15912 fi
15913
15914 cf_regex_func=no
15915
15916 cf_regex_libs="regex re"
15917 case $host_os in
15918 (mingw*)
15919         cf_regex_libs="gnurx $cf_regex_libs"
15920         ;;
15921 esac
15922
15923 echo "$as_me:15923: checking for regcomp" >&5
15924 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15925 if test "${ac_cv_func_regcomp+set}" = set; then
15926   echo $ECHO_N "(cached) $ECHO_C" >&6
15927 else
15928   cat >conftest.$ac_ext <<_ACEOF
15929 #line 15929 "configure"
15930 #include "confdefs.h"
15931 /* System header to define __stub macros and hopefully few prototypes,
15932     which can conflict with char regcomp (); below.  */
15933 #include <assert.h>
15934 /* Override any gcc2 internal prototype to avoid an error.  */
15935 #ifdef __cplusplus
15936 extern "C"
15937 #endif
15938 /* We use char because int might match the return type of a gcc2
15939    builtin and then its argument prototype would still apply.  */
15940 char regcomp ();
15941 char (*f) ();
15942
15943 int
15944 main (void)
15945 {
15946 /* The GNU C library defines this for functions which it implements
15947     to always fail with ENOSYS.  Some functions are actually named
15948     something starting with __ and the normal name is an alias.  */
15949 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15950 choke me
15951 #else
15952 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15953 #endif
15954
15955   ;
15956   return 0;
15957 }
15958 _ACEOF
15959 rm -f conftest.$ac_objext conftest$ac_exeext
15960 if { (eval echo "$as_me:15960: \"$ac_link\"") >&5
15961   (eval $ac_link) 2>&5
15962   ac_status=$?
15963   echo "$as_me:15963: \$? = $ac_status" >&5
15964   (exit $ac_status); } &&
15965          { ac_try='test -s conftest$ac_exeext'
15966   { (eval echo "$as_me:15966: \"$ac_try\"") >&5
15967   (eval $ac_try) 2>&5
15968   ac_status=$?
15969   echo "$as_me:15969: \$? = $ac_status" >&5
15970   (exit $ac_status); }; }; then
15971   ac_cv_func_regcomp=yes
15972 else
15973   echo "$as_me: failed program was:" >&5
15974 cat conftest.$ac_ext >&5
15975 ac_cv_func_regcomp=no
15976 fi
15977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15978 fi
15979 echo "$as_me:15979: result: $ac_cv_func_regcomp" >&5
15980 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15981 if test $ac_cv_func_regcomp = yes; then
15982   cf_regex_func=regcomp
15983 else
15984
15985         for cf_regex_lib in $cf_regex_libs
15986         do
15987                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15988 echo "$as_me:15988: checking for regcomp in -l$cf_regex_lib" >&5
15989 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15990 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15991   echo $ECHO_N "(cached) $ECHO_C" >&6
15992 else
15993   ac_check_lib_save_LIBS=$LIBS
15994 LIBS="-l$cf_regex_lib  $LIBS"
15995 cat >conftest.$ac_ext <<_ACEOF
15996 #line 15996 "configure"
15997 #include "confdefs.h"
15998
15999 /* Override any gcc2 internal prototype to avoid an error.  */
16000 #ifdef __cplusplus
16001 extern "C"
16002 #endif
16003 /* We use char because int might match the return type of a gcc2
16004    builtin and then its argument prototype would still apply.  */
16005 char regcomp ();
16006 int
16007 main (void)
16008 {
16009 regcomp ();
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f conftest.$ac_objext conftest$ac_exeext
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit $ac_status); } &&
16020          { ac_try='test -s conftest$ac_exeext'
16021   { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022   (eval $ac_try) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit $ac_status); }; }; then
16026   eval "$as_ac_Lib=yes"
16027 else
16028   echo "$as_me: failed program was:" >&5
16029 cat conftest.$ac_ext >&5
16030 eval "$as_ac_Lib=no"
16031 fi
16032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16033 LIBS=$ac_check_lib_save_LIBS
16034 fi
16035 echo "$as_me:16035: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16036 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16037 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16038
16039 cf_add_libs="-l$cf_regex_lib"
16040 # Filter out duplicates - this happens with badly-designed ".pc" files...
16041 for cf_add_1lib in $LIBS
16042 do
16043         for cf_add_2lib in $cf_add_libs
16044         do
16045                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16046                 then
16047                         cf_add_1lib=
16048                         break
16049                 fi
16050         done
16051         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16052 done
16053 LIBS="$cf_add_libs"
16054
16055                                 cf_regex_func=regcomp
16056                                 break
16057 fi
16058
16059         done
16060
16061 fi
16062
16063 if test "$cf_regex_func" = no ; then
16064         echo "$as_me:16064: checking for compile" >&5
16065 echo $ECHO_N "checking for compile... $ECHO_C" >&6
16066 if test "${ac_cv_func_compile+set}" = set; then
16067   echo $ECHO_N "(cached) $ECHO_C" >&6
16068 else
16069   cat >conftest.$ac_ext <<_ACEOF
16070 #line 16070 "configure"
16071 #include "confdefs.h"
16072 /* System header to define __stub macros and hopefully few prototypes,
16073     which can conflict with char compile (); below.  */
16074 #include <assert.h>
16075 /* Override any gcc2 internal prototype to avoid an error.  */
16076 #ifdef __cplusplus
16077 extern "C"
16078 #endif
16079 /* We use char because int might match the return type of a gcc2
16080    builtin and then its argument prototype would still apply.  */
16081 char compile ();
16082 char (*f) ();
16083
16084 int
16085 main (void)
16086 {
16087 /* The GNU C library defines this for functions which it implements
16088     to always fail with ENOSYS.  Some functions are actually named
16089     something starting with __ and the normal name is an alias.  */
16090 #if defined (__stub_compile) || defined (__stub___compile)
16091 choke me
16092 #else
16093 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16094 #endif
16095
16096   ;
16097   return 0;
16098 }
16099 _ACEOF
16100 rm -f conftest.$ac_objext conftest$ac_exeext
16101 if { (eval echo "$as_me:16101: \"$ac_link\"") >&5
16102   (eval $ac_link) 2>&5
16103   ac_status=$?
16104   echo "$as_me:16104: \$? = $ac_status" >&5
16105   (exit $ac_status); } &&
16106          { ac_try='test -s conftest$ac_exeext'
16107   { (eval echo "$as_me:16107: \"$ac_try\"") >&5
16108   (eval $ac_try) 2>&5
16109   ac_status=$?
16110   echo "$as_me:16110: \$? = $ac_status" >&5
16111   (exit $ac_status); }; }; then
16112   ac_cv_func_compile=yes
16113 else
16114   echo "$as_me: failed program was:" >&5
16115 cat conftest.$ac_ext >&5
16116 ac_cv_func_compile=no
16117 fi
16118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16119 fi
16120 echo "$as_me:16120: result: $ac_cv_func_compile" >&5
16121 echo "${ECHO_T}$ac_cv_func_compile" >&6
16122 if test $ac_cv_func_compile = yes; then
16123   cf_regex_func=compile
16124 else
16125
16126                 echo "$as_me:16126: checking for compile in -lgen" >&5
16127 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16128 if test "${ac_cv_lib_gen_compile+set}" = set; then
16129   echo $ECHO_N "(cached) $ECHO_C" >&6
16130 else
16131   ac_check_lib_save_LIBS=$LIBS
16132 LIBS="-lgen  $LIBS"
16133 cat >conftest.$ac_ext <<_ACEOF
16134 #line 16134 "configure"
16135 #include "confdefs.h"
16136
16137 /* Override any gcc2 internal prototype to avoid an error.  */
16138 #ifdef __cplusplus
16139 extern "C"
16140 #endif
16141 /* We use char because int might match the return type of a gcc2
16142    builtin and then its argument prototype would still apply.  */
16143 char compile ();
16144 int
16145 main (void)
16146 {
16147 compile ();
16148   ;
16149   return 0;
16150 }
16151 _ACEOF
16152 rm -f conftest.$ac_objext conftest$ac_exeext
16153 if { (eval echo "$as_me:16153: \"$ac_link\"") >&5
16154   (eval $ac_link) 2>&5
16155   ac_status=$?
16156   echo "$as_me:16156: \$? = $ac_status" >&5
16157   (exit $ac_status); } &&
16158          { ac_try='test -s conftest$ac_exeext'
16159   { (eval echo "$as_me:16159: \"$ac_try\"") >&5
16160   (eval $ac_try) 2>&5
16161   ac_status=$?
16162   echo "$as_me:16162: \$? = $ac_status" >&5
16163   (exit $ac_status); }; }; then
16164   ac_cv_lib_gen_compile=yes
16165 else
16166   echo "$as_me: failed program was:" >&5
16167 cat conftest.$ac_ext >&5
16168 ac_cv_lib_gen_compile=no
16169 fi
16170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16171 LIBS=$ac_check_lib_save_LIBS
16172 fi
16173 echo "$as_me:16173: result: $ac_cv_lib_gen_compile" >&5
16174 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16175 if test $ac_cv_lib_gen_compile = yes; then
16176
16177 cf_add_libs="-lgen"
16178 # Filter out duplicates - this happens with badly-designed ".pc" files...
16179 for cf_add_1lib in $LIBS
16180 do
16181         for cf_add_2lib in $cf_add_libs
16182         do
16183                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16184                 then
16185                         cf_add_1lib=
16186                         break
16187                 fi
16188         done
16189         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16190 done
16191 LIBS="$cf_add_libs"
16192
16193                                 cf_regex_func=compile
16194 fi
16195
16196 fi
16197
16198 fi
16199
16200 if test "$cf_regex_func" = no ; then
16201         { echo "$as_me:16201: WARNING: cannot find regular expression library" >&5
16202 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16203 fi
16204
16205 echo "$as_me:16205: checking for regular-expression headers" >&5
16206 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16207 if test "${cf_cv_regex_hdrs+set}" = set; then
16208   echo $ECHO_N "(cached) $ECHO_C" >&6
16209 else
16210
16211 cf_cv_regex_hdrs=no
16212 case $cf_regex_func in
16213 (compile)
16214         for cf_regex_hdr in regexp.h regexpr.h
16215         do
16216                 cat >conftest.$ac_ext <<_ACEOF
16217 #line 16217 "configure"
16218 #include "confdefs.h"
16219 #include <$cf_regex_hdr>
16220 int
16221 main (void)
16222 {
16223
16224                         char *p = compile("", "", "", 0);
16225                         int x = step("", "");
16226
16227   ;
16228   return 0;
16229 }
16230 _ACEOF
16231 rm -f conftest.$ac_objext conftest$ac_exeext
16232 if { (eval echo "$as_me:16232: \"$ac_link\"") >&5
16233   (eval $ac_link) 2>&5
16234   ac_status=$?
16235   echo "$as_me:16235: \$? = $ac_status" >&5
16236   (exit $ac_status); } &&
16237          { ac_try='test -s conftest$ac_exeext'
16238   { (eval echo "$as_me:16238: \"$ac_try\"") >&5
16239   (eval $ac_try) 2>&5
16240   ac_status=$?
16241   echo "$as_me:16241: \$? = $ac_status" >&5
16242   (exit $ac_status); }; }; then
16243
16244                         cf_cv_regex_hdrs=$cf_regex_hdr
16245                         break
16246
16247 else
16248   echo "$as_me: failed program was:" >&5
16249 cat conftest.$ac_ext >&5
16250 fi
16251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16252         done
16253         ;;
16254 (*)
16255         for cf_regex_hdr in regex.h
16256         do
16257                 cat >conftest.$ac_ext <<_ACEOF
16258 #line 16258 "configure"
16259 #include "confdefs.h"
16260 #include <sys/types.h>
16261 #include <$cf_regex_hdr>
16262 int
16263 main (void)
16264 {
16265
16266                         regex_t *p;
16267                         int x = regcomp(p, "", 0);
16268                         int y = regexec(p, "", 0, 0, 0);
16269                         regfree(p);
16270
16271   ;
16272   return 0;
16273 }
16274 _ACEOF
16275 rm -f conftest.$ac_objext conftest$ac_exeext
16276 if { (eval echo "$as_me:16276: \"$ac_link\"") >&5
16277   (eval $ac_link) 2>&5
16278   ac_status=$?
16279   echo "$as_me:16279: \$? = $ac_status" >&5
16280   (exit $ac_status); } &&
16281          { ac_try='test -s conftest$ac_exeext'
16282   { (eval echo "$as_me:16282: \"$ac_try\"") >&5
16283   (eval $ac_try) 2>&5
16284   ac_status=$?
16285   echo "$as_me:16285: \$? = $ac_status" >&5
16286   (exit $ac_status); }; }; then
16287
16288                         cf_cv_regex_hdrs=$cf_regex_hdr
16289                         break
16290
16291 else
16292   echo "$as_me: failed program was:" >&5
16293 cat conftest.$ac_ext >&5
16294 fi
16295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16296         done
16297         ;;
16298 esac
16299
16300 fi
16301 echo "$as_me:16301: result: $cf_cv_regex_hdrs" >&5
16302 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16303
16304 case $cf_cv_regex_hdrs in
16305         (no)            { echo "$as_me:16305: WARNING: no regular expression header found" >&5
16306 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16307         (regex.h)
16308 cat >>confdefs.h <<\EOF
16309 #define HAVE_REGEX_H_FUNCS 1
16310 EOF
16311  ;;
16312         (regexp.h)
16313 cat >>confdefs.h <<\EOF
16314 #define HAVE_REGEXP_H_FUNCS 1
16315 EOF
16316  ;;
16317         (regexpr.h)
16318 cat >>confdefs.h <<\EOF
16319 #define HAVE_REGEXPR_H_FUNCS 1
16320 EOF
16321  ;;
16322 esac
16323
16324 for ac_header in \
16325 fcntl.h \
16326 getopt.h \
16327 limits.h \
16328 locale.h \
16329 math.h \
16330 poll.h \
16331 sys/bsdtypes.h \
16332 sys/ioctl.h \
16333 sys/param.h \
16334 sys/poll.h \
16335 sys/select.h \
16336 sys/time.h \
16337 sys/times.h \
16338 ttyent.h \
16339 unistd.h \
16340 wctype.h \
16341
16342 do
16343 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16344 echo "$as_me:16344: checking for $ac_header" >&5
16345 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16346 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16347   echo $ECHO_N "(cached) $ECHO_C" >&6
16348 else
16349   cat >conftest.$ac_ext <<_ACEOF
16350 #line 16350 "configure"
16351 #include "confdefs.h"
16352 #include <$ac_header>
16353 _ACEOF
16354 if { (eval echo "$as_me:16354: \"$ac_cpp conftest.$ac_ext\"") >&5
16355   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16356   ac_status=$?
16357   egrep -v '^ *\+' conftest.er1 >conftest.err
16358   rm -f conftest.er1
16359   cat conftest.err >&5
16360   echo "$as_me:16360: \$? = $ac_status" >&5
16361   (exit $ac_status); } >/dev/null; then
16362   if test -s conftest.err; then
16363     ac_cpp_err=$ac_c_preproc_warn_flag
16364   else
16365     ac_cpp_err=
16366   fi
16367 else
16368   ac_cpp_err=yes
16369 fi
16370 if test -z "$ac_cpp_err"; then
16371   eval "$as_ac_Header=yes"
16372 else
16373   echo "$as_me: failed program was:" >&5
16374   cat conftest.$ac_ext >&5
16375   eval "$as_ac_Header=no"
16376 fi
16377 rm -f conftest.err conftest.$ac_ext
16378 fi
16379 echo "$as_me:16379: result: `eval echo '${'$as_ac_Header'}'`" >&5
16380 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16381 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16382   cat >>confdefs.h <<EOF
16383 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16384 EOF
16385
16386 fi
16387 done
16388
16389 for ac_header in unistd.h getopt.h
16390 do
16391 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16392 echo "$as_me:16392: checking for $ac_header" >&5
16393 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16394 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16395   echo $ECHO_N "(cached) $ECHO_C" >&6
16396 else
16397   cat >conftest.$ac_ext <<_ACEOF
16398 #line 16398 "configure"
16399 #include "confdefs.h"
16400 #include <$ac_header>
16401 _ACEOF
16402 if { (eval echo "$as_me:16402: \"$ac_cpp conftest.$ac_ext\"") >&5
16403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16404   ac_status=$?
16405   egrep -v '^ *\+' conftest.er1 >conftest.err
16406   rm -f conftest.er1
16407   cat conftest.err >&5
16408   echo "$as_me:16408: \$? = $ac_status" >&5
16409   (exit $ac_status); } >/dev/null; then
16410   if test -s conftest.err; then
16411     ac_cpp_err=$ac_c_preproc_warn_flag
16412   else
16413     ac_cpp_err=
16414   fi
16415 else
16416   ac_cpp_err=yes
16417 fi
16418 if test -z "$ac_cpp_err"; then
16419   eval "$as_ac_Header=yes"
16420 else
16421   echo "$as_me: failed program was:" >&5
16422   cat conftest.$ac_ext >&5
16423   eval "$as_ac_Header=no"
16424 fi
16425 rm -f conftest.err conftest.$ac_ext
16426 fi
16427 echo "$as_me:16427: result: `eval echo '${'$as_ac_Header'}'`" >&5
16428 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16429 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16430   cat >>confdefs.h <<EOF
16431 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16432 EOF
16433
16434 fi
16435 done
16436
16437 echo "$as_me:16437: checking for header declaring getopt variables" >&5
16438 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16439 if test "${cf_cv_getopt_header+set}" = set; then
16440   echo $ECHO_N "(cached) $ECHO_C" >&6
16441 else
16442
16443 cf_cv_getopt_header=none
16444 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16445 do
16446 cat >conftest.$ac_ext <<_ACEOF
16447 #line 16447 "configure"
16448 #include "confdefs.h"
16449
16450 #include <$cf_header>
16451 int
16452 main (void)
16453 {
16454 int x = optind; char *y = optarg
16455   ;
16456   return 0;
16457 }
16458 _ACEOF
16459 rm -f conftest.$ac_objext
16460 if { (eval echo "$as_me:16460: \"$ac_compile\"") >&5
16461   (eval $ac_compile) 2>&5
16462   ac_status=$?
16463   echo "$as_me:16463: \$? = $ac_status" >&5
16464   (exit $ac_status); } &&
16465          { ac_try='test -s conftest.$ac_objext'
16466   { (eval echo "$as_me:16466: \"$ac_try\"") >&5
16467   (eval $ac_try) 2>&5
16468   ac_status=$?
16469   echo "$as_me:16469: \$? = $ac_status" >&5
16470   (exit $ac_status); }; }; then
16471   cf_cv_getopt_header=$cf_header
16472  break
16473 else
16474   echo "$as_me: failed program was:" >&5
16475 cat conftest.$ac_ext >&5
16476 fi
16477 rm -f conftest.$ac_objext conftest.$ac_ext
16478 done
16479
16480 fi
16481 echo "$as_me:16481: result: $cf_cv_getopt_header" >&5
16482 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16483 if test $cf_cv_getopt_header != none ; then
16484
16485 cat >>confdefs.h <<\EOF
16486 #define HAVE_GETOPT_HEADER 1
16487 EOF
16488
16489 fi
16490 if test $cf_cv_getopt_header = getopt.h ; then
16491
16492 cat >>confdefs.h <<\EOF
16493 #define NEED_GETOPT_H 1
16494 EOF
16495
16496 fi
16497
16498 # check for ISC (this may also define _POSIX_SOURCE)
16499 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16500 if test "x$ISC" = xyes ; then
16501
16502 echo "$as_me:16502: checking for main in -lcposix" >&5
16503 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16504 if test "${ac_cv_lib_cposix_main+set}" = set; then
16505   echo $ECHO_N "(cached) $ECHO_C" >&6
16506 else
16507   ac_check_lib_save_LIBS=$LIBS
16508 LIBS="-lcposix  $LIBS"
16509 cat >conftest.$ac_ext <<_ACEOF
16510 #line 16510 "configure"
16511 #include "confdefs.h"
16512
16513 int
16514 main (void)
16515 {
16516 main ();
16517   ;
16518   return 0;
16519 }
16520 _ACEOF
16521 rm -f conftest.$ac_objext conftest$ac_exeext
16522 if { (eval echo "$as_me:16522: \"$ac_link\"") >&5
16523   (eval $ac_link) 2>&5
16524   ac_status=$?
16525   echo "$as_me:16525: \$? = $ac_status" >&5
16526   (exit $ac_status); } &&
16527          { ac_try='test -s conftest$ac_exeext'
16528   { (eval echo "$as_me:16528: \"$ac_try\"") >&5
16529   (eval $ac_try) 2>&5
16530   ac_status=$?
16531   echo "$as_me:16531: \$? = $ac_status" >&5
16532   (exit $ac_status); }; }; then
16533   ac_cv_lib_cposix_main=yes
16534 else
16535   echo "$as_me: failed program was:" >&5
16536 cat conftest.$ac_ext >&5
16537 ac_cv_lib_cposix_main=no
16538 fi
16539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16540 LIBS=$ac_check_lib_save_LIBS
16541 fi
16542 echo "$as_me:16542: result: $ac_cv_lib_cposix_main" >&5
16543 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16544 if test $ac_cv_lib_cposix_main = yes; then
16545   cat >>confdefs.h <<EOF
16546 #define HAVE_LIBCPOSIX 1
16547 EOF
16548
16549   LIBS="-lcposix $LIBS"
16550
16551 fi
16552
16553         echo "$as_me:16553: checking for bzero in -linet" >&5
16554 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16555 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16556   echo $ECHO_N "(cached) $ECHO_C" >&6
16557 else
16558   ac_check_lib_save_LIBS=$LIBS
16559 LIBS="-linet  $LIBS"
16560 cat >conftest.$ac_ext <<_ACEOF
16561 #line 16561 "configure"
16562 #include "confdefs.h"
16563
16564 /* Override any gcc2 internal prototype to avoid an error.  */
16565 #ifdef __cplusplus
16566 extern "C"
16567 #endif
16568 /* We use char because int might match the return type of a gcc2
16569    builtin and then its argument prototype would still apply.  */
16570 char bzero ();
16571 int
16572 main (void)
16573 {
16574 bzero ();
16575   ;
16576   return 0;
16577 }
16578 _ACEOF
16579 rm -f conftest.$ac_objext conftest$ac_exeext
16580 if { (eval echo "$as_me:16580: \"$ac_link\"") >&5
16581   (eval $ac_link) 2>&5
16582   ac_status=$?
16583   echo "$as_me:16583: \$? = $ac_status" >&5
16584   (exit $ac_status); } &&
16585          { ac_try='test -s conftest$ac_exeext'
16586   { (eval echo "$as_me:16586: \"$ac_try\"") >&5
16587   (eval $ac_try) 2>&5
16588   ac_status=$?
16589   echo "$as_me:16589: \$? = $ac_status" >&5
16590   (exit $ac_status); }; }; then
16591   ac_cv_lib_inet_bzero=yes
16592 else
16593   echo "$as_me: failed program was:" >&5
16594 cat conftest.$ac_ext >&5
16595 ac_cv_lib_inet_bzero=no
16596 fi
16597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16598 LIBS=$ac_check_lib_save_LIBS
16599 fi
16600 echo "$as_me:16600: result: $ac_cv_lib_inet_bzero" >&5
16601 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16602 if test $ac_cv_lib_inet_bzero = yes; then
16603
16604 cf_add_libs="-linet"
16605 # Filter out duplicates - this happens with badly-designed ".pc" files...
16606 for cf_add_1lib in $LIBS
16607 do
16608         for cf_add_2lib in $cf_add_libs
16609         do
16610                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16611                 then
16612                         cf_add_1lib=
16613                         break
16614                 fi
16615         done
16616         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16617 done
16618 LIBS="$cf_add_libs"
16619
16620 fi
16621 fi
16622
16623 echo "$as_me:16623: checking if sys/time.h works with sys/select.h" >&5
16624 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16625 if test "${cf_cv_sys_time_select+set}" = set; then
16626   echo $ECHO_N "(cached) $ECHO_C" >&6
16627 else
16628
16629 cat >conftest.$ac_ext <<_ACEOF
16630 #line 16630 "configure"
16631 #include "confdefs.h"
16632
16633 #include <sys/types.h>
16634 #ifdef HAVE_SYS_TIME_H
16635 #include <sys/time.h>
16636 #endif
16637 #ifdef HAVE_SYS_SELECT_H
16638 #include <sys/select.h>
16639 #endif
16640
16641 int
16642 main (void)
16643 {
16644
16645   ;
16646   return 0;
16647 }
16648 _ACEOF
16649 rm -f conftest.$ac_objext
16650 if { (eval echo "$as_me:16650: \"$ac_compile\"") >&5
16651   (eval $ac_compile) 2>&5
16652   ac_status=$?
16653   echo "$as_me:16653: \$? = $ac_status" >&5
16654   (exit $ac_status); } &&
16655          { ac_try='test -s conftest.$ac_objext'
16656   { (eval echo "$as_me:16656: \"$ac_try\"") >&5
16657   (eval $ac_try) 2>&5
16658   ac_status=$?
16659   echo "$as_me:16659: \$? = $ac_status" >&5
16660   (exit $ac_status); }; }; then
16661   cf_cv_sys_time_select=yes
16662 else
16663   echo "$as_me: failed program was:" >&5
16664 cat conftest.$ac_ext >&5
16665 cf_cv_sys_time_select=no
16666 fi
16667 rm -f conftest.$ac_objext conftest.$ac_ext
16668
16669 fi
16670
16671 echo "$as_me:16671: result: $cf_cv_sys_time_select" >&5
16672 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16673 test "$cf_cv_sys_time_select" = yes &&
16674 cat >>confdefs.h <<\EOF
16675 #define HAVE_SYS_TIME_SELECT 1
16676 EOF
16677
16678 ###     checks for compiler characteristics
16679 ac_ext=c
16680 ac_cpp='$CPP $CPPFLAGS'
16681 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16682 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16683 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16684 ac_main_return=return
16685
16686 echo "$as_me:16686: checking for an ANSI C-conforming const" >&5
16687 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16688 if test "${ac_cv_c_const+set}" = set; then
16689   echo $ECHO_N "(cached) $ECHO_C" >&6
16690 else
16691   cat >conftest.$ac_ext <<_ACEOF
16692 #line 16692 "configure"
16693 #include "confdefs.h"
16694
16695 int
16696 main (void)
16697 {
16698 /* FIXME: Include the comments suggested by Paul. */
16699 #ifndef __cplusplus
16700   /* Ultrix mips cc rejects this.  */
16701   typedef int charset[2];
16702   const charset x;
16703   /* SunOS 4.1.1 cc rejects this.  */
16704   char const *const *ccp;
16705   char **p;
16706   /* NEC SVR4.0.2 mips cc rejects this.  */
16707   struct point {int x, y;};
16708   static struct point const zero = {0,0};
16709   /* AIX XL C 1.02.0.0 rejects this.
16710      It does not let you subtract one const X* pointer from another in
16711      an arm of an if-expression whose if-part is not a constant
16712      expression */
16713   const char *g = "string";
16714   ccp = &g + (g ? g-g : 0);
16715   /* HPUX 7.0 cc rejects these. */
16716   ++ccp;
16717   p = (char**) ccp;
16718   ccp = (char const *const *) p;
16719   { /* SCO 3.2v4 cc rejects this.  */
16720     char *t;
16721     char const *s = 0 ? (char *) 0 : (char const *) 0;
16722
16723     *t++ = 0;
16724   }
16725   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16726     int x[] = {25, 17};
16727     const int *foo = &x[0];
16728     ++foo;
16729   }
16730   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16731     typedef const int *iptr;
16732     iptr p = 0;
16733     ++p;
16734   }
16735   { /* AIX XL C 1.02.0.0 rejects this saying
16736        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16737     struct s { int j; const int *ap[3]; };
16738     struct s *b; b->j = 5;
16739   }
16740   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16741     const int foo = 10;
16742   }
16743 #endif
16744
16745   ;
16746   return 0;
16747 }
16748 _ACEOF
16749 rm -f conftest.$ac_objext
16750 if { (eval echo "$as_me:16750: \"$ac_compile\"") >&5
16751   (eval $ac_compile) 2>&5
16752   ac_status=$?
16753   echo "$as_me:16753: \$? = $ac_status" >&5
16754   (exit $ac_status); } &&
16755          { ac_try='test -s conftest.$ac_objext'
16756   { (eval echo "$as_me:16756: \"$ac_try\"") >&5
16757   (eval $ac_try) 2>&5
16758   ac_status=$?
16759   echo "$as_me:16759: \$? = $ac_status" >&5
16760   (exit $ac_status); }; }; then
16761   ac_cv_c_const=yes
16762 else
16763   echo "$as_me: failed program was:" >&5
16764 cat conftest.$ac_ext >&5
16765 ac_cv_c_const=no
16766 fi
16767 rm -f conftest.$ac_objext conftest.$ac_ext
16768 fi
16769 echo "$as_me:16769: result: $ac_cv_c_const" >&5
16770 echo "${ECHO_T}$ac_cv_c_const" >&6
16771 if test $ac_cv_c_const = no; then
16772
16773 cat >>confdefs.h <<\EOF
16774 #define const
16775 EOF
16776
16777 fi
16778
16779 echo "$as_me:16779: checking for inline" >&5
16780 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16781 if test "${ac_cv_c_inline+set}" = set; then
16782   echo $ECHO_N "(cached) $ECHO_C" >&6
16783 else
16784   ac_cv_c_inline=no
16785 for ac_kw in inline __inline__ __inline; do
16786   cat >conftest.$ac_ext <<_ACEOF
16787 #line 16787 "configure"
16788 #include "confdefs.h"
16789 #ifndef __cplusplus
16790 static $ac_kw int static_foo () {return 0; }
16791 $ac_kw int foo () {return 0; }
16792 #endif
16793
16794 _ACEOF
16795 rm -f conftest.$ac_objext
16796 if { (eval echo "$as_me:16796: \"$ac_compile\"") >&5
16797   (eval $ac_compile) 2>&5
16798   ac_status=$?
16799   echo "$as_me:16799: \$? = $ac_status" >&5
16800   (exit $ac_status); } &&
16801          { ac_try='test -s conftest.$ac_objext'
16802   { (eval echo "$as_me:16802: \"$ac_try\"") >&5
16803   (eval $ac_try) 2>&5
16804   ac_status=$?
16805   echo "$as_me:16805: \$? = $ac_status" >&5
16806   (exit $ac_status); }; }; then
16807   ac_cv_c_inline=$ac_kw; break
16808 else
16809   echo "$as_me: failed program was:" >&5
16810 cat conftest.$ac_ext >&5
16811 fi
16812 rm -f conftest.$ac_objext conftest.$ac_ext
16813 done
16814
16815 fi
16816 echo "$as_me:16816: result: $ac_cv_c_inline" >&5
16817 echo "${ECHO_T}$ac_cv_c_inline" >&6
16818 case $ac_cv_c_inline in
16819   inline | yes) ;;
16820   no)
16821 cat >>confdefs.h <<\EOF
16822 #define inline
16823 EOF
16824  ;;
16825   *)  cat >>confdefs.h <<EOF
16826 #define inline $ac_cv_c_inline
16827 EOF
16828  ;;
16829 esac
16830
16831 NCURSES_INLINE=
16832 if test "$ac_cv_c_inline" != no ; then
16833         NCURSES_INLINE=inline
16834         if test "$INTEL_COMPILER" = yes
16835         then
16836                 :
16837         elif test "$CLANG_COMPILER" = yes
16838         then
16839                 :
16840         elif test "$GCC" = yes
16841         then
16842                 echo "$as_me:16842: checking if $CC supports options to tune inlining" >&5
16843 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16844 if test "${cf_cv_gcc_inline+set}" = set; then
16845   echo $ECHO_N "(cached) $ECHO_C" >&6
16846 else
16847
16848                 cf_save_CFLAGS=$CFLAGS
16849                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16850                 cat >conftest.$ac_ext <<_ACEOF
16851 #line 16851 "configure"
16852 #include "confdefs.h"
16853 inline int foo(void) { return 1; }
16854 int
16855 main (void)
16856 {
16857 ${cf_cv_main_return:-return} foo()
16858   ;
16859   return 0;
16860 }
16861 _ACEOF
16862 rm -f conftest.$ac_objext
16863 if { (eval echo "$as_me:16863: \"$ac_compile\"") >&5
16864   (eval $ac_compile) 2>&5
16865   ac_status=$?
16866   echo "$as_me:16866: \$? = $ac_status" >&5
16867   (exit $ac_status); } &&
16868          { ac_try='test -s conftest.$ac_objext'
16869   { (eval echo "$as_me:16869: \"$ac_try\"") >&5
16870   (eval $ac_try) 2>&5
16871   ac_status=$?
16872   echo "$as_me:16872: \$? = $ac_status" >&5
16873   (exit $ac_status); }; }; then
16874   cf_cv_gcc_inline=yes
16875 else
16876   echo "$as_me: failed program was:" >&5
16877 cat conftest.$ac_ext >&5
16878 cf_cv_gcc_inline=no
16879 fi
16880 rm -f conftest.$ac_objext conftest.$ac_ext
16881                 CFLAGS=$cf_save_CFLAGS
16882
16883 fi
16884 echo "$as_me:16884: result: $cf_cv_gcc_inline" >&5
16885 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16886                 if test "$cf_cv_gcc_inline" = yes ; then
16887
16888 cf_fix_cppflags=no
16889 cf_new_cflags=
16890 cf_new_cppflags=
16891 cf_new_extra_cppflags=
16892
16893 for cf_add_cflags in --param max-inline-insns-single=1200
16894 do
16895 case $cf_fix_cppflags in
16896 (no)
16897         case $cf_add_cflags in
16898         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16899                 case $cf_add_cflags in
16900                 (-D*)
16901                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16902
16903                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16904                                 && test -z "${cf_tst_cflags}" \
16905                                 && cf_fix_cppflags=yes
16906
16907                         if test $cf_fix_cppflags = yes ; then
16908
16909         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16910         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16911
16912                                 continue
16913                         elif test "${cf_tst_cflags}" = "\"'" ; then
16914
16915         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16916         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16917
16918                                 continue
16919                         fi
16920                         ;;
16921                 esac
16922                 case "$CPPFLAGS" in
16923                 (*$cf_add_cflags)
16924                         ;;
16925                 (*)
16926                         case $cf_add_cflags in
16927                         (-D*)
16928                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16929
16930 CPPFLAGS=`echo "$CPPFLAGS" | \
16931         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16932                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16933
16934                                 ;;
16935                         esac
16936
16937         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16938         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16939
16940                         ;;
16941                 esac
16942                 ;;
16943         (*)
16944
16945         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16946         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16947
16948                 ;;
16949         esac
16950         ;;
16951 (yes)
16952
16953         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16954         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16955
16956         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16957
16958         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16959                 && test -z "${cf_tst_cflags}" \
16960                 && cf_fix_cppflags=no
16961         ;;
16962 esac
16963 done
16964
16965 if test -n "$cf_new_cflags" ; then
16966
16967         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16968         CFLAGS="${CFLAGS}$cf_new_cflags"
16969
16970 fi
16971
16972 if test -n "$cf_new_cppflags" ; then
16973
16974         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16975         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16976
16977 fi
16978
16979 if test -n "$cf_new_extra_cppflags" ; then
16980
16981         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16982         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16983
16984 fi
16985
16986                 fi
16987         fi
16988 fi
16989
16990 echo "$as_me:16990: checking for signal global datatype" >&5
16991 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16992 if test "${cf_cv_sig_atomic_t+set}" = set; then
16993   echo $ECHO_N "(cached) $ECHO_C" >&6
16994 else
16995
16996         for cf_type in \
16997                 "volatile sig_atomic_t" \
16998                 "sig_atomic_t" \
16999                 "int"
17000         do
17001         cat >conftest.$ac_ext <<_ACEOF
17002 #line 17002 "configure"
17003 #include "confdefs.h"
17004
17005 #include <sys/types.h>
17006 #include <signal.h>
17007 #include <stdio.h>
17008
17009 extern $cf_type x;
17010 $cf_type x;
17011 static void handler(int sig)
17012 {
17013         x = 5;
17014 }
17015 int
17016 main (void)
17017 {
17018 signal(SIGINT, handler);
17019                  x = 1
17020   ;
17021   return 0;
17022 }
17023 _ACEOF
17024 rm -f conftest.$ac_objext
17025 if { (eval echo "$as_me:17025: \"$ac_compile\"") >&5
17026   (eval $ac_compile) 2>&5
17027   ac_status=$?
17028   echo "$as_me:17028: \$? = $ac_status" >&5
17029   (exit $ac_status); } &&
17030          { ac_try='test -s conftest.$ac_objext'
17031   { (eval echo "$as_me:17031: \"$ac_try\"") >&5
17032   (eval $ac_try) 2>&5
17033   ac_status=$?
17034   echo "$as_me:17034: \$? = $ac_status" >&5
17035   (exit $ac_status); }; }; then
17036   cf_cv_sig_atomic_t=$cf_type
17037 else
17038   echo "$as_me: failed program was:" >&5
17039 cat conftest.$ac_ext >&5
17040 cf_cv_sig_atomic_t=no
17041 fi
17042 rm -f conftest.$ac_objext conftest.$ac_ext
17043                 test "$cf_cv_sig_atomic_t" != no && break
17044         done
17045
17046 fi
17047
17048 echo "$as_me:17048: result: $cf_cv_sig_atomic_t" >&5
17049 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
17050 test "$cf_cv_sig_atomic_t" != no &&
17051 cat >>confdefs.h <<EOF
17052 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
17053 EOF
17054
17055 if test $NCURSES_CHTYPE = auto ; then
17056
17057 echo "$as_me:17057: checking for type of chtype" >&5
17058 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
17059 if test "${cf_cv_typeof_chtype+set}" = set; then
17060   echo $ECHO_N "(cached) $ECHO_C" >&6
17061 else
17062
17063                 if test "$cross_compiling" = yes; then
17064   cf_cv_typeof_chtype=long
17065 else
17066   cat >conftest.$ac_ext <<_ACEOF
17067 #line 17067 "configure"
17068 #include "confdefs.h"
17069
17070 #define WANT_BITS 31
17071 #include <stdio.h>
17072 int main(void)
17073 {
17074         FILE *fp = fopen("cf_test.out", "w");
17075         if (fp != 0) {
17076                 char *result = "long";
17077                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
17078                         int n;
17079                         unsigned int x, y;
17080                         for (n = 0; n < WANT_BITS; n++) {
17081                                 x = (1 << n);
17082                                 y = (x >> n);
17083                                 if (y != 1 || x == 0) {
17084                                         x = 0;
17085                                         break;
17086                                 }
17087                         }
17088                         /*
17089                          * If x is nonzero, an int is big enough for the bits
17090                          * that we want.
17091                          */
17092                         result = (x != 0) ? "int" : "long";
17093                 }
17094                 fputs(result, fp);
17095                 fclose(fp);
17096         }
17097         ${cf_cv_main_return:-return}(0);
17098 }
17099
17100 _ACEOF
17101 rm -f conftest$ac_exeext
17102 if { (eval echo "$as_me:17102: \"$ac_link\"") >&5
17103   (eval $ac_link) 2>&5
17104   ac_status=$?
17105   echo "$as_me:17105: \$? = $ac_status" >&5
17106   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17107   { (eval echo "$as_me:17107: \"$ac_try\"") >&5
17108   (eval $ac_try) 2>&5
17109   ac_status=$?
17110   echo "$as_me:17110: \$? = $ac_status" >&5
17111   (exit $ac_status); }; }; then
17112   cf_cv_typeof_chtype=`cat cf_test.out`
17113 else
17114   echo "$as_me: program exited with status $ac_status" >&5
17115 echo "$as_me: failed program was:" >&5
17116 cat conftest.$ac_ext >&5
17117 cf_cv_typeof_chtype=long
17118 fi
17119 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17120 fi
17121                 rm -f cf_test.out
17122
17123 fi
17124
17125 echo "$as_me:17125: result: $cf_cv_typeof_chtype" >&5
17126 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17127
17128 cat >>confdefs.h <<EOF
17129 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17130 EOF
17131
17132 else
17133         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17134 fi
17135 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17136
17137 echo "$as_me:17137: checking if unsigned literals are legal" >&5
17138 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17139 if test "${cf_cv_unsigned_literals+set}" = set; then
17140   echo $ECHO_N "(cached) $ECHO_C" >&6
17141 else
17142
17143         cat >conftest.$ac_ext <<_ACEOF
17144 #line 17144 "configure"
17145 #include "confdefs.h"
17146
17147 int
17148 main (void)
17149 {
17150 long x = 1L + 1UL + 1U + 1
17151   ;
17152   return 0;
17153 }
17154 _ACEOF
17155 rm -f conftest.$ac_objext
17156 if { (eval echo "$as_me:17156: \"$ac_compile\"") >&5
17157   (eval $ac_compile) 2>&5
17158   ac_status=$?
17159   echo "$as_me:17159: \$? = $ac_status" >&5
17160   (exit $ac_status); } &&
17161          { ac_try='test -s conftest.$ac_objext'
17162   { (eval echo "$as_me:17162: \"$ac_try\"") >&5
17163   (eval $ac_try) 2>&5
17164   ac_status=$?
17165   echo "$as_me:17165: \$? = $ac_status" >&5
17166   (exit $ac_status); }; }; then
17167   cf_cv_unsigned_literals=yes
17168 else
17169   echo "$as_me: failed program was:" >&5
17170 cat conftest.$ac_ext >&5
17171 cf_cv_unsigned_literals=no
17172 fi
17173 rm -f conftest.$ac_objext conftest.$ac_ext
17174
17175 fi
17176
17177 echo "$as_me:17177: result: $cf_cv_unsigned_literals" >&5
17178 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17179
17180 cf_cv_1UL="1"
17181 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17182 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17183
17184 if test $NCURSES_MMASK_T = auto ; then
17185         cf_cv_typeof_mmask_t=long
17186 else
17187         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17188 fi
17189 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17190
17191 ###     Checks for external-data
17192
17193 echo "$as_me:17193: checking if external errno is declared" >&5
17194 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17195 if test "${cf_cv_dcl_errno+set}" = set; then
17196   echo $ECHO_N "(cached) $ECHO_C" >&6
17197 else
17198
17199         cat >conftest.$ac_ext <<_ACEOF
17200 #line 17200 "configure"
17201 #include "confdefs.h"
17202
17203 #ifdef HAVE_STDLIB_H
17204 #include <stdlib.h>
17205 #endif
17206 #include <stdio.h>
17207 #include <sys/types.h>
17208 #include <errno.h>
17209 int
17210 main (void)
17211 {
17212 int x = (int) errno
17213   ;
17214   return 0;
17215 }
17216 _ACEOF
17217 rm -f conftest.$ac_objext
17218 if { (eval echo "$as_me:17218: \"$ac_compile\"") >&5
17219   (eval $ac_compile) 2>&5
17220   ac_status=$?
17221   echo "$as_me:17221: \$? = $ac_status" >&5
17222   (exit $ac_status); } &&
17223          { ac_try='test -s conftest.$ac_objext'
17224   { (eval echo "$as_me:17224: \"$ac_try\"") >&5
17225   (eval $ac_try) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); }; }; then
17229   cf_cv_dcl_errno=yes
17230 else
17231   echo "$as_me: failed program was:" >&5
17232 cat conftest.$ac_ext >&5
17233 cf_cv_dcl_errno=no
17234 fi
17235 rm -f conftest.$ac_objext conftest.$ac_ext
17236
17237 fi
17238 echo "$as_me:17238: result: $cf_cv_dcl_errno" >&5
17239 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17240
17241 if test "$cf_cv_dcl_errno" = no ; then
17242
17243 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17244
17245         cat >>confdefs.h <<EOF
17246 #define $cf_result 1
17247 EOF
17248
17249 fi
17250
17251 # It's possible (for near-UNIX clones) that the data doesn't exist
17252
17253 echo "$as_me:17253: checking if external errno exists" >&5
17254 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17255 if test "${cf_cv_have_errno+set}" = set; then
17256   echo $ECHO_N "(cached) $ECHO_C" >&6
17257 else
17258
17259         cat >conftest.$ac_ext <<_ACEOF
17260 #line 17260 "configure"
17261 #include "confdefs.h"
17262
17263 #undef errno
17264 extern int errno;
17265
17266 int
17267 main (void)
17268 {
17269 errno = 2
17270   ;
17271   return 0;
17272 }
17273 _ACEOF
17274 rm -f conftest.$ac_objext conftest$ac_exeext
17275 if { (eval echo "$as_me:17275: \"$ac_link\"") >&5
17276   (eval $ac_link) 2>&5
17277   ac_status=$?
17278   echo "$as_me:17278: \$? = $ac_status" >&5
17279   (exit $ac_status); } &&
17280          { ac_try='test -s conftest$ac_exeext'
17281   { (eval echo "$as_me:17281: \"$ac_try\"") >&5
17282   (eval $ac_try) 2>&5
17283   ac_status=$?
17284   echo "$as_me:17284: \$? = $ac_status" >&5
17285   (exit $ac_status); }; }; then
17286   cf_cv_have_errno=yes
17287 else
17288   echo "$as_me: failed program was:" >&5
17289 cat conftest.$ac_ext >&5
17290 cf_cv_have_errno=no
17291 fi
17292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17293
17294 fi
17295 echo "$as_me:17295: result: $cf_cv_have_errno" >&5
17296 echo "${ECHO_T}$cf_cv_have_errno" >&6
17297
17298 if test "$cf_cv_have_errno" = yes ; then
17299
17300 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17301
17302         cat >>confdefs.h <<EOF
17303 #define $cf_result 1
17304 EOF
17305
17306 fi
17307
17308 echo "$as_me:17308: checking if data-only library module links" >&5
17309 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17310 if test "${cf_cv_link_dataonly+set}" = set; then
17311   echo $ECHO_N "(cached) $ECHO_C" >&6
17312 else
17313
17314         rm -f conftest.a
17315         cat >conftest.$ac_ext <<EOF
17316 #line 17316 "configure"
17317 int     testdata[3] = { 123, 456, 789 };
17318 EOF
17319         if { (eval echo "$as_me:17319: \"$ac_compile\"") >&5
17320   (eval $ac_compile) 2>&5
17321   ac_status=$?
17322   echo "$as_me:17322: \$? = $ac_status" >&5
17323   (exit $ac_status); } ; then
17324                 mv conftest.o data.o && \
17325                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17326         fi
17327         rm -f conftest.$ac_ext data.o
17328         cat >conftest.$ac_ext <<EOF
17329 #line 17329 "configure"
17330 int     testfunc(void)
17331 {
17332 #if defined(NeXT)
17333         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17334 #else
17335         extern int testdata[3];
17336         return testdata[0] == 123
17337            &&  testdata[1] == 456
17338            &&  testdata[2] == 789;
17339 #endif
17340 }
17341 EOF
17342         if { (eval echo "$as_me:17342: \"$ac_compile\"") >&5
17343   (eval $ac_compile) 2>&5
17344   ac_status=$?
17345   echo "$as_me:17345: \$? = $ac_status" >&5
17346   (exit $ac_status); }; then
17347                 mv conftest.o func.o && \
17348                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17349         fi
17350         rm -f conftest.$ac_ext func.o
17351         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17352         cf_saveLIBS="$LIBS"
17353         LIBS="conftest.a $LIBS"
17354         if test "$cross_compiling" = yes; then
17355   cf_cv_link_dataonly=unknown
17356 else
17357   cat >conftest.$ac_ext <<_ACEOF
17358 #line 17358 "configure"
17359 #include "confdefs.h"
17360
17361         int main(void)
17362         {
17363                 extern int testfunc();
17364                 ${cf_cv_main_return:-return} (!testfunc());
17365         }
17366
17367 _ACEOF
17368 rm -f conftest$ac_exeext
17369 if { (eval echo "$as_me:17369: \"$ac_link\"") >&5
17370   (eval $ac_link) 2>&5
17371   ac_status=$?
17372   echo "$as_me:17372: \$? = $ac_status" >&5
17373   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17374   { (eval echo "$as_me:17374: \"$ac_try\"") >&5
17375   (eval $ac_try) 2>&5
17376   ac_status=$?
17377   echo "$as_me:17377: \$? = $ac_status" >&5
17378   (exit $ac_status); }; }; then
17379   cf_cv_link_dataonly=yes
17380 else
17381   echo "$as_me: program exited with status $ac_status" >&5
17382 echo "$as_me: failed program was:" >&5
17383 cat conftest.$ac_ext >&5
17384 cf_cv_link_dataonly=no
17385 fi
17386 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17387 fi
17388         LIBS="$cf_saveLIBS"
17389
17390 fi
17391
17392 echo "$as_me:17392: result: $cf_cv_link_dataonly" >&5
17393 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17394
17395 if test "$cf_cv_link_dataonly" = no ; then
17396
17397 cat >>confdefs.h <<\EOF
17398 #define BROKEN_LINKER 1
17399 EOF
17400
17401         BROKEN_LINKER=1
17402 fi
17403
17404 ###     Checks for library functions.
17405
17406 for ac_func in \
17407 getcwd \
17408 getegid \
17409 geteuid \
17410 getopt \
17411 getttynam \
17412 issetugid \
17413 poll \
17414 putenv \
17415 remove \
17416 select \
17417 setbuf \
17418 setbuffer \
17419 setenv \
17420 setvbuf \
17421 sigaction \
17422 sigvec \
17423 strdup \
17424 strstr \
17425 tcgetpgrp \
17426 tdestroy \
17427 times \
17428 tsearch \
17429 vsnprintf \
17430
17431 do
17432 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17433 echo "$as_me:17433: checking for $ac_func" >&5
17434 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17435 if eval "test \"\${$as_ac_var+set}\" = set"; then
17436   echo $ECHO_N "(cached) $ECHO_C" >&6
17437 else
17438   cat >conftest.$ac_ext <<_ACEOF
17439 #line 17439 "configure"
17440 #include "confdefs.h"
17441 /* System header to define __stub macros and hopefully few prototypes,
17442     which can conflict with char $ac_func (); below.  */
17443 #include <assert.h>
17444 /* Override any gcc2 internal prototype to avoid an error.  */
17445 #ifdef __cplusplus
17446 extern "C"
17447 #endif
17448 /* We use char because int might match the return type of a gcc2
17449    builtin and then its argument prototype would still apply.  */
17450 char $ac_func ();
17451 char (*f) ();
17452
17453 int
17454 main (void)
17455 {
17456 /* The GNU C library defines this for functions which it implements
17457     to always fail with ENOSYS.  Some functions are actually named
17458     something starting with __ and the normal name is an alias.  */
17459 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17460 choke me
17461 #else
17462 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17463 #endif
17464
17465   ;
17466   return 0;
17467 }
17468 _ACEOF
17469 rm -f conftest.$ac_objext conftest$ac_exeext
17470 if { (eval echo "$as_me:17470: \"$ac_link\"") >&5
17471   (eval $ac_link) 2>&5
17472   ac_status=$?
17473   echo "$as_me:17473: \$? = $ac_status" >&5
17474   (exit $ac_status); } &&
17475          { ac_try='test -s conftest$ac_exeext'
17476   { (eval echo "$as_me:17476: \"$ac_try\"") >&5
17477   (eval $ac_try) 2>&5
17478   ac_status=$?
17479   echo "$as_me:17479: \$? = $ac_status" >&5
17480   (exit $ac_status); }; }; then
17481   eval "$as_ac_var=yes"
17482 else
17483   echo "$as_me: failed program was:" >&5
17484 cat conftest.$ac_ext >&5
17485 eval "$as_ac_var=no"
17486 fi
17487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17488 fi
17489 echo "$as_me:17489: result: `eval echo '${'$as_ac_var'}'`" >&5
17490 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17491 if test `eval echo '${'$as_ac_var'}'` = yes; then
17492   cat >>confdefs.h <<EOF
17493 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17494 EOF
17495
17496 fi
17497 done
17498
17499 if test "x$ac_cv_func_getopt" = xno && \
17500    test "x$cf_with_progs$cf_with_tests" != xnono; then
17501         { { echo "$as_me:17501: error: getopt is required for building programs" >&5
17502 echo "$as_me: error: getopt is required for building programs" >&2;}
17503    { (exit 1); exit 1; }; }
17504 fi
17505
17506 if test "x$with_getcap" = "xyes" ; then
17507
17508 echo "$as_me:17508: checking for terminal-capability database functions" >&5
17509 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17510 if test "${cf_cv_cgetent+set}" = set; then
17511   echo $ECHO_N "(cached) $ECHO_C" >&6
17512 else
17513
17514 cat >conftest.$ac_ext <<_ACEOF
17515 #line 17515 "configure"
17516 #include "confdefs.h"
17517
17518 #include <stdlib.h>
17519 int
17520 main (void)
17521 {
17522
17523         char temp[128];
17524         char *buf = temp;
17525         char *db_array = temp;
17526         cgetent(&buf, &db_array, "vt100");
17527         cgetcap(buf, "tc", '=');
17528         cgetmatch(buf, "tc");
17529
17530   ;
17531   return 0;
17532 }
17533 _ACEOF
17534 rm -f conftest.$ac_objext conftest$ac_exeext
17535 if { (eval echo "$as_me:17535: \"$ac_link\"") >&5
17536   (eval $ac_link) 2>&5
17537   ac_status=$?
17538   echo "$as_me:17538: \$? = $ac_status" >&5
17539   (exit $ac_status); } &&
17540          { ac_try='test -s conftest$ac_exeext'
17541   { (eval echo "$as_me:17541: \"$ac_try\"") >&5
17542   (eval $ac_try) 2>&5
17543   ac_status=$?
17544   echo "$as_me:17544: \$? = $ac_status" >&5
17545   (exit $ac_status); }; }; then
17546   cf_cv_cgetent=yes
17547 else
17548   echo "$as_me: failed program was:" >&5
17549 cat conftest.$ac_ext >&5
17550 cf_cv_cgetent=no
17551 fi
17552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17553
17554 fi
17555 echo "$as_me:17555: result: $cf_cv_cgetent" >&5
17556 echo "${ECHO_T}$cf_cv_cgetent" >&6
17557
17558 if test "$cf_cv_cgetent" = yes
17559 then
17560
17561 cat >>confdefs.h <<\EOF
17562 #define HAVE_BSD_CGETENT 1
17563 EOF
17564
17565 echo "$as_me:17565: checking if cgetent uses const parameter" >&5
17566 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17567 if test "${cf_cv_cgetent_const+set}" = set; then
17568   echo $ECHO_N "(cached) $ECHO_C" >&6
17569 else
17570
17571 cat >conftest.$ac_ext <<_ACEOF
17572 #line 17572 "configure"
17573 #include "confdefs.h"
17574
17575 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17576 #include <stdlib.h>
17577 int
17578 main (void)
17579 {
17580
17581         char temp[128];
17582         char *buf = temp;
17583 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17584         const char *db_array = temp;
17585         cgetent(&buf, &db_array, "vt100");
17586 #endif
17587         cgetcap(buf, "tc", '=');
17588         cgetmatch(buf, "tc");
17589
17590   ;
17591   return 0;
17592 }
17593 _ACEOF
17594 rm -f conftest.$ac_objext conftest$ac_exeext
17595 if { (eval echo "$as_me:17595: \"$ac_link\"") >&5
17596   (eval $ac_link) 2>&5
17597   ac_status=$?
17598   echo "$as_me:17598: \$? = $ac_status" >&5
17599   (exit $ac_status); } &&
17600          { ac_try='test -s conftest$ac_exeext'
17601   { (eval echo "$as_me:17601: \"$ac_try\"") >&5
17602   (eval $ac_try) 2>&5
17603   ac_status=$?
17604   echo "$as_me:17604: \$? = $ac_status" >&5
17605   (exit $ac_status); }; }; then
17606   cf_cv_cgetent_const=yes
17607 else
17608   echo "$as_me: failed program was:" >&5
17609 cat conftest.$ac_ext >&5
17610 cf_cv_cgetent_const=no
17611 fi
17612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17613
17614 fi
17615 echo "$as_me:17615: result: $cf_cv_cgetent_const" >&5
17616 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17617         if test "$cf_cv_cgetent_const" = yes
17618         then
17619
17620 cat >>confdefs.h <<EOF
17621 #define CGETENT_CONST const
17622 EOF
17623
17624         fi
17625 fi
17626
17627 fi
17628
17629 echo "$as_me:17629: checking for isascii" >&5
17630 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17631 if test "${cf_cv_have_isascii+set}" = set; then
17632   echo $ECHO_N "(cached) $ECHO_C" >&6
17633 else
17634
17635         cat >conftest.$ac_ext <<_ACEOF
17636 #line 17636 "configure"
17637 #include "confdefs.h"
17638 #include <ctype.h>
17639 int
17640 main (void)
17641 {
17642 int x = isascii(' ')
17643   ;
17644   return 0;
17645 }
17646 _ACEOF
17647 rm -f conftest.$ac_objext conftest$ac_exeext
17648 if { (eval echo "$as_me:17648: \"$ac_link\"") >&5
17649   (eval $ac_link) 2>&5
17650   ac_status=$?
17651   echo "$as_me:17651: \$? = $ac_status" >&5
17652   (exit $ac_status); } &&
17653          { ac_try='test -s conftest$ac_exeext'
17654   { (eval echo "$as_me:17654: \"$ac_try\"") >&5
17655   (eval $ac_try) 2>&5
17656   ac_status=$?
17657   echo "$as_me:17657: \$? = $ac_status" >&5
17658   (exit $ac_status); }; }; then
17659   cf_cv_have_isascii=yes
17660 else
17661   echo "$as_me: failed program was:" >&5
17662 cat conftest.$ac_ext >&5
17663 cf_cv_have_isascii=no
17664 fi
17665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17666
17667 fi
17668 echo "$as_me:17668: result: $cf_cv_have_isascii" >&5
17669 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17670 test "$cf_cv_have_isascii" = yes &&
17671 cat >>confdefs.h <<\EOF
17672 #define HAVE_ISASCII 1
17673 EOF
17674
17675 if test "$ac_cv_func_sigaction" = yes; then
17676 echo "$as_me:17676: checking whether sigaction needs _POSIX_SOURCE" >&5
17677 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17678 cat >conftest.$ac_ext <<_ACEOF
17679 #line 17679 "configure"
17680 #include "confdefs.h"
17681
17682 #include <sys/types.h>
17683 #include <signal.h>
17684 int
17685 main (void)
17686 {
17687 struct sigaction act
17688   ;
17689   return 0;
17690 }
17691 _ACEOF
17692 rm -f conftest.$ac_objext
17693 if { (eval echo "$as_me:17693: \"$ac_compile\"") >&5
17694   (eval $ac_compile) 2>&5
17695   ac_status=$?
17696   echo "$as_me:17696: \$? = $ac_status" >&5
17697   (exit $ac_status); } &&
17698          { ac_try='test -s conftest.$ac_objext'
17699   { (eval echo "$as_me:17699: \"$ac_try\"") >&5
17700   (eval $ac_try) 2>&5
17701   ac_status=$?
17702   echo "$as_me:17702: \$? = $ac_status" >&5
17703   (exit $ac_status); }; }; then
17704   sigact_bad=no
17705 else
17706   echo "$as_me: failed program was:" >&5
17707 cat conftest.$ac_ext >&5
17708
17709 cat >conftest.$ac_ext <<_ACEOF
17710 #line 17710 "configure"
17711 #include "confdefs.h"
17712
17713 #define _POSIX_SOURCE
17714 #include <sys/types.h>
17715 #include <signal.h>
17716 int
17717 main (void)
17718 {
17719 struct sigaction act
17720   ;
17721   return 0;
17722 }
17723 _ACEOF
17724 rm -f conftest.$ac_objext
17725 if { (eval echo "$as_me:17725: \"$ac_compile\"") >&5
17726   (eval $ac_compile) 2>&5
17727   ac_status=$?
17728   echo "$as_me:17728: \$? = $ac_status" >&5
17729   (exit $ac_status); } &&
17730          { ac_try='test -s conftest.$ac_objext'
17731   { (eval echo "$as_me:17731: \"$ac_try\"") >&5
17732   (eval $ac_try) 2>&5
17733   ac_status=$?
17734   echo "$as_me:17734: \$? = $ac_status" >&5
17735   (exit $ac_status); }; }; then
17736   sigact_bad=yes
17737
17738 cat >>confdefs.h <<\EOF
17739 #define _POSIX_SOURCE 1
17740 EOF
17741
17742 else
17743   echo "$as_me: failed program was:" >&5
17744 cat conftest.$ac_ext >&5
17745 sigact_bad=unknown
17746 fi
17747 rm -f conftest.$ac_objext conftest.$ac_ext
17748 fi
17749 rm -f conftest.$ac_objext conftest.$ac_ext
17750 echo "$as_me:17750: result: $sigact_bad" >&5
17751 echo "${ECHO_T}$sigact_bad" >&6
17752 fi
17753
17754 echo "$as_me:17754: checking if nanosleep really works" >&5
17755 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17756 if test "${cf_cv_func_nanosleep+set}" = set; then
17757   echo $ECHO_N "(cached) $ECHO_C" >&6
17758 else
17759
17760 if test "$cross_compiling" = yes; then
17761   cf_cv_func_nanosleep=unknown
17762 else
17763   cat >conftest.$ac_ext <<_ACEOF
17764 #line 17764 "configure"
17765 #include "confdefs.h"
17766
17767 #include <stdio.h>
17768 #include <errno.h>
17769 #include <time.h>
17770
17771 #ifdef HAVE_SYS_TIME_H
17772 #include <sys/time.h>
17773 #endif
17774
17775 int main(void) {
17776         struct timespec ts1, ts2;
17777         int code;
17778         ts1.tv_sec  = 0;
17779         ts1.tv_nsec = 750000000;
17780         ts2.tv_sec  = 0;
17781         ts2.tv_nsec = 0;
17782         errno = 0;
17783         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17784         ${cf_cv_main_return:-return}(code != 0);
17785 }
17786
17787 _ACEOF
17788 rm -f conftest$ac_exeext
17789 if { (eval echo "$as_me:17789: \"$ac_link\"") >&5
17790   (eval $ac_link) 2>&5
17791   ac_status=$?
17792   echo "$as_me:17792: \$? = $ac_status" >&5
17793   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17794   { (eval echo "$as_me:17794: \"$ac_try\"") >&5
17795   (eval $ac_try) 2>&5
17796   ac_status=$?
17797   echo "$as_me:17797: \$? = $ac_status" >&5
17798   (exit $ac_status); }; }; then
17799   cf_cv_func_nanosleep=yes
17800 else
17801   echo "$as_me: program exited with status $ac_status" >&5
17802 echo "$as_me: failed program was:" >&5
17803 cat conftest.$ac_ext >&5
17804 cf_cv_func_nanosleep=no
17805 fi
17806 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17807 fi
17808 fi
17809 echo "$as_me:17809: result: $cf_cv_func_nanosleep" >&5
17810 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17811
17812 test "$cf_cv_func_nanosleep" = "yes" &&
17813 cat >>confdefs.h <<\EOF
17814 #define HAVE_NANOSLEEP 1
17815 EOF
17816
17817 for ac_header in \
17818 termio.h \
17819 termios.h \
17820 unistd.h \
17821
17822 do
17823 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17824 echo "$as_me:17824: checking for $ac_header" >&5
17825 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17826 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17827   echo $ECHO_N "(cached) $ECHO_C" >&6
17828 else
17829   cat >conftest.$ac_ext <<_ACEOF
17830 #line 17830 "configure"
17831 #include "confdefs.h"
17832 #include <$ac_header>
17833 _ACEOF
17834 if { (eval echo "$as_me:17834: \"$ac_cpp conftest.$ac_ext\"") >&5
17835   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17836   ac_status=$?
17837   egrep -v '^ *\+' conftest.er1 >conftest.err
17838   rm -f conftest.er1
17839   cat conftest.err >&5
17840   echo "$as_me:17840: \$? = $ac_status" >&5
17841   (exit $ac_status); } >/dev/null; then
17842   if test -s conftest.err; then
17843     ac_cpp_err=$ac_c_preproc_warn_flag
17844   else
17845     ac_cpp_err=
17846   fi
17847 else
17848   ac_cpp_err=yes
17849 fi
17850 if test -z "$ac_cpp_err"; then
17851   eval "$as_ac_Header=yes"
17852 else
17853   echo "$as_me: failed program was:" >&5
17854   cat conftest.$ac_ext >&5
17855   eval "$as_ac_Header=no"
17856 fi
17857 rm -f conftest.err conftest.$ac_ext
17858 fi
17859 echo "$as_me:17859: result: `eval echo '${'$as_ac_Header'}'`" >&5
17860 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17861 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17862   cat >>confdefs.h <<EOF
17863 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17864 EOF
17865
17866 fi
17867 done
17868
17869 if test "$ISC" = yes ; then
17870
17871 for ac_header in sys/termio.h
17872 do
17873 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17874 echo "$as_me:17874: checking for $ac_header" >&5
17875 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17876 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17877   echo $ECHO_N "(cached) $ECHO_C" >&6
17878 else
17879   cat >conftest.$ac_ext <<_ACEOF
17880 #line 17880 "configure"
17881 #include "confdefs.h"
17882 #include <$ac_header>
17883 _ACEOF
17884 if { (eval echo "$as_me:17884: \"$ac_cpp conftest.$ac_ext\"") >&5
17885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17886   ac_status=$?
17887   egrep -v '^ *\+' conftest.er1 >conftest.err
17888   rm -f conftest.er1
17889   cat conftest.err >&5
17890   echo "$as_me:17890: \$? = $ac_status" >&5
17891   (exit $ac_status); } >/dev/null; then
17892   if test -s conftest.err; then
17893     ac_cpp_err=$ac_c_preproc_warn_flag
17894   else
17895     ac_cpp_err=
17896   fi
17897 else
17898   ac_cpp_err=yes
17899 fi
17900 if test -z "$ac_cpp_err"; then
17901   eval "$as_ac_Header=yes"
17902 else
17903   echo "$as_me: failed program was:" >&5
17904   cat conftest.$ac_ext >&5
17905   eval "$as_ac_Header=no"
17906 fi
17907 rm -f conftest.err conftest.$ac_ext
17908 fi
17909 echo "$as_me:17909: result: `eval echo '${'$as_ac_Header'}'`" >&5
17910 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17911 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17912   cat >>confdefs.h <<EOF
17913 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17914 EOF
17915
17916 fi
17917 done
17918
17919 fi
17920 if test "$ac_cv_header_termios_h" = yes ; then
17921         case "$CFLAGS $CPPFLAGS" in
17922         (*-D_POSIX_SOURCE*)
17923                 termios_bad=dunno ;;
17924         (*)     termios_bad=maybe ;;
17925         esac
17926         if test "$termios_bad" = maybe ; then
17927         echo "$as_me:17927: checking whether termios.h needs _POSIX_SOURCE" >&5
17928 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17929         cat >conftest.$ac_ext <<_ACEOF
17930 #line 17930 "configure"
17931 #include "confdefs.h"
17932 #include <termios.h>
17933 int
17934 main (void)
17935 {
17936 struct termios foo; int x = foo.c_iflag
17937   ;
17938   return 0;
17939 }
17940 _ACEOF
17941 rm -f conftest.$ac_objext
17942 if { (eval echo "$as_me:17942: \"$ac_compile\"") >&5
17943   (eval $ac_compile) 2>&5
17944   ac_status=$?
17945   echo "$as_me:17945: \$? = $ac_status" >&5
17946   (exit $ac_status); } &&
17947          { ac_try='test -s conftest.$ac_objext'
17948   { (eval echo "$as_me:17948: \"$ac_try\"") >&5
17949   (eval $ac_try) 2>&5
17950   ac_status=$?
17951   echo "$as_me:17951: \$? = $ac_status" >&5
17952   (exit $ac_status); }; }; then
17953   termios_bad=no
17954 else
17955   echo "$as_me: failed program was:" >&5
17956 cat conftest.$ac_ext >&5
17957
17958                 cat >conftest.$ac_ext <<_ACEOF
17959 #line 17959 "configure"
17960 #include "confdefs.h"
17961
17962 #define _POSIX_SOURCE
17963 #include <termios.h>
17964 int
17965 main (void)
17966 {
17967 struct termios foo; int x = foo.c_iflag
17968   ;
17969   return 0;
17970 }
17971 _ACEOF
17972 rm -f conftest.$ac_objext
17973 if { (eval echo "$as_me:17973: \"$ac_compile\"") >&5
17974   (eval $ac_compile) 2>&5
17975   ac_status=$?
17976   echo "$as_me:17976: \$? = $ac_status" >&5
17977   (exit $ac_status); } &&
17978          { ac_try='test -s conftest.$ac_objext'
17979   { (eval echo "$as_me:17979: \"$ac_try\"") >&5
17980   (eval $ac_try) 2>&5
17981   ac_status=$?
17982   echo "$as_me:17982: \$? = $ac_status" >&5
17983   (exit $ac_status); }; }; then
17984   termios_bad=unknown
17985 else
17986   echo "$as_me: failed program was:" >&5
17987 cat conftest.$ac_ext >&5
17988 termios_bad=yes
17989 cat >>confdefs.h <<\EOF
17990 #define _POSIX_SOURCE 1
17991 EOF
17992
17993 fi
17994 rm -f conftest.$ac_objext conftest.$ac_ext
17995
17996 fi
17997 rm -f conftest.$ac_objext conftest.$ac_ext
17998         echo "$as_me:17998: result: $termios_bad" >&5
17999 echo "${ECHO_T}$termios_bad" >&6
18000         fi
18001 fi
18002
18003 echo "$as_me:18003: checking for tcgetattr" >&5
18004 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
18005 if test "${cf_cv_have_tcgetattr+set}" = set; then
18006   echo $ECHO_N "(cached) $ECHO_C" >&6
18007 else
18008
18009 cat >conftest.$ac_ext <<_ACEOF
18010 #line 18010 "configure"
18011 #include "confdefs.h"
18012
18013 #include <sys/types.h>
18014 #ifdef HAVE_UNISTD_H
18015 #include <unistd.h>
18016 #endif
18017 #ifdef HAVE_TERMIOS_H
18018 #include <termios.h>
18019 #define TTY struct termios
18020 #else
18021 #ifdef HAVE_TERMIO_H
18022 #include <termio.h>
18023 #define TTY struct termio
18024 #endif
18025 #endif
18026
18027 int
18028 main (void)
18029 {
18030
18031 TTY foo;
18032 tcgetattr(1, &foo);
18033   ;
18034   return 0;
18035 }
18036 _ACEOF
18037 rm -f conftest.$ac_objext conftest$ac_exeext
18038 if { (eval echo "$as_me:18038: \"$ac_link\"") >&5
18039   (eval $ac_link) 2>&5
18040   ac_status=$?
18041   echo "$as_me:18041: \$? = $ac_status" >&5
18042   (exit $ac_status); } &&
18043          { ac_try='test -s conftest$ac_exeext'
18044   { (eval echo "$as_me:18044: \"$ac_try\"") >&5
18045   (eval $ac_try) 2>&5
18046   ac_status=$?
18047   echo "$as_me:18047: \$? = $ac_status" >&5
18048   (exit $ac_status); }; }; then
18049   cf_cv_have_tcgetattr=yes
18050 else
18051   echo "$as_me: failed program was:" >&5
18052 cat conftest.$ac_ext >&5
18053 cf_cv_have_tcgetattr=no
18054 fi
18055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18056 fi
18057 echo "$as_me:18057: result: $cf_cv_have_tcgetattr" >&5
18058 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
18059 test "$cf_cv_have_tcgetattr" = yes &&
18060 cat >>confdefs.h <<\EOF
18061 #define HAVE_TCGETATTR 1
18062 EOF
18063
18064 echo "$as_me:18064: checking for vsscanf function or workaround" >&5
18065 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
18066 if test "${cf_cv_func_vsscanf+set}" = set; then
18067   echo $ECHO_N "(cached) $ECHO_C" >&6
18068 else
18069
18070 cat >conftest.$ac_ext <<_ACEOF
18071 #line 18071 "configure"
18072 #include "confdefs.h"
18073
18074 #include <stdarg.h>
18075 #include <stdio.h>
18076 int
18077 main (void)
18078 {
18079
18080         va_list ap;
18081         vsscanf("from", "%d", ap)
18082   ;
18083   return 0;
18084 }
18085 _ACEOF
18086 rm -f conftest.$ac_objext conftest$ac_exeext
18087 if { (eval echo "$as_me:18087: \"$ac_link\"") >&5
18088   (eval $ac_link) 2>&5
18089   ac_status=$?
18090   echo "$as_me:18090: \$? = $ac_status" >&5
18091   (exit $ac_status); } &&
18092          { ac_try='test -s conftest$ac_exeext'
18093   { (eval echo "$as_me:18093: \"$ac_try\"") >&5
18094   (eval $ac_try) 2>&5
18095   ac_status=$?
18096   echo "$as_me:18096: \$? = $ac_status" >&5
18097   (exit $ac_status); }; }; then
18098   cf_cv_func_vsscanf=vsscanf
18099 else
18100   echo "$as_me: failed program was:" >&5
18101 cat conftest.$ac_ext >&5
18102
18103 cat >conftest.$ac_ext <<_ACEOF
18104 #line 18104 "configure"
18105 #include "confdefs.h"
18106
18107 #include <stdarg.h>
18108 #include <stdio.h>
18109 int
18110 main (void)
18111 {
18112
18113         FILE strbuf;
18114         char *str = "from";
18115
18116         strbuf._flag = _IOREAD;
18117         strbuf._ptr = strbuf._base = (unsigned char *) str;
18118         strbuf._cnt = strlen(str);
18119         strbuf._file = _NFILE;
18120         return (vfscanf(&strbuf, "%d", ap))
18121   ;
18122   return 0;
18123 }
18124 _ACEOF
18125 rm -f conftest.$ac_objext conftest$ac_exeext
18126 if { (eval echo "$as_me:18126: \"$ac_link\"") >&5
18127   (eval $ac_link) 2>&5
18128   ac_status=$?
18129   echo "$as_me:18129: \$? = $ac_status" >&5
18130   (exit $ac_status); } &&
18131          { ac_try='test -s conftest$ac_exeext'
18132   { (eval echo "$as_me:18132: \"$ac_try\"") >&5
18133   (eval $ac_try) 2>&5
18134   ac_status=$?
18135   echo "$as_me:18135: \$? = $ac_status" >&5
18136   (exit $ac_status); }; }; then
18137   cf_cv_func_vsscanf=vfscanf
18138 else
18139   echo "$as_me: failed program was:" >&5
18140 cat conftest.$ac_ext >&5
18141
18142 cat >conftest.$ac_ext <<_ACEOF
18143 #line 18143 "configure"
18144 #include "confdefs.h"
18145
18146 #include <stdarg.h>
18147 #include <stdio.h>
18148 int
18149 main (void)
18150 {
18151
18152         FILE strbuf;
18153         char *str = "from";
18154
18155         strbuf._flag = _IOREAD;
18156         strbuf._ptr = strbuf._base = (unsigned char *) str;
18157         strbuf._cnt = strlen(str);
18158         strbuf._file = _NFILE;
18159         return (_doscan(&strbuf, "%d", ap))
18160   ;
18161   return 0;
18162 }
18163 _ACEOF
18164 rm -f conftest.$ac_objext conftest$ac_exeext
18165 if { (eval echo "$as_me:18165: \"$ac_link\"") >&5
18166   (eval $ac_link) 2>&5
18167   ac_status=$?
18168   echo "$as_me:18168: \$? = $ac_status" >&5
18169   (exit $ac_status); } &&
18170          { ac_try='test -s conftest$ac_exeext'
18171   { (eval echo "$as_me:18171: \"$ac_try\"") >&5
18172   (eval $ac_try) 2>&5
18173   ac_status=$?
18174   echo "$as_me:18174: \$? = $ac_status" >&5
18175   (exit $ac_status); }; }; then
18176   cf_cv_func_vsscanf=_doscan
18177 else
18178   echo "$as_me: failed program was:" >&5
18179 cat conftest.$ac_ext >&5
18180
18181 cf_cv_func_vsscanf=no
18182 fi
18183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18184 fi
18185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18186 fi
18187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18188 fi
18189 echo "$as_me:18189: result: $cf_cv_func_vsscanf" >&5
18190 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18191
18192 case $cf_cv_func_vsscanf in
18193 (vsscanf)
18194 cat >>confdefs.h <<\EOF
18195 #define HAVE_VSSCANF 1
18196 EOF
18197 ;;
18198 (vfscanf)
18199 cat >>confdefs.h <<\EOF
18200 #define HAVE_VFSCANF 1
18201 EOF
18202 ;;
18203 (_doscan)
18204 cat >>confdefs.h <<\EOF
18205 #define HAVE__DOSCAN 1
18206 EOF
18207 ;;
18208 esac
18209
18210 for ac_header in \
18211 unistd.h \
18212
18213 do
18214 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18215 echo "$as_me:18215: checking for $ac_header" >&5
18216 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18217 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18218   echo $ECHO_N "(cached) $ECHO_C" >&6
18219 else
18220   cat >conftest.$ac_ext <<_ACEOF
18221 #line 18221 "configure"
18222 #include "confdefs.h"
18223 #include <$ac_header>
18224 _ACEOF
18225 if { (eval echo "$as_me:18225: \"$ac_cpp conftest.$ac_ext\"") >&5
18226   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18227   ac_status=$?
18228   egrep -v '^ *\+' conftest.er1 >conftest.err
18229   rm -f conftest.er1
18230   cat conftest.err >&5
18231   echo "$as_me:18231: \$? = $ac_status" >&5
18232   (exit $ac_status); } >/dev/null; then
18233   if test -s conftest.err; then
18234     ac_cpp_err=$ac_c_preproc_warn_flag
18235   else
18236     ac_cpp_err=
18237   fi
18238 else
18239   ac_cpp_err=yes
18240 fi
18241 if test -z "$ac_cpp_err"; then
18242   eval "$as_ac_Header=yes"
18243 else
18244   echo "$as_me: failed program was:" >&5
18245   cat conftest.$ac_ext >&5
18246   eval "$as_ac_Header=no"
18247 fi
18248 rm -f conftest.err conftest.$ac_ext
18249 fi
18250 echo "$as_me:18250: result: `eval echo '${'$as_ac_Header'}'`" >&5
18251 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18252 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18253   cat >>confdefs.h <<EOF
18254 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18255 EOF
18256
18257 fi
18258 done
18259
18260 echo "$as_me:18260: checking for working mkstemp" >&5
18261 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18262 if test "${cf_cv_func_mkstemp+set}" = set; then
18263   echo $ECHO_N "(cached) $ECHO_C" >&6
18264 else
18265
18266 rm -rf conftest*
18267 if test "$cross_compiling" = yes; then
18268   cf_cv_func_mkstemp=maybe
18269 else
18270   cat >conftest.$ac_ext <<_ACEOF
18271 #line 18271 "configure"
18272 #include "confdefs.h"
18273
18274 #include <sys/types.h>
18275 #ifdef HAVE_UNISTD_H
18276 #include <unistd.h>
18277 #endif
18278 #include <stdlib.h>
18279 #include <stdio.h>
18280 #include <string.h>
18281 #include <sys/stat.h>
18282 int main(void)
18283 {
18284         char *tmpl = "conftestXXXXXX";
18285         char name[2][80];
18286         int n;
18287         int result = 0;
18288         int fd;
18289         struct stat sb;
18290
18291         umask(077);
18292         for (n = 0; n < 2; ++n) {
18293                 strcpy(name[n], tmpl);
18294                 if ((fd = mkstemp(name[n])) >= 0) {
18295                         if (!strcmp(name[n], tmpl)
18296                          || stat(name[n], &sb) != 0
18297                          || (sb.st_mode & S_IFMT) != S_IFREG
18298                          || (sb.st_mode & 077) != 0) {
18299                                 result = 1;
18300                         }
18301                         close(fd);
18302                 }
18303         }
18304         if (result == 0
18305          && !strcmp(name[0], name[1]))
18306                 result = 1;
18307         ${cf_cv_main_return:-return}(result);
18308 }
18309
18310 _ACEOF
18311 rm -f conftest$ac_exeext
18312 if { (eval echo "$as_me:18312: \"$ac_link\"") >&5
18313   (eval $ac_link) 2>&5
18314   ac_status=$?
18315   echo "$as_me:18315: \$? = $ac_status" >&5
18316   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18317   { (eval echo "$as_me:18317: \"$ac_try\"") >&5
18318   (eval $ac_try) 2>&5
18319   ac_status=$?
18320   echo "$as_me:18320: \$? = $ac_status" >&5
18321   (exit $ac_status); }; }; then
18322   cf_cv_func_mkstemp=yes
18323
18324 else
18325   echo "$as_me: program exited with status $ac_status" >&5
18326 echo "$as_me: failed program was:" >&5
18327 cat conftest.$ac_ext >&5
18328 cf_cv_func_mkstemp=no
18329
18330 fi
18331 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18332 fi
18333
18334 fi
18335 echo "$as_me:18335: result: $cf_cv_func_mkstemp" >&5
18336 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18337 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18338         echo "$as_me:18338: checking for mkstemp" >&5
18339 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18340 if test "${ac_cv_func_mkstemp+set}" = set; then
18341   echo $ECHO_N "(cached) $ECHO_C" >&6
18342 else
18343   cat >conftest.$ac_ext <<_ACEOF
18344 #line 18344 "configure"
18345 #include "confdefs.h"
18346 /* System header to define __stub macros and hopefully few prototypes,
18347     which can conflict with char mkstemp (); below.  */
18348 #include <assert.h>
18349 /* Override any gcc2 internal prototype to avoid an error.  */
18350 #ifdef __cplusplus
18351 extern "C"
18352 #endif
18353 /* We use char because int might match the return type of a gcc2
18354    builtin and then its argument prototype would still apply.  */
18355 char mkstemp ();
18356 char (*f) ();
18357
18358 int
18359 main (void)
18360 {
18361 /* The GNU C library defines this for functions which it implements
18362     to always fail with ENOSYS.  Some functions are actually named
18363     something starting with __ and the normal name is an alias.  */
18364 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18365 choke me
18366 #else
18367 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18368 #endif
18369
18370   ;
18371   return 0;
18372 }
18373 _ACEOF
18374 rm -f conftest.$ac_objext conftest$ac_exeext
18375 if { (eval echo "$as_me:18375: \"$ac_link\"") >&5
18376   (eval $ac_link) 2>&5
18377   ac_status=$?
18378   echo "$as_me:18378: \$? = $ac_status" >&5
18379   (exit $ac_status); } &&
18380          { ac_try='test -s conftest$ac_exeext'
18381   { (eval echo "$as_me:18381: \"$ac_try\"") >&5
18382   (eval $ac_try) 2>&5
18383   ac_status=$?
18384   echo "$as_me:18384: \$? = $ac_status" >&5
18385   (exit $ac_status); }; }; then
18386   ac_cv_func_mkstemp=yes
18387 else
18388   echo "$as_me: failed program was:" >&5
18389 cat conftest.$ac_ext >&5
18390 ac_cv_func_mkstemp=no
18391 fi
18392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18393 fi
18394 echo "$as_me:18394: result: $ac_cv_func_mkstemp" >&5
18395 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18396
18397 fi
18398 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18399
18400 cat >>confdefs.h <<\EOF
18401 #define HAVE_MKSTEMP 1
18402 EOF
18403
18404 fi
18405
18406 # setup for prototype of fallback for vsscanf()
18407
18408 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18409         HAVE_VSSCANF=1
18410 else
18411         HAVE_VSSCANF=0
18412 fi
18413
18414 if test "x$cross_compiling" = xyes ; then
18415         { echo "$as_me:18415: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18416 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18417 else
18418         echo "$as_me:18418: checking whether setvbuf arguments are reversed" >&5
18419 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18420 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18421   echo $ECHO_N "(cached) $ECHO_C" >&6
18422 else
18423   if test "$cross_compiling" = yes; then
18424   { { echo "$as_me:18424: error: cannot run test program while cross compiling" >&5
18425 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18426    { (exit 1); exit 1; }; }
18427 else
18428   cat >conftest.$ac_ext <<_ACEOF
18429 #line 18429 "configure"
18430 #include "confdefs.h"
18431 #include <stdio.h>
18432 /* If setvbuf has the reversed format, exit 0. */
18433 int
18434 main (void)
18435 {
18436   /* This call has the arguments reversed.
18437      A reversed system may check and see that the address of main
18438      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18439   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18440     $ac_main_return(1);
18441   putc('\r', stdout);
18442   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18443 }
18444 _ACEOF
18445 rm -f conftest$ac_exeext
18446 if { (eval echo "$as_me:18446: \"$ac_link\"") >&5
18447   (eval $ac_link) 2>&5
18448   ac_status=$?
18449   echo "$as_me:18449: \$? = $ac_status" >&5
18450   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18451   { (eval echo "$as_me:18451: \"$ac_try\"") >&5
18452   (eval $ac_try) 2>&5
18453   ac_status=$?
18454   echo "$as_me:18454: \$? = $ac_status" >&5
18455   (exit $ac_status); }; }; then
18456   ac_cv_func_setvbuf_reversed=yes
18457 else
18458   echo "$as_me: program exited with status $ac_status" >&5
18459 echo "$as_me: failed program was:" >&5
18460 cat conftest.$ac_ext >&5
18461 ac_cv_func_setvbuf_reversed=no
18462 fi
18463 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18464 fi
18465 rm -f core core.* *.core
18466 fi
18467 echo "$as_me:18467: result: $ac_cv_func_setvbuf_reversed" >&5
18468 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18469 if test $ac_cv_func_setvbuf_reversed = yes; then
18470
18471 cat >>confdefs.h <<\EOF
18472 #define SETVBUF_REVERSED 1
18473 EOF
18474
18475 fi
18476
18477 fi
18478 echo "$as_me:18478: checking for intptr_t" >&5
18479 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18480 if test "${ac_cv_type_intptr_t+set}" = set; then
18481   echo $ECHO_N "(cached) $ECHO_C" >&6
18482 else
18483   cat >conftest.$ac_ext <<_ACEOF
18484 #line 18484 "configure"
18485 #include "confdefs.h"
18486 $ac_includes_default
18487 int
18488 main (void)
18489 {
18490 if ((intptr_t *) 0)
18491   return 0;
18492 if (sizeof (intptr_t))
18493   return 0;
18494   ;
18495   return 0;
18496 }
18497 _ACEOF
18498 rm -f conftest.$ac_objext
18499 if { (eval echo "$as_me:18499: \"$ac_compile\"") >&5
18500   (eval $ac_compile) 2>&5
18501   ac_status=$?
18502   echo "$as_me:18502: \$? = $ac_status" >&5
18503   (exit $ac_status); } &&
18504          { ac_try='test -s conftest.$ac_objext'
18505   { (eval echo "$as_me:18505: \"$ac_try\"") >&5
18506   (eval $ac_try) 2>&5
18507   ac_status=$?
18508   echo "$as_me:18508: \$? = $ac_status" >&5
18509   (exit $ac_status); }; }; then
18510   ac_cv_type_intptr_t=yes
18511 else
18512   echo "$as_me: failed program was:" >&5
18513 cat conftest.$ac_ext >&5
18514 ac_cv_type_intptr_t=no
18515 fi
18516 rm -f conftest.$ac_objext conftest.$ac_ext
18517 fi
18518 echo "$as_me:18518: result: $ac_cv_type_intptr_t" >&5
18519 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18520 if test $ac_cv_type_intptr_t = yes; then
18521   :
18522 else
18523
18524 cat >>confdefs.h <<EOF
18525 #define intptr_t long
18526 EOF
18527
18528 fi
18529
18530 echo "$as_me:18530: checking for ssize_t" >&5
18531 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18532 if test "${ac_cv_type_ssize_t+set}" = set; then
18533   echo $ECHO_N "(cached) $ECHO_C" >&6
18534 else
18535   cat >conftest.$ac_ext <<_ACEOF
18536 #line 18536 "configure"
18537 #include "confdefs.h"
18538 $ac_includes_default
18539 int
18540 main (void)
18541 {
18542 if ((ssize_t *) 0)
18543   return 0;
18544 if (sizeof (ssize_t))
18545   return 0;
18546   ;
18547   return 0;
18548 }
18549 _ACEOF
18550 rm -f conftest.$ac_objext
18551 if { (eval echo "$as_me:18551: \"$ac_compile\"") >&5
18552   (eval $ac_compile) 2>&5
18553   ac_status=$?
18554   echo "$as_me:18554: \$? = $ac_status" >&5
18555   (exit $ac_status); } &&
18556          { ac_try='test -s conftest.$ac_objext'
18557   { (eval echo "$as_me:18557: \"$ac_try\"") >&5
18558   (eval $ac_try) 2>&5
18559   ac_status=$?
18560   echo "$as_me:18560: \$? = $ac_status" >&5
18561   (exit $ac_status); }; }; then
18562   ac_cv_type_ssize_t=yes
18563 else
18564   echo "$as_me: failed program was:" >&5
18565 cat conftest.$ac_ext >&5
18566 ac_cv_type_ssize_t=no
18567 fi
18568 rm -f conftest.$ac_objext conftest.$ac_ext
18569 fi
18570 echo "$as_me:18570: result: $ac_cv_type_ssize_t" >&5
18571 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18572 if test $ac_cv_type_ssize_t = yes; then
18573   :
18574 else
18575
18576 cat >>confdefs.h <<EOF
18577 #define ssize_t int
18578 EOF
18579
18580 fi
18581
18582 echo "$as_me:18582: checking for type sigaction_t" >&5
18583 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18584 if test "${cf_cv_type_sigaction+set}" = set; then
18585   echo $ECHO_N "(cached) $ECHO_C" >&6
18586 else
18587
18588         cat >conftest.$ac_ext <<_ACEOF
18589 #line 18589 "configure"
18590 #include "confdefs.h"
18591
18592 #include <signal.h>
18593 int
18594 main (void)
18595 {
18596 sigaction_t x
18597   ;
18598   return 0;
18599 }
18600 _ACEOF
18601 rm -f conftest.$ac_objext
18602 if { (eval echo "$as_me:18602: \"$ac_compile\"") >&5
18603   (eval $ac_compile) 2>&5
18604   ac_status=$?
18605   echo "$as_me:18605: \$? = $ac_status" >&5
18606   (exit $ac_status); } &&
18607          { ac_try='test -s conftest.$ac_objext'
18608   { (eval echo "$as_me:18608: \"$ac_try\"") >&5
18609   (eval $ac_try) 2>&5
18610   ac_status=$?
18611   echo "$as_me:18611: \$? = $ac_status" >&5
18612   (exit $ac_status); }; }; then
18613   cf_cv_type_sigaction=yes
18614 else
18615   echo "$as_me: failed program was:" >&5
18616 cat conftest.$ac_ext >&5
18617 cf_cv_type_sigaction=no
18618 fi
18619 rm -f conftest.$ac_objext conftest.$ac_ext
18620 fi
18621
18622 echo "$as_me:18622: result: $cf_cv_type_sigaction" >&5
18623 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18624 test "$cf_cv_type_sigaction" = yes &&
18625 cat >>confdefs.h <<\EOF
18626 #define HAVE_TYPE_SIGACTION 1
18627 EOF
18628
18629 echo "$as_me:18629: checking declaration of size-change" >&5
18630 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18631 if test "${cf_cv_sizechange+set}" = set; then
18632   echo $ECHO_N "(cached) $ECHO_C" >&6
18633 else
18634
18635         cf_cv_sizechange=unknown
18636         cf_save_CPPFLAGS="$CPPFLAGS"
18637
18638 for cf_opts in "" "NEED_PTEM_H"
18639 do
18640
18641         CPPFLAGS="$cf_save_CPPFLAGS"
18642         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18643         cat >conftest.$ac_ext <<_ACEOF
18644 #line 18644 "configure"
18645 #include "confdefs.h"
18646 #include <sys/types.h>
18647 #ifdef HAVE_TERMIOS_H
18648 #include <termios.h>
18649 #else
18650 #ifdef HAVE_TERMIO_H
18651 #include <termio.h>
18652 #endif
18653 #endif
18654 #ifdef NEED_PTEM_H
18655 /* This is a workaround for SCO:  they neglected to define struct winsize in
18656  * termios.h -- it's only in termio.h and ptem.h
18657  */
18658 #include        <sys/stream.h>
18659 #include        <sys/ptem.h>
18660 #endif
18661 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18662 #include <sys/ioctl.h>
18663 #endif
18664
18665 int
18666 main (void)
18667 {
18668
18669 #ifdef TIOCGSIZE
18670         struct ttysize win;     /* FIXME: what system is this? */
18671         int y = win.ts_lines;
18672         int x = win.ts_cols;
18673 #else
18674 #ifdef TIOCGWINSZ
18675         struct winsize win;
18676         int y = win.ws_row;
18677         int x = win.ws_col;
18678 #else
18679         no TIOCGSIZE or TIOCGWINSZ
18680 #endif /* TIOCGWINSZ */
18681 #endif /* TIOCGSIZE */
18682
18683   ;
18684   return 0;
18685 }
18686 _ACEOF
18687 rm -f conftest.$ac_objext
18688 if { (eval echo "$as_me:18688: \"$ac_compile\"") >&5
18689   (eval $ac_compile) 2>&5
18690   ac_status=$?
18691   echo "$as_me:18691: \$? = $ac_status" >&5
18692   (exit $ac_status); } &&
18693          { ac_try='test -s conftest.$ac_objext'
18694   { (eval echo "$as_me:18694: \"$ac_try\"") >&5
18695   (eval $ac_try) 2>&5
18696   ac_status=$?
18697   echo "$as_me:18697: \$? = $ac_status" >&5
18698   (exit $ac_status); }; }; then
18699   cf_cv_sizechange=yes
18700 else
18701   echo "$as_me: failed program was:" >&5
18702 cat conftest.$ac_ext >&5
18703 cf_cv_sizechange=no
18704 fi
18705 rm -f conftest.$ac_objext conftest.$ac_ext
18706
18707         CPPFLAGS="$cf_save_CPPFLAGS"
18708         if test "$cf_cv_sizechange" = yes ; then
18709                 echo "size-change succeeded ($cf_opts)" >&5
18710                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18711                 break
18712         fi
18713 done
18714
18715 fi
18716 echo "$as_me:18716: result: $cf_cv_sizechange" >&5
18717 echo "${ECHO_T}$cf_cv_sizechange" >&6
18718 if test "$cf_cv_sizechange" != no ; then
18719
18720 cat >>confdefs.h <<\EOF
18721 #define HAVE_SIZECHANGE 1
18722 EOF
18723
18724         case $cf_cv_sizechange in
18725         (NEED*)
18726                 cat >>confdefs.h <<EOF
18727 #define $cf_cv_sizechange  1
18728 EOF
18729
18730                 ;;
18731         esac
18732 fi
18733
18734 echo "$as_me:18734: checking for memmove" >&5
18735 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18736 if test "${ac_cv_func_memmove+set}" = set; then
18737   echo $ECHO_N "(cached) $ECHO_C" >&6
18738 else
18739   cat >conftest.$ac_ext <<_ACEOF
18740 #line 18740 "configure"
18741 #include "confdefs.h"
18742 /* System header to define __stub macros and hopefully few prototypes,
18743     which can conflict with char memmove (); below.  */
18744 #include <assert.h>
18745 /* Override any gcc2 internal prototype to avoid an error.  */
18746 #ifdef __cplusplus
18747 extern "C"
18748 #endif
18749 /* We use char because int might match the return type of a gcc2
18750    builtin and then its argument prototype would still apply.  */
18751 char memmove ();
18752 char (*f) ();
18753
18754 int
18755 main (void)
18756 {
18757 /* The GNU C library defines this for functions which it implements
18758     to always fail with ENOSYS.  Some functions are actually named
18759     something starting with __ and the normal name is an alias.  */
18760 #if defined (__stub_memmove) || defined (__stub___memmove)
18761 choke me
18762 #else
18763 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18764 #endif
18765
18766   ;
18767   return 0;
18768 }
18769 _ACEOF
18770 rm -f conftest.$ac_objext conftest$ac_exeext
18771 if { (eval echo "$as_me:18771: \"$ac_link\"") >&5
18772   (eval $ac_link) 2>&5
18773   ac_status=$?
18774   echo "$as_me:18774: \$? = $ac_status" >&5
18775   (exit $ac_status); } &&
18776          { ac_try='test -s conftest$ac_exeext'
18777   { (eval echo "$as_me:18777: \"$ac_try\"") >&5
18778   (eval $ac_try) 2>&5
18779   ac_status=$?
18780   echo "$as_me:18780: \$? = $ac_status" >&5
18781   (exit $ac_status); }; }; then
18782   ac_cv_func_memmove=yes
18783 else
18784   echo "$as_me: failed program was:" >&5
18785 cat conftest.$ac_ext >&5
18786 ac_cv_func_memmove=no
18787 fi
18788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18789 fi
18790 echo "$as_me:18790: result: $ac_cv_func_memmove" >&5
18791 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18792 if test $ac_cv_func_memmove = yes; then
18793   :
18794 else
18795
18796 echo "$as_me:18796: checking for bcopy" >&5
18797 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18798 if test "${ac_cv_func_bcopy+set}" = set; then
18799   echo $ECHO_N "(cached) $ECHO_C" >&6
18800 else
18801   cat >conftest.$ac_ext <<_ACEOF
18802 #line 18802 "configure"
18803 #include "confdefs.h"
18804 /* System header to define __stub macros and hopefully few prototypes,
18805     which can conflict with char bcopy (); below.  */
18806 #include <assert.h>
18807 /* Override any gcc2 internal prototype to avoid an error.  */
18808 #ifdef __cplusplus
18809 extern "C"
18810 #endif
18811 /* We use char because int might match the return type of a gcc2
18812    builtin and then its argument prototype would still apply.  */
18813 char bcopy ();
18814 char (*f) ();
18815
18816 int
18817 main (void)
18818 {
18819 /* The GNU C library defines this for functions which it implements
18820     to always fail with ENOSYS.  Some functions are actually named
18821     something starting with __ and the normal name is an alias.  */
18822 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18823 choke me
18824 #else
18825 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18826 #endif
18827
18828   ;
18829   return 0;
18830 }
18831 _ACEOF
18832 rm -f conftest.$ac_objext conftest$ac_exeext
18833 if { (eval echo "$as_me:18833: \"$ac_link\"") >&5
18834   (eval $ac_link) 2>&5
18835   ac_status=$?
18836   echo "$as_me:18836: \$? = $ac_status" >&5
18837   (exit $ac_status); } &&
18838          { ac_try='test -s conftest$ac_exeext'
18839   { (eval echo "$as_me:18839: \"$ac_try\"") >&5
18840   (eval $ac_try) 2>&5
18841   ac_status=$?
18842   echo "$as_me:18842: \$? = $ac_status" >&5
18843   (exit $ac_status); }; }; then
18844   ac_cv_func_bcopy=yes
18845 else
18846   echo "$as_me: failed program was:" >&5
18847 cat conftest.$ac_ext >&5
18848 ac_cv_func_bcopy=no
18849 fi
18850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18851 fi
18852 echo "$as_me:18852: result: $ac_cv_func_bcopy" >&5
18853 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18854 if test $ac_cv_func_bcopy = yes; then
18855
18856         echo "$as_me:18856: checking if bcopy does overlapping moves" >&5
18857 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18858 if test "${cf_cv_good_bcopy+set}" = set; then
18859   echo $ECHO_N "(cached) $ECHO_C" >&6
18860 else
18861
18862                 if test "$cross_compiling" = yes; then
18863   cf_cv_good_bcopy=unknown
18864 else
18865   cat >conftest.$ac_ext <<_ACEOF
18866 #line 18866 "configure"
18867 #include "confdefs.h"
18868
18869 int main(void) {
18870         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18871         char temp[40];
18872         bcopy(data, temp, sizeof(data));
18873         bcopy(temp+10, temp, 15);
18874         bcopy(temp+5, temp+15, 10);
18875         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18876 }
18877
18878 _ACEOF
18879 rm -f conftest$ac_exeext
18880 if { (eval echo "$as_me:18880: \"$ac_link\"") >&5
18881   (eval $ac_link) 2>&5
18882   ac_status=$?
18883   echo "$as_me:18883: \$? = $ac_status" >&5
18884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18885   { (eval echo "$as_me:18885: \"$ac_try\"") >&5
18886   (eval $ac_try) 2>&5
18887   ac_status=$?
18888   echo "$as_me:18888: \$? = $ac_status" >&5
18889   (exit $ac_status); }; }; then
18890   cf_cv_good_bcopy=yes
18891 else
18892   echo "$as_me: program exited with status $ac_status" >&5
18893 echo "$as_me: failed program was:" >&5
18894 cat conftest.$ac_ext >&5
18895 cf_cv_good_bcopy=no
18896 fi
18897 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18898 fi
18899
18900 fi
18901 echo "$as_me:18901: result: $cf_cv_good_bcopy" >&5
18902 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18903
18904 else
18905   cf_cv_good_bcopy=no
18906 fi
18907
18908         if test "$cf_cv_good_bcopy" = yes ; then
18909
18910 cat >>confdefs.h <<\EOF
18911 #define USE_OK_BCOPY 1
18912 EOF
18913
18914         else
18915
18916 cat >>confdefs.h <<\EOF
18917 #define USE_MY_MEMMOVE 1
18918 EOF
18919
18920         fi
18921
18922 fi
18923
18924 tty 2>&1 >/dev/null || {
18925 for ac_func in posix_openpt
18926 do
18927 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18928 echo "$as_me:18928: checking for $ac_func" >&5
18929 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18930 if eval "test \"\${$as_ac_var+set}\" = set"; then
18931   echo $ECHO_N "(cached) $ECHO_C" >&6
18932 else
18933   cat >conftest.$ac_ext <<_ACEOF
18934 #line 18934 "configure"
18935 #include "confdefs.h"
18936 /* System header to define __stub macros and hopefully few prototypes,
18937     which can conflict with char $ac_func (); below.  */
18938 #include <assert.h>
18939 /* Override any gcc2 internal prototype to avoid an error.  */
18940 #ifdef __cplusplus
18941 extern "C"
18942 #endif
18943 /* We use char because int might match the return type of a gcc2
18944    builtin and then its argument prototype would still apply.  */
18945 char $ac_func ();
18946 char (*f) ();
18947
18948 int
18949 main (void)
18950 {
18951 /* The GNU C library defines this for functions which it implements
18952     to always fail with ENOSYS.  Some functions are actually named
18953     something starting with __ and the normal name is an alias.  */
18954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18955 choke me
18956 #else
18957 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18958 #endif
18959
18960   ;
18961   return 0;
18962 }
18963 _ACEOF
18964 rm -f conftest.$ac_objext conftest$ac_exeext
18965 if { (eval echo "$as_me:18965: \"$ac_link\"") >&5
18966   (eval $ac_link) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit $ac_status); } &&
18970          { ac_try='test -s conftest$ac_exeext'
18971   { (eval echo "$as_me:18971: \"$ac_try\"") >&5
18972   (eval $ac_try) 2>&5
18973   ac_status=$?
18974   echo "$as_me:18974: \$? = $ac_status" >&5
18975   (exit $ac_status); }; }; then
18976   eval "$as_ac_var=yes"
18977 else
18978   echo "$as_me: failed program was:" >&5
18979 cat conftest.$ac_ext >&5
18980 eval "$as_ac_var=no"
18981 fi
18982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18983 fi
18984 echo "$as_me:18984: result: `eval echo '${'$as_ac_var'}'`" >&5
18985 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18986 if test `eval echo '${'$as_ac_var'}'` = yes; then
18987   cat >>confdefs.h <<EOF
18988 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18989 EOF
18990
18991 fi
18992 done
18993  }
18994 echo "$as_me:18994: checking if poll really works" >&5
18995 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18996 if test "${cf_cv_working_poll+set}" = set; then
18997   echo $ECHO_N "(cached) $ECHO_C" >&6
18998 else
18999
19000 if test "$cross_compiling" = yes; then
19001   cf_cv_working_poll=unknown
19002 else
19003   cat >conftest.$ac_ext <<_ACEOF
19004 #line 19004 "configure"
19005 #include "confdefs.h"
19006
19007 #include <stdlib.h>
19008 #include <stdio.h>
19009 #include <unistd.h>
19010 #include <fcntl.h>
19011 #ifdef HAVE_POLL_H
19012 #include <poll.h>
19013 #else
19014 #include <sys/poll.h>
19015 #endif
19016 int main(void) {
19017         struct pollfd myfds;
19018         int ret;
19019
19020         /* check for Darwin bug with respect to "devices" */
19021         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
19022         if (myfds.fd < 0)
19023                 myfds.fd = 0;
19024         myfds.events = POLLIN;
19025         myfds.revents = 0;
19026
19027         ret = poll(&myfds, 1, 100);
19028
19029         if (ret < 0 || (myfds.revents & POLLNVAL)) {
19030                 ret = -1;
19031         } else {
19032                 int fd = 0;
19033                 if (!isatty(fd)) {
19034                         fd = open("/dev/tty", 2);       /* O_RDWR */
19035                 }
19036 #ifdef HAVE_POSIX_OPENPT
19037                 if (fd < 0) {
19038                         fd = posix_openpt(O_RDWR);
19039                 }
19040 #endif
19041
19042                 if (fd >= 0) {
19043                         /* also check with standard input */
19044                         myfds.fd = fd;
19045                         myfds.events = POLLIN;
19046                         myfds.revents = 0;
19047                         ret = poll(&myfds, 1, 100);
19048                 } else {
19049                         ret = -1;
19050                 }
19051         }
19052         ${cf_cv_main_return:-return}(ret < 0);
19053 }
19054 _ACEOF
19055 rm -f conftest$ac_exeext
19056 if { (eval echo "$as_me:19056: \"$ac_link\"") >&5
19057   (eval $ac_link) 2>&5
19058   ac_status=$?
19059   echo "$as_me:19059: \$? = $ac_status" >&5
19060   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19061   { (eval echo "$as_me:19061: \"$ac_try\"") >&5
19062   (eval $ac_try) 2>&5
19063   ac_status=$?
19064   echo "$as_me:19064: \$? = $ac_status" >&5
19065   (exit $ac_status); }; }; then
19066   cf_cv_working_poll=yes
19067 else
19068   echo "$as_me: program exited with status $ac_status" >&5
19069 echo "$as_me: failed program was:" >&5
19070 cat conftest.$ac_ext >&5
19071 cf_cv_working_poll=no
19072 fi
19073 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19074 fi
19075 fi
19076 echo "$as_me:19076: result: $cf_cv_working_poll" >&5
19077 echo "${ECHO_T}$cf_cv_working_poll" >&6
19078 test "$cf_cv_working_poll" = "yes" &&
19079 cat >>confdefs.h <<\EOF
19080 #define HAVE_WORKING_POLL 1
19081 EOF
19082
19083 echo "$as_me:19083: checking for va_copy" >&5
19084 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
19085 if test "${cf_cv_have_va_copy+set}" = set; then
19086   echo $ECHO_N "(cached) $ECHO_C" >&6
19087 else
19088
19089 cat >conftest.$ac_ext <<_ACEOF
19090 #line 19090 "configure"
19091 #include "confdefs.h"
19092
19093 #include <stdarg.h>
19094
19095 int
19096 main (void)
19097 {
19098
19099         static va_list dst;
19100         static va_list src;
19101         va_copy(dst, src)
19102   ;
19103   return 0;
19104 }
19105 _ACEOF
19106 rm -f conftest.$ac_objext conftest$ac_exeext
19107 if { (eval echo "$as_me:19107: \"$ac_link\"") >&5
19108   (eval $ac_link) 2>&5
19109   ac_status=$?
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit $ac_status); } &&
19112          { ac_try='test -s conftest$ac_exeext'
19113   { (eval echo "$as_me:19113: \"$ac_try\"") >&5
19114   (eval $ac_try) 2>&5
19115   ac_status=$?
19116   echo "$as_me:19116: \$? = $ac_status" >&5
19117   (exit $ac_status); }; }; then
19118   cf_cv_have_va_copy=yes
19119 else
19120   echo "$as_me: failed program was:" >&5
19121 cat conftest.$ac_ext >&5
19122 cf_cv_have_va_copy=no
19123 fi
19124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19125 fi
19126 echo "$as_me:19126: result: $cf_cv_have_va_copy" >&5
19127 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19128
19129 test "$cf_cv_have_va_copy" = yes &&
19130 cat >>confdefs.h <<\EOF
19131 #define HAVE_VA_COPY 1
19132 EOF
19133
19134 echo "$as_me:19134: checking for __va_copy" >&5
19135 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19136 if test "${cf_cv_have___va_copy+set}" = set; then
19137   echo $ECHO_N "(cached) $ECHO_C" >&6
19138 else
19139
19140 cat >conftest.$ac_ext <<_ACEOF
19141 #line 19141 "configure"
19142 #include "confdefs.h"
19143
19144 #include <stdarg.h>
19145
19146 int
19147 main (void)
19148 {
19149
19150         static va_list dst;
19151         static va_list src;
19152         __va_copy(dst, src)
19153   ;
19154   return 0;
19155 }
19156 _ACEOF
19157 rm -f conftest.$ac_objext conftest$ac_exeext
19158 if { (eval echo "$as_me:19158: \"$ac_link\"") >&5
19159   (eval $ac_link) 2>&5
19160   ac_status=$?
19161   echo "$as_me:19161: \$? = $ac_status" >&5
19162   (exit $ac_status); } &&
19163          { ac_try='test -s conftest$ac_exeext'
19164   { (eval echo "$as_me:19164: \"$ac_try\"") >&5
19165   (eval $ac_try) 2>&5
19166   ac_status=$?
19167   echo "$as_me:19167: \$? = $ac_status" >&5
19168   (exit $ac_status); }; }; then
19169   cf_cv_have___va_copy=yes
19170 else
19171   echo "$as_me: failed program was:" >&5
19172 cat conftest.$ac_ext >&5
19173 cf_cv_have___va_copy=no
19174 fi
19175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19176 fi
19177 echo "$as_me:19177: result: $cf_cv_have___va_copy" >&5
19178 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19179
19180 test "$cf_cv_have___va_copy" = yes &&
19181 cat >>confdefs.h <<\EOF
19182 #define HAVE___VA_COPY 1
19183 EOF
19184
19185 echo "$as_me:19185: checking for pid_t" >&5
19186 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19187 if test "${ac_cv_type_pid_t+set}" = set; then
19188   echo $ECHO_N "(cached) $ECHO_C" >&6
19189 else
19190   cat >conftest.$ac_ext <<_ACEOF
19191 #line 19191 "configure"
19192 #include "confdefs.h"
19193 $ac_includes_default
19194 int
19195 main (void)
19196 {
19197 if ((pid_t *) 0)
19198   return 0;
19199 if (sizeof (pid_t))
19200   return 0;
19201   ;
19202   return 0;
19203 }
19204 _ACEOF
19205 rm -f conftest.$ac_objext
19206 if { (eval echo "$as_me:19206: \"$ac_compile\"") >&5
19207   (eval $ac_compile) 2>&5
19208   ac_status=$?
19209   echo "$as_me:19209: \$? = $ac_status" >&5
19210   (exit $ac_status); } &&
19211          { ac_try='test -s conftest.$ac_objext'
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   ac_cv_type_pid_t=yes
19218 else
19219   echo "$as_me: failed program was:" >&5
19220 cat conftest.$ac_ext >&5
19221 ac_cv_type_pid_t=no
19222 fi
19223 rm -f conftest.$ac_objext conftest.$ac_ext
19224 fi
19225 echo "$as_me:19225: result: $ac_cv_type_pid_t" >&5
19226 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19227 if test $ac_cv_type_pid_t = yes; then
19228   :
19229 else
19230
19231 cat >>confdefs.h <<EOF
19232 #define pid_t int
19233 EOF
19234
19235 fi
19236
19237 for ac_header in unistd.h vfork.h
19238 do
19239 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19240 echo "$as_me:19240: checking for $ac_header" >&5
19241 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19242 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19243   echo $ECHO_N "(cached) $ECHO_C" >&6
19244 else
19245   cat >conftest.$ac_ext <<_ACEOF
19246 #line 19246 "configure"
19247 #include "confdefs.h"
19248 #include <$ac_header>
19249 _ACEOF
19250 if { (eval echo "$as_me:19250: \"$ac_cpp conftest.$ac_ext\"") >&5
19251   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19252   ac_status=$?
19253   egrep -v '^ *\+' conftest.er1 >conftest.err
19254   rm -f conftest.er1
19255   cat conftest.err >&5
19256   echo "$as_me:19256: \$? = $ac_status" >&5
19257   (exit $ac_status); } >/dev/null; then
19258   if test -s conftest.err; then
19259     ac_cpp_err=$ac_c_preproc_warn_flag
19260   else
19261     ac_cpp_err=
19262   fi
19263 else
19264   ac_cpp_err=yes
19265 fi
19266 if test -z "$ac_cpp_err"; then
19267   eval "$as_ac_Header=yes"
19268 else
19269   echo "$as_me: failed program was:" >&5
19270   cat conftest.$ac_ext >&5
19271   eval "$as_ac_Header=no"
19272 fi
19273 rm -f conftest.err conftest.$ac_ext
19274 fi
19275 echo "$as_me:19275: result: `eval echo '${'$as_ac_Header'}'`" >&5
19276 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19277 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19278   cat >>confdefs.h <<EOF
19279 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19280 EOF
19281
19282 fi
19283 done
19284
19285 for ac_func in fork vfork
19286 do
19287 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19288 echo "$as_me:19288: checking for $ac_func" >&5
19289 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19290 if eval "test \"\${$as_ac_var+set}\" = set"; then
19291   echo $ECHO_N "(cached) $ECHO_C" >&6
19292 else
19293   cat >conftest.$ac_ext <<_ACEOF
19294 #line 19294 "configure"
19295 #include "confdefs.h"
19296 /* System header to define __stub macros and hopefully few prototypes,
19297     which can conflict with char $ac_func (); below.  */
19298 #include <assert.h>
19299 /* Override any gcc2 internal prototype to avoid an error.  */
19300 #ifdef __cplusplus
19301 extern "C"
19302 #endif
19303 /* We use char because int might match the return type of a gcc2
19304    builtin and then its argument prototype would still apply.  */
19305 char $ac_func ();
19306 char (*f) ();
19307
19308 int
19309 main (void)
19310 {
19311 /* The GNU C library defines this for functions which it implements
19312     to always fail with ENOSYS.  Some functions are actually named
19313     something starting with __ and the normal name is an alias.  */
19314 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19315 choke me
19316 #else
19317 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19318 #endif
19319
19320   ;
19321   return 0;
19322 }
19323 _ACEOF
19324 rm -f conftest.$ac_objext conftest$ac_exeext
19325 if { (eval echo "$as_me:19325: \"$ac_link\"") >&5
19326   (eval $ac_link) 2>&5
19327   ac_status=$?
19328   echo "$as_me:19328: \$? = $ac_status" >&5
19329   (exit $ac_status); } &&
19330          { ac_try='test -s conftest$ac_exeext'
19331   { (eval echo "$as_me:19331: \"$ac_try\"") >&5
19332   (eval $ac_try) 2>&5
19333   ac_status=$?
19334   echo "$as_me:19334: \$? = $ac_status" >&5
19335   (exit $ac_status); }; }; then
19336   eval "$as_ac_var=yes"
19337 else
19338   echo "$as_me: failed program was:" >&5
19339 cat conftest.$ac_ext >&5
19340 eval "$as_ac_var=no"
19341 fi
19342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19343 fi
19344 echo "$as_me:19344: result: `eval echo '${'$as_ac_var'}'`" >&5
19345 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19346 if test `eval echo '${'$as_ac_var'}'` = yes; then
19347   cat >>confdefs.h <<EOF
19348 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19349 EOF
19350
19351 fi
19352 done
19353
19354 ac_cv_func_fork_works=$ac_cv_func_fork
19355 if test "x$ac_cv_func_fork" = xyes; then
19356   echo "$as_me:19356: checking for working fork" >&5
19357 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19358 if test "${ac_cv_func_fork_works+set}" = set; then
19359   echo $ECHO_N "(cached) $ECHO_C" >&6
19360 else
19361   if test "$cross_compiling" = yes; then
19362   ac_cv_func_fork_works=cross
19363 else
19364   cat >conftest.$ac_ext <<_ACEOF
19365 /* By Rüdiger Kuhlmann. */
19366       #include <sys/types.h>
19367       #if HAVE_UNISTD_H
19368       # include <unistd.h>
19369       #endif
19370       /* Some systems only have a dummy stub for fork() */
19371       int main (void)
19372       {
19373         if (fork() < 0)
19374           $ac_main_return (1);
19375         $ac_main_return (0);
19376       }
19377 _ACEOF
19378 rm -f conftest$ac_exeext
19379 if { (eval echo "$as_me:19379: \"$ac_link\"") >&5
19380   (eval $ac_link) 2>&5
19381   ac_status=$?
19382   echo "$as_me:19382: \$? = $ac_status" >&5
19383   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19384   { (eval echo "$as_me:19384: \"$ac_try\"") >&5
19385   (eval $ac_try) 2>&5
19386   ac_status=$?
19387   echo "$as_me:19387: \$? = $ac_status" >&5
19388   (exit $ac_status); }; }; then
19389   ac_cv_func_fork_works=yes
19390 else
19391   echo "$as_me: program exited with status $ac_status" >&5
19392 echo "$as_me: failed program was:" >&5
19393 cat conftest.$ac_ext >&5
19394 ac_cv_func_fork_works=no
19395 fi
19396 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19397 fi
19398 fi
19399 echo "$as_me:19399: result: $ac_cv_func_fork_works" >&5
19400 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19401
19402 fi
19403 if test "x$ac_cv_func_fork_works" = xcross; then
19404   case $host in
19405     *-*-amigaos* | *-*-msdosdjgpp*)
19406       # Override, as these systems have only a dummy fork() stub
19407       ac_cv_func_fork_works=no
19408       ;;
19409     *)
19410       ac_cv_func_fork_works=yes
19411       ;;
19412   esac
19413   { echo "$as_me:19413: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19414 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19415 fi
19416 ac_cv_func_vfork_works=$ac_cv_func_vfork
19417 if test "x$ac_cv_func_vfork" = xyes; then
19418   echo "$as_me:19418: checking for working vfork" >&5
19419 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19420 if test "${ac_cv_func_vfork_works+set}" = set; then
19421   echo $ECHO_N "(cached) $ECHO_C" >&6
19422 else
19423   if test "$cross_compiling" = yes; then
19424   ac_cv_func_vfork_works=cross
19425 else
19426   cat >conftest.$ac_ext <<_ACEOF
19427 #line 19427 "configure"
19428 #include "confdefs.h"
19429 /* Thanks to Paul Eggert for this test.  */
19430 #include <stdio.h>
19431 #include <sys/types.h>
19432 #include <sys/stat.h>
19433 #if HAVE_UNISTD_H
19434 # include <unistd.h>
19435 #endif
19436 #if HAVE_VFORK_H
19437 # include <vfork.h>
19438 #endif
19439 /* On some sparc systems, changes by the child to local and incoming
19440    argument registers are propagated back to the parent.  The compiler
19441    is told about this with #include <vfork.h>, but some compilers
19442    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19443    static variable whose address is put into a register that is
19444    clobbered by the vfork.  */
19445 static
19446 #ifdef __cplusplus
19447 sparc_address_test (int arg)
19448 # else
19449 sparc_address_test (arg) int arg;
19450 #endif
19451 {
19452   static pid_t child;
19453   if (!child) {
19454     child = vfork ();
19455     if (child < 0) {
19456       perror ("vfork");
19457       _exit(2);
19458     }
19459     if (!child) {
19460       arg = getpid();
19461       write(-1, "", 0);
19462       _exit (arg);
19463     }
19464   }
19465 }
19466
19467 int
19468 main (void)
19469 {
19470   pid_t parent = getpid ();
19471   pid_t child;
19472
19473   sparc_address_test ();
19474
19475   child = vfork ();
19476
19477   if (child == 0) {
19478     /* Here is another test for sparc vfork register problems.  This
19479        test uses lots of local variables, at least as many local
19480        variables as main has allocated so far including compiler
19481        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19482        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19483        reuse the register of parent for one of the local variables,
19484        since it will think that parent can't possibly be used any more
19485        in this routine.  Assigning to the local variable will thus
19486        munge parent in the parent process.  */
19487     pid_t
19488       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19489       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19490     /* Convince the compiler that p..p7 are live; otherwise, it might
19491        use the same hardware register for all 8 local variables.  */
19492     if (p != p1 || p != p2 || p != p3 || p != p4
19493         || p != p5 || p != p6 || p != p7)
19494       _exit(1);
19495
19496     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19497        from child file descriptors.  If the child closes a descriptor
19498        before it execs or exits, this munges the parent's descriptor
19499        as well.  Test for this by closing stdout in the child.  */
19500     _exit(close(fileno(stdout)) != 0);
19501   } else {
19502     int status;
19503     struct stat st;
19504
19505     while (wait(&status) != child)
19506       ;
19507     $ac_main_return(
19508          /* Was there some problem with vforking?  */
19509          child < 0
19510
19511          /* Did the child fail?  (This shouldn't happen.)  */
19512          || status
19513
19514          /* Did the vfork/compiler bug occur?  */
19515          || parent != getpid()
19516
19517          /* Did the file descriptor bug occur?  */
19518          || fstat(fileno(stdout), &st) != 0
19519          );
19520   }
19521 }
19522 _ACEOF
19523 rm -f conftest$ac_exeext
19524 if { (eval echo "$as_me:19524: \"$ac_link\"") >&5
19525   (eval $ac_link) 2>&5
19526   ac_status=$?
19527   echo "$as_me:19527: \$? = $ac_status" >&5
19528   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19529   { (eval echo "$as_me:19529: \"$ac_try\"") >&5
19530   (eval $ac_try) 2>&5
19531   ac_status=$?
19532   echo "$as_me:19532: \$? = $ac_status" >&5
19533   (exit $ac_status); }; }; then
19534   ac_cv_func_vfork_works=yes
19535 else
19536   echo "$as_me: program exited with status $ac_status" >&5
19537 echo "$as_me: failed program was:" >&5
19538 cat conftest.$ac_ext >&5
19539 ac_cv_func_vfork_works=no
19540 fi
19541 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19542 fi
19543 fi
19544 echo "$as_me:19544: result: $ac_cv_func_vfork_works" >&5
19545 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19546
19547 fi;
19548 if test "x$ac_cv_func_fork_works" = xcross; then
19549   ac_cv_func_vfork_works=ac_cv_func_vfork
19550   { echo "$as_me:19550: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19551 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19552 fi
19553
19554 if test "x$ac_cv_func_vfork_works" = xyes; then
19555
19556 cat >>confdefs.h <<\EOF
19557 #define HAVE_WORKING_VFORK 1
19558 EOF
19559
19560 else
19561
19562 cat >>confdefs.h <<\EOF
19563 #define vfork fork
19564 EOF
19565
19566 fi
19567 if test "x$ac_cv_func_fork_works" = xyes; then
19568
19569 cat >>confdefs.h <<\EOF
19570 #define HAVE_WORKING_FORK 1
19571 EOF
19572
19573 fi
19574
19575 # special check for test/ditto.c
19576
19577 echo "$as_me:19577: checking for openpty in -lutil" >&5
19578 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19579 if test "${ac_cv_lib_util_openpty+set}" = set; then
19580   echo $ECHO_N "(cached) $ECHO_C" >&6
19581 else
19582   ac_check_lib_save_LIBS=$LIBS
19583 LIBS="-lutil  $LIBS"
19584 cat >conftest.$ac_ext <<_ACEOF
19585 #line 19585 "configure"
19586 #include "confdefs.h"
19587
19588 /* Override any gcc2 internal prototype to avoid an error.  */
19589 #ifdef __cplusplus
19590 extern "C"
19591 #endif
19592 /* We use char because int might match the return type of a gcc2
19593    builtin and then its argument prototype would still apply.  */
19594 char openpty ();
19595 int
19596 main (void)
19597 {
19598 openpty ();
19599   ;
19600   return 0;
19601 }
19602 _ACEOF
19603 rm -f conftest.$ac_objext conftest$ac_exeext
19604 if { (eval echo "$as_me:19604: \"$ac_link\"") >&5
19605   (eval $ac_link) 2>&5
19606   ac_status=$?
19607   echo "$as_me:19607: \$? = $ac_status" >&5
19608   (exit $ac_status); } &&
19609          { ac_try='test -s conftest$ac_exeext'
19610   { (eval echo "$as_me:19610: \"$ac_try\"") >&5
19611   (eval $ac_try) 2>&5
19612   ac_status=$?
19613   echo "$as_me:19613: \$? = $ac_status" >&5
19614   (exit $ac_status); }; }; then
19615   ac_cv_lib_util_openpty=yes
19616 else
19617   echo "$as_me: failed program was:" >&5
19618 cat conftest.$ac_ext >&5
19619 ac_cv_lib_util_openpty=no
19620 fi
19621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19622 LIBS=$ac_check_lib_save_LIBS
19623 fi
19624 echo "$as_me:19624: result: $ac_cv_lib_util_openpty" >&5
19625 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19626 if test $ac_cv_lib_util_openpty = yes; then
19627   cf_cv_lib_util=yes
19628 else
19629   cf_cv_lib_util=no
19630 fi
19631
19632 echo "$as_me:19632: checking for openpty header" >&5
19633 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19634 if test "${cf_cv_func_openpty+set}" = set; then
19635   echo $ECHO_N "(cached) $ECHO_C" >&6
19636 else
19637
19638         cf_save_LIBS="$LIBS"
19639         test $cf_cv_lib_util = yes && {
19640 cf_add_libs="-lutil"
19641 # Filter out duplicates - this happens with badly-designed ".pc" files...
19642 for cf_add_1lib in $LIBS
19643 do
19644         for cf_add_2lib in $cf_add_libs
19645         do
19646                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19647                 then
19648                         cf_add_1lib=
19649                         break
19650                 fi
19651         done
19652         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19653 done
19654 LIBS="$cf_add_libs"
19655  }
19656         for cf_header in pty.h libutil.h util.h
19657         do
19658         cat >conftest.$ac_ext <<_ACEOF
19659 #line 19659 "configure"
19660 #include "confdefs.h"
19661
19662 #include <$cf_header>
19663
19664 int
19665 main (void)
19666 {
19667
19668         int x = openpty((int *)0, (int *)0, (char *)0,
19669                                    (struct termios *)0, (struct winsize *)0);
19670
19671   ;
19672   return 0;
19673 }
19674 _ACEOF
19675 rm -f conftest.$ac_objext conftest$ac_exeext
19676 if { (eval echo "$as_me:19676: \"$ac_link\"") >&5
19677   (eval $ac_link) 2>&5
19678   ac_status=$?
19679   echo "$as_me:19679: \$? = $ac_status" >&5
19680   (exit $ac_status); } &&
19681          { ac_try='test -s conftest$ac_exeext'
19682   { (eval echo "$as_me:19682: \"$ac_try\"") >&5
19683   (eval $ac_try) 2>&5
19684   ac_status=$?
19685   echo "$as_me:19685: \$? = $ac_status" >&5
19686   (exit $ac_status); }; }; then
19687
19688                 cf_cv_func_openpty=$cf_header
19689                 break
19690
19691 else
19692   echo "$as_me: failed program was:" >&5
19693 cat conftest.$ac_ext >&5
19694
19695                 cf_cv_func_openpty=no
19696
19697 fi
19698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19699         done
19700         LIBS="$cf_save_LIBS"
19701
19702 fi
19703 echo "$as_me:19703: result: $cf_cv_func_openpty" >&5
19704 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19705
19706 if test "$cf_cv_func_openpty" != no ; then
19707
19708 cat >>confdefs.h <<EOF
19709 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19710 EOF
19711
19712 cat >>confdefs.h <<\EOF
19713 #define USE_XTERM_PTY 1
19714 EOF
19715
19716         if test "x$cf_cv_lib_util" = xyes ; then
19717
19718 cf_add_libs="-lutil"
19719 # Filter out duplicates - this happens with badly-designed ".pc" files...
19720 for cf_add_1lib in $TEST_LIBS
19721 do
19722         for cf_add_2lib in $cf_add_libs
19723         do
19724                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19725                 then
19726                         cf_add_1lib=
19727                         break
19728                 fi
19729         done
19730         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19731 done
19732 TEST_LIBS="$cf_add_libs"
19733
19734         fi
19735 fi
19736
19737 if test "$with_hashed_db" != no ; then
19738
19739 cat >>confdefs.h <<\EOF
19740 #define USE_HASHED_DB 1
19741 EOF
19742
19743 case $with_hashed_db in
19744 (yes|*able*)
19745         ;;
19746 (*)
19747         if test -d "$with_hashed_db" ; then
19748
19749 if test -n "$with_hashed_db/include" ; then
19750   for cf_add_incdir in $with_hashed_db/include
19751   do
19752         while test $cf_add_incdir != /usr/include
19753         do
19754           if test -d $cf_add_incdir
19755           then
19756                 cf_have_incdir=no
19757                 if test -n "$CFLAGS$CPPFLAGS" ; then
19758                   # a loop is needed to ensure we can add subdirs of existing dirs
19759                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19760                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19761                           cf_have_incdir=yes; break
19762                         fi
19763                   done
19764                 fi
19765
19766                 if test "$cf_have_incdir" = no ; then
19767                   if test "$cf_add_incdir" = /usr/local/include ; then
19768                         if test "$GCC" = yes
19769                         then
19770                           cf_save_CPPFLAGS=$CPPFLAGS
19771                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19772                           cat >conftest.$ac_ext <<_ACEOF
19773 #line 19773 "configure"
19774 #include "confdefs.h"
19775 #include <stdio.h>
19776 int
19777 main (void)
19778 {
19779 printf("Hello")
19780   ;
19781   return 0;
19782 }
19783 _ACEOF
19784 rm -f conftest.$ac_objext
19785 if { (eval echo "$as_me:19785: \"$ac_compile\"") >&5
19786   (eval $ac_compile) 2>&5
19787   ac_status=$?
19788   echo "$as_me:19788: \$? = $ac_status" >&5
19789   (exit $ac_status); } &&
19790          { ac_try='test -s conftest.$ac_objext'
19791   { (eval echo "$as_me:19791: \"$ac_try\"") >&5
19792   (eval $ac_try) 2>&5
19793   ac_status=$?
19794   echo "$as_me:19794: \$? = $ac_status" >&5
19795   (exit $ac_status); }; }; then
19796   :
19797 else
19798   echo "$as_me: failed program was:" >&5
19799 cat conftest.$ac_ext >&5
19800 cf_have_incdir=yes
19801 fi
19802 rm -f conftest.$ac_objext conftest.$ac_ext
19803                           CPPFLAGS=$cf_save_CPPFLAGS
19804                         fi
19805                   fi
19806                 fi
19807
19808                 if test "$cf_have_incdir" = no ; then
19809                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19810
19811 echo "${as_me:-configure}:19811: testing adding $cf_add_incdir to include-path ..." 1>&5
19812
19813                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19814
19815                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19816                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19817                   cf_add_incdir="$cf_top_incdir"
19818                 else
19819                   break
19820                 fi
19821           else
19822                 break
19823           fi
19824         done
19825   done
19826 fi
19827
19828 if test -n "$with_hashed_db/lib" ; then
19829         for cf_add_libdir in $with_hashed_db/lib
19830         do
19831                 if test $cf_add_libdir = /usr/lib ; then
19832                         :
19833                 elif test -d $cf_add_libdir
19834                 then
19835                         cf_have_libdir=no
19836                         if test -n "$LDFLAGS$LIBS" ; then
19837                                 # a loop is needed to ensure we can add subdirs of existing dirs
19838                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19839                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19840                                                 cf_have_libdir=yes; break
19841                                         fi
19842                                 done
19843                         fi
19844                         if test "$cf_have_libdir" = no ; then
19845                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19846
19847 echo "${as_me:-configure}:19847: testing adding $cf_add_libdir to library-path ..." 1>&5
19848
19849                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19850                         fi
19851                 fi
19852         done
19853 fi
19854
19855         else
19856                 case "$with_hashed_db" in
19857                 (./*|../*|/*)
19858                         { echo "$as_me:19858: WARNING: no such directory $with_hashed_db" >&5
19859 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19860                         ;;
19861                 (*)
19862
19863 cf_search=
19864
19865 test "x$prefix" != "xNONE" && \
19866 test -d "$prefix" && \
19867  {
19868         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19869         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19870         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19871         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19872         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19873         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19874 }
19875
19876 for cf_subdir_prefix in \
19877         /usr \
19878         /usr/local \
19879         /usr/pkg \
19880         /opt \
19881         /opt/local \
19882         $HOME
19883 do
19884
19885 test "x$cf_subdir_prefix" != "x$prefix" && \
19886 test -d "$cf_subdir_prefix" && \
19887 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19888         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19889         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19890         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19891         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19892         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19893         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"
19894 }
19895
19896 done
19897
19898         for cf_item in $cf_search
19899         do
19900                 case $cf_item in
19901                 (*/$with_hashed_db)
19902
19903 if test -n "$cf_item" ; then
19904   for cf_add_incdir in $cf_item
19905   do
19906         while test $cf_add_incdir != /usr/include
19907         do
19908           if test -d $cf_add_incdir
19909           then
19910                 cf_have_incdir=no
19911                 if test -n "$CFLAGS$CPPFLAGS" ; then
19912                   # a loop is needed to ensure we can add subdirs of existing dirs
19913                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19914                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19915                           cf_have_incdir=yes; break
19916                         fi
19917                   done
19918                 fi
19919
19920                 if test "$cf_have_incdir" = no ; then
19921                   if test "$cf_add_incdir" = /usr/local/include ; then
19922                         if test "$GCC" = yes
19923                         then
19924                           cf_save_CPPFLAGS=$CPPFLAGS
19925                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19926                           cat >conftest.$ac_ext <<_ACEOF
19927 #line 19927 "configure"
19928 #include "confdefs.h"
19929 #include <stdio.h>
19930 int
19931 main (void)
19932 {
19933 printf("Hello")
19934   ;
19935   return 0;
19936 }
19937 _ACEOF
19938 rm -f conftest.$ac_objext
19939 if { (eval echo "$as_me:19939: \"$ac_compile\"") >&5
19940   (eval $ac_compile) 2>&5
19941   ac_status=$?
19942   echo "$as_me:19942: \$? = $ac_status" >&5
19943   (exit $ac_status); } &&
19944          { ac_try='test -s conftest.$ac_objext'
19945   { (eval echo "$as_me:19945: \"$ac_try\"") >&5
19946   (eval $ac_try) 2>&5
19947   ac_status=$?
19948   echo "$as_me:19948: \$? = $ac_status" >&5
19949   (exit $ac_status); }; }; then
19950   :
19951 else
19952   echo "$as_me: failed program was:" >&5
19953 cat conftest.$ac_ext >&5
19954 cf_have_incdir=yes
19955 fi
19956 rm -f conftest.$ac_objext conftest.$ac_ext
19957                           CPPFLAGS=$cf_save_CPPFLAGS
19958                         fi
19959                   fi
19960                 fi
19961
19962                 if test "$cf_have_incdir" = no ; then
19963                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19964
19965 echo "${as_me:-configure}:19965: testing adding $cf_add_incdir to include-path ..." 1>&5
19966
19967                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19968
19969                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19970                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19971                   cf_add_incdir="$cf_top_incdir"
19972                 else
19973                   break
19974                 fi
19975           else
19976                 break
19977           fi
19978         done
19979   done
19980 fi
19981
19982                         ;;
19983                 esac
19984         done
19985
19986 cf_search=
19987
19988 test "x$prefix" != "xNONE" && \
19989 test -d "$prefix" && \
19990  {
19991         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19992         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19993         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19994         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19995         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19996         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19997 }
19998
19999 for cf_subdir_prefix in \
20000         /usr \
20001         /usr/local \
20002         /usr/pkg \
20003         /opt \
20004         /opt/local \
20005         $HOME
20006 do
20007
20008 test "x$cf_subdir_prefix" != "x$prefix" && \
20009 test -d "$cf_subdir_prefix" && \
20010 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20011         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
20012         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20013         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
20014         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
20015         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
20016         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"
20017 }
20018
20019 done
20020
20021         for cf_item in $cf_search
20022         do
20023                 case $cf_item in
20024                 (*/$with_hashed_db)
20025
20026 if test -n "$cf_item" ; then
20027         for cf_add_libdir in $cf_item
20028         do
20029                 if test $cf_add_libdir = /usr/lib ; then
20030                         :
20031                 elif test -d $cf_add_libdir
20032                 then
20033                         cf_have_libdir=no
20034                         if test -n "$LDFLAGS$LIBS" ; then
20035                                 # a loop is needed to ensure we can add subdirs of existing dirs
20036                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20037                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20038                                                 cf_have_libdir=yes; break
20039                                         fi
20040                                 done
20041                         fi
20042                         if test "$cf_have_libdir" = no ; then
20043                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20044
20045 echo "${as_me:-configure}:20045: testing adding $cf_add_libdir to library-path ..." 1>&5
20046
20047                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20048                         fi
20049                 fi
20050         done
20051 fi
20052
20053                         ;;
20054                 esac
20055         done
20056
20057                         ;;
20058                 esac
20059         fi
20060 esac
20061
20062 echo "$as_me:20062: checking for db.h" >&5
20063 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
20064 if test "${ac_cv_header_db_h+set}" = set; then
20065   echo $ECHO_N "(cached) $ECHO_C" >&6
20066 else
20067   cat >conftest.$ac_ext <<_ACEOF
20068 #line 20068 "configure"
20069 #include "confdefs.h"
20070 #include <db.h>
20071 _ACEOF
20072 if { (eval echo "$as_me:20072: \"$ac_cpp conftest.$ac_ext\"") >&5
20073   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20074   ac_status=$?
20075   egrep -v '^ *\+' conftest.er1 >conftest.err
20076   rm -f conftest.er1
20077   cat conftest.err >&5
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit $ac_status); } >/dev/null; then
20080   if test -s conftest.err; then
20081     ac_cpp_err=$ac_c_preproc_warn_flag
20082   else
20083     ac_cpp_err=
20084   fi
20085 else
20086   ac_cpp_err=yes
20087 fi
20088 if test -z "$ac_cpp_err"; then
20089   ac_cv_header_db_h=yes
20090 else
20091   echo "$as_me: failed program was:" >&5
20092   cat conftest.$ac_ext >&5
20093   ac_cv_header_db_h=no
20094 fi
20095 rm -f conftest.err conftest.$ac_ext
20096 fi
20097 echo "$as_me:20097: result: $ac_cv_header_db_h" >&5
20098 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20099 if test $ac_cv_header_db_h = yes; then
20100
20101 echo "$as_me:20101: checking for version of db" >&5
20102 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20103 if test "${cf_cv_hashed_db_version+set}" = set; then
20104   echo $ECHO_N "(cached) $ECHO_C" >&6
20105 else
20106
20107 cf_cv_hashed_db_version=unknown
20108
20109 for cf_db_version in 1 2 3 4 5 6
20110 do
20111
20112 echo "${as_me:-configure}:20112: testing checking for db version $cf_db_version ..." 1>&5
20113
20114         cat >conftest.$ac_ext <<_ACEOF
20115 #line 20115 "configure"
20116 #include "confdefs.h"
20117
20118 $ac_includes_default
20119 #include <db.h>
20120
20121 #ifdef DB_VERSION_MAJOR
20122         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20123 #if $cf_db_version == DB_VERSION_MAJOR
20124         /* ok */
20125 #else
20126         make an error
20127 #endif
20128 #else
20129 #if $cf_db_version == 1
20130         /* ok: assuming this is DB 1.8.5 */
20131 #else
20132         make an error
20133 #endif
20134 #endif
20135
20136 int
20137 main (void)
20138 {
20139 DBT *foo = 0
20140   ;
20141   return 0;
20142 }
20143 _ACEOF
20144 rm -f conftest.$ac_objext
20145 if { (eval echo "$as_me:20145: \"$ac_compile\"") >&5
20146   (eval $ac_compile) 2>&5
20147   ac_status=$?
20148   echo "$as_me:20148: \$? = $ac_status" >&5
20149   (exit $ac_status); } &&
20150          { ac_try='test -s conftest.$ac_objext'
20151   { (eval echo "$as_me:20151: \"$ac_try\"") >&5
20152   (eval $ac_try) 2>&5
20153   ac_status=$?
20154   echo "$as_me:20154: \$? = $ac_status" >&5
20155   (exit $ac_status); }; }; then
20156
20157         cf_cv_hashed_db_version=$cf_db_version
20158         break
20159
20160 else
20161   echo "$as_me: failed program was:" >&5
20162 cat conftest.$ac_ext >&5
20163 fi
20164 rm -f conftest.$ac_objext conftest.$ac_ext
20165 done
20166
20167 fi
20168 echo "$as_me:20168: result: $cf_cv_hashed_db_version" >&5
20169 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20170
20171 if test "$cf_cv_hashed_db_version" = unknown ; then
20172         { { echo "$as_me:20172: error: Cannot determine version of db" >&5
20173 echo "$as_me: error: Cannot determine version of db" >&2;}
20174    { (exit 1); exit 1; }; }
20175 else
20176
20177 echo "$as_me:20177: checking for db libraries" >&5
20178 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20179 if test "${cf_cv_hashed_db_libs+set}" = set; then
20180   echo $ECHO_N "(cached) $ECHO_C" >&6
20181 else
20182
20183 cf_cv_hashed_db_libs=unknown
20184 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20185 do
20186         cf_save_libs="$LIBS"
20187         if test -n "$cf_db_libs"; then
20188
20189 cf_add_libs="-l$cf_db_libs"
20190 # Filter out duplicates - this happens with badly-designed ".pc" files...
20191 for cf_add_1lib in $LIBS
20192 do
20193         for cf_add_2lib in $cf_add_libs
20194         do
20195                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20196                 then
20197                         cf_add_1lib=
20198                         break
20199                 fi
20200         done
20201         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20202 done
20203 LIBS="$cf_add_libs"
20204
20205         fi
20206
20207 echo "${as_me:-configure}:20207: testing checking for library "$cf_db_libs" ..." 1>&5
20208
20209         cat >conftest.$ac_ext <<_ACEOF
20210 #line 20210 "configure"
20211 #include "confdefs.h"
20212
20213 $ac_includes_default
20214 #include <db.h>
20215
20216 int
20217 main (void)
20218 {
20219
20220         char *path = "/tmp/foo";
20221 #ifdef DB_VERSION_MAJOR
20222 #if DB_VERSION_MAJOR >= 4
20223         DB *result = 0;
20224         db_create(&result, NULL, 0);
20225         result->open(result,
20226                 NULL,
20227                 path,
20228                 path,
20229                 DB_HASH,
20230                 DB_CREATE,
20231                 0644);
20232 #elif DB_VERSION_MAJOR >= 3
20233         DB *result = 0;
20234         db_create(&result, NULL, 0);
20235         result->open(result,
20236                 path,
20237                 path,
20238                 DB_HASH,
20239                 DB_CREATE,
20240                 0644);
20241 #elif DB_VERSION_MAJOR >= 2
20242         DB *result = 0;
20243         db_open(path,
20244                 DB_HASH,
20245                 DB_CREATE,
20246                 0644,
20247                 (DB_ENV *) 0,
20248                 (DB_INFO *) 0,
20249                 &result);
20250 #endif /* DB_VERSION_MAJOR */
20251 #else
20252         DB *result = dbopen(path,
20253                      2,
20254                      0644,
20255                      DB_HASH,
20256                      0);
20257 #endif
20258         ${cf_cv_main_return:-return}(result != 0)
20259
20260   ;
20261   return 0;
20262 }
20263 _ACEOF
20264 rm -f conftest.$ac_objext conftest$ac_exeext
20265 if { (eval echo "$as_me:20265: \"$ac_link\"") >&5
20266   (eval $ac_link) 2>&5
20267   ac_status=$?
20268   echo "$as_me:20268: \$? = $ac_status" >&5
20269   (exit $ac_status); } &&
20270          { ac_try='test -s conftest$ac_exeext'
20271   { (eval echo "$as_me:20271: \"$ac_try\"") >&5
20272   (eval $ac_try) 2>&5
20273   ac_status=$?
20274   echo "$as_me:20274: \$? = $ac_status" >&5
20275   (exit $ac_status); }; }; then
20276
20277         if test -n "$cf_db_libs" ; then
20278                 cf_cv_hashed_db_libs=$cf_db_libs
20279         else
20280                 cf_cv_hashed_db_libs=default
20281         fi
20282         LIBS="$cf_save_libs"
20283         break
20284
20285 else
20286   echo "$as_me: failed program was:" >&5
20287 cat conftest.$ac_ext >&5
20288 fi
20289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20290         LIBS="$cf_save_libs"
20291 done
20292
20293 fi
20294 echo "$as_me:20294: result: $cf_cv_hashed_db_libs" >&5
20295 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20296
20297         if test "$cf_cv_hashed_db_libs" = unknown ; then
20298                 { { echo "$as_me:20298: error: Cannot determine library for db" >&5
20299 echo "$as_me: error: Cannot determine library for db" >&2;}
20300    { (exit 1); exit 1; }; }
20301         elif test "$cf_cv_hashed_db_libs" != default ; then
20302
20303 cf_add_libs="-l$cf_cv_hashed_db_libs"
20304 # Filter out duplicates - this happens with badly-designed ".pc" files...
20305 for cf_add_1lib in $LIBS
20306 do
20307         for cf_add_2lib in $cf_add_libs
20308         do
20309                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20310                 then
20311                         cf_add_1lib=
20312                         break
20313                 fi
20314         done
20315         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20316 done
20317 LIBS="$cf_add_libs"
20318
20319         fi
20320 fi
20321
20322 else
20323
20324         { { echo "$as_me:20324: error: Cannot find db.h" >&5
20325 echo "$as_me: error: Cannot find db.h" >&2;}
20326    { (exit 1); exit 1; }; }
20327
20328 fi
20329
20330 fi
20331
20332 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20333         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20334         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20335 fi
20336
20337 # Just in case, check if the C compiler has a bool type.
20338
20339 echo "$as_me:20339: checking if we should include stdbool.h" >&5
20340 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20341
20342 if test "${cf_cv_header_stdbool_h+set}" = set; then
20343   echo $ECHO_N "(cached) $ECHO_C" >&6
20344 else
20345
20346         cat >conftest.$ac_ext <<_ACEOF
20347 #line 20347 "configure"
20348 #include "confdefs.h"
20349
20350 int
20351 main (void)
20352 {
20353 bool foo = false
20354   ;
20355   return 0;
20356 }
20357 _ACEOF
20358 rm -f conftest.$ac_objext
20359 if { (eval echo "$as_me:20359: \"$ac_compile\"") >&5
20360   (eval $ac_compile) 2>&5
20361   ac_status=$?
20362   echo "$as_me:20362: \$? = $ac_status" >&5
20363   (exit $ac_status); } &&
20364          { ac_try='test -s conftest.$ac_objext'
20365   { (eval echo "$as_me:20365: \"$ac_try\"") >&5
20366   (eval $ac_try) 2>&5
20367   ac_status=$?
20368   echo "$as_me:20368: \$? = $ac_status" >&5
20369   (exit $ac_status); }; }; then
20370   cf_cv_header_stdbool_h=0
20371 else
20372   echo "$as_me: failed program was:" >&5
20373 cat conftest.$ac_ext >&5
20374 cat >conftest.$ac_ext <<_ACEOF
20375 #line 20375 "configure"
20376 #include "confdefs.h"
20377
20378 #ifndef __BEOS__
20379 #include <stdbool.h>
20380 #endif
20381
20382 int
20383 main (void)
20384 {
20385 bool foo = false
20386   ;
20387   return 0;
20388 }
20389 _ACEOF
20390 rm -f conftest.$ac_objext
20391 if { (eval echo "$as_me:20391: \"$ac_compile\"") >&5
20392   (eval $ac_compile) 2>&5
20393   ac_status=$?
20394   echo "$as_me:20394: \$? = $ac_status" >&5
20395   (exit $ac_status); } &&
20396          { ac_try='test -s conftest.$ac_objext'
20397   { (eval echo "$as_me:20397: \"$ac_try\"") >&5
20398   (eval $ac_try) 2>&5
20399   ac_status=$?
20400   echo "$as_me:20400: \$? = $ac_status" >&5
20401   (exit $ac_status); }; }; then
20402   cf_cv_header_stdbool_h=1
20403 else
20404   echo "$as_me: failed program was:" >&5
20405 cat conftest.$ac_ext >&5
20406 cf_cv_header_stdbool_h=0
20407 fi
20408 rm -f conftest.$ac_objext conftest.$ac_ext
20409 fi
20410 rm -f conftest.$ac_objext conftest.$ac_ext
20411 fi
20412
20413 if test "$cf_cv_header_stdbool_h" = 1
20414 then    echo "$as_me:20414: result: yes" >&5
20415 echo "${ECHO_T}yes" >&6
20416 else    echo "$as_me:20416: result: no" >&5
20417 echo "${ECHO_T}no" >&6
20418 fi
20419
20420 echo "$as_me:20420: checking for builtin bool type" >&5
20421 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20422
20423 if test "${cf_cv_cc_bool_type+set}" = set; then
20424   echo $ECHO_N "(cached) $ECHO_C" >&6
20425 else
20426
20427         cat >conftest.$ac_ext <<_ACEOF
20428 #line 20428 "configure"
20429 #include "confdefs.h"
20430
20431 #include <stdio.h>
20432 #include <sys/types.h>
20433
20434 int
20435 main (void)
20436 {
20437 bool x = false
20438   ;
20439   return 0;
20440 }
20441 _ACEOF
20442 rm -f conftest.$ac_objext
20443 if { (eval echo "$as_me:20443: \"$ac_compile\"") >&5
20444   (eval $ac_compile) 2>&5
20445   ac_status=$?
20446   echo "$as_me:20446: \$? = $ac_status" >&5
20447   (exit $ac_status); } &&
20448          { ac_try='test -s conftest.$ac_objext'
20449   { (eval echo "$as_me:20449: \"$ac_try\"") >&5
20450   (eval $ac_try) 2>&5
20451   ac_status=$?
20452   echo "$as_me:20452: \$? = $ac_status" >&5
20453   (exit $ac_status); }; }; then
20454   cf_cv_cc_bool_type=1
20455 else
20456   echo "$as_me: failed program was:" >&5
20457 cat conftest.$ac_ext >&5
20458 cf_cv_cc_bool_type=0
20459 fi
20460 rm -f conftest.$ac_objext conftest.$ac_ext
20461
20462 fi
20463
20464 if test "$cf_cv_cc_bool_type" = 1
20465 then    echo "$as_me:20465: result: yes" >&5
20466 echo "${ECHO_T}yes" >&6
20467 else    echo "$as_me:20467: result: no" >&5
20468 echo "${ECHO_T}no" >&6
20469 fi
20470
20471 # Check for C++ compiler characteristics (and ensure that it's there!)
20472 if test -n "$CXX" ; then
20473         ac_ext=cc
20474 ac_cpp='$CXXCPP $CPPFLAGS'
20475 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20476 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20477 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20478 ac_main_return=return
20479
20480 if test -n "$GXX" ; then
20481
20482         cf_save="$LIBS"
20483         LIBS="$LIBS $CXXLIBS"
20484         echo "$as_me:20484: checking if we already have C++ library" >&5
20485 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20486         cat >conftest.$ac_ext <<_ACEOF
20487 #line 20487 "configure"
20488 #include "confdefs.h"
20489
20490                         #include <iostream>
20491 int
20492 main (void)
20493 {
20494
20495                         std::cout << "Hello World!" << std::endl;
20496   ;
20497   return 0;
20498 }
20499 _ACEOF
20500 rm -f conftest.$ac_objext conftest$ac_exeext
20501 if { (eval echo "$as_me:20501: \"$ac_link\"") >&5
20502   (eval $ac_link) 2>&5
20503   ac_status=$?
20504   echo "$as_me:20504: \$? = $ac_status" >&5
20505   (exit $ac_status); } &&
20506          { ac_try='test -s conftest$ac_exeext'
20507   { (eval echo "$as_me:20507: \"$ac_try\"") >&5
20508   (eval $ac_try) 2>&5
20509   ac_status=$?
20510   echo "$as_me:20510: \$? = $ac_status" >&5
20511   (exit $ac_status); }; }; then
20512   cf_have_libstdcpp=yes
20513 else
20514   echo "$as_me: failed program was:" >&5
20515 cat conftest.$ac_ext >&5
20516 cf_have_libstdcpp=no
20517 fi
20518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20519         echo "$as_me:20519: result: $cf_have_libstdcpp" >&5
20520 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20521         LIBS="$cf_save"
20522
20523         if test $cf_have_libstdcpp != yes
20524         then
20525                 case $cf_cv_system_name in
20526                 (os2*)
20527                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20528                                 cf_stdcpp_libname=stdcpp
20529                         else
20530                                 cf_stdcpp_libname=stdc++
20531                         fi
20532                         ;;
20533                 (*)
20534                         cf_stdcpp_libname=stdc++
20535                         ;;
20536                 esac
20537
20538                 echo "$as_me:20538: checking for library $cf_stdcpp_libname" >&5
20539 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20540 if test "${cf_cv_libstdcpp+set}" = set; then
20541   echo $ECHO_N "(cached) $ECHO_C" >&6
20542 else
20543
20544                         cf_save="$LIBS"
20545                         LIBS="$LIBS $CXXLIBS"
20546
20547 cf_add_libs="-l$cf_stdcpp_libname"
20548 # Filter out duplicates - this happens with badly-designed ".pc" files...
20549 for cf_add_1lib in $LIBS
20550 do
20551         for cf_add_2lib in $cf_add_libs
20552         do
20553                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20554                 then
20555                         cf_add_1lib=
20556                         break
20557                 fi
20558         done
20559         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20560 done
20561 LIBS="$cf_add_libs"
20562
20563                 cat >conftest.$ac_ext <<_ACEOF
20564 #line 20564 "configure"
20565 #include "confdefs.h"
20566
20567                                 #include <iostream>
20568 int
20569 main (void)
20570 {
20571
20572                                 std::cout << "Hello World!" << std::endl;
20573   ;
20574   return 0;
20575 }
20576 _ACEOF
20577 rm -f conftest.$ac_objext conftest$ac_exeext
20578 if { (eval echo "$as_me:20578: \"$ac_link\"") >&5
20579   (eval $ac_link) 2>&5
20580   ac_status=$?
20581   echo "$as_me:20581: \$? = $ac_status" >&5
20582   (exit $ac_status); } &&
20583          { ac_try='test -s conftest$ac_exeext'
20584   { (eval echo "$as_me:20584: \"$ac_try\"") >&5
20585   (eval $ac_try) 2>&5
20586   ac_status=$?
20587   echo "$as_me:20587: \$? = $ac_status" >&5
20588   (exit $ac_status); }; }; then
20589   cf_cv_libstdcpp=yes
20590 else
20591   echo "$as_me: failed program was:" >&5
20592 cat conftest.$ac_ext >&5
20593 cf_cv_libstdcpp=no
20594 fi
20595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20596                         LIBS="$cf_save"
20597
20598 fi
20599 echo "$as_me:20599: result: $cf_cv_libstdcpp" >&5
20600 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20601                 test "$cf_cv_libstdcpp" = yes && {
20602 cf_add_libs="-l$cf_stdcpp_libname"
20603 # Filter out duplicates - this happens with badly-designed ".pc" files...
20604 for cf_add_1lib in $CXXLIBS
20605 do
20606         for cf_add_2lib in $cf_add_libs
20607         do
20608                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20609                 then
20610                         cf_add_1lib=
20611                         break
20612                 fi
20613         done
20614         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20615 done
20616 CXXLIBS="$cf_add_libs"
20617  }
20618         fi
20619 fi
20620
20621         echo "$as_me:20621: checking whether $CXX understands -c and -o together" >&5
20622 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20623 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20624   echo $ECHO_N "(cached) $ECHO_C" >&6
20625 else
20626
20627 cat > conftest.$ac_ext <<CF_EOF
20628 int main(void)
20629 {
20630         ${cf_cv_main_return:-return}(0);
20631 }
20632 CF_EOF
20633 # We do the test twice because some compilers refuse to overwrite an
20634 # existing .o file with -o, though they will create one.
20635 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20636 if { (eval echo "$as_me:20636: \"$ac_try\"") >&5
20637   (eval $ac_try) 2>&5
20638   ac_status=$?
20639   echo "$as_me:20639: \$? = $ac_status" >&5
20640   (exit $ac_status); } &&
20641   test -f conftest2.$ac_objext && { (eval echo "$as_me:20641: \"$ac_try\"") >&5
20642   (eval $ac_try) 2>&5
20643   ac_status=$?
20644   echo "$as_me:20644: \$? = $ac_status" >&5
20645   (exit $ac_status); };
20646 then
20647   eval cf_cv_prog_CXX_c_o=yes
20648 else
20649   eval cf_cv_prog_CXX_c_o=no
20650 fi
20651 rm -rf conftest*
20652
20653 fi
20654 if test $cf_cv_prog_CXX_c_o = yes; then
20655   echo "$as_me:20655: result: yes" >&5
20656 echo "${ECHO_T}yes" >&6
20657 else
20658   echo "$as_me:20658: result: no" >&5
20659 echo "${ECHO_T}no" >&6
20660 fi
20661
20662         case $GXX_VERSION in
20663         (1*|2.0-6*)
20664                 cf_cxx_library=yes
20665                 ;;
20666         (*-2.7*|2.7*)
20667
20668 cf_cxx_library=unknown
20669 case $cf_cv_system_name in
20670 (os2*)
20671         cf_gpp_libname=gpp
20672         ;;
20673 (*)
20674         cf_gpp_libname=g++
20675         ;;
20676 esac
20677 if test "$GXX" = yes; then
20678         echo "$as_me:20678: checking for lib$cf_gpp_libname" >&5
20679 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20680         cf_save="$LIBS"
20681
20682 cf_add_libs="-l$cf_gpp_libname"
20683 # Filter out duplicates - this happens with badly-designed ".pc" files...
20684 for cf_add_1lib in $LIBS
20685 do
20686         for cf_add_2lib in $cf_add_libs
20687         do
20688                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20689                 then
20690                         cf_add_1lib=
20691                         break
20692                 fi
20693         done
20694         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20695 done
20696 LIBS="$cf_add_libs"
20697
20698         cat >conftest.$ac_ext <<_ACEOF
20699 #line 20699 "configure"
20700 #include "confdefs.h"
20701
20702 #include <$cf_gpp_libname/builtin.h>
20703
20704 int
20705 main (void)
20706 {
20707 two_arg_error_handler_t foo2 = lib_error_handler
20708   ;
20709   return 0;
20710 }
20711 _ACEOF
20712 rm -f conftest.$ac_objext conftest$ac_exeext
20713 if { (eval echo "$as_me:20713: \"$ac_link\"") >&5
20714   (eval $ac_link) 2>&5
20715   ac_status=$?
20716   echo "$as_me:20716: \$? = $ac_status" >&5
20717   (exit $ac_status); } &&
20718          { ac_try='test -s conftest$ac_exeext'
20719   { (eval echo "$as_me:20719: \"$ac_try\"") >&5
20720   (eval $ac_try) 2>&5
20721   ac_status=$?
20722   echo "$as_me:20722: \$? = $ac_status" >&5
20723   (exit $ac_status); }; }; then
20724   cf_cxx_library=yes
20725
20726 cf_add_libs="-l$cf_gpp_libname"
20727 # Filter out duplicates - this happens with badly-designed ".pc" files...
20728 for cf_add_1lib in $CXXLIBS
20729 do
20730         for cf_add_2lib in $cf_add_libs
20731         do
20732                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20733                 then
20734                         cf_add_1lib=
20735                         break
20736                 fi
20737         done
20738         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20739 done
20740 CXXLIBS="$cf_add_libs"
20741
20742          if test "$cf_gpp_libname" = cpp ; then
20743
20744 cat >>confdefs.h <<\EOF
20745 #define HAVE_GPP_BUILTIN_H 1
20746 EOF
20747
20748          else
20749
20750 cat >>confdefs.h <<\EOF
20751 #define HAVE_GXX_BUILTIN_H 1
20752 EOF
20753
20754          fi
20755 else
20756   echo "$as_me: failed program was:" >&5
20757 cat conftest.$ac_ext >&5
20758 cat >conftest.$ac_ext <<_ACEOF
20759 #line 20759 "configure"
20760 #include "confdefs.h"
20761
20762 #include <builtin.h>
20763
20764 int
20765 main (void)
20766 {
20767 two_arg_error_handler_t foo2 = lib_error_handler
20768   ;
20769   return 0;
20770 }
20771 _ACEOF
20772 rm -f conftest.$ac_objext conftest$ac_exeext
20773 if { (eval echo "$as_me:20773: \"$ac_link\"") >&5
20774   (eval $ac_link) 2>&5
20775   ac_status=$?
20776   echo "$as_me:20776: \$? = $ac_status" >&5
20777   (exit $ac_status); } &&
20778          { ac_try='test -s conftest$ac_exeext'
20779   { (eval echo "$as_me:20779: \"$ac_try\"") >&5
20780   (eval $ac_try) 2>&5
20781   ac_status=$?
20782   echo "$as_me:20782: \$? = $ac_status" >&5
20783   (exit $ac_status); }; }; then
20784   cf_cxx_library=yes
20785
20786 cf_add_libs="-l$cf_gpp_libname"
20787 # Filter out duplicates - this happens with badly-designed ".pc" files...
20788 for cf_add_1lib in $CXXLIBS
20789 do
20790         for cf_add_2lib in $cf_add_libs
20791         do
20792                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20793                 then
20794                         cf_add_1lib=
20795                         break
20796                 fi
20797         done
20798         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20799 done
20800 CXXLIBS="$cf_add_libs"
20801
20802 cat >>confdefs.h <<\EOF
20803 #define HAVE_BUILTIN_H 1
20804 EOF
20805
20806 else
20807   echo "$as_me: failed program was:" >&5
20808 cat conftest.$ac_ext >&5
20809 cf_cxx_library=no
20810 fi
20811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20812 fi
20813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20814         LIBS="$cf_save"
20815         echo "$as_me:20815: result: $cf_cxx_library" >&5
20816 echo "${ECHO_T}$cf_cxx_library" >&6
20817 fi
20818
20819                 ;;
20820         (*)
20821                 cf_cxx_library=no
20822                 ;;
20823         esac
20824
20825         ac_ext=cc
20826 ac_cpp='$CXXCPP $CPPFLAGS'
20827 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20828 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20829 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20830 ac_main_return=return
20831 echo "$as_me:20831: checking how to run the C++ preprocessor" >&5
20832 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20833 if test -z "$CXXCPP"; then
20834   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20835   echo $ECHO_N "(cached) $ECHO_C" >&6
20836 else
20837       # Double quotes because CXXCPP needs to be expanded
20838     for CXXCPP in "$CXX -E" "/lib/cpp"
20839     do
20840       ac_preproc_ok=false
20841 for ac_cxx_preproc_warn_flag in '' yes
20842 do
20843   # Use a header file that comes with gcc, so configuring glibc
20844   # with a fresh cross-compiler works.
20845   # On the NeXT, cc -E runs the code through the compiler's parser,
20846   # not just through cpp. "Syntax error" is here to catch this case.
20847   cat >conftest.$ac_ext <<_ACEOF
20848 #line 20848 "configure"
20849 #include "confdefs.h"
20850 #include <assert.h>
20851                      Syntax error
20852 _ACEOF
20853 if { (eval echo "$as_me:20853: \"$ac_cpp conftest.$ac_ext\"") >&5
20854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20855   ac_status=$?
20856   egrep -v '^ *\+' conftest.er1 >conftest.err
20857   rm -f conftest.er1
20858   cat conftest.err >&5
20859   echo "$as_me:20859: \$? = $ac_status" >&5
20860   (exit $ac_status); } >/dev/null; then
20861   if test -s conftest.err; then
20862     ac_cpp_err=$ac_cxx_preproc_warn_flag
20863   else
20864     ac_cpp_err=
20865   fi
20866 else
20867   ac_cpp_err=yes
20868 fi
20869 if test -z "$ac_cpp_err"; then
20870   :
20871 else
20872   echo "$as_me: failed program was:" >&5
20873   cat conftest.$ac_ext >&5
20874   # Broken: fails on valid input.
20875 continue
20876 fi
20877 rm -f conftest.err conftest.$ac_ext
20878
20879   # OK, works on sane cases.  Now check whether non-existent headers
20880   # can be detected and how.
20881   cat >conftest.$ac_ext <<_ACEOF
20882 #line 20882 "configure"
20883 #include "confdefs.h"
20884 #include <ac_nonexistent.h>
20885 _ACEOF
20886 if { (eval echo "$as_me:20886: \"$ac_cpp conftest.$ac_ext\"") >&5
20887   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20888   ac_status=$?
20889   egrep -v '^ *\+' conftest.er1 >conftest.err
20890   rm -f conftest.er1
20891   cat conftest.err >&5
20892   echo "$as_me:20892: \$? = $ac_status" >&5
20893   (exit $ac_status); } >/dev/null; then
20894   if test -s conftest.err; then
20895     ac_cpp_err=$ac_cxx_preproc_warn_flag
20896   else
20897     ac_cpp_err=
20898   fi
20899 else
20900   ac_cpp_err=yes
20901 fi
20902 if test -z "$ac_cpp_err"; then
20903   # Broken: success on invalid input.
20904 continue
20905 else
20906   echo "$as_me: failed program was:" >&5
20907   cat conftest.$ac_ext >&5
20908   # Passes both tests.
20909 ac_preproc_ok=:
20910 break
20911 fi
20912 rm -f conftest.err conftest.$ac_ext
20913
20914 done
20915 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20916 rm -f conftest.err conftest.$ac_ext
20917 if $ac_preproc_ok; then
20918   break
20919 fi
20920
20921     done
20922     ac_cv_prog_CXXCPP=$CXXCPP
20923
20924 fi
20925   CXXCPP=$ac_cv_prog_CXXCPP
20926 else
20927   ac_cv_prog_CXXCPP=$CXXCPP
20928 fi
20929 echo "$as_me:20929: result: $CXXCPP" >&5
20930 echo "${ECHO_T}$CXXCPP" >&6
20931 ac_preproc_ok=false
20932 for ac_cxx_preproc_warn_flag in '' yes
20933 do
20934   # Use a header file that comes with gcc, so configuring glibc
20935   # with a fresh cross-compiler works.
20936   # On the NeXT, cc -E runs the code through the compiler's parser,
20937   # not just through cpp. "Syntax error" is here to catch this case.
20938   cat >conftest.$ac_ext <<_ACEOF
20939 #line 20939 "configure"
20940 #include "confdefs.h"
20941 #include <assert.h>
20942                      Syntax error
20943 _ACEOF
20944 if { (eval echo "$as_me:20944: \"$ac_cpp conftest.$ac_ext\"") >&5
20945   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20946   ac_status=$?
20947   egrep -v '^ *\+' conftest.er1 >conftest.err
20948   rm -f conftest.er1
20949   cat conftest.err >&5
20950   echo "$as_me:20950: \$? = $ac_status" >&5
20951   (exit $ac_status); } >/dev/null; then
20952   if test -s conftest.err; then
20953     ac_cpp_err=$ac_cxx_preproc_warn_flag
20954   else
20955     ac_cpp_err=
20956   fi
20957 else
20958   ac_cpp_err=yes
20959 fi
20960 if test -z "$ac_cpp_err"; then
20961   :
20962 else
20963   echo "$as_me: failed program was:" >&5
20964   cat conftest.$ac_ext >&5
20965   # Broken: fails on valid input.
20966 continue
20967 fi
20968 rm -f conftest.err conftest.$ac_ext
20969
20970   # OK, works on sane cases.  Now check whether non-existent headers
20971   # can be detected and how.
20972   cat >conftest.$ac_ext <<_ACEOF
20973 #line 20973 "configure"
20974 #include "confdefs.h"
20975 #include <ac_nonexistent.h>
20976 _ACEOF
20977 if { (eval echo "$as_me:20977: \"$ac_cpp conftest.$ac_ext\"") >&5
20978   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20979   ac_status=$?
20980   egrep -v '^ *\+' conftest.er1 >conftest.err
20981   rm -f conftest.er1
20982   cat conftest.err >&5
20983   echo "$as_me:20983: \$? = $ac_status" >&5
20984   (exit $ac_status); } >/dev/null; then
20985   if test -s conftest.err; then
20986     ac_cpp_err=$ac_cxx_preproc_warn_flag
20987   else
20988     ac_cpp_err=
20989   fi
20990 else
20991   ac_cpp_err=yes
20992 fi
20993 if test -z "$ac_cpp_err"; then
20994   # Broken: success on invalid input.
20995 continue
20996 else
20997   echo "$as_me: failed program was:" >&5
20998   cat conftest.$ac_ext >&5
20999   # Passes both tests.
21000 ac_preproc_ok=:
21001 break
21002 fi
21003 rm -f conftest.err conftest.$ac_ext
21004
21005 done
21006 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21007 rm -f conftest.err conftest.$ac_ext
21008 if $ac_preproc_ok; then
21009   :
21010 else
21011   { { echo "$as_me:21011: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
21012 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
21013    { (exit 1); exit 1; }; }
21014 fi
21015
21016 ac_ext=cc
21017 ac_cpp='$CXXCPP $CPPFLAGS'
21018 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21019 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21020 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21021 ac_main_return=return
21022
21023 for ac_header in typeinfo
21024 do
21025 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21026 echo "$as_me:21026: checking for $ac_header" >&5
21027 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21028 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21029   echo $ECHO_N "(cached) $ECHO_C" >&6
21030 else
21031   cat >conftest.$ac_ext <<_ACEOF
21032 #line 21032 "configure"
21033 #include "confdefs.h"
21034 #include <$ac_header>
21035 _ACEOF
21036 if { (eval echo "$as_me:21036: \"$ac_cpp conftest.$ac_ext\"") >&5
21037   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21038   ac_status=$?
21039   egrep -v '^ *\+' conftest.er1 >conftest.err
21040   rm -f conftest.er1
21041   cat conftest.err >&5
21042   echo "$as_me:21042: \$? = $ac_status" >&5
21043   (exit $ac_status); } >/dev/null; then
21044   if test -s conftest.err; then
21045     ac_cpp_err=$ac_cxx_preproc_warn_flag
21046   else
21047     ac_cpp_err=
21048   fi
21049 else
21050   ac_cpp_err=yes
21051 fi
21052 if test -z "$ac_cpp_err"; then
21053   eval "$as_ac_Header=yes"
21054 else
21055   echo "$as_me: failed program was:" >&5
21056   cat conftest.$ac_ext >&5
21057   eval "$as_ac_Header=no"
21058 fi
21059 rm -f conftest.err conftest.$ac_ext
21060 fi
21061 echo "$as_me:21061: result: `eval echo '${'$as_ac_Header'}'`" >&5
21062 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21063 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21064   cat >>confdefs.h <<EOF
21065 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21066 EOF
21067
21068 fi
21069 done
21070
21071 for ac_header in iostream
21072 do
21073 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21074 echo "$as_me:21074: checking for $ac_header" >&5
21075 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21076 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21077   echo $ECHO_N "(cached) $ECHO_C" >&6
21078 else
21079   cat >conftest.$ac_ext <<_ACEOF
21080 #line 21080 "configure"
21081 #include "confdefs.h"
21082 #include <$ac_header>
21083 _ACEOF
21084 if { (eval echo "$as_me:21084: \"$ac_cpp conftest.$ac_ext\"") >&5
21085   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21086   ac_status=$?
21087   egrep -v '^ *\+' conftest.er1 >conftest.err
21088   rm -f conftest.er1
21089   cat conftest.err >&5
21090   echo "$as_me:21090: \$? = $ac_status" >&5
21091   (exit $ac_status); } >/dev/null; then
21092   if test -s conftest.err; then
21093     ac_cpp_err=$ac_cxx_preproc_warn_flag
21094   else
21095     ac_cpp_err=
21096   fi
21097 else
21098   ac_cpp_err=yes
21099 fi
21100 if test -z "$ac_cpp_err"; then
21101   eval "$as_ac_Header=yes"
21102 else
21103   echo "$as_me: failed program was:" >&5
21104   cat conftest.$ac_ext >&5
21105   eval "$as_ac_Header=no"
21106 fi
21107 rm -f conftest.err conftest.$ac_ext
21108 fi
21109 echo "$as_me:21109: result: `eval echo '${'$as_ac_Header'}'`" >&5
21110 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21111 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21112   cat >>confdefs.h <<EOF
21113 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21114 EOF
21115
21116 fi
21117 done
21118
21119 if test x"$ac_cv_header_iostream" = xyes ; then
21120         echo "$as_me:21120: checking if iostream uses std-namespace" >&5
21121 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21122         cat >conftest.$ac_ext <<_ACEOF
21123 #line 21123 "configure"
21124 #include "confdefs.h"
21125
21126 #include <iostream>
21127 using std::endl;
21128 using std::cerr;
21129 int
21130 main (void)
21131 {
21132
21133 cerr << "testing" << endl;
21134
21135   ;
21136   return 0;
21137 }
21138 _ACEOF
21139 rm -f conftest.$ac_objext
21140 if { (eval echo "$as_me:21140: \"$ac_compile\"") >&5
21141   (eval $ac_compile) 2>&5
21142   ac_status=$?
21143   echo "$as_me:21143: \$? = $ac_status" >&5
21144   (exit $ac_status); } &&
21145          { ac_try='test -s conftest.$ac_objext'
21146   { (eval echo "$as_me:21146: \"$ac_try\"") >&5
21147   (eval $ac_try) 2>&5
21148   ac_status=$?
21149   echo "$as_me:21149: \$? = $ac_status" >&5
21150   (exit $ac_status); }; }; then
21151   cf_iostream_namespace=yes
21152 else
21153   echo "$as_me: failed program was:" >&5
21154 cat conftest.$ac_ext >&5
21155 cf_iostream_namespace=no
21156 fi
21157 rm -f conftest.$ac_objext conftest.$ac_ext
21158         echo "$as_me:21158: result: $cf_iostream_namespace" >&5
21159 echo "${ECHO_T}$cf_iostream_namespace" >&6
21160         if test "$cf_iostream_namespace" = yes ; then
21161
21162 cat >>confdefs.h <<\EOF
21163 #define IOSTREAM_NAMESPACE 1
21164 EOF
21165
21166         fi
21167 fi
21168
21169 echo "$as_me:21169: checking if we should include stdbool.h" >&5
21170 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21171
21172 if test "${cf_cv_header_stdbool_h+set}" = set; then
21173   echo $ECHO_N "(cached) $ECHO_C" >&6
21174 else
21175
21176         cat >conftest.$ac_ext <<_ACEOF
21177 #line 21177 "configure"
21178 #include "confdefs.h"
21179
21180 int
21181 main (void)
21182 {
21183 bool foo = false
21184   ;
21185   return 0;
21186 }
21187 _ACEOF
21188 rm -f conftest.$ac_objext
21189 if { (eval echo "$as_me:21189: \"$ac_compile\"") >&5
21190   (eval $ac_compile) 2>&5
21191   ac_status=$?
21192   echo "$as_me:21192: \$? = $ac_status" >&5
21193   (exit $ac_status); } &&
21194          { ac_try='test -s conftest.$ac_objext'
21195   { (eval echo "$as_me:21195: \"$ac_try\"") >&5
21196   (eval $ac_try) 2>&5
21197   ac_status=$?
21198   echo "$as_me:21198: \$? = $ac_status" >&5
21199   (exit $ac_status); }; }; then
21200   cf_cv_header_stdbool_h=0
21201 else
21202   echo "$as_me: failed program was:" >&5
21203 cat conftest.$ac_ext >&5
21204 cat >conftest.$ac_ext <<_ACEOF
21205 #line 21205 "configure"
21206 #include "confdefs.h"
21207
21208 #ifndef __BEOS__
21209 #include <stdbool.h>
21210 #endif
21211
21212 int
21213 main (void)
21214 {
21215 bool foo = false
21216   ;
21217   return 0;
21218 }
21219 _ACEOF
21220 rm -f conftest.$ac_objext
21221 if { (eval echo "$as_me:21221: \"$ac_compile\"") >&5
21222   (eval $ac_compile) 2>&5
21223   ac_status=$?
21224   echo "$as_me:21224: \$? = $ac_status" >&5
21225   (exit $ac_status); } &&
21226          { ac_try='test -s conftest.$ac_objext'
21227   { (eval echo "$as_me:21227: \"$ac_try\"") >&5
21228   (eval $ac_try) 2>&5
21229   ac_status=$?
21230   echo "$as_me:21230: \$? = $ac_status" >&5
21231   (exit $ac_status); }; }; then
21232   cf_cv_header_stdbool_h=1
21233 else
21234   echo "$as_me: failed program was:" >&5
21235 cat conftest.$ac_ext >&5
21236 cf_cv_header_stdbool_h=0
21237 fi
21238 rm -f conftest.$ac_objext conftest.$ac_ext
21239 fi
21240 rm -f conftest.$ac_objext conftest.$ac_ext
21241 fi
21242
21243 if test "$cf_cv_header_stdbool_h" = 1
21244 then    echo "$as_me:21244: result: yes" >&5
21245 echo "${ECHO_T}yes" >&6
21246 else    echo "$as_me:21246: result: no" >&5
21247 echo "${ECHO_T}no" >&6
21248 fi
21249
21250 echo "$as_me:21250: checking for builtin bool type" >&5
21251 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21252
21253 if test "${cf_cv_builtin_bool+set}" = set; then
21254   echo $ECHO_N "(cached) $ECHO_C" >&6
21255 else
21256
21257         cat >conftest.$ac_ext <<_ACEOF
21258 #line 21258 "configure"
21259 #include "confdefs.h"
21260
21261 #include <stdio.h>
21262 #include <sys/types.h>
21263
21264 int
21265 main (void)
21266 {
21267 bool x = false
21268   ;
21269   return 0;
21270 }
21271 _ACEOF
21272 rm -f conftest.$ac_objext
21273 if { (eval echo "$as_me:21273: \"$ac_compile\"") >&5
21274   (eval $ac_compile) 2>&5
21275   ac_status=$?
21276   echo "$as_me:21276: \$? = $ac_status" >&5
21277   (exit $ac_status); } &&
21278          { ac_try='test -s conftest.$ac_objext'
21279   { (eval echo "$as_me:21279: \"$ac_try\"") >&5
21280   (eval $ac_try) 2>&5
21281   ac_status=$?
21282   echo "$as_me:21282: \$? = $ac_status" >&5
21283   (exit $ac_status); }; }; then
21284   cf_cv_builtin_bool=1
21285 else
21286   echo "$as_me: failed program was:" >&5
21287 cat conftest.$ac_ext >&5
21288 cf_cv_builtin_bool=0
21289 fi
21290 rm -f conftest.$ac_objext conftest.$ac_ext
21291
21292 fi
21293
21294 if test "$cf_cv_builtin_bool" = 1
21295 then    echo "$as_me:21295: result: yes" >&5
21296 echo "${ECHO_T}yes" >&6
21297 else    echo "$as_me:21297: result: no" >&5
21298 echo "${ECHO_T}no" >&6
21299 fi
21300
21301 echo "$as_me:21301: checking for size of bool" >&5
21302 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21303 if test "${cf_cv_type_of_bool+set}" = set; then
21304   echo $ECHO_N "(cached) $ECHO_C" >&6
21305 else
21306
21307         rm -f cf_test.out
21308         if test "$cross_compiling" = yes; then
21309   cf_cv_type_of_bool=unknown
21310 else
21311   cat >conftest.$ac_ext <<_ACEOF
21312 #line 21312 "configure"
21313 #include "confdefs.h"
21314
21315 #include <stdlib.h>
21316 #include <stdio.h>
21317
21318 #if defined(__cplusplus)
21319
21320 #ifdef HAVE_GXX_BUILTIN_H
21321 #include <g++/builtin.h>
21322 #elif HAVE_GPP_BUILTIN_H
21323 #include <gpp/builtin.h>
21324 #elif HAVE_BUILTIN_H
21325 #include <builtin.h>
21326 #endif
21327
21328 #else
21329
21330 #if $cf_cv_header_stdbool_h
21331 #include <stdbool.h>
21332 #endif
21333
21334 #endif
21335
21336 int main(void)
21337 {
21338         FILE *fp = fopen("cf_test.out", "w");
21339         if (fp != 0) {
21340                 bool x = true;
21341                 if ((bool)(-x) >= 0)
21342                         fputs("unsigned ", fp);
21343                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21344                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21345                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21346                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21347                 fclose(fp);
21348         }
21349         ${cf_cv_main_return:-return}(0);
21350 }
21351
21352 _ACEOF
21353 rm -f conftest$ac_exeext
21354 if { (eval echo "$as_me:21354: \"$ac_link\"") >&5
21355   (eval $ac_link) 2>&5
21356   ac_status=$?
21357   echo "$as_me:21357: \$? = $ac_status" >&5
21358   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21359   { (eval echo "$as_me:21359: \"$ac_try\"") >&5
21360   (eval $ac_try) 2>&5
21361   ac_status=$?
21362   echo "$as_me:21362: \$? = $ac_status" >&5
21363   (exit $ac_status); }; }; then
21364   cf_cv_type_of_bool=`cat cf_test.out`
21365                  if test -z "$cf_cv_type_of_bool"; then
21366                    cf_cv_type_of_bool=unknown
21367                  fi
21368 else
21369   echo "$as_me: program exited with status $ac_status" >&5
21370 echo "$as_me: failed program was:" >&5
21371 cat conftest.$ac_ext >&5
21372 cf_cv_type_of_bool=unknown
21373 fi
21374 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21375 fi
21376
21377 fi
21378
21379         rm -f cf_test.out
21380 echo "$as_me:21380: result: $cf_cv_type_of_bool" >&5
21381 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21382 if test "$cf_cv_type_of_bool" = unknown ; then
21383         case .$NCURSES_BOOL in
21384         (.auto|.) NCURSES_BOOL=unsigned;;
21385         esac
21386         { echo "$as_me:21386: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21387 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21388         cf_cv_type_of_bool=$NCURSES_BOOL
21389 fi
21390
21391 echo "$as_me:21391: checking for special defines needed for etip.h" >&5
21392 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21393 cf_save_CXXFLAGS="$CXXFLAGS"
21394 cf_result="none"
21395
21396 # etip.h includes ncurses.h which includes ncurses_dll.h
21397 # But ncurses_dll.h is generated - fix here.
21398 test -d include || mkdir include
21399 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
21400
21401 for cf_math in "" MATH_H
21402 do
21403 for cf_excp in "" MATH_EXCEPTION
21404 do
21405         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21406         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21407         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21408 cat >conftest.$ac_ext <<_ACEOF
21409 #line 21409 "configure"
21410 #include "confdefs.h"
21411
21412 #include <etip.h.in>
21413
21414 int
21415 main (void)
21416 {
21417
21418   ;
21419   return 0;
21420 }
21421 _ACEOF
21422 rm -f conftest.$ac_objext
21423 if { (eval echo "$as_me:21423: \"$ac_compile\"") >&5
21424   (eval $ac_compile) 2>&5
21425   ac_status=$?
21426   echo "$as_me:21426: \$? = $ac_status" >&5
21427   (exit $ac_status); } &&
21428          { ac_try='test -s conftest.$ac_objext'
21429   { (eval echo "$as_me:21429: \"$ac_try\"") >&5
21430   (eval $ac_try) 2>&5
21431   ac_status=$?
21432   echo "$as_me:21432: \$? = $ac_status" >&5
21433   (exit $ac_status); }; }; then
21434
21435         test -n "$cf_math" && cat >>confdefs.h <<EOF
21436 #define ETIP_NEEDS_${cf_math} 1
21437 EOF
21438
21439         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21440 #define ETIP_NEEDS_${cf_excp} 1
21441 EOF
21442
21443         cf_result="$cf_math $cf_excp"
21444         break 2
21445
21446 else
21447   echo "$as_me: failed program was:" >&5
21448 cat conftest.$ac_ext >&5
21449 fi
21450 rm -f conftest.$ac_objext conftest.$ac_ext
21451 done
21452 done
21453 echo "$as_me:21453: result: $cf_result" >&5
21454 echo "${ECHO_T}$cf_result" >&6
21455 CXXFLAGS="$cf_save_CXXFLAGS"
21456
21457 if test -n "$CXX"; then
21458 echo "$as_me:21458: checking if $CXX accepts parameter initialization" >&5
21459 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21460 if test "${cf_cv_cpp_param_init+set}" = set; then
21461   echo $ECHO_N "(cached) $ECHO_C" >&6
21462 else
21463
21464         ac_ext=cc
21465 ac_cpp='$CXXCPP $CPPFLAGS'
21466 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21467 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21468 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21469 ac_main_return=return
21470
21471         if test "$cross_compiling" = yes; then
21472   cf_cv_cpp_param_init=unknown
21473 else
21474   cat >conftest.$ac_ext <<_ACEOF
21475 #line 21475 "configure"
21476 #include "confdefs.h"
21477
21478 class TEST {
21479 private:
21480         int value;
21481 public:
21482         TEST(int x = 1);
21483         ~TEST();
21484 };
21485
21486 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21487 {
21488         value = x;
21489 }
21490 int main(void) { }
21491
21492 _ACEOF
21493 rm -f conftest$ac_exeext
21494 if { (eval echo "$as_me:21494: \"$ac_link\"") >&5
21495   (eval $ac_link) 2>&5
21496   ac_status=$?
21497   echo "$as_me:21497: \$? = $ac_status" >&5
21498   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21499   { (eval echo "$as_me:21499: \"$ac_try\"") >&5
21500   (eval $ac_try) 2>&5
21501   ac_status=$?
21502   echo "$as_me:21502: \$? = $ac_status" >&5
21503   (exit $ac_status); }; }; then
21504   cf_cv_cpp_param_init=yes
21505 else
21506   echo "$as_me: program exited with status $ac_status" >&5
21507 echo "$as_me: failed program was:" >&5
21508 cat conftest.$ac_ext >&5
21509 cf_cv_cpp_param_init=no
21510 fi
21511 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21512 fi
21513         ac_ext=cc
21514 ac_cpp='$CXXCPP $CPPFLAGS'
21515 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21516 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21517 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21518 ac_main_return=return
21519
21520 fi
21521 echo "$as_me:21521: result: $cf_cv_cpp_param_init" >&5
21522 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21523 fi
21524 test "$cf_cv_cpp_param_init" = yes &&
21525 cat >>confdefs.h <<\EOF
21526 #define CPP_HAS_PARAM_INIT 1
21527 EOF
21528
21529 if test -n "$CXX"; then
21530
21531 echo "$as_me:21531: checking if $CXX accepts static_cast" >&5
21532 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21533 if test "${cf_cv_cpp_static_cast+set}" = set; then
21534   echo $ECHO_N "(cached) $ECHO_C" >&6
21535 else
21536
21537         ac_ext=cc
21538 ac_cpp='$CXXCPP $CPPFLAGS'
21539 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21540 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21541 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21542 ac_main_return=return
21543
21544         cat >conftest.$ac_ext <<_ACEOF
21545 #line 21545 "configure"
21546 #include "confdefs.h"
21547
21548 class NCursesPanel
21549 {
21550 public:
21551   NCursesPanel(int nlines,
21552                int ncols,
21553                int begin_y = 0,
21554                int begin_x = 0)
21555   {
21556   }
21557   NCursesPanel();
21558   ~NCursesPanel();
21559 };
21560
21561 template<class T> class NCursesUserPanel : public NCursesPanel
21562 {
21563 public:
21564   NCursesUserPanel (int nlines,
21565                     int ncols,
21566                     int begin_y = 0,
21567                     int begin_x = 0,
21568                     const T* p_UserData = static_cast<T*>(0))
21569     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21570   {
21571   };
21572   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21573   {
21574   };
21575
21576   virtual ~NCursesUserPanel() {};
21577 };
21578
21579 int
21580 main (void)
21581 {
21582
21583         const char* p_UserData = static_cast<char*>(0)
21584   ;
21585   return 0;
21586 }
21587 _ACEOF
21588 rm -f conftest.$ac_objext
21589 if { (eval echo "$as_me:21589: \"$ac_compile\"") >&5
21590   (eval $ac_compile) 2>&5
21591   ac_status=$?
21592   echo "$as_me:21592: \$? = $ac_status" >&5
21593   (exit $ac_status); } &&
21594          { ac_try='test -s conftest.$ac_objext'
21595   { (eval echo "$as_me:21595: \"$ac_try\"") >&5
21596   (eval $ac_try) 2>&5
21597   ac_status=$?
21598   echo "$as_me:21598: \$? = $ac_status" >&5
21599   (exit $ac_status); }; }; then
21600   cf_cv_cpp_static_cast=yes
21601 else
21602   echo "$as_me: failed program was:" >&5
21603 cat conftest.$ac_ext >&5
21604 cf_cv_cpp_static_cast=no
21605 fi
21606 rm -f conftest.$ac_objext conftest.$ac_ext
21607
21608         ac_ext=cc
21609 ac_cpp='$CXXCPP $CPPFLAGS'
21610 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21611 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21612 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21613 ac_main_return=return
21614
21615 fi
21616 echo "$as_me:21616: result: $cf_cv_cpp_static_cast" >&5
21617 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21618
21619 fi
21620
21621 test "$cf_cv_cpp_static_cast" = yes &&
21622 cat >>confdefs.h <<\EOF
21623 #define CPP_HAS_STATIC_CAST 1
21624 EOF
21625
21626         CXX_AR='$(AR)'
21627         CXX_ARFLAGS='$(ARFLAGS)'
21628         case $cf_cv_system_name in
21629         (irix*)
21630             if test "$GXX" != yes ; then
21631                 CXX_AR='$(CXX)'
21632                 CXX_ARFLAGS='-ar -o'
21633             fi
21634             ;;
21635         (sco3.2v5*)
21636             CXXLDFLAGS="-u main"
21637             ;;
21638         (solaris2*)
21639             if test "$GXX" != yes ; then
21640                 CXX_AR='$(CXX)'
21641                 CXX_ARFLAGS='-xar -o'
21642             fi
21643             ;;
21644         esac
21645
21646 else
21647         cf_cxx_library=no
21648         cf_cv_builtin_bool=1
21649
21650         # Just because we are not configuring against C++ right now does not
21651         # mean that a user will not want to use C++.  Some distributors disable
21652         # the C++ portion of this configuration as a shortcut (or just to avoid
21653         # compiling the demo in the c++ directory).  So we need a reasonable
21654         # default for the 'bool' type.
21655         #
21656         # Caveat: since the storage of the bool type is not standardized, it
21657         # may change.
21658
21659         if test "$NCURSES_BOOL" != auto ; then
21660                 cf_cv_type_of_bool=$NCURSES_BOOL
21661                 cf_cv_header_stdbool_h=0
21662         else
21663                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21664
21665 echo "$as_me:21665: checking for size of bool" >&5
21666 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21667 if test "${cf_cv_type_of_bool+set}" = set; then
21668   echo $ECHO_N "(cached) $ECHO_C" >&6
21669 else
21670
21671         rm -f cf_test.out
21672         if test "$cross_compiling" = yes; then
21673   cf_cv_type_of_bool=unknown
21674 else
21675   cat >conftest.$ac_ext <<_ACEOF
21676 #line 21676 "configure"
21677 #include "confdefs.h"
21678
21679 #include <stdlib.h>
21680 #include <stdio.h>
21681
21682 #if defined(__cplusplus)
21683
21684 #ifdef HAVE_GXX_BUILTIN_H
21685 #include <g++/builtin.h>
21686 #elif HAVE_GPP_BUILTIN_H
21687 #include <gpp/builtin.h>
21688 #elif HAVE_BUILTIN_H
21689 #include <builtin.h>
21690 #endif
21691
21692 #else
21693
21694 #if $cf_cv_header_stdbool_h
21695 #include <stdbool.h>
21696 #endif
21697
21698 #endif
21699
21700 int main(void)
21701 {
21702         FILE *fp = fopen("cf_test.out", "w");
21703         if (fp != 0) {
21704                 bool x = true;
21705                 if ((bool)(-x) >= 0)
21706                         fputs("unsigned ", fp);
21707                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21708                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21709                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21710                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21711                 fclose(fp);
21712         }
21713         ${cf_cv_main_return:-return}(0);
21714 }
21715
21716 _ACEOF
21717 rm -f conftest$ac_exeext
21718 if { (eval echo "$as_me:21718: \"$ac_link\"") >&5
21719   (eval $ac_link) 2>&5
21720   ac_status=$?
21721   echo "$as_me:21721: \$? = $ac_status" >&5
21722   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21723   { (eval echo "$as_me:21723: \"$ac_try\"") >&5
21724   (eval $ac_try) 2>&5
21725   ac_status=$?
21726   echo "$as_me:21726: \$? = $ac_status" >&5
21727   (exit $ac_status); }; }; then
21728   cf_cv_type_of_bool=`cat cf_test.out`
21729                  if test -z "$cf_cv_type_of_bool"; then
21730                    cf_cv_type_of_bool=unknown
21731                  fi
21732 else
21733   echo "$as_me: program exited with status $ac_status" >&5
21734 echo "$as_me: failed program was:" >&5
21735 cat conftest.$ac_ext >&5
21736 cf_cv_type_of_bool=unknown
21737 fi
21738 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21739 fi
21740
21741 fi
21742
21743         rm -f cf_test.out
21744 echo "$as_me:21744: result: $cf_cv_type_of_bool" >&5
21745 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21746 if test "$cf_cv_type_of_bool" = unknown ; then
21747         case .$NCURSES_BOOL in
21748         (.auto|.) NCURSES_BOOL=unsigned;;
21749         esac
21750         { echo "$as_me:21750: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21751 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21752         cf_cv_type_of_bool=$NCURSES_BOOL
21753 fi
21754
21755                 else
21756                         echo "$as_me:21756: checking for fallback type of bool" >&5
21757 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21758                         case "$host_cpu" in
21759                         (i?86)  cf_cv_type_of_bool=char ;;
21760                         (*)     cf_cv_type_of_bool=int  ;;
21761                         esac
21762                         echo "$as_me:21762: result: $cf_cv_type_of_bool" >&5
21763 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21764                 fi
21765         fi
21766 fi
21767
21768 # If the C compiler did not declare bool, and we did not determine that the C++
21769 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21770 # ncurses library use the same type as C++ bool.  Note that this allows one to
21771 # specify the type of bool in a configure-script option and postpone
21772 # integration with the C++ compiler provided that the types are compatible.
21773 USE_CXX_BOOL=1
21774 if test $cf_cv_cc_bool_type = 1
21775 then
21776         # oops: C has a bool.  Unlikely, but C++ could differ.
21777         USE_CXX_BOOL=0
21778 elif test $cf_cv_builtin_bool = 0
21779 then
21780         # C++ has no bool
21781         USE_CXX_BOOL=0
21782 else
21783         # this is the normal case
21784         USE_CXX_BOOL='defined(__cplusplus)'
21785 fi
21786
21787 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21788
21789         if test "$cf_with_ada" != "no" ; then
21790                 if test "$with_libtool" != "no"; then
21791                         { echo "$as_me:21791: WARNING: libtool does not support Ada - disabling feature" >&5
21792 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21793                         cf_with_ada=no
21794                 fi
21795         fi
21796
21797         if test "$cf_with_ada" != "no" ; then
21798
21799 cf_ada_make=gnatmake
21800 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21801 set dummy $cf_ada_make; ac_word=$2
21802 echo "$as_me:21802: checking for $ac_word" >&5
21803 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21804 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21805   echo $ECHO_N "(cached) $ECHO_C" >&6
21806 else
21807   if test -n "$gnat_exists"; then
21808   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21809 else
21810   ac_save_IFS=$IFS; IFS=$ac_path_separator
21811 ac_dummy="$PATH"
21812 for ac_dir in $ac_dummy; do
21813   IFS=$ac_save_IFS
21814   test -z "$ac_dir" && ac_dir=.
21815   $as_executable_p "$ac_dir/$ac_word" || continue
21816 ac_cv_prog_gnat_exists="yes"
21817 echo "$as_me:21817: found $ac_dir/$ac_word" >&5
21818 break
21819 done
21820
21821   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21822 fi
21823 fi
21824 gnat_exists=$ac_cv_prog_gnat_exists
21825 if test -n "$gnat_exists"; then
21826   echo "$as_me:21826: result: $gnat_exists" >&5
21827 echo "${ECHO_T}$gnat_exists" >&6
21828 else
21829   echo "$as_me:21829: result: no" >&5
21830 echo "${ECHO_T}no" >&6
21831 fi
21832
21833 if test "$ac_cv_prog_gnat_exists" = no; then
21834         cf_ada_make=
21835         cf_cv_prog_gnat_correct=no
21836 else
21837
21838 echo "$as_me:21838: checking for gnat version" >&5
21839 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21840 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21841         grep '[0-9].[0-9][0-9]*' |\
21842         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21843 echo "$as_me:21843: result: $cf_gnat_version" >&5
21844 echo "${ECHO_T}$cf_gnat_version" >&6
21845
21846 case $cf_gnat_version in
21847 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21848         cf_cv_prog_gnat_correct=yes
21849         ;;
21850 (*)
21851         { echo "$as_me:21851: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21852 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21853         cf_cv_prog_gnat_correct=no
21854         ;;
21855 esac
21856
21857         # Extract the first word of "m4", so it can be a program name with args.
21858 set dummy m4; ac_word=$2
21859 echo "$as_me:21859: checking for $ac_word" >&5
21860 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21861 if test "${ac_cv_prog_M4_exists+set}" = set; then
21862   echo $ECHO_N "(cached) $ECHO_C" >&6
21863 else
21864   if test -n "$M4_exists"; then
21865   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21866 else
21867   ac_save_IFS=$IFS; IFS=$ac_path_separator
21868 ac_dummy="$PATH"
21869 for ac_dir in $ac_dummy; do
21870   IFS=$ac_save_IFS
21871   test -z "$ac_dir" && ac_dir=.
21872   $as_executable_p "$ac_dir/$ac_word" || continue
21873 ac_cv_prog_M4_exists="yes"
21874 echo "$as_me:21874: found $ac_dir/$ac_word" >&5
21875 break
21876 done
21877
21878   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21879 fi
21880 fi
21881 M4_exists=$ac_cv_prog_M4_exists
21882 if test -n "$M4_exists"; then
21883   echo "$as_me:21883: result: $M4_exists" >&5
21884 echo "${ECHO_T}$M4_exists" >&6
21885 else
21886   echo "$as_me:21886: result: no" >&5
21887 echo "${ECHO_T}no" >&6
21888 fi
21889
21890         if test "$ac_cv_prog_M4_exists" = no; then
21891                 cf_cv_prog_gnat_correct=no
21892                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21893         fi
21894         if test "$cf_cv_prog_gnat_correct" = yes; then
21895                 echo "$as_me:21895: checking if GNAT works" >&5
21896 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21897
21898 rm -rf conftest* *~conftest*
21899 cat >>conftest.ads <<CF_EOF
21900 procedure conftest;
21901 CF_EOF
21902 cat >>conftest.adb <<CF_EOF
21903 with Text_IO;
21904 with GNAT.OS_Lib;
21905 procedure conftest is
21906 begin
21907    Text_IO.Put ("Hello World");
21908    Text_IO.New_Line;
21909    GNAT.OS_Lib.OS_Exit (0);
21910 end conftest;
21911 CF_EOF
21912 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21913    if ( ./conftest 1>&5 2>&1 ) ; then
21914       cf_cv_prog_gnat_correct=yes
21915    else
21916       cf_cv_prog_gnat_correct=no
21917    fi
21918 else
21919    cf_cv_prog_gnat_correct=no
21920 fi
21921 rm -rf conftest* *~conftest*
21922
21923                 echo "$as_me:21923: result: $cf_cv_prog_gnat_correct" >&5
21924 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21925         fi
21926 fi
21927
21928                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21929
21930         ADAFLAGS="$ADAFLAGS -gnatpn"
21931
21932         echo "$as_me:21932: checking optimization options for ADAFLAGS" >&5
21933 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21934         case "$CFLAGS" in
21935         (*-g*)
21936
21937         ADAFLAGS="$ADAFLAGS -g"
21938
21939                 ;;
21940         esac
21941         case "$CFLAGS" in
21942         (*-O*)
21943                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21944
21945         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21946
21947                 ;;
21948         esac
21949         echo "$as_me:21949: result: $ADAFLAGS" >&5
21950 echo "${ECHO_T}$ADAFLAGS" >&6
21951
21952 echo "$as_me:21952: checking if GNATPREP supports -T option" >&5
21953 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21954 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21955   echo $ECHO_N "(cached) $ECHO_C" >&6
21956 else
21957
21958 cf_cv_gnatprep_opt_t=no
21959 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21960
21961 fi
21962 echo "$as_me:21962: result: $cf_cv_gnatprep_opt_t" >&5
21963 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21964 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21965
21966 echo "$as_me:21966: checking if GNAT supports generics" >&5
21967 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21968 case $cf_gnat_version in
21969 (3.[1-9]*|[4-9].*)
21970         cf_gnat_generics=yes
21971         ;;
21972 (*)
21973         cf_gnat_generics=no
21974         ;;
21975 esac
21976 echo "$as_me:21976: result: $cf_gnat_generics" >&5
21977 echo "${ECHO_T}$cf_gnat_generics" >&6
21978
21979 if test "$cf_gnat_generics" = yes
21980 then
21981         cf_compile_generics=generics
21982         cf_generic_objects="\${GENOBJS}"
21983 else
21984         cf_compile_generics=
21985         cf_generic_objects=
21986 fi
21987
21988 echo "$as_me:21988: checking if GNAT supports SIGINT" >&5
21989 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21990 if test "${cf_cv_gnat_sigint+set}" = set; then
21991   echo $ECHO_N "(cached) $ECHO_C" >&6
21992 else
21993
21994 rm -rf conftest* *~conftest*
21995 cat >>conftest.ads <<CF_EOF
21996 with Ada.Interrupts.Names;
21997
21998 package ConfTest is
21999
22000    pragma Warnings (Off);  --  the next pragma exists since 3.11p
22001    pragma Unreserve_All_Interrupts;
22002    pragma Warnings (On);
22003
22004    protected Process is
22005       procedure Stop;
22006       function Continue return Boolean;
22007       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
22008    private
22009       Done : Boolean := False;
22010    end Process;
22011
22012 end ConfTest;
22013 CF_EOF
22014 cat >>conftest.adb <<CF_EOF
22015 package body ConfTest is
22016    protected body Process is
22017       procedure Stop is
22018       begin
22019          Done := True;
22020       end Stop;
22021       function Continue return Boolean is
22022       begin
22023          return not Done;
22024       end Continue;
22025    end Process;
22026 end ConfTest;
22027 CF_EOF
22028 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22029       cf_cv_gnat_sigint=yes
22030 else
22031    cf_cv_gnat_sigint=no
22032 fi
22033 rm -rf conftest* *~conftest*
22034
22035 fi
22036 echo "$as_me:22036: result: $cf_cv_gnat_sigint" >&5
22037 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
22038
22039 if test $cf_cv_gnat_sigint = yes ; then
22040         USE_GNAT_SIGINT=""
22041 else
22042         USE_GNAT_SIGINT="#"
22043 fi
22044
22045 cf_gnat_libraries=no
22046 cf_gnat_projects=no
22047
22048 if test "$enable_gnat_projects" != no ; then
22049 echo "$as_me:22049: checking if GNAT supports project files" >&5
22050 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
22051 case $cf_gnat_version in
22052 (3.[0-9]*)
22053         ;;
22054 (*)
22055         case $cf_cv_system_name in
22056         (cygwin*|msys*)
22057                 ;;
22058         (*)
22059                 mkdir conftest.src conftest.bin conftest.lib
22060                 cd conftest.src
22061                 rm -rf conftest* *~conftest*
22062                 cat >>library.gpr <<CF_EOF
22063 project Library is
22064   Kind := External ("LIB_KIND");
22065   for Library_Name use "ConfTest";
22066   for Object_Dir use ".";
22067   for Library_ALI_Dir use External("LIBRARY_DIR");
22068   for Library_Version use External ("SONAME");
22069   for Library_Kind use Kind;
22070   for Library_Dir use External("BUILD_DIR");
22071   Source_Dir := External ("SOURCE_DIR");
22072   for Source_Dirs use (Source_Dir);
22073 end Library;
22074 CF_EOF
22075                 cat >>confpackage.ads <<CF_EOF
22076 package ConfPackage is
22077    procedure conftest;
22078 end ConfPackage;
22079 CF_EOF
22080                 cat >>confpackage.adb <<CF_EOF
22081 with Text_IO;
22082 package body ConfPackage is
22083    procedure conftest is
22084    begin
22085       Text_IO.Put ("Hello World");
22086       Text_IO.New_Line;
22087    end conftest;
22088 end ConfPackage;
22089 CF_EOF
22090                 if ( $cf_ada_make $ADAFLAGS \
22091                                 -Plibrary.gpr \
22092                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22093                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22094                                 -XSOURCE_DIR=`pwd` \
22095                                 -XSONAME=libConfTest.so.1 \
22096                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
22097                         cf_gnat_projects=yes
22098                 fi
22099                 cd ..
22100                 if test -f conftest.lib/confpackage.ali
22101                 then
22102                         cf_gnat_libraries=yes
22103                 fi
22104                 rm -rf conftest* *~conftest*
22105                 ;;
22106         esac
22107         ;;
22108 esac
22109 echo "$as_me:22109: result: $cf_gnat_projects" >&5
22110 echo "${ECHO_T}$cf_gnat_projects" >&6
22111 fi # enable_gnat_projects
22112
22113 if test $cf_gnat_projects = yes
22114 then
22115         echo "$as_me:22115: checking if GNAT supports libraries" >&5
22116 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22117         echo "$as_me:22117: result: $cf_gnat_libraries" >&5
22118 echo "${ECHO_T}$cf_gnat_libraries" >&6
22119 fi
22120
22121 if test "$cf_gnat_projects" = yes
22122 then
22123         USE_OLD_MAKERULES="#"
22124         USE_GNAT_PROJECTS=""
22125 else
22126         USE_OLD_MAKERULES=""
22127         USE_GNAT_PROJECTS="#"
22128 fi
22129
22130 if test "$cf_gnat_libraries" = yes
22131 then
22132         USE_GNAT_LIBRARIES=""
22133 else
22134         USE_GNAT_LIBRARIES="#"
22135 fi
22136
22137 echo "$as_me:22137: checking for ada-compiler" >&5
22138 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22139
22140 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22141 if test "${with_ada_compiler+set}" = set; then
22142   withval="$with_ada_compiler"
22143   cf_ada_compiler=$withval
22144 else
22145   cf_ada_compiler=gnatmake
22146 fi;
22147
22148 echo "$as_me:22148: result: $cf_ada_compiler" >&5
22149 echo "${ECHO_T}$cf_ada_compiler" >&6
22150
22151                         cf_ada_package=terminal_interface
22152
22153 echo "$as_me:22153: checking for ada-include" >&5
22154 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22155
22156 # Check whether --with-ada-include or --without-ada-include was given.
22157 if test "${with_ada_include+set}" = set; then
22158   withval="$with_ada_include"
22159
22160 else
22161   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22162 fi; if test -n "$prefix/share/ada/adainclude" ; then
22163
22164 if test "x$prefix" != xNONE; then
22165         cf_path_syntax="$prefix"
22166 else
22167         cf_path_syntax="$ac_default_prefix"
22168 fi
22169
22170 case ".$withval" in
22171 (.\$\(*\)*|.\'*\'*)
22172         ;;
22173 (..|./*|.\\*)
22174         ;;
22175 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22176         ;;
22177 (.\${*prefix}*|.\${*dir}*)
22178         eval withval="$withval"
22179         case ".$withval" in
22180         (.NONE/*)
22181                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22182                 ;;
22183         esac
22184         ;;
22185 (.no|.NONE/*)
22186         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22187         ;;
22188 (*)
22189         { { echo "$as_me:22189: error: expected a pathname, not \"$withval\"" >&5
22190 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22191    { (exit 1); exit 1; }; }
22192         ;;
22193 esac
22194
22195 fi
22196 eval ADA_INCLUDE="$withval"
22197
22198 echo "$as_me:22198: result: $ADA_INCLUDE" >&5
22199 echo "${ECHO_T}$ADA_INCLUDE" >&6
22200
22201 echo "$as_me:22201: checking for ada-objects" >&5
22202 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22203
22204 # Check whether --with-ada-objects or --without-ada-objects was given.
22205 if test "${with_ada_objects+set}" = set; then
22206   withval="$with_ada_objects"
22207
22208 else
22209   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22210 fi; if test -n "$prefix/lib/ada/adalib" ; then
22211
22212 if test "x$prefix" != xNONE; then
22213         cf_path_syntax="$prefix"
22214 else
22215         cf_path_syntax="$ac_default_prefix"
22216 fi
22217
22218 case ".$withval" in
22219 (.\$\(*\)*|.\'*\'*)
22220         ;;
22221 (..|./*|.\\*)
22222         ;;
22223 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22224         ;;
22225 (.\${*prefix}*|.\${*dir}*)
22226         eval withval="$withval"
22227         case ".$withval" in
22228         (.NONE/*)
22229                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22230                 ;;
22231         esac
22232         ;;
22233 (.no|.NONE/*)
22234         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22235         ;;
22236 (*)
22237         { { echo "$as_me:22237: error: expected a pathname, not \"$withval\"" >&5
22238 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22239    { (exit 1); exit 1; }; }
22240         ;;
22241 esac
22242
22243 fi
22244 eval ADA_OBJECTS="$withval"
22245
22246 echo "$as_me:22246: result: $ADA_OBJECTS" >&5
22247 echo "${ECHO_T}$ADA_OBJECTS" >&6
22248
22249 echo "$as_me:22249: checking if an Ada95 shared-library should be built" >&5
22250 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22251
22252 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22253 if test "${with_ada_sharedlib+set}" = set; then
22254   withval="$with_ada_sharedlib"
22255   with_ada_sharedlib=$withval
22256 else
22257   with_ada_sharedlib=no
22258 fi;
22259 echo "$as_me:22259: result: $with_ada_sharedlib" >&5
22260 echo "${ECHO_T}$with_ada_sharedlib" >&6
22261
22262 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22263 MAKE_ADA_SHAREDLIB="#"
22264
22265 if test "x$with_ada_sharedlib" != xno
22266 then
22267         MAKE_ADA_SHAREDLIB=
22268         if test "x$with_ada_sharedlib" != xyes
22269         then
22270                 ADA_SHAREDLIB="$with_ada_sharedlib"
22271         fi
22272 fi
22273
22274                 fi
22275         fi
22276 else
22277         cf_with_ada=no
22278 fi
22279
22280 # do this "late" to avoid conflict with header-checks
22281 if test "x$with_widec" = xyes ; then
22282         echo "$as_me:22282: checking for wchar_t" >&5
22283 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22284 if test "${ac_cv_type_wchar_t+set}" = set; then
22285   echo $ECHO_N "(cached) $ECHO_C" >&6
22286 else
22287   cat >conftest.$ac_ext <<_ACEOF
22288 #line 22288 "configure"
22289 #include "confdefs.h"
22290 $ac_includes_default
22291 int
22292 main (void)
22293 {
22294 if ((wchar_t *) 0)
22295   return 0;
22296 if (sizeof (wchar_t))
22297   return 0;
22298   ;
22299   return 0;
22300 }
22301 _ACEOF
22302 rm -f conftest.$ac_objext
22303 if { (eval echo "$as_me:22303: \"$ac_compile\"") >&5
22304   (eval $ac_compile) 2>&5
22305   ac_status=$?
22306   echo "$as_me:22306: \$? = $ac_status" >&5
22307   (exit $ac_status); } &&
22308          { ac_try='test -s conftest.$ac_objext'
22309   { (eval echo "$as_me:22309: \"$ac_try\"") >&5
22310   (eval $ac_try) 2>&5
22311   ac_status=$?
22312   echo "$as_me:22312: \$? = $ac_status" >&5
22313   (exit $ac_status); }; }; then
22314   ac_cv_type_wchar_t=yes
22315 else
22316   echo "$as_me: failed program was:" >&5
22317 cat conftest.$ac_ext >&5
22318 ac_cv_type_wchar_t=no
22319 fi
22320 rm -f conftest.$ac_objext conftest.$ac_ext
22321 fi
22322 echo "$as_me:22322: result: $ac_cv_type_wchar_t" >&5
22323 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22324
22325 echo "$as_me:22325: checking size of wchar_t" >&5
22326 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22327 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22328   echo $ECHO_N "(cached) $ECHO_C" >&6
22329 else
22330   if test "$ac_cv_type_wchar_t" = yes; then
22331   if test "$cross_compiling" = yes; then
22332   # Depending upon the size, compute the lo and hi bounds.
22333 cat >conftest.$ac_ext <<_ACEOF
22334 #line 22334 "configure"
22335 #include "confdefs.h"
22336 $ac_includes_default
22337 int
22338 main (void)
22339 {
22340 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22341   ;
22342   return 0;
22343 }
22344 _ACEOF
22345 rm -f conftest.$ac_objext
22346 if { (eval echo "$as_me:22346: \"$ac_compile\"") >&5
22347   (eval $ac_compile) 2>&5
22348   ac_status=$?
22349   echo "$as_me:22349: \$? = $ac_status" >&5
22350   (exit $ac_status); } &&
22351          { ac_try='test -s conftest.$ac_objext'
22352   { (eval echo "$as_me:22352: \"$ac_try\"") >&5
22353   (eval $ac_try) 2>&5
22354   ac_status=$?
22355   echo "$as_me:22355: \$? = $ac_status" >&5
22356   (exit $ac_status); }; }; then
22357   ac_lo=0 ac_mid=0
22358   while :; do
22359     cat >conftest.$ac_ext <<_ACEOF
22360 #line 22360 "configure"
22361 #include "confdefs.h"
22362 $ac_includes_default
22363 int
22364 main (void)
22365 {
22366 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22367   ;
22368   return 0;
22369 }
22370 _ACEOF
22371 rm -f conftest.$ac_objext
22372 if { (eval echo "$as_me:22372: \"$ac_compile\"") >&5
22373   (eval $ac_compile) 2>&5
22374   ac_status=$?
22375   echo "$as_me:22375: \$? = $ac_status" >&5
22376   (exit $ac_status); } &&
22377          { ac_try='test -s conftest.$ac_objext'
22378   { (eval echo "$as_me:22378: \"$ac_try\"") >&5
22379   (eval $ac_try) 2>&5
22380   ac_status=$?
22381   echo "$as_me:22381: \$? = $ac_status" >&5
22382   (exit $ac_status); }; }; then
22383   ac_hi=$ac_mid; break
22384 else
22385   echo "$as_me: failed program was:" >&5
22386 cat conftest.$ac_ext >&5
22387 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22388 fi
22389 rm -f conftest.$ac_objext conftest.$ac_ext
22390   done
22391 else
22392   echo "$as_me: failed program was:" >&5
22393 cat conftest.$ac_ext >&5
22394 ac_hi=-1 ac_mid=-1
22395   while :; do
22396     cat >conftest.$ac_ext <<_ACEOF
22397 #line 22397 "configure"
22398 #include "confdefs.h"
22399 $ac_includes_default
22400 int
22401 main (void)
22402 {
22403 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22404   ;
22405   return 0;
22406 }
22407 _ACEOF
22408 rm -f conftest.$ac_objext
22409 if { (eval echo "$as_me:22409: \"$ac_compile\"") >&5
22410   (eval $ac_compile) 2>&5
22411   ac_status=$?
22412   echo "$as_me:22412: \$? = $ac_status" >&5
22413   (exit $ac_status); } &&
22414          { ac_try='test -s conftest.$ac_objext'
22415   { (eval echo "$as_me:22415: \"$ac_try\"") >&5
22416   (eval $ac_try) 2>&5
22417   ac_status=$?
22418   echo "$as_me:22418: \$? = $ac_status" >&5
22419   (exit $ac_status); }; }; then
22420   ac_lo=$ac_mid; break
22421 else
22422   echo "$as_me: failed program was:" >&5
22423 cat conftest.$ac_ext >&5
22424 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22425 fi
22426 rm -f conftest.$ac_objext conftest.$ac_ext
22427   done
22428 fi
22429 rm -f conftest.$ac_objext conftest.$ac_ext
22430 # Binary search between lo and hi bounds.
22431 while test "x$ac_lo" != "x$ac_hi"; do
22432   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22433   cat >conftest.$ac_ext <<_ACEOF
22434 #line 22434 "configure"
22435 #include "confdefs.h"
22436 $ac_includes_default
22437 int
22438 main (void)
22439 {
22440 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22441   ;
22442   return 0;
22443 }
22444 _ACEOF
22445 rm -f conftest.$ac_objext
22446 if { (eval echo "$as_me:22446: \"$ac_compile\"") >&5
22447   (eval $ac_compile) 2>&5
22448   ac_status=$?
22449   echo "$as_me:22449: \$? = $ac_status" >&5
22450   (exit $ac_status); } &&
22451          { ac_try='test -s conftest.$ac_objext'
22452   { (eval echo "$as_me:22452: \"$ac_try\"") >&5
22453   (eval $ac_try) 2>&5
22454   ac_status=$?
22455   echo "$as_me:22455: \$? = $ac_status" >&5
22456   (exit $ac_status); }; }; then
22457   ac_hi=$ac_mid
22458 else
22459   echo "$as_me: failed program was:" >&5
22460 cat conftest.$ac_ext >&5
22461 ac_lo=`expr $ac_mid + 1`
22462 fi
22463 rm -f conftest.$ac_objext conftest.$ac_ext
22464 done
22465 ac_cv_sizeof_wchar_t=$ac_lo
22466 else
22467   if test "$cross_compiling" = yes; then
22468   { { echo "$as_me:22468: error: cannot run test program while cross compiling" >&5
22469 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22470    { (exit 1); exit 1; }; }
22471 else
22472   cat >conftest.$ac_ext <<_ACEOF
22473 #line 22473 "configure"
22474 #include "confdefs.h"
22475 $ac_includes_default
22476 int
22477 main (void)
22478 {
22479 FILE *f = fopen ("conftest.val", "w");
22480 if (!f)
22481   $ac_main_return (1);
22482 fprintf (f, "%d", (sizeof (wchar_t)));
22483 fclose (f);
22484   ;
22485   return 0;
22486 }
22487 _ACEOF
22488 rm -f conftest$ac_exeext
22489 if { (eval echo "$as_me:22489: \"$ac_link\"") >&5
22490   (eval $ac_link) 2>&5
22491   ac_status=$?
22492   echo "$as_me:22492: \$? = $ac_status" >&5
22493   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22494   { (eval echo "$as_me:22494: \"$ac_try\"") >&5
22495   (eval $ac_try) 2>&5
22496   ac_status=$?
22497   echo "$as_me:22497: \$? = $ac_status" >&5
22498   (exit $ac_status); }; }; then
22499   ac_cv_sizeof_wchar_t=`cat conftest.val`
22500 else
22501   echo "$as_me: program exited with status $ac_status" >&5
22502 echo "$as_me: failed program was:" >&5
22503 cat conftest.$ac_ext >&5
22504 fi
22505 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22506 fi
22507 fi
22508 rm -f conftest.val
22509 else
22510   ac_cv_sizeof_wchar_t=0
22511 fi
22512 fi
22513 echo "$as_me:22513: result: $ac_cv_sizeof_wchar_t" >&5
22514 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22515 cat >>confdefs.h <<EOF
22516 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22517 EOF
22518
22519 fi
22520
22521 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22522 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22523 ###
22524 ### ticlib modules may be a separate library, otherwise contained in termlib.
22525 ### termlib modules may be a separate library, otherwise contained in ncurses.
22526 ###
22527 ### The of "+" or " " between the tokens controls the way the script
22528 ### chooses to split module lists into libraries.
22529 ###
22530 ### (see CF_LIB_RULES).
22531 echo "$as_me:22531: checking for library subsets" >&5
22532 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22533 LIB_SUBSETS=
22534
22535 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22536         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22537         if test "$with_ticlib" != no ; then
22538                 LIB_SUBSETS="${LIB_SUBSETS} "
22539         else
22540                 LIB_SUBSETS="${LIB_SUBSETS}+"
22541         fi
22542 fi
22543
22544 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22545 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22546
22547 if test "$with_termlib" != no ; then
22548         LIB_SUBSETS="${LIB_SUBSETS} "
22549 else
22550         LIB_SUBSETS="${LIB_SUBSETS}+"
22551 fi
22552
22553 LIB_SUBSETS="${LIB_SUBSETS}base"
22554
22555 # Most term-driver calls are to tinfo, but some like init_pair are to the
22556 # base library (so it resides in base).
22557 if test "$with_term_driver" != no ; then
22558         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22559         case $cf_cv_system_name in
22560         (*mingw32*|*mingw64*)
22561                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22562                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22563                 ;;
22564         (*)
22565                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22566                 ;;
22567         esac
22568 fi
22569
22570 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22571 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22572
22573 echo "$as_me:22573: result: $LIB_SUBSETS" >&5
22574 echo "${ECHO_T}$LIB_SUBSETS" >&6
22575
22576 ### Construct the list of include-directories to be generated
22577
22578 if test "$srcdir" != "."; then
22579         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22580 fi
22581 CPPFLAGS="-I../include $CPPFLAGS"
22582 if test "$srcdir" != "."; then
22583         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22584 fi
22585 CPPFLAGS="-I. $CPPFLAGS"
22586
22587 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22588 if test "$srcdir" != "."; then
22589         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22590 fi
22591 if test "$GCC" != yes; then
22592         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22593 elif test "$includedir" != "/usr/include"; then
22594         if test "$includedir" = '${prefix}/include' ; then
22595                 if test x$prefix != x/usr ; then
22596                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22597                 fi
22598         else
22599                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22600         fi
22601 fi
22602
22603 ### Build up pieces for makefile rules
22604 echo "$as_me:22604: checking default library suffix" >&5
22605 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22606
22607         case $DFT_LWR_MODEL in
22608         (libtool) DFT_ARG_SUFFIX=''   ;;
22609         (normal)  DFT_ARG_SUFFIX=''   ;;
22610         (debug)   DFT_ARG_SUFFIX='_g' ;;
22611         (profile) DFT_ARG_SUFFIX='_p' ;;
22612         (shared)  DFT_ARG_SUFFIX=''   ;;
22613         esac
22614         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22615 echo "$as_me:22615: result: $DFT_ARG_SUFFIX" >&5
22616 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22617
22618 echo "$as_me:22618: checking default library-dependency suffix" >&5
22619 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22620
22621         case X$DFT_LWR_MODEL in
22622         (Xlibtool)
22623                 DFT_LIB_SUFFIX='.la'
22624                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22625                 ;;
22626         (Xdebug)
22627                 DFT_LIB_SUFFIX='_g.a'
22628                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22629                 ;;
22630         (Xprofile)
22631                 DFT_LIB_SUFFIX='_p.a'
22632                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22633                 ;;
22634         (Xshared)
22635                 case $cf_cv_system_name in
22636                 (aix[5-7]*)
22637                         DFT_LIB_SUFFIX='.so'
22638                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22639                         ;;
22640                 (cygwin*|msys*|mingw*)
22641                         DFT_LIB_SUFFIX='.dll'
22642                         DFT_DEP_SUFFIX='.dll.a'
22643                         ;;
22644                 (darwin*)
22645                         DFT_LIB_SUFFIX='.dylib'
22646                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22647                         ;;
22648                 (hpux*)
22649                         case $target in
22650                         (ia64*)
22651                                 DFT_LIB_SUFFIX='.so'
22652                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22653                                 ;;
22654                         (*)
22655                                 DFT_LIB_SUFFIX='.sl'
22656                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22657                                 ;;
22658                         esac
22659                         ;;
22660                 (*)
22661                         DFT_LIB_SUFFIX='.so'
22662                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22663                         ;;
22664                 esac
22665                 ;;
22666         (*)
22667                 DFT_LIB_SUFFIX='.a'
22668                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22669                 ;;
22670         esac
22671         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22672         then
22673                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22674                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22675         fi
22676 echo "$as_me:22676: result: $DFT_DEP_SUFFIX" >&5
22677 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22678
22679 echo "$as_me:22679: checking default object directory" >&5
22680 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22681
22682         case $DFT_LWR_MODEL in
22683         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22684         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22685         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22686         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22687         (shared)
22688                 case $cf_cv_system_name in
22689                 (cygwin|msys)
22690                         DFT_OBJ_SUBDIR='objects' ;;
22691                 (*)
22692                         DFT_OBJ_SUBDIR='obj_s' ;;
22693                 esac
22694         esac
22695 echo "$as_me:22695: result: $DFT_OBJ_SUBDIR" >&5
22696 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22697
22698 if test "x$cf_with_cxx" = xyes ; then
22699 echo "$as_me:22699: checking c++ library-dependency suffix" >&5
22700 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22701 if test "$with_libtool" != "no"; then
22702         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22703         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22704 elif test "$with_shared_cxx" != "no"; then
22705         # also for g++ users...
22706         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22707 else
22708         # we normally make a static library because C/C++ library rules differ
22709
22710         case Xnormal in
22711         (Xlibtool)
22712                 CXX_LIB_SUFFIX='.la'
22713                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22714                 ;;
22715         (Xdebug)
22716                 CXX_LIB_SUFFIX='_g.a'
22717                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22718                 ;;
22719         (Xprofile)
22720                 CXX_LIB_SUFFIX='_p.a'
22721                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22722                 ;;
22723         (Xshared)
22724                 case $cf_cv_system_name in
22725                 (aix[5-7]*)
22726                         CXX_LIB_SUFFIX='.so'
22727                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22728                         ;;
22729                 (cygwin*|msys*|mingw*)
22730                         CXX_LIB_SUFFIX='.dll'
22731                         CXX_DEP_SUFFIX='.dll.a'
22732                         ;;
22733                 (darwin*)
22734                         CXX_LIB_SUFFIX='.dylib'
22735                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22736                         ;;
22737                 (hpux*)
22738                         case $target in
22739                         (ia64*)
22740                                 CXX_LIB_SUFFIX='.so'
22741                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22742                                 ;;
22743                         (*)
22744                                 CXX_LIB_SUFFIX='.sl'
22745                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22746                                 ;;
22747                         esac
22748                         ;;
22749                 (*)
22750                         CXX_LIB_SUFFIX='.so'
22751                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22752                         ;;
22753                 esac
22754                 ;;
22755         (*)
22756                 CXX_LIB_SUFFIX='.a'
22757                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22758                 ;;
22759         esac
22760         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22761         then
22762                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22763                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22764         fi
22765
22766 fi
22767 echo "$as_me:22767: result: $CXX_LIB_SUFFIX" >&5
22768 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22769
22770 fi
22771
22772 # do not want -ldl in build except as needed for -lncurses dependency
22773 if test "x$with_dlsym" = xyes ; then
22774 if test $DFT_LWR_MODEL = shared || \
22775    test $DFT_LWR_MODEL = libtool ; then
22776
22777 # remove dl library from $LIBS
22778 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22779
22780 fi
22781 fi
22782 ### Set up low-level terminfo dependencies for makefiles.
22783
22784 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22785 # do not need libdl
22786 TICS_LIST=
22787 if test "x$with_dlsym" = xyes ; then
22788
22789 # remove dl library from $SHLIB_LIST
22790 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22791
22792 fi
22793
22794 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22795 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22796 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22797 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22798 then
22799         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22800 fi
22801
22802 if test "$with_ticlib" != no ; then
22803
22804         if test "x$with_ticlib" != xyes ; then
22805                 TICS_NAME=$with_ticlib
22806                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22807                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22808                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22809                 TICS_LIB_SUFFIX="${with_ticlib}"
22810         else
22811                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22812                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22813                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22814                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22815         fi
22816         TICS_LDFLAGS="-L${LIB_DIR}"
22817         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22818 else
22819         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22820         TICS_LDFLAGS="-L${LIB_DIR}"
22821         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22822 fi
22823
22824 if test "$with_termlib" != no ; then
22825
22826         if test "x$with_termlib" != xyes ; then
22827                 TINFO_NAME=$with_termlib
22828                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22829                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22830                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22831                 TINFO_LIB_SUFFIX="${with_termlib}"
22832         else
22833                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22834                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22835                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22836                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22837         fi
22838
22839         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22840         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22841         if test "$DFT_LWR_MODEL" = "libtool"; then
22842                 TEST_ARGS="${TEST_DEPS}"
22843                 TEST_ARG2="${TEST_DEP2}"
22844                 TINFO_LDFLAGS="-L${LIB_DIR}"
22845                 TINFO_LIBS="$TEST_ARGS"
22846                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22847                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22848         else
22849                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22850                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22851                 if test "x$with_term_driver" != xno ; then
22852                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22853                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22854                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22855                 else
22856                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22857                         TINFO_LIBS="$TEST_ARGS"
22858                 fi
22859                 TINFO_LDFLAGS="-L${LIB_DIR}"
22860                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22861         fi
22862 else
22863         # the next lines are needed for linking libtic over libncurses
22864         TINFO_NAME=${LIB_NAME}
22865         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22866         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22867         if test "x$with_tic_depends" = xyes ; then
22868                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22869         else
22870                 TICS_LIST="$SHLIB_LIST"
22871         fi
22872
22873         TINFO_LDFLAGS="-L${LIB_DIR}"
22874         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22875 fi
22876
22877 if test "$DFT_LWR_MODEL" = shared ; then
22878         case $cf_cv_system_name in
22879         (cygwin*|msys*)
22880                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22881                 TINFO_SUFFIX=.dll
22882                 ;;
22883         esac
22884 fi
22885
22886 if test "x$with_dlsym" = xyes ; then
22887
22888 # remove dl library from $TICS_LIST
22889 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22890
22891 fi
22892
22893 if test "$DFT_LWR_MODEL" = "libtool"; then
22894         OBJEXT=lo
22895 fi
22896
22897 # needed for Ada95
22898 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22899
22900 case $DFT_LWR_MODEL in
22901 (normal|debug|profile)
22902
22903 if test "$GCC" = yes ; then
22904         case $cf_cv_system_name in
22905         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22906                 LDFLAGS_STATIC=
22907                 LDFLAGS_SHARED=
22908                 ;;
22909         (*)     # normally, except when broken
22910                 LDFLAGS_STATIC=-static
22911                 LDFLAGS_SHARED=-dynamic
22912                 ;;
22913         esac
22914 else
22915         case $cf_cv_system_name in
22916         (aix[4-7]*)     # from ld manpage
22917                 LDFLAGS_STATIC=-bstatic
22918                 LDFLAGS_SHARED=-bdynamic
22919                 ;;
22920         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22921                 # We could also use just "archive" and "shared".
22922                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22923                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22924                 ;;
22925         (irix*)         # from ld manpage IRIX64
22926                 LDFLAGS_STATIC=-Bstatic
22927                 LDFLAGS_SHARED=-Bdynamic
22928                 ;;
22929         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22930                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22931                 LDFLAGS_STATIC=-noso
22932                 LDFLAGS_SHARED=-so_archive
22933                 ;;
22934         (solaris2*)
22935                 LDFLAGS_STATIC=-Bstatic
22936                 LDFLAGS_SHARED=-Bdynamic
22937                 ;;
22938         esac
22939 fi
22940
22941 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22942 then
22943         echo "$as_me:22943: checking if linker supports switching between static/dynamic" >&5
22944 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22945
22946         rm -f libconftest.a
22947         cat >conftest.$ac_ext <<EOF
22948 #line 22948 "configure"
22949 #include <stdio.h>
22950 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22951 EOF
22952         if { (eval echo "$as_me:22952: \"$ac_compile\"") >&5
22953   (eval $ac_compile) 2>&5
22954   ac_status=$?
22955   echo "$as_me:22955: \$? = $ac_status" >&5
22956   (exit $ac_status); } ; then
22957                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22958                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22959         fi
22960         rm -f conftest.*
22961
22962         cf_save_LIBS="$LIBS"
22963
22964         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22965         cat >conftest.$ac_ext <<_ACEOF
22966 #line 22966 "configure"
22967 #include "confdefs.h"
22968
22969 #line 22969 "configure"
22970 #include <stdio.h>
22971 int cf_ldflags_static(FILE *fp);
22972
22973 int
22974 main (void)
22975 {
22976
22977         return cf_ldflags_static(stdin);
22978
22979   ;
22980   return 0;
22981 }
22982 _ACEOF
22983 rm -f conftest.$ac_objext conftest$ac_exeext
22984 if { (eval echo "$as_me:22984: \"$ac_link\"") >&5
22985   (eval $ac_link) 2>&5
22986   ac_status=$?
22987   echo "$as_me:22987: \$? = $ac_status" >&5
22988   (exit $ac_status); } &&
22989          { ac_try='test -s conftest$ac_exeext'
22990   { (eval echo "$as_me:22990: \"$ac_try\"") >&5
22991   (eval $ac_try) 2>&5
22992   ac_status=$?
22993   echo "$as_me:22993: \$? = $ac_status" >&5
22994   (exit $ac_status); }; }; then
22995
22996         # some linkers simply ignore the -dynamic
22997         case x`file conftest$ac_exeext 2>/dev/null` in
22998         (*static*)
22999                 cf_ldflags_static=no
23000                 ;;
23001         (*)
23002                 cf_ldflags_static=yes
23003                 ;;
23004         esac
23005
23006 else
23007   echo "$as_me: failed program was:" >&5
23008 cat conftest.$ac_ext >&5
23009 cf_ldflags_static=no
23010 fi
23011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23012
23013         rm -f libconftest.*
23014         LIBS="$cf_save_LIBS"
23015
23016         echo "$as_me:23016: result: $cf_ldflags_static" >&5
23017 echo "${ECHO_T}$cf_ldflags_static" >&6
23018
23019         if test $cf_ldflags_static != yes
23020         then
23021                 LDFLAGS_STATIC=
23022                 LDFLAGS_SHARED=
23023         fi
23024 else
23025         LDFLAGS_STATIC=
23026         LDFLAGS_SHARED=
23027 fi
23028
23029         ;;
23030 esac
23031
23032 echo "$as_me:23032: checking where we will install curses.h" >&5
23033 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
23034
23035 includesubdir=
23036 if test "$with_overwrite" = no && \
23037  ( test "x$includedir" = 'x${prefix}/include' || \
23038    test "x$includedir" = "x${prefix}/include" )
23039 then
23040         includesubdir="/ncurses${USE_LIB_SUFFIX}"
23041 fi
23042 echo "$as_me:23042: result: ${includedir}${includesubdir}" >&5
23043 echo "${ECHO_T}${includedir}${includesubdir}" >&6
23044
23045 ### Resolve a conflict between normal and wide-curses by forcing applications
23046 ### that will need libutf8 to add it to their configure script.
23047 if test "$with_overwrite" != no ; then
23048 if test "$NCURSES_LIBUTF8" = 1 ; then
23049         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
23050         { echo "$as_me:23050: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
23051 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
23052 fi
23053 fi
23054 WITH_OVERWRITE=$with_overwrite
23055
23056 # used to separate tack out of the tree
23057 NCURSES_TREE=
23058
23059 ### predefined stuff for the test programs
23060
23061 cat >>confdefs.h <<\EOF
23062 #define HAVE_SLK_COLOR 1
23063 EOF
23064
23065 ### Construct the list of subdirectories for which we'll customize makefiles
23066 ### with the appropriate compile-rules.
23067
23068 echo "$as_me:23068: checking for src modules" >&5
23069 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
23070
23071 # dependencies and linker-arguments for test-programs
23072 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
23073 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
23074 if test "$DFT_LWR_MODEL" = "libtool"; then
23075         TEST_ARGS="${TEST_DEPS}"
23076         TEST_ARG2="${TEST_DEP2}"
23077 else
23078         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23079         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
23080 fi
23081
23082 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
23083 cf_cv_src_modules=
23084 for cf_dir in $modules_to_build
23085 do
23086         if test -f $srcdir/$cf_dir/modules; then
23087
23088                 # We may/may not have tack in the distribution, though the
23089                 # makefile is.
23090                 if test $cf_dir = tack ; then
23091                         if test "x$cf_with_tack" != "xyes"; then
23092                                 continue
23093                         fi
23094                 fi
23095
23096                 if test -z "$cf_cv_src_modules"; then
23097                         cf_cv_src_modules=$cf_dir
23098                 else
23099                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23100                 fi
23101
23102                 # Make the ncurses_cfg.h file record the library interface files as
23103                 # well.  These are header files that are the same name as their
23104                 # directory.  Ncurses is the only library that does not follow
23105                 # that pattern.
23106                 if test $cf_dir = tack ; then
23107                         continue
23108                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23109
23110 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23111
23112                         cat >>confdefs.h <<EOF
23113 #define HAVE_${cf_have_include}_H 1
23114 EOF
23115
23116                         cat >>confdefs.h <<EOF
23117 #define HAVE_LIB${cf_have_include} 1
23118 EOF
23119
23120                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23121                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23122                         if test "$DFT_LWR_MODEL" = "libtool"; then
23123                                 TEST_ARGS="${TEST_DEPS}"
23124                                 TEST_ARG2="${TEST_DEP2}"
23125                         else
23126                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23127                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23128                         fi
23129                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23130                 fi
23131         fi
23132 done
23133 echo "$as_me:23133: result: $cf_cv_src_modules" >&5
23134 echo "${ECHO_T}$cf_cv_src_modules" >&6
23135
23136 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23137 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23138
23139 SRC_SUBDIRS=
23140 if test "x$cf_with_manpages" != xno ; then
23141         SRC_SUBDIRS="$SRC_SUBDIRS man"
23142 fi
23143 SRC_SUBDIRS="$SRC_SUBDIRS include"
23144 for cf_dir in $cf_cv_src_modules
23145 do
23146         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23147 done
23148 if test "x$cf_with_tests" != "xno" ; then
23149         SRC_SUBDIRS="$SRC_SUBDIRS test"
23150 fi
23151 # always make this, to install the ncurses-config script
23152 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23153 if test "$cf_with_cxx_binding" != no; then
23154         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23155         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23156 fi
23157
23158 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23159 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23160
23161 ADA_SUBDIRS=
23162 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23163         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23164         ADA_SUBDIRS="gen src"
23165         if test "x$cf_with_tests" != "xno" ; then
23166                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23167         fi
23168 fi
23169
23170 SUB_MAKEFILES=
23171 for cf_dir in $SRC_SUBDIRS
23172 do
23173         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23174 done
23175
23176 if test -n "$ADA_SUBDIRS"; then
23177         for cf_dir in $ADA_SUBDIRS
23178         do
23179                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23180         done
23181
23182 fi
23183
23184 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23185    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23186    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23187 fi
23188
23189 DIRS_TO_MAKE="lib"
23190 for cf_item in $cf_list_models
23191 do
23192
23193         case $cf_item in
23194         (libtool) cf_subdir='obj_lo'  ;;
23195         (normal)  cf_subdir='objects' ;;
23196         (debug)   cf_subdir='obj_g' ;;
23197         (profile) cf_subdir='obj_p' ;;
23198         (shared)
23199                 case $cf_cv_system_name in
23200                 (cygwin|msys)
23201                         cf_subdir='objects' ;;
23202                 (*)
23203                         cf_subdir='obj_s' ;;
23204                 esac
23205         esac
23206
23207         for cf_item2 in $DIRS_TO_MAKE
23208         do
23209                 test $cf_item2 = $cf_subdir && break
23210         done
23211         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23212 done
23213 for cf_dir in $DIRS_TO_MAKE
23214 do
23215         test ! -d $cf_dir && mkdir $cf_dir
23216 done
23217
23218 # symbols that differ when compiling Ada95 by itself.
23219 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23220
23221 # values to use as strings
23222
23223 cat >>confdefs.h <<EOF
23224 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23225 EOF
23226
23227 cat >>confdefs.h <<EOF
23228 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23229 EOF
23230
23231 ### Now that we're done running tests, add the compiler-warnings, if any
23232
23233 cf_fix_cppflags=no
23234 cf_new_cflags=
23235 cf_new_cppflags=
23236 cf_new_extra_cppflags=
23237
23238 for cf_add_cflags in $EXTRA_CFLAGS
23239 do
23240 case $cf_fix_cppflags in
23241 (no)
23242         case $cf_add_cflags in
23243         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23244                 case $cf_add_cflags in
23245                 (-D*)
23246                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23247
23248                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23249                                 && test -z "${cf_tst_cflags}" \
23250                                 && cf_fix_cppflags=yes
23251
23252                         if test $cf_fix_cppflags = yes ; then
23253
23254         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23255         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23256
23257                                 continue
23258                         elif test "${cf_tst_cflags}" = "\"'" ; then
23259
23260         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23261         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23262
23263                                 continue
23264                         fi
23265                         ;;
23266                 esac
23267                 case "$CPPFLAGS" in
23268                 (*$cf_add_cflags)
23269                         ;;
23270                 (*)
23271                         case $cf_add_cflags in
23272                         (-D*)
23273                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23274
23275 CPPFLAGS=`echo "$CPPFLAGS" | \
23276         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23277                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23278
23279                                 ;;
23280                         esac
23281
23282         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23283         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23284
23285                         ;;
23286                 esac
23287                 ;;
23288         (*)
23289
23290         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23291         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23292
23293                 ;;
23294         esac
23295         ;;
23296 (yes)
23297
23298         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23299         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23300
23301         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23302
23303         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23304                 && test -z "${cf_tst_cflags}" \
23305                 && cf_fix_cppflags=no
23306         ;;
23307 esac
23308 done
23309
23310 if test -n "$cf_new_cflags" ; then
23311
23312         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23313         CFLAGS="${CFLAGS}$cf_new_cflags"
23314
23315 fi
23316
23317 if test -n "$cf_new_cppflags" ; then
23318
23319         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23320         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23321
23322 fi
23323
23324 if test -n "$cf_new_extra_cppflags" ; then
23325
23326         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23327         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23328
23329 fi
23330
23331 ### Define substitutions for header files to avoid name-pollution
23332
23333 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23334         HAVE_TCGETATTR=1
23335 else
23336         HAVE_TCGETATTR=0
23337 fi
23338
23339 if test "x$ac_cv_header_stdint_h" = xyes ; then
23340         HAVE_STDINT_H=1
23341 else
23342         HAVE_STDINT_H=0
23343 fi
23344
23345 if test "x$ac_cv_header_termio_h" = xyes ; then
23346         HAVE_TERMIO_H=1
23347 else
23348         HAVE_TERMIO_H=0
23349 fi
23350
23351 if test "x$ac_cv_header_termios_h" = xyes ; then
23352         HAVE_TERMIOS_H=1
23353 else
23354         HAVE_TERMIOS_H=0
23355 fi
23356
23357 ################################################################################
23358 test "x$use_database" = xyes && \
23359 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23360
23361 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23362 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23363
23364 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23365 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23366 fi
23367
23368 # Extract the first word of "tic", so it can be a program name with args.
23369 set dummy tic; ac_word=$2
23370 echo "$as_me:23370: checking for $ac_word" >&5
23371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23372 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23373   echo $ECHO_N "(cached) $ECHO_C" >&6
23374 else
23375   case $TIC_PATH in
23376   [\\/]* | ?:[\\/]*)
23377   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23378   ;;
23379   *)
23380   ac_save_IFS=$IFS; IFS=$ac_path_separator
23381 ac_dummy="$PATH:/usr/local/ncurses/bin"
23382 for ac_dir in $ac_dummy; do
23383   IFS=$ac_save_IFS
23384   test -z "$ac_dir" && ac_dir=.
23385   if $as_executable_p "$ac_dir/$ac_word"; then
23386    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23387    echo "$as_me:23387: found $ac_dir/$ac_word" >&5
23388    break
23389 fi
23390 done
23391
23392   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23393   ;;
23394 esac
23395 fi
23396 TIC_PATH=$ac_cv_path_TIC_PATH
23397
23398 if test -n "$TIC_PATH"; then
23399   echo "$as_me:23399: result: $TIC_PATH" >&5
23400 echo "${ECHO_T}$TIC_PATH" >&6
23401 else
23402   echo "$as_me:23402: result: no" >&5
23403 echo "${ECHO_T}no" >&6
23404 fi
23405
23406 if test -n "$FALLBACK_LIST"
23407 then
23408         if test "$TIC_PATH" = unknown
23409         then
23410                 { echo "$as_me:23410: WARNING: no tic program found for fallbacks" >&5
23411 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23412         fi
23413 fi
23414
23415 if test "x$cf_with_tests" != xno ; then
23416         MAKE_TESTS=
23417 else
23418         MAKE_TESTS="#"
23419 fi
23420
23421 ADAHTML_DIR=../../doc/html/ada
23422
23423 # these could be configurable, but are not currently
23424 PANEL_NAME=panel
23425 MENU_NAME=menu
23426 FORM_NAME=form
23427 CXX_NAME=ncurses++
23428
23429 # workaround for OS/2 (20151017)
23430 case $cf_cv_system_name in
23431 (os2*)
23432         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23433         ;;
23434 (*)
23435         LIBTOOL_OPTS_CXX=
23436         ;;
23437 esac
23438
23439 # workaround for g++ versus Solaris (20131116)
23440 case $cf_cv_system_name in
23441 (solaris2*)
23442         case "x$CPPFLAGS" in
23443         (*-D_XOPEN_SOURCE_EXTENDED*)
23444                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23445
23446 echo "${as_me:-configure}:23446: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23447
23448                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23449                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23450                 ;;
23451         esac
23452         ;;
23453 esac
23454
23455 # Help to automatically enable the extended curses features when using either
23456 # the *-config or the ".pc" files by adding defines.
23457 echo "$as_me:23457: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23458 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23459 PKG_CFLAGS=
23460 for cf_loop1 in $CPPFLAGS_after_XOPEN
23461 do
23462         cf_found=no
23463         for cf_loop2 in $CPPFLAGS_before_XOPEN
23464         do
23465                 if test "x$cf_loop1" = "x$cf_loop2"
23466                 then
23467                         cf_found=yes
23468                         break
23469                 fi
23470         done
23471         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23472 done
23473 echo "$as_me:23473: result: $PKG_CFLAGS" >&5
23474 echo "${ECHO_T}$PKG_CFLAGS" >&6
23475
23476 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23477 case "x$NCURSES_OSPEED" in
23478 (*short*)
23479         cf_compatible=1
23480         ;;
23481 (*)
23482         cf_compatible=0
23483         ;;
23484 esac
23485
23486 cat >>confdefs.h <<EOF
23487 #define NCURSES_OSPEED_COMPAT $cf_compatible
23488 EOF
23489
23490 case "x$cf_cv_typeof_chtype" in
23491 (xshort|xint|xlong)
23492         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23493         ;;
23494 esac
23495
23496 case "x$cf_cv_typeof_mmask_t" in
23497 (xshort|xint|xlong)
23498         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23499         ;;
23500 esac
23501
23502 # substitute into misc/Makefile to suppress
23503 # (un)install.data from the
23504 # (un)install rules.
23505 if test "x$cf_with_db_install" = "xno"; then
23506         MISC_INSTALL_DATA=
23507         MISC_UNINSTALL_DATA=
23508 else
23509         MISC_INSTALL_DATA=install.data
23510         MISC_UNINSTALL_DATA=uninstall.data
23511 fi
23512
23513 SUB_SCRIPTS=
23514
23515 if test -n "$PACKAGE"
23516 then
23517         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23518         export PACKAGE
23519         echo "package: $PACKAGE"
23520 fi
23521
23522 UNALTERED_SYMS=
23523 cf_filter_syms=no
23524
23525 if test -n "$RESULTING_SYMS"
23526 then
23527         cf_filter_syms=$cf_dft_filter_syms
23528         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23529
23530 echo "${as_me:-configure}:23530: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23531
23532 fi
23533
23534 if test "x$WILDCARD_SYMS" = xno
23535 then
23536         cf_filter_syms=yes
23537 fi
23538
23539 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23540
23541 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23542 if test $cf_filter_syms = yes
23543 then
23544         RESULTING_SYMS=resulting.map
23545 fi
23546
23547 if test "x$cross_compiling" = xyes ; then
23548         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23549         CHECK_BUILD="#"
23550 else
23551         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23552         CHECK_BUILD=
23553 fi
23554
23555 cat >>confdefs.h <<\EOF
23556 #define HAVE_CURSES_DATA_BOOLNAMES 1
23557 EOF
23558
23559 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"
23560 ac_config_commands="$ac_config_commands default"
23561 cat >confcache <<\_ACEOF
23562 # This file is a shell script that caches the results of configure
23563 # tests run on this system so they can be shared between configure
23564 # scripts and configure runs, see configure's option --config-cache.
23565 # It is not useful on other systems.  If it contains results you don't
23566 # want to keep, you may remove or edit it.
23567 #
23568 # config.status only pays attention to the cache file if you give it
23569 # the --recheck option to rerun configure.
23570 #
23571 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23572 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23573 # following values.
23574
23575 _ACEOF
23576
23577 # The following way of writing the cache mishandles newlines in values,
23578 # but we know of no workaround that is simple, portable, and efficient.
23579 # So, don't put newlines in cache variables' values.
23580 # Ultrix sh set writes to stderr and can't be redirected directly,
23581 # and sets the high bit in the cache file unless we assign to the vars.
23582 {
23583   (set) 2>&1 |
23584     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23585     *ac_space=\ *)
23586       # `set' does not quote correctly, so add quotes (double-quote
23587       # substitution turns \\\\ into \\, and sed turns \\ into \).
23588       sed -n \
23589         "s/'/'\\\\''/g;
23590           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23591       ;;
23592     *)
23593       # `set' quotes correctly as required by POSIX, so do not add quotes.
23594       sed -n \
23595         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23596       ;;
23597     esac;
23598 } |
23599   sed '
23600      t clear
23601      : clear
23602      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23603      t end
23604      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23605      : end' >>confcache
23606 if cmp -s $cache_file confcache; then :; else
23607   if test -w $cache_file; then
23608     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23609     cat confcache >$cache_file
23610   else
23611     echo "not updating unwritable cache $cache_file"
23612   fi
23613 fi
23614 rm -f confcache
23615
23616 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23617 # Let make expand exec_prefix.
23618 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23619
23620 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23621 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23622 # trailing colons and then remove the whole line if VPATH becomes empty
23623 # (actually we leave an empty line to preserve line numbers).
23624 if test "x$srcdir" = x.; then
23625   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23626 s/:*\$(srcdir):*/:/;
23627 s/:*\${srcdir}:*/:/;
23628 s/:*@srcdir@:*/:/;
23629 s/^\([^=]*=[    ]*\):*/\1/;
23630 s/:*$//;
23631 s/^[^=]*=[      ]*$//;
23632 }'
23633 fi
23634
23635 DEFS=-DHAVE_CONFIG_H
23636
23637 : ${CONFIG_STATUS=./config.status}
23638 ac_clean_files_save=$ac_clean_files
23639 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23640 { echo "$as_me:23640: creating $CONFIG_STATUS" >&5
23641 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23642 cat >$CONFIG_STATUS <<_ACEOF
23643 #! $SHELL
23644 # Generated automatically by configure.
23645 # Run this file to recreate the current configuration.
23646 # Compiler output produced by configure, useful for debugging
23647 # configure, is in config.log if it exists.
23648
23649 debug=false
23650 SHELL=\${CONFIG_SHELL-$SHELL}
23651 ac_cs_invocation="\$0 \$@"
23652
23653 _ACEOF
23654
23655 cat >>$CONFIG_STATUS <<\_ACEOF
23656 # Be Bourne compatible
23657 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23658   emulate sh
23659   NULLCMD=:
23660 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23661   set -o posix
23662 fi
23663
23664 # Name of the executable.
23665 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23666
23667 if expr a : '\(a\)' >/dev/null 2>&1; then
23668   as_expr=expr
23669 else
23670   as_expr=false
23671 fi
23672
23673 rm -f conf$$ conf$$.exe conf$$.file
23674 echo >conf$$.file
23675 if ln -s conf$$.file conf$$ 2>/dev/null; then
23676   # We could just check for DJGPP; but this test a) works b) is more generic
23677   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23678   if test -f conf$$.exe; then
23679     # Don't use ln at all; we don't have any links
23680     as_ln_s='cp -p'
23681   else
23682     as_ln_s='ln -s'
23683   fi
23684 elif ln conf$$.file conf$$ 2>/dev/null; then
23685   as_ln_s=ln
23686 else
23687   as_ln_s='cp -p'
23688 fi
23689 rm -f conf$$ conf$$.exe conf$$.file
23690
23691 as_executable_p="test -f"
23692
23693 # Support unset when possible.
23694 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23695   as_unset=unset
23696 else
23697   as_unset=false
23698 fi
23699
23700 # NLS nuisances.
23701 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23702 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23703 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23704 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23705 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23706 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23707 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23708 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23709
23710 # IFS
23711 # We need space, tab and new line, in precisely that order.
23712 as_nl='
23713 '
23714 IFS="   $as_nl"
23715
23716 # CDPATH.
23717 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23718
23719 exec 6>&1
23720
23721 _ACEOF
23722
23723 # Files that config.status was made for.
23724 if test -n "$ac_config_files"; then
23725   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23726 fi
23727
23728 if test -n "$ac_config_headers"; then
23729   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23730 fi
23731
23732 if test -n "$ac_config_links"; then
23733   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23734 fi
23735
23736 if test -n "$ac_config_commands"; then
23737   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23738 fi
23739
23740 cat >>$CONFIG_STATUS <<\EOF
23741
23742 ac_cs_usage="\
23743 \`$as_me' instantiates files from templates according to the
23744 current configuration.
23745
23746 Usage: $0 [OPTIONS] [FILE]...
23747
23748   -h, --help       print this help, then exit
23749   -V, --version    print version number, then exit
23750   -d, --debug      don't remove temporary files
23751       --recheck    update $as_me by reconfiguring in the same conditions
23752   --file=FILE[:TEMPLATE]
23753                    instantiate the configuration file FILE
23754   --header=FILE[:TEMPLATE]
23755                    instantiate the configuration header FILE
23756
23757 Configuration files:
23758 $config_files
23759
23760 Configuration headers:
23761 $config_headers
23762
23763 Configuration commands:
23764 $config_commands
23765
23766 Report bugs to <dickey@invisible-island.net>."
23767 EOF
23768
23769 cat >>$CONFIG_STATUS <<EOF
23770 ac_cs_version="\\
23771 config.status
23772 configured by $0, generated by GNU Autoconf 2.52.20170501,
23773   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23774
23775 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23776 Free Software Foundation, Inc.
23777 This config.status script is free software; the Free Software Foundation
23778 gives unlimited permission to copy, distribute and modify it."
23779 srcdir=$srcdir
23780 INSTALL="$INSTALL"
23781 EOF
23782
23783 cat >>$CONFIG_STATUS <<\EOF
23784 # If no file are specified by the user, then we need to provide default
23785 # value.  By we need to know if files were specified by the user.
23786 ac_need_defaults=:
23787 while test $# != 0
23788 do
23789   case $1 in
23790   --*=*)
23791     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23792     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23793     shift
23794     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23795     shift
23796     ;;
23797   -*);;
23798   *) # This is not an option, so the user has probably given explicit
23799      # arguments.
23800      ac_need_defaults=false;;
23801   esac
23802
23803   case $1 in
23804   # Handling of the options.
23805 EOF
23806 cat >>$CONFIG_STATUS <<EOF
23807   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23808     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23809     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23810 EOF
23811 cat >>$CONFIG_STATUS <<\EOF
23812   --version | --vers* | -V )
23813     echo "$ac_cs_version"; exit 0 ;;
23814   --he | --h)
23815     # Conflict between --help and --header
23816     { { echo "$as_me:23816: error: ambiguous option: $1
23817 Try \`$0 --help' for more information." >&5
23818 echo "$as_me: error: ambiguous option: $1
23819 Try \`$0 --help' for more information." >&2;}
23820    { (exit 1); exit 1; }; };;
23821   --help | --hel | -h )
23822     echo "$ac_cs_usage"; exit 0 ;;
23823   --debug | --d* | -d )
23824     debug=: ;;
23825   --file | --fil | --fi | --f )
23826     shift
23827     CONFIG_FILES="$CONFIG_FILES $1"
23828     ac_need_defaults=false;;
23829   --header | --heade | --head | --hea )
23830     shift
23831     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23832     ac_need_defaults=false;;
23833
23834   # This is an error.
23835   -*) { { echo "$as_me:23835: error: unrecognized option: $1
23836 Try \`$0 --help' for more information." >&5
23837 echo "$as_me: error: unrecognized option: $1
23838 Try \`$0 --help' for more information." >&2;}
23839    { (exit 1); exit 1; }; } ;;
23840
23841   *) ac_config_targets="$ac_config_targets $1" ;;
23842
23843   esac
23844   shift
23845 done
23846
23847 exec 5>>config.log
23848 cat >&5 << _ACEOF
23849
23850 ## ----------------------- ##
23851 ## Running config.status.  ##
23852 ## ----------------------- ##
23853
23854 This file was extended by $as_me 2.52.20170501, executed with
23855   CONFIG_FILES    = $CONFIG_FILES
23856   CONFIG_HEADERS  = $CONFIG_HEADERS
23857   CONFIG_LINKS    = $CONFIG_LINKS
23858   CONFIG_COMMANDS = $CONFIG_COMMANDS
23859   > $ac_cs_invocation
23860 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23861
23862 _ACEOF
23863 EOF
23864
23865 cat >>$CONFIG_STATUS <<EOF
23866 #
23867 # INIT-COMMANDS section.
23868 #
23869
23870 ### Special initialization commands, used to pass information from the
23871 ### configuration-run into config.status
23872
23873 AWK="$AWK"
23874 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23875 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23876 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23877 ECHO_LD="$ECHO_LD"
23878 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23879 LDCONFIG="$LDCONFIG"
23880 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23881 LIB_NAME="$LIB_NAME"
23882 LIB_PREFIX="$LIB_PREFIX"
23883 LIB_SUBSETS="$LIB_SUBSETS"
23884 LIB_SUFFIX="$LIB_SUFFIX"
23885 LIB_TRACING="$LIB_TRACING"
23886 LN_S="$LN_S"
23887 MAKE_TERMINFO="$MAKE_TERMINFO"
23888 NCURSES_MAJOR="$NCURSES_MAJOR"
23889 NCURSES_MINOR="$NCURSES_MINOR"
23890 NCURSES_OSPEED="$NCURSES_OSPEED"
23891 NCURSES_PATCH="$NCURSES_PATCH"
23892 SRC_SUBDIRS="$SRC_SUBDIRS"
23893 TERMINFO="$TERMINFO"
23894 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23895 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23896 TICS_NAME="$TICS_NAME"
23897 TICS_SUFFIX="$TICS_SUFFIX"
23898 TIC_PATH="$TIC_PATH"
23899 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23900 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23901 TINFO_NAME="$TINFO_NAME"
23902 TINFO_SUFFIX="$TINFO_SUFFIX"
23903 UNALTERED_SYMS="$UNALTERED_SYMS"
23904 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23905 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23906 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23907 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23908 WILDCARD_SYMS="$WILDCARD_SYMS"
23909 WITH_CURSES_H="$with_curses_h"
23910 WITH_ECHO="${enable_echo:=yes}"
23911 WITH_OVERWRITE="$with_overwrite"
23912 cf_LIST_MODELS="$cf_list_models"
23913 cf_cv_abi_version="$cf_cv_abi_version"
23914 cf_cv_do_relink="$cf_cv_do_relink"
23915 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23916 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23917 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23918 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23919 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23920 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23921 cf_cv_rel_version="$cf_cv_rel_version"
23922 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23923 cf_cv_shared_soname='$cf_cv_shared_soname'
23924 cf_cv_shlib_version="$cf_cv_shlib_version"
23925 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23926 cf_cv_system_name="$cf_cv_system_name"
23927 cf_cv_term_driver="$with_term_driver"
23928 cf_with_ada="$cf_with_ada"
23929 cf_with_cxx_binding="$cf_with_cxx_binding"
23930 cf_with_db_install="$cf_with_db_install"
23931 cf_with_manpages="$cf_with_manpages"
23932 cf_with_tests="$cf_with_tests"
23933 host="$host"
23934 target="$target"
23935 with_shared_cxx="$with_shared_cxx"
23936
23937 EOF
23938
23939 cat >>$CONFIG_STATUS <<\EOF
23940 for ac_config_target in $ac_config_targets
23941 do
23942   case "$ac_config_target" in
23943   # Handling of arguments.
23944   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23945   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23946   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23947   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23948   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23949   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23950   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23951   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23952   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23953   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23954   *) { { echo "$as_me:23954: error: invalid argument: $ac_config_target" >&5
23955 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23956    { (exit 1); exit 1; }; };;
23957   esac
23958 done
23959
23960 # If the user did not use the arguments to specify the items to instantiate,
23961 # then the envvar interface is used.  Set only those that are not.
23962 # We use the long form for the default assignment because of an extremely
23963 # bizarre bug on SunOS 4.1.3.
23964 if $ac_need_defaults; then
23965   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23966   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23967   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23968 fi
23969
23970 # Create a temporary directory, and hook for its removal unless debugging.
23971 $debug ||
23972 {
23973   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23974   trap '{ (exit 1); exit 1; }' 1 2 13 15
23975 }
23976
23977 # Create a (secure) tmp directory for tmp files.
23978 : ${TMPDIR=/tmp}
23979 {
23980   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23981   test -n "$tmp" && test -d "$tmp"
23982 }  ||
23983 {
23984   tmp=$TMPDIR/cs$$-$RANDOM
23985   (umask 077 && mkdir $tmp)
23986 } ||
23987 {
23988    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23989    { (exit 1); exit 1; }
23990 }
23991
23992 EOF
23993
23994 cat >>$CONFIG_STATUS <<EOF
23995
23996 #
23997 # CONFIG_FILES section.
23998 #
23999
24000 # No need to generate the scripts if there are no CONFIG_FILES.
24001 # This happens for instance when ./config.status config.h
24002 if test -n "\$CONFIG_FILES"; then
24003   # Protect against being on the right side of a sed subst in config.status.
24004   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24005    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24006 s,@SHELL@,$SHELL,;t t
24007 s,@exec_prefix@,$exec_prefix,;t t
24008 s,@prefix@,$prefix,;t t
24009 s,@program_transform_name@,$program_transform_name,;t t
24010 s,@bindir@,$bindir,;t t
24011 s,@sbindir@,$sbindir,;t t
24012 s,@libexecdir@,$libexecdir,;t t
24013 s,@datarootdir@,$datarootdir,;t t
24014 s,@datadir@,$datadir,;t t
24015 s,@sysconfdir@,$sysconfdir,;t t
24016 s,@sharedstatedir@,$sharedstatedir,;t t
24017 s,@localstatedir@,$localstatedir,;t t
24018 s,@libdir@,$libdir,;t t
24019 s,@includedir@,$includedir,;t t
24020 s,@oldincludedir@,$oldincludedir,;t t
24021 s,@infodir@,$infodir,;t t
24022 s,@mandir@,$mandir,;t t
24023 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24024 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24025 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24026 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24027 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24028 s,@build_alias@,$build_alias,;t t
24029 s,@host_alias@,$host_alias,;t t
24030 s,@target_alias@,$target_alias,;t t
24031 s,@ECHO_C@,$ECHO_C,;t t
24032 s,@ECHO_N@,$ECHO_N,;t t
24033 s,@ECHO_T@,$ECHO_T,;t t
24034 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24035 s,@DEFS@,$DEFS,;t t
24036 s,@LIBS@,$LIBS,;t t
24037 s,@top_builddir@,$top_builddir,;t t
24038 s,@EGREP@,$EGREP,;t t
24039 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
24040 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
24041 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
24042 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24043 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24044 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
24045 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
24046 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
24047 s,@VERSION@,$VERSION,;t t
24048 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
24049 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
24050 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
24051 s,@PACKAGE@,$PACKAGE,;t t
24052 s,@build@,$build,;t t
24053 s,@build_cpu@,$build_cpu,;t t
24054 s,@build_vendor@,$build_vendor,;t t
24055 s,@build_os@,$build_os,;t t
24056 s,@host@,$host,;t t
24057 s,@host_cpu@,$host_cpu,;t t
24058 s,@host_vendor@,$host_vendor,;t t
24059 s,@host_os@,$host_os,;t t
24060 s,@target@,$target,;t t
24061 s,@target_cpu@,$target_cpu,;t t
24062 s,@target_vendor@,$target_vendor,;t t
24063 s,@target_os@,$target_os,;t t
24064 s,@CC@,$CC,;t t
24065 s,@CFLAGS@,$CFLAGS,;t t
24066 s,@LDFLAGS@,$LDFLAGS,;t t
24067 s,@CPPFLAGS@,$CPPFLAGS,;t t
24068 s,@ac_ct_CC@,$ac_ct_CC,;t t
24069 s,@EXEEXT@,$EXEEXT,;t t
24070 s,@OBJEXT@,$OBJEXT,;t t
24071 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24072 s,@CPP@,$CPP,;t t
24073 s,@LDCONFIG@,$LDCONFIG,;t t
24074 s,@CXX@,$CXX,;t t
24075 s,@CXXFLAGS@,$CXXFLAGS,;t t
24076 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
24077 s,@AWK@,$AWK,;t t
24078 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24079 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24080 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24081 s,@LINT@,$LINT,;t t
24082 s,@LINT_OPTS@,$LINT_OPTS,;t t
24083 s,@LN_S@,$LN_S,;t t
24084 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24085 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24086 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24087 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24088 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24089 s,@SET_MAKE@,$SET_MAKE,;t t
24090 s,@CTAGS@,$CTAGS,;t t
24091 s,@ETAGS@,$ETAGS,;t t
24092 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24093 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24094 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24095 s,@RANLIB@,$RANLIB,;t t
24096 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24097 s,@LD@,$LD,;t t
24098 s,@ac_ct_LD@,$ac_ct_LD,;t t
24099 s,@AR@,$AR,;t t
24100 s,@ac_ct_AR@,$ac_ct_AR,;t t
24101 s,@NM@,$NM,;t t
24102 s,@ac_ct_NM@,$ac_ct_NM,;t t
24103 s,@ARFLAGS@,$ARFLAGS,;t t
24104 s,@DESTDIR@,$DESTDIR,;t t
24105 s,@BUILD_CC@,$BUILD_CC,;t t
24106 s,@BUILD_CPP@,$BUILD_CPP,;t t
24107 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24108 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24109 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24110 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24111 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24112 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24113 s,@cf_list_models@,$cf_list_models,;t t
24114 s,@ABI_VERSION@,$ABI_VERSION,;t t
24115 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24116 s,@LIBTOOL@,$LIBTOOL,;t t
24117 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24118 s,@LT_UNDEF@,$LT_UNDEF,;t t
24119 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24120 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24121 s,@LIB_CREATE@,$LIB_CREATE,;t t
24122 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24123 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24124 s,@LIB_PREP@,$LIB_PREP,;t t
24125 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24126 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24127 s,@LIB_LINK@,$LIB_LINK,;t t
24128 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24129 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24130 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24131 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24132 s,@TICS_NAME@,$TICS_NAME,;t t
24133 s,@TINFO_NAME@,$TINFO_NAME,;t t
24134 s,@LIB_NAME@,$LIB_NAME,;t t
24135 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24136 s,@CC_G_OPT@,$CC_G_OPT,;t t
24137 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24138 s,@LD_MODEL@,$LD_MODEL,;t t
24139 s,@shlibdir@,$shlibdir,;t t
24140 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24141 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24142 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24143 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24144 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24145 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24146 s,@LINK_PROGS@,$LINK_PROGS,;t t
24147 s,@LINK_TESTS@,$LINK_TESTS,;t t
24148 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24149 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24150 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24151 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24152 s,@RPATH_LIST@,$RPATH_LIST,;t t
24153 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24154 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24155 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24156 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24157 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24158 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24159 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24160 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24161 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24162 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24163 s,@XTERM_KBS@,$XTERM_KBS,;t t
24164 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24165 s,@TERMINFO@,$TERMINFO,;t t
24166 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24167 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24168 s,@TERMPATH@,$TERMPATH,;t t
24169 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24170 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24171 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24172 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24173 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24174 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24175 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24176 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24177 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24178 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24179 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24180 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24181 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24182 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24183 s,@RGB_PATH@,$RGB_PATH,;t t
24184 s,@no_x11_rgb@,$no_x11_rgb,;t t
24185 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24186 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24187 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24188 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24189 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24190 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24191 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24192 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24193 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24194 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24195 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24196 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24197 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24198 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24199 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24200 s,@PTHREAD@,$PTHREAD,;t t
24201 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24202 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24203 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24204 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24205 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24206 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24207 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24208 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24209 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24210 s,@ECHO_LT@,$ECHO_LT,;t t
24211 s,@ECHO_LD@,$ECHO_LD,;t t
24212 s,@RULE_CC@,$RULE_CC,;t t
24213 s,@SHOW_CC@,$SHOW_CC,;t t
24214 s,@ECHO_CC@,$ECHO_CC,;t t
24215 s,@ECHO_LINK@,$ECHO_LINK,;t t
24216 s,@ADAFLAGS@,$ADAFLAGS,;t t
24217 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24218 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24219 s,@ADA_TRACE@,$ADA_TRACE,;t t
24220 s,@MATH_LIB@,$MATH_LIB,;t t
24221 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24222 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24223 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24224 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24225 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24226 s,@TEST_LIBS@,$TEST_LIBS,;t t
24227 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24228 s,@CXXCPP@,$CXXCPP,;t t
24229 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24230 s,@CXX_AR@,$CXX_AR,;t t
24231 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24232 s,@CXXLIBS@,$CXXLIBS,;t t
24233 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24234 s,@gnat_exists@,$gnat_exists,;t t
24235 s,@M4_exists@,$M4_exists,;t t
24236 s,@cf_ada_make@,$cf_ada_make,;t t
24237 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24238 s,@cf_compile_generics@,$cf_compile_generics,;t t
24239 s,@cf_generic_objects@,$cf_generic_objects,;t t
24240 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24241 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24242 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24243 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24244 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24245 s,@cf_ada_package@,$cf_ada_package,;t t
24246 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24247 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24248 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24249 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24250 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24251 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24252 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24253 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24254 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24255 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24256 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24257 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24258 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24259 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24260 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24261 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24262 s,@TICS_LIBS@,$TICS_LIBS,;t t
24263 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24264 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24265 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24266 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24267 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24268 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24269 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24270 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24271 s,@includesubdir@,$includesubdir,;t t
24272 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24273 s,@TICS_LIST@,$TICS_LIST,;t t
24274 s,@TINFO_LIST@,$TINFO_LIST,;t t
24275 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24276 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24277 s,@TEST_ARGS@,$TEST_ARGS,;t t
24278 s,@TEST_DEPS@,$TEST_DEPS,;t t
24279 s,@TEST_ARG2@,$TEST_ARG2,;t t
24280 s,@TEST_DEP2@,$TEST_DEP2,;t t
24281 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24282 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24283 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24284 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24285 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24286 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24287 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24288 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24289 s,@cross_compiling@,$cross_compiling,;t t
24290 s,@TIC_PATH@,$TIC_PATH,;t t
24291 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24292 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24293 s,@PANEL_NAME@,$PANEL_NAME,;t t
24294 s,@MENU_NAME@,$MENU_NAME,;t t
24295 s,@FORM_NAME@,$FORM_NAME,;t t
24296 s,@CXX_NAME@,$CXX_NAME,;t t
24297 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24298 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24299 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24300 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24301 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24302 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24303 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24304 CEOF
24305
24306 EOF
24307
24308   cat >>$CONFIG_STATUS <<\EOF
24309   # Split the substitutions into bite-sized pieces for seds with
24310   # small command number limits, like on Digital OSF/1 and HP-UX.
24311   ac_max_sed_lines=48
24312   ac_sed_frag=1 # Number of current file.
24313   ac_beg=1 # First line for current file.
24314   ac_end=$ac_max_sed_lines # Line after last line for current file.
24315   ac_more_lines=:
24316   ac_sed_cmds=
24317   while $ac_more_lines; do
24318     if test $ac_beg -gt 1; then
24319       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24320     else
24321       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24322     fi
24323     if test ! -s $tmp/subs.frag; then
24324       ac_more_lines=false
24325     else
24326       # The purpose of the label and of the branching condition is to
24327       # speed up the sed processing (if there are no `@' at all, there
24328       # is no need to browse any of the substitutions).
24329       # These are the two extra sed commands mentioned above.
24330       (echo ':t
24331   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24332       # It is possible to make a multiline substitution using escaped newlines.
24333       # Ensure that we do not split the substitution between script fragments.
24334       ac_BEG=$ac_end
24335       ac_END=`expr $ac_end + $ac_max_sed_lines`
24336       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24337       if test -s $tmp/subs.next; then
24338         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24339         if test ! -s $tmp/subs.edit; then
24340           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24341           if test ! -s $tmp/subs.edit; then
24342             if test $ac_beg -gt 1; then
24343               ac_end=`expr $ac_end - 1`
24344               continue
24345             fi
24346           fi
24347         fi
24348       fi
24349
24350       if test -z "$ac_sed_cmds"; then
24351         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24352       else
24353         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24354       fi
24355       ac_sed_frag=`expr $ac_sed_frag + 1`
24356       ac_beg=$ac_end
24357       ac_end=`expr $ac_end + $ac_max_sed_lines`
24358     fi
24359   done
24360   if test -z "$ac_sed_cmds"; then
24361     ac_sed_cmds=cat
24362   fi
24363 fi # test -n "$CONFIG_FILES"
24364
24365 EOF
24366 cat >>$CONFIG_STATUS <<\EOF
24367 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24368   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24369   case $ac_file in
24370   - | *:- | *:-:* ) # input from stdin
24371         cat >$tmp/stdin
24372         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24373         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24374   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24375         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24376   * )   ac_file_in=$ac_file.in ;;
24377   esac
24378
24379   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24380   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24381          X"$ac_file" : 'X\(//\)[^/]' \| \
24382          X"$ac_file" : 'X\(//\)$' \| \
24383          X"$ac_file" : 'X\(/\)' \| \
24384          .     : '\(.\)' 2>/dev/null ||
24385 echo X"$ac_file" |
24386     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24387           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24388           /^X\(\/\/\)$/{ s//\1/; q; }
24389           /^X\(\/\).*/{ s//\1/; q; }
24390           s/.*/./; q'`
24391   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24392     { case "$ac_dir" in
24393   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24394   *)                      as_incr_dir=.;;
24395 esac
24396 as_dummy="$ac_dir"
24397 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24398   case $as_mkdir_dir in
24399     # Skip DOS drivespec
24400     ?:) as_incr_dir=$as_mkdir_dir ;;
24401     *)
24402       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24403       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24404     ;;
24405   esac
24406 done; }
24407
24408     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24409     # A "../" for each directory in $ac_dir_suffix.
24410     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24411   else
24412     ac_dir_suffix= ac_dots=
24413   fi
24414
24415   case $srcdir in
24416   .)  ac_srcdir=.
24417       if test -z "$ac_dots"; then
24418          ac_top_srcdir=.
24419       else
24420          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24421       fi ;;
24422   [\\/]* | ?:[\\/]* )
24423       ac_srcdir=$srcdir$ac_dir_suffix;
24424       ac_top_srcdir=$srcdir ;;
24425   *) # Relative path.
24426     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24427     ac_top_srcdir=$ac_dots$srcdir ;;
24428   esac
24429
24430   case $INSTALL in
24431   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24432   *) ac_INSTALL=$ac_dots$INSTALL ;;
24433   esac
24434
24435   if test x"$ac_file" != x-; then
24436     { echo "$as_me:24436: creating $ac_file" >&5
24437 echo "$as_me: creating $ac_file" >&6;}
24438     rm -f "$ac_file"
24439   fi
24440   # Let's still pretend it is `configure' which instantiates (i.e., don't
24441   # use $as_me), people would be surprised to read:
24442   #    /* config.h.  Generated automatically by config.status.  */
24443   configure_input="Generated automatically from `echo $ac_file_in |
24444                                                  sed 's,.*/,,'` by configure."
24445
24446   # First look for the input files in the build tree, otherwise in the
24447   # src tree.
24448   ac_file_inputs=`IFS=:
24449     for f in $ac_file_in; do
24450       case $f in
24451       -) echo $tmp/stdin ;;
24452       [\\/$]*)
24453          # Absolute (can't be DOS-style, as IFS=:)
24454          test -f "$f" || { { echo "$as_me:24454: error: cannot find input file: $f" >&5
24455 echo "$as_me: error: cannot find input file: $f" >&2;}
24456    { (exit 1); exit 1; }; }
24457          echo $f;;
24458       *) # Relative
24459          if test -f "$f"; then
24460            # Build tree
24461            echo $f
24462          elif test -f "$srcdir/$f"; then
24463            # Source tree
24464            echo $srcdir/$f
24465          else
24466            # /dev/null tree
24467            { { echo "$as_me:24467: error: cannot find input file: $f" >&5
24468 echo "$as_me: error: cannot find input file: $f" >&2;}
24469    { (exit 1); exit 1; }; }
24470          fi;;
24471       esac
24472     done` || { (exit 1); exit 1; }
24473 EOF
24474 cat >>$CONFIG_STATUS <<\EOF
24475   ac_warn_datarootdir=no
24476   if test x"$ac_file" != x-; then
24477     for ac_item in $ac_file_inputs
24478     do
24479       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24480       if test -n "$ac_seen"; then
24481         ac_used=`grep '@datarootdir@' $ac_item`
24482         if test -z "$ac_used"; then
24483           { echo "$as_me:24483: WARNING: datarootdir was used implicitly but not set:
24484 $ac_seen" >&5
24485 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24486 $ac_seen" >&2;}
24487           ac_warn_datarootdir=yes
24488         fi
24489       fi
24490       ac_seen=`grep '${datarootdir}' $ac_item`
24491       if test -n "$ac_seen"; then
24492         { echo "$as_me:24492: WARNING: datarootdir was used explicitly but not set:
24493 $ac_seen" >&5
24494 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24495 $ac_seen" >&2;}
24496         ac_warn_datarootdir=yes
24497       fi
24498     done
24499   fi
24500
24501 if test "x$ac_warn_datarootdir" = xyes; then
24502   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24503 fi
24504
24505 EOF
24506 cat >>$CONFIG_STATUS <<EOF
24507   sed "$ac_vpsub
24508 $extrasub
24509 EOF
24510 cat >>$CONFIG_STATUS <<\EOF
24511 :t
24512 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24513 s,@configure_input@,$configure_input,;t t
24514 s,@srcdir@,$ac_srcdir,;t t
24515 s,@top_srcdir@,$ac_top_srcdir,;t t
24516 s,@INSTALL@,$ac_INSTALL,;t t
24517 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24518   rm -f $tmp/stdin
24519   if test x"$ac_file" != x-; then
24520     cp $tmp/out $ac_file
24521
24522     for ac_name in prefix exec_prefix datarootdir
24523     do
24524         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24525         if test -n "$ac_seen"; then
24526             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24527             if test -z "$ac_init"; then
24528               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24529               { echo "$as_me:24529: WARNING: Variable $ac_name is used but was not set:
24530 $ac_seen" >&5
24531 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24532 $ac_seen" >&2;}
24533             fi
24534         fi
24535     done
24536     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24537     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24538     if test -s $tmp/out; then
24539       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24540       { echo "$as_me:24540: WARNING: Some variables may not be substituted:
24541 $ac_seen" >&5
24542 echo "$as_me: WARNING: Some variables may not be substituted:
24543 $ac_seen" >&2;}
24544     fi
24545   else
24546     cat $tmp/out
24547   fi
24548   rm -f $tmp/out
24549
24550 done
24551 EOF
24552 cat >>$CONFIG_STATUS <<\EOF
24553
24554 #
24555 # CONFIG_HEADER section.
24556 #
24557
24558 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24559 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24560 #
24561 # ac_d sets the value in "#define NAME VALUE" lines.
24562 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24563 ac_dB='[        ].*$,\1#\2'
24564 ac_dC=' '
24565 ac_dD=',;t'
24566 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24567 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24568 ac_iB='\([      ]\),\1#\2define\3'
24569 ac_iC=' '
24570 ac_iD='\4,;t'
24571 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24572 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24573 ac_uB='$,\1#\2define\3'
24574 ac_uC=' '
24575 ac_uD=',;t'
24576
24577 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24578   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24579   case $ac_file in
24580   - | *:- | *:-:* ) # input from stdin
24581         cat >$tmp/stdin
24582         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24583         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24584   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24585         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24586   * )   ac_file_in=$ac_file.in ;;
24587   esac
24588
24589   test x"$ac_file" != x- && { echo "$as_me:24589: creating $ac_file" >&5
24590 echo "$as_me: creating $ac_file" >&6;}
24591
24592   # First look for the input files in the build tree, otherwise in the
24593   # src tree.
24594   ac_file_inputs=`IFS=:
24595     for f in $ac_file_in; do
24596       case $f in
24597       -) echo $tmp/stdin ;;
24598       [\\/$]*)
24599          # Absolute (can't be DOS-style, as IFS=:)
24600          test -f "$f" || { { echo "$as_me:24600: error: cannot find input file: $f" >&5
24601 echo "$as_me: error: cannot find input file: $f" >&2;}
24602    { (exit 1); exit 1; }; }
24603          echo $f;;
24604       *) # Relative
24605          if test -f "$f"; then
24606            # Build tree
24607            echo $f
24608          elif test -f "$srcdir/$f"; then
24609            # Source tree
24610            echo $srcdir/$f
24611          else
24612            # /dev/null tree
24613            { { echo "$as_me:24613: error: cannot find input file: $f" >&5
24614 echo "$as_me: error: cannot find input file: $f" >&2;}
24615    { (exit 1); exit 1; }; }
24616          fi;;
24617       esac
24618     done` || { (exit 1); exit 1; }
24619   # Remove the trailing spaces.
24620   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24621
24622 EOF
24623
24624 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24625 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24626 # be either 'cat' or 'sort'.
24627 cat confdefs.h | uniq >conftest.vals
24628
24629 # Break up conftest.vals because some shells have a limit on
24630 # the size of here documents, and old seds have small limits too.
24631
24632 rm -f conftest.tail
24633 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24634 while grep . conftest.vals >/dev/null
24635 do
24636   # Write chunks of a limited-size here document to conftest.frag.
24637   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24638   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24639   echo 'CEOF' >> $CONFIG_STATUS
24640   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24641   rm -f conftest.vals
24642   mv conftest.tail conftest.vals
24643 done
24644 rm -f conftest.vals
24645
24646 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24647 # marker @DEFS@.
24648 echo '  cat >> conftest.edit <<CEOF
24649 /@DEFS@/r conftest.frag
24650 /@DEFS@/d
24651 CEOF
24652 sed -f conftest.edit $tmp/in > $tmp/out
24653 rm -f $tmp/in
24654 mv $tmp/out $tmp/in
24655 rm -f conftest.edit conftest.frag
24656 ' >> $CONFIG_STATUS
24657
24658 cat >>$CONFIG_STATUS <<\EOF
24659   # Let's still pretend it is `configure' which instantiates (i.e., don't
24660   # use $as_me), people would be surprised to read:
24661   #    /* config.h.  Generated automatically by config.status.  */
24662   if test x"$ac_file" = x-; then
24663     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24664   else
24665     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24666   fi
24667   cat $tmp/in >>$tmp/config.h
24668   rm -f $tmp/in
24669   if test x"$ac_file" != x-; then
24670     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24671       { echo "$as_me:24671: $ac_file is unchanged" >&5
24672 echo "$as_me: $ac_file is unchanged" >&6;}
24673     else
24674       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24675          X"$ac_file" : 'X\(//\)[^/]' \| \
24676          X"$ac_file" : 'X\(//\)$' \| \
24677          X"$ac_file" : 'X\(/\)' \| \
24678          .     : '\(.\)' 2>/dev/null ||
24679 echo X"$ac_file" |
24680     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24681           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24682           /^X\(\/\/\)$/{ s//\1/; q; }
24683           /^X\(\/\).*/{ s//\1/; q; }
24684           s/.*/./; q'`
24685       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24686         { case "$ac_dir" in
24687   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24688   *)                      as_incr_dir=.;;
24689 esac
24690 as_dummy="$ac_dir"
24691 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24692   case $as_mkdir_dir in
24693     # Skip DOS drivespec
24694     ?:) as_incr_dir=$as_mkdir_dir ;;
24695     *)
24696       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24697       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24698     ;;
24699   esac
24700 done; }
24701
24702       fi
24703       rm -f $ac_file
24704       mv $tmp/config.h $ac_file
24705     fi
24706   else
24707     cat $tmp/config.h
24708     rm -f $tmp/config.h
24709   fi
24710 done
24711 EOF
24712 cat >>$CONFIG_STATUS <<\EOF
24713 #
24714 # CONFIG_COMMANDS section.
24715 #
24716 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24717   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24718   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24719
24720   case $ac_dest in
24721     default )
24722 if test "x$cf_with_tests" != xno ; then
24723
24724 for cf_dir in test
24725 do
24726         if test ! -d $srcdir/$cf_dir; then
24727                 continue
24728         elif test -f $srcdir/$cf_dir/programs; then
24729                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24730         fi
24731 done
24732
24733 fi
24734
24735 cf_prefix=$LIB_PREFIX
24736
24737 case $cf_cv_shlib_version in
24738 (cygdll|msysdll|mingw)
24739         TINFO_NAME=$TINFO_ARG_SUFFIX
24740         TINFO_SUFFIX=.dll
24741         ;;
24742 esac
24743
24744 if test -n "$TINFO_SUFFIX" ; then
24745         case $TINFO_SUFFIX in
24746         (tw*)
24747                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24748                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24749                 ;;
24750         (t*)
24751                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24752                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24753                 ;;
24754         (w*)
24755                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24756                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24757                 ;;
24758         esac
24759 fi
24760
24761 for cf_dir in $SRC_SUBDIRS
24762 do
24763         if test ! -d $srcdir/$cf_dir ; then
24764                 continue
24765         elif test -f $srcdir/$cf_dir/modules; then
24766
24767                 SHARED_LIB=
24768                 Libs_To_Make=
24769                 cf_awk_program=
24770                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24771                 then
24772                         cf_awk_program="$cf_awk_program\
24773 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24774 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24775 "
24776                 fi
24777
24778                 if test "x$WILDCARD_SYMS" = xno
24779                 then
24780                         cf_awk_program="$cf_awk_program\
24781 /[      ]_\\*;/ { skip=1; next; }\
24782 "
24783                 fi
24784
24785                 if test "x$cf_awk_program" != "x"
24786                 then
24787                         cat >>$cf_dir/Makefile <<CF_EOF
24788
24789 # Generated by CF_LIB_RULES
24790 resulting.map: $UNALTERED_SYMS
24791         $AWK 'BEGIN { skip = 1; last=""; } \
24792 $cf_awk_program \
24793 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24794  skip = 0; last = \$\$0; } \
24795 END { print last; }' < $UNALTERED_SYMS >\$@
24796
24797 distclean::
24798         rm -f resulting.map
24799 CF_EOF
24800                 fi
24801
24802                 for cf_item in $cf_LIST_MODELS
24803                 do
24804
24805         case X$cf_item in
24806         (Xlibtool)
24807                 cf_suffix='.la'
24808                 cf_depsuf=$cf_suffix
24809                 ;;
24810         (Xdebug)
24811                 cf_suffix='_g.a'
24812                 cf_depsuf=$cf_suffix
24813                 ;;
24814         (Xprofile)
24815                 cf_suffix='_p.a'
24816                 cf_depsuf=$cf_suffix
24817                 ;;
24818         (Xshared)
24819                 case $cf_cv_system_name in
24820                 (aix[5-7]*)
24821                         cf_suffix='.so'
24822                         cf_depsuf=$cf_suffix
24823                         ;;
24824                 (cygwin*|msys*|mingw*)
24825                         cf_suffix='.dll'
24826                         cf_depsuf='.dll.a'
24827                         ;;
24828                 (darwin*)
24829                         cf_suffix='.dylib'
24830                         cf_depsuf=$cf_suffix
24831                         ;;
24832                 (hpux*)
24833                         case $target in
24834                         (ia64*)
24835                                 cf_suffix='.so'
24836                                 cf_depsuf=$cf_suffix
24837                                 ;;
24838                         (*)
24839                                 cf_suffix='.sl'
24840                                 cf_depsuf=$cf_suffix
24841                                 ;;
24842                         esac
24843                         ;;
24844                 (*)
24845                         cf_suffix='.so'
24846                         cf_depsuf=$cf_suffix
24847                         ;;
24848                 esac
24849                 ;;
24850         (*)
24851                 cf_suffix='.a'
24852                 cf_depsuf=$cf_suffix
24853                 ;;
24854         esac
24855         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24856         then
24857                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24858                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24859         fi
24860
24861                         cf_libname=$cf_dir
24862                         test "$cf_dir" = c++ && cf_libname=ncurses++
24863                         if test $cf_item = shared ; then
24864                                 if test -n "${LIB_SUFFIX}"
24865                                 then
24866                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24867                                 else
24868                                         cf_shared_suffix="$cf_suffix"
24869                                 fi
24870                                 if test "$cf_cv_do_symlinks" = yes ; then
24871                                         cf_version_name=
24872
24873                                         case "$cf_cv_shlib_version" in
24874                                         (rel)
24875                                                 cf_version_name=REL_VERSION
24876                                                 ;;
24877                                         (abi)
24878                                                 cf_version_name=ABI_VERSION
24879                                                 ;;
24880                                         esac
24881
24882                                         if test -n "$cf_version_name"
24883                                         then
24884                                                 case "$cf_cv_system_name" in
24885                                                 (darwin*)
24886                                                         # "w", etc?
24887                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24888                                                         ;;
24889                                                 (*)
24890                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24891                                                         ;;
24892                                                 esac
24893                                         fi
24894                                         if test -n "${USE_LIB_SUFFIX}"
24895                                         then
24896                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24897                                         else
24898                                                 cf_shared_suffix="$cf_suffix"
24899                                         fi
24900                                 fi
24901                                 # cygwin needs import library, and has unique naming convention
24902                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24903                                 # use 'cyg' prefix for shared lib.
24904                                 case $cf_cv_shlib_version in
24905                                 (cygdll)
24906                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24907                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24908                                         ;;
24909                                 (msysdll)
24910                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24911                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24912                                         ;;
24913                                 (mingw)
24914                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24915                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24916                                         ;;
24917                                 (*)
24918                                         cf_add_lib=
24919                                         ;;
24920                                 esac
24921                                 if test -n "$cf_add_lib"
24922                                 then
24923                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24924                                         continue
24925                                 fi
24926                         fi
24927                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24928                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24929                 done
24930
24931                 if test $cf_dir = ncurses ; then
24932                         cf_subsets="$LIB_SUBSETS"
24933                         cf_r_parts="$cf_subsets"
24934                         cf_liblist="$Libs_To_Make"
24935
24936                         while test -n "$cf_r_parts"
24937                         do
24938                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24939                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24940                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24941                                         cf_add_lib=
24942                                         case $cf_l_parts in
24943                                         (*termlib*)
24944                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24945                                                 ;;
24946                                         (*ticlib*)
24947                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24948                                                 ;;
24949                                         (*)
24950                                                 break
24951                                                 ;;
24952                                         esac
24953                                         if test -n "$cf_add_lib"; then
24954                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24955                                         fi
24956                                 else
24957                                         break
24958                                 fi
24959                         done
24960                 else
24961                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24962                 fi
24963
24964                 if test $cf_dir = c++; then
24965                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24966                                 cf_list=
24967                                 for cf_item in $Libs_To_Make
24968                                 do
24969                                         case $cf_item in
24970                                         (*.a)
24971                                                 ;;
24972                                         (*)
24973                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24974                                                 ;;
24975                                         esac
24976                                         for cf_test in $cf_list
24977                                         do
24978                                                 if test "$cf_test" = "$cf_item"
24979                                                 then
24980                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24981                                                         cf_item=
24982                                                         break
24983                                                 fi
24984                                         done
24985                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24986                                 done
24987                                 Libs_To_Make="$cf_list"
24988                         fi
24989                 fi
24990
24991                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24992                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24993                         $cf_dir/Makefile >$cf_dir/Makefile.out
24994                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24995
24996                 $AWK -f $srcdir/mk-0th.awk \
24997                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24998                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24999
25000                 for cf_subset in $cf_subsets
25001                 do
25002                         cf_subdirs=
25003                         for cf_item in $cf_LIST_MODELS
25004                         do
25005
25006                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
25007
25008 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25009
25010                         CXX_MODEL=$cf_ITEM
25011                         if test "$CXX_MODEL" = SHARED; then
25012                                 case $cf_cv_shlib_version in
25013                                 (cygdll|msysdll|mingw)
25014                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
25015
25016 echo "${as_me:-configure}:25016: testing overriding CXX_MODEL to SHARED ..." 1>&5
25017
25018                                         with_shared_cxx=yes
25019                                         ;;
25020                                 (*)
25021                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
25022                                         ;;
25023                                 esac
25024                         fi
25025
25026         case X$cf_item in
25027         (Xlibtool)
25028                 cf_suffix='.la'
25029                 cf_depsuf=$cf_suffix
25030                 ;;
25031         (Xdebug)
25032                 cf_suffix='_g.a'
25033                 cf_depsuf=$cf_suffix
25034                 ;;
25035         (Xprofile)
25036                 cf_suffix='_p.a'
25037                 cf_depsuf=$cf_suffix
25038                 ;;
25039         (Xshared)
25040                 case $cf_cv_system_name in
25041                 (aix[5-7]*)
25042                         cf_suffix='.so'
25043                         cf_depsuf=$cf_suffix
25044                         ;;
25045                 (cygwin*|msys*|mingw*)
25046                         cf_suffix='.dll'
25047                         cf_depsuf='.dll.a'
25048                         ;;
25049                 (darwin*)
25050                         cf_suffix='.dylib'
25051                         cf_depsuf=$cf_suffix
25052                         ;;
25053                 (hpux*)
25054                         case $target in
25055                         (ia64*)
25056                                 cf_suffix='.so'
25057                                 cf_depsuf=$cf_suffix
25058                                 ;;
25059                         (*)
25060                                 cf_suffix='.sl'
25061                                 cf_depsuf=$cf_suffix
25062                                 ;;
25063                         esac
25064                         ;;
25065                 (*)
25066                         cf_suffix='.so'
25067                         cf_depsuf=$cf_suffix
25068                         ;;
25069                 esac
25070                 ;;
25071         (*)
25072                 cf_suffix='.a'
25073                 cf_depsuf=$cf_suffix
25074                 ;;
25075         esac
25076         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25077         then
25078                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25079                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25080         fi
25081
25082         case $cf_item in
25083         (libtool) cf_subdir='obj_lo'  ;;
25084         (normal)  cf_subdir='objects' ;;
25085         (debug)   cf_subdir='obj_g' ;;
25086         (profile) cf_subdir='obj_p' ;;
25087         (shared)
25088                 case $cf_cv_system_name in
25089                 (cygwin|msys)
25090                         cf_subdir='objects' ;;
25091                 (*)
25092                         cf_subdir='obj_s' ;;
25093                 esac
25094         esac
25095
25096                         # Test for case where we build libtinfo with a different name.
25097                         cf_libname=$cf_dir
25098                         if test $cf_dir = ncurses ; then
25099                                 case $cf_subset in
25100                                 (*base*)
25101                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25102                                         ;;
25103                                 (*termlib*)
25104                                         cf_libname=$TINFO_LIB_SUFFIX
25105                                         ;;
25106                                 (ticlib*)
25107                                         cf_libname=$TICS_LIB_SUFFIX
25108                                         ;;
25109                                 esac
25110                         elif test $cf_dir = c++ ; then
25111                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25112                         else
25113                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25114                         fi
25115                         if test -n "${USE_ARG_SUFFIX}" ; then
25116                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25117                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25118                         fi
25119
25120                         # These dependencies really are for development, not
25121                         # builds, but they are useful in porting, too.
25122                         cf_depend="../include/ncurses_cfg.h"
25123                         if test "$srcdir" = "."; then
25124                                 cf_reldir="."
25125                         else
25126                                 cf_reldir="\${srcdir}"
25127                         fi
25128
25129                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25130                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25131                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25132                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25133                         fi
25134
25135                         cf_dir_suffix=
25136                         old_cf_suffix="$cf_suffix"
25137                         if test "$cf_cv_shlib_version_infix" = yes ; then
25138                         if test -n "$USE_LIB_SUFFIX" ; then
25139                                 case $USE_LIB_SUFFIX in
25140                                 (tw*)
25141                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25142                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25143                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25144                                         ;;
25145                                 (t*)
25146                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25147                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25148                                         cf_dir_suffix=t$EXTRA_SUFFIX
25149                                         ;;
25150                                 (w*)
25151                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25152                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25153                                         cf_dir_suffix=w$EXTRA_SUFFIX
25154                                         ;;
25155                                 (*)
25156                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25157                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25158                                         cf_dir_suffix=$EXTRA_SUFFIX
25159                                         ;;
25160                                 esac
25161                         fi
25162                         fi
25163
25164                         $AWK -f $srcdir/mk-1st.awk \
25165                                 name=${cf_libname}${cf_dir_suffix} \
25166                                 traces=$LIB_TRACING \
25167                                 MODEL=$cf_ITEM \
25168                                 CXX_MODEL=$CXX_MODEL \
25169                                 model=$cf_subdir \
25170                                 prefix=$cf_prefix \
25171                                 suffix=$cf_suffix \
25172                                 subset=$cf_subset \
25173                                 driver=$cf_cv_term_driver \
25174                                 SymLink="$LN_S" \
25175                                 TermlibRoot=$TINFO_NAME \
25176                                 TermlibSuffix=$TINFO_SUFFIX \
25177                                 ShlibVer=$cf_cv_shlib_version \
25178                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25179                                 ReLink=${cf_cv_do_relink:-no} \
25180                                 DoLinks=$cf_cv_do_symlinks \
25181                                 rmSoLocs=$cf_cv_rm_so_locs \
25182                                 ldconfig="$LDCONFIG" \
25183                                 overwrite=$WITH_OVERWRITE \
25184                                 depend="$cf_depend" \
25185                                 host="$host" \
25186                                 libtool_version="$LIBTOOL_VERSION" \
25187                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25188
25189                         cf_suffix="$old_cf_suffix"
25190
25191                         for cf_subdir2 in $cf_subdirs lib
25192                         do
25193                                 test $cf_subdir = $cf_subdir2 && break
25194                         done
25195                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25196                         $AWK -f $srcdir/mk-2nd.awk \
25197                                 name=$cf_dir \
25198                                 traces=$LIB_TRACING \
25199                                 MODEL=$cf_ITEM \
25200                                 model=$cf_subdir \
25201                                 subset=$cf_subset \
25202                                 srcdir=$srcdir \
25203                                 echo=$WITH_ECHO \
25204                                 crenames=$cf_cv_prog_CC_c_o \
25205                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25206                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25207                         cf_subdirs="$cf_subdirs $cf_subdir"
25208                         done
25209                 done
25210         fi
25211
25212         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25213 done
25214
25215 for cf_dir in $SRC_SUBDIRS
25216 do
25217         if test ! -d $srcdir/$cf_dir ; then
25218                 continue
25219         fi
25220
25221         if test -f $cf_dir/Makefile ; then
25222                 case "$cf_dir" in
25223                 (Ada95)
25224                         echo 'libs \' >> Makefile
25225                         echo 'install.libs \' >> Makefile
25226                         echo 'uninstall.libs ::' >> Makefile
25227                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25228                         ;;
25229                 esac
25230         fi
25231
25232         if test -f $srcdir/$cf_dir/modules; then
25233                 echo >> Makefile
25234                 if test -f $srcdir/$cf_dir/headers; then
25235 cat >> Makefile <<CF_EOF
25236 install.includes \\
25237 uninstall.includes \\
25238 CF_EOF
25239                 fi
25240 if test "$cf_dir" != "c++" ; then
25241 echo 'lint \' >> Makefile
25242 fi
25243 cat >> Makefile <<CF_EOF
25244 libs \\
25245 lintlib \\
25246 install.libs \\
25247 uninstall.libs \\
25248 install.$cf_dir \\
25249 uninstall.$cf_dir ::
25250         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25251 CF_EOF
25252         elif test -f $srcdir/$cf_dir/headers; then
25253 cat >> Makefile <<CF_EOF
25254
25255 libs \\
25256 install.libs \\
25257 uninstall.libs \\
25258 install.includes \\
25259 uninstall.includes ::
25260         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25261 CF_EOF
25262 fi
25263 done
25264
25265 if test "x$cf_with_db_install" = xyes; then
25266 cat >> Makefile <<CF_EOF
25267
25268 install.libs uninstall.libs \\
25269 install.data uninstall.data ::
25270 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25271 CF_EOF
25272 else
25273 cat >> Makefile <<CF_EOF
25274
25275 install.libs uninstall.libs ::
25276         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25277 CF_EOF
25278 fi
25279
25280 if test "x$cf_with_manpages" = xyes; then
25281 cat >> Makefile <<CF_EOF
25282
25283 install.man \\
25284 uninstall.man ::
25285         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25286 CF_EOF
25287 fi
25288
25289 cat >> Makefile <<CF_EOF
25290
25291 distclean ::
25292         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25293         rm -f headers.sh headers.sed mk_shared_lib.sh
25294         rm -f edit_man.* man_alias.*
25295         rm -rf \${DIRS_TO_MAKE}
25296 CF_EOF
25297
25298 # Special case: tack's manpage lives in its own directory.
25299 if test "x$cf_with_manpages" = xyes; then
25300 if test "x$cf_with_tack" = "xyes"; then
25301 cat >> Makefile <<CF_EOF
25302
25303 install.man \\
25304 uninstall.man ::
25305         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25306 CF_EOF
25307 fi
25308 fi
25309
25310 rm -f headers.sed headers.sh
25311
25312 echo creating headers.sh
25313 cat >headers.sh <<CF_EOF
25314 #! $SHELL
25315 # This shell script is generated by the 'configure' script.  It is invoked in a
25316 # subdirectory of the build tree.  It generates a sed-script in the parent
25317 # directory that is used to adjust includes for header files that reside in a
25318 # subdirectory of /usr/include, etc.
25319 PRG=""
25320 while test \$# != 3
25321 do
25322 PRG="\$PRG \$1"; shift
25323 done
25324 DST=\$1
25325 REF=\$2
25326 SRC=\$3
25327 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25328 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25329 echo installing \$SRC in \$DST
25330 CF_EOF
25331
25332 if test $WITH_CURSES_H = yes; then
25333         cat >>headers.sh <<CF_EOF
25334 case \$DST in
25335 (/*/include/*)
25336         END=\`basename \$DST\`
25337         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25338         do
25339                 NAME=\`basename \$i\`
25340                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25341         done
25342         ;;
25343 (*)
25344         echo "" >> \$TMPSED
25345         ;;
25346 esac
25347 CF_EOF
25348
25349 else
25350         cat >>headers.sh <<CF_EOF
25351 case \$DST in
25352 (/*/include/*)
25353         END=\`basename \$DST\`
25354         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25355         do
25356                 NAME=\`basename \$i\`
25357                 if test "\$NAME" = "curses.h"
25358                 then
25359                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25360                         NAME=ncurses.h
25361                 fi
25362                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25363         done
25364         ;;
25365 (*)
25366         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25367         ;;
25368 esac
25369 CF_EOF
25370 fi
25371 cat >>headers.sh <<CF_EOF
25372 rm -f \$TMPSRC
25373 sed -f \$TMPSED \$SRC > \$TMPSRC
25374 NAME=\`basename \$SRC\`
25375 CF_EOF
25376 if test $WITH_CURSES_H != yes; then
25377         cat >>headers.sh <<CF_EOF
25378 test "\$NAME" = "curses.h" && NAME=ncurses.h
25379 CF_EOF
25380 fi
25381 cat >>headers.sh <<CF_EOF
25382 # Just in case someone gzip'd manpages, remove the conflicting copy.
25383 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25384
25385 eval \$PRG \$TMPSRC \$DST/\$NAME
25386 rm -f \$TMPSRC \$TMPSED
25387 CF_EOF
25388
25389 chmod 0755 headers.sh
25390
25391 for cf_dir in $SRC_SUBDIRS
25392 do
25393         if test ! -d $srcdir/$cf_dir ; then
25394                 continue
25395         fi
25396
25397         if test -f $srcdir/$cf_dir/headers; then
25398                 $AWK -f $srcdir/mk-hdr.awk \
25399                         subset="$LIB_SUBSETS" \
25400                         compat="$WITH_CURSES_H" \
25401                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25402         fi
25403
25404         if test -f $srcdir/$cf_dir/modules; then
25405                 if test "$cf_dir" != "c++" ; then
25406                         cat >>$cf_dir/Makefile <<"CF_EOF"
25407 depend : ${AUTO_SRC}
25408         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25409
25410 # DO NOT DELETE THIS LINE -- make depend depends on it.
25411 CF_EOF
25412                 fi
25413         fi
25414 done
25415
25416 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25417 if test -z "$USE_OLD_MAKERULES" ; then
25418         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25419 fi
25420 fi
25421  ;;
25422   esac
25423 done
25424 EOF
25425
25426 cat >>$CONFIG_STATUS <<\EOF
25427
25428 { (exit 0); exit 0; }
25429 EOF
25430 chmod +x $CONFIG_STATUS
25431 ac_clean_files=$ac_clean_files_save
25432
25433 # configure is writing to config.log, and then calls config.status.
25434 # config.status does its own redirection, appending to config.log.
25435 # Unfortunately, on DOS this fails, as config.log is still kept open
25436 # by configure, so config.status won't be able to write to it; its
25437 # output is simply discarded.  So we exec the FD to /dev/null,
25438 # effectively closing config.log, so it can be properly (re)opened and
25439 # appended to by config.status.  When coming back to configure, we
25440 # need to make the FD available again.
25441 if test "$no_create" != yes; then
25442   ac_cs_success=:
25443   exec 5>/dev/null
25444   $SHELL $CONFIG_STATUS || ac_cs_success=false
25445   exec 5>>config.log
25446   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25447   # would make configure fail if this is the last instruction.
25448   $ac_cs_success || { (exit 1); exit 1; }
25449 fi
25450 ${MAKE:-make} preinstall