]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
86ebc7f1ff701af844e1707c4d70dec5eec89357
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.664 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-config-suffix=X  suffixes ncursesXX-config file
716   --with-pkg-config{=path} enable/disable use of pkg-config
717   --with-pkg-config-libdir=XXX use given directory for installing pc-files
718   --enable-pc-files       generate and install .pc files for pkg-config
719   --with-pc-suffix        suffixes pc-files
720   --enable-mixed-case     tic should assume mixed-case filenames
721   --with-install-prefix   prefixes actual install-location ($DESTDIR)
722 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
723   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
724   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
725   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
726   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
727   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
728   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
729 Options to Specify the Libraries Built/Used:
730   --disable-libtool-version  enable to use libtool's incompatible naming scheme
731   --with-libtool          generate libraries with libtool
732   --with-shared           generate shared-libraries
733   --with-normal           generate normal-libraries (default)
734   --with-debug            generate debug-libraries (default)
735   --with-profile          generate profile-libraries
736   --with-cxx-shared       generate C++ shared-libraries
737   --with-lib-prefix       override library-prefix
738   --with-termlib          generate separate terminfo library
739   --with-ticlib           generate separate tic library
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --with-libtool-opts=XXX specify additional libtool options
744   --with-export-syms=XXX  limit exported symbols using libtool
745   --with-versioned-syms=X markup versioned symbols using ld
746   --with-gpm              use Alessandro Rubini's GPM library
747   --without-dlsym         do not use dlsym() to load GPM dynamically
748   --with-pcre2            use PCRE2 for regular-expressions
749   --with-sysmouse         use sysmouse (FreeBSD console)
750   --disable-lib-suffixes  disable library suffixes
751   --disable-rpath-hack    don't add rpath options for additional libraries
752 Fine-Tuning Your Configuration:
753   --with-extra-suffix=X   append extra suffix to header/library paths
754   --disable-overwrite     put headers in subdir, omit link to -lcurses
755   --disable-database      do not use terminfo, only fallbacks/termcap
756   --with-database=XXX     specify terminfo source to install
757   --with-hashed-db        specify hashed-database library
758   --with-fallbacks=XXX    specify list of fallback terminal descriptions
759   --without-xterm-new     specify if xterm terminfo should be old version
760   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
761   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
762   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
763   --disable-big-core      assume machine has little memory
764   --disable-big-strings   assume compiler has only standard-size strings
765   --enable-termcap        compile in termcap fallback support
766   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
767   --enable-getcap         fast termcap load, no xrefs to terminfo
768   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
769   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
770   --disable-root-environ  restrict environment when running as root
771   --enable-symlinks       make tic use symbolic links not hard links
772   --enable-broken_linker  compile with broken-linker support code
773   --enable-bsdpad         recognize BSD-style prefix padding
774   --enable-widec          compile with wide-char/UTF-8 code
775   --disable-lp64          allow chtype to be long (ignore _LP64)
776   --disable-largefile     omit support for large files
777   --disable-tparm-varargs compile tparm() without varargs interface
778   --disable-tic-depends   link tic library without explicit dependency on ncurses library
779   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
780   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
781   --with-bool=TYPE        override fallback type of bool variable
782   --with-caps=alt         compile with alternate Caps file
783   --with-chtype=TYPE      override type of chtype
784   --with-ospeed=TYPE      override type of ospeed variable
785   --with-mmask-t=TYPE     override type of mmask_t
786   --with-ccharw-max=XXX   override size CCHARW_MAX
787   --enable-signed-char    compile using signed Boolean's in term.h
788   --with-tparm-arg=TYPE   override parameter type of tparm
789   --with-rcs-ids          compile-in RCS identifiers
790 Options to Specify How Manpages are Installed:
791   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
792                           optionally formatted/catonly, e.g., gzip,formatted
793   --with-manpage-renames  specify manpage-renaming
794   --with-manpage-aliases  specify manpage-aliases using .so
795   --with-manpage-symlinks specify manpage-aliases using symlinks
796   --with-manpage-tbl      specify manpage processing with tbl
797 Extensions:
798   --disable-ext-funcs     disable function-extensions
799   --enable-sp-funcs       enable SCREEN-extensions
800   --enable-term-driver    enable terminal-driver
801   --enable-const          compile with extra/non-standard const
802   --enable-ext-colors     compile for 256-color support
803   --enable-ext-mouse      compile for extended mouse-encoding
804   --enable-ext-putwin     compile with extended putwin/screendump
805   --enable-no-padding     compile with $NCURSES_NO_PADDING code
806   --enable-sigwinch       compile with SIGWINCH handler
807   --enable-tcap-names     compile with user-definable terminal capabilities
808 Reentrant Code:
809   --with-pthread          use POSIX thread library
810   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
811   --enable-weak-symbols   enable weak-symbols for pthreads
812   --enable-reentrant      compile with reentrant code
813   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
814   --enable-opaque-form    make form-library structures "opaque"
815   --enable-opaque-menu    make menu-library structures "opaque"
816   --enable-opaque-panel   make panel-library structures "opaque"
817   --with-wrap-prefix=XXX  override prefix used for public variables
818 Development Code:
819   --without-develop       disable development options
820   --enable-hard-tabs      compile with hard-tabs code
821   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
822 Experimental Code:
823   --disable-assumed-color do not assume anything about default-colors
824   --disable-hashmap       compile without hashmap scrolling-optimization
825   --enable-colorfgbg      compile-in experimental $COLORFGBG code
826   --enable-interop        compile-in interop bindings
827   --enable-safe-sprintf   compile with experimental safe-sprintf code
828   --disable-scroll-hints  compile without scroll-hints code
829   --enable-wgetch-events  compile with wgetch-events code
830 Testing/development Options:
831   --disable-echo          do not display "compiling" commands
832   --disable-stripping     do not strip (debug info) installed executables
833   --enable-warnings       build: turn on GCC compiler warnings
834   --enable-string-hacks   work around bogus compiler/loader warnings
835   --enable-assertions     test: turn on generation of assertion code
836   --with-dmalloc          test: use Gray Watson's dmalloc library
837   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
838   --with-valgrind         test: use valgrind
839   --disable-leaks         test: free permanent memory, analyze leaks
840   --enable-expanded       test: generate functions for certain macros
841   --disable-macros        test: use functions rather than macros
842   --with-trace            test: add trace() function to all models of ncurses
843   --disable-gnat-projects test: disable GNAT projects even if usable
844 Ada95 Binding Options:
845   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
846   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
847   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
848   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
849
850 Some influential environment variables:
851   CC          C compiler command
852   CFLAGS      C compiler flags
853   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
854               nonstandard directory <lib dir>
855   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
856               headers in a nonstandard directory <include dir>
857   CPP         C preprocessor
858   CXX         C++ compiler command
859   CXXFLAGS    C++ compiler flags
860   CXXCPP      C++ preprocessor
861
862 Use these variables to override the choices made by `configure' or to help
863 it to find libraries and programs with nonstandard names/locations.
864
865 EOF
866 fi
867
868 if test "$ac_init_help" = "recursive"; then
869   # If there are subdirs, report their specific --help.
870   ac_popdir=`pwd`
871   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
872     cd $ac_subdir
873     # A "../" for each directory in /$ac_subdir.
874     ac_dots=`echo $ac_subdir |
875              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
876
877     case $srcdir in
878     .) # No --srcdir option.  We are building in place.
879       ac_sub_srcdir=$srcdir ;;
880     [\\/]* | ?:[\\/]* ) # Absolute path.
881       ac_sub_srcdir=$srcdir/$ac_subdir ;;
882     *) # Relative path.
883       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
884     esac
885
886     # Check for guested configure; otherwise get Cygnus style configure.
887     if test -f $ac_sub_srcdir/configure.gnu; then
888       echo
889       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
890     elif test -f $ac_sub_srcdir/configure; then
891       echo
892       $SHELL $ac_sub_srcdir/configure  --help=recursive
893     elif test -f $ac_sub_srcdir/configure.ac ||
894            test -f $ac_sub_srcdir/configure.in; then
895       echo
896       $ac_configure --help
897     else
898       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
899     fi
900     cd $ac_popdir
901   done
902 fi
903
904 test -n "$ac_init_help" && exit 0
905 if $ac_init_version; then
906   cat <<\EOF
907
908 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
909 Free Software Foundation, Inc.
910 This configure script is free software; the Free Software Foundation
911 gives unlimited permission to copy, distribute and modify it.
912 EOF
913   exit 0
914 fi
915 exec 5>config.log
916 cat >&5 <<EOF
917 This file contains any messages produced by compilers while
918 running configure, to aid debugging if configure makes a mistake.
919
920 It was created by $as_me, which was
921 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
922
923   $ $0 $@
924
925 EOF
926 {
927 cat <<_ASUNAME
928 ## ---------- ##
929 ## Platform.  ##
930 ## ---------- ##
931
932 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
933 uname -m = `(uname -m) 2>/dev/null || echo unknown`
934 uname -r = `(uname -r) 2>/dev/null || echo unknown`
935 uname -s = `(uname -s) 2>/dev/null || echo unknown`
936 uname -v = `(uname -v) 2>/dev/null || echo unknown`
937
938 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
939 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
940
941 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
942 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
943 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
944 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
945 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
946 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
947 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
948
949 PATH = $PATH
950
951 _ASUNAME
952 } >&5
953
954 cat >&5 <<EOF
955 ## ------------ ##
956 ## Core tests.  ##
957 ## ------------ ##
958
959 EOF
960
961 # Keep a trace of the command line.
962 # Strip out --no-create and --no-recursion so they do not pile up.
963 # Also quote any args containing shell meta-characters.
964 ac_configure_args=
965 ac_sep=
966 for ac_arg
967 do
968   case $ac_arg in
969   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
970   | --no-cr | --no-c) ;;
971   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
972   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
973   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
974     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
975     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
976     ac_sep=" " ;;
977   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
978      ac_sep=" " ;;
979   esac
980   # Get rid of the leading space.
981 done
982
983 # When interrupted or exit'd, cleanup temporary files, and complete
984 # config.log.  We remove comments because anyway the quotes in there
985 # would cause problems or look ugly.
986 trap 'exit_status=$?
987   # Save into config.log some information that might help in debugging.
988   echo >&5
989   echo "## ----------------- ##" >&5
990   echo "## Cache variables.  ##" >&5
991   echo "## ----------------- ##" >&5
992   echo >&5
993   # The following way of writing the cache mishandles newlines in values,
994 {
995   (set) 2>&1 |
996     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
997     *ac_space=\ *)
998       sed -n \
999         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1000           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1001       ;;
1002     *)
1003       sed -n \
1004         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1005       ;;
1006     esac;
1007 } >&5
1008   sed "/^$/d" confdefs.h >conftest.log
1009   if test -s conftest.log; then
1010     echo >&5
1011     echo "## ------------ ##" >&5
1012     echo "## confdefs.h.  ##" >&5
1013     echo "## ------------ ##" >&5
1014     echo >&5
1015     cat conftest.log >&5
1016   fi
1017   (echo; echo) >&5
1018   test "$ac_signal" != 0 &&
1019     echo "$as_me: caught signal $ac_signal" >&5
1020   echo "$as_me: exit $exit_status" >&5
1021   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1022     exit $exit_status
1023      ' 0
1024 for ac_signal in 1 2 13 15; do
1025   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1026 done
1027 ac_signal=0
1028
1029 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1030 rm -rf conftest* confdefs.h
1031 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1032 echo >confdefs.h
1033
1034 # Let the site file select an alternate cache file if it wants to.
1035 # Prefer explicitly selected file to automatically selected ones.
1036 if test -z "$CONFIG_SITE"; then
1037   if test "x$prefix" != xNONE; then
1038     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1039   else
1040     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1041   fi
1042 fi
1043 for ac_site_file in $CONFIG_SITE; do
1044   if test -r "$ac_site_file"; then
1045     { echo "$as_me:1045: loading site script $ac_site_file" >&5
1046 echo "$as_me: loading site script $ac_site_file" >&6;}
1047     cat "$ac_site_file" >&5
1048     . "$ac_site_file"
1049   fi
1050 done
1051
1052 if test -r "$cache_file"; then
1053   # Some versions of bash will fail to source /dev/null (special
1054   # files actually), so we avoid doing that.
1055   if test -f "$cache_file"; then
1056     { echo "$as_me:1056: loading cache $cache_file" >&5
1057 echo "$as_me: loading cache $cache_file" >&6;}
1058     case $cache_file in
1059       [\\/]* | ?:[\\/]* ) . $cache_file;;
1060       *)                      . ./$cache_file;;
1061     esac
1062   fi
1063 else
1064   { echo "$as_me:1064: creating cache $cache_file" >&5
1065 echo "$as_me: creating cache $cache_file" >&6;}
1066   >$cache_file
1067 fi
1068
1069 # Check that the precious variables saved in the cache have kept the same
1070 # value.
1071 ac_cache_corrupted=false
1072 for ac_var in `(set) 2>&1 |
1073                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1074   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1075   eval ac_new_set=\$ac_env_${ac_var}_set
1076   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1077   eval ac_new_val="\$ac_env_${ac_var}_value"
1078   case $ac_old_set,$ac_new_set in
1079     set,)
1080       { echo "$as_me:1080: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1081 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1082       ac_cache_corrupted=: ;;
1083     ,set)
1084       { echo "$as_me:1084: error: \`$ac_var' was not set in the previous run" >&5
1085 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1086       ac_cache_corrupted=: ;;
1087     ,);;
1088     *)
1089       if test "x$ac_old_val" != "x$ac_new_val"; then
1090         { echo "$as_me:1090: error: \`$ac_var' has changed since the previous run:" >&5
1091 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1092         { echo "$as_me:1092:   former value:  $ac_old_val" >&5
1093 echo "$as_me:   former value:  $ac_old_val" >&2;}
1094         { echo "$as_me:1094:   current value: $ac_new_val" >&5
1095 echo "$as_me:   current value: $ac_new_val" >&2;}
1096         ac_cache_corrupted=:
1097       fi;;
1098   esac
1099   # Pass precious variables to config.status.  It doesn't matter if
1100   # we pass some twice (in addition to the command line arguments).
1101   if test "$ac_new_set" = set; then
1102     case $ac_new_val in
1103     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1104       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1105       ac_configure_args="$ac_configure_args '$ac_arg'"
1106       ;;
1107     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1108        ;;
1109     esac
1110   fi
1111 done
1112 if $ac_cache_corrupted; then
1113   { echo "$as_me:1113: error: changes in the environment can compromise the build" >&5
1114 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1115   { { echo "$as_me:1115: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1116 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1117    { (exit 1); exit 1; }; }
1118 fi
1119
1120 ac_ext=c
1121 ac_cpp='$CPP $CPPFLAGS'
1122 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1123 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1125 ac_main_return=return
1126
1127 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1128   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1129                    ECHO_T='     ' ;;
1130   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1131   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1132 esac
1133 echo "#! $SHELL" >conftest.sh
1134 echo  "exit 0"   >>conftest.sh
1135 chmod +x conftest.sh
1136 if { (echo "$as_me:1136: PATH=\".;.\"; conftest.sh") >&5
1137   (PATH=".;."; conftest.sh) 2>&5
1138   ac_status=$?
1139   echo "$as_me:1139: \$? = $ac_status" >&5
1140   (exit $ac_status); }; then
1141   ac_path_separator=';'
1142 else
1143   ac_path_separator=:
1144 fi
1145 PATH_SEPARATOR="$ac_path_separator"
1146 rm -f conftest.sh
1147
1148 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1149
1150 top_builddir=`pwd`
1151
1152 echo "$as_me:1152: checking for egrep" >&5
1153 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1154 if test "${ac_cv_prog_egrep+set}" = set; then
1155   echo $ECHO_N "(cached) $ECHO_C" >&6
1156 else
1157   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1158                 then ac_cv_prog_egrep='grep -E'
1159                 else ac_cv_prog_egrep='egrep'
1160         fi
1161 fi
1162 echo "$as_me:1162: result: $ac_cv_prog_egrep" >&5
1163 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1164         EGREP=$ac_cv_prog_egrep
1165
1166         test -z "$EGREP" && { { echo "$as_me:1166: error: No egrep program found" >&5
1167 echo "$as_me: error: No egrep program found" >&2;}
1168    { (exit 1); exit 1; }; }
1169
1170 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1171 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1172 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1173 cf_cv_abi_version=${NCURSES_MAJOR}
1174 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1175 cf_cv_timestamp=`date`
1176 echo "$as_me:1176: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1177 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1178
1179 if test -f $srcdir/VERSION ; then
1180         echo "$as_me:1180: checking for package version" >&5
1181 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1182
1183         # if there are not enough fields, cut returns the last one...
1184         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1185         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1186         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1187
1188         # this is how CF_BUNDLED_INTL uses $VERSION:
1189         VERSION="$cf_field1"
1190
1191         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1192         test -z "$VERSION_MAJOR" && { { echo "$as_me:1192: error: missing major-version" >&5
1193 echo "$as_me: error: missing major-version" >&2;}
1194    { (exit 1); exit 1; }; }
1195
1196         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1197         test -z "$VERSION_MINOR" && { { echo "$as_me:1197: error: missing minor-version" >&5
1198 echo "$as_me: error: missing minor-version" >&2;}
1199    { (exit 1); exit 1; }; }
1200
1201         echo "$as_me:1201: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1202 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1203
1204         echo "$as_me:1204: checking for package patch date" >&5
1205 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1206         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1207         case .$VERSION_PATCH in
1208         (.)
1209                 { { echo "$as_me:1209: error: missing patch-date $VERSION_PATCH" >&5
1210 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1211    { (exit 1); exit 1; }; }
1212                 ;;
1213         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1214                 ;;
1215         (*)
1216                 { { echo "$as_me:1216: error: illegal patch-date $VERSION_PATCH" >&5
1217 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1218    { (exit 1); exit 1; }; }
1219                 ;;
1220         esac
1221         echo "$as_me:1221: result: $VERSION_PATCH" >&5
1222 echo "${ECHO_T}$VERSION_PATCH" >&6
1223 else
1224         { { echo "$as_me:1224: error: did not find $srcdir/VERSION" >&5
1225 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1226    { (exit 1); exit 1; }; }
1227 fi
1228
1229 # show the actual data that we have for versions:
1230 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1231
1232 echo "${as_me:-configure}:1232: testing ABI VERSION $VERSION ..." 1>&5
1233
1234 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1235
1236 echo "${as_me:-configure}:1236: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1237
1238 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1239
1240 echo "${as_me:-configure}:1240: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1241
1242 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1243
1244 echo "${as_me:-configure}:1244: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1245
1246         cf_PACKAGE=NCURSES
1247         PACKAGE=ncurses
1248
1249 cat >>confdefs.h <<EOF
1250 #define PACKAGE "$PACKAGE"
1251 EOF
1252
1253 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1254
1255         cat >>confdefs.h <<EOF
1256 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1257 EOF
1258
1259         cat >>confdefs.h <<EOF
1260 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1261 EOF
1262
1263 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1264
1265 # Check whether --with-rel-version or --without-rel-version was given.
1266 if test "${with_rel_version+set}" = set; then
1267   withval="$with_rel_version"
1268   { echo "$as_me:1268: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1269 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1270  cf_cv_rel_version=$withval
1271 fi;
1272
1273  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1274  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1275
1276 if test -n "$NCURSES_MAJOR" ; then
1277   case $NCURSES_MAJOR in
1278   ([0-9]*)
1279         ;;
1280   (*)
1281         { { echo "$as_me:1281: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1282 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1283    { (exit 1); exit 1; }; }
1284         ;;
1285   esac
1286 else
1287   { { echo "$as_me:1287: error: Release major-version value is empty" >&5
1288 echo "$as_me: error: Release major-version value is empty" >&2;}
1289    { (exit 1); exit 1; }; }
1290 fi
1291
1292 if test -n "$NCURSES_MINOR" ; then
1293   case $NCURSES_MINOR in
1294   ([0-9]*)
1295         ;;
1296   (*)
1297         { { echo "$as_me:1297: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1298 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1299    { (exit 1); exit 1; }; }
1300         ;;
1301   esac
1302 else
1303   { { echo "$as_me:1303: error: Release minor-version value is empty" >&5
1304 echo "$as_me: error: Release minor-version value is empty" >&2;}
1305    { (exit 1); exit 1; }; }
1306 fi
1307
1308 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1309
1310 # Check whether --with-abi-version or --without-abi-version was given.
1311 if test "${with_abi_version+set}" = set; then
1312   withval="$with_abi_version"
1313
1314         if test "x$cf_cv_abi_version" != "x$withval"
1315         then
1316                 { echo "$as_me:1316: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1317 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1318                 case $cf_cv_rel_version in
1319                 (5.*)
1320                         cf_cv_rel_version=$withval.0
1321                         ;;
1322                 (6.*)
1323                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1324                         ;;
1325                 esac
1326         fi
1327         cf_cv_abi_version=$withval
1328 fi;
1329
1330 if test -n "$cf_cv_abi_version" ; then
1331   case $cf_cv_abi_version in
1332   ([0-9]*)
1333         ;;
1334   (*)
1335         { { echo "$as_me:1335: error: ABI version is not a number: $cf_cv_abi_version" >&5
1336 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1337    { (exit 1); exit 1; }; }
1338         ;;
1339   esac
1340 else
1341   { { echo "$as_me:1341: error: ABI version value is empty" >&5
1342 echo "$as_me: error: ABI version value is empty" >&2;}
1343    { (exit 1); exit 1; }; }
1344 fi
1345
1346 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1347 then
1348         case $cf_cv_rel_version in
1349         (5.*)
1350                 cf_cv_rel_version=$with_abi_version.0
1351                 ;;
1352         esac
1353 fi
1354
1355 ac_aux_dir=
1356 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1357   if test -f $ac_dir/install-sh; then
1358     ac_aux_dir=$ac_dir
1359     ac_install_sh="$ac_aux_dir/install-sh -c"
1360     break
1361   elif test -f $ac_dir/install.sh; then
1362     ac_aux_dir=$ac_dir
1363     ac_install_sh="$ac_aux_dir/install.sh -c"
1364     break
1365   elif test -f $ac_dir/shtool; then
1366     ac_aux_dir=$ac_dir
1367     ac_install_sh="$ac_aux_dir/shtool install -c"
1368     break
1369   fi
1370 done
1371 if test -z "$ac_aux_dir"; then
1372   { { echo "$as_me:1372: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1373 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1374    { (exit 1); exit 1; }; }
1375 fi
1376 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1377 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1378 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1379
1380 # Make sure we can run config.sub.
1381 $ac_config_sub sun4 >/dev/null 2>&1 ||
1382   { { echo "$as_me:1382: error: cannot run $ac_config_sub" >&5
1383 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1384    { (exit 1); exit 1; }; }
1385
1386 echo "$as_me:1386: checking build system type" >&5
1387 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1388 if test "${ac_cv_build+set}" = set; then
1389   echo $ECHO_N "(cached) $ECHO_C" >&6
1390 else
1391   ac_cv_build_alias=$build_alias
1392 test -z "$ac_cv_build_alias" &&
1393   ac_cv_build_alias=`$ac_config_guess`
1394 test -z "$ac_cv_build_alias" &&
1395   { { echo "$as_me:1395: error: cannot guess build type; you must specify one" >&5
1396 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1397    { (exit 1); exit 1; }; }
1398 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1399   { { echo "$as_me:1399: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1400 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1401    { (exit 1); exit 1; }; }
1402
1403 fi
1404 echo "$as_me:1404: result: $ac_cv_build" >&5
1405 echo "${ECHO_T}$ac_cv_build" >&6
1406 build=$ac_cv_build
1407 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1408 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1409 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1410
1411 echo "$as_me:1411: checking host system type" >&5
1412 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1413 if test "${ac_cv_host+set}" = set; then
1414   echo $ECHO_N "(cached) $ECHO_C" >&6
1415 else
1416   ac_cv_host_alias=$host_alias
1417 test -z "$ac_cv_host_alias" &&
1418   ac_cv_host_alias=$ac_cv_build_alias
1419 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1420   { { echo "$as_me:1420: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1421 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1422    { (exit 1); exit 1; }; }
1423
1424 fi
1425 echo "$as_me:1425: result: $ac_cv_host" >&5
1426 echo "${ECHO_T}$ac_cv_host" >&6
1427 host=$ac_cv_host
1428 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1429 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1430 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1431
1432 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1433         echo "$as_me:1433: checking target system type" >&5
1434 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1435 if test "${ac_cv_target+set}" = set; then
1436   echo $ECHO_N "(cached) $ECHO_C" >&6
1437 else
1438   ac_cv_target_alias=$target_alias
1439 test "x$ac_cv_target_alias" = "x" &&
1440   ac_cv_target_alias=$ac_cv_host_alias
1441 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1442   { { echo "$as_me:1442: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1443 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1444    { (exit 1); exit 1; }; }
1445
1446 fi
1447 echo "$as_me:1447: result: $ac_cv_target" >&5
1448 echo "${ECHO_T}$ac_cv_target" >&6
1449 target=$ac_cv_target
1450 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1451 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1452 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1453
1454 # The aliases save the names the user supplied, while $host etc.
1455 # will get canonicalized.
1456 test -n "$target_alias" &&
1457   test "$program_prefix$program_suffix$program_transform_name" = \
1458     NONENONEs,x,x, &&
1459   program_prefix=${target_alias}-
1460         system_name="$host_os"
1461 else
1462         system_name="`(uname -s -r) 2>/dev/null`"
1463         if test -z "$system_name" ; then
1464                 system_name="`(hostname) 2>/dev/null`"
1465         fi
1466 fi
1467 test -n "$system_name" &&
1468 cat >>confdefs.h <<EOF
1469 #define SYSTEM_NAME "$system_name"
1470 EOF
1471
1472 if test "${cf_cv_system_name+set}" = set; then
1473   echo $ECHO_N "(cached) $ECHO_C" >&6
1474 else
1475   cf_cv_system_name="$system_name"
1476 fi
1477
1478 test -z "$system_name" && system_name="$cf_cv_system_name"
1479 test -n "$cf_cv_system_name" && echo "$as_me:1479: result: Configuring for $cf_cv_system_name" >&5
1480 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1481
1482 if test ".$system_name" != ".$cf_cv_system_name" ; then
1483         echo "$as_me:1483: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1484 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1485         { { echo "$as_me:1485: error: \"Please remove config.cache and try again.\"" >&5
1486 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1487    { (exit 1); exit 1; }; }
1488 fi
1489
1490 # Check whether --with-system-type or --without-system-type was given.
1491 if test "${with_system_type+set}" = set; then
1492   withval="$with_system_type"
1493   { echo "$as_me:1493: WARNING: overriding system type to $withval" >&5
1494 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1495         cf_cv_system_name=$withval
1496         host_os=$withval
1497
1498 fi;
1499
1500 ###     Save the given $CFLAGS to allow user-override.
1501 cf_user_CFLAGS="$CFLAGS"
1502
1503 ###     Default install-location
1504
1505 echo "$as_me:1505: checking for prefix" >&5
1506 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1507 if test "x$prefix" = "xNONE" ; then
1508         case "$cf_cv_system_name" in
1509                 # non-vendor systems don't have a conflict
1510         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1511                 prefix=/usr
1512                 ;;
1513         (*)     prefix=$ac_default_prefix
1514                 ;;
1515         esac
1516 fi
1517 echo "$as_me:1517: result: $prefix" >&5
1518 echo "${ECHO_T}$prefix" >&6
1519
1520 if test "x$prefix" = "xNONE" ; then
1521 echo "$as_me:1521: checking for default include-directory" >&5
1522 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1523 test -n "$verbose" && echo 1>&6
1524 for cf_symbol in \
1525         $includedir \
1526         $includedir/ncurses \
1527         $prefix/include \
1528         $prefix/include/ncurses \
1529         /usr/local/include \
1530         /usr/local/include/ncurses \
1531         /usr/include \
1532         /usr/include/ncurses
1533 do
1534         cf_dir=`eval echo $cf_symbol`
1535         if test -f $cf_dir/curses.h ; then
1536         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1537                 includedir="$cf_symbol"
1538                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1539                 break
1540         fi
1541         fi
1542         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1543 done
1544 echo "$as_me:1544: result: $includedir" >&5
1545 echo "${ECHO_T}$includedir" >&6
1546 fi
1547
1548 ### Defaults for ncurses ABI
1549
1550 case x$cf_cv_abi_version in
1551 (x[6789])
1552         cf_dft_ext_colors=yes
1553         cf_dft_ext_const=yes
1554         cf_dft_ext_mouse=yes
1555         cf_dft_ext_putwin=yes
1556         cf_dft_ext_spfuncs=yes
1557         cf_dft_filter_syms=yes
1558         cf_dft_chtype=uint32_t
1559         cf_dft_mmask_t=uint32_t
1560         cf_dft_interop=yes
1561         cf_dft_tparm_arg=intptr_t
1562         cf_dft_with_lp64=yes
1563         ;;
1564 (*)
1565         cf_dft_ext_colors=no
1566         cf_dft_ext_const=no
1567         cf_dft_ext_mouse=no
1568         cf_dft_ext_putwin=no
1569         cf_dft_ext_spfuncs=no
1570         cf_dft_filter_syms=no
1571         cf_dft_chtype=auto
1572         cf_dft_mmask_t=auto
1573         cf_dft_interop=no
1574         cf_dft_tparm_arg=long
1575         cf_dft_with_lp64=no
1576         ;;
1577 esac
1578
1579 ###     Checks for programs.
1580
1581 # Check whether --with-ada or --without-ada was given.
1582 if test "${with_ada+set}" = set; then
1583   withval="$with_ada"
1584   cf_with_ada=$withval
1585 else
1586   cf_with_ada=yes
1587 fi;
1588 if test "x$cf_with_ada" = xyes
1589 then
1590         cf_PROG_CC="gnatgcc gcc cc"
1591 else
1592         cf_PROG_CC="gcc cc"
1593 fi
1594
1595 ac_ext=c
1596 ac_cpp='$CPP $CPPFLAGS'
1597 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1598 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1599 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1600 ac_main_return=return
1601 if test -n "$ac_tool_prefix"; then
1602   for ac_prog in $cf_PROG_CC
1603   do
1604     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1605 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1606 echo "$as_me:1606: checking for $ac_word" >&5
1607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1608 if test "${ac_cv_prog_CC+set}" = set; then
1609   echo $ECHO_N "(cached) $ECHO_C" >&6
1610 else
1611   if test -n "$CC"; then
1612   ac_cv_prog_CC="$CC" # Let the user override the test.
1613 else
1614   ac_save_IFS=$IFS; IFS=$ac_path_separator
1615 ac_dummy="$PATH"
1616 for ac_dir in $ac_dummy; do
1617   IFS=$ac_save_IFS
1618   test -z "$ac_dir" && ac_dir=.
1619   $as_executable_p "$ac_dir/$ac_word" || continue
1620 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1621 echo "$as_me:1621: found $ac_dir/$ac_word" >&5
1622 break
1623 done
1624
1625 fi
1626 fi
1627 CC=$ac_cv_prog_CC
1628 if test -n "$CC"; then
1629   echo "$as_me:1629: result: $CC" >&5
1630 echo "${ECHO_T}$CC" >&6
1631 else
1632   echo "$as_me:1632: result: no" >&5
1633 echo "${ECHO_T}no" >&6
1634 fi
1635
1636     test -n "$CC" && break
1637   done
1638 fi
1639 if test -z "$CC"; then
1640   ac_ct_CC=$CC
1641   for ac_prog in $cf_PROG_CC
1642 do
1643   # Extract the first word of "$ac_prog", so it can be a program name with args.
1644 set dummy $ac_prog; ac_word=$2
1645 echo "$as_me:1645: checking for $ac_word" >&5
1646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1647 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1648   echo $ECHO_N "(cached) $ECHO_C" >&6
1649 else
1650   if test -n "$ac_ct_CC"; then
1651   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1652 else
1653   ac_save_IFS=$IFS; IFS=$ac_path_separator
1654 ac_dummy="$PATH"
1655 for ac_dir in $ac_dummy; do
1656   IFS=$ac_save_IFS
1657   test -z "$ac_dir" && ac_dir=.
1658   $as_executable_p "$ac_dir/$ac_word" || continue
1659 ac_cv_prog_ac_ct_CC="$ac_prog"
1660 echo "$as_me:1660: found $ac_dir/$ac_word" >&5
1661 break
1662 done
1663
1664 fi
1665 fi
1666 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1667 if test -n "$ac_ct_CC"; then
1668   echo "$as_me:1668: result: $ac_ct_CC" >&5
1669 echo "${ECHO_T}$ac_ct_CC" >&6
1670 else
1671   echo "$as_me:1671: result: no" >&5
1672 echo "${ECHO_T}no" >&6
1673 fi
1674
1675   test -n "$ac_ct_CC" && break
1676 done
1677
1678   CC=$ac_ct_CC
1679 fi
1680
1681 test -z "$CC" && { { echo "$as_me:1681: error: no acceptable cc found in \$PATH" >&5
1682 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1683    { (exit 1); exit 1; }; }
1684
1685 # Provide some information about the compiler.
1686 echo "$as_me:1686:" \
1687      "checking for C compiler version" >&5
1688 ac_compiler=`set X $ac_compile; echo $2`
1689 { (eval echo "$as_me:1689: \"$ac_compiler --version </dev/null >&5\"") >&5
1690   (eval $ac_compiler --version </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694 { (eval echo "$as_me:1694: \"$ac_compiler -v </dev/null >&5\"") >&5
1695   (eval $ac_compiler -v </dev/null >&5) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }
1699 { (eval echo "$as_me:1699: \"$ac_compiler -V </dev/null >&5\"") >&5
1700   (eval $ac_compiler -V </dev/null >&5) 2>&5
1701   ac_status=$?
1702   echo "$as_me:1702: \$? = $ac_status" >&5
1703   (exit $ac_status); }
1704
1705 cat >conftest.$ac_ext <<_ACEOF
1706 #line 1706 "configure"
1707 #include "confdefs.h"
1708
1709 int
1710 main (void)
1711 {
1712
1713   ;
1714   return 0;
1715 }
1716 _ACEOF
1717 ac_clean_files_save=$ac_clean_files
1718 ac_clean_files="$ac_clean_files a.out a.exe"
1719 # Try to create an executable without -o first, disregard a.out.
1720 # It will help us diagnose broken compilers, and finding out an intuition
1721 # of exeext.
1722 echo "$as_me:1722: checking for C compiler default output" >&5
1723 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1724 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1725 if { (eval echo "$as_me:1725: \"$ac_link_default\"") >&5
1726   (eval $ac_link_default) 2>&5
1727   ac_status=$?
1728   echo "$as_me:1728: \$? = $ac_status" >&5
1729   (exit $ac_status); }; then
1730   # Find the output, starting from the most likely.  This scheme is
1731 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1732 # resort.
1733 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1734                 ls a.out conftest 2>/dev/null;
1735                 ls a.* conftest.* 2>/dev/null`; do
1736   case $ac_file in
1737     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1738     a.out ) # We found the default executable, but exeext='' is most
1739             # certainly right.
1740             break;;
1741     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1742           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1743           export ac_cv_exeext
1744           break;;
1745     * ) break;;
1746   esac
1747 done
1748 else
1749   echo "$as_me: failed program was:" >&5
1750 cat conftest.$ac_ext >&5
1751 { { echo "$as_me:1751: error: C compiler cannot create executables" >&5
1752 echo "$as_me: error: C compiler cannot create executables" >&2;}
1753    { (exit 77); exit 77; }; }
1754 fi
1755
1756 ac_exeext=$ac_cv_exeext
1757 echo "$as_me:1757: result: $ac_file" >&5
1758 echo "${ECHO_T}$ac_file" >&6
1759
1760 # Check the compiler produces executables we can run.  If not, either
1761 # the compiler is broken, or we cross compile.
1762 echo "$as_me:1762: checking whether the C compiler works" >&5
1763 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1764 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1765 # If not cross compiling, check that we can run a simple program.
1766 if test "$cross_compiling" != yes; then
1767   if { ac_try='./$ac_file'
1768   { (eval echo "$as_me:1768: \"$ac_try\"") >&5
1769   (eval $ac_try) 2>&5
1770   ac_status=$?
1771   echo "$as_me:1771: \$? = $ac_status" >&5
1772   (exit $ac_status); }; }; then
1773     cross_compiling=no
1774   else
1775     if test "$cross_compiling" = maybe; then
1776         cross_compiling=yes
1777     else
1778         { { echo "$as_me:1778: error: cannot run C compiled programs.
1779 If you meant to cross compile, use \`--host'." >&5
1780 echo "$as_me: error: cannot run C compiled programs.
1781 If you meant to cross compile, use \`--host'." >&2;}
1782    { (exit 1); exit 1; }; }
1783     fi
1784   fi
1785 fi
1786 echo "$as_me:1786: result: yes" >&5
1787 echo "${ECHO_T}yes" >&6
1788
1789 rm -f a.out a.exe conftest$ac_cv_exeext
1790 ac_clean_files=$ac_clean_files_save
1791 # Check the compiler produces executables we can run.  If not, either
1792 # the compiler is broken, or we cross compile.
1793 echo "$as_me:1793: checking whether we are cross compiling" >&5
1794 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1795 echo "$as_me:1795: result: $cross_compiling" >&5
1796 echo "${ECHO_T}$cross_compiling" >&6
1797
1798 echo "$as_me:1798: checking for executable suffix" >&5
1799 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1800 if { (eval echo "$as_me:1800: \"$ac_link\"") >&5
1801   (eval $ac_link) 2>&5
1802   ac_status=$?
1803   echo "$as_me:1803: \$? = $ac_status" >&5
1804   (exit $ac_status); }; then
1805   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1806 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1807 # work properly (i.e., refer to `conftest.exe'), while it won't with
1808 # `rm'.
1809 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1810   case $ac_file in
1811     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1812     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1813           export ac_cv_exeext
1814           break;;
1815     * ) break;;
1816   esac
1817 done
1818 else
1819   { { echo "$as_me:1819: error: cannot compute EXEEXT: cannot compile and link" >&5
1820 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1821    { (exit 1); exit 1; }; }
1822 fi
1823
1824 rm -f conftest$ac_cv_exeext
1825 echo "$as_me:1825: result: $ac_cv_exeext" >&5
1826 echo "${ECHO_T}$ac_cv_exeext" >&6
1827
1828 rm -f conftest.$ac_ext
1829 EXEEXT=$ac_cv_exeext
1830 ac_exeext=$EXEEXT
1831 echo "$as_me:1831: checking for object suffix" >&5
1832 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1833 if test "${ac_cv_objext+set}" = set; then
1834   echo $ECHO_N "(cached) $ECHO_C" >&6
1835 else
1836   cat >conftest.$ac_ext <<_ACEOF
1837 #line 1837 "configure"
1838 #include "confdefs.h"
1839
1840 int
1841 main (void)
1842 {
1843
1844   ;
1845   return 0;
1846 }
1847 _ACEOF
1848 rm -f conftest.o conftest.obj
1849 if { (eval echo "$as_me:1849: \"$ac_compile\"") >&5
1850   (eval $ac_compile) 2>&5
1851   ac_status=$?
1852   echo "$as_me:1852: \$? = $ac_status" >&5
1853   (exit $ac_status); }; then
1854   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1855   case $ac_file in
1856     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1857     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1858        break;;
1859   esac
1860 done
1861 else
1862   echo "$as_me: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1864 { { echo "$as_me:1864: error: cannot compute OBJEXT: cannot compile" >&5
1865 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1866    { (exit 1); exit 1; }; }
1867 fi
1868
1869 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1870 fi
1871 echo "$as_me:1871: result: $ac_cv_objext" >&5
1872 echo "${ECHO_T}$ac_cv_objext" >&6
1873 OBJEXT=$ac_cv_objext
1874 ac_objext=$OBJEXT
1875 echo "$as_me:1875: checking whether we are using the GNU C compiler" >&5
1876 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1877 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1878   echo $ECHO_N "(cached) $ECHO_C" >&6
1879 else
1880   cat >conftest.$ac_ext <<_ACEOF
1881 #line 1881 "configure"
1882 #include "confdefs.h"
1883
1884 int
1885 main (void)
1886 {
1887 #ifndef __GNUC__
1888        choke me
1889 #endif
1890
1891   ;
1892   return 0;
1893 }
1894 _ACEOF
1895 rm -f conftest.$ac_objext
1896 if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
1897   (eval $ac_compile) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); } &&
1901          { ac_try='test -s conftest.$ac_objext'
1902   { (eval echo "$as_me:1902: \"$ac_try\"") >&5
1903   (eval $ac_try) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); }; }; then
1907   ac_compiler_gnu=yes
1908 else
1909   echo "$as_me: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1911 ac_compiler_gnu=no
1912 fi
1913 rm -f conftest.$ac_objext conftest.$ac_ext
1914 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1915
1916 fi
1917 echo "$as_me:1917: result: $ac_cv_c_compiler_gnu" >&5
1918 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1919 GCC=`test $ac_compiler_gnu = yes && echo yes`
1920 ac_test_CFLAGS=${CFLAGS+set}
1921 ac_save_CFLAGS=$CFLAGS
1922 CFLAGS="-g"
1923 echo "$as_me:1923: checking whether $CC accepts -g" >&5
1924 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1925 if test "${ac_cv_prog_cc_g+set}" = set; then
1926   echo $ECHO_N "(cached) $ECHO_C" >&6
1927 else
1928   cat >conftest.$ac_ext <<_ACEOF
1929 #line 1929 "configure"
1930 #include "confdefs.h"
1931
1932 int
1933 main (void)
1934 {
1935
1936   ;
1937   return 0;
1938 }
1939 _ACEOF
1940 rm -f conftest.$ac_objext
1941 if { (eval echo "$as_me:1941: \"$ac_compile\"") >&5
1942   (eval $ac_compile) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit $ac_status); } &&
1946          { ac_try='test -s conftest.$ac_objext'
1947   { (eval echo "$as_me:1947: \"$ac_try\"") >&5
1948   (eval $ac_try) 2>&5
1949   ac_status=$?
1950   echo "$as_me:1950: \$? = $ac_status" >&5
1951   (exit $ac_status); }; }; then
1952   ac_cv_prog_cc_g=yes
1953 else
1954   echo "$as_me: failed program was:" >&5
1955 cat conftest.$ac_ext >&5
1956 ac_cv_prog_cc_g=no
1957 fi
1958 rm -f conftest.$ac_objext conftest.$ac_ext
1959 fi
1960 echo "$as_me:1960: result: $ac_cv_prog_cc_g" >&5
1961 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1962 if test "$ac_test_CFLAGS" = set; then
1963   CFLAGS=$ac_save_CFLAGS
1964 elif test $ac_cv_prog_cc_g = yes; then
1965   if test "$GCC" = yes; then
1966     CFLAGS="-g -O2"
1967   else
1968     CFLAGS="-g"
1969   fi
1970 else
1971   if test "$GCC" = yes; then
1972     CFLAGS="-O2"
1973   else
1974     CFLAGS=
1975   fi
1976 fi
1977 # Some people use a C++ compiler to compile C.  Since we use `exit',
1978 # in C++ we need to declare it.  In case someone uses the same compiler
1979 # for both compiling C and C++ we need to have the C++ compiler decide
1980 # the declaration of exit, since it's the most demanding environment.
1981 cat >conftest.$ac_ext <<_ACEOF
1982 #ifndef __cplusplus
1983   choke me
1984 #endif
1985 _ACEOF
1986 rm -f conftest.$ac_objext
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988   (eval $ac_compile) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); } &&
1992          { ac_try='test -s conftest.$ac_objext'
1993   { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994   (eval $ac_try) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); }; }; then
1998   for ac_declaration in \
1999    ''\
2000    '#include <stdlib.h>' \
2001    'extern "C" void std::exit (int) throw (); using std::exit;' \
2002    'extern "C" void std::exit (int); using std::exit;' \
2003    'extern "C" void exit (int) throw ();' \
2004    'extern "C" void exit (int);' \
2005    'void exit (int);'
2006 do
2007   cat >conftest.$ac_ext <<_ACEOF
2008 #line 2008 "configure"
2009 #include "confdefs.h"
2010 #include <stdlib.h>
2011 $ac_declaration
2012 int
2013 main (void)
2014 {
2015 exit (42);
2016   ;
2017   return 0;
2018 }
2019 _ACEOF
2020 rm -f conftest.$ac_objext
2021 if { (eval echo "$as_me:2021: \"$ac_compile\"") >&5
2022   (eval $ac_compile) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit $ac_status); } &&
2026          { ac_try='test -s conftest.$ac_objext'
2027   { (eval echo "$as_me:2027: \"$ac_try\"") >&5
2028   (eval $ac_try) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit $ac_status); }; }; then
2032   :
2033 else
2034   echo "$as_me: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 continue
2037 fi
2038 rm -f conftest.$ac_objext conftest.$ac_ext
2039   cat >conftest.$ac_ext <<_ACEOF
2040 #line 2040 "configure"
2041 #include "confdefs.h"
2042 $ac_declaration
2043 int
2044 main (void)
2045 {
2046 exit (42);
2047   ;
2048   return 0;
2049 }
2050 _ACEOF
2051 rm -f conftest.$ac_objext
2052 if { (eval echo "$as_me:2052: \"$ac_compile\"") >&5
2053   (eval $ac_compile) 2>&5
2054   ac_status=$?
2055   echo "$as_me:2055: \$? = $ac_status" >&5
2056   (exit $ac_status); } &&
2057          { ac_try='test -s conftest.$ac_objext'
2058   { (eval echo "$as_me:2058: \"$ac_try\"") >&5
2059   (eval $ac_try) 2>&5
2060   ac_status=$?
2061   echo "$as_me:2061: \$? = $ac_status" >&5
2062   (exit $ac_status); }; }; then
2063   break
2064 else
2065   echo "$as_me: failed program was:" >&5
2066 cat conftest.$ac_ext >&5
2067 fi
2068 rm -f conftest.$ac_objext conftest.$ac_ext
2069 done
2070 rm -rf conftest*
2071 if test -n "$ac_declaration"; then
2072   echo '#ifdef __cplusplus' >>confdefs.h
2073   echo $ac_declaration      >>confdefs.h
2074   echo '#endif'             >>confdefs.h
2075 fi
2076
2077 else
2078   echo "$as_me: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2080 fi
2081 rm -f conftest.$ac_objext conftest.$ac_ext
2082 ac_ext=c
2083 ac_cpp='$CPP $CPPFLAGS'
2084 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2085 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2086 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2087 ac_main_return=return
2088
2089 GCC_VERSION=none
2090 if test "$GCC" = yes ; then
2091         echo "$as_me:2091: checking version of $CC" >&5
2092 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2093         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2094         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2095         echo "$as_me:2095: result: $GCC_VERSION" >&5
2096 echo "${ECHO_T}$GCC_VERSION" >&6
2097 fi
2098
2099 echo "$as_me:2099: checking for $CC option to accept ANSI C" >&5
2100 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2101 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2102   echo $ECHO_N "(cached) $ECHO_C" >&6
2103 else
2104   ac_cv_prog_cc_stdc=no
2105 ac_save_CC=$CC
2106 cat >conftest.$ac_ext <<_ACEOF
2107 #line 2107 "configure"
2108 #include "confdefs.h"
2109 #include <stdarg.h>
2110 #include <stdio.h>
2111 #include <sys/types.h>
2112 #include <sys/stat.h>
2113 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2114 struct buf { int x; };
2115 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2116 static char *e (p, i)
2117      char **p;
2118      int i;
2119 {
2120   return p[i];
2121 }
2122 static char *f (char * (*g) (char **, int), char **p, ...)
2123 {
2124   char *s;
2125   va_list v;
2126   va_start (v,p);
2127   s = g (p, va_arg (v,int));
2128   va_end (v);
2129   return s;
2130 }
2131 int test (int i, double x);
2132 struct s1 {int (*f) (int a);};
2133 struct s2 {int (*f) (double a);};
2134 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2135 int argc;
2136 char **argv;
2137 int
2138 main (void)
2139 {
2140 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2141   ;
2142   return 0;
2143 }
2144 _ACEOF
2145 # Don't try gcc -ansi; that turns off useful extensions and
2146 # breaks some systems' header files.
2147 # AIX                   -qlanglvl=ansi
2148 # Ultrix and OSF/1      -std1
2149 # HP-UX 10.20 and later -Ae
2150 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2151 # SVR4                  -Xc -D__EXTENSIONS__
2152 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2153 do
2154   CC="$ac_save_CC $ac_arg"
2155   rm -f conftest.$ac_objext
2156 if { (eval echo "$as_me:2156: \"$ac_compile\"") >&5
2157   (eval $ac_compile) 2>&5
2158   ac_status=$?
2159   echo "$as_me:2159: \$? = $ac_status" >&5
2160   (exit $ac_status); } &&
2161          { ac_try='test -s conftest.$ac_objext'
2162   { (eval echo "$as_me:2162: \"$ac_try\"") >&5
2163   (eval $ac_try) 2>&5
2164   ac_status=$?
2165   echo "$as_me:2165: \$? = $ac_status" >&5
2166   (exit $ac_status); }; }; then
2167   ac_cv_prog_cc_stdc=$ac_arg
2168 break
2169 else
2170   echo "$as_me: failed program was:" >&5
2171 cat conftest.$ac_ext >&5
2172 fi
2173 rm -f conftest.$ac_objext
2174 done
2175 rm -f conftest.$ac_ext conftest.$ac_objext
2176 CC=$ac_save_CC
2177
2178 fi
2179
2180 case "x$ac_cv_prog_cc_stdc" in
2181   x|xno)
2182     echo "$as_me:2182: result: none needed" >&5
2183 echo "${ECHO_T}none needed" >&6 ;;
2184   *)
2185     echo "$as_me:2185: result: $ac_cv_prog_cc_stdc" >&5
2186 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2187     CC="$CC $ac_cv_prog_cc_stdc" ;;
2188 esac
2189
2190 # This should have been defined by AC_PROG_CC
2191 : ${CC:=cc}
2192
2193 echo "$as_me:2193: checking \$CFLAGS variable" >&5
2194 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2195 case "x$CFLAGS" in
2196 (*-[IUD]*)
2197         echo "$as_me:2197: result: broken" >&5
2198 echo "${ECHO_T}broken" >&6
2199         { echo "$as_me:2199: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2200 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2201         cf_flags="$CFLAGS"
2202         CFLAGS=
2203         for cf_arg in $cf_flags
2204         do
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         done
2305         ;;
2306 (*)
2307         echo "$as_me:2307: result: ok" >&5
2308 echo "${ECHO_T}ok" >&6
2309         ;;
2310 esac
2311
2312 echo "$as_me:2312: checking \$CC variable" >&5
2313 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2314 case "$CC" in
2315 (*[\ \  ]-*)
2316         echo "$as_me:2316: result: broken" >&5
2317 echo "${ECHO_T}broken" >&6
2318         { echo "$as_me:2318: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2319 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2320         # humor him...
2321         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2322         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2323         CC="$cf_prog"
2324         for cf_arg in $cf_flags
2325         do
2326                 case "x$cf_arg" in
2327                 (x-[IUDfgOW]*)
2328
2329 cf_fix_cppflags=no
2330 cf_new_cflags=
2331 cf_new_cppflags=
2332 cf_new_extra_cppflags=
2333
2334 for cf_add_cflags in $cf_arg
2335 do
2336 case $cf_fix_cppflags in
2337 (no)
2338         case $cf_add_cflags in
2339         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2340                 case $cf_add_cflags in
2341                 (-D*)
2342                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2343
2344                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2345                                 && test -z "${cf_tst_cflags}" \
2346                                 && cf_fix_cppflags=yes
2347
2348                         if test $cf_fix_cppflags = yes ; then
2349
2350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353                                 continue
2354                         elif test "${cf_tst_cflags}" = "\"'" ; then
2355
2356         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2357         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2358
2359                                 continue
2360                         fi
2361                         ;;
2362                 esac
2363                 case "$CPPFLAGS" in
2364                 (*$cf_add_cflags)
2365                         ;;
2366                 (*)
2367                         case $cf_add_cflags in
2368                         (-D*)
2369                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2370
2371 CPPFLAGS=`echo "$CPPFLAGS" | \
2372         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2373                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2374
2375                                 ;;
2376                         esac
2377
2378         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2379         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2380
2381                         ;;
2382                 esac
2383                 ;;
2384         (*)
2385
2386         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2387         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2388
2389                 ;;
2390         esac
2391         ;;
2392 (yes)
2393
2394         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2395         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2396
2397         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2398
2399         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2400                 && test -z "${cf_tst_cflags}" \
2401                 && cf_fix_cppflags=no
2402         ;;
2403 esac
2404 done
2405
2406 if test -n "$cf_new_cflags" ; then
2407
2408         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2409         CFLAGS="${CFLAGS}$cf_new_cflags"
2410
2411 fi
2412
2413 if test -n "$cf_new_cppflags" ; then
2414
2415         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2416         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2417
2418 fi
2419
2420 if test -n "$cf_new_extra_cppflags" ; then
2421
2422         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2423         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2424
2425 fi
2426
2427                         ;;
2428                 (*)
2429                         CC="$CC $cf_arg"
2430                         ;;
2431                 esac
2432         done
2433         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2434
2435 echo "${as_me:-configure}:2435: testing resulting CC: '$CC' ..." 1>&5
2436
2437         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2438
2439 echo "${as_me:-configure}:2439: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2440
2441         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2442
2443 echo "${as_me:-configure}:2443: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2444
2445         ;;
2446 (*)
2447         echo "$as_me:2447: result: ok" >&5
2448 echo "${ECHO_T}ok" >&6
2449         ;;
2450 esac
2451
2452 ac_ext=c
2453 ac_cpp='$CPP $CPPFLAGS'
2454 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2455 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2457 ac_main_return=return
2458 echo "$as_me:2458: checking how to run the C preprocessor" >&5
2459 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2460 # On Suns, sometimes $CPP names a directory.
2461 if test -n "$CPP" && test -d "$CPP"; then
2462   CPP=
2463 fi
2464 if test -z "$CPP"; then
2465   if test "${ac_cv_prog_CPP+set}" = set; then
2466   echo $ECHO_N "(cached) $ECHO_C" >&6
2467 else
2468       # Double quotes because CPP needs to be expanded
2469     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470     do
2471       ac_preproc_ok=false
2472 for ac_c_preproc_warn_flag in '' yes
2473 do
2474   # Use a header file that comes with gcc, so configuring glibc
2475   # with a fresh cross-compiler works.
2476   # On the NeXT, cc -E runs the code through the compiler's parser,
2477   # not just through cpp. "Syntax error" is here to catch this case.
2478   cat >conftest.$ac_ext <<_ACEOF
2479 #line 2479 "configure"
2480 #include "confdefs.h"
2481 #include <assert.h>
2482                      Syntax error
2483 _ACEOF
2484 if { (eval echo "$as_me:2484: \"$ac_cpp conftest.$ac_ext\"") >&5
2485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2486   ac_status=$?
2487   egrep -v '^ *\+' conftest.er1 >conftest.err
2488   rm -f conftest.er1
2489   cat conftest.err >&5
2490   echo "$as_me:2490: \$? = $ac_status" >&5
2491   (exit $ac_status); } >/dev/null; then
2492   if test -s conftest.err; then
2493     ac_cpp_err=$ac_c_preproc_warn_flag
2494   else
2495     ac_cpp_err=
2496   fi
2497 else
2498   ac_cpp_err=yes
2499 fi
2500 if test -z "$ac_cpp_err"; then
2501   :
2502 else
2503   echo "$as_me: failed program was:" >&5
2504   cat conftest.$ac_ext >&5
2505   # Broken: fails on valid input.
2506 continue
2507 fi
2508 rm -f conftest.err conftest.$ac_ext
2509
2510   # OK, works on sane cases.  Now check whether non-existent headers
2511   # can be detected and how.
2512   cat >conftest.$ac_ext <<_ACEOF
2513 #line 2513 "configure"
2514 #include "confdefs.h"
2515 #include <ac_nonexistent.h>
2516 _ACEOF
2517 if { (eval echo "$as_me:2517: \"$ac_cpp conftest.$ac_ext\"") >&5
2518   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2519   ac_status=$?
2520   egrep -v '^ *\+' conftest.er1 >conftest.err
2521   rm -f conftest.er1
2522   cat conftest.err >&5
2523   echo "$as_me:2523: \$? = $ac_status" >&5
2524   (exit $ac_status); } >/dev/null; then
2525   if test -s conftest.err; then
2526     ac_cpp_err=$ac_c_preproc_warn_flag
2527   else
2528     ac_cpp_err=
2529   fi
2530 else
2531   ac_cpp_err=yes
2532 fi
2533 if test -z "$ac_cpp_err"; then
2534   # Broken: success on invalid input.
2535 continue
2536 else
2537   echo "$as_me: failed program was:" >&5
2538   cat conftest.$ac_ext >&5
2539   # Passes both tests.
2540 ac_preproc_ok=:
2541 break
2542 fi
2543 rm -f conftest.err conftest.$ac_ext
2544
2545 done
2546 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2547 rm -f conftest.err conftest.$ac_ext
2548 if $ac_preproc_ok; then
2549   break
2550 fi
2551
2552     done
2553     ac_cv_prog_CPP=$CPP
2554
2555 fi
2556   CPP=$ac_cv_prog_CPP
2557 else
2558   ac_cv_prog_CPP=$CPP
2559 fi
2560 echo "$as_me:2560: result: $CPP" >&5
2561 echo "${ECHO_T}$CPP" >&6
2562 ac_preproc_ok=false
2563 for ac_c_preproc_warn_flag in '' yes
2564 do
2565   # Use a header file that comes with gcc, so configuring glibc
2566   # with a fresh cross-compiler works.
2567   # On the NeXT, cc -E runs the code through the compiler's parser,
2568   # not just through cpp. "Syntax error" is here to catch this case.
2569   cat >conftest.$ac_ext <<_ACEOF
2570 #line 2570 "configure"
2571 #include "confdefs.h"
2572 #include <assert.h>
2573                      Syntax error
2574 _ACEOF
2575 if { (eval echo "$as_me:2575: \"$ac_cpp conftest.$ac_ext\"") >&5
2576   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2577   ac_status=$?
2578   egrep -v '^ *\+' conftest.er1 >conftest.err
2579   rm -f conftest.er1
2580   cat conftest.err >&5
2581   echo "$as_me:2581: \$? = $ac_status" >&5
2582   (exit $ac_status); } >/dev/null; then
2583   if test -s conftest.err; then
2584     ac_cpp_err=$ac_c_preproc_warn_flag
2585   else
2586     ac_cpp_err=
2587   fi
2588 else
2589   ac_cpp_err=yes
2590 fi
2591 if test -z "$ac_cpp_err"; then
2592   :
2593 else
2594   echo "$as_me: failed program was:" >&5
2595   cat conftest.$ac_ext >&5
2596   # Broken: fails on valid input.
2597 continue
2598 fi
2599 rm -f conftest.err conftest.$ac_ext
2600
2601   # OK, works on sane cases.  Now check whether non-existent headers
2602   # can be detected and how.
2603   cat >conftest.$ac_ext <<_ACEOF
2604 #line 2604 "configure"
2605 #include "confdefs.h"
2606 #include <ac_nonexistent.h>
2607 _ACEOF
2608 if { (eval echo "$as_me:2608: \"$ac_cpp conftest.$ac_ext\"") >&5
2609   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2610   ac_status=$?
2611   egrep -v '^ *\+' conftest.er1 >conftest.err
2612   rm -f conftest.er1
2613   cat conftest.err >&5
2614   echo "$as_me:2614: \$? = $ac_status" >&5
2615   (exit $ac_status); } >/dev/null; then
2616   if test -s conftest.err; then
2617     ac_cpp_err=$ac_c_preproc_warn_flag
2618   else
2619     ac_cpp_err=
2620   fi
2621 else
2622   ac_cpp_err=yes
2623 fi
2624 if test -z "$ac_cpp_err"; then
2625   # Broken: success on invalid input.
2626 continue
2627 else
2628   echo "$as_me: failed program was:" >&5
2629   cat conftest.$ac_ext >&5
2630   # Passes both tests.
2631 ac_preproc_ok=:
2632 break
2633 fi
2634 rm -f conftest.err conftest.$ac_ext
2635
2636 done
2637 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2638 rm -f conftest.err conftest.$ac_ext
2639 if $ac_preproc_ok; then
2640   :
2641 else
2642   { { echo "$as_me:2642: error: C preprocessor \"$CPP\" fails sanity check" >&5
2643 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2644    { (exit 1); exit 1; }; }
2645 fi
2646
2647 ac_ext=c
2648 ac_cpp='$CPP $CPPFLAGS'
2649 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2650 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2651 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2652 ac_main_return=return
2653
2654 if test $ac_cv_c_compiler_gnu = yes; then
2655     echo "$as_me:2655: checking whether $CC needs -traditional" >&5
2656 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2657 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2658   echo $ECHO_N "(cached) $ECHO_C" >&6
2659 else
2660     ac_pattern="Autoconf.*'x'"
2661   cat >conftest.$ac_ext <<_ACEOF
2662 #line 2662 "configure"
2663 #include "confdefs.h"
2664 #include <sgtty.h>
2665 int Autoconf = TIOCGETP;
2666 _ACEOF
2667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2668   egrep "$ac_pattern" >/dev/null 2>&1; then
2669   ac_cv_prog_gcc_traditional=yes
2670 else
2671   ac_cv_prog_gcc_traditional=no
2672 fi
2673 rm -rf conftest*
2674
2675   if test $ac_cv_prog_gcc_traditional = no; then
2676     cat >conftest.$ac_ext <<_ACEOF
2677 #line 2677 "configure"
2678 #include "confdefs.h"
2679 #include <termio.h>
2680 int Autoconf = TCGETA;
2681 _ACEOF
2682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2683   egrep "$ac_pattern" >/dev/null 2>&1; then
2684   ac_cv_prog_gcc_traditional=yes
2685 fi
2686 rm -rf conftest*
2687
2688   fi
2689 fi
2690 echo "$as_me:2690: result: $ac_cv_prog_gcc_traditional" >&5
2691 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2692   if test $ac_cv_prog_gcc_traditional = yes; then
2693     CC="$CC -traditional"
2694   fi
2695 fi
2696
2697 echo "$as_me:2697: checking whether $CC understands -c and -o together" >&5
2698 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2699 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2700   echo $ECHO_N "(cached) $ECHO_C" >&6
2701 else
2702
2703 cat > conftest.$ac_ext <<CF_EOF
2704 int main(void)
2705 {
2706         ${cf_cv_main_return:-return}(0);
2707 }
2708 CF_EOF
2709 # We do the test twice because some compilers refuse to overwrite an
2710 # existing .o file with -o, though they will create one.
2711 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2712 if { (eval echo "$as_me:2712: \"$ac_try\"") >&5
2713   (eval $ac_try) 2>&5
2714   ac_status=$?
2715   echo "$as_me:2715: \$? = $ac_status" >&5
2716   (exit $ac_status); } &&
2717   test -f conftest2.$ac_objext && { (eval echo "$as_me:2717: \"$ac_try\"") >&5
2718   (eval $ac_try) 2>&5
2719   ac_status=$?
2720   echo "$as_me:2720: \$? = $ac_status" >&5
2721   (exit $ac_status); };
2722 then
2723   eval cf_cv_prog_CC_c_o=yes
2724 else
2725   eval cf_cv_prog_CC_c_o=no
2726 fi
2727 rm -rf conftest*
2728
2729 fi
2730 if test $cf_cv_prog_CC_c_o = yes; then
2731   echo "$as_me:2731: result: yes" >&5
2732 echo "${ECHO_T}yes" >&6
2733 else
2734   echo "$as_me:2734: result: no" >&5
2735 echo "${ECHO_T}no" >&6
2736 fi
2737
2738 if test "$cross_compiling" = yes ; then
2739         LDCONFIG=:
2740 else
2741         case "$cf_cv_system_name" in
2742         (dragonfly*|mirbsd*|freebsd*)
2743                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2744                 ;;
2745         (*) LDPATH=$PATH:/sbin:/usr/sbin
2746                 # Extract the first word of "ldconfig", so it can be a program name with args.
2747 set dummy ldconfig; ac_word=$2
2748 echo "$as_me:2748: checking for $ac_word" >&5
2749 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2750 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2751   echo $ECHO_N "(cached) $ECHO_C" >&6
2752 else
2753   case $LDCONFIG in
2754   [\\/]* | ?:[\\/]*)
2755   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2756   ;;
2757   *)
2758   ac_save_IFS=$IFS; IFS=$ac_path_separator
2759 ac_dummy="$LDPATH"
2760 for ac_dir in $ac_dummy; do
2761   IFS=$ac_save_IFS
2762   test -z "$ac_dir" && ac_dir=.
2763   if $as_executable_p "$ac_dir/$ac_word"; then
2764    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2765    echo "$as_me:2765: found $ac_dir/$ac_word" >&5
2766    break
2767 fi
2768 done
2769
2770   ;;
2771 esac
2772 fi
2773 LDCONFIG=$ac_cv_path_LDCONFIG
2774
2775 if test -n "$LDCONFIG"; then
2776   echo "$as_me:2776: result: $LDCONFIG" >&5
2777 echo "${ECHO_T}$LDCONFIG" >&6
2778 else
2779   echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2781 fi
2782
2783                 ;;
2784         esac
2785 fi
2786
2787 echo "$as_me:2787: checking if you want to ensure bool is consistent with C++" >&5
2788 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2789
2790 # Check whether --with-cxx or --without-cxx was given.
2791 if test "${with_cxx+set}" = set; then
2792   withval="$with_cxx"
2793   cf_with_cxx=$withval
2794 else
2795   cf_with_cxx=yes
2796 fi;
2797 echo "$as_me:2797: result: $cf_with_cxx" >&5
2798 echo "${ECHO_T}$cf_with_cxx" >&6
2799 if test "X$cf_with_cxx" = Xno ; then
2800         CXX=""
2801         GXX=""
2802 else
2803         # with autoconf 2.13, we can change the error to a warning:
2804                 ac_ext=cc
2805 ac_cpp='$CXXCPP $CPPFLAGS'
2806 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2807 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2808 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2809 ac_main_return=return
2810 if test -n "$ac_tool_prefix"; then
2811   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2812   do
2813     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2814 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2815 echo "$as_me:2815: checking for $ac_word" >&5
2816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2817 if test "${ac_cv_prog_CXX+set}" = set; then
2818   echo $ECHO_N "(cached) $ECHO_C" >&6
2819 else
2820   if test -n "$CXX"; then
2821   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2822 else
2823   ac_save_IFS=$IFS; IFS=$ac_path_separator
2824 ac_dummy="$PATH"
2825 for ac_dir in $ac_dummy; do
2826   IFS=$ac_save_IFS
2827   test -z "$ac_dir" && ac_dir=.
2828   $as_executable_p "$ac_dir/$ac_word" || continue
2829 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2830 echo "$as_me:2830: found $ac_dir/$ac_word" >&5
2831 break
2832 done
2833
2834 fi
2835 fi
2836 CXX=$ac_cv_prog_CXX
2837 if test -n "$CXX"; then
2838   echo "$as_me:2838: result: $CXX" >&5
2839 echo "${ECHO_T}$CXX" >&6
2840 else
2841   echo "$as_me:2841: result: no" >&5
2842 echo "${ECHO_T}no" >&6
2843 fi
2844
2845     test -n "$CXX" && break
2846   done
2847 fi
2848 if test -z "$CXX"; then
2849   ac_ct_CXX=$CXX
2850   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2851 do
2852   # Extract the first word of "$ac_prog", so it can be a program name with args.
2853 set dummy $ac_prog; ac_word=$2
2854 echo "$as_me:2854: checking for $ac_word" >&5
2855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2856 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2857   echo $ECHO_N "(cached) $ECHO_C" >&6
2858 else
2859   if test -n "$ac_ct_CXX"; then
2860   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2861 else
2862   ac_save_IFS=$IFS; IFS=$ac_path_separator
2863 ac_dummy="$PATH"
2864 for ac_dir in $ac_dummy; do
2865   IFS=$ac_save_IFS
2866   test -z "$ac_dir" && ac_dir=.
2867   $as_executable_p "$ac_dir/$ac_word" || continue
2868 ac_cv_prog_ac_ct_CXX="$ac_prog"
2869 echo "$as_me:2869: found $ac_dir/$ac_word" >&5
2870 break
2871 done
2872
2873 fi
2874 fi
2875 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2876 if test -n "$ac_ct_CXX"; then
2877   echo "$as_me:2877: result: $ac_ct_CXX" >&5
2878 echo "${ECHO_T}$ac_ct_CXX" >&6
2879 else
2880   echo "$as_me:2880: result: no" >&5
2881 echo "${ECHO_T}no" >&6
2882 fi
2883
2884   test -n "$ac_ct_CXX" && break
2885 done
2886 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2887
2888   CXX=$ac_ct_CXX
2889 fi
2890
2891 # Provide some information about the compiler.
2892 echo "$as_me:2892:" \
2893      "checking for C++ compiler version" >&5
2894 ac_compiler=`set X $ac_compile; echo $2`
2895 { (eval echo "$as_me:2895: \"$ac_compiler --version </dev/null >&5\"") >&5
2896   (eval $ac_compiler --version </dev/null >&5) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); }
2900 { (eval echo "$as_me:2900: \"$ac_compiler -v </dev/null >&5\"") >&5
2901   (eval $ac_compiler -v </dev/null >&5) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); }
2905 { (eval echo "$as_me:2905: \"$ac_compiler -V </dev/null >&5\"") >&5
2906   (eval $ac_compiler -V </dev/null >&5) 2>&5
2907   ac_status=$?
2908   echo "$as_me:2908: \$? = $ac_status" >&5
2909   (exit $ac_status); }
2910
2911 echo "$as_me:2911: checking whether we are using the GNU C++ compiler" >&5
2912 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2913 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2914   echo $ECHO_N "(cached) $ECHO_C" >&6
2915 else
2916   cat >conftest.$ac_ext <<_ACEOF
2917 #line 2917 "configure"
2918 #include "confdefs.h"
2919
2920 int
2921 main (void)
2922 {
2923 #ifndef __GNUC__
2924        choke me
2925 #endif
2926
2927   ;
2928   return 0;
2929 }
2930 _ACEOF
2931 rm -f conftest.$ac_objext
2932 if { (eval echo "$as_me:2932: \"$ac_compile\"") >&5
2933   (eval $ac_compile) 2>&5
2934   ac_status=$?
2935   echo "$as_me:2935: \$? = $ac_status" >&5
2936   (exit $ac_status); } &&
2937          { ac_try='test -s conftest.$ac_objext'
2938   { (eval echo "$as_me:2938: \"$ac_try\"") >&5
2939   (eval $ac_try) 2>&5
2940   ac_status=$?
2941   echo "$as_me:2941: \$? = $ac_status" >&5
2942   (exit $ac_status); }; }; then
2943   ac_compiler_gnu=yes
2944 else
2945   echo "$as_me: failed program was:" >&5
2946 cat conftest.$ac_ext >&5
2947 ac_compiler_gnu=no
2948 fi
2949 rm -f conftest.$ac_objext conftest.$ac_ext
2950 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2951
2952 fi
2953 echo "$as_me:2953: result: $ac_cv_cxx_compiler_gnu" >&5
2954 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2955 GXX=`test $ac_compiler_gnu = yes && echo yes`
2956 ac_test_CXXFLAGS=${CXXFLAGS+set}
2957 ac_save_CXXFLAGS=$CXXFLAGS
2958 CXXFLAGS="-g"
2959 echo "$as_me:2959: checking whether $CXX accepts -g" >&5
2960 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2961 if test "${ac_cv_prog_cxx_g+set}" = set; then
2962   echo $ECHO_N "(cached) $ECHO_C" >&6
2963 else
2964   cat >conftest.$ac_ext <<_ACEOF
2965 #line 2965 "configure"
2966 #include "confdefs.h"
2967
2968 int
2969 main (void)
2970 {
2971
2972   ;
2973   return 0;
2974 }
2975 _ACEOF
2976 rm -f conftest.$ac_objext
2977 if { (eval echo "$as_me:2977: \"$ac_compile\"") >&5
2978   (eval $ac_compile) 2>&5
2979   ac_status=$?
2980   echo "$as_me:2980: \$? = $ac_status" >&5
2981   (exit $ac_status); } &&
2982          { ac_try='test -s conftest.$ac_objext'
2983   { (eval echo "$as_me:2983: \"$ac_try\"") >&5
2984   (eval $ac_try) 2>&5
2985   ac_status=$?
2986   echo "$as_me:2986: \$? = $ac_status" >&5
2987   (exit $ac_status); }; }; then
2988   ac_cv_prog_cxx_g=yes
2989 else
2990   echo "$as_me: failed program was:" >&5
2991 cat conftest.$ac_ext >&5
2992 ac_cv_prog_cxx_g=no
2993 fi
2994 rm -f conftest.$ac_objext conftest.$ac_ext
2995 fi
2996 echo "$as_me:2996: result: $ac_cv_prog_cxx_g" >&5
2997 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2998 if test "$ac_test_CXXFLAGS" = set; then
2999   CXXFLAGS=$ac_save_CXXFLAGS
3000 elif test $ac_cv_prog_cxx_g = yes; then
3001   if test "$GXX" = yes; then
3002     CXXFLAGS="-g -O2"
3003   else
3004     CXXFLAGS="-g"
3005   fi
3006 else
3007   if test "$GXX" = yes; then
3008     CXXFLAGS="-O2"
3009   else
3010     CXXFLAGS=
3011   fi
3012 fi
3013 for ac_declaration in \
3014    ''\
3015    '#include <stdlib.h>' \
3016    'extern "C" void std::exit (int) throw (); using std::exit;' \
3017    'extern "C" void std::exit (int); using std::exit;' \
3018    'extern "C" void exit (int) throw ();' \
3019    'extern "C" void exit (int);' \
3020    'void exit (int);'
3021 do
3022   cat >conftest.$ac_ext <<_ACEOF
3023 #line 3023 "configure"
3024 #include "confdefs.h"
3025 #include <stdlib.h>
3026 $ac_declaration
3027 int
3028 main (void)
3029 {
3030 exit (42);
3031   ;
3032   return 0;
3033 }
3034 _ACEOF
3035 rm -f conftest.$ac_objext
3036 if { (eval echo "$as_me:3036: \"$ac_compile\"") >&5
3037   (eval $ac_compile) 2>&5
3038   ac_status=$?
3039   echo "$as_me:3039: \$? = $ac_status" >&5
3040   (exit $ac_status); } &&
3041          { ac_try='test -s conftest.$ac_objext'
3042   { (eval echo "$as_me:3042: \"$ac_try\"") >&5
3043   (eval $ac_try) 2>&5
3044   ac_status=$?
3045   echo "$as_me:3045: \$? = $ac_status" >&5
3046   (exit $ac_status); }; }; then
3047   :
3048 else
3049   echo "$as_me: failed program was:" >&5
3050 cat conftest.$ac_ext >&5
3051 continue
3052 fi
3053 rm -f conftest.$ac_objext conftest.$ac_ext
3054   cat >conftest.$ac_ext <<_ACEOF
3055 #line 3055 "configure"
3056 #include "confdefs.h"
3057 $ac_declaration
3058 int
3059 main (void)
3060 {
3061 exit (42);
3062   ;
3063   return 0;
3064 }
3065 _ACEOF
3066 rm -f conftest.$ac_objext
3067 if { (eval echo "$as_me:3067: \"$ac_compile\"") >&5
3068   (eval $ac_compile) 2>&5
3069   ac_status=$?
3070   echo "$as_me:3070: \$? = $ac_status" >&5
3071   (exit $ac_status); } &&
3072          { ac_try='test -s conftest.$ac_objext'
3073   { (eval echo "$as_me:3073: \"$ac_try\"") >&5
3074   (eval $ac_try) 2>&5
3075   ac_status=$?
3076   echo "$as_me:3076: \$? = $ac_status" >&5
3077   (exit $ac_status); }; }; then
3078   break
3079 else
3080   echo "$as_me: failed program was:" >&5
3081 cat conftest.$ac_ext >&5
3082 fi
3083 rm -f conftest.$ac_objext conftest.$ac_ext
3084 done
3085 rm -rf conftest*
3086 if test -n "$ac_declaration"; then
3087   echo '#ifdef __cplusplus' >>confdefs.h
3088   echo $ac_declaration      >>confdefs.h
3089   echo '#endif'             >>confdefs.h
3090 fi
3091
3092 ac_ext=c
3093 ac_cpp='$CPP $CPPFLAGS'
3094 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3095 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3096 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3097 ac_main_return=return
3098
3099         ac_ext=cc
3100 ac_cpp='$CXXCPP $CPPFLAGS'
3101 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3102 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3103 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3104 ac_main_return=return
3105
3106         if test "x$cf_with_cxx" != xno
3107         then
3108                 # Several of the C++ configurations do not work, particularly when
3109                 # cross-compiling (20140913 -TD)
3110                 echo "$as_me:3110: checking if $CXX works" >&5
3111 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3112
3113                 save_CPPFLAGS="$CPPFLAGS"
3114                 eval cf_includedir=${includedir}
3115                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3116
3117 cat >conftest.$ac_ext <<_ACEOF
3118 #line 3118 "configure"
3119 #include "confdefs.h"
3120
3121 #include <stdlib.h>
3122 #include <stdio.h>
3123
3124 int
3125 main (void)
3126 {
3127
3128                 printf("Hello world!\n")
3129
3130   ;
3131   return 0;
3132 }
3133 _ACEOF
3134 rm -f conftest.$ac_objext
3135 if { (eval echo "$as_me:3135: \"$ac_compile\"") >&5
3136   (eval $ac_compile) 2>&5
3137   ac_status=$?
3138   echo "$as_me:3138: \$? = $ac_status" >&5
3139   (exit $ac_status); } &&
3140          { ac_try='test -s conftest.$ac_objext'
3141   { (eval echo "$as_me:3141: \"$ac_try\"") >&5
3142   (eval $ac_try) 2>&5
3143   ac_status=$?
3144   echo "$as_me:3144: \$? = $ac_status" >&5
3145   (exit $ac_status); }; }; then
3146   cf_cxx_works=yes
3147 else
3148   echo "$as_me: failed program was:" >&5
3149 cat conftest.$ac_ext >&5
3150 cf_cxx_works=no
3151 fi
3152 rm -f conftest.$ac_objext conftest.$ac_ext
3153                 CPPFLAGS="$save_CPPFLAGS"
3154
3155                 echo "$as_me:3155: result: $cf_cxx_works" >&5
3156 echo "${ECHO_T}$cf_cxx_works" >&6
3157                 if test "x$cf_cxx_works" = xno
3158                 then
3159                         { echo "$as_me:3159: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3160 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3161                         cf_with_cxx=no; CXX=""; GXX="";
3162                 fi
3163         fi
3164         ac_ext=c
3165 ac_cpp='$CPP $CPPFLAGS'
3166 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3167 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3168 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3169 ac_main_return=return
3170
3171         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3172         if test "$CXX" = "g++" ; then
3173                 # Extract the first word of "g++", so it can be a program name with args.
3174 set dummy g++; ac_word=$2
3175 echo "$as_me:3175: checking for $ac_word" >&5
3176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3177 if test "${ac_cv_path_CXX+set}" = set; then
3178   echo $ECHO_N "(cached) $ECHO_C" >&6
3179 else
3180   case $CXX in
3181   [\\/]* | ?:[\\/]*)
3182   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3183   ;;
3184   *)
3185   ac_save_IFS=$IFS; IFS=$ac_path_separator
3186 ac_dummy="$PATH"
3187 for ac_dir in $ac_dummy; do
3188   IFS=$ac_save_IFS
3189   test -z "$ac_dir" && ac_dir=.
3190   if $as_executable_p "$ac_dir/$ac_word"; then
3191    ac_cv_path_CXX="$ac_dir/$ac_word"
3192    echo "$as_me:3192: found $ac_dir/$ac_word" >&5
3193    break
3194 fi
3195 done
3196
3197   ;;
3198 esac
3199 fi
3200 CXX=$ac_cv_path_CXX
3201
3202 if test -n "$CXX"; then
3203   echo "$as_me:3203: result: $CXX" >&5
3204 echo "${ECHO_T}$CXX" >&6
3205 else
3206   echo "$as_me:3206: result: no" >&5
3207 echo "${ECHO_T}no" >&6
3208 fi
3209
3210         fi
3211         case "x$CXX" in
3212         (x|xg++)
3213                 { echo "$as_me:3213: WARNING: You don't have any C++ compiler, too bad" >&5
3214 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3215                 cf_with_cxx=no; CXX=""; GXX="";
3216                 ;;
3217         esac
3218 fi
3219
3220 GXX_VERSION=none
3221 if test "$GXX" = yes; then
3222         echo "$as_me:3222: checking version of ${CXX:-g++}" >&5
3223 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3224         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3225         if test -z "$GXX_VERSION"
3226         then
3227                 GXX_VERSION=unknown
3228                 GXX=no
3229         fi
3230         echo "$as_me:3230: result: $GXX_VERSION" >&5
3231 echo "${ECHO_T}$GXX_VERSION" >&6
3232 fi
3233
3234 case $GXX_VERSION in
3235 (1*|2.[0-6]*)
3236         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3237         # cf_cxx_library=no
3238         { echo "$as_me:3238: WARNING: templates do not work" >&5
3239 echo "$as_me: WARNING: templates do not work" >&2;}
3240         ;;
3241 esac
3242
3243 echo "$as_me:3243: checking if you want to build C++ binding and demo" >&5
3244 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3245
3246 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3247 if test "${with_cxx_binding+set}" = set; then
3248   withval="$with_cxx_binding"
3249   cf_with_cxx_binding=$withval
3250 else
3251   cf_with_cxx_binding=$cf_with_cxx
3252 fi;
3253 echo "$as_me:3253: result: $cf_with_cxx_binding" >&5
3254 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3255
3256 echo "$as_me:3256: checking if you want to build with Ada95" >&5
3257 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3258 echo "$as_me:3258: result: $cf_with_ada" >&5
3259 echo "${ECHO_T}$cf_with_ada" >&6
3260
3261 echo "$as_me:3261: checking if you want to install terminal database" >&5
3262 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3263
3264 # Check whether --enable-db-install or --disable-db-install was given.
3265 if test "${enable_db_install+set}" = set; then
3266   enableval="$enable_db_install"
3267   cf_with_db_install=$enableval
3268 else
3269   cf_with_db_install=yes
3270 fi;
3271 echo "$as_me:3271: result: $cf_with_db_install" >&5
3272 echo "${ECHO_T}$cf_with_db_install" >&6
3273
3274 echo "$as_me:3274: checking if you want to install manpages" >&5
3275 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3276
3277 # Check whether --with-manpages or --without-manpages was given.
3278 if test "${with_manpages+set}" = set; then
3279   withval="$with_manpages"
3280   cf_with_manpages=$withval
3281 else
3282   cf_with_manpages=yes
3283 fi;
3284 echo "$as_me:3284: result: $cf_with_manpages" >&5
3285 echo "${ECHO_T}$cf_with_manpages" >&6
3286
3287 echo "$as_me:3287: checking if you want to build programs such as tic" >&5
3288 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3289
3290 # Check whether --with-progs or --without-progs was given.
3291 if test "${with_progs+set}" = set; then
3292   withval="$with_progs"
3293   cf_with_progs=$withval
3294 else
3295   cf_with_progs=yes
3296 fi;
3297 echo "$as_me:3297: result: $cf_with_progs" >&5
3298 echo "${ECHO_T}$cf_with_progs" >&6
3299
3300 if test -f $srcdir/tack/tack.h; then
3301         if test "x$cross_compiling" = xyes ; then
3302                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3303
3304 echo "${as_me:-configure}:3304: testing ignoring tack because we are cross-compiling ..." 1>&5
3305
3306                 cf_with_tack=no
3307         else
3308                 echo "$as_me:3308: checking if you want to build the tack program" >&5
3309 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3310
3311 # Check whether --with-tack or --without-tack was given.
3312 if test "${with_tack+set}" = set; then
3313   withval="$with_tack"
3314   cf_with_tack=$withval
3315 else
3316   cf_with_tack=$cf_with_progs
3317 fi;
3318                 echo "$as_me:3318: result: $cf_with_tack" >&5
3319 echo "${ECHO_T}$cf_with_tack" >&6
3320         fi
3321 else
3322         cf_with_tack=no
3323 fi
3324
3325 echo "$as_me:3325: checking if you want to build test-programs" >&5
3326 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3327
3328 # Check whether --with-tests or --without-tests was given.
3329 if test "${with_tests+set}" = set; then
3330   withval="$with_tests"
3331   cf_with_tests=$withval
3332 else
3333   cf_with_tests=yes
3334 fi;
3335 echo "$as_me:3335: result: $cf_with_tests" >&5
3336 echo "${ECHO_T}$cf_with_tests" >&6
3337
3338 echo "$as_me:3338: checking if you wish to install curses.h" >&5
3339 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3340
3341 # Check whether --with-curses-h or --without-curses-h was given.
3342 if test "${with_curses_h+set}" = set; then
3343   withval="$with_curses_h"
3344   with_curses_h=$withval
3345 else
3346   with_curses_h=yes
3347 fi;
3348 echo "$as_me:3348: result: $with_curses_h" >&5
3349 echo "${ECHO_T}$with_curses_h" >&6
3350
3351 modules_to_build="ncurses"
3352 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3353 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3354 modules_to_build="$modules_to_build panel menu form"
3355
3356 test "$program_prefix" != NONE &&
3357   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3358 # Use a double $ so make ignores it.
3359 test "$program_suffix" != NONE &&
3360   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3361 # Double any \ or $.  echo might interpret backslashes.
3362 # By default was `s,x,x', remove it if useless.
3363 cat <<\_ACEOF >conftest.sed
3364 s/[\\$]/&&/g;s/;s,x,x,$//
3365 _ACEOF
3366 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3367 rm conftest.sed
3368
3369 for ac_prog in mawk gawk nawk awk
3370 do
3371   # Extract the first word of "$ac_prog", so it can be a program name with args.
3372 set dummy $ac_prog; ac_word=$2
3373 echo "$as_me:3373: checking for $ac_word" >&5
3374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3375 if test "${ac_cv_prog_AWK+set}" = set; then
3376   echo $ECHO_N "(cached) $ECHO_C" >&6
3377 else
3378   if test -n "$AWK"; then
3379   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3380 else
3381   ac_save_IFS=$IFS; IFS=$ac_path_separator
3382 ac_dummy="$PATH"
3383 for ac_dir in $ac_dummy; do
3384   IFS=$ac_save_IFS
3385   test -z "$ac_dir" && ac_dir=.
3386   $as_executable_p "$ac_dir/$ac_word" || continue
3387 ac_cv_prog_AWK="$ac_prog"
3388 echo "$as_me:3388: found $ac_dir/$ac_word" >&5
3389 break
3390 done
3391
3392 fi
3393 fi
3394 AWK=$ac_cv_prog_AWK
3395 if test -n "$AWK"; then
3396   echo "$as_me:3396: result: $AWK" >&5
3397 echo "${ECHO_T}$AWK" >&6
3398 else
3399   echo "$as_me:3399: result: no" >&5
3400 echo "${ECHO_T}no" >&6
3401 fi
3402
3403   test -n "$AWK" && break
3404 done
3405
3406 test -z "$AWK" && { { echo "$as_me:3406: error: No awk program found" >&5
3407 echo "$as_me: error: No awk program found" >&2;}
3408    { (exit 1); exit 1; }; }
3409
3410 echo "$as_me:3410: checking for egrep" >&5
3411 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3412 if test "${ac_cv_prog_egrep+set}" = set; then
3413   echo $ECHO_N "(cached) $ECHO_C" >&6
3414 else
3415   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3416                 then ac_cv_prog_egrep='grep -E'
3417                 else ac_cv_prog_egrep='egrep'
3418         fi
3419 fi
3420 echo "$as_me:3420: result: $ac_cv_prog_egrep" >&5
3421 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3422         EGREP=$ac_cv_prog_egrep
3423
3424         test -z "$EGREP" && { { echo "$as_me:3424: error: No egrep program found" >&5
3425 echo "$as_me: error: No egrep program found" >&2;}
3426    { (exit 1); exit 1; }; }
3427
3428 # Find a good install program.  We prefer a C program (faster),
3429 # so one script is as good as another.  But avoid the broken or
3430 # incompatible versions:
3431 # SysV /etc/install, /usr/sbin/install
3432 # SunOS /usr/etc/install
3433 # IRIX /sbin/install
3434 # AIX /bin/install
3435 # AmigaOS /C/install, which installs bootblocks on floppy discs
3436 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3437 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3438 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3439 # ./install, which can be erroneously created by make from ./install.sh.
3440 echo "$as_me:3440: checking for a BSD compatible install" >&5
3441 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3442 if test -z "$INSTALL"; then
3443 if test "${ac_cv_path_install+set}" = set; then
3444   echo $ECHO_N "(cached) $ECHO_C" >&6
3445 else
3446     ac_save_IFS=$IFS; IFS=$ac_path_separator
3447   for ac_dir in $PATH; do
3448     IFS=$ac_save_IFS
3449     # Account for people who put trailing slashes in PATH elements.
3450     case $ac_dir/ in
3451     / | ./ | .// | /cC/* \
3452     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3453     | /usr/ucb/* ) ;;
3454     *)
3455       # OSF1 and SCO ODT 3.0 have their own names for install.
3456       # Don't use installbsd from OSF since it installs stuff as root
3457       # by default.
3458       for ac_prog in ginstall scoinst install; do
3459         if $as_executable_p "$ac_dir/$ac_prog"; then
3460           if test $ac_prog = install &&
3461             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3462             # AIX install.  It has an incompatible calling convention.
3463             :
3464           elif test $ac_prog = install &&
3465             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3466             # program-specific install script used by HP pwplus--don't use.
3467             :
3468           else
3469             ac_cv_path_install="$ac_dir/$ac_prog -c"
3470             break 2
3471           fi
3472         fi
3473       done
3474       ;;
3475     esac
3476   done
3477
3478 fi
3479   if test "${ac_cv_path_install+set}" = set; then
3480     INSTALL=$ac_cv_path_install
3481   else
3482     # As a last resort, use the slow shell script.  We don't cache a
3483     # path for INSTALL within a source directory, because that will
3484     # break other packages using the cache if that directory is
3485     # removed, or if the path is relative.
3486     INSTALL=$ac_install_sh
3487   fi
3488 fi
3489 echo "$as_me:3489: result: $INSTALL" >&5
3490 echo "${ECHO_T}$INSTALL" >&6
3491
3492 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3493 # It thinks the first close brace ends the variable substitution.
3494 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3495
3496 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3497
3498 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3499
3500 for ac_prog in lint cppcheck splint
3501 do
3502   # Extract the first word of "$ac_prog", so it can be a program name with args.
3503 set dummy $ac_prog; ac_word=$2
3504 echo "$as_me:3504: checking for $ac_word" >&5
3505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3506 if test "${ac_cv_prog_LINT+set}" = set; then
3507   echo $ECHO_N "(cached) $ECHO_C" >&6
3508 else
3509   if test -n "$LINT"; then
3510   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3511 else
3512   ac_save_IFS=$IFS; IFS=$ac_path_separator
3513 ac_dummy="$PATH"
3514 for ac_dir in $ac_dummy; do
3515   IFS=$ac_save_IFS
3516   test -z "$ac_dir" && ac_dir=.
3517   $as_executable_p "$ac_dir/$ac_word" || continue
3518 ac_cv_prog_LINT="$ac_prog"
3519 echo "$as_me:3519: found $ac_dir/$ac_word" >&5
3520 break
3521 done
3522
3523 fi
3524 fi
3525 LINT=$ac_cv_prog_LINT
3526 if test -n "$LINT"; then
3527   echo "$as_me:3527: result: $LINT" >&5
3528 echo "${ECHO_T}$LINT" >&6
3529 else
3530   echo "$as_me:3530: result: no" >&5
3531 echo "${ECHO_T}no" >&6
3532 fi
3533
3534   test -n "$LINT" && break
3535 done
3536
3537 echo "$as_me:3537: checking whether ln -s works" >&5
3538 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3539 LN_S=$as_ln_s
3540 if test "$LN_S" = "ln -s"; then
3541   echo "$as_me:3541: result: yes" >&5
3542 echo "${ECHO_T}yes" >&6
3543 else
3544   echo "$as_me:3544: result: no, using $LN_S" >&5
3545 echo "${ECHO_T}no, using $LN_S" >&6
3546 fi
3547
3548 echo "$as_me:3548: checking if $LN_S -f options work" >&5
3549 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3550
3551 rm -f conf$$.src conf$$dst
3552 echo >conf$$.dst
3553 echo first >conf$$.src
3554 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3555         cf_prog_ln_sf=yes
3556 else
3557         cf_prog_ln_sf=no
3558 fi
3559 rm -f conf$$.dst conf$$src
3560 echo "$as_me:3560: result: $cf_prog_ln_sf" >&5
3561 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3562
3563 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3564
3565 echo "$as_me:3565: checking for long file names" >&5
3566 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3567 if test "${ac_cv_sys_long_file_names+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570   ac_cv_sys_long_file_names=yes
3571 # Test for long file names in all the places we know might matter:
3572 #      .                the current directory, where building will happen
3573 #      $prefix/lib      where we will be installing things
3574 #      $exec_prefix/lib likewise
3575 # eval it to expand exec_prefix.
3576 #      $TMPDIR          if set, where it might want to write temporary files
3577 # if $TMPDIR is not set:
3578 #      /tmp             where it might want to write temporary files
3579 #      /var/tmp         likewise
3580 #      /usr/tmp         likewise
3581 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3582   ac_tmpdirs=$TMPDIR
3583 else
3584   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3585 fi
3586 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3587   test -d $ac_dir || continue
3588   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3589   ac_xdir=$ac_dir/cf$$
3590   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3591   ac_tf1=$ac_xdir/conftest9012345
3592   ac_tf2=$ac_xdir/conftest9012346
3593   (echo 1 >$ac_tf1) 2>/dev/null
3594   (echo 2 >$ac_tf2) 2>/dev/null
3595   ac_val=`cat $ac_tf1 2>/dev/null`
3596   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3597     ac_cv_sys_long_file_names=no
3598     rm -rf $ac_xdir 2>/dev/null
3599     break
3600   fi
3601   rm -rf $ac_xdir 2>/dev/null
3602 done
3603 fi
3604 echo "$as_me:3604: result: $ac_cv_sys_long_file_names" >&5
3605 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3606 if test $ac_cv_sys_long_file_names = yes; then
3607
3608 cat >>confdefs.h <<\EOF
3609 #define HAVE_LONG_FILE_NAMES 1
3610 EOF
3611
3612 fi
3613
3614 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3615 # of package conflict.
3616 cf_config_suffix=
3617
3618 # Check whether --with-config-suffix or --without-config-suffix was given.
3619 if test "${with_config_suffix+set}" = set; then
3620   withval="$with_config_suffix"
3621   case "x$withval" in
3622         (xyes|xno)
3623                 { echo "$as_me:3623: WARNING: expected a value for config-suffix option" >&5
3624 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3625                 ;;
3626         (*)     cf_config_suffix="$withval"
3627                 ;;
3628         esac
3629 fi;
3630
3631 # If we find pkg-config, check if we should install the ".pc" files.
3632
3633 echo "$as_me:3633: checking if you want to use pkg-config" >&5
3634 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3635
3636 # Check whether --with-pkg-config or --without-pkg-config was given.
3637 if test "${with_pkg_config+set}" = set; then
3638   withval="$with_pkg_config"
3639   cf_pkg_config=$withval
3640 else
3641   cf_pkg_config=yes
3642 fi;
3643 echo "$as_me:3643: result: $cf_pkg_config" >&5
3644 echo "${ECHO_T}$cf_pkg_config" >&6
3645
3646 case $cf_pkg_config in
3647 (no)
3648         PKG_CONFIG=none
3649         ;;
3650 (yes)
3651
3652 if test -n "$ac_tool_prefix"; then
3653   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3654 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3655 echo "$as_me:3655: checking for $ac_word" >&5
3656 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3657 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3658   echo $ECHO_N "(cached) $ECHO_C" >&6
3659 else
3660   case $PKG_CONFIG in
3661   [\\/]* | ?:[\\/]*)
3662   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3663   ;;
3664   *)
3665   ac_save_IFS=$IFS; IFS=$ac_path_separator
3666 ac_dummy="$PATH"
3667 for ac_dir in $ac_dummy; do
3668   IFS=$ac_save_IFS
3669   test -z "$ac_dir" && ac_dir=.
3670   if $as_executable_p "$ac_dir/$ac_word"; then
3671    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3672    echo "$as_me:3672: found $ac_dir/$ac_word" >&5
3673    break
3674 fi
3675 done
3676
3677   ;;
3678 esac
3679 fi
3680 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3681
3682 if test -n "$PKG_CONFIG"; then
3683   echo "$as_me:3683: result: $PKG_CONFIG" >&5
3684 echo "${ECHO_T}$PKG_CONFIG" >&6
3685 else
3686   echo "$as_me:3686: result: no" >&5
3687 echo "${ECHO_T}no" >&6
3688 fi
3689
3690 fi
3691 if test -z "$ac_cv_path_PKG_CONFIG"; then
3692   ac_pt_PKG_CONFIG=$PKG_CONFIG
3693   # Extract the first word of "pkg-config", so it can be a program name with args.
3694 set dummy pkg-config; ac_word=$2
3695 echo "$as_me:3695: checking for $ac_word" >&5
3696 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3697 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3698   echo $ECHO_N "(cached) $ECHO_C" >&6
3699 else
3700   case $ac_pt_PKG_CONFIG in
3701   [\\/]* | ?:[\\/]*)
3702   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3703   ;;
3704   *)
3705   ac_save_IFS=$IFS; IFS=$ac_path_separator
3706 ac_dummy="$PATH"
3707 for ac_dir in $ac_dummy; do
3708   IFS=$ac_save_IFS
3709   test -z "$ac_dir" && ac_dir=.
3710   if $as_executable_p "$ac_dir/$ac_word"; then
3711    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3712    echo "$as_me:3712: found $ac_dir/$ac_word" >&5
3713    break
3714 fi
3715 done
3716
3717   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3718   ;;
3719 esac
3720 fi
3721 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3722
3723 if test -n "$ac_pt_PKG_CONFIG"; then
3724   echo "$as_me:3724: result: $ac_pt_PKG_CONFIG" >&5
3725 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3726 else
3727   echo "$as_me:3727: result: no" >&5
3728 echo "${ECHO_T}no" >&6
3729 fi
3730
3731   PKG_CONFIG=$ac_pt_PKG_CONFIG
3732 else
3733   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3734 fi
3735
3736         ;;
3737 (*)
3738         PKG_CONFIG=$withval
3739         ;;
3740 esac
3741
3742 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3743 if test "$PKG_CONFIG" != none ; then
3744
3745 if test "x$prefix" != xNONE; then
3746         cf_path_syntax="$prefix"
3747 else
3748         cf_path_syntax="$ac_default_prefix"
3749 fi
3750
3751 case ".$PKG_CONFIG" in
3752 (.\$\(*\)*|.\'*\'*)
3753         ;;
3754 (..|./*|.\\*)
3755         ;;
3756 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3757         ;;
3758 (.\${*prefix}*|.\${*dir}*)
3759         eval PKG_CONFIG="$PKG_CONFIG"
3760         case ".$PKG_CONFIG" in
3761         (.NONE/*)
3762                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3763                 ;;
3764         esac
3765         ;;
3766 (.no|.NONE/*)
3767         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3768         ;;
3769 (*)
3770         { { echo "$as_me:3770: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3771 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3772    { (exit 1); exit 1; }; }
3773         ;;
3774 esac
3775
3776 elif test "x$cf_pkg_config" != xno ; then
3777         { echo "$as_me:3777: WARNING: pkg-config is not installed" >&5
3778 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3779 fi
3780
3781 case $PKG_CONFIG in
3782 (no|none|yes)
3783         echo "$as_me:3783: checking for pkg-config library directory" >&5
3784 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3785         ;;
3786 (*)
3787         echo "$as_me:3787: checking for $PKG_CONFIG library directory" >&5
3788 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3789         ;;
3790 esac
3791
3792 PKG_CONFIG_LIBDIR=no
3793
3794 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3795 if test "${with_pkg_config_libdir+set}" = set; then
3796   withval="$with_pkg_config_libdir"
3797   PKG_CONFIG_LIBDIR=$withval
3798 else
3799   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3800 fi;
3801
3802 case x$PKG_CONFIG_LIBDIR in
3803 (x/*)
3804         ;;
3805 (xyes)
3806         # Look for the library directory using the same prefix as the executable
3807         if test "x$PKG_CONFIG" = xnone
3808         then
3809                 cf_path=$prefix
3810         else
3811                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3812         fi
3813
3814         # If you don't like using the default architecture, you have to specify the
3815         # intended library directory and corresponding compiler/linker options.
3816         #
3817         # This case allows for Debian's 2014-flavor of multiarch, along with the
3818         # most common variations before that point.  Some other variants spell the
3819         # directory differently, e.g., "pkg-config", and put it in unusual places.
3820         # pkg-config has always been poorly standardized, which is ironic...
3821         case x`(arch) 2>/dev/null` in
3822         (*64)
3823                 cf_search_path="\
3824                         $cf_path/lib/*64-linux-gnu \
3825                         $cf_path/share \
3826                         $cf_path/lib64 \
3827                         $cf_path/lib32 \
3828                         $cf_path/lib"
3829                 ;;
3830         (*)
3831                 cf_search_path="\
3832                         $cf_path/lib/*-linux-gnu \
3833                         $cf_path/share \
3834                         $cf_path/lib32 \
3835                         $cf_path/lib \
3836                         $cf_path/libdata"
3837                 ;;
3838         esac
3839
3840         test -n "$verbose" && echo "    list..." 1>&6
3841
3842 echo "${as_me:-configure}:3842: testing list... ..." 1>&5
3843
3844         for cf_config in $cf_search_path
3845         do
3846                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3847
3848 echo "${as_me:-configure}:3848: testing checking $cf_config/pkgconfig ..." 1>&5
3849
3850                 if test -d $cf_config/pkgconfig
3851                 then
3852                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3853                         echo "$as_me:3853: checking done" >&5
3854 echo $ECHO_N "checking done... $ECHO_C" >&6
3855                         break
3856                 fi
3857         done
3858         ;;
3859 (*)
3860         ;;
3861 esac
3862
3863 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3864         echo "$as_me:3864: result: $PKG_CONFIG_LIBDIR" >&5
3865 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3866 fi
3867
3868 if test "x$PKG_CONFIG" != xnone
3869 then
3870         echo "$as_me:3870: checking if we should install .pc files for $PKG_CONFIG" >&5
3871 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3872 else
3873         echo "$as_me:3873: checking if we should install .pc files" >&5
3874 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3875 fi
3876
3877 # Check whether --enable-pc-files or --disable-pc-files was given.
3878 if test "${enable_pc_files+set}" = set; then
3879   enableval="$enable_pc_files"
3880   enable_pc_files=$enableval
3881 else
3882   enable_pc_files=no
3883 fi;
3884 echo "$as_me:3884: result: $enable_pc_files" >&5
3885 echo "${ECHO_T}$enable_pc_files" >&6
3886
3887 if test "x$enable_pc_files" != xno
3888 then
3889         MAKE_PC_FILES=
3890         case "x$PKG_CONFIG_LIBDIR" in
3891         (xno|xyes)
3892                 { echo "$as_me:3892: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3893 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3894                 ;;
3895         (*)
3896
3897 if test "x$prefix" != xNONE; then
3898         cf_path_syntax="$prefix"
3899 else
3900         cf_path_syntax="$ac_default_prefix"
3901 fi
3902
3903 case ".$PKG_CONFIG_LIBDIR" in
3904 (.\$\(*\)*|.\'*\'*)
3905         ;;
3906 (..|./*|.\\*)
3907         ;;
3908 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3909         ;;
3910 (.\${*prefix}*|.\${*dir}*)
3911         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3912         case ".$PKG_CONFIG_LIBDIR" in
3913         (.NONE/*)
3914                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3915                 ;;
3916         esac
3917         ;;
3918 (.no|.NONE/*)
3919         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3920         ;;
3921 (*)
3922         { { echo "$as_me:3922: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3923 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3924    { (exit 1); exit 1; }; }
3925         ;;
3926 esac
3927
3928                 ;;
3929         esac
3930 else
3931         MAKE_PC_FILES="#"
3932 fi
3933
3934 if test -z "$MAKE_PC_FILES"
3935 then
3936         echo "$as_me:3936: checking for suffix to add to pc-files" >&5
3937 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3938
3939 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3940 if test "${with_pc_suffix+set}" = set; then
3941   withval="$with_pc_suffix"
3942   case "x$withval" in
3943         (xyes|xno)
3944                 PC_MODULE_SUFFIX=
3945                 ;;
3946         (*)     PC_MODULE_SUFFIX="$withval"
3947                 ;;
3948         esac
3949 fi;
3950         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3951         echo "$as_me:3951: result: $PC_MODULE_SUFFIX" >&5
3952 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3953         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3954
3955 fi
3956
3957 echo "$as_me:3957: checking if we should assume mixed-case filenames" >&5
3958 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3959
3960 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3961 if test "${enable_mixed_case+set}" = set; then
3962   enableval="$enable_mixed_case"
3963   enable_mixedcase=$enableval
3964 else
3965   enable_mixedcase=auto
3966 fi;
3967 echo "$as_me:3967: result: $enable_mixedcase" >&5
3968 echo "${ECHO_T}$enable_mixedcase" >&6
3969 if test "$enable_mixedcase" = "auto" ; then
3970
3971 echo "$as_me:3971: checking if filesystem supports mixed-case filenames" >&5
3972 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3973 if test "${cf_cv_mixedcase+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976
3977 if test "$cross_compiling" = yes ; then
3978         case $target_alias in
3979         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3980                 cf_cv_mixedcase=no
3981                 ;;
3982         (*)
3983                 cf_cv_mixedcase=yes
3984                 ;;
3985         esac
3986 else
3987         rm -f conftest CONFTEST
3988         echo test >conftest
3989         if test -f CONFTEST ; then
3990                 cf_cv_mixedcase=no
3991         else
3992                 cf_cv_mixedcase=yes
3993         fi
3994         rm -f conftest CONFTEST
3995 fi
3996
3997 fi
3998 echo "$as_me:3998: result: $cf_cv_mixedcase" >&5
3999 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4000 test "$cf_cv_mixedcase" = yes &&
4001 cat >>confdefs.h <<\EOF
4002 #define MIXEDCASE_FILENAMES 1
4003 EOF
4004
4005 else
4006         cf_cv_mixedcase=$enable_mixedcase
4007         if test "x$enable_mixedcase" = "xyes" ; then
4008
4009 cat >>confdefs.h <<\EOF
4010 #define MIXEDCASE_FILENAMES 1
4011 EOF
4012
4013         fi
4014 fi
4015
4016 # do this after mixed-case option (tags/TAGS is not as important as tic).
4017 echo "$as_me:4017: checking whether ${MAKE-make} sets \${MAKE}" >&5
4018 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4019 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4020 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4021   echo $ECHO_N "(cached) $ECHO_C" >&6
4022 else
4023   cat >conftest.make <<\EOF
4024 all:
4025         @echo 'ac_maketemp="${MAKE}"'
4026 EOF
4027 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4028 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4029 if test -n "$ac_maketemp"; then
4030   eval ac_cv_prog_make_${ac_make}_set=yes
4031 else
4032   eval ac_cv_prog_make_${ac_make}_set=no
4033 fi
4034 rm -f conftest.make
4035 fi
4036 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4037   echo "$as_me:4037: result: yes" >&5
4038 echo "${ECHO_T}yes" >&6
4039   SET_MAKE=
4040 else
4041   echo "$as_me:4041: result: no" >&5
4042 echo "${ECHO_T}no" >&6
4043   SET_MAKE="MAKE=${MAKE-make}"
4044 fi
4045
4046 for ac_prog in exctags ctags
4047 do
4048   # Extract the first word of "$ac_prog", so it can be a program name with args.
4049 set dummy $ac_prog; ac_word=$2
4050 echo "$as_me:4050: checking for $ac_word" >&5
4051 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4052 if test "${ac_cv_prog_CTAGS+set}" = set; then
4053   echo $ECHO_N "(cached) $ECHO_C" >&6
4054 else
4055   if test -n "$CTAGS"; then
4056   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4057 else
4058   ac_save_IFS=$IFS; IFS=$ac_path_separator
4059 ac_dummy="$PATH"
4060 for ac_dir in $ac_dummy; do
4061   IFS=$ac_save_IFS
4062   test -z "$ac_dir" && ac_dir=.
4063   $as_executable_p "$ac_dir/$ac_word" || continue
4064 ac_cv_prog_CTAGS="$ac_prog"
4065 echo "$as_me:4065: found $ac_dir/$ac_word" >&5
4066 break
4067 done
4068
4069 fi
4070 fi
4071 CTAGS=$ac_cv_prog_CTAGS
4072 if test -n "$CTAGS"; then
4073   echo "$as_me:4073: result: $CTAGS" >&5
4074 echo "${ECHO_T}$CTAGS" >&6
4075 else
4076   echo "$as_me:4076: result: no" >&5
4077 echo "${ECHO_T}no" >&6
4078 fi
4079
4080   test -n "$CTAGS" && break
4081 done
4082
4083 for ac_prog in exetags etags
4084 do
4085   # Extract the first word of "$ac_prog", so it can be a program name with args.
4086 set dummy $ac_prog; ac_word=$2
4087 echo "$as_me:4087: checking for $ac_word" >&5
4088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4089 if test "${ac_cv_prog_ETAGS+set}" = set; then
4090   echo $ECHO_N "(cached) $ECHO_C" >&6
4091 else
4092   if test -n "$ETAGS"; then
4093   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4094 else
4095   ac_save_IFS=$IFS; IFS=$ac_path_separator
4096 ac_dummy="$PATH"
4097 for ac_dir in $ac_dummy; do
4098   IFS=$ac_save_IFS
4099   test -z "$ac_dir" && ac_dir=.
4100   $as_executable_p "$ac_dir/$ac_word" || continue
4101 ac_cv_prog_ETAGS="$ac_prog"
4102 echo "$as_me:4102: found $ac_dir/$ac_word" >&5
4103 break
4104 done
4105
4106 fi
4107 fi
4108 ETAGS=$ac_cv_prog_ETAGS
4109 if test -n "$ETAGS"; then
4110   echo "$as_me:4110: result: $ETAGS" >&5
4111 echo "${ECHO_T}$ETAGS" >&6
4112 else
4113   echo "$as_me:4113: result: no" >&5
4114 echo "${ECHO_T}no" >&6
4115 fi
4116
4117   test -n "$ETAGS" && break
4118 done
4119
4120 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4121 set dummy ${CTAGS:-ctags}; ac_word=$2
4122 echo "$as_me:4122: checking for $ac_word" >&5
4123 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4124 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4125   echo $ECHO_N "(cached) $ECHO_C" >&6
4126 else
4127   if test -n "$MAKE_LOWER_TAGS"; then
4128   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4129 else
4130   ac_save_IFS=$IFS; IFS=$ac_path_separator
4131 ac_dummy="$PATH"
4132 for ac_dir in $ac_dummy; do
4133   IFS=$ac_save_IFS
4134   test -z "$ac_dir" && ac_dir=.
4135   $as_executable_p "$ac_dir/$ac_word" || continue
4136 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4137 echo "$as_me:4137: found $ac_dir/$ac_word" >&5
4138 break
4139 done
4140
4141   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4142 fi
4143 fi
4144 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4145 if test -n "$MAKE_LOWER_TAGS"; then
4146   echo "$as_me:4146: result: $MAKE_LOWER_TAGS" >&5
4147 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4148 else
4149   echo "$as_me:4149: result: no" >&5
4150 echo "${ECHO_T}no" >&6
4151 fi
4152
4153 if test "$cf_cv_mixedcase" = yes ; then
4154         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4155 set dummy ${ETAGS:-etags}; ac_word=$2
4156 echo "$as_me:4156: checking for $ac_word" >&5
4157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4158 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4159   echo $ECHO_N "(cached) $ECHO_C" >&6
4160 else
4161   if test -n "$MAKE_UPPER_TAGS"; then
4162   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4163 else
4164   ac_save_IFS=$IFS; IFS=$ac_path_separator
4165 ac_dummy="$PATH"
4166 for ac_dir in $ac_dummy; do
4167   IFS=$ac_save_IFS
4168   test -z "$ac_dir" && ac_dir=.
4169   $as_executable_p "$ac_dir/$ac_word" || continue
4170 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4171 echo "$as_me:4171: found $ac_dir/$ac_word" >&5
4172 break
4173 done
4174
4175   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4176 fi
4177 fi
4178 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4179 if test -n "$MAKE_UPPER_TAGS"; then
4180   echo "$as_me:4180: result: $MAKE_UPPER_TAGS" >&5
4181 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4182 else
4183   echo "$as_me:4183: result: no" >&5
4184 echo "${ECHO_T}no" >&6
4185 fi
4186
4187 else
4188         MAKE_UPPER_TAGS=no
4189 fi
4190
4191 if test "$MAKE_UPPER_TAGS" = yes ; then
4192         MAKE_UPPER_TAGS=
4193 else
4194         MAKE_UPPER_TAGS="#"
4195 fi
4196
4197 if test "$MAKE_LOWER_TAGS" = yes ; then
4198         MAKE_LOWER_TAGS=
4199 else
4200         MAKE_LOWER_TAGS="#"
4201 fi
4202
4203 echo "$as_me:4203: checking for makeflags variable" >&5
4204 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4205 if test "${cf_cv_makeflags+set}" = set; then
4206   echo $ECHO_N "(cached) $ECHO_C" >&6
4207 else
4208
4209         cf_cv_makeflags=''
4210         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4211         do
4212                 cat >cf_makeflags.tmp <<CF_EOF
4213 SHELL = $SHELL
4214 all :
4215         @ echo '.$cf_option'
4216 CF_EOF
4217                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4218                 case "$cf_result" in
4219                 (.*k|.*kw)
4220                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4221                         case "$cf_result" in
4222                         (.*CC=*)        cf_cv_makeflags=
4223                                 ;;
4224                         (*)     cf_cv_makeflags=$cf_option
4225                                 ;;
4226                         esac
4227                         break
4228                         ;;
4229                 (.-)
4230                         ;;
4231                 (*)
4232
4233 echo "${as_me:-configure}:4233: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4234
4235                         ;;
4236                 esac
4237         done
4238         rm -f cf_makeflags.tmp
4239
4240 fi
4241 echo "$as_me:4241: result: $cf_cv_makeflags" >&5
4242 echo "${ECHO_T}$cf_cv_makeflags" >&6
4243
4244 if test -n "$ac_tool_prefix"; then
4245   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4246 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4247 echo "$as_me:4247: checking for $ac_word" >&5
4248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4249 if test "${ac_cv_prog_RANLIB+set}" = set; then
4250   echo $ECHO_N "(cached) $ECHO_C" >&6
4251 else
4252   if test -n "$RANLIB"; then
4253   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4254 else
4255   ac_save_IFS=$IFS; IFS=$ac_path_separator
4256 ac_dummy="$PATH"
4257 for ac_dir in $ac_dummy; do
4258   IFS=$ac_save_IFS
4259   test -z "$ac_dir" && ac_dir=.
4260   $as_executable_p "$ac_dir/$ac_word" || continue
4261 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4262 echo "$as_me:4262: found $ac_dir/$ac_word" >&5
4263 break
4264 done
4265
4266 fi
4267 fi
4268 RANLIB=$ac_cv_prog_RANLIB
4269 if test -n "$RANLIB"; then
4270   echo "$as_me:4270: result: $RANLIB" >&5
4271 echo "${ECHO_T}$RANLIB" >&6
4272 else
4273   echo "$as_me:4273: result: no" >&5
4274 echo "${ECHO_T}no" >&6
4275 fi
4276
4277 fi
4278 if test -z "$ac_cv_prog_RANLIB"; then
4279   ac_ct_RANLIB=$RANLIB
4280   # Extract the first word of "ranlib", so it can be a program name with args.
4281 set dummy ranlib; ac_word=$2
4282 echo "$as_me:4282: checking for $ac_word" >&5
4283 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4284 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4285   echo $ECHO_N "(cached) $ECHO_C" >&6
4286 else
4287   if test -n "$ac_ct_RANLIB"; then
4288   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4289 else
4290   ac_save_IFS=$IFS; IFS=$ac_path_separator
4291 ac_dummy="$PATH"
4292 for ac_dir in $ac_dummy; do
4293   IFS=$ac_save_IFS
4294   test -z "$ac_dir" && ac_dir=.
4295   $as_executable_p "$ac_dir/$ac_word" || continue
4296 ac_cv_prog_ac_ct_RANLIB="ranlib"
4297 echo "$as_me:4297: found $ac_dir/$ac_word" >&5
4298 break
4299 done
4300
4301   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4302 fi
4303 fi
4304 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4305 if test -n "$ac_ct_RANLIB"; then
4306   echo "$as_me:4306: result: $ac_ct_RANLIB" >&5
4307 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4308 else
4309   echo "$as_me:4309: result: no" >&5
4310 echo "${ECHO_T}no" >&6
4311 fi
4312
4313   RANLIB=$ac_ct_RANLIB
4314 else
4315   RANLIB="$ac_cv_prog_RANLIB"
4316 fi
4317
4318 if test -n "$ac_tool_prefix"; then
4319   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4320 set dummy ${ac_tool_prefix}ld; ac_word=$2
4321 echo "$as_me:4321: checking for $ac_word" >&5
4322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4323 if test "${ac_cv_prog_LD+set}" = set; then
4324   echo $ECHO_N "(cached) $ECHO_C" >&6
4325 else
4326   if test -n "$LD"; then
4327   ac_cv_prog_LD="$LD" # Let the user override the test.
4328 else
4329   ac_save_IFS=$IFS; IFS=$ac_path_separator
4330 ac_dummy="$PATH"
4331 for ac_dir in $ac_dummy; do
4332   IFS=$ac_save_IFS
4333   test -z "$ac_dir" && ac_dir=.
4334   $as_executable_p "$ac_dir/$ac_word" || continue
4335 ac_cv_prog_LD="${ac_tool_prefix}ld"
4336 echo "$as_me:4336: found $ac_dir/$ac_word" >&5
4337 break
4338 done
4339
4340 fi
4341 fi
4342 LD=$ac_cv_prog_LD
4343 if test -n "$LD"; then
4344   echo "$as_me:4344: result: $LD" >&5
4345 echo "${ECHO_T}$LD" >&6
4346 else
4347   echo "$as_me:4347: result: no" >&5
4348 echo "${ECHO_T}no" >&6
4349 fi
4350
4351 fi
4352 if test -z "$ac_cv_prog_LD"; then
4353   ac_ct_LD=$LD
4354   # Extract the first word of "ld", so it can be a program name with args.
4355 set dummy ld; ac_word=$2
4356 echo "$as_me:4356: checking for $ac_word" >&5
4357 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4358 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4359   echo $ECHO_N "(cached) $ECHO_C" >&6
4360 else
4361   if test -n "$ac_ct_LD"; then
4362   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4363 else
4364   ac_save_IFS=$IFS; IFS=$ac_path_separator
4365 ac_dummy="$PATH"
4366 for ac_dir in $ac_dummy; do
4367   IFS=$ac_save_IFS
4368   test -z "$ac_dir" && ac_dir=.
4369   $as_executable_p "$ac_dir/$ac_word" || continue
4370 ac_cv_prog_ac_ct_LD="ld"
4371 echo "$as_me:4371: found $ac_dir/$ac_word" >&5
4372 break
4373 done
4374
4375   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4376 fi
4377 fi
4378 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4379 if test -n "$ac_ct_LD"; then
4380   echo "$as_me:4380: result: $ac_ct_LD" >&5
4381 echo "${ECHO_T}$ac_ct_LD" >&6
4382 else
4383   echo "$as_me:4383: result: no" >&5
4384 echo "${ECHO_T}no" >&6
4385 fi
4386
4387   LD=$ac_ct_LD
4388 else
4389   LD="$ac_cv_prog_LD"
4390 fi
4391
4392 if test -n "$ac_tool_prefix"; then
4393   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4394 set dummy ${ac_tool_prefix}ar; ac_word=$2
4395 echo "$as_me:4395: checking for $ac_word" >&5
4396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4397 if test "${ac_cv_prog_AR+set}" = set; then
4398   echo $ECHO_N "(cached) $ECHO_C" >&6
4399 else
4400   if test -n "$AR"; then
4401   ac_cv_prog_AR="$AR" # Let the user override the test.
4402 else
4403   ac_save_IFS=$IFS; IFS=$ac_path_separator
4404 ac_dummy="$PATH"
4405 for ac_dir in $ac_dummy; do
4406   IFS=$ac_save_IFS
4407   test -z "$ac_dir" && ac_dir=.
4408   $as_executable_p "$ac_dir/$ac_word" || continue
4409 ac_cv_prog_AR="${ac_tool_prefix}ar"
4410 echo "$as_me:4410: found $ac_dir/$ac_word" >&5
4411 break
4412 done
4413
4414 fi
4415 fi
4416 AR=$ac_cv_prog_AR
4417 if test -n "$AR"; then
4418   echo "$as_me:4418: result: $AR" >&5
4419 echo "${ECHO_T}$AR" >&6
4420 else
4421   echo "$as_me:4421: result: no" >&5
4422 echo "${ECHO_T}no" >&6
4423 fi
4424
4425 fi
4426 if test -z "$ac_cv_prog_AR"; then
4427   ac_ct_AR=$AR
4428   # Extract the first word of "ar", so it can be a program name with args.
4429 set dummy ar; ac_word=$2
4430 echo "$as_me:4430: checking for $ac_word" >&5
4431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4432 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4433   echo $ECHO_N "(cached) $ECHO_C" >&6
4434 else
4435   if test -n "$ac_ct_AR"; then
4436   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4437 else
4438   ac_save_IFS=$IFS; IFS=$ac_path_separator
4439 ac_dummy="$PATH"
4440 for ac_dir in $ac_dummy; do
4441   IFS=$ac_save_IFS
4442   test -z "$ac_dir" && ac_dir=.
4443   $as_executable_p "$ac_dir/$ac_word" || continue
4444 ac_cv_prog_ac_ct_AR="ar"
4445 echo "$as_me:4445: found $ac_dir/$ac_word" >&5
4446 break
4447 done
4448
4449   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4450 fi
4451 fi
4452 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4453 if test -n "$ac_ct_AR"; then
4454   echo "$as_me:4454: result: $ac_ct_AR" >&5
4455 echo "${ECHO_T}$ac_ct_AR" >&6
4456 else
4457   echo "$as_me:4457: result: no" >&5
4458 echo "${ECHO_T}no" >&6
4459 fi
4460
4461   AR=$ac_ct_AR
4462 else
4463   AR="$ac_cv_prog_AR"
4464 fi
4465
4466 if test -n "$ac_tool_prefix"; then
4467   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4468 set dummy ${ac_tool_prefix}nm; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_prog_NM+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   if test -n "$NM"; then
4475   ac_cv_prog_NM="$NM" # Let the user override the test.
4476 else
4477   ac_save_IFS=$IFS; IFS=$ac_path_separator
4478 ac_dummy="$PATH"
4479 for ac_dir in $ac_dummy; do
4480   IFS=$ac_save_IFS
4481   test -z "$ac_dir" && ac_dir=.
4482   $as_executable_p "$ac_dir/$ac_word" || continue
4483 ac_cv_prog_NM="${ac_tool_prefix}nm"
4484 echo "$as_me:4484: found $ac_dir/$ac_word" >&5
4485 break
4486 done
4487
4488 fi
4489 fi
4490 NM=$ac_cv_prog_NM
4491 if test -n "$NM"; then
4492   echo "$as_me:4492: result: $NM" >&5
4493 echo "${ECHO_T}$NM" >&6
4494 else
4495   echo "$as_me:4495: result: no" >&5
4496 echo "${ECHO_T}no" >&6
4497 fi
4498
4499 fi
4500 if test -z "$ac_cv_prog_NM"; then
4501   ac_ct_NM=$NM
4502   # Extract the first word of "nm", so it can be a program name with args.
4503 set dummy nm; ac_word=$2
4504 echo "$as_me:4504: checking for $ac_word" >&5
4505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4506 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509   if test -n "$ac_ct_NM"; then
4510   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4511 else
4512   ac_save_IFS=$IFS; IFS=$ac_path_separator
4513 ac_dummy="$PATH"
4514 for ac_dir in $ac_dummy; do
4515   IFS=$ac_save_IFS
4516   test -z "$ac_dir" && ac_dir=.
4517   $as_executable_p "$ac_dir/$ac_word" || continue
4518 ac_cv_prog_ac_ct_NM="nm"
4519 echo "$as_me:4519: found $ac_dir/$ac_word" >&5
4520 break
4521 done
4522
4523   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4524 fi
4525 fi
4526 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4527 if test -n "$ac_ct_NM"; then
4528   echo "$as_me:4528: result: $ac_ct_NM" >&5
4529 echo "${ECHO_T}$ac_ct_NM" >&6
4530 else
4531   echo "$as_me:4531: result: no" >&5
4532 echo "${ECHO_T}no" >&6
4533 fi
4534
4535   NM=$ac_ct_NM
4536 else
4537   NM="$ac_cv_prog_NM"
4538 fi
4539
4540 if test -n "$ac_tool_prefix"; then
4541   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4542 set dummy ${ac_tool_prefix}ar; ac_word=$2
4543 echo "$as_me:4543: checking for $ac_word" >&5
4544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4545 if test "${ac_cv_prog_AR+set}" = set; then
4546   echo $ECHO_N "(cached) $ECHO_C" >&6
4547 else
4548   if test -n "$AR"; then
4549   ac_cv_prog_AR="$AR" # Let the user override the test.
4550 else
4551   ac_save_IFS=$IFS; IFS=$ac_path_separator
4552 ac_dummy="$PATH"
4553 for ac_dir in $ac_dummy; do
4554   IFS=$ac_save_IFS
4555   test -z "$ac_dir" && ac_dir=.
4556   $as_executable_p "$ac_dir/$ac_word" || continue
4557 ac_cv_prog_AR="${ac_tool_prefix}ar"
4558 echo "$as_me:4558: found $ac_dir/$ac_word" >&5
4559 break
4560 done
4561
4562 fi
4563 fi
4564 AR=$ac_cv_prog_AR
4565 if test -n "$AR"; then
4566   echo "$as_me:4566: result: $AR" >&5
4567 echo "${ECHO_T}$AR" >&6
4568 else
4569   echo "$as_me:4569: result: no" >&5
4570 echo "${ECHO_T}no" >&6
4571 fi
4572
4573 fi
4574 if test -z "$ac_cv_prog_AR"; then
4575   ac_ct_AR=$AR
4576   # Extract the first word of "ar", so it can be a program name with args.
4577 set dummy ar; ac_word=$2
4578 echo "$as_me:4578: checking for $ac_word" >&5
4579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4580 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4581   echo $ECHO_N "(cached) $ECHO_C" >&6
4582 else
4583   if test -n "$ac_ct_AR"; then
4584   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4585 else
4586   ac_save_IFS=$IFS; IFS=$ac_path_separator
4587 ac_dummy="$PATH"
4588 for ac_dir in $ac_dummy; do
4589   IFS=$ac_save_IFS
4590   test -z "$ac_dir" && ac_dir=.
4591   $as_executable_p "$ac_dir/$ac_word" || continue
4592 ac_cv_prog_ac_ct_AR="ar"
4593 echo "$as_me:4593: found $ac_dir/$ac_word" >&5
4594 break
4595 done
4596
4597   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4598 fi
4599 fi
4600 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4601 if test -n "$ac_ct_AR"; then
4602   echo "$as_me:4602: result: $ac_ct_AR" >&5
4603 echo "${ECHO_T}$ac_ct_AR" >&6
4604 else
4605   echo "$as_me:4605: result: no" >&5
4606 echo "${ECHO_T}no" >&6
4607 fi
4608
4609   AR=$ac_ct_AR
4610 else
4611   AR="$ac_cv_prog_AR"
4612 fi
4613
4614 echo "$as_me:4614: checking for options to update archives" >&5
4615 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4616 if test "${cf_cv_ar_flags+set}" = set; then
4617   echo $ECHO_N "(cached) $ECHO_C" >&6
4618 else
4619
4620         cf_cv_ar_flags=unknown
4621         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4622         do
4623
4624                 # check if $ARFLAGS already contains this choice
4625                 if test "x$ARFLAGS" != "x" ; then
4626                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4627                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4628                                 cf_cv_ar_flags=
4629                                 break
4630                         fi
4631                 fi
4632
4633                 rm -f conftest.$ac_cv_objext
4634                 rm -f conftest.a
4635
4636                 cat >conftest.$ac_ext <<EOF
4637 #line 4637 "configure"
4638 int     testdata[3] = { 123, 456, 789 };
4639 EOF
4640                 if { (eval echo "$as_me:4640: \"$ac_compile\"") >&5
4641   (eval $ac_compile) 2>&5
4642   ac_status=$?
4643   echo "$as_me:4643: \$? = $ac_status" >&5
4644   (exit $ac_status); } ; then
4645                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4646                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4647                         if test -f conftest.a ; then
4648                                 cf_cv_ar_flags=$cf_ar_flags
4649                                 break
4650                         fi
4651                 else
4652                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4653
4654 echo "${as_me:-configure}:4654: testing cannot compile test-program ..." 1>&5
4655
4656                         break
4657                 fi
4658         done
4659         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4660
4661 fi
4662 echo "$as_me:4662: result: $cf_cv_ar_flags" >&5
4663 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4664
4665 if test -n "$ARFLAGS" ; then
4666         if test -n "$cf_cv_ar_flags" ; then
4667                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4668         fi
4669 else
4670         ARFLAGS=$cf_cv_ar_flags
4671 fi
4672
4673 echo "$as_me:4673: checking if you have specified an install-prefix" >&5
4674 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4675
4676 # Check whether --with-install-prefix or --without-install-prefix was given.
4677 if test "${with_install_prefix+set}" = set; then
4678   withval="$with_install_prefix"
4679   case "x$withval" in
4680         (xyes|xno)
4681                 ;;
4682         (*)     DESTDIR="$withval"
4683                 ;;
4684         esac
4685 fi;
4686 echo "$as_me:4686: result: $DESTDIR" >&5
4687 echo "${ECHO_T}$DESTDIR" >&6
4688
4689 ###############################################################################
4690
4691 # If we're cross-compiling, allow the user to override the tools and their
4692 # options.  The configure script is oriented toward identifying the host
4693 # compiler, etc., but we need a build compiler to generate parts of the source.
4694
4695 if test "$cross_compiling" = yes ; then
4696
4697         # defaults that we might want to override
4698         : ${BUILD_CFLAGS:=''}
4699         : ${BUILD_CPPFLAGS:=''}
4700         : ${BUILD_LDFLAGS:=''}
4701         : ${BUILD_LIBS:=''}
4702         : ${BUILD_EXEEXT:='$x'}
4703         : ${BUILD_OBJEXT:='o'}
4704
4705 # Check whether --with-build-cc or --without-build-cc was given.
4706 if test "${with_build_cc+set}" = set; then
4707   withval="$with_build_cc"
4708   BUILD_CC="$withval"
4709 else
4710   for ac_prog in gcc clang c99 c89 cc cl
4711 do
4712   # Extract the first word of "$ac_prog", so it can be a program name with args.
4713 set dummy $ac_prog; ac_word=$2
4714 echo "$as_me:4714: checking for $ac_word" >&5
4715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4716 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4717   echo $ECHO_N "(cached) $ECHO_C" >&6
4718 else
4719   if test -n "$BUILD_CC"; then
4720   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4721 else
4722   ac_save_IFS=$IFS; IFS=$ac_path_separator
4723 ac_dummy="$PATH"
4724 for ac_dir in $ac_dummy; do
4725   IFS=$ac_save_IFS
4726   test -z "$ac_dir" && ac_dir=.
4727   $as_executable_p "$ac_dir/$ac_word" || continue
4728 ac_cv_prog_BUILD_CC="$ac_prog"
4729 echo "$as_me:4729: found $ac_dir/$ac_word" >&5
4730 break
4731 done
4732
4733 fi
4734 fi
4735 BUILD_CC=$ac_cv_prog_BUILD_CC
4736 if test -n "$BUILD_CC"; then
4737   echo "$as_me:4737: result: $BUILD_CC" >&5
4738 echo "${ECHO_T}$BUILD_CC" >&6
4739 else
4740   echo "$as_me:4740: result: no" >&5
4741 echo "${ECHO_T}no" >&6
4742 fi
4743
4744   test -n "$BUILD_CC" && break
4745 done
4746 test -n "$BUILD_CC" || BUILD_CC="none"
4747
4748 fi;
4749         echo "$as_me:4749: checking for native build C compiler" >&5
4750 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4751         echo "$as_me:4751: result: $BUILD_CC" >&5
4752 echo "${ECHO_T}$BUILD_CC" >&6
4753
4754         echo "$as_me:4754: checking for native build C preprocessor" >&5
4755 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4756
4757 # Check whether --with-build-cpp or --without-build-cpp was given.
4758 if test "${with_build_cpp+set}" = set; then
4759   withval="$with_build_cpp"
4760   BUILD_CPP="$withval"
4761 else
4762   BUILD_CPP='${BUILD_CC} -E'
4763 fi;
4764         echo "$as_me:4764: result: $BUILD_CPP" >&5
4765 echo "${ECHO_T}$BUILD_CPP" >&6
4766
4767         echo "$as_me:4767: checking for native build C flags" >&5
4768 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4769
4770 # Check whether --with-build-cflags or --without-build-cflags was given.
4771 if test "${with_build_cflags+set}" = set; then
4772   withval="$with_build_cflags"
4773   BUILD_CFLAGS="$withval"
4774 fi;
4775         echo "$as_me:4775: result: $BUILD_CFLAGS" >&5
4776 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4777
4778         echo "$as_me:4778: checking for native build C preprocessor-flags" >&5
4779 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4780
4781 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4782 if test "${with_build_cppflags+set}" = set; then
4783   withval="$with_build_cppflags"
4784   BUILD_CPPFLAGS="$withval"
4785 fi;
4786         echo "$as_me:4786: result: $BUILD_CPPFLAGS" >&5
4787 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4788
4789         echo "$as_me:4789: checking for native build linker-flags" >&5
4790 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4791
4792 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4793 if test "${with_build_ldflags+set}" = set; then
4794   withval="$with_build_ldflags"
4795   BUILD_LDFLAGS="$withval"
4796 fi;
4797         echo "$as_me:4797: result: $BUILD_LDFLAGS" >&5
4798 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4799
4800         echo "$as_me:4800: checking for native build linker-libraries" >&5
4801 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4802
4803 # Check whether --with-build-libs or --without-build-libs was given.
4804 if test "${with_build_libs+set}" = set; then
4805   withval="$with_build_libs"
4806   BUILD_LIBS="$withval"
4807 fi;
4808         echo "$as_me:4808: result: $BUILD_LIBS" >&5
4809 echo "${ECHO_T}$BUILD_LIBS" >&6
4810
4811         # this assumes we're on Unix.
4812         BUILD_EXEEXT=
4813         BUILD_OBJEXT=o
4814
4815         : ${BUILD_CC:='${CC}'}
4816
4817         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4818                 { { echo "$as_me:4818: error: Cross-build requires two compilers.
4819 Use --with-build-cc to specify the native compiler." >&5
4820 echo "$as_me: error: Cross-build requires two compilers.
4821 Use --with-build-cc to specify the native compiler." >&2;}
4822    { (exit 1); exit 1; }; }
4823         fi
4824
4825 else
4826         : ${BUILD_CC:='${CC}'}
4827         : ${BUILD_CPP:='${CPP}'}
4828         : ${BUILD_CFLAGS:='${CFLAGS}'}
4829         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4830         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4831         : ${BUILD_LIBS:='${LIBS}'}
4832         : ${BUILD_EXEEXT:='$x'}
4833         : ${BUILD_OBJEXT:='o'}
4834 fi
4835
4836 ###############################################################################
4837
4838 ### Options to allow the user to specify the set of libraries which are used.
4839 ### Use "--without-normal --with-shared" to allow the default model to be
4840 ### shared, for example.
4841 cf_list_models=""
4842
4843 echo "$as_me:4843: checking if libtool -version-number should be used" >&5
4844 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4845
4846 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4847 if test "${enable_libtool_version+set}" = set; then
4848   enableval="$enable_libtool_version"
4849   test "$enableval" != no && enableval=yes
4850         if test "$enableval" != "yes" ; then
4851     cf_libtool_version=no
4852         else
4853                 cf_libtool_version=yes
4854         fi
4855 else
4856   enableval=yes
4857         cf_libtool_version=yes
4858
4859 fi;
4860 echo "$as_me:4860: result: $cf_libtool_version" >&5
4861 echo "${ECHO_T}$cf_libtool_version" >&6
4862
4863 if test "$cf_libtool_version" = yes ; then
4864         LIBTOOL_VERSION="-version-number"
4865 else
4866         LIBTOOL_VERSION="-version-info"
4867         case "x$VERSION" in
4868         (x)
4869                 { echo "$as_me:4869: WARNING: VERSION was not set" >&5
4870 echo "$as_me: WARNING: VERSION was not set" >&2;}
4871                 ;;
4872         (x*.*.*)
4873                 ABI_VERSION="$VERSION"
4874                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4875
4876 echo "${as_me:-configure}:4876: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4877
4878                 ;;
4879         (x*:*:*)
4880                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4881                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4882
4883 echo "${as_me:-configure}:4883: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4884
4885                 ;;
4886         (*)
4887                 { echo "$as_me:4887: WARNING: unexpected VERSION value: $VERSION" >&5
4888 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4889                 ;;
4890         esac
4891 fi
4892
4893 LIBTOOL=
4894
4895 # common library maintenance symbols that are convenient for libtool scripts:
4896 LIB_CREATE='${AR} -cr'
4897 LIB_OBJECT='${OBJECTS}'
4898 LIB_SUFFIX=.a
4899 LIB_PREP="$RANLIB"
4900
4901 # symbols used to prop libtool up to enable it to determine what it should be
4902 # doing:
4903 LIB_CLEAN=
4904 LIB_COMPILE=
4905 LIB_LINK='${CC}'
4906 LIB_INSTALL=
4907 LIB_UNINSTALL=
4908
4909 echo "$as_me:4909: checking if you want to build libraries with libtool" >&5
4910 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4911
4912 # Check whether --with-libtool or --without-libtool was given.
4913 if test "${with_libtool+set}" = set; then
4914   withval="$with_libtool"
4915   with_libtool=$withval
4916 else
4917   with_libtool=no
4918 fi;
4919 echo "$as_me:4919: result: $with_libtool" >&5
4920 echo "${ECHO_T}$with_libtool" >&6
4921 if test "$with_libtool" != "no"; then
4922
4923         if test "$with_libtool" != "yes" ; then
4924
4925 if test "x$prefix" != xNONE; then
4926         cf_path_syntax="$prefix"
4927 else
4928         cf_path_syntax="$ac_default_prefix"
4929 fi
4930
4931 case ".$with_libtool" in
4932 (.\$\(*\)*|.\'*\'*)
4933         ;;
4934 (..|./*|.\\*)
4935         ;;
4936 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4937         ;;
4938 (.\${*prefix}*|.\${*dir}*)
4939         eval with_libtool="$with_libtool"
4940         case ".$with_libtool" in
4941         (.NONE/*)
4942                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4943                 ;;
4944         esac
4945         ;;
4946 (.no|.NONE/*)
4947         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4948         ;;
4949 (*)
4950         { { echo "$as_me:4950: error: expected a pathname, not \"$with_libtool\"" >&5
4951 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4952    { (exit 1); exit 1; }; }
4953         ;;
4954 esac
4955
4956                 LIBTOOL=$with_libtool
4957         else
4958                 if test -n "$ac_tool_prefix"; then
4959   for ac_prog in libtool glibtool
4960   do
4961     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4962 set dummy $ac_tool_prefix$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_LIBTOOL+set}" = set; then
4966   echo $ECHO_N "(cached) $ECHO_C" >&6
4967 else
4968   if test -n "$LIBTOOL"; then
4969   ac_cv_prog_LIBTOOL="$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_LIBTOOL="$ac_tool_prefix$ac_prog"
4978 echo "$as_me:4978: found $ac_dir/$ac_word" >&5
4979 break
4980 done
4981
4982 fi
4983 fi
4984 LIBTOOL=$ac_cv_prog_LIBTOOL
4985 if test -n "$LIBTOOL"; then
4986   echo "$as_me:4986: result: $LIBTOOL" >&5
4987 echo "${ECHO_T}$LIBTOOL" >&6
4988 else
4989   echo "$as_me:4989: result: no" >&5
4990 echo "${ECHO_T}no" >&6
4991 fi
4992
4993     test -n "$LIBTOOL" && break
4994   done
4995 fi
4996 if test -z "$LIBTOOL"; then
4997   ac_ct_LIBTOOL=$LIBTOOL
4998   for ac_prog in libtool glibtool
4999 do
5000   # Extract the first word of "$ac_prog", so it can be a program name with args.
5001 set dummy $ac_prog; ac_word=$2
5002 echo "$as_me:5002: checking for $ac_word" >&5
5003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5004 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5005   echo $ECHO_N "(cached) $ECHO_C" >&6
5006 else
5007   if test -n "$ac_ct_LIBTOOL"; then
5008   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5009 else
5010   ac_save_IFS=$IFS; IFS=$ac_path_separator
5011 ac_dummy="$PATH"
5012 for ac_dir in $ac_dummy; do
5013   IFS=$ac_save_IFS
5014   test -z "$ac_dir" && ac_dir=.
5015   $as_executable_p "$ac_dir/$ac_word" || continue
5016 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5017 echo "$as_me:5017: found $ac_dir/$ac_word" >&5
5018 break
5019 done
5020
5021 fi
5022 fi
5023 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5024 if test -n "$ac_ct_LIBTOOL"; then
5025   echo "$as_me:5025: result: $ac_ct_LIBTOOL" >&5
5026 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5027 else
5028   echo "$as_me:5028: result: no" >&5
5029 echo "${ECHO_T}no" >&6
5030 fi
5031
5032   test -n "$ac_ct_LIBTOOL" && break
5033 done
5034 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5035
5036   LIBTOOL=$ac_ct_LIBTOOL
5037 fi
5038
5039 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5040 then
5041         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.].*//'`
5042 else
5043         cf_cv_libtool_version=
5044 fi
5045 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5046
5047                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5048                 then
5049
5050 unset ac_cv_prog_ac_ct_LIBTOOL
5051 unset ac_ct_LIBTOOL
5052 unset LIBTOOL
5053
5054                         if test -n "$ac_tool_prefix"; then
5055   for ac_prog in glibtool
5056   do
5057     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5058 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5059 echo "$as_me:5059: checking for $ac_word" >&5
5060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5061 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5062   echo $ECHO_N "(cached) $ECHO_C" >&6
5063 else
5064   if test -n "$LIBTOOL"; then
5065   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5066 else
5067   ac_save_IFS=$IFS; IFS=$ac_path_separator
5068 ac_dummy="$PATH"
5069 for ac_dir in $ac_dummy; do
5070   IFS=$ac_save_IFS
5071   test -z "$ac_dir" && ac_dir=.
5072   $as_executable_p "$ac_dir/$ac_word" || continue
5073 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5074 echo "$as_me:5074: found $ac_dir/$ac_word" >&5
5075 break
5076 done
5077
5078 fi
5079 fi
5080 LIBTOOL=$ac_cv_prog_LIBTOOL
5081 if test -n "$LIBTOOL"; then
5082   echo "$as_me:5082: result: $LIBTOOL" >&5
5083 echo "${ECHO_T}$LIBTOOL" >&6
5084 else
5085   echo "$as_me:5085: result: no" >&5
5086 echo "${ECHO_T}no" >&6
5087 fi
5088
5089     test -n "$LIBTOOL" && break
5090   done
5091 fi
5092 if test -z "$LIBTOOL"; then
5093   ac_ct_LIBTOOL=$LIBTOOL
5094   for ac_prog in glibtool
5095 do
5096   # Extract the first word of "$ac_prog", so it can be a program name with args.
5097 set dummy $ac_prog; ac_word=$2
5098 echo "$as_me:5098: checking for $ac_word" >&5
5099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5100 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5101   echo $ECHO_N "(cached) $ECHO_C" >&6
5102 else
5103   if test -n "$ac_ct_LIBTOOL"; then
5104   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5105 else
5106   ac_save_IFS=$IFS; IFS=$ac_path_separator
5107 ac_dummy="$PATH"
5108 for ac_dir in $ac_dummy; do
5109   IFS=$ac_save_IFS
5110   test -z "$ac_dir" && ac_dir=.
5111   $as_executable_p "$ac_dir/$ac_word" || continue
5112 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5113 echo "$as_me:5113: found $ac_dir/$ac_word" >&5
5114 break
5115 done
5116
5117 fi
5118 fi
5119 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5120 if test -n "$ac_ct_LIBTOOL"; then
5121   echo "$as_me:5121: result: $ac_ct_LIBTOOL" >&5
5122 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5123 else
5124   echo "$as_me:5124: result: no" >&5
5125 echo "${ECHO_T}no" >&6
5126 fi
5127
5128   test -n "$ac_ct_LIBTOOL" && break
5129 done
5130 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5131
5132   LIBTOOL=$ac_ct_LIBTOOL
5133 fi
5134
5135 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5136 then
5137         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.].*//'`
5138 else
5139         cf_cv_libtool_version=
5140 fi
5141 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5142
5143                 fi
5144         fi
5145         if test -z "$LIBTOOL" ; then
5146                 { { echo "$as_me:5146: error: Cannot find libtool" >&5
5147 echo "$as_me: error: Cannot find libtool" >&2;}
5148    { (exit 1); exit 1; }; }
5149         fi
5150         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5151         LIB_OBJECT='${OBJECTS:.o=.lo}'
5152         LIB_SUFFIX=.la
5153         LIB_CLEAN='${LIBTOOL} --mode=clean'
5154         LIB_COMPILE='${LIBTOOL} --mode=compile'
5155         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5156         LIB_INSTALL='${LIBTOOL} --mode=install'
5157         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5158         LIB_PREP=:
5159
5160 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5161 then
5162         echo "$as_me:5162: checking version of $LIBTOOL" >&5
5163 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5164
5165 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5166 then
5167         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.].*//'`
5168 else
5169         cf_cv_libtool_version=
5170 fi
5171 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5172
5173         echo "$as_me:5173: result: $cf_cv_libtool_version" >&5
5174 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5175         if test -z "$cf_cv_libtool_version" ; then
5176                 { { echo "$as_me:5176: error: This is not GNU libtool" >&5
5177 echo "$as_me: error: This is not GNU libtool" >&2;}
5178    { (exit 1); exit 1; }; }
5179         fi
5180 else
5181         { { echo "$as_me:5181: error: GNU libtool has not been found" >&5
5182 echo "$as_me: error: GNU libtool has not been found" >&2;}
5183    { (exit 1); exit 1; }; }
5184 fi
5185
5186         # special hack to add -no-undefined (which libtool should do for itself)
5187         LT_UNDEF=
5188         case "$cf_cv_system_name" in
5189         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5190                 LT_UNDEF=-no-undefined
5191                 ;;
5192         esac
5193
5194         # special hack to add --tag option for C++ compiler
5195         case $cf_cv_libtool_version in
5196         (1.[5-9]*|[2-9].[0-9.a-z]*)
5197                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5198                 LIBTOOL="$LIBTOOL --tag=CC"
5199                 ;;
5200         (*)
5201                 LIBTOOL_CXX="$LIBTOOL"
5202                 ;;
5203         esac
5204 else
5205         LIBTOOL=""
5206         LIBTOOL_CXX=""
5207 fi
5208
5209 test -z "$LIBTOOL" && ECHO_LT=
5210
5211 if test "$with_libtool" != "no" ; then
5212
5213 cf_list_models="$cf_list_models libtool"
5214
5215 else
5216
5217 echo "$as_me:5217: checking if you want to build shared libraries" >&5
5218 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5219
5220 # Check whether --with-shared or --without-shared was given.
5221 if test "${with_shared+set}" = set; then
5222   withval="$with_shared"
5223   with_shared=$withval
5224 else
5225   with_shared=no
5226 fi;
5227 echo "$as_me:5227: result: $with_shared" >&5
5228 echo "${ECHO_T}$with_shared" >&6
5229 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5230
5231 echo "$as_me:5231: checking if you want to build static libraries" >&5
5232 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5233
5234 # Check whether --with-normal or --without-normal was given.
5235 if test "${with_normal+set}" = set; then
5236   withval="$with_normal"
5237   with_normal=$withval
5238 else
5239   with_normal=yes
5240 fi;
5241 echo "$as_me:5241: result: $with_normal" >&5
5242 echo "${ECHO_T}$with_normal" >&6
5243 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5244
5245 echo "$as_me:5245: checking if you want to build debug libraries" >&5
5246 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5247
5248 # Check whether --with-debug or --without-debug was given.
5249 if test "${with_debug+set}" = set; then
5250   withval="$with_debug"
5251   with_debug=$withval
5252 else
5253   with_debug=yes
5254 fi;
5255 echo "$as_me:5255: result: $with_debug" >&5
5256 echo "${ECHO_T}$with_debug" >&6
5257 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5258
5259 echo "$as_me:5259: checking if you want to build profiling libraries" >&5
5260 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5261
5262 # Check whether --with-profile or --without-profile was given.
5263 if test "${with_profile+set}" = set; then
5264   withval="$with_profile"
5265   with_profile=$withval
5266 else
5267   with_profile=no
5268 fi;
5269 echo "$as_me:5269: result: $with_profile" >&5
5270 echo "${ECHO_T}$with_profile" >&6
5271 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5272
5273 fi
5274
5275 if test "X$cf_with_cxx_binding" != Xno; then
5276 if test "x$with_shared" = "xyes"; then
5277 echo "$as_me:5277: checking if you want to build C++ shared libraries" >&5
5278 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5279
5280 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5281 if test "${with_cxx_shared+set}" = set; then
5282   withval="$with_cxx_shared"
5283   with_shared_cxx=$withval
5284 else
5285   with_shared_cxx=no
5286 fi;
5287 echo "$as_me:5287: result: $with_shared_cxx" >&5
5288 echo "${ECHO_T}$with_shared_cxx" >&6
5289 fi
5290 fi
5291
5292 ###############################################################################
5293
5294 echo "$as_me:5294: checking for specified models" >&5
5295 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5296 test -z "$cf_list_models" && cf_list_models=normal
5297 test "$with_libtool" != "no" && cf_list_models=libtool
5298 echo "$as_me:5298: result: $cf_list_models" >&5
5299 echo "${ECHO_T}$cf_list_models" >&6
5300
5301 ### Use the first model as the default, and save its suffix for use in building
5302 ### up test-applications.
5303 echo "$as_me:5303: checking for default model" >&5
5304 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5305 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5306 echo "$as_me:5306: result: $DFT_LWR_MODEL" >&5
5307 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5308
5309 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5310
5311 TICS_NAME=tic
5312
5313 TINFO_NAME=tinfo
5314
5315 LIB_NAME=ncurses
5316
5317 LIB_DIR=../lib
5318 LIB_2ND=../../lib
5319
5320 echo "$as_me:5320: checking if you want to have a library-prefix" >&5
5321 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5322
5323 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5324 if test "${with_lib_prefix+set}" = set; then
5325   withval="$with_lib_prefix"
5326   with_lib_prefix=$withval
5327 else
5328   with_lib_prefix=auto
5329 fi;
5330 echo "$as_me:5330: result: $with_lib_prefix" >&5
5331 echo "${ECHO_T}$with_lib_prefix" >&6
5332
5333 if test $with_lib_prefix = auto
5334 then
5335
5336         case $cf_cv_system_name in
5337         (OS/2*|os2*)
5338                 if test "$DFT_LWR_MODEL" = libtool; then
5339                         LIB_PREFIX='lib'
5340                 else
5341                         LIB_PREFIX=''
5342                 fi
5343                 ;;
5344         (*)     LIB_PREFIX='lib'
5345                 ;;
5346         esac
5347 cf_prefix=$LIB_PREFIX
5348
5349 elif test $with_lib_prefix = no
5350 then
5351         LIB_PREFIX=
5352 else
5353         LIB_PREFIX=$with_lib_prefix
5354 fi
5355
5356 LIB_SUFFIX=
5357
5358         echo "$as_me:5358: checking for PATH separator" >&5
5359 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5360         case $cf_cv_system_name in
5361         (os2*)  PATH_SEPARATOR=';'  ;;
5362         (*)     ${PATH_SEPARATOR:=':'}  ;;
5363         esac
5364
5365         echo "$as_me:5365: result: $PATH_SEPARATOR" >&5
5366 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5367
5368 ###############################################################################
5369
5370 echo "$as_me:5370: checking if you want to build a separate terminfo library" >&5
5371 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5372
5373 # Check whether --with-termlib or --without-termlib was given.
5374 if test "${with_termlib+set}" = set; then
5375   withval="$with_termlib"
5376   with_termlib=$withval
5377 else
5378   with_termlib=no
5379 fi;
5380 echo "$as_me:5380: result: $with_termlib" >&5
5381 echo "${ECHO_T}$with_termlib" >&6
5382
5383 echo "$as_me:5383: checking if you want to build a separate tic library" >&5
5384 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5385
5386 # Check whether --with-ticlib or --without-ticlib was given.
5387 if test "${with_ticlib+set}" = set; then
5388   withval="$with_ticlib"
5389   with_ticlib=$withval
5390 else
5391   with_ticlib=no
5392 fi;
5393 echo "$as_me:5393: result: $with_ticlib" >&5
5394 echo "${ECHO_T}$with_ticlib" >&6
5395
5396 if test X"$CC_G_OPT" = X"" ; then
5397         CC_G_OPT='-g'
5398         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5399 fi
5400
5401 if test X"$CXX_G_OPT" = X"" ; then
5402         CXX_G_OPT='-g'
5403         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5404 fi
5405
5406 echo "$as_me:5406: checking for default loader flags" >&5
5407 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5408 case $DFT_LWR_MODEL in
5409 (libtool) LD_MODEL=''   ;;
5410 (normal)  LD_MODEL=''   ;;
5411 (debug)   LD_MODEL=$CC_G_OPT ;;
5412 (profile) LD_MODEL='-pg';;
5413 (shared)  LD_MODEL=''   ;;
5414 esac
5415 echo "$as_me:5415: result: $LD_MODEL" >&5
5416 echo "${ECHO_T}$LD_MODEL" >&6
5417
5418 case $DFT_LWR_MODEL in
5419 (shared)
5420
5421 echo "$as_me:5421: checking if rpath option should be used" >&5
5422 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5423
5424 # Check whether --enable-rpath or --disable-rpath was given.
5425 if test "${enable_rpath+set}" = set; then
5426   enableval="$enable_rpath"
5427   cf_cv_enable_rpath=$enableval
5428 else
5429   cf_cv_enable_rpath=no
5430 fi;
5431 echo "$as_me:5431: result: $cf_cv_enable_rpath" >&5
5432 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5433
5434 echo "$as_me:5434: checking if shared libraries should be relinked during install" >&5
5435 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5436
5437 # Check whether --enable-relink or --disable-relink was given.
5438 if test "${enable_relink+set}" = set; then
5439   enableval="$enable_relink"
5440   cf_cv_do_relink=$enableval
5441 else
5442   cf_cv_do_relink=yes
5443 fi;
5444 echo "$as_me:5444: result: $cf_cv_do_relink" >&5
5445 echo "${ECHO_T}$cf_cv_do_relink" >&6
5446         ;;
5447 esac
5448
5449 # we will build libraries one-level down.
5450 rel_builddir=..
5451
5452 LD_RPATH_OPT=
5453 if test "x$cf_cv_enable_rpath" != xno
5454 then
5455         echo "$as_me:5455: checking for an rpath option" >&5
5456 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5457         case $cf_cv_system_name in
5458         (irix*)
5459                 if test "$GCC" = yes; then
5460                         LD_RPATH_OPT="-Wl,-rpath,"
5461                 else
5462                         LD_RPATH_OPT="-rpath "
5463                 fi
5464                 ;;
5465         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5466                 LD_RPATH_OPT="-Wl,-rpath,"
5467                 ;;
5468         (openbsd[2-9].*|mirbsd*)
5469                 LD_RPATH_OPT="-Wl,-rpath,"
5470                 ;;
5471         (dragonfly*)
5472                 LD_RPATH_OPT="-rpath "
5473                 ;;
5474         (netbsd*)
5475                 LD_RPATH_OPT="-Wl,-rpath,"
5476                 ;;
5477         (osf*|mls+*)
5478                 LD_RPATH_OPT="-rpath "
5479                 ;;
5480         (solaris2*)
5481                 LD_RPATH_OPT="-R"
5482                 ;;
5483         (*)
5484                 ;;
5485         esac
5486         echo "$as_me:5486: result: $LD_RPATH_OPT" >&5
5487 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5488
5489         case "x$LD_RPATH_OPT" in
5490         (x-R*)
5491                 echo "$as_me:5491: checking if we need a space after rpath option" >&5
5492 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5493                 cf_save_LIBS="$LIBS"
5494
5495 cf_add_libs="${LD_RPATH_OPT}$libdir"
5496 # Filter out duplicates - this happens with badly-designed ".pc" files...
5497 for cf_add_1lib in $LIBS
5498 do
5499         for cf_add_2lib in $cf_add_libs
5500         do
5501                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5502                 then
5503                         cf_add_1lib=
5504                         break
5505                 fi
5506         done
5507         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5508 done
5509 LIBS="$cf_add_libs"
5510
5511                 cat >conftest.$ac_ext <<_ACEOF
5512 #line 5512 "configure"
5513 #include "confdefs.h"
5514
5515 int
5516 main (void)
5517 {
5518
5519   ;
5520   return 0;
5521 }
5522 _ACEOF
5523 rm -f conftest.$ac_objext conftest$ac_exeext
5524 if { (eval echo "$as_me:5524: \"$ac_link\"") >&5
5525   (eval $ac_link) 2>&5
5526   ac_status=$?
5527   echo "$as_me:5527: \$? = $ac_status" >&5
5528   (exit $ac_status); } &&
5529          { ac_try='test -s conftest$ac_exeext'
5530   { (eval echo "$as_me:5530: \"$ac_try\"") >&5
5531   (eval $ac_try) 2>&5
5532   ac_status=$?
5533   echo "$as_me:5533: \$? = $ac_status" >&5
5534   (exit $ac_status); }; }; then
5535   cf_rpath_space=no
5536 else
5537   echo "$as_me: failed program was:" >&5
5538 cat conftest.$ac_ext >&5
5539 cf_rpath_space=yes
5540 fi
5541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5542                 LIBS="$cf_save_LIBS"
5543                 echo "$as_me:5543: result: $cf_rpath_space" >&5
5544 echo "${ECHO_T}$cf_rpath_space" >&6
5545                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5546                 ;;
5547         esac
5548 fi
5549
5550         RM_SHARED_OPTS=
5551         LOCAL_LDFLAGS=
5552         LOCAL_LDFLAGS2=
5553         LD_SHARED_OPTS=
5554         INSTALL_LIB="-m 644"
5555         : ${rel_builddir:=.}
5556
5557         shlibdir=$libdir
5558
5559         MAKE_DLLS="#"
5560
5561         cf_cv_do_symlinks=no
5562         cf_ld_rpath_opt=
5563         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5564
5565         echo "$as_me:5565: checking if release/abi version should be used for shared libs" >&5
5566 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5567
5568 # Check whether --with-shlib-version or --without-shlib-version was given.
5569 if test "${with_shlib_version+set}" = set; then
5570   withval="$with_shlib_version"
5571   test -z "$withval" && withval=auto
5572         case $withval in
5573         (yes)
5574                 cf_cv_shlib_version=auto
5575                 ;;
5576         (rel|abi|auto)
5577                 cf_cv_shlib_version=$withval
5578                 ;;
5579         (*)
5580                 echo "$as_me:5580: result: $withval" >&5
5581 echo "${ECHO_T}$withval" >&6
5582                 { { echo "$as_me:5582: error: option value must be one of: rel, abi, or auto" >&5
5583 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5584    { (exit 1); exit 1; }; }
5585                 ;;
5586         esac
5587
5588 else
5589   cf_cv_shlib_version=auto
5590 fi;
5591         echo "$as_me:5591: result: $cf_cv_shlib_version" >&5
5592 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5593
5594         cf_cv_rm_so_locs=no
5595         cf_try_cflags=
5596
5597         # Some less-capable ports of gcc support only -fpic
5598         CC_SHARED_OPTS=
5599
5600         cf_try_fPIC=no
5601         if test "$GCC" = yes
5602         then
5603                 cf_try_fPIC=yes
5604         else
5605                 case $cf_cv_system_name in
5606                 (*linux*)       # e.g., PGI compiler
5607                         cf_try_fPIC=yes
5608                         ;;
5609                 esac
5610         fi
5611
5612         if test "$cf_try_fPIC" = yes
5613         then
5614                 echo "$as_me:5614: checking which $CC option to use" >&5
5615 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5616                 cf_save_CFLAGS="$CFLAGS"
5617                 for CC_SHARED_OPTS in -fPIC -fpic ''
5618                 do
5619                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5620                         cat >conftest.$ac_ext <<_ACEOF
5621 #line 5621 "configure"
5622 #include "confdefs.h"
5623 #include <stdio.h>
5624 int
5625 main (void)
5626 {
5627 int x = 1
5628   ;
5629   return 0;
5630 }
5631 _ACEOF
5632 rm -f conftest.$ac_objext
5633 if { (eval echo "$as_me:5633: \"$ac_compile\"") >&5
5634   (eval $ac_compile) 2>&5
5635   ac_status=$?
5636   echo "$as_me:5636: \$? = $ac_status" >&5
5637   (exit $ac_status); } &&
5638          { ac_try='test -s conftest.$ac_objext'
5639   { (eval echo "$as_me:5639: \"$ac_try\"") >&5
5640   (eval $ac_try) 2>&5
5641   ac_status=$?
5642   echo "$as_me:5642: \$? = $ac_status" >&5
5643   (exit $ac_status); }; }; then
5644   break
5645 else
5646   echo "$as_me: failed program was:" >&5
5647 cat conftest.$ac_ext >&5
5648 fi
5649 rm -f conftest.$ac_objext conftest.$ac_ext
5650                 done
5651                 echo "$as_me:5651: result: $CC_SHARED_OPTS" >&5
5652 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5653                 CFLAGS="$cf_save_CFLAGS"
5654         fi
5655
5656         cf_cv_shlib_version_infix=no
5657
5658         case $cf_cv_system_name in
5659         (aix4.3-9*|aix[5-7]*)
5660                 if test "$GCC" = yes; then
5661                         CC_SHARED_OPTS='-Wl,-brtl'
5662                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5663                 else
5664                         CC_SHARED_OPTS='-brtl'
5665                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5666                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5667                 fi
5668                 ;;
5669         (beos*)
5670                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5671                 ;;
5672         (cygwin*)
5673                 CC_SHARED_OPTS=
5674                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5675                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5676                 cf_cv_shlib_version=cygdll
5677                 cf_cv_shlib_version_infix=cygdll
5678                 shlibdir=$bindir
5679                 MAKE_DLLS=
5680                 cat >mk_shared_lib.sh <<-CF_EOF
5681                 #!$SHELL
5682                 SHARED_LIB=\$1
5683                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5684                 shift
5685                 cat <<-EOF
5686                 Linking shared library
5687                 ** SHARED_LIB \$SHARED_LIB
5688                 ** IMPORT_LIB \$IMPORT_LIB
5689 EOF
5690                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5691 CF_EOF
5692                 chmod +x mk_shared_lib.sh
5693                 ;;
5694         (msys*)
5695                 CC_SHARED_OPTS=
5696                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5697                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5698                 cf_cv_shlib_version=msysdll
5699                 cf_cv_shlib_version_infix=msysdll
5700                 shlibdir=$bindir
5701                 MAKE_DLLS=
5702                 cat >mk_shared_lib.sh <<-CF_EOF
5703                 #!$SHELL
5704                 SHARED_LIB=\$1
5705                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5706                 shift
5707                 cat <<-EOF
5708                 Linking shared library
5709                 ** SHARED_LIB \$SHARED_LIB
5710                 ** IMPORT_LIB \$IMPORT_LIB
5711 EOF
5712                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5713 CF_EOF
5714                 chmod +x mk_shared_lib.sh
5715                 ;;
5716         (darwin*)
5717                 cf_try_cflags="no-cpp-precomp"
5718                 CC_SHARED_OPTS="-dynamic"
5719                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5720                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5721                 cf_cv_shlib_version_infix=yes
5722                 echo "$as_me:5722: checking if ld -search_paths_first works" >&5
5723 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5724 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5725   echo $ECHO_N "(cached) $ECHO_C" >&6
5726 else
5727
5728                         cf_save_LDFLAGS=$LDFLAGS
5729                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5730                         cat >conftest.$ac_ext <<_ACEOF
5731 #line 5731 "configure"
5732 #include "confdefs.h"
5733
5734 int
5735 main (void)
5736 {
5737 int i;
5738   ;
5739   return 0;
5740 }
5741 _ACEOF
5742 rm -f conftest.$ac_objext conftest$ac_exeext
5743 if { (eval echo "$as_me:5743: \"$ac_link\"") >&5
5744   (eval $ac_link) 2>&5
5745   ac_status=$?
5746   echo "$as_me:5746: \$? = $ac_status" >&5
5747   (exit $ac_status); } &&
5748          { ac_try='test -s conftest$ac_exeext'
5749   { (eval echo "$as_me:5749: \"$ac_try\"") >&5
5750   (eval $ac_try) 2>&5
5751   ac_status=$?
5752   echo "$as_me:5752: \$? = $ac_status" >&5
5753   (exit $ac_status); }; }; then
5754   cf_cv_ldflags_search_paths_first=yes
5755 else
5756   echo "$as_me: failed program was:" >&5
5757 cat conftest.$ac_ext >&5
5758 cf_cv_ldflags_search_paths_first=no
5759 fi
5760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5761                                 LDFLAGS=$cf_save_LDFLAGS
5762 fi
5763 echo "$as_me:5763: result: $cf_cv_ldflags_search_paths_first" >&5
5764 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5765                 if test $cf_cv_ldflags_search_paths_first = yes; then
5766                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5767                 fi
5768                 ;;
5769         (hpux[7-8]*)
5770                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5771                 if test "$GCC" != yes; then
5772                         CC_SHARED_OPTS='+Z'
5773                 fi
5774                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5775                 INSTALL_LIB="-m 555"
5776                 ;;
5777         (hpux*)
5778                 # (tested with gcc 2.7.2 -- I don't have c89)
5779                 if test "$GCC" = yes; then
5780                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5781                 else
5782                         CC_SHARED_OPTS='+Z'
5783                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5784                 fi
5785                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5786                 # HP-UX shared libraries must be executable, and should be
5787                 # readonly to exploit a quirk in the memory manager.
5788                 INSTALL_LIB="-m 555"
5789                 ;;
5790         (interix*)
5791                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5792                 if test "$cf_cv_shlib_version" = rel; then
5793                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5794                 else
5795                         cf_shared_soname='`basename $@`'
5796                 fi
5797                 CC_SHARED_OPTS=
5798                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5799                 ;;
5800         (irix*)
5801                 if test "$cf_cv_enable_rpath" = yes ; then
5802                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5803                 fi
5804                 # tested with IRIX 5.2 and 'cc'.
5805                 if test "$GCC" != yes; then
5806                         CC_SHARED_OPTS='-KPIC'
5807                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5808                 else
5809                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5810                 fi
5811                 cf_cv_rm_so_locs=yes
5812                 ;;
5813         (linux*|gnu*|k*bsd*-gnu)
5814                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5815                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5816                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5817                 fi
5818                 if test "$cf_cv_enable_rpath" = yes ; then
5819                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5820                 fi
5821
5822         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5823         if test "$cf_cv_shlib_version" = rel; then
5824                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5825         else
5826                 cf_cv_shared_soname='`basename $@`'
5827         fi
5828
5829                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5830                 ;;
5831         (mingw*)
5832                 cf_cv_shlib_version=mingw
5833                 cf_cv_shlib_version_infix=mingw
5834                 shlibdir=$bindir
5835                 MAKE_DLLS=
5836                 if test "$DFT_LWR_MODEL" = "shared" ; then
5837                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5838                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5839                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5840                 fi
5841                 CC_SHARED_OPTS=
5842                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5843                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5844                 cat >mk_shared_lib.sh <<-CF_EOF
5845                 #!$SHELL
5846                 SHARED_LIB=\$1
5847                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5848                 shift
5849                 cat <<-EOF
5850                 Linking shared library
5851                 ** SHARED_LIB \$SHARED_LIB
5852                 ** IMPORT_LIB \$IMPORT_LIB
5853 EOF
5854                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5855 CF_EOF
5856                 chmod +x mk_shared_lib.sh
5857                 ;;
5858         (openbsd[2-9].*|mirbsd*)
5859                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5860                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5861                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5862                 fi
5863                 if test "$cf_cv_enable_rpath" = yes ; then
5864                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5865                 fi
5866                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5867
5868         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5869         if test "$cf_cv_shlib_version" = rel; then
5870                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5871         else
5872                 cf_cv_shared_soname='`basename $@`'
5873         fi
5874
5875                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5876                 ;;
5877         (nto-qnx*|openbsd*|freebsd[12].*)
5878                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5879                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5880                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5881                 ;;
5882         (dragonfly*|freebsd*)
5883                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5884                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5885                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5886                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5887                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5888                 fi
5889
5890         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5891         if test "$cf_cv_shlib_version" = rel; then
5892                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5893         else
5894                 cf_cv_shared_soname='`basename $@`'
5895         fi
5896
5897                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5898                 ;;
5899         (netbsd*)
5900                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5901                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5902                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5903                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5904                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5905                         if test "$cf_cv_shlib_version" = auto; then
5906                         if test -f /usr/libexec/ld.elf_so; then
5907                                 cf_cv_shlib_version=abi
5908                         else
5909                                 cf_cv_shlib_version=rel
5910                         fi
5911                         fi
5912
5913         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5914         if test "$cf_cv_shlib_version" = rel; then
5915                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5916         else
5917                 cf_cv_shared_soname='`basename $@`'
5918         fi
5919
5920                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5921                 else
5922                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5923                 fi
5924                 ;;
5925         (osf*|mls+*)
5926                 # tested with OSF/1 V3.2 and 'cc'
5927                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5928                 # link with shared libs).
5929                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5930                 case $host_os in
5931                 (osf4*)
5932                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5933                         ;;
5934                 esac
5935                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5936                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5937                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5938                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5939                 fi
5940                 cf_cv_rm_so_locs=yes
5941                 ;;
5942         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5943                 # tested with osr5.0.5
5944                 if test "$GCC" != yes; then
5945                         CC_SHARED_OPTS='-belf -KPIC'
5946                 fi
5947                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5948                 if test "$cf_cv_enable_rpath" = yes ; then
5949                         # only way is to set LD_RUN_PATH but no switch for it
5950                         RUN_PATH=$libdir
5951                 fi
5952                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5953                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5954                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5955                 ;;
5956         (sunos4*)
5957                 # tested with SunOS 4.1.1 and gcc 2.7.0
5958                 if test "$GCC" != yes; then
5959                         CC_SHARED_OPTS='-KPIC'
5960                 fi
5961                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5962                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5963                 ;;
5964         (solaris2*)
5965                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5966                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5967                 if test "$DFT_LWR_MODEL" = "shared" ; then
5968                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5969                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5970                 fi
5971                 if test "$cf_cv_enable_rpath" = yes ; then
5972                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5973                 fi
5974
5975         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5976         if test "$cf_cv_shlib_version" = rel; then
5977                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5978         else
5979                 cf_cv_shared_soname='`basename $@`'
5980         fi
5981
5982                 if test "$GCC" != yes; then
5983                         cf_save_CFLAGS="$CFLAGS"
5984                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5985                         do
5986                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5987                                 cat >conftest.$ac_ext <<_ACEOF
5988 #line 5988 "configure"
5989 #include "confdefs.h"
5990 #include <stdio.h>
5991 int
5992 main (void)
5993 {
5994 printf("Hello\n");
5995   ;
5996   return 0;
5997 }
5998 _ACEOF
5999 rm -f conftest.$ac_objext
6000 if { (eval echo "$as_me:6000: \"$ac_compile\"") >&5
6001   (eval $ac_compile) 2>&5
6002   ac_status=$?
6003   echo "$as_me:6003: \$? = $ac_status" >&5
6004   (exit $ac_status); } &&
6005          { ac_try='test -s conftest.$ac_objext'
6006   { (eval echo "$as_me:6006: \"$ac_try\"") >&5
6007   (eval $ac_try) 2>&5
6008   ac_status=$?
6009   echo "$as_me:6009: \$? = $ac_status" >&5
6010   (exit $ac_status); }; }; then
6011   break
6012 else
6013   echo "$as_me: failed program was:" >&5
6014 cat conftest.$ac_ext >&5
6015 fi
6016 rm -f conftest.$ac_objext conftest.$ac_ext
6017                         done
6018                         CFLAGS="$cf_save_CFLAGS"
6019                         CC_SHARED_OPTS=$cf_shared_opts
6020                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6021                 else
6022                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6023                 fi
6024                 ;;
6025         (sysv5uw7*|unix_sv*)
6026                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6027                 if test "$GCC" != yes; then
6028                         CC_SHARED_OPTS='-KPIC'
6029                 fi
6030                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6031                 ;;
6032         (*)
6033                 CC_SHARED_OPTS='unknown'
6034                 MK_SHARED_LIB='echo unknown'
6035                 ;;
6036         esac
6037
6038         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6039         case "$cf_cv_shlib_version" in
6040         (rel|abi)
6041                 case "$MK_SHARED_LIB" in
6042                 (*'-o $@')
6043                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6044                         ;;
6045                 (*)
6046                         { echo "$as_me:6046: WARNING: ignored --with-shlib-version" >&5
6047 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6048                         ;;
6049                 esac
6050                 ;;
6051         esac
6052
6053         if test -n "$cf_try_cflags"
6054         then
6055 cat > conftest.$ac_ext <<EOF
6056 #line 6056 "${as_me:-configure}"
6057 #include <stdio.h>
6058 int main(int argc, char *argv[])
6059 {
6060         printf("hello\n");
6061         return (argv[argc-1] == 0) ;
6062 }
6063 EOF
6064                 cf_save_CFLAGS="$CFLAGS"
6065                 for cf_opt in $cf_try_cflags
6066                 do
6067                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6068                         echo "$as_me:6068: checking if CFLAGS option -$cf_opt works" >&5
6069 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6070                         if { (eval echo "$as_me:6070: \"$ac_compile\"") >&5
6071   (eval $ac_compile) 2>&5
6072   ac_status=$?
6073   echo "$as_me:6073: \$? = $ac_status" >&5
6074   (exit $ac_status); }; then
6075                                 echo "$as_me:6075: result: yes" >&5
6076 echo "${ECHO_T}yes" >&6
6077                                 cf_save_CFLAGS="$CFLAGS"
6078                         else
6079                                 echo "$as_me:6079: result: no" >&5
6080 echo "${ECHO_T}no" >&6
6081                         fi
6082                 done
6083                 CFLAGS="$cf_save_CFLAGS"
6084         fi
6085
6086         # RPATH_LIST is a colon-separated list of directories
6087         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6088         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6089
6090         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6091
6092         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6093
6094 echo "${as_me:-configure}:6094: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6095
6096         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6097
6098 echo "${as_me:-configure}:6098: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6099
6100 for model in $cf_list_models; do
6101         case $model in
6102         (libtool)
6103
6104 echo "$as_me:6104: checking for additional libtool options" >&5
6105 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6106
6107 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6108 if test "${with_libtool_opts+set}" = set; then
6109   withval="$with_libtool_opts"
6110   with_libtool_opts=$withval
6111 else
6112   with_libtool_opts=no
6113 fi;
6114 echo "$as_me:6114: result: $with_libtool_opts" >&5
6115 echo "${ECHO_T}$with_libtool_opts" >&6
6116
6117 case .$with_libtool_opts in
6118 (.yes|.no|.)
6119         ;;
6120 (*)
6121         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6122         ;;
6123 esac
6124
6125 echo "$as_me:6125: checking if exported-symbols file should be used" >&5
6126 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6127
6128 # Check whether --with-export-syms or --without-export-syms was given.
6129 if test "${with_export_syms+set}" = set; then
6130   withval="$with_export_syms"
6131   with_export_syms=$withval
6132 else
6133   with_export_syms=no
6134 fi;
6135 if test "x$with_export_syms" = xyes
6136 then
6137         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6138
6139 fi
6140 echo "$as_me:6140: result: $with_export_syms" >&5
6141 echo "${ECHO_T}$with_export_syms" >&6
6142 if test "x$with_export_syms" != xno
6143 then
6144         EXPORT_SYMS="-export-symbols $with_export_syms"
6145
6146 fi
6147
6148                 ;;
6149         (shared)
6150                 if test "$CC_SHARED_OPTS" = "unknown"; then
6151                         { { echo "$as_me:6151: error: Shared libraries are not supported in this version" >&5
6152 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6153    { (exit 1); exit 1; }; }
6154                 fi
6155                 # workaround for inept transition to PIE vs PIC...
6156                 echo "$as_me:6156: checking if current CFLAGS link properly" >&5
6157 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6158                 cat >conftest.$ac_ext <<_ACEOF
6159 #line 6159 "configure"
6160 #include "confdefs.h"
6161 #include <stdio.h>
6162 int
6163 main (void)
6164 {
6165 printf("Hello work\n");
6166   ;
6167   return 0;
6168 }
6169 _ACEOF
6170 rm -f conftest.$ac_objext conftest$ac_exeext
6171 if { (eval echo "$as_me:6171: \"$ac_link\"") >&5
6172   (eval $ac_link) 2>&5
6173   ac_status=$?
6174   echo "$as_me:6174: \$? = $ac_status" >&5
6175   (exit $ac_status); } &&
6176          { ac_try='test -s conftest$ac_exeext'
6177   { (eval echo "$as_me:6177: \"$ac_try\"") >&5
6178   (eval $ac_try) 2>&5
6179   ac_status=$?
6180   echo "$as_me:6180: \$? = $ac_status" >&5
6181   (exit $ac_status); }; }; then
6182   cf_cflags_work=yes
6183 else
6184   echo "$as_me: failed program was:" >&5
6185 cat conftest.$ac_ext >&5
6186 cf_cflags_work=no
6187 fi
6188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6189                 echo "$as_me:6189: result: $cf_cflags_work" >&5
6190 echo "${ECHO_T}$cf_cflags_work" >&6
6191                 if test "$cf_cflags_work" = no
6192                 then
6193                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6194
6195 echo "${as_me:-configure}:6195: testing try to work around by appending shared-options ..." 1>&5
6196
6197                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6198                 fi
6199
6200 echo "$as_me:6200: checking if versioned-symbols file should be used" >&5
6201 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6202
6203 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6204 if test "${with_versioned_syms+set}" = set; then
6205   withval="$with_versioned_syms"
6206   with_versioned_syms=$withval
6207 else
6208   with_versioned_syms=no
6209 fi;
6210 if test "x$with_versioned_syms" = xyes
6211 then
6212         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6213
6214 fi
6215 echo "$as_me:6215: result: $with_versioned_syms" >&5
6216 echo "${ECHO_T}$with_versioned_syms" >&6
6217
6218 RESULTING_SYMS=
6219 VERSIONED_SYMS=
6220 WILDCARD_SYMS=
6221
6222 if test "x$with_versioned_syms" != xno
6223 then
6224         RESULTING_SYMS=$with_versioned_syms
6225         case "x$MK_SHARED_LIB" in
6226         (*-Wl,*)
6227                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6228                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6229                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6230
6231 echo "${as_me:-configure}:6231: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6232
6233                 ;;
6234         (*-dy\ *)
6235                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6236                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6237                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6238
6239 echo "${as_me:-configure}:6239: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6240
6241                 ;;
6242         (*)
6243                 { echo "$as_me:6243: WARNING: this system does not support versioned-symbols" >&5
6244 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6245                 ;;
6246         esac
6247
6248         # Linux ld can selectively override scope, e.g., of symbols beginning with
6249         # "_" by first declaring some as global, and then using a wildcard to
6250         # declare the others as local.  Some other loaders cannot do this.  Check
6251         # by constructing a (very) simple shared library and inspecting its
6252         # symbols.
6253         if test "x$VERSIONED_SYMS" != "x"
6254         then
6255                 echo "$as_me:6255: checking if wildcards can be used to selectively omit symbols" >&5
6256 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6257                 WILDCARD_SYMS=no
6258
6259                 # make sources
6260                 rm -f conftest.*
6261
6262                 cat >conftest.ver <<EOF
6263 module_1.0 {
6264 global:
6265         globalf1;
6266 local:
6267         localf1;
6268 };
6269 module_2.0 {
6270 global:
6271         globalf2;
6272 local:
6273         localf2;
6274         _*;
6275 } module_1.0;
6276 submodule_1.0 {
6277 global:
6278         subglobalf1;
6279         _ismissing;
6280 local:
6281         sublocalf1;
6282 };
6283 submodule_2.0 {
6284 global:
6285         subglobalf2;
6286 local:
6287         sublocalf2;
6288         _*;
6289 } submodule_1.0;
6290 EOF
6291                 cat >conftest.$ac_ext <<EOF
6292 #line 6292 "configure"
6293 int     _ismissing(void) { return 1; }
6294 int     _localf1(void) { return 1; }
6295 int     _localf2(void) { return 2; }
6296 int     globalf1(void) { return 1; }
6297 int     globalf2(void) { return 2; }
6298 int     _sublocalf1(void) { return 1; }
6299 int     _sublocalf2(void) { return 2; }
6300 int     subglobalf1(void) { return 1; }
6301 int     subglobalf2(void) { return 2; }
6302 EOF
6303                 cat >conftest.mk <<EOF
6304 CC=${CC}
6305 CFLAGS=${CFLAGS}
6306 CPPFLAGS=${CPPFLAGS}
6307 LDFLAGS=${LDFLAGS}
6308 LIBS=${LIBS}
6309 VERSIONED_SYMS=${VERSIONED_SYMS}
6310 RESULTING_SYMS=conftest.ver
6311 MK_SHARED_LIB=${MK_SHARED_LIB}
6312 conftest.so: conftest.$ac_cv_objext
6313                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6314 EOF
6315
6316                 # compile source, make library
6317                 if make -f conftest.mk 2>&5 >/dev/null
6318                 then
6319                         # test for missing symbol in either Data or Text section
6320                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6321                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6322                 fi
6323                 echo "$as_me:6323: result: $WILDCARD_SYMS" >&5
6324 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6325                 rm -f conftest.*
6326         fi
6327 fi
6328
6329                 ;;
6330         esac
6331 done
6332
6333 ### Checks for special libraries, must be done up-front.
6334 SHLIB_LIST=""
6335
6336 echo "$as_me:6336: checking if you want to link with the GPM mouse library" >&5
6337 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6338
6339 # Check whether --with-gpm or --without-gpm was given.
6340 if test "${with_gpm+set}" = set; then
6341   withval="$with_gpm"
6342   with_gpm=$withval
6343 else
6344   with_gpm=maybe
6345 fi;
6346 echo "$as_me:6346: result: $with_gpm" >&5
6347 echo "${ECHO_T}$with_gpm" >&6
6348
6349 if test "$with_gpm" != no ; then
6350         echo "$as_me:6350: checking for gpm.h" >&5
6351 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6352 if test "${ac_cv_header_gpm_h+set}" = set; then
6353   echo $ECHO_N "(cached) $ECHO_C" >&6
6354 else
6355   cat >conftest.$ac_ext <<_ACEOF
6356 #line 6356 "configure"
6357 #include "confdefs.h"
6358 #include <gpm.h>
6359 _ACEOF
6360 if { (eval echo "$as_me:6360: \"$ac_cpp conftest.$ac_ext\"") >&5
6361   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6362   ac_status=$?
6363   egrep -v '^ *\+' conftest.er1 >conftest.err
6364   rm -f conftest.er1
6365   cat conftest.err >&5
6366   echo "$as_me:6366: \$? = $ac_status" >&5
6367   (exit $ac_status); } >/dev/null; then
6368   if test -s conftest.err; then
6369     ac_cpp_err=$ac_c_preproc_warn_flag
6370   else
6371     ac_cpp_err=
6372   fi
6373 else
6374   ac_cpp_err=yes
6375 fi
6376 if test -z "$ac_cpp_err"; then
6377   ac_cv_header_gpm_h=yes
6378 else
6379   echo "$as_me: failed program was:" >&5
6380   cat conftest.$ac_ext >&5
6381   ac_cv_header_gpm_h=no
6382 fi
6383 rm -f conftest.err conftest.$ac_ext
6384 fi
6385 echo "$as_me:6385: result: $ac_cv_header_gpm_h" >&5
6386 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6387 if test $ac_cv_header_gpm_h = yes; then
6388
6389 cat >>confdefs.h <<\EOF
6390 #define HAVE_GPM_H 1
6391 EOF
6392
6393                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6394                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6395
6396 echo "${as_me:-configure}:6396: testing assuming we really have GPM library ..." 1>&5
6397
6398 cat >>confdefs.h <<\EOF
6399 #define HAVE_LIBGPM 1
6400 EOF
6401
6402                         with_gpm=yes
6403                 else
6404                         echo "$as_me:6404: checking for Gpm_Open in -lgpm" >&5
6405 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6406 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6407   echo $ECHO_N "(cached) $ECHO_C" >&6
6408 else
6409   ac_check_lib_save_LIBS=$LIBS
6410 LIBS="-lgpm  $LIBS"
6411 cat >conftest.$ac_ext <<_ACEOF
6412 #line 6412 "configure"
6413 #include "confdefs.h"
6414
6415 /* Override any gcc2 internal prototype to avoid an error.  */
6416 #ifdef __cplusplus
6417 extern "C"
6418 #endif
6419 /* We use char because int might match the return type of a gcc2
6420    builtin and then its argument prototype would still apply.  */
6421 char Gpm_Open ();
6422 int
6423 main (void)
6424 {
6425 Gpm_Open ();
6426   ;
6427   return 0;
6428 }
6429 _ACEOF
6430 rm -f conftest.$ac_objext conftest$ac_exeext
6431 if { (eval echo "$as_me:6431: \"$ac_link\"") >&5
6432   (eval $ac_link) 2>&5
6433   ac_status=$?
6434   echo "$as_me:6434: \$? = $ac_status" >&5
6435   (exit $ac_status); } &&
6436          { ac_try='test -s conftest$ac_exeext'
6437   { (eval echo "$as_me:6437: \"$ac_try\"") >&5
6438   (eval $ac_try) 2>&5
6439   ac_status=$?
6440   echo "$as_me:6440: \$? = $ac_status" >&5
6441   (exit $ac_status); }; }; then
6442   ac_cv_lib_gpm_Gpm_Open=yes
6443 else
6444   echo "$as_me: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6446 ac_cv_lib_gpm_Gpm_Open=no
6447 fi
6448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6449 LIBS=$ac_check_lib_save_LIBS
6450 fi
6451 echo "$as_me:6451: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6452 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6453 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6454   with_gpm=yes
6455 else
6456
6457                                 if test "$with_gpm" = maybe; then
6458                                         { echo "$as_me:6458: WARNING: Cannot link with GPM library" >&5
6459 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6460                                         with_gpm=no
6461                                 else
6462                                         { { echo "$as_me:6462: error: Cannot link with GPM library" >&5
6463 echo "$as_me: error: Cannot link with GPM library" >&2;}
6464    { (exit 1); exit 1; }; }
6465                                 fi
6466
6467 fi
6468
6469                 fi
6470
6471 else
6472
6473                 test "$with_gpm" != maybe && { echo "$as_me:6473: WARNING: Cannot find GPM header" >&5
6474 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6475                 with_gpm=no
6476
6477 fi
6478
6479 fi
6480
6481 if test "$with_gpm" != no ; then
6482         echo "$as_me:6482: checking if you want to load GPM dynamically" >&5
6483 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6484
6485 # Check whether --with-dlsym or --without-dlsym was given.
6486 if test "${with_dlsym+set}" = set; then
6487   withval="$with_dlsym"
6488   with_dlsym=$withval
6489 else
6490   with_dlsym=yes
6491 fi;
6492         echo "$as_me:6492: result: $with_dlsym" >&5
6493 echo "${ECHO_T}$with_dlsym" >&6
6494         if test "x$with_dlsym" = xyes ; then
6495
6496 cf_have_dlsym=no
6497 echo "$as_me:6497: checking for dlsym" >&5
6498 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6499 if test "${ac_cv_func_dlsym+set}" = set; then
6500   echo $ECHO_N "(cached) $ECHO_C" >&6
6501 else
6502   cat >conftest.$ac_ext <<_ACEOF
6503 #line 6503 "configure"
6504 #include "confdefs.h"
6505 /* System header to define __stub macros and hopefully few prototypes,
6506     which can conflict with char dlsym (); below.  */
6507 #include <assert.h>
6508 /* Override any gcc2 internal prototype to avoid an error.  */
6509 #ifdef __cplusplus
6510 extern "C"
6511 #endif
6512 /* We use char because int might match the return type of a gcc2
6513    builtin and then its argument prototype would still apply.  */
6514 char dlsym ();
6515 char (*f) ();
6516
6517 int
6518 main (void)
6519 {
6520 /* The GNU C library defines this for functions which it implements
6521     to always fail with ENOSYS.  Some functions are actually named
6522     something starting with __ and the normal name is an alias.  */
6523 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6524 choke me
6525 #else
6526 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6527 #endif
6528
6529   ;
6530   return 0;
6531 }
6532 _ACEOF
6533 rm -f conftest.$ac_objext conftest$ac_exeext
6534 if { (eval echo "$as_me:6534: \"$ac_link\"") >&5
6535   (eval $ac_link) 2>&5
6536   ac_status=$?
6537   echo "$as_me:6537: \$? = $ac_status" >&5
6538   (exit $ac_status); } &&
6539          { ac_try='test -s conftest$ac_exeext'
6540   { (eval echo "$as_me:6540: \"$ac_try\"") >&5
6541   (eval $ac_try) 2>&5
6542   ac_status=$?
6543   echo "$as_me:6543: \$? = $ac_status" >&5
6544   (exit $ac_status); }; }; then
6545   ac_cv_func_dlsym=yes
6546 else
6547   echo "$as_me: failed program was:" >&5
6548 cat conftest.$ac_ext >&5
6549 ac_cv_func_dlsym=no
6550 fi
6551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6552 fi
6553 echo "$as_me:6553: result: $ac_cv_func_dlsym" >&5
6554 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6555 if test $ac_cv_func_dlsym = yes; then
6556   cf_have_dlsym=yes
6557 else
6558
6559 cf_have_libdl=no
6560 echo "$as_me:6560: checking for dlsym in -ldl" >&5
6561 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6562 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6563   echo $ECHO_N "(cached) $ECHO_C" >&6
6564 else
6565   ac_check_lib_save_LIBS=$LIBS
6566 LIBS="-ldl  $LIBS"
6567 cat >conftest.$ac_ext <<_ACEOF
6568 #line 6568 "configure"
6569 #include "confdefs.h"
6570
6571 /* Override any gcc2 internal prototype to avoid an error.  */
6572 #ifdef __cplusplus
6573 extern "C"
6574 #endif
6575 /* We use char because int might match the return type of a gcc2
6576    builtin and then its argument prototype would still apply.  */
6577 char dlsym ();
6578 int
6579 main (void)
6580 {
6581 dlsym ();
6582   ;
6583   return 0;
6584 }
6585 _ACEOF
6586 rm -f conftest.$ac_objext conftest$ac_exeext
6587 if { (eval echo "$as_me:6587: \"$ac_link\"") >&5
6588   (eval $ac_link) 2>&5
6589   ac_status=$?
6590   echo "$as_me:6590: \$? = $ac_status" >&5
6591   (exit $ac_status); } &&
6592          { ac_try='test -s conftest$ac_exeext'
6593   { (eval echo "$as_me:6593: \"$ac_try\"") >&5
6594   (eval $ac_try) 2>&5
6595   ac_status=$?
6596   echo "$as_me:6596: \$? = $ac_status" >&5
6597   (exit $ac_status); }; }; then
6598   ac_cv_lib_dl_dlsym=yes
6599 else
6600   echo "$as_me: failed program was:" >&5
6601 cat conftest.$ac_ext >&5
6602 ac_cv_lib_dl_dlsym=no
6603 fi
6604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6605 LIBS=$ac_check_lib_save_LIBS
6606 fi
6607 echo "$as_me:6607: result: $ac_cv_lib_dl_dlsym" >&5
6608 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6609 if test $ac_cv_lib_dl_dlsym = yes; then
6610
6611         cf_have_dlsym=yes
6612         cf_have_libdl=yes
6613 fi
6614
6615 fi
6616
6617 if test "$cf_have_dlsym" = yes ; then
6618         test "$cf_have_libdl" = yes && {
6619 cf_add_libs="-ldl"
6620 # Filter out duplicates - this happens with badly-designed ".pc" files...
6621 for cf_add_1lib in $LIBS
6622 do
6623         for cf_add_2lib in $cf_add_libs
6624         do
6625                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6626                 then
6627                         cf_add_1lib=
6628                         break
6629                 fi
6630         done
6631         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6632 done
6633 LIBS="$cf_add_libs"
6634  }
6635
6636         echo "$as_me:6636: checking whether able to link to dl*() functions" >&5
6637 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6638         cat >conftest.$ac_ext <<_ACEOF
6639 #line 6639 "configure"
6640 #include "confdefs.h"
6641 #include <dlfcn.h>
6642 int
6643 main (void)
6644 {
6645
6646                 void *obj;
6647                 if ((obj = dlopen("filename", 0)) != 0) {
6648                         if (dlsym(obj, "symbolname") == 0) {
6649                         dlclose(obj);
6650                         }
6651                 }
6652   ;
6653   return 0;
6654 }
6655 _ACEOF
6656 rm -f conftest.$ac_objext conftest$ac_exeext
6657 if { (eval echo "$as_me:6657: \"$ac_link\"") >&5
6658   (eval $ac_link) 2>&5
6659   ac_status=$?
6660   echo "$as_me:6660: \$? = $ac_status" >&5
6661   (exit $ac_status); } &&
6662          { ac_try='test -s conftest$ac_exeext'
6663   { (eval echo "$as_me:6663: \"$ac_try\"") >&5
6664   (eval $ac_try) 2>&5
6665   ac_status=$?
6666   echo "$as_me:6666: \$? = $ac_status" >&5
6667   (exit $ac_status); }; }; then
6668
6669 cat >>confdefs.h <<\EOF
6670 #define HAVE_LIBDL 1
6671 EOF
6672
6673 else
6674   echo "$as_me: failed program was:" >&5
6675 cat conftest.$ac_ext >&5
6676
6677                 { { echo "$as_me:6677: error: Cannot link test program for libdl" >&5
6678 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6679    { (exit 1); exit 1; }; }
6680 fi
6681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6682         echo "$as_me:6682: result: ok" >&5
6683 echo "${ECHO_T}ok" >&6
6684 else
6685         { { echo "$as_me:6685: error: Cannot find dlsym function" >&5
6686 echo "$as_me: error: Cannot find dlsym function" >&2;}
6687    { (exit 1); exit 1; }; }
6688 fi
6689
6690                 if test "x$with_gpm" != xyes ; then
6691                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6692
6693 echo "${as_me:-configure}:6693: testing assuming soname for gpm is $with_gpm ..." 1>&5
6694
6695                         cf_cv_gpm_soname="$with_gpm"
6696                 else
6697
6698 echo "$as_me:6698: checking for soname of gpm library" >&5
6699 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6700 if test "${cf_cv_gpm_soname+set}" = set; then
6701   echo $ECHO_N "(cached) $ECHO_C" >&6
6702 else
6703
6704 cf_cv_gpm_soname=unknown
6705 if test "$cross_compiling" != yes ; then
6706 cat >conftest.$ac_ext <<CF_EOF
6707 #include <gpm.h>
6708 int main(void)
6709 {
6710 if (Gpm_Open(0,0)) Gpm_Close();
6711         ${cf_cv_main_return:-return}(0);
6712 }
6713 CF_EOF
6714 cf_save_LIBS="$LIBS"
6715
6716 cf_add_libs="-lgpm"
6717 # Filter out duplicates - this happens with badly-designed ".pc" files...
6718 for cf_add_1lib in $LIBS
6719 do
6720         for cf_add_2lib in $cf_add_libs
6721         do
6722                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6723                 then
6724                         cf_add_1lib=
6725                         break
6726                 fi
6727         done
6728         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6729 done
6730 LIBS="$cf_add_libs"
6731
6732         if { (eval echo "$as_me:6732: \"$ac_compile\"") >&5
6733   (eval $ac_compile) 2>&5
6734   ac_status=$?
6735   echo "$as_me:6735: \$? = $ac_status" >&5
6736   (exit $ac_status); } ; then
6737                 if { (eval echo "$as_me:6737: \"$ac_link\"") >&5
6738   (eval $ac_link) 2>&5
6739   ac_status=$?
6740   echo "$as_me:6740: \$? = $ac_status" >&5
6741   (exit $ac_status); } ; then
6742                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6743                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6744                 fi
6745         fi
6746 rm -rf conftest*
6747 LIBS="$cf_save_LIBS"
6748 fi
6749
6750 fi
6751 echo "$as_me:6751: result: $cf_cv_gpm_soname" >&5
6752 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6753
6754                 fi
6755                 test "$cf_cv_gpm_soname" != "unknown" &&
6756 cat >>confdefs.h <<EOF
6757 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6758 EOF
6759
6760                 SHLIB_LIST="-ldl $SHLIB_LIST"
6761
6762 cf_add_libs="-ldl"
6763 # Filter out duplicates - this happens with badly-designed ".pc" files...
6764 for cf_add_1lib in $PRIVATE_LIBS
6765 do
6766         for cf_add_2lib in $cf_add_libs
6767         do
6768                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6769                 then
6770                         cf_add_1lib=
6771                         break
6772                 fi
6773         done
6774         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6775 done
6776 PRIVATE_LIBS="$cf_add_libs"
6777
6778         else
6779                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6780
6781 cf_add_libs="-lgpm"
6782 # Filter out duplicates - this happens with badly-designed ".pc" files...
6783 for cf_add_1lib in $TEST_LIBS
6784 do
6785         for cf_add_2lib in $cf_add_libs
6786         do
6787                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6788                 then
6789                         cf_add_1lib=
6790                         break
6791                 fi
6792         done
6793         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6794 done
6795 TEST_LIBS="$cf_add_libs"
6796
6797 cf_add_libs="-lgpm"
6798 # Filter out duplicates - this happens with badly-designed ".pc" files...
6799 for cf_add_1lib in $PRIVATE_LIBS
6800 do
6801         for cf_add_2lib in $cf_add_libs
6802         do
6803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6804                 then
6805                         cf_add_1lib=
6806                         break
6807                 fi
6808         done
6809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6810 done
6811 PRIVATE_LIBS="$cf_add_libs"
6812
6813         fi
6814
6815 cat >>confdefs.h <<\EOF
6816 #define HAVE_LIBGPM 1
6817 EOF
6818
6819 echo "$as_me:6819: checking for Gpm_Wgetch in -lgpm" >&5
6820 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6821 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6822   echo $ECHO_N "(cached) $ECHO_C" >&6
6823 else
6824   ac_check_lib_save_LIBS=$LIBS
6825 LIBS="-lgpm  $LIBS"
6826 cat >conftest.$ac_ext <<_ACEOF
6827 #line 6827 "configure"
6828 #include "confdefs.h"
6829
6830 /* Override any gcc2 internal prototype to avoid an error.  */
6831 #ifdef __cplusplus
6832 extern "C"
6833 #endif
6834 /* We use char because int might match the return type of a gcc2
6835    builtin and then its argument prototype would still apply.  */
6836 char Gpm_Wgetch ();
6837 int
6838 main (void)
6839 {
6840 Gpm_Wgetch ();
6841   ;
6842   return 0;
6843 }
6844 _ACEOF
6845 rm -f conftest.$ac_objext conftest$ac_exeext
6846 if { (eval echo "$as_me:6846: \"$ac_link\"") >&5
6847   (eval $ac_link) 2>&5
6848   ac_status=$?
6849   echo "$as_me:6849: \$? = $ac_status" >&5
6850   (exit $ac_status); } &&
6851          { ac_try='test -s conftest$ac_exeext'
6852   { (eval echo "$as_me:6852: \"$ac_try\"") >&5
6853   (eval $ac_try) 2>&5
6854   ac_status=$?
6855   echo "$as_me:6855: \$? = $ac_status" >&5
6856   (exit $ac_status); }; }; then
6857   ac_cv_lib_gpm_Gpm_Wgetch=yes
6858 else
6859   echo "$as_me: failed program was:" >&5
6860 cat conftest.$ac_ext >&5
6861 ac_cv_lib_gpm_Gpm_Wgetch=no
6862 fi
6863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6864 LIBS=$ac_check_lib_save_LIBS
6865 fi
6866 echo "$as_me:6866: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6867 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6868 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6869
6870 echo "$as_me:6870: checking if GPM is weakly bound to curses library" >&5
6871 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6872 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6873   echo $ECHO_N "(cached) $ECHO_C" >&6
6874 else
6875
6876 cf_cv_check_gpm_wgetch=unknown
6877 if test "$cross_compiling" != yes ; then
6878
6879 cat >conftest.$ac_ext <<CF_EOF
6880 #include <gpm.h>
6881 int main(void)
6882 {
6883         Gpm_Wgetch();
6884         ${cf_cv_main_return:-return}(0);
6885 }
6886 CF_EOF
6887
6888         cf_save_LIBS="$LIBS"
6889         # This only works if we can look at the symbol table.  If a shared
6890         # library is stripped for install, we cannot use that.  So we're forced
6891         # to rely on the static library, noting that some packagers may not
6892         # include it.
6893         LIBS="-static -lgpm -dynamic $LIBS"
6894         if { (eval echo "$as_me:6894: \"$ac_compile\"") >&5
6895   (eval $ac_compile) 2>&5
6896   ac_status=$?
6897   echo "$as_me:6897: \$? = $ac_status" >&5
6898   (exit $ac_status); } ; then
6899                 if { (eval echo "$as_me:6899: \"$ac_link\"") >&5
6900   (eval $ac_link) 2>&5
6901   ac_status=$?
6902   echo "$as_me:6902: \$? = $ac_status" >&5
6903   (exit $ac_status); } ; then
6904                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6905                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6906                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6907                 fi
6908         fi
6909         rm -rf conftest*
6910         LIBS="$cf_save_LIBS"
6911 fi
6912
6913 fi
6914 echo "$as_me:6914: result: $cf_cv_check_gpm_wgetch" >&5
6915 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6916
6917 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6918         { echo "$as_me:6918: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6919 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6920 fi
6921
6922 fi
6923
6924 fi
6925
6926 echo "$as_me:6926: checking if you want to use PCRE2 for regular-expressions" >&5
6927 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6928
6929 # Check whether --with-pcre2 or --without-pcre2 was given.
6930 if test "${with_pcre2+set}" = set; then
6931   withval="$with_pcre2"
6932
6933 fi;
6934 test -z "$with_pcre2" && with_pcre2=no
6935 echo "$as_me:6935: result: $with_pcre2" >&5
6936 echo "${ECHO_T}$with_pcre2" >&6
6937
6938 if test "x$with_pcre2" != xno ; then
6939
6940 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6941         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6942
6943 echo "${as_me:-configure}:6943: testing found package libpcre2 ..." 1>&5
6944
6945         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6946         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6947         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6948
6949 echo "${as_me:-configure}:6949: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6950
6951         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6952
6953 echo "${as_me:-configure}:6953: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6954
6955 cf_fix_cppflags=no
6956 cf_new_cflags=
6957 cf_new_cppflags=
6958 cf_new_extra_cppflags=
6959
6960 for cf_add_cflags in $cf_pkgconfig_incs
6961 do
6962 case $cf_fix_cppflags in
6963 (no)
6964         case $cf_add_cflags in
6965         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6966                 case $cf_add_cflags in
6967                 (-D*)
6968                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6969
6970                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6971                                 && test -z "${cf_tst_cflags}" \
6972                                 && cf_fix_cppflags=yes
6973
6974                         if test $cf_fix_cppflags = yes ; then
6975
6976         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6977         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6978
6979                                 continue
6980                         elif test "${cf_tst_cflags}" = "\"'" ; then
6981
6982         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6983         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6984
6985                                 continue
6986                         fi
6987                         ;;
6988                 esac
6989                 case "$CPPFLAGS" in
6990                 (*$cf_add_cflags)
6991                         ;;
6992                 (*)
6993                         case $cf_add_cflags in
6994                         (-D*)
6995                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6996
6997 CPPFLAGS=`echo "$CPPFLAGS" | \
6998         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6999                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7000
7001                                 ;;
7002                         esac
7003
7004         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7005         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7006
7007                         ;;
7008                 esac
7009                 ;;
7010         (*)
7011
7012         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7013         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7014
7015                 ;;
7016         esac
7017         ;;
7018 (yes)
7019
7020         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7021         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7022
7023         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7024
7025         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7026                 && test -z "${cf_tst_cflags}" \
7027                 && cf_fix_cppflags=no
7028         ;;
7029 esac
7030 done
7031
7032 if test -n "$cf_new_cflags" ; then
7033
7034         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7035         CFLAGS="${CFLAGS}$cf_new_cflags"
7036
7037 fi
7038
7039 if test -n "$cf_new_cppflags" ; then
7040
7041         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7042         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7043
7044 fi
7045
7046 if test -n "$cf_new_extra_cppflags" ; then
7047
7048         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7049         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7050
7051 fi
7052
7053 cf_add_libs="$cf_pkgconfig_libs"
7054 # Filter out duplicates - this happens with badly-designed ".pc" files...
7055 for cf_add_1lib in $LIBS
7056 do
7057         for cf_add_2lib in $cf_add_libs
7058         do
7059                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7060                 then
7061                         cf_add_1lib=
7062                         break
7063                 fi
7064         done
7065         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7066 done
7067 LIBS="$cf_add_libs"
7068
7069         :
7070 else
7071         cf_pkgconfig_incs=
7072         cf_pkgconfig_libs=
7073
7074 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7075         test -n "$verbose" && echo "    found package libpcre" 1>&6
7076
7077 echo "${as_me:-configure}:7077: testing found package libpcre ..." 1>&5
7078
7079         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7080         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7081         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7082
7083 echo "${as_me:-configure}:7083: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7084
7085         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7086
7087 echo "${as_me:-configure}:7087: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7088
7089 cf_fix_cppflags=no
7090 cf_new_cflags=
7091 cf_new_cppflags=
7092 cf_new_extra_cppflags=
7093
7094 for cf_add_cflags in $cf_pkgconfig_incs
7095 do
7096 case $cf_fix_cppflags in
7097 (no)
7098         case $cf_add_cflags in
7099         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7100                 case $cf_add_cflags in
7101                 (-D*)
7102                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7103
7104                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7105                                 && test -z "${cf_tst_cflags}" \
7106                                 && cf_fix_cppflags=yes
7107
7108                         if test $cf_fix_cppflags = yes ; then
7109
7110         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7111         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7112
7113                                 continue
7114                         elif test "${cf_tst_cflags}" = "\"'" ; then
7115
7116         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7117         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7118
7119                                 continue
7120                         fi
7121                         ;;
7122                 esac
7123                 case "$CPPFLAGS" in
7124                 (*$cf_add_cflags)
7125                         ;;
7126                 (*)
7127                         case $cf_add_cflags in
7128                         (-D*)
7129                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7130
7131 CPPFLAGS=`echo "$CPPFLAGS" | \
7132         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7133                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7134
7135                                 ;;
7136                         esac
7137
7138         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7139         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7140
7141                         ;;
7142                 esac
7143                 ;;
7144         (*)
7145
7146         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7147         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7148
7149                 ;;
7150         esac
7151         ;;
7152 (yes)
7153
7154         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7155         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7156
7157         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7158
7159         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7160                 && test -z "${cf_tst_cflags}" \
7161                 && cf_fix_cppflags=no
7162         ;;
7163 esac
7164 done
7165
7166 if test -n "$cf_new_cflags" ; then
7167
7168         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7169         CFLAGS="${CFLAGS}$cf_new_cflags"
7170
7171 fi
7172
7173 if test -n "$cf_new_cppflags" ; then
7174
7175         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7176         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7177
7178 fi
7179
7180 if test -n "$cf_new_extra_cppflags" ; then
7181
7182         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7183         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7184
7185 fi
7186
7187 cf_add_libs="$cf_pkgconfig_libs"
7188 # Filter out duplicates - this happens with badly-designed ".pc" files...
7189 for cf_add_1lib in $LIBS
7190 do
7191         for cf_add_2lib in $cf_add_libs
7192         do
7193                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7194                 then
7195                         cf_add_1lib=
7196                         break
7197                 fi
7198         done
7199         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7200 done
7201 LIBS="$cf_add_libs"
7202
7203         :
7204 else
7205         cf_pkgconfig_incs=
7206         cf_pkgconfig_libs=
7207
7208                         { { echo "$as_me:7208: error: Cannot find PCRE2 library" >&5
7209 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7210    { (exit 1); exit 1; }; }
7211 fi
7212
7213 fi
7214
7215 cat >>confdefs.h <<\EOF
7216 #define HAVE_LIB_PCRE2 1
7217 EOF
7218
7219         # if pkgconfig gave no results, look for the libraries directly
7220         case $LIBS in
7221         (*pcre2-posix*|*pcreposix*)
7222                 ;;
7223         (*)
7224                 echo "$as_me:7224: checking for regcomp in -lpcre2-posix" >&5
7225 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7226 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7227   echo $ECHO_N "(cached) $ECHO_C" >&6
7228 else
7229   ac_check_lib_save_LIBS=$LIBS
7230 LIBS="-lpcre2-posix  $LIBS"
7231 cat >conftest.$ac_ext <<_ACEOF
7232 #line 7232 "configure"
7233 #include "confdefs.h"
7234
7235 /* Override any gcc2 internal prototype to avoid an error.  */
7236 #ifdef __cplusplus
7237 extern "C"
7238 #endif
7239 /* We use char because int might match the return type of a gcc2
7240    builtin and then its argument prototype would still apply.  */
7241 char regcomp ();
7242 int
7243 main (void)
7244 {
7245 regcomp ();
7246   ;
7247   return 0;
7248 }
7249 _ACEOF
7250 rm -f conftest.$ac_objext conftest$ac_exeext
7251 if { (eval echo "$as_me:7251: \"$ac_link\"") >&5
7252   (eval $ac_link) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit $ac_status); } &&
7256          { ac_try='test -s conftest$ac_exeext'
7257   { (eval echo "$as_me:7257: \"$ac_try\"") >&5
7258   (eval $ac_try) 2>&5
7259   ac_status=$?
7260   echo "$as_me:7260: \$? = $ac_status" >&5
7261   (exit $ac_status); }; }; then
7262   ac_cv_lib_pcre2_posix_regcomp=yes
7263 else
7264   echo "$as_me: failed program was:" >&5
7265 cat conftest.$ac_ext >&5
7266 ac_cv_lib_pcre2_posix_regcomp=no
7267 fi
7268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7269 LIBS=$ac_check_lib_save_LIBS
7270 fi
7271 echo "$as_me:7271: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7272 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7273 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7274
7275 cf_add_libs="-lpcre2-posix"
7276 # Filter out duplicates - this happens with badly-designed ".pc" files...
7277 for cf_add_1lib in $LIBS
7278 do
7279         for cf_add_2lib in $cf_add_libs
7280         do
7281                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7282                 then
7283                         cf_add_1lib=
7284                         break
7285                 fi
7286         done
7287         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7288 done
7289 LIBS="$cf_add_libs"
7290
7291 else
7292   echo "$as_me:7292: checking for regcomp in -lpcreposix" >&5
7293 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7294 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7295   echo $ECHO_N "(cached) $ECHO_C" >&6
7296 else
7297   ac_check_lib_save_LIBS=$LIBS
7298 LIBS="-lpcreposix  $LIBS"
7299 cat >conftest.$ac_ext <<_ACEOF
7300 #line 7300 "configure"
7301 #include "confdefs.h"
7302
7303 /* Override any gcc2 internal prototype to avoid an error.  */
7304 #ifdef __cplusplus
7305 extern "C"
7306 #endif
7307 /* We use char because int might match the return type of a gcc2
7308    builtin and then its argument prototype would still apply.  */
7309 char regcomp ();
7310 int
7311 main (void)
7312 {
7313 regcomp ();
7314   ;
7315   return 0;
7316 }
7317 _ACEOF
7318 rm -f conftest.$ac_objext conftest$ac_exeext
7319 if { (eval echo "$as_me:7319: \"$ac_link\"") >&5
7320   (eval $ac_link) 2>&5
7321   ac_status=$?
7322   echo "$as_me:7322: \$? = $ac_status" >&5
7323   (exit $ac_status); } &&
7324          { ac_try='test -s conftest$ac_exeext'
7325   { (eval echo "$as_me:7325: \"$ac_try\"") >&5
7326   (eval $ac_try) 2>&5
7327   ac_status=$?
7328   echo "$as_me:7328: \$? = $ac_status" >&5
7329   (exit $ac_status); }; }; then
7330   ac_cv_lib_pcreposix_regcomp=yes
7331 else
7332   echo "$as_me: failed program was:" >&5
7333 cat conftest.$ac_ext >&5
7334 ac_cv_lib_pcreposix_regcomp=no
7335 fi
7336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7337 LIBS=$ac_check_lib_save_LIBS
7338 fi
7339 echo "$as_me:7339: result: $ac_cv_lib_pcreposix_regcomp" >&5
7340 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7341 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7342
7343 cf_add_libs="-lpcreposix"
7344 # Filter out duplicates - this happens with badly-designed ".pc" files...
7345 for cf_add_1lib in $LIBS
7346 do
7347         for cf_add_2lib in $cf_add_libs
7348         do
7349                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7350                 then
7351                         cf_add_1lib=
7352                         break
7353                 fi
7354         done
7355         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7356 done
7357 LIBS="$cf_add_libs"
7358
7359 else
7360   { { echo "$as_me:7360: error: Cannot find PCRE2 POSIX library" >&5
7361 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7362    { (exit 1); exit 1; }; }
7363 fi
7364
7365 fi
7366
7367                 ;;
7368         esac
7369
7370         # either way, check for the library header files
7371
7372 for ac_header in pcre2-posix.h pcreposix.h
7373 do
7374 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7375 echo "$as_me:7375: checking for $ac_header" >&5
7376 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7377 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7378   echo $ECHO_N "(cached) $ECHO_C" >&6
7379 else
7380   cat >conftest.$ac_ext <<_ACEOF
7381 #line 7381 "configure"
7382 #include "confdefs.h"
7383 #include <$ac_header>
7384 _ACEOF
7385 if { (eval echo "$as_me:7385: \"$ac_cpp conftest.$ac_ext\"") >&5
7386   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7387   ac_status=$?
7388   egrep -v '^ *\+' conftest.er1 >conftest.err
7389   rm -f conftest.er1
7390   cat conftest.err >&5
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); } >/dev/null; then
7393   if test -s conftest.err; then
7394     ac_cpp_err=$ac_c_preproc_warn_flag
7395   else
7396     ac_cpp_err=
7397   fi
7398 else
7399   ac_cpp_err=yes
7400 fi
7401 if test -z "$ac_cpp_err"; then
7402   eval "$as_ac_Header=yes"
7403 else
7404   echo "$as_me: failed program was:" >&5
7405   cat conftest.$ac_ext >&5
7406   eval "$as_ac_Header=no"
7407 fi
7408 rm -f conftest.err conftest.$ac_ext
7409 fi
7410 echo "$as_me:7410: result: `eval echo '${'$as_ac_Header'}'`" >&5
7411 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7412 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7413   cat >>confdefs.h <<EOF
7414 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7415 EOF
7416
7417 fi
7418 done
7419
7420 fi
7421
7422 # not everyone has "test -c"
7423 if test -c /dev/sysmouse 2>/dev/null ; then
7424 echo "$as_me:7424: checking if you want to use sysmouse" >&5
7425 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7426
7427 # Check whether --with-sysmouse or --without-sysmouse was given.
7428 if test "${with_sysmouse+set}" = set; then
7429   withval="$with_sysmouse"
7430   cf_with_sysmouse=$withval
7431 else
7432   cf_with_sysmouse=maybe
7433 fi;
7434         if test "$cf_with_sysmouse" != no ; then
7435         cat >conftest.$ac_ext <<_ACEOF
7436 #line 7436 "configure"
7437 #include "confdefs.h"
7438
7439 #include <osreldate.h>
7440 #if (__FreeBSD_version >= 400017)
7441 #include <sys/consio.h>
7442 #include <sys/fbio.h>
7443 #else
7444 #include <machine/console.h>
7445 #endif
7446
7447 int
7448 main (void)
7449 {
7450
7451         struct mouse_info the_mouse;
7452         ioctl(0, CONS_MOUSECTL, &the_mouse);
7453
7454   ;
7455   return 0;
7456 }
7457 _ACEOF
7458 rm -f conftest.$ac_objext
7459 if { (eval echo "$as_me:7459: \"$ac_compile\"") >&5
7460   (eval $ac_compile) 2>&5
7461   ac_status=$?
7462   echo "$as_me:7462: \$? = $ac_status" >&5
7463   (exit $ac_status); } &&
7464          { ac_try='test -s conftest.$ac_objext'
7465   { (eval echo "$as_me:7465: \"$ac_try\"") >&5
7466   (eval $ac_try) 2>&5
7467   ac_status=$?
7468   echo "$as_me:7468: \$? = $ac_status" >&5
7469   (exit $ac_status); }; }; then
7470   cf_with_sysmouse=yes
7471 else
7472   echo "$as_me: failed program was:" >&5
7473 cat conftest.$ac_ext >&5
7474 cf_with_sysmouse=no
7475 fi
7476 rm -f conftest.$ac_objext conftest.$ac_ext
7477         fi
7478 echo "$as_me:7478: result: $cf_with_sysmouse" >&5
7479 echo "${ECHO_T}$cf_with_sysmouse" >&6
7480 test "$cf_with_sysmouse" = yes &&
7481 cat >>confdefs.h <<\EOF
7482 #define USE_SYSMOUSE 1
7483 EOF
7484
7485 fi
7486
7487 # pretend that ncurses==ncursesw==ncursest
7488 echo "$as_me:7488: checking if you want to disable library suffixes" >&5
7489 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7490
7491 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7492 if test "${enable_lib_suffixes+set}" = set; then
7493   enableval="$enable_lib_suffixes"
7494   test "$enableval" != no && enableval=yes
7495         if test "$enableval" != "yes" ; then
7496     disable_lib_suffixes=yes
7497         else
7498                 disable_lib_suffixes=no
7499         fi
7500 else
7501   enableval=yes
7502         disable_lib_suffixes=no
7503
7504 fi;
7505 echo "$as_me:7505: result: $disable_lib_suffixes" >&5
7506 echo "${ECHO_T}$disable_lib_suffixes" >&6
7507
7508 ### If we're building with rpath, try to link non-standard libs that way too.
7509 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7510
7511 echo "$as_me:7511: checking if rpath-hack should be disabled" >&5
7512 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7513
7514 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7515 if test "${enable_rpath_hack+set}" = set; then
7516   enableval="$enable_rpath_hack"
7517   test "$enableval" != no && enableval=yes
7518         if test "$enableval" != "yes" ; then
7519     cf_disable_rpath_hack=yes
7520         else
7521                 cf_disable_rpath_hack=no
7522         fi
7523 else
7524   enableval=yes
7525         cf_disable_rpath_hack=no
7526
7527 fi;
7528 echo "$as_me:7528: result: $cf_disable_rpath_hack" >&5
7529 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7530 if test "$cf_disable_rpath_hack" = no ; then
7531
7532 echo "$as_me:7532: checking for updated LDFLAGS" >&5
7533 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7534 if test -n "$LD_RPATH_OPT" ; then
7535         echo "$as_me:7535: result: maybe" >&5
7536 echo "${ECHO_T}maybe" >&6
7537
7538         for ac_prog in ldd
7539 do
7540   # Extract the first word of "$ac_prog", so it can be a program name with args.
7541 set dummy $ac_prog; ac_word=$2
7542 echo "$as_me:7542: checking for $ac_word" >&5
7543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7544 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7545   echo $ECHO_N "(cached) $ECHO_C" >&6
7546 else
7547   if test -n "$cf_ldd_prog"; then
7548   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7549 else
7550   ac_save_IFS=$IFS; IFS=$ac_path_separator
7551 ac_dummy="$PATH"
7552 for ac_dir in $ac_dummy; do
7553   IFS=$ac_save_IFS
7554   test -z "$ac_dir" && ac_dir=.
7555   $as_executable_p "$ac_dir/$ac_word" || continue
7556 ac_cv_prog_cf_ldd_prog="$ac_prog"
7557 echo "$as_me:7557: found $ac_dir/$ac_word" >&5
7558 break
7559 done
7560
7561 fi
7562 fi
7563 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7564 if test -n "$cf_ldd_prog"; then
7565   echo "$as_me:7565: result: $cf_ldd_prog" >&5
7566 echo "${ECHO_T}$cf_ldd_prog" >&6
7567 else
7568   echo "$as_me:7568: result: no" >&5
7569 echo "${ECHO_T}no" >&6
7570 fi
7571
7572   test -n "$cf_ldd_prog" && break
7573 done
7574 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7575
7576         cf_rpath_list="/usr/lib /lib"
7577         if test "$cf_ldd_prog" != no
7578         then
7579                 cf_rpath_oops=
7580
7581 cat >conftest.$ac_ext <<_ACEOF
7582 #line 7582 "configure"
7583 #include "confdefs.h"
7584 #include <stdio.h>
7585 int
7586 main (void)
7587 {
7588 printf("Hello");
7589   ;
7590   return 0;
7591 }
7592 _ACEOF
7593 rm -f conftest.$ac_objext conftest$ac_exeext
7594 if { (eval echo "$as_me:7594: \"$ac_link\"") >&5
7595   (eval $ac_link) 2>&5
7596   ac_status=$?
7597   echo "$as_me:7597: \$? = $ac_status" >&5
7598   (exit $ac_status); } &&
7599          { ac_try='test -s conftest$ac_exeext'
7600   { (eval echo "$as_me:7600: \"$ac_try\"") >&5
7601   (eval $ac_try) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); }; }; then
7605   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7606                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7607 else
7608   echo "$as_me: failed program was:" >&5
7609 cat conftest.$ac_ext >&5
7610 fi
7611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7612
7613                 # If we passed the link-test, but get a "not found" on a given library,
7614                 # this could be due to inept reconfiguration of gcc to make it only
7615                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7616                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7617                 # /usr/local libraries.
7618                 if test -n "$cf_rpath_oops"
7619                 then
7620                         for cf_rpath_src in $cf_rpath_oops
7621                         do
7622                                 for cf_rpath_dir in \
7623                                         /usr/local \
7624                                         /usr/pkg \
7625                                         /opt/sfw
7626                                 do
7627                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7628                                         then
7629                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7630
7631 echo "${as_me:-configure}:7631: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7632
7633                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7634                                                 break
7635                                         fi
7636                                 done
7637                         done
7638                 fi
7639         fi
7640
7641         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7642
7643 echo "${as_me:-configure}:7643: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7644
7645 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7646
7647 echo "${as_me:-configure}:7647: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7648
7649 cf_rpath_dst=
7650 for cf_rpath_src in $LDFLAGS
7651 do
7652         case $cf_rpath_src in
7653         (-L*)
7654
7655                 # check if this refers to a directory which we will ignore
7656                 cf_rpath_skip=no
7657                 if test -n "$cf_rpath_list"
7658                 then
7659                         for cf_rpath_item in $cf_rpath_list
7660                         do
7661                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7662                                 then
7663                                         cf_rpath_skip=yes
7664                                         break
7665                                 fi
7666                         done
7667                 fi
7668
7669                 if test "$cf_rpath_skip" = no
7670                 then
7671                         # transform the option
7672                         if test "$LD_RPATH_OPT" = "-R " ; then
7673                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7674                         else
7675                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7676                         fi
7677
7678                         # if we have not already added this, add it now
7679                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7680                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7681                         then
7682                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7683
7684 echo "${as_me:-configure}:7684: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7685
7686                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7687                         fi
7688                 fi
7689                 ;;
7690         esac
7691         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7692 done
7693 LDFLAGS=$cf_rpath_dst
7694
7695 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7696
7697 echo "${as_me:-configure}:7697: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7698
7699 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7700
7701 echo "${as_me:-configure}:7701: testing ...checking LIBS $LIBS ..." 1>&5
7702
7703 cf_rpath_dst=
7704 for cf_rpath_src in $LIBS
7705 do
7706         case $cf_rpath_src in
7707         (-L*)
7708
7709                 # check if this refers to a directory which we will ignore
7710                 cf_rpath_skip=no
7711                 if test -n "$cf_rpath_list"
7712                 then
7713                         for cf_rpath_item in $cf_rpath_list
7714                         do
7715                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7716                                 then
7717                                         cf_rpath_skip=yes
7718                                         break
7719                                 fi
7720                         done
7721                 fi
7722
7723                 if test "$cf_rpath_skip" = no
7724                 then
7725                         # transform the option
7726                         if test "$LD_RPATH_OPT" = "-R " ; then
7727                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7728                         else
7729                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7730                         fi
7731
7732                         # if we have not already added this, add it now
7733                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7734                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7735                         then
7736                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7737
7738 echo "${as_me:-configure}:7738: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7739
7740                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7741                         fi
7742                 fi
7743                 ;;
7744         esac
7745         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7746 done
7747 LIBS=$cf_rpath_dst
7748
7749 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7750
7751 echo "${as_me:-configure}:7751: testing ...checked LIBS $LIBS ..." 1>&5
7752
7753         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7754
7755 echo "${as_me:-configure}:7755: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7756
7757 else
7758         echo "$as_me:7758: result: no" >&5
7759 echo "${ECHO_T}no" >&6
7760 fi
7761
7762 fi
7763
7764 fi
7765
7766 ###############################################################################
7767
7768 ###     use option --with-extra-suffix to append suffix to headers and libraries
7769 echo "$as_me:7769: checking if you wish to append extra suffix to header/library paths" >&5
7770 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7771 EXTRA_SUFFIX=
7772
7773 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7774 if test "${with_extra_suffix+set}" = set; then
7775   withval="$with_extra_suffix"
7776   case x$withval in
7777         (no)
7778                 ;;
7779         (xyes|x)
7780                 EXTRA_SUFFIX=$cf_cv_abi_version
7781                 ;;
7782         (*)
7783                 EXTRA_SUFFIX=$withval
7784                 ;;
7785         esac
7786
7787 fi;
7788 echo "$as_me:7788: result: $EXTRA_SUFFIX" >&5
7789 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7790
7791 ###     use option --disable-overwrite to leave out the link to -lcurses
7792 echo "$as_me:7792: checking if you wish to install ncurses overwriting curses" >&5
7793 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7794
7795 # Check whether --enable-overwrite or --disable-overwrite was given.
7796 if test "${enable_overwrite+set}" = set; then
7797   enableval="$enable_overwrite"
7798   with_overwrite=$enableval
7799 else
7800   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7801 fi;
7802 echo "$as_me:7802: result: $with_overwrite" >&5
7803 echo "${ECHO_T}$with_overwrite" >&6
7804
7805 echo "$as_me:7805: checking if external terminfo-database is used" >&5
7806 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7807
7808 # Check whether --enable-database or --disable-database was given.
7809 if test "${enable_database+set}" = set; then
7810   enableval="$enable_database"
7811   use_database=$enableval
7812 else
7813   use_database=yes
7814 fi;
7815 echo "$as_me:7815: result: $use_database" >&5
7816 echo "${ECHO_T}$use_database" >&6
7817
7818 case $host_os in
7819 (os2*)
7820         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7821         ;;
7822 (*)
7823         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7824         ;;
7825 esac
7826
7827 NCURSES_USE_DATABASE=0
7828 if test "$use_database" != no ; then
7829         NCURSES_USE_DATABASE=1
7830
7831         echo "$as_me:7831: checking which terminfo source-file will be installed" >&5
7832 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7833
7834 # Check whether --with-database or --without-database was given.
7835 if test "${with_database+set}" = set; then
7836   withval="$with_database"
7837   TERMINFO_SRC=$withval
7838 fi;
7839         echo "$as_me:7839: result: $TERMINFO_SRC" >&5
7840 echo "${ECHO_T}$TERMINFO_SRC" >&6
7841
7842         echo "$as_me:7842: checking whether to use hashed database instead of directory/tree" >&5
7843 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7844
7845 # Check whether --with-hashed-db or --without-hashed-db was given.
7846 if test "${with_hashed_db+set}" = set; then
7847   withval="$with_hashed_db"
7848
7849 else
7850   with_hashed_db=no
7851 fi;
7852         echo "$as_me:7852: result: $with_hashed_db" >&5
7853 echo "${ECHO_T}$with_hashed_db" >&6
7854 else
7855         with_hashed_db=no
7856 fi
7857
7858 echo "$as_me:7858: checking for list of fallback descriptions" >&5
7859 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7860
7861 # Check whether --with-fallbacks or --without-fallbacks was given.
7862 if test "${with_fallbacks+set}" = set; then
7863   withval="$with_fallbacks"
7864   with_fallback=$withval
7865 else
7866   with_fallback=
7867 fi;
7868 echo "$as_me:7868: result: $with_fallback" >&5
7869 echo "${ECHO_T}$with_fallback" >&6
7870 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7871
7872 echo "$as_me:7872: checking if you want modern xterm or antique" >&5
7873 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7874
7875 # Check whether --with-xterm-new or --without-xterm-new was given.
7876 if test "${with_xterm_new+set}" = set; then
7877   withval="$with_xterm_new"
7878   with_xterm_new=$withval
7879 else
7880   with_xterm_new=yes
7881 fi;
7882 case $with_xterm_new in
7883 (no) with_xterm_new=xterm-old;;
7884 (*)      with_xterm_new=xterm-new;;
7885 esac
7886 echo "$as_me:7886: result: $with_xterm_new" >&5
7887 echo "${ECHO_T}$with_xterm_new" >&6
7888 WHICH_XTERM=$with_xterm_new
7889
7890 echo "$as_me:7890: checking if xterm backspace sends BS or DEL" >&5
7891 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7892
7893 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7894 if test "${with_xterm_kbs+set}" = set; then
7895   withval="$with_xterm_kbs"
7896   with_xterm_kbs=$withval
7897 else
7898   with_xterm_kbs=BS
7899 fi;
7900 case x$with_xterm_kbs in
7901 (xyes|xno|xBS|xbs|x8)
7902         with_xterm_kbs=BS
7903         ;;
7904 (xDEL|xdel|x127)
7905         with_xterm_kbs=DEL
7906         ;;
7907 (*)
7908         with_xterm_kbs=$withval
7909         ;;
7910 esac
7911 echo "$as_me:7911: result: $with_xterm_kbs" >&5
7912 echo "${ECHO_T}$with_xterm_kbs" >&6
7913 XTERM_KBS=$with_xterm_kbs
7914
7915 MAKE_TERMINFO=
7916 if test "$use_database" = no ; then
7917         TERMINFO="${datadir}/terminfo"
7918         MAKE_TERMINFO="#"
7919 else
7920
7921 echo "$as_me:7921: checking for list of terminfo directories" >&5
7922 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7923
7924 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7925 if test "${with_terminfo_dirs+set}" = set; then
7926   withval="$with_terminfo_dirs"
7927
7928 else
7929   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7930 fi;
7931 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7932 cf_dst_path=
7933 for cf_src_path in $withval
7934 do
7935
7936 if test "x$prefix" != xNONE; then
7937         cf_path_syntax="$prefix"
7938 else
7939         cf_path_syntax="$ac_default_prefix"
7940 fi
7941
7942 case ".$cf_src_path" in
7943 (.\$\(*\)*|.\'*\'*)
7944         ;;
7945 (..|./*|.\\*)
7946         ;;
7947 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7948         ;;
7949 (.\${*prefix}*|.\${*dir}*)
7950         eval cf_src_path="$cf_src_path"
7951         case ".$cf_src_path" in
7952         (.NONE/*)
7953                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7954                 ;;
7955         esac
7956         ;;
7957 (.no|.NONE/*)
7958         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7959         ;;
7960 (*)
7961         { { echo "$as_me:7961: error: expected a pathname, not \"$cf_src_path\"" >&5
7962 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7963    { (exit 1); exit 1; }; }
7964         ;;
7965 esac
7966
7967   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7968   cf_dst_path="${cf_dst_path}${cf_src_path}"
7969 done
7970 IFS="$ac_save_ifs"
7971
7972 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7973 # so we have to check/work around.  We do prefer the result of "eval"...
7974 eval cf_dst_eval="$cf_dst_path"
7975 case "x$cf_dst_eval" in
7976 (xNONE*)
7977         TERMINFO_DIRS=$cf_dst_path
7978         ;;
7979 (*)
7980         TERMINFO_DIRS="$cf_dst_eval"
7981         ;;
7982 esac
7983
7984 echo "$as_me:7984: result: $TERMINFO_DIRS" >&5
7985 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7986 test -n "$TERMINFO_DIRS" &&
7987 cat >>confdefs.h <<EOF
7988 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7989 EOF
7990
7991 echo "$as_me:7991: checking for default terminfo directory" >&5
7992 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7993
7994 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7995 if test "${with_default_terminfo_dir+set}" = set; then
7996   withval="$with_default_terminfo_dir"
7997
7998 else
7999   withval="${TERMINFO:-${datadir}/terminfo}"
8000 fi; if test -n "${datadir}/terminfo" ; then
8001
8002 if test "x$prefix" != xNONE; then
8003         cf_path_syntax="$prefix"
8004 else
8005         cf_path_syntax="$ac_default_prefix"
8006 fi
8007
8008 case ".$withval" in
8009 (.\$\(*\)*|.\'*\'*)
8010         ;;
8011 (..|./*|.\\*)
8012         ;;
8013 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8014         ;;
8015 (.\${*prefix}*|.\${*dir}*)
8016         eval withval="$withval"
8017         case ".$withval" in
8018         (.NONE/*)
8019                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8020                 ;;
8021         esac
8022         ;;
8023 (.no|.NONE/*)
8024         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8025         ;;
8026 (*)
8027         { { echo "$as_me:8027: error: expected a pathname, not \"$withval\"" >&5
8028 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8029    { (exit 1); exit 1; }; }
8030         ;;
8031 esac
8032
8033 fi
8034 eval TERMINFO="$withval"
8035
8036 echo "$as_me:8036: result: $TERMINFO" >&5
8037 echo "${ECHO_T}$TERMINFO" >&6
8038
8039 cat >>confdefs.h <<EOF
8040 #define TERMINFO "$TERMINFO"
8041 EOF
8042
8043 fi
8044
8045 ###     use option --disable-big-core to make tic run on small machines
8046 ###     We need 4Mb, check if we can allocate 50% more than that.
8047 echo "$as_me:8047: checking if big-core option selected" >&5
8048 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8049
8050 # Check whether --enable-big-core or --disable-big-core was given.
8051 if test "${enable_big_core+set}" = set; then
8052   enableval="$enable_big_core"
8053   with_big_core=$enableval
8054 else
8055   if test "$cross_compiling" = yes; then
8056   with_big_core=no
8057 else
8058   cat >conftest.$ac_ext <<_ACEOF
8059 #line 8059 "configure"
8060 #include "confdefs.h"
8061
8062 #include <stdlib.h>
8063 #include <string.h>
8064 int main() {
8065         unsigned long n = 6000000L;
8066         char *s = malloc(n);
8067         if (s != 0)
8068                 s[0] = s[n-1] = 0;
8069         ${cf_cv_main_return:-return}(s == 0);
8070 }
8071 _ACEOF
8072 rm -f conftest$ac_exeext
8073 if { (eval echo "$as_me:8073: \"$ac_link\"") >&5
8074   (eval $ac_link) 2>&5
8075   ac_status=$?
8076   echo "$as_me:8076: \$? = $ac_status" >&5
8077   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8078   { (eval echo "$as_me:8078: \"$ac_try\"") >&5
8079   (eval $ac_try) 2>&5
8080   ac_status=$?
8081   echo "$as_me:8081: \$? = $ac_status" >&5
8082   (exit $ac_status); }; }; then
8083   with_big_core=yes
8084 else
8085   echo "$as_me: program exited with status $ac_status" >&5
8086 echo "$as_me: failed program was:" >&5
8087 cat conftest.$ac_ext >&5
8088 with_big_core=no
8089 fi
8090 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8091 fi
8092 fi;
8093 echo "$as_me:8093: result: $with_big_core" >&5
8094 echo "${ECHO_T}$with_big_core" >&6
8095 test "x$with_big_core" = "xyes" &&
8096 cat >>confdefs.h <<\EOF
8097 #define HAVE_BIG_CORE 1
8098 EOF
8099
8100 ### ISO C only guarantees 512-char strings, we have tables which load faster
8101 ### when constructed using "big" strings.  More than the C compiler, the awk
8102 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8103 echo "$as_me:8103: checking if big-strings option selected" >&5
8104 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8105
8106 # Check whether --enable-big-strings or --disable-big-strings was given.
8107 if test "${enable_big_strings+set}" = set; then
8108   enableval="$enable_big_strings"
8109   with_big_strings=$enableval
8110 else
8111
8112         case x$AWK in
8113         (x)
8114                 eval with_big_strings=no
8115                 ;;
8116         (*)
8117                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8118                         | $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
8119                         eval with_big_strings=yes
8120                 else
8121                         eval with_big_strings=no
8122                 fi
8123                 ;;
8124         esac
8125
8126 fi;
8127 echo "$as_me:8127: result: $with_big_strings" >&5
8128 echo "${ECHO_T}$with_big_strings" >&6
8129
8130 USE_BIG_STRINGS=0
8131 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8132
8133 ###     use option --enable-termcap to compile in the termcap fallback support
8134 echo "$as_me:8134: checking if you want termcap-fallback support" >&5
8135 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8136
8137 # Check whether --enable-termcap or --disable-termcap was given.
8138 if test "${enable_termcap+set}" = set; then
8139   enableval="$enable_termcap"
8140   with_termcap=$enableval
8141 else
8142   with_termcap=no
8143 fi;
8144 echo "$as_me:8144: result: $with_termcap" >&5
8145 echo "${ECHO_T}$with_termcap" >&6
8146
8147 NCURSES_USE_TERMCAP=0
8148 if test "x$with_termcap" != "xyes" ; then
8149         if test "$use_database" = no ; then
8150                 if test -z "$with_fallback" ; then
8151                         { { echo "$as_me:8151: error: You have disabled the database w/o specifying fallbacks" >&5
8152 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8153    { (exit 1); exit 1; }; }
8154                 fi
8155         fi
8156
8157 cat >>confdefs.h <<\EOF
8158 #define PURE_TERMINFO 1
8159 EOF
8160
8161 else
8162
8163         if test "$with_ticlib" != no ; then
8164                 { { echo "$as_me:8164: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8165 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8166    { (exit 1); exit 1; }; }
8167         fi
8168
8169         NCURSES_USE_TERMCAP=1
8170         echo "$as_me:8170: checking for list of termcap files" >&5
8171 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8172
8173 # Check whether --with-termpath or --without-termpath was given.
8174 if test "${with_termpath+set}" = set; then
8175   withval="$with_termpath"
8176
8177 else
8178   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8179 fi;
8180 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8181 cf_dst_path=
8182 for cf_src_path in $withval
8183 do
8184
8185 if test "x$prefix" != xNONE; then
8186         cf_path_syntax="$prefix"
8187 else
8188         cf_path_syntax="$ac_default_prefix"
8189 fi
8190
8191 case ".$cf_src_path" in
8192 (.\$\(*\)*|.\'*\'*)
8193         ;;
8194 (..|./*|.\\*)
8195         ;;
8196 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8197         ;;
8198 (.\${*prefix}*|.\${*dir}*)
8199         eval cf_src_path="$cf_src_path"
8200         case ".$cf_src_path" in
8201         (.NONE/*)
8202                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8203                 ;;
8204         esac
8205         ;;
8206 (.no|.NONE/*)
8207         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8208         ;;
8209 (*)
8210         { { echo "$as_me:8210: error: expected a pathname, not \"$cf_src_path\"" >&5
8211 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8212    { (exit 1); exit 1; }; }
8213         ;;
8214 esac
8215
8216   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8217   cf_dst_path="${cf_dst_path}${cf_src_path}"
8218 done
8219 IFS="$ac_save_ifs"
8220
8221 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8222 # so we have to check/work around.  We do prefer the result of "eval"...
8223 eval cf_dst_eval="$cf_dst_path"
8224 case "x$cf_dst_eval" in
8225 (xNONE*)
8226         TERMPATH=$cf_dst_path
8227         ;;
8228 (*)
8229         TERMPATH="$cf_dst_eval"
8230         ;;
8231 esac
8232
8233         echo "$as_me:8233: result: $TERMPATH" >&5
8234 echo "${ECHO_T}$TERMPATH" >&6
8235         test -n "$TERMPATH" &&
8236 cat >>confdefs.h <<EOF
8237 #define TERMPATH "$TERMPATH"
8238 EOF
8239
8240         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8241         echo "$as_me:8241: checking if fast termcap-loader is needed" >&5
8242 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8243
8244 # Check whether --enable-getcap or --disable-getcap was given.
8245 if test "${enable_getcap+set}" = set; then
8246   enableval="$enable_getcap"
8247   with_getcap=$enableval
8248 else
8249   with_getcap=no
8250 fi;
8251         echo "$as_me:8251: result: $with_getcap" >&5
8252 echo "${ECHO_T}$with_getcap" >&6
8253         test "x$with_getcap" = "xyes" &&
8254 cat >>confdefs.h <<\EOF
8255 #define USE_GETCAP 1
8256 EOF
8257
8258         echo "$as_me:8258: checking if translated termcaps will be cached in ~/.terminfo" >&5
8259 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8260
8261 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8262 if test "${enable_getcap_cache+set}" = set; then
8263   enableval="$enable_getcap_cache"
8264   with_getcap_cache=$enableval
8265 else
8266   with_getcap_cache=no
8267 fi;
8268         echo "$as_me:8268: result: $with_getcap_cache" >&5
8269 echo "${ECHO_T}$with_getcap_cache" >&6
8270         test "x$with_getcap_cache" = "xyes" &&
8271 cat >>confdefs.h <<\EOF
8272 #define USE_GETCAP_CACHE 1
8273 EOF
8274
8275 fi
8276
8277 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8278 echo "$as_me:8278: checking if ~/.terminfo is wanted" >&5
8279 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8280
8281 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8282 if test "${enable_home_terminfo+set}" = set; then
8283   enableval="$enable_home_terminfo"
8284   with_home_terminfo=$enableval
8285 else
8286   with_home_terminfo=yes
8287 fi;
8288 echo "$as_me:8288: result: $with_home_terminfo" >&5
8289 echo "${ECHO_T}$with_home_terminfo" >&6
8290 test "x$with_home_terminfo" = "xyes" &&
8291 cat >>confdefs.h <<\EOF
8292 #define USE_HOME_TERMINFO 1
8293 EOF
8294
8295 echo "$as_me:8295: checking if you want to use restricted environment when running as root" >&5
8296 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8297
8298 # Check whether --enable-root-environ or --disable-root-environ was given.
8299 if test "${enable_root_environ+set}" = set; then
8300   enableval="$enable_root_environ"
8301   with_root_environ=$enableval
8302 else
8303   with_root_environ=yes
8304 fi;
8305 echo "$as_me:8305: result: $with_root_environ" >&5
8306 echo "${ECHO_T}$with_root_environ" >&6
8307 test "x$with_root_environ" = xyes &&
8308 cat >>confdefs.h <<\EOF
8309 #define USE_ROOT_ENVIRON 1
8310 EOF
8311
8312 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8313 ###   to reduce storage requirements for the terminfo database.
8314
8315 for ac_header in \
8316 unistd.h \
8317
8318 do
8319 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8320 echo "$as_me:8320: checking for $ac_header" >&5
8321 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8322 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8323   echo $ECHO_N "(cached) $ECHO_C" >&6
8324 else
8325   cat >conftest.$ac_ext <<_ACEOF
8326 #line 8326 "configure"
8327 #include "confdefs.h"
8328 #include <$ac_header>
8329 _ACEOF
8330 if { (eval echo "$as_me:8330: \"$ac_cpp conftest.$ac_ext\"") >&5
8331   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8332   ac_status=$?
8333   egrep -v '^ *\+' conftest.er1 >conftest.err
8334   rm -f conftest.er1
8335   cat conftest.err >&5
8336   echo "$as_me:8336: \$? = $ac_status" >&5
8337   (exit $ac_status); } >/dev/null; then
8338   if test -s conftest.err; then
8339     ac_cpp_err=$ac_c_preproc_warn_flag
8340   else
8341     ac_cpp_err=
8342   fi
8343 else
8344   ac_cpp_err=yes
8345 fi
8346 if test -z "$ac_cpp_err"; then
8347   eval "$as_ac_Header=yes"
8348 else
8349   echo "$as_me: failed program was:" >&5
8350   cat conftest.$ac_ext >&5
8351   eval "$as_ac_Header=no"
8352 fi
8353 rm -f conftest.err conftest.$ac_ext
8354 fi
8355 echo "$as_me:8355: result: `eval echo '${'$as_ac_Header'}'`" >&5
8356 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8357 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8358   cat >>confdefs.h <<EOF
8359 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8360 EOF
8361
8362 fi
8363 done
8364
8365 for ac_func in \
8366         remove \
8367         unlink
8368 do
8369 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8370 echo "$as_me:8370: checking for $ac_func" >&5
8371 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8372 if eval "test \"\${$as_ac_var+set}\" = set"; then
8373   echo $ECHO_N "(cached) $ECHO_C" >&6
8374 else
8375   cat >conftest.$ac_ext <<_ACEOF
8376 #line 8376 "configure"
8377 #include "confdefs.h"
8378 /* System header to define __stub macros and hopefully few prototypes,
8379     which can conflict with char $ac_func (); below.  */
8380 #include <assert.h>
8381 /* Override any gcc2 internal prototype to avoid an error.  */
8382 #ifdef __cplusplus
8383 extern "C"
8384 #endif
8385 /* We use char because int might match the return type of a gcc2
8386    builtin and then its argument prototype would still apply.  */
8387 char $ac_func ();
8388 char (*f) ();
8389
8390 int
8391 main (void)
8392 {
8393 /* The GNU C library defines this for functions which it implements
8394     to always fail with ENOSYS.  Some functions are actually named
8395     something starting with __ and the normal name is an alias.  */
8396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8397 choke me
8398 #else
8399 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8400 #endif
8401
8402   ;
8403   return 0;
8404 }
8405 _ACEOF
8406 rm -f conftest.$ac_objext conftest$ac_exeext
8407 if { (eval echo "$as_me:8407: \"$ac_link\"") >&5
8408   (eval $ac_link) 2>&5
8409   ac_status=$?
8410   echo "$as_me:8410: \$? = $ac_status" >&5
8411   (exit $ac_status); } &&
8412          { ac_try='test -s conftest$ac_exeext'
8413   { (eval echo "$as_me:8413: \"$ac_try\"") >&5
8414   (eval $ac_try) 2>&5
8415   ac_status=$?
8416   echo "$as_me:8416: \$? = $ac_status" >&5
8417   (exit $ac_status); }; }; then
8418   eval "$as_ac_var=yes"
8419 else
8420   echo "$as_me: failed program was:" >&5
8421 cat conftest.$ac_ext >&5
8422 eval "$as_ac_var=no"
8423 fi
8424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8425 fi
8426 echo "$as_me:8426: result: `eval echo '${'$as_ac_var'}'`" >&5
8427 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8428 if test `eval echo '${'$as_ac_var'}'` = yes; then
8429   cat >>confdefs.h <<EOF
8430 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8431 EOF
8432
8433 fi
8434 done
8435
8436 if test "$cross_compiling" = yes ; then
8437
8438 for ac_func in \
8439                 link \
8440                 symlink
8441 do
8442 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8443 echo "$as_me:8443: checking for $ac_func" >&5
8444 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8445 if eval "test \"\${$as_ac_var+set}\" = set"; then
8446   echo $ECHO_N "(cached) $ECHO_C" >&6
8447 else
8448   cat >conftest.$ac_ext <<_ACEOF
8449 #line 8449 "configure"
8450 #include "confdefs.h"
8451 /* System header to define __stub macros and hopefully few prototypes,
8452     which can conflict with char $ac_func (); below.  */
8453 #include <assert.h>
8454 /* Override any gcc2 internal prototype to avoid an error.  */
8455 #ifdef __cplusplus
8456 extern "C"
8457 #endif
8458 /* We use char because int might match the return type of a gcc2
8459    builtin and then its argument prototype would still apply.  */
8460 char $ac_func ();
8461 char (*f) ();
8462
8463 int
8464 main (void)
8465 {
8466 /* The GNU C library defines this for functions which it implements
8467     to always fail with ENOSYS.  Some functions are actually named
8468     something starting with __ and the normal name is an alias.  */
8469 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8470 choke me
8471 #else
8472 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8473 #endif
8474
8475   ;
8476   return 0;
8477 }
8478 _ACEOF
8479 rm -f conftest.$ac_objext conftest$ac_exeext
8480 if { (eval echo "$as_me:8480: \"$ac_link\"") >&5
8481   (eval $ac_link) 2>&5
8482   ac_status=$?
8483   echo "$as_me:8483: \$? = $ac_status" >&5
8484   (exit $ac_status); } &&
8485          { ac_try='test -s conftest$ac_exeext'
8486   { (eval echo "$as_me:8486: \"$ac_try\"") >&5
8487   (eval $ac_try) 2>&5
8488   ac_status=$?
8489   echo "$as_me:8489: \$? = $ac_status" >&5
8490   (exit $ac_status); }; }; then
8491   eval "$as_ac_var=yes"
8492 else
8493   echo "$as_me: failed program was:" >&5
8494 cat conftest.$ac_ext >&5
8495 eval "$as_ac_var=no"
8496 fi
8497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8498 fi
8499 echo "$as_me:8499: result: `eval echo '${'$as_ac_var'}'`" >&5
8500 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8501 if test `eval echo '${'$as_ac_var'}'` = yes; then
8502   cat >>confdefs.h <<EOF
8503 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8504 EOF
8505
8506 fi
8507 done
8508
8509 else
8510         echo "$as_me:8510: checking if link/symlink functions work" >&5
8511 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8512 if test "${cf_cv_link_funcs+set}" = set; then
8513   echo $ECHO_N "(cached) $ECHO_C" >&6
8514 else
8515
8516                 cf_cv_link_funcs=
8517                 for cf_func in link symlink ; do
8518                         if test "$cross_compiling" = yes; then
8519
8520                         eval 'ac_cv_func_'$cf_func'=error'
8521 else
8522   cat >conftest.$ac_ext <<_ACEOF
8523 #line 8523 "configure"
8524 #include "confdefs.h"
8525
8526 #include <sys/types.h>
8527 #include <sys/stat.h>
8528 #ifdef HAVE_UNISTD_H
8529 #include <unistd.h>
8530 #endif
8531 int main(void)
8532 {
8533         int fail = 0;
8534         char *src = "config.log";
8535         char *dst = "conftest.chk";
8536         struct stat src_sb;
8537         struct stat dst_sb;
8538
8539         stat(src, &src_sb);
8540         fail = ($cf_func("config.log", "conftest.chk") < 0)
8541             || (stat(dst, &dst_sb) < 0)
8542             || (dst_sb.st_mtime != src_sb.st_mtime);
8543 #ifdef HAVE_UNLINK
8544         unlink(dst);
8545 #else
8546         remove(dst);
8547 #endif
8548         ${cf_cv_main_return:-return} (fail);
8549 }
8550
8551 _ACEOF
8552 rm -f conftest$ac_exeext
8553 if { (eval echo "$as_me:8553: \"$ac_link\"") >&5
8554   (eval $ac_link) 2>&5
8555   ac_status=$?
8556   echo "$as_me:8556: \$? = $ac_status" >&5
8557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8558   { (eval echo "$as_me:8558: \"$ac_try\"") >&5
8559   (eval $ac_try) 2>&5
8560   ac_status=$?
8561   echo "$as_me:8561: \$? = $ac_status" >&5
8562   (exit $ac_status); }; }; then
8563
8564                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8565                         eval 'ac_cv_func_'$cf_func'=yes'
8566 else
8567   echo "$as_me: program exited with status $ac_status" >&5
8568 echo "$as_me: failed program was:" >&5
8569 cat conftest.$ac_ext >&5
8570
8571                         eval 'ac_cv_func_'$cf_func'=no'
8572 fi
8573 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8574 fi
8575                 done
8576                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8577
8578 fi
8579 echo "$as_me:8579: result: $cf_cv_link_funcs" >&5
8580 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8581         test "$ac_cv_func_link"    = yes &&
8582 cat >>confdefs.h <<\EOF
8583 #define HAVE_LINK 1
8584 EOF
8585
8586         test "$ac_cv_func_symlink" = yes &&
8587 cat >>confdefs.h <<\EOF
8588 #define HAVE_SYMLINK 1
8589 EOF
8590
8591 fi
8592
8593 with_links=no
8594 with_symlinks=no
8595
8596 # soft links (symbolic links) are useful for some systems where hard links do
8597 # not work, or to make it simpler to copy terminfo trees around.
8598 if test "x$ac_cv_func_symlink" = xyes ; then
8599         echo "$as_me:8599: checking if tic should use symbolic links" >&5
8600 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8601
8602 # Check whether --enable-symlinks or --disable-symlinks was given.
8603 if test "${enable_symlinks+set}" = set; then
8604   enableval="$enable_symlinks"
8605   with_symlinks=$enableval
8606 else
8607   with_symlinks=no
8608 fi;
8609         echo "$as_me:8609: result: $with_symlinks" >&5
8610 echo "${ECHO_T}$with_symlinks" >&6
8611 fi
8612
8613 # If we have hard links and did not choose to use soft links instead, there is
8614 # no reason to make this choice optional - use the hard links.
8615 if test "$with_symlinks" = no ; then
8616         echo "$as_me:8616: checking if tic should use hard links" >&5
8617 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8618         if test "x$ac_cv_func_link" = xyes ; then
8619                 with_links=yes
8620         else
8621                 with_links=no
8622         fi
8623         echo "$as_me:8623: result: $with_links" >&5
8624 echo "${ECHO_T}$with_links" >&6
8625 fi
8626
8627 test "x$with_links" = xyes &&
8628 cat >>confdefs.h <<\EOF
8629 #define USE_LINKS 1
8630 EOF
8631
8632 test "x$with_symlinks" = xyes &&
8633 cat >>confdefs.h <<\EOF
8634 #define USE_SYMLINKS 1
8635 EOF
8636
8637 ###   use option --enable-broken-linker to force on use of broken-linker support
8638 echo "$as_me:8638: checking if you want broken-linker support code" >&5
8639 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8640
8641 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8642 if test "${enable_broken_linker+set}" = set; then
8643   enableval="$enable_broken_linker"
8644   with_broken_linker=$enableval
8645 else
8646   with_broken_linker=${BROKEN_LINKER:-no}
8647 fi;
8648 echo "$as_me:8648: result: $with_broken_linker" >&5
8649 echo "${ECHO_T}$with_broken_linker" >&6
8650
8651 BROKEN_LINKER=0
8652 if test "x$with_broken_linker" = xyes ; then
8653
8654 cat >>confdefs.h <<\EOF
8655 #define BROKEN_LINKER 1
8656 EOF
8657
8658         BROKEN_LINKER=1
8659 elif test "$DFT_LWR_MODEL" = shared ; then
8660         case $cf_cv_system_name in
8661         (cygwin*)
8662
8663 cat >>confdefs.h <<\EOF
8664 #define BROKEN_LINKER 1
8665 EOF
8666
8667                 BROKEN_LINKER=1
8668                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8669
8670 echo "${as_me:-configure}:8670: testing cygwin linker is broken anyway ..." 1>&5
8671
8672                 ;;
8673         esac
8674 fi
8675
8676 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8677 echo "$as_me:8677: checking if tputs should process BSD-style prefix padding" >&5
8678 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8679
8680 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8681 if test "${enable_bsdpad+set}" = set; then
8682   enableval="$enable_bsdpad"
8683   with_bsdpad=$enableval
8684 else
8685   with_bsdpad=no
8686 fi;
8687 echo "$as_me:8687: result: $with_bsdpad" >&5
8688 echo "${ECHO_T}$with_bsdpad" >&6
8689 test "x$with_bsdpad" = xyes &&
8690 cat >>confdefs.h <<\EOF
8691 #define BSD_TPUTS 1
8692 EOF
8693
8694 ###   use option --enable-widec to turn on use of wide-character support
8695 NCURSES_CH_T=chtype
8696 NCURSES_LIBUTF8=0
8697
8698 NEED_WCHAR_H=0
8699 NCURSES_MBSTATE_T=0
8700 NCURSES_WCHAR_T=0
8701 NCURSES_WINT_T=0
8702
8703 # Check to define _XOPEN_SOURCE "automatically"
8704 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8705
8706 cf_XOPEN_SOURCE=600
8707 cf_POSIX_C_SOURCE=199506L
8708 cf_xopen_source=
8709
8710 case $host_os in
8711 (aix[4-7]*)
8712         cf_xopen_source="-D_ALL_SOURCE"
8713         ;;
8714 (msys)
8715         cf_XOPEN_SOURCE=600
8716         ;;
8717 (darwin[0-8].*)
8718         cf_xopen_source="-D_APPLE_C_SOURCE"
8719         ;;
8720 (darwin*)
8721         cf_xopen_source="-D_DARWIN_C_SOURCE"
8722         cf_XOPEN_SOURCE=
8723         ;;
8724 (freebsd*|dragonfly*)
8725         # 5.x headers associate
8726         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8727         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8728         cf_POSIX_C_SOURCE=200112L
8729         cf_XOPEN_SOURCE=600
8730         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8731         ;;
8732 (hpux11*)
8733         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8734         ;;
8735 (hpux*)
8736         cf_xopen_source="-D_HPUX_SOURCE"
8737         ;;
8738 (irix[56].*)
8739         cf_xopen_source="-D_SGI_SOURCE"
8740         cf_XOPEN_SOURCE=
8741         ;;
8742 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8743
8744 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8745
8746 echo "$as_me:8746: checking if this is the GNU C library" >&5
8747 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8748 if test "${cf_cv_gnu_library+set}" = set; then
8749   echo $ECHO_N "(cached) $ECHO_C" >&6
8750 else
8751
8752 cat >conftest.$ac_ext <<_ACEOF
8753 #line 8753 "configure"
8754 #include "confdefs.h"
8755 #include <sys/types.h>
8756 int
8757 main (void)
8758 {
8759
8760         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8761                 return 0;
8762         #else
8763         #       error not GNU C library
8764         #endif
8765   ;
8766   return 0;
8767 }
8768 _ACEOF
8769 rm -f conftest.$ac_objext
8770 if { (eval echo "$as_me:8770: \"$ac_compile\"") >&5
8771   (eval $ac_compile) 2>&5
8772   ac_status=$?
8773   echo "$as_me:8773: \$? = $ac_status" >&5
8774   (exit $ac_status); } &&
8775          { ac_try='test -s conftest.$ac_objext'
8776   { (eval echo "$as_me:8776: \"$ac_try\"") >&5
8777   (eval $ac_try) 2>&5
8778   ac_status=$?
8779   echo "$as_me:8779: \$? = $ac_status" >&5
8780   (exit $ac_status); }; }; then
8781   cf_cv_gnu_library=yes
8782 else
8783   echo "$as_me: failed program was:" >&5
8784 cat conftest.$ac_ext >&5
8785 cf_cv_gnu_library=no
8786 fi
8787 rm -f conftest.$ac_objext conftest.$ac_ext
8788
8789 fi
8790 echo "$as_me:8790: result: $cf_cv_gnu_library" >&5
8791 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8792
8793 if test x$cf_cv_gnu_library = xyes; then
8794
8795         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8796         # was changed to help a little...
8797         echo "$as_me:8797: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8798 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8799 if test "${cf_cv_gnu_library_219+set}" = set; then
8800   echo $ECHO_N "(cached) $ECHO_C" >&6
8801 else
8802
8803                 cf_save="$CPPFLAGS"
8804
8805         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8806         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8807
8808                 cat >conftest.$ac_ext <<_ACEOF
8809 #line 8809 "configure"
8810 #include "confdefs.h"
8811 #include <sys/types.h>
8812 int
8813 main (void)
8814 {
8815
8816                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8817                                 return 0;
8818                         #else
8819                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8820                         #endif
8821   ;
8822   return 0;
8823 }
8824 _ACEOF
8825 rm -f conftest.$ac_objext
8826 if { (eval echo "$as_me:8826: \"$ac_compile\"") >&5
8827   (eval $ac_compile) 2>&5
8828   ac_status=$?
8829   echo "$as_me:8829: \$? = $ac_status" >&5
8830   (exit $ac_status); } &&
8831          { ac_try='test -s conftest.$ac_objext'
8832   { (eval echo "$as_me:8832: \"$ac_try\"") >&5
8833   (eval $ac_try) 2>&5
8834   ac_status=$?
8835   echo "$as_me:8835: \$? = $ac_status" >&5
8836   (exit $ac_status); }; }; then
8837   cf_cv_gnu_library_219=yes
8838 else
8839   echo "$as_me: failed program was:" >&5
8840 cat conftest.$ac_ext >&5
8841 cf_cv_gnu_library_219=no
8842 fi
8843 rm -f conftest.$ac_objext conftest.$ac_ext
8844                 CPPFLAGS="$cf_save"
8845
8846 fi
8847 echo "$as_me:8847: result: $cf_cv_gnu_library_219" >&5
8848 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8849
8850         if test "x$cf_cv_gnu_library_219" = xyes; then
8851                 cf_save="$CPPFLAGS"
8852                 echo "$as_me:8852: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8853 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8854 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8855   echo $ECHO_N "(cached) $ECHO_C" >&6
8856 else
8857
8858 cf_fix_cppflags=no
8859 cf_new_cflags=
8860 cf_new_cppflags=
8861 cf_new_extra_cppflags=
8862
8863 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8864 do
8865 case $cf_fix_cppflags in
8866 (no)
8867         case $cf_add_cflags in
8868         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8869                 case $cf_add_cflags in
8870                 (-D*)
8871                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8872
8873                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8874                                 && test -z "${cf_tst_cflags}" \
8875                                 && cf_fix_cppflags=yes
8876
8877                         if test $cf_fix_cppflags = yes ; then
8878
8879         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8880         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8881
8882                                 continue
8883                         elif test "${cf_tst_cflags}" = "\"'" ; 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                         fi
8890                         ;;
8891                 esac
8892                 case "$CPPFLAGS" in
8893                 (*$cf_add_cflags)
8894                         ;;
8895                 (*)
8896                         case $cf_add_cflags in
8897                         (-D*)
8898                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8899
8900 CPPFLAGS=`echo "$CPPFLAGS" | \
8901         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8902                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8903
8904                                 ;;
8905                         esac
8906
8907         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8908         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8909
8910                         ;;
8911                 esac
8912                 ;;
8913         (*)
8914
8915         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8916         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8917
8918                 ;;
8919         esac
8920         ;;
8921 (yes)
8922
8923         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8924         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8925
8926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8927
8928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8929                 && test -z "${cf_tst_cflags}" \
8930                 && cf_fix_cppflags=no
8931         ;;
8932 esac
8933 done
8934
8935 if test -n "$cf_new_cflags" ; then
8936
8937         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8938         CFLAGS="${CFLAGS}$cf_new_cflags"
8939
8940 fi
8941
8942 if test -n "$cf_new_cppflags" ; then
8943
8944         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8945         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8946
8947 fi
8948
8949 if test -n "$cf_new_extra_cppflags" ; then
8950
8951         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8952         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8953
8954 fi
8955
8956                         cat >conftest.$ac_ext <<_ACEOF
8957 #line 8957 "configure"
8958 #include "confdefs.h"
8959
8960                                 #include <limits.h>
8961                                 #include <sys/types.h>
8962
8963 int
8964 main (void)
8965 {
8966
8967                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
8968                                         return 0;
8969                                 #else
8970                                 #       error GNU C library is too old
8971                                 #endif
8972   ;
8973   return 0;
8974 }
8975 _ACEOF
8976 rm -f conftest.$ac_objext
8977 if { (eval echo "$as_me:8977: \"$ac_compile\"") >&5
8978   (eval $ac_compile) 2>&5
8979   ac_status=$?
8980   echo "$as_me:8980: \$? = $ac_status" >&5
8981   (exit $ac_status); } &&
8982          { ac_try='test -s conftest.$ac_objext'
8983   { (eval echo "$as_me:8983: \"$ac_try\"") >&5
8984   (eval $ac_try) 2>&5
8985   ac_status=$?
8986   echo "$as_me:8986: \$? = $ac_status" >&5
8987   (exit $ac_status); }; }; then
8988   cf_cv_gnu_dftsrc_219=yes
8989 else
8990   echo "$as_me: failed program was:" >&5
8991 cat conftest.$ac_ext >&5
8992 cf_cv_gnu_dftsrc_219=no
8993 fi
8994 rm -f conftest.$ac_objext conftest.$ac_ext
8995
8996 fi
8997 echo "$as_me:8997: result: $cf_cv_gnu_dftsrc_219" >&5
8998 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
8999                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9000         else
9001                 cf_cv_gnu_dftsrc_219=maybe
9002         fi
9003
9004         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9005
9006                 echo "$as_me:9006: checking if we must define _GNU_SOURCE" >&5
9007 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9008 if test "${cf_cv_gnu_source+set}" = set; then
9009   echo $ECHO_N "(cached) $ECHO_C" >&6
9010 else
9011
9012                 cat >conftest.$ac_ext <<_ACEOF
9013 #line 9013 "configure"
9014 #include "confdefs.h"
9015 #include <sys/types.h>
9016 int
9017 main (void)
9018 {
9019
9020                         #ifndef _XOPEN_SOURCE
9021                         #error  expected _XOPEN_SOURCE to be defined
9022                         #endif
9023   ;
9024   return 0;
9025 }
9026 _ACEOF
9027 rm -f conftest.$ac_objext
9028 if { (eval echo "$as_me:9028: \"$ac_compile\"") >&5
9029   (eval $ac_compile) 2>&5
9030   ac_status=$?
9031   echo "$as_me:9031: \$? = $ac_status" >&5
9032   (exit $ac_status); } &&
9033          { ac_try='test -s conftest.$ac_objext'
9034   { (eval echo "$as_me:9034: \"$ac_try\"") >&5
9035   (eval $ac_try) 2>&5
9036   ac_status=$?
9037   echo "$as_me:9037: \$? = $ac_status" >&5
9038   (exit $ac_status); }; }; then
9039   cf_cv_gnu_source=no
9040 else
9041   echo "$as_me: failed program was:" >&5
9042 cat conftest.$ac_ext >&5
9043 cf_save="$CPPFLAGS"
9044
9045 cf_fix_cppflags=no
9046 cf_new_cflags=
9047 cf_new_cppflags=
9048 cf_new_extra_cppflags=
9049
9050 for cf_add_cflags in -D_GNU_SOURCE
9051 do
9052 case $cf_fix_cppflags in
9053 (no)
9054         case $cf_add_cflags in
9055         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9056                 case $cf_add_cflags in
9057                 (-D*)
9058                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9059
9060                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9061                                 && test -z "${cf_tst_cflags}" \
9062                                 && cf_fix_cppflags=yes
9063
9064                         if test $cf_fix_cppflags = yes ; then
9065
9066         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9067         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9068
9069                                 continue
9070                         elif test "${cf_tst_cflags}" = "\"'" ; then
9071
9072         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9073         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9074
9075                                 continue
9076                         fi
9077                         ;;
9078                 esac
9079                 case "$CPPFLAGS" in
9080                 (*$cf_add_cflags)
9081                         ;;
9082                 (*)
9083                         case $cf_add_cflags in
9084                         (-D*)
9085                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9086
9087 CPPFLAGS=`echo "$CPPFLAGS" | \
9088         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9089                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9090
9091                                 ;;
9092                         esac
9093
9094         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9095         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9096
9097                         ;;
9098                 esac
9099                 ;;
9100         (*)
9101
9102         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9103         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9104
9105                 ;;
9106         esac
9107         ;;
9108 (yes)
9109
9110         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9111         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9112
9113         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9114
9115         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9116                 && test -z "${cf_tst_cflags}" \
9117                 && cf_fix_cppflags=no
9118         ;;
9119 esac
9120 done
9121
9122 if test -n "$cf_new_cflags" ; then
9123
9124         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9125         CFLAGS="${CFLAGS}$cf_new_cflags"
9126
9127 fi
9128
9129 if test -n "$cf_new_cppflags" ; then
9130
9131         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9132         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9133
9134 fi
9135
9136 if test -n "$cf_new_extra_cppflags" ; then
9137
9138         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9139         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9140
9141 fi
9142
9143                          cat >conftest.$ac_ext <<_ACEOF
9144 #line 9144 "configure"
9145 #include "confdefs.h"
9146 #include <sys/types.h>
9147 int
9148 main (void)
9149 {
9150
9151                                 #ifdef _XOPEN_SOURCE
9152                                 #error  expected _XOPEN_SOURCE to be undefined
9153                                 #endif
9154   ;
9155   return 0;
9156 }
9157 _ACEOF
9158 rm -f conftest.$ac_objext
9159 if { (eval echo "$as_me:9159: \"$ac_compile\"") >&5
9160   (eval $ac_compile) 2>&5
9161   ac_status=$?
9162   echo "$as_me:9162: \$? = $ac_status" >&5
9163   (exit $ac_status); } &&
9164          { ac_try='test -s conftest.$ac_objext'
9165   { (eval echo "$as_me:9165: \"$ac_try\"") >&5
9166   (eval $ac_try) 2>&5
9167   ac_status=$?
9168   echo "$as_me:9168: \$? = $ac_status" >&5
9169   (exit $ac_status); }; }; then
9170   cf_cv_gnu_source=no
9171 else
9172   echo "$as_me: failed program was:" >&5
9173 cat conftest.$ac_ext >&5
9174 cf_cv_gnu_source=yes
9175 fi
9176 rm -f conftest.$ac_objext conftest.$ac_ext
9177                         CPPFLAGS="$cf_save"
9178
9179 fi
9180 rm -f conftest.$ac_objext conftest.$ac_ext
9181
9182 fi
9183 echo "$as_me:9183: result: $cf_cv_gnu_source" >&5
9184 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9185
9186                 if test "$cf_cv_gnu_source" = yes
9187                 then
9188                 echo "$as_me:9188: checking if we should also define _DEFAULT_SOURCE" >&5
9189 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9190 if test "${cf_cv_default_source+set}" = set; then
9191   echo $ECHO_N "(cached) $ECHO_C" >&6
9192 else
9193
9194         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9195         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9196
9197                         cat >conftest.$ac_ext <<_ACEOF
9198 #line 9198 "configure"
9199 #include "confdefs.h"
9200 #include <sys/types.h>
9201 int
9202 main (void)
9203 {
9204
9205                                 #ifdef _DEFAULT_SOURCE
9206                                 #error  expected _DEFAULT_SOURCE to be undefined
9207                                 #endif
9208   ;
9209   return 0;
9210 }
9211 _ACEOF
9212 rm -f conftest.$ac_objext
9213 if { (eval echo "$as_me:9213: \"$ac_compile\"") >&5
9214   (eval $ac_compile) 2>&5
9215   ac_status=$?
9216   echo "$as_me:9216: \$? = $ac_status" >&5
9217   (exit $ac_status); } &&
9218          { ac_try='test -s conftest.$ac_objext'
9219   { (eval echo "$as_me:9219: \"$ac_try\"") >&5
9220   (eval $ac_try) 2>&5
9221   ac_status=$?
9222   echo "$as_me:9222: \$? = $ac_status" >&5
9223   (exit $ac_status); }; }; then
9224   cf_cv_default_source=no
9225 else
9226   echo "$as_me: failed program was:" >&5
9227 cat conftest.$ac_ext >&5
9228 cf_cv_default_source=yes
9229 fi
9230 rm -f conftest.$ac_objext conftest.$ac_ext
9231
9232 fi
9233 echo "$as_me:9233: result: $cf_cv_default_source" >&5
9234 echo "${ECHO_T}$cf_cv_default_source" >&6
9235                         if test "$cf_cv_default_source" = yes
9236                         then
9237
9238         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9239         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9240
9241                         fi
9242                 fi
9243         fi
9244
9245 fi
9246
9247         ;;
9248 (minix*)
9249         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9250         ;;
9251 (mirbsd*)
9252         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9253         cf_XOPEN_SOURCE=
9254
9255 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9256
9257 cf_save_CFLAGS="$CFLAGS"
9258 cf_save_CPPFLAGS="$CPPFLAGS"
9259
9260 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9261         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9262                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9263
9264 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9265         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9266                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9267
9268 echo "$as_me:9268: checking if we should define _POSIX_C_SOURCE" >&5
9269 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9270 if test "${cf_cv_posix_c_source+set}" = set; then
9271   echo $ECHO_N "(cached) $ECHO_C" >&6
9272 else
9273
9274 echo "${as_me:-configure}:9274: testing if the symbol is already defined go no further ..." 1>&5
9275
9276         cat >conftest.$ac_ext <<_ACEOF
9277 #line 9277 "configure"
9278 #include "confdefs.h"
9279 #include <sys/types.h>
9280 int
9281 main (void)
9282 {
9283
9284 #ifndef _POSIX_C_SOURCE
9285 make an error
9286 #endif
9287   ;
9288   return 0;
9289 }
9290 _ACEOF
9291 rm -f conftest.$ac_objext
9292 if { (eval echo "$as_me:9292: \"$ac_compile\"") >&5
9293   (eval $ac_compile) 2>&5
9294   ac_status=$?
9295   echo "$as_me:9295: \$? = $ac_status" >&5
9296   (exit $ac_status); } &&
9297          { ac_try='test -s conftest.$ac_objext'
9298   { (eval echo "$as_me:9298: \"$ac_try\"") >&5
9299   (eval $ac_try) 2>&5
9300   ac_status=$?
9301   echo "$as_me:9301: \$? = $ac_status" >&5
9302   (exit $ac_status); }; }; then
9303   cf_cv_posix_c_source=no
9304 else
9305   echo "$as_me: failed program was:" >&5
9306 cat conftest.$ac_ext >&5
9307 cf_want_posix_source=no
9308          case .$cf_POSIX_C_SOURCE in
9309          (.[12]??*)
9310                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9311                 ;;
9312          (.2)
9313                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9314                 cf_want_posix_source=yes
9315                 ;;
9316          (.*)
9317                 cf_want_posix_source=yes
9318                 ;;
9319          esac
9320          if test "$cf_want_posix_source" = yes ; then
9321                 cat >conftest.$ac_ext <<_ACEOF
9322 #line 9322 "configure"
9323 #include "confdefs.h"
9324 #include <sys/types.h>
9325 int
9326 main (void)
9327 {
9328
9329 #ifdef _POSIX_SOURCE
9330 make an error
9331 #endif
9332   ;
9333   return 0;
9334 }
9335 _ACEOF
9336 rm -f conftest.$ac_objext
9337 if { (eval echo "$as_me:9337: \"$ac_compile\"") >&5
9338   (eval $ac_compile) 2>&5
9339   ac_status=$?
9340   echo "$as_me:9340: \$? = $ac_status" >&5
9341   (exit $ac_status); } &&
9342          { ac_try='test -s conftest.$ac_objext'
9343   { (eval echo "$as_me:9343: \"$ac_try\"") >&5
9344   (eval $ac_try) 2>&5
9345   ac_status=$?
9346   echo "$as_me:9346: \$? = $ac_status" >&5
9347   (exit $ac_status); }; }; then
9348   :
9349 else
9350   echo "$as_me: failed program was:" >&5
9351 cat conftest.$ac_ext >&5
9352 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9353 fi
9354 rm -f conftest.$ac_objext conftest.$ac_ext
9355          fi
9356
9357 echo "${as_me:-configure}:9357: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9358
9359          CFLAGS="$cf_trim_CFLAGS"
9360          CPPFLAGS="$cf_trim_CPPFLAGS"
9361
9362         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9363         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9364
9365 echo "${as_me:-configure}:9365: testing if the second compile does not leave our definition intact error ..." 1>&5
9366
9367          cat >conftest.$ac_ext <<_ACEOF
9368 #line 9368 "configure"
9369 #include "confdefs.h"
9370 #include <sys/types.h>
9371 int
9372 main (void)
9373 {
9374
9375 #ifndef _POSIX_C_SOURCE
9376 make an error
9377 #endif
9378   ;
9379   return 0;
9380 }
9381 _ACEOF
9382 rm -f conftest.$ac_objext
9383 if { (eval echo "$as_me:9383: \"$ac_compile\"") >&5
9384   (eval $ac_compile) 2>&5
9385   ac_status=$?
9386   echo "$as_me:9386: \$? = $ac_status" >&5
9387   (exit $ac_status); } &&
9388          { ac_try='test -s conftest.$ac_objext'
9389   { (eval echo "$as_me:9389: \"$ac_try\"") >&5
9390   (eval $ac_try) 2>&5
9391   ac_status=$?
9392   echo "$as_me:9392: \$? = $ac_status" >&5
9393   (exit $ac_status); }; }; then
9394   :
9395 else
9396   echo "$as_me: failed program was:" >&5
9397 cat conftest.$ac_ext >&5
9398 cf_cv_posix_c_source=no
9399 fi
9400 rm -f conftest.$ac_objext conftest.$ac_ext
9401          CFLAGS="$cf_save_CFLAGS"
9402          CPPFLAGS="$cf_save_CPPFLAGS"
9403
9404 fi
9405 rm -f conftest.$ac_objext conftest.$ac_ext
9406
9407 fi
9408 echo "$as_me:9408: result: $cf_cv_posix_c_source" >&5
9409 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9410
9411 if test "$cf_cv_posix_c_source" != no ; then
9412         CFLAGS="$cf_trim_CFLAGS"
9413         CPPFLAGS="$cf_trim_CPPFLAGS"
9414
9415 cf_fix_cppflags=no
9416 cf_new_cflags=
9417 cf_new_cppflags=
9418 cf_new_extra_cppflags=
9419
9420 for cf_add_cflags in $cf_cv_posix_c_source
9421 do
9422 case $cf_fix_cppflags in
9423 (no)
9424         case $cf_add_cflags in
9425         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9426                 case $cf_add_cflags in
9427                 (-D*)
9428                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9429
9430                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9431                                 && test -z "${cf_tst_cflags}" \
9432                                 && cf_fix_cppflags=yes
9433
9434                         if test $cf_fix_cppflags = yes ; then
9435
9436         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9437         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9438
9439                                 continue
9440                         elif test "${cf_tst_cflags}" = "\"'" ; then
9441
9442         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9443         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9444
9445                                 continue
9446                         fi
9447                         ;;
9448                 esac
9449                 case "$CPPFLAGS" in
9450                 (*$cf_add_cflags)
9451                         ;;
9452                 (*)
9453                         case $cf_add_cflags in
9454                         (-D*)
9455                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9456
9457 CPPFLAGS=`echo "$CPPFLAGS" | \
9458         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9459                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9460
9461                                 ;;
9462                         esac
9463
9464         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9465         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9466
9467                         ;;
9468                 esac
9469                 ;;
9470         (*)
9471
9472         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9473         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9474
9475                 ;;
9476         esac
9477         ;;
9478 (yes)
9479
9480         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9481         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9482
9483         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9484
9485         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9486                 && test -z "${cf_tst_cflags}" \
9487                 && cf_fix_cppflags=no
9488         ;;
9489 esac
9490 done
9491
9492 if test -n "$cf_new_cflags" ; then
9493
9494         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9495         CFLAGS="${CFLAGS}$cf_new_cflags"
9496
9497 fi
9498
9499 if test -n "$cf_new_cppflags" ; then
9500
9501         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9502         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9503
9504 fi
9505
9506 if test -n "$cf_new_extra_cppflags" ; then
9507
9508         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9509         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9510
9511 fi
9512
9513 fi
9514
9515         ;;
9516 (netbsd*)
9517         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9518         ;;
9519 (openbsd[4-9]*)
9520         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9521         cf_xopen_source="-D_BSD_SOURCE"
9522         cf_XOPEN_SOURCE=600
9523         ;;
9524 (openbsd*)
9525         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9526         ;;
9527 (osf[45]*)
9528         cf_xopen_source="-D_OSF_SOURCE"
9529         ;;
9530 (nto-qnx*)
9531         cf_xopen_source="-D_QNX_SOURCE"
9532         ;;
9533 (sco*)
9534         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9535         ;;
9536 (solaris2.*)
9537         cf_xopen_source="-D__EXTENSIONS__"
9538         cf_cv_xopen_source=broken
9539         ;;
9540 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9541         cf_XOPEN_SOURCE=
9542         cf_POSIX_C_SOURCE=
9543         ;;
9544 (*)
9545
9546 echo "$as_me:9546: checking if we should define _XOPEN_SOURCE" >&5
9547 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9548 if test "${cf_cv_xopen_source+set}" = set; then
9549   echo $ECHO_N "(cached) $ECHO_C" >&6
9550 else
9551
9552         cat >conftest.$ac_ext <<_ACEOF
9553 #line 9553 "configure"
9554 #include "confdefs.h"
9555
9556 #include <stdlib.h>
9557 #include <string.h>
9558 #include <sys/types.h>
9559
9560 int
9561 main (void)
9562 {
9563
9564 #ifndef _XOPEN_SOURCE
9565 make an error
9566 #endif
9567   ;
9568   return 0;
9569 }
9570 _ACEOF
9571 rm -f conftest.$ac_objext
9572 if { (eval echo "$as_me:9572: \"$ac_compile\"") >&5
9573   (eval $ac_compile) 2>&5
9574   ac_status=$?
9575   echo "$as_me:9575: \$? = $ac_status" >&5
9576   (exit $ac_status); } &&
9577          { ac_try='test -s conftest.$ac_objext'
9578   { (eval echo "$as_me:9578: \"$ac_try\"") >&5
9579   (eval $ac_try) 2>&5
9580   ac_status=$?
9581   echo "$as_me:9581: \$? = $ac_status" >&5
9582   (exit $ac_status); }; }; then
9583   cf_cv_xopen_source=no
9584 else
9585   echo "$as_me: failed program was:" >&5
9586 cat conftest.$ac_ext >&5
9587 cf_save="$CPPFLAGS"
9588
9589         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9590         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9591
9592          cat >conftest.$ac_ext <<_ACEOF
9593 #line 9593 "configure"
9594 #include "confdefs.h"
9595
9596 #include <stdlib.h>
9597 #include <string.h>
9598 #include <sys/types.h>
9599
9600 int
9601 main (void)
9602 {
9603
9604 #ifdef _XOPEN_SOURCE
9605 make an error
9606 #endif
9607   ;
9608   return 0;
9609 }
9610 _ACEOF
9611 rm -f conftest.$ac_objext
9612 if { (eval echo "$as_me:9612: \"$ac_compile\"") >&5
9613   (eval $ac_compile) 2>&5
9614   ac_status=$?
9615   echo "$as_me:9615: \$? = $ac_status" >&5
9616   (exit $ac_status); } &&
9617          { ac_try='test -s conftest.$ac_objext'
9618   { (eval echo "$as_me:9618: \"$ac_try\"") >&5
9619   (eval $ac_try) 2>&5
9620   ac_status=$?
9621   echo "$as_me:9621: \$? = $ac_status" >&5
9622   (exit $ac_status); }; }; then
9623   cf_cv_xopen_source=no
9624 else
9625   echo "$as_me: failed program was:" >&5
9626 cat conftest.$ac_ext >&5
9627 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9628 fi
9629 rm -f conftest.$ac_objext conftest.$ac_ext
9630         CPPFLAGS="$cf_save"
9631
9632 fi
9633 rm -f conftest.$ac_objext conftest.$ac_ext
9634
9635 fi
9636 echo "$as_me:9636: result: $cf_cv_xopen_source" >&5
9637 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9638
9639 if test "$cf_cv_xopen_source" != no ; then
9640
9641 CFLAGS=`echo "$CFLAGS" | \
9642         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9643                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9644
9645 CPPFLAGS=`echo "$CPPFLAGS" | \
9646         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9647                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9648
9649         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9650
9651 cf_fix_cppflags=no
9652 cf_new_cflags=
9653 cf_new_cppflags=
9654 cf_new_extra_cppflags=
9655
9656 for cf_add_cflags in $cf_temp_xopen_source
9657 do
9658 case $cf_fix_cppflags in
9659 (no)
9660         case $cf_add_cflags in
9661         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9662                 case $cf_add_cflags in
9663                 (-D*)
9664                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9665
9666                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9667                                 && test -z "${cf_tst_cflags}" \
9668                                 && cf_fix_cppflags=yes
9669
9670                         if test $cf_fix_cppflags = yes ; then
9671
9672         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9673         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9674
9675                                 continue
9676                         elif test "${cf_tst_cflags}" = "\"'" ; then
9677
9678         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9679         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9680
9681                                 continue
9682                         fi
9683                         ;;
9684                 esac
9685                 case "$CPPFLAGS" in
9686                 (*$cf_add_cflags)
9687                         ;;
9688                 (*)
9689                         case $cf_add_cflags in
9690                         (-D*)
9691                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9692
9693 CPPFLAGS=`echo "$CPPFLAGS" | \
9694         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9695                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9696
9697                                 ;;
9698                         esac
9699
9700         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9701         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9702
9703                         ;;
9704                 esac
9705                 ;;
9706         (*)
9707
9708         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9709         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9710
9711                 ;;
9712         esac
9713         ;;
9714 (yes)
9715
9716         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9717         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9718
9719         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9720
9721         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9722                 && test -z "${cf_tst_cflags}" \
9723                 && cf_fix_cppflags=no
9724         ;;
9725 esac
9726 done
9727
9728 if test -n "$cf_new_cflags" ; then
9729
9730         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9731         CFLAGS="${CFLAGS}$cf_new_cflags"
9732
9733 fi
9734
9735 if test -n "$cf_new_cppflags" ; then
9736
9737         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9738         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9739
9740 fi
9741
9742 if test -n "$cf_new_extra_cppflags" ; then
9743
9744         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9745         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9746
9747 fi
9748
9749 fi
9750
9751 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9752
9753 cf_save_CFLAGS="$CFLAGS"
9754 cf_save_CPPFLAGS="$CPPFLAGS"
9755
9756 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9757         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9758                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9759
9760 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9761         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9762                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9763
9764 echo "$as_me:9764: checking if we should define _POSIX_C_SOURCE" >&5
9765 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9766 if test "${cf_cv_posix_c_source+set}" = set; then
9767   echo $ECHO_N "(cached) $ECHO_C" >&6
9768 else
9769
9770 echo "${as_me:-configure}:9770: testing if the symbol is already defined go no further ..." 1>&5
9771
9772         cat >conftest.$ac_ext <<_ACEOF
9773 #line 9773 "configure"
9774 #include "confdefs.h"
9775 #include <sys/types.h>
9776 int
9777 main (void)
9778 {
9779
9780 #ifndef _POSIX_C_SOURCE
9781 make an error
9782 #endif
9783   ;
9784   return 0;
9785 }
9786 _ACEOF
9787 rm -f conftest.$ac_objext
9788 if { (eval echo "$as_me:9788: \"$ac_compile\"") >&5
9789   (eval $ac_compile) 2>&5
9790   ac_status=$?
9791   echo "$as_me:9791: \$? = $ac_status" >&5
9792   (exit $ac_status); } &&
9793          { ac_try='test -s conftest.$ac_objext'
9794   { (eval echo "$as_me:9794: \"$ac_try\"") >&5
9795   (eval $ac_try) 2>&5
9796   ac_status=$?
9797   echo "$as_me:9797: \$? = $ac_status" >&5
9798   (exit $ac_status); }; }; then
9799   cf_cv_posix_c_source=no
9800 else
9801   echo "$as_me: failed program was:" >&5
9802 cat conftest.$ac_ext >&5
9803 cf_want_posix_source=no
9804          case .$cf_POSIX_C_SOURCE in
9805          (.[12]??*)
9806                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9807                 ;;
9808          (.2)
9809                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9810                 cf_want_posix_source=yes
9811                 ;;
9812          (.*)
9813                 cf_want_posix_source=yes
9814                 ;;
9815          esac
9816          if test "$cf_want_posix_source" = yes ; then
9817                 cat >conftest.$ac_ext <<_ACEOF
9818 #line 9818 "configure"
9819 #include "confdefs.h"
9820 #include <sys/types.h>
9821 int
9822 main (void)
9823 {
9824
9825 #ifdef _POSIX_SOURCE
9826 make an error
9827 #endif
9828   ;
9829   return 0;
9830 }
9831 _ACEOF
9832 rm -f conftest.$ac_objext
9833 if { (eval echo "$as_me:9833: \"$ac_compile\"") >&5
9834   (eval $ac_compile) 2>&5
9835   ac_status=$?
9836   echo "$as_me:9836: \$? = $ac_status" >&5
9837   (exit $ac_status); } &&
9838          { ac_try='test -s conftest.$ac_objext'
9839   { (eval echo "$as_me:9839: \"$ac_try\"") >&5
9840   (eval $ac_try) 2>&5
9841   ac_status=$?
9842   echo "$as_me:9842: \$? = $ac_status" >&5
9843   (exit $ac_status); }; }; then
9844   :
9845 else
9846   echo "$as_me: failed program was:" >&5
9847 cat conftest.$ac_ext >&5
9848 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9849 fi
9850 rm -f conftest.$ac_objext conftest.$ac_ext
9851          fi
9852
9853 echo "${as_me:-configure}:9853: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9854
9855          CFLAGS="$cf_trim_CFLAGS"
9856          CPPFLAGS="$cf_trim_CPPFLAGS"
9857
9858         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9859         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9860
9861 echo "${as_me:-configure}:9861: testing if the second compile does not leave our definition intact error ..." 1>&5
9862
9863          cat >conftest.$ac_ext <<_ACEOF
9864 #line 9864 "configure"
9865 #include "confdefs.h"
9866 #include <sys/types.h>
9867 int
9868 main (void)
9869 {
9870
9871 #ifndef _POSIX_C_SOURCE
9872 make an error
9873 #endif
9874   ;
9875   return 0;
9876 }
9877 _ACEOF
9878 rm -f conftest.$ac_objext
9879 if { (eval echo "$as_me:9879: \"$ac_compile\"") >&5
9880   (eval $ac_compile) 2>&5
9881   ac_status=$?
9882   echo "$as_me:9882: \$? = $ac_status" >&5
9883   (exit $ac_status); } &&
9884          { ac_try='test -s conftest.$ac_objext'
9885   { (eval echo "$as_me:9885: \"$ac_try\"") >&5
9886   (eval $ac_try) 2>&5
9887   ac_status=$?
9888   echo "$as_me:9888: \$? = $ac_status" >&5
9889   (exit $ac_status); }; }; then
9890   :
9891 else
9892   echo "$as_me: failed program was:" >&5
9893 cat conftest.$ac_ext >&5
9894 cf_cv_posix_c_source=no
9895 fi
9896 rm -f conftest.$ac_objext conftest.$ac_ext
9897          CFLAGS="$cf_save_CFLAGS"
9898          CPPFLAGS="$cf_save_CPPFLAGS"
9899
9900 fi
9901 rm -f conftest.$ac_objext conftest.$ac_ext
9902
9903 fi
9904 echo "$as_me:9904: result: $cf_cv_posix_c_source" >&5
9905 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9906
9907 if test "$cf_cv_posix_c_source" != no ; then
9908         CFLAGS="$cf_trim_CFLAGS"
9909         CPPFLAGS="$cf_trim_CPPFLAGS"
9910
9911 cf_fix_cppflags=no
9912 cf_new_cflags=
9913 cf_new_cppflags=
9914 cf_new_extra_cppflags=
9915
9916 for cf_add_cflags in $cf_cv_posix_c_source
9917 do
9918 case $cf_fix_cppflags in
9919 (no)
9920         case $cf_add_cflags in
9921         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9922                 case $cf_add_cflags in
9923                 (-D*)
9924                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9925
9926                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9927                                 && test -z "${cf_tst_cflags}" \
9928                                 && cf_fix_cppflags=yes
9929
9930                         if test $cf_fix_cppflags = yes ; then
9931
9932         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9933         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9934
9935                                 continue
9936                         elif test "${cf_tst_cflags}" = "\"'" ; then
9937
9938         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9939         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9940
9941                                 continue
9942                         fi
9943                         ;;
9944                 esac
9945                 case "$CPPFLAGS" in
9946                 (*$cf_add_cflags)
9947                         ;;
9948                 (*)
9949                         case $cf_add_cflags in
9950                         (-D*)
9951                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9952
9953 CPPFLAGS=`echo "$CPPFLAGS" | \
9954         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9955                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9956
9957                                 ;;
9958                         esac
9959
9960         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9961         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9962
9963                         ;;
9964                 esac
9965                 ;;
9966         (*)
9967
9968         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9969         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9970
9971                 ;;
9972         esac
9973         ;;
9974 (yes)
9975
9976         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9977         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9978
9979         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9980
9981         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9982                 && test -z "${cf_tst_cflags}" \
9983                 && cf_fix_cppflags=no
9984         ;;
9985 esac
9986 done
9987
9988 if test -n "$cf_new_cflags" ; then
9989
9990         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9991         CFLAGS="${CFLAGS}$cf_new_cflags"
9992
9993 fi
9994
9995 if test -n "$cf_new_cppflags" ; then
9996
9997         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9998         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9999
10000 fi
10001
10002 if test -n "$cf_new_extra_cppflags" ; then
10003
10004         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10005         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10006
10007 fi
10008
10009 fi
10010
10011         ;;
10012 esac
10013
10014 if test -n "$cf_xopen_source" ; then
10015
10016 cf_fix_cppflags=no
10017 cf_new_cflags=
10018 cf_new_cppflags=
10019 cf_new_extra_cppflags=
10020
10021 for cf_add_cflags in $cf_xopen_source
10022 do
10023 case $cf_fix_cppflags in
10024 (no)
10025         case $cf_add_cflags in
10026         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10027                 case $cf_add_cflags in
10028                 (-D*)
10029                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10030
10031                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10032                                 && test -z "${cf_tst_cflags}" \
10033                                 && cf_fix_cppflags=yes
10034
10035                         if test $cf_fix_cppflags = yes ; then
10036
10037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10039
10040                                 continue
10041                         elif test "${cf_tst_cflags}" = "\"'" ; then
10042
10043         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10044         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10045
10046                                 continue
10047                         fi
10048                         ;;
10049                 esac
10050                 case "$CPPFLAGS" in
10051                 (*$cf_add_cflags)
10052                         ;;
10053                 (*)
10054                         case $cf_add_cflags in
10055                         (-D*)
10056                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10057
10058 CPPFLAGS=`echo "$CPPFLAGS" | \
10059         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10060                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10061
10062                                 ;;
10063                         esac
10064
10065         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10066         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10067
10068                         ;;
10069                 esac
10070                 ;;
10071         (*)
10072
10073         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10074         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10075
10076                 ;;
10077         esac
10078         ;;
10079 (yes)
10080
10081         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10082         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10083
10084         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10085
10086         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10087                 && test -z "${cf_tst_cflags}" \
10088                 && cf_fix_cppflags=no
10089         ;;
10090 esac
10091 done
10092
10093 if test -n "$cf_new_cflags" ; then
10094         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10095
10096 echo "${as_me:-configure}:10096: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10097
10098         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10099         CFLAGS="${CFLAGS}$cf_new_cflags"
10100
10101 fi
10102
10103 if test -n "$cf_new_cppflags" ; then
10104         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10105
10106 echo "${as_me:-configure}:10106: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10107
10108         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10109         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10110
10111 fi
10112
10113 if test -n "$cf_new_extra_cppflags" ; then
10114         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10115
10116 echo "${as_me:-configure}:10116: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10117
10118         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10119         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10120
10121 fi
10122
10123 fi
10124
10125 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10126         echo "$as_me:10126: checking if _XOPEN_SOURCE really is set" >&5
10127 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10128         cat >conftest.$ac_ext <<_ACEOF
10129 #line 10129 "configure"
10130 #include "confdefs.h"
10131 #include <stdlib.h>
10132 int
10133 main (void)
10134 {
10135
10136 #ifndef _XOPEN_SOURCE
10137 make an error
10138 #endif
10139   ;
10140   return 0;
10141 }
10142 _ACEOF
10143 rm -f conftest.$ac_objext
10144 if { (eval echo "$as_me:10144: \"$ac_compile\"") >&5
10145   (eval $ac_compile) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); } &&
10149          { ac_try='test -s conftest.$ac_objext'
10150   { (eval echo "$as_me:10150: \"$ac_try\"") >&5
10151   (eval $ac_try) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); }; }; then
10155   cf_XOPEN_SOURCE_set=yes
10156 else
10157   echo "$as_me: failed program was:" >&5
10158 cat conftest.$ac_ext >&5
10159 cf_XOPEN_SOURCE_set=no
10160 fi
10161 rm -f conftest.$ac_objext conftest.$ac_ext
10162         echo "$as_me:10162: result: $cf_XOPEN_SOURCE_set" >&5
10163 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10164         if test $cf_XOPEN_SOURCE_set = yes
10165         then
10166                 cat >conftest.$ac_ext <<_ACEOF
10167 #line 10167 "configure"
10168 #include "confdefs.h"
10169 #include <stdlib.h>
10170 int
10171 main (void)
10172 {
10173
10174 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10175 make an error
10176 #endif
10177   ;
10178   return 0;
10179 }
10180 _ACEOF
10181 rm -f conftest.$ac_objext
10182 if { (eval echo "$as_me:10182: \"$ac_compile\"") >&5
10183   (eval $ac_compile) 2>&5
10184   ac_status=$?
10185   echo "$as_me:10185: \$? = $ac_status" >&5
10186   (exit $ac_status); } &&
10187          { ac_try='test -s conftest.$ac_objext'
10188   { (eval echo "$as_me:10188: \"$ac_try\"") >&5
10189   (eval $ac_try) 2>&5
10190   ac_status=$?
10191   echo "$as_me:10191: \$? = $ac_status" >&5
10192   (exit $ac_status); }; }; then
10193   cf_XOPEN_SOURCE_set_ok=yes
10194 else
10195   echo "$as_me: failed program was:" >&5
10196 cat conftest.$ac_ext >&5
10197 cf_XOPEN_SOURCE_set_ok=no
10198 fi
10199 rm -f conftest.$ac_objext conftest.$ac_ext
10200                 if test $cf_XOPEN_SOURCE_set_ok = no
10201                 then
10202                         { echo "$as_me:10202: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10203 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10204                 fi
10205         else
10206
10207 echo "$as_me:10207: checking if we should define _XOPEN_SOURCE" >&5
10208 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10209 if test "${cf_cv_xopen_source+set}" = set; then
10210   echo $ECHO_N "(cached) $ECHO_C" >&6
10211 else
10212
10213         cat >conftest.$ac_ext <<_ACEOF
10214 #line 10214 "configure"
10215 #include "confdefs.h"
10216
10217 #include <stdlib.h>
10218 #include <string.h>
10219 #include <sys/types.h>
10220
10221 int
10222 main (void)
10223 {
10224
10225 #ifndef _XOPEN_SOURCE
10226 make an error
10227 #endif
10228   ;
10229   return 0;
10230 }
10231 _ACEOF
10232 rm -f conftest.$ac_objext
10233 if { (eval echo "$as_me:10233: \"$ac_compile\"") >&5
10234   (eval $ac_compile) 2>&5
10235   ac_status=$?
10236   echo "$as_me:10236: \$? = $ac_status" >&5
10237   (exit $ac_status); } &&
10238          { ac_try='test -s conftest.$ac_objext'
10239   { (eval echo "$as_me:10239: \"$ac_try\"") >&5
10240   (eval $ac_try) 2>&5
10241   ac_status=$?
10242   echo "$as_me:10242: \$? = $ac_status" >&5
10243   (exit $ac_status); }; }; then
10244   cf_cv_xopen_source=no
10245 else
10246   echo "$as_me: failed program was:" >&5
10247 cat conftest.$ac_ext >&5
10248 cf_save="$CPPFLAGS"
10249
10250         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10251         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10252
10253          cat >conftest.$ac_ext <<_ACEOF
10254 #line 10254 "configure"
10255 #include "confdefs.h"
10256
10257 #include <stdlib.h>
10258 #include <string.h>
10259 #include <sys/types.h>
10260
10261 int
10262 main (void)
10263 {
10264
10265 #ifdef _XOPEN_SOURCE
10266 make an error
10267 #endif
10268   ;
10269   return 0;
10270 }
10271 _ACEOF
10272 rm -f conftest.$ac_objext
10273 if { (eval echo "$as_me:10273: \"$ac_compile\"") >&5
10274   (eval $ac_compile) 2>&5
10275   ac_status=$?
10276   echo "$as_me:10276: \$? = $ac_status" >&5
10277   (exit $ac_status); } &&
10278          { ac_try='test -s conftest.$ac_objext'
10279   { (eval echo "$as_me:10279: \"$ac_try\"") >&5
10280   (eval $ac_try) 2>&5
10281   ac_status=$?
10282   echo "$as_me:10282: \$? = $ac_status" >&5
10283   (exit $ac_status); }; }; then
10284   cf_cv_xopen_source=no
10285 else
10286   echo "$as_me: failed program was:" >&5
10287 cat conftest.$ac_ext >&5
10288 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10289 fi
10290 rm -f conftest.$ac_objext conftest.$ac_ext
10291         CPPFLAGS="$cf_save"
10292
10293 fi
10294 rm -f conftest.$ac_objext conftest.$ac_ext
10295
10296 fi
10297 echo "$as_me:10297: result: $cf_cv_xopen_source" >&5
10298 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10299
10300 if test "$cf_cv_xopen_source" != no ; then
10301
10302 CFLAGS=`echo "$CFLAGS" | \
10303         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10304                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10305
10306 CPPFLAGS=`echo "$CPPFLAGS" | \
10307         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10308                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10309
10310         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10311
10312 cf_fix_cppflags=no
10313 cf_new_cflags=
10314 cf_new_cppflags=
10315 cf_new_extra_cppflags=
10316
10317 for cf_add_cflags in $cf_temp_xopen_source
10318 do
10319 case $cf_fix_cppflags in
10320 (no)
10321         case $cf_add_cflags in
10322         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10323                 case $cf_add_cflags in
10324                 (-D*)
10325                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10326
10327                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10328                                 && test -z "${cf_tst_cflags}" \
10329                                 && cf_fix_cppflags=yes
10330
10331                         if test $cf_fix_cppflags = yes ; then
10332
10333         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10334         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10335
10336                                 continue
10337                         elif test "${cf_tst_cflags}" = "\"'" ; then
10338
10339         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10340         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10341
10342                                 continue
10343                         fi
10344                         ;;
10345                 esac
10346                 case "$CPPFLAGS" in
10347                 (*$cf_add_cflags)
10348                         ;;
10349                 (*)
10350                         case $cf_add_cflags in
10351                         (-D*)
10352                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10353
10354 CPPFLAGS=`echo "$CPPFLAGS" | \
10355         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10356                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10357
10358                                 ;;
10359                         esac
10360
10361         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10362         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10363
10364                         ;;
10365                 esac
10366                 ;;
10367         (*)
10368
10369         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10370         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10371
10372                 ;;
10373         esac
10374         ;;
10375 (yes)
10376
10377         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10378         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10379
10380         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10381
10382         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10383                 && test -z "${cf_tst_cflags}" \
10384                 && cf_fix_cppflags=no
10385         ;;
10386 esac
10387 done
10388
10389 if test -n "$cf_new_cflags" ; then
10390
10391         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10392         CFLAGS="${CFLAGS}$cf_new_cflags"
10393
10394 fi
10395
10396 if test -n "$cf_new_cppflags" ; then
10397
10398         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10399         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10400
10401 fi
10402
10403 if test -n "$cf_new_extra_cppflags" ; then
10404
10405         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10406         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10407
10408 fi
10409
10410 fi
10411
10412         fi
10413 fi
10414
10415 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10416
10417 # Work around breakage on OS X
10418
10419 echo "$as_me:10419: checking if SIGWINCH is defined" >&5
10420 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10421 if test "${cf_cv_define_sigwinch+set}" = set; then
10422   echo $ECHO_N "(cached) $ECHO_C" >&6
10423 else
10424
10425         cat >conftest.$ac_ext <<_ACEOF
10426 #line 10426 "configure"
10427 #include "confdefs.h"
10428
10429 #include <sys/types.h>
10430 #include <sys/signal.h>
10431
10432 int
10433 main (void)
10434 {
10435 int x = SIGWINCH
10436   ;
10437   return 0;
10438 }
10439 _ACEOF
10440 rm -f conftest.$ac_objext
10441 if { (eval echo "$as_me:10441: \"$ac_compile\"") >&5
10442   (eval $ac_compile) 2>&5
10443   ac_status=$?
10444   echo "$as_me:10444: \$? = $ac_status" >&5
10445   (exit $ac_status); } &&
10446          { ac_try='test -s conftest.$ac_objext'
10447   { (eval echo "$as_me:10447: \"$ac_try\"") >&5
10448   (eval $ac_try) 2>&5
10449   ac_status=$?
10450   echo "$as_me:10450: \$? = $ac_status" >&5
10451   (exit $ac_status); }; }; then
10452   cf_cv_define_sigwinch=yes
10453 else
10454   echo "$as_me: failed program was:" >&5
10455 cat conftest.$ac_ext >&5
10456 cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459
10460 #undef _XOPEN_SOURCE
10461 #undef _POSIX_SOURCE
10462 #undef _POSIX_C_SOURCE
10463 #include <sys/types.h>
10464 #include <sys/signal.h>
10465
10466 int
10467 main (void)
10468 {
10469 int x = SIGWINCH
10470   ;
10471   return 0;
10472 }
10473 _ACEOF
10474 rm -f conftest.$ac_objext
10475 if { (eval echo "$as_me:10475: \"$ac_compile\"") >&5
10476   (eval $ac_compile) 2>&5
10477   ac_status=$?
10478   echo "$as_me:10478: \$? = $ac_status" >&5
10479   (exit $ac_status); } &&
10480          { ac_try='test -s conftest.$ac_objext'
10481   { (eval echo "$as_me:10481: \"$ac_try\"") >&5
10482   (eval $ac_try) 2>&5
10483   ac_status=$?
10484   echo "$as_me:10484: \$? = $ac_status" >&5
10485   (exit $ac_status); }; }; then
10486   cf_cv_define_sigwinch=maybe
10487 else
10488   echo "$as_me: failed program was:" >&5
10489 cat conftest.$ac_ext >&5
10490 cf_cv_define_sigwinch=no
10491 fi
10492 rm -f conftest.$ac_objext conftest.$ac_ext
10493
10494 fi
10495 rm -f conftest.$ac_objext conftest.$ac_ext
10496
10497 fi
10498 echo "$as_me:10498: result: $cf_cv_define_sigwinch" >&5
10499 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10500
10501 if test "$cf_cv_define_sigwinch" = maybe ; then
10502 echo "$as_me:10502: checking for actual SIGWINCH definition" >&5
10503 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10504 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10505   echo $ECHO_N "(cached) $ECHO_C" >&6
10506 else
10507
10508 cf_cv_fixup_sigwinch=unknown
10509 cf_sigwinch=32
10510 while test $cf_sigwinch != 1
10511 do
10512         cat >conftest.$ac_ext <<_ACEOF
10513 #line 10513 "configure"
10514 #include "confdefs.h"
10515
10516 #undef _XOPEN_SOURCE
10517 #undef _POSIX_SOURCE
10518 #undef _POSIX_C_SOURCE
10519 #include <sys/types.h>
10520 #include <sys/signal.h>
10521
10522 int
10523 main (void)
10524 {
10525
10526 #if SIGWINCH != $cf_sigwinch
10527 make an error
10528 #endif
10529 int x = SIGWINCH
10530   ;
10531   return 0;
10532 }
10533 _ACEOF
10534 rm -f conftest.$ac_objext
10535 if { (eval echo "$as_me:10535: \"$ac_compile\"") >&5
10536   (eval $ac_compile) 2>&5
10537   ac_status=$?
10538   echo "$as_me:10538: \$? = $ac_status" >&5
10539   (exit $ac_status); } &&
10540          { ac_try='test -s conftest.$ac_objext'
10541   { (eval echo "$as_me:10541: \"$ac_try\"") >&5
10542   (eval $ac_try) 2>&5
10543   ac_status=$?
10544   echo "$as_me:10544: \$? = $ac_status" >&5
10545   (exit $ac_status); }; }; then
10546   cf_cv_fixup_sigwinch=$cf_sigwinch
10547          break
10548 else
10549   echo "$as_me: failed program was:" >&5
10550 cat conftest.$ac_ext >&5
10551 fi
10552 rm -f conftest.$ac_objext conftest.$ac_ext
10553
10554 cf_sigwinch=`expr $cf_sigwinch - 1`
10555 done
10556
10557 fi
10558 echo "$as_me:10558: result: $cf_cv_fixup_sigwinch" >&5
10559 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10560
10561         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10562                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10563         fi
10564 fi
10565
10566 # Checks for CODESET support.
10567
10568 echo "$as_me:10568: checking for nl_langinfo and CODESET" >&5
10569 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10570 if test "${am_cv_langinfo_codeset+set}" = set; then
10571   echo $ECHO_N "(cached) $ECHO_C" >&6
10572 else
10573   cat >conftest.$ac_ext <<_ACEOF
10574 #line 10574 "configure"
10575 #include "confdefs.h"
10576 #include <langinfo.h>
10577 int
10578 main (void)
10579 {
10580 char* cs = nl_langinfo(CODESET);
10581   ;
10582   return 0;
10583 }
10584 _ACEOF
10585 rm -f conftest.$ac_objext conftest$ac_exeext
10586 if { (eval echo "$as_me:10586: \"$ac_link\"") >&5
10587   (eval $ac_link) 2>&5
10588   ac_status=$?
10589   echo "$as_me:10589: \$? = $ac_status" >&5
10590   (exit $ac_status); } &&
10591          { ac_try='test -s conftest$ac_exeext'
10592   { (eval echo "$as_me:10592: \"$ac_try\"") >&5
10593   (eval $ac_try) 2>&5
10594   ac_status=$?
10595   echo "$as_me:10595: \$? = $ac_status" >&5
10596   (exit $ac_status); }; }; then
10597   am_cv_langinfo_codeset=yes
10598 else
10599   echo "$as_me: failed program was:" >&5
10600 cat conftest.$ac_ext >&5
10601 am_cv_langinfo_codeset=no
10602 fi
10603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10604
10605 fi
10606 echo "$as_me:10606: result: $am_cv_langinfo_codeset" >&5
10607 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10608         if test $am_cv_langinfo_codeset = yes; then
10609
10610 cat >>confdefs.h <<\EOF
10611 #define HAVE_LANGINFO_CODESET 1
10612 EOF
10613
10614         fi
10615
10616 # use these variables to work around a defect in gcc's fixincludes.
10617 NCURSES_OK_WCHAR_T=
10618 NCURSES_OK_WINT_T=
10619
10620 echo "$as_me:10620: checking if you want wide-character code" >&5
10621 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10622
10623 # Check whether --enable-widec or --disable-widec was given.
10624 if test "${enable_widec+set}" = set; then
10625   enableval="$enable_widec"
10626   with_widec=$enableval
10627 else
10628   with_widec=no
10629 fi;
10630 echo "$as_me:10630: result: $with_widec" >&5
10631 echo "${ECHO_T}$with_widec" >&6
10632
10633 NCURSES_WCWIDTH_GRAPHICS=1
10634
10635 if test "x$with_widec" = xyes ; then
10636         if test "x$disable_lib_suffixes" = xno ; then
10637                 LIB_SUFFIX="w${LIB_SUFFIX}"
10638         fi
10639
10640 cat >>confdefs.h <<\EOF
10641 #define USE_WIDEC_SUPPORT 1
10642 EOF
10643
10644 cat >>confdefs.h <<\EOF
10645 #define NCURSES_WIDECHAR 1
10646 EOF
10647
10648 for ac_header in \
10649 wchar.h \
10650 wctype.h \
10651
10652 do
10653 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10654 echo "$as_me:10654: checking for $ac_header" >&5
10655 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10656 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10657   echo $ECHO_N "(cached) $ECHO_C" >&6
10658 else
10659   cat >conftest.$ac_ext <<_ACEOF
10660 #line 10660 "configure"
10661 #include "confdefs.h"
10662 #include <$ac_header>
10663 _ACEOF
10664 if { (eval echo "$as_me:10664: \"$ac_cpp conftest.$ac_ext\"") >&5
10665   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10666   ac_status=$?
10667   egrep -v '^ *\+' conftest.er1 >conftest.err
10668   rm -f conftest.er1
10669   cat conftest.err >&5
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit $ac_status); } >/dev/null; then
10672   if test -s conftest.err; then
10673     ac_cpp_err=$ac_c_preproc_warn_flag
10674   else
10675     ac_cpp_err=
10676   fi
10677 else
10678   ac_cpp_err=yes
10679 fi
10680 if test -z "$ac_cpp_err"; then
10681   eval "$as_ac_Header=yes"
10682 else
10683   echo "$as_me: failed program was:" >&5
10684   cat conftest.$ac_ext >&5
10685   eval "$as_ac_Header=no"
10686 fi
10687 rm -f conftest.err conftest.$ac_ext
10688 fi
10689 echo "$as_me:10689: result: `eval echo '${'$as_ac_Header'}'`" >&5
10690 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10691 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10692   cat >>confdefs.h <<EOF
10693 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10694 EOF
10695
10696 fi
10697 done
10698
10699 echo "$as_me:10699: checking if wchar.h can be used as is" >&5
10700 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10701 if test "${cf_cv_wchar_h_okay+set}" = set; then
10702   echo $ECHO_N "(cached) $ECHO_C" >&6
10703 else
10704
10705 cat >conftest.$ac_ext <<_ACEOF
10706 #line 10706 "configure"
10707 #include "confdefs.h"
10708
10709 #include <stdlib.h>
10710 #ifdef HAVE_WCHAR_H
10711 #include <wchar.h>
10712 #endif
10713 #ifdef HAVE_WCTYPE_H
10714 #include <wctype.h>
10715 #endif
10716
10717 int
10718 main (void)
10719 {
10720
10721         wint_t foo = 0;
10722         int bar = iswpunct(foo)
10723   ;
10724   return 0;
10725 }
10726 _ACEOF
10727 rm -f conftest.$ac_objext
10728 if { (eval echo "$as_me:10728: \"$ac_compile\"") >&5
10729   (eval $ac_compile) 2>&5
10730   ac_status=$?
10731   echo "$as_me:10731: \$? = $ac_status" >&5
10732   (exit $ac_status); } &&
10733          { ac_try='test -s conftest.$ac_objext'
10734   { (eval echo "$as_me:10734: \"$ac_try\"") >&5
10735   (eval $ac_try) 2>&5
10736   ac_status=$?
10737   echo "$as_me:10737: \$? = $ac_status" >&5
10738   (exit $ac_status); }; }; then
10739   cf_cv_wchar_h_okay=yes
10740 else
10741   echo "$as_me: failed program was:" >&5
10742 cat conftest.$ac_ext >&5
10743 cf_cv_wchar_h_okay=no
10744 fi
10745 rm -f conftest.$ac_objext conftest.$ac_ext
10746 fi
10747 echo "$as_me:10747: result: $cf_cv_wchar_h_okay" >&5
10748 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10749
10750 if test $cf_cv_wchar_h_okay = no
10751 then
10752
10753 echo "$as_me:10753: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10754 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10755 cat >conftest.$ac_ext <<_ACEOF
10756 #line 10756 "configure"
10757 #include "confdefs.h"
10758 #include <sys/types.h>
10759
10760 int
10761 main (void)
10762 {
10763
10764 #ifndef _XOPEN_SOURCE_EXTENDED
10765 make an error
10766 #endif
10767   ;
10768   return 0;
10769 }
10770 _ACEOF
10771 rm -f conftest.$ac_objext
10772 if { (eval echo "$as_me:10772: \"$ac_compile\"") >&5
10773   (eval $ac_compile) 2>&5
10774   ac_status=$?
10775   echo "$as_me:10775: \$? = $ac_status" >&5
10776   (exit $ac_status); } &&
10777          { ac_try='test -s conftest.$ac_objext'
10778   { (eval echo "$as_me:10778: \"$ac_try\"") >&5
10779   (eval $ac_try) 2>&5
10780   ac_status=$?
10781   echo "$as_me:10781: \$? = $ac_status" >&5
10782   (exit $ac_status); }; }; then
10783   cf_result=no
10784 else
10785   echo "$as_me: failed program was:" >&5
10786 cat conftest.$ac_ext >&5
10787 cf_result=yes
10788 fi
10789 rm -f conftest.$ac_objext conftest.$ac_ext
10790 echo "$as_me:10790: result: $cf_result" >&5
10791 echo "${ECHO_T}$cf_result" >&6
10792
10793 if test "$cf_result" = yes ; then
10794         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10795 elif test "x" != "x" ; then
10796         echo "$as_me:10796: checking checking for compatible value versus " >&5
10797 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10798         cat >conftest.$ac_ext <<_ACEOF
10799 #line 10799 "configure"
10800 #include "confdefs.h"
10801 #include <sys/types.h>
10802
10803 int
10804 main (void)
10805 {
10806
10807 #if _XOPEN_SOURCE_EXTENDED- < 0
10808 make an error
10809 #endif
10810   ;
10811   return 0;
10812 }
10813 _ACEOF
10814 rm -f conftest.$ac_objext
10815 if { (eval echo "$as_me:10815: \"$ac_compile\"") >&5
10816   (eval $ac_compile) 2>&5
10817   ac_status=$?
10818   echo "$as_me:10818: \$? = $ac_status" >&5
10819   (exit $ac_status); } &&
10820          { ac_try='test -s conftest.$ac_objext'
10821   { (eval echo "$as_me:10821: \"$ac_try\"") >&5
10822   (eval $ac_try) 2>&5
10823   ac_status=$?
10824   echo "$as_me:10824: \$? = $ac_status" >&5
10825   (exit $ac_status); }; }; then
10826   cf_result=yes
10827 else
10828   echo "$as_me: failed program was:" >&5
10829 cat conftest.$ac_ext >&5
10830 cf_result=no
10831 fi
10832 rm -f conftest.$ac_objext conftest.$ac_ext
10833         echo "$as_me:10833: result: $cf_result" >&5
10834 echo "${ECHO_T}$cf_result" >&6
10835         if test "$cf_result" = no ; then
10836                 # perhaps we can override it - try...
10837                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10838         fi
10839 fi
10840
10841 fi
10842
10843 echo "$as_me:10843: checking if wcwidth agrees graphics are single-width" >&5
10844 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10845 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10846   echo $ECHO_N "(cached) $ECHO_C" >&6
10847 else
10848
10849 cat >conftest.in <<CF_EOF
10850 -       VT100 symbols
10851 0x250c  upper left corner
10852 0x2514  lower left corner
10853 0x2510  upper right corner
10854 0x2518  lower right corner
10855 0x251c  tee pointing left
10856 0x2524  tee pointing right
10857 0x2534  tee pointing up
10858 0x252c  tee pointing down
10859 0x2500  horizontal line
10860 0x2502  vertical line
10861 0x253c  large plus or crossover
10862 0x23ba  scan line 1
10863 0x23bd  scan line 9
10864 0x25c6  diamond
10865 0x2592  checker board (stipple)
10866 0x00b0  degree symbol
10867 0x00b1  plus/minus
10868 0x00b7  bullet
10869 -       Teletype 5410v1 symbols
10870 0x2190  arrow pointing left
10871 0x2192  arrow pointing right
10872 0x2193  arrow pointing down
10873 0x2191  arrow pointing up
10874 0x2592  board of squares
10875 0x2603  lantern symbol
10876 0x25ae  solid square block
10877 -       these defaults were invented for ncurses
10878 0x23bb  scan line 3
10879 0x23bc  scan line 7
10880 0x2264  less-than-or-equal-to
10881 0x2265  greater-than-or-equal-to
10882 0x03c0  greek pi
10883 0x2260  not-equal
10884 0x00a3  pound-sterling symbol
10885 -       thick-line-drawing
10886 0x250f  upper left corner
10887 0x2517  lower left corner
10888 0x2513  upper right corner
10889 0x251b  lower right corner
10890 0x2523  tee pointing left
10891 0x252b  tee pointing right
10892 0x253b  tee pointing up
10893 0x2533  tee pointing down
10894 0x2501  horizontal line
10895 0x2503  vertical line
10896 0x254b  large plus or crossover
10897 -       double-line-drawing
10898 0x2554  upper left corner
10899 0x255a  lower left corner
10900 0x2557  upper right corner
10901 0x255d  lower right corner
10902 0x2563  tee pointing left
10903 0x2560  tee pointing right
10904 0x2569  tee pointing up
10905 0x2566  tee pointing down
10906 0x2550  horizontal line
10907 0x2551  vertical line
10908 0x256c  large plus or crossover
10909 CF_EOF
10910 if test "$cross_compiling" = yes; then
10911   cf_cv_wcwidth_graphics=unknown
10912 else
10913   cat >conftest.$ac_ext <<_ACEOF
10914 #line 10914 "configure"
10915 #include "confdefs.h"
10916
10917 #include <locale.h>
10918 #include <stdio.h>
10919 #include <wchar.h>
10920
10921 #define MY_LEN 80
10922
10923 int
10924 main(void)
10925 {
10926         FILE *fp;
10927         int value;
10928         char buffer[MY_LEN + 1];
10929         char notes[MY_LEN + 1];
10930         int totals = 0;
10931         int passed = 0;
10932
10933         if (setlocale(LC_ALL, "en_US.UTF8") ||
10934                 setlocale(LC_ALL, "en_US.UTF-8") ||
10935                 setlocale(LC_ALL, "en_US.utf8") ||
10936                 setlocale(LC_ALL, "en_US.utf-8")) {
10937                 if ((fp = fopen("conftest.in", "r")) != 0) {
10938                         while (fgets(buffer, MY_LEN, fp) != 0) {
10939                                 if (*buffer == '-') {
10940                                         fprintf(stderr, "\t%s", buffer);
10941                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
10942                                         ++totals;
10943                                         if (wcwidth(value) == 1)
10944                                                 ++passed;
10945                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
10946                                 } else {
10947                                         fprintf(stderr, "?\t%s", buffer);
10948                                 }
10949                         }
10950                 }
10951         }
10952         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
10953         return (totals == passed) ? 0 : 1;
10954 }
10955
10956 _ACEOF
10957 rm -f conftest$ac_exeext
10958 if { (eval echo "$as_me:10958: \"$ac_link\"") >&5
10959   (eval $ac_link) 2>&5
10960   ac_status=$?
10961   echo "$as_me:10961: \$? = $ac_status" >&5
10962   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10963   { (eval echo "$as_me:10963: \"$ac_try\"") >&5
10964   (eval $ac_try) 2>&5
10965   ac_status=$?
10966   echo "$as_me:10966: \$? = $ac_status" >&5
10967   (exit $ac_status); }; }; then
10968   cf_cv_wcwidth_graphics=yes
10969 else
10970   echo "$as_me: program exited with status $ac_status" >&5
10971 echo "$as_me: failed program was:" >&5
10972 cat conftest.$ac_ext >&5
10973 cf_cv_wcwidth_graphics=no
10974 fi
10975 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10976 fi
10977
10978 fi
10979 echo "$as_me:10979: result: $cf_cv_wcwidth_graphics" >&5
10980 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
10981
10982         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
10983
10984         # with_overwrite=no
10985         NCURSES_CH_T=cchar_t
10986
10987 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
10988 do
10989 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10990 echo "$as_me:10990: checking for $ac_func" >&5
10991 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10992 if eval "test \"\${$as_ac_var+set}\" = set"; then
10993   echo $ECHO_N "(cached) $ECHO_C" >&6
10994 else
10995   cat >conftest.$ac_ext <<_ACEOF
10996 #line 10996 "configure"
10997 #include "confdefs.h"
10998 /* System header to define __stub macros and hopefully few prototypes,
10999     which can conflict with char $ac_func (); below.  */
11000 #include <assert.h>
11001 /* Override any gcc2 internal prototype to avoid an error.  */
11002 #ifdef __cplusplus
11003 extern "C"
11004 #endif
11005 /* We use char because int might match the return type of a gcc2
11006    builtin and then its argument prototype would still apply.  */
11007 char $ac_func ();
11008 char (*f) ();
11009
11010 int
11011 main (void)
11012 {
11013 /* The GNU C library defines this for functions which it implements
11014     to always fail with ENOSYS.  Some functions are actually named
11015     something starting with __ and the normal name is an alias.  */
11016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11017 choke me
11018 #else
11019 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11020 #endif
11021
11022   ;
11023   return 0;
11024 }
11025 _ACEOF
11026 rm -f conftest.$ac_objext conftest$ac_exeext
11027 if { (eval echo "$as_me:11027: \"$ac_link\"") >&5
11028   (eval $ac_link) 2>&5
11029   ac_status=$?
11030   echo "$as_me:11030: \$? = $ac_status" >&5
11031   (exit $ac_status); } &&
11032          { ac_try='test -s conftest$ac_exeext'
11033   { (eval echo "$as_me:11033: \"$ac_try\"") >&5
11034   (eval $ac_try) 2>&5
11035   ac_status=$?
11036   echo "$as_me:11036: \$? = $ac_status" >&5
11037   (exit $ac_status); }; }; then
11038   eval "$as_ac_var=yes"
11039 else
11040   echo "$as_me: failed program was:" >&5
11041 cat conftest.$ac_ext >&5
11042 eval "$as_ac_var=no"
11043 fi
11044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11045 fi
11046 echo "$as_me:11046: result: `eval echo '${'$as_ac_var'}'`" >&5
11047 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11048 if test `eval echo '${'$as_ac_var'}'` = yes; then
11049   cat >>confdefs.h <<EOF
11050 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11051 EOF
11052
11053 fi
11054 done
11055
11056         if test "x$ac_cv_func_putwc" != xyes ; then
11057
11058 echo "$as_me:11058: checking for multibyte character support" >&5
11059 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11060 if test "${cf_cv_utf8_lib+set}" = set; then
11061   echo $ECHO_N "(cached) $ECHO_C" >&6
11062 else
11063
11064         cf_save_LIBS="$LIBS"
11065         cat >conftest.$ac_ext <<_ACEOF
11066 #line 11066 "configure"
11067 #include "confdefs.h"
11068
11069 #include <stdlib.h>
11070 int
11071 main (void)
11072 {
11073 putwc(0,0);
11074   ;
11075   return 0;
11076 }
11077 _ACEOF
11078 rm -f conftest.$ac_objext conftest$ac_exeext
11079 if { (eval echo "$as_me:11079: \"$ac_link\"") >&5
11080   (eval $ac_link) 2>&5
11081   ac_status=$?
11082   echo "$as_me:11082: \$? = $ac_status" >&5
11083   (exit $ac_status); } &&
11084          { ac_try='test -s conftest$ac_exeext'
11085   { (eval echo "$as_me:11085: \"$ac_try\"") >&5
11086   (eval $ac_try) 2>&5
11087   ac_status=$?
11088   echo "$as_me:11088: \$? = $ac_status" >&5
11089   (exit $ac_status); }; }; then
11090   cf_cv_utf8_lib=yes
11091 else
11092   echo "$as_me: failed program was:" >&5
11093 cat conftest.$ac_ext >&5
11094
11095 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11096 # will be set on completion of the AC_TRY_LINK below.
11097 cf_cv_header_path_utf8=
11098 cf_cv_library_path_utf8=
11099
11100 echo "${as_me:-configure}:11100: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11101
11102 cf_save_LIBS="$LIBS"
11103
11104 cat >conftest.$ac_ext <<_ACEOF
11105 #line 11105 "configure"
11106 #include "confdefs.h"
11107
11108 #include <libutf8.h>
11109 int
11110 main (void)
11111 {
11112 putwc(0,0);
11113   ;
11114   return 0;
11115 }
11116 _ACEOF
11117 rm -f conftest.$ac_objext conftest$ac_exeext
11118 if { (eval echo "$as_me:11118: \"$ac_link\"") >&5
11119   (eval $ac_link) 2>&5
11120   ac_status=$?
11121   echo "$as_me:11121: \$? = $ac_status" >&5
11122   (exit $ac_status); } &&
11123          { ac_try='test -s conftest$ac_exeext'
11124   { (eval echo "$as_me:11124: \"$ac_try\"") >&5
11125   (eval $ac_try) 2>&5
11126   ac_status=$?
11127   echo "$as_me:11127: \$? = $ac_status" >&5
11128   (exit $ac_status); }; }; then
11129
11130         cf_cv_find_linkage_utf8=yes
11131         cf_cv_header_path_utf8=/usr/include
11132         cf_cv_library_path_utf8=/usr/lib
11133
11134 else
11135   echo "$as_me: failed program was:" >&5
11136 cat conftest.$ac_ext >&5
11137
11138 LIBS="-lutf8  $cf_save_LIBS"
11139
11140 cat >conftest.$ac_ext <<_ACEOF
11141 #line 11141 "configure"
11142 #include "confdefs.h"
11143
11144 #include <libutf8.h>
11145 int
11146 main (void)
11147 {
11148 putwc(0,0);
11149   ;
11150   return 0;
11151 }
11152 _ACEOF
11153 rm -f conftest.$ac_objext conftest$ac_exeext
11154 if { (eval echo "$as_me:11154: \"$ac_link\"") >&5
11155   (eval $ac_link) 2>&5
11156   ac_status=$?
11157   echo "$as_me:11157: \$? = $ac_status" >&5
11158   (exit $ac_status); } &&
11159          { ac_try='test -s conftest$ac_exeext'
11160   { (eval echo "$as_me:11160: \"$ac_try\"") >&5
11161   (eval $ac_try) 2>&5
11162   ac_status=$?
11163   echo "$as_me:11163: \$? = $ac_status" >&5
11164   (exit $ac_status); }; }; then
11165
11166         cf_cv_find_linkage_utf8=yes
11167         cf_cv_header_path_utf8=/usr/include
11168         cf_cv_library_path_utf8=/usr/lib
11169         cf_cv_library_file_utf8="-lutf8"
11170
11171 else
11172   echo "$as_me: failed program was:" >&5
11173 cat conftest.$ac_ext >&5
11174
11175         cf_cv_find_linkage_utf8=no
11176         LIBS="$cf_save_LIBS"
11177
11178         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11179
11180 echo "${as_me:-configure}:11180: testing find linkage for utf8 library ..." 1>&5
11181
11182 echo "${as_me:-configure}:11182: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11183
11184         cf_save_CPPFLAGS="$CPPFLAGS"
11185         cf_test_CPPFLAGS="$CPPFLAGS"
11186
11187 cf_search=
11188
11189 # collect the current set of include-directories from compiler flags
11190 cf_header_path_list=""
11191 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11192         for cf_header_path in $CPPFLAGS $CFLAGS
11193         do
11194                 case $cf_header_path in
11195                 (-I*)
11196                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11197
11198 test "x$cf_header_path" != "xNONE" && \
11199 test -d "$cf_header_path" && \
11200  {
11201         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11202         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11203         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11204         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11205         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11206         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11207 }
11208
11209                         cf_header_path_list="$cf_header_path_list $cf_search"
11210                         ;;
11211                 esac
11212         done
11213 fi
11214
11215 # add the variations for the package we are looking for
11216
11217 cf_search=
11218
11219 test "x$prefix" != "xNONE" && \
11220 test -d "$prefix" && \
11221  {
11222         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11223         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11224         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11225         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11226         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11227         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11228 }
11229
11230 for cf_subdir_prefix in \
11231         /usr \
11232         /usr/local \
11233         /usr/pkg \
11234         /opt \
11235         /opt/local \
11236         $HOME
11237 do
11238
11239 test "x$cf_subdir_prefix" != "x$prefix" && \
11240 test -d "$cf_subdir_prefix" && \
11241 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11242         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11243         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11244         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11245         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11246         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11247         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11248 }
11249
11250 done
11251
11252 test "$includedir" != NONE && \
11253 test "$includedir" != "/usr/include" && \
11254 test -d "$includedir" && {
11255         test -d $includedir &&    cf_search="$cf_search $includedir"
11256         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11257 }
11258
11259 test "$oldincludedir" != NONE && \
11260 test "$oldincludedir" != "/usr/include" && \
11261 test -d "$oldincludedir" && {
11262         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11263         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11264 }
11265
11266 cf_search="$cf_search $cf_header_path_list"
11267
11268         for cf_cv_header_path_utf8 in $cf_search
11269         do
11270                 if test -d $cf_cv_header_path_utf8 ; then
11271                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11272
11273 echo "${as_me:-configure}:11273: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11274
11275                         CPPFLAGS="$cf_save_CPPFLAGS"
11276
11277         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11278         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11279
11280                         cat >conftest.$ac_ext <<_ACEOF
11281 #line 11281 "configure"
11282 #include "confdefs.h"
11283
11284 #include <libutf8.h>
11285 int
11286 main (void)
11287 {
11288 putwc(0,0);
11289   ;
11290   return 0;
11291 }
11292 _ACEOF
11293 rm -f conftest.$ac_objext
11294 if { (eval echo "$as_me:11294: \"$ac_compile\"") >&5
11295   (eval $ac_compile) 2>&5
11296   ac_status=$?
11297   echo "$as_me:11297: \$? = $ac_status" >&5
11298   (exit $ac_status); } &&
11299          { ac_try='test -s conftest.$ac_objext'
11300   { (eval echo "$as_me:11300: \"$ac_try\"") >&5
11301   (eval $ac_try) 2>&5
11302   ac_status=$?
11303   echo "$as_me:11303: \$? = $ac_status" >&5
11304   (exit $ac_status); }; }; then
11305
11306                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11307
11308 echo "${as_me:-configure}:11308: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11309
11310                                 cf_cv_find_linkage_utf8=maybe
11311                                 cf_test_CPPFLAGS="$CPPFLAGS"
11312                                 break
11313 else
11314   echo "$as_me: failed program was:" >&5
11315 cat conftest.$ac_ext >&5
11316
11317                                 CPPFLAGS="$cf_save_CPPFLAGS"
11318
11319 fi
11320 rm -f conftest.$ac_objext conftest.$ac_ext
11321                 fi
11322         done
11323
11324         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11325
11326 echo "${as_me:-configure}:11326: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11327
11328                 cf_save_LIBS="$LIBS"
11329                 cf_save_LDFLAGS="$LDFLAGS"
11330
11331                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11332
11333 cf_search=
11334 cf_library_path_list=""
11335 if test -n "${LDFLAGS}${LIBS}" ; then
11336         for cf_library_path in $LDFLAGS $LIBS
11337         do
11338                 case $cf_library_path in
11339                 (-L*)
11340                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11341
11342 test "x$cf_library_path" != "xNONE" && \
11343 test -d "$cf_library_path" && \
11344  {
11345         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11346         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11347         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11348         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11349         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11350         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11351 }
11352
11353                         cf_library_path_list="$cf_library_path_list $cf_search"
11354                         ;;
11355                 esac
11356         done
11357 fi
11358
11359 cf_search=
11360
11361 test "x$prefix" != "xNONE" && \
11362 test -d "$prefix" && \
11363  {
11364         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11365         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11366         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11367         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11368         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11369         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11370 }
11371
11372 for cf_subdir_prefix in \
11373         /usr \
11374         /usr/local \
11375         /usr/pkg \
11376         /opt \
11377         /opt/local \
11378         $HOME
11379 do
11380
11381 test "x$cf_subdir_prefix" != "x$prefix" && \
11382 test -d "$cf_subdir_prefix" && \
11383 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11384         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11385         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11386         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11387         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11388         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11389         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11390 }
11391
11392 done
11393
11394 cf_search="$cf_library_path_list $cf_search"
11395
11396                         for cf_cv_library_path_utf8 in $cf_search
11397                         do
11398                                 if test -d $cf_cv_library_path_utf8 ; then
11399                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11400
11401 echo "${as_me:-configure}:11401: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11402
11403                                         CPPFLAGS="$cf_test_CPPFLAGS"
11404                                         LIBS="-lutf8  $cf_save_LIBS"
11405                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11406                                         cat >conftest.$ac_ext <<_ACEOF
11407 #line 11407 "configure"
11408 #include "confdefs.h"
11409
11410 #include <libutf8.h>
11411 int
11412 main (void)
11413 {
11414 putwc(0,0);
11415   ;
11416   return 0;
11417 }
11418 _ACEOF
11419 rm -f conftest.$ac_objext conftest$ac_exeext
11420 if { (eval echo "$as_me:11420: \"$ac_link\"") >&5
11421   (eval $ac_link) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit $ac_status); } &&
11425          { ac_try='test -s conftest$ac_exeext'
11426   { (eval echo "$as_me:11426: \"$ac_try\"") >&5
11427   (eval $ac_try) 2>&5
11428   ac_status=$?
11429   echo "$as_me:11429: \$? = $ac_status" >&5
11430   (exit $ac_status); }; }; then
11431
11432                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11433
11434 echo "${as_me:-configure}:11434: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11435
11436                                         cf_cv_find_linkage_utf8=yes
11437                                         cf_cv_library_file_utf8="-lutf8"
11438                                         break
11439 else
11440   echo "$as_me: failed program was:" >&5
11441 cat conftest.$ac_ext >&5
11442
11443                                         CPPFLAGS="$cf_save_CPPFLAGS"
11444                                         LIBS="$cf_save_LIBS"
11445                                         LDFLAGS="$cf_save_LDFLAGS"
11446
11447 fi
11448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11449                                 fi
11450                         done
11451                         CPPFLAGS="$cf_save_CPPFLAGS"
11452                         LDFLAGS="$cf_save_LDFLAGS"
11453                 fi
11454
11455         else
11456                 cf_cv_find_linkage_utf8=no
11457         fi
11458
11459 fi
11460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11461
11462 fi
11463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11464
11465 LIBS="$cf_save_LIBS"
11466
11467 if test "$cf_cv_find_linkage_utf8" = yes ; then
11468 cf_cv_utf8_lib=add-on
11469 else
11470 cf_cv_utf8_lib=no
11471 fi
11472
11473 fi
11474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11475 fi
11476 echo "$as_me:11476: result: $cf_cv_utf8_lib" >&5
11477 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11478
11479 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11480 # ncurses/ncursesw:
11481 if test "$cf_cv_utf8_lib" = "add-on" ; then
11482
11483 cat >>confdefs.h <<\EOF
11484 #define HAVE_LIBUTF8_H 1
11485 EOF
11486
11487 if test -n "$cf_cv_header_path_utf8" ; then
11488   for cf_add_incdir in $cf_cv_header_path_utf8
11489   do
11490         while test $cf_add_incdir != /usr/include
11491         do
11492           if test -d $cf_add_incdir
11493           then
11494                 cf_have_incdir=no
11495                 if test -n "$CFLAGS$CPPFLAGS" ; then
11496                   # a loop is needed to ensure we can add subdirs of existing dirs
11497                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11498                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11499                           cf_have_incdir=yes; break
11500                         fi
11501                   done
11502                 fi
11503
11504                 if test "$cf_have_incdir" = no ; then
11505                   if test "$cf_add_incdir" = /usr/local/include ; then
11506                         if test "$GCC" = yes
11507                         then
11508                           cf_save_CPPFLAGS=$CPPFLAGS
11509
11510         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11511         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11512
11513                           cat >conftest.$ac_ext <<_ACEOF
11514 #line 11514 "configure"
11515 #include "confdefs.h"
11516 #include <stdio.h>
11517 int
11518 main (void)
11519 {
11520 printf("Hello")
11521   ;
11522   return 0;
11523 }
11524 _ACEOF
11525 rm -f conftest.$ac_objext
11526 if { (eval echo "$as_me:11526: \"$ac_compile\"") >&5
11527   (eval $ac_compile) 2>&5
11528   ac_status=$?
11529   echo "$as_me:11529: \$? = $ac_status" >&5
11530   (exit $ac_status); } &&
11531          { ac_try='test -s conftest.$ac_objext'
11532   { (eval echo "$as_me:11532: \"$ac_try\"") >&5
11533   (eval $ac_try) 2>&5
11534   ac_status=$?
11535   echo "$as_me:11535: \$? = $ac_status" >&5
11536   (exit $ac_status); }; }; then
11537   :
11538 else
11539   echo "$as_me: failed program was:" >&5
11540 cat conftest.$ac_ext >&5
11541 cf_have_incdir=yes
11542 fi
11543 rm -f conftest.$ac_objext conftest.$ac_ext
11544                           CPPFLAGS=$cf_save_CPPFLAGS
11545                         fi
11546                   fi
11547                 fi
11548
11549                 if test "$cf_have_incdir" = no ; then
11550                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11551
11552 echo "${as_me:-configure}:11552: testing adding $cf_add_incdir to include-path ..." 1>&5
11553
11554                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11555
11556                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11557                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11558                   cf_add_incdir="$cf_top_incdir"
11559                 else
11560                   break
11561                 fi
11562           else
11563                 break
11564           fi
11565         done
11566   done
11567 fi
11568
11569 if test -n "$cf_cv_library_path_utf8" ; then
11570         for cf_add_libdir in $cf_cv_library_path_utf8
11571         do
11572                 if test $cf_add_libdir = /usr/lib ; then
11573                         :
11574                 elif test -d $cf_add_libdir
11575                 then
11576                         cf_have_libdir=no
11577                         if test -n "$LDFLAGS$LIBS" ; then
11578                                 # a loop is needed to ensure we can add subdirs of existing dirs
11579                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11580                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11581                                                 cf_have_libdir=yes; break
11582                                         fi
11583                                 done
11584                         fi
11585                         if test "$cf_have_libdir" = no ; then
11586                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11587
11588 echo "${as_me:-configure}:11588: testing adding $cf_add_libdir to library-path ..." 1>&5
11589
11590                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11591                         fi
11592                 fi
11593         done
11594 fi
11595
11596 cf_add_libs="$cf_cv_library_file_utf8"
11597 # Filter out duplicates - this happens with badly-designed ".pc" files...
11598 for cf_add_1lib in $LIBS
11599 do
11600         for cf_add_2lib in $cf_add_libs
11601         do
11602                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11603                 then
11604                         cf_add_1lib=
11605                         break
11606                 fi
11607         done
11608         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11609 done
11610 LIBS="$cf_add_libs"
11611
11612 fi
11613
11614                 if test "$cf_cv_utf8_lib" != no ; then
11615                         NCURSES_LIBUTF8=1
11616                 fi
11617         fi
11618
11619 # This is needed on Tru64 5.0 to declare mbstate_t
11620 echo "$as_me:11620: checking if we must include wchar.h to declare mbstate_t" >&5
11621 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11622 if test "${cf_cv_mbstate_t+set}" = set; then
11623   echo $ECHO_N "(cached) $ECHO_C" >&6
11624 else
11625
11626 cat >conftest.$ac_ext <<_ACEOF
11627 #line 11627 "configure"
11628 #include "confdefs.h"
11629
11630 #include <stdlib.h>
11631 #include <stdarg.h>
11632 #include <stdio.h>
11633 #ifdef HAVE_LIBUTF8_H
11634 #include <libutf8.h>
11635 #endif
11636 int
11637 main (void)
11638 {
11639 mbstate_t state
11640   ;
11641   return 0;
11642 }
11643 _ACEOF
11644 rm -f conftest.$ac_objext
11645 if { (eval echo "$as_me:11645: \"$ac_compile\"") >&5
11646   (eval $ac_compile) 2>&5
11647   ac_status=$?
11648   echo "$as_me:11648: \$? = $ac_status" >&5
11649   (exit $ac_status); } &&
11650          { ac_try='test -s conftest.$ac_objext'
11651   { (eval echo "$as_me:11651: \"$ac_try\"") >&5
11652   (eval $ac_try) 2>&5
11653   ac_status=$?
11654   echo "$as_me:11654: \$? = $ac_status" >&5
11655   (exit $ac_status); }; }; then
11656   cf_cv_mbstate_t=no
11657 else
11658   echo "$as_me: failed program was:" >&5
11659 cat conftest.$ac_ext >&5
11660 cat >conftest.$ac_ext <<_ACEOF
11661 #line 11661 "configure"
11662 #include "confdefs.h"
11663
11664 #include <stdlib.h>
11665 #include <stdarg.h>
11666 #include <stdio.h>
11667 #include <wchar.h>
11668 #ifdef HAVE_LIBUTF8_H
11669 #include <libutf8.h>
11670 #endif
11671 int
11672 main (void)
11673 {
11674 mbstate_t value
11675   ;
11676   return 0;
11677 }
11678 _ACEOF
11679 rm -f conftest.$ac_objext
11680 if { (eval echo "$as_me:11680: \"$ac_compile\"") >&5
11681   (eval $ac_compile) 2>&5
11682   ac_status=$?
11683   echo "$as_me:11683: \$? = $ac_status" >&5
11684   (exit $ac_status); } &&
11685          { ac_try='test -s conftest.$ac_objext'
11686   { (eval echo "$as_me:11686: \"$ac_try\"") >&5
11687   (eval $ac_try) 2>&5
11688   ac_status=$?
11689   echo "$as_me:11689: \$? = $ac_status" >&5
11690   (exit $ac_status); }; }; then
11691   cf_cv_mbstate_t=yes
11692 else
11693   echo "$as_me: failed program was:" >&5
11694 cat conftest.$ac_ext >&5
11695 cf_cv_mbstate_t=unknown
11696 fi
11697 rm -f conftest.$ac_objext conftest.$ac_ext
11698 fi
11699 rm -f conftest.$ac_objext conftest.$ac_ext
11700 fi
11701 echo "$as_me:11701: result: $cf_cv_mbstate_t" >&5
11702 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11703
11704 if test "$cf_cv_mbstate_t" = yes ; then
11705
11706 cat >>confdefs.h <<\EOF
11707 #define NEED_WCHAR_H 1
11708 EOF
11709
11710         NEED_WCHAR_H=1
11711 fi
11712
11713 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11714 if test "$cf_cv_mbstate_t" = unknown ; then
11715         NCURSES_MBSTATE_T=1
11716 fi
11717
11718 # This is needed on Tru64 5.0 to declare wchar_t
11719 echo "$as_me:11719: checking if we must include wchar.h to declare wchar_t" >&5
11720 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11721 if test "${cf_cv_wchar_t+set}" = set; then
11722   echo $ECHO_N "(cached) $ECHO_C" >&6
11723 else
11724
11725 cat >conftest.$ac_ext <<_ACEOF
11726 #line 11726 "configure"
11727 #include "confdefs.h"
11728
11729 #include <stdlib.h>
11730 #include <stdarg.h>
11731 #include <stdio.h>
11732 #ifdef HAVE_LIBUTF8_H
11733 #include <libutf8.h>
11734 #endif
11735 int
11736 main (void)
11737 {
11738 wchar_t state
11739   ;
11740   return 0;
11741 }
11742 _ACEOF
11743 rm -f conftest.$ac_objext
11744 if { (eval echo "$as_me:11744: \"$ac_compile\"") >&5
11745   (eval $ac_compile) 2>&5
11746   ac_status=$?
11747   echo "$as_me:11747: \$? = $ac_status" >&5
11748   (exit $ac_status); } &&
11749          { ac_try='test -s conftest.$ac_objext'
11750   { (eval echo "$as_me:11750: \"$ac_try\"") >&5
11751   (eval $ac_try) 2>&5
11752   ac_status=$?
11753   echo "$as_me:11753: \$? = $ac_status" >&5
11754   (exit $ac_status); }; }; then
11755   cf_cv_wchar_t=no
11756 else
11757   echo "$as_me: failed program was:" >&5
11758 cat conftest.$ac_ext >&5
11759 cat >conftest.$ac_ext <<_ACEOF
11760 #line 11760 "configure"
11761 #include "confdefs.h"
11762
11763 #include <stdlib.h>
11764 #include <stdarg.h>
11765 #include <stdio.h>
11766 #include <wchar.h>
11767 #ifdef HAVE_LIBUTF8_H
11768 #include <libutf8.h>
11769 #endif
11770 int
11771 main (void)
11772 {
11773 wchar_t value
11774   ;
11775   return 0;
11776 }
11777 _ACEOF
11778 rm -f conftest.$ac_objext
11779 if { (eval echo "$as_me:11779: \"$ac_compile\"") >&5
11780   (eval $ac_compile) 2>&5
11781   ac_status=$?
11782   echo "$as_me:11782: \$? = $ac_status" >&5
11783   (exit $ac_status); } &&
11784          { ac_try='test -s conftest.$ac_objext'
11785   { (eval echo "$as_me:11785: \"$ac_try\"") >&5
11786   (eval $ac_try) 2>&5
11787   ac_status=$?
11788   echo "$as_me:11788: \$? = $ac_status" >&5
11789   (exit $ac_status); }; }; then
11790   cf_cv_wchar_t=yes
11791 else
11792   echo "$as_me: failed program was:" >&5
11793 cat conftest.$ac_ext >&5
11794 cf_cv_wchar_t=unknown
11795 fi
11796 rm -f conftest.$ac_objext conftest.$ac_ext
11797 fi
11798 rm -f conftest.$ac_objext conftest.$ac_ext
11799 fi
11800 echo "$as_me:11800: result: $cf_cv_wchar_t" >&5
11801 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11802
11803 if test "$cf_cv_wchar_t" = yes ; then
11804
11805 cat >>confdefs.h <<\EOF
11806 #define NEED_WCHAR_H 1
11807 EOF
11808
11809         NEED_WCHAR_H=1
11810 fi
11811
11812 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11813 if test "$cf_cv_wchar_t" = unknown ; then
11814         NCURSES_WCHAR_T=1
11815 fi
11816
11817 # if we find wchar_t in either place, use substitution to provide a fallback.
11818 if test "$cf_cv_wchar_t" != unknown ; then
11819         NCURSES_OK_WCHAR_T=1
11820 fi
11821
11822 # This is needed on Tru64 5.0 to declare wint_t
11823 echo "$as_me:11823: checking if we must include wchar.h to declare wint_t" >&5
11824 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11825 if test "${cf_cv_wint_t+set}" = set; then
11826   echo $ECHO_N "(cached) $ECHO_C" >&6
11827 else
11828
11829 cat >conftest.$ac_ext <<_ACEOF
11830 #line 11830 "configure"
11831 #include "confdefs.h"
11832
11833 #include <stdlib.h>
11834 #include <stdarg.h>
11835 #include <stdio.h>
11836 #ifdef HAVE_LIBUTF8_H
11837 #include <libutf8.h>
11838 #endif
11839 int
11840 main (void)
11841 {
11842 wint_t state
11843   ;
11844   return 0;
11845 }
11846 _ACEOF
11847 rm -f conftest.$ac_objext
11848 if { (eval echo "$as_me:11848: \"$ac_compile\"") >&5
11849   (eval $ac_compile) 2>&5
11850   ac_status=$?
11851   echo "$as_me:11851: \$? = $ac_status" >&5
11852   (exit $ac_status); } &&
11853          { ac_try='test -s conftest.$ac_objext'
11854   { (eval echo "$as_me:11854: \"$ac_try\"") >&5
11855   (eval $ac_try) 2>&5
11856   ac_status=$?
11857   echo "$as_me:11857: \$? = $ac_status" >&5
11858   (exit $ac_status); }; }; then
11859   cf_cv_wint_t=no
11860 else
11861   echo "$as_me: failed program was:" >&5
11862 cat conftest.$ac_ext >&5
11863 cat >conftest.$ac_ext <<_ACEOF
11864 #line 11864 "configure"
11865 #include "confdefs.h"
11866
11867 #include <stdlib.h>
11868 #include <stdarg.h>
11869 #include <stdio.h>
11870 #include <wchar.h>
11871 #ifdef HAVE_LIBUTF8_H
11872 #include <libutf8.h>
11873 #endif
11874 int
11875 main (void)
11876 {
11877 wint_t value
11878   ;
11879   return 0;
11880 }
11881 _ACEOF
11882 rm -f conftest.$ac_objext
11883 if { (eval echo "$as_me:11883: \"$ac_compile\"") >&5
11884   (eval $ac_compile) 2>&5
11885   ac_status=$?
11886   echo "$as_me:11886: \$? = $ac_status" >&5
11887   (exit $ac_status); } &&
11888          { ac_try='test -s conftest.$ac_objext'
11889   { (eval echo "$as_me:11889: \"$ac_try\"") >&5
11890   (eval $ac_try) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit $ac_status); }; }; then
11894   cf_cv_wint_t=yes
11895 else
11896   echo "$as_me: failed program was:" >&5
11897 cat conftest.$ac_ext >&5
11898 cf_cv_wint_t=unknown
11899 fi
11900 rm -f conftest.$ac_objext conftest.$ac_ext
11901 fi
11902 rm -f conftest.$ac_objext conftest.$ac_ext
11903 fi
11904 echo "$as_me:11904: result: $cf_cv_wint_t" >&5
11905 echo "${ECHO_T}$cf_cv_wint_t" >&6
11906
11907 if test "$cf_cv_wint_t" = yes ; then
11908
11909 cat >>confdefs.h <<\EOF
11910 #define NEED_WCHAR_H 1
11911 EOF
11912
11913         NEED_WCHAR_H=1
11914 fi
11915
11916 # if we do not find wint_t in either place, use substitution to provide a fallback.
11917 if test "$cf_cv_wint_t" = unknown ; then
11918         NCURSES_WINT_T=1
11919 fi
11920
11921 # if we find wint_t in either place, use substitution to provide a fallback.
11922 if test "$cf_cv_wint_t" != unknown ; then
11923         NCURSES_OK_WINT_T=1
11924 fi
11925
11926         if test "$NCURSES_MBSTATE_T" != 0; then
11927
11928 cat >>confdefs.h <<\EOF
11929 #define NEED_MBSTATE_T_DEF 1
11930 EOF
11931
11932         fi
11933 fi
11934
11935 ###   use option --disable-lp64 to allow long chtype
11936 echo "$as_me:11936: checking whether to enable _LP64 definition in curses.h" >&5
11937 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11938
11939 # Check whether --enable-lp64 or --disable-lp64 was given.
11940 if test "${enable_lp64+set}" = set; then
11941   enableval="$enable_lp64"
11942   with_lp64=$enableval
11943 else
11944   with_lp64=$cf_dft_with_lp64
11945 fi;
11946 echo "$as_me:11946: result: $with_lp64" >&5
11947 echo "${ECHO_T}$with_lp64" >&6
11948
11949 if test "x$with_lp64" = xyes ; then
11950         cf_cv_enable_lp64=1
11951 else
11952         cf_cv_enable_lp64=0
11953 fi
11954
11955 # Check whether --enable-largefile or --disable-largefile was given.
11956 if test "${enable_largefile+set}" = set; then
11957   enableval="$enable_largefile"
11958
11959 fi;
11960 if test "$enable_largefile" != no; then
11961
11962   echo "$as_me:11962: checking for special C compiler options needed for large files" >&5
11963 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11964 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11965   echo $ECHO_N "(cached) $ECHO_C" >&6
11966 else
11967   ac_cv_sys_largefile_CC=no
11968      if test "$GCC" != yes; then
11969        ac_save_CC=$CC
11970        while :; do
11971          # IRIX 6.2 and later do not support large files by default,
11972          # so use the C compiler's -n32 option if that helps.
11973          cat >conftest.$ac_ext <<_ACEOF
11974 #line 11974 "configure"
11975 #include "confdefs.h"
11976 #include <sys/types.h>
11977  /* Check that off_t can represent 2**63 - 1 correctly.
11978     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11979     since some C++ compilers masquerading as C compilers
11980     incorrectly reject 9223372036854775807.  */
11981 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11982   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11983                        && LARGE_OFF_T % 2147483647 == 1)
11984                       ? 1 : -1];
11985 int
11986 main (void)
11987 {
11988
11989   ;
11990   return 0;
11991 }
11992 _ACEOF
11993          rm -f conftest.$ac_objext
11994 if { (eval echo "$as_me:11994: \"$ac_compile\"") >&5
11995   (eval $ac_compile) 2>&5
11996   ac_status=$?
11997   echo "$as_me:11997: \$? = $ac_status" >&5
11998   (exit $ac_status); } &&
11999          { ac_try='test -s conftest.$ac_objext'
12000   { (eval echo "$as_me:12000: \"$ac_try\"") >&5
12001   (eval $ac_try) 2>&5
12002   ac_status=$?
12003   echo "$as_me:12003: \$? = $ac_status" >&5
12004   (exit $ac_status); }; }; then
12005   break
12006 else
12007   echo "$as_me: failed program was:" >&5
12008 cat conftest.$ac_ext >&5
12009 fi
12010 rm -f conftest.$ac_objext
12011          CC="$CC -n32"
12012          rm -f conftest.$ac_objext
12013 if { (eval echo "$as_me:12013: \"$ac_compile\"") >&5
12014   (eval $ac_compile) 2>&5
12015   ac_status=$?
12016   echo "$as_me:12016: \$? = $ac_status" >&5
12017   (exit $ac_status); } &&
12018          { ac_try='test -s conftest.$ac_objext'
12019   { (eval echo "$as_me:12019: \"$ac_try\"") >&5
12020   (eval $ac_try) 2>&5
12021   ac_status=$?
12022   echo "$as_me:12022: \$? = $ac_status" >&5
12023   (exit $ac_status); }; }; then
12024   ac_cv_sys_largefile_CC=' -n32'; break
12025 else
12026   echo "$as_me: failed program was:" >&5
12027 cat conftest.$ac_ext >&5
12028 fi
12029 rm -f conftest.$ac_objext
12030          break
12031        done
12032        CC=$ac_save_CC
12033        rm -f conftest.$ac_ext
12034     fi
12035 fi
12036 echo "$as_me:12036: result: $ac_cv_sys_largefile_CC" >&5
12037 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12038   if test "$ac_cv_sys_largefile_CC" != no; then
12039     CC=$CC$ac_cv_sys_largefile_CC
12040   fi
12041
12042   echo "$as_me:12042: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12043 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12044 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12045   echo $ECHO_N "(cached) $ECHO_C" >&6
12046 else
12047   while :; do
12048   ac_cv_sys_file_offset_bits=no
12049   cat >conftest.$ac_ext <<_ACEOF
12050 #line 12050 "configure"
12051 #include "confdefs.h"
12052 #include <sys/types.h>
12053  /* Check that off_t can represent 2**63 - 1 correctly.
12054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12055     since some C++ compilers masquerading as C compilers
12056     incorrectly reject 9223372036854775807.  */
12057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12059                        && LARGE_OFF_T % 2147483647 == 1)
12060                       ? 1 : -1];
12061 int
12062 main (void)
12063 {
12064
12065   ;
12066   return 0;
12067 }
12068 _ACEOF
12069 rm -f conftest.$ac_objext
12070 if { (eval echo "$as_me:12070: \"$ac_compile\"") >&5
12071   (eval $ac_compile) 2>&5
12072   ac_status=$?
12073   echo "$as_me:12073: \$? = $ac_status" >&5
12074   (exit $ac_status); } &&
12075          { ac_try='test -s conftest.$ac_objext'
12076   { (eval echo "$as_me:12076: \"$ac_try\"") >&5
12077   (eval $ac_try) 2>&5
12078   ac_status=$?
12079   echo "$as_me:12079: \$? = $ac_status" >&5
12080   (exit $ac_status); }; }; then
12081   break
12082 else
12083   echo "$as_me: failed program was:" >&5
12084 cat conftest.$ac_ext >&5
12085 fi
12086 rm -f conftest.$ac_objext conftest.$ac_ext
12087   cat >conftest.$ac_ext <<_ACEOF
12088 #line 12088 "configure"
12089 #include "confdefs.h"
12090 #define _FILE_OFFSET_BITS 64
12091 #include <sys/types.h>
12092  /* Check that off_t can represent 2**63 - 1 correctly.
12093     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12094     since some C++ compilers masquerading as C compilers
12095     incorrectly reject 9223372036854775807.  */
12096 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12097   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12098                        && LARGE_OFF_T % 2147483647 == 1)
12099                       ? 1 : -1];
12100 int
12101 main (void)
12102 {
12103
12104   ;
12105   return 0;
12106 }
12107 _ACEOF
12108 rm -f conftest.$ac_objext
12109 if { (eval echo "$as_me:12109: \"$ac_compile\"") >&5
12110   (eval $ac_compile) 2>&5
12111   ac_status=$?
12112   echo "$as_me:12112: \$? = $ac_status" >&5
12113   (exit $ac_status); } &&
12114          { ac_try='test -s conftest.$ac_objext'
12115   { (eval echo "$as_me:12115: \"$ac_try\"") >&5
12116   (eval $ac_try) 2>&5
12117   ac_status=$?
12118   echo "$as_me:12118: \$? = $ac_status" >&5
12119   (exit $ac_status); }; }; then
12120   ac_cv_sys_file_offset_bits=64; break
12121 else
12122   echo "$as_me: failed program was:" >&5
12123 cat conftest.$ac_ext >&5
12124 fi
12125 rm -f conftest.$ac_objext conftest.$ac_ext
12126   break
12127 done
12128 fi
12129 echo "$as_me:12129: result: $ac_cv_sys_file_offset_bits" >&5
12130 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12131 if test "$ac_cv_sys_file_offset_bits" != no; then
12132
12133 cat >>confdefs.h <<EOF
12134 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12135 EOF
12136
12137 fi
12138 rm -rf conftest*
12139   echo "$as_me:12139: checking for _LARGE_FILES value needed for large files" >&5
12140 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12141 if test "${ac_cv_sys_large_files+set}" = set; then
12142   echo $ECHO_N "(cached) $ECHO_C" >&6
12143 else
12144   while :; do
12145   ac_cv_sys_large_files=no
12146   cat >conftest.$ac_ext <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12149 #include <sys/types.h>
12150  /* Check that off_t can represent 2**63 - 1 correctly.
12151     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12152     since some C++ compilers masquerading as C compilers
12153     incorrectly reject 9223372036854775807.  */
12154 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12155   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12156                        && LARGE_OFF_T % 2147483647 == 1)
12157                       ? 1 : -1];
12158 int
12159 main (void)
12160 {
12161
12162   ;
12163   return 0;
12164 }
12165 _ACEOF
12166 rm -f conftest.$ac_objext
12167 if { (eval echo "$as_me:12167: \"$ac_compile\"") >&5
12168   (eval $ac_compile) 2>&5
12169   ac_status=$?
12170   echo "$as_me:12170: \$? = $ac_status" >&5
12171   (exit $ac_status); } &&
12172          { ac_try='test -s conftest.$ac_objext'
12173   { (eval echo "$as_me:12173: \"$ac_try\"") >&5
12174   (eval $ac_try) 2>&5
12175   ac_status=$?
12176   echo "$as_me:12176: \$? = $ac_status" >&5
12177   (exit $ac_status); }; }; then
12178   break
12179 else
12180   echo "$as_me: failed program was:" >&5
12181 cat conftest.$ac_ext >&5
12182 fi
12183 rm -f conftest.$ac_objext conftest.$ac_ext
12184   cat >conftest.$ac_ext <<_ACEOF
12185 #line 12185 "configure"
12186 #include "confdefs.h"
12187 #define _LARGE_FILES 1
12188 #include <sys/types.h>
12189  /* Check that off_t can represent 2**63 - 1 correctly.
12190     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12191     since some C++ compilers masquerading as C compilers
12192     incorrectly reject 9223372036854775807.  */
12193 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12194   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12195                        && LARGE_OFF_T % 2147483647 == 1)
12196                       ? 1 : -1];
12197 int
12198 main (void)
12199 {
12200
12201   ;
12202   return 0;
12203 }
12204 _ACEOF
12205 rm -f conftest.$ac_objext
12206 if { (eval echo "$as_me:12206: \"$ac_compile\"") >&5
12207   (eval $ac_compile) 2>&5
12208   ac_status=$?
12209   echo "$as_me:12209: \$? = $ac_status" >&5
12210   (exit $ac_status); } &&
12211          { ac_try='test -s conftest.$ac_objext'
12212   { (eval echo "$as_me:12212: \"$ac_try\"") >&5
12213   (eval $ac_try) 2>&5
12214   ac_status=$?
12215   echo "$as_me:12215: \$? = $ac_status" >&5
12216   (exit $ac_status); }; }; then
12217   ac_cv_sys_large_files=1; break
12218 else
12219   echo "$as_me: failed program was:" >&5
12220 cat conftest.$ac_ext >&5
12221 fi
12222 rm -f conftest.$ac_objext conftest.$ac_ext
12223   break
12224 done
12225 fi
12226 echo "$as_me:12226: result: $ac_cv_sys_large_files" >&5
12227 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12228 if test "$ac_cv_sys_large_files" != no; then
12229
12230 cat >>confdefs.h <<EOF
12231 #define _LARGE_FILES $ac_cv_sys_large_files
12232 EOF
12233
12234 fi
12235 rm -rf conftest*
12236 fi
12237
12238         if test "$enable_largefile" != no ; then
12239         echo "$as_me:12239: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12240 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12241 if test "${ac_cv_sys_largefile_source+set}" = set; then
12242   echo $ECHO_N "(cached) $ECHO_C" >&6
12243 else
12244   while :; do
12245   ac_cv_sys_largefile_source=no
12246   cat >conftest.$ac_ext <<_ACEOF
12247 #line 12247 "configure"
12248 #include "confdefs.h"
12249 #include <stdio.h>
12250 int
12251 main (void)
12252 {
12253 return !fseeko;
12254   ;
12255   return 0;
12256 }
12257 _ACEOF
12258 rm -f conftest.$ac_objext
12259 if { (eval echo "$as_me:12259: \"$ac_compile\"") >&5
12260   (eval $ac_compile) 2>&5
12261   ac_status=$?
12262   echo "$as_me:12262: \$? = $ac_status" >&5
12263   (exit $ac_status); } &&
12264          { ac_try='test -s conftest.$ac_objext'
12265   { (eval echo "$as_me:12265: \"$ac_try\"") >&5
12266   (eval $ac_try) 2>&5
12267   ac_status=$?
12268   echo "$as_me:12268: \$? = $ac_status" >&5
12269   (exit $ac_status); }; }; then
12270   break
12271 else
12272   echo "$as_me: failed program was:" >&5
12273 cat conftest.$ac_ext >&5
12274 fi
12275 rm -f conftest.$ac_objext conftest.$ac_ext
12276   cat >conftest.$ac_ext <<_ACEOF
12277 #line 12277 "configure"
12278 #include "confdefs.h"
12279 #define _LARGEFILE_SOURCE 1
12280 #include <stdio.h>
12281 int
12282 main (void)
12283 {
12284 return !fseeko;
12285   ;
12286   return 0;
12287 }
12288 _ACEOF
12289 rm -f conftest.$ac_objext
12290 if { (eval echo "$as_me:12290: \"$ac_compile\"") >&5
12291   (eval $ac_compile) 2>&5
12292   ac_status=$?
12293   echo "$as_me:12293: \$? = $ac_status" >&5
12294   (exit $ac_status); } &&
12295          { ac_try='test -s conftest.$ac_objext'
12296   { (eval echo "$as_me:12296: \"$ac_try\"") >&5
12297   (eval $ac_try) 2>&5
12298   ac_status=$?
12299   echo "$as_me:12299: \$? = $ac_status" >&5
12300   (exit $ac_status); }; }; then
12301   ac_cv_sys_largefile_source=1; break
12302 else
12303   echo "$as_me: failed program was:" >&5
12304 cat conftest.$ac_ext >&5
12305 fi
12306 rm -f conftest.$ac_objext conftest.$ac_ext
12307   break
12308 done
12309 fi
12310 echo "$as_me:12310: result: $ac_cv_sys_largefile_source" >&5
12311 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12312 if test "$ac_cv_sys_largefile_source" != no; then
12313
12314 cat >>confdefs.h <<EOF
12315 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12316 EOF
12317
12318 fi
12319 rm -rf conftest*
12320
12321 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12322 # in glibc 2.1.3, but that breaks too many other things.
12323 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12324 echo "$as_me:12324: checking for fseeko" >&5
12325 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12326 if test "${ac_cv_func_fseeko+set}" = set; then
12327   echo $ECHO_N "(cached) $ECHO_C" >&6
12328 else
12329   cat >conftest.$ac_ext <<_ACEOF
12330 #line 12330 "configure"
12331 #include "confdefs.h"
12332 #include <stdio.h>
12333 int
12334 main (void)
12335 {
12336 return fseeko && fseeko (stdin, 0, 0);
12337   ;
12338   return 0;
12339 }
12340 _ACEOF
12341 rm -f conftest.$ac_objext conftest$ac_exeext
12342 if { (eval echo "$as_me:12342: \"$ac_link\"") >&5
12343   (eval $ac_link) 2>&5
12344   ac_status=$?
12345   echo "$as_me:12345: \$? = $ac_status" >&5
12346   (exit $ac_status); } &&
12347          { ac_try='test -s conftest$ac_exeext'
12348   { (eval echo "$as_me:12348: \"$ac_try\"") >&5
12349   (eval $ac_try) 2>&5
12350   ac_status=$?
12351   echo "$as_me:12351: \$? = $ac_status" >&5
12352   (exit $ac_status); }; }; then
12353   ac_cv_func_fseeko=yes
12354 else
12355   echo "$as_me: failed program was:" >&5
12356 cat conftest.$ac_ext >&5
12357 ac_cv_func_fseeko=no
12358 fi
12359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12360 fi
12361 echo "$as_me:12361: result: $ac_cv_func_fseeko" >&5
12362 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12363 if test $ac_cv_func_fseeko = yes; then
12364
12365 cat >>confdefs.h <<\EOF
12366 #define HAVE_FSEEKO 1
12367 EOF
12368
12369 fi
12370
12371         # Normally we would collect these definitions in the config.h,
12372         # but (like _XOPEN_SOURCE), some environments rely on having these
12373         # defined before any of the system headers are included.  Another
12374         # case comes up with C++, e.g., on AIX the compiler compiles the
12375         # header files by themselves before looking at the body files it is
12376         # told to compile.  For ncurses, those header files do not include
12377         # the config.h
12378         if test "$ac_cv_sys_large_files" != no
12379         then
12380
12381         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12382         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12383
12384         fi
12385         if test "$ac_cv_sys_largefile_source" != no
12386         then
12387
12388         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12389         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12390
12391         fi
12392         if test "$ac_cv_sys_file_offset_bits" != no
12393         then
12394
12395         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12396         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12397
12398         fi
12399
12400         echo "$as_me:12400: checking whether to use struct dirent64" >&5
12401 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12402 if test "${cf_cv_struct_dirent64+set}" = set; then
12403   echo $ECHO_N "(cached) $ECHO_C" >&6
12404 else
12405
12406                 cat >conftest.$ac_ext <<_ACEOF
12407 #line 12407 "configure"
12408 #include "confdefs.h"
12409
12410 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12411 #include <sys/types.h>
12412 #include <dirent.h>
12413
12414 int
12415 main (void)
12416 {
12417
12418                 /* if transitional largefile support is setup, this is true */
12419                 extern struct dirent64 * readdir(DIR *);
12420                 struct dirent64 *x = readdir((DIR *)0);
12421                 struct dirent *y = readdir((DIR *)0);
12422                 int z = x - y;
12423
12424   ;
12425   return 0;
12426 }
12427 _ACEOF
12428 rm -f conftest.$ac_objext
12429 if { (eval echo "$as_me:12429: \"$ac_compile\"") >&5
12430   (eval $ac_compile) 2>&5
12431   ac_status=$?
12432   echo "$as_me:12432: \$? = $ac_status" >&5
12433   (exit $ac_status); } &&
12434          { ac_try='test -s conftest.$ac_objext'
12435   { (eval echo "$as_me:12435: \"$ac_try\"") >&5
12436   (eval $ac_try) 2>&5
12437   ac_status=$?
12438   echo "$as_me:12438: \$? = $ac_status" >&5
12439   (exit $ac_status); }; }; then
12440   cf_cv_struct_dirent64=yes
12441 else
12442   echo "$as_me: failed program was:" >&5
12443 cat conftest.$ac_ext >&5
12444 cf_cv_struct_dirent64=no
12445 fi
12446 rm -f conftest.$ac_objext conftest.$ac_ext
12447
12448 fi
12449 echo "$as_me:12449: result: $cf_cv_struct_dirent64" >&5
12450 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12451         test "$cf_cv_struct_dirent64" = yes &&
12452 cat >>confdefs.h <<\EOF
12453 #define HAVE_STRUCT_DIRENT64 1
12454 EOF
12455
12456         fi
12457
12458 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12459 echo "$as_me:12459: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12460 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12461
12462 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12463 if test "${enable_tparm_varargs+set}" = set; then
12464   enableval="$enable_tparm_varargs"
12465   with_tparm_varargs=$enableval
12466 else
12467   with_tparm_varargs=yes
12468 fi;
12469 echo "$as_me:12469: result: $with_tparm_varargs" >&5
12470 echo "${ECHO_T}$with_tparm_varargs" >&6
12471 NCURSES_TPARM_VARARGS=0
12472 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12473
12474 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12475 if test "$with_ticlib" != no ; then
12476 echo "$as_me:12476: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12477 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12478
12479 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12480 if test "${enable_tic_depends+set}" = set; then
12481   enableval="$enable_tic_depends"
12482   with_tic_depends=$enableval
12483 else
12484   with_tic_depends=yes
12485 fi;
12486 echo "$as_me:12486: result: $with_tic_depends" >&5
12487 echo "${ECHO_T}$with_tic_depends" >&6
12488 else
12489         with_tic_depends=no
12490 fi
12491
12492 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12493 echo "$as_me:12493: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12494 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12495
12496 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12497 if test "${enable_wattr_macros+set}" = set; then
12498   enableval="$enable_wattr_macros"
12499   with_wattr_macros=$enableval
12500 else
12501   with_wattr_macros=yes
12502 fi;
12503 if [ "x$with_wattr_macros" != xyes ]; then
12504         NCURSES_WATTR_MACROS=0
12505         echo "$as_me:12505: result: yes" >&5
12506 echo "${ECHO_T}yes" >&6
12507 else
12508         NCURSES_WATTR_MACROS=1
12509         echo "$as_me:12509: result: no" >&5
12510 echo "${ECHO_T}no" >&6
12511 fi
12512
12513 echo "$as_me:12513: checking for X11 rgb file" >&5
12514 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12515
12516 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12517 if test "${with_x11_rgb+set}" = set; then
12518   withval="$with_x11_rgb"
12519   RGB_PATH=$withval
12520 else
12521   RGB_PATH=auto
12522 fi;
12523
12524 if test "x$RGB_PATH" = xauto
12525 then
12526         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12527         for cf_path in \
12528                 /opt/local/share/X11/rgb.txt \
12529                 /opt/X11/share/X11/rgb.txt \
12530                 /usr/share/X11/rgb.txt \
12531                 /usr/X11/share/X11/rgb.txt \
12532                 /usr/X11/lib/X11/rgb.txt \
12533                 /usr/lib/X11/rgb.txt \
12534                 /etc/X11/rgb.txt \
12535                 /usr/pkg/lib/X11/rgb.txt \
12536                 /usr/X11R7/lib/X11/rgb.txt \
12537                 /usr/X11R6/lib/X11/rgb.txt \
12538                 /usr/X11R5/lib/X11/rgb.txt \
12539                 /usr/X11R4/lib/X11/rgb.txt \
12540                 /usr/local/lib/X11/rgb.txt \
12541                 /usr/local/share/X11/rgb.txt \
12542                 /usr/lib64/X11/rgb.txt
12543         do
12544                 if test -f "$cf_path" ; then
12545                         RGB_PATH="$cf_path"
12546                         break
12547                 fi
12548         done
12549 else
12550         cf_path=$RGB_PATH
12551
12552 if test "x$prefix" != xNONE; then
12553         cf_path_syntax="$prefix"
12554 else
12555         cf_path_syntax="$ac_default_prefix"
12556 fi
12557
12558 case ".$cf_path" in
12559 (.\$\(*\)*|.\'*\'*)
12560         ;;
12561 (..|./*|.\\*)
12562         ;;
12563 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12564         ;;
12565 (.\${*prefix}*|.\${*dir}*)
12566         eval cf_path="$cf_path"
12567         case ".$cf_path" in
12568         (.NONE/*)
12569                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12570                 ;;
12571         esac
12572         ;;
12573 (.no|.NONE/*)
12574         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12575         ;;
12576 (*)
12577         { { echo "$as_me:12577: error: expected a pathname, not \"$cf_path\"" >&5
12578 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12579    { (exit 1); exit 1; }; }
12580         ;;
12581 esac
12582
12583 fi
12584
12585 echo "$as_me:12585: result: $RGB_PATH" >&5
12586 echo "${ECHO_T}$RGB_PATH" >&6
12587
12588 cat >>confdefs.h <<EOF
12589 #define RGB_PATH "$cf_path"
12590 EOF
12591
12592 no_x11_rgb=
12593 if test "$RGB_PATH" = no
12594 then
12595         no_x11_rgb="#"
12596 fi
12597
12598 ###   use option --with-bool to override bool's type
12599 echo "$as_me:12599: checking for type of bool" >&5
12600 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12601
12602 # Check whether --with-bool or --without-bool was given.
12603 if test "${with_bool+set}" = set; then
12604   withval="$with_bool"
12605   NCURSES_BOOL="$withval"
12606 else
12607   NCURSES_BOOL=auto
12608 fi;
12609 echo "$as_me:12609: result: $NCURSES_BOOL" >&5
12610 echo "${ECHO_T}$NCURSES_BOOL" >&6
12611
12612 echo "$as_me:12612: checking for alternate terminal capabilities file" >&5
12613 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12614
12615 # Check whether --with-caps or --without-caps was given.
12616 if test "${with_caps+set}" = set; then
12617   withval="$with_caps"
12618   TERMINFO_CAPS=Caps.$withval
12619 else
12620   TERMINFO_CAPS=Caps
12621 fi;
12622 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12623 echo "$as_me:12623: result: $TERMINFO_CAPS" >&5
12624 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12625
12626 ###   use option --with-chtype to override chtype's type
12627 echo "$as_me:12627: checking for type of chtype" >&5
12628 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12629
12630 # Check whether --with-chtype or --without-chtype was given.
12631 if test "${with_chtype+set}" = set; then
12632   withval="$with_chtype"
12633   NCURSES_CHTYPE="$withval"
12634 else
12635   NCURSES_CHTYPE=$cf_dft_chtype
12636 fi;
12637 echo "$as_me:12637: result: $NCURSES_CHTYPE" >&5
12638 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12639
12640 ###   use option --with-ospeed to override ospeed's type
12641 echo "$as_me:12641: checking for type of ospeed" >&5
12642 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12643
12644 # Check whether --with-ospeed or --without-ospeed was given.
12645 if test "${with_ospeed+set}" = set; then
12646   withval="$with_ospeed"
12647   NCURSES_OSPEED="$withval"
12648 else
12649   NCURSES_OSPEED=short
12650 fi;
12651 echo "$as_me:12651: result: $NCURSES_OSPEED" >&5
12652 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12653
12654 ###   use option --with-mmask-t to override mmask_t's type
12655 echo "$as_me:12655: checking for type of mmask_t" >&5
12656 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12657
12658 # Check whether --with-mmask-t or --without-mmask-t was given.
12659 if test "${with_mmask_t+set}" = set; then
12660   withval="$with_mmask_t"
12661   NCURSES_MMASK_T="$withval"
12662 else
12663   NCURSES_MMASK_T=$cf_dft_mmask_t
12664 fi;
12665 echo "$as_me:12665: result: $NCURSES_MMASK_T" >&5
12666 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12667
12668 ###   use option --with-ccharw-max to override CCHARW_MAX size
12669 echo "$as_me:12669: checking for size CCHARW_MAX" >&5
12670 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12671
12672 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12673 if test "${with_ccharw_max+set}" = set; then
12674   withval="$with_ccharw_max"
12675   NCURSES_CCHARW_MAX="$withval"
12676 else
12677   NCURSES_CCHARW_MAX=5
12678 fi;
12679 echo "$as_me:12679: result: $NCURSES_CCHARW_MAX" >&5
12680 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12681
12682 echo "$as_me:12682: checking for ANSI C header files" >&5
12683 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12684 if test "${ac_cv_header_stdc+set}" = set; then
12685   echo $ECHO_N "(cached) $ECHO_C" >&6
12686 else
12687   cat >conftest.$ac_ext <<_ACEOF
12688 #line 12688 "configure"
12689 #include "confdefs.h"
12690 #include <stdlib.h>
12691 #include <stdarg.h>
12692 #include <string.h>
12693 #include <float.h>
12694
12695 _ACEOF
12696 if { (eval echo "$as_me:12696: \"$ac_cpp conftest.$ac_ext\"") >&5
12697   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12698   ac_status=$?
12699   egrep -v '^ *\+' conftest.er1 >conftest.err
12700   rm -f conftest.er1
12701   cat conftest.err >&5
12702   echo "$as_me:12702: \$? = $ac_status" >&5
12703   (exit $ac_status); } >/dev/null; then
12704   if test -s conftest.err; then
12705     ac_cpp_err=$ac_c_preproc_warn_flag
12706   else
12707     ac_cpp_err=
12708   fi
12709 else
12710   ac_cpp_err=yes
12711 fi
12712 if test -z "$ac_cpp_err"; then
12713   ac_cv_header_stdc=yes
12714 else
12715   echo "$as_me: failed program was:" >&5
12716   cat conftest.$ac_ext >&5
12717   ac_cv_header_stdc=no
12718 fi
12719 rm -f conftest.err conftest.$ac_ext
12720
12721 if test $ac_cv_header_stdc = yes; then
12722   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12723   cat >conftest.$ac_ext <<_ACEOF
12724 #line 12724 "configure"
12725 #include "confdefs.h"
12726 #include <string.h>
12727
12728 _ACEOF
12729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12730   egrep "memchr" >/dev/null 2>&1; then
12731   :
12732 else
12733   ac_cv_header_stdc=no
12734 fi
12735 rm -rf conftest*
12736
12737 fi
12738
12739 if test $ac_cv_header_stdc = yes; then
12740   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12741   cat >conftest.$ac_ext <<_ACEOF
12742 #line 12742 "configure"
12743 #include "confdefs.h"
12744 #include <stdlib.h>
12745
12746 _ACEOF
12747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12748   egrep "free" >/dev/null 2>&1; then
12749   :
12750 else
12751   ac_cv_header_stdc=no
12752 fi
12753 rm -rf conftest*
12754
12755 fi
12756
12757 if test $ac_cv_header_stdc = yes; then
12758   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12759   if test "$cross_compiling" = yes; then
12760   :
12761 else
12762   cat >conftest.$ac_ext <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765 #include <ctype.h>
12766 #if ((' ' & 0x0FF) == 0x020)
12767 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12768 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12769 #else
12770 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12771                      || ('j' <= (c) && (c) <= 'r') \
12772                      || ('s' <= (c) && (c) <= 'z'))
12773 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12774 #endif
12775
12776 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12777 int
12778 main (void)
12779 {
12780   int i;
12781   for (i = 0; i < 256; i++)
12782     if (XOR (islower (i), ISLOWER (i))
12783         || toupper (i) != TOUPPER (i))
12784       $ac_main_return(2);
12785   $ac_main_return (0);
12786 }
12787 _ACEOF
12788 rm -f conftest$ac_exeext
12789 if { (eval echo "$as_me:12789: \"$ac_link\"") >&5
12790   (eval $ac_link) 2>&5
12791   ac_status=$?
12792   echo "$as_me:12792: \$? = $ac_status" >&5
12793   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12794   { (eval echo "$as_me:12794: \"$ac_try\"") >&5
12795   (eval $ac_try) 2>&5
12796   ac_status=$?
12797   echo "$as_me:12797: \$? = $ac_status" >&5
12798   (exit $ac_status); }; }; then
12799   :
12800 else
12801   echo "$as_me: program exited with status $ac_status" >&5
12802 echo "$as_me: failed program was:" >&5
12803 cat conftest.$ac_ext >&5
12804 ac_cv_header_stdc=no
12805 fi
12806 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12807 fi
12808 fi
12809 fi
12810 echo "$as_me:12810: result: $ac_cv_header_stdc" >&5
12811 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12812 if test $ac_cv_header_stdc = yes; then
12813
12814 cat >>confdefs.h <<\EOF
12815 #define STDC_HEADERS 1
12816 EOF
12817
12818 fi
12819
12820 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12821
12822 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12823                   inttypes.h stdint.h unistd.h
12824 do
12825 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12826 echo "$as_me:12826: checking for $ac_header" >&5
12827 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12828 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12829   echo $ECHO_N "(cached) $ECHO_C" >&6
12830 else
12831   cat >conftest.$ac_ext <<_ACEOF
12832 #line 12832 "configure"
12833 #include "confdefs.h"
12834 $ac_includes_default
12835 #include <$ac_header>
12836 _ACEOF
12837 rm -f conftest.$ac_objext
12838 if { (eval echo "$as_me:12838: \"$ac_compile\"") >&5
12839   (eval $ac_compile) 2>&5
12840   ac_status=$?
12841   echo "$as_me:12841: \$? = $ac_status" >&5
12842   (exit $ac_status); } &&
12843          { ac_try='test -s conftest.$ac_objext'
12844   { (eval echo "$as_me:12844: \"$ac_try\"") >&5
12845   (eval $ac_try) 2>&5
12846   ac_status=$?
12847   echo "$as_me:12847: \$? = $ac_status" >&5
12848   (exit $ac_status); }; }; then
12849   eval "$as_ac_Header=yes"
12850 else
12851   echo "$as_me: failed program was:" >&5
12852 cat conftest.$ac_ext >&5
12853 eval "$as_ac_Header=no"
12854 fi
12855 rm -f conftest.$ac_objext conftest.$ac_ext
12856 fi
12857 echo "$as_me:12857: result: `eval echo '${'$as_ac_Header'}'`" >&5
12858 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12859 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12860   cat >>confdefs.h <<EOF
12861 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12862 EOF
12863
12864 fi
12865 done
12866
12867 echo "$as_me:12867: checking for signed char" >&5
12868 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12869 if test "${ac_cv_type_signed_char+set}" = set; then
12870   echo $ECHO_N "(cached) $ECHO_C" >&6
12871 else
12872   cat >conftest.$ac_ext <<_ACEOF
12873 #line 12873 "configure"
12874 #include "confdefs.h"
12875 $ac_includes_default
12876 int
12877 main (void)
12878 {
12879 if ((signed char *) 0)
12880   return 0;
12881 if (sizeof (signed char))
12882   return 0;
12883   ;
12884   return 0;
12885 }
12886 _ACEOF
12887 rm -f conftest.$ac_objext
12888 if { (eval echo "$as_me:12888: \"$ac_compile\"") >&5
12889   (eval $ac_compile) 2>&5
12890   ac_status=$?
12891   echo "$as_me:12891: \$? = $ac_status" >&5
12892   (exit $ac_status); } &&
12893          { ac_try='test -s conftest.$ac_objext'
12894   { (eval echo "$as_me:12894: \"$ac_try\"") >&5
12895   (eval $ac_try) 2>&5
12896   ac_status=$?
12897   echo "$as_me:12897: \$? = $ac_status" >&5
12898   (exit $ac_status); }; }; then
12899   ac_cv_type_signed_char=yes
12900 else
12901   echo "$as_me: failed program was:" >&5
12902 cat conftest.$ac_ext >&5
12903 ac_cv_type_signed_char=no
12904 fi
12905 rm -f conftest.$ac_objext conftest.$ac_ext
12906 fi
12907 echo "$as_me:12907: result: $ac_cv_type_signed_char" >&5
12908 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12909
12910 echo "$as_me:12910: checking size of signed char" >&5
12911 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12912 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12913   echo $ECHO_N "(cached) $ECHO_C" >&6
12914 else
12915   if test "$ac_cv_type_signed_char" = yes; then
12916   if test "$cross_compiling" = yes; then
12917   # Depending upon the size, compute the lo and hi bounds.
12918 cat >conftest.$ac_ext <<_ACEOF
12919 #line 12919 "configure"
12920 #include "confdefs.h"
12921 $ac_includes_default
12922 int
12923 main (void)
12924 {
12925 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12926   ;
12927   return 0;
12928 }
12929 _ACEOF
12930 rm -f conftest.$ac_objext
12931 if { (eval echo "$as_me:12931: \"$ac_compile\"") >&5
12932   (eval $ac_compile) 2>&5
12933   ac_status=$?
12934   echo "$as_me:12934: \$? = $ac_status" >&5
12935   (exit $ac_status); } &&
12936          { ac_try='test -s conftest.$ac_objext'
12937   { (eval echo "$as_me:12937: \"$ac_try\"") >&5
12938   (eval $ac_try) 2>&5
12939   ac_status=$?
12940   echo "$as_me:12940: \$? = $ac_status" >&5
12941   (exit $ac_status); }; }; then
12942   ac_lo=0 ac_mid=0
12943   while :; do
12944     cat >conftest.$ac_ext <<_ACEOF
12945 #line 12945 "configure"
12946 #include "confdefs.h"
12947 $ac_includes_default
12948 int
12949 main (void)
12950 {
12951 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12952   ;
12953   return 0;
12954 }
12955 _ACEOF
12956 rm -f conftest.$ac_objext
12957 if { (eval echo "$as_me:12957: \"$ac_compile\"") >&5
12958   (eval $ac_compile) 2>&5
12959   ac_status=$?
12960   echo "$as_me:12960: \$? = $ac_status" >&5
12961   (exit $ac_status); } &&
12962          { ac_try='test -s conftest.$ac_objext'
12963   { (eval echo "$as_me:12963: \"$ac_try\"") >&5
12964   (eval $ac_try) 2>&5
12965   ac_status=$?
12966   echo "$as_me:12966: \$? = $ac_status" >&5
12967   (exit $ac_status); }; }; then
12968   ac_hi=$ac_mid; break
12969 else
12970   echo "$as_me: failed program was:" >&5
12971 cat conftest.$ac_ext >&5
12972 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12973 fi
12974 rm -f conftest.$ac_objext conftest.$ac_ext
12975   done
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 cat conftest.$ac_ext >&5
12979 ac_hi=-1 ac_mid=-1
12980   while :; do
12981     cat >conftest.$ac_ext <<_ACEOF
12982 #line 12982 "configure"
12983 #include "confdefs.h"
12984 $ac_includes_default
12985 int
12986 main (void)
12987 {
12988 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12989   ;
12990   return 0;
12991 }
12992 _ACEOF
12993 rm -f conftest.$ac_objext
12994 if { (eval echo "$as_me:12994: \"$ac_compile\"") >&5
12995   (eval $ac_compile) 2>&5
12996   ac_status=$?
12997   echo "$as_me:12997: \$? = $ac_status" >&5
12998   (exit $ac_status); } &&
12999          { ac_try='test -s conftest.$ac_objext'
13000   { (eval echo "$as_me:13000: \"$ac_try\"") >&5
13001   (eval $ac_try) 2>&5
13002   ac_status=$?
13003   echo "$as_me:13003: \$? = $ac_status" >&5
13004   (exit $ac_status); }; }; then
13005   ac_lo=$ac_mid; break
13006 else
13007   echo "$as_me: failed program was:" >&5
13008 cat conftest.$ac_ext >&5
13009 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13010 fi
13011 rm -f conftest.$ac_objext conftest.$ac_ext
13012   done
13013 fi
13014 rm -f conftest.$ac_objext conftest.$ac_ext
13015 # Binary search between lo and hi bounds.
13016 while test "x$ac_lo" != "x$ac_hi"; do
13017   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13018   cat >conftest.$ac_ext <<_ACEOF
13019 #line 13019 "configure"
13020 #include "confdefs.h"
13021 $ac_includes_default
13022 int
13023 main (void)
13024 {
13025 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13026   ;
13027   return 0;
13028 }
13029 _ACEOF
13030 rm -f conftest.$ac_objext
13031 if { (eval echo "$as_me:13031: \"$ac_compile\"") >&5
13032   (eval $ac_compile) 2>&5
13033   ac_status=$?
13034   echo "$as_me:13034: \$? = $ac_status" >&5
13035   (exit $ac_status); } &&
13036          { ac_try='test -s conftest.$ac_objext'
13037   { (eval echo "$as_me:13037: \"$ac_try\"") >&5
13038   (eval $ac_try) 2>&5
13039   ac_status=$?
13040   echo "$as_me:13040: \$? = $ac_status" >&5
13041   (exit $ac_status); }; }; then
13042   ac_hi=$ac_mid
13043 else
13044   echo "$as_me: failed program was:" >&5
13045 cat conftest.$ac_ext >&5
13046 ac_lo=`expr $ac_mid + 1`
13047 fi
13048 rm -f conftest.$ac_objext conftest.$ac_ext
13049 done
13050 ac_cv_sizeof_signed_char=$ac_lo
13051 else
13052   if test "$cross_compiling" = yes; then
13053   { { echo "$as_me:13053: error: cannot run test program while cross compiling" >&5
13054 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13055    { (exit 1); exit 1; }; }
13056 else
13057   cat >conftest.$ac_ext <<_ACEOF
13058 #line 13058 "configure"
13059 #include "confdefs.h"
13060 $ac_includes_default
13061 int
13062 main (void)
13063 {
13064 FILE *f = fopen ("conftest.val", "w");
13065 if (!f)
13066   $ac_main_return (1);
13067 fprintf (f, "%d", (sizeof (signed char)));
13068 fclose (f);
13069   ;
13070   return 0;
13071 }
13072 _ACEOF
13073 rm -f conftest$ac_exeext
13074 if { (eval echo "$as_me:13074: \"$ac_link\"") >&5
13075   (eval $ac_link) 2>&5
13076   ac_status=$?
13077   echo "$as_me:13077: \$? = $ac_status" >&5
13078   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13079   { (eval echo "$as_me:13079: \"$ac_try\"") >&5
13080   (eval $ac_try) 2>&5
13081   ac_status=$?
13082   echo "$as_me:13082: \$? = $ac_status" >&5
13083   (exit $ac_status); }; }; then
13084   ac_cv_sizeof_signed_char=`cat conftest.val`
13085 else
13086   echo "$as_me: program exited with status $ac_status" >&5
13087 echo "$as_me: failed program was:" >&5
13088 cat conftest.$ac_ext >&5
13089 fi
13090 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13091 fi
13092 fi
13093 rm -f conftest.val
13094 else
13095   ac_cv_sizeof_signed_char=0
13096 fi
13097 fi
13098 echo "$as_me:13098: result: $ac_cv_sizeof_signed_char" >&5
13099 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13100 cat >>confdefs.h <<EOF
13101 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13102 EOF
13103
13104 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13105         NCURSES_SBOOL="signed char"
13106 else
13107         NCURSES_SBOOL="char"
13108 fi
13109 echo "$as_me:13109: checking if you want to use signed Boolean array in term.h" >&5
13110 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13111
13112 # Check whether --enable-signed-char or --disable-signed-char was given.
13113 if test "${enable_signed_char+set}" = set; then
13114   enableval="$enable_signed_char"
13115   with_signed_char=$enableval
13116 else
13117   with_signed_char=no
13118 fi;
13119 echo "$as_me:13119: result: $with_signed_char" >&5
13120 echo "${ECHO_T}$with_signed_char" >&6
13121 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13122
13123 ###   use option --with-tparm-arg to override tparm's argument type
13124 echo "$as_me:13124: checking for type of tparm args" >&5
13125 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13126
13127 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13128 if test "${with_tparm_arg+set}" = set; then
13129   withval="$with_tparm_arg"
13130   NCURSES_TPARM_ARG="$withval"
13131 else
13132   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13133 fi;
13134 echo "$as_me:13134: result: $NCURSES_TPARM_ARG" >&5
13135 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13136
13137 ### Enable compiling-in rcs id's
13138 echo "$as_me:13138: checking if RCS identifiers should be compiled-in" >&5
13139 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13140
13141 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13142 if test "${with_rcs_ids+set}" = set; then
13143   withval="$with_rcs_ids"
13144   with_rcs_ids=$withval
13145 else
13146   with_rcs_ids=no
13147 fi;
13148 echo "$as_me:13148: result: $with_rcs_ids" >&5
13149 echo "${ECHO_T}$with_rcs_ids" >&6
13150 test "x$with_rcs_ids" = xyes &&
13151 cat >>confdefs.h <<\EOF
13152 #define USE_RCS_IDS 1
13153 EOF
13154
13155 ###############################################################################
13156
13157 echo "$as_me:13157: checking format of man-pages" >&5
13158 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13159
13160 # Check whether --with-manpage-format or --without-manpage-format was given.
13161 if test "${with_manpage_format+set}" = set; then
13162   withval="$with_manpage_format"
13163   MANPAGE_FORMAT=$withval
13164 else
13165   MANPAGE_FORMAT=unknown
13166 fi;
13167
13168 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13169 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13170
13171 cf_unknown=
13172
13173 case $MANPAGE_FORMAT in
13174 (unknown)
13175         if test -z "$MANPATH" ; then
13176                 MANPATH="/usr/man:/usr/share/man"
13177         fi
13178
13179         # look for the 'date' man-page (it's most likely to be installed!)
13180         MANPAGE_FORMAT=
13181         cf_preform=no
13182         cf_catonly=yes
13183         cf_example=date
13184
13185         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13186         for cf_dir in $MANPATH; do
13187                 test -z "$cf_dir" && cf_dir=/usr/man
13188                 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
13189                 do
13190                         cf_test=`echo $cf_name | sed -e 's/*//'`
13191                         if test "x$cf_test" = "x$cf_name" ; then
13192
13193                                 case "$cf_name" in
13194                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13195                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13196                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13197                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13198                                 esac
13199
13200                                 case "$cf_name" in
13201                                 ($cf_dir/man*)
13202                                         cf_catonly=no
13203                                         ;;
13204                                 ($cf_dir/cat*)
13205                                         cf_preform=yes
13206                                         ;;
13207                                 esac
13208                                 break
13209                         fi
13210
13211                         # if we found a match in either man* or cat*, stop looking
13212                         if test -n "$MANPAGE_FORMAT" ; then
13213                                 cf_found=no
13214                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13215                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13216                                 case "$cf_name" in
13217                                 ($cf_dir/cat*)
13218                                         cf_found=yes
13219                                         ;;
13220                                 esac
13221                                 test $cf_found=yes && break
13222                         fi
13223                 done
13224                 # only check the first directory in $MANPATH where we find manpages
13225                 if test -n "$MANPAGE_FORMAT" ; then
13226                         break
13227                 fi
13228         done
13229         # if we did not find the example, just assume it is normal
13230         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13231         IFS="$ac_save_ifs"
13232         ;;
13233 (*)
13234         for cf_option in $MANPAGE_FORMAT; do
13235         case $cf_option in
13236         (gzip|compress|BSDI|normal|formatted|catonly)
13237                 ;;
13238         (*)
13239                 cf_unknown="$cf_unknown $cf_option"
13240                 ;;
13241         esac
13242         done
13243         ;;
13244 esac
13245
13246 echo "$as_me:13246: result: $MANPAGE_FORMAT" >&5
13247 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13248 if test -n "$cf_unknown" ; then
13249         { echo "$as_me:13249: WARNING: Unexpected manpage-format $cf_unknown" >&5
13250 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13251 fi
13252
13253 echo "$as_me:13253: checking for manpage renaming" >&5
13254 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13255
13256 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13257 if test "${with_manpage_renames+set}" = set; then
13258   withval="$with_manpage_renames"
13259   MANPAGE_RENAMES=$withval
13260 else
13261   MANPAGE_RENAMES=yes
13262 fi;
13263
13264 case ".$MANPAGE_RENAMES" in
13265 (.no)
13266         ;;
13267 (.|.yes)
13268         # Debian 'man' program?
13269         if test -f /etc/debian_version ; then
13270                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13271         else
13272                 MANPAGE_RENAMES=no
13273         fi
13274         ;;
13275 esac
13276
13277 if test "$MANPAGE_RENAMES" != no ; then
13278         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13279                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13280         elif test ! -f $MANPAGE_RENAMES ; then
13281                 { { echo "$as_me:13281: error: not a filename: $MANPAGE_RENAMES" >&5
13282 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13283    { (exit 1); exit 1; }; }
13284         fi
13285
13286         test ! -d man && mkdir man
13287
13288         # Construct a sed-script to perform renaming within man-pages
13289         if test -n "$MANPAGE_RENAMES" ; then
13290                 test ! -d man && mkdir man
13291                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13292         fi
13293 fi
13294
13295 echo "$as_me:13295: result: $MANPAGE_RENAMES" >&5
13296 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13297
13298 echo "$as_me:13298: checking if manpage aliases will be installed" >&5
13299 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13300
13301 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13302 if test "${with_manpage_aliases+set}" = set; then
13303   withval="$with_manpage_aliases"
13304   MANPAGE_ALIASES=$withval
13305 else
13306   MANPAGE_ALIASES=yes
13307 fi;
13308
13309 echo "$as_me:13309: result: $MANPAGE_ALIASES" >&5
13310 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13311
13312 case "x$LN_S" in
13313 (xln*)
13314         cf_use_symlinks=yes
13315         ;;
13316 (*)
13317         cf_use_symlinks=no
13318         ;;
13319 esac
13320
13321 MANPAGE_SYMLINKS=no
13322 if test "$MANPAGE_ALIASES" = yes ; then
13323 echo "$as_me:13323: checking if manpage symlinks should be used" >&5
13324 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13325
13326 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13327 if test "${with_manpage_symlinks+set}" = set; then
13328   withval="$with_manpage_symlinks"
13329   MANPAGE_SYMLINKS=$withval
13330 else
13331   MANPAGE_SYMLINKS=$cf_use_symlinks
13332 fi;
13333
13334 if test "$$cf_use_symlinks" = no; then
13335 if test "$MANPAGE_SYMLINKS" = yes ; then
13336         { echo "$as_me:13336: WARNING: cannot make symlinks" >&5
13337 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13338         MANPAGE_SYMLINKS=no
13339 fi
13340 fi
13341
13342 echo "$as_me:13342: result: $MANPAGE_SYMLINKS" >&5
13343 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13344 fi
13345
13346 echo "$as_me:13346: checking for manpage tbl" >&5
13347 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13348
13349 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13350 if test "${with_manpage_tbl+set}" = set; then
13351   withval="$with_manpage_tbl"
13352   MANPAGE_TBL=$withval
13353 else
13354   MANPAGE_TBL=no
13355 fi;
13356
13357 echo "$as_me:13357: result: $MANPAGE_TBL" >&5
13358 echo "${ECHO_T}$MANPAGE_TBL" >&6
13359
13360 if test "$prefix" = "NONE" ; then
13361         cf_prefix="$ac_default_prefix"
13362 else
13363         cf_prefix="$prefix"
13364 fi
13365
13366 case "$MANPAGE_FORMAT" in
13367 (*catonly*)
13368         cf_format=yes
13369         cf_inboth=no
13370         ;;
13371 (*formatted*)
13372         cf_format=yes
13373         cf_inboth=yes
13374         ;;
13375 (*)
13376         cf_format=no
13377         cf_inboth=no
13378         ;;
13379 esac
13380
13381 test ! -d man && mkdir man
13382
13383 cf_so_strip=
13384 cf_compress=
13385 case "$MANPAGE_FORMAT" in
13386 (*compress*)
13387         cf_so_strip="Z"
13388         cf_compress=compress
13389         ;;
13390 (*gzip*)
13391         cf_so_strip="gz"
13392         cf_compress=gzip
13393         ;;
13394 esac
13395
13396 cf_edit_man=./edit_man.sh
13397 cf_man_alias=`pwd`/man_alias.sed
13398
13399 cat >$cf_edit_man <<CF_EOF
13400 #! $SHELL
13401 # this script is generated by the configure-script CF_MAN_PAGES macro.
13402
13403 prefix="$cf_prefix"
13404 datarootdir="$datarootdir"
13405 datadir="$datadir"
13406
13407 NCURSES_MAJOR="$NCURSES_MAJOR"
13408 NCURSES_MINOR="$NCURSES_MINOR"
13409 NCURSES_PATCH="$NCURSES_PATCH"
13410
13411 NCURSES_OSPEED="$NCURSES_OSPEED"
13412 TERMINFO="$TERMINFO"
13413
13414 INSTALL="$INSTALL"
13415 INSTALL_DATA="$INSTALL_DATA"
13416
13417 transform="$program_transform_name"
13418
13419 TMP=\${TMPDIR:=/tmp}/man\$\$
13420 trap "rm -f \$TMP" 0 1 2 3 15
13421
13422 form=\$1
13423 shift || exit 1
13424
13425 verb=\$1
13426 shift || exit 1
13427
13428 mandir=\$1
13429 shift || exit 1
13430
13431 srcdir=\$1
13432 top_srcdir=\$srcdir/..
13433 shift || exit 1
13434
13435 if test "\$form" = normal ; then
13436         if test "$cf_format" = yes ; then
13437         if test "$cf_inboth" = no ; then
13438                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13439                 exit $?
13440         fi
13441         fi
13442         cf_subdir=\$mandir/man
13443         cf_tables=$MANPAGE_TBL
13444 else
13445         cf_subdir=\$mandir/cat
13446         cf_tables=yes
13447 fi
13448
13449 # process the list of source-files
13450 for i in \$* ; do
13451 case \$i in
13452 (*.orig|*.rej) ;;
13453 (*.[0-9]*)
13454         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13455         if test \$verb = installing ; then
13456         if test ! -d \$cf_subdir\${section} ; then
13457                 mkdir -p \$cf_subdir\$section
13458         fi
13459         fi
13460
13461         # replace variables in man page
13462         if test ! -f $cf_man_alias ; then
13463 cat >>$cf_man_alias <<-CF_EOF2
13464                 s,@DATADIR@,\$datadir,g
13465                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13466                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13467                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13468                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13469                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13470                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13471 CF_EOF
13472
13473         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13474         do
13475                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13476                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13477 cat >>$cf_edit_man <<-CF_EOF
13478                 s,@$cf_NAME@,$cf_name,g
13479 CF_EOF
13480         done
13481
13482 cat >>$cf_edit_man <<CF_EOF
13483 CF_EOF2
13484                 echo "...made $cf_man_alias"
13485         fi
13486
13487         aliases=
13488         cf_source=\`basename \$i\`
13489         inalias=\$cf_source
13490         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13491         if test ! -f \$inalias ; then
13492                 echo .. skipped \$cf_source
13493                 continue
13494         fi
13495 CF_EOF
13496
13497 if test "$MANPAGE_ALIASES" != no ; then
13498 cat >>$cf_edit_man <<CF_EOF
13499         nCurses=ignore.3x
13500         test $with_curses_h = yes && nCurses=ncurses.3x
13501         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13502 CF_EOF
13503 fi
13504
13505 if test "$MANPAGE_RENAMES" = no ; then
13506 cat >>$cf_edit_man <<CF_EOF
13507         # perform program transformations for section 1 man pages
13508         if test \$section = 1 ; then
13509                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13510         else
13511                 cf_target=\$cf_subdir\${section}/\$cf_source
13512         fi
13513 CF_EOF
13514 else
13515 cat >>$cf_edit_man <<CF_EOF
13516         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13517         if test -z "\$cf_target" ; then
13518                 echo '? missing rename for '\$cf_source
13519                 cf_target="\$cf_source"
13520         fi
13521         cf_target="\$cf_subdir\${section}/\${cf_target}"
13522
13523 CF_EOF
13524 fi
13525
13526 cat >>$cf_edit_man <<CF_EOF
13527         sed     -f $cf_man_alias \\
13528 CF_EOF
13529
13530 if test -f $MANPAGE_RENAMES ; then
13531 cat >>$cf_edit_man <<CF_EOF
13532                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13533 CF_EOF
13534 else
13535 cat >>$cf_edit_man <<CF_EOF
13536                 < \$i >\$TMP
13537 CF_EOF
13538 fi
13539
13540 cat >>$cf_edit_man <<CF_EOF
13541 if test \$cf_tables = yes ; then
13542         tbl \$TMP >\$TMP.out
13543         mv \$TMP.out \$TMP
13544 fi
13545 CF_EOF
13546
13547 if test $with_overwrite != yes ; then
13548 cat >>$cf_edit_man <<CF_EOF
13549         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13550         mv \$TMP.out \$TMP
13551 CF_EOF
13552 fi
13553
13554 if test $with_curses_h != yes ; then
13555 cat >>$cf_edit_man <<CF_EOF
13556         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13557         mv \$TMP.out \$TMP
13558 CF_EOF
13559 fi
13560
13561 cat >>$cf_edit_man <<CF_EOF
13562         if test \$form = format ; then
13563                 nroff -man \$TMP >\$TMP.out
13564                 mv \$TMP.out \$TMP
13565         fi
13566 CF_EOF
13567
13568 if test -n "$cf_compress" ; then
13569 cat >>$cf_edit_man <<CF_EOF
13570         if test \$verb = installing ; then
13571         if ( $cf_compress -f \$TMP )
13572         then
13573                 mv \$TMP.$cf_so_strip \$TMP
13574         fi
13575         fi
13576         cf_target="\$cf_target.$cf_so_strip"
13577 CF_EOF
13578 fi
13579
13580 case "$MANPAGE_FORMAT" in
13581 (*BSDI*)
13582 cat >>$cf_edit_man <<CF_EOF
13583         if test \$form = format ; then
13584                 # BSDI installs only .0 suffixes in the cat directories
13585                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13586         fi
13587 CF_EOF
13588   ;;
13589 esac
13590
13591 cat >>$cf_edit_man <<CF_EOF
13592         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13593         if test \$verb = installing ; then
13594                 echo \$verb \$cf_target
13595                 \$INSTALL_DATA \$TMP \$cf_target
13596                 test -d \$cf_subdir\${section} &&
13597                 test -n "\$aliases" && (
13598                         cd \$cf_subdir\${section} && (
13599                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13600                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13601                                 cf_target=\`basename \$cf_target\`
13602                                 for cf_alias in \$aliases
13603                                 do
13604                                         if test \$section = 1 ; then
13605                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13606                                         fi
13607
13608                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13609                                                 if test -f \$cf_alias\${suffix} ; then
13610                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13611                                                         then
13612                                                                 continue
13613                                                         fi
13614                                                 fi
13615                                                 echo .. \$verb alias \$cf_alias\${suffix}
13616 CF_EOF
13617 case "x$LN_S" in
13618 (*-f)
13619 cat >>$cf_edit_man <<CF_EOF
13620                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13621 CF_EOF
13622         ;;
13623 (*)
13624 cat >>$cf_edit_man <<CF_EOF
13625                                                 rm -f \$cf_alias\${suffix}
13626                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13627 CF_EOF
13628         ;;
13629 esac
13630 cat >>$cf_edit_man <<CF_EOF
13631                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13632                                                 echo ".so \$cf_source" >\$TMP
13633 CF_EOF
13634 if test -n "$cf_compress" ; then
13635 cat >>$cf_edit_man <<CF_EOF
13636                                                 if test -n "$cf_so_strip" ; then
13637                                                         $cf_compress -f \$TMP
13638                                                         mv \$TMP.$cf_so_strip \$TMP
13639                                                 fi
13640 CF_EOF
13641 fi
13642 cat >>$cf_edit_man <<CF_EOF
13643                                                 echo .. \$verb alias \$cf_alias\${suffix}
13644                                                 rm -f \$cf_alias\${suffix}
13645                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13646                                         fi
13647                                 done
13648                         )
13649                 )
13650         elif test \$verb = removing ; then
13651                 test -f \$cf_target && (
13652                         echo \$verb \$cf_target
13653                         rm -f \$cf_target
13654                 )
13655                 test -d \$cf_subdir\${section} &&
13656                 test -n "\$aliases" && (
13657                         cd \$cf_subdir\${section} && (
13658                                 for cf_alias in \$aliases
13659                                 do
13660                                         if test \$section = 1 ; then
13661                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13662                                         fi
13663
13664                                         echo .. \$verb alias \$cf_alias\${suffix}
13665                                         rm -f \$cf_alias\${suffix}
13666                                 done
13667                         )
13668                 )
13669         else
13670 #               echo ".hy 0"
13671                 cat \$TMP
13672         fi
13673         ;;
13674 esac
13675 done
13676
13677 if test $cf_inboth = yes ; then
13678 if test \$form != format ; then
13679         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13680 fi
13681 fi
13682
13683 exit 0
13684 CF_EOF
13685 chmod 755 $cf_edit_man
13686
13687 ###############################################################################
13688
13689 ### Note that some functions (such as const) are normally disabled anyway.
13690 echo "$as_me:13690: checking if you want to build with function extensions" >&5
13691 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13692
13693 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13694 if test "${enable_ext_funcs+set}" = set; then
13695   enableval="$enable_ext_funcs"
13696   with_ext_funcs=$enableval
13697 else
13698   with_ext_funcs=yes
13699 fi;
13700 echo "$as_me:13700: result: $with_ext_funcs" >&5
13701 echo "${ECHO_T}$with_ext_funcs" >&6
13702 if test "x$with_ext_funcs" = xyes ; then
13703         NCURSES_EXT_FUNCS=1
13704
13705 cat >>confdefs.h <<\EOF
13706 #define NCURSES_EXT_FUNCS 1
13707 EOF
13708
13709 cat >>confdefs.h <<\EOF
13710 #define HAVE_ASSUME_DEFAULT_COLORS 1
13711 EOF
13712
13713 cat >>confdefs.h <<\EOF
13714 #define HAVE_CURSES_VERSION 1
13715 EOF
13716
13717 cat >>confdefs.h <<\EOF
13718 #define HAVE_HAS_KEY 1
13719 EOF
13720
13721 cat >>confdefs.h <<\EOF
13722 #define HAVE_RESIZETERM 1
13723 EOF
13724
13725 cat >>confdefs.h <<\EOF
13726 #define HAVE_RESIZE_TERM 1
13727 EOF
13728
13729 cat >>confdefs.h <<\EOF
13730 #define HAVE_TERM_ENTRY_H 1
13731 EOF
13732
13733 cat >>confdefs.h <<\EOF
13734 #define HAVE_USE_DEFAULT_COLORS 1
13735 EOF
13736
13737 cat >>confdefs.h <<\EOF
13738 #define HAVE_USE_EXTENDED_NAMES 1
13739 EOF
13740
13741 cat >>confdefs.h <<\EOF
13742 #define HAVE_USE_SCREEN 1
13743 EOF
13744
13745 cat >>confdefs.h <<\EOF
13746 #define HAVE_USE_WINDOW 1
13747 EOF
13748
13749 cat >>confdefs.h <<\EOF
13750 #define HAVE_WRESIZE 1
13751 EOF
13752
13753         GENERATED_EXT_FUNCS=generated
13754         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13755 else
13756         NCURSES_EXT_FUNCS=0
13757         GENERATED_EXT_FUNCS=
13758 fi
13759
13760 echo "$as_me:13760: checking if you want to build with SCREEN extensions" >&5
13761 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13762
13763 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13764 if test "${enable_sp_funcs+set}" = set; then
13765   enableval="$enable_sp_funcs"
13766   with_sp_funcs=$enableval
13767 else
13768   with_sp_funcs=$cf_dft_ext_spfuncs
13769 fi;
13770 echo "$as_me:13770: result: $with_sp_funcs" >&5
13771 echo "${ECHO_T}$with_sp_funcs" >&6
13772 if test "x$with_sp_funcs" = xyes ; then
13773         NCURSES_SP_FUNCS=1
13774
13775 cat >>confdefs.h <<\EOF
13776 #define NCURSES_SP_FUNCS 1
13777 EOF
13778
13779 cat >>confdefs.h <<\EOF
13780 #define HAVE_TPUTS_SP 1
13781 EOF
13782
13783         GENERATED_SP_FUNCS=generated
13784 else
13785         NCURSES_SP_FUNCS=0
13786         GENERATED_SP_FUNCS=
13787 fi
13788
13789 echo "$as_me:13789: checking if you want to build with terminal-driver" >&5
13790 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13791
13792 # Check whether --enable-term-driver or --disable-term-driver was given.
13793 if test "${enable_term_driver+set}" = set; then
13794   enableval="$enable_term_driver"
13795   with_term_driver=$enableval
13796 else
13797   with_term_driver=no
13798 fi;
13799 echo "$as_me:13799: result: $with_term_driver" >&5
13800 echo "${ECHO_T}$with_term_driver" >&6
13801 if test "x$with_term_driver" = xyes ; then
13802
13803 cat >>confdefs.h <<\EOF
13804 #define USE_TERM_DRIVER 1
13805 EOF
13806
13807         if test "x$with_termlib" != xno ; then
13808                 { { echo "$as_me:13808: error: The term-driver option conflicts with the termlib option" >&5
13809 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13810    { (exit 1); exit 1; }; }
13811         fi
13812         if test "x$with_sp_funcs" != xyes ; then
13813                 { { echo "$as_me:13813: error: The term-driver option relies upon sp-funcs" >&5
13814 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13815    { (exit 1); exit 1; }; }
13816         fi
13817 fi
13818
13819 ###   use option --enable-const to turn on use of const beyond that in XSI.
13820 echo "$as_me:13820: checking for extended use of const keyword" >&5
13821 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13822
13823 # Check whether --enable-const or --disable-const was given.
13824 if test "${enable_const+set}" = set; then
13825   enableval="$enable_const"
13826   with_ext_const=$enableval
13827 else
13828   with_ext_const=$cf_dft_ext_const
13829 fi;
13830 echo "$as_me:13830: result: $with_ext_const" >&5
13831 echo "${ECHO_T}$with_ext_const" >&6
13832 NCURSES_CONST='/*nothing*/'
13833 if test "x$with_ext_const" = xyes ; then
13834         NCURSES_CONST=const
13835 fi
13836
13837 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13838 echo "$as_me:13838: checking if you want to use extended colors" >&5
13839 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13840
13841 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13842 if test "${enable_ext_colors+set}" = set; then
13843   enableval="$enable_ext_colors"
13844   with_ext_colors=$enableval
13845 else
13846   with_ext_colors=$cf_dft_ext_colors
13847 fi;
13848 echo "$as_me:13848: result: $with_ext_colors" >&5
13849 echo "${ECHO_T}$with_ext_colors" >&6
13850 NCURSES_EXT_COLORS=0
13851 if test "x$with_ext_colors" = xyes ; then
13852         if test "x$with_widec" != xyes ; then
13853                 { echo "$as_me:13853: WARNING: This option applies only to wide-character library" >&5
13854 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13855         else
13856                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13857
13858 if test "${with_abi_version+set}" != set; then
13859         case $cf_cv_rel_version in
13860         (5.*)
13861                 cf_cv_rel_version=6.0
13862                 cf_cv_abi_version=6
13863                 { echo "$as_me:13863: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13864 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13865                 ;;
13866         esac
13867 fi
13868
13869                 NCURSES_EXT_COLORS=1
13870
13871 cat >>confdefs.h <<\EOF
13872 #define NCURSES_EXT_COLORS 1
13873 EOF
13874
13875 cat >>confdefs.h <<\EOF
13876 #define HAVE_ALLOC_PAIR 1
13877 EOF
13878
13879 cat >>confdefs.h <<\EOF
13880 #define HAVE_INIT_EXTENDED_COLOR 1
13881 EOF
13882
13883 cat >>confdefs.h <<\EOF
13884 #define HAVE_RESET_COLOR_PAIRS 1
13885 EOF
13886
13887         fi
13888 fi
13889
13890 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13891 echo "$as_me:13891: checking if you want to use extended mouse encoding" >&5
13892 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13893
13894 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13895 if test "${enable_ext_mouse+set}" = set; then
13896   enableval="$enable_ext_mouse"
13897   with_ext_mouse=$enableval
13898 else
13899   with_ext_mouse=$cf_dft_ext_mouse
13900 fi;
13901 echo "$as_me:13901: result: $with_ext_mouse" >&5
13902 echo "${ECHO_T}$with_ext_mouse" >&6
13903 NCURSES_MOUSE_VERSION=1
13904 if test "x$with_ext_mouse" = xyes ; then
13905         NCURSES_MOUSE_VERSION=2
13906
13907 if test "${with_abi_version+set}" != set; then
13908         case $cf_cv_rel_version in
13909         (5.*)
13910                 cf_cv_rel_version=6.0
13911                 cf_cv_abi_version=6
13912                 { echo "$as_me:13912: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13913 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13914                 ;;
13915         esac
13916 fi
13917
13918 fi
13919
13920 ###   use option --enable-ext-putwin to turn on extended screendumps
13921 echo "$as_me:13921: checking if you want to use extended putwin/screendump" >&5
13922 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13923
13924 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13925 if test "${enable_ext_putwin+set}" = set; then
13926   enableval="$enable_ext_putwin"
13927   with_ext_putwin=$enableval
13928 else
13929   with_ext_putwin=$cf_dft_ext_putwin
13930 fi;
13931 echo "$as_me:13931: result: $with_ext_putwin" >&5
13932 echo "${ECHO_T}$with_ext_putwin" >&6
13933 if test "x$with_ext_putwin" = xyes ; then
13934
13935 cat >>confdefs.h <<\EOF
13936 #define NCURSES_EXT_PUTWIN 1
13937 EOF
13938
13939 fi
13940
13941 echo "$as_me:13941: checking if you want \$NCURSES_NO_PADDING code" >&5
13942 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
13943
13944 # Check whether --enable-no-padding or --disable-no-padding was given.
13945 if test "${enable_no_padding+set}" = set; then
13946   enableval="$enable_no_padding"
13947   with_no_padding=$enableval
13948 else
13949   with_no_padding=$with_ext_funcs
13950 fi;
13951 echo "$as_me:13951: result: $with_no_padding" >&5
13952 echo "${ECHO_T}$with_no_padding" >&6
13953 test "x$with_no_padding" = xyes &&
13954 cat >>confdefs.h <<\EOF
13955 #define NCURSES_NO_PADDING 1
13956 EOF
13957
13958 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
13959 echo "$as_me:13959: checking if you want SIGWINCH handler" >&5
13960 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
13961
13962 # Check whether --enable-sigwinch or --disable-sigwinch was given.
13963 if test "${enable_sigwinch+set}" = set; then
13964   enableval="$enable_sigwinch"
13965   with_sigwinch=$enableval
13966 else
13967   with_sigwinch=$with_ext_funcs
13968 fi;
13969 echo "$as_me:13969: result: $with_sigwinch" >&5
13970 echo "${ECHO_T}$with_sigwinch" >&6
13971 test "x$with_sigwinch" = xyes &&
13972 cat >>confdefs.h <<\EOF
13973 #define USE_SIGWINCH 1
13974 EOF
13975
13976 ###   use option --enable-tcap-names to allow user to define new capabilities
13977 echo "$as_me:13977: checking if you want user-definable terminal capabilities like termcap" >&5
13978 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
13979
13980 # Check whether --enable-tcap-names or --disable-tcap-names was given.
13981 if test "${enable_tcap_names+set}" = set; then
13982   enableval="$enable_tcap_names"
13983   with_tcap_names=$enableval
13984 else
13985   with_tcap_names=$with_ext_funcs
13986 fi;
13987 echo "$as_me:13987: result: $with_tcap_names" >&5
13988 echo "${ECHO_T}$with_tcap_names" >&6
13989 NCURSES_XNAMES=0
13990 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
13991
13992 ##############################################################################
13993
13994 echo "$as_me:13994: checking if you want to link with the pthread library" >&5
13995 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13996
13997 # Check whether --with-pthread or --without-pthread was given.
13998 if test "${with_pthread+set}" = set; then
13999   withval="$with_pthread"
14000   with_pthread=$withval
14001 else
14002   with_pthread=no
14003 fi;
14004 echo "$as_me:14004: result: $with_pthread" >&5
14005 echo "${ECHO_T}$with_pthread" >&6
14006
14007 if test "$with_pthread" != no ; then
14008         echo "$as_me:14008: checking for pthread.h" >&5
14009 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14010 if test "${ac_cv_header_pthread_h+set}" = set; then
14011   echo $ECHO_N "(cached) $ECHO_C" >&6
14012 else
14013   cat >conftest.$ac_ext <<_ACEOF
14014 #line 14014 "configure"
14015 #include "confdefs.h"
14016 #include <pthread.h>
14017 _ACEOF
14018 if { (eval echo "$as_me:14018: \"$ac_cpp conftest.$ac_ext\"") >&5
14019   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14020   ac_status=$?
14021   egrep -v '^ *\+' conftest.er1 >conftest.err
14022   rm -f conftest.er1
14023   cat conftest.err >&5
14024   echo "$as_me:14024: \$? = $ac_status" >&5
14025   (exit $ac_status); } >/dev/null; then
14026   if test -s conftest.err; then
14027     ac_cpp_err=$ac_c_preproc_warn_flag
14028   else
14029     ac_cpp_err=
14030   fi
14031 else
14032   ac_cpp_err=yes
14033 fi
14034 if test -z "$ac_cpp_err"; then
14035   ac_cv_header_pthread_h=yes
14036 else
14037   echo "$as_me: failed program was:" >&5
14038   cat conftest.$ac_ext >&5
14039   ac_cv_header_pthread_h=no
14040 fi
14041 rm -f conftest.err conftest.$ac_ext
14042 fi
14043 echo "$as_me:14043: result: $ac_cv_header_pthread_h" >&5
14044 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14045 if test $ac_cv_header_pthread_h = yes; then
14046
14047 cat >>confdefs.h <<\EOF
14048 #define HAVE_PTHREADS_H 1
14049 EOF
14050
14051         for cf_lib_pthread in pthread c_r
14052         do
14053             echo "$as_me:14053: checking if we can link with the $cf_lib_pthread library" >&5
14054 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14055             cf_save_LIBS="$LIBS"
14056
14057 cf_add_libs="-l$cf_lib_pthread"
14058 # Filter out duplicates - this happens with badly-designed ".pc" files...
14059 for cf_add_1lib in $LIBS
14060 do
14061         for cf_add_2lib in $cf_add_libs
14062         do
14063                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14064                 then
14065                         cf_add_1lib=
14066                         break
14067                 fi
14068         done
14069         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14070 done
14071 LIBS="$cf_add_libs"
14072
14073             cat >conftest.$ac_ext <<_ACEOF
14074 #line 14074 "configure"
14075 #include "confdefs.h"
14076
14077 #include <pthread.h>
14078
14079 int
14080 main (void)
14081 {
14082
14083                 int rc = pthread_create(0,0,0,0);
14084                 int r2 = pthread_mutexattr_settype(0, 0);
14085
14086   ;
14087   return 0;
14088 }
14089 _ACEOF
14090 rm -f conftest.$ac_objext conftest$ac_exeext
14091 if { (eval echo "$as_me:14091: \"$ac_link\"") >&5
14092   (eval $ac_link) 2>&5
14093   ac_status=$?
14094   echo "$as_me:14094: \$? = $ac_status" >&5
14095   (exit $ac_status); } &&
14096          { ac_try='test -s conftest$ac_exeext'
14097   { (eval echo "$as_me:14097: \"$ac_try\"") >&5
14098   (eval $ac_try) 2>&5
14099   ac_status=$?
14100   echo "$as_me:14100: \$? = $ac_status" >&5
14101   (exit $ac_status); }; }; then
14102   with_pthread=yes
14103 else
14104   echo "$as_me: failed program was:" >&5
14105 cat conftest.$ac_ext >&5
14106 with_pthread=no
14107 fi
14108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14109             LIBS="$cf_save_LIBS"
14110             echo "$as_me:14110: result: $with_pthread" >&5
14111 echo "${ECHO_T}$with_pthread" >&6
14112             test "$with_pthread" = yes && break
14113         done
14114
14115         if test "$with_pthread" = yes ; then
14116
14117 cf_add_libs="-l$cf_lib_pthread"
14118 # Filter out duplicates - this happens with badly-designed ".pc" files...
14119 for cf_add_1lib in $LIBS
14120 do
14121         for cf_add_2lib in $cf_add_libs
14122         do
14123                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14124                 then
14125                         cf_add_1lib=
14126                         break
14127                 fi
14128         done
14129         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14130 done
14131 LIBS="$cf_add_libs"
14132
14133 cat >>confdefs.h <<\EOF
14134 #define HAVE_LIBPTHREADS 1
14135 EOF
14136
14137         else
14138             { { echo "$as_me:14138: error: Cannot link with pthread library" >&5
14139 echo "$as_me: error: Cannot link with pthread library" >&2;}
14140    { (exit 1); exit 1; }; }
14141         fi
14142
14143 fi
14144
14145 fi
14146
14147 if test "x$with_pthread" != xno; then
14148         echo "$as_me:14148: checking for pthread_kill" >&5
14149 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14150 if test "${ac_cv_func_pthread_kill+set}" = set; then
14151   echo $ECHO_N "(cached) $ECHO_C" >&6
14152 else
14153   cat >conftest.$ac_ext <<_ACEOF
14154 #line 14154 "configure"
14155 #include "confdefs.h"
14156 /* System header to define __stub macros and hopefully few prototypes,
14157     which can conflict with char pthread_kill (); below.  */
14158 #include <assert.h>
14159 /* Override any gcc2 internal prototype to avoid an error.  */
14160 #ifdef __cplusplus
14161 extern "C"
14162 #endif
14163 /* We use char because int might match the return type of a gcc2
14164    builtin and then its argument prototype would still apply.  */
14165 char pthread_kill ();
14166 char (*f) ();
14167
14168 int
14169 main (void)
14170 {
14171 /* The GNU C library defines this for functions which it implements
14172     to always fail with ENOSYS.  Some functions are actually named
14173     something starting with __ and the normal name is an alias.  */
14174 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14175 choke me
14176 #else
14177 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14178 #endif
14179
14180   ;
14181   return 0;
14182 }
14183 _ACEOF
14184 rm -f conftest.$ac_objext conftest$ac_exeext
14185 if { (eval echo "$as_me:14185: \"$ac_link\"") >&5
14186   (eval $ac_link) 2>&5
14187   ac_status=$?
14188   echo "$as_me:14188: \$? = $ac_status" >&5
14189   (exit $ac_status); } &&
14190          { ac_try='test -s conftest$ac_exeext'
14191   { (eval echo "$as_me:14191: \"$ac_try\"") >&5
14192   (eval $ac_try) 2>&5
14193   ac_status=$?
14194   echo "$as_me:14194: \$? = $ac_status" >&5
14195   (exit $ac_status); }; }; then
14196   ac_cv_func_pthread_kill=yes
14197 else
14198   echo "$as_me: failed program was:" >&5
14199 cat conftest.$ac_ext >&5
14200 ac_cv_func_pthread_kill=no
14201 fi
14202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14203 fi
14204 echo "$as_me:14204: result: $ac_cv_func_pthread_kill" >&5
14205 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14206 if test $ac_cv_func_pthread_kill = yes; then
14207
14208                 echo "$as_me:14208: checking if you want to allow EINTR in wgetch with pthreads" >&5
14209 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14210
14211 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14212 if test "${enable_pthreads_eintr+set}" = set; then
14213   enableval="$enable_pthreads_eintr"
14214   use_pthreads_eintr=$enableval
14215 else
14216   use_pthreads_eintr=no
14217 fi;
14218                 echo "$as_me:14218: result: $use_pthreads_eintr" >&5
14219 echo "${ECHO_T}$use_pthreads_eintr" >&6
14220                 if test "x$use_pthreads_eintr" = xyes ; then
14221
14222 cat >>confdefs.h <<\EOF
14223 #define USE_PTHREADS_EINTR 1
14224 EOF
14225
14226                 fi
14227 fi
14228
14229         echo "$as_me:14229: checking if you want to use weak-symbols for pthreads" >&5
14230 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14231
14232 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14233 if test "${enable_weak_symbols+set}" = set; then
14234   enableval="$enable_weak_symbols"
14235   use_weak_symbols=$enableval
14236 else
14237   use_weak_symbols=no
14238 fi;
14239         echo "$as_me:14239: result: $use_weak_symbols" >&5
14240 echo "${ECHO_T}$use_weak_symbols" >&6
14241         if test "x$use_weak_symbols" = xyes ; then
14242
14243 echo "$as_me:14243: checking if $CC supports weak symbols" >&5
14244 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14245 if test "${cf_cv_weak_symbols+set}" = set; then
14246   echo $ECHO_N "(cached) $ECHO_C" >&6
14247 else
14248
14249 cat >conftest.$ac_ext <<_ACEOF
14250 #line 14250 "configure"
14251 #include "confdefs.h"
14252
14253 #include <stdio.h>
14254 int
14255 main (void)
14256 {
14257
14258 #if defined(__GNUC__)
14259 #  if defined __USE_ISOC99
14260 #    define _cat_pragma(exp)    _Pragma(#exp)
14261 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14262 #  else
14263 #    define _weak_pragma(exp)
14264 #  endif
14265 #  define _declare(name)        __extension__ extern __typeof__(name) name
14266 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14267 #endif
14268
14269 weak_symbol(fopen);
14270
14271   ;
14272   return 0;
14273 }
14274 _ACEOF
14275 rm -f conftest.$ac_objext
14276 if { (eval echo "$as_me:14276: \"$ac_compile\"") >&5
14277   (eval $ac_compile) 2>&5
14278   ac_status=$?
14279   echo "$as_me:14279: \$? = $ac_status" >&5
14280   (exit $ac_status); } &&
14281          { ac_try='test -s conftest.$ac_objext'
14282   { (eval echo "$as_me:14282: \"$ac_try\"") >&5
14283   (eval $ac_try) 2>&5
14284   ac_status=$?
14285   echo "$as_me:14285: \$? = $ac_status" >&5
14286   (exit $ac_status); }; }; then
14287   cf_cv_weak_symbols=yes
14288 else
14289   echo "$as_me: failed program was:" >&5
14290 cat conftest.$ac_ext >&5
14291 cf_cv_weak_symbols=no
14292 fi
14293 rm -f conftest.$ac_objext conftest.$ac_ext
14294
14295 fi
14296 echo "$as_me:14296: result: $cf_cv_weak_symbols" >&5
14297 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14298
14299         else
14300                 cf_cv_weak_symbols=no
14301         fi
14302
14303         if test "x$cf_cv_weak_symbols" = xyes ; then
14304
14305 cat >>confdefs.h <<\EOF
14306 #define USE_WEAK_SYMBOLS 1
14307 EOF
14308
14309         fi
14310 fi
14311
14312 PTHREAD=
14313 if test "x$with_pthread" = "xyes" ; then
14314
14315 cat >>confdefs.h <<\EOF
14316 #define USE_PTHREADS 1
14317 EOF
14318
14319         enable_reentrant=yes
14320         if test "x$cf_cv_weak_symbols" = xyes ; then
14321                 PTHREAD=-lpthread
14322
14323 cf_add_libs="-lpthread"
14324 # Filter out duplicates - this happens with badly-designed ".pc" files...
14325 for cf_add_1lib in $PRIVATE_LIBS
14326 do
14327         for cf_add_2lib in $cf_add_libs
14328         do
14329                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14330                 then
14331                         cf_add_1lib=
14332                         break
14333                 fi
14334         done
14335         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14336 done
14337 PRIVATE_LIBS="$cf_add_libs"
14338
14339         fi
14340 fi
14341
14342 # Reentrant code has to be opaque; there's little advantage to making ncurses
14343 # opaque outside of that, so there is no --enable-opaque option.  We can use
14344 # this option without --with-pthreads, but this will be always set for
14345 # pthreads.
14346 echo "$as_me:14346: checking if you want reentrant code" >&5
14347 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14348
14349 # Check whether --enable-reentrant or --disable-reentrant was given.
14350 if test "${enable_reentrant+set}" = set; then
14351   enableval="$enable_reentrant"
14352   with_reentrant=$enableval
14353 else
14354   with_reentrant=no
14355 fi;
14356 echo "$as_me:14356: result: $with_reentrant" >&5
14357 echo "${ECHO_T}$with_reentrant" >&6
14358 if test "x$with_reentrant" = xyes ; then
14359         cf_cv_enable_reentrant=1
14360         cf_cv_enable_opaque="NCURSES_INTERNALS"
14361         NCURSES_SIZE_T=int
14362         if test "x$cf_cv_weak_symbols" = xyes ; then
14363
14364 # remove pthread library from $LIBS
14365 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14366
14367 cf_add_libs="-lpthread"
14368 # Filter out duplicates - this happens with badly-designed ".pc" files...
14369 for cf_add_1lib in $TEST_LIBS
14370 do
14371         for cf_add_2lib in $cf_add_libs
14372         do
14373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14374                 then
14375                         cf_add_1lib=
14376                         break
14377                 fi
14378         done
14379         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14380 done
14381 TEST_LIBS="$cf_add_libs"
14382
14383 cf_add_libs="-lpthread"
14384 # Filter out duplicates - this happens with badly-designed ".pc" files...
14385 for cf_add_1lib in $TEST_LIBS2
14386 do
14387         for cf_add_2lib in $cf_add_libs
14388         do
14389                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14390                 then
14391                         cf_add_1lib=
14392                         break
14393                 fi
14394         done
14395         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14396 done
14397 TEST_LIBS2="$cf_add_libs"
14398
14399 cf_add_libs="-lpthread"
14400 # Filter out duplicates - this happens with badly-designed ".pc" files...
14401 for cf_add_1lib in $PRIVATE_LIBS
14402 do
14403         for cf_add_2lib in $cf_add_libs
14404         do
14405                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14406                 then
14407                         cf_add_1lib=
14408                         break
14409                 fi
14410         done
14411         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14412 done
14413 PRIVATE_LIBS="$cf_add_libs"
14414
14415         else
14416                 # when not using weak symbols but with_reentrant,
14417                 # add 't' to the library suffix on all platforms
14418                 # except cygwin, where we only do that if ALSO
14419                 # compiling with full thread support.
14420                 case "$host" in
14421                 (*cygwin* | *msys*)
14422                         if test "$with_pthread" = "yes" ; then
14423                                 if test "x$disable_lib_suffixes" = "xno" ; then
14424                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14425                                 fi
14426                         fi ;;
14427                 (*)
14428                         if test "x$disable_lib_suffixes" = "xno" ; then
14429                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14430                         fi
14431                         ;;
14432                 esac
14433         fi
14434
14435 cat >>confdefs.h <<\EOF
14436 #define USE_REENTRANT 1
14437 EOF
14438
14439 if test "${with_abi_version+set}" != set; then
14440         case $cf_cv_rel_version in
14441         (5.*)
14442                 cf_cv_rel_version=6.0
14443                 cf_cv_abi_version=6
14444                 { echo "$as_me:14444: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14445 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14446                 ;;
14447         esac
14448 fi
14449
14450 else
14451         cf_cv_enable_reentrant=0
14452         cf_cv_enable_opaque="NCURSES_OPAQUE"
14453         NCURSES_SIZE_T=short
14454 fi
14455
14456 echo "$as_me:14456: checking if you want opaque curses-library structures" >&5
14457 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14458
14459 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14460 if test "${enable_opaque_curses+set}" = set; then
14461   enableval="$enable_opaque_curses"
14462   test "$enableval" != yes && enableval=no
14463         if test "$enableval" != "no" ; then
14464     enable_opaque_curses=yes
14465         else
14466
14467          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14468          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14469
14470         fi
14471 else
14472   enableval=no
14473
14474          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14475          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14476
14477 fi;
14478 echo "$as_me:14478: result: $enable_opaque_curses" >&5
14479 echo "${ECHO_T}$enable_opaque_curses" >&6
14480
14481 test "$cf_cv_enable_reentrant" = 1 && \
14482 test "$enable_opaque_curses" = no && \
14483 { { echo "$as_me:14483: error: reentrant configuration requires opaque library" >&5
14484 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14485    { (exit 1); exit 1; }; }
14486
14487 echo "$as_me:14487: checking if you want opaque form-library structures" >&5
14488 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14489
14490 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14491 if test "${enable_opaque_form+set}" = set; then
14492   enableval="$enable_opaque_form"
14493   enable_opaque_form=yes
14494 else
14495   enable_opaque_form=no
14496 fi;
14497 echo "$as_me:14497: result: $enable_opaque_form" >&5
14498 echo "${ECHO_T}$enable_opaque_form" >&6
14499
14500 echo "$as_me:14500: checking if you want opaque menu-library structures" >&5
14501 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14502
14503 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14504 if test "${enable_opaque_menu+set}" = set; then
14505   enableval="$enable_opaque_menu"
14506   enable_opaque_menu=yes
14507 else
14508   enable_opaque_menu=no
14509 fi;
14510 echo "$as_me:14510: result: $enable_opaque_menu" >&5
14511 echo "${ECHO_T}$enable_opaque_menu" >&6
14512
14513 echo "$as_me:14513: checking if you want opaque panel-library structures" >&5
14514 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14515
14516 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14517 if test "${enable_opaque_panel+set}" = set; then
14518   enableval="$enable_opaque_panel"
14519   enable_opaque_panel=yes
14520 else
14521   enable_opaque_panel=no
14522 fi;
14523 echo "$as_me:14523: result: $enable_opaque_panel" >&5
14524 echo "${ECHO_T}$enable_opaque_panel" >&6
14525
14526 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14527 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14528 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14529 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14530
14531 ### Allow using a different wrap-prefix
14532 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14533         echo "$as_me:14533: checking for prefix used to wrap public variables" >&5
14534 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14535
14536 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14537 if test "${with_wrap_prefix+set}" = set; then
14538   withval="$with_wrap_prefix"
14539   NCURSES_WRAP_PREFIX=$withval
14540 else
14541   NCURSES_WRAP_PREFIX=_nc_
14542 fi;
14543         echo "$as_me:14543: result: $NCURSES_WRAP_PREFIX" >&5
14544 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14545 else
14546         NCURSES_WRAP_PREFIX=_nc_
14547 fi
14548
14549 cat >>confdefs.h <<EOF
14550 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14551 EOF
14552
14553 ###############################################################################
14554 # These options are relatively safe to experiment with.
14555
14556 echo "$as_me:14556: checking if you want all development code" >&5
14557 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14558
14559 # Check whether --with-develop or --without-develop was given.
14560 if test "${with_develop+set}" = set; then
14561   withval="$with_develop"
14562   with_develop=$withval
14563 else
14564   with_develop=no
14565 fi;
14566 echo "$as_me:14566: result: $with_develop" >&5
14567 echo "${ECHO_T}$with_develop" >&6
14568
14569 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14570 echo "$as_me:14570: checking if you want hard-tabs code" >&5
14571 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14572
14573 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14574 if test "${enable_hard_tabs+set}" = set; then
14575   enableval="$enable_hard_tabs"
14576
14577 else
14578   enable_hard_tabs=$with_develop
14579 fi;
14580 echo "$as_me:14580: result: $enable_hard_tabs" >&5
14581 echo "${ECHO_T}$enable_hard_tabs" >&6
14582 test "x$enable_hard_tabs" = xyes &&
14583 cat >>confdefs.h <<\EOF
14584 #define USE_HARD_TABS 1
14585 EOF
14586
14587 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14588 echo "$as_me:14588: checking if you want limited support for xmc" >&5
14589 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14590
14591 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14592 if test "${enable_xmc_glitch+set}" = set; then
14593   enableval="$enable_xmc_glitch"
14594
14595 else
14596   enable_xmc_glitch=$with_develop
14597 fi;
14598 echo "$as_me:14598: result: $enable_xmc_glitch" >&5
14599 echo "${ECHO_T}$enable_xmc_glitch" >&6
14600 test "x$enable_xmc_glitch" = xyes &&
14601 cat >>confdefs.h <<\EOF
14602 #define USE_XMC_SUPPORT 1
14603 EOF
14604
14605 ###############################################################################
14606 # These are just experimental, probably should not be in a package:
14607
14608 echo "$as_me:14608: checking if you do not want to assume colors are white-on-black" >&5
14609 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14610
14611 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14612 if test "${enable_assumed_color+set}" = set; then
14613   enableval="$enable_assumed_color"
14614   with_assumed_color=$enableval
14615 else
14616   with_assumed_color=yes
14617 fi;
14618 echo "$as_me:14618: result: $with_assumed_color" >&5
14619 echo "${ECHO_T}$with_assumed_color" >&6
14620 test "x$with_assumed_color" = xyes &&
14621 cat >>confdefs.h <<\EOF
14622 #define USE_ASSUMED_COLOR 1
14623 EOF
14624
14625 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14626 echo "$as_me:14626: checking if you want hashmap scrolling-optimization code" >&5
14627 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14628
14629 # Check whether --enable-hashmap or --disable-hashmap was given.
14630 if test "${enable_hashmap+set}" = set; then
14631   enableval="$enable_hashmap"
14632   with_hashmap=$enableval
14633 else
14634   with_hashmap=yes
14635 fi;
14636 echo "$as_me:14636: result: $with_hashmap" >&5
14637 echo "${ECHO_T}$with_hashmap" >&6
14638 test "x$with_hashmap" = xyes &&
14639 cat >>confdefs.h <<\EOF
14640 #define USE_HASHMAP 1
14641 EOF
14642
14643 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14644 echo "$as_me:14644: checking if you want colorfgbg code" >&5
14645 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14646
14647 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14648 if test "${enable_colorfgbg+set}" = set; then
14649   enableval="$enable_colorfgbg"
14650   with_colorfgbg=$enableval
14651 else
14652   with_colorfgbg=no
14653 fi;
14654 echo "$as_me:14654: result: $with_colorfgbg" >&5
14655 echo "${ECHO_T}$with_colorfgbg" >&6
14656 test "x$with_colorfgbg" = xyes &&
14657 cat >>confdefs.h <<\EOF
14658 #define USE_COLORFGBG 1
14659 EOF
14660
14661 ###   use option --enable-interop to turn on use of bindings used for interop
14662 echo "$as_me:14662: checking if you want interop bindings" >&5
14663 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14664
14665 # Check whether --enable-interop or --disable-interop was given.
14666 if test "${enable_interop+set}" = set; then
14667   enableval="$enable_interop"
14668   with_exp_interop=$enableval
14669 else
14670   with_exp_interop=$cf_dft_interop
14671 fi;
14672 echo "$as_me:14672: result: $with_exp_interop" >&5
14673 echo "${ECHO_T}$with_exp_interop" >&6
14674
14675 NCURSES_INTEROP_FUNCS=0
14676 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14677
14678 echo "$as_me:14678: checking if you want experimental safe-sprintf code" >&5
14679 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14680
14681 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14682 if test "${enable_safe_sprintf+set}" = set; then
14683   enableval="$enable_safe_sprintf"
14684   with_safe_sprintf=$enableval
14685 else
14686   with_safe_sprintf=no
14687 fi;
14688 echo "$as_me:14688: result: $with_safe_sprintf" >&5
14689 echo "${ECHO_T}$with_safe_sprintf" >&6
14690
14691 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14692 # when hashmap is used scroll hints are useless
14693 if test "$with_hashmap" = no ; then
14694 echo "$as_me:14694: checking if you want to experiment without scrolling-hints code" >&5
14695 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14696
14697 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14698 if test "${enable_scroll_hints+set}" = set; then
14699   enableval="$enable_scroll_hints"
14700   with_scroll_hints=$enableval
14701 else
14702   with_scroll_hints=yes
14703 fi;
14704 echo "$as_me:14704: result: $with_scroll_hints" >&5
14705 echo "${ECHO_T}$with_scroll_hints" >&6
14706 test "x$with_scroll_hints" = xyes &&
14707 cat >>confdefs.h <<\EOF
14708 #define USE_SCROLL_HINTS 1
14709 EOF
14710
14711 fi
14712
14713 echo "$as_me:14713: checking if you want wgetch-events code" >&5
14714 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14715
14716 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14717 if test "${enable_wgetch_events+set}" = set; then
14718   enableval="$enable_wgetch_events"
14719   with_wgetch_events=$enableval
14720 else
14721   with_wgetch_events=no
14722 fi;
14723 echo "$as_me:14723: result: $with_wgetch_events" >&5
14724 echo "${ECHO_T}$with_wgetch_events" >&6
14725 test "x$with_wgetch_events" = xyes &&
14726 cat >>confdefs.h <<\EOF
14727 #define NCURSES_WGETCH_EVENTS 1
14728 EOF
14729
14730 ###############################################################################
14731
14732 ###     use option --disable-echo to suppress full display compiling commands
14733
14734 echo "$as_me:14734: checking if you want to see long compiling messages" >&5
14735 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14736
14737 # Check whether --enable-echo or --disable-echo was given.
14738 if test "${enable_echo+set}" = set; then
14739   enableval="$enable_echo"
14740   test "$enableval" != no && enableval=yes
14741         if test "$enableval" != "yes" ; then
14742
14743         ECHO_LT='--silent'
14744         ECHO_LD='@echo linking $@;'
14745         RULE_CC='@echo compiling $<'
14746         SHOW_CC='@echo compiling $@'
14747         ECHO_CC='@'
14748
14749         else
14750
14751         ECHO_LT=''
14752         ECHO_LD=''
14753         RULE_CC=''
14754         SHOW_CC=''
14755         ECHO_CC=''
14756
14757         fi
14758 else
14759   enableval=yes
14760
14761         ECHO_LT=''
14762         ECHO_LD=''
14763         RULE_CC=''
14764         SHOW_CC=''
14765         ECHO_CC=''
14766
14767 fi;
14768 echo "$as_me:14768: result: $enableval" >&5
14769 echo "${ECHO_T}$enableval" >&6
14770
14771 if test "x$enable_echo" = xyes; then
14772         ECHO_LINK=
14773 else
14774         ECHO_LINK='@ echo linking $@ ... ;'
14775         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14776         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14777 fi
14778
14779 # --disable-stripping is used for debugging
14780
14781 echo "$as_me:14781: checking if you want to install stripped executables" >&5
14782 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14783
14784 # Check whether --enable-stripping or --disable-stripping was given.
14785 if test "${enable_stripping+set}" = set; then
14786   enableval="$enable_stripping"
14787   test "$enableval" != no && enableval=yes
14788         if test "$enableval" != "yes" ; then
14789     with_stripping=no
14790         else
14791                 with_stripping=yes
14792         fi
14793 else
14794   enableval=yes
14795         with_stripping=yes
14796
14797 fi;
14798 echo "$as_me:14798: result: $with_stripping" >&5
14799 echo "${ECHO_T}$with_stripping" >&6
14800
14801 if test "$with_stripping" = yes
14802 then
14803         INSTALL_OPT_S="-s"
14804 else
14805         INSTALL_OPT_S=
14806 fi
14807
14808 : ${INSTALL:=install}
14809 echo "$as_me:14809: checking if install accepts -p option" >&5
14810 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
14811 if test "${cf_cv_install_p+set}" = set; then
14812   echo $ECHO_N "(cached) $ECHO_C" >&6
14813 else
14814
14815         rm -rf conftest*
14816         date >conftest.in
14817         mkdir conftest.out
14818         sleep 3
14819         if $INSTALL -p conftest.in conftest.out 2>/dev/null
14820         then
14821                 if test -f conftest.out/conftest.in
14822                 then
14823                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
14824                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
14825                         if test -s conftest.err
14826                         then
14827                                 cf_cv_install_p=no
14828                         else
14829                                 cf_cv_install_p=yes
14830                         fi
14831                 else
14832                         cf_cv_install_p=no
14833                 fi
14834         else
14835                 cf_cv_install_p=no
14836         fi
14837         rm -rf conftest*
14838
14839 fi
14840 echo "$as_me:14840: result: $cf_cv_install_p" >&5
14841 echo "${ECHO_T}$cf_cv_install_p" >&6
14842
14843 echo "$as_me:14843: checking if install needs to be told about ownership" >&5
14844 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14845 case `$ac_config_guess` in
14846 (*minix)
14847         with_install_o=yes
14848         ;;
14849 (*)
14850         with_install_o=no
14851         ;;
14852 esac
14853
14854 echo "$as_me:14854: result: $with_install_o" >&5
14855 echo "${ECHO_T}$with_install_o" >&6
14856 if test "x$with_install_o" = xyes
14857 then
14858         INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
14859 else
14860         INSTALL_OPT_O=
14861 fi
14862
14863 # If we're avoiding relinking of shared libraries during install, that is to
14864 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
14865 # the install program has "-p" (for preserving timestamps).
14866 cf_cv_do_reranlib=yes
14867 if test "x$cf_cv_install_p" = xyes
14868 then
14869         if test "x$cf_cv_do_relink" != xyes
14870         then
14871                 cf_cv_do_reranlib=no
14872                 INSTALL_OPT_P="-p"
14873                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
14874         fi
14875 fi
14876
14877 ###     use option --enable-warnings to turn on all gcc warnings
14878 echo "$as_me:14878: checking if you want to see compiler warnings" >&5
14879 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14880
14881 # Check whether --enable-warnings or --disable-warnings was given.
14882 if test "${enable_warnings+set}" = set; then
14883   enableval="$enable_warnings"
14884   with_warnings=$enableval
14885 fi;
14886 echo "$as_me:14886: result: $with_warnings" >&5
14887 echo "${ECHO_T}$with_warnings" >&6
14888
14889 if test "x$with_warnings" = "xyes"; then
14890
14891         ADAFLAGS="$ADAFLAGS -gnatg"
14892
14893 INTEL_COMPILER=no
14894
14895 if test "$GCC" = yes ; then
14896         case $host_os in
14897         (linux*|gnu*)
14898                 echo "$as_me:14898: checking if this is really Intel C compiler" >&5
14899 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14900                 cf_save_CFLAGS="$CFLAGS"
14901                 CFLAGS="$CFLAGS -no-gcc"
14902                 cat >conftest.$ac_ext <<_ACEOF
14903 #line 14903 "configure"
14904 #include "confdefs.h"
14905
14906 int
14907 main (void)
14908 {
14909
14910 #ifdef __INTEL_COMPILER
14911 #else
14912 make an error
14913 #endif
14914
14915   ;
14916   return 0;
14917 }
14918 _ACEOF
14919 rm -f conftest.$ac_objext
14920 if { (eval echo "$as_me:14920: \"$ac_compile\"") >&5
14921   (eval $ac_compile) 2>&5
14922   ac_status=$?
14923   echo "$as_me:14923: \$? = $ac_status" >&5
14924   (exit $ac_status); } &&
14925          { ac_try='test -s conftest.$ac_objext'
14926   { (eval echo "$as_me:14926: \"$ac_try\"") >&5
14927   (eval $ac_try) 2>&5
14928   ac_status=$?
14929   echo "$as_me:14929: \$? = $ac_status" >&5
14930   (exit $ac_status); }; }; then
14931   INTEL_COMPILER=yes
14932 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14933
14934 else
14935   echo "$as_me: failed program was:" >&5
14936 cat conftest.$ac_ext >&5
14937 fi
14938 rm -f conftest.$ac_objext conftest.$ac_ext
14939                 CFLAGS="$cf_save_CFLAGS"
14940                 echo "$as_me:14940: result: $INTEL_COMPILER" >&5
14941 echo "${ECHO_T}$INTEL_COMPILER" >&6
14942                 ;;
14943         esac
14944 fi
14945
14946 CLANG_COMPILER=no
14947
14948 if test "$GCC" = yes ; then
14949         echo "$as_me:14949: checking if this is really Clang C compiler" >&5
14950 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
14951         cf_save_CFLAGS="$CFLAGS"
14952         CFLAGS="$CFLAGS -Qunused-arguments"
14953         cat >conftest.$ac_ext <<_ACEOF
14954 #line 14954 "configure"
14955 #include "confdefs.h"
14956
14957 int
14958 main (void)
14959 {
14960
14961 #ifdef __clang__
14962 #else
14963 make an error
14964 #endif
14965
14966   ;
14967   return 0;
14968 }
14969 _ACEOF
14970 rm -f conftest.$ac_objext
14971 if { (eval echo "$as_me:14971: \"$ac_compile\"") >&5
14972   (eval $ac_compile) 2>&5
14973   ac_status=$?
14974   echo "$as_me:14974: \$? = $ac_status" >&5
14975   (exit $ac_status); } &&
14976          { ac_try='test -s conftest.$ac_objext'
14977   { (eval echo "$as_me:14977: \"$ac_try\"") >&5
14978   (eval $ac_try) 2>&5
14979   ac_status=$?
14980   echo "$as_me:14980: \$? = $ac_status" >&5
14981   (exit $ac_status); }; }; then
14982   CLANG_COMPILER=yes
14983 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14984
14985 else
14986   echo "$as_me: failed program was:" >&5
14987 cat conftest.$ac_ext >&5
14988 fi
14989 rm -f conftest.$ac_objext conftest.$ac_ext
14990         CFLAGS="$cf_save_CFLAGS"
14991         echo "$as_me:14991: result: $CLANG_COMPILER" >&5
14992 echo "${ECHO_T}$CLANG_COMPILER" >&6
14993 fi
14994
14995 cat > conftest.$ac_ext <<EOF
14996 #line 14996 "${as_me:-configure}"
14997 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14998 EOF
14999
15000 if test "$INTEL_COMPILER" = yes
15001 then
15002 # The "-wdXXX" options suppress warnings:
15003 # remark #1419: external declaration in primary source file
15004 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15005 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15006 # remark #193: zero used for undefined preprocessing identifier
15007 # remark #593: variable "curs_sb_left_arrow" was set but never used
15008 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15009 # remark #869: parameter "tw" was never referenced
15010 # remark #981: operands are evaluated in unspecified order
15011 # warning #279: controlling expression is constant
15012
15013         { echo "$as_me:15013: checking for $CC warning options..." >&5
15014 echo "$as_me: checking for $CC warning options..." >&6;}
15015         cf_save_CFLAGS="$CFLAGS"
15016         EXTRA_CFLAGS="-Wall"
15017         for cf_opt in \
15018                 wd1419 \
15019                 wd1683 \
15020                 wd1684 \
15021                 wd193 \
15022                 wd593 \
15023                 wd279 \
15024                 wd810 \
15025                 wd869 \
15026                 wd981
15027         do
15028                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15029                 if { (eval echo "$as_me:15029: \"$ac_compile\"") >&5
15030   (eval $ac_compile) 2>&5
15031   ac_status=$?
15032   echo "$as_me:15032: \$? = $ac_status" >&5
15033   (exit $ac_status); }; then
15034                         test -n "$verbose" && echo "$as_me:15034: result: ... -$cf_opt" >&5
15035 echo "${ECHO_T}... -$cf_opt" >&6
15036                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15037                 fi
15038         done
15039         CFLAGS="$cf_save_CFLAGS"
15040
15041 elif test "$GCC" = yes
15042 then
15043         { echo "$as_me:15043: checking for $CC warning options..." >&5
15044 echo "$as_me: checking for $CC warning options..." >&6;}
15045         cf_save_CFLAGS="$CFLAGS"
15046         EXTRA_CFLAGS=
15047         cf_warn_CONST=""
15048         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15049         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15050         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15051         for cf_opt in W Wall \
15052                 Wbad-function-cast \
15053                 Wcast-align \
15054                 Wcast-qual \
15055                 Wdeclaration-after-statement \
15056                 Wextra \
15057                 Winline \
15058                 Wmissing-declarations \
15059                 Wmissing-prototypes \
15060                 Wnested-externs \
15061                 Wpointer-arith \
15062                 Wshadow \
15063                 Wstrict-prototypes \
15064                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15065         do
15066                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15067                 if { (eval echo "$as_me:15067: \"$ac_compile\"") >&5
15068   (eval $ac_compile) 2>&5
15069   ac_status=$?
15070   echo "$as_me:15070: \$? = $ac_status" >&5
15071   (exit $ac_status); }; then
15072                         test -n "$verbose" && echo "$as_me:15072: result: ... -$cf_opt" >&5
15073 echo "${ECHO_T}... -$cf_opt" >&6
15074                         case $cf_opt in
15075                         (Wcast-qual)
15076
15077         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15078         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15079
15080                                 ;;
15081                         (Winline)
15082                                 case $GCC_VERSION in
15083                                 ([34].*)
15084                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15085
15086 echo "${as_me:-configure}:15086: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15087
15088                                         continue;;
15089                                 esac
15090                                 ;;
15091                         (Wpointer-arith)
15092                                 case $GCC_VERSION in
15093                                 ([12].*)
15094                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15095
15096 echo "${as_me:-configure}:15096: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15097
15098                                         continue;;
15099                                 esac
15100                                 ;;
15101                         esac
15102                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15103                 fi
15104         done
15105         CFLAGS="$cf_save_CFLAGS"
15106 fi
15107 rm -rf conftest*
15108
15109         if test "x$cf_with_cxx" = xyes ; then
15110
15111 INTEL_CPLUSPLUS=no
15112
15113 if test "$GCC" = yes ; then
15114         case $host_os in
15115         (linux*|gnu*)
15116                 echo "$as_me:15116: checking if this is really Intel C++ compiler" >&5
15117 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15118                 cf_save_CFLAGS="$CXXFLAGS"
15119                 CXXFLAGS="$CXXFLAGS -no-gcc"
15120                 cat >conftest.$ac_ext <<_ACEOF
15121 #line 15121 "configure"
15122 #include "confdefs.h"
15123
15124 int
15125 main (void)
15126 {
15127
15128 #ifdef __INTEL_COMPILER
15129 #else
15130 make an error
15131 #endif
15132
15133   ;
15134   return 0;
15135 }
15136 _ACEOF
15137 rm -f conftest.$ac_objext
15138 if { (eval echo "$as_me:15138: \"$ac_compile\"") >&5
15139   (eval $ac_compile) 2>&5
15140   ac_status=$?
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit $ac_status); } &&
15143          { ac_try='test -s conftest.$ac_objext'
15144   { (eval echo "$as_me:15144: \"$ac_try\"") >&5
15145   (eval $ac_try) 2>&5
15146   ac_status=$?
15147   echo "$as_me:15147: \$? = $ac_status" >&5
15148   (exit $ac_status); }; }; then
15149   INTEL_CPLUSPLUS=yes
15150 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15151
15152 else
15153   echo "$as_me: failed program was:" >&5
15154 cat conftest.$ac_ext >&5
15155 fi
15156 rm -f conftest.$ac_objext conftest.$ac_ext
15157                 CXXFLAGS="$cf_save_CFLAGS"
15158                 echo "$as_me:15158: result: $INTEL_CPLUSPLUS" >&5
15159 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15160                 ;;
15161         esac
15162 fi
15163
15164 CLANG_CPLUSPLUS=no
15165
15166 if test "$GCC" = yes ; then
15167         echo "$as_me:15167: checking if this is really Clang C++ compiler" >&5
15168 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15169         cf_save_CFLAGS="$CXXFLAGS"
15170         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15171         cat >conftest.$ac_ext <<_ACEOF
15172 #line 15172 "configure"
15173 #include "confdefs.h"
15174
15175 int
15176 main (void)
15177 {
15178
15179 #ifdef __clang__
15180 #else
15181 make an error
15182 #endif
15183
15184   ;
15185   return 0;
15186 }
15187 _ACEOF
15188 rm -f conftest.$ac_objext
15189 if { (eval echo "$as_me:15189: \"$ac_compile\"") >&5
15190   (eval $ac_compile) 2>&5
15191   ac_status=$?
15192   echo "$as_me:15192: \$? = $ac_status" >&5
15193   (exit $ac_status); } &&
15194          { ac_try='test -s conftest.$ac_objext'
15195   { (eval echo "$as_me:15195: \"$ac_try\"") >&5
15196   (eval $ac_try) 2>&5
15197   ac_status=$?
15198   echo "$as_me:15198: \$? = $ac_status" >&5
15199   (exit $ac_status); }; }; then
15200   CLANG_CPLUSPLUS=yes
15201 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15202
15203 else
15204   echo "$as_me: failed program was:" >&5
15205 cat conftest.$ac_ext >&5
15206 fi
15207 rm -f conftest.$ac_objext conftest.$ac_ext
15208         CXXFLAGS="$cf_save_CFLAGS"
15209         echo "$as_me:15209: result: $CLANG_CPLUSPLUS" >&5
15210 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15211 fi
15212
15213 ac_ext=cc
15214 ac_cpp='$CXXCPP $CPPFLAGS'
15215 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15216 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15217 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15218 ac_main_return=return
15219
15220 cat > conftest.$ac_ext <<EOF
15221 #line 15221 "configure"
15222 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15223 EOF
15224
15225 if test "$INTEL_CPLUSPLUS" = yes
15226 then
15227 # The "-wdXXX" options suppress warnings:
15228 # remark #1419: external declaration in primary source file
15229 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15230 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15231 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15232 # remark #193: zero used for undefined preprocessing identifier
15233 # remark #593: variable "curs_sb_left_arrow" was set but never used
15234 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15235 # remark #869: parameter "tw" was never referenced
15236 # remark #981: operands are evaluated in unspecified order
15237 # warning #269: invalid format string conversion
15238
15239         { echo "$as_me:15239: checking for $CC warning options..." >&5
15240 echo "$as_me: checking for $CC warning options..." >&6;}
15241         cf_save_CXXFLAGS="$CXXFLAGS"
15242         EXTRA_CXXFLAGS="-Wall"
15243         for cf_opt in \
15244                 wd1419 \
15245                 wd1682 \
15246                 wd1683 \
15247                 wd1684 \
15248                 wd193 \
15249                 wd279 \
15250                 wd593 \
15251                 wd810 \
15252                 wd869 \
15253                 wd981
15254         do
15255                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15256                 if { (eval echo "$as_me:15256: \"$ac_compile\"") >&5
15257   (eval $ac_compile) 2>&5
15258   ac_status=$?
15259   echo "$as_me:15259: \$? = $ac_status" >&5
15260   (exit $ac_status); }; then
15261                         test -n "$verbose" && echo "$as_me:15261: result: ... -$cf_opt" >&5
15262 echo "${ECHO_T}... -$cf_opt" >&6
15263                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15264                 fi
15265         done
15266         CXXFLAGS="$cf_save_CXXFLAGS"
15267
15268 elif test "$GXX" = yes
15269 then
15270         { echo "$as_me:15270: checking for $CXX warning options..." >&5
15271 echo "$as_me: checking for $CXX warning options..." >&6;}
15272         cf_save_CXXFLAGS="$CXXFLAGS"
15273         EXTRA_CXXFLAGS="-W -Wall"
15274         cf_gxx_extra_warnings=""
15275         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15276         case "$GCC_VERSION" in
15277         ([1-2].*)
15278                 ;;
15279         (*)
15280                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15281                 ;;
15282         esac
15283         for cf_opt in \
15284                 Wabi \
15285                 fabi-version=0 \
15286                 Wextra \
15287                 Wignored-qualifiers \
15288                 Wlogical-op \
15289                 Woverloaded-virtual \
15290                 Wsign-promo \
15291                 Wsynth \
15292                 Wold-style-cast \
15293                 Wcast-align \
15294                 Wcast-qual \
15295                 Wpointer-arith \
15296                 Wshadow \
15297                 Wundef $cf_gxx_extra_warnings Wno-unused
15298         do
15299                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15300                 if { (eval echo "$as_me:15300: \"$ac_compile\"") >&5
15301   (eval $ac_compile) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); }; then
15305                         test -n "$verbose" && echo "$as_me:15305: result: ... -$cf_opt" >&5
15306 echo "${ECHO_T}... -$cf_opt" >&6
15307                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15308                 else
15309                         test -n "$verbose" && echo "$as_me:15309: result: ... no -$cf_opt" >&5
15310 echo "${ECHO_T}... no -$cf_opt" >&6
15311                 fi
15312         done
15313         CXXFLAGS="$cf_save_CXXFLAGS"
15314 fi
15315
15316 rm -rf conftest*
15317 ac_ext=c
15318 ac_cpp='$CPP $CPPFLAGS'
15319 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15320 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15321 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15322 ac_main_return=return
15323
15324         fi
15325 fi
15326
15327 if test "$GCC" = yes
15328 then
15329 cat > conftest.i <<EOF
15330 #ifndef GCC_PRINTF
15331 #define GCC_PRINTF 0
15332 #endif
15333 #ifndef GCC_SCANF
15334 #define GCC_SCANF 0
15335 #endif
15336 #ifndef GCC_NORETURN
15337 #define GCC_NORETURN /* nothing */
15338 #endif
15339 #ifndef GCC_UNUSED
15340 #define GCC_UNUSED /* nothing */
15341 #endif
15342 EOF
15343 if test "$GCC" = yes
15344 then
15345         { echo "$as_me:15345: checking for $CC __attribute__ directives..." >&5
15346 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15347 cat > conftest.$ac_ext <<EOF
15348 #line 15348 "${as_me:-configure}"
15349 #include "confdefs.h"
15350 #include "conftest.h"
15351 #include "conftest.i"
15352 #if     GCC_PRINTF
15353 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15354 #else
15355 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15356 #endif
15357 #if     GCC_SCANF
15358 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15359 #else
15360 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15361 #endif
15362 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15363 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15364 extern void foo(void) GCC_NORETURN;
15365 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15366 EOF
15367         cf_printf_attribute=no
15368         cf_scanf_attribute=no
15369         for cf_attribute in scanf printf unused noreturn
15370         do
15371
15372 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15373
15374                 cf_directive="__attribute__(($cf_attribute))"
15375                 echo "checking for $CC $cf_directive" 1>&5
15376
15377                 case $cf_attribute in
15378                 (printf)
15379                         cf_printf_attribute=yes
15380                         cat >conftest.h <<EOF
15381 #define GCC_$cf_ATTRIBUTE 1
15382 EOF
15383                         ;;
15384                 (scanf)
15385                         cf_scanf_attribute=yes
15386                         cat >conftest.h <<EOF
15387 #define GCC_$cf_ATTRIBUTE 1
15388 EOF
15389                         ;;
15390                 (*)
15391                         cat >conftest.h <<EOF
15392 #define GCC_$cf_ATTRIBUTE $cf_directive
15393 EOF
15394                         ;;
15395                 esac
15396
15397                 if { (eval echo "$as_me:15397: \"$ac_compile\"") >&5
15398   (eval $ac_compile) 2>&5
15399   ac_status=$?
15400   echo "$as_me:15400: \$? = $ac_status" >&5
15401   (exit $ac_status); }; then
15402                         test -n "$verbose" && echo "$as_me:15402: result: ... $cf_attribute" >&5
15403 echo "${ECHO_T}... $cf_attribute" >&6
15404                         cat conftest.h >>confdefs.h
15405                         case $cf_attribute in
15406                         (noreturn)
15407
15408 cat >>confdefs.h <<EOF
15409 #define GCC_NORETURN $cf_directive
15410 EOF
15411
15412                                 ;;
15413                         (printf)
15414                                 cf_value='/* nothing */'
15415                                 if test "$cf_printf_attribute" != no ; then
15416                                         cf_value='__attribute__((format(printf,fmt,var)))'
15417
15418 cat >>confdefs.h <<\EOF
15419 #define GCC_PRINTF 1
15420 EOF
15421
15422                                 fi
15423
15424 cat >>confdefs.h <<EOF
15425 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15426 EOF
15427
15428                                 ;;
15429                         (scanf)
15430                                 cf_value='/* nothing */'
15431                                 if test "$cf_scanf_attribute" != no ; then
15432                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15433
15434 cat >>confdefs.h <<\EOF
15435 #define GCC_SCANF 1
15436 EOF
15437
15438                                 fi
15439
15440 cat >>confdefs.h <<EOF
15441 #define GCC_SCANFLIKE(fmt,var) $cf_value
15442 EOF
15443
15444                                 ;;
15445                         (unused)
15446
15447 cat >>confdefs.h <<EOF
15448 #define GCC_UNUSED $cf_directive
15449 EOF
15450
15451                                 ;;
15452                         esac
15453                 fi
15454         done
15455 else
15456         fgrep define conftest.i >>confdefs.h
15457 fi
15458 rm -rf conftest*
15459 fi
15460
15461 echo "$as_me:15461: checking if you want to work around bogus compiler/loader warnings" >&5
15462 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15463
15464 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15465 if test "${enable_string_hacks+set}" = set; then
15466   enableval="$enable_string_hacks"
15467   with_string_hacks=$enableval
15468 else
15469   with_string_hacks=no
15470 fi;
15471 echo "$as_me:15471: result: $with_string_hacks" >&5
15472 echo "${ECHO_T}$with_string_hacks" >&6
15473
15474 if test "x$with_string_hacks" = "xyes"; then
15475
15476 cat >>confdefs.h <<\EOF
15477 #define USE_STRING_HACKS 1
15478 EOF
15479
15480         { echo "$as_me:15480: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15481 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15482         echo "$as_me:15482: checking for strlcat" >&5
15483 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15484 if test "${ac_cv_func_strlcat+set}" = set; then
15485   echo $ECHO_N "(cached) $ECHO_C" >&6
15486 else
15487   cat >conftest.$ac_ext <<_ACEOF
15488 #line 15488 "configure"
15489 #include "confdefs.h"
15490 /* System header to define __stub macros and hopefully few prototypes,
15491     which can conflict with char strlcat (); below.  */
15492 #include <assert.h>
15493 /* Override any gcc2 internal prototype to avoid an error.  */
15494 #ifdef __cplusplus
15495 extern "C"
15496 #endif
15497 /* We use char because int might match the return type of a gcc2
15498    builtin and then its argument prototype would still apply.  */
15499 char strlcat ();
15500 char (*f) ();
15501
15502 int
15503 main (void)
15504 {
15505 /* The GNU C library defines this for functions which it implements
15506     to always fail with ENOSYS.  Some functions are actually named
15507     something starting with __ and the normal name is an alias.  */
15508 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15509 choke me
15510 #else
15511 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15512 #endif
15513
15514   ;
15515   return 0;
15516 }
15517 _ACEOF
15518 rm -f conftest.$ac_objext conftest$ac_exeext
15519 if { (eval echo "$as_me:15519: \"$ac_link\"") >&5
15520   (eval $ac_link) 2>&5
15521   ac_status=$?
15522   echo "$as_me:15522: \$? = $ac_status" >&5
15523   (exit $ac_status); } &&
15524          { ac_try='test -s conftest$ac_exeext'
15525   { (eval echo "$as_me:15525: \"$ac_try\"") >&5
15526   (eval $ac_try) 2>&5
15527   ac_status=$?
15528   echo "$as_me:15528: \$? = $ac_status" >&5
15529   (exit $ac_status); }; }; then
15530   ac_cv_func_strlcat=yes
15531 else
15532   echo "$as_me: failed program was:" >&5
15533 cat conftest.$ac_ext >&5
15534 ac_cv_func_strlcat=no
15535 fi
15536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15537 fi
15538 echo "$as_me:15538: result: $ac_cv_func_strlcat" >&5
15539 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15540 if test $ac_cv_func_strlcat = yes; then
15541
15542 cat >>confdefs.h <<\EOF
15543 #define HAVE_STRLCAT 1
15544 EOF
15545
15546 else
15547
15548                 echo "$as_me:15548: checking for strlcat in -lbsd" >&5
15549 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15550 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15551   echo $ECHO_N "(cached) $ECHO_C" >&6
15552 else
15553   ac_check_lib_save_LIBS=$LIBS
15554 LIBS="-lbsd  $LIBS"
15555 cat >conftest.$ac_ext <<_ACEOF
15556 #line 15556 "configure"
15557 #include "confdefs.h"
15558
15559 /* Override any gcc2 internal prototype to avoid an error.  */
15560 #ifdef __cplusplus
15561 extern "C"
15562 #endif
15563 /* We use char because int might match the return type of a gcc2
15564    builtin and then its argument prototype would still apply.  */
15565 char strlcat ();
15566 int
15567 main (void)
15568 {
15569 strlcat ();
15570   ;
15571   return 0;
15572 }
15573 _ACEOF
15574 rm -f conftest.$ac_objext conftest$ac_exeext
15575 if { (eval echo "$as_me:15575: \"$ac_link\"") >&5
15576   (eval $ac_link) 2>&5
15577   ac_status=$?
15578   echo "$as_me:15578: \$? = $ac_status" >&5
15579   (exit $ac_status); } &&
15580          { ac_try='test -s conftest$ac_exeext'
15581   { (eval echo "$as_me:15581: \"$ac_try\"") >&5
15582   (eval $ac_try) 2>&5
15583   ac_status=$?
15584   echo "$as_me:15584: \$? = $ac_status" >&5
15585   (exit $ac_status); }; }; then
15586   ac_cv_lib_bsd_strlcat=yes
15587 else
15588   echo "$as_me: failed program was:" >&5
15589 cat conftest.$ac_ext >&5
15590 ac_cv_lib_bsd_strlcat=no
15591 fi
15592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15593 LIBS=$ac_check_lib_save_LIBS
15594 fi
15595 echo "$as_me:15595: result: $ac_cv_lib_bsd_strlcat" >&5
15596 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15597 if test $ac_cv_lib_bsd_strlcat = yes; then
15598
15599 cf_add_libs="-lbsd"
15600 # Filter out duplicates - this happens with badly-designed ".pc" files...
15601 for cf_add_1lib in $LIBS
15602 do
15603         for cf_add_2lib in $cf_add_libs
15604         do
15605                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15606                 then
15607                         cf_add_1lib=
15608                         break
15609                 fi
15610         done
15611         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15612 done
15613 LIBS="$cf_add_libs"
15614
15615 for ac_header in bsd/string.h
15616 do
15617 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15618 echo "$as_me:15618: checking for $ac_header" >&5
15619 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15620 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15621   echo $ECHO_N "(cached) $ECHO_C" >&6
15622 else
15623   cat >conftest.$ac_ext <<_ACEOF
15624 #line 15624 "configure"
15625 #include "confdefs.h"
15626 #include <$ac_header>
15627 _ACEOF
15628 if { (eval echo "$as_me:15628: \"$ac_cpp conftest.$ac_ext\"") >&5
15629   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15630   ac_status=$?
15631   egrep -v '^ *\+' conftest.er1 >conftest.err
15632   rm -f conftest.er1
15633   cat conftest.err >&5
15634   echo "$as_me:15634: \$? = $ac_status" >&5
15635   (exit $ac_status); } >/dev/null; then
15636   if test -s conftest.err; then
15637     ac_cpp_err=$ac_c_preproc_warn_flag
15638   else
15639     ac_cpp_err=
15640   fi
15641 else
15642   ac_cpp_err=yes
15643 fi
15644 if test -z "$ac_cpp_err"; then
15645   eval "$as_ac_Header=yes"
15646 else
15647   echo "$as_me: failed program was:" >&5
15648   cat conftest.$ac_ext >&5
15649   eval "$as_ac_Header=no"
15650 fi
15651 rm -f conftest.err conftest.$ac_ext
15652 fi
15653 echo "$as_me:15653: result: `eval echo '${'$as_ac_Header'}'`" >&5
15654 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15655 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15656   cat >>confdefs.h <<EOF
15657 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15658 EOF
15659
15660 fi
15661 done
15662
15663 cat >>confdefs.h <<\EOF
15664 #define HAVE_STRLCAT 1
15665 EOF
15666
15667 fi
15668
15669 fi
15670
15671 for ac_func in strlcpy snprintf
15672 do
15673 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15674 echo "$as_me:15674: checking for $ac_func" >&5
15675 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15676 if eval "test \"\${$as_ac_var+set}\" = set"; then
15677   echo $ECHO_N "(cached) $ECHO_C" >&6
15678 else
15679   cat >conftest.$ac_ext <<_ACEOF
15680 #line 15680 "configure"
15681 #include "confdefs.h"
15682 /* System header to define __stub macros and hopefully few prototypes,
15683     which can conflict with char $ac_func (); below.  */
15684 #include <assert.h>
15685 /* Override any gcc2 internal prototype to avoid an error.  */
15686 #ifdef __cplusplus
15687 extern "C"
15688 #endif
15689 /* We use char because int might match the return type of a gcc2
15690    builtin and then its argument prototype would still apply.  */
15691 char $ac_func ();
15692 char (*f) ();
15693
15694 int
15695 main (void)
15696 {
15697 /* The GNU C library defines this for functions which it implements
15698     to always fail with ENOSYS.  Some functions are actually named
15699     something starting with __ and the normal name is an alias.  */
15700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15701 choke me
15702 #else
15703 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15704 #endif
15705
15706   ;
15707   return 0;
15708 }
15709 _ACEOF
15710 rm -f conftest.$ac_objext conftest$ac_exeext
15711 if { (eval echo "$as_me:15711: \"$ac_link\"") >&5
15712   (eval $ac_link) 2>&5
15713   ac_status=$?
15714   echo "$as_me:15714: \$? = $ac_status" >&5
15715   (exit $ac_status); } &&
15716          { ac_try='test -s conftest$ac_exeext'
15717   { (eval echo "$as_me:15717: \"$ac_try\"") >&5
15718   (eval $ac_try) 2>&5
15719   ac_status=$?
15720   echo "$as_me:15720: \$? = $ac_status" >&5
15721   (exit $ac_status); }; }; then
15722   eval "$as_ac_var=yes"
15723 else
15724   echo "$as_me: failed program was:" >&5
15725 cat conftest.$ac_ext >&5
15726 eval "$as_ac_var=no"
15727 fi
15728 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15729 fi
15730 echo "$as_me:15730: result: `eval echo '${'$as_ac_var'}'`" >&5
15731 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15732 if test `eval echo '${'$as_ac_var'}'` = yes; then
15733   cat >>confdefs.h <<EOF
15734 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15735 EOF
15736
15737 fi
15738 done
15739
15740 fi
15741
15742 ###     use option --enable-assertions to turn on generation of assertion code
15743 echo "$as_me:15743: checking if you want to enable runtime assertions" >&5
15744 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15745
15746 # Check whether --enable-assertions or --disable-assertions was given.
15747 if test "${enable_assertions+set}" = set; then
15748   enableval="$enable_assertions"
15749   with_assertions=$enableval
15750 else
15751   with_assertions=no
15752 fi;
15753 echo "$as_me:15753: result: $with_assertions" >&5
15754 echo "${ECHO_T}$with_assertions" >&6
15755 if test -n "$GCC"
15756 then
15757         if test "$with_assertions" = no
15758         then
15759                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15760         else
15761
15762         ADAFLAGS="$ADAFLAGS -gnata"
15763
15764         fi
15765 fi
15766
15767 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15768
15769 echo "$as_me:15769: checking if you want to use dmalloc for testing" >&5
15770 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15771
15772 # Check whether --with-dmalloc or --without-dmalloc was given.
15773 if test "${with_dmalloc+set}" = set; then
15774   withval="$with_dmalloc"
15775
15776 cat >>confdefs.h <<EOF
15777 #define USE_DMALLOC 1
15778 EOF
15779
15780         : ${with_cflags:=-g}
15781         : ${with_no_leaks:=yes}
15782          with_dmalloc=yes
15783 else
15784   with_dmalloc=
15785 fi;
15786 echo "$as_me:15786: result: ${with_dmalloc:-no}" >&5
15787 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15788
15789 case .$with_cflags in
15790 (.*-g*)
15791         case .$CFLAGS in
15792         (.*-g*)
15793                 ;;
15794         (*)
15795
15796 cf_fix_cppflags=no
15797 cf_new_cflags=
15798 cf_new_cppflags=
15799 cf_new_extra_cppflags=
15800
15801 for cf_add_cflags in -g
15802 do
15803 case $cf_fix_cppflags in
15804 (no)
15805         case $cf_add_cflags in
15806         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15807                 case $cf_add_cflags in
15808                 (-D*)
15809                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15810
15811                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15812                                 && test -z "${cf_tst_cflags}" \
15813                                 && cf_fix_cppflags=yes
15814
15815                         if test $cf_fix_cppflags = yes ; then
15816
15817         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15818         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15819
15820                                 continue
15821                         elif test "${cf_tst_cflags}" = "\"'" ; then
15822
15823         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15824         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15825
15826                                 continue
15827                         fi
15828                         ;;
15829                 esac
15830                 case "$CPPFLAGS" in
15831                 (*$cf_add_cflags)
15832                         ;;
15833                 (*)
15834                         case $cf_add_cflags in
15835                         (-D*)
15836                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15837
15838 CPPFLAGS=`echo "$CPPFLAGS" | \
15839         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15840                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15841
15842                                 ;;
15843                         esac
15844
15845         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15846         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15847
15848                         ;;
15849                 esac
15850                 ;;
15851         (*)
15852
15853         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15854         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15855
15856                 ;;
15857         esac
15858         ;;
15859 (yes)
15860
15861         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15862         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15863
15864         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15865
15866         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15867                 && test -z "${cf_tst_cflags}" \
15868                 && cf_fix_cppflags=no
15869         ;;
15870 esac
15871 done
15872
15873 if test -n "$cf_new_cflags" ; then
15874
15875         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15876         CFLAGS="${CFLAGS}$cf_new_cflags"
15877
15878 fi
15879
15880 if test -n "$cf_new_cppflags" ; then
15881
15882         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15883         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15884
15885 fi
15886
15887 if test -n "$cf_new_extra_cppflags" ; then
15888
15889         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15890         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15891
15892 fi
15893
15894                 ;;
15895         esac
15896         ;;
15897 esac
15898
15899 if test "$with_dmalloc" = yes ; then
15900         echo "$as_me:15900: checking for dmalloc.h" >&5
15901 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15902 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   cat >conftest.$ac_ext <<_ACEOF
15906 #line 15906 "configure"
15907 #include "confdefs.h"
15908 #include <dmalloc.h>
15909 _ACEOF
15910 if { (eval echo "$as_me:15910: \"$ac_cpp conftest.$ac_ext\"") >&5
15911   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15912   ac_status=$?
15913   egrep -v '^ *\+' conftest.er1 >conftest.err
15914   rm -f conftest.er1
15915   cat conftest.err >&5
15916   echo "$as_me:15916: \$? = $ac_status" >&5
15917   (exit $ac_status); } >/dev/null; then
15918   if test -s conftest.err; then
15919     ac_cpp_err=$ac_c_preproc_warn_flag
15920   else
15921     ac_cpp_err=
15922   fi
15923 else
15924   ac_cpp_err=yes
15925 fi
15926 if test -z "$ac_cpp_err"; then
15927   ac_cv_header_dmalloc_h=yes
15928 else
15929   echo "$as_me: failed program was:" >&5
15930   cat conftest.$ac_ext >&5
15931   ac_cv_header_dmalloc_h=no
15932 fi
15933 rm -f conftest.err conftest.$ac_ext
15934 fi
15935 echo "$as_me:15935: result: $ac_cv_header_dmalloc_h" >&5
15936 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15937 if test $ac_cv_header_dmalloc_h = yes; then
15938
15939 echo "$as_me:15939: checking for dmalloc_debug in -ldmalloc" >&5
15940 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
15941 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
15942   echo $ECHO_N "(cached) $ECHO_C" >&6
15943 else
15944   ac_check_lib_save_LIBS=$LIBS
15945 LIBS="-ldmalloc  $LIBS"
15946 cat >conftest.$ac_ext <<_ACEOF
15947 #line 15947 "configure"
15948 #include "confdefs.h"
15949
15950 /* Override any gcc2 internal prototype to avoid an error.  */
15951 #ifdef __cplusplus
15952 extern "C"
15953 #endif
15954 /* We use char because int might match the return type of a gcc2
15955    builtin and then its argument prototype would still apply.  */
15956 char dmalloc_debug ();
15957 int
15958 main (void)
15959 {
15960 dmalloc_debug ();
15961   ;
15962   return 0;
15963 }
15964 _ACEOF
15965 rm -f conftest.$ac_objext conftest$ac_exeext
15966 if { (eval echo "$as_me:15966: \"$ac_link\"") >&5
15967   (eval $ac_link) 2>&5
15968   ac_status=$?
15969   echo "$as_me:15969: \$? = $ac_status" >&5
15970   (exit $ac_status); } &&
15971          { ac_try='test -s conftest$ac_exeext'
15972   { (eval echo "$as_me:15972: \"$ac_try\"") >&5
15973   (eval $ac_try) 2>&5
15974   ac_status=$?
15975   echo "$as_me:15975: \$? = $ac_status" >&5
15976   (exit $ac_status); }; }; then
15977   ac_cv_lib_dmalloc_dmalloc_debug=yes
15978 else
15979   echo "$as_me: failed program was:" >&5
15980 cat conftest.$ac_ext >&5
15981 ac_cv_lib_dmalloc_dmalloc_debug=no
15982 fi
15983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15984 LIBS=$ac_check_lib_save_LIBS
15985 fi
15986 echo "$as_me:15986: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
15987 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
15988 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
15989   cat >>confdefs.h <<EOF
15990 #define HAVE_LIBDMALLOC 1
15991 EOF
15992
15993   LIBS="-ldmalloc $LIBS"
15994
15995 fi
15996
15997 fi
15998
15999 fi
16000
16001 echo "$as_me:16001: checking if you want to use dbmalloc for testing" >&5
16002 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16003
16004 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16005 if test "${with_dbmalloc+set}" = set; then
16006   withval="$with_dbmalloc"
16007
16008 cat >>confdefs.h <<EOF
16009 #define USE_DBMALLOC 1
16010 EOF
16011
16012         : ${with_cflags:=-g}
16013         : ${with_no_leaks:=yes}
16014          with_dbmalloc=yes
16015 else
16016   with_dbmalloc=
16017 fi;
16018 echo "$as_me:16018: result: ${with_dbmalloc:-no}" >&5
16019 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16020
16021 case .$with_cflags in
16022 (.*-g*)
16023         case .$CFLAGS in
16024         (.*-g*)
16025                 ;;
16026         (*)
16027
16028 cf_fix_cppflags=no
16029 cf_new_cflags=
16030 cf_new_cppflags=
16031 cf_new_extra_cppflags=
16032
16033 for cf_add_cflags in -g
16034 do
16035 case $cf_fix_cppflags in
16036 (no)
16037         case $cf_add_cflags in
16038         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16039                 case $cf_add_cflags in
16040                 (-D*)
16041                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16042
16043                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16044                                 && test -z "${cf_tst_cflags}" \
16045                                 && cf_fix_cppflags=yes
16046
16047                         if test $cf_fix_cppflags = yes ; then
16048
16049         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16050         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16051
16052                                 continue
16053                         elif test "${cf_tst_cflags}" = "\"'" ; then
16054
16055         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16056         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16057
16058                                 continue
16059                         fi
16060                         ;;
16061                 esac
16062                 case "$CPPFLAGS" in
16063                 (*$cf_add_cflags)
16064                         ;;
16065                 (*)
16066                         case $cf_add_cflags in
16067                         (-D*)
16068                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16069
16070 CPPFLAGS=`echo "$CPPFLAGS" | \
16071         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16072                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16073
16074                                 ;;
16075                         esac
16076
16077         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16078         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16079
16080                         ;;
16081                 esac
16082                 ;;
16083         (*)
16084
16085         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16086         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16087
16088                 ;;
16089         esac
16090         ;;
16091 (yes)
16092
16093         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16094         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16095
16096         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16097
16098         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16099                 && test -z "${cf_tst_cflags}" \
16100                 && cf_fix_cppflags=no
16101         ;;
16102 esac
16103 done
16104
16105 if test -n "$cf_new_cflags" ; then
16106
16107         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16108         CFLAGS="${CFLAGS}$cf_new_cflags"
16109
16110 fi
16111
16112 if test -n "$cf_new_cppflags" ; then
16113
16114         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16115         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16116
16117 fi
16118
16119 if test -n "$cf_new_extra_cppflags" ; then
16120
16121         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16122         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16123
16124 fi
16125
16126                 ;;
16127         esac
16128         ;;
16129 esac
16130
16131 if test "$with_dbmalloc" = yes ; then
16132         echo "$as_me:16132: checking for dbmalloc.h" >&5
16133 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16134 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16135   echo $ECHO_N "(cached) $ECHO_C" >&6
16136 else
16137   cat >conftest.$ac_ext <<_ACEOF
16138 #line 16138 "configure"
16139 #include "confdefs.h"
16140 #include <dbmalloc.h>
16141 _ACEOF
16142 if { (eval echo "$as_me:16142: \"$ac_cpp conftest.$ac_ext\"") >&5
16143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16144   ac_status=$?
16145   egrep -v '^ *\+' conftest.er1 >conftest.err
16146   rm -f conftest.er1
16147   cat conftest.err >&5
16148   echo "$as_me:16148: \$? = $ac_status" >&5
16149   (exit $ac_status); } >/dev/null; then
16150   if test -s conftest.err; then
16151     ac_cpp_err=$ac_c_preproc_warn_flag
16152   else
16153     ac_cpp_err=
16154   fi
16155 else
16156   ac_cpp_err=yes
16157 fi
16158 if test -z "$ac_cpp_err"; then
16159   ac_cv_header_dbmalloc_h=yes
16160 else
16161   echo "$as_me: failed program was:" >&5
16162   cat conftest.$ac_ext >&5
16163   ac_cv_header_dbmalloc_h=no
16164 fi
16165 rm -f conftest.err conftest.$ac_ext
16166 fi
16167 echo "$as_me:16167: result: $ac_cv_header_dbmalloc_h" >&5
16168 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16169 if test $ac_cv_header_dbmalloc_h = yes; then
16170
16171 echo "$as_me:16171: checking for debug_malloc in -ldbmalloc" >&5
16172 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16173 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16174   echo $ECHO_N "(cached) $ECHO_C" >&6
16175 else
16176   ac_check_lib_save_LIBS=$LIBS
16177 LIBS="-ldbmalloc  $LIBS"
16178 cat >conftest.$ac_ext <<_ACEOF
16179 #line 16179 "configure"
16180 #include "confdefs.h"
16181
16182 /* Override any gcc2 internal prototype to avoid an error.  */
16183 #ifdef __cplusplus
16184 extern "C"
16185 #endif
16186 /* We use char because int might match the return type of a gcc2
16187    builtin and then its argument prototype would still apply.  */
16188 char debug_malloc ();
16189 int
16190 main (void)
16191 {
16192 debug_malloc ();
16193   ;
16194   return 0;
16195 }
16196 _ACEOF
16197 rm -f conftest.$ac_objext conftest$ac_exeext
16198 if { (eval echo "$as_me:16198: \"$ac_link\"") >&5
16199   (eval $ac_link) 2>&5
16200   ac_status=$?
16201   echo "$as_me:16201: \$? = $ac_status" >&5
16202   (exit $ac_status); } &&
16203          { ac_try='test -s conftest$ac_exeext'
16204   { (eval echo "$as_me:16204: \"$ac_try\"") >&5
16205   (eval $ac_try) 2>&5
16206   ac_status=$?
16207   echo "$as_me:16207: \$? = $ac_status" >&5
16208   (exit $ac_status); }; }; then
16209   ac_cv_lib_dbmalloc_debug_malloc=yes
16210 else
16211   echo "$as_me: failed program was:" >&5
16212 cat conftest.$ac_ext >&5
16213 ac_cv_lib_dbmalloc_debug_malloc=no
16214 fi
16215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16216 LIBS=$ac_check_lib_save_LIBS
16217 fi
16218 echo "$as_me:16218: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16219 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16220 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16221   cat >>confdefs.h <<EOF
16222 #define HAVE_LIBDBMALLOC 1
16223 EOF
16224
16225   LIBS="-ldbmalloc $LIBS"
16226
16227 fi
16228
16229 fi
16230
16231 fi
16232
16233 echo "$as_me:16233: checking if you want to use valgrind for testing" >&5
16234 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16235
16236 # Check whether --with-valgrind or --without-valgrind was given.
16237 if test "${with_valgrind+set}" = set; then
16238   withval="$with_valgrind"
16239
16240 cat >>confdefs.h <<EOF
16241 #define USE_VALGRIND 1
16242 EOF
16243
16244         : ${with_cflags:=-g}
16245         : ${with_no_leaks:=yes}
16246          with_valgrind=yes
16247 else
16248   with_valgrind=
16249 fi;
16250 echo "$as_me:16250: result: ${with_valgrind:-no}" >&5
16251 echo "${ECHO_T}${with_valgrind:-no}" >&6
16252
16253 case .$with_cflags in
16254 (.*-g*)
16255         case .$CFLAGS in
16256         (.*-g*)
16257                 ;;
16258         (*)
16259
16260 cf_fix_cppflags=no
16261 cf_new_cflags=
16262 cf_new_cppflags=
16263 cf_new_extra_cppflags=
16264
16265 for cf_add_cflags in -g
16266 do
16267 case $cf_fix_cppflags in
16268 (no)
16269         case $cf_add_cflags in
16270         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16271                 case $cf_add_cflags in
16272                 (-D*)
16273                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16274
16275                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16276                                 && test -z "${cf_tst_cflags}" \
16277                                 && cf_fix_cppflags=yes
16278
16279                         if test $cf_fix_cppflags = yes ; then
16280
16281         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16282         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16283
16284                                 continue
16285                         elif test "${cf_tst_cflags}" = "\"'" ; then
16286
16287         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16288         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16289
16290                                 continue
16291                         fi
16292                         ;;
16293                 esac
16294                 case "$CPPFLAGS" in
16295                 (*$cf_add_cflags)
16296                         ;;
16297                 (*)
16298                         case $cf_add_cflags in
16299                         (-D*)
16300                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16301
16302 CPPFLAGS=`echo "$CPPFLAGS" | \
16303         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16304                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16305
16306                                 ;;
16307                         esac
16308
16309         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16310         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16311
16312                         ;;
16313                 esac
16314                 ;;
16315         (*)
16316
16317         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16318         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16319
16320                 ;;
16321         esac
16322         ;;
16323 (yes)
16324
16325         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16326         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16327
16328         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16329
16330         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16331                 && test -z "${cf_tst_cflags}" \
16332                 && cf_fix_cppflags=no
16333         ;;
16334 esac
16335 done
16336
16337 if test -n "$cf_new_cflags" ; then
16338
16339         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16340         CFLAGS="${CFLAGS}$cf_new_cflags"
16341
16342 fi
16343
16344 if test -n "$cf_new_cppflags" ; then
16345
16346         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16347         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16348
16349 fi
16350
16351 if test -n "$cf_new_extra_cppflags" ; then
16352
16353         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16354         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16355
16356 fi
16357
16358                 ;;
16359         esac
16360         ;;
16361 esac
16362
16363 echo "$as_me:16363: checking if you want to perform memory-leak testing" >&5
16364 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16365
16366 # Check whether --enable-leaks or --disable-leaks was given.
16367 if test "${enable_leaks+set}" = set; then
16368   enableval="$enable_leaks"
16369   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16370 else
16371   : ${with_no_leaks:=no}
16372 fi;
16373 echo "$as_me:16373: result: $with_no_leaks" >&5
16374 echo "${ECHO_T}$with_no_leaks" >&6
16375
16376 if test "$with_no_leaks" = yes ; then
16377
16378 cat >>confdefs.h <<\EOF
16379 #define NO_LEAKS 1
16380 EOF
16381
16382 cat >>confdefs.h <<\EOF
16383 #define YY_NO_LEAKS 1
16384 EOF
16385
16386 fi
16387
16388 cat >>confdefs.h <<\EOF
16389 #define HAVE_NC_ALLOC_H 1
16390 EOF
16391
16392 ###     use option --enable-expanded to generate certain macros as functions
16393
16394 # Check whether --enable-expanded or --disable-expanded was given.
16395 if test "${enable_expanded+set}" = set; then
16396   enableval="$enable_expanded"
16397   test "x$enableval" = xyes &&
16398 cat >>confdefs.h <<\EOF
16399 #define NCURSES_EXPANDED 1
16400 EOF
16401
16402 fi;
16403
16404 ###     use option --disable-macros to suppress macros in favor of functions
16405
16406 # Check whether --enable-macros or --disable-macros was given.
16407 if test "${enable_macros+set}" = set; then
16408   enableval="$enable_macros"
16409   test "$enableval" = no &&
16410 cat >>confdefs.h <<\EOF
16411 #define NCURSES_NOMACROS 1
16412 EOF
16413
16414 fi;
16415
16416 # Normally we only add trace() to the debug-library.  Allow this to be
16417 # extended to all models of the ncurses library:
16418 cf_all_traces=no
16419 case "$CFLAGS $CPPFLAGS" in
16420 (*-DTRACE*)
16421         cf_all_traces=yes
16422         ;;
16423 esac
16424
16425 echo "$as_me:16425: checking whether to add trace feature to all models" >&5
16426 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16427
16428 # Check whether --with-trace or --without-trace was given.
16429 if test "${with_trace+set}" = set; then
16430   withval="$with_trace"
16431   cf_with_trace=$withval
16432 else
16433   cf_with_trace=$cf_all_traces
16434 fi;
16435 echo "$as_me:16435: result: $cf_with_trace" >&5
16436 echo "${ECHO_T}$cf_with_trace" >&6
16437
16438 if test "x$cf_with_trace" = xyes ; then
16439         LIB_TRACING=all
16440         ADA_TRACE=TRUE
16441
16442 cf_fix_cppflags=no
16443 cf_new_cflags=
16444 cf_new_cppflags=
16445 cf_new_extra_cppflags=
16446
16447 for cf_add_cflags in -DTRACE
16448 do
16449 case $cf_fix_cppflags in
16450 (no)
16451         case $cf_add_cflags in
16452         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16453                 case $cf_add_cflags in
16454                 (-D*)
16455                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16456
16457                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16458                                 && test -z "${cf_tst_cflags}" \
16459                                 && cf_fix_cppflags=yes
16460
16461                         if test $cf_fix_cppflags = yes ; then
16462
16463         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16464         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16465
16466                                 continue
16467                         elif test "${cf_tst_cflags}" = "\"'" ; then
16468
16469         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16470         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16471
16472                                 continue
16473                         fi
16474                         ;;
16475                 esac
16476                 case "$CPPFLAGS" in
16477                 (*$cf_add_cflags)
16478                         ;;
16479                 (*)
16480                         case $cf_add_cflags in
16481                         (-D*)
16482                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16483
16484 CPPFLAGS=`echo "$CPPFLAGS" | \
16485         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16486                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16487
16488                                 ;;
16489                         esac
16490
16491         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16492         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16493
16494                         ;;
16495                 esac
16496                 ;;
16497         (*)
16498
16499         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16500         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16501
16502                 ;;
16503         esac
16504         ;;
16505 (yes)
16506
16507         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16508         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16509
16510         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16511
16512         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16513                 && test -z "${cf_tst_cflags}" \
16514                 && cf_fix_cppflags=no
16515         ;;
16516 esac
16517 done
16518
16519 if test -n "$cf_new_cflags" ; then
16520
16521         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16522         CFLAGS="${CFLAGS}$cf_new_cflags"
16523
16524 fi
16525
16526 if test -n "$cf_new_cppflags" ; then
16527
16528         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16529         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16530
16531 fi
16532
16533 if test -n "$cf_new_extra_cppflags" ; then
16534
16535         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16536         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16537
16538 fi
16539
16540 cat >>confdefs.h <<\EOF
16541 #define HAVE__TRACEF 1
16542 EOF
16543
16544 else
16545         LIB_TRACING=DEBUG
16546         ADA_TRACE=FALSE
16547 fi
16548
16549 echo "$as_me:16549: checking if we want to use GNAT projects" >&5
16550 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16551
16552 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16553 if test "${enable_gnat_projects+set}" = set; then
16554   enableval="$enable_gnat_projects"
16555   test "$enableval" != no && enableval=yes
16556         if test "$enableval" != "yes" ; then
16557     enable_gnat_projects=no
16558         else
16559                 enable_gnat_projects=yes
16560         fi
16561 else
16562   enableval=yes
16563         enable_gnat_projects=yes
16564
16565 fi;
16566 echo "$as_me:16566: result: $enable_gnat_projects" >&5
16567 echo "${ECHO_T}$enable_gnat_projects" >&6
16568
16569 ###     Checks for libraries.
16570 case $cf_cv_system_name in
16571 (*mingw32*|*mingw64*)
16572         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16573         LIBS=" -lpsapi $LIBS"
16574         ;;
16575 (*)
16576 echo "$as_me:16576: checking for gettimeofday" >&5
16577 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16578 if test "${ac_cv_func_gettimeofday+set}" = set; then
16579   echo $ECHO_N "(cached) $ECHO_C" >&6
16580 else
16581   cat >conftest.$ac_ext <<_ACEOF
16582 #line 16582 "configure"
16583 #include "confdefs.h"
16584 /* System header to define __stub macros and hopefully few prototypes,
16585     which can conflict with char gettimeofday (); below.  */
16586 #include <assert.h>
16587 /* Override any gcc2 internal prototype to avoid an error.  */
16588 #ifdef __cplusplus
16589 extern "C"
16590 #endif
16591 /* We use char because int might match the return type of a gcc2
16592    builtin and then its argument prototype would still apply.  */
16593 char gettimeofday ();
16594 char (*f) ();
16595
16596 int
16597 main (void)
16598 {
16599 /* The GNU C library defines this for functions which it implements
16600     to always fail with ENOSYS.  Some functions are actually named
16601     something starting with __ and the normal name is an alias.  */
16602 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16603 choke me
16604 #else
16605 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16606 #endif
16607
16608   ;
16609   return 0;
16610 }
16611 _ACEOF
16612 rm -f conftest.$ac_objext conftest$ac_exeext
16613 if { (eval echo "$as_me:16613: \"$ac_link\"") >&5
16614   (eval $ac_link) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit $ac_status); } &&
16618          { ac_try='test -s conftest$ac_exeext'
16619   { (eval echo "$as_me:16619: \"$ac_try\"") >&5
16620   (eval $ac_try) 2>&5
16621   ac_status=$?
16622   echo "$as_me:16622: \$? = $ac_status" >&5
16623   (exit $ac_status); }; }; then
16624   ac_cv_func_gettimeofday=yes
16625 else
16626   echo "$as_me: failed program was:" >&5
16627 cat conftest.$ac_ext >&5
16628 ac_cv_func_gettimeofday=no
16629 fi
16630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16631 fi
16632 echo "$as_me:16632: result: $ac_cv_func_gettimeofday" >&5
16633 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16634 if test $ac_cv_func_gettimeofday = yes; then
16635
16636 cat >>confdefs.h <<\EOF
16637 #define HAVE_GETTIMEOFDAY 1
16638 EOF
16639
16640 else
16641
16642 echo "$as_me:16642: checking for gettimeofday in -lbsd" >&5
16643 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16644 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16645   echo $ECHO_N "(cached) $ECHO_C" >&6
16646 else
16647   ac_check_lib_save_LIBS=$LIBS
16648 LIBS="-lbsd  $LIBS"
16649 cat >conftest.$ac_ext <<_ACEOF
16650 #line 16650 "configure"
16651 #include "confdefs.h"
16652
16653 /* Override any gcc2 internal prototype to avoid an error.  */
16654 #ifdef __cplusplus
16655 extern "C"
16656 #endif
16657 /* We use char because int might match the return type of a gcc2
16658    builtin and then its argument prototype would still apply.  */
16659 char gettimeofday ();
16660 int
16661 main (void)
16662 {
16663 gettimeofday ();
16664   ;
16665   return 0;
16666 }
16667 _ACEOF
16668 rm -f conftest.$ac_objext conftest$ac_exeext
16669 if { (eval echo "$as_me:16669: \"$ac_link\"") >&5
16670   (eval $ac_link) 2>&5
16671   ac_status=$?
16672   echo "$as_me:16672: \$? = $ac_status" >&5
16673   (exit $ac_status); } &&
16674          { ac_try='test -s conftest$ac_exeext'
16675   { (eval echo "$as_me:16675: \"$ac_try\"") >&5
16676   (eval $ac_try) 2>&5
16677   ac_status=$?
16678   echo "$as_me:16678: \$? = $ac_status" >&5
16679   (exit $ac_status); }; }; then
16680   ac_cv_lib_bsd_gettimeofday=yes
16681 else
16682   echo "$as_me: failed program was:" >&5
16683 cat conftest.$ac_ext >&5
16684 ac_cv_lib_bsd_gettimeofday=no
16685 fi
16686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16687 LIBS=$ac_check_lib_save_LIBS
16688 fi
16689 echo "$as_me:16689: result: $ac_cv_lib_bsd_gettimeofday" >&5
16690 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16691 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16692
16693 cat >>confdefs.h <<\EOF
16694 #define HAVE_GETTIMEOFDAY 1
16695 EOF
16696
16697 cf_add_libs="-lbsd"
16698 # Filter out duplicates - this happens with badly-designed ".pc" files...
16699 for cf_add_1lib in $LIBS
16700 do
16701         for cf_add_2lib in $cf_add_libs
16702         do
16703                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16704                 then
16705                         cf_add_1lib=
16706                         break
16707                 fi
16708         done
16709         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16710 done
16711 LIBS="$cf_add_libs"
16712
16713 fi
16714
16715 fi
16716         ;;
16717 esac
16718
16719 echo "$as_me:16719: checking if -lm needed for math functions" >&5
16720 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16721 if test "${cf_cv_need_libm+set}" = set; then
16722   echo $ECHO_N "(cached) $ECHO_C" >&6
16723 else
16724
16725         cat >conftest.$ac_ext <<_ACEOF
16726 #line 16726 "configure"
16727 #include "confdefs.h"
16728
16729         #include <stdio.h>
16730         #include <stdlib.h>
16731         #include <math.h>
16732
16733 int
16734 main (void)
16735 {
16736 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16737   ;
16738   return 0;
16739 }
16740 _ACEOF
16741 rm -f conftest.$ac_objext conftest$ac_exeext
16742 if { (eval echo "$as_me:16742: \"$ac_link\"") >&5
16743   (eval $ac_link) 2>&5
16744   ac_status=$?
16745   echo "$as_me:16745: \$? = $ac_status" >&5
16746   (exit $ac_status); } &&
16747          { ac_try='test -s conftest$ac_exeext'
16748   { (eval echo "$as_me:16748: \"$ac_try\"") >&5
16749   (eval $ac_try) 2>&5
16750   ac_status=$?
16751   echo "$as_me:16751: \$? = $ac_status" >&5
16752   (exit $ac_status); }; }; then
16753   cf_cv_need_libm=no
16754 else
16755   echo "$as_me: failed program was:" >&5
16756 cat conftest.$ac_ext >&5
16757 cf_cv_need_libm=yes
16758 fi
16759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16760 fi
16761 echo "$as_me:16761: result: $cf_cv_need_libm" >&5
16762 echo "${ECHO_T}$cf_cv_need_libm" >&6
16763 if test "$cf_cv_need_libm" = yes
16764 then
16765 MATH_LIB=-lm
16766 fi
16767
16768 ###     Checks for header files.
16769 echo "$as_me:16769: checking for ANSI C header files" >&5
16770 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16771 if test "${ac_cv_header_stdc+set}" = set; then
16772   echo $ECHO_N "(cached) $ECHO_C" >&6
16773 else
16774   cat >conftest.$ac_ext <<_ACEOF
16775 #line 16775 "configure"
16776 #include "confdefs.h"
16777 #include <stdlib.h>
16778 #include <stdarg.h>
16779 #include <string.h>
16780 #include <float.h>
16781
16782 _ACEOF
16783 if { (eval echo "$as_me:16783: \"$ac_cpp conftest.$ac_ext\"") >&5
16784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16785   ac_status=$?
16786   egrep -v '^ *\+' conftest.er1 >conftest.err
16787   rm -f conftest.er1
16788   cat conftest.err >&5
16789   echo "$as_me:16789: \$? = $ac_status" >&5
16790   (exit $ac_status); } >/dev/null; then
16791   if test -s conftest.err; then
16792     ac_cpp_err=$ac_c_preproc_warn_flag
16793   else
16794     ac_cpp_err=
16795   fi
16796 else
16797   ac_cpp_err=yes
16798 fi
16799 if test -z "$ac_cpp_err"; then
16800   ac_cv_header_stdc=yes
16801 else
16802   echo "$as_me: failed program was:" >&5
16803   cat conftest.$ac_ext >&5
16804   ac_cv_header_stdc=no
16805 fi
16806 rm -f conftest.err conftest.$ac_ext
16807
16808 if test $ac_cv_header_stdc = yes; then
16809   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16810   cat >conftest.$ac_ext <<_ACEOF
16811 #line 16811 "configure"
16812 #include "confdefs.h"
16813 #include <string.h>
16814
16815 _ACEOF
16816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16817   egrep "memchr" >/dev/null 2>&1; then
16818   :
16819 else
16820   ac_cv_header_stdc=no
16821 fi
16822 rm -rf conftest*
16823
16824 fi
16825
16826 if test $ac_cv_header_stdc = yes; then
16827   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16828   cat >conftest.$ac_ext <<_ACEOF
16829 #line 16829 "configure"
16830 #include "confdefs.h"
16831 #include <stdlib.h>
16832
16833 _ACEOF
16834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16835   egrep "free" >/dev/null 2>&1; then
16836   :
16837 else
16838   ac_cv_header_stdc=no
16839 fi
16840 rm -rf conftest*
16841
16842 fi
16843
16844 if test $ac_cv_header_stdc = yes; then
16845   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16846   if test "$cross_compiling" = yes; then
16847   :
16848 else
16849   cat >conftest.$ac_ext <<_ACEOF
16850 #line 16850 "configure"
16851 #include "confdefs.h"
16852 #include <ctype.h>
16853 #if ((' ' & 0x0FF) == 0x020)
16854 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16855 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16856 #else
16857 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16858                      || ('j' <= (c) && (c) <= 'r') \
16859                      || ('s' <= (c) && (c) <= 'z'))
16860 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16861 #endif
16862
16863 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16864 int
16865 main (void)
16866 {
16867   int i;
16868   for (i = 0; i < 256; i++)
16869     if (XOR (islower (i), ISLOWER (i))
16870         || toupper (i) != TOUPPER (i))
16871       $ac_main_return(2);
16872   $ac_main_return (0);
16873 }
16874 _ACEOF
16875 rm -f conftest$ac_exeext
16876 if { (eval echo "$as_me:16876: \"$ac_link\"") >&5
16877   (eval $ac_link) 2>&5
16878   ac_status=$?
16879   echo "$as_me:16879: \$? = $ac_status" >&5
16880   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16881   { (eval echo "$as_me:16881: \"$ac_try\"") >&5
16882   (eval $ac_try) 2>&5
16883   ac_status=$?
16884   echo "$as_me:16884: \$? = $ac_status" >&5
16885   (exit $ac_status); }; }; then
16886   :
16887 else
16888   echo "$as_me: program exited with status $ac_status" >&5
16889 echo "$as_me: failed program was:" >&5
16890 cat conftest.$ac_ext >&5
16891 ac_cv_header_stdc=no
16892 fi
16893 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16894 fi
16895 fi
16896 fi
16897 echo "$as_me:16897: result: $ac_cv_header_stdc" >&5
16898 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16899 if test $ac_cv_header_stdc = yes; then
16900
16901 cat >>confdefs.h <<\EOF
16902 #define STDC_HEADERS 1
16903 EOF
16904
16905 fi
16906
16907 ac_header_dirent=no
16908 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16909   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16910 echo "$as_me:16910: checking for $ac_hdr that defines DIR" >&5
16911 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16912 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16913   echo $ECHO_N "(cached) $ECHO_C" >&6
16914 else
16915   cat >conftest.$ac_ext <<_ACEOF
16916 #line 16916 "configure"
16917 #include "confdefs.h"
16918 #include <sys/types.h>
16919 #include <$ac_hdr>
16920
16921 int
16922 main (void)
16923 {
16924 if ((DIR *) 0)
16925 return 0;
16926   ;
16927   return 0;
16928 }
16929 _ACEOF
16930 rm -f conftest.$ac_objext
16931 if { (eval echo "$as_me:16931: \"$ac_compile\"") >&5
16932   (eval $ac_compile) 2>&5
16933   ac_status=$?
16934   echo "$as_me:16934: \$? = $ac_status" >&5
16935   (exit $ac_status); } &&
16936          { ac_try='test -s conftest.$ac_objext'
16937   { (eval echo "$as_me:16937: \"$ac_try\"") >&5
16938   (eval $ac_try) 2>&5
16939   ac_status=$?
16940   echo "$as_me:16940: \$? = $ac_status" >&5
16941   (exit $ac_status); }; }; then
16942   eval "$as_ac_Header=yes"
16943 else
16944   echo "$as_me: failed program was:" >&5
16945 cat conftest.$ac_ext >&5
16946 eval "$as_ac_Header=no"
16947 fi
16948 rm -f conftest.$ac_objext conftest.$ac_ext
16949 fi
16950 echo "$as_me:16950: result: `eval echo '${'$as_ac_Header'}'`" >&5
16951 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16952 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16953   cat >>confdefs.h <<EOF
16954 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16955 EOF
16956
16957 ac_header_dirent=$ac_hdr; break
16958 fi
16959
16960 done
16961 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16962 if test $ac_header_dirent = dirent.h; then
16963   echo "$as_me:16963: checking for opendir in -ldir" >&5
16964 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16965 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16966   echo $ECHO_N "(cached) $ECHO_C" >&6
16967 else
16968   ac_check_lib_save_LIBS=$LIBS
16969 LIBS="-ldir  $LIBS"
16970 cat >conftest.$ac_ext <<_ACEOF
16971 #line 16971 "configure"
16972 #include "confdefs.h"
16973
16974 /* Override any gcc2 internal prototype to avoid an error.  */
16975 #ifdef __cplusplus
16976 extern "C"
16977 #endif
16978 /* We use char because int might match the return type of a gcc2
16979    builtin and then its argument prototype would still apply.  */
16980 char opendir ();
16981 int
16982 main (void)
16983 {
16984 opendir ();
16985   ;
16986   return 0;
16987 }
16988 _ACEOF
16989 rm -f conftest.$ac_objext conftest$ac_exeext
16990 if { (eval echo "$as_me:16990: \"$ac_link\"") >&5
16991   (eval $ac_link) 2>&5
16992   ac_status=$?
16993   echo "$as_me:16993: \$? = $ac_status" >&5
16994   (exit $ac_status); } &&
16995          { ac_try='test -s conftest$ac_exeext'
16996   { (eval echo "$as_me:16996: \"$ac_try\"") >&5
16997   (eval $ac_try) 2>&5
16998   ac_status=$?
16999   echo "$as_me:16999: \$? = $ac_status" >&5
17000   (exit $ac_status); }; }; then
17001   ac_cv_lib_dir_opendir=yes
17002 else
17003   echo "$as_me: failed program was:" >&5
17004 cat conftest.$ac_ext >&5
17005 ac_cv_lib_dir_opendir=no
17006 fi
17007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17008 LIBS=$ac_check_lib_save_LIBS
17009 fi
17010 echo "$as_me:17010: result: $ac_cv_lib_dir_opendir" >&5
17011 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17012 if test $ac_cv_lib_dir_opendir = yes; then
17013   LIBS="$LIBS -ldir"
17014 fi
17015
17016 else
17017   echo "$as_me:17017: checking for opendir in -lx" >&5
17018 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17019 if test "${ac_cv_lib_x_opendir+set}" = set; then
17020   echo $ECHO_N "(cached) $ECHO_C" >&6
17021 else
17022   ac_check_lib_save_LIBS=$LIBS
17023 LIBS="-lx  $LIBS"
17024 cat >conftest.$ac_ext <<_ACEOF
17025 #line 17025 "configure"
17026 #include "confdefs.h"
17027
17028 /* Override any gcc2 internal prototype to avoid an error.  */
17029 #ifdef __cplusplus
17030 extern "C"
17031 #endif
17032 /* We use char because int might match the return type of a gcc2
17033    builtin and then its argument prototype would still apply.  */
17034 char opendir ();
17035 int
17036 main (void)
17037 {
17038 opendir ();
17039   ;
17040   return 0;
17041 }
17042 _ACEOF
17043 rm -f conftest.$ac_objext conftest$ac_exeext
17044 if { (eval echo "$as_me:17044: \"$ac_link\"") >&5
17045   (eval $ac_link) 2>&5
17046   ac_status=$?
17047   echo "$as_me:17047: \$? = $ac_status" >&5
17048   (exit $ac_status); } &&
17049          { ac_try='test -s conftest$ac_exeext'
17050   { (eval echo "$as_me:17050: \"$ac_try\"") >&5
17051   (eval $ac_try) 2>&5
17052   ac_status=$?
17053   echo "$as_me:17053: \$? = $ac_status" >&5
17054   (exit $ac_status); }; }; then
17055   ac_cv_lib_x_opendir=yes
17056 else
17057   echo "$as_me: failed program was:" >&5
17058 cat conftest.$ac_ext >&5
17059 ac_cv_lib_x_opendir=no
17060 fi
17061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17062 LIBS=$ac_check_lib_save_LIBS
17063 fi
17064 echo "$as_me:17064: result: $ac_cv_lib_x_opendir" >&5
17065 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17066 if test $ac_cv_lib_x_opendir = yes; then
17067   LIBS="$LIBS -lx"
17068 fi
17069
17070 fi
17071
17072 echo "$as_me:17072: checking whether time.h and sys/time.h may both be included" >&5
17073 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17074 if test "${ac_cv_header_time+set}" = set; then
17075   echo $ECHO_N "(cached) $ECHO_C" >&6
17076 else
17077   cat >conftest.$ac_ext <<_ACEOF
17078 #line 17078 "configure"
17079 #include "confdefs.h"
17080 #include <sys/types.h>
17081 #include <sys/time.h>
17082 #include <time.h>
17083
17084 int
17085 main (void)
17086 {
17087 if ((struct tm *) 0)
17088 return 0;
17089   ;
17090   return 0;
17091 }
17092 _ACEOF
17093 rm -f conftest.$ac_objext
17094 if { (eval echo "$as_me:17094: \"$ac_compile\"") >&5
17095   (eval $ac_compile) 2>&5
17096   ac_status=$?
17097   echo "$as_me:17097: \$? = $ac_status" >&5
17098   (exit $ac_status); } &&
17099          { ac_try='test -s conftest.$ac_objext'
17100   { (eval echo "$as_me:17100: \"$ac_try\"") >&5
17101   (eval $ac_try) 2>&5
17102   ac_status=$?
17103   echo "$as_me:17103: \$? = $ac_status" >&5
17104   (exit $ac_status); }; }; then
17105   ac_cv_header_time=yes
17106 else
17107   echo "$as_me: failed program was:" >&5
17108 cat conftest.$ac_ext >&5
17109 ac_cv_header_time=no
17110 fi
17111 rm -f conftest.$ac_objext conftest.$ac_ext
17112 fi
17113 echo "$as_me:17113: result: $ac_cv_header_time" >&5
17114 echo "${ECHO_T}$ac_cv_header_time" >&6
17115 if test $ac_cv_header_time = yes; then
17116
17117 cat >>confdefs.h <<\EOF
17118 #define TIME_WITH_SYS_TIME 1
17119 EOF
17120
17121 fi
17122
17123 cf_regex_func=no
17124
17125 cf_regex_libs="regex re"
17126 case $host_os in
17127 (mingw*)
17128         cf_regex_libs="gnurx $cf_regex_libs"
17129         ;;
17130 esac
17131
17132 echo "$as_me:17132: checking for regcomp" >&5
17133 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17134 if test "${ac_cv_func_regcomp+set}" = set; then
17135   echo $ECHO_N "(cached) $ECHO_C" >&6
17136 else
17137   cat >conftest.$ac_ext <<_ACEOF
17138 #line 17138 "configure"
17139 #include "confdefs.h"
17140 /* System header to define __stub macros and hopefully few prototypes,
17141     which can conflict with char regcomp (); below.  */
17142 #include <assert.h>
17143 /* Override any gcc2 internal prototype to avoid an error.  */
17144 #ifdef __cplusplus
17145 extern "C"
17146 #endif
17147 /* We use char because int might match the return type of a gcc2
17148    builtin and then its argument prototype would still apply.  */
17149 char regcomp ();
17150 char (*f) ();
17151
17152 int
17153 main (void)
17154 {
17155 /* The GNU C library defines this for functions which it implements
17156     to always fail with ENOSYS.  Some functions are actually named
17157     something starting with __ and the normal name is an alias.  */
17158 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17159 choke me
17160 #else
17161 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17162 #endif
17163
17164   ;
17165   return 0;
17166 }
17167 _ACEOF
17168 rm -f conftest.$ac_objext conftest$ac_exeext
17169 if { (eval echo "$as_me:17169: \"$ac_link\"") >&5
17170   (eval $ac_link) 2>&5
17171   ac_status=$?
17172   echo "$as_me:17172: \$? = $ac_status" >&5
17173   (exit $ac_status); } &&
17174          { ac_try='test -s conftest$ac_exeext'
17175   { (eval echo "$as_me:17175: \"$ac_try\"") >&5
17176   (eval $ac_try) 2>&5
17177   ac_status=$?
17178   echo "$as_me:17178: \$? = $ac_status" >&5
17179   (exit $ac_status); }; }; then
17180   ac_cv_func_regcomp=yes
17181 else
17182   echo "$as_me: failed program was:" >&5
17183 cat conftest.$ac_ext >&5
17184 ac_cv_func_regcomp=no
17185 fi
17186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17187 fi
17188 echo "$as_me:17188: result: $ac_cv_func_regcomp" >&5
17189 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17190 if test $ac_cv_func_regcomp = yes; then
17191   cf_regex_func=regcomp
17192 else
17193
17194         for cf_regex_lib in $cf_regex_libs
17195         do
17196                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17197 echo "$as_me:17197: checking for regcomp in -l$cf_regex_lib" >&5
17198 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17199 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17200   echo $ECHO_N "(cached) $ECHO_C" >&6
17201 else
17202   ac_check_lib_save_LIBS=$LIBS
17203 LIBS="-l$cf_regex_lib  $LIBS"
17204 cat >conftest.$ac_ext <<_ACEOF
17205 #line 17205 "configure"
17206 #include "confdefs.h"
17207
17208 /* Override any gcc2 internal prototype to avoid an error.  */
17209 #ifdef __cplusplus
17210 extern "C"
17211 #endif
17212 /* We use char because int might match the return type of a gcc2
17213    builtin and then its argument prototype would still apply.  */
17214 char regcomp ();
17215 int
17216 main (void)
17217 {
17218 regcomp ();
17219   ;
17220   return 0;
17221 }
17222 _ACEOF
17223 rm -f conftest.$ac_objext conftest$ac_exeext
17224 if { (eval echo "$as_me:17224: \"$ac_link\"") >&5
17225   (eval $ac_link) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); } &&
17229          { ac_try='test -s conftest$ac_exeext'
17230   { (eval echo "$as_me:17230: \"$ac_try\"") >&5
17231   (eval $ac_try) 2>&5
17232   ac_status=$?
17233   echo "$as_me:17233: \$? = $ac_status" >&5
17234   (exit $ac_status); }; }; then
17235   eval "$as_ac_Lib=yes"
17236 else
17237   echo "$as_me: failed program was:" >&5
17238 cat conftest.$ac_ext >&5
17239 eval "$as_ac_Lib=no"
17240 fi
17241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17242 LIBS=$ac_check_lib_save_LIBS
17243 fi
17244 echo "$as_me:17244: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17245 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17246 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17247
17248 cf_add_libs="-l$cf_regex_lib"
17249 # Filter out duplicates - this happens with badly-designed ".pc" files...
17250 for cf_add_1lib in $LIBS
17251 do
17252         for cf_add_2lib in $cf_add_libs
17253         do
17254                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17255                 then
17256                         cf_add_1lib=
17257                         break
17258                 fi
17259         done
17260         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17261 done
17262 LIBS="$cf_add_libs"
17263
17264                                 cf_regex_func=regcomp
17265                                 break
17266 fi
17267
17268         done
17269
17270 fi
17271
17272 if test "$cf_regex_func" = no ; then
17273         echo "$as_me:17273: checking for compile" >&5
17274 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17275 if test "${ac_cv_func_compile+set}" = set; then
17276   echo $ECHO_N "(cached) $ECHO_C" >&6
17277 else
17278   cat >conftest.$ac_ext <<_ACEOF
17279 #line 17279 "configure"
17280 #include "confdefs.h"
17281 /* System header to define __stub macros and hopefully few prototypes,
17282     which can conflict with char compile (); below.  */
17283 #include <assert.h>
17284 /* Override any gcc2 internal prototype to avoid an error.  */
17285 #ifdef __cplusplus
17286 extern "C"
17287 #endif
17288 /* We use char because int might match the return type of a gcc2
17289    builtin and then its argument prototype would still apply.  */
17290 char compile ();
17291 char (*f) ();
17292
17293 int
17294 main (void)
17295 {
17296 /* The GNU C library defines this for functions which it implements
17297     to always fail with ENOSYS.  Some functions are actually named
17298     something starting with __ and the normal name is an alias.  */
17299 #if defined (__stub_compile) || defined (__stub___compile)
17300 choke me
17301 #else
17302 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17303 #endif
17304
17305   ;
17306   return 0;
17307 }
17308 _ACEOF
17309 rm -f conftest.$ac_objext conftest$ac_exeext
17310 if { (eval echo "$as_me:17310: \"$ac_link\"") >&5
17311   (eval $ac_link) 2>&5
17312   ac_status=$?
17313   echo "$as_me:17313: \$? = $ac_status" >&5
17314   (exit $ac_status); } &&
17315          { ac_try='test -s conftest$ac_exeext'
17316   { (eval echo "$as_me:17316: \"$ac_try\"") >&5
17317   (eval $ac_try) 2>&5
17318   ac_status=$?
17319   echo "$as_me:17319: \$? = $ac_status" >&5
17320   (exit $ac_status); }; }; then
17321   ac_cv_func_compile=yes
17322 else
17323   echo "$as_me: failed program was:" >&5
17324 cat conftest.$ac_ext >&5
17325 ac_cv_func_compile=no
17326 fi
17327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17328 fi
17329 echo "$as_me:17329: result: $ac_cv_func_compile" >&5
17330 echo "${ECHO_T}$ac_cv_func_compile" >&6
17331 if test $ac_cv_func_compile = yes; then
17332   cf_regex_func=compile
17333 else
17334
17335                 echo "$as_me:17335: checking for compile in -lgen" >&5
17336 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17337 if test "${ac_cv_lib_gen_compile+set}" = set; then
17338   echo $ECHO_N "(cached) $ECHO_C" >&6
17339 else
17340   ac_check_lib_save_LIBS=$LIBS
17341 LIBS="-lgen  $LIBS"
17342 cat >conftest.$ac_ext <<_ACEOF
17343 #line 17343 "configure"
17344 #include "confdefs.h"
17345
17346 /* Override any gcc2 internal prototype to avoid an error.  */
17347 #ifdef __cplusplus
17348 extern "C"
17349 #endif
17350 /* We use char because int might match the return type of a gcc2
17351    builtin and then its argument prototype would still apply.  */
17352 char compile ();
17353 int
17354 main (void)
17355 {
17356 compile ();
17357   ;
17358   return 0;
17359 }
17360 _ACEOF
17361 rm -f conftest.$ac_objext conftest$ac_exeext
17362 if { (eval echo "$as_me:17362: \"$ac_link\"") >&5
17363   (eval $ac_link) 2>&5
17364   ac_status=$?
17365   echo "$as_me:17365: \$? = $ac_status" >&5
17366   (exit $ac_status); } &&
17367          { ac_try='test -s conftest$ac_exeext'
17368   { (eval echo "$as_me:17368: \"$ac_try\"") >&5
17369   (eval $ac_try) 2>&5
17370   ac_status=$?
17371   echo "$as_me:17371: \$? = $ac_status" >&5
17372   (exit $ac_status); }; }; then
17373   ac_cv_lib_gen_compile=yes
17374 else
17375   echo "$as_me: failed program was:" >&5
17376 cat conftest.$ac_ext >&5
17377 ac_cv_lib_gen_compile=no
17378 fi
17379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17380 LIBS=$ac_check_lib_save_LIBS
17381 fi
17382 echo "$as_me:17382: result: $ac_cv_lib_gen_compile" >&5
17383 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17384 if test $ac_cv_lib_gen_compile = yes; then
17385
17386 cf_add_libs="-lgen"
17387 # Filter out duplicates - this happens with badly-designed ".pc" files...
17388 for cf_add_1lib in $LIBS
17389 do
17390         for cf_add_2lib in $cf_add_libs
17391         do
17392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17393                 then
17394                         cf_add_1lib=
17395                         break
17396                 fi
17397         done
17398         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17399 done
17400 LIBS="$cf_add_libs"
17401
17402                                 cf_regex_func=compile
17403 fi
17404
17405 fi
17406
17407 fi
17408
17409 if test "$cf_regex_func" = no ; then
17410         { echo "$as_me:17410: WARNING: cannot find regular expression library" >&5
17411 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17412 fi
17413
17414 echo "$as_me:17414: checking for regular-expression headers" >&5
17415 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17416 if test "${cf_cv_regex_hdrs+set}" = set; then
17417   echo $ECHO_N "(cached) $ECHO_C" >&6
17418 else
17419
17420 cf_cv_regex_hdrs=no
17421 case $cf_regex_func in
17422 (compile)
17423         for cf_regex_hdr in regexp.h regexpr.h
17424         do
17425                 cat >conftest.$ac_ext <<_ACEOF
17426 #line 17426 "configure"
17427 #include "confdefs.h"
17428 #include <$cf_regex_hdr>
17429 int
17430 main (void)
17431 {
17432
17433                         char *p = compile("", "", "", 0);
17434                         int x = step("", "");
17435
17436   ;
17437   return 0;
17438 }
17439 _ACEOF
17440 rm -f conftest.$ac_objext conftest$ac_exeext
17441 if { (eval echo "$as_me:17441: \"$ac_link\"") >&5
17442   (eval $ac_link) 2>&5
17443   ac_status=$?
17444   echo "$as_me:17444: \$? = $ac_status" >&5
17445   (exit $ac_status); } &&
17446          { ac_try='test -s conftest$ac_exeext'
17447   { (eval echo "$as_me:17447: \"$ac_try\"") >&5
17448   (eval $ac_try) 2>&5
17449   ac_status=$?
17450   echo "$as_me:17450: \$? = $ac_status" >&5
17451   (exit $ac_status); }; }; then
17452
17453                         cf_cv_regex_hdrs=$cf_regex_hdr
17454                         break
17455
17456 else
17457   echo "$as_me: failed program was:" >&5
17458 cat conftest.$ac_ext >&5
17459 fi
17460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17461         done
17462         ;;
17463 (*)
17464         for cf_regex_hdr in regex.h
17465         do
17466                 cat >conftest.$ac_ext <<_ACEOF
17467 #line 17467 "configure"
17468 #include "confdefs.h"
17469 #include <sys/types.h>
17470 #include <$cf_regex_hdr>
17471 int
17472 main (void)
17473 {
17474
17475                         regex_t *p;
17476                         int x = regcomp(p, "", 0);
17477                         int y = regexec(p, "", 0, 0, 0);
17478                         regfree(p);
17479
17480   ;
17481   return 0;
17482 }
17483 _ACEOF
17484 rm -f conftest.$ac_objext conftest$ac_exeext
17485 if { (eval echo "$as_me:17485: \"$ac_link\"") >&5
17486   (eval $ac_link) 2>&5
17487   ac_status=$?
17488   echo "$as_me:17488: \$? = $ac_status" >&5
17489   (exit $ac_status); } &&
17490          { ac_try='test -s conftest$ac_exeext'
17491   { (eval echo "$as_me:17491: \"$ac_try\"") >&5
17492   (eval $ac_try) 2>&5
17493   ac_status=$?
17494   echo "$as_me:17494: \$? = $ac_status" >&5
17495   (exit $ac_status); }; }; then
17496
17497                         cf_cv_regex_hdrs=$cf_regex_hdr
17498                         break
17499
17500 else
17501   echo "$as_me: failed program was:" >&5
17502 cat conftest.$ac_ext >&5
17503 fi
17504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17505         done
17506         ;;
17507 esac
17508
17509 fi
17510 echo "$as_me:17510: result: $cf_cv_regex_hdrs" >&5
17511 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17512
17513 case $cf_cv_regex_hdrs in
17514         (no)            { echo "$as_me:17514: WARNING: no regular expression header found" >&5
17515 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17516         (regex.h)
17517 cat >>confdefs.h <<\EOF
17518 #define HAVE_REGEX_H_FUNCS 1
17519 EOF
17520  ;;
17521         (regexp.h)
17522 cat >>confdefs.h <<\EOF
17523 #define HAVE_REGEXP_H_FUNCS 1
17524 EOF
17525  ;;
17526         (regexpr.h)
17527 cat >>confdefs.h <<\EOF
17528 #define HAVE_REGEXPR_H_FUNCS 1
17529 EOF
17530  ;;
17531 esac
17532
17533 for ac_header in \
17534 fcntl.h \
17535 getopt.h \
17536 limits.h \
17537 locale.h \
17538 math.h \
17539 poll.h \
17540 sys/bsdtypes.h \
17541 sys/ioctl.h \
17542 sys/param.h \
17543 sys/poll.h \
17544 sys/select.h \
17545 sys/time.h \
17546 sys/times.h \
17547 ttyent.h \
17548 unistd.h \
17549 wctype.h \
17550
17551 do
17552 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17553 echo "$as_me:17553: checking for $ac_header" >&5
17554 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17555 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17556   echo $ECHO_N "(cached) $ECHO_C" >&6
17557 else
17558   cat >conftest.$ac_ext <<_ACEOF
17559 #line 17559 "configure"
17560 #include "confdefs.h"
17561 #include <$ac_header>
17562 _ACEOF
17563 if { (eval echo "$as_me:17563: \"$ac_cpp conftest.$ac_ext\"") >&5
17564   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17565   ac_status=$?
17566   egrep -v '^ *\+' conftest.er1 >conftest.err
17567   rm -f conftest.er1
17568   cat conftest.err >&5
17569   echo "$as_me:17569: \$? = $ac_status" >&5
17570   (exit $ac_status); } >/dev/null; then
17571   if test -s conftest.err; then
17572     ac_cpp_err=$ac_c_preproc_warn_flag
17573   else
17574     ac_cpp_err=
17575   fi
17576 else
17577   ac_cpp_err=yes
17578 fi
17579 if test -z "$ac_cpp_err"; then
17580   eval "$as_ac_Header=yes"
17581 else
17582   echo "$as_me: failed program was:" >&5
17583   cat conftest.$ac_ext >&5
17584   eval "$as_ac_Header=no"
17585 fi
17586 rm -f conftest.err conftest.$ac_ext
17587 fi
17588 echo "$as_me:17588: result: `eval echo '${'$as_ac_Header'}'`" >&5
17589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17590 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17591   cat >>confdefs.h <<EOF
17592 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17593 EOF
17594
17595 fi
17596 done
17597
17598 for ac_header in unistd.h getopt.h
17599 do
17600 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17601 echo "$as_me:17601: checking for $ac_header" >&5
17602 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17603 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17604   echo $ECHO_N "(cached) $ECHO_C" >&6
17605 else
17606   cat >conftest.$ac_ext <<_ACEOF
17607 #line 17607 "configure"
17608 #include "confdefs.h"
17609 #include <$ac_header>
17610 _ACEOF
17611 if { (eval echo "$as_me:17611: \"$ac_cpp conftest.$ac_ext\"") >&5
17612   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17613   ac_status=$?
17614   egrep -v '^ *\+' conftest.er1 >conftest.err
17615   rm -f conftest.er1
17616   cat conftest.err >&5
17617   echo "$as_me:17617: \$? = $ac_status" >&5
17618   (exit $ac_status); } >/dev/null; then
17619   if test -s conftest.err; then
17620     ac_cpp_err=$ac_c_preproc_warn_flag
17621   else
17622     ac_cpp_err=
17623   fi
17624 else
17625   ac_cpp_err=yes
17626 fi
17627 if test -z "$ac_cpp_err"; then
17628   eval "$as_ac_Header=yes"
17629 else
17630   echo "$as_me: failed program was:" >&5
17631   cat conftest.$ac_ext >&5
17632   eval "$as_ac_Header=no"
17633 fi
17634 rm -f conftest.err conftest.$ac_ext
17635 fi
17636 echo "$as_me:17636: result: `eval echo '${'$as_ac_Header'}'`" >&5
17637 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17638 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17639   cat >>confdefs.h <<EOF
17640 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17641 EOF
17642
17643 fi
17644 done
17645
17646 echo "$as_me:17646: checking for header declaring getopt variables" >&5
17647 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17648 if test "${cf_cv_getopt_header+set}" = set; then
17649   echo $ECHO_N "(cached) $ECHO_C" >&6
17650 else
17651
17652 cf_cv_getopt_header=none
17653 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17654 do
17655 cat >conftest.$ac_ext <<_ACEOF
17656 #line 17656 "configure"
17657 #include "confdefs.h"
17658
17659 #include <$cf_header>
17660 int
17661 main (void)
17662 {
17663 int x = optind; char *y = optarg
17664   ;
17665   return 0;
17666 }
17667 _ACEOF
17668 rm -f conftest.$ac_objext
17669 if { (eval echo "$as_me:17669: \"$ac_compile\"") >&5
17670   (eval $ac_compile) 2>&5
17671   ac_status=$?
17672   echo "$as_me:17672: \$? = $ac_status" >&5
17673   (exit $ac_status); } &&
17674          { ac_try='test -s conftest.$ac_objext'
17675   { (eval echo "$as_me:17675: \"$ac_try\"") >&5
17676   (eval $ac_try) 2>&5
17677   ac_status=$?
17678   echo "$as_me:17678: \$? = $ac_status" >&5
17679   (exit $ac_status); }; }; then
17680   cf_cv_getopt_header=$cf_header
17681  break
17682 else
17683   echo "$as_me: failed program was:" >&5
17684 cat conftest.$ac_ext >&5
17685 fi
17686 rm -f conftest.$ac_objext conftest.$ac_ext
17687 done
17688
17689 fi
17690 echo "$as_me:17690: result: $cf_cv_getopt_header" >&5
17691 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17692 if test $cf_cv_getopt_header != none ; then
17693
17694 cat >>confdefs.h <<\EOF
17695 #define HAVE_GETOPT_HEADER 1
17696 EOF
17697
17698 fi
17699 if test $cf_cv_getopt_header = getopt.h ; then
17700
17701 cat >>confdefs.h <<\EOF
17702 #define NEED_GETOPT_H 1
17703 EOF
17704
17705 fi
17706
17707 # check for ISC (this may also define _POSIX_SOURCE)
17708 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17709 if test "x$ISC" = xyes ; then
17710
17711 echo "$as_me:17711: checking for main in -lcposix" >&5
17712 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17713 if test "${ac_cv_lib_cposix_main+set}" = set; then
17714   echo $ECHO_N "(cached) $ECHO_C" >&6
17715 else
17716   ac_check_lib_save_LIBS=$LIBS
17717 LIBS="-lcposix  $LIBS"
17718 cat >conftest.$ac_ext <<_ACEOF
17719 #line 17719 "configure"
17720 #include "confdefs.h"
17721
17722 int
17723 main (void)
17724 {
17725 main ();
17726   ;
17727   return 0;
17728 }
17729 _ACEOF
17730 rm -f conftest.$ac_objext conftest$ac_exeext
17731 if { (eval echo "$as_me:17731: \"$ac_link\"") >&5
17732   (eval $ac_link) 2>&5
17733   ac_status=$?
17734   echo "$as_me:17734: \$? = $ac_status" >&5
17735   (exit $ac_status); } &&
17736          { ac_try='test -s conftest$ac_exeext'
17737   { (eval echo "$as_me:17737: \"$ac_try\"") >&5
17738   (eval $ac_try) 2>&5
17739   ac_status=$?
17740   echo "$as_me:17740: \$? = $ac_status" >&5
17741   (exit $ac_status); }; }; then
17742   ac_cv_lib_cposix_main=yes
17743 else
17744   echo "$as_me: failed program was:" >&5
17745 cat conftest.$ac_ext >&5
17746 ac_cv_lib_cposix_main=no
17747 fi
17748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17749 LIBS=$ac_check_lib_save_LIBS
17750 fi
17751 echo "$as_me:17751: result: $ac_cv_lib_cposix_main" >&5
17752 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17753 if test $ac_cv_lib_cposix_main = yes; then
17754   cat >>confdefs.h <<EOF
17755 #define HAVE_LIBCPOSIX 1
17756 EOF
17757
17758   LIBS="-lcposix $LIBS"
17759
17760 fi
17761
17762         echo "$as_me:17762: checking for bzero in -linet" >&5
17763 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17764 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17765   echo $ECHO_N "(cached) $ECHO_C" >&6
17766 else
17767   ac_check_lib_save_LIBS=$LIBS
17768 LIBS="-linet  $LIBS"
17769 cat >conftest.$ac_ext <<_ACEOF
17770 #line 17770 "configure"
17771 #include "confdefs.h"
17772
17773 /* Override any gcc2 internal prototype to avoid an error.  */
17774 #ifdef __cplusplus
17775 extern "C"
17776 #endif
17777 /* We use char because int might match the return type of a gcc2
17778    builtin and then its argument prototype would still apply.  */
17779 char bzero ();
17780 int
17781 main (void)
17782 {
17783 bzero ();
17784   ;
17785   return 0;
17786 }
17787 _ACEOF
17788 rm -f conftest.$ac_objext 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); } &&
17794          { ac_try='test -s conftest$ac_exeext'
17795   { (eval echo "$as_me:17795: \"$ac_try\"") >&5
17796   (eval $ac_try) 2>&5
17797   ac_status=$?
17798   echo "$as_me:17798: \$? = $ac_status" >&5
17799   (exit $ac_status); }; }; then
17800   ac_cv_lib_inet_bzero=yes
17801 else
17802   echo "$as_me: failed program was:" >&5
17803 cat conftest.$ac_ext >&5
17804 ac_cv_lib_inet_bzero=no
17805 fi
17806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17807 LIBS=$ac_check_lib_save_LIBS
17808 fi
17809 echo "$as_me:17809: result: $ac_cv_lib_inet_bzero" >&5
17810 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17811 if test $ac_cv_lib_inet_bzero = yes; then
17812
17813 cf_add_libs="-linet"
17814 # Filter out duplicates - this happens with badly-designed ".pc" files...
17815 for cf_add_1lib in $LIBS
17816 do
17817         for cf_add_2lib in $cf_add_libs
17818         do
17819                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17820                 then
17821                         cf_add_1lib=
17822                         break
17823                 fi
17824         done
17825         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17826 done
17827 LIBS="$cf_add_libs"
17828
17829 fi
17830 fi
17831
17832 echo "$as_me:17832: checking if sys/time.h works with sys/select.h" >&5
17833 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17834 if test "${cf_cv_sys_time_select+set}" = set; then
17835   echo $ECHO_N "(cached) $ECHO_C" >&6
17836 else
17837
17838 cat >conftest.$ac_ext <<_ACEOF
17839 #line 17839 "configure"
17840 #include "confdefs.h"
17841
17842 #include <sys/types.h>
17843 #ifdef HAVE_SYS_TIME_H
17844 #include <sys/time.h>
17845 #endif
17846 #ifdef HAVE_SYS_SELECT_H
17847 #include <sys/select.h>
17848 #endif
17849
17850 int
17851 main (void)
17852 {
17853
17854   ;
17855   return 0;
17856 }
17857 _ACEOF
17858 rm -f conftest.$ac_objext
17859 if { (eval echo "$as_me:17859: \"$ac_compile\"") >&5
17860   (eval $ac_compile) 2>&5
17861   ac_status=$?
17862   echo "$as_me:17862: \$? = $ac_status" >&5
17863   (exit $ac_status); } &&
17864          { ac_try='test -s conftest.$ac_objext'
17865   { (eval echo "$as_me:17865: \"$ac_try\"") >&5
17866   (eval $ac_try) 2>&5
17867   ac_status=$?
17868   echo "$as_me:17868: \$? = $ac_status" >&5
17869   (exit $ac_status); }; }; then
17870   cf_cv_sys_time_select=yes
17871 else
17872   echo "$as_me: failed program was:" >&5
17873 cat conftest.$ac_ext >&5
17874 cf_cv_sys_time_select=no
17875 fi
17876 rm -f conftest.$ac_objext conftest.$ac_ext
17877
17878 fi
17879
17880 echo "$as_me:17880: result: $cf_cv_sys_time_select" >&5
17881 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17882 test "$cf_cv_sys_time_select" = yes &&
17883 cat >>confdefs.h <<\EOF
17884 #define HAVE_SYS_TIME_SELECT 1
17885 EOF
17886
17887 ###     checks for compiler characteristics
17888 ac_ext=c
17889 ac_cpp='$CPP $CPPFLAGS'
17890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17893 ac_main_return=return
17894
17895 echo "$as_me:17895: checking for an ANSI C-conforming const" >&5
17896 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17897 if test "${ac_cv_c_const+set}" = set; then
17898   echo $ECHO_N "(cached) $ECHO_C" >&6
17899 else
17900   cat >conftest.$ac_ext <<_ACEOF
17901 #line 17901 "configure"
17902 #include "confdefs.h"
17903
17904 int
17905 main (void)
17906 {
17907 /* FIXME: Include the comments suggested by Paul. */
17908 #ifndef __cplusplus
17909   /* Ultrix mips cc rejects this.  */
17910   typedef int charset[2];
17911   const charset x;
17912   /* SunOS 4.1.1 cc rejects this.  */
17913   char const *const *ccp;
17914   char **p;
17915   /* NEC SVR4.0.2 mips cc rejects this.  */
17916   struct point {int x, y;};
17917   static struct point const zero = {0,0};
17918   /* AIX XL C 1.02.0.0 rejects this.
17919      It does not let you subtract one const X* pointer from another in
17920      an arm of an if-expression whose if-part is not a constant
17921      expression */
17922   const char *g = "string";
17923   ccp = &g + (g ? g-g : 0);
17924   /* HPUX 7.0 cc rejects these. */
17925   ++ccp;
17926   p = (char**) ccp;
17927   ccp = (char const *const *) p;
17928   { /* SCO 3.2v4 cc rejects this.  */
17929     char *t;
17930     char const *s = 0 ? (char *) 0 : (char const *) 0;
17931
17932     *t++ = 0;
17933   }
17934   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17935     int x[] = {25, 17};
17936     const int *foo = &x[0];
17937     ++foo;
17938   }
17939   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17940     typedef const int *iptr;
17941     iptr p = 0;
17942     ++p;
17943   }
17944   { /* AIX XL C 1.02.0.0 rejects this saying
17945        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17946     struct s { int j; const int *ap[3]; };
17947     struct s *b; b->j = 5;
17948   }
17949   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17950     const int foo = 10;
17951   }
17952 #endif
17953
17954   ;
17955   return 0;
17956 }
17957 _ACEOF
17958 rm -f conftest.$ac_objext
17959 if { (eval echo "$as_me:17959: \"$ac_compile\"") >&5
17960   (eval $ac_compile) 2>&5
17961   ac_status=$?
17962   echo "$as_me:17962: \$? = $ac_status" >&5
17963   (exit $ac_status); } &&
17964          { ac_try='test -s conftest.$ac_objext'
17965   { (eval echo "$as_me:17965: \"$ac_try\"") >&5
17966   (eval $ac_try) 2>&5
17967   ac_status=$?
17968   echo "$as_me:17968: \$? = $ac_status" >&5
17969   (exit $ac_status); }; }; then
17970   ac_cv_c_const=yes
17971 else
17972   echo "$as_me: failed program was:" >&5
17973 cat conftest.$ac_ext >&5
17974 ac_cv_c_const=no
17975 fi
17976 rm -f conftest.$ac_objext conftest.$ac_ext
17977 fi
17978 echo "$as_me:17978: result: $ac_cv_c_const" >&5
17979 echo "${ECHO_T}$ac_cv_c_const" >&6
17980 if test $ac_cv_c_const = no; then
17981
17982 cat >>confdefs.h <<\EOF
17983 #define const
17984 EOF
17985
17986 fi
17987
17988 echo "$as_me:17988: checking for inline" >&5
17989 echo $ECHO_N "checking for inline... $ECHO_C" >&6
17990 if test "${ac_cv_c_inline+set}" = set; then
17991   echo $ECHO_N "(cached) $ECHO_C" >&6
17992 else
17993   ac_cv_c_inline=no
17994 for ac_kw in inline __inline__ __inline; do
17995   cat >conftest.$ac_ext <<_ACEOF
17996 #line 17996 "configure"
17997 #include "confdefs.h"
17998 #ifndef __cplusplus
17999 static $ac_kw int static_foo () {return 0; }
18000 $ac_kw int foo () {return 0; }
18001 #endif
18002
18003 _ACEOF
18004 rm -f conftest.$ac_objext
18005 if { (eval echo "$as_me:18005: \"$ac_compile\"") >&5
18006   (eval $ac_compile) 2>&5
18007   ac_status=$?
18008   echo "$as_me:18008: \$? = $ac_status" >&5
18009   (exit $ac_status); } &&
18010          { ac_try='test -s conftest.$ac_objext'
18011   { (eval echo "$as_me:18011: \"$ac_try\"") >&5
18012   (eval $ac_try) 2>&5
18013   ac_status=$?
18014   echo "$as_me:18014: \$? = $ac_status" >&5
18015   (exit $ac_status); }; }; then
18016   ac_cv_c_inline=$ac_kw; break
18017 else
18018   echo "$as_me: failed program was:" >&5
18019 cat conftest.$ac_ext >&5
18020 fi
18021 rm -f conftest.$ac_objext conftest.$ac_ext
18022 done
18023
18024 fi
18025 echo "$as_me:18025: result: $ac_cv_c_inline" >&5
18026 echo "${ECHO_T}$ac_cv_c_inline" >&6
18027 case $ac_cv_c_inline in
18028   inline | yes) ;;
18029   no)
18030 cat >>confdefs.h <<\EOF
18031 #define inline
18032 EOF
18033  ;;
18034   *)  cat >>confdefs.h <<EOF
18035 #define inline $ac_cv_c_inline
18036 EOF
18037  ;;
18038 esac
18039
18040 NCURSES_INLINE=
18041 if test "$ac_cv_c_inline" != no ; then
18042         NCURSES_INLINE=inline
18043         if test "$INTEL_COMPILER" = yes
18044         then
18045                 :
18046         elif test "$CLANG_COMPILER" = yes
18047         then
18048                 :
18049         elif test "$GCC" = yes
18050         then
18051                 echo "$as_me:18051: checking if $CC supports options to tune inlining" >&5
18052 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
18053 if test "${cf_cv_gcc_inline+set}" = set; then
18054   echo $ECHO_N "(cached) $ECHO_C" >&6
18055 else
18056
18057                 cf_save_CFLAGS=$CFLAGS
18058                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
18059                 cat >conftest.$ac_ext <<_ACEOF
18060 #line 18060 "configure"
18061 #include "confdefs.h"
18062 inline int foo(void) { return 1; }
18063 int
18064 main (void)
18065 {
18066 ${cf_cv_main_return:-return} foo()
18067   ;
18068   return 0;
18069 }
18070 _ACEOF
18071 rm -f conftest.$ac_objext
18072 if { (eval echo "$as_me:18072: \"$ac_compile\"") >&5
18073   (eval $ac_compile) 2>&5
18074   ac_status=$?
18075   echo "$as_me:18075: \$? = $ac_status" >&5
18076   (exit $ac_status); } &&
18077          { ac_try='test -s conftest.$ac_objext'
18078   { (eval echo "$as_me:18078: \"$ac_try\"") >&5
18079   (eval $ac_try) 2>&5
18080   ac_status=$?
18081   echo "$as_me:18081: \$? = $ac_status" >&5
18082   (exit $ac_status); }; }; then
18083   cf_cv_gcc_inline=yes
18084 else
18085   echo "$as_me: failed program was:" >&5
18086 cat conftest.$ac_ext >&5
18087 cf_cv_gcc_inline=no
18088 fi
18089 rm -f conftest.$ac_objext conftest.$ac_ext
18090                 CFLAGS=$cf_save_CFLAGS
18091
18092 fi
18093 echo "$as_me:18093: result: $cf_cv_gcc_inline" >&5
18094 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
18095                 if test "$cf_cv_gcc_inline" = yes ; then
18096
18097 cf_fix_cppflags=no
18098 cf_new_cflags=
18099 cf_new_cppflags=
18100 cf_new_extra_cppflags=
18101
18102 for cf_add_cflags in --param max-inline-insns-single=1200
18103 do
18104 case $cf_fix_cppflags in
18105 (no)
18106         case $cf_add_cflags in
18107         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18108                 case $cf_add_cflags in
18109                 (-D*)
18110                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18111
18112                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18113                                 && test -z "${cf_tst_cflags}" \
18114                                 && cf_fix_cppflags=yes
18115
18116                         if test $cf_fix_cppflags = yes ; then
18117
18118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18120
18121                                 continue
18122                         elif test "${cf_tst_cflags}" = "\"'" ; then
18123
18124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18126
18127                                 continue
18128                         fi
18129                         ;;
18130                 esac
18131                 case "$CPPFLAGS" in
18132                 (*$cf_add_cflags)
18133                         ;;
18134                 (*)
18135                         case $cf_add_cflags in
18136                         (-D*)
18137                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18138
18139 CPPFLAGS=`echo "$CPPFLAGS" | \
18140         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18141                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18142
18143                                 ;;
18144                         esac
18145
18146         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18147         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18148
18149                         ;;
18150                 esac
18151                 ;;
18152         (*)
18153
18154         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18155         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18156
18157                 ;;
18158         esac
18159         ;;
18160 (yes)
18161
18162         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18163         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18164
18165         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18166
18167         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18168                 && test -z "${cf_tst_cflags}" \
18169                 && cf_fix_cppflags=no
18170         ;;
18171 esac
18172 done
18173
18174 if test -n "$cf_new_cflags" ; then
18175
18176         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18177         CFLAGS="${CFLAGS}$cf_new_cflags"
18178
18179 fi
18180
18181 if test -n "$cf_new_cppflags" ; then
18182
18183         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18184         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18185
18186 fi
18187
18188 if test -n "$cf_new_extra_cppflags" ; then
18189
18190         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18191         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18192
18193 fi
18194
18195                 fi
18196         fi
18197 fi
18198
18199 echo "$as_me:18199: checking for signal global datatype" >&5
18200 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18201 if test "${cf_cv_sig_atomic_t+set}" = set; then
18202   echo $ECHO_N "(cached) $ECHO_C" >&6
18203 else
18204
18205         for cf_type in \
18206                 "volatile sig_atomic_t" \
18207                 "sig_atomic_t" \
18208                 "int"
18209         do
18210         cat >conftest.$ac_ext <<_ACEOF
18211 #line 18211 "configure"
18212 #include "confdefs.h"
18213
18214 #include <sys/types.h>
18215 #include <signal.h>
18216 #include <stdio.h>
18217
18218 extern $cf_type x;
18219 $cf_type x;
18220 static void handler(int sig)
18221 {
18222         x = 5;
18223 }
18224 int
18225 main (void)
18226 {
18227 signal(SIGINT, handler);
18228                  x = 1
18229   ;
18230   return 0;
18231 }
18232 _ACEOF
18233 rm -f conftest.$ac_objext
18234 if { (eval echo "$as_me:18234: \"$ac_compile\"") >&5
18235   (eval $ac_compile) 2>&5
18236   ac_status=$?
18237   echo "$as_me:18237: \$? = $ac_status" >&5
18238   (exit $ac_status); } &&
18239          { ac_try='test -s conftest.$ac_objext'
18240   { (eval echo "$as_me:18240: \"$ac_try\"") >&5
18241   (eval $ac_try) 2>&5
18242   ac_status=$?
18243   echo "$as_me:18243: \$? = $ac_status" >&5
18244   (exit $ac_status); }; }; then
18245   cf_cv_sig_atomic_t=$cf_type
18246 else
18247   echo "$as_me: failed program was:" >&5
18248 cat conftest.$ac_ext >&5
18249 cf_cv_sig_atomic_t=no
18250 fi
18251 rm -f conftest.$ac_objext conftest.$ac_ext
18252                 test "$cf_cv_sig_atomic_t" != no && break
18253         done
18254
18255 fi
18256
18257 echo "$as_me:18257: result: $cf_cv_sig_atomic_t" >&5
18258 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18259 test "$cf_cv_sig_atomic_t" != no &&
18260 cat >>confdefs.h <<EOF
18261 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18262 EOF
18263
18264 if test $NCURSES_CHTYPE = auto ; then
18265
18266 echo "$as_me:18266: checking for type of chtype" >&5
18267 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18268 if test "${cf_cv_typeof_chtype+set}" = set; then
18269   echo $ECHO_N "(cached) $ECHO_C" >&6
18270 else
18271
18272                 if test "$cross_compiling" = yes; then
18273   cf_cv_typeof_chtype=long
18274 else
18275   cat >conftest.$ac_ext <<_ACEOF
18276 #line 18276 "configure"
18277 #include "confdefs.h"
18278
18279 #define WANT_BITS 31
18280 #include <stdio.h>
18281 int main(void)
18282 {
18283         FILE *fp = fopen("cf_test.out", "w");
18284         if (fp != 0) {
18285                 char *result = "long";
18286                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18287                         int n;
18288                         unsigned int x, y;
18289                         for (n = 0; n < WANT_BITS; n++) {
18290                                 x = (1 << n);
18291                                 y = (x >> n);
18292                                 if (y != 1 || x == 0) {
18293                                         x = 0;
18294                                         break;
18295                                 }
18296                         }
18297                         /*
18298                          * If x is nonzero, an int is big enough for the bits
18299                          * that we want.
18300                          */
18301                         result = (x != 0) ? "int" : "long";
18302                 }
18303                 fputs(result, fp);
18304                 fclose(fp);
18305         }
18306         ${cf_cv_main_return:-return}(0);
18307 }
18308
18309 _ACEOF
18310 rm -f conftest$ac_exeext
18311 if { (eval echo "$as_me:18311: \"$ac_link\"") >&5
18312   (eval $ac_link) 2>&5
18313   ac_status=$?
18314   echo "$as_me:18314: \$? = $ac_status" >&5
18315   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18316   { (eval echo "$as_me:18316: \"$ac_try\"") >&5
18317   (eval $ac_try) 2>&5
18318   ac_status=$?
18319   echo "$as_me:18319: \$? = $ac_status" >&5
18320   (exit $ac_status); }; }; then
18321   cf_cv_typeof_chtype=`cat cf_test.out`
18322 else
18323   echo "$as_me: program exited with status $ac_status" >&5
18324 echo "$as_me: failed program was:" >&5
18325 cat conftest.$ac_ext >&5
18326 cf_cv_typeof_chtype=long
18327 fi
18328 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18329 fi
18330                 rm -f cf_test.out
18331
18332 fi
18333
18334 echo "$as_me:18334: result: $cf_cv_typeof_chtype" >&5
18335 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18336
18337 cat >>confdefs.h <<EOF
18338 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18339 EOF
18340
18341 else
18342         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18343 fi
18344 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18345
18346 echo "$as_me:18346: checking if unsigned literals are legal" >&5
18347 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18348 if test "${cf_cv_unsigned_literals+set}" = set; then
18349   echo $ECHO_N "(cached) $ECHO_C" >&6
18350 else
18351
18352         cat >conftest.$ac_ext <<_ACEOF
18353 #line 18353 "configure"
18354 #include "confdefs.h"
18355
18356 int
18357 main (void)
18358 {
18359 long x = 1L + 1UL + 1U + 1
18360   ;
18361   return 0;
18362 }
18363 _ACEOF
18364 rm -f conftest.$ac_objext
18365 if { (eval echo "$as_me:18365: \"$ac_compile\"") >&5
18366   (eval $ac_compile) 2>&5
18367   ac_status=$?
18368   echo "$as_me:18368: \$? = $ac_status" >&5
18369   (exit $ac_status); } &&
18370          { ac_try='test -s conftest.$ac_objext'
18371   { (eval echo "$as_me:18371: \"$ac_try\"") >&5
18372   (eval $ac_try) 2>&5
18373   ac_status=$?
18374   echo "$as_me:18374: \$? = $ac_status" >&5
18375   (exit $ac_status); }; }; then
18376   cf_cv_unsigned_literals=yes
18377 else
18378   echo "$as_me: failed program was:" >&5
18379 cat conftest.$ac_ext >&5
18380 cf_cv_unsigned_literals=no
18381 fi
18382 rm -f conftest.$ac_objext conftest.$ac_ext
18383
18384 fi
18385
18386 echo "$as_me:18386: result: $cf_cv_unsigned_literals" >&5
18387 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
18388
18389 cf_cv_1UL="1"
18390 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
18391 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
18392
18393 if test $NCURSES_MMASK_T = auto ; then
18394         cf_cv_typeof_mmask_t=long
18395 else
18396         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
18397 fi
18398 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
18399
18400 ###     Checks for external-data
18401
18402 echo "$as_me:18402: checking if external errno is declared" >&5
18403 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
18404 if test "${cf_cv_dcl_errno+set}" = set; then
18405   echo $ECHO_N "(cached) $ECHO_C" >&6
18406 else
18407
18408         cat >conftest.$ac_ext <<_ACEOF
18409 #line 18409 "configure"
18410 #include "confdefs.h"
18411
18412 #ifdef HAVE_STDLIB_H
18413 #include <stdlib.h>
18414 #endif
18415 #include <stdio.h>
18416 #include <sys/types.h>
18417 #include <errno.h>
18418 int
18419 main (void)
18420 {
18421 int x = (int) errno
18422   ;
18423   return 0;
18424 }
18425 _ACEOF
18426 rm -f conftest.$ac_objext
18427 if { (eval echo "$as_me:18427: \"$ac_compile\"") >&5
18428   (eval $ac_compile) 2>&5
18429   ac_status=$?
18430   echo "$as_me:18430: \$? = $ac_status" >&5
18431   (exit $ac_status); } &&
18432          { ac_try='test -s conftest.$ac_objext'
18433   { (eval echo "$as_me:18433: \"$ac_try\"") >&5
18434   (eval $ac_try) 2>&5
18435   ac_status=$?
18436   echo "$as_me:18436: \$? = $ac_status" >&5
18437   (exit $ac_status); }; }; then
18438   cf_cv_dcl_errno=yes
18439 else
18440   echo "$as_me: failed program was:" >&5
18441 cat conftest.$ac_ext >&5
18442 cf_cv_dcl_errno=no
18443 fi
18444 rm -f conftest.$ac_objext conftest.$ac_ext
18445
18446 fi
18447 echo "$as_me:18447: result: $cf_cv_dcl_errno" >&5
18448 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
18449
18450 if test "$cf_cv_dcl_errno" = no ; then
18451
18452 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18453
18454         cat >>confdefs.h <<EOF
18455 #define $cf_result 1
18456 EOF
18457
18458 fi
18459
18460 # It's possible (for near-UNIX clones) that the data doesn't exist
18461
18462 echo "$as_me:18462: checking if external errno exists" >&5
18463 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
18464 if test "${cf_cv_have_errno+set}" = set; then
18465   echo $ECHO_N "(cached) $ECHO_C" >&6
18466 else
18467
18468         cat >conftest.$ac_ext <<_ACEOF
18469 #line 18469 "configure"
18470 #include "confdefs.h"
18471
18472 #undef errno
18473 extern int errno;
18474
18475 int
18476 main (void)
18477 {
18478 errno = 2
18479   ;
18480   return 0;
18481 }
18482 _ACEOF
18483 rm -f conftest.$ac_objext conftest$ac_exeext
18484 if { (eval echo "$as_me:18484: \"$ac_link\"") >&5
18485   (eval $ac_link) 2>&5
18486   ac_status=$?
18487   echo "$as_me:18487: \$? = $ac_status" >&5
18488   (exit $ac_status); } &&
18489          { ac_try='test -s conftest$ac_exeext'
18490   { (eval echo "$as_me:18490: \"$ac_try\"") >&5
18491   (eval $ac_try) 2>&5
18492   ac_status=$?
18493   echo "$as_me:18493: \$? = $ac_status" >&5
18494   (exit $ac_status); }; }; then
18495   cf_cv_have_errno=yes
18496 else
18497   echo "$as_me: failed program was:" >&5
18498 cat conftest.$ac_ext >&5
18499 cf_cv_have_errno=no
18500 fi
18501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18502
18503 fi
18504 echo "$as_me:18504: result: $cf_cv_have_errno" >&5
18505 echo "${ECHO_T}$cf_cv_have_errno" >&6
18506
18507 if test "$cf_cv_have_errno" = yes ; then
18508
18509 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18510
18511         cat >>confdefs.h <<EOF
18512 #define $cf_result 1
18513 EOF
18514
18515 fi
18516
18517 echo "$as_me:18517: checking if data-only library module links" >&5
18518 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18519 if test "${cf_cv_link_dataonly+set}" = set; then
18520   echo $ECHO_N "(cached) $ECHO_C" >&6
18521 else
18522
18523         rm -f conftest.a
18524         cat >conftest.$ac_ext <<EOF
18525 #line 18525 "configure"
18526 int     testdata[3] = { 123, 456, 789 };
18527 EOF
18528         if { (eval echo "$as_me:18528: \"$ac_compile\"") >&5
18529   (eval $ac_compile) 2>&5
18530   ac_status=$?
18531   echo "$as_me:18531: \$? = $ac_status" >&5
18532   (exit $ac_status); } ; then
18533                 mv conftest.o data.o && \
18534                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
18535         fi
18536         rm -f conftest.$ac_ext data.o
18537         cat >conftest.$ac_ext <<EOF
18538 #line 18538 "configure"
18539 int     testfunc(void)
18540 {
18541 #if defined(NeXT)
18542         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
18543 #else
18544         extern int testdata[3];
18545         return testdata[0] == 123
18546            &&  testdata[1] == 456
18547            &&  testdata[2] == 789;
18548 #endif
18549 }
18550 EOF
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); }; then
18556                 mv conftest.o func.o && \
18557                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
18558         fi
18559         rm -f conftest.$ac_ext func.o
18560         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18561         cf_saveLIBS="$LIBS"
18562         LIBS="conftest.a $LIBS"
18563         if test "$cross_compiling" = yes; then
18564   cf_cv_link_dataonly=unknown
18565 else
18566   cat >conftest.$ac_ext <<_ACEOF
18567 #line 18567 "configure"
18568 #include "confdefs.h"
18569
18570         int main(void)
18571         {
18572                 extern int testfunc();
18573                 ${cf_cv_main_return:-return} (!testfunc());
18574         }
18575
18576 _ACEOF
18577 rm -f conftest$ac_exeext
18578 if { (eval echo "$as_me:18578: \"$ac_link\"") >&5
18579   (eval $ac_link) 2>&5
18580   ac_status=$?
18581   echo "$as_me:18581: \$? = $ac_status" >&5
18582   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18583   { (eval echo "$as_me:18583: \"$ac_try\"") >&5
18584   (eval $ac_try) 2>&5
18585   ac_status=$?
18586   echo "$as_me:18586: \$? = $ac_status" >&5
18587   (exit $ac_status); }; }; then
18588   cf_cv_link_dataonly=yes
18589 else
18590   echo "$as_me: program exited with status $ac_status" >&5
18591 echo "$as_me: failed program was:" >&5
18592 cat conftest.$ac_ext >&5
18593 cf_cv_link_dataonly=no
18594 fi
18595 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18596 fi
18597         LIBS="$cf_saveLIBS"
18598
18599 fi
18600
18601 echo "$as_me:18601: result: $cf_cv_link_dataonly" >&5
18602 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18603
18604 if test "$cf_cv_link_dataonly" = no ; then
18605
18606 cat >>confdefs.h <<\EOF
18607 #define BROKEN_LINKER 1
18608 EOF
18609
18610         BROKEN_LINKER=1
18611 fi
18612
18613 ###     Checks for library functions.
18614
18615 for ac_func in \
18616 getcwd \
18617 getegid \
18618 geteuid \
18619 getopt \
18620 getttynam \
18621 issetugid \
18622 poll \
18623 putenv \
18624 remove \
18625 select \
18626 setbuf \
18627 setbuffer \
18628 setenv \
18629 setvbuf \
18630 sigaction \
18631 sigvec \
18632 strdup \
18633 strstr \
18634 tcgetpgrp \
18635 tdestroy \
18636 times \
18637 tsearch \
18638 vsnprintf \
18639
18640 do
18641 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18642 echo "$as_me:18642: checking for $ac_func" >&5
18643 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18644 if eval "test \"\${$as_ac_var+set}\" = set"; then
18645   echo $ECHO_N "(cached) $ECHO_C" >&6
18646 else
18647   cat >conftest.$ac_ext <<_ACEOF
18648 #line 18648 "configure"
18649 #include "confdefs.h"
18650 /* System header to define __stub macros and hopefully few prototypes,
18651     which can conflict with char $ac_func (); below.  */
18652 #include <assert.h>
18653 /* Override any gcc2 internal prototype to avoid an error.  */
18654 #ifdef __cplusplus
18655 extern "C"
18656 #endif
18657 /* We use char because int might match the return type of a gcc2
18658    builtin and then its argument prototype would still apply.  */
18659 char $ac_func ();
18660 char (*f) ();
18661
18662 int
18663 main (void)
18664 {
18665 /* The GNU C library defines this for functions which it implements
18666     to always fail with ENOSYS.  Some functions are actually named
18667     something starting with __ and the normal name is an alias.  */
18668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18669 choke me
18670 #else
18671 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18672 #endif
18673
18674   ;
18675   return 0;
18676 }
18677 _ACEOF
18678 rm -f conftest.$ac_objext conftest$ac_exeext
18679 if { (eval echo "$as_me:18679: \"$ac_link\"") >&5
18680   (eval $ac_link) 2>&5
18681   ac_status=$?
18682   echo "$as_me:18682: \$? = $ac_status" >&5
18683   (exit $ac_status); } &&
18684          { ac_try='test -s conftest$ac_exeext'
18685   { (eval echo "$as_me:18685: \"$ac_try\"") >&5
18686   (eval $ac_try) 2>&5
18687   ac_status=$?
18688   echo "$as_me:18688: \$? = $ac_status" >&5
18689   (exit $ac_status); }; }; then
18690   eval "$as_ac_var=yes"
18691 else
18692   echo "$as_me: failed program was:" >&5
18693 cat conftest.$ac_ext >&5
18694 eval "$as_ac_var=no"
18695 fi
18696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18697 fi
18698 echo "$as_me:18698: result: `eval echo '${'$as_ac_var'}'`" >&5
18699 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18700 if test `eval echo '${'$as_ac_var'}'` = yes; then
18701   cat >>confdefs.h <<EOF
18702 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18703 EOF
18704
18705 fi
18706 done
18707
18708 if test "x$ac_cv_func_getopt" = xno && \
18709    test "x$cf_with_progs$cf_with_tests" != xnono; then
18710         { { echo "$as_me:18710: error: getopt is required for building programs" >&5
18711 echo "$as_me: error: getopt is required for building programs" >&2;}
18712    { (exit 1); exit 1; }; }
18713 fi
18714
18715 if test "x$with_safe_sprintf" = xyes
18716 then
18717         if test "x$ac_cv_func_vsnprintf" = xyes
18718         then
18719                 { echo "$as_me:18719: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18720 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18721         else
18722
18723 cat >>confdefs.h <<\EOF
18724 #define USE_SAFE_SPRINTF 1
18725 EOF
18726
18727         fi
18728 fi
18729
18730 if test "x$with_getcap" = "xyes" ; then
18731
18732 echo "$as_me:18732: checking for terminal-capability database functions" >&5
18733 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18734 if test "${cf_cv_cgetent+set}" = set; then
18735   echo $ECHO_N "(cached) $ECHO_C" >&6
18736 else
18737
18738 cat >conftest.$ac_ext <<_ACEOF
18739 #line 18739 "configure"
18740 #include "confdefs.h"
18741
18742 #include <stdlib.h>
18743 int
18744 main (void)
18745 {
18746
18747         char temp[128];
18748         char *buf = temp;
18749         char *db_array = temp;
18750         cgetent(&buf, &db_array, "vt100");
18751         cgetcap(buf, "tc", '=');
18752         cgetmatch(buf, "tc");
18753
18754   ;
18755   return 0;
18756 }
18757 _ACEOF
18758 rm -f conftest.$ac_objext conftest$ac_exeext
18759 if { (eval echo "$as_me:18759: \"$ac_link\"") >&5
18760   (eval $ac_link) 2>&5
18761   ac_status=$?
18762   echo "$as_me:18762: \$? = $ac_status" >&5
18763   (exit $ac_status); } &&
18764          { ac_try='test -s conftest$ac_exeext'
18765   { (eval echo "$as_me:18765: \"$ac_try\"") >&5
18766   (eval $ac_try) 2>&5
18767   ac_status=$?
18768   echo "$as_me:18768: \$? = $ac_status" >&5
18769   (exit $ac_status); }; }; then
18770   cf_cv_cgetent=yes
18771 else
18772   echo "$as_me: failed program was:" >&5
18773 cat conftest.$ac_ext >&5
18774 cf_cv_cgetent=no
18775 fi
18776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18777
18778 fi
18779 echo "$as_me:18779: result: $cf_cv_cgetent" >&5
18780 echo "${ECHO_T}$cf_cv_cgetent" >&6
18781
18782 if test "$cf_cv_cgetent" = yes
18783 then
18784
18785 cat >>confdefs.h <<\EOF
18786 #define HAVE_BSD_CGETENT 1
18787 EOF
18788
18789 echo "$as_me:18789: checking if cgetent uses const parameter" >&5
18790 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18791 if test "${cf_cv_cgetent_const+set}" = set; then
18792   echo $ECHO_N "(cached) $ECHO_C" >&6
18793 else
18794
18795 cat >conftest.$ac_ext <<_ACEOF
18796 #line 18796 "configure"
18797 #include "confdefs.h"
18798
18799 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18800 #include <stdlib.h>
18801 int
18802 main (void)
18803 {
18804
18805         char temp[128];
18806         char *buf = temp;
18807 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18808         const char *db_array = temp;
18809         cgetent(&buf, &db_array, "vt100");
18810 #endif
18811         cgetcap(buf, "tc", '=');
18812         cgetmatch(buf, "tc");
18813
18814   ;
18815   return 0;
18816 }
18817 _ACEOF
18818 rm -f conftest.$ac_objext conftest$ac_exeext
18819 if { (eval echo "$as_me:18819: \"$ac_link\"") >&5
18820   (eval $ac_link) 2>&5
18821   ac_status=$?
18822   echo "$as_me:18822: \$? = $ac_status" >&5
18823   (exit $ac_status); } &&
18824          { ac_try='test -s conftest$ac_exeext'
18825   { (eval echo "$as_me:18825: \"$ac_try\"") >&5
18826   (eval $ac_try) 2>&5
18827   ac_status=$?
18828   echo "$as_me:18828: \$? = $ac_status" >&5
18829   (exit $ac_status); }; }; then
18830   cf_cv_cgetent_const=yes
18831 else
18832   echo "$as_me: failed program was:" >&5
18833 cat conftest.$ac_ext >&5
18834 cf_cv_cgetent_const=no
18835 fi
18836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18837
18838 fi
18839 echo "$as_me:18839: result: $cf_cv_cgetent_const" >&5
18840 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18841         if test "$cf_cv_cgetent_const" = yes
18842         then
18843
18844 cat >>confdefs.h <<EOF
18845 #define CGETENT_CONST const
18846 EOF
18847
18848         fi
18849 fi
18850
18851 fi
18852
18853 echo "$as_me:18853: checking for isascii" >&5
18854 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18855 if test "${cf_cv_have_isascii+set}" = set; then
18856   echo $ECHO_N "(cached) $ECHO_C" >&6
18857 else
18858
18859         cat >conftest.$ac_ext <<_ACEOF
18860 #line 18860 "configure"
18861 #include "confdefs.h"
18862 #include <ctype.h>
18863 int
18864 main (void)
18865 {
18866 int x = isascii(' ')
18867   ;
18868   return 0;
18869 }
18870 _ACEOF
18871 rm -f conftest.$ac_objext conftest$ac_exeext
18872 if { (eval echo "$as_me:18872: \"$ac_link\"") >&5
18873   (eval $ac_link) 2>&5
18874   ac_status=$?
18875   echo "$as_me:18875: \$? = $ac_status" >&5
18876   (exit $ac_status); } &&
18877          { ac_try='test -s conftest$ac_exeext'
18878   { (eval echo "$as_me:18878: \"$ac_try\"") >&5
18879   (eval $ac_try) 2>&5
18880   ac_status=$?
18881   echo "$as_me:18881: \$? = $ac_status" >&5
18882   (exit $ac_status); }; }; then
18883   cf_cv_have_isascii=yes
18884 else
18885   echo "$as_me: failed program was:" >&5
18886 cat conftest.$ac_ext >&5
18887 cf_cv_have_isascii=no
18888 fi
18889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18890
18891 fi
18892 echo "$as_me:18892: result: $cf_cv_have_isascii" >&5
18893 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18894 test "$cf_cv_have_isascii" = yes &&
18895 cat >>confdefs.h <<\EOF
18896 #define HAVE_ISASCII 1
18897 EOF
18898
18899 if test "$ac_cv_func_sigaction" = yes; then
18900 echo "$as_me:18900: checking whether sigaction needs _POSIX_SOURCE" >&5
18901 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18902 cat >conftest.$ac_ext <<_ACEOF
18903 #line 18903 "configure"
18904 #include "confdefs.h"
18905
18906 #include <sys/types.h>
18907 #include <signal.h>
18908 int
18909 main (void)
18910 {
18911 struct sigaction act
18912   ;
18913   return 0;
18914 }
18915 _ACEOF
18916 rm -f conftest.$ac_objext
18917 if { (eval echo "$as_me:18917: \"$ac_compile\"") >&5
18918   (eval $ac_compile) 2>&5
18919   ac_status=$?
18920   echo "$as_me:18920: \$? = $ac_status" >&5
18921   (exit $ac_status); } &&
18922          { ac_try='test -s conftest.$ac_objext'
18923   { (eval echo "$as_me:18923: \"$ac_try\"") >&5
18924   (eval $ac_try) 2>&5
18925   ac_status=$?
18926   echo "$as_me:18926: \$? = $ac_status" >&5
18927   (exit $ac_status); }; }; then
18928   sigact_bad=no
18929 else
18930   echo "$as_me: failed program was:" >&5
18931 cat conftest.$ac_ext >&5
18932
18933 cat >conftest.$ac_ext <<_ACEOF
18934 #line 18934 "configure"
18935 #include "confdefs.h"
18936
18937 #define _POSIX_SOURCE
18938 #include <sys/types.h>
18939 #include <signal.h>
18940 int
18941 main (void)
18942 {
18943 struct sigaction act
18944   ;
18945   return 0;
18946 }
18947 _ACEOF
18948 rm -f conftest.$ac_objext
18949 if { (eval echo "$as_me:18949: \"$ac_compile\"") >&5
18950   (eval $ac_compile) 2>&5
18951   ac_status=$?
18952   echo "$as_me:18952: \$? = $ac_status" >&5
18953   (exit $ac_status); } &&
18954          { ac_try='test -s conftest.$ac_objext'
18955   { (eval echo "$as_me:18955: \"$ac_try\"") >&5
18956   (eval $ac_try) 2>&5
18957   ac_status=$?
18958   echo "$as_me:18958: \$? = $ac_status" >&5
18959   (exit $ac_status); }; }; then
18960   sigact_bad=yes
18961
18962 cat >>confdefs.h <<\EOF
18963 #define _POSIX_SOURCE 1
18964 EOF
18965
18966 else
18967   echo "$as_me: failed program was:" >&5
18968 cat conftest.$ac_ext >&5
18969 sigact_bad=unknown
18970 fi
18971 rm -f conftest.$ac_objext conftest.$ac_ext
18972 fi
18973 rm -f conftest.$ac_objext conftest.$ac_ext
18974 echo "$as_me:18974: result: $sigact_bad" >&5
18975 echo "${ECHO_T}$sigact_bad" >&6
18976 fi
18977
18978 echo "$as_me:18978: checking if nanosleep really works" >&5
18979 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
18980 if test "${cf_cv_func_nanosleep+set}" = set; then
18981   echo $ECHO_N "(cached) $ECHO_C" >&6
18982 else
18983
18984 if test "$cross_compiling" = yes; then
18985   cf_cv_func_nanosleep=unknown
18986 else
18987   cat >conftest.$ac_ext <<_ACEOF
18988 #line 18988 "configure"
18989 #include "confdefs.h"
18990
18991 #include <stdio.h>
18992 #include <errno.h>
18993 #include <time.h>
18994
18995 #ifdef HAVE_SYS_TIME_H
18996 #include <sys/time.h>
18997 #endif
18998
18999 int main(void) {
19000         struct timespec ts1, ts2;
19001         int code;
19002         ts1.tv_sec  = 0;
19003         ts1.tv_nsec = 750000000;
19004         ts2.tv_sec  = 0;
19005         ts2.tv_nsec = 0;
19006         errno = 0;
19007         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19008         ${cf_cv_main_return:-return}(code != 0);
19009 }
19010
19011 _ACEOF
19012 rm -f conftest$ac_exeext
19013 if { (eval echo "$as_me:19013: \"$ac_link\"") >&5
19014   (eval $ac_link) 2>&5
19015   ac_status=$?
19016   echo "$as_me:19016: \$? = $ac_status" >&5
19017   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19018   { (eval echo "$as_me:19018: \"$ac_try\"") >&5
19019   (eval $ac_try) 2>&5
19020   ac_status=$?
19021   echo "$as_me:19021: \$? = $ac_status" >&5
19022   (exit $ac_status); }; }; then
19023   cf_cv_func_nanosleep=yes
19024 else
19025   echo "$as_me: program exited with status $ac_status" >&5
19026 echo "$as_me: failed program was:" >&5
19027 cat conftest.$ac_ext >&5
19028 cf_cv_func_nanosleep=no
19029 fi
19030 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19031 fi
19032 fi
19033 echo "$as_me:19033: result: $cf_cv_func_nanosleep" >&5
19034 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19035
19036 test "$cf_cv_func_nanosleep" = "yes" &&
19037 cat >>confdefs.h <<\EOF
19038 #define HAVE_NANOSLEEP 1
19039 EOF
19040
19041 for ac_header in \
19042 termio.h \
19043 termios.h \
19044 unistd.h \
19045 sys/ioctl.h \
19046 sys/termio.h \
19047
19048 do
19049 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19050 echo "$as_me:19050: checking for $ac_header" >&5
19051 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19052 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19053   echo $ECHO_N "(cached) $ECHO_C" >&6
19054 else
19055   cat >conftest.$ac_ext <<_ACEOF
19056 #line 19056 "configure"
19057 #include "confdefs.h"
19058 #include <$ac_header>
19059 _ACEOF
19060 if { (eval echo "$as_me:19060: \"$ac_cpp conftest.$ac_ext\"") >&5
19061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19062   ac_status=$?
19063   egrep -v '^ *\+' conftest.er1 >conftest.err
19064   rm -f conftest.er1
19065   cat conftest.err >&5
19066   echo "$as_me:19066: \$? = $ac_status" >&5
19067   (exit $ac_status); } >/dev/null; then
19068   if test -s conftest.err; then
19069     ac_cpp_err=$ac_c_preproc_warn_flag
19070   else
19071     ac_cpp_err=
19072   fi
19073 else
19074   ac_cpp_err=yes
19075 fi
19076 if test -z "$ac_cpp_err"; then
19077   eval "$as_ac_Header=yes"
19078 else
19079   echo "$as_me: failed program was:" >&5
19080   cat conftest.$ac_ext >&5
19081   eval "$as_ac_Header=no"
19082 fi
19083 rm -f conftest.err conftest.$ac_ext
19084 fi
19085 echo "$as_me:19085: result: `eval echo '${'$as_ac_Header'}'`" >&5
19086 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19087 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19088   cat >>confdefs.h <<EOF
19089 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19090 EOF
19091
19092 fi
19093 done
19094
19095 if test "$ac_cv_header_termios_h" = yes ; then
19096         case "$CFLAGS $CPPFLAGS" in
19097         (*-D_POSIX_SOURCE*)
19098                 termios_bad=dunno ;;
19099         (*)     termios_bad=maybe ;;
19100         esac
19101         if test "$termios_bad" = maybe ; then
19102         echo "$as_me:19102: checking whether termios.h needs _POSIX_SOURCE" >&5
19103 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
19104         cat >conftest.$ac_ext <<_ACEOF
19105 #line 19105 "configure"
19106 #include "confdefs.h"
19107 #include <termios.h>
19108 int
19109 main (void)
19110 {
19111 struct termios foo; int x = foo.c_iflag
19112   ;
19113   return 0;
19114 }
19115 _ACEOF
19116 rm -f conftest.$ac_objext
19117 if { (eval echo "$as_me:19117: \"$ac_compile\"") >&5
19118   (eval $ac_compile) 2>&5
19119   ac_status=$?
19120   echo "$as_me:19120: \$? = $ac_status" >&5
19121   (exit $ac_status); } &&
19122          { ac_try='test -s conftest.$ac_objext'
19123   { (eval echo "$as_me:19123: \"$ac_try\"") >&5
19124   (eval $ac_try) 2>&5
19125   ac_status=$?
19126   echo "$as_me:19126: \$? = $ac_status" >&5
19127   (exit $ac_status); }; }; then
19128   termios_bad=no
19129 else
19130   echo "$as_me: failed program was:" >&5
19131 cat conftest.$ac_ext >&5
19132
19133                 cat >conftest.$ac_ext <<_ACEOF
19134 #line 19134 "configure"
19135 #include "confdefs.h"
19136
19137 #define _POSIX_SOURCE
19138 #include <termios.h>
19139 int
19140 main (void)
19141 {
19142 struct termios foo; int x = foo.c_iflag
19143   ;
19144   return 0;
19145 }
19146 _ACEOF
19147 rm -f conftest.$ac_objext
19148 if { (eval echo "$as_me:19148: \"$ac_compile\"") >&5
19149   (eval $ac_compile) 2>&5
19150   ac_status=$?
19151   echo "$as_me:19151: \$? = $ac_status" >&5
19152   (exit $ac_status); } &&
19153          { ac_try='test -s conftest.$ac_objext'
19154   { (eval echo "$as_me:19154: \"$ac_try\"") >&5
19155   (eval $ac_try) 2>&5
19156   ac_status=$?
19157   echo "$as_me:19157: \$? = $ac_status" >&5
19158   (exit $ac_status); }; }; then
19159   termios_bad=unknown
19160 else
19161   echo "$as_me: failed program was:" >&5
19162 cat conftest.$ac_ext >&5
19163 termios_bad=yes
19164 cat >>confdefs.h <<\EOF
19165 #define _POSIX_SOURCE 1
19166 EOF
19167
19168 fi
19169 rm -f conftest.$ac_objext conftest.$ac_ext
19170
19171 fi
19172 rm -f conftest.$ac_objext conftest.$ac_ext
19173         echo "$as_me:19173: result: $termios_bad" >&5
19174 echo "${ECHO_T}$termios_bad" >&6
19175         fi
19176 fi
19177
19178 echo "$as_me:19178: checking for tcgetattr" >&5
19179 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19180 if test "${cf_cv_have_tcgetattr+set}" = set; then
19181   echo $ECHO_N "(cached) $ECHO_C" >&6
19182 else
19183
19184 cat >conftest.$ac_ext <<_ACEOF
19185 #line 19185 "configure"
19186 #include "confdefs.h"
19187
19188 #include <sys/types.h>
19189 #ifdef HAVE_UNISTD_H
19190 #include <unistd.h>
19191 #endif
19192 #ifdef HAVE_TERMIOS_H
19193 #include <termios.h>
19194 #define TTY struct termios
19195 #else
19196 #ifdef HAVE_TERMIO_H
19197 #include <termio.h>
19198 #define TTY struct termio
19199 #endif
19200 #endif
19201
19202 int
19203 main (void)
19204 {
19205
19206 TTY foo;
19207 tcgetattr(1, &foo);
19208   ;
19209   return 0;
19210 }
19211 _ACEOF
19212 rm -f conftest.$ac_objext conftest$ac_exeext
19213 if { (eval echo "$as_me:19213: \"$ac_link\"") >&5
19214   (eval $ac_link) 2>&5
19215   ac_status=$?
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit $ac_status); } &&
19218          { ac_try='test -s conftest$ac_exeext'
19219   { (eval echo "$as_me:19219: \"$ac_try\"") >&5
19220   (eval $ac_try) 2>&5
19221   ac_status=$?
19222   echo "$as_me:19222: \$? = $ac_status" >&5
19223   (exit $ac_status); }; }; then
19224   cf_cv_have_tcgetattr=yes
19225 else
19226   echo "$as_me: failed program was:" >&5
19227 cat conftest.$ac_ext >&5
19228 cf_cv_have_tcgetattr=no
19229 fi
19230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19231 fi
19232 echo "$as_me:19232: result: $cf_cv_have_tcgetattr" >&5
19233 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19234 test "$cf_cv_have_tcgetattr" = yes &&
19235 cat >>confdefs.h <<\EOF
19236 #define HAVE_TCGETATTR 1
19237 EOF
19238
19239 echo "$as_me:19239: checking for vsscanf function or workaround" >&5
19240 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19241 if test "${cf_cv_func_vsscanf+set}" = set; then
19242   echo $ECHO_N "(cached) $ECHO_C" >&6
19243 else
19244
19245 cat >conftest.$ac_ext <<_ACEOF
19246 #line 19246 "configure"
19247 #include "confdefs.h"
19248
19249 #include <stdarg.h>
19250 #include <stdio.h>
19251 int
19252 main (void)
19253 {
19254
19255         va_list ap;
19256         vsscanf("from", "%d", ap)
19257   ;
19258   return 0;
19259 }
19260 _ACEOF
19261 rm -f conftest.$ac_objext conftest$ac_exeext
19262 if { (eval echo "$as_me:19262: \"$ac_link\"") >&5
19263   (eval $ac_link) 2>&5
19264   ac_status=$?
19265   echo "$as_me:19265: \$? = $ac_status" >&5
19266   (exit $ac_status); } &&
19267          { ac_try='test -s conftest$ac_exeext'
19268   { (eval echo "$as_me:19268: \"$ac_try\"") >&5
19269   (eval $ac_try) 2>&5
19270   ac_status=$?
19271   echo "$as_me:19271: \$? = $ac_status" >&5
19272   (exit $ac_status); }; }; then
19273   cf_cv_func_vsscanf=vsscanf
19274 else
19275   echo "$as_me: failed program was:" >&5
19276 cat conftest.$ac_ext >&5
19277
19278 cat >conftest.$ac_ext <<_ACEOF
19279 #line 19279 "configure"
19280 #include "confdefs.h"
19281
19282 #include <stdarg.h>
19283 #include <stdio.h>
19284 int
19285 main (void)
19286 {
19287
19288         FILE strbuf;
19289         char *str = "from";
19290
19291         strbuf._flag = _IOREAD;
19292         strbuf._ptr = strbuf._base = (unsigned char *) str;
19293         strbuf._cnt = strlen(str);
19294         strbuf._file = _NFILE;
19295         return (vfscanf(&strbuf, "%d", ap))
19296   ;
19297   return 0;
19298 }
19299 _ACEOF
19300 rm -f conftest.$ac_objext conftest$ac_exeext
19301 if { (eval echo "$as_me:19301: \"$ac_link\"") >&5
19302   (eval $ac_link) 2>&5
19303   ac_status=$?
19304   echo "$as_me:19304: \$? = $ac_status" >&5
19305   (exit $ac_status); } &&
19306          { ac_try='test -s conftest$ac_exeext'
19307   { (eval echo "$as_me:19307: \"$ac_try\"") >&5
19308   (eval $ac_try) 2>&5
19309   ac_status=$?
19310   echo "$as_me:19310: \$? = $ac_status" >&5
19311   (exit $ac_status); }; }; then
19312   cf_cv_func_vsscanf=vfscanf
19313 else
19314   echo "$as_me: failed program was:" >&5
19315 cat conftest.$ac_ext >&5
19316
19317 cat >conftest.$ac_ext <<_ACEOF
19318 #line 19318 "configure"
19319 #include "confdefs.h"
19320
19321 #include <stdarg.h>
19322 #include <stdio.h>
19323 int
19324 main (void)
19325 {
19326
19327         FILE strbuf;
19328         char *str = "from";
19329
19330         strbuf._flag = _IOREAD;
19331         strbuf._ptr = strbuf._base = (unsigned char *) str;
19332         strbuf._cnt = strlen(str);
19333         strbuf._file = _NFILE;
19334         return (_doscan(&strbuf, "%d", ap))
19335   ;
19336   return 0;
19337 }
19338 _ACEOF
19339 rm -f conftest.$ac_objext conftest$ac_exeext
19340 if { (eval echo "$as_me:19340: \"$ac_link\"") >&5
19341   (eval $ac_link) 2>&5
19342   ac_status=$?
19343   echo "$as_me:19343: \$? = $ac_status" >&5
19344   (exit $ac_status); } &&
19345          { ac_try='test -s conftest$ac_exeext'
19346   { (eval echo "$as_me:19346: \"$ac_try\"") >&5
19347   (eval $ac_try) 2>&5
19348   ac_status=$?
19349   echo "$as_me:19349: \$? = $ac_status" >&5
19350   (exit $ac_status); }; }; then
19351   cf_cv_func_vsscanf=_doscan
19352 else
19353   echo "$as_me: failed program was:" >&5
19354 cat conftest.$ac_ext >&5
19355
19356 cf_cv_func_vsscanf=no
19357 fi
19358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19359 fi
19360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19361 fi
19362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19363 fi
19364 echo "$as_me:19364: result: $cf_cv_func_vsscanf" >&5
19365 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19366
19367 case $cf_cv_func_vsscanf in
19368 (vsscanf)
19369 cat >>confdefs.h <<\EOF
19370 #define HAVE_VSSCANF 1
19371 EOF
19372 ;;
19373 (vfscanf)
19374 cat >>confdefs.h <<\EOF
19375 #define HAVE_VFSCANF 1
19376 EOF
19377 ;;
19378 (_doscan)
19379 cat >>confdefs.h <<\EOF
19380 #define HAVE__DOSCAN 1
19381 EOF
19382 ;;
19383 esac
19384
19385 for ac_header in \
19386 unistd.h \
19387
19388 do
19389 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19390 echo "$as_me:19390: checking for $ac_header" >&5
19391 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19392 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19393   echo $ECHO_N "(cached) $ECHO_C" >&6
19394 else
19395   cat >conftest.$ac_ext <<_ACEOF
19396 #line 19396 "configure"
19397 #include "confdefs.h"
19398 #include <$ac_header>
19399 _ACEOF
19400 if { (eval echo "$as_me:19400: \"$ac_cpp conftest.$ac_ext\"") >&5
19401   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19402   ac_status=$?
19403   egrep -v '^ *\+' conftest.er1 >conftest.err
19404   rm -f conftest.er1
19405   cat conftest.err >&5
19406   echo "$as_me:19406: \$? = $ac_status" >&5
19407   (exit $ac_status); } >/dev/null; then
19408   if test -s conftest.err; then
19409     ac_cpp_err=$ac_c_preproc_warn_flag
19410   else
19411     ac_cpp_err=
19412   fi
19413 else
19414   ac_cpp_err=yes
19415 fi
19416 if test -z "$ac_cpp_err"; then
19417   eval "$as_ac_Header=yes"
19418 else
19419   echo "$as_me: failed program was:" >&5
19420   cat conftest.$ac_ext >&5
19421   eval "$as_ac_Header=no"
19422 fi
19423 rm -f conftest.err conftest.$ac_ext
19424 fi
19425 echo "$as_me:19425: result: `eval echo '${'$as_ac_Header'}'`" >&5
19426 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19427 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19428   cat >>confdefs.h <<EOF
19429 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19430 EOF
19431
19432 fi
19433 done
19434
19435 echo "$as_me:19435: checking for working mkstemp" >&5
19436 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
19437 if test "${cf_cv_func_mkstemp+set}" = set; then
19438   echo $ECHO_N "(cached) $ECHO_C" >&6
19439 else
19440
19441 rm -rf conftest*
19442 if test "$cross_compiling" = yes; then
19443   cf_cv_func_mkstemp=maybe
19444 else
19445   cat >conftest.$ac_ext <<_ACEOF
19446 #line 19446 "configure"
19447 #include "confdefs.h"
19448
19449 #include <sys/types.h>
19450 #ifdef HAVE_UNISTD_H
19451 #include <unistd.h>
19452 #endif
19453 #include <stdlib.h>
19454 #include <stdio.h>
19455 #include <string.h>
19456 #include <sys/stat.h>
19457 int main(void)
19458 {
19459         char *tmpl = "conftestXXXXXX";
19460         char name[2][80];
19461         int n;
19462         int result = 0;
19463         int fd;
19464         struct stat sb;
19465
19466         umask(077);
19467         for (n = 0; n < 2; ++n) {
19468                 strcpy(name[n], tmpl);
19469                 if ((fd = mkstemp(name[n])) >= 0) {
19470                         if (!strcmp(name[n], tmpl)
19471                          || stat(name[n], &sb) != 0
19472                          || (sb.st_mode & S_IFMT) != S_IFREG
19473                          || (sb.st_mode & 077) != 0) {
19474                                 result = 1;
19475                         }
19476                         close(fd);
19477                 }
19478         }
19479         if (result == 0
19480          && !strcmp(name[0], name[1]))
19481                 result = 1;
19482         ${cf_cv_main_return:-return}(result);
19483 }
19484
19485 _ACEOF
19486 rm -f conftest$ac_exeext
19487 if { (eval echo "$as_me:19487: \"$ac_link\"") >&5
19488   (eval $ac_link) 2>&5
19489   ac_status=$?
19490   echo "$as_me:19490: \$? = $ac_status" >&5
19491   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19492   { (eval echo "$as_me:19492: \"$ac_try\"") >&5
19493   (eval $ac_try) 2>&5
19494   ac_status=$?
19495   echo "$as_me:19495: \$? = $ac_status" >&5
19496   (exit $ac_status); }; }; then
19497   cf_cv_func_mkstemp=yes
19498
19499 else
19500   echo "$as_me: program exited with status $ac_status" >&5
19501 echo "$as_me: failed program was:" >&5
19502 cat conftest.$ac_ext >&5
19503 cf_cv_func_mkstemp=no
19504
19505 fi
19506 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19507 fi
19508
19509 fi
19510 echo "$as_me:19510: result: $cf_cv_func_mkstemp" >&5
19511 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19512 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19513         echo "$as_me:19513: checking for mkstemp" >&5
19514 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19515 if test "${ac_cv_func_mkstemp+set}" = set; then
19516   echo $ECHO_N "(cached) $ECHO_C" >&6
19517 else
19518   cat >conftest.$ac_ext <<_ACEOF
19519 #line 19519 "configure"
19520 #include "confdefs.h"
19521 /* System header to define __stub macros and hopefully few prototypes,
19522     which can conflict with char mkstemp (); below.  */
19523 #include <assert.h>
19524 /* Override any gcc2 internal prototype to avoid an error.  */
19525 #ifdef __cplusplus
19526 extern "C"
19527 #endif
19528 /* We use char because int might match the return type of a gcc2
19529    builtin and then its argument prototype would still apply.  */
19530 char mkstemp ();
19531 char (*f) ();
19532
19533 int
19534 main (void)
19535 {
19536 /* The GNU C library defines this for functions which it implements
19537     to always fail with ENOSYS.  Some functions are actually named
19538     something starting with __ and the normal name is an alias.  */
19539 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19540 choke me
19541 #else
19542 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19543 #endif
19544
19545   ;
19546   return 0;
19547 }
19548 _ACEOF
19549 rm -f conftest.$ac_objext conftest$ac_exeext
19550 if { (eval echo "$as_me:19550: \"$ac_link\"") >&5
19551   (eval $ac_link) 2>&5
19552   ac_status=$?
19553   echo "$as_me:19553: \$? = $ac_status" >&5
19554   (exit $ac_status); } &&
19555          { ac_try='test -s conftest$ac_exeext'
19556   { (eval echo "$as_me:19556: \"$ac_try\"") >&5
19557   (eval $ac_try) 2>&5
19558   ac_status=$?
19559   echo "$as_me:19559: \$? = $ac_status" >&5
19560   (exit $ac_status); }; }; then
19561   ac_cv_func_mkstemp=yes
19562 else
19563   echo "$as_me: failed program was:" >&5
19564 cat conftest.$ac_ext >&5
19565 ac_cv_func_mkstemp=no
19566 fi
19567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19568 fi
19569 echo "$as_me:19569: result: $ac_cv_func_mkstemp" >&5
19570 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19571
19572 fi
19573 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19574
19575 cat >>confdefs.h <<\EOF
19576 #define HAVE_MKSTEMP 1
19577 EOF
19578
19579 fi
19580
19581 # setup for prototype of fallback for vsscanf()
19582
19583 if test "$cf_cv_func_vsscanf" = vsscanf ; then
19584         HAVE_VSSCANF=1
19585 else
19586         HAVE_VSSCANF=0
19587 fi
19588
19589 if test "x$cross_compiling" = xyes ; then
19590         { echo "$as_me:19590: WARNING: cross compiling: assume setvbuf params not reversed" >&5
19591 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
19592 else
19593         echo "$as_me:19593: checking whether setvbuf arguments are reversed" >&5
19594 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
19595 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
19596   echo $ECHO_N "(cached) $ECHO_C" >&6
19597 else
19598   if test "$cross_compiling" = yes; then
19599   { { echo "$as_me:19599: error: cannot run test program while cross compiling" >&5
19600 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
19601    { (exit 1); exit 1; }; }
19602 else
19603   cat >conftest.$ac_ext <<_ACEOF
19604 #line 19604 "configure"
19605 #include "confdefs.h"
19606 #include <stdio.h>
19607 /* If setvbuf has the reversed format, exit 0. */
19608 int
19609 main (void)
19610 {
19611   /* This call has the arguments reversed.
19612      A reversed system may check and see that the address of main
19613      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
19614   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
19615     $ac_main_return(1);
19616   putc('\r', stdout);
19617   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
19618 }
19619 _ACEOF
19620 rm -f conftest$ac_exeext
19621 if { (eval echo "$as_me:19621: \"$ac_link\"") >&5
19622   (eval $ac_link) 2>&5
19623   ac_status=$?
19624   echo "$as_me:19624: \$? = $ac_status" >&5
19625   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19626   { (eval echo "$as_me:19626: \"$ac_try\"") >&5
19627   (eval $ac_try) 2>&5
19628   ac_status=$?
19629   echo "$as_me:19629: \$? = $ac_status" >&5
19630   (exit $ac_status); }; }; then
19631   ac_cv_func_setvbuf_reversed=yes
19632 else
19633   echo "$as_me: program exited with status $ac_status" >&5
19634 echo "$as_me: failed program was:" >&5
19635 cat conftest.$ac_ext >&5
19636 ac_cv_func_setvbuf_reversed=no
19637 fi
19638 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19639 fi
19640 rm -f core core.* *.core
19641 fi
19642 echo "$as_me:19642: result: $ac_cv_func_setvbuf_reversed" >&5
19643 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
19644 if test $ac_cv_func_setvbuf_reversed = yes; then
19645
19646 cat >>confdefs.h <<\EOF
19647 #define SETVBUF_REVERSED 1
19648 EOF
19649
19650 fi
19651
19652 fi
19653 echo "$as_me:19653: checking for intptr_t" >&5
19654 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
19655 if test "${ac_cv_type_intptr_t+set}" = set; then
19656   echo $ECHO_N "(cached) $ECHO_C" >&6
19657 else
19658   cat >conftest.$ac_ext <<_ACEOF
19659 #line 19659 "configure"
19660 #include "confdefs.h"
19661 $ac_includes_default
19662 int
19663 main (void)
19664 {
19665 if ((intptr_t *) 0)
19666   return 0;
19667 if (sizeof (intptr_t))
19668   return 0;
19669   ;
19670   return 0;
19671 }
19672 _ACEOF
19673 rm -f conftest.$ac_objext
19674 if { (eval echo "$as_me:19674: \"$ac_compile\"") >&5
19675   (eval $ac_compile) 2>&5
19676   ac_status=$?
19677   echo "$as_me:19677: \$? = $ac_status" >&5
19678   (exit $ac_status); } &&
19679          { ac_try='test -s conftest.$ac_objext'
19680   { (eval echo "$as_me:19680: \"$ac_try\"") >&5
19681   (eval $ac_try) 2>&5
19682   ac_status=$?
19683   echo "$as_me:19683: \$? = $ac_status" >&5
19684   (exit $ac_status); }; }; then
19685   ac_cv_type_intptr_t=yes
19686 else
19687   echo "$as_me: failed program was:" >&5
19688 cat conftest.$ac_ext >&5
19689 ac_cv_type_intptr_t=no
19690 fi
19691 rm -f conftest.$ac_objext conftest.$ac_ext
19692 fi
19693 echo "$as_me:19693: result: $ac_cv_type_intptr_t" >&5
19694 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19695 if test $ac_cv_type_intptr_t = yes; then
19696   :
19697 else
19698
19699 cat >>confdefs.h <<EOF
19700 #define intptr_t long
19701 EOF
19702
19703 fi
19704
19705 echo "$as_me:19705: checking for ssize_t" >&5
19706 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19707 if test "${ac_cv_type_ssize_t+set}" = set; then
19708   echo $ECHO_N "(cached) $ECHO_C" >&6
19709 else
19710   cat >conftest.$ac_ext <<_ACEOF
19711 #line 19711 "configure"
19712 #include "confdefs.h"
19713 $ac_includes_default
19714 int
19715 main (void)
19716 {
19717 if ((ssize_t *) 0)
19718   return 0;
19719 if (sizeof (ssize_t))
19720   return 0;
19721   ;
19722   return 0;
19723 }
19724 _ACEOF
19725 rm -f conftest.$ac_objext
19726 if { (eval echo "$as_me:19726: \"$ac_compile\"") >&5
19727   (eval $ac_compile) 2>&5
19728   ac_status=$?
19729   echo "$as_me:19729: \$? = $ac_status" >&5
19730   (exit $ac_status); } &&
19731          { ac_try='test -s conftest.$ac_objext'
19732   { (eval echo "$as_me:19732: \"$ac_try\"") >&5
19733   (eval $ac_try) 2>&5
19734   ac_status=$?
19735   echo "$as_me:19735: \$? = $ac_status" >&5
19736   (exit $ac_status); }; }; then
19737   ac_cv_type_ssize_t=yes
19738 else
19739   echo "$as_me: failed program was:" >&5
19740 cat conftest.$ac_ext >&5
19741 ac_cv_type_ssize_t=no
19742 fi
19743 rm -f conftest.$ac_objext conftest.$ac_ext
19744 fi
19745 echo "$as_me:19745: result: $ac_cv_type_ssize_t" >&5
19746 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19747 if test $ac_cv_type_ssize_t = yes; then
19748   :
19749 else
19750
19751 cat >>confdefs.h <<EOF
19752 #define ssize_t int
19753 EOF
19754
19755 fi
19756
19757 echo "$as_me:19757: checking for type sigaction_t" >&5
19758 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19759 if test "${cf_cv_type_sigaction+set}" = set; then
19760   echo $ECHO_N "(cached) $ECHO_C" >&6
19761 else
19762
19763         cat >conftest.$ac_ext <<_ACEOF
19764 #line 19764 "configure"
19765 #include "confdefs.h"
19766
19767 #include <signal.h>
19768 int
19769 main (void)
19770 {
19771 sigaction_t x
19772   ;
19773   return 0;
19774 }
19775 _ACEOF
19776 rm -f conftest.$ac_objext
19777 if { (eval echo "$as_me:19777: \"$ac_compile\"") >&5
19778   (eval $ac_compile) 2>&5
19779   ac_status=$?
19780   echo "$as_me:19780: \$? = $ac_status" >&5
19781   (exit $ac_status); } &&
19782          { ac_try='test -s conftest.$ac_objext'
19783   { (eval echo "$as_me:19783: \"$ac_try\"") >&5
19784   (eval $ac_try) 2>&5
19785   ac_status=$?
19786   echo "$as_me:19786: \$? = $ac_status" >&5
19787   (exit $ac_status); }; }; then
19788   cf_cv_type_sigaction=yes
19789 else
19790   echo "$as_me: failed program was:" >&5
19791 cat conftest.$ac_ext >&5
19792 cf_cv_type_sigaction=no
19793 fi
19794 rm -f conftest.$ac_objext conftest.$ac_ext
19795 fi
19796
19797 echo "$as_me:19797: result: $cf_cv_type_sigaction" >&5
19798 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19799 test "$cf_cv_type_sigaction" = yes &&
19800 cat >>confdefs.h <<\EOF
19801 #define HAVE_TYPE_SIGACTION 1
19802 EOF
19803
19804 echo "$as_me:19804: checking declaration of size-change" >&5
19805 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19806 if test "${cf_cv_sizechange+set}" = set; then
19807   echo $ECHO_N "(cached) $ECHO_C" >&6
19808 else
19809
19810         cf_cv_sizechange=unknown
19811         cf_save_CPPFLAGS="$CPPFLAGS"
19812
19813 for cf_opts in "" "NEED_PTEM_H"
19814 do
19815
19816         CPPFLAGS="$cf_save_CPPFLAGS"
19817         if test -n "$cf_opts"
19818         then
19819
19820         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19821         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19822
19823         fi
19824         cat >conftest.$ac_ext <<_ACEOF
19825 #line 19825 "configure"
19826 #include "confdefs.h"
19827 #include <sys/types.h>
19828 #ifdef HAVE_TERMIOS_H
19829 #include <termios.h>
19830 #else
19831 #ifdef HAVE_TERMIO_H
19832 #include <termio.h>
19833 #endif
19834 #endif
19835
19836 #ifdef NEED_PTEM_H
19837 /* This is a workaround for SCO:  they neglected to define struct winsize in
19838  * termios.h -- it's only in termio.h and ptem.h
19839  */
19840 #include <sys/stream.h>
19841 #include <sys/ptem.h>
19842 #endif
19843
19844 #ifdef HAVE_SYS_IOCTL_H
19845 #include <sys/ioctl.h>
19846 #endif
19847
19848 int
19849 main (void)
19850 {
19851
19852 #ifdef TIOCGSIZE
19853         struct ttysize win;     /* SunOS 3.0... */
19854         int y = win.ts_lines;
19855         int x = win.ts_cols;
19856 #else
19857 #ifdef TIOCGWINSZ
19858         struct winsize win;     /* everything else */
19859         int y = win.ws_row;
19860         int x = win.ws_col;
19861 #else
19862         no TIOCGSIZE or TIOCGWINSZ
19863 #endif /* TIOCGWINSZ */
19864 #endif /* TIOCGSIZE */
19865
19866   ;
19867   return 0;
19868 }
19869 _ACEOF
19870 rm -f conftest.$ac_objext
19871 if { (eval echo "$as_me:19871: \"$ac_compile\"") >&5
19872   (eval $ac_compile) 2>&5
19873   ac_status=$?
19874   echo "$as_me:19874: \$? = $ac_status" >&5
19875   (exit $ac_status); } &&
19876          { ac_try='test -s conftest.$ac_objext'
19877   { (eval echo "$as_me:19877: \"$ac_try\"") >&5
19878   (eval $ac_try) 2>&5
19879   ac_status=$?
19880   echo "$as_me:19880: \$? = $ac_status" >&5
19881   (exit $ac_status); }; }; then
19882   cf_cv_sizechange=yes
19883 else
19884   echo "$as_me: failed program was:" >&5
19885 cat conftest.$ac_ext >&5
19886 cf_cv_sizechange=no
19887 fi
19888 rm -f conftest.$ac_objext conftest.$ac_ext
19889
19890         CPPFLAGS="$cf_save_CPPFLAGS"
19891         if test "$cf_cv_sizechange" = yes ; then
19892                 echo "size-change succeeded ($cf_opts)" >&5
19893                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19894                 break
19895         fi
19896 done
19897
19898 fi
19899 echo "$as_me:19899: result: $cf_cv_sizechange" >&5
19900 echo "${ECHO_T}$cf_cv_sizechange" >&6
19901 if test "$cf_cv_sizechange" != no ; then
19902
19903 cat >>confdefs.h <<\EOF
19904 #define HAVE_SIZECHANGE 1
19905 EOF
19906
19907         case $cf_cv_sizechange in
19908         (NEED*)
19909                 cat >>confdefs.h <<EOF
19910 #define $cf_cv_sizechange  1
19911 EOF
19912
19913                 ;;
19914         esac
19915 fi
19916
19917 echo "$as_me:19917: checking for memmove" >&5
19918 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19919 if test "${ac_cv_func_memmove+set}" = set; then
19920   echo $ECHO_N "(cached) $ECHO_C" >&6
19921 else
19922   cat >conftest.$ac_ext <<_ACEOF
19923 #line 19923 "configure"
19924 #include "confdefs.h"
19925 /* System header to define __stub macros and hopefully few prototypes,
19926     which can conflict with char memmove (); below.  */
19927 #include <assert.h>
19928 /* Override any gcc2 internal prototype to avoid an error.  */
19929 #ifdef __cplusplus
19930 extern "C"
19931 #endif
19932 /* We use char because int might match the return type of a gcc2
19933    builtin and then its argument prototype would still apply.  */
19934 char memmove ();
19935 char (*f) ();
19936
19937 int
19938 main (void)
19939 {
19940 /* The GNU C library defines this for functions which it implements
19941     to always fail with ENOSYS.  Some functions are actually named
19942     something starting with __ and the normal name is an alias.  */
19943 #if defined (__stub_memmove) || defined (__stub___memmove)
19944 choke me
19945 #else
19946 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19947 #endif
19948
19949   ;
19950   return 0;
19951 }
19952 _ACEOF
19953 rm -f conftest.$ac_objext conftest$ac_exeext
19954 if { (eval echo "$as_me:19954: \"$ac_link\"") >&5
19955   (eval $ac_link) 2>&5
19956   ac_status=$?
19957   echo "$as_me:19957: \$? = $ac_status" >&5
19958   (exit $ac_status); } &&
19959          { ac_try='test -s conftest$ac_exeext'
19960   { (eval echo "$as_me:19960: \"$ac_try\"") >&5
19961   (eval $ac_try) 2>&5
19962   ac_status=$?
19963   echo "$as_me:19963: \$? = $ac_status" >&5
19964   (exit $ac_status); }; }; then
19965   ac_cv_func_memmove=yes
19966 else
19967   echo "$as_me: failed program was:" >&5
19968 cat conftest.$ac_ext >&5
19969 ac_cv_func_memmove=no
19970 fi
19971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19972 fi
19973 echo "$as_me:19973: result: $ac_cv_func_memmove" >&5
19974 echo "${ECHO_T}$ac_cv_func_memmove" >&6
19975 if test $ac_cv_func_memmove = yes; then
19976   :
19977 else
19978
19979 echo "$as_me:19979: checking for bcopy" >&5
19980 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
19981 if test "${ac_cv_func_bcopy+set}" = set; then
19982   echo $ECHO_N "(cached) $ECHO_C" >&6
19983 else
19984   cat >conftest.$ac_ext <<_ACEOF
19985 #line 19985 "configure"
19986 #include "confdefs.h"
19987 /* System header to define __stub macros and hopefully few prototypes,
19988     which can conflict with char bcopy (); below.  */
19989 #include <assert.h>
19990 /* Override any gcc2 internal prototype to avoid an error.  */
19991 #ifdef __cplusplus
19992 extern "C"
19993 #endif
19994 /* We use char because int might match the return type of a gcc2
19995    builtin and then its argument prototype would still apply.  */
19996 char bcopy ();
19997 char (*f) ();
19998
19999 int
20000 main (void)
20001 {
20002 /* The GNU C library defines this for functions which it implements
20003     to always fail with ENOSYS.  Some functions are actually named
20004     something starting with __ and the normal name is an alias.  */
20005 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20006 choke me
20007 #else
20008 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20009 #endif
20010
20011   ;
20012   return 0;
20013 }
20014 _ACEOF
20015 rm -f conftest.$ac_objext conftest$ac_exeext
20016 if { (eval echo "$as_me:20016: \"$ac_link\"") >&5
20017   (eval $ac_link) 2>&5
20018   ac_status=$?
20019   echo "$as_me:20019: \$? = $ac_status" >&5
20020   (exit $ac_status); } &&
20021          { ac_try='test -s conftest$ac_exeext'
20022   { (eval echo "$as_me:20022: \"$ac_try\"") >&5
20023   (eval $ac_try) 2>&5
20024   ac_status=$?
20025   echo "$as_me:20025: \$? = $ac_status" >&5
20026   (exit $ac_status); }; }; then
20027   ac_cv_func_bcopy=yes
20028 else
20029   echo "$as_me: failed program was:" >&5
20030 cat conftest.$ac_ext >&5
20031 ac_cv_func_bcopy=no
20032 fi
20033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20034 fi
20035 echo "$as_me:20035: result: $ac_cv_func_bcopy" >&5
20036 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20037 if test $ac_cv_func_bcopy = yes; then
20038
20039         echo "$as_me:20039: checking if bcopy does overlapping moves" >&5
20040 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20041 if test "${cf_cv_good_bcopy+set}" = set; then
20042   echo $ECHO_N "(cached) $ECHO_C" >&6
20043 else
20044
20045                 if test "$cross_compiling" = yes; then
20046   cf_cv_good_bcopy=unknown
20047 else
20048   cat >conftest.$ac_ext <<_ACEOF
20049 #line 20049 "configure"
20050 #include "confdefs.h"
20051
20052 int main(void) {
20053         static char data[] = "abcdefghijklmnopqrstuwwxyz";
20054         char temp[40];
20055         bcopy(data, temp, sizeof(data));
20056         bcopy(temp+10, temp, 15);
20057         bcopy(temp+5, temp+15, 10);
20058         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
20059 }
20060
20061 _ACEOF
20062 rm -f conftest$ac_exeext
20063 if { (eval echo "$as_me:20063: \"$ac_link\"") >&5
20064   (eval $ac_link) 2>&5
20065   ac_status=$?
20066   echo "$as_me:20066: \$? = $ac_status" >&5
20067   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20068   { (eval echo "$as_me:20068: \"$ac_try\"") >&5
20069   (eval $ac_try) 2>&5
20070   ac_status=$?
20071   echo "$as_me:20071: \$? = $ac_status" >&5
20072   (exit $ac_status); }; }; then
20073   cf_cv_good_bcopy=yes
20074 else
20075   echo "$as_me: program exited with status $ac_status" >&5
20076 echo "$as_me: failed program was:" >&5
20077 cat conftest.$ac_ext >&5
20078 cf_cv_good_bcopy=no
20079 fi
20080 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20081 fi
20082
20083 fi
20084 echo "$as_me:20084: result: $cf_cv_good_bcopy" >&5
20085 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
20086
20087 else
20088   cf_cv_good_bcopy=no
20089 fi
20090
20091         if test "$cf_cv_good_bcopy" = yes ; then
20092
20093 cat >>confdefs.h <<\EOF
20094 #define USE_OK_BCOPY 1
20095 EOF
20096
20097         else
20098
20099 cat >>confdefs.h <<\EOF
20100 #define USE_MY_MEMMOVE 1
20101 EOF
20102
20103         fi
20104
20105 fi
20106
20107 tty 2>&1 >/dev/null || {
20108 for ac_func in posix_openpt
20109 do
20110 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20111 echo "$as_me:20111: checking for $ac_func" >&5
20112 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20113 if eval "test \"\${$as_ac_var+set}\" = set"; then
20114   echo $ECHO_N "(cached) $ECHO_C" >&6
20115 else
20116   cat >conftest.$ac_ext <<_ACEOF
20117 #line 20117 "configure"
20118 #include "confdefs.h"
20119 /* System header to define __stub macros and hopefully few prototypes,
20120     which can conflict with char $ac_func (); below.  */
20121 #include <assert.h>
20122 /* Override any gcc2 internal prototype to avoid an error.  */
20123 #ifdef __cplusplus
20124 extern "C"
20125 #endif
20126 /* We use char because int might match the return type of a gcc2
20127    builtin and then its argument prototype would still apply.  */
20128 char $ac_func ();
20129 char (*f) ();
20130
20131 int
20132 main (void)
20133 {
20134 /* The GNU C library defines this for functions which it implements
20135     to always fail with ENOSYS.  Some functions are actually named
20136     something starting with __ and the normal name is an alias.  */
20137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20138 choke me
20139 #else
20140 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20141 #endif
20142
20143   ;
20144   return 0;
20145 }
20146 _ACEOF
20147 rm -f conftest.$ac_objext conftest$ac_exeext
20148 if { (eval echo "$as_me:20148: \"$ac_link\"") >&5
20149   (eval $ac_link) 2>&5
20150   ac_status=$?
20151   echo "$as_me:20151: \$? = $ac_status" >&5
20152   (exit $ac_status); } &&
20153          { ac_try='test -s conftest$ac_exeext'
20154   { (eval echo "$as_me:20154: \"$ac_try\"") >&5
20155   (eval $ac_try) 2>&5
20156   ac_status=$?
20157   echo "$as_me:20157: \$? = $ac_status" >&5
20158   (exit $ac_status); }; }; then
20159   eval "$as_ac_var=yes"
20160 else
20161   echo "$as_me: failed program was:" >&5
20162 cat conftest.$ac_ext >&5
20163 eval "$as_ac_var=no"
20164 fi
20165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20166 fi
20167 echo "$as_me:20167: result: `eval echo '${'$as_ac_var'}'`" >&5
20168 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20169 if test `eval echo '${'$as_ac_var'}'` = yes; then
20170   cat >>confdefs.h <<EOF
20171 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20172 EOF
20173
20174 fi
20175 done
20176  }
20177 echo "$as_me:20177: checking if poll really works" >&5
20178 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20179 if test "${cf_cv_working_poll+set}" = set; then
20180   echo $ECHO_N "(cached) $ECHO_C" >&6
20181 else
20182
20183 if test "$cross_compiling" = yes; then
20184   cf_cv_working_poll=unknown
20185 else
20186   cat >conftest.$ac_ext <<_ACEOF
20187 #line 20187 "configure"
20188 #include "confdefs.h"
20189
20190 #include <stdlib.h>
20191 #include <stdio.h>
20192 #include <unistd.h>
20193 #include <fcntl.h>
20194 #ifdef HAVE_POLL_H
20195 #include <poll.h>
20196 #else
20197 #include <sys/poll.h>
20198 #endif
20199 int main(void) {
20200         struct pollfd myfds;
20201         int ret;
20202
20203         /* check for Darwin bug with respect to "devices" */
20204         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20205         if (myfds.fd < 0)
20206                 myfds.fd = 0;
20207         myfds.events = POLLIN;
20208         myfds.revents = 0;
20209
20210         ret = poll(&myfds, 1, 100);
20211
20212         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20213                 ret = -1;
20214         } else {
20215                 int fd = 0;
20216                 if (!isatty(fd)) {
20217                         fd = open("/dev/tty", 2);       /* O_RDWR */
20218                 }
20219 #ifdef HAVE_POSIX_OPENPT
20220                 if (fd < 0) {
20221                         fd = posix_openpt(O_RDWR);
20222                 }
20223 #endif
20224
20225                 if (fd >= 0) {
20226                         /* also check with standard input */
20227                         myfds.fd = fd;
20228                         myfds.events = POLLIN;
20229                         myfds.revents = 0;
20230                         ret = poll(&myfds, 1, 100);
20231                 } else {
20232                         ret = -1;
20233                 }
20234         }
20235         ${cf_cv_main_return:-return}(ret < 0);
20236 }
20237 _ACEOF
20238 rm -f conftest$ac_exeext
20239 if { (eval echo "$as_me:20239: \"$ac_link\"") >&5
20240   (eval $ac_link) 2>&5
20241   ac_status=$?
20242   echo "$as_me:20242: \$? = $ac_status" >&5
20243   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20244   { (eval echo "$as_me:20244: \"$ac_try\"") >&5
20245   (eval $ac_try) 2>&5
20246   ac_status=$?
20247   echo "$as_me:20247: \$? = $ac_status" >&5
20248   (exit $ac_status); }; }; then
20249   cf_cv_working_poll=yes
20250 else
20251   echo "$as_me: program exited with status $ac_status" >&5
20252 echo "$as_me: failed program was:" >&5
20253 cat conftest.$ac_ext >&5
20254 cf_cv_working_poll=no
20255 fi
20256 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20257 fi
20258 fi
20259 echo "$as_me:20259: result: $cf_cv_working_poll" >&5
20260 echo "${ECHO_T}$cf_cv_working_poll" >&6
20261 test "$cf_cv_working_poll" = "yes" &&
20262 cat >>confdefs.h <<\EOF
20263 #define HAVE_WORKING_POLL 1
20264 EOF
20265
20266 echo "$as_me:20266: checking for va_copy" >&5
20267 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20268 if test "${cf_cv_have_va_copy+set}" = set; then
20269   echo $ECHO_N "(cached) $ECHO_C" >&6
20270 else
20271
20272 cat >conftest.$ac_ext <<_ACEOF
20273 #line 20273 "configure"
20274 #include "confdefs.h"
20275
20276 #include <stdarg.h>
20277
20278 int
20279 main (void)
20280 {
20281
20282         static va_list dst;
20283         static va_list src;
20284         va_copy(dst, src)
20285   ;
20286   return 0;
20287 }
20288 _ACEOF
20289 rm -f conftest.$ac_objext conftest$ac_exeext
20290 if { (eval echo "$as_me:20290: \"$ac_link\"") >&5
20291   (eval $ac_link) 2>&5
20292   ac_status=$?
20293   echo "$as_me:20293: \$? = $ac_status" >&5
20294   (exit $ac_status); } &&
20295          { ac_try='test -s conftest$ac_exeext'
20296   { (eval echo "$as_me:20296: \"$ac_try\"") >&5
20297   (eval $ac_try) 2>&5
20298   ac_status=$?
20299   echo "$as_me:20299: \$? = $ac_status" >&5
20300   (exit $ac_status); }; }; then
20301   cf_cv_have_va_copy=yes
20302 else
20303   echo "$as_me: failed program was:" >&5
20304 cat conftest.$ac_ext >&5
20305 cf_cv_have_va_copy=no
20306 fi
20307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20308 fi
20309 echo "$as_me:20309: result: $cf_cv_have_va_copy" >&5
20310 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20311
20312 test "$cf_cv_have_va_copy" = yes &&
20313 cat >>confdefs.h <<\EOF
20314 #define HAVE_VA_COPY 1
20315 EOF
20316
20317 echo "$as_me:20317: checking for __va_copy" >&5
20318 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20319 if test "${cf_cv_have___va_copy+set}" = set; then
20320   echo $ECHO_N "(cached) $ECHO_C" >&6
20321 else
20322
20323 cat >conftest.$ac_ext <<_ACEOF
20324 #line 20324 "configure"
20325 #include "confdefs.h"
20326
20327 #include <stdarg.h>
20328
20329 int
20330 main (void)
20331 {
20332
20333         static va_list dst;
20334         static va_list src;
20335         __va_copy(dst, src)
20336   ;
20337   return 0;
20338 }
20339 _ACEOF
20340 rm -f conftest.$ac_objext conftest$ac_exeext
20341 if { (eval echo "$as_me:20341: \"$ac_link\"") >&5
20342   (eval $ac_link) 2>&5
20343   ac_status=$?
20344   echo "$as_me:20344: \$? = $ac_status" >&5
20345   (exit $ac_status); } &&
20346          { ac_try='test -s conftest$ac_exeext'
20347   { (eval echo "$as_me:20347: \"$ac_try\"") >&5
20348   (eval $ac_try) 2>&5
20349   ac_status=$?
20350   echo "$as_me:20350: \$? = $ac_status" >&5
20351   (exit $ac_status); }; }; then
20352   cf_cv_have___va_copy=yes
20353 else
20354   echo "$as_me: failed program was:" >&5
20355 cat conftest.$ac_ext >&5
20356 cf_cv_have___va_copy=no
20357 fi
20358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20359 fi
20360 echo "$as_me:20360: result: $cf_cv_have___va_copy" >&5
20361 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20362
20363 test "$cf_cv_have___va_copy" = yes &&
20364 cat >>confdefs.h <<\EOF
20365 #define HAVE___VA_COPY 1
20366 EOF
20367
20368 echo "$as_me:20368: checking for pid_t" >&5
20369 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20370 if test "${ac_cv_type_pid_t+set}" = set; then
20371   echo $ECHO_N "(cached) $ECHO_C" >&6
20372 else
20373   cat >conftest.$ac_ext <<_ACEOF
20374 #line 20374 "configure"
20375 #include "confdefs.h"
20376 $ac_includes_default
20377 int
20378 main (void)
20379 {
20380 if ((pid_t *) 0)
20381   return 0;
20382 if (sizeof (pid_t))
20383   return 0;
20384   ;
20385   return 0;
20386 }
20387 _ACEOF
20388 rm -f conftest.$ac_objext
20389 if { (eval echo "$as_me:20389: \"$ac_compile\"") >&5
20390   (eval $ac_compile) 2>&5
20391   ac_status=$?
20392   echo "$as_me:20392: \$? = $ac_status" >&5
20393   (exit $ac_status); } &&
20394          { ac_try='test -s conftest.$ac_objext'
20395   { (eval echo "$as_me:20395: \"$ac_try\"") >&5
20396   (eval $ac_try) 2>&5
20397   ac_status=$?
20398   echo "$as_me:20398: \$? = $ac_status" >&5
20399   (exit $ac_status); }; }; then
20400   ac_cv_type_pid_t=yes
20401 else
20402   echo "$as_me: failed program was:" >&5
20403 cat conftest.$ac_ext >&5
20404 ac_cv_type_pid_t=no
20405 fi
20406 rm -f conftest.$ac_objext conftest.$ac_ext
20407 fi
20408 echo "$as_me:20408: result: $ac_cv_type_pid_t" >&5
20409 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20410 if test $ac_cv_type_pid_t = yes; then
20411   :
20412 else
20413
20414 cat >>confdefs.h <<EOF
20415 #define pid_t int
20416 EOF
20417
20418 fi
20419
20420 for ac_header in unistd.h vfork.h
20421 do
20422 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20423 echo "$as_me:20423: checking for $ac_header" >&5
20424 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20425 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20426   echo $ECHO_N "(cached) $ECHO_C" >&6
20427 else
20428   cat >conftest.$ac_ext <<_ACEOF
20429 #line 20429 "configure"
20430 #include "confdefs.h"
20431 #include <$ac_header>
20432 _ACEOF
20433 if { (eval echo "$as_me:20433: \"$ac_cpp conftest.$ac_ext\"") >&5
20434   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20435   ac_status=$?
20436   egrep -v '^ *\+' conftest.er1 >conftest.err
20437   rm -f conftest.er1
20438   cat conftest.err >&5
20439   echo "$as_me:20439: \$? = $ac_status" >&5
20440   (exit $ac_status); } >/dev/null; then
20441   if test -s conftest.err; then
20442     ac_cpp_err=$ac_c_preproc_warn_flag
20443   else
20444     ac_cpp_err=
20445   fi
20446 else
20447   ac_cpp_err=yes
20448 fi
20449 if test -z "$ac_cpp_err"; then
20450   eval "$as_ac_Header=yes"
20451 else
20452   echo "$as_me: failed program was:" >&5
20453   cat conftest.$ac_ext >&5
20454   eval "$as_ac_Header=no"
20455 fi
20456 rm -f conftest.err conftest.$ac_ext
20457 fi
20458 echo "$as_me:20458: result: `eval echo '${'$as_ac_Header'}'`" >&5
20459 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20460 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20461   cat >>confdefs.h <<EOF
20462 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20463 EOF
20464
20465 fi
20466 done
20467
20468 for ac_func in fork vfork
20469 do
20470 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20471 echo "$as_me:20471: checking for $ac_func" >&5
20472 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20473 if eval "test \"\${$as_ac_var+set}\" = set"; then
20474   echo $ECHO_N "(cached) $ECHO_C" >&6
20475 else
20476   cat >conftest.$ac_ext <<_ACEOF
20477 #line 20477 "configure"
20478 #include "confdefs.h"
20479 /* System header to define __stub macros and hopefully few prototypes,
20480     which can conflict with char $ac_func (); below.  */
20481 #include <assert.h>
20482 /* Override any gcc2 internal prototype to avoid an error.  */
20483 #ifdef __cplusplus
20484 extern "C"
20485 #endif
20486 /* We use char because int might match the return type of a gcc2
20487    builtin and then its argument prototype would still apply.  */
20488 char $ac_func ();
20489 char (*f) ();
20490
20491 int
20492 main (void)
20493 {
20494 /* The GNU C library defines this for functions which it implements
20495     to always fail with ENOSYS.  Some functions are actually named
20496     something starting with __ and the normal name is an alias.  */
20497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20498 choke me
20499 #else
20500 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20501 #endif
20502
20503   ;
20504   return 0;
20505 }
20506 _ACEOF
20507 rm -f conftest.$ac_objext conftest$ac_exeext
20508 if { (eval echo "$as_me:20508: \"$ac_link\"") >&5
20509   (eval $ac_link) 2>&5
20510   ac_status=$?
20511   echo "$as_me:20511: \$? = $ac_status" >&5
20512   (exit $ac_status); } &&
20513          { ac_try='test -s conftest$ac_exeext'
20514   { (eval echo "$as_me:20514: \"$ac_try\"") >&5
20515   (eval $ac_try) 2>&5
20516   ac_status=$?
20517   echo "$as_me:20517: \$? = $ac_status" >&5
20518   (exit $ac_status); }; }; then
20519   eval "$as_ac_var=yes"
20520 else
20521   echo "$as_me: failed program was:" >&5
20522 cat conftest.$ac_ext >&5
20523 eval "$as_ac_var=no"
20524 fi
20525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20526 fi
20527 echo "$as_me:20527: result: `eval echo '${'$as_ac_var'}'`" >&5
20528 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20529 if test `eval echo '${'$as_ac_var'}'` = yes; then
20530   cat >>confdefs.h <<EOF
20531 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20532 EOF
20533
20534 fi
20535 done
20536
20537 ac_cv_func_fork_works=$ac_cv_func_fork
20538 if test "x$ac_cv_func_fork" = xyes; then
20539   echo "$as_me:20539: checking for working fork" >&5
20540 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20541 if test "${ac_cv_func_fork_works+set}" = set; then
20542   echo $ECHO_N "(cached) $ECHO_C" >&6
20543 else
20544   if test "$cross_compiling" = yes; then
20545   ac_cv_func_fork_works=cross
20546 else
20547   cat >conftest.$ac_ext <<_ACEOF
20548 /* By Rüdiger Kuhlmann. */
20549       #include <sys/types.h>
20550       #if HAVE_UNISTD_H
20551       # include <unistd.h>
20552       #endif
20553       /* Some systems only have a dummy stub for fork() */
20554       int main (void)
20555       {
20556         if (fork() < 0)
20557           $ac_main_return (1);
20558         $ac_main_return (0);
20559       }
20560 _ACEOF
20561 rm -f conftest$ac_exeext
20562 if { (eval echo "$as_me:20562: \"$ac_link\"") >&5
20563   (eval $ac_link) 2>&5
20564   ac_status=$?
20565   echo "$as_me:20565: \$? = $ac_status" >&5
20566   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20567   { (eval echo "$as_me:20567: \"$ac_try\"") >&5
20568   (eval $ac_try) 2>&5
20569   ac_status=$?
20570   echo "$as_me:20570: \$? = $ac_status" >&5
20571   (exit $ac_status); }; }; then
20572   ac_cv_func_fork_works=yes
20573 else
20574   echo "$as_me: program exited with status $ac_status" >&5
20575 echo "$as_me: failed program was:" >&5
20576 cat conftest.$ac_ext >&5
20577 ac_cv_func_fork_works=no
20578 fi
20579 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20580 fi
20581 fi
20582 echo "$as_me:20582: result: $ac_cv_func_fork_works" >&5
20583 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
20584
20585 fi
20586 if test "x$ac_cv_func_fork_works" = xcross; then
20587   case $host in
20588     *-*-amigaos* | *-*-msdosdjgpp*)
20589       # Override, as these systems have only a dummy fork() stub
20590       ac_cv_func_fork_works=no
20591       ;;
20592     *)
20593       ac_cv_func_fork_works=yes
20594       ;;
20595   esac
20596   { echo "$as_me:20596: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
20597 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
20598 fi
20599 ac_cv_func_vfork_works=$ac_cv_func_vfork
20600 if test "x$ac_cv_func_vfork" = xyes; then
20601   echo "$as_me:20601: checking for working vfork" >&5
20602 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
20603 if test "${ac_cv_func_vfork_works+set}" = set; then
20604   echo $ECHO_N "(cached) $ECHO_C" >&6
20605 else
20606   if test "$cross_compiling" = yes; then
20607   ac_cv_func_vfork_works=cross
20608 else
20609   cat >conftest.$ac_ext <<_ACEOF
20610 #line 20610 "configure"
20611 #include "confdefs.h"
20612 /* Thanks to Paul Eggert for this test.  */
20613 #include <stdio.h>
20614 #include <sys/types.h>
20615 #include <sys/stat.h>
20616 #if HAVE_UNISTD_H
20617 # include <unistd.h>
20618 #endif
20619 #if HAVE_VFORK_H
20620 # include <vfork.h>
20621 #endif
20622 /* On some sparc systems, changes by the child to local and incoming
20623    argument registers are propagated back to the parent.  The compiler
20624    is told about this with #include <vfork.h>, but some compilers
20625    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
20626    static variable whose address is put into a register that is
20627    clobbered by the vfork.  */
20628 static
20629 #ifdef __cplusplus
20630 sparc_address_test (int arg)
20631 # else
20632 sparc_address_test (arg) int arg;
20633 #endif
20634 {
20635   static pid_t child;
20636   if (!child) {
20637     child = vfork ();
20638     if (child < 0) {
20639       perror ("vfork");
20640       _exit(2);
20641     }
20642     if (!child) {
20643       arg = getpid();
20644       write(-1, "", 0);
20645       _exit (arg);
20646     }
20647   }
20648 }
20649
20650 int
20651 main (void)
20652 {
20653   pid_t parent = getpid ();
20654   pid_t child;
20655
20656   sparc_address_test ();
20657
20658   child = vfork ();
20659
20660   if (child == 0) {
20661     /* Here is another test for sparc vfork register problems.  This
20662        test uses lots of local variables, at least as many local
20663        variables as main has allocated so far including compiler
20664        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20665        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20666        reuse the register of parent for one of the local variables,
20667        since it will think that parent can't possibly be used any more
20668        in this routine.  Assigning to the local variable will thus
20669        munge parent in the parent process.  */
20670     pid_t
20671       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20672       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20673     /* Convince the compiler that p..p7 are live; otherwise, it might
20674        use the same hardware register for all 8 local variables.  */
20675     if (p != p1 || p != p2 || p != p3 || p != p4
20676         || p != p5 || p != p6 || p != p7)
20677       _exit(1);
20678
20679     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20680        from child file descriptors.  If the child closes a descriptor
20681        before it execs or exits, this munges the parent's descriptor
20682        as well.  Test for this by closing stdout in the child.  */
20683     _exit(close(fileno(stdout)) != 0);
20684   } else {
20685     int status;
20686     struct stat st;
20687
20688     while (wait(&status) != child)
20689       ;
20690     $ac_main_return(
20691          /* Was there some problem with vforking?  */
20692          child < 0
20693
20694          /* Did the child fail?  (This shouldn't happen.)  */
20695          || status
20696
20697          /* Did the vfork/compiler bug occur?  */
20698          || parent != getpid()
20699
20700          /* Did the file descriptor bug occur?  */
20701          || fstat(fileno(stdout), &st) != 0
20702          );
20703   }
20704 }
20705 _ACEOF
20706 rm -f conftest$ac_exeext
20707 if { (eval echo "$as_me:20707: \"$ac_link\"") >&5
20708   (eval $ac_link) 2>&5
20709   ac_status=$?
20710   echo "$as_me:20710: \$? = $ac_status" >&5
20711   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20712   { (eval echo "$as_me:20712: \"$ac_try\"") >&5
20713   (eval $ac_try) 2>&5
20714   ac_status=$?
20715   echo "$as_me:20715: \$? = $ac_status" >&5
20716   (exit $ac_status); }; }; then
20717   ac_cv_func_vfork_works=yes
20718 else
20719   echo "$as_me: program exited with status $ac_status" >&5
20720 echo "$as_me: failed program was:" >&5
20721 cat conftest.$ac_ext >&5
20722 ac_cv_func_vfork_works=no
20723 fi
20724 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20725 fi
20726 fi
20727 echo "$as_me:20727: result: $ac_cv_func_vfork_works" >&5
20728 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20729
20730 fi;
20731 if test "x$ac_cv_func_fork_works" = xcross; then
20732   ac_cv_func_vfork_works=ac_cv_func_vfork
20733   { echo "$as_me:20733: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20734 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20735 fi
20736
20737 if test "x$ac_cv_func_vfork_works" = xyes; then
20738
20739 cat >>confdefs.h <<\EOF
20740 #define HAVE_WORKING_VFORK 1
20741 EOF
20742
20743 else
20744
20745 cat >>confdefs.h <<\EOF
20746 #define vfork fork
20747 EOF
20748
20749 fi
20750 if test "x$ac_cv_func_fork_works" = xyes; then
20751
20752 cat >>confdefs.h <<\EOF
20753 #define HAVE_WORKING_FORK 1
20754 EOF
20755
20756 fi
20757
20758 # special check for test/ditto.c
20759
20760 echo "$as_me:20760: checking for openpty in -lutil" >&5
20761 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20762 if test "${ac_cv_lib_util_openpty+set}" = set; then
20763   echo $ECHO_N "(cached) $ECHO_C" >&6
20764 else
20765   ac_check_lib_save_LIBS=$LIBS
20766 LIBS="-lutil  $LIBS"
20767 cat >conftest.$ac_ext <<_ACEOF
20768 #line 20768 "configure"
20769 #include "confdefs.h"
20770
20771 /* Override any gcc2 internal prototype to avoid an error.  */
20772 #ifdef __cplusplus
20773 extern "C"
20774 #endif
20775 /* We use char because int might match the return type of a gcc2
20776    builtin and then its argument prototype would still apply.  */
20777 char openpty ();
20778 int
20779 main (void)
20780 {
20781 openpty ();
20782   ;
20783   return 0;
20784 }
20785 _ACEOF
20786 rm -f conftest.$ac_objext conftest$ac_exeext
20787 if { (eval echo "$as_me:20787: \"$ac_link\"") >&5
20788   (eval $ac_link) 2>&5
20789   ac_status=$?
20790   echo "$as_me:20790: \$? = $ac_status" >&5
20791   (exit $ac_status); } &&
20792          { ac_try='test -s conftest$ac_exeext'
20793   { (eval echo "$as_me:20793: \"$ac_try\"") >&5
20794   (eval $ac_try) 2>&5
20795   ac_status=$?
20796   echo "$as_me:20796: \$? = $ac_status" >&5
20797   (exit $ac_status); }; }; then
20798   ac_cv_lib_util_openpty=yes
20799 else
20800   echo "$as_me: failed program was:" >&5
20801 cat conftest.$ac_ext >&5
20802 ac_cv_lib_util_openpty=no
20803 fi
20804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20805 LIBS=$ac_check_lib_save_LIBS
20806 fi
20807 echo "$as_me:20807: result: $ac_cv_lib_util_openpty" >&5
20808 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20809 if test $ac_cv_lib_util_openpty = yes; then
20810   cf_cv_lib_util=yes
20811 else
20812   cf_cv_lib_util=no
20813 fi
20814
20815 echo "$as_me:20815: checking for openpty header" >&5
20816 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20817 if test "${cf_cv_func_openpty+set}" = set; then
20818   echo $ECHO_N "(cached) $ECHO_C" >&6
20819 else
20820
20821         cf_save_LIBS="$LIBS"
20822         test $cf_cv_lib_util = yes && {
20823 cf_add_libs="-lutil"
20824 # Filter out duplicates - this happens with badly-designed ".pc" files...
20825 for cf_add_1lib in $LIBS
20826 do
20827         for cf_add_2lib in $cf_add_libs
20828         do
20829                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20830                 then
20831                         cf_add_1lib=
20832                         break
20833                 fi
20834         done
20835         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20836 done
20837 LIBS="$cf_add_libs"
20838  }
20839         for cf_header in pty.h libutil.h util.h
20840         do
20841         cat >conftest.$ac_ext <<_ACEOF
20842 #line 20842 "configure"
20843 #include "confdefs.h"
20844
20845 #include <$cf_header>
20846
20847 int
20848 main (void)
20849 {
20850
20851         int x = openpty((int *)0, (int *)0, (char *)0,
20852                                    (struct termios *)0, (struct winsize *)0);
20853
20854   ;
20855   return 0;
20856 }
20857 _ACEOF
20858 rm -f conftest.$ac_objext conftest$ac_exeext
20859 if { (eval echo "$as_me:20859: \"$ac_link\"") >&5
20860   (eval $ac_link) 2>&5
20861   ac_status=$?
20862   echo "$as_me:20862: \$? = $ac_status" >&5
20863   (exit $ac_status); } &&
20864          { ac_try='test -s conftest$ac_exeext'
20865   { (eval echo "$as_me:20865: \"$ac_try\"") >&5
20866   (eval $ac_try) 2>&5
20867   ac_status=$?
20868   echo "$as_me:20868: \$? = $ac_status" >&5
20869   (exit $ac_status); }; }; then
20870
20871                 cf_cv_func_openpty=$cf_header
20872                 break
20873
20874 else
20875   echo "$as_me: failed program was:" >&5
20876 cat conftest.$ac_ext >&5
20877
20878                 cf_cv_func_openpty=no
20879
20880 fi
20881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20882         done
20883         LIBS="$cf_save_LIBS"
20884
20885 fi
20886 echo "$as_me:20886: result: $cf_cv_func_openpty" >&5
20887 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20888
20889 if test "$cf_cv_func_openpty" != no ; then
20890
20891 cat >>confdefs.h <<EOF
20892 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20893 EOF
20894
20895 cat >>confdefs.h <<\EOF
20896 #define USE_XTERM_PTY 1
20897 EOF
20898
20899         if test "x$cf_cv_lib_util" = xyes ; then
20900
20901 cf_add_libs="-lutil"
20902 # Filter out duplicates - this happens with badly-designed ".pc" files...
20903 for cf_add_1lib in $TEST_LIBS
20904 do
20905         for cf_add_2lib in $cf_add_libs
20906         do
20907                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20908                 then
20909                         cf_add_1lib=
20910                         break
20911                 fi
20912         done
20913         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20914 done
20915 TEST_LIBS="$cf_add_libs"
20916
20917         fi
20918 fi
20919
20920 if test "$with_hashed_db" != no ; then
20921
20922 cat >>confdefs.h <<\EOF
20923 #define USE_HASHED_DB 1
20924 EOF
20925
20926 case $with_hashed_db in
20927 (yes|*able*)
20928         ;;
20929 (*)
20930         if test -d "$with_hashed_db" ; then
20931
20932 if test -n "$with_hashed_db/include" ; then
20933   for cf_add_incdir in $with_hashed_db/include
20934   do
20935         while test $cf_add_incdir != /usr/include
20936         do
20937           if test -d $cf_add_incdir
20938           then
20939                 cf_have_incdir=no
20940                 if test -n "$CFLAGS$CPPFLAGS" ; then
20941                   # a loop is needed to ensure we can add subdirs of existing dirs
20942                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20943                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20944                           cf_have_incdir=yes; break
20945                         fi
20946                   done
20947                 fi
20948
20949                 if test "$cf_have_incdir" = no ; then
20950                   if test "$cf_add_incdir" = /usr/local/include ; then
20951                         if test "$GCC" = yes
20952                         then
20953                           cf_save_CPPFLAGS=$CPPFLAGS
20954
20955         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20956         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20957
20958                           cat >conftest.$ac_ext <<_ACEOF
20959 #line 20959 "configure"
20960 #include "confdefs.h"
20961 #include <stdio.h>
20962 int
20963 main (void)
20964 {
20965 printf("Hello")
20966   ;
20967   return 0;
20968 }
20969 _ACEOF
20970 rm -f conftest.$ac_objext
20971 if { (eval echo "$as_me:20971: \"$ac_compile\"") >&5
20972   (eval $ac_compile) 2>&5
20973   ac_status=$?
20974   echo "$as_me:20974: \$? = $ac_status" >&5
20975   (exit $ac_status); } &&
20976          { ac_try='test -s conftest.$ac_objext'
20977   { (eval echo "$as_me:20977: \"$ac_try\"") >&5
20978   (eval $ac_try) 2>&5
20979   ac_status=$?
20980   echo "$as_me:20980: \$? = $ac_status" >&5
20981   (exit $ac_status); }; }; then
20982   :
20983 else
20984   echo "$as_me: failed program was:" >&5
20985 cat conftest.$ac_ext >&5
20986 cf_have_incdir=yes
20987 fi
20988 rm -f conftest.$ac_objext conftest.$ac_ext
20989                           CPPFLAGS=$cf_save_CPPFLAGS
20990                         fi
20991                   fi
20992                 fi
20993
20994                 if test "$cf_have_incdir" = no ; then
20995                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20996
20997 echo "${as_me:-configure}:20997: testing adding $cf_add_incdir to include-path ..." 1>&5
20998
20999                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21000
21001                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21002                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21003                   cf_add_incdir="$cf_top_incdir"
21004                 else
21005                   break
21006                 fi
21007           else
21008                 break
21009           fi
21010         done
21011   done
21012 fi
21013
21014 if test -n "$with_hashed_db/lib" ; then
21015         for cf_add_libdir in $with_hashed_db/lib
21016         do
21017                 if test $cf_add_libdir = /usr/lib ; then
21018                         :
21019                 elif test -d $cf_add_libdir
21020                 then
21021                         cf_have_libdir=no
21022                         if test -n "$LDFLAGS$LIBS" ; then
21023                                 # a loop is needed to ensure we can add subdirs of existing dirs
21024                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21025                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21026                                                 cf_have_libdir=yes; break
21027                                         fi
21028                                 done
21029                         fi
21030                         if test "$cf_have_libdir" = no ; then
21031                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21032
21033 echo "${as_me:-configure}:21033: testing adding $cf_add_libdir to library-path ..." 1>&5
21034
21035                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21036                         fi
21037                 fi
21038         done
21039 fi
21040
21041         else
21042                 case "$with_hashed_db" in
21043                 (./*|../*|/*)
21044                         { echo "$as_me:21044: WARNING: no such directory $with_hashed_db" >&5
21045 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
21046                         ;;
21047                 (*)
21048
21049 cf_search=
21050
21051 test "x$prefix" != "xNONE" && \
21052 test -d "$prefix" && \
21053  {
21054         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
21055         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
21056         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
21057         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
21058         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
21059         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
21060 }
21061
21062 for cf_subdir_prefix in \
21063         /usr \
21064         /usr/local \
21065         /usr/pkg \
21066         /opt \
21067         /opt/local \
21068         $HOME
21069 do
21070
21071 test "x$cf_subdir_prefix" != "x$prefix" && \
21072 test -d "$cf_subdir_prefix" && \
21073 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21074         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
21075         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
21076         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
21077         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
21078         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
21079         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"
21080 }
21081
21082 done
21083
21084         for cf_item in $cf_search
21085         do
21086                 case $cf_item in
21087                 (*/$with_hashed_db)
21088
21089 if test -n "$cf_item" ; then
21090   for cf_add_incdir in $cf_item
21091   do
21092         while test $cf_add_incdir != /usr/include
21093         do
21094           if test -d $cf_add_incdir
21095           then
21096                 cf_have_incdir=no
21097                 if test -n "$CFLAGS$CPPFLAGS" ; then
21098                   # a loop is needed to ensure we can add subdirs of existing dirs
21099                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21100                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21101                           cf_have_incdir=yes; break
21102                         fi
21103                   done
21104                 fi
21105
21106                 if test "$cf_have_incdir" = no ; then
21107                   if test "$cf_add_incdir" = /usr/local/include ; then
21108                         if test "$GCC" = yes
21109                         then
21110                           cf_save_CPPFLAGS=$CPPFLAGS
21111
21112         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21113         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21114
21115                           cat >conftest.$ac_ext <<_ACEOF
21116 #line 21116 "configure"
21117 #include "confdefs.h"
21118 #include <stdio.h>
21119 int
21120 main (void)
21121 {
21122 printf("Hello")
21123   ;
21124   return 0;
21125 }
21126 _ACEOF
21127 rm -f conftest.$ac_objext
21128 if { (eval echo "$as_me:21128: \"$ac_compile\"") >&5
21129   (eval $ac_compile) 2>&5
21130   ac_status=$?
21131   echo "$as_me:21131: \$? = $ac_status" >&5
21132   (exit $ac_status); } &&
21133          { ac_try='test -s conftest.$ac_objext'
21134   { (eval echo "$as_me:21134: \"$ac_try\"") >&5
21135   (eval $ac_try) 2>&5
21136   ac_status=$?
21137   echo "$as_me:21137: \$? = $ac_status" >&5
21138   (exit $ac_status); }; }; then
21139   :
21140 else
21141   echo "$as_me: failed program was:" >&5
21142 cat conftest.$ac_ext >&5
21143 cf_have_incdir=yes
21144 fi
21145 rm -f conftest.$ac_objext conftest.$ac_ext
21146                           CPPFLAGS=$cf_save_CPPFLAGS
21147                         fi
21148                   fi
21149                 fi
21150
21151                 if test "$cf_have_incdir" = no ; then
21152                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21153
21154 echo "${as_me:-configure}:21154: testing adding $cf_add_incdir to include-path ..." 1>&5
21155
21156                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21157
21158                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21159                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21160                   cf_add_incdir="$cf_top_incdir"
21161                 else
21162                   break
21163                 fi
21164           else
21165                 break
21166           fi
21167         done
21168   done
21169 fi
21170
21171                         ;;
21172                 esac
21173         done
21174
21175 cf_search=
21176
21177 test "x$prefix" != "xNONE" && \
21178 test -d "$prefix" && \
21179  {
21180         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
21181         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
21182         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
21183         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
21184         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
21185         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
21186 }
21187
21188 for cf_subdir_prefix in \
21189         /usr \
21190         /usr/local \
21191         /usr/pkg \
21192         /opt \
21193         /opt/local \
21194         $HOME
21195 do
21196
21197 test "x$cf_subdir_prefix" != "x$prefix" && \
21198 test -d "$cf_subdir_prefix" && \
21199 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21200         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
21201         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21202         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
21203         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
21204         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
21205         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"
21206 }
21207
21208 done
21209
21210         for cf_item in $cf_search
21211         do
21212                 case $cf_item in
21213                 (*/$with_hashed_db)
21214
21215 if test -n "$cf_item" ; then
21216         for cf_add_libdir in $cf_item
21217         do
21218                 if test $cf_add_libdir = /usr/lib ; then
21219                         :
21220                 elif test -d $cf_add_libdir
21221                 then
21222                         cf_have_libdir=no
21223                         if test -n "$LDFLAGS$LIBS" ; then
21224                                 # a loop is needed to ensure we can add subdirs of existing dirs
21225                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21226                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21227                                                 cf_have_libdir=yes; break
21228                                         fi
21229                                 done
21230                         fi
21231                         if test "$cf_have_libdir" = no ; then
21232                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21233
21234 echo "${as_me:-configure}:21234: testing adding $cf_add_libdir to library-path ..." 1>&5
21235
21236                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21237                         fi
21238                 fi
21239         done
21240 fi
21241
21242                         ;;
21243                 esac
21244         done
21245
21246                         ;;
21247                 esac
21248         fi
21249 esac
21250
21251 echo "$as_me:21251: checking for db.h" >&5
21252 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
21253 if test "${ac_cv_header_db_h+set}" = set; then
21254   echo $ECHO_N "(cached) $ECHO_C" >&6
21255 else
21256   cat >conftest.$ac_ext <<_ACEOF
21257 #line 21257 "configure"
21258 #include "confdefs.h"
21259 #include <db.h>
21260 _ACEOF
21261 if { (eval echo "$as_me:21261: \"$ac_cpp conftest.$ac_ext\"") >&5
21262   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21263   ac_status=$?
21264   egrep -v '^ *\+' conftest.er1 >conftest.err
21265   rm -f conftest.er1
21266   cat conftest.err >&5
21267   echo "$as_me:21267: \$? = $ac_status" >&5
21268   (exit $ac_status); } >/dev/null; then
21269   if test -s conftest.err; then
21270     ac_cpp_err=$ac_c_preproc_warn_flag
21271   else
21272     ac_cpp_err=
21273   fi
21274 else
21275   ac_cpp_err=yes
21276 fi
21277 if test -z "$ac_cpp_err"; then
21278   ac_cv_header_db_h=yes
21279 else
21280   echo "$as_me: failed program was:" >&5
21281   cat conftest.$ac_ext >&5
21282   ac_cv_header_db_h=no
21283 fi
21284 rm -f conftest.err conftest.$ac_ext
21285 fi
21286 echo "$as_me:21286: result: $ac_cv_header_db_h" >&5
21287 echo "${ECHO_T}$ac_cv_header_db_h" >&6
21288 if test $ac_cv_header_db_h = yes; then
21289
21290 echo "$as_me:21290: checking for version of db" >&5
21291 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
21292 if test "${cf_cv_hashed_db_version+set}" = set; then
21293   echo $ECHO_N "(cached) $ECHO_C" >&6
21294 else
21295
21296 cf_cv_hashed_db_version=unknown
21297
21298 for cf_db_version in 1 2 3 4 5 6
21299 do
21300
21301 echo "${as_me:-configure}:21301: testing checking for db version $cf_db_version ..." 1>&5
21302
21303         cat >conftest.$ac_ext <<_ACEOF
21304 #line 21304 "configure"
21305 #include "confdefs.h"
21306
21307 $ac_includes_default
21308 #include <db.h>
21309
21310 #ifdef DB_VERSION_MAJOR
21311         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
21312 #if $cf_db_version == DB_VERSION_MAJOR
21313         /* ok */
21314 #else
21315         make an error
21316 #endif
21317 #else
21318 #if $cf_db_version == 1
21319         /* ok: assuming this is DB 1.8.5 */
21320 #else
21321         make an error
21322 #endif
21323 #endif
21324
21325 int
21326 main (void)
21327 {
21328 DBT *foo = 0
21329   ;
21330   return 0;
21331 }
21332 _ACEOF
21333 rm -f conftest.$ac_objext
21334 if { (eval echo "$as_me:21334: \"$ac_compile\"") >&5
21335   (eval $ac_compile) 2>&5
21336   ac_status=$?
21337   echo "$as_me:21337: \$? = $ac_status" >&5
21338   (exit $ac_status); } &&
21339          { ac_try='test -s conftest.$ac_objext'
21340   { (eval echo "$as_me:21340: \"$ac_try\"") >&5
21341   (eval $ac_try) 2>&5
21342   ac_status=$?
21343   echo "$as_me:21343: \$? = $ac_status" >&5
21344   (exit $ac_status); }; }; then
21345
21346         cf_cv_hashed_db_version=$cf_db_version
21347         break
21348
21349 else
21350   echo "$as_me: failed program was:" >&5
21351 cat conftest.$ac_ext >&5
21352 fi
21353 rm -f conftest.$ac_objext conftest.$ac_ext
21354 done
21355
21356 fi
21357 echo "$as_me:21357: result: $cf_cv_hashed_db_version" >&5
21358 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
21359
21360 if test "$cf_cv_hashed_db_version" = unknown ; then
21361         { { echo "$as_me:21361: error: Cannot determine version of db" >&5
21362 echo "$as_me: error: Cannot determine version of db" >&2;}
21363    { (exit 1); exit 1; }; }
21364 else
21365
21366 echo "$as_me:21366: checking for db libraries" >&5
21367 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
21368 if test "${cf_cv_hashed_db_libs+set}" = set; then
21369   echo $ECHO_N "(cached) $ECHO_C" >&6
21370 else
21371
21372 cf_cv_hashed_db_libs=unknown
21373 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
21374 do
21375         cf_save_libs="$LIBS"
21376         if test -n "$cf_db_libs"; then
21377
21378 cf_add_libs="-l$cf_db_libs"
21379 # Filter out duplicates - this happens with badly-designed ".pc" files...
21380 for cf_add_1lib in $LIBS
21381 do
21382         for cf_add_2lib in $cf_add_libs
21383         do
21384                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21385                 then
21386                         cf_add_1lib=
21387                         break
21388                 fi
21389         done
21390         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21391 done
21392 LIBS="$cf_add_libs"
21393
21394         fi
21395
21396 echo "${as_me:-configure}:21396: testing checking for library "$cf_db_libs" ..." 1>&5
21397
21398         cat >conftest.$ac_ext <<_ACEOF
21399 #line 21399 "configure"
21400 #include "confdefs.h"
21401
21402 $ac_includes_default
21403 #include <db.h>
21404
21405 int
21406 main (void)
21407 {
21408
21409         char *path = "/tmp/foo";
21410 #ifdef DB_VERSION_MAJOR
21411 #if DB_VERSION_MAJOR >= 4
21412         DB *result = 0;
21413         db_create(&result, NULL, 0);
21414         result->open(result,
21415                 NULL,
21416                 path,
21417                 path,
21418                 DB_HASH,
21419                 DB_CREATE,
21420                 0644);
21421 #elif DB_VERSION_MAJOR >= 3
21422         DB *result = 0;
21423         db_create(&result, NULL, 0);
21424         result->open(result,
21425                 path,
21426                 path,
21427                 DB_HASH,
21428                 DB_CREATE,
21429                 0644);
21430 #elif DB_VERSION_MAJOR >= 2
21431         DB *result = 0;
21432         db_open(path,
21433                 DB_HASH,
21434                 DB_CREATE,
21435                 0644,
21436                 (DB_ENV *) 0,
21437                 (DB_INFO *) 0,
21438                 &result);
21439 #endif /* DB_VERSION_MAJOR */
21440 #else
21441         DB *result = dbopen(path,
21442                      2,
21443                      0644,
21444                      DB_HASH,
21445                      0);
21446 #endif
21447         ${cf_cv_main_return:-return}(result != 0)
21448
21449   ;
21450   return 0;
21451 }
21452 _ACEOF
21453 rm -f conftest.$ac_objext conftest$ac_exeext
21454 if { (eval echo "$as_me:21454: \"$ac_link\"") >&5
21455   (eval $ac_link) 2>&5
21456   ac_status=$?
21457   echo "$as_me:21457: \$? = $ac_status" >&5
21458   (exit $ac_status); } &&
21459          { ac_try='test -s conftest$ac_exeext'
21460   { (eval echo "$as_me:21460: \"$ac_try\"") >&5
21461   (eval $ac_try) 2>&5
21462   ac_status=$?
21463   echo "$as_me:21463: \$? = $ac_status" >&5
21464   (exit $ac_status); }; }; then
21465
21466         if test -n "$cf_db_libs" ; then
21467                 cf_cv_hashed_db_libs=$cf_db_libs
21468         else
21469                 cf_cv_hashed_db_libs=default
21470         fi
21471         LIBS="$cf_save_libs"
21472         break
21473
21474 else
21475   echo "$as_me: failed program was:" >&5
21476 cat conftest.$ac_ext >&5
21477 fi
21478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21479         LIBS="$cf_save_libs"
21480 done
21481
21482 fi
21483 echo "$as_me:21483: result: $cf_cv_hashed_db_libs" >&5
21484 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
21485
21486         if test "$cf_cv_hashed_db_libs" = unknown ; then
21487                 { { echo "$as_me:21487: error: Cannot determine library for db" >&5
21488 echo "$as_me: error: Cannot determine library for db" >&2;}
21489    { (exit 1); exit 1; }; }
21490         elif test "$cf_cv_hashed_db_libs" != default ; then
21491
21492 cf_add_libs="-l$cf_cv_hashed_db_libs"
21493 # Filter out duplicates - this happens with badly-designed ".pc" files...
21494 for cf_add_1lib in $LIBS
21495 do
21496         for cf_add_2lib in $cf_add_libs
21497         do
21498                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21499                 then
21500                         cf_add_1lib=
21501                         break
21502                 fi
21503         done
21504         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21505 done
21506 LIBS="$cf_add_libs"
21507
21508         fi
21509 fi
21510
21511 else
21512
21513         { { echo "$as_me:21513: error: Cannot find db.h" >&5
21514 echo "$as_me: error: Cannot find db.h" >&2;}
21515    { (exit 1); exit 1; }; }
21516
21517 fi
21518
21519 fi
21520
21521 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
21522         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21523         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21524 fi
21525
21526 # Just in case, check if the C compiler has a bool type.
21527
21528 echo "$as_me:21528: checking if we should include stdbool.h" >&5
21529 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21530
21531 if test "${cf_cv_header_stdbool_h+set}" = set; then
21532   echo $ECHO_N "(cached) $ECHO_C" >&6
21533 else
21534
21535         cat >conftest.$ac_ext <<_ACEOF
21536 #line 21536 "configure"
21537 #include "confdefs.h"
21538
21539 int
21540 main (void)
21541 {
21542 bool foo = false
21543   ;
21544   return 0;
21545 }
21546 _ACEOF
21547 rm -f conftest.$ac_objext
21548 if { (eval echo "$as_me:21548: \"$ac_compile\"") >&5
21549   (eval $ac_compile) 2>&5
21550   ac_status=$?
21551   echo "$as_me:21551: \$? = $ac_status" >&5
21552   (exit $ac_status); } &&
21553          { ac_try='test -s conftest.$ac_objext'
21554   { (eval echo "$as_me:21554: \"$ac_try\"") >&5
21555   (eval $ac_try) 2>&5
21556   ac_status=$?
21557   echo "$as_me:21557: \$? = $ac_status" >&5
21558   (exit $ac_status); }; }; then
21559   cf_cv_header_stdbool_h=0
21560 else
21561   echo "$as_me: failed program was:" >&5
21562 cat conftest.$ac_ext >&5
21563 cat >conftest.$ac_ext <<_ACEOF
21564 #line 21564 "configure"
21565 #include "confdefs.h"
21566
21567 #ifndef __BEOS__
21568 #include <stdbool.h>
21569 #endif
21570
21571 int
21572 main (void)
21573 {
21574 bool foo = false
21575   ;
21576   return 0;
21577 }
21578 _ACEOF
21579 rm -f conftest.$ac_objext
21580 if { (eval echo "$as_me:21580: \"$ac_compile\"") >&5
21581   (eval $ac_compile) 2>&5
21582   ac_status=$?
21583   echo "$as_me:21583: \$? = $ac_status" >&5
21584   (exit $ac_status); } &&
21585          { ac_try='test -s conftest.$ac_objext'
21586   { (eval echo "$as_me:21586: \"$ac_try\"") >&5
21587   (eval $ac_try) 2>&5
21588   ac_status=$?
21589   echo "$as_me:21589: \$? = $ac_status" >&5
21590   (exit $ac_status); }; }; then
21591   cf_cv_header_stdbool_h=1
21592 else
21593   echo "$as_me: failed program was:" >&5
21594 cat conftest.$ac_ext >&5
21595 cf_cv_header_stdbool_h=0
21596 fi
21597 rm -f conftest.$ac_objext conftest.$ac_ext
21598 fi
21599 rm -f conftest.$ac_objext conftest.$ac_ext
21600 fi
21601
21602 if test "$cf_cv_header_stdbool_h" = 1
21603 then    echo "$as_me:21603: result: yes" >&5
21604 echo "${ECHO_T}yes" >&6
21605 else    echo "$as_me:21605: result: no" >&5
21606 echo "${ECHO_T}no" >&6
21607 fi
21608
21609 echo "$as_me:21609: checking for builtin bool type" >&5
21610 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21611
21612 if test "${cf_cv_cc_bool_type+set}" = set; then
21613   echo $ECHO_N "(cached) $ECHO_C" >&6
21614 else
21615
21616         cat >conftest.$ac_ext <<_ACEOF
21617 #line 21617 "configure"
21618 #include "confdefs.h"
21619
21620 #include <stdio.h>
21621 #include <sys/types.h>
21622
21623 int
21624 main (void)
21625 {
21626 bool x = false
21627   ;
21628   return 0;
21629 }
21630 _ACEOF
21631 rm -f conftest.$ac_objext
21632 if { (eval echo "$as_me:21632: \"$ac_compile\"") >&5
21633   (eval $ac_compile) 2>&5
21634   ac_status=$?
21635   echo "$as_me:21635: \$? = $ac_status" >&5
21636   (exit $ac_status); } &&
21637          { ac_try='test -s conftest.$ac_objext'
21638   { (eval echo "$as_me:21638: \"$ac_try\"") >&5
21639   (eval $ac_try) 2>&5
21640   ac_status=$?
21641   echo "$as_me:21641: \$? = $ac_status" >&5
21642   (exit $ac_status); }; }; then
21643   cf_cv_cc_bool_type=1
21644 else
21645   echo "$as_me: failed program was:" >&5
21646 cat conftest.$ac_ext >&5
21647 cf_cv_cc_bool_type=0
21648 fi
21649 rm -f conftest.$ac_objext conftest.$ac_ext
21650
21651 fi
21652
21653 if test "$cf_cv_cc_bool_type" = 1
21654 then    echo "$as_me:21654: result: yes" >&5
21655 echo "${ECHO_T}yes" >&6
21656 else    echo "$as_me:21656: result: no" >&5
21657 echo "${ECHO_T}no" >&6
21658 fi
21659
21660 # Check for C++ compiler characteristics (and ensure that it's there!)
21661 if test -n "$CXX" ; then
21662         ac_ext=cc
21663 ac_cpp='$CXXCPP $CPPFLAGS'
21664 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21665 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21666 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21667 ac_main_return=return
21668
21669 if test -n "$GXX" ; then
21670
21671         cf_save="$LIBS"
21672         LIBS="$LIBS $CXXLIBS"
21673         echo "$as_me:21673: checking if we already have C++ library" >&5
21674 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21675         cat >conftest.$ac_ext <<_ACEOF
21676 #line 21676 "configure"
21677 #include "confdefs.h"
21678
21679                         #include <iostream>
21680 int
21681 main (void)
21682 {
21683
21684                         std::cout << "Hello World!" << std::endl;
21685   ;
21686   return 0;
21687 }
21688 _ACEOF
21689 rm -f conftest.$ac_objext conftest$ac_exeext
21690 if { (eval echo "$as_me:21690: \"$ac_link\"") >&5
21691   (eval $ac_link) 2>&5
21692   ac_status=$?
21693   echo "$as_me:21693: \$? = $ac_status" >&5
21694   (exit $ac_status); } &&
21695          { ac_try='test -s conftest$ac_exeext'
21696   { (eval echo "$as_me:21696: \"$ac_try\"") >&5
21697   (eval $ac_try) 2>&5
21698   ac_status=$?
21699   echo "$as_me:21699: \$? = $ac_status" >&5
21700   (exit $ac_status); }; }; then
21701   cf_have_libstdcpp=yes
21702 else
21703   echo "$as_me: failed program was:" >&5
21704 cat conftest.$ac_ext >&5
21705 cf_have_libstdcpp=no
21706 fi
21707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21708         echo "$as_me:21708: result: $cf_have_libstdcpp" >&5
21709 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21710         LIBS="$cf_save"
21711
21712         if test $cf_have_libstdcpp != yes
21713         then
21714                 case $cf_cv_system_name in
21715                 (os2*)
21716                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21717                                 cf_stdcpp_libname=stdcpp
21718                         else
21719                                 cf_stdcpp_libname=stdc++
21720                         fi
21721                         ;;
21722                 (*)
21723                         cf_stdcpp_libname=stdc++
21724                         ;;
21725                 esac
21726
21727                 echo "$as_me:21727: checking for library $cf_stdcpp_libname" >&5
21728 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21729 if test "${cf_cv_libstdcpp+set}" = set; then
21730   echo $ECHO_N "(cached) $ECHO_C" >&6
21731 else
21732
21733                         cf_save="$LIBS"
21734                         LIBS="$LIBS $CXXLIBS"
21735
21736 cf_add_libs="-l$cf_stdcpp_libname"
21737 # Filter out duplicates - this happens with badly-designed ".pc" files...
21738 for cf_add_1lib in $LIBS
21739 do
21740         for cf_add_2lib in $cf_add_libs
21741         do
21742                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21743                 then
21744                         cf_add_1lib=
21745                         break
21746                 fi
21747         done
21748         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21749 done
21750 LIBS="$cf_add_libs"
21751
21752                 cat >conftest.$ac_ext <<_ACEOF
21753 #line 21753 "configure"
21754 #include "confdefs.h"
21755
21756                                 #include <iostream>
21757 int
21758 main (void)
21759 {
21760
21761                                 std::cout << "Hello World!" << std::endl;
21762   ;
21763   return 0;
21764 }
21765 _ACEOF
21766 rm -f conftest.$ac_objext conftest$ac_exeext
21767 if { (eval echo "$as_me:21767: \"$ac_link\"") >&5
21768   (eval $ac_link) 2>&5
21769   ac_status=$?
21770   echo "$as_me:21770: \$? = $ac_status" >&5
21771   (exit $ac_status); } &&
21772          { ac_try='test -s conftest$ac_exeext'
21773   { (eval echo "$as_me:21773: \"$ac_try\"") >&5
21774   (eval $ac_try) 2>&5
21775   ac_status=$?
21776   echo "$as_me:21776: \$? = $ac_status" >&5
21777   (exit $ac_status); }; }; then
21778   cf_cv_libstdcpp=yes
21779 else
21780   echo "$as_me: failed program was:" >&5
21781 cat conftest.$ac_ext >&5
21782 cf_cv_libstdcpp=no
21783 fi
21784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21785                         LIBS="$cf_save"
21786
21787 fi
21788 echo "$as_me:21788: result: $cf_cv_libstdcpp" >&5
21789 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
21790                 test "$cf_cv_libstdcpp" = yes && {
21791 cf_add_libs="-l$cf_stdcpp_libname"
21792 # Filter out duplicates - this happens with badly-designed ".pc" files...
21793 for cf_add_1lib in $CXXLIBS
21794 do
21795         for cf_add_2lib in $cf_add_libs
21796         do
21797                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21798                 then
21799                         cf_add_1lib=
21800                         break
21801                 fi
21802         done
21803         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21804 done
21805 CXXLIBS="$cf_add_libs"
21806  }
21807         fi
21808 fi
21809
21810         echo "$as_me:21810: checking whether $CXX understands -c and -o together" >&5
21811 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
21812 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
21813   echo $ECHO_N "(cached) $ECHO_C" >&6
21814 else
21815
21816 cat > conftest.$ac_ext <<CF_EOF
21817 int main(void)
21818 {
21819         ${cf_cv_main_return:-return}(0);
21820 }
21821 CF_EOF
21822 # We do the test twice because some compilers refuse to overwrite an
21823 # existing .o file with -o, though they will create one.
21824 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
21825 if { (eval echo "$as_me:21825: \"$ac_try\"") >&5
21826   (eval $ac_try) 2>&5
21827   ac_status=$?
21828   echo "$as_me:21828: \$? = $ac_status" >&5
21829   (exit $ac_status); } &&
21830   test -f conftest2.$ac_objext && { (eval echo "$as_me:21830: \"$ac_try\"") >&5
21831   (eval $ac_try) 2>&5
21832   ac_status=$?
21833   echo "$as_me:21833: \$? = $ac_status" >&5
21834   (exit $ac_status); };
21835 then
21836   eval cf_cv_prog_CXX_c_o=yes
21837 else
21838   eval cf_cv_prog_CXX_c_o=no
21839 fi
21840 rm -rf conftest*
21841
21842 fi
21843 if test $cf_cv_prog_CXX_c_o = yes; then
21844   echo "$as_me:21844: result: yes" >&5
21845 echo "${ECHO_T}yes" >&6
21846 else
21847   echo "$as_me:21847: result: no" >&5
21848 echo "${ECHO_T}no" >&6
21849 fi
21850
21851         case $GXX_VERSION in
21852         (1*|2.0-6*)
21853                 cf_cxx_library=yes
21854                 ;;
21855         (*-2.7*|2.7*)
21856
21857 cf_cxx_library=unknown
21858 case $cf_cv_system_name in
21859 (os2*)
21860         cf_gpp_libname=gpp
21861         ;;
21862 (*)
21863         cf_gpp_libname=g++
21864         ;;
21865 esac
21866 if test "$GXX" = yes; then
21867         echo "$as_me:21867: checking for lib$cf_gpp_libname" >&5
21868 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
21869         cf_save="$LIBS"
21870
21871 cf_add_libs="-l$cf_gpp_libname"
21872 # Filter out duplicates - this happens with badly-designed ".pc" files...
21873 for cf_add_1lib in $LIBS
21874 do
21875         for cf_add_2lib in $cf_add_libs
21876         do
21877                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21878                 then
21879                         cf_add_1lib=
21880                         break
21881                 fi
21882         done
21883         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21884 done
21885 LIBS="$cf_add_libs"
21886
21887         cat >conftest.$ac_ext <<_ACEOF
21888 #line 21888 "configure"
21889 #include "confdefs.h"
21890
21891 #include <$cf_gpp_libname/builtin.h>
21892
21893 int
21894 main (void)
21895 {
21896 two_arg_error_handler_t foo2 = lib_error_handler
21897   ;
21898   return 0;
21899 }
21900 _ACEOF
21901 rm -f conftest.$ac_objext conftest$ac_exeext
21902 if { (eval echo "$as_me:21902: \"$ac_link\"") >&5
21903   (eval $ac_link) 2>&5
21904   ac_status=$?
21905   echo "$as_me:21905: \$? = $ac_status" >&5
21906   (exit $ac_status); } &&
21907          { ac_try='test -s conftest$ac_exeext'
21908   { (eval echo "$as_me:21908: \"$ac_try\"") >&5
21909   (eval $ac_try) 2>&5
21910   ac_status=$?
21911   echo "$as_me:21911: \$? = $ac_status" >&5
21912   (exit $ac_status); }; }; then
21913   cf_cxx_library=yes
21914
21915 cf_add_libs="-l$cf_gpp_libname"
21916 # Filter out duplicates - this happens with badly-designed ".pc" files...
21917 for cf_add_1lib in $CXXLIBS
21918 do
21919         for cf_add_2lib in $cf_add_libs
21920         do
21921                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21922                 then
21923                         cf_add_1lib=
21924                         break
21925                 fi
21926         done
21927         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21928 done
21929 CXXLIBS="$cf_add_libs"
21930
21931          if test "$cf_gpp_libname" = cpp ; then
21932
21933 cat >>confdefs.h <<\EOF
21934 #define HAVE_GPP_BUILTIN_H 1
21935 EOF
21936
21937          else
21938
21939 cat >>confdefs.h <<\EOF
21940 #define HAVE_GXX_BUILTIN_H 1
21941 EOF
21942
21943          fi
21944 else
21945   echo "$as_me: failed program was:" >&5
21946 cat conftest.$ac_ext >&5
21947 cat >conftest.$ac_ext <<_ACEOF
21948 #line 21948 "configure"
21949 #include "confdefs.h"
21950
21951 #include <builtin.h>
21952
21953 int
21954 main (void)
21955 {
21956 two_arg_error_handler_t foo2 = lib_error_handler
21957   ;
21958   return 0;
21959 }
21960 _ACEOF
21961 rm -f conftest.$ac_objext conftest$ac_exeext
21962 if { (eval echo "$as_me:21962: \"$ac_link\"") >&5
21963   (eval $ac_link) 2>&5
21964   ac_status=$?
21965   echo "$as_me:21965: \$? = $ac_status" >&5
21966   (exit $ac_status); } &&
21967          { ac_try='test -s conftest$ac_exeext'
21968   { (eval echo "$as_me:21968: \"$ac_try\"") >&5
21969   (eval $ac_try) 2>&5
21970   ac_status=$?
21971   echo "$as_me:21971: \$? = $ac_status" >&5
21972   (exit $ac_status); }; }; then
21973   cf_cxx_library=yes
21974
21975 cf_add_libs="-l$cf_gpp_libname"
21976 # Filter out duplicates - this happens with badly-designed ".pc" files...
21977 for cf_add_1lib in $CXXLIBS
21978 do
21979         for cf_add_2lib in $cf_add_libs
21980         do
21981                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21982                 then
21983                         cf_add_1lib=
21984                         break
21985                 fi
21986         done
21987         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21988 done
21989 CXXLIBS="$cf_add_libs"
21990
21991 cat >>confdefs.h <<\EOF
21992 #define HAVE_BUILTIN_H 1
21993 EOF
21994
21995 else
21996   echo "$as_me: failed program was:" >&5
21997 cat conftest.$ac_ext >&5
21998 cf_cxx_library=no
21999 fi
22000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22001 fi
22002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22003         LIBS="$cf_save"
22004         echo "$as_me:22004: result: $cf_cxx_library" >&5
22005 echo "${ECHO_T}$cf_cxx_library" >&6
22006 fi
22007
22008                 ;;
22009         (*)
22010                 cf_cxx_library=no
22011                 ;;
22012         esac
22013
22014         ac_ext=cc
22015 ac_cpp='$CXXCPP $CPPFLAGS'
22016 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22017 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22018 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22019 ac_main_return=return
22020 echo "$as_me:22020: checking how to run the C++ preprocessor" >&5
22021 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
22022 if test -z "$CXXCPP"; then
22023   if test "${ac_cv_prog_CXXCPP+set}" = set; then
22024   echo $ECHO_N "(cached) $ECHO_C" >&6
22025 else
22026       # Double quotes because CXXCPP needs to be expanded
22027     for CXXCPP in "$CXX -E" "/lib/cpp"
22028     do
22029       ac_preproc_ok=false
22030 for ac_cxx_preproc_warn_flag in '' yes
22031 do
22032   # Use a header file that comes with gcc, so configuring glibc
22033   # with a fresh cross-compiler works.
22034   # On the NeXT, cc -E runs the code through the compiler's parser,
22035   # not just through cpp. "Syntax error" is here to catch this case.
22036   cat >conftest.$ac_ext <<_ACEOF
22037 #line 22037 "configure"
22038 #include "confdefs.h"
22039 #include <assert.h>
22040                      Syntax error
22041 _ACEOF
22042 if { (eval echo "$as_me:22042: \"$ac_cpp conftest.$ac_ext\"") >&5
22043   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22044   ac_status=$?
22045   egrep -v '^ *\+' conftest.er1 >conftest.err
22046   rm -f conftest.er1
22047   cat conftest.err >&5
22048   echo "$as_me:22048: \$? = $ac_status" >&5
22049   (exit $ac_status); } >/dev/null; then
22050   if test -s conftest.err; then
22051     ac_cpp_err=$ac_cxx_preproc_warn_flag
22052   else
22053     ac_cpp_err=
22054   fi
22055 else
22056   ac_cpp_err=yes
22057 fi
22058 if test -z "$ac_cpp_err"; then
22059   :
22060 else
22061   echo "$as_me: failed program was:" >&5
22062   cat conftest.$ac_ext >&5
22063   # Broken: fails on valid input.
22064 continue
22065 fi
22066 rm -f conftest.err conftest.$ac_ext
22067
22068   # OK, works on sane cases.  Now check whether non-existent headers
22069   # can be detected and how.
22070   cat >conftest.$ac_ext <<_ACEOF
22071 #line 22071 "configure"
22072 #include "confdefs.h"
22073 #include <ac_nonexistent.h>
22074 _ACEOF
22075 if { (eval echo "$as_me:22075: \"$ac_cpp conftest.$ac_ext\"") >&5
22076   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22077   ac_status=$?
22078   egrep -v '^ *\+' conftest.er1 >conftest.err
22079   rm -f conftest.er1
22080   cat conftest.err >&5
22081   echo "$as_me:22081: \$? = $ac_status" >&5
22082   (exit $ac_status); } >/dev/null; then
22083   if test -s conftest.err; then
22084     ac_cpp_err=$ac_cxx_preproc_warn_flag
22085   else
22086     ac_cpp_err=
22087   fi
22088 else
22089   ac_cpp_err=yes
22090 fi
22091 if test -z "$ac_cpp_err"; then
22092   # Broken: success on invalid input.
22093 continue
22094 else
22095   echo "$as_me: failed program was:" >&5
22096   cat conftest.$ac_ext >&5
22097   # Passes both tests.
22098 ac_preproc_ok=:
22099 break
22100 fi
22101 rm -f conftest.err conftest.$ac_ext
22102
22103 done
22104 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22105 rm -f conftest.err conftest.$ac_ext
22106 if $ac_preproc_ok; then
22107   break
22108 fi
22109
22110     done
22111     ac_cv_prog_CXXCPP=$CXXCPP
22112
22113 fi
22114   CXXCPP=$ac_cv_prog_CXXCPP
22115 else
22116   ac_cv_prog_CXXCPP=$CXXCPP
22117 fi
22118 echo "$as_me:22118: result: $CXXCPP" >&5
22119 echo "${ECHO_T}$CXXCPP" >&6
22120 ac_preproc_ok=false
22121 for ac_cxx_preproc_warn_flag in '' yes
22122 do
22123   # Use a header file that comes with gcc, so configuring glibc
22124   # with a fresh cross-compiler works.
22125   # On the NeXT, cc -E runs the code through the compiler's parser,
22126   # not just through cpp. "Syntax error" is here to catch this case.
22127   cat >conftest.$ac_ext <<_ACEOF
22128 #line 22128 "configure"
22129 #include "confdefs.h"
22130 #include <assert.h>
22131                      Syntax error
22132 _ACEOF
22133 if { (eval echo "$as_me:22133: \"$ac_cpp conftest.$ac_ext\"") >&5
22134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22135   ac_status=$?
22136   egrep -v '^ *\+' conftest.er1 >conftest.err
22137   rm -f conftest.er1
22138   cat conftest.err >&5
22139   echo "$as_me:22139: \$? = $ac_status" >&5
22140   (exit $ac_status); } >/dev/null; then
22141   if test -s conftest.err; then
22142     ac_cpp_err=$ac_cxx_preproc_warn_flag
22143   else
22144     ac_cpp_err=
22145   fi
22146 else
22147   ac_cpp_err=yes
22148 fi
22149 if test -z "$ac_cpp_err"; then
22150   :
22151 else
22152   echo "$as_me: failed program was:" >&5
22153   cat conftest.$ac_ext >&5
22154   # Broken: fails on valid input.
22155 continue
22156 fi
22157 rm -f conftest.err conftest.$ac_ext
22158
22159   # OK, works on sane cases.  Now check whether non-existent headers
22160   # can be detected and how.
22161   cat >conftest.$ac_ext <<_ACEOF
22162 #line 22162 "configure"
22163 #include "confdefs.h"
22164 #include <ac_nonexistent.h>
22165 _ACEOF
22166 if { (eval echo "$as_me:22166: \"$ac_cpp conftest.$ac_ext\"") >&5
22167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22168   ac_status=$?
22169   egrep -v '^ *\+' conftest.er1 >conftest.err
22170   rm -f conftest.er1
22171   cat conftest.err >&5
22172   echo "$as_me:22172: \$? = $ac_status" >&5
22173   (exit $ac_status); } >/dev/null; then
22174   if test -s conftest.err; then
22175     ac_cpp_err=$ac_cxx_preproc_warn_flag
22176   else
22177     ac_cpp_err=
22178   fi
22179 else
22180   ac_cpp_err=yes
22181 fi
22182 if test -z "$ac_cpp_err"; then
22183   # Broken: success on invalid input.
22184 continue
22185 else
22186   echo "$as_me: failed program was:" >&5
22187   cat conftest.$ac_ext >&5
22188   # Passes both tests.
22189 ac_preproc_ok=:
22190 break
22191 fi
22192 rm -f conftest.err conftest.$ac_ext
22193
22194 done
22195 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22196 rm -f conftest.err conftest.$ac_ext
22197 if $ac_preproc_ok; then
22198   :
22199 else
22200   { { echo "$as_me:22200: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
22201 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
22202    { (exit 1); exit 1; }; }
22203 fi
22204
22205 ac_ext=cc
22206 ac_cpp='$CXXCPP $CPPFLAGS'
22207 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22208 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22209 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22210 ac_main_return=return
22211
22212 for ac_header in typeinfo
22213 do
22214 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22215 echo "$as_me:22215: checking for $ac_header" >&5
22216 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22217 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22218   echo $ECHO_N "(cached) $ECHO_C" >&6
22219 else
22220   cat >conftest.$ac_ext <<_ACEOF
22221 #line 22221 "configure"
22222 #include "confdefs.h"
22223 #include <$ac_header>
22224 _ACEOF
22225 if { (eval echo "$as_me:22225: \"$ac_cpp conftest.$ac_ext\"") >&5
22226   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22227   ac_status=$?
22228   egrep -v '^ *\+' conftest.er1 >conftest.err
22229   rm -f conftest.er1
22230   cat conftest.err >&5
22231   echo "$as_me:22231: \$? = $ac_status" >&5
22232   (exit $ac_status); } >/dev/null; then
22233   if test -s conftest.err; then
22234     ac_cpp_err=$ac_cxx_preproc_warn_flag
22235   else
22236     ac_cpp_err=
22237   fi
22238 else
22239   ac_cpp_err=yes
22240 fi
22241 if test -z "$ac_cpp_err"; then
22242   eval "$as_ac_Header=yes"
22243 else
22244   echo "$as_me: failed program was:" >&5
22245   cat conftest.$ac_ext >&5
22246   eval "$as_ac_Header=no"
22247 fi
22248 rm -f conftest.err conftest.$ac_ext
22249 fi
22250 echo "$as_me:22250: result: `eval echo '${'$as_ac_Header'}'`" >&5
22251 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22252 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22253   cat >>confdefs.h <<EOF
22254 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22255 EOF
22256
22257 fi
22258 done
22259
22260 for ac_header in iostream
22261 do
22262 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22263 echo "$as_me:22263: checking for $ac_header" >&5
22264 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22265 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22266   echo $ECHO_N "(cached) $ECHO_C" >&6
22267 else
22268   cat >conftest.$ac_ext <<_ACEOF
22269 #line 22269 "configure"
22270 #include "confdefs.h"
22271 #include <$ac_header>
22272 _ACEOF
22273 if { (eval echo "$as_me:22273: \"$ac_cpp conftest.$ac_ext\"") >&5
22274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22275   ac_status=$?
22276   egrep -v '^ *\+' conftest.er1 >conftest.err
22277   rm -f conftest.er1
22278   cat conftest.err >&5
22279   echo "$as_me:22279: \$? = $ac_status" >&5
22280   (exit $ac_status); } >/dev/null; then
22281   if test -s conftest.err; then
22282     ac_cpp_err=$ac_cxx_preproc_warn_flag
22283   else
22284     ac_cpp_err=
22285   fi
22286 else
22287   ac_cpp_err=yes
22288 fi
22289 if test -z "$ac_cpp_err"; then
22290   eval "$as_ac_Header=yes"
22291 else
22292   echo "$as_me: failed program was:" >&5
22293   cat conftest.$ac_ext >&5
22294   eval "$as_ac_Header=no"
22295 fi
22296 rm -f conftest.err conftest.$ac_ext
22297 fi
22298 echo "$as_me:22298: result: `eval echo '${'$as_ac_Header'}'`" >&5
22299 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22300 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22301   cat >>confdefs.h <<EOF
22302 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22303 EOF
22304
22305 fi
22306 done
22307
22308 if test x"$ac_cv_header_iostream" = xyes ; then
22309         echo "$as_me:22309: checking if iostream uses std-namespace" >&5
22310 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
22311         cat >conftest.$ac_ext <<_ACEOF
22312 #line 22312 "configure"
22313 #include "confdefs.h"
22314
22315 #include <iostream>
22316 using std::endl;
22317 using std::cerr;
22318 int
22319 main (void)
22320 {
22321
22322 cerr << "testing" << endl;
22323
22324   ;
22325   return 0;
22326 }
22327 _ACEOF
22328 rm -f conftest.$ac_objext
22329 if { (eval echo "$as_me:22329: \"$ac_compile\"") >&5
22330   (eval $ac_compile) 2>&5
22331   ac_status=$?
22332   echo "$as_me:22332: \$? = $ac_status" >&5
22333   (exit $ac_status); } &&
22334          { ac_try='test -s conftest.$ac_objext'
22335   { (eval echo "$as_me:22335: \"$ac_try\"") >&5
22336   (eval $ac_try) 2>&5
22337   ac_status=$?
22338   echo "$as_me:22338: \$? = $ac_status" >&5
22339   (exit $ac_status); }; }; then
22340   cf_iostream_namespace=yes
22341 else
22342   echo "$as_me: failed program was:" >&5
22343 cat conftest.$ac_ext >&5
22344 cf_iostream_namespace=no
22345 fi
22346 rm -f conftest.$ac_objext conftest.$ac_ext
22347         echo "$as_me:22347: result: $cf_iostream_namespace" >&5
22348 echo "${ECHO_T}$cf_iostream_namespace" >&6
22349         if test "$cf_iostream_namespace" = yes ; then
22350
22351 cat >>confdefs.h <<\EOF
22352 #define IOSTREAM_NAMESPACE 1
22353 EOF
22354
22355         fi
22356 fi
22357
22358 echo "$as_me:22358: checking if we should include stdbool.h" >&5
22359 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22360
22361 if test "${cf_cv_header_stdbool_h+set}" = set; then
22362   echo $ECHO_N "(cached) $ECHO_C" >&6
22363 else
22364
22365         cat >conftest.$ac_ext <<_ACEOF
22366 #line 22366 "configure"
22367 #include "confdefs.h"
22368
22369 int
22370 main (void)
22371 {
22372 bool foo = false
22373   ;
22374   return 0;
22375 }
22376 _ACEOF
22377 rm -f conftest.$ac_objext
22378 if { (eval echo "$as_me:22378: \"$ac_compile\"") >&5
22379   (eval $ac_compile) 2>&5
22380   ac_status=$?
22381   echo "$as_me:22381: \$? = $ac_status" >&5
22382   (exit $ac_status); } &&
22383          { ac_try='test -s conftest.$ac_objext'
22384   { (eval echo "$as_me:22384: \"$ac_try\"") >&5
22385   (eval $ac_try) 2>&5
22386   ac_status=$?
22387   echo "$as_me:22387: \$? = $ac_status" >&5
22388   (exit $ac_status); }; }; then
22389   cf_cv_header_stdbool_h=0
22390 else
22391   echo "$as_me: failed program was:" >&5
22392 cat conftest.$ac_ext >&5
22393 cat >conftest.$ac_ext <<_ACEOF
22394 #line 22394 "configure"
22395 #include "confdefs.h"
22396
22397 #ifndef __BEOS__
22398 #include <stdbool.h>
22399 #endif
22400
22401 int
22402 main (void)
22403 {
22404 bool foo = false
22405   ;
22406   return 0;
22407 }
22408 _ACEOF
22409 rm -f conftest.$ac_objext
22410 if { (eval echo "$as_me:22410: \"$ac_compile\"") >&5
22411   (eval $ac_compile) 2>&5
22412   ac_status=$?
22413   echo "$as_me:22413: \$? = $ac_status" >&5
22414   (exit $ac_status); } &&
22415          { ac_try='test -s conftest.$ac_objext'
22416   { (eval echo "$as_me:22416: \"$ac_try\"") >&5
22417   (eval $ac_try) 2>&5
22418   ac_status=$?
22419   echo "$as_me:22419: \$? = $ac_status" >&5
22420   (exit $ac_status); }; }; then
22421   cf_cv_header_stdbool_h=1
22422 else
22423   echo "$as_me: failed program was:" >&5
22424 cat conftest.$ac_ext >&5
22425 cf_cv_header_stdbool_h=0
22426 fi
22427 rm -f conftest.$ac_objext conftest.$ac_ext
22428 fi
22429 rm -f conftest.$ac_objext conftest.$ac_ext
22430 fi
22431
22432 if test "$cf_cv_header_stdbool_h" = 1
22433 then    echo "$as_me:22433: result: yes" >&5
22434 echo "${ECHO_T}yes" >&6
22435 else    echo "$as_me:22435: result: no" >&5
22436 echo "${ECHO_T}no" >&6
22437 fi
22438
22439 echo "$as_me:22439: checking for builtin bool type" >&5
22440 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22441
22442 if test "${cf_cv_builtin_bool+set}" = set; then
22443   echo $ECHO_N "(cached) $ECHO_C" >&6
22444 else
22445
22446         cat >conftest.$ac_ext <<_ACEOF
22447 #line 22447 "configure"
22448 #include "confdefs.h"
22449
22450 #include <stdio.h>
22451 #include <sys/types.h>
22452
22453 int
22454 main (void)
22455 {
22456 bool x = false
22457   ;
22458   return 0;
22459 }
22460 _ACEOF
22461 rm -f conftest.$ac_objext
22462 if { (eval echo "$as_me:22462: \"$ac_compile\"") >&5
22463   (eval $ac_compile) 2>&5
22464   ac_status=$?
22465   echo "$as_me:22465: \$? = $ac_status" >&5
22466   (exit $ac_status); } &&
22467          { ac_try='test -s conftest.$ac_objext'
22468   { (eval echo "$as_me:22468: \"$ac_try\"") >&5
22469   (eval $ac_try) 2>&5
22470   ac_status=$?
22471   echo "$as_me:22471: \$? = $ac_status" >&5
22472   (exit $ac_status); }; }; then
22473   cf_cv_builtin_bool=1
22474 else
22475   echo "$as_me: failed program was:" >&5
22476 cat conftest.$ac_ext >&5
22477 cf_cv_builtin_bool=0
22478 fi
22479 rm -f conftest.$ac_objext conftest.$ac_ext
22480
22481 fi
22482
22483 if test "$cf_cv_builtin_bool" = 1
22484 then    echo "$as_me:22484: result: yes" >&5
22485 echo "${ECHO_T}yes" >&6
22486 else    echo "$as_me:22486: result: no" >&5
22487 echo "${ECHO_T}no" >&6
22488 fi
22489
22490 echo "$as_me:22490: checking for size of bool" >&5
22491 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22492 if test "${cf_cv_type_of_bool+set}" = set; then
22493   echo $ECHO_N "(cached) $ECHO_C" >&6
22494 else
22495
22496         rm -f cf_test.out
22497         if test "$cross_compiling" = yes; then
22498   cf_cv_type_of_bool=unknown
22499 else
22500   cat >conftest.$ac_ext <<_ACEOF
22501 #line 22501 "configure"
22502 #include "confdefs.h"
22503
22504 #include <stdlib.h>
22505 #include <stdio.h>
22506
22507 #if defined(__cplusplus)
22508
22509 #ifdef HAVE_GXX_BUILTIN_H
22510 #include <g++/builtin.h>
22511 #elif HAVE_GPP_BUILTIN_H
22512 #include <gpp/builtin.h>
22513 #elif HAVE_BUILTIN_H
22514 #include <builtin.h>
22515 #endif
22516
22517 #else
22518
22519 #if $cf_cv_header_stdbool_h
22520 #include <stdbool.h>
22521 #endif
22522
22523 #endif
22524
22525 int main(void)
22526 {
22527         FILE *fp = fopen("cf_test.out", "w");
22528         if (fp != 0) {
22529                 bool x = true;
22530                 if ((bool)(-x) >= 0)
22531                         fputs("unsigned ", fp);
22532                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22533                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22534                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22535                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22536                 fclose(fp);
22537         }
22538         ${cf_cv_main_return:-return}(0);
22539 }
22540
22541 _ACEOF
22542 rm -f conftest$ac_exeext
22543 if { (eval echo "$as_me:22543: \"$ac_link\"") >&5
22544   (eval $ac_link) 2>&5
22545   ac_status=$?
22546   echo "$as_me:22546: \$? = $ac_status" >&5
22547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22548   { (eval echo "$as_me:22548: \"$ac_try\"") >&5
22549   (eval $ac_try) 2>&5
22550   ac_status=$?
22551   echo "$as_me:22551: \$? = $ac_status" >&5
22552   (exit $ac_status); }; }; then
22553   cf_cv_type_of_bool=`cat cf_test.out`
22554                  if test -z "$cf_cv_type_of_bool"; then
22555                    cf_cv_type_of_bool=unknown
22556                  fi
22557 else
22558   echo "$as_me: program exited with status $ac_status" >&5
22559 echo "$as_me: failed program was:" >&5
22560 cat conftest.$ac_ext >&5
22561 cf_cv_type_of_bool=unknown
22562 fi
22563 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22564 fi
22565
22566 fi
22567
22568         rm -f cf_test.out
22569 echo "$as_me:22569: result: $cf_cv_type_of_bool" >&5
22570 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22571 if test "$cf_cv_type_of_bool" = unknown ; then
22572         case .$NCURSES_BOOL in
22573         (.auto|.) NCURSES_BOOL=unsigned;;
22574         esac
22575         { echo "$as_me:22575: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22576 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22577         cf_cv_type_of_bool=$NCURSES_BOOL
22578 fi
22579
22580 echo "$as_me:22580: checking for special defines needed for etip.h" >&5
22581 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
22582 cf_save_CXXFLAGS="$CXXFLAGS"
22583 cf_result="none"
22584
22585 # etip.h includes ncurses.h which includes ncurses_dll.h
22586 # But ncurses_dll.h is generated - fix here.
22587 test -d include || mkdir include
22588 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
22589
22590 for cf_math in "" MATH_H
22591 do
22592 for cf_excp in "" MATH_EXCEPTION
22593 do
22594         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
22595         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
22596         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
22597 cat >conftest.$ac_ext <<_ACEOF
22598 #line 22598 "configure"
22599 #include "confdefs.h"
22600
22601 #include <etip.h.in>
22602
22603 int
22604 main (void)
22605 {
22606
22607   ;
22608   return 0;
22609 }
22610 _ACEOF
22611 rm -f conftest.$ac_objext
22612 if { (eval echo "$as_me:22612: \"$ac_compile\"") >&5
22613   (eval $ac_compile) 2>&5
22614   ac_status=$?
22615   echo "$as_me:22615: \$? = $ac_status" >&5
22616   (exit $ac_status); } &&
22617          { ac_try='test -s conftest.$ac_objext'
22618   { (eval echo "$as_me:22618: \"$ac_try\"") >&5
22619   (eval $ac_try) 2>&5
22620   ac_status=$?
22621   echo "$as_me:22621: \$? = $ac_status" >&5
22622   (exit $ac_status); }; }; then
22623
22624         test -n "$cf_math" && cat >>confdefs.h <<EOF
22625 #define ETIP_NEEDS_${cf_math} 1
22626 EOF
22627
22628         test -n "$cf_excp" && cat >>confdefs.h <<EOF
22629 #define ETIP_NEEDS_${cf_excp} 1
22630 EOF
22631
22632         cf_result="$cf_math $cf_excp"
22633         break 2
22634
22635 else
22636   echo "$as_me: failed program was:" >&5
22637 cat conftest.$ac_ext >&5
22638 fi
22639 rm -f conftest.$ac_objext conftest.$ac_ext
22640 done
22641 done
22642 echo "$as_me:22642: result: $cf_result" >&5
22643 echo "${ECHO_T}$cf_result" >&6
22644 CXXFLAGS="$cf_save_CXXFLAGS"
22645
22646 if test -n "$CXX"; then
22647 echo "$as_me:22647: checking if $CXX accepts parameter initialization" >&5
22648 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
22649 if test "${cf_cv_cpp_param_init+set}" = set; then
22650   echo $ECHO_N "(cached) $ECHO_C" >&6
22651 else
22652
22653         ac_ext=cc
22654 ac_cpp='$CXXCPP $CPPFLAGS'
22655 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22656 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22657 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22658 ac_main_return=return
22659
22660         if test "$cross_compiling" = yes; then
22661   cf_cv_cpp_param_init=unknown
22662 else
22663   cat >conftest.$ac_ext <<_ACEOF
22664 #line 22664 "configure"
22665 #include "confdefs.h"
22666
22667 class TEST {
22668 private:
22669         int value;
22670 public:
22671         TEST(int x = 1);
22672         ~TEST();
22673 };
22674
22675 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22676 {
22677         value = x;
22678 }
22679 int main(void) { }
22680
22681 _ACEOF
22682 rm -f conftest$ac_exeext
22683 if { (eval echo "$as_me:22683: \"$ac_link\"") >&5
22684   (eval $ac_link) 2>&5
22685   ac_status=$?
22686   echo "$as_me:22686: \$? = $ac_status" >&5
22687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22688   { (eval echo "$as_me:22688: \"$ac_try\"") >&5
22689   (eval $ac_try) 2>&5
22690   ac_status=$?
22691   echo "$as_me:22691: \$? = $ac_status" >&5
22692   (exit $ac_status); }; }; then
22693   cf_cv_cpp_param_init=yes
22694 else
22695   echo "$as_me: program exited with status $ac_status" >&5
22696 echo "$as_me: failed program was:" >&5
22697 cat conftest.$ac_ext >&5
22698 cf_cv_cpp_param_init=no
22699 fi
22700 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22701 fi
22702         ac_ext=cc
22703 ac_cpp='$CXXCPP $CPPFLAGS'
22704 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22705 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22706 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22707 ac_main_return=return
22708
22709 fi
22710 echo "$as_me:22710: result: $cf_cv_cpp_param_init" >&5
22711 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22712 fi
22713 test "$cf_cv_cpp_param_init" = yes &&
22714 cat >>confdefs.h <<\EOF
22715 #define CPP_HAS_PARAM_INIT 1
22716 EOF
22717
22718 if test -n "$CXX"; then
22719
22720 echo "$as_me:22720: checking if $CXX accepts static_cast" >&5
22721 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22722 if test "${cf_cv_cpp_static_cast+set}" = set; then
22723   echo $ECHO_N "(cached) $ECHO_C" >&6
22724 else
22725
22726         ac_ext=cc
22727 ac_cpp='$CXXCPP $CPPFLAGS'
22728 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22729 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22730 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22731 ac_main_return=return
22732
22733         cat >conftest.$ac_ext <<_ACEOF
22734 #line 22734 "configure"
22735 #include "confdefs.h"
22736
22737 class NCursesPanel
22738 {
22739 public:
22740   NCursesPanel(int nlines,
22741                int ncols,
22742                int begin_y = 0,
22743                int begin_x = 0)
22744   {
22745   }
22746   NCursesPanel();
22747   ~NCursesPanel();
22748 };
22749
22750 template<class T> class NCursesUserPanel : public NCursesPanel
22751 {
22752 public:
22753   NCursesUserPanel (int nlines,
22754                     int ncols,
22755                     int begin_y = 0,
22756                     int begin_x = 0,
22757                     const T* p_UserData = static_cast<T*>(0))
22758     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22759   {
22760   };
22761   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22762   {
22763   };
22764
22765   virtual ~NCursesUserPanel() {};
22766 };
22767
22768 int
22769 main (void)
22770 {
22771
22772         const char* p_UserData = static_cast<char*>(0)
22773   ;
22774   return 0;
22775 }
22776 _ACEOF
22777 rm -f conftest.$ac_objext
22778 if { (eval echo "$as_me:22778: \"$ac_compile\"") >&5
22779   (eval $ac_compile) 2>&5
22780   ac_status=$?
22781   echo "$as_me:22781: \$? = $ac_status" >&5
22782   (exit $ac_status); } &&
22783          { ac_try='test -s conftest.$ac_objext'
22784   { (eval echo "$as_me:22784: \"$ac_try\"") >&5
22785   (eval $ac_try) 2>&5
22786   ac_status=$?
22787   echo "$as_me:22787: \$? = $ac_status" >&5
22788   (exit $ac_status); }; }; then
22789   cf_cv_cpp_static_cast=yes
22790 else
22791   echo "$as_me: failed program was:" >&5
22792 cat conftest.$ac_ext >&5
22793 cf_cv_cpp_static_cast=no
22794 fi
22795 rm -f conftest.$ac_objext conftest.$ac_ext
22796
22797         ac_ext=cc
22798 ac_cpp='$CXXCPP $CPPFLAGS'
22799 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22800 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22801 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22802 ac_main_return=return
22803
22804 fi
22805 echo "$as_me:22805: result: $cf_cv_cpp_static_cast" >&5
22806 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
22807
22808 fi
22809
22810 test "$cf_cv_cpp_static_cast" = yes &&
22811 cat >>confdefs.h <<\EOF
22812 #define CPP_HAS_STATIC_CAST 1
22813 EOF
22814
22815         CXX_AR='$(AR)'
22816         CXX_ARFLAGS='$(ARFLAGS)'
22817         case $cf_cv_system_name in
22818         (irix*)
22819             if test "$GXX" != yes ; then
22820                 CXX_AR='$(CXX)'
22821                 CXX_ARFLAGS='-ar -o'
22822             fi
22823             ;;
22824         (sco3.2v5*)
22825             CXXLDFLAGS="-u main"
22826             ;;
22827         (solaris2*)
22828             if test "$GXX" != yes ; then
22829                 CXX_AR='$(CXX)'
22830                 CXX_ARFLAGS='-xar -o'
22831             fi
22832             ;;
22833         esac
22834
22835 else
22836         cf_cxx_library=no
22837         cf_cv_builtin_bool=1
22838
22839         # Just because we are not configuring against C++ right now does not
22840         # mean that a user will not want to use C++.  Some distributors disable
22841         # the C++ portion of this configuration as a shortcut (or just to avoid
22842         # compiling the demo in the c++ directory).  So we need a reasonable
22843         # default for the 'bool' type.
22844         #
22845         # Caveat: since the storage of the bool type is not standardized, it
22846         # may change.
22847
22848         if test "$NCURSES_BOOL" != auto ; then
22849                 cf_cv_type_of_bool=$NCURSES_BOOL
22850                 cf_cv_header_stdbool_h=0
22851         else
22852                 if test "$cf_cv_header_stdbool_h" = 1 ; then
22853
22854 echo "$as_me:22854: checking for size of bool" >&5
22855 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22856 if test "${cf_cv_type_of_bool+set}" = set; then
22857   echo $ECHO_N "(cached) $ECHO_C" >&6
22858 else
22859
22860         rm -f cf_test.out
22861         if test "$cross_compiling" = yes; then
22862   cf_cv_type_of_bool=unknown
22863 else
22864   cat >conftest.$ac_ext <<_ACEOF
22865 #line 22865 "configure"
22866 #include "confdefs.h"
22867
22868 #include <stdlib.h>
22869 #include <stdio.h>
22870
22871 #if defined(__cplusplus)
22872
22873 #ifdef HAVE_GXX_BUILTIN_H
22874 #include <g++/builtin.h>
22875 #elif HAVE_GPP_BUILTIN_H
22876 #include <gpp/builtin.h>
22877 #elif HAVE_BUILTIN_H
22878 #include <builtin.h>
22879 #endif
22880
22881 #else
22882
22883 #if $cf_cv_header_stdbool_h
22884 #include <stdbool.h>
22885 #endif
22886
22887 #endif
22888
22889 int main(void)
22890 {
22891         FILE *fp = fopen("cf_test.out", "w");
22892         if (fp != 0) {
22893                 bool x = true;
22894                 if ((bool)(-x) >= 0)
22895                         fputs("unsigned ", fp);
22896                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22897                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22898                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22899                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22900                 fclose(fp);
22901         }
22902         ${cf_cv_main_return:-return}(0);
22903 }
22904
22905 _ACEOF
22906 rm -f conftest$ac_exeext
22907 if { (eval echo "$as_me:22907: \"$ac_link\"") >&5
22908   (eval $ac_link) 2>&5
22909   ac_status=$?
22910   echo "$as_me:22910: \$? = $ac_status" >&5
22911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22912   { (eval echo "$as_me:22912: \"$ac_try\"") >&5
22913   (eval $ac_try) 2>&5
22914   ac_status=$?
22915   echo "$as_me:22915: \$? = $ac_status" >&5
22916   (exit $ac_status); }; }; then
22917   cf_cv_type_of_bool=`cat cf_test.out`
22918                  if test -z "$cf_cv_type_of_bool"; then
22919                    cf_cv_type_of_bool=unknown
22920                  fi
22921 else
22922   echo "$as_me: program exited with status $ac_status" >&5
22923 echo "$as_me: failed program was:" >&5
22924 cat conftest.$ac_ext >&5
22925 cf_cv_type_of_bool=unknown
22926 fi
22927 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22928 fi
22929
22930 fi
22931
22932         rm -f cf_test.out
22933 echo "$as_me:22933: result: $cf_cv_type_of_bool" >&5
22934 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22935 if test "$cf_cv_type_of_bool" = unknown ; then
22936         case .$NCURSES_BOOL in
22937         (.auto|.) NCURSES_BOOL=unsigned;;
22938         esac
22939         { echo "$as_me:22939: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22940 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22941         cf_cv_type_of_bool=$NCURSES_BOOL
22942 fi
22943
22944                 else
22945                         echo "$as_me:22945: checking for fallback type of bool" >&5
22946 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
22947                         case "$host_cpu" in
22948                         (i?86)  cf_cv_type_of_bool=char ;;
22949                         (*)     cf_cv_type_of_bool=int  ;;
22950                         esac
22951                         echo "$as_me:22951: result: $cf_cv_type_of_bool" >&5
22952 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22953                 fi
22954         fi
22955 fi
22956
22957 # If the C compiler did not declare bool, and we did not determine that the C++
22958 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
22959 # ncurses library use the same type as C++ bool.  Note that this allows one to
22960 # specify the type of bool in a configure-script option and postpone
22961 # integration with the C++ compiler provided that the types are compatible.
22962 USE_CXX_BOOL=1
22963 if test $cf_cv_cc_bool_type = 1
22964 then
22965         # oops: C has a bool.  Unlikely, but C++ could differ.
22966         USE_CXX_BOOL=0
22967 elif test $cf_cv_builtin_bool = 0
22968 then
22969         # C++ has no bool
22970         USE_CXX_BOOL=0
22971 else
22972         # this is the normal case
22973         USE_CXX_BOOL='defined(__cplusplus)'
22974 fi
22975
22976 if test -f "${srcdir}/Ada95/Makefile.in" ; then
22977
22978         if test "$cf_with_ada" != "no" ; then
22979                 if test "$with_libtool" != "no"; then
22980                         { echo "$as_me:22980: WARNING: libtool does not support Ada - disabling feature" >&5
22981 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
22982                         cf_with_ada=no
22983                 fi
22984         fi
22985
22986         if test "$cf_with_ada" != "no" ; then
22987
22988 cf_ada_make=gnatmake
22989 cf_ada_config="#"
22990 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
22991 set dummy $cf_ada_make; ac_word=$2
22992 echo "$as_me:22992: checking for $ac_word" >&5
22993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22994 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
22995   echo $ECHO_N "(cached) $ECHO_C" >&6
22996 else
22997   if test -n "$gnatmake_exists"; then
22998   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
22999 else
23000   ac_save_IFS=$IFS; IFS=$ac_path_separator
23001 ac_dummy="$PATH"
23002 for ac_dir in $ac_dummy; do
23003   IFS=$ac_save_IFS
23004   test -z "$ac_dir" && ac_dir=.
23005   $as_executable_p "$ac_dir/$ac_word" || continue
23006 ac_cv_prog_gnatmake_exists="yes"
23007 echo "$as_me:23007: found $ac_dir/$ac_word" >&5
23008 break
23009 done
23010
23011   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
23012 fi
23013 fi
23014 gnatmake_exists=$ac_cv_prog_gnatmake_exists
23015 if test -n "$gnatmake_exists"; then
23016   echo "$as_me:23016: result: $gnatmake_exists" >&5
23017 echo "${ECHO_T}$gnatmake_exists" >&6
23018 else
23019   echo "$as_me:23019: result: no" >&5
23020 echo "${ECHO_T}no" >&6
23021 fi
23022
23023 if test "$ac_cv_prog_gnatmake_exists" = no; then
23024         cf_ada_make=
23025         cf_cv_prog_gnat_correct=no
23026 else
23027         # Extract the first word of "gprconfig", so it can be a program name with args.
23028 set dummy gprconfig; ac_word=$2
23029 echo "$as_me:23029: checking for $ac_word" >&5
23030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23031 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
23032   echo $ECHO_N "(cached) $ECHO_C" >&6
23033 else
23034   if test -n "$gprconfig_exists"; then
23035   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
23036 else
23037   ac_save_IFS=$IFS; IFS=$ac_path_separator
23038 ac_dummy="$PATH"
23039 for ac_dir in $ac_dummy; do
23040   IFS=$ac_save_IFS
23041   test -z "$ac_dir" && ac_dir=.
23042   $as_executable_p "$ac_dir/$ac_word" || continue
23043 ac_cv_prog_gprconfig_exists="yes"
23044 echo "$as_me:23044: found $ac_dir/$ac_word" >&5
23045 break
23046 done
23047
23048   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
23049 fi
23050 fi
23051 gprconfig_exists=$ac_cv_prog_gprconfig_exists
23052 if test -n "$gprconfig_exists"; then
23053   echo "$as_me:23053: result: $gprconfig_exists" >&5
23054 echo "${ECHO_T}$gprconfig_exists" >&6
23055 else
23056   echo "$as_me:23056: result: no" >&5
23057 echo "${ECHO_T}no" >&6
23058 fi
23059
23060         if test "$ac_cv_prog_gprconfig_exists" = yes
23061         then
23062                 rm -rf conftest* *~conftest*
23063                 if mkdir conftest.src
23064                 then
23065                         cf_ada_config=""
23066                         cd conftest.src
23067                         for cf_gprconfig in Ada C
23068                         do
23069                                 echo "$as_me:23069: checking for gprconfig name for $cf_gprconfig" >&5
23070 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
23071                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23072                                 if test -n "$cf_gprconfig_value"
23073                                 then
23074                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
23075                                         echo "$as_me:23075: result: $cf_gprconfig_value" >&5
23076 echo "${ECHO_T}$cf_gprconfig_value" >&6
23077                                 else
23078                                         echo "$as_me:23078: result: missing" >&5
23079 echo "${ECHO_T}missing" >&6
23080                                         cf_ada_config="#"
23081                                         break
23082                                 fi
23083                         done
23084                         cd ..
23085                         rm -rf conftest* *~conftest*
23086                 fi
23087         else
23088                 # gprconfig is newer than gnatmake; we can continue...
23089                 cf_ada_config="##"
23090         fi
23091         if test "x$cf_ada_config" != "x#"
23092         then
23093
23094 echo "$as_me:23094: checking for gnat version" >&5
23095 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
23096 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
23097         grep '[0-9].[0-9][0-9]*' |\
23098         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
23099 echo "$as_me:23099: result: $cf_gnat_version" >&5
23100 echo "${ECHO_T}$cf_gnat_version" >&6
23101
23102 case $cf_gnat_version in
23103 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
23104         cf_cv_prog_gnat_correct=yes
23105         ;;
23106 (*)
23107         { echo "$as_me:23107: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
23108 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
23109         cf_cv_prog_gnat_correct=no
23110         ;;
23111 esac
23112
23113                 # Extract the first word of "m4", so it can be a program name with args.
23114 set dummy m4; ac_word=$2
23115 echo "$as_me:23115: checking for $ac_word" >&5
23116 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23117 if test "${ac_cv_prog_M4_exists+set}" = set; then
23118   echo $ECHO_N "(cached) $ECHO_C" >&6
23119 else
23120   if test -n "$M4_exists"; then
23121   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
23122 else
23123   ac_save_IFS=$IFS; IFS=$ac_path_separator
23124 ac_dummy="$PATH"
23125 for ac_dir in $ac_dummy; do
23126   IFS=$ac_save_IFS
23127   test -z "$ac_dir" && ac_dir=.
23128   $as_executable_p "$ac_dir/$ac_word" || continue
23129 ac_cv_prog_M4_exists="yes"
23130 echo "$as_me:23130: found $ac_dir/$ac_word" >&5
23131 break
23132 done
23133
23134   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
23135 fi
23136 fi
23137 M4_exists=$ac_cv_prog_M4_exists
23138 if test -n "$M4_exists"; then
23139   echo "$as_me:23139: result: $M4_exists" >&5
23140 echo "${ECHO_T}$M4_exists" >&6
23141 else
23142   echo "$as_me:23142: result: no" >&5
23143 echo "${ECHO_T}no" >&6
23144 fi
23145
23146                 if test "$ac_cv_prog_M4_exists" = no; then
23147                         cf_cv_prog_gnat_correct=no
23148                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
23149                 fi
23150                 if test "$cf_cv_prog_gnat_correct" = yes; then
23151                         echo "$as_me:23151: checking if GNAT works" >&5
23152 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
23153
23154 rm -rf conftest* *~conftest*
23155 cat >>conftest.ads <<CF_EOF
23156 procedure conftest;
23157 CF_EOF
23158 cat >>conftest.adb <<CF_EOF
23159 with Text_IO;
23160 with GNAT.OS_Lib;
23161 procedure conftest is
23162 begin
23163    Text_IO.Put ("Hello World");
23164    Text_IO.New_Line;
23165    GNAT.OS_Lib.OS_Exit (0);
23166 end conftest;
23167 CF_EOF
23168 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23169    if ( ./conftest 1>&5 2>&1 ) ; then
23170       cf_cv_prog_gnat_correct=yes
23171    else
23172       cf_cv_prog_gnat_correct=no
23173    fi
23174 else
23175    cf_cv_prog_gnat_correct=no
23176 fi
23177 rm -rf conftest* *~conftest*
23178
23179                         echo "$as_me:23179: result: $cf_cv_prog_gnat_correct" >&5
23180 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
23181                 fi
23182         else
23183                 cf_cv_prog_gnat_correct=no
23184         fi
23185 fi
23186
23187                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
23188
23189         ADAFLAGS="$ADAFLAGS -gnatpn"
23190
23191         echo "$as_me:23191: checking optimization options for ADAFLAGS" >&5
23192 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
23193         case "$CFLAGS" in
23194         (*-g*)
23195
23196         ADAFLAGS="$ADAFLAGS -g"
23197
23198                 ;;
23199         esac
23200         case "$CFLAGS" in
23201         (*-O*)
23202                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
23203
23204         ADAFLAGS="$ADAFLAGS $cf_O_flag"
23205
23206                 ;;
23207         esac
23208         echo "$as_me:23208: result: $ADAFLAGS" >&5
23209 echo "${ECHO_T}$ADAFLAGS" >&6
23210
23211 echo "$as_me:23211: checking if GNATPREP supports -T option" >&5
23212 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
23213 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
23214   echo $ECHO_N "(cached) $ECHO_C" >&6
23215 else
23216
23217 cf_cv_gnatprep_opt_t=no
23218 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
23219
23220 fi
23221 echo "$as_me:23221: result: $cf_cv_gnatprep_opt_t" >&5
23222 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
23223 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
23224
23225 echo "$as_me:23225: checking if GNAT supports generics" >&5
23226 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
23227 case $cf_gnat_version in
23228 (3.[1-9]*|[4-9].*)
23229         cf_gnat_generics=yes
23230         ;;
23231 (*)
23232         cf_gnat_generics=no
23233         ;;
23234 esac
23235 echo "$as_me:23235: result: $cf_gnat_generics" >&5
23236 echo "${ECHO_T}$cf_gnat_generics" >&6
23237
23238 if test "$cf_gnat_generics" = yes
23239 then
23240         cf_compile_generics=generics
23241         cf_generic_objects="\${GENOBJS}"
23242 else
23243         cf_compile_generics=
23244         cf_generic_objects=
23245 fi
23246
23247 echo "$as_me:23247: checking if GNAT supports SIGINT" >&5
23248 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
23249 if test "${cf_cv_gnat_sigint+set}" = set; then
23250   echo $ECHO_N "(cached) $ECHO_C" >&6
23251 else
23252
23253 rm -rf conftest* *~conftest*
23254 cat >>conftest.ads <<CF_EOF
23255 with Ada.Interrupts.Names;
23256
23257 package ConfTest is
23258
23259    pragma Warnings (Off);  --  the next pragma exists since 3.11p
23260    pragma Unreserve_All_Interrupts;
23261    pragma Warnings (On);
23262
23263    protected Process is
23264       procedure Stop;
23265       function Continue return Boolean;
23266       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
23267    private
23268       Done : Boolean := False;
23269    end Process;
23270
23271 end ConfTest;
23272 CF_EOF
23273 cat >>conftest.adb <<CF_EOF
23274 package body ConfTest is
23275    protected body Process is
23276       procedure Stop is
23277       begin
23278          Done := True;
23279       end Stop;
23280       function Continue return Boolean is
23281       begin
23282          return not Done;
23283       end Continue;
23284    end Process;
23285 end ConfTest;
23286 CF_EOF
23287 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23288       cf_cv_gnat_sigint=yes
23289 else
23290    cf_cv_gnat_sigint=no
23291 fi
23292 rm -rf conftest* *~conftest*
23293
23294 fi
23295 echo "$as_me:23295: result: $cf_cv_gnat_sigint" >&5
23296 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
23297
23298 if test $cf_cv_gnat_sigint = yes ; then
23299         USE_GNAT_SIGINT=""
23300 else
23301         USE_GNAT_SIGINT="#"
23302 fi
23303
23304 cf_gnat_libraries=no
23305 cf_gnat_projects=no
23306
23307 if test "$enable_gnat_projects" != no ; then
23308 echo "$as_me:23308: checking if GNAT supports project files" >&5
23309 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
23310 case $cf_gnat_version in
23311 (3.[0-9]*)
23312         ;;
23313 (*)
23314         case $cf_cv_system_name in
23315         (cygwin*|msys*)
23316                 ;;
23317         (*)
23318                 rm -rf conftest* *~conftest*
23319                 if mkdir conftest.src conftest.bin conftest.lib
23320                 then
23321                         cd conftest.src
23322                         rm -rf conftest* *~conftest*
23323                         cat >>library.gpr <<CF_EOF
23324 project Library is
23325   Kind := External ("LIB_KIND");
23326   for Library_Name use "ConfTest";
23327   for Object_Dir use ".";
23328   for Library_ALI_Dir use External("LIBRARY_DIR");
23329   for Library_Version use External ("SONAME");
23330   for Library_Kind use Kind;
23331   for Library_Dir use External("BUILD_DIR");
23332   Source_Dir := External ("SOURCE_DIR");
23333   for Source_Dirs use (Source_Dir);
23334 end Library;
23335 CF_EOF
23336                         cat >>confpackage.ads <<CF_EOF
23337 package ConfPackage is
23338    procedure conftest;
23339 end ConfPackage;
23340 CF_EOF
23341                         cat >>confpackage.adb <<CF_EOF
23342 with Text_IO;
23343 package body ConfPackage is
23344    procedure conftest is
23345    begin
23346       Text_IO.Put ("Hello World");
23347       Text_IO.New_Line;
23348    end conftest;
23349 end ConfPackage;
23350 CF_EOF
23351                         if ( $cf_ada_make $ADAFLAGS \
23352                                         -Plibrary.gpr \
23353                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
23354                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
23355                                         -XSOURCE_DIR=`pwd` \
23356                                         -XSONAME=libConfTest.so.1 \
23357                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
23358                                 cf_gnat_projects=yes
23359                         fi
23360                         cd ..
23361                 fi
23362                 if test -f conftest.lib/confpackage.ali
23363                 then
23364                         cf_gnat_libraries=yes
23365                 fi
23366                 rm -rf conftest* *~conftest*
23367                 ;;
23368         esac
23369         ;;
23370 esac
23371 echo "$as_me:23371: result: $cf_gnat_projects" >&5
23372 echo "${ECHO_T}$cf_gnat_projects" >&6
23373 fi # enable_gnat_projects
23374
23375 if test $cf_gnat_projects = yes
23376 then
23377         echo "$as_me:23377: checking if GNAT supports libraries" >&5
23378 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
23379         echo "$as_me:23379: result: $cf_gnat_libraries" >&5
23380 echo "${ECHO_T}$cf_gnat_libraries" >&6
23381 fi
23382
23383 if test "$cf_gnat_projects" = yes
23384 then
23385         USE_OLD_MAKERULES="#"
23386         USE_GNAT_PROJECTS=""
23387 else
23388         USE_OLD_MAKERULES=""
23389         USE_GNAT_PROJECTS="#"
23390 fi
23391
23392 if test "$cf_gnat_libraries" = yes
23393 then
23394         USE_GNAT_LIBRARIES=""
23395 else
23396         USE_GNAT_LIBRARIES="#"
23397 fi
23398
23399 echo "$as_me:23399: checking for ada-compiler" >&5
23400 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
23401
23402 # Check whether --with-ada-compiler or --without-ada-compiler was given.
23403 if test "${with_ada_compiler+set}" = set; then
23404   withval="$with_ada_compiler"
23405   cf_ada_compiler=$withval
23406 else
23407   cf_ada_compiler=gnatmake
23408 fi;
23409
23410 echo "$as_me:23410: result: $cf_ada_compiler" >&5
23411 echo "${ECHO_T}$cf_ada_compiler" >&6
23412
23413                         cf_ada_package=terminal_interface
23414
23415 echo "$as_me:23415: checking for ada-include" >&5
23416 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
23417
23418 # Check whether --with-ada-include or --without-ada-include was given.
23419 if test "${with_ada_include+set}" = set; then
23420   withval="$with_ada_include"
23421
23422 else
23423   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
23424 fi; if test -n "$prefix/share/ada/adainclude" ; then
23425
23426 if test "x$prefix" != xNONE; then
23427         cf_path_syntax="$prefix"
23428 else
23429         cf_path_syntax="$ac_default_prefix"
23430 fi
23431
23432 case ".$withval" in
23433 (.\$\(*\)*|.\'*\'*)
23434         ;;
23435 (..|./*|.\\*)
23436         ;;
23437 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23438         ;;
23439 (.\${*prefix}*|.\${*dir}*)
23440         eval withval="$withval"
23441         case ".$withval" in
23442         (.NONE/*)
23443                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23444                 ;;
23445         esac
23446         ;;
23447 (.no|.NONE/*)
23448         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23449         ;;
23450 (*)
23451         { { echo "$as_me:23451: error: expected a pathname, not \"$withval\"" >&5
23452 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23453    { (exit 1); exit 1; }; }
23454         ;;
23455 esac
23456
23457 fi
23458 eval ADA_INCLUDE="$withval"
23459
23460 echo "$as_me:23460: result: $ADA_INCLUDE" >&5
23461 echo "${ECHO_T}$ADA_INCLUDE" >&6
23462
23463 echo "$as_me:23463: checking for ada-objects" >&5
23464 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
23465
23466 # Check whether --with-ada-objects or --without-ada-objects was given.
23467 if test "${with_ada_objects+set}" = set; then
23468   withval="$with_ada_objects"
23469
23470 else
23471   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
23472 fi; if test -n "$prefix/lib/ada/adalib" ; then
23473
23474 if test "x$prefix" != xNONE; then
23475         cf_path_syntax="$prefix"
23476 else
23477         cf_path_syntax="$ac_default_prefix"
23478 fi
23479
23480 case ".$withval" in
23481 (.\$\(*\)*|.\'*\'*)
23482         ;;
23483 (..|./*|.\\*)
23484         ;;
23485 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23486         ;;
23487 (.\${*prefix}*|.\${*dir}*)
23488         eval withval="$withval"
23489         case ".$withval" in
23490         (.NONE/*)
23491                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23492                 ;;
23493         esac
23494         ;;
23495 (.no|.NONE/*)
23496         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23497         ;;
23498 (*)
23499         { { echo "$as_me:23499: error: expected a pathname, not \"$withval\"" >&5
23500 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23501    { (exit 1); exit 1; }; }
23502         ;;
23503 esac
23504
23505 fi
23506 eval ADA_OBJECTS="$withval"
23507
23508 echo "$as_me:23508: result: $ADA_OBJECTS" >&5
23509 echo "${ECHO_T}$ADA_OBJECTS" >&6
23510
23511 echo "$as_me:23511: checking if an Ada95 shared-library should be built" >&5
23512 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
23513
23514 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
23515 if test "${with_ada_sharedlib+set}" = set; then
23516   withval="$with_ada_sharedlib"
23517   with_ada_sharedlib=$withval
23518 else
23519   with_ada_sharedlib=no
23520 fi;
23521 echo "$as_me:23521: result: $with_ada_sharedlib" >&5
23522 echo "${ECHO_T}$with_ada_sharedlib" >&6
23523
23524 if test "x$with_ada_sharedlib" != xno
23525 then
23526         if test "x$cf_gnat_projects" != xyes
23527         then
23528                 { echo "$as_me:23528: WARNING: disabling shared-library since GNAT projects are not supported" >&5
23529 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
23530                 with_ada_sharedlib=no
23531         fi
23532 fi
23533
23534 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
23535 MAKE_ADA_SHAREDLIB="#"
23536
23537 if test "x$with_ada_sharedlib" != xno
23538 then
23539         MAKE_ADA_SHAREDLIB=
23540         if test "x$with_ada_sharedlib" != xyes
23541         then
23542                 ADA_SHAREDLIB="$with_ada_sharedlib"
23543         fi
23544 fi
23545
23546                 fi
23547         fi
23548 else
23549         cf_with_ada=no
23550 fi
23551
23552 # do this "late" to avoid conflict with header-checks
23553 if test "x$with_widec" = xyes ; then
23554         echo "$as_me:23554: checking for wchar_t" >&5
23555 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
23556 if test "${ac_cv_type_wchar_t+set}" = set; then
23557   echo $ECHO_N "(cached) $ECHO_C" >&6
23558 else
23559   cat >conftest.$ac_ext <<_ACEOF
23560 #line 23560 "configure"
23561 #include "confdefs.h"
23562 $ac_includes_default
23563 int
23564 main (void)
23565 {
23566 if ((wchar_t *) 0)
23567   return 0;
23568 if (sizeof (wchar_t))
23569   return 0;
23570   ;
23571   return 0;
23572 }
23573 _ACEOF
23574 rm -f conftest.$ac_objext
23575 if { (eval echo "$as_me:23575: \"$ac_compile\"") >&5
23576   (eval $ac_compile) 2>&5
23577   ac_status=$?
23578   echo "$as_me:23578: \$? = $ac_status" >&5
23579   (exit $ac_status); } &&
23580          { ac_try='test -s conftest.$ac_objext'
23581   { (eval echo "$as_me:23581: \"$ac_try\"") >&5
23582   (eval $ac_try) 2>&5
23583   ac_status=$?
23584   echo "$as_me:23584: \$? = $ac_status" >&5
23585   (exit $ac_status); }; }; then
23586   ac_cv_type_wchar_t=yes
23587 else
23588   echo "$as_me: failed program was:" >&5
23589 cat conftest.$ac_ext >&5
23590 ac_cv_type_wchar_t=no
23591 fi
23592 rm -f conftest.$ac_objext conftest.$ac_ext
23593 fi
23594 echo "$as_me:23594: result: $ac_cv_type_wchar_t" >&5
23595 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
23596
23597 echo "$as_me:23597: checking size of wchar_t" >&5
23598 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
23599 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
23600   echo $ECHO_N "(cached) $ECHO_C" >&6
23601 else
23602   if test "$ac_cv_type_wchar_t" = yes; then
23603   if test "$cross_compiling" = yes; then
23604   # Depending upon the size, compute the lo and hi bounds.
23605 cat >conftest.$ac_ext <<_ACEOF
23606 #line 23606 "configure"
23607 #include "confdefs.h"
23608 $ac_includes_default
23609 int
23610 main (void)
23611 {
23612 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
23613   ;
23614   return 0;
23615 }
23616 _ACEOF
23617 rm -f conftest.$ac_objext
23618 if { (eval echo "$as_me:23618: \"$ac_compile\"") >&5
23619   (eval $ac_compile) 2>&5
23620   ac_status=$?
23621   echo "$as_me:23621: \$? = $ac_status" >&5
23622   (exit $ac_status); } &&
23623          { ac_try='test -s conftest.$ac_objext'
23624   { (eval echo "$as_me:23624: \"$ac_try\"") >&5
23625   (eval $ac_try) 2>&5
23626   ac_status=$?
23627   echo "$as_me:23627: \$? = $ac_status" >&5
23628   (exit $ac_status); }; }; then
23629   ac_lo=0 ac_mid=0
23630   while :; do
23631     cat >conftest.$ac_ext <<_ACEOF
23632 #line 23632 "configure"
23633 #include "confdefs.h"
23634 $ac_includes_default
23635 int
23636 main (void)
23637 {
23638 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23639   ;
23640   return 0;
23641 }
23642 _ACEOF
23643 rm -f conftest.$ac_objext
23644 if { (eval echo "$as_me:23644: \"$ac_compile\"") >&5
23645   (eval $ac_compile) 2>&5
23646   ac_status=$?
23647   echo "$as_me:23647: \$? = $ac_status" >&5
23648   (exit $ac_status); } &&
23649          { ac_try='test -s conftest.$ac_objext'
23650   { (eval echo "$as_me:23650: \"$ac_try\"") >&5
23651   (eval $ac_try) 2>&5
23652   ac_status=$?
23653   echo "$as_me:23653: \$? = $ac_status" >&5
23654   (exit $ac_status); }; }; then
23655   ac_hi=$ac_mid; break
23656 else
23657   echo "$as_me: failed program was:" >&5
23658 cat conftest.$ac_ext >&5
23659 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
23660 fi
23661 rm -f conftest.$ac_objext conftest.$ac_ext
23662   done
23663 else
23664   echo "$as_me: failed program was:" >&5
23665 cat conftest.$ac_ext >&5
23666 ac_hi=-1 ac_mid=-1
23667   while :; do
23668     cat >conftest.$ac_ext <<_ACEOF
23669 #line 23669 "configure"
23670 #include "confdefs.h"
23671 $ac_includes_default
23672 int
23673 main (void)
23674 {
23675 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23676   ;
23677   return 0;
23678 }
23679 _ACEOF
23680 rm -f conftest.$ac_objext
23681 if { (eval echo "$as_me:23681: \"$ac_compile\"") >&5
23682   (eval $ac_compile) 2>&5
23683   ac_status=$?
23684   echo "$as_me:23684: \$? = $ac_status" >&5
23685   (exit $ac_status); } &&
23686          { ac_try='test -s conftest.$ac_objext'
23687   { (eval echo "$as_me:23687: \"$ac_try\"") >&5
23688   (eval $ac_try) 2>&5
23689   ac_status=$?
23690   echo "$as_me:23690: \$? = $ac_status" >&5
23691   (exit $ac_status); }; }; then
23692   ac_lo=$ac_mid; break
23693 else
23694   echo "$as_me: failed program was:" >&5
23695 cat conftest.$ac_ext >&5
23696 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23697 fi
23698 rm -f conftest.$ac_objext conftest.$ac_ext
23699   done
23700 fi
23701 rm -f conftest.$ac_objext conftest.$ac_ext
23702 # Binary search between lo and hi bounds.
23703 while test "x$ac_lo" != "x$ac_hi"; do
23704   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23705   cat >conftest.$ac_ext <<_ACEOF
23706 #line 23706 "configure"
23707 #include "confdefs.h"
23708 $ac_includes_default
23709 int
23710 main (void)
23711 {
23712 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23713   ;
23714   return 0;
23715 }
23716 _ACEOF
23717 rm -f conftest.$ac_objext
23718 if { (eval echo "$as_me:23718: \"$ac_compile\"") >&5
23719   (eval $ac_compile) 2>&5
23720   ac_status=$?
23721   echo "$as_me:23721: \$? = $ac_status" >&5
23722   (exit $ac_status); } &&
23723          { ac_try='test -s conftest.$ac_objext'
23724   { (eval echo "$as_me:23724: \"$ac_try\"") >&5
23725   (eval $ac_try) 2>&5
23726   ac_status=$?
23727   echo "$as_me:23727: \$? = $ac_status" >&5
23728   (exit $ac_status); }; }; then
23729   ac_hi=$ac_mid
23730 else
23731   echo "$as_me: failed program was:" >&5
23732 cat conftest.$ac_ext >&5
23733 ac_lo=`expr $ac_mid + 1`
23734 fi
23735 rm -f conftest.$ac_objext conftest.$ac_ext
23736 done
23737 ac_cv_sizeof_wchar_t=$ac_lo
23738 else
23739   if test "$cross_compiling" = yes; then
23740   { { echo "$as_me:23740: error: cannot run test program while cross compiling" >&5
23741 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23742    { (exit 1); exit 1; }; }
23743 else
23744   cat >conftest.$ac_ext <<_ACEOF
23745 #line 23745 "configure"
23746 #include "confdefs.h"
23747 $ac_includes_default
23748 int
23749 main (void)
23750 {
23751 FILE *f = fopen ("conftest.val", "w");
23752 if (!f)
23753   $ac_main_return (1);
23754 fprintf (f, "%d", (sizeof (wchar_t)));
23755 fclose (f);
23756   ;
23757   return 0;
23758 }
23759 _ACEOF
23760 rm -f conftest$ac_exeext
23761 if { (eval echo "$as_me:23761: \"$ac_link\"") >&5
23762   (eval $ac_link) 2>&5
23763   ac_status=$?
23764   echo "$as_me:23764: \$? = $ac_status" >&5
23765   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23766   { (eval echo "$as_me:23766: \"$ac_try\"") >&5
23767   (eval $ac_try) 2>&5
23768   ac_status=$?
23769   echo "$as_me:23769: \$? = $ac_status" >&5
23770   (exit $ac_status); }; }; then
23771   ac_cv_sizeof_wchar_t=`cat conftest.val`
23772 else
23773   echo "$as_me: program exited with status $ac_status" >&5
23774 echo "$as_me: failed program was:" >&5
23775 cat conftest.$ac_ext >&5
23776 fi
23777 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23778 fi
23779 fi
23780 rm -f conftest.val
23781 else
23782   ac_cv_sizeof_wchar_t=0
23783 fi
23784 fi
23785 echo "$as_me:23785: result: $ac_cv_sizeof_wchar_t" >&5
23786 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
23787 cat >>confdefs.h <<EOF
23788 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23789 EOF
23790
23791 fi
23792
23793 ### Construct the ncurses library-subsets, if any, from this set of keywords:
23794 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
23795 ###
23796 ### ticlib modules may be a separate library, otherwise contained in termlib.
23797 ### termlib modules may be a separate library, otherwise contained in ncurses.
23798 ###
23799 ### The of "+" or " " between the tokens controls the way the script
23800 ### chooses to split module lists into libraries.
23801 ###
23802 ### (see CF_LIB_RULES).
23803 echo "$as_me:23803: checking for library subsets" >&5
23804 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
23805 LIB_SUBSETS=
23806
23807 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
23808         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
23809         if test "$with_ticlib" != no ; then
23810                 LIB_SUBSETS="${LIB_SUBSETS} "
23811         else
23812                 LIB_SUBSETS="${LIB_SUBSETS}+"
23813         fi
23814 fi
23815
23816 LIB_SUBSETS="${LIB_SUBSETS}termlib"
23817 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
23818
23819 if test "$with_termlib" != no ; then
23820         LIB_SUBSETS="${LIB_SUBSETS} "
23821 else
23822         LIB_SUBSETS="${LIB_SUBSETS}+"
23823 fi
23824
23825 LIB_SUBSETS="${LIB_SUBSETS}base"
23826
23827 # Most term-driver calls are to tinfo, but some like init_pair are to the
23828 # base library (so it resides in base).
23829 if test "$with_term_driver" != no ; then
23830         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
23831         case $cf_cv_system_name in
23832         (*mingw32*|*mingw64*)
23833                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
23834                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
23835                 ;;
23836         (*)
23837                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
23838                 ;;
23839         esac
23840 fi
23841
23842 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
23843 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
23844
23845 echo "$as_me:23845: result: $LIB_SUBSETS" >&5
23846 echo "${ECHO_T}$LIB_SUBSETS" >&6
23847
23848 ### Construct the list of include-directories to be generated
23849
23850 if test "$srcdir" != "."; then
23851         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
23852 fi
23853 CPPFLAGS="-I../include $CPPFLAGS"
23854 if test "$srcdir" != "."; then
23855         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
23856 fi
23857 CPPFLAGS="-I. $CPPFLAGS"
23858
23859 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
23860 if test "$srcdir" != "."; then
23861         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
23862 fi
23863 if test "$GCC" != yes; then
23864         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23865 elif test "$includedir" != "/usr/include"; then
23866         if test "$includedir" = '${prefix}/include' ; then
23867                 if test x$prefix != x/usr ; then
23868                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23869                 fi
23870         else
23871                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23872         fi
23873 fi
23874
23875 ### Build up pieces for makefile rules
23876 echo "$as_me:23876: checking default library suffix" >&5
23877 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
23878
23879         case $DFT_LWR_MODEL in
23880         (libtool) DFT_ARG_SUFFIX=''   ;;
23881         (normal)  DFT_ARG_SUFFIX=''   ;;
23882         (debug)   DFT_ARG_SUFFIX='_g' ;;
23883         (profile) DFT_ARG_SUFFIX='_p' ;;
23884         (shared)  DFT_ARG_SUFFIX=''   ;;
23885         esac
23886         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
23887 echo "$as_me:23887: result: $DFT_ARG_SUFFIX" >&5
23888 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
23889
23890 echo "$as_me:23890: checking default library-dependency suffix" >&5
23891 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
23892
23893         case X$DFT_LWR_MODEL in
23894         (Xlibtool)
23895                 DFT_LIB_SUFFIX='.la'
23896                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23897                 ;;
23898         (Xdebug)
23899                 DFT_LIB_SUFFIX='_g.a'
23900                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23901                 ;;
23902         (Xprofile)
23903                 DFT_LIB_SUFFIX='_p.a'
23904                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23905                 ;;
23906         (Xshared)
23907                 case $cf_cv_system_name in
23908                 (aix[5-7]*)
23909                         DFT_LIB_SUFFIX='.so'
23910                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23911                         ;;
23912                 (cygwin*|msys*|mingw*)
23913                         DFT_LIB_SUFFIX='.dll'
23914                         DFT_DEP_SUFFIX='.dll.a'
23915                         ;;
23916                 (darwin*)
23917                         DFT_LIB_SUFFIX='.dylib'
23918                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23919                         ;;
23920                 (hpux*)
23921                         case $target in
23922                         (ia64*)
23923                                 DFT_LIB_SUFFIX='.so'
23924                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23925                                 ;;
23926                         (*)
23927                                 DFT_LIB_SUFFIX='.sl'
23928                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23929                                 ;;
23930                         esac
23931                         ;;
23932                 (*)
23933                         DFT_LIB_SUFFIX='.so'
23934                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23935                         ;;
23936                 esac
23937                 ;;
23938         (*)
23939                 DFT_LIB_SUFFIX='.a'
23940                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23941                 ;;
23942         esac
23943         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23944         then
23945                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
23946                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
23947         fi
23948 echo "$as_me:23948: result: $DFT_DEP_SUFFIX" >&5
23949 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
23950
23951 echo "$as_me:23951: checking default object directory" >&5
23952 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
23953
23954         case $DFT_LWR_MODEL in
23955         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
23956         (normal)  DFT_OBJ_SUBDIR='objects' ;;
23957         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
23958         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
23959         (shared)
23960                 case $cf_cv_system_name in
23961                 (cygwin|msys)
23962                         DFT_OBJ_SUBDIR='objects' ;;
23963                 (*)
23964                         DFT_OBJ_SUBDIR='obj_s' ;;
23965                 esac
23966         esac
23967 echo "$as_me:23967: result: $DFT_OBJ_SUBDIR" >&5
23968 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
23969
23970 if test "x$cf_with_cxx" = xyes ; then
23971 echo "$as_me:23971: checking c++ library-dependency suffix" >&5
23972 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
23973 if test "$with_libtool" != "no"; then
23974         # libtool thinks it can make c++ shared libraries (perhaps only g++)
23975         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23976 elif test "$with_shared_cxx" != "no"; then
23977         # also for g++ users...
23978         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23979 else
23980         # we normally make a static library because C/C++ library rules differ
23981
23982         case Xnormal in
23983         (Xlibtool)
23984                 CXX_LIB_SUFFIX='.la'
23985                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23986                 ;;
23987         (Xdebug)
23988                 CXX_LIB_SUFFIX='_g.a'
23989                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23990                 ;;
23991         (Xprofile)
23992                 CXX_LIB_SUFFIX='_p.a'
23993                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23994                 ;;
23995         (Xshared)
23996                 case $cf_cv_system_name in
23997                 (aix[5-7]*)
23998                         CXX_LIB_SUFFIX='.so'
23999                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24000                         ;;
24001                 (cygwin*|msys*|mingw*)
24002                         CXX_LIB_SUFFIX='.dll'
24003                         CXX_DEP_SUFFIX='.dll.a'
24004                         ;;
24005                 (darwin*)
24006                         CXX_LIB_SUFFIX='.dylib'
24007                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24008                         ;;
24009                 (hpux*)
24010                         case $target in
24011                         (ia64*)
24012                                 CXX_LIB_SUFFIX='.so'
24013                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24014                                 ;;
24015                         (*)
24016                                 CXX_LIB_SUFFIX='.sl'
24017                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24018                                 ;;
24019                         esac
24020                         ;;
24021                 (*)
24022                         CXX_LIB_SUFFIX='.so'
24023                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24024                         ;;
24025                 esac
24026                 ;;
24027         (*)
24028                 CXX_LIB_SUFFIX='.a'
24029                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24030                 ;;
24031         esac
24032         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24033         then
24034                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
24035                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
24036         fi
24037
24038 fi
24039 echo "$as_me:24039: result: $CXX_LIB_SUFFIX" >&5
24040 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
24041
24042 fi
24043
24044 # do not want -ldl in build except as needed for -lncurses dependency
24045 if test "x$with_dlsym" = xyes ; then
24046 if test $DFT_LWR_MODEL = shared || \
24047    test $DFT_LWR_MODEL = libtool ; then
24048
24049 # remove dl library from $LIBS
24050 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
24051
24052 fi
24053 fi
24054 ### Set up low-level terminfo dependencies for makefiles.
24055
24056 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
24057 # do not need libdl
24058 TICS_LIST=
24059 if test "x$with_dlsym" = xyes ; then
24060
24061 # remove dl library from $SHLIB_LIST
24062 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
24063
24064 fi
24065
24066 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
24067 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
24068 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
24069 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
24070 then
24071         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
24072 fi
24073
24074 if test "$with_ticlib" != no ; then
24075
24076         if test "x$with_ticlib" != xyes ; then
24077                 TICS_NAME=$with_ticlib
24078                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24079                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24080                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24081                 TICS_LIB_SUFFIX="${with_ticlib}"
24082         else
24083                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
24084                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
24085                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
24086                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
24087         fi
24088         TICS_LDFLAGS="-L${LIB_DIR}"
24089         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
24090 else
24091         TICS_SUFFIX=${DFT_LIB_SUFFIX}
24092         TICS_LDFLAGS="-L${LIB_DIR}"
24093         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24094 fi
24095
24096 if test "$with_termlib" != no ; then
24097
24098         if test "x$with_termlib" != xyes ; then
24099                 TINFO_NAME=$with_termlib
24100                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24101                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24102                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24103                 TINFO_LIB_SUFFIX="${with_termlib}"
24104         else
24105                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24106                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
24107                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
24108                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
24109         fi
24110
24111         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24112         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24113         if test "$DFT_LWR_MODEL" = "libtool"; then
24114                 TEST_ARGS="${TEST_DEPS}"
24115                 TEST_ARG2="${TEST_DEP2}"
24116                 TINFO_LDFLAGS="-L${LIB_DIR}"
24117                 TINFO_LIBS="$TEST_ARGS"
24118                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
24119                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
24120         else
24121                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
24122                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
24123                 if test "x$with_term_driver" != xno ; then
24124                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24125                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
24126                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24127                 else
24128                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24129                         TINFO_LIBS="$TEST_ARGS"
24130                 fi
24131                 TINFO_LDFLAGS="-L${LIB_DIR}"
24132                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24133         fi
24134 else
24135         # the next lines are needed for linking libtic over libncurses
24136         TINFO_NAME=${LIB_NAME}
24137         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24138         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
24139         if test "x$with_tic_depends" = xyes ; then
24140                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24141         else
24142                 TICS_LIST="$SHLIB_LIST"
24143         fi
24144
24145         TINFO_LDFLAGS="-L${LIB_DIR}"
24146         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24147 fi
24148
24149 if test "$DFT_LWR_MODEL" = shared ; then
24150         case $cf_cv_system_name in
24151         (cygwin*|msys*)
24152                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
24153                 TINFO_SUFFIX=.dll
24154                 ;;
24155         esac
24156 fi
24157
24158 if test "x$with_dlsym" = xyes ; then
24159
24160 # remove dl library from $TICS_LIST
24161 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
24162
24163 fi
24164
24165 if test "$DFT_LWR_MODEL" = "libtool"; then
24166         OBJEXT=lo
24167 fi
24168
24169 # needed for Ada95
24170 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
24171
24172 case $DFT_LWR_MODEL in
24173 (normal|debug|profile)
24174
24175 if test "$GCC" = yes ; then
24176         case $cf_cv_system_name in
24177         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
24178                 LDFLAGS_STATIC=
24179                 LDFLAGS_SHARED=
24180                 ;;
24181         (*)     # normally, except when broken
24182                 LDFLAGS_STATIC=-static
24183                 LDFLAGS_SHARED=-dynamic
24184                 ;;
24185         esac
24186 else
24187         case $cf_cv_system_name in
24188         (aix[4-7]*)     # from ld manpage
24189                 LDFLAGS_STATIC=-bstatic
24190                 LDFLAGS_SHARED=-bdynamic
24191                 ;;
24192         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
24193                 # We could also use just "archive" and "shared".
24194                 LDFLAGS_STATIC=-Wl,-a,archive_shared
24195                 LDFLAGS_SHARED=-Wl,-a,shared_archive
24196                 ;;
24197         (irix*)         # from ld manpage IRIX64
24198                 LDFLAGS_STATIC=-Bstatic
24199                 LDFLAGS_SHARED=-Bdynamic
24200                 ;;
24201         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
24202                 # alternative "-oldstyle_liblookup" (not in cc manpage)
24203                 LDFLAGS_STATIC=-noso
24204                 LDFLAGS_SHARED=-so_archive
24205                 ;;
24206         (solaris2*)
24207                 LDFLAGS_STATIC=-Bstatic
24208                 LDFLAGS_SHARED=-Bdynamic
24209                 ;;
24210         esac
24211 fi
24212
24213 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
24214 then
24215         echo "$as_me:24215: checking if linker supports switching between static/dynamic" >&5
24216 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
24217
24218         rm -f libconftest.a
24219         cat >conftest.$ac_ext <<EOF
24220 #line 24220 "configure"
24221 #include <stdio.h>
24222 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
24223 EOF
24224         if { (eval echo "$as_me:24224: \"$ac_compile\"") >&5
24225   (eval $ac_compile) 2>&5
24226   ac_status=$?
24227   echo "$as_me:24227: \$? = $ac_status" >&5
24228   (exit $ac_status); } ; then
24229                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
24230                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
24231         fi
24232         rm -f conftest.*
24233
24234         cf_save_LIBS="$LIBS"
24235
24236         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
24237         cat >conftest.$ac_ext <<_ACEOF
24238 #line 24238 "configure"
24239 #include "confdefs.h"
24240
24241 #line 24241 "configure"
24242 #include <stdio.h>
24243 int cf_ldflags_static(FILE *fp);
24244
24245 int
24246 main (void)
24247 {
24248
24249         return cf_ldflags_static(stdin);
24250
24251   ;
24252   return 0;
24253 }
24254 _ACEOF
24255 rm -f conftest.$ac_objext conftest$ac_exeext
24256 if { (eval echo "$as_me:24256: \"$ac_link\"") >&5
24257   (eval $ac_link) 2>&5
24258   ac_status=$?
24259   echo "$as_me:24259: \$? = $ac_status" >&5
24260   (exit $ac_status); } &&
24261          { ac_try='test -s conftest$ac_exeext'
24262   { (eval echo "$as_me:24262: \"$ac_try\"") >&5
24263   (eval $ac_try) 2>&5
24264   ac_status=$?
24265   echo "$as_me:24265: \$? = $ac_status" >&5
24266   (exit $ac_status); }; }; then
24267
24268         # some linkers simply ignore the -dynamic
24269         case x`file conftest$ac_exeext 2>/dev/null` in
24270         (*static*)
24271                 cf_ldflags_static=no
24272                 ;;
24273         (*)
24274                 cf_ldflags_static=yes
24275                 ;;
24276         esac
24277
24278 else
24279   echo "$as_me: failed program was:" >&5
24280 cat conftest.$ac_ext >&5
24281 cf_ldflags_static=no
24282 fi
24283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24284
24285         rm -f libconftest.*
24286         LIBS="$cf_save_LIBS"
24287
24288         echo "$as_me:24288: result: $cf_ldflags_static" >&5
24289 echo "${ECHO_T}$cf_ldflags_static" >&6
24290
24291         if test $cf_ldflags_static != yes
24292         then
24293                 LDFLAGS_STATIC=
24294                 LDFLAGS_SHARED=
24295         fi
24296 else
24297         LDFLAGS_STATIC=
24298         LDFLAGS_SHARED=
24299 fi
24300
24301         ;;
24302 esac
24303
24304 echo "$as_me:24304: checking where we will install curses.h" >&5
24305 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
24306
24307 includesubdir=
24308 if test "$with_overwrite" = no && \
24309  ( test "x$includedir" = 'x${prefix}/include' || \
24310    test "x$includedir" = "x${prefix}/include" )
24311 then
24312         includesubdir="/ncurses${USE_LIB_SUFFIX}"
24313 fi
24314 echo "$as_me:24314: result: ${includedir}${includesubdir}" >&5
24315 echo "${ECHO_T}${includedir}${includesubdir}" >&6
24316
24317 ### Resolve a conflict between normal and wide-curses by forcing applications
24318 ### that will need libutf8 to add it to their configure script.
24319 if test "$with_overwrite" != no ; then
24320 if test "$NCURSES_LIBUTF8" = 1 ; then
24321         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
24322         { echo "$as_me:24322: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
24323 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
24324 fi
24325 fi
24326 WITH_OVERWRITE=$with_overwrite
24327
24328 # used to separate tack out of the tree
24329 NCURSES_TREE=
24330
24331 ### predefined stuff for the test programs
24332
24333 cat >>confdefs.h <<\EOF
24334 #define HAVE_SLK_COLOR 1
24335 EOF
24336
24337 ### Construct the list of subdirectories for which we'll customize makefiles
24338 ### with the appropriate compile-rules.
24339
24340 echo "$as_me:24340: checking for src modules" >&5
24341 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
24342
24343 # dependencies and linker-arguments for test-programs
24344 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
24345 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
24346 if test "$DFT_LWR_MODEL" = "libtool"; then
24347         TEST_ARGS="${TEST_DEPS}"
24348         TEST_ARG2="${TEST_DEP2}"
24349 else
24350         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24351         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
24352 fi
24353
24354 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
24355 cf_cv_src_modules=
24356 for cf_dir in $modules_to_build
24357 do
24358         if test -f $srcdir/$cf_dir/modules; then
24359
24360                 # We may/may not have tack in the distribution, though the
24361                 # makefile is.
24362                 if test $cf_dir = tack ; then
24363                         if test "x$cf_with_tack" != "xyes"; then
24364                                 continue
24365                         fi
24366                 fi
24367
24368                 if test -z "$cf_cv_src_modules"; then
24369                         cf_cv_src_modules=$cf_dir
24370                 else
24371                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
24372                 fi
24373
24374                 # Make the ncurses_cfg.h file record the library interface files as
24375                 # well.  These are header files that are the same name as their
24376                 # directory.  Ncurses is the only library that does not follow
24377                 # that pattern.
24378                 if test $cf_dir = tack ; then
24379                         continue
24380                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
24381
24382 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24383
24384                         cat >>confdefs.h <<EOF
24385 #define HAVE_${cf_have_include}_H 1
24386 EOF
24387
24388                         cat >>confdefs.h <<EOF
24389 #define HAVE_LIB${cf_have_include} 1
24390 EOF
24391
24392                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
24393                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
24394                         if test "$DFT_LWR_MODEL" = "libtool"; then
24395                                 TEST_ARGS="${TEST_DEPS}"
24396                                 TEST_ARG2="${TEST_DEP2}"
24397                         else
24398                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
24399                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
24400                         fi
24401                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
24402                 fi
24403         fi
24404 done
24405 echo "$as_me:24405: result: $cf_cv_src_modules" >&5
24406 echo "${ECHO_T}$cf_cv_src_modules" >&6
24407
24408 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
24409 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
24410
24411 SRC_SUBDIRS=
24412 if test "x$cf_with_manpages" != xno ; then
24413         SRC_SUBDIRS="$SRC_SUBDIRS man"
24414 fi
24415 SRC_SUBDIRS="$SRC_SUBDIRS include"
24416 for cf_dir in $cf_cv_src_modules
24417 do
24418         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
24419 done
24420 if test "x$cf_with_tests" != "xno" ; then
24421         SRC_SUBDIRS="$SRC_SUBDIRS test"
24422 fi
24423 # always make this, to install the ncurses-config script
24424 SRC_SUBDIRS="$SRC_SUBDIRS misc"
24425 if test "$cf_with_cxx_binding" != no; then
24426         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
24427         SRC_SUBDIRS="$SRC_SUBDIRS c++"
24428 fi
24429
24430 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
24431 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
24432
24433 ADA_SUBDIRS=
24434 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
24435         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
24436         ADA_SUBDIRS="gen src"
24437         if test "x$cf_with_tests" != "xno" ; then
24438                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
24439         fi
24440 fi
24441
24442 SUB_MAKEFILES=
24443 for cf_dir in $SRC_SUBDIRS
24444 do
24445         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
24446 done
24447
24448 if test -n "$ADA_SUBDIRS"; then
24449         for cf_dir in $ADA_SUBDIRS
24450         do
24451                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
24452         done
24453
24454 fi
24455
24456 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24457    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
24458    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
24459 fi
24460
24461 DIRS_TO_MAKE="lib"
24462 for cf_item in $cf_list_models
24463 do
24464
24465         case $cf_item in
24466         (libtool) cf_subdir='obj_lo'  ;;
24467         (normal)  cf_subdir='objects' ;;
24468         (debug)   cf_subdir='obj_g' ;;
24469         (profile) cf_subdir='obj_p' ;;
24470         (shared)
24471                 case $cf_cv_system_name in
24472                 (cygwin|msys)
24473                         cf_subdir='objects' ;;
24474                 (*)
24475                         cf_subdir='obj_s' ;;
24476                 esac
24477         esac
24478
24479         for cf_item2 in $DIRS_TO_MAKE
24480         do
24481                 test $cf_item2 = $cf_subdir && break
24482         done
24483         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
24484 done
24485 for cf_dir in $DIRS_TO_MAKE
24486 do
24487         test ! -d $cf_dir && mkdir $cf_dir
24488 done
24489
24490 # symbols that differ when compiling Ada95 by itself.
24491 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
24492
24493 # values to use as strings
24494
24495 cat >>confdefs.h <<EOF
24496 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
24497 EOF
24498
24499 cat >>confdefs.h <<EOF
24500 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
24501 EOF
24502
24503 ### Now that we're done running tests, add the compiler-warnings, if any
24504
24505 cf_fix_cppflags=no
24506 cf_new_cflags=
24507 cf_new_cppflags=
24508 cf_new_extra_cppflags=
24509
24510 for cf_add_cflags in $EXTRA_CFLAGS
24511 do
24512 case $cf_fix_cppflags in
24513 (no)
24514         case $cf_add_cflags in
24515         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24516                 case $cf_add_cflags in
24517                 (-D*)
24518                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24519
24520                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24521                                 && test -z "${cf_tst_cflags}" \
24522                                 && cf_fix_cppflags=yes
24523
24524                         if test $cf_fix_cppflags = yes ; then
24525
24526         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24527         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24528
24529                                 continue
24530                         elif test "${cf_tst_cflags}" = "\"'" ; then
24531
24532         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24533         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24534
24535                                 continue
24536                         fi
24537                         ;;
24538                 esac
24539                 case "$CPPFLAGS" in
24540                 (*$cf_add_cflags)
24541                         ;;
24542                 (*)
24543                         case $cf_add_cflags in
24544                         (-D*)
24545                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24546
24547 CPPFLAGS=`echo "$CPPFLAGS" | \
24548         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
24549                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
24550
24551                                 ;;
24552                         esac
24553
24554         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24555         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24556
24557                         ;;
24558                 esac
24559                 ;;
24560         (*)
24561
24562         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24563         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24564
24565                 ;;
24566         esac
24567         ;;
24568 (yes)
24569
24570         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24571         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24572
24573         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
24574
24575         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24576                 && test -z "${cf_tst_cflags}" \
24577                 && cf_fix_cppflags=no
24578         ;;
24579 esac
24580 done
24581
24582 if test -n "$cf_new_cflags" ; then
24583
24584         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24585         CFLAGS="${CFLAGS}$cf_new_cflags"
24586
24587 fi
24588
24589 if test -n "$cf_new_cppflags" ; then
24590
24591         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24592         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24593
24594 fi
24595
24596 if test -n "$cf_new_extra_cppflags" ; then
24597
24598         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24599         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24600
24601 fi
24602
24603 ### Define substitutions for header files to avoid name-pollution
24604
24605 if test "x$cf_cv_have_tcgetattr" = xyes ; then
24606         HAVE_TCGETATTR=1
24607 else
24608         HAVE_TCGETATTR=0
24609 fi
24610
24611 if test "x$ac_cv_header_stdint_h" = xyes ; then
24612         HAVE_STDINT_H=1
24613 else
24614         HAVE_STDINT_H=0
24615 fi
24616
24617 if test "x$ac_cv_header_termio_h" = xyes ; then
24618         HAVE_TERMIO_H=1
24619 else
24620         HAVE_TERMIO_H=0
24621 fi
24622
24623 if test "x$ac_cv_header_termios_h" = xyes ; then
24624         HAVE_TERMIOS_H=1
24625 else
24626         HAVE_TERMIOS_H=0
24627 fi
24628
24629 ################################################################################
24630 test "x$use_database" = xyes && \
24631 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
24632
24633 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
24634 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
24635
24636 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
24637 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
24638 fi
24639
24640 # Extract the first word of "tic", so it can be a program name with args.
24641 set dummy tic; ac_word=$2
24642 echo "$as_me:24642: checking for $ac_word" >&5
24643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24644 if test "${ac_cv_path_TIC_PATH+set}" = set; then
24645   echo $ECHO_N "(cached) $ECHO_C" >&6
24646 else
24647   case $TIC_PATH in
24648   [\\/]* | ?:[\\/]*)
24649   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
24650   ;;
24651   *)
24652   ac_save_IFS=$IFS; IFS=$ac_path_separator
24653 ac_dummy="$PATH:/usr/local/ncurses/bin"
24654 for ac_dir in $ac_dummy; do
24655   IFS=$ac_save_IFS
24656   test -z "$ac_dir" && ac_dir=.
24657   if $as_executable_p "$ac_dir/$ac_word"; then
24658    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
24659    echo "$as_me:24659: found $ac_dir/$ac_word" >&5
24660    break
24661 fi
24662 done
24663
24664   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
24665   ;;
24666 esac
24667 fi
24668 TIC_PATH=$ac_cv_path_TIC_PATH
24669
24670 if test -n "$TIC_PATH"; then
24671   echo "$as_me:24671: result: $TIC_PATH" >&5
24672 echo "${ECHO_T}$TIC_PATH" >&6
24673 else
24674   echo "$as_me:24674: result: no" >&5
24675 echo "${ECHO_T}no" >&6
24676 fi
24677
24678 if test -n "$FALLBACK_LIST"
24679 then
24680         if test "$TIC_PATH" = unknown
24681         then
24682                 { echo "$as_me:24682: WARNING: no tic program found for fallbacks" >&5
24683 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24684         fi
24685 fi
24686
24687 if test "x$cf_with_tests" != xno ; then
24688         MAKE_TESTS=
24689 else
24690         MAKE_TESTS="#"
24691 fi
24692
24693 ADAHTML_DIR=../../doc/html/ada
24694
24695 # these could be configurable, but are not currently
24696 PANEL_NAME=panel
24697 MENU_NAME=menu
24698 FORM_NAME=form
24699 CXX_NAME=ncurses++
24700
24701 # workaround for OS/2 (20151017)
24702 case $cf_cv_system_name in
24703 (os2*)
24704         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24705         ;;
24706 (*)
24707         LIBTOOL_OPTS_CXX=
24708         ;;
24709 esac
24710
24711 # workaround for g++ versus Solaris (20131116)
24712 case $cf_cv_system_name in
24713 (solaris2*)
24714         case "x$CPPFLAGS" in
24715         (*-D_XOPEN_SOURCE_EXTENDED*)
24716                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24717
24718 echo "${as_me:-configure}:24718: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24719
24720                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24721                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24722                 ;;
24723         esac
24724         ;;
24725 esac
24726
24727 # Help to automatically enable the extended curses features when using either
24728 # the *-config or the ".pc" files by adding defines.
24729 echo "$as_me:24729: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24730 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24731 PKG_CFLAGS=
24732 for cf_loop1 in $CPPFLAGS_after_XOPEN
24733 do
24734         cf_found=no
24735         for cf_loop2 in $CPPFLAGS_before_XOPEN
24736         do
24737                 if test "x$cf_loop1" = "x$cf_loop2"
24738                 then
24739                         cf_found=yes
24740                         break
24741                 fi
24742         done
24743         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24744 done
24745 echo "$as_me:24745: result: $PKG_CFLAGS" >&5
24746 echo "${ECHO_T}$PKG_CFLAGS" >&6
24747
24748 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24749 case "x$NCURSES_OSPEED" in
24750 (*short*)
24751         cf_compatible=1
24752         ;;
24753 (*)
24754         cf_compatible=0
24755         ;;
24756 esac
24757
24758 cat >>confdefs.h <<EOF
24759 #define NCURSES_OSPEED_COMPAT $cf_compatible
24760 EOF
24761
24762 case "x$cf_cv_typeof_chtype" in
24763 (xshort|xint|xlong)
24764         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
24765         ;;
24766 esac
24767
24768 case "x$cf_cv_typeof_mmask_t" in
24769 (xshort|xint|xlong)
24770         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
24771         ;;
24772 esac
24773
24774 # substitute into misc/Makefile to suppress
24775 # (un)install.data from the
24776 # (un)install rules.
24777 if test "x$cf_with_db_install" = "xno"; then
24778         MISC_INSTALL_DATA=
24779         MISC_UNINSTALL_DATA=
24780 else
24781         MISC_INSTALL_DATA=install.data
24782         MISC_UNINSTALL_DATA=uninstall.data
24783 fi
24784
24785 SUB_SCRIPTS=
24786
24787 if test -n "$PACKAGE"
24788 then
24789         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
24790         export PACKAGE
24791         echo "package: $PACKAGE"
24792 fi
24793
24794 UNALTERED_SYMS=
24795 cf_filter_syms=no
24796
24797 if test -n "$RESULTING_SYMS"
24798 then
24799         cf_filter_syms=$cf_dft_filter_syms
24800         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
24801
24802 echo "${as_me:-configure}:24802: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
24803
24804 fi
24805
24806 if test "x$WILDCARD_SYMS" = xno
24807 then
24808         cf_filter_syms=yes
24809 fi
24810
24811 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
24812
24813 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
24814 if test $cf_filter_syms = yes
24815 then
24816         RESULTING_SYMS=resulting.map
24817 fi
24818
24819 if test "x$cross_compiling" = xyes ; then
24820         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
24821         CHECK_BUILD="#"
24822 else
24823         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
24824         CHECK_BUILD=
24825 fi
24826
24827 cat >>confdefs.h <<\EOF
24828 #define HAVE_CURSES_DATA_BOOLNAMES 1
24829 EOF
24830
24831 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"
24832 ac_config_commands="$ac_config_commands default"
24833 cat >confcache <<\_ACEOF
24834 # This file is a shell script that caches the results of configure
24835 # tests run on this system so they can be shared between configure
24836 # scripts and configure runs, see configure's option --config-cache.
24837 # It is not useful on other systems.  If it contains results you don't
24838 # want to keep, you may remove or edit it.
24839 #
24840 # config.status only pays attention to the cache file if you give it
24841 # the --recheck option to rerun configure.
24842 #
24843 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24844 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24845 # following values.
24846
24847 _ACEOF
24848
24849 # The following way of writing the cache mishandles newlines in values,
24850 # but we know of no workaround that is simple, portable, and efficient.
24851 # So, don't put newlines in cache variables' values.
24852 # Ultrix sh set writes to stderr and can't be redirected directly,
24853 # and sets the high bit in the cache file unless we assign to the vars.
24854 {
24855   (set) 2>&1 |
24856     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24857     *ac_space=\ *)
24858       # `set' does not quote correctly, so add quotes (double-quote
24859       # substitution turns \\\\ into \\, and sed turns \\ into \).
24860       sed -n \
24861         "s/'/'\\\\''/g;
24862           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24863       ;;
24864     *)
24865       # `set' quotes correctly as required by POSIX, so do not add quotes.
24866       sed -n \
24867         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24868       ;;
24869     esac;
24870 } |
24871   sed '
24872      t clear
24873      : clear
24874      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24875      t end
24876      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24877      : end' >>confcache
24878 if cmp -s $cache_file confcache; then :; else
24879   if test -w $cache_file; then
24880     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24881     cat confcache >$cache_file
24882   else
24883     echo "not updating unwritable cache $cache_file"
24884   fi
24885 fi
24886 rm -f confcache
24887
24888 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24889 # Let make expand exec_prefix.
24890 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24891
24892 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24893 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24894 # trailing colons and then remove the whole line if VPATH becomes empty
24895 # (actually we leave an empty line to preserve line numbers).
24896 if test "x$srcdir" = x.; then
24897   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24898 s/:*\$(srcdir):*/:/;
24899 s/:*\${srcdir}:*/:/;
24900 s/:*@srcdir@:*/:/;
24901 s/^\([^=]*=[    ]*\):*/\1/;
24902 s/:*$//;
24903 s/^[^=]*=[      ]*$//;
24904 }'
24905 fi
24906
24907 DEFS=-DHAVE_CONFIG_H
24908
24909 : ${CONFIG_STATUS=./config.status}
24910 ac_clean_files_save=$ac_clean_files
24911 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24912 { echo "$as_me:24912: creating $CONFIG_STATUS" >&5
24913 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24914 cat >$CONFIG_STATUS <<_ACEOF
24915 #! $SHELL
24916 # Generated automatically by configure.
24917 # Run this file to recreate the current configuration.
24918 # Compiler output produced by configure, useful for debugging
24919 # configure, is in config.log if it exists.
24920
24921 debug=false
24922 SHELL=\${CONFIG_SHELL-$SHELL}
24923 ac_cs_invocation="\$0 \$@"
24924
24925 _ACEOF
24926
24927 cat >>$CONFIG_STATUS <<\_ACEOF
24928 # Be Bourne compatible
24929 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24930   emulate sh
24931   NULLCMD=:
24932 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24933   set -o posix
24934 fi
24935
24936 # Name of the executable.
24937 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24938
24939 if expr a : '\(a\)' >/dev/null 2>&1; then
24940   as_expr=expr
24941 else
24942   as_expr=false
24943 fi
24944
24945 rm -f conf$$ conf$$.exe conf$$.file
24946 echo >conf$$.file
24947 if ln -s conf$$.file conf$$ 2>/dev/null; then
24948   # We could just check for DJGPP; but this test a) works b) is more generic
24949   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24950   if test -f conf$$.exe; then
24951     # Don't use ln at all; we don't have any links
24952     as_ln_s='cp -p'
24953   else
24954     as_ln_s='ln -s'
24955   fi
24956 elif ln conf$$.file conf$$ 2>/dev/null; then
24957   as_ln_s=ln
24958 else
24959   as_ln_s='cp -p'
24960 fi
24961 rm -f conf$$ conf$$.exe conf$$.file
24962
24963 as_executable_p="test -f"
24964
24965 # Support unset when possible.
24966 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24967   as_unset=unset
24968 else
24969   as_unset=false
24970 fi
24971
24972 # NLS nuisances.
24973 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24974 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24975 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24976 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24977 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24978 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24979 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24980 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24981
24982 # IFS
24983 # We need space, tab and new line, in precisely that order.
24984 as_nl='
24985 '
24986 IFS="   $as_nl"
24987
24988 # CDPATH.
24989 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24990
24991 exec 6>&1
24992
24993 _ACEOF
24994
24995 # Files that config.status was made for.
24996 if test -n "$ac_config_files"; then
24997   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24998 fi
24999
25000 if test -n "$ac_config_headers"; then
25001   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25002 fi
25003
25004 if test -n "$ac_config_links"; then
25005   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25006 fi
25007
25008 if test -n "$ac_config_commands"; then
25009   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25010 fi
25011
25012 cat >>$CONFIG_STATUS <<\EOF
25013
25014 ac_cs_usage="\
25015 \`$as_me' instantiates files from templates according to the
25016 current configuration.
25017
25018 Usage: $0 [OPTIONS] [FILE]...
25019
25020   -h, --help       print this help, then exit
25021   -V, --version    print version number, then exit
25022   -d, --debug      don't remove temporary files
25023       --recheck    update $as_me by reconfiguring in the same conditions
25024   --file=FILE[:TEMPLATE]
25025                    instantiate the configuration file FILE
25026   --header=FILE[:TEMPLATE]
25027                    instantiate the configuration header FILE
25028
25029 Configuration files:
25030 $config_files
25031
25032 Configuration headers:
25033 $config_headers
25034
25035 Configuration commands:
25036 $config_commands
25037
25038 Report bugs to <dickey@invisible-island.net>."
25039 EOF
25040
25041 cat >>$CONFIG_STATUS <<EOF
25042 ac_cs_version="\\
25043 config.status
25044 configured by $0, generated by GNU Autoconf 2.52.20170501,
25045   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25046
25047 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25048 Free Software Foundation, Inc.
25049 This config.status script is free software; the Free Software Foundation
25050 gives unlimited permission to copy, distribute and modify it."
25051 srcdir=$srcdir
25052 INSTALL="$INSTALL"
25053 EOF
25054
25055 cat >>$CONFIG_STATUS <<\EOF
25056 # If no file are specified by the user, then we need to provide default
25057 # value.  By we need to know if files were specified by the user.
25058 ac_need_defaults=:
25059 while test $# != 0
25060 do
25061   case $1 in
25062   --*=*)
25063     ac_option=`expr "x$1" : 'x\([^=]*\)='`
25064     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25065     shift
25066     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25067     shift
25068     ;;
25069   -*);;
25070   *) # This is not an option, so the user has probably given explicit
25071      # arguments.
25072      ac_need_defaults=false;;
25073   esac
25074
25075   case $1 in
25076   # Handling of the options.
25077 EOF
25078 cat >>$CONFIG_STATUS <<EOF
25079   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25080     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25081     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25082 EOF
25083 cat >>$CONFIG_STATUS <<\EOF
25084   --version | --vers* | -V )
25085     echo "$ac_cs_version"; exit 0 ;;
25086   --he | --h)
25087     # Conflict between --help and --header
25088     { { echo "$as_me:25088: error: ambiguous option: $1
25089 Try \`$0 --help' for more information." >&5
25090 echo "$as_me: error: ambiguous option: $1
25091 Try \`$0 --help' for more information." >&2;}
25092    { (exit 1); exit 1; }; };;
25093   --help | --hel | -h )
25094     echo "$ac_cs_usage"; exit 0 ;;
25095   --debug | --d* | -d )
25096     debug=: ;;
25097   --file | --fil | --fi | --f )
25098     shift
25099     CONFIG_FILES="$CONFIG_FILES $1"
25100     ac_need_defaults=false;;
25101   --header | --heade | --head | --hea )
25102     shift
25103     CONFIG_HEADERS="$CONFIG_HEADERS $1"
25104     ac_need_defaults=false;;
25105
25106   # This is an error.
25107   -*) { { echo "$as_me:25107: error: unrecognized option: $1
25108 Try \`$0 --help' for more information." >&5
25109 echo "$as_me: error: unrecognized option: $1
25110 Try \`$0 --help' for more information." >&2;}
25111    { (exit 1); exit 1; }; } ;;
25112
25113   *) ac_config_targets="$ac_config_targets $1" ;;
25114
25115   esac
25116   shift
25117 done
25118
25119 exec 5>>config.log
25120 cat >&5 << _ACEOF
25121
25122 ## ----------------------- ##
25123 ## Running config.status.  ##
25124 ## ----------------------- ##
25125
25126 This file was extended by $as_me 2.52.20170501, executed with
25127   CONFIG_FILES    = $CONFIG_FILES
25128   CONFIG_HEADERS  = $CONFIG_HEADERS
25129   CONFIG_LINKS    = $CONFIG_LINKS
25130   CONFIG_COMMANDS = $CONFIG_COMMANDS
25131   > $ac_cs_invocation
25132 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25133
25134 _ACEOF
25135 EOF
25136
25137 cat >>$CONFIG_STATUS <<EOF
25138 #
25139 # INIT-COMMANDS section.
25140 #
25141
25142 ### Special initialization commands, used to pass information from the
25143 ### configuration-run into config.status
25144
25145 AWK="$AWK"
25146 ALTERNATE_SYMS="$ALTERNATE_SYMS"
25147 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
25148 DFT_LWR_MODEL="$DFT_LWR_MODEL"
25149 ECHO_LD="$ECHO_LD"
25150 EXTRA_SUFFIX="$EXTRA_SUFFIX"
25151 LDCONFIG="$LDCONFIG"
25152 LIBTOOL_VERSION="$LIBTOOL_VERSION"
25153 LIB_NAME="$LIB_NAME"
25154 LIB_PREFIX="$LIB_PREFIX"
25155 LIB_SUBSETS="$LIB_SUBSETS"
25156 LIB_SUFFIX="$LIB_SUFFIX"
25157 LIB_TRACING="$LIB_TRACING"
25158 LN_S="$LN_S"
25159 MAKE_TERMINFO="$MAKE_TERMINFO"
25160 NCURSES_MAJOR="$NCURSES_MAJOR"
25161 NCURSES_MINOR="$NCURSES_MINOR"
25162 NCURSES_OSPEED="$NCURSES_OSPEED"
25163 NCURSES_PATCH="$NCURSES_PATCH"
25164 SRC_SUBDIRS="$SRC_SUBDIRS"
25165 TERMINFO="$TERMINFO"
25166 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
25167 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
25168 TICS_NAME="$TICS_NAME"
25169 TICS_SUFFIX="$TICS_SUFFIX"
25170 TIC_PATH="$TIC_PATH"
25171 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
25172 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
25173 TINFO_NAME="$TINFO_NAME"
25174 TINFO_SUFFIX="$TINFO_SUFFIX"
25175 UNALTERED_SYMS="$UNALTERED_SYMS"
25176 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
25177 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
25178 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
25179 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
25180 WILDCARD_SYMS="$WILDCARD_SYMS"
25181 WITH_CURSES_H="$with_curses_h"
25182 WITH_ECHO="${enable_echo:=yes}"
25183 WITH_OVERWRITE="$with_overwrite"
25184 cf_LIST_MODELS="$cf_list_models"
25185 cf_cv_abi_version="$cf_cv_abi_version"
25186 cf_cv_do_relink="$cf_cv_do_relink"
25187 cf_cv_do_reranlib="$cf_cv_do_reranlib"
25188 cf_cv_do_symlinks="$cf_cv_do_symlinks"
25189 cf_cv_enable_lp64="$cf_cv_enable_lp64"
25190 cf_cv_enable_opaque="$cf_cv_enable_opaque"
25191 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
25192 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
25193 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
25194 cf_cv_rel_version="$cf_cv_rel_version"
25195 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
25196 cf_cv_shared_soname='$cf_cv_shared_soname'
25197 cf_cv_shlib_version="$cf_cv_shlib_version"
25198 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
25199 cf_cv_system_name="$cf_cv_system_name"
25200 cf_cv_term_driver="$with_term_driver"
25201 cf_with_ada="$cf_with_ada"
25202 cf_with_cxx_binding="$cf_with_cxx_binding"
25203 cf_with_db_install="$cf_with_db_install"
25204 cf_with_manpages="$cf_with_manpages"
25205 cf_with_tests="$cf_with_tests"
25206 host="$host"
25207 target="$target"
25208 with_shared_cxx="$with_shared_cxx"
25209
25210 EOF
25211
25212 cat >>$CONFIG_STATUS <<\EOF
25213 for ac_config_target in $ac_config_targets
25214 do
25215   case "$ac_config_target" in
25216   # Handling of arguments.
25217   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
25218   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
25219   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
25220   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
25221   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
25222   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
25223   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
25224   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25225   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25226   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
25227   *) { { echo "$as_me:25227: error: invalid argument: $ac_config_target" >&5
25228 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25229    { (exit 1); exit 1; }; };;
25230   esac
25231 done
25232
25233 # If the user did not use the arguments to specify the items to instantiate,
25234 # then the envvar interface is used.  Set only those that are not.
25235 # We use the long form for the default assignment because of an extremely
25236 # bizarre bug on SunOS 4.1.3.
25237 if $ac_need_defaults; then
25238   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25239   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25240   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25241 fi
25242
25243 # Create a temporary directory, and hook for its removal unless debugging.
25244 $debug ||
25245 {
25246   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25247   trap '{ (exit 1); exit 1; }' 1 2 13 15
25248 }
25249
25250 # Create a (secure) tmp directory for tmp files.
25251 : ${TMPDIR=/tmp}
25252 {
25253   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25254   test -n "$tmp" && test -d "$tmp"
25255 }  ||
25256 {
25257   tmp=$TMPDIR/cs$$-$RANDOM
25258   (umask 077 && mkdir $tmp)
25259 } ||
25260 {
25261    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25262    { (exit 1); exit 1; }
25263 }
25264
25265 EOF
25266
25267 cat >>$CONFIG_STATUS <<EOF
25268
25269 #
25270 # CONFIG_FILES section.
25271 #
25272
25273 # No need to generate the scripts if there are no CONFIG_FILES.
25274 # This happens for instance when ./config.status config.h
25275 if test -n "\$CONFIG_FILES"; then
25276   # Protect against being on the right side of a sed subst in config.status.
25277   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25278    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25279 s,@SHELL@,$SHELL,;t t
25280 s,@exec_prefix@,$exec_prefix,;t t
25281 s,@prefix@,$prefix,;t t
25282 s,@program_transform_name@,$program_transform_name,;t t
25283 s,@bindir@,$bindir,;t t
25284 s,@sbindir@,$sbindir,;t t
25285 s,@libexecdir@,$libexecdir,;t t
25286 s,@datarootdir@,$datarootdir,;t t
25287 s,@datadir@,$datadir,;t t
25288 s,@sysconfdir@,$sysconfdir,;t t
25289 s,@sharedstatedir@,$sharedstatedir,;t t
25290 s,@localstatedir@,$localstatedir,;t t
25291 s,@libdir@,$libdir,;t t
25292 s,@includedir@,$includedir,;t t
25293 s,@oldincludedir@,$oldincludedir,;t t
25294 s,@infodir@,$infodir,;t t
25295 s,@mandir@,$mandir,;t t
25296 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25297 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25298 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25299 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25300 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25301 s,@build_alias@,$build_alias,;t t
25302 s,@host_alias@,$host_alias,;t t
25303 s,@target_alias@,$target_alias,;t t
25304 s,@ECHO_C@,$ECHO_C,;t t
25305 s,@ECHO_N@,$ECHO_N,;t t
25306 s,@ECHO_T@,$ECHO_T,;t t
25307 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25308 s,@DEFS@,$DEFS,;t t
25309 s,@LIBS@,$LIBS,;t t
25310 s,@top_builddir@,$top_builddir,;t t
25311 s,@EGREP@,$EGREP,;t t
25312 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
25313 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
25314 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
25315 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
25316 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
25317 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
25318 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
25319 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
25320 s,@VERSION@,$VERSION,;t t
25321 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25322 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25323 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25324 s,@PACKAGE@,$PACKAGE,;t t
25325 s,@build@,$build,;t t
25326 s,@build_cpu@,$build_cpu,;t t
25327 s,@build_vendor@,$build_vendor,;t t
25328 s,@build_os@,$build_os,;t t
25329 s,@host@,$host,;t t
25330 s,@host_cpu@,$host_cpu,;t t
25331 s,@host_vendor@,$host_vendor,;t t
25332 s,@host_os@,$host_os,;t t
25333 s,@target@,$target,;t t
25334 s,@target_cpu@,$target_cpu,;t t
25335 s,@target_vendor@,$target_vendor,;t t
25336 s,@target_os@,$target_os,;t t
25337 s,@CC@,$CC,;t t
25338 s,@CFLAGS@,$CFLAGS,;t t
25339 s,@LDFLAGS@,$LDFLAGS,;t t
25340 s,@CPPFLAGS@,$CPPFLAGS,;t t
25341 s,@ac_ct_CC@,$ac_ct_CC,;t t
25342 s,@EXEEXT@,$EXEEXT,;t t
25343 s,@OBJEXT@,$OBJEXT,;t t
25344 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25345 s,@CPP@,$CPP,;t t
25346 s,@LDCONFIG@,$LDCONFIG,;t t
25347 s,@CXX@,$CXX,;t t
25348 s,@CXXFLAGS@,$CXXFLAGS,;t t
25349 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
25350 s,@AWK@,$AWK,;t t
25351 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25352 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25353 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25354 s,@LINT@,$LINT,;t t
25355 s,@LINT_OPTS@,$LINT_OPTS,;t t
25356 s,@LN_S@,$LN_S,;t t
25357 s,@cf_config_suffix@,$cf_config_suffix,;t t
25358 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25359 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25360 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
25361 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
25362 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
25363 s,@SET_MAKE@,$SET_MAKE,;t t
25364 s,@CTAGS@,$CTAGS,;t t
25365 s,@ETAGS@,$ETAGS,;t t
25366 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25367 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25368 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25369 s,@RANLIB@,$RANLIB,;t t
25370 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25371 s,@LD@,$LD,;t t
25372 s,@ac_ct_LD@,$ac_ct_LD,;t t
25373 s,@AR@,$AR,;t t
25374 s,@ac_ct_AR@,$ac_ct_AR,;t t
25375 s,@NM@,$NM,;t t
25376 s,@ac_ct_NM@,$ac_ct_NM,;t t
25377 s,@ARFLAGS@,$ARFLAGS,;t t
25378 s,@DESTDIR@,$DESTDIR,;t t
25379 s,@BUILD_CC@,$BUILD_CC,;t t
25380 s,@BUILD_CPP@,$BUILD_CPP,;t t
25381 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
25382 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
25383 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
25384 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
25385 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
25386 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
25387 s,@cf_list_models@,$cf_list_models,;t t
25388 s,@ABI_VERSION@,$ABI_VERSION,;t t
25389 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25390 s,@LIBTOOL@,$LIBTOOL,;t t
25391 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25392 s,@LT_UNDEF@,$LT_UNDEF,;t t
25393 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25394 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25395 s,@LIB_CREATE@,$LIB_CREATE,;t t
25396 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25397 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25398 s,@LIB_PREP@,$LIB_PREP,;t t
25399 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25400 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25401 s,@LIB_LINK@,$LIB_LINK,;t t
25402 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25403 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25404 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25405 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
25406 s,@TICS_NAME@,$TICS_NAME,;t t
25407 s,@TINFO_NAME@,$TINFO_NAME,;t t
25408 s,@LIB_NAME@,$LIB_NAME,;t t
25409 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25410 s,@CC_G_OPT@,$CC_G_OPT,;t t
25411 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
25412 s,@LD_MODEL@,$LD_MODEL,;t t
25413 s,@shlibdir@,$shlibdir,;t t
25414 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25415 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25416 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25417 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25418 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25419 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25420 s,@LINK_PROGS@,$LINK_PROGS,;t t
25421 s,@LINK_TESTS@,$LINK_TESTS,;t t
25422 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25423 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25424 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25425 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25426 s,@RPATH_LIST@,$RPATH_LIST,;t t
25427 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25428 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25429 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25430 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25431 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25432 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
25433 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
25434 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
25435 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
25436 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
25437 s,@XTERM_KBS@,$XTERM_KBS,;t t
25438 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
25439 s,@TERMINFO@,$TERMINFO,;t t
25440 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
25441 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
25442 s,@TERMPATH@,$TERMPATH,;t t
25443 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
25444 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
25445 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
25446 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
25447 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
25448 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
25449 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
25450 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
25451 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
25452 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
25453 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
25454 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
25455 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
25456 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
25457 s,@RGB_PATH@,$RGB_PATH,;t t
25458 s,@no_x11_rgb@,$no_x11_rgb,;t t
25459 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
25460 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
25461 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
25462 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
25463 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
25464 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
25465 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
25466 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
25467 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
25468 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
25469 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
25470 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
25471 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
25472 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
25473 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
25474 s,@PTHREAD@,$PTHREAD,;t t
25475 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
25476 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
25477 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
25478 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
25479 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
25480 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
25481 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
25482 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
25483 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
25484 s,@ECHO_LT@,$ECHO_LT,;t t
25485 s,@ECHO_LD@,$ECHO_LD,;t t
25486 s,@RULE_CC@,$RULE_CC,;t t
25487 s,@SHOW_CC@,$SHOW_CC,;t t
25488 s,@ECHO_CC@,$ECHO_CC,;t t
25489 s,@ECHO_LINK@,$ECHO_LINK,;t t
25490 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
25491 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
25492 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
25493 s,@ADAFLAGS@,$ADAFLAGS,;t t
25494 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25495 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
25496 s,@ADA_TRACE@,$ADA_TRACE,;t t
25497 s,@MATH_LIB@,$MATH_LIB,;t t
25498 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
25499 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
25500 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
25501 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
25502 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
25503 s,@TEST_LIBS@,$TEST_LIBS,;t t
25504 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
25505 s,@CXXCPP@,$CXXCPP,;t t
25506 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
25507 s,@CXX_AR@,$CXX_AR,;t t
25508 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
25509 s,@CXXLIBS@,$CXXLIBS,;t t
25510 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
25511 s,@gnatmake_exists@,$gnatmake_exists,;t t
25512 s,@gprconfig_exists@,$gprconfig_exists,;t t
25513 s,@M4_exists@,$M4_exists,;t t
25514 s,@cf_ada_make@,$cf_ada_make,;t t
25515 s,@cf_ada_config@,$cf_ada_config,;t t
25516 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
25517 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
25518 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
25519 s,@cf_compile_generics@,$cf_compile_generics,;t t
25520 s,@cf_generic_objects@,$cf_generic_objects,;t t
25521 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
25522 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
25523 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
25524 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
25525 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
25526 s,@cf_ada_package@,$cf_ada_package,;t t
25527 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
25528 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
25529 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
25530 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
25531 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
25532 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
25533 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25534 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
25535 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
25536 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
25537 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
25538 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
25539 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
25540 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
25541 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
25542 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
25543 s,@TICS_LIBS@,$TICS_LIBS,;t t
25544 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
25545 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
25546 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
25547 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
25548 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
25549 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
25550 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
25551 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
25552 s,@includesubdir@,$includesubdir,;t t
25553 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
25554 s,@TICS_LIST@,$TICS_LIST,;t t
25555 s,@TINFO_LIST@,$TINFO_LIST,;t t
25556 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
25557 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
25558 s,@TEST_ARGS@,$TEST_ARGS,;t t
25559 s,@TEST_DEPS@,$TEST_DEPS,;t t
25560 s,@TEST_ARG2@,$TEST_ARG2,;t t
25561 s,@TEST_DEP2@,$TEST_DEP2,;t t
25562 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
25563 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
25564 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
25565 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
25566 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
25567 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
25568 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
25569 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
25570 s,@cross_compiling@,$cross_compiling,;t t
25571 s,@TIC_PATH@,$TIC_PATH,;t t
25572 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
25573 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
25574 s,@PANEL_NAME@,$PANEL_NAME,;t t
25575 s,@MENU_NAME@,$MENU_NAME,;t t
25576 s,@FORM_NAME@,$FORM_NAME,;t t
25577 s,@CXX_NAME@,$CXX_NAME,;t t
25578 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
25579 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
25580 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
25581 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
25582 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
25583 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
25584 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
25585 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
25586 CEOF
25587
25588 EOF
25589
25590   cat >>$CONFIG_STATUS <<\EOF
25591   # Split the substitutions into bite-sized pieces for seds with
25592   # small command number limits, like on Digital OSF/1 and HP-UX.
25593   ac_max_sed_lines=48
25594   ac_sed_frag=1 # Number of current file.
25595   ac_beg=1 # First line for current file.
25596   ac_end=$ac_max_sed_lines # Line after last line for current file.
25597   ac_more_lines=:
25598   ac_sed_cmds=
25599   while $ac_more_lines; do
25600     if test $ac_beg -gt 1; then
25601       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25602     else
25603       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25604     fi
25605     if test ! -s $tmp/subs.frag; then
25606       ac_more_lines=false
25607     else
25608       # The purpose of the label and of the branching condition is to
25609       # speed up the sed processing (if there are no `@' at all, there
25610       # is no need to browse any of the substitutions).
25611       # These are the two extra sed commands mentioned above.
25612       (echo ':t
25613   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25614       # It is possible to make a multiline substitution using escaped newlines.
25615       # Ensure that we do not split the substitution between script fragments.
25616       ac_BEG=$ac_end
25617       ac_END=`expr $ac_end + $ac_max_sed_lines`
25618       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25619       if test -s $tmp/subs.next; then
25620         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25621         if test ! -s $tmp/subs.edit; then
25622           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25623           if test ! -s $tmp/subs.edit; then
25624             if test $ac_beg -gt 1; then
25625               ac_end=`expr $ac_end - 1`
25626               continue
25627             fi
25628           fi
25629         fi
25630       fi
25631
25632       if test -z "$ac_sed_cmds"; then
25633         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25634       else
25635         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25636       fi
25637       ac_sed_frag=`expr $ac_sed_frag + 1`
25638       ac_beg=$ac_end
25639       ac_end=`expr $ac_end + $ac_max_sed_lines`
25640     fi
25641   done
25642   if test -z "$ac_sed_cmds"; then
25643     ac_sed_cmds=cat
25644   fi
25645 fi # test -n "$CONFIG_FILES"
25646
25647 EOF
25648 cat >>$CONFIG_STATUS <<\EOF
25649 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25650   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25651   case $ac_file in
25652   - | *:- | *:-:* ) # input from stdin
25653         cat >$tmp/stdin
25654         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25655         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25656   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25657         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25658   * )   ac_file_in=$ac_file.in ;;
25659   esac
25660
25661   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25662   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25663          X"$ac_file" : 'X\(//\)[^/]' \| \
25664          X"$ac_file" : 'X\(//\)$' \| \
25665          X"$ac_file" : 'X\(/\)' \| \
25666          .     : '\(.\)' 2>/dev/null ||
25667 echo X"$ac_file" |
25668     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25669           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25670           /^X\(\/\/\)$/{ s//\1/; q; }
25671           /^X\(\/\).*/{ s//\1/; q; }
25672           s/.*/./; q'`
25673   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25674     { case "$ac_dir" in
25675   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25676   *)                      as_incr_dir=.;;
25677 esac
25678 as_dummy="$ac_dir"
25679 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25680   case $as_mkdir_dir in
25681     # Skip DOS drivespec
25682     ?:) as_incr_dir=$as_mkdir_dir ;;
25683     *)
25684       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25685       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25686     ;;
25687   esac
25688 done; }
25689
25690     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25691     # A "../" for each directory in $ac_dir_suffix.
25692     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25693   else
25694     ac_dir_suffix= ac_dots=
25695   fi
25696
25697   case $srcdir in
25698   .)  ac_srcdir=.
25699       if test -z "$ac_dots"; then
25700          ac_top_srcdir=.
25701       else
25702          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25703       fi ;;
25704   [\\/]* | ?:[\\/]* )
25705       ac_srcdir=$srcdir$ac_dir_suffix;
25706       ac_top_srcdir=$srcdir ;;
25707   *) # Relative path.
25708     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25709     ac_top_srcdir=$ac_dots$srcdir ;;
25710   esac
25711
25712   case $INSTALL in
25713   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25714   *) ac_INSTALL=$ac_dots$INSTALL ;;
25715   esac
25716
25717   if test x"$ac_file" != x-; then
25718     { echo "$as_me:25718: creating $ac_file" >&5
25719 echo "$as_me: creating $ac_file" >&6;}
25720     rm -f "$ac_file"
25721   fi
25722   # Let's still pretend it is `configure' which instantiates (i.e., don't
25723   # use $as_me), people would be surprised to read:
25724   #    /* config.h.  Generated automatically by config.status.  */
25725   configure_input="Generated automatically from `echo $ac_file_in |
25726                                                  sed 's,.*/,,'` by configure."
25727
25728   # First look for the input files in the build tree, otherwise in the
25729   # src tree.
25730   ac_file_inputs=`IFS=:
25731     for f in $ac_file_in; do
25732       case $f in
25733       -) echo $tmp/stdin ;;
25734       [\\/$]*)
25735          # Absolute (can't be DOS-style, as IFS=:)
25736          test -f "$f" || { { echo "$as_me:25736: error: cannot find input file: $f" >&5
25737 echo "$as_me: error: cannot find input file: $f" >&2;}
25738    { (exit 1); exit 1; }; }
25739          echo $f;;
25740       *) # Relative
25741          if test -f "$f"; then
25742            # Build tree
25743            echo $f
25744          elif test -f "$srcdir/$f"; then
25745            # Source tree
25746            echo $srcdir/$f
25747          else
25748            # /dev/null tree
25749            { { echo "$as_me:25749: error: cannot find input file: $f" >&5
25750 echo "$as_me: error: cannot find input file: $f" >&2;}
25751    { (exit 1); exit 1; }; }
25752          fi;;
25753       esac
25754     done` || { (exit 1); exit 1; }
25755 EOF
25756 cat >>$CONFIG_STATUS <<\EOF
25757   ac_warn_datarootdir=no
25758   if test x"$ac_file" != x-; then
25759     for ac_item in $ac_file_inputs
25760     do
25761       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25762       if test -n "$ac_seen"; then
25763         ac_used=`grep '@datarootdir@' $ac_item`
25764         if test -z "$ac_used"; then
25765           { echo "$as_me:25765: WARNING: datarootdir was used implicitly but not set:
25766 $ac_seen" >&5
25767 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25768 $ac_seen" >&2;}
25769           ac_warn_datarootdir=yes
25770         fi
25771       fi
25772       ac_seen=`grep '${datarootdir}' $ac_item`
25773       if test -n "$ac_seen"; then
25774         { echo "$as_me:25774: WARNING: datarootdir was used explicitly but not set:
25775 $ac_seen" >&5
25776 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25777 $ac_seen" >&2;}
25778         ac_warn_datarootdir=yes
25779       fi
25780     done
25781   fi
25782
25783 if test "x$ac_warn_datarootdir" = xyes; then
25784   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25785 fi
25786
25787 EOF
25788 cat >>$CONFIG_STATUS <<EOF
25789   sed "$ac_vpsub
25790 $extrasub
25791 EOF
25792 cat >>$CONFIG_STATUS <<\EOF
25793 :t
25794 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25795 s,@configure_input@,$configure_input,;t t
25796 s,@srcdir@,$ac_srcdir,;t t
25797 s,@top_srcdir@,$ac_top_srcdir,;t t
25798 s,@INSTALL@,$ac_INSTALL,;t t
25799 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25800   rm -f $tmp/stdin
25801   if test x"$ac_file" != x-; then
25802     cp $tmp/out $ac_file
25803
25804     for ac_name in prefix exec_prefix datarootdir
25805     do
25806         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25807         if test -n "$ac_seen"; then
25808             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25809             if test -z "$ac_init"; then
25810               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25811               { echo "$as_me:25811: WARNING: Variable $ac_name is used but was not set:
25812 $ac_seen" >&5
25813 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25814 $ac_seen" >&2;}
25815             fi
25816         fi
25817     done
25818     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25819     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25820     if test -s $tmp/out; then
25821       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25822       { echo "$as_me:25822: WARNING: Some variables may not be substituted:
25823 $ac_seen" >&5
25824 echo "$as_me: WARNING: Some variables may not be substituted:
25825 $ac_seen" >&2;}
25826     fi
25827   else
25828     cat $tmp/out
25829   fi
25830   rm -f $tmp/out
25831
25832 done
25833 EOF
25834 cat >>$CONFIG_STATUS <<\EOF
25835
25836 #
25837 # CONFIG_HEADER section.
25838 #
25839
25840 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25841 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25842 #
25843 # ac_d sets the value in "#define NAME VALUE" lines.
25844 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25845 ac_dB='[        ].*$,\1#\2'
25846 ac_dC=' '
25847 ac_dD=',;t'
25848 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25849 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25850 ac_iB='\([      ]\),\1#\2define\3'
25851 ac_iC=' '
25852 ac_iD='\4,;t'
25853 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25854 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25855 ac_uB='$,\1#\2define\3'
25856 ac_uC=' '
25857 ac_uD=',;t'
25858
25859 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25860   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25861   case $ac_file in
25862   - | *:- | *:-:* ) # input from stdin
25863         cat >$tmp/stdin
25864         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25865         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25866   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25867         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25868   * )   ac_file_in=$ac_file.in ;;
25869   esac
25870
25871   test x"$ac_file" != x- && { echo "$as_me:25871: creating $ac_file" >&5
25872 echo "$as_me: creating $ac_file" >&6;}
25873
25874   # First look for the input files in the build tree, otherwise in the
25875   # src tree.
25876   ac_file_inputs=`IFS=:
25877     for f in $ac_file_in; do
25878       case $f in
25879       -) echo $tmp/stdin ;;
25880       [\\/$]*)
25881          # Absolute (can't be DOS-style, as IFS=:)
25882          test -f "$f" || { { echo "$as_me:25882: error: cannot find input file: $f" >&5
25883 echo "$as_me: error: cannot find input file: $f" >&2;}
25884    { (exit 1); exit 1; }; }
25885          echo $f;;
25886       *) # Relative
25887          if test -f "$f"; then
25888            # Build tree
25889            echo $f
25890          elif test -f "$srcdir/$f"; then
25891            # Source tree
25892            echo $srcdir/$f
25893          else
25894            # /dev/null tree
25895            { { echo "$as_me:25895: error: cannot find input file: $f" >&5
25896 echo "$as_me: error: cannot find input file: $f" >&2;}
25897    { (exit 1); exit 1; }; }
25898          fi;;
25899       esac
25900     done` || { (exit 1); exit 1; }
25901   # Remove the trailing spaces.
25902   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25903
25904 EOF
25905
25906 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25907 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25908 # be either 'cat' or 'sort'.
25909 cat confdefs.h | uniq >conftest.vals
25910
25911 # Break up conftest.vals because some shells have a limit on
25912 # the size of here documents, and old seds have small limits too.
25913
25914 rm -f conftest.tail
25915 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25916 while grep . conftest.vals >/dev/null
25917 do
25918   # Write chunks of a limited-size here document to conftest.frag.
25919   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25920   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25921   echo 'CEOF' >> $CONFIG_STATUS
25922   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25923   rm -f conftest.vals
25924   mv conftest.tail conftest.vals
25925 done
25926 rm -f conftest.vals
25927
25928 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25929 # marker @DEFS@.
25930 echo '  cat >> conftest.edit <<CEOF
25931 /@DEFS@/r conftest.frag
25932 /@DEFS@/d
25933 CEOF
25934 sed -f conftest.edit $tmp/in > $tmp/out
25935 rm -f $tmp/in
25936 mv $tmp/out $tmp/in
25937 rm -f conftest.edit conftest.frag
25938 ' >> $CONFIG_STATUS
25939
25940 cat >>$CONFIG_STATUS <<\EOF
25941   # Let's still pretend it is `configure' which instantiates (i.e., don't
25942   # use $as_me), people would be surprised to read:
25943   #    /* config.h.  Generated automatically by config.status.  */
25944   if test x"$ac_file" = x-; then
25945     echo "/* Generated automatically by configure.  */" >$tmp/config.h
25946   else
25947     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25948   fi
25949   cat $tmp/in >>$tmp/config.h
25950   rm -f $tmp/in
25951   if test x"$ac_file" != x-; then
25952     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25953       { echo "$as_me:25953: $ac_file is unchanged" >&5
25954 echo "$as_me: $ac_file is unchanged" >&6;}
25955     else
25956       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25957          X"$ac_file" : 'X\(//\)[^/]' \| \
25958          X"$ac_file" : 'X\(//\)$' \| \
25959          X"$ac_file" : 'X\(/\)' \| \
25960          .     : '\(.\)' 2>/dev/null ||
25961 echo X"$ac_file" |
25962     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25963           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25964           /^X\(\/\/\)$/{ s//\1/; q; }
25965           /^X\(\/\).*/{ s//\1/; q; }
25966           s/.*/./; q'`
25967       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25968         { case "$ac_dir" in
25969   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25970   *)                      as_incr_dir=.;;
25971 esac
25972 as_dummy="$ac_dir"
25973 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25974   case $as_mkdir_dir in
25975     # Skip DOS drivespec
25976     ?:) as_incr_dir=$as_mkdir_dir ;;
25977     *)
25978       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25979       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25980     ;;
25981   esac
25982 done; }
25983
25984       fi
25985       rm -f $ac_file
25986       mv $tmp/config.h $ac_file
25987     fi
25988   else
25989     cat $tmp/config.h
25990     rm -f $tmp/config.h
25991   fi
25992 done
25993 EOF
25994 cat >>$CONFIG_STATUS <<\EOF
25995 #
25996 # CONFIG_COMMANDS section.
25997 #
25998 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25999   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26000   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26001
26002   case $ac_dest in
26003     default )
26004 if test "x$cf_with_tests" != xno ; then
26005
26006 for cf_dir in test
26007 do
26008         if test ! -d $srcdir/$cf_dir; then
26009                 continue
26010         elif test -f $srcdir/$cf_dir/programs; then
26011                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
26012         fi
26013 done
26014
26015 fi
26016
26017 cf_prefix=$LIB_PREFIX
26018
26019 case $cf_cv_shlib_version in
26020 (cygdll|msysdll|mingw)
26021         TINFO_NAME=$TINFO_ARG_SUFFIX
26022         TINFO_SUFFIX=.dll
26023         ;;
26024 esac
26025
26026 if test -n "$TINFO_SUFFIX" ; then
26027         case $TINFO_SUFFIX in
26028         (tw*)
26029                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
26030                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
26031                 ;;
26032         (t*)
26033                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
26034                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
26035                 ;;
26036         (w*)
26037                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
26038                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
26039                 ;;
26040         esac
26041 fi
26042
26043 for cf_dir in $SRC_SUBDIRS
26044 do
26045         if test ! -d $srcdir/$cf_dir ; then
26046                 continue
26047         elif test -f $srcdir/$cf_dir/modules; then
26048
26049                 SHARED_LIB=
26050                 Libs_To_Make=
26051                 cf_awk_program=
26052                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
26053                 then
26054                         cf_awk_program="$cf_awk_program\
26055 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
26056 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
26057 "
26058                 fi
26059
26060                 if test "x$WILDCARD_SYMS" = xno
26061                 then
26062                         cf_awk_program="$cf_awk_program\
26063 /[      ]_\\*;/ { skip=1; next; }\
26064 "
26065                 fi
26066
26067                 if test "x$cf_awk_program" != "x"
26068                 then
26069                         cat >>$cf_dir/Makefile <<CF_EOF
26070
26071 # Generated by CF_LIB_RULES
26072 resulting.map: $UNALTERED_SYMS
26073         $AWK 'BEGIN { skip = 1; last=""; } \
26074 $cf_awk_program \
26075 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
26076  skip = 0; last = \$\$0; } \
26077 END { print last; }' < $UNALTERED_SYMS >\$@
26078
26079 distclean::
26080         rm -f resulting.map
26081 CF_EOF
26082                 fi
26083
26084                 for cf_item in $cf_LIST_MODELS
26085                 do
26086
26087         case X$cf_item in
26088         (Xlibtool)
26089                 cf_suffix='.la'
26090                 cf_depsuf=$cf_suffix
26091                 ;;
26092         (Xdebug)
26093                 cf_suffix='_g.a'
26094                 cf_depsuf=$cf_suffix
26095                 ;;
26096         (Xprofile)
26097                 cf_suffix='_p.a'
26098                 cf_depsuf=$cf_suffix
26099                 ;;
26100         (Xshared)
26101                 case $cf_cv_system_name in
26102                 (aix[5-7]*)
26103                         cf_suffix='.so'
26104                         cf_depsuf=$cf_suffix
26105                         ;;
26106                 (cygwin*|msys*|mingw*)
26107                         cf_suffix='.dll'
26108                         cf_depsuf='.dll.a'
26109                         ;;
26110                 (darwin*)
26111                         cf_suffix='.dylib'
26112                         cf_depsuf=$cf_suffix
26113                         ;;
26114                 (hpux*)
26115                         case $target in
26116                         (ia64*)
26117                                 cf_suffix='.so'
26118                                 cf_depsuf=$cf_suffix
26119                                 ;;
26120                         (*)
26121                                 cf_suffix='.sl'
26122                                 cf_depsuf=$cf_suffix
26123                                 ;;
26124                         esac
26125                         ;;
26126                 (*)
26127                         cf_suffix='.so'
26128                         cf_depsuf=$cf_suffix
26129                         ;;
26130                 esac
26131                 ;;
26132         (*)
26133                 cf_suffix='.a'
26134                 cf_depsuf=$cf_suffix
26135                 ;;
26136         esac
26137         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26138         then
26139                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26140                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26141         fi
26142
26143                         cf_libname=$cf_dir
26144                         test "$cf_dir" = c++ && cf_libname=ncurses++
26145                         if test $cf_item = shared ; then
26146                                 if test -n "${LIB_SUFFIX}"
26147                                 then
26148                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26149                                 else
26150                                         cf_shared_suffix="$cf_suffix"
26151                                 fi
26152                                 if test "$cf_cv_do_symlinks" = yes ; then
26153                                         cf_version_name=
26154
26155                                         case "$cf_cv_shlib_version" in
26156                                         (rel)
26157                                                 cf_version_name=REL_VERSION
26158                                                 ;;
26159                                         (abi)
26160                                                 cf_version_name=ABI_VERSION
26161                                                 ;;
26162                                         esac
26163
26164                                         if test -n "$cf_version_name"
26165                                         then
26166                                                 case "$cf_cv_system_name" in
26167                                                 (darwin*)
26168                                                         # "w", etc?
26169                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
26170                                                         ;;
26171                                                 (*)
26172                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
26173                                                         ;;
26174                                                 esac
26175                                         fi
26176                                         if test -n "${USE_LIB_SUFFIX}"
26177                                         then
26178                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26179                                         else
26180                                                 cf_shared_suffix="$cf_suffix"
26181                                         fi
26182                                 fi
26183                                 # cygwin needs import library, and has unique naming convention
26184                                 # use autodetected ${cf_prefix} for import lib and static lib, but
26185                                 # use 'cyg' prefix for shared lib.
26186                                 case $cf_cv_shlib_version in
26187                                 (cygdll)
26188                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26189                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
26190                                         ;;
26191                                 (msysdll)
26192                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26193                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
26194                                         ;;
26195                                 (mingw)
26196                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26197                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
26198                                         ;;
26199                                 (*)
26200                                         cf_add_lib=
26201                                         ;;
26202                                 esac
26203                                 if test -n "$cf_add_lib"
26204                                 then
26205                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26206                                         continue
26207                                 fi
26208                         fi
26209                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
26210                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26211                 done
26212
26213                 if test $cf_dir = ncurses ; then
26214                         cf_subsets="$LIB_SUBSETS"
26215                         cf_r_parts="$cf_subsets"
26216                         cf_liblist="$Libs_To_Make"
26217
26218                         while test -n "$cf_r_parts"
26219                         do
26220                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
26221                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
26222                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
26223                                         cf_add_lib=
26224                                         case $cf_l_parts in
26225                                         (*termlib*)
26226                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
26227                                                 ;;
26228                                         (*ticlib*)
26229                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
26230                                                 ;;
26231                                         (*)
26232                                                 break
26233                                                 ;;
26234                                         esac
26235                                         if test -n "$cf_add_lib"; then
26236                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
26237                                         fi
26238                                 else
26239                                         break
26240                                 fi
26241                         done
26242                 else
26243                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
26244                 fi
26245
26246                 if test $cf_dir = c++; then
26247                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
26248                                 cf_list=
26249                                 for cf_item in $Libs_To_Make
26250                                 do
26251                                         case $cf_item in
26252                                         (*.a)
26253                                                 ;;
26254                                         (*)
26255                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
26256                                                 ;;
26257                                         esac
26258                                         for cf_test in $cf_list
26259                                         do
26260                                                 if test "$cf_test" = "$cf_item"
26261                                                 then
26262                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
26263                                                         cf_item=
26264                                                         break
26265                                                 fi
26266                                         done
26267                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
26268                                 done
26269                                 Libs_To_Make="$cf_list"
26270                         fi
26271                 fi
26272
26273                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
26274                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
26275                         $cf_dir/Makefile >$cf_dir/Makefile.out
26276                 mv $cf_dir/Makefile.out $cf_dir/Makefile
26277
26278                 $AWK -f $srcdir/mk-0th.awk \
26279                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
26280                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26281
26282                 for cf_subset in $cf_subsets
26283                 do
26284                         cf_subdirs=
26285                         for cf_item in $cf_LIST_MODELS
26286                         do
26287
26288                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
26289
26290 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26291
26292                         CXX_MODEL=$cf_ITEM
26293                         if test "$CXX_MODEL" = SHARED; then
26294                                 case $cf_cv_shlib_version in
26295                                 (cygdll|msysdll|mingw)
26296                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
26297
26298 echo "${as_me:-configure}:26298: testing overriding CXX_MODEL to SHARED ..." 1>&5
26299
26300                                         with_shared_cxx=yes
26301                                         ;;
26302                                 (*)
26303                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
26304                                         ;;
26305                                 esac
26306                         fi
26307
26308         case X$cf_item in
26309         (Xlibtool)
26310                 cf_suffix='.la'
26311                 cf_depsuf=$cf_suffix
26312                 ;;
26313         (Xdebug)
26314                 cf_suffix='_g.a'
26315                 cf_depsuf=$cf_suffix
26316                 ;;
26317         (Xprofile)
26318                 cf_suffix='_p.a'
26319                 cf_depsuf=$cf_suffix
26320                 ;;
26321         (Xshared)
26322                 case $cf_cv_system_name in
26323                 (aix[5-7]*)
26324                         cf_suffix='.so'
26325                         cf_depsuf=$cf_suffix
26326                         ;;
26327                 (cygwin*|msys*|mingw*)
26328                         cf_suffix='.dll'
26329                         cf_depsuf='.dll.a'
26330                         ;;
26331                 (darwin*)
26332                         cf_suffix='.dylib'
26333                         cf_depsuf=$cf_suffix
26334                         ;;
26335                 (hpux*)
26336                         case $target in
26337                         (ia64*)
26338                                 cf_suffix='.so'
26339                                 cf_depsuf=$cf_suffix
26340                                 ;;
26341                         (*)
26342                                 cf_suffix='.sl'
26343                                 cf_depsuf=$cf_suffix
26344                                 ;;
26345                         esac
26346                         ;;
26347                 (*)
26348                         cf_suffix='.so'
26349                         cf_depsuf=$cf_suffix
26350                         ;;
26351                 esac
26352                 ;;
26353         (*)
26354                 cf_suffix='.a'
26355                 cf_depsuf=$cf_suffix
26356                 ;;
26357         esac
26358         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26359         then
26360                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26361                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26362         fi
26363
26364         case $cf_item in
26365         (libtool) cf_subdir='obj_lo'  ;;
26366         (normal)  cf_subdir='objects' ;;
26367         (debug)   cf_subdir='obj_g' ;;
26368         (profile) cf_subdir='obj_p' ;;
26369         (shared)
26370                 case $cf_cv_system_name in
26371                 (cygwin|msys)
26372                         cf_subdir='objects' ;;
26373                 (*)
26374                         cf_subdir='obj_s' ;;
26375                 esac
26376         esac
26377
26378                         # Test for case where we build libtinfo with a different name.
26379                         cf_libname=$cf_dir
26380                         if test $cf_dir = ncurses ; then
26381                                 case $cf_subset in
26382                                 (*base*)
26383                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
26384                                         ;;
26385                                 (*termlib*)
26386                                         cf_libname=$TINFO_LIB_SUFFIX
26387                                         ;;
26388                                 (ticlib*)
26389                                         cf_libname=$TICS_LIB_SUFFIX
26390                                         ;;
26391                                 esac
26392                         elif test $cf_dir = c++ ; then
26393                                 cf_libname=ncurses++$USE_LIB_SUFFIX
26394                         else
26395                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
26396                         fi
26397                         if test -n "${USE_ARG_SUFFIX}" ; then
26398                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
26399                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
26400                         fi
26401
26402                         # These dependencies really are for development, not
26403                         # builds, but they are useful in porting, too.
26404                         cf_depend="../include/ncurses_cfg.h"
26405                         if test "$srcdir" = "."; then
26406                                 cf_reldir="."
26407                         else
26408                                 cf_reldir="\${srcdir}"
26409                         fi
26410
26411                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
26412                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
26413                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
26414                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
26415                         fi
26416
26417                         cf_dir_suffix=
26418                         old_cf_suffix="$cf_suffix"
26419                         if test "$cf_cv_shlib_version_infix" = yes ; then
26420                         if test -n "$USE_LIB_SUFFIX" ; then
26421                                 case $USE_LIB_SUFFIX in
26422                                 (tw*)
26423                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
26424                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
26425                                         cf_dir_suffix=tw$EXTRA_SUFFIX
26426                                         ;;
26427                                 (t*)
26428                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
26429                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
26430                                         cf_dir_suffix=t$EXTRA_SUFFIX
26431                                         ;;
26432                                 (w*)
26433                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
26434                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
26435                                         cf_dir_suffix=w$EXTRA_SUFFIX
26436                                         ;;
26437                                 (*)
26438                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
26439                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
26440                                         cf_dir_suffix=$EXTRA_SUFFIX
26441                                         ;;
26442                                 esac
26443                         fi
26444                         fi
26445
26446                         $AWK -f $srcdir/mk-1st.awk \
26447                                 name=${cf_libname}${cf_dir_suffix} \
26448                                 traces=$LIB_TRACING \
26449                                 MODEL=$cf_ITEM \
26450                                 CXX_MODEL=$CXX_MODEL \
26451                                 model=$cf_subdir \
26452                                 prefix=$cf_prefix \
26453                                 suffix=$cf_suffix \
26454                                 subset=$cf_subset \
26455                                 driver=$cf_cv_term_driver \
26456                                 SymLink="$LN_S" \
26457                                 TermlibRoot=$TINFO_NAME \
26458                                 TermlibSuffix=$TINFO_SUFFIX \
26459                                 ShlibVer=$cf_cv_shlib_version \
26460                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
26461                                 ReLink=${cf_cv_do_relink:-no} \
26462                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
26463                                 DoLinks=$cf_cv_do_symlinks \
26464                                 rmSoLocs=$cf_cv_rm_so_locs \
26465                                 ldconfig="$LDCONFIG" \
26466                                 overwrite=$WITH_OVERWRITE \
26467                                 depend="$cf_depend" \
26468                                 host="$host" \
26469                                 libtool_version="$LIBTOOL_VERSION" \
26470                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26471
26472                         cf_suffix="$old_cf_suffix"
26473
26474                         for cf_subdir2 in $cf_subdirs lib
26475                         do
26476                                 test $cf_subdir = $cf_subdir2 && break
26477                         done
26478                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
26479                         $AWK -f $srcdir/mk-2nd.awk \
26480                                 name=$cf_dir \
26481                                 traces=$LIB_TRACING \
26482                                 MODEL=$cf_ITEM \
26483                                 model=$cf_subdir \
26484                                 subset=$cf_subset \
26485                                 srcdir=$srcdir \
26486                                 echo=$WITH_ECHO \
26487                                 crenames=$cf_cv_prog_CC_c_o \
26488                                 cxxrenames=$cf_cv_prog_CXX_c_o \
26489                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26490                         cf_subdirs="$cf_subdirs $cf_subdir"
26491                         done
26492                 done
26493         fi
26494
26495         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
26496 done
26497
26498 for cf_dir in $SRC_SUBDIRS
26499 do
26500         if test ! -d $srcdir/$cf_dir ; then
26501                 continue
26502         fi
26503
26504         if test -f $cf_dir/Makefile ; then
26505                 case "$cf_dir" in
26506                 (Ada95)
26507                         echo 'libs \' >> Makefile
26508                         echo 'install.libs \' >> Makefile
26509                         echo 'uninstall.libs ::' >> Makefile
26510                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
26511                         ;;
26512                 esac
26513         fi
26514
26515         if test -f $srcdir/$cf_dir/modules; then
26516                 echo >> Makefile
26517                 if test -f $srcdir/$cf_dir/headers; then
26518 cat >> Makefile <<CF_EOF
26519 install.includes \\
26520 uninstall.includes \\
26521 CF_EOF
26522                 fi
26523 if test "$cf_dir" != "c++" ; then
26524 echo 'lint \' >> Makefile
26525 fi
26526 cat >> Makefile <<CF_EOF
26527 libs \\
26528 lintlib \\
26529 install.libs \\
26530 uninstall.libs \\
26531 install.$cf_dir \\
26532 uninstall.$cf_dir ::
26533         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26534 CF_EOF
26535         elif test -f $srcdir/$cf_dir/headers; then
26536 cat >> Makefile <<CF_EOF
26537
26538 libs \\
26539 install.libs \\
26540 uninstall.libs \\
26541 install.includes \\
26542 uninstall.includes ::
26543         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26544 CF_EOF
26545 fi
26546 done
26547
26548 if test "x$cf_with_db_install" = xyes; then
26549 cat >> Makefile <<CF_EOF
26550
26551 install.libs uninstall.libs \\
26552 install.data uninstall.data ::
26553 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26554 CF_EOF
26555 else
26556 cat >> Makefile <<CF_EOF
26557
26558 install.libs uninstall.libs ::
26559         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26560 CF_EOF
26561 fi
26562
26563 if test "x$cf_with_manpages" = xyes; then
26564 cat >> Makefile <<CF_EOF
26565
26566 install.man \\
26567 uninstall.man ::
26568         cd man && \${MAKE} \${TOP_MFLAGS} \$@
26569 CF_EOF
26570 fi
26571
26572 cat >> Makefile <<CF_EOF
26573
26574 distclean ::
26575         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
26576         rm -f headers.sh headers.sed mk_shared_lib.sh
26577         rm -f edit_man.* man_alias.*
26578         rm -rf \${DIRS_TO_MAKE}
26579 CF_EOF
26580
26581 # Special case: tack's manpage lives in its own directory.
26582 if test "x$cf_with_manpages" = xyes; then
26583 if test "x$cf_with_tack" = "xyes"; then
26584 cat >> Makefile <<CF_EOF
26585
26586 install.man \\
26587 uninstall.man ::
26588         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
26589 CF_EOF
26590 fi
26591 fi
26592
26593 rm -f headers.sed headers.sh
26594
26595 echo creating headers.sh
26596 cat >headers.sh <<CF_EOF
26597 #! $SHELL
26598 # This shell script is generated by the 'configure' script.  It is invoked in a
26599 # subdirectory of the build tree.  It generates a sed-script in the parent
26600 # directory that is used to adjust includes for header files that reside in a
26601 # subdirectory of /usr/include, etc.
26602 PRG=""
26603 while test \$# != 3
26604 do
26605 PRG="\$PRG \$1"; shift
26606 done
26607 DST=\$1
26608 REF=\$2
26609 SRC=\$3
26610 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
26611 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
26612 echo installing \$SRC in \$DST
26613 CF_EOF
26614
26615 if test $WITH_CURSES_H = yes; then
26616         cat >>headers.sh <<CF_EOF
26617 case \$DST in
26618 (/*/include/*)
26619         END=\`basename \$DST\`
26620         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26621         do
26622                 NAME=\`basename \$i\`
26623                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26624         done
26625         ;;
26626 (*)
26627         echo "" >> \$TMPSED
26628         ;;
26629 esac
26630 CF_EOF
26631
26632 else
26633         cat >>headers.sh <<CF_EOF
26634 case \$DST in
26635 (/*/include/*)
26636         END=\`basename \$DST\`
26637         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26638         do
26639                 NAME=\`basename \$i\`
26640                 if test "\$NAME" = "curses.h"
26641                 then
26642                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26643                         NAME=ncurses.h
26644                 fi
26645                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26646         done
26647         ;;
26648 (*)
26649         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26650         ;;
26651 esac
26652 CF_EOF
26653 fi
26654 cat >>headers.sh <<CF_EOF
26655 rm -f \$TMPSRC
26656 sed -f \$TMPSED \$SRC > \$TMPSRC
26657 NAME=\`basename \$SRC\`
26658 CF_EOF
26659 if test $WITH_CURSES_H != yes; then
26660         cat >>headers.sh <<CF_EOF
26661 test "\$NAME" = "curses.h" && NAME=ncurses.h
26662 CF_EOF
26663 fi
26664 cat >>headers.sh <<CF_EOF
26665 # Just in case someone gzip'd manpages, remove the conflicting copy.
26666 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
26667
26668 eval \$PRG \$TMPSRC \$DST/\$NAME
26669 rm -f \$TMPSRC \$TMPSED
26670 CF_EOF
26671
26672 chmod 0755 headers.sh
26673
26674 for cf_dir in $SRC_SUBDIRS
26675 do
26676         if test ! -d $srcdir/$cf_dir ; then
26677                 continue
26678         fi
26679
26680         if test -f $srcdir/$cf_dir/headers; then
26681                 $AWK -f $srcdir/mk-hdr.awk \
26682                         subset="$LIB_SUBSETS" \
26683                         compat="$WITH_CURSES_H" \
26684                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26685         fi
26686
26687         if test -f $srcdir/$cf_dir/modules; then
26688                 if test "$cf_dir" != "c++" ; then
26689                         cat >>$cf_dir/Makefile <<"CF_EOF"
26690 depend : ${AUTO_SRC}
26691         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26692
26693 # DO NOT DELETE THIS LINE -- make depend depends on it.
26694 CF_EOF
26695                 fi
26696         fi
26697 done
26698
26699 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26700 if test -z "$USE_OLD_MAKERULES" ; then
26701         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26702 fi
26703 fi
26704  ;;
26705   esac
26706 done
26707 EOF
26708
26709 cat >>$CONFIG_STATUS <<\EOF
26710
26711 { (exit 0); exit 0; }
26712 EOF
26713 chmod +x $CONFIG_STATUS
26714 ac_clean_files=$ac_clean_files_save
26715
26716 # configure is writing to config.log, and then calls config.status.
26717 # config.status does its own redirection, appending to config.log.
26718 # Unfortunately, on DOS this fails, as config.log is still kept open
26719 # by configure, so config.status won't be able to write to it; its
26720 # output is simply discarded.  So we exec the FD to /dev/null,
26721 # effectively closing config.log, so it can be properly (re)opened and
26722 # appended to by config.status.  When coming back to configure, we
26723 # need to make the FD available again.
26724 if test "$no_create" != yes; then
26725   ac_cs_success=:
26726   exec 5>/dev/null
26727   $SHELL $CONFIG_STATUS || ac_cs_success=false
26728   exec 5>>config.log
26729   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26730   # would make configure fail if this is the last instruction.
26731   $ac_cs_success || { (exit 1); exit 1; }
26732 fi
26733 ${MAKE:-make} preinstall