]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
92e58ba8fd283aa3b048f493228f57478a7fd460
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.659 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-config-suffix=X  suffixes ncursesXX-config file
716   --with-pkg-config{=path} enable/disable use of pkg-config
717   --with-pkg-config-libdir=XXX use given directory for installing pc-files
718   --enable-pc-files       generate and install .pc files for pkg-config
719   --with-pc-suffix        suffixes pc-files
720   --enable-mixed-case     tic should assume mixed-case filenames
721   --with-install-prefix   prefixes actual install-location ($DESTDIR)
722 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
723   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
724   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
725   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
726   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
727   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
728   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
729 Options to Specify the Libraries Built/Used:
730   --disable-libtool-version  enable to use libtool's incompatible naming scheme
731   --with-libtool          generate libraries with libtool
732   --with-shared           generate shared-libraries
733   --with-normal           generate normal-libraries (default)
734   --with-debug            generate debug-libraries (default)
735   --with-profile          generate profile-libraries
736   --with-cxx-shared       generate C++ shared-libraries
737   --with-lib-prefix       override library-prefix
738   --with-termlib          generate separate terminfo library
739   --with-ticlib           generate separate tic library
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --with-libtool-opts=XXX specify additional libtool options
744   --with-export-syms=XXX  limit exported symbols using libtool
745   --with-versioned-syms=X markup versioned symbols using ld
746   --with-gpm              use Alessandro Rubini's GPM library
747   --without-dlsym         do not use dlsym() to load GPM dynamically
748   --with-sysmouse         use sysmouse (FreeBSD console)
749   --disable-lib-suffixes  disable library suffixes
750   --disable-rpath-hack    don't add rpath options for additional libraries
751 Fine-Tuning Your Configuration:
752   --with-extra-suffix=X   append extra suffix to header/library paths
753   --disable-overwrite     put headers in subdir, omit link to -lcurses
754   --disable-database      do not use terminfo, only fallbacks/termcap
755   --with-database=XXX     specify terminfo source to install
756   --with-hashed-db        specify hashed-database library
757   --with-fallbacks=XXX    specify list of fallback terminal descriptions
758   --without-xterm-new     specify if xterm terminfo should be old version
759   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
760   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
761   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
762   --disable-big-core      assume machine has little memory
763   --disable-big-strings   assume compiler has only standard-size strings
764   --enable-termcap        compile in termcap fallback support
765   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
766   --enable-getcap         fast termcap load, no xrefs to terminfo
767   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
768   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
769   --disable-root-environ  restrict environment when running as root
770   --enable-symlinks       make tic use symbolic links not hard links
771   --enable-broken_linker  compile with broken-linker support code
772   --enable-bsdpad         recognize BSD-style prefix padding
773   --enable-widec          compile with wide-char/UTF-8 code
774   --disable-lp64          allow chtype to be long (ignore _LP64)
775   --disable-largefile     omit support for large files
776   --disable-tparm-varargs compile tparm() without varargs interface
777   --disable-tic-depends   link tic library without explicit dependency on ncurses library
778   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
779   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
780   --with-bool=TYPE        override fallback type of bool variable
781   --with-caps=alt         compile with alternate Caps file
782   --with-chtype=TYPE      override type of chtype
783   --with-ospeed=TYPE      override type of ospeed variable
784   --with-mmask-t=TYPE     override type of mmask_t
785   --with-ccharw-max=XXX   override size CCHARW_MAX
786   --enable-signed-char    compile using signed Boolean's in term.h
787   --with-tparm-arg=TYPE   override parameter type of tparm
788   --with-rcs-ids          compile-in RCS identifiers
789 Options to Specify How Manpages are Installed:
790   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
791                           optionally formatted/catonly, e.g., gzip,formatted
792   --with-manpage-renames  specify manpage-renaming
793   --with-manpage-aliases  specify manpage-aliases using .so
794   --with-manpage-symlinks specify manpage-aliases using symlinks
795   --with-manpage-tbl      specify manpage processing with tbl
796 Extensions:
797   --disable-ext-funcs     disable function-extensions
798   --enable-sp-funcs       enable SCREEN-extensions
799   --enable-term-driver    enable terminal-driver
800   --enable-const          compile with extra/non-standard const
801   --enable-ext-colors     compile for 256-color support
802   --enable-ext-mouse      compile for extended mouse-encoding
803   --enable-ext-putwin     compile with extended putwin/screendump
804   --enable-no-padding     compile with $NCURSES_NO_PADDING code
805   --enable-sigwinch       compile with SIGWINCH handler
806   --enable-tcap-names     compile with user-definable terminal capabilities
807 Reentrant Code:
808   --with-pthread          use POSIX thread library
809   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
810   --enable-weak-symbols   enable weak-symbols for pthreads
811   --enable-reentrant      compile with reentrant code
812   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
813   --enable-opaque-form    make form-library structures "opaque"
814   --enable-opaque-menu    make menu-library structures "opaque"
815   --enable-opaque-panel   make panel-library structures "opaque"
816   --with-wrap-prefix=XXX  override prefix used for public variables
817 Development Code:
818   --without-develop       disable development options
819   --enable-hard-tabs      compile with hard-tabs code
820   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
821 Experimental Code:
822   --disable-assumed-color do not assume anything about default-colors
823   --disable-hashmap       compile without hashmap scrolling-optimization
824   --enable-colorfgbg      compile-in experimental $COLORFGBG code
825   --enable-interop        compile-in interop bindings
826   --enable-safe-sprintf   compile with experimental safe-sprintf code
827   --disable-scroll-hints  compile without scroll-hints code
828   --enable-wgetch-events  compile with wgetch-events code
829 Testing/development Options:
830   --disable-echo          do not display "compiling" commands
831   --disable-stripping     do not strip installed executables
832   --enable-warnings       build: turn on GCC compiler warnings
833   --enable-string-hacks   work around bogus compiler/loader warnings
834   --enable-assertions     test: turn on generation of assertion code
835   --with-dmalloc          test: use Gray Watson's dmalloc library
836   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
837   --with-valgrind         test: use valgrind
838   --disable-leaks         test: free permanent memory, analyze leaks
839   --enable-expanded       test: generate functions for certain macros
840   --disable-macros        test: use functions rather than macros
841   --with-trace            test: add trace() function to all models of ncurses
842   --disable-gnat-projects test: disable GNAT projects even if usable
843 Ada95 Binding Options:
844   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
845   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
846   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
847   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
848
849 Some influential environment variables:
850   CC          C compiler command
851   CFLAGS      C compiler flags
852   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
853               nonstandard directory <lib dir>
854   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
855               headers in a nonstandard directory <include dir>
856   CPP         C preprocessor
857   CXX         C++ compiler command
858   CXXFLAGS    C++ compiler flags
859   CXXCPP      C++ preprocessor
860
861 Use these variables to override the choices made by `configure' or to help
862 it to find libraries and programs with nonstandard names/locations.
863
864 EOF
865 fi
866
867 if test "$ac_init_help" = "recursive"; then
868   # If there are subdirs, report their specific --help.
869   ac_popdir=`pwd`
870   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
871     cd $ac_subdir
872     # A "../" for each directory in /$ac_subdir.
873     ac_dots=`echo $ac_subdir |
874              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
875
876     case $srcdir in
877     .) # No --srcdir option.  We are building in place.
878       ac_sub_srcdir=$srcdir ;;
879     [\\/]* | ?:[\\/]* ) # Absolute path.
880       ac_sub_srcdir=$srcdir/$ac_subdir ;;
881     *) # Relative path.
882       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
883     esac
884
885     # Check for guested configure; otherwise get Cygnus style configure.
886     if test -f $ac_sub_srcdir/configure.gnu; then
887       echo
888       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
889     elif test -f $ac_sub_srcdir/configure; then
890       echo
891       $SHELL $ac_sub_srcdir/configure  --help=recursive
892     elif test -f $ac_sub_srcdir/configure.ac ||
893            test -f $ac_sub_srcdir/configure.in; then
894       echo
895       $ac_configure --help
896     else
897       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
898     fi
899     cd $ac_popdir
900   done
901 fi
902
903 test -n "$ac_init_help" && exit 0
904 if $ac_init_version; then
905   cat <<\EOF
906
907 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
908 Free Software Foundation, Inc.
909 This configure script is free software; the Free Software Foundation
910 gives unlimited permission to copy, distribute and modify it.
911 EOF
912   exit 0
913 fi
914 exec 5>config.log
915 cat >&5 <<EOF
916 This file contains any messages produced by compilers while
917 running configure, to aid debugging if configure makes a mistake.
918
919 It was created by $as_me, which was
920 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
921
922   $ $0 $@
923
924 EOF
925 {
926 cat <<_ASUNAME
927 ## ---------- ##
928 ## Platform.  ##
929 ## ---------- ##
930
931 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
932 uname -m = `(uname -m) 2>/dev/null || echo unknown`
933 uname -r = `(uname -r) 2>/dev/null || echo unknown`
934 uname -s = `(uname -s) 2>/dev/null || echo unknown`
935 uname -v = `(uname -v) 2>/dev/null || echo unknown`
936
937 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
938 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
939
940 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
941 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
942 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
943 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
944 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
945 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
946 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
947
948 PATH = $PATH
949
950 _ASUNAME
951 } >&5
952
953 cat >&5 <<EOF
954 ## ------------ ##
955 ## Core tests.  ##
956 ## ------------ ##
957
958 EOF
959
960 # Keep a trace of the command line.
961 # Strip out --no-create and --no-recursion so they do not pile up.
962 # Also quote any args containing shell meta-characters.
963 ac_configure_args=
964 ac_sep=
965 for ac_arg
966 do
967   case $ac_arg in
968   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
969   | --no-cr | --no-c) ;;
970   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
971   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
972   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
973     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
974     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
975     ac_sep=" " ;;
976   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
977      ac_sep=" " ;;
978   esac
979   # Get rid of the leading space.
980 done
981
982 # When interrupted or exit'd, cleanup temporary files, and complete
983 # config.log.  We remove comments because anyway the quotes in there
984 # would cause problems or look ugly.
985 trap 'exit_status=$?
986   # Save into config.log some information that might help in debugging.
987   echo >&5
988   echo "## ----------------- ##" >&5
989   echo "## Cache variables.  ##" >&5
990   echo "## ----------------- ##" >&5
991   echo >&5
992   # The following way of writing the cache mishandles newlines in values,
993 {
994   (set) 2>&1 |
995     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
996     *ac_space=\ *)
997       sed -n \
998         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
999           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1000       ;;
1001     *)
1002       sed -n \
1003         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1004       ;;
1005     esac;
1006 } >&5
1007   sed "/^$/d" confdefs.h >conftest.log
1008   if test -s conftest.log; then
1009     echo >&5
1010     echo "## ------------ ##" >&5
1011     echo "## confdefs.h.  ##" >&5
1012     echo "## ------------ ##" >&5
1013     echo >&5
1014     cat conftest.log >&5
1015   fi
1016   (echo; echo) >&5
1017   test "$ac_signal" != 0 &&
1018     echo "$as_me: caught signal $ac_signal" >&5
1019   echo "$as_me: exit $exit_status" >&5
1020   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1021     exit $exit_status
1022      ' 0
1023 for ac_signal in 1 2 13 15; do
1024   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1025 done
1026 ac_signal=0
1027
1028 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1029 rm -rf conftest* confdefs.h
1030 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1031 echo >confdefs.h
1032
1033 # Let the site file select an alternate cache file if it wants to.
1034 # Prefer explicitly selected file to automatically selected ones.
1035 if test -z "$CONFIG_SITE"; then
1036   if test "x$prefix" != xNONE; then
1037     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1038   else
1039     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1040   fi
1041 fi
1042 for ac_site_file in $CONFIG_SITE; do
1043   if test -r "$ac_site_file"; then
1044     { echo "$as_me:1044: loading site script $ac_site_file" >&5
1045 echo "$as_me: loading site script $ac_site_file" >&6;}
1046     cat "$ac_site_file" >&5
1047     . "$ac_site_file"
1048   fi
1049 done
1050
1051 if test -r "$cache_file"; then
1052   # Some versions of bash will fail to source /dev/null (special
1053   # files actually), so we avoid doing that.
1054   if test -f "$cache_file"; then
1055     { echo "$as_me:1055: loading cache $cache_file" >&5
1056 echo "$as_me: loading cache $cache_file" >&6;}
1057     case $cache_file in
1058       [\\/]* | ?:[\\/]* ) . $cache_file;;
1059       *)                      . ./$cache_file;;
1060     esac
1061   fi
1062 else
1063   { echo "$as_me:1063: creating cache $cache_file" >&5
1064 echo "$as_me: creating cache $cache_file" >&6;}
1065   >$cache_file
1066 fi
1067
1068 # Check that the precious variables saved in the cache have kept the same
1069 # value.
1070 ac_cache_corrupted=false
1071 for ac_var in `(set) 2>&1 |
1072                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1073   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1074   eval ac_new_set=\$ac_env_${ac_var}_set
1075   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1076   eval ac_new_val="\$ac_env_${ac_var}_value"
1077   case $ac_old_set,$ac_new_set in
1078     set,)
1079       { echo "$as_me:1079: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1080 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1081       ac_cache_corrupted=: ;;
1082     ,set)
1083       { echo "$as_me:1083: error: \`$ac_var' was not set in the previous run" >&5
1084 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1085       ac_cache_corrupted=: ;;
1086     ,);;
1087     *)
1088       if test "x$ac_old_val" != "x$ac_new_val"; then
1089         { echo "$as_me:1089: error: \`$ac_var' has changed since the previous run:" >&5
1090 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1091         { echo "$as_me:1091:   former value:  $ac_old_val" >&5
1092 echo "$as_me:   former value:  $ac_old_val" >&2;}
1093         { echo "$as_me:1093:   current value: $ac_new_val" >&5
1094 echo "$as_me:   current value: $ac_new_val" >&2;}
1095         ac_cache_corrupted=:
1096       fi;;
1097   esac
1098   # Pass precious variables to config.status.  It doesn't matter if
1099   # we pass some twice (in addition to the command line arguments).
1100   if test "$ac_new_set" = set; then
1101     case $ac_new_val in
1102     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1103       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1104       ac_configure_args="$ac_configure_args '$ac_arg'"
1105       ;;
1106     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1107        ;;
1108     esac
1109   fi
1110 done
1111 if $ac_cache_corrupted; then
1112   { echo "$as_me:1112: error: changes in the environment can compromise the build" >&5
1113 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1114   { { echo "$as_me:1114: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1115 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1116    { (exit 1); exit 1; }; }
1117 fi
1118
1119 ac_ext=c
1120 ac_cpp='$CPP $CPPFLAGS'
1121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1124 ac_main_return=return
1125
1126 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1127   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1128                    ECHO_T='     ' ;;
1129   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1130   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1131 esac
1132 echo "#! $SHELL" >conftest.sh
1133 echo  "exit 0"   >>conftest.sh
1134 chmod +x conftest.sh
1135 if { (echo "$as_me:1135: PATH=\".;.\"; conftest.sh") >&5
1136   (PATH=".;."; conftest.sh) 2>&5
1137   ac_status=$?
1138   echo "$as_me:1138: \$? = $ac_status" >&5
1139   (exit $ac_status); }; then
1140   ac_path_separator=';'
1141 else
1142   ac_path_separator=:
1143 fi
1144 PATH_SEPARATOR="$ac_path_separator"
1145 rm -f conftest.sh
1146
1147 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1148
1149 top_builddir=`pwd`
1150
1151 echo "$as_me:1151: checking for egrep" >&5
1152 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1153 if test "${ac_cv_prog_egrep+set}" = set; then
1154   echo $ECHO_N "(cached) $ECHO_C" >&6
1155 else
1156   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1157                 then ac_cv_prog_egrep='grep -E'
1158                 else ac_cv_prog_egrep='egrep'
1159         fi
1160 fi
1161 echo "$as_me:1161: result: $ac_cv_prog_egrep" >&5
1162 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1163         EGREP=$ac_cv_prog_egrep
1164
1165         test -z "$EGREP" && { { echo "$as_me:1165: error: No egrep program found" >&5
1166 echo "$as_me: error: No egrep program found" >&2;}
1167    { (exit 1); exit 1; }; }
1168
1169 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1170 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1171 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1172 cf_cv_abi_version=${NCURSES_MAJOR}
1173 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1174 cf_cv_timestamp=`date`
1175 echo "$as_me:1175: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1176 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1177
1178 if test -f $srcdir/VERSION ; then
1179         echo "$as_me:1179: checking for package version" >&5
1180 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1181
1182         # if there are not enough fields, cut returns the last one...
1183         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1184         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1185         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1186
1187         # this is how CF_BUNDLED_INTL uses $VERSION:
1188         VERSION="$cf_field1"
1189
1190         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1191         test -z "$VERSION_MAJOR" && { { echo "$as_me:1191: error: missing major-version" >&5
1192 echo "$as_me: error: missing major-version" >&2;}
1193    { (exit 1); exit 1; }; }
1194
1195         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1196         test -z "$VERSION_MINOR" && { { echo "$as_me:1196: error: missing minor-version" >&5
1197 echo "$as_me: error: missing minor-version" >&2;}
1198    { (exit 1); exit 1; }; }
1199
1200         echo "$as_me:1200: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1201 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1202
1203         echo "$as_me:1203: checking for package patch date" >&5
1204 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1205         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1206         case .$VERSION_PATCH in
1207         (.)
1208                 { { echo "$as_me:1208: error: missing patch-date $VERSION_PATCH" >&5
1209 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1210    { (exit 1); exit 1; }; }
1211                 ;;
1212         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1213                 ;;
1214         (*)
1215                 { { echo "$as_me:1215: error: illegal patch-date $VERSION_PATCH" >&5
1216 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1217    { (exit 1); exit 1; }; }
1218                 ;;
1219         esac
1220         echo "$as_me:1220: result: $VERSION_PATCH" >&5
1221 echo "${ECHO_T}$VERSION_PATCH" >&6
1222 else
1223         { { echo "$as_me:1223: error: did not find $srcdir/VERSION" >&5
1224 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1225    { (exit 1); exit 1; }; }
1226 fi
1227
1228 # show the actual data that we have for versions:
1229 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing ABI VERSION $VERSION ..." 1>&5
1232
1233 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1234
1235 echo "${as_me:-configure}:1235: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1236
1237 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1238
1239 echo "${as_me:-configure}:1239: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1240
1241 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1242
1243 echo "${as_me:-configure}:1243: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1244
1245         cf_PACKAGE=NCURSES
1246         PACKAGE=ncurses
1247
1248 cat >>confdefs.h <<EOF
1249 #define PACKAGE "$PACKAGE"
1250 EOF
1251
1252 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1253
1254         cat >>confdefs.h <<EOF
1255 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1256 EOF
1257
1258         cat >>confdefs.h <<EOF
1259 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1260 EOF
1261
1262 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1263
1264 # Check whether --with-rel-version or --without-rel-version was given.
1265 if test "${with_rel_version+set}" = set; then
1266   withval="$with_rel_version"
1267   { echo "$as_me:1267: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1268 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1269  cf_cv_rel_version=$withval
1270 fi;
1271
1272  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1273  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1274
1275 if test -n "$NCURSES_MAJOR" ; then
1276   case $NCURSES_MAJOR in
1277   ([0-9]*)
1278         ;;
1279   (*)
1280         { { echo "$as_me:1280: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1281 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1282    { (exit 1); exit 1; }; }
1283         ;;
1284   esac
1285 else
1286   { { echo "$as_me:1286: error: Release major-version value is empty" >&5
1287 echo "$as_me: error: Release major-version value is empty" >&2;}
1288    { (exit 1); exit 1; }; }
1289 fi
1290
1291 if test -n "$NCURSES_MINOR" ; then
1292   case $NCURSES_MINOR in
1293   ([0-9]*)
1294         ;;
1295   (*)
1296         { { echo "$as_me:1296: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1297 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1298    { (exit 1); exit 1; }; }
1299         ;;
1300   esac
1301 else
1302   { { echo "$as_me:1302: error: Release minor-version value is empty" >&5
1303 echo "$as_me: error: Release minor-version value is empty" >&2;}
1304    { (exit 1); exit 1; }; }
1305 fi
1306
1307 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1308
1309 # Check whether --with-abi-version or --without-abi-version was given.
1310 if test "${with_abi_version+set}" = set; then
1311   withval="$with_abi_version"
1312
1313         if test "x$cf_cv_abi_version" != "x$withval"
1314         then
1315                 { echo "$as_me:1315: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1316 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1317                 case $cf_cv_rel_version in
1318                 (5.*)
1319                         cf_cv_rel_version=$withval.0
1320                         ;;
1321                 (6.*)
1322                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1323                         ;;
1324                 esac
1325         fi
1326         cf_cv_abi_version=$withval
1327 fi;
1328
1329 if test -n "$cf_cv_abi_version" ; then
1330   case $cf_cv_abi_version in
1331   ([0-9]*)
1332         ;;
1333   (*)
1334         { { echo "$as_me:1334: error: ABI version is not a number: $cf_cv_abi_version" >&5
1335 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1336    { (exit 1); exit 1; }; }
1337         ;;
1338   esac
1339 else
1340   { { echo "$as_me:1340: error: ABI version value is empty" >&5
1341 echo "$as_me: error: ABI version value is empty" >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344
1345 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1346 then
1347         case $cf_cv_rel_version in
1348         (5.*)
1349                 cf_cv_rel_version=$with_abi_version.0
1350                 ;;
1351         esac
1352 fi
1353
1354 ac_aux_dir=
1355 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1356   if test -f $ac_dir/install-sh; then
1357     ac_aux_dir=$ac_dir
1358     ac_install_sh="$ac_aux_dir/install-sh -c"
1359     break
1360   elif test -f $ac_dir/install.sh; then
1361     ac_aux_dir=$ac_dir
1362     ac_install_sh="$ac_aux_dir/install.sh -c"
1363     break
1364   elif test -f $ac_dir/shtool; then
1365     ac_aux_dir=$ac_dir
1366     ac_install_sh="$ac_aux_dir/shtool install -c"
1367     break
1368   fi
1369 done
1370 if test -z "$ac_aux_dir"; then
1371   { { echo "$as_me:1371: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1372 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1373    { (exit 1); exit 1; }; }
1374 fi
1375 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1376 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1377 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1378
1379 # Make sure we can run config.sub.
1380 $ac_config_sub sun4 >/dev/null 2>&1 ||
1381   { { echo "$as_me:1381: error: cannot run $ac_config_sub" >&5
1382 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1383    { (exit 1); exit 1; }; }
1384
1385 echo "$as_me:1385: checking build system type" >&5
1386 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1387 if test "${ac_cv_build+set}" = set; then
1388   echo $ECHO_N "(cached) $ECHO_C" >&6
1389 else
1390   ac_cv_build_alias=$build_alias
1391 test -z "$ac_cv_build_alias" &&
1392   ac_cv_build_alias=`$ac_config_guess`
1393 test -z "$ac_cv_build_alias" &&
1394   { { echo "$as_me:1394: error: cannot guess build type; you must specify one" >&5
1395 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1396    { (exit 1); exit 1; }; }
1397 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1398   { { echo "$as_me:1398: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1399 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1400    { (exit 1); exit 1; }; }
1401
1402 fi
1403 echo "$as_me:1403: result: $ac_cv_build" >&5
1404 echo "${ECHO_T}$ac_cv_build" >&6
1405 build=$ac_cv_build
1406 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1407 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1408 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1409
1410 echo "$as_me:1410: checking host system type" >&5
1411 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1412 if test "${ac_cv_host+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   ac_cv_host_alias=$host_alias
1416 test -z "$ac_cv_host_alias" &&
1417   ac_cv_host_alias=$ac_cv_build_alias
1418 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1419   { { echo "$as_me:1419: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:1424: result: $ac_cv_host" >&5
1425 echo "${ECHO_T}$ac_cv_host" >&6
1426 host=$ac_cv_host
1427 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1432         echo "$as_me:1432: checking target system type" >&5
1433 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1434 if test "${ac_cv_target+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_target_alias=$target_alias
1438 test "x$ac_cv_target_alias" = "x" &&
1439   ac_cv_target_alias=$ac_cv_host_alias
1440 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1441   { { echo "$as_me:1441: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:1446: result: $ac_cv_target" >&5
1447 echo "${ECHO_T}$ac_cv_target" >&6
1448 target=$ac_cv_target
1449 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453 # The aliases save the names the user supplied, while $host etc.
1454 # will get canonicalized.
1455 test -n "$target_alias" &&
1456   test "$program_prefix$program_suffix$program_transform_name" = \
1457     NONENONEs,x,x, &&
1458   program_prefix=${target_alias}-
1459         system_name="$host_os"
1460 else
1461         system_name="`(uname -s -r) 2>/dev/null`"
1462         if test -z "$system_name" ; then
1463                 system_name="`(hostname) 2>/dev/null`"
1464         fi
1465 fi
1466 test -n "$system_name" &&
1467 cat >>confdefs.h <<EOF
1468 #define SYSTEM_NAME "$system_name"
1469 EOF
1470
1471 if test "${cf_cv_system_name+set}" = set; then
1472   echo $ECHO_N "(cached) $ECHO_C" >&6
1473 else
1474   cf_cv_system_name="$system_name"
1475 fi
1476
1477 test -z "$system_name" && system_name="$cf_cv_system_name"
1478 test -n "$cf_cv_system_name" && echo "$as_me:1478: result: Configuring for $cf_cv_system_name" >&5
1479 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1480
1481 if test ".$system_name" != ".$cf_cv_system_name" ; then
1482         echo "$as_me:1482: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1483 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1484         { { echo "$as_me:1484: error: \"Please remove config.cache and try again.\"" >&5
1485 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1486    { (exit 1); exit 1; }; }
1487 fi
1488
1489 # Check whether --with-system-type or --without-system-type was given.
1490 if test "${with_system_type+set}" = set; then
1491   withval="$with_system_type"
1492   { echo "$as_me:1492: WARNING: overriding system type to $withval" >&5
1493 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1494         cf_cv_system_name=$withval
1495         host_os=$withval
1496
1497 fi;
1498
1499 ###     Save the given $CFLAGS to allow user-override.
1500 cf_user_CFLAGS="$CFLAGS"
1501
1502 ###     Default install-location
1503
1504 echo "$as_me:1504: checking for prefix" >&5
1505 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1506 if test "x$prefix" = "xNONE" ; then
1507         case "$cf_cv_system_name" in
1508                 # non-vendor systems don't have a conflict
1509         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1510                 prefix=/usr
1511                 ;;
1512         (*)     prefix=$ac_default_prefix
1513                 ;;
1514         esac
1515 fi
1516 echo "$as_me:1516: result: $prefix" >&5
1517 echo "${ECHO_T}$prefix" >&6
1518
1519 if test "x$prefix" = "xNONE" ; then
1520 echo "$as_me:1520: checking for default include-directory" >&5
1521 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1522 test -n "$verbose" && echo 1>&6
1523 for cf_symbol in \
1524         $includedir \
1525         $includedir/ncurses \
1526         $prefix/include \
1527         $prefix/include/ncurses \
1528         /usr/local/include \
1529         /usr/local/include/ncurses \
1530         /usr/include \
1531         /usr/include/ncurses
1532 do
1533         cf_dir=`eval echo $cf_symbol`
1534         if test -f $cf_dir/curses.h ; then
1535         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1536                 includedir="$cf_symbol"
1537                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1538                 break
1539         fi
1540         fi
1541         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1542 done
1543 echo "$as_me:1543: result: $includedir" >&5
1544 echo "${ECHO_T}$includedir" >&6
1545 fi
1546
1547 ### Defaults for ncurses ABI
1548
1549 case x$cf_cv_abi_version in
1550 (x[6789])
1551         cf_dft_ext_colors=yes
1552         cf_dft_ext_const=yes
1553         cf_dft_ext_mouse=yes
1554         cf_dft_ext_putwin=yes
1555         cf_dft_ext_spfuncs=yes
1556         cf_dft_filter_syms=yes
1557         cf_dft_chtype=uint32_t
1558         cf_dft_mmask_t=uint32_t
1559         cf_dft_interop=yes
1560         cf_dft_tparm_arg=intptr_t
1561         cf_dft_with_lp64=yes
1562         ;;
1563 (*)
1564         cf_dft_ext_colors=no
1565         cf_dft_ext_const=no
1566         cf_dft_ext_mouse=no
1567         cf_dft_ext_putwin=no
1568         cf_dft_ext_spfuncs=no
1569         cf_dft_filter_syms=no
1570         cf_dft_chtype=auto
1571         cf_dft_mmask_t=auto
1572         cf_dft_interop=no
1573         cf_dft_tparm_arg=long
1574         cf_dft_with_lp64=no
1575         ;;
1576 esac
1577
1578 ###     Checks for programs.
1579
1580 # Check whether --with-ada or --without-ada was given.
1581 if test "${with_ada+set}" = set; then
1582   withval="$with_ada"
1583   cf_with_ada=$withval
1584 else
1585   cf_with_ada=yes
1586 fi;
1587 if test "x$cf_with_ada" = xyes
1588 then
1589         cf_PROG_CC="gnatgcc gcc cc"
1590 else
1591         cf_PROG_CC="gcc cc"
1592 fi
1593
1594 ac_ext=c
1595 ac_cpp='$CPP $CPPFLAGS'
1596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1599 ac_main_return=return
1600 if test -n "$ac_tool_prefix"; then
1601   for ac_prog in $cf_PROG_CC
1602   do
1603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1605 echo "$as_me:1605: checking for $ac_word" >&5
1606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1607 if test "${ac_cv_prog_CC+set}" = set; then
1608   echo $ECHO_N "(cached) $ECHO_C" >&6
1609 else
1610   if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   ac_save_IFS=$IFS; IFS=$ac_path_separator
1614 ac_dummy="$PATH"
1615 for ac_dir in $ac_dummy; do
1616   IFS=$ac_save_IFS
1617   test -z "$ac_dir" && ac_dir=.
1618   $as_executable_p "$ac_dir/$ac_word" || continue
1619 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1620 echo "$as_me:1620: found $ac_dir/$ac_word" >&5
1621 break
1622 done
1623
1624 fi
1625 fi
1626 CC=$ac_cv_prog_CC
1627 if test -n "$CC"; then
1628   echo "$as_me:1628: result: $CC" >&5
1629 echo "${ECHO_T}$CC" >&6
1630 else
1631   echo "$as_me:1631: result: no" >&5
1632 echo "${ECHO_T}no" >&6
1633 fi
1634
1635     test -n "$CC" && break
1636   done
1637 fi
1638 if test -z "$CC"; then
1639   ac_ct_CC=$CC
1640   for ac_prog in $cf_PROG_CC
1641 do
1642   # Extract the first word of "$ac_prog", so it can be a program name with args.
1643 set dummy $ac_prog; ac_word=$2
1644 echo "$as_me:1644: checking for $ac_word" >&5
1645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   if test -n "$ac_ct_CC"; then
1650   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1651 else
1652   ac_save_IFS=$IFS; IFS=$ac_path_separator
1653 ac_dummy="$PATH"
1654 for ac_dir in $ac_dummy; do
1655   IFS=$ac_save_IFS
1656   test -z "$ac_dir" && ac_dir=.
1657   $as_executable_p "$ac_dir/$ac_word" || continue
1658 ac_cv_prog_ac_ct_CC="$ac_prog"
1659 echo "$as_me:1659: found $ac_dir/$ac_word" >&5
1660 break
1661 done
1662
1663 fi
1664 fi
1665 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1666 if test -n "$ac_ct_CC"; then
1667   echo "$as_me:1667: result: $ac_ct_CC" >&5
1668 echo "${ECHO_T}$ac_ct_CC" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$ac_ct_CC" && break
1675 done
1676
1677   CC=$ac_ct_CC
1678 fi
1679
1680 test -z "$CC" && { { echo "$as_me:1680: error: no acceptable cc found in \$PATH" >&5
1681 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1682    { (exit 1); exit 1; }; }
1683
1684 # Provide some information about the compiler.
1685 echo "$as_me:1685:" \
1686      "checking for C compiler version" >&5
1687 ac_compiler=`set X $ac_compile; echo $2`
1688 { (eval echo "$as_me:1688: \"$ac_compiler --version </dev/null >&5\"") >&5
1689   (eval $ac_compiler --version </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -v </dev/null >&5\"") >&5
1694   (eval $ac_compiler -v </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698 { (eval echo "$as_me:1698: \"$ac_compiler -V </dev/null >&5\"") >&5
1699   (eval $ac_compiler -V </dev/null >&5) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); }
1703
1704 cat >conftest.$ac_ext <<_ACEOF
1705 #line 1705 "configure"
1706 #include "confdefs.h"
1707
1708 int
1709 main (void)
1710 {
1711
1712   ;
1713   return 0;
1714 }
1715 _ACEOF
1716 ac_clean_files_save=$ac_clean_files
1717 ac_clean_files="$ac_clean_files a.out a.exe"
1718 # Try to create an executable without -o first, disregard a.out.
1719 # It will help us diagnose broken compilers, and finding out an intuition
1720 # of exeext.
1721 echo "$as_me:1721: checking for C compiler default output" >&5
1722 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1723 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1724 if { (eval echo "$as_me:1724: \"$ac_link_default\"") >&5
1725   (eval $ac_link_default) 2>&5
1726   ac_status=$?
1727   echo "$as_me:1727: \$? = $ac_status" >&5
1728   (exit $ac_status); }; then
1729   # Find the output, starting from the most likely.  This scheme is
1730 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1731 # resort.
1732 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1733                 ls a.out conftest 2>/dev/null;
1734                 ls a.* conftest.* 2>/dev/null`; do
1735   case $ac_file in
1736     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1737     a.out ) # We found the default executable, but exeext='' is most
1738             # certainly right.
1739             break;;
1740     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1741           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1742           export ac_cv_exeext
1743           break;;
1744     * ) break;;
1745   esac
1746 done
1747 else
1748   echo "$as_me: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1750 { { echo "$as_me:1750: error: C compiler cannot create executables" >&5
1751 echo "$as_me: error: C compiler cannot create executables" >&2;}
1752    { (exit 77); exit 77; }; }
1753 fi
1754
1755 ac_exeext=$ac_cv_exeext
1756 echo "$as_me:1756: result: $ac_file" >&5
1757 echo "${ECHO_T}$ac_file" >&6
1758
1759 # Check the compiler produces executables we can run.  If not, either
1760 # the compiler is broken, or we cross compile.
1761 echo "$as_me:1761: checking whether the C compiler works" >&5
1762 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1763 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764 # If not cross compiling, check that we can run a simple program.
1765 if test "$cross_compiling" != yes; then
1766   if { ac_try='./$ac_file'
1767   { (eval echo "$as_me:1767: \"$ac_try\"") >&5
1768   (eval $ac_try) 2>&5
1769   ac_status=$?
1770   echo "$as_me:1770: \$? = $ac_status" >&5
1771   (exit $ac_status); }; }; then
1772     cross_compiling=no
1773   else
1774     if test "$cross_compiling" = maybe; then
1775         cross_compiling=yes
1776     else
1777         { { echo "$as_me:1777: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&5
1779 echo "$as_me: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&2;}
1781    { (exit 1); exit 1; }; }
1782     fi
1783   fi
1784 fi
1785 echo "$as_me:1785: result: yes" >&5
1786 echo "${ECHO_T}yes" >&6
1787
1788 rm -f a.out a.exe conftest$ac_cv_exeext
1789 ac_clean_files=$ac_clean_files_save
1790 # Check the compiler produces executables we can run.  If not, either
1791 # the compiler is broken, or we cross compile.
1792 echo "$as_me:1792: checking whether we are cross compiling" >&5
1793 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794 echo "$as_me:1794: result: $cross_compiling" >&5
1795 echo "${ECHO_T}$cross_compiling" >&6
1796
1797 echo "$as_me:1797: checking for executable suffix" >&5
1798 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1799 if { (eval echo "$as_me:1799: \"$ac_link\"") >&5
1800   (eval $ac_link) 2>&5
1801   ac_status=$?
1802   echo "$as_me:1802: \$? = $ac_status" >&5
1803   (exit $ac_status); }; then
1804   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1806 # work properly (i.e., refer to `conftest.exe'), while it won't with
1807 # `rm'.
1808 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1809   case $ac_file in
1810     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1811     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1812           export ac_cv_exeext
1813           break;;
1814     * ) break;;
1815   esac
1816 done
1817 else
1818   { { echo "$as_me:1818: error: cannot compute EXEEXT: cannot compile and link" >&5
1819 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1820    { (exit 1); exit 1; }; }
1821 fi
1822
1823 rm -f conftest$ac_cv_exeext
1824 echo "$as_me:1824: result: $ac_cv_exeext" >&5
1825 echo "${ECHO_T}$ac_cv_exeext" >&6
1826
1827 rm -f conftest.$ac_ext
1828 EXEEXT=$ac_cv_exeext
1829 ac_exeext=$EXEEXT
1830 echo "$as_me:1830: checking for object suffix" >&5
1831 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1832 if test "${ac_cv_objext+set}" = set; then
1833   echo $ECHO_N "(cached) $ECHO_C" >&6
1834 else
1835   cat >conftest.$ac_ext <<_ACEOF
1836 #line 1836 "configure"
1837 #include "confdefs.h"
1838
1839 int
1840 main (void)
1841 {
1842
1843   ;
1844   return 0;
1845 }
1846 _ACEOF
1847 rm -f conftest.o conftest.obj
1848 if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5
1849   (eval $ac_compile) 2>&5
1850   ac_status=$?
1851   echo "$as_me:1851: \$? = $ac_status" >&5
1852   (exit $ac_status); }; then
1853   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1854   case $ac_file in
1855     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1856     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1857        break;;
1858   esac
1859 done
1860 else
1861   echo "$as_me: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1863 { { echo "$as_me:1863: error: cannot compute OBJEXT: cannot compile" >&5
1864 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1865    { (exit 1); exit 1; }; }
1866 fi
1867
1868 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1869 fi
1870 echo "$as_me:1870: result: $ac_cv_objext" >&5
1871 echo "${ECHO_T}$ac_cv_objext" >&6
1872 OBJEXT=$ac_cv_objext
1873 ac_objext=$OBJEXT
1874 echo "$as_me:1874: checking whether we are using the GNU C compiler" >&5
1875 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1876 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   cat >conftest.$ac_ext <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886 #ifndef __GNUC__
1887        choke me
1888 #endif
1889
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   ac_compiler_gnu=yes
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 ac_compiler_gnu=no
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1914
1915 fi
1916 echo "$as_me:1916: result: $ac_cv_c_compiler_gnu" >&5
1917 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1918 GCC=`test $ac_compiler_gnu = yes && echo yes`
1919 ac_test_CFLAGS=${CFLAGS+set}
1920 ac_save_CFLAGS=$CFLAGS
1921 CFLAGS="-g"
1922 echo "$as_me:1922: checking whether $CC accepts -g" >&5
1923 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1924 if test "${ac_cv_prog_cc_g+set}" = set; then
1925   echo $ECHO_N "(cached) $ECHO_C" >&6
1926 else
1927   cat >conftest.$ac_ext <<_ACEOF
1928 #line 1928 "configure"
1929 #include "confdefs.h"
1930
1931 int
1932 main (void)
1933 {
1934
1935   ;
1936   return 0;
1937 }
1938 _ACEOF
1939 rm -f conftest.$ac_objext
1940 if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
1941   (eval $ac_compile) 2>&5
1942   ac_status=$?
1943   echo "$as_me:1943: \$? = $ac_status" >&5
1944   (exit $ac_status); } &&
1945          { ac_try='test -s conftest.$ac_objext'
1946   { (eval echo "$as_me:1946: \"$ac_try\"") >&5
1947   (eval $ac_try) 2>&5
1948   ac_status=$?
1949   echo "$as_me:1949: \$? = $ac_status" >&5
1950   (exit $ac_status); }; }; then
1951   ac_cv_prog_cc_g=yes
1952 else
1953   echo "$as_me: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1955 ac_cv_prog_cc_g=no
1956 fi
1957 rm -f conftest.$ac_objext conftest.$ac_ext
1958 fi
1959 echo "$as_me:1959: result: $ac_cv_prog_cc_g" >&5
1960 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1961 if test "$ac_test_CFLAGS" = set; then
1962   CFLAGS=$ac_save_CFLAGS
1963 elif test $ac_cv_prog_cc_g = yes; then
1964   if test "$GCC" = yes; then
1965     CFLAGS="-g -O2"
1966   else
1967     CFLAGS="-g"
1968   fi
1969 else
1970   if test "$GCC" = yes; then
1971     CFLAGS="-O2"
1972   else
1973     CFLAGS=
1974   fi
1975 fi
1976 # Some people use a C++ compiler to compile C.  Since we use `exit',
1977 # in C++ we need to declare it.  In case someone uses the same compiler
1978 # for both compiling C and C++ we need to have the C++ compiler decide
1979 # the declaration of exit, since it's the most demanding environment.
1980 cat >conftest.$ac_ext <<_ACEOF
1981 #ifndef __cplusplus
1982   choke me
1983 #endif
1984 _ACEOF
1985 rm -f conftest.$ac_objext
1986 if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987   (eval $ac_compile) 2>&5
1988   ac_status=$?
1989   echo "$as_me:1989: \$? = $ac_status" >&5
1990   (exit $ac_status); } &&
1991          { ac_try='test -s conftest.$ac_objext'
1992   { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1993   (eval $ac_try) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit $ac_status); }; }; then
1997   for ac_declaration in \
1998    ''\
1999    '#include <stdlib.h>' \
2000    'extern "C" void std::exit (int) throw (); using std::exit;' \
2001    'extern "C" void std::exit (int); using std::exit;' \
2002    'extern "C" void exit (int) throw ();' \
2003    'extern "C" void exit (int);' \
2004    'void exit (int);'
2005 do
2006   cat >conftest.$ac_ext <<_ACEOF
2007 #line 2007 "configure"
2008 #include "confdefs.h"
2009 #include <stdlib.h>
2010 $ac_declaration
2011 int
2012 main (void)
2013 {
2014 exit (42);
2015   ;
2016   return 0;
2017 }
2018 _ACEOF
2019 rm -f conftest.$ac_objext
2020 if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
2021   (eval $ac_compile) 2>&5
2022   ac_status=$?
2023   echo "$as_me:2023: \$? = $ac_status" >&5
2024   (exit $ac_status); } &&
2025          { ac_try='test -s conftest.$ac_objext'
2026   { (eval echo "$as_me:2026: \"$ac_try\"") >&5
2027   (eval $ac_try) 2>&5
2028   ac_status=$?
2029   echo "$as_me:2029: \$? = $ac_status" >&5
2030   (exit $ac_status); }; }; then
2031   :
2032 else
2033   echo "$as_me: failed program was:" >&5
2034 cat conftest.$ac_ext >&5
2035 continue
2036 fi
2037 rm -f conftest.$ac_objext conftest.$ac_ext
2038   cat >conftest.$ac_ext <<_ACEOF
2039 #line 2039 "configure"
2040 #include "confdefs.h"
2041 $ac_declaration
2042 int
2043 main (void)
2044 {
2045 exit (42);
2046   ;
2047   return 0;
2048 }
2049 _ACEOF
2050 rm -f conftest.$ac_objext
2051 if { (eval echo "$as_me:2051: \"$ac_compile\"") >&5
2052   (eval $ac_compile) 2>&5
2053   ac_status=$?
2054   echo "$as_me:2054: \$? = $ac_status" >&5
2055   (exit $ac_status); } &&
2056          { ac_try='test -s conftest.$ac_objext'
2057   { (eval echo "$as_me:2057: \"$ac_try\"") >&5
2058   (eval $ac_try) 2>&5
2059   ac_status=$?
2060   echo "$as_me:2060: \$? = $ac_status" >&5
2061   (exit $ac_status); }; }; then
2062   break
2063 else
2064   echo "$as_me: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2066 fi
2067 rm -f conftest.$ac_objext conftest.$ac_ext
2068 done
2069 rm -rf conftest*
2070 if test -n "$ac_declaration"; then
2071   echo '#ifdef __cplusplus' >>confdefs.h
2072   echo $ac_declaration      >>confdefs.h
2073   echo '#endif'             >>confdefs.h
2074 fi
2075
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 ac_ext=c
2082 ac_cpp='$CPP $CPPFLAGS'
2083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2086 ac_main_return=return
2087
2088 GCC_VERSION=none
2089 if test "$GCC" = yes ; then
2090         echo "$as_me:2090: checking version of $CC" >&5
2091 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2092         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2093         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2094         echo "$as_me:2094: result: $GCC_VERSION" >&5
2095 echo "${ECHO_T}$GCC_VERSION" >&6
2096 fi
2097
2098 echo "$as_me:2098: checking for $CC option to accept ANSI C" >&5
2099 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2100 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2101   echo $ECHO_N "(cached) $ECHO_C" >&6
2102 else
2103   ac_cv_prog_cc_stdc=no
2104 ac_save_CC=$CC
2105 cat >conftest.$ac_ext <<_ACEOF
2106 #line 2106 "configure"
2107 #include "confdefs.h"
2108 #include <stdarg.h>
2109 #include <stdio.h>
2110 #include <sys/types.h>
2111 #include <sys/stat.h>
2112 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2113 struct buf { int x; };
2114 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2115 static char *e (p, i)
2116      char **p;
2117      int i;
2118 {
2119   return p[i];
2120 }
2121 static char *f (char * (*g) (char **, int), char **p, ...)
2122 {
2123   char *s;
2124   va_list v;
2125   va_start (v,p);
2126   s = g (p, va_arg (v,int));
2127   va_end (v);
2128   return s;
2129 }
2130 int test (int i, double x);
2131 struct s1 {int (*f) (int a);};
2132 struct s2 {int (*f) (double a);};
2133 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2134 int argc;
2135 char **argv;
2136 int
2137 main (void)
2138 {
2139 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2140   ;
2141   return 0;
2142 }
2143 _ACEOF
2144 # Don't try gcc -ansi; that turns off useful extensions and
2145 # breaks some systems' header files.
2146 # AIX                   -qlanglvl=ansi
2147 # Ultrix and OSF/1      -std1
2148 # HP-UX 10.20 and later -Ae
2149 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2150 # SVR4                  -Xc -D__EXTENSIONS__
2151 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2152 do
2153   CC="$ac_save_CC $ac_arg"
2154   rm -f conftest.$ac_objext
2155 if { (eval echo "$as_me:2155: \"$ac_compile\"") >&5
2156   (eval $ac_compile) 2>&5
2157   ac_status=$?
2158   echo "$as_me:2158: \$? = $ac_status" >&5
2159   (exit $ac_status); } &&
2160          { ac_try='test -s conftest.$ac_objext'
2161   { (eval echo "$as_me:2161: \"$ac_try\"") >&5
2162   (eval $ac_try) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit $ac_status); }; }; then
2166   ac_cv_prog_cc_stdc=$ac_arg
2167 break
2168 else
2169   echo "$as_me: failed program was:" >&5
2170 cat conftest.$ac_ext >&5
2171 fi
2172 rm -f conftest.$ac_objext
2173 done
2174 rm -f conftest.$ac_ext conftest.$ac_objext
2175 CC=$ac_save_CC
2176
2177 fi
2178
2179 case "x$ac_cv_prog_cc_stdc" in
2180   x|xno)
2181     echo "$as_me:2181: result: none needed" >&5
2182 echo "${ECHO_T}none needed" >&6 ;;
2183   *)
2184     echo "$as_me:2184: result: $ac_cv_prog_cc_stdc" >&5
2185 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2186     CC="$CC $ac_cv_prog_cc_stdc" ;;
2187 esac
2188
2189 # This should have been defined by AC_PROG_CC
2190 : ${CC:=cc}
2191
2192 echo "$as_me:2192: checking \$CC variable" >&5
2193 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2194 case "$CC" in
2195 (*[\ \  ]-*)
2196         echo "$as_me:2196: result: broken" >&5
2197 echo "${ECHO_T}broken" >&6
2198         { echo "$as_me:2198: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2199 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2200         # humor him...
2201         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2202         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2203         CC="$cf_prog"
2204         for cf_arg in $cf_flags
2205         do
2206                 case "x$cf_arg" in
2207                 (x-[IUDfgOW]*)
2208
2209 cf_fix_cppflags=no
2210 cf_new_cflags=
2211 cf_new_cppflags=
2212 cf_new_extra_cppflags=
2213
2214 for cf_add_cflags in $cf_arg
2215 do
2216 case $cf_fix_cppflags in
2217 (no)
2218         case $cf_add_cflags in
2219         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2220                 case $cf_add_cflags in
2221                 (-D*)
2222                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2223
2224                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2225                                 && test -z "${cf_tst_cflags}" \
2226                                 && cf_fix_cppflags=yes
2227
2228                         if test $cf_fix_cppflags = yes ; then
2229
2230         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2231         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2232
2233                                 continue
2234                         elif test "${cf_tst_cflags}" = "\"'" ; then
2235
2236         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2237         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2238
2239                                 continue
2240                         fi
2241                         ;;
2242                 esac
2243                 case "$CPPFLAGS" in
2244                 (*$cf_add_cflags)
2245                         ;;
2246                 (*)
2247                         case $cf_add_cflags in
2248                         (-D*)
2249                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2250
2251 CPPFLAGS=`echo "$CPPFLAGS" | \
2252         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2253                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2254
2255                                 ;;
2256                         esac
2257
2258         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2259         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2260
2261                         ;;
2262                 esac
2263                 ;;
2264         (*)
2265
2266         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2267         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2268
2269                 ;;
2270         esac
2271         ;;
2272 (yes)
2273
2274         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2275         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2276
2277         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2278
2279         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2280                 && test -z "${cf_tst_cflags}" \
2281                 && cf_fix_cppflags=no
2282         ;;
2283 esac
2284 done
2285
2286 if test -n "$cf_new_cflags" ; then
2287
2288         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2289         CFLAGS="${CFLAGS}$cf_new_cflags"
2290
2291 fi
2292
2293 if test -n "$cf_new_cppflags" ; then
2294
2295         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2296         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2297
2298 fi
2299
2300 if test -n "$cf_new_extra_cppflags" ; then
2301
2302         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2303         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2304
2305 fi
2306
2307                         ;;
2308                 (*)
2309                         CC="$CC $cf_arg"
2310                         ;;
2311                 esac
2312         done
2313         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2314
2315 echo "${as_me:-configure}:2315: testing resulting CC: '$CC' ..." 1>&5
2316
2317         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2318
2319 echo "${as_me:-configure}:2319: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2320
2321         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2322
2323 echo "${as_me:-configure}:2323: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2324
2325         ;;
2326 (*)
2327         echo "$as_me:2327: result: ok" >&5
2328 echo "${ECHO_T}ok" >&6
2329         ;;
2330 esac
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338 echo "$as_me:2338: checking how to run the C preprocessor" >&5
2339 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2340 # On Suns, sometimes $CPP names a directory.
2341 if test -n "$CPP" && test -d "$CPP"; then
2342   CPP=
2343 fi
2344 if test -z "$CPP"; then
2345   if test "${ac_cv_prog_CPP+set}" = set; then
2346   echo $ECHO_N "(cached) $ECHO_C" >&6
2347 else
2348       # Double quotes because CPP needs to be expanded
2349     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2350     do
2351       ac_preproc_ok=false
2352 for ac_c_preproc_warn_flag in '' yes
2353 do
2354   # Use a header file that comes with gcc, so configuring glibc
2355   # with a fresh cross-compiler works.
2356   # On the NeXT, cc -E runs the code through the compiler's parser,
2357   # not just through cpp. "Syntax error" is here to catch this case.
2358   cat >conftest.$ac_ext <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2361 #include <assert.h>
2362                      Syntax error
2363 _ACEOF
2364 if { (eval echo "$as_me:2364: \"$ac_cpp conftest.$ac_ext\"") >&5
2365   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2366   ac_status=$?
2367   egrep -v '^ *\+' conftest.er1 >conftest.err
2368   rm -f conftest.er1
2369   cat conftest.err >&5
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit $ac_status); } >/dev/null; then
2372   if test -s conftest.err; then
2373     ac_cpp_err=$ac_c_preproc_warn_flag
2374   else
2375     ac_cpp_err=
2376   fi
2377 else
2378   ac_cpp_err=yes
2379 fi
2380 if test -z "$ac_cpp_err"; then
2381   :
2382 else
2383   echo "$as_me: failed program was:" >&5
2384   cat conftest.$ac_ext >&5
2385   # Broken: fails on valid input.
2386 continue
2387 fi
2388 rm -f conftest.err conftest.$ac_ext
2389
2390   # OK, works on sane cases.  Now check whether non-existent headers
2391   # can be detected and how.
2392   cat >conftest.$ac_ext <<_ACEOF
2393 #line 2393 "configure"
2394 #include "confdefs.h"
2395 #include <ac_nonexistent.h>
2396 _ACEOF
2397 if { (eval echo "$as_me:2397: \"$ac_cpp conftest.$ac_ext\"") >&5
2398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2399   ac_status=$?
2400   egrep -v '^ *\+' conftest.er1 >conftest.err
2401   rm -f conftest.er1
2402   cat conftest.err >&5
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); } >/dev/null; then
2405   if test -s conftest.err; then
2406     ac_cpp_err=$ac_c_preproc_warn_flag
2407   else
2408     ac_cpp_err=
2409   fi
2410 else
2411   ac_cpp_err=yes
2412 fi
2413 if test -z "$ac_cpp_err"; then
2414   # Broken: success on invalid input.
2415 continue
2416 else
2417   echo "$as_me: failed program was:" >&5
2418   cat conftest.$ac_ext >&5
2419   # Passes both tests.
2420 ac_preproc_ok=:
2421 break
2422 fi
2423 rm -f conftest.err conftest.$ac_ext
2424
2425 done
2426 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2427 rm -f conftest.err conftest.$ac_ext
2428 if $ac_preproc_ok; then
2429   break
2430 fi
2431
2432     done
2433     ac_cv_prog_CPP=$CPP
2434
2435 fi
2436   CPP=$ac_cv_prog_CPP
2437 else
2438   ac_cv_prog_CPP=$CPP
2439 fi
2440 echo "$as_me:2440: result: $CPP" >&5
2441 echo "${ECHO_T}$CPP" >&6
2442 ac_preproc_ok=false
2443 for ac_c_preproc_warn_flag in '' yes
2444 do
2445   # Use a header file that comes with gcc, so configuring glibc
2446   # with a fresh cross-compiler works.
2447   # On the NeXT, cc -E runs the code through the compiler's parser,
2448   # not just through cpp. "Syntax error" is here to catch this case.
2449   cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2452 #include <assert.h>
2453                      Syntax error
2454 _ACEOF
2455 if { (eval echo "$as_me:2455: \"$ac_cpp conftest.$ac_ext\"") >&5
2456   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2457   ac_status=$?
2458   egrep -v '^ *\+' conftest.er1 >conftest.err
2459   rm -f conftest.er1
2460   cat conftest.err >&5
2461   echo "$as_me:2461: \$? = $ac_status" >&5
2462   (exit $ac_status); } >/dev/null; then
2463   if test -s conftest.err; then
2464     ac_cpp_err=$ac_c_preproc_warn_flag
2465   else
2466     ac_cpp_err=
2467   fi
2468 else
2469   ac_cpp_err=yes
2470 fi
2471 if test -z "$ac_cpp_err"; then
2472   :
2473 else
2474   echo "$as_me: failed program was:" >&5
2475   cat conftest.$ac_ext >&5
2476   # Broken: fails on valid input.
2477 continue
2478 fi
2479 rm -f conftest.err conftest.$ac_ext
2480
2481   # OK, works on sane cases.  Now check whether non-existent headers
2482   # can be detected and how.
2483   cat >conftest.$ac_ext <<_ACEOF
2484 #line 2484 "configure"
2485 #include "confdefs.h"
2486 #include <ac_nonexistent.h>
2487 _ACEOF
2488 if { (eval echo "$as_me:2488: \"$ac_cpp conftest.$ac_ext\"") >&5
2489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2490   ac_status=$?
2491   egrep -v '^ *\+' conftest.er1 >conftest.err
2492   rm -f conftest.er1
2493   cat conftest.err >&5
2494   echo "$as_me:2494: \$? = $ac_status" >&5
2495   (exit $ac_status); } >/dev/null; then
2496   if test -s conftest.err; then
2497     ac_cpp_err=$ac_c_preproc_warn_flag
2498   else
2499     ac_cpp_err=
2500   fi
2501 else
2502   ac_cpp_err=yes
2503 fi
2504 if test -z "$ac_cpp_err"; then
2505   # Broken: success on invalid input.
2506 continue
2507 else
2508   echo "$as_me: failed program was:" >&5
2509   cat conftest.$ac_ext >&5
2510   # Passes both tests.
2511 ac_preproc_ok=:
2512 break
2513 fi
2514 rm -f conftest.err conftest.$ac_ext
2515
2516 done
2517 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2518 rm -f conftest.err conftest.$ac_ext
2519 if $ac_preproc_ok; then
2520   :
2521 else
2522   { { echo "$as_me:2522: error: C preprocessor \"$CPP\" fails sanity check" >&5
2523 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2524    { (exit 1); exit 1; }; }
2525 fi
2526
2527 ac_ext=c
2528 ac_cpp='$CPP $CPPFLAGS'
2529 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2530 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2531 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2532 ac_main_return=return
2533
2534 if test $ac_cv_c_compiler_gnu = yes; then
2535     echo "$as_me:2535: checking whether $CC needs -traditional" >&5
2536 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2537 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2538   echo $ECHO_N "(cached) $ECHO_C" >&6
2539 else
2540     ac_pattern="Autoconf.*'x'"
2541   cat >conftest.$ac_ext <<_ACEOF
2542 #line 2542 "configure"
2543 #include "confdefs.h"
2544 #include <sgtty.h>
2545 int Autoconf = TIOCGETP;
2546 _ACEOF
2547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2548   egrep "$ac_pattern" >/dev/null 2>&1; then
2549   ac_cv_prog_gcc_traditional=yes
2550 else
2551   ac_cv_prog_gcc_traditional=no
2552 fi
2553 rm -rf conftest*
2554
2555   if test $ac_cv_prog_gcc_traditional = no; then
2556     cat >conftest.$ac_ext <<_ACEOF
2557 #line 2557 "configure"
2558 #include "confdefs.h"
2559 #include <termio.h>
2560 int Autoconf = TCGETA;
2561 _ACEOF
2562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2563   egrep "$ac_pattern" >/dev/null 2>&1; then
2564   ac_cv_prog_gcc_traditional=yes
2565 fi
2566 rm -rf conftest*
2567
2568   fi
2569 fi
2570 echo "$as_me:2570: result: $ac_cv_prog_gcc_traditional" >&5
2571 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2572   if test $ac_cv_prog_gcc_traditional = yes; then
2573     CC="$CC -traditional"
2574   fi
2575 fi
2576
2577 echo "$as_me:2577: checking whether $CC understands -c and -o together" >&5
2578 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2579 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2580   echo $ECHO_N "(cached) $ECHO_C" >&6
2581 else
2582
2583 cat > conftest.$ac_ext <<CF_EOF
2584 int main(void)
2585 {
2586         ${cf_cv_main_return:-return}(0);
2587 }
2588 CF_EOF
2589 # We do the test twice because some compilers refuse to overwrite an
2590 # existing .o file with -o, though they will create one.
2591 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2592 if { (eval echo "$as_me:2592: \"$ac_try\"") >&5
2593   (eval $ac_try) 2>&5
2594   ac_status=$?
2595   echo "$as_me:2595: \$? = $ac_status" >&5
2596   (exit $ac_status); } &&
2597   test -f conftest2.$ac_objext && { (eval echo "$as_me:2597: \"$ac_try\"") >&5
2598   (eval $ac_try) 2>&5
2599   ac_status=$?
2600   echo "$as_me:2600: \$? = $ac_status" >&5
2601   (exit $ac_status); };
2602 then
2603   eval cf_cv_prog_CC_c_o=yes
2604 else
2605   eval cf_cv_prog_CC_c_o=no
2606 fi
2607 rm -rf conftest*
2608
2609 fi
2610 if test $cf_cv_prog_CC_c_o = yes; then
2611   echo "$as_me:2611: result: yes" >&5
2612 echo "${ECHO_T}yes" >&6
2613 else
2614   echo "$as_me:2614: result: no" >&5
2615 echo "${ECHO_T}no" >&6
2616 fi
2617
2618 if test "$cross_compiling" = yes ; then
2619         LDCONFIG=:
2620 else
2621         case "$cf_cv_system_name" in
2622         (dragonfly*|mirbsd*|freebsd*)
2623                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2624                 ;;
2625         (*) LDPATH=$PATH:/sbin:/usr/sbin
2626                 # Extract the first word of "ldconfig", so it can be a program name with args.
2627 set dummy ldconfig; ac_word=$2
2628 echo "$as_me:2628: checking for $ac_word" >&5
2629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2630 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   case $LDCONFIG in
2634   [\\/]* | ?:[\\/]*)
2635   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2636   ;;
2637   *)
2638   ac_save_IFS=$IFS; IFS=$ac_path_separator
2639 ac_dummy="$LDPATH"
2640 for ac_dir in $ac_dummy; do
2641   IFS=$ac_save_IFS
2642   test -z "$ac_dir" && ac_dir=.
2643   if $as_executable_p "$ac_dir/$ac_word"; then
2644    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2645    echo "$as_me:2645: found $ac_dir/$ac_word" >&5
2646    break
2647 fi
2648 done
2649
2650   ;;
2651 esac
2652 fi
2653 LDCONFIG=$ac_cv_path_LDCONFIG
2654
2655 if test -n "$LDCONFIG"; then
2656   echo "$as_me:2656: result: $LDCONFIG" >&5
2657 echo "${ECHO_T}$LDCONFIG" >&6
2658 else
2659   echo "$as_me:2659: result: no" >&5
2660 echo "${ECHO_T}no" >&6
2661 fi
2662
2663                 ;;
2664         esac
2665 fi
2666
2667 echo "$as_me:2667: checking if you want to ensure bool is consistent with C++" >&5
2668 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2669
2670 # Check whether --with-cxx or --without-cxx was given.
2671 if test "${with_cxx+set}" = set; then
2672   withval="$with_cxx"
2673   cf_with_cxx=$withval
2674 else
2675   cf_with_cxx=yes
2676 fi;
2677 echo "$as_me:2677: result: $cf_with_cxx" >&5
2678 echo "${ECHO_T}$cf_with_cxx" >&6
2679 if test "X$cf_with_cxx" = Xno ; then
2680         CXX=""
2681         GXX=""
2682 else
2683         # with autoconf 2.13, we can change the error to a warning:
2684                 ac_ext=cc
2685 ac_cpp='$CXXCPP $CPPFLAGS'
2686 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2689 ac_main_return=return
2690 if test -n "$ac_tool_prefix"; then
2691   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2692   do
2693     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2694 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2695 echo "$as_me:2695: checking for $ac_word" >&5
2696 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2697 if test "${ac_cv_prog_CXX+set}" = set; then
2698   echo $ECHO_N "(cached) $ECHO_C" >&6
2699 else
2700   if test -n "$CXX"; then
2701   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2702 else
2703   ac_save_IFS=$IFS; IFS=$ac_path_separator
2704 ac_dummy="$PATH"
2705 for ac_dir in $ac_dummy; do
2706   IFS=$ac_save_IFS
2707   test -z "$ac_dir" && ac_dir=.
2708   $as_executable_p "$ac_dir/$ac_word" || continue
2709 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2710 echo "$as_me:2710: found $ac_dir/$ac_word" >&5
2711 break
2712 done
2713
2714 fi
2715 fi
2716 CXX=$ac_cv_prog_CXX
2717 if test -n "$CXX"; then
2718   echo "$as_me:2718: result: $CXX" >&5
2719 echo "${ECHO_T}$CXX" >&6
2720 else
2721   echo "$as_me:2721: result: no" >&5
2722 echo "${ECHO_T}no" >&6
2723 fi
2724
2725     test -n "$CXX" && break
2726   done
2727 fi
2728 if test -z "$CXX"; then
2729   ac_ct_CXX=$CXX
2730   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2731 do
2732   # Extract the first word of "$ac_prog", so it can be a program name with args.
2733 set dummy $ac_prog; ac_word=$2
2734 echo "$as_me:2734: checking for $ac_word" >&5
2735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2736 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2737   echo $ECHO_N "(cached) $ECHO_C" >&6
2738 else
2739   if test -n "$ac_ct_CXX"; then
2740   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2741 else
2742   ac_save_IFS=$IFS; IFS=$ac_path_separator
2743 ac_dummy="$PATH"
2744 for ac_dir in $ac_dummy; do
2745   IFS=$ac_save_IFS
2746   test -z "$ac_dir" && ac_dir=.
2747   $as_executable_p "$ac_dir/$ac_word" || continue
2748 ac_cv_prog_ac_ct_CXX="$ac_prog"
2749 echo "$as_me:2749: found $ac_dir/$ac_word" >&5
2750 break
2751 done
2752
2753 fi
2754 fi
2755 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2756 if test -n "$ac_ct_CXX"; then
2757   echo "$as_me:2757: result: $ac_ct_CXX" >&5
2758 echo "${ECHO_T}$ac_ct_CXX" >&6
2759 else
2760   echo "$as_me:2760: result: no" >&5
2761 echo "${ECHO_T}no" >&6
2762 fi
2763
2764   test -n "$ac_ct_CXX" && break
2765 done
2766 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2767
2768   CXX=$ac_ct_CXX
2769 fi
2770
2771 # Provide some information about the compiler.
2772 echo "$as_me:2772:" \
2773      "checking for C++ compiler version" >&5
2774 ac_compiler=`set X $ac_compile; echo $2`
2775 { (eval echo "$as_me:2775: \"$ac_compiler --version </dev/null >&5\"") >&5
2776   (eval $ac_compiler --version </dev/null >&5) 2>&5
2777   ac_status=$?
2778   echo "$as_me:2778: \$? = $ac_status" >&5
2779   (exit $ac_status); }
2780 { (eval echo "$as_me:2780: \"$ac_compiler -v </dev/null >&5\"") >&5
2781   (eval $ac_compiler -v </dev/null >&5) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); }
2785 { (eval echo "$as_me:2785: \"$ac_compiler -V </dev/null >&5\"") >&5
2786   (eval $ac_compiler -V </dev/null >&5) 2>&5
2787   ac_status=$?
2788   echo "$as_me:2788: \$? = $ac_status" >&5
2789   (exit $ac_status); }
2790
2791 echo "$as_me:2791: checking whether we are using the GNU C++ compiler" >&5
2792 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2793 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2794   echo $ECHO_N "(cached) $ECHO_C" >&6
2795 else
2796   cat >conftest.$ac_ext <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799
2800 int
2801 main (void)
2802 {
2803 #ifndef __GNUC__
2804        choke me
2805 #endif
2806
2807   ;
2808   return 0;
2809 }
2810 _ACEOF
2811 rm -f conftest.$ac_objext
2812 if { (eval echo "$as_me:2812: \"$ac_compile\"") >&5
2813   (eval $ac_compile) 2>&5
2814   ac_status=$?
2815   echo "$as_me:2815: \$? = $ac_status" >&5
2816   (exit $ac_status); } &&
2817          { ac_try='test -s conftest.$ac_objext'
2818   { (eval echo "$as_me:2818: \"$ac_try\"") >&5
2819   (eval $ac_try) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }; }; then
2823   ac_compiler_gnu=yes
2824 else
2825   echo "$as_me: failed program was:" >&5
2826 cat conftest.$ac_ext >&5
2827 ac_compiler_gnu=no
2828 fi
2829 rm -f conftest.$ac_objext conftest.$ac_ext
2830 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2831
2832 fi
2833 echo "$as_me:2833: result: $ac_cv_cxx_compiler_gnu" >&5
2834 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2835 GXX=`test $ac_compiler_gnu = yes && echo yes`
2836 ac_test_CXXFLAGS=${CXXFLAGS+set}
2837 ac_save_CXXFLAGS=$CXXFLAGS
2838 CXXFLAGS="-g"
2839 echo "$as_me:2839: checking whether $CXX accepts -g" >&5
2840 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2841 if test "${ac_cv_prog_cxx_g+set}" = set; then
2842   echo $ECHO_N "(cached) $ECHO_C" >&6
2843 else
2844   cat >conftest.$ac_ext <<_ACEOF
2845 #line 2845 "configure"
2846 #include "confdefs.h"
2847
2848 int
2849 main (void)
2850 {
2851
2852   ;
2853   return 0;
2854 }
2855 _ACEOF
2856 rm -f conftest.$ac_objext
2857 if { (eval echo "$as_me:2857: \"$ac_compile\"") >&5
2858   (eval $ac_compile) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); } &&
2862          { ac_try='test -s conftest.$ac_objext'
2863   { (eval echo "$as_me:2863: \"$ac_try\"") >&5
2864   (eval $ac_try) 2>&5
2865   ac_status=$?
2866   echo "$as_me:2866: \$? = $ac_status" >&5
2867   (exit $ac_status); }; }; then
2868   ac_cv_prog_cxx_g=yes
2869 else
2870   echo "$as_me: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872 ac_cv_prog_cxx_g=no
2873 fi
2874 rm -f conftest.$ac_objext conftest.$ac_ext
2875 fi
2876 echo "$as_me:2876: result: $ac_cv_prog_cxx_g" >&5
2877 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2878 if test "$ac_test_CXXFLAGS" = set; then
2879   CXXFLAGS=$ac_save_CXXFLAGS
2880 elif test $ac_cv_prog_cxx_g = yes; then
2881   if test "$GXX" = yes; then
2882     CXXFLAGS="-g -O2"
2883   else
2884     CXXFLAGS="-g"
2885   fi
2886 else
2887   if test "$GXX" = yes; then
2888     CXXFLAGS="-O2"
2889   else
2890     CXXFLAGS=
2891   fi
2892 fi
2893 for ac_declaration in \
2894    ''\
2895    '#include <stdlib.h>' \
2896    'extern "C" void std::exit (int) throw (); using std::exit;' \
2897    'extern "C" void std::exit (int); using std::exit;' \
2898    'extern "C" void exit (int) throw ();' \
2899    'extern "C" void exit (int);' \
2900    'void exit (int);'
2901 do
2902   cat >conftest.$ac_ext <<_ACEOF
2903 #line 2903 "configure"
2904 #include "confdefs.h"
2905 #include <stdlib.h>
2906 $ac_declaration
2907 int
2908 main (void)
2909 {
2910 exit (42);
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 rm -f conftest.$ac_objext
2916 if { (eval echo "$as_me:2916: \"$ac_compile\"") >&5
2917   (eval $ac_compile) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); } &&
2921          { ac_try='test -s conftest.$ac_objext'
2922   { (eval echo "$as_me:2922: \"$ac_try\"") >&5
2923   (eval $ac_try) 2>&5
2924   ac_status=$?
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit $ac_status); }; }; then
2927   :
2928 else
2929   echo "$as_me: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 continue
2932 fi
2933 rm -f conftest.$ac_objext conftest.$ac_ext
2934   cat >conftest.$ac_ext <<_ACEOF
2935 #line 2935 "configure"
2936 #include "confdefs.h"
2937 $ac_declaration
2938 int
2939 main (void)
2940 {
2941 exit (42);
2942   ;
2943   return 0;
2944 }
2945 _ACEOF
2946 rm -f conftest.$ac_objext
2947 if { (eval echo "$as_me:2947: \"$ac_compile\"") >&5
2948   (eval $ac_compile) 2>&5
2949   ac_status=$?
2950   echo "$as_me:2950: \$? = $ac_status" >&5
2951   (exit $ac_status); } &&
2952          { ac_try='test -s conftest.$ac_objext'
2953   { (eval echo "$as_me:2953: \"$ac_try\"") >&5
2954   (eval $ac_try) 2>&5
2955   ac_status=$?
2956   echo "$as_me:2956: \$? = $ac_status" >&5
2957   (exit $ac_status); }; }; then
2958   break
2959 else
2960   echo "$as_me: failed program was:" >&5
2961 cat conftest.$ac_ext >&5
2962 fi
2963 rm -f conftest.$ac_objext conftest.$ac_ext
2964 done
2965 rm -rf conftest*
2966 if test -n "$ac_declaration"; then
2967   echo '#ifdef __cplusplus' >>confdefs.h
2968   echo $ac_declaration      >>confdefs.h
2969   echo '#endif'             >>confdefs.h
2970 fi
2971
2972 ac_ext=c
2973 ac_cpp='$CPP $CPPFLAGS'
2974 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2975 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2976 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2977 ac_main_return=return
2978
2979         ac_ext=cc
2980 ac_cpp='$CXXCPP $CPPFLAGS'
2981 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2982 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2983 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2984 ac_main_return=return
2985
2986         if test "x$cf_with_cxx" != xno
2987         then
2988                 # Several of the C++ configurations do not work, particularly when
2989                 # cross-compiling (20140913 -TD)
2990                 echo "$as_me:2990: checking if $CXX works" >&5
2991 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2992
2993                 save_CPPFLAGS="$CPPFLAGS"
2994                 eval cf_includedir=${includedir}
2995                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2996
2997 cat >conftest.$ac_ext <<_ACEOF
2998 #line 2998 "configure"
2999 #include "confdefs.h"
3000
3001 #include <stdlib.h>
3002 #include <stdio.h>
3003
3004 int
3005 main (void)
3006 {
3007
3008                 printf("Hello world!\n")
3009
3010   ;
3011   return 0;
3012 }
3013 _ACEOF
3014 rm -f conftest.$ac_objext
3015 if { (eval echo "$as_me:3015: \"$ac_compile\"") >&5
3016   (eval $ac_compile) 2>&5
3017   ac_status=$?
3018   echo "$as_me:3018: \$? = $ac_status" >&5
3019   (exit $ac_status); } &&
3020          { ac_try='test -s conftest.$ac_objext'
3021   { (eval echo "$as_me:3021: \"$ac_try\"") >&5
3022   (eval $ac_try) 2>&5
3023   ac_status=$?
3024   echo "$as_me:3024: \$? = $ac_status" >&5
3025   (exit $ac_status); }; }; then
3026   cf_cxx_works=yes
3027 else
3028   echo "$as_me: failed program was:" >&5
3029 cat conftest.$ac_ext >&5
3030 cf_cxx_works=no
3031 fi
3032 rm -f conftest.$ac_objext conftest.$ac_ext
3033                 CPPFLAGS="$save_CPPFLAGS"
3034
3035                 echo "$as_me:3035: result: $cf_cxx_works" >&5
3036 echo "${ECHO_T}$cf_cxx_works" >&6
3037                 if test "x$cf_cxx_works" = xno
3038                 then
3039                         { echo "$as_me:3039: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3040 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3041                         cf_with_cxx=no; CXX=""; GXX="";
3042                 fi
3043         fi
3044         ac_ext=c
3045 ac_cpp='$CPP $CPPFLAGS'
3046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3049 ac_main_return=return
3050
3051         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3052         if test "$CXX" = "g++" ; then
3053                 # Extract the first word of "g++", so it can be a program name with args.
3054 set dummy g++; ac_word=$2
3055 echo "$as_me:3055: checking for $ac_word" >&5
3056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3057 if test "${ac_cv_path_CXX+set}" = set; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   case $CXX in
3061   [\\/]* | ?:[\\/]*)
3062   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3063   ;;
3064   *)
3065   ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068   IFS=$ac_save_IFS
3069   test -z "$ac_dir" && ac_dir=.
3070   if $as_executable_p "$ac_dir/$ac_word"; then
3071    ac_cv_path_CXX="$ac_dir/$ac_word"
3072    echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3073    break
3074 fi
3075 done
3076
3077   ;;
3078 esac
3079 fi
3080 CXX=$ac_cv_path_CXX
3081
3082 if test -n "$CXX"; then
3083   echo "$as_me:3083: result: $CXX" >&5
3084 echo "${ECHO_T}$CXX" >&6
3085 else
3086   echo "$as_me:3086: result: no" >&5
3087 echo "${ECHO_T}no" >&6
3088 fi
3089
3090         fi
3091         case "x$CXX" in
3092         (x|xg++)
3093                 { echo "$as_me:3093: WARNING: You don't have any C++ compiler, too bad" >&5
3094 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3095                 cf_with_cxx=no; CXX=""; GXX="";
3096                 ;;
3097         esac
3098 fi
3099
3100 GXX_VERSION=none
3101 if test "$GXX" = yes; then
3102         echo "$as_me:3102: checking version of ${CXX:-g++}" >&5
3103 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3104         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3105         if test -z "$GXX_VERSION"
3106         then
3107                 GXX_VERSION=unknown
3108                 GXX=no
3109         fi
3110         echo "$as_me:3110: result: $GXX_VERSION" >&5
3111 echo "${ECHO_T}$GXX_VERSION" >&6
3112 fi
3113
3114 case $GXX_VERSION in
3115 (1*|2.[0-6]*)
3116         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3117         # cf_cxx_library=no
3118         { echo "$as_me:3118: WARNING: templates do not work" >&5
3119 echo "$as_me: WARNING: templates do not work" >&2;}
3120         ;;
3121 esac
3122
3123 echo "$as_me:3123: checking if you want to build C++ binding and demo" >&5
3124 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3125
3126 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3127 if test "${with_cxx_binding+set}" = set; then
3128   withval="$with_cxx_binding"
3129   cf_with_cxx_binding=$withval
3130 else
3131   cf_with_cxx_binding=$cf_with_cxx
3132 fi;
3133 echo "$as_me:3133: result: $cf_with_cxx_binding" >&5
3134 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3135
3136 echo "$as_me:3136: checking if you want to build with Ada95" >&5
3137 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3138 echo "$as_me:3138: result: $cf_with_ada" >&5
3139 echo "${ECHO_T}$cf_with_ada" >&6
3140
3141 echo "$as_me:3141: checking if you want to install terminal database" >&5
3142 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3143
3144 # Check whether --enable-db-install or --disable-db-install was given.
3145 if test "${enable_db_install+set}" = set; then
3146   enableval="$enable_db_install"
3147   cf_with_db_install=$enableval
3148 else
3149   cf_with_db_install=yes
3150 fi;
3151 echo "$as_me:3151: result: $cf_with_db_install" >&5
3152 echo "${ECHO_T}$cf_with_db_install" >&6
3153
3154 echo "$as_me:3154: checking if you want to install manpages" >&5
3155 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3156
3157 # Check whether --with-manpages or --without-manpages was given.
3158 if test "${with_manpages+set}" = set; then
3159   withval="$with_manpages"
3160   cf_with_manpages=$withval
3161 else
3162   cf_with_manpages=yes
3163 fi;
3164 echo "$as_me:3164: result: $cf_with_manpages" >&5
3165 echo "${ECHO_T}$cf_with_manpages" >&6
3166
3167 echo "$as_me:3167: checking if you want to build programs such as tic" >&5
3168 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3169
3170 # Check whether --with-progs or --without-progs was given.
3171 if test "${with_progs+set}" = set; then
3172   withval="$with_progs"
3173   cf_with_progs=$withval
3174 else
3175   cf_with_progs=yes
3176 fi;
3177 echo "$as_me:3177: result: $cf_with_progs" >&5
3178 echo "${ECHO_T}$cf_with_progs" >&6
3179
3180 if test -f $srcdir/tack/tack.h; then
3181         if test "x$cross_compiling" = xyes ; then
3182                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3183
3184 echo "${as_me:-configure}:3184: testing ignoring tack because we are cross-compiling ..." 1>&5
3185
3186                 cf_with_tack=no
3187         else
3188                 echo "$as_me:3188: checking if you want to build the tack program" >&5
3189 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3190
3191 # Check whether --with-tack or --without-tack was given.
3192 if test "${with_tack+set}" = set; then
3193   withval="$with_tack"
3194   cf_with_tack=$withval
3195 else
3196   cf_with_tack=$cf_with_progs
3197 fi;
3198                 echo "$as_me:3198: result: $cf_with_tack" >&5
3199 echo "${ECHO_T}$cf_with_tack" >&6
3200         fi
3201 else
3202         cf_with_tack=no
3203 fi
3204
3205 echo "$as_me:3205: checking if you want to build test-programs" >&5
3206 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3207
3208 # Check whether --with-tests or --without-tests was given.
3209 if test "${with_tests+set}" = set; then
3210   withval="$with_tests"
3211   cf_with_tests=$withval
3212 else
3213   cf_with_tests=yes
3214 fi;
3215 echo "$as_me:3215: result: $cf_with_tests" >&5
3216 echo "${ECHO_T}$cf_with_tests" >&6
3217
3218 echo "$as_me:3218: checking if you wish to install curses.h" >&5
3219 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3220
3221 # Check whether --with-curses-h or --without-curses-h was given.
3222 if test "${with_curses_h+set}" = set; then
3223   withval="$with_curses_h"
3224   with_curses_h=$withval
3225 else
3226   with_curses_h=yes
3227 fi;
3228 echo "$as_me:3228: result: $with_curses_h" >&5
3229 echo "${ECHO_T}$with_curses_h" >&6
3230
3231 modules_to_build="ncurses"
3232 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3233 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3234 modules_to_build="$modules_to_build panel menu form"
3235
3236 test "$program_prefix" != NONE &&
3237   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3238 # Use a double $ so make ignores it.
3239 test "$program_suffix" != NONE &&
3240   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3241 # Double any \ or $.  echo might interpret backslashes.
3242 # By default was `s,x,x', remove it if useless.
3243 cat <<\_ACEOF >conftest.sed
3244 s/[\\$]/&&/g;s/;s,x,x,$//
3245 _ACEOF
3246 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3247 rm conftest.sed
3248
3249 for ac_prog in mawk gawk nawk awk
3250 do
3251   # Extract the first word of "$ac_prog", so it can be a program name with args.
3252 set dummy $ac_prog; ac_word=$2
3253 echo "$as_me:3253: checking for $ac_word" >&5
3254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3255 if test "${ac_cv_prog_AWK+set}" = set; then
3256   echo $ECHO_N "(cached) $ECHO_C" >&6
3257 else
3258   if test -n "$AWK"; then
3259   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3260 else
3261   ac_save_IFS=$IFS; IFS=$ac_path_separator
3262 ac_dummy="$PATH"
3263 for ac_dir in $ac_dummy; do
3264   IFS=$ac_save_IFS
3265   test -z "$ac_dir" && ac_dir=.
3266   $as_executable_p "$ac_dir/$ac_word" || continue
3267 ac_cv_prog_AWK="$ac_prog"
3268 echo "$as_me:3268: found $ac_dir/$ac_word" >&5
3269 break
3270 done
3271
3272 fi
3273 fi
3274 AWK=$ac_cv_prog_AWK
3275 if test -n "$AWK"; then
3276   echo "$as_me:3276: result: $AWK" >&5
3277 echo "${ECHO_T}$AWK" >&6
3278 else
3279   echo "$as_me:3279: result: no" >&5
3280 echo "${ECHO_T}no" >&6
3281 fi
3282
3283   test -n "$AWK" && break
3284 done
3285
3286 test -z "$AWK" && { { echo "$as_me:3286: error: No awk program found" >&5
3287 echo "$as_me: error: No awk program found" >&2;}
3288    { (exit 1); exit 1; }; }
3289
3290 echo "$as_me:3290: checking for egrep" >&5
3291 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3292 if test "${ac_cv_prog_egrep+set}" = set; then
3293   echo $ECHO_N "(cached) $ECHO_C" >&6
3294 else
3295   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3296                 then ac_cv_prog_egrep='grep -E'
3297                 else ac_cv_prog_egrep='egrep'
3298         fi
3299 fi
3300 echo "$as_me:3300: result: $ac_cv_prog_egrep" >&5
3301 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3302         EGREP=$ac_cv_prog_egrep
3303
3304         test -z "$EGREP" && { { echo "$as_me:3304: error: No egrep program found" >&5
3305 echo "$as_me: error: No egrep program found" >&2;}
3306    { (exit 1); exit 1; }; }
3307
3308 # Find a good install program.  We prefer a C program (faster),
3309 # so one script is as good as another.  But avoid the broken or
3310 # incompatible versions:
3311 # SysV /etc/install, /usr/sbin/install
3312 # SunOS /usr/etc/install
3313 # IRIX /sbin/install
3314 # AIX /bin/install
3315 # AmigaOS /C/install, which installs bootblocks on floppy discs
3316 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3317 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3318 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3319 # ./install, which can be erroneously created by make from ./install.sh.
3320 echo "$as_me:3320: checking for a BSD compatible install" >&5
3321 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3322 if test -z "$INSTALL"; then
3323 if test "${ac_cv_path_install+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326     ac_save_IFS=$IFS; IFS=$ac_path_separator
3327   for ac_dir in $PATH; do
3328     IFS=$ac_save_IFS
3329     # Account for people who put trailing slashes in PATH elements.
3330     case $ac_dir/ in
3331     / | ./ | .// | /cC/* \
3332     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3333     | /usr/ucb/* ) ;;
3334     *)
3335       # OSF1 and SCO ODT 3.0 have their own names for install.
3336       # Don't use installbsd from OSF since it installs stuff as root
3337       # by default.
3338       for ac_prog in ginstall scoinst install; do
3339         if $as_executable_p "$ac_dir/$ac_prog"; then
3340           if test $ac_prog = install &&
3341             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3342             # AIX install.  It has an incompatible calling convention.
3343             :
3344           elif test $ac_prog = install &&
3345             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3346             # program-specific install script used by HP pwplus--don't use.
3347             :
3348           else
3349             ac_cv_path_install="$ac_dir/$ac_prog -c"
3350             break 2
3351           fi
3352         fi
3353       done
3354       ;;
3355     esac
3356   done
3357
3358 fi
3359   if test "${ac_cv_path_install+set}" = set; then
3360     INSTALL=$ac_cv_path_install
3361   else
3362     # As a last resort, use the slow shell script.  We don't cache a
3363     # path for INSTALL within a source directory, because that will
3364     # break other packages using the cache if that directory is
3365     # removed, or if the path is relative.
3366     INSTALL=$ac_install_sh
3367   fi
3368 fi
3369 echo "$as_me:3369: result: $INSTALL" >&5
3370 echo "${ECHO_T}$INSTALL" >&6
3371
3372 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3373 # It thinks the first close brace ends the variable substitution.
3374 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3375
3376 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3377
3378 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3379
3380 case $INSTALL in
3381 (/*)
3382         ;;
3383 (*)
3384         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3385         test -z "$cf_dir" && cf_dir=.
3386         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3387         ;;
3388 esac
3389
3390 for ac_prog in lint cppcheck splint
3391 do
3392   # Extract the first word of "$ac_prog", so it can be a program name with args.
3393 set dummy $ac_prog; ac_word=$2
3394 echo "$as_me:3394: checking for $ac_word" >&5
3395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396 if test "${ac_cv_prog_LINT+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   if test -n "$LINT"; then
3400   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3401 else
3402   ac_save_IFS=$IFS; IFS=$ac_path_separator
3403 ac_dummy="$PATH"
3404 for ac_dir in $ac_dummy; do
3405   IFS=$ac_save_IFS
3406   test -z "$ac_dir" && ac_dir=.
3407   $as_executable_p "$ac_dir/$ac_word" || continue
3408 ac_cv_prog_LINT="$ac_prog"
3409 echo "$as_me:3409: found $ac_dir/$ac_word" >&5
3410 break
3411 done
3412
3413 fi
3414 fi
3415 LINT=$ac_cv_prog_LINT
3416 if test -n "$LINT"; then
3417   echo "$as_me:3417: result: $LINT" >&5
3418 echo "${ECHO_T}$LINT" >&6
3419 else
3420   echo "$as_me:3420: result: no" >&5
3421 echo "${ECHO_T}no" >&6
3422 fi
3423
3424   test -n "$LINT" && break
3425 done
3426
3427 echo "$as_me:3427: checking whether ln -s works" >&5
3428 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3429 LN_S=$as_ln_s
3430 if test "$LN_S" = "ln -s"; then
3431   echo "$as_me:3431: result: yes" >&5
3432 echo "${ECHO_T}yes" >&6
3433 else
3434   echo "$as_me:3434: result: no, using $LN_S" >&5
3435 echo "${ECHO_T}no, using $LN_S" >&6
3436 fi
3437
3438 echo "$as_me:3438: checking if $LN_S -f options work" >&5
3439 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3440
3441 rm -f conf$$.src conf$$dst
3442 echo >conf$$.dst
3443 echo first >conf$$.src
3444 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3445         cf_prog_ln_sf=yes
3446 else
3447         cf_prog_ln_sf=no
3448 fi
3449 rm -f conf$$.dst conf$$src
3450 echo "$as_me:3450: result: $cf_prog_ln_sf" >&5
3451 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3452
3453 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3454
3455 echo "$as_me:3455: checking for long file names" >&5
3456 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3457 if test "${ac_cv_sys_long_file_names+set}" = set; then
3458   echo $ECHO_N "(cached) $ECHO_C" >&6
3459 else
3460   ac_cv_sys_long_file_names=yes
3461 # Test for long file names in all the places we know might matter:
3462 #      .                the current directory, where building will happen
3463 #      $prefix/lib      where we will be installing things
3464 #      $exec_prefix/lib likewise
3465 # eval it to expand exec_prefix.
3466 #      $TMPDIR          if set, where it might want to write temporary files
3467 # if $TMPDIR is not set:
3468 #      /tmp             where it might want to write temporary files
3469 #      /var/tmp         likewise
3470 #      /usr/tmp         likewise
3471 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3472   ac_tmpdirs=$TMPDIR
3473 else
3474   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3475 fi
3476 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3477   test -d $ac_dir || continue
3478   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3479   ac_xdir=$ac_dir/cf$$
3480   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3481   ac_tf1=$ac_xdir/conftest9012345
3482   ac_tf2=$ac_xdir/conftest9012346
3483   (echo 1 >$ac_tf1) 2>/dev/null
3484   (echo 2 >$ac_tf2) 2>/dev/null
3485   ac_val=`cat $ac_tf1 2>/dev/null`
3486   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3487     ac_cv_sys_long_file_names=no
3488     rm -rf $ac_xdir 2>/dev/null
3489     break
3490   fi
3491   rm -rf $ac_xdir 2>/dev/null
3492 done
3493 fi
3494 echo "$as_me:3494: result: $ac_cv_sys_long_file_names" >&5
3495 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3496 if test $ac_cv_sys_long_file_names = yes; then
3497
3498 cat >>confdefs.h <<\EOF
3499 #define HAVE_LONG_FILE_NAMES 1
3500 EOF
3501
3502 fi
3503
3504 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3505 # of package conflict.
3506 cf_config_suffix=
3507
3508 # Check whether --with-config-suffix or --without-config-suffix was given.
3509 if test "${with_config_suffix+set}" = set; then
3510   withval="$with_config_suffix"
3511   case "x$withval" in
3512         (xyes|xno)
3513                 { echo "$as_me:3513: WARNING: expected a value for config-suffix option" >&5
3514 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3515                 ;;
3516         (*)     cf_config_suffix="$withval"
3517                 ;;
3518         esac
3519 fi;
3520
3521 # If we find pkg-config, check if we should install the ".pc" files.
3522
3523 echo "$as_me:3523: checking if you want to use pkg-config" >&5
3524 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3525
3526 # Check whether --with-pkg-config or --without-pkg-config was given.
3527 if test "${with_pkg_config+set}" = set; then
3528   withval="$with_pkg_config"
3529   cf_pkg_config=$withval
3530 else
3531   cf_pkg_config=yes
3532 fi;
3533 echo "$as_me:3533: result: $cf_pkg_config" >&5
3534 echo "${ECHO_T}$cf_pkg_config" >&6
3535
3536 case $cf_pkg_config in
3537 (no)
3538         PKG_CONFIG=none
3539         ;;
3540 (yes)
3541
3542 if test -n "$ac_tool_prefix"; then
3543   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3544 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3545 echo "$as_me:3545: checking for $ac_word" >&5
3546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3547 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3548   echo $ECHO_N "(cached) $ECHO_C" >&6
3549 else
3550   case $PKG_CONFIG in
3551   [\\/]* | ?:[\\/]*)
3552   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3553   ;;
3554   *)
3555   ac_save_IFS=$IFS; IFS=$ac_path_separator
3556 ac_dummy="$PATH"
3557 for ac_dir in $ac_dummy; do
3558   IFS=$ac_save_IFS
3559   test -z "$ac_dir" && ac_dir=.
3560   if $as_executable_p "$ac_dir/$ac_word"; then
3561    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3562    echo "$as_me:3562: found $ac_dir/$ac_word" >&5
3563    break
3564 fi
3565 done
3566
3567   ;;
3568 esac
3569 fi
3570 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3571
3572 if test -n "$PKG_CONFIG"; then
3573   echo "$as_me:3573: result: $PKG_CONFIG" >&5
3574 echo "${ECHO_T}$PKG_CONFIG" >&6
3575 else
3576   echo "$as_me:3576: result: no" >&5
3577 echo "${ECHO_T}no" >&6
3578 fi
3579
3580 fi
3581 if test -z "$ac_cv_path_PKG_CONFIG"; then
3582   ac_pt_PKG_CONFIG=$PKG_CONFIG
3583   # Extract the first word of "pkg-config", so it can be a program name with args.
3584 set dummy pkg-config; ac_word=$2
3585 echo "$as_me:3585: checking for $ac_word" >&5
3586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3587 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3588   echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590   case $ac_pt_PKG_CONFIG in
3591   [\\/]* | ?:[\\/]*)
3592   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3593   ;;
3594   *)
3595   ac_save_IFS=$IFS; IFS=$ac_path_separator
3596 ac_dummy="$PATH"
3597 for ac_dir in $ac_dummy; do
3598   IFS=$ac_save_IFS
3599   test -z "$ac_dir" && ac_dir=.
3600   if $as_executable_p "$ac_dir/$ac_word"; then
3601    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3602    echo "$as_me:3602: found $ac_dir/$ac_word" >&5
3603    break
3604 fi
3605 done
3606
3607   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3608   ;;
3609 esac
3610 fi
3611 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3612
3613 if test -n "$ac_pt_PKG_CONFIG"; then
3614   echo "$as_me:3614: result: $ac_pt_PKG_CONFIG" >&5
3615 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3616 else
3617   echo "$as_me:3617: result: no" >&5
3618 echo "${ECHO_T}no" >&6
3619 fi
3620
3621   PKG_CONFIG=$ac_pt_PKG_CONFIG
3622 else
3623   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3624 fi
3625
3626         ;;
3627 (*)
3628         PKG_CONFIG=$withval
3629         ;;
3630 esac
3631
3632 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3633 if test "$PKG_CONFIG" != none ; then
3634
3635 if test "x$prefix" != xNONE; then
3636         cf_path_syntax="$prefix"
3637 else
3638         cf_path_syntax="$ac_default_prefix"
3639 fi
3640
3641 case ".$PKG_CONFIG" in
3642 (.\$\(*\)*|.\'*\'*)
3643         ;;
3644 (..|./*|.\\*)
3645         ;;
3646 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3647         ;;
3648 (.\${*prefix}*|.\${*dir}*)
3649         eval PKG_CONFIG="$PKG_CONFIG"
3650         case ".$PKG_CONFIG" in
3651         (.NONE/*)
3652                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3653                 ;;
3654         esac
3655         ;;
3656 (.no|.NONE/*)
3657         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3658         ;;
3659 (*)
3660         { { echo "$as_me:3660: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3661 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3662    { (exit 1); exit 1; }; }
3663         ;;
3664 esac
3665
3666 elif test "x$cf_pkg_config" != xno ; then
3667         { echo "$as_me:3667: WARNING: pkg-config is not installed" >&5
3668 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3669 fi
3670
3671 case $PKG_CONFIG in
3672 (no|none|yes)
3673         echo "$as_me:3673: checking for pkg-config library directory" >&5
3674 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3675         ;;
3676 (*)
3677         echo "$as_me:3677: checking for $PKG_CONFIG library directory" >&5
3678 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3679         ;;
3680 esac
3681
3682 PKG_CONFIG_LIBDIR=no
3683
3684 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3685 if test "${with_pkg_config_libdir+set}" = set; then
3686   withval="$with_pkg_config_libdir"
3687   PKG_CONFIG_LIBDIR=$withval
3688 else
3689   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3690 fi;
3691
3692 case x$PKG_CONFIG_LIBDIR in
3693 (x/*)
3694         ;;
3695 (xyes)
3696         # Look for the library directory using the same prefix as the executable
3697         if test "x$PKG_CONFIG" = xnone
3698         then
3699                 cf_path=$prefix
3700         else
3701                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3702         fi
3703
3704         # If you don't like using the default architecture, you have to specify the
3705         # intended library directory and corresponding compiler/linker options.
3706         #
3707         # This case allows for Debian's 2014-flavor of multiarch, along with the
3708         # most common variations before that point.  Some other variants spell the
3709         # directory differently, e.g., "pkg-config", and put it in unusual places.
3710         # pkg-config has always been poorly standardized, which is ironic...
3711         case x`(arch) 2>/dev/null` in
3712         (*64)
3713                 cf_search_path="\
3714                         $cf_path/lib/*64-linux-gnu \
3715                         $cf_path/share \
3716                         $cf_path/lib64 \
3717                         $cf_path/lib32 \
3718                         $cf_path/lib"
3719                 ;;
3720         (*)
3721                 cf_search_path="\
3722                         $cf_path/lib/*-linux-gnu \
3723                         $cf_path/share \
3724                         $cf_path/lib32 \
3725                         $cf_path/lib \
3726                         $cf_path/libdata"
3727                 ;;
3728         esac
3729
3730         test -n "$verbose" && echo "    list..." 1>&6
3731
3732 echo "${as_me:-configure}:3732: testing list... ..." 1>&5
3733
3734         for cf_config in $cf_search_path
3735         do
3736                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3737
3738 echo "${as_me:-configure}:3738: testing checking $cf_config/pkgconfig ..." 1>&5
3739
3740                 if test -d $cf_config/pkgconfig
3741                 then
3742                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3743                         echo "$as_me:3743: checking done" >&5
3744 echo $ECHO_N "checking done... $ECHO_C" >&6
3745                         break
3746                 fi
3747         done
3748         ;;
3749 (*)
3750         ;;
3751 esac
3752
3753 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3754         echo "$as_me:3754: result: $PKG_CONFIG_LIBDIR" >&5
3755 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3756 fi
3757
3758 if test "x$PKG_CONFIG" != xnone
3759 then
3760         echo "$as_me:3760: checking if we should install .pc files for $PKG_CONFIG" >&5
3761 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3762 else
3763         echo "$as_me:3763: checking if we should install .pc files" >&5
3764 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3765 fi
3766
3767 # Check whether --enable-pc-files or --disable-pc-files was given.
3768 if test "${enable_pc_files+set}" = set; then
3769   enableval="$enable_pc_files"
3770   enable_pc_files=$enableval
3771 else
3772   enable_pc_files=no
3773 fi;
3774 echo "$as_me:3774: result: $enable_pc_files" >&5
3775 echo "${ECHO_T}$enable_pc_files" >&6
3776
3777 if test "x$enable_pc_files" != xno
3778 then
3779         MAKE_PC_FILES=
3780         case "x$PKG_CONFIG_LIBDIR" in
3781         (xno|xyes)
3782                 { echo "$as_me:3782: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3783 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3784                 ;;
3785         (*)
3786
3787 if test "x$prefix" != xNONE; then
3788         cf_path_syntax="$prefix"
3789 else
3790         cf_path_syntax="$ac_default_prefix"
3791 fi
3792
3793 case ".$PKG_CONFIG_LIBDIR" in
3794 (.\$\(*\)*|.\'*\'*)
3795         ;;
3796 (..|./*|.\\*)
3797         ;;
3798 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3799         ;;
3800 (.\${*prefix}*|.\${*dir}*)
3801         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3802         case ".$PKG_CONFIG_LIBDIR" in
3803         (.NONE/*)
3804                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3805                 ;;
3806         esac
3807         ;;
3808 (.no|.NONE/*)
3809         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3810         ;;
3811 (*)
3812         { { echo "$as_me:3812: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3813 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3814    { (exit 1); exit 1; }; }
3815         ;;
3816 esac
3817
3818                 ;;
3819         esac
3820 else
3821         MAKE_PC_FILES="#"
3822 fi
3823
3824 if test -z "$MAKE_PC_FILES"
3825 then
3826         echo "$as_me:3826: checking for suffix to add to pc-files" >&5
3827 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3828
3829 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3830 if test "${with_pc_suffix+set}" = set; then
3831   withval="$with_pc_suffix"
3832   case "x$withval" in
3833         (xyes|xno)
3834                 PC_MODULE_SUFFIX=
3835                 ;;
3836         (*)     PC_MODULE_SUFFIX="$withval"
3837                 ;;
3838         esac
3839 fi;
3840         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3841         echo "$as_me:3841: result: $PC_MODULE_SUFFIX" >&5
3842 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3843         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3844
3845 fi
3846
3847 echo "$as_me:3847: checking if we should assume mixed-case filenames" >&5
3848 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3849
3850 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3851 if test "${enable_mixed_case+set}" = set; then
3852   enableval="$enable_mixed_case"
3853   enable_mixedcase=$enableval
3854 else
3855   enable_mixedcase=auto
3856 fi;
3857 echo "$as_me:3857: result: $enable_mixedcase" >&5
3858 echo "${ECHO_T}$enable_mixedcase" >&6
3859 if test "$enable_mixedcase" = "auto" ; then
3860
3861 echo "$as_me:3861: checking if filesystem supports mixed-case filenames" >&5
3862 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3863 if test "${cf_cv_mixedcase+set}" = set; then
3864   echo $ECHO_N "(cached) $ECHO_C" >&6
3865 else
3866
3867 if test "$cross_compiling" = yes ; then
3868         case $target_alias in
3869         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3870                 cf_cv_mixedcase=no
3871                 ;;
3872         (*)
3873                 cf_cv_mixedcase=yes
3874                 ;;
3875         esac
3876 else
3877         rm -f conftest CONFTEST
3878         echo test >conftest
3879         if test -f CONFTEST ; then
3880                 cf_cv_mixedcase=no
3881         else
3882                 cf_cv_mixedcase=yes
3883         fi
3884         rm -f conftest CONFTEST
3885 fi
3886
3887 fi
3888 echo "$as_me:3888: result: $cf_cv_mixedcase" >&5
3889 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3890 test "$cf_cv_mixedcase" = yes &&
3891 cat >>confdefs.h <<\EOF
3892 #define MIXEDCASE_FILENAMES 1
3893 EOF
3894
3895 else
3896         cf_cv_mixedcase=$enable_mixedcase
3897         if test "x$enable_mixedcase" = "xyes" ; then
3898
3899 cat >>confdefs.h <<\EOF
3900 #define MIXEDCASE_FILENAMES 1
3901 EOF
3902
3903         fi
3904 fi
3905
3906 # do this after mixed-case option (tags/TAGS is not as important as tic).
3907 echo "$as_me:3907: checking whether ${MAKE-make} sets \${MAKE}" >&5
3908 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3909 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3910 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3911   echo $ECHO_N "(cached) $ECHO_C" >&6
3912 else
3913   cat >conftest.make <<\EOF
3914 all:
3915         @echo 'ac_maketemp="${MAKE}"'
3916 EOF
3917 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3918 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3919 if test -n "$ac_maketemp"; then
3920   eval ac_cv_prog_make_${ac_make}_set=yes
3921 else
3922   eval ac_cv_prog_make_${ac_make}_set=no
3923 fi
3924 rm -f conftest.make
3925 fi
3926 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3927   echo "$as_me:3927: result: yes" >&5
3928 echo "${ECHO_T}yes" >&6
3929   SET_MAKE=
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933   SET_MAKE="MAKE=${MAKE-make}"
3934 fi
3935
3936 for ac_prog in exctags ctags
3937 do
3938   # Extract the first word of "$ac_prog", so it can be a program name with args.
3939 set dummy $ac_prog; ac_word=$2
3940 echo "$as_me:3940: checking for $ac_word" >&5
3941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942 if test "${ac_cv_prog_CTAGS+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   if test -n "$CTAGS"; then
3946   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3947 else
3948   ac_save_IFS=$IFS; IFS=$ac_path_separator
3949 ac_dummy="$PATH"
3950 for ac_dir in $ac_dummy; do
3951   IFS=$ac_save_IFS
3952   test -z "$ac_dir" && ac_dir=.
3953   $as_executable_p "$ac_dir/$ac_word" || continue
3954 ac_cv_prog_CTAGS="$ac_prog"
3955 echo "$as_me:3955: found $ac_dir/$ac_word" >&5
3956 break
3957 done
3958
3959 fi
3960 fi
3961 CTAGS=$ac_cv_prog_CTAGS
3962 if test -n "$CTAGS"; then
3963   echo "$as_me:3963: result: $CTAGS" >&5
3964 echo "${ECHO_T}$CTAGS" >&6
3965 else
3966   echo "$as_me:3966: result: no" >&5
3967 echo "${ECHO_T}no" >&6
3968 fi
3969
3970   test -n "$CTAGS" && break
3971 done
3972
3973 for ac_prog in exetags etags
3974 do
3975   # Extract the first word of "$ac_prog", so it can be a program name with args.
3976 set dummy $ac_prog; ac_word=$2
3977 echo "$as_me:3977: checking for $ac_word" >&5
3978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3979 if test "${ac_cv_prog_ETAGS+set}" = set; then
3980   echo $ECHO_N "(cached) $ECHO_C" >&6
3981 else
3982   if test -n "$ETAGS"; then
3983   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3984 else
3985   ac_save_IFS=$IFS; IFS=$ac_path_separator
3986 ac_dummy="$PATH"
3987 for ac_dir in $ac_dummy; do
3988   IFS=$ac_save_IFS
3989   test -z "$ac_dir" && ac_dir=.
3990   $as_executable_p "$ac_dir/$ac_word" || continue
3991 ac_cv_prog_ETAGS="$ac_prog"
3992 echo "$as_me:3992: found $ac_dir/$ac_word" >&5
3993 break
3994 done
3995
3996 fi
3997 fi
3998 ETAGS=$ac_cv_prog_ETAGS
3999 if test -n "$ETAGS"; then
4000   echo "$as_me:4000: result: $ETAGS" >&5
4001 echo "${ECHO_T}$ETAGS" >&6
4002 else
4003   echo "$as_me:4003: result: no" >&5
4004 echo "${ECHO_T}no" >&6
4005 fi
4006
4007   test -n "$ETAGS" && break
4008 done
4009
4010 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4011 set dummy ${CTAGS:-ctags}; ac_word=$2
4012 echo "$as_me:4012: checking for $ac_word" >&5
4013 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4014 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4015   echo $ECHO_N "(cached) $ECHO_C" >&6
4016 else
4017   if test -n "$MAKE_LOWER_TAGS"; then
4018   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4019 else
4020   ac_save_IFS=$IFS; IFS=$ac_path_separator
4021 ac_dummy="$PATH"
4022 for ac_dir in $ac_dummy; do
4023   IFS=$ac_save_IFS
4024   test -z "$ac_dir" && ac_dir=.
4025   $as_executable_p "$ac_dir/$ac_word" || continue
4026 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4027 echo "$as_me:4027: found $ac_dir/$ac_word" >&5
4028 break
4029 done
4030
4031   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4032 fi
4033 fi
4034 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4035 if test -n "$MAKE_LOWER_TAGS"; then
4036   echo "$as_me:4036: result: $MAKE_LOWER_TAGS" >&5
4037 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4038 else
4039   echo "$as_me:4039: result: no" >&5
4040 echo "${ECHO_T}no" >&6
4041 fi
4042
4043 if test "$cf_cv_mixedcase" = yes ; then
4044         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4045 set dummy ${ETAGS:-etags}; ac_word=$2
4046 echo "$as_me:4046: checking for $ac_word" >&5
4047 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4048 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4049   echo $ECHO_N "(cached) $ECHO_C" >&6
4050 else
4051   if test -n "$MAKE_UPPER_TAGS"; then
4052   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4053 else
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   $as_executable_p "$ac_dir/$ac_word" || continue
4060 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4061 echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062 break
4063 done
4064
4065   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4066 fi
4067 fi
4068 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4069 if test -n "$MAKE_UPPER_TAGS"; then
4070   echo "$as_me:4070: result: $MAKE_UPPER_TAGS" >&5
4071 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4072 else
4073   echo "$as_me:4073: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 fi
4076
4077 else
4078         MAKE_UPPER_TAGS=no
4079 fi
4080
4081 if test "$MAKE_UPPER_TAGS" = yes ; then
4082         MAKE_UPPER_TAGS=
4083 else
4084         MAKE_UPPER_TAGS="#"
4085 fi
4086
4087 if test "$MAKE_LOWER_TAGS" = yes ; then
4088         MAKE_LOWER_TAGS=
4089 else
4090         MAKE_LOWER_TAGS="#"
4091 fi
4092
4093 echo "$as_me:4093: checking for makeflags variable" >&5
4094 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4095 if test "${cf_cv_makeflags+set}" = set; then
4096   echo $ECHO_N "(cached) $ECHO_C" >&6
4097 else
4098
4099         cf_cv_makeflags=''
4100         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4101         do
4102                 cat >cf_makeflags.tmp <<CF_EOF
4103 SHELL = $SHELL
4104 all :
4105         @ echo '.$cf_option'
4106 CF_EOF
4107                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4108                 case "$cf_result" in
4109                 (.*k|.*kw)
4110                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4111                         case "$cf_result" in
4112                         (.*CC=*)        cf_cv_makeflags=
4113                                 ;;
4114                         (*)     cf_cv_makeflags=$cf_option
4115                                 ;;
4116                         esac
4117                         break
4118                         ;;
4119                 (.-)
4120                         ;;
4121                 (*)
4122
4123 echo "${as_me:-configure}:4123: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4124
4125                         ;;
4126                 esac
4127         done
4128         rm -f cf_makeflags.tmp
4129
4130 fi
4131 echo "$as_me:4131: result: $cf_cv_makeflags" >&5
4132 echo "${ECHO_T}$cf_cv_makeflags" >&6
4133
4134 if test -n "$ac_tool_prefix"; then
4135   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4136 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4137 echo "$as_me:4137: checking for $ac_word" >&5
4138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4139 if test "${ac_cv_prog_RANLIB+set}" = set; then
4140   echo $ECHO_N "(cached) $ECHO_C" >&6
4141 else
4142   if test -n "$RANLIB"; then
4143   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4144 else
4145   ac_save_IFS=$IFS; IFS=$ac_path_separator
4146 ac_dummy="$PATH"
4147 for ac_dir in $ac_dummy; do
4148   IFS=$ac_save_IFS
4149   test -z "$ac_dir" && ac_dir=.
4150   $as_executable_p "$ac_dir/$ac_word" || continue
4151 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4152 echo "$as_me:4152: found $ac_dir/$ac_word" >&5
4153 break
4154 done
4155
4156 fi
4157 fi
4158 RANLIB=$ac_cv_prog_RANLIB
4159 if test -n "$RANLIB"; then
4160   echo "$as_me:4160: result: $RANLIB" >&5
4161 echo "${ECHO_T}$RANLIB" >&6
4162 else
4163   echo "$as_me:4163: result: no" >&5
4164 echo "${ECHO_T}no" >&6
4165 fi
4166
4167 fi
4168 if test -z "$ac_cv_prog_RANLIB"; then
4169   ac_ct_RANLIB=$RANLIB
4170   # Extract the first word of "ranlib", so it can be a program name with args.
4171 set dummy ranlib; ac_word=$2
4172 echo "$as_me:4172: checking for $ac_word" >&5
4173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4174 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4175   echo $ECHO_N "(cached) $ECHO_C" >&6
4176 else
4177   if test -n "$ac_ct_RANLIB"; then
4178   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4179 else
4180   ac_save_IFS=$IFS; IFS=$ac_path_separator
4181 ac_dummy="$PATH"
4182 for ac_dir in $ac_dummy; do
4183   IFS=$ac_save_IFS
4184   test -z "$ac_dir" && ac_dir=.
4185   $as_executable_p "$ac_dir/$ac_word" || continue
4186 ac_cv_prog_ac_ct_RANLIB="ranlib"
4187 echo "$as_me:4187: found $ac_dir/$ac_word" >&5
4188 break
4189 done
4190
4191   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4192 fi
4193 fi
4194 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4195 if test -n "$ac_ct_RANLIB"; then
4196   echo "$as_me:4196: result: $ac_ct_RANLIB" >&5
4197 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4198 else
4199   echo "$as_me:4199: result: no" >&5
4200 echo "${ECHO_T}no" >&6
4201 fi
4202
4203   RANLIB=$ac_ct_RANLIB
4204 else
4205   RANLIB="$ac_cv_prog_RANLIB"
4206 fi
4207
4208 if test -n "$ac_tool_prefix"; then
4209   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4210 set dummy ${ac_tool_prefix}ld; ac_word=$2
4211 echo "$as_me:4211: checking for $ac_word" >&5
4212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4213 if test "${ac_cv_prog_LD+set}" = set; then
4214   echo $ECHO_N "(cached) $ECHO_C" >&6
4215 else
4216   if test -n "$LD"; then
4217   ac_cv_prog_LD="$LD" # Let the user override the test.
4218 else
4219   ac_save_IFS=$IFS; IFS=$ac_path_separator
4220 ac_dummy="$PATH"
4221 for ac_dir in $ac_dummy; do
4222   IFS=$ac_save_IFS
4223   test -z "$ac_dir" && ac_dir=.
4224   $as_executable_p "$ac_dir/$ac_word" || continue
4225 ac_cv_prog_LD="${ac_tool_prefix}ld"
4226 echo "$as_me:4226: found $ac_dir/$ac_word" >&5
4227 break
4228 done
4229
4230 fi
4231 fi
4232 LD=$ac_cv_prog_LD
4233 if test -n "$LD"; then
4234   echo "$as_me:4234: result: $LD" >&5
4235 echo "${ECHO_T}$LD" >&6
4236 else
4237   echo "$as_me:4237: result: no" >&5
4238 echo "${ECHO_T}no" >&6
4239 fi
4240
4241 fi
4242 if test -z "$ac_cv_prog_LD"; then
4243   ac_ct_LD=$LD
4244   # Extract the first word of "ld", so it can be a program name with args.
4245 set dummy ld; ac_word=$2
4246 echo "$as_me:4246: checking for $ac_word" >&5
4247 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4248 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4249   echo $ECHO_N "(cached) $ECHO_C" >&6
4250 else
4251   if test -n "$ac_ct_LD"; then
4252   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4253 else
4254   ac_save_IFS=$IFS; IFS=$ac_path_separator
4255 ac_dummy="$PATH"
4256 for ac_dir in $ac_dummy; do
4257   IFS=$ac_save_IFS
4258   test -z "$ac_dir" && ac_dir=.
4259   $as_executable_p "$ac_dir/$ac_word" || continue
4260 ac_cv_prog_ac_ct_LD="ld"
4261 echo "$as_me:4261: found $ac_dir/$ac_word" >&5
4262 break
4263 done
4264
4265   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4266 fi
4267 fi
4268 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4269 if test -n "$ac_ct_LD"; then
4270   echo "$as_me:4270: result: $ac_ct_LD" >&5
4271 echo "${ECHO_T}$ac_ct_LD" >&6
4272 else
4273   echo "$as_me:4273: result: no" >&5
4274 echo "${ECHO_T}no" >&6
4275 fi
4276
4277   LD=$ac_ct_LD
4278 else
4279   LD="$ac_cv_prog_LD"
4280 fi
4281
4282 if test -n "$ac_tool_prefix"; then
4283   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4284 set dummy ${ac_tool_prefix}ar; ac_word=$2
4285 echo "$as_me:4285: checking for $ac_word" >&5
4286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4287 if test "${ac_cv_prog_AR+set}" = set; then
4288   echo $ECHO_N "(cached) $ECHO_C" >&6
4289 else
4290   if test -n "$AR"; then
4291   ac_cv_prog_AR="$AR" # Let the user override the test.
4292 else
4293   ac_save_IFS=$IFS; IFS=$ac_path_separator
4294 ac_dummy="$PATH"
4295 for ac_dir in $ac_dummy; do
4296   IFS=$ac_save_IFS
4297   test -z "$ac_dir" && ac_dir=.
4298   $as_executable_p "$ac_dir/$ac_word" || continue
4299 ac_cv_prog_AR="${ac_tool_prefix}ar"
4300 echo "$as_me:4300: found $ac_dir/$ac_word" >&5
4301 break
4302 done
4303
4304 fi
4305 fi
4306 AR=$ac_cv_prog_AR
4307 if test -n "$AR"; then
4308   echo "$as_me:4308: result: $AR" >&5
4309 echo "${ECHO_T}$AR" >&6
4310 else
4311   echo "$as_me:4311: result: no" >&5
4312 echo "${ECHO_T}no" >&6
4313 fi
4314
4315 fi
4316 if test -z "$ac_cv_prog_AR"; then
4317   ac_ct_AR=$AR
4318   # Extract the first word of "ar", so it can be a program name with args.
4319 set dummy ar; ac_word=$2
4320 echo "$as_me:4320: checking for $ac_word" >&5
4321 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4322 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4323   echo $ECHO_N "(cached) $ECHO_C" >&6
4324 else
4325   if test -n "$ac_ct_AR"; then
4326   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4327 else
4328   ac_save_IFS=$IFS; IFS=$ac_path_separator
4329 ac_dummy="$PATH"
4330 for ac_dir in $ac_dummy; do
4331   IFS=$ac_save_IFS
4332   test -z "$ac_dir" && ac_dir=.
4333   $as_executable_p "$ac_dir/$ac_word" || continue
4334 ac_cv_prog_ac_ct_AR="ar"
4335 echo "$as_me:4335: found $ac_dir/$ac_word" >&5
4336 break
4337 done
4338
4339   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4340 fi
4341 fi
4342 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4343 if test -n "$ac_ct_AR"; then
4344   echo "$as_me:4344: result: $ac_ct_AR" >&5
4345 echo "${ECHO_T}$ac_ct_AR" >&6
4346 else
4347   echo "$as_me:4347: result: no" >&5
4348 echo "${ECHO_T}no" >&6
4349 fi
4350
4351   AR=$ac_ct_AR
4352 else
4353   AR="$ac_cv_prog_AR"
4354 fi
4355
4356 if test -n "$ac_tool_prefix"; then
4357   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4358 set dummy ${ac_tool_prefix}nm; ac_word=$2
4359 echo "$as_me:4359: checking for $ac_word" >&5
4360 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4361 if test "${ac_cv_prog_NM+set}" = set; then
4362   echo $ECHO_N "(cached) $ECHO_C" >&6
4363 else
4364   if test -n "$NM"; then
4365   ac_cv_prog_NM="$NM" # Let the user override the test.
4366 else
4367   ac_save_IFS=$IFS; IFS=$ac_path_separator
4368 ac_dummy="$PATH"
4369 for ac_dir in $ac_dummy; do
4370   IFS=$ac_save_IFS
4371   test -z "$ac_dir" && ac_dir=.
4372   $as_executable_p "$ac_dir/$ac_word" || continue
4373 ac_cv_prog_NM="${ac_tool_prefix}nm"
4374 echo "$as_me:4374: found $ac_dir/$ac_word" >&5
4375 break
4376 done
4377
4378 fi
4379 fi
4380 NM=$ac_cv_prog_NM
4381 if test -n "$NM"; then
4382   echo "$as_me:4382: result: $NM" >&5
4383 echo "${ECHO_T}$NM" >&6
4384 else
4385   echo "$as_me:4385: result: no" >&5
4386 echo "${ECHO_T}no" >&6
4387 fi
4388
4389 fi
4390 if test -z "$ac_cv_prog_NM"; then
4391   ac_ct_NM=$NM
4392   # Extract the first word of "nm", so it can be a program name with args.
4393 set dummy nm; ac_word=$2
4394 echo "$as_me:4394: checking for $ac_word" >&5
4395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4396 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4397   echo $ECHO_N "(cached) $ECHO_C" >&6
4398 else
4399   if test -n "$ac_ct_NM"; then
4400   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4401 else
4402   ac_save_IFS=$IFS; IFS=$ac_path_separator
4403 ac_dummy="$PATH"
4404 for ac_dir in $ac_dummy; do
4405   IFS=$ac_save_IFS
4406   test -z "$ac_dir" && ac_dir=.
4407   $as_executable_p "$ac_dir/$ac_word" || continue
4408 ac_cv_prog_ac_ct_NM="nm"
4409 echo "$as_me:4409: found $ac_dir/$ac_word" >&5
4410 break
4411 done
4412
4413   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4414 fi
4415 fi
4416 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4417 if test -n "$ac_ct_NM"; then
4418   echo "$as_me:4418: result: $ac_ct_NM" >&5
4419 echo "${ECHO_T}$ac_ct_NM" >&6
4420 else
4421   echo "$as_me:4421: result: no" >&5
4422 echo "${ECHO_T}no" >&6
4423 fi
4424
4425   NM=$ac_ct_NM
4426 else
4427   NM="$ac_cv_prog_NM"
4428 fi
4429
4430 if test -n "$ac_tool_prefix"; then
4431   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4432 set dummy ${ac_tool_prefix}ar; ac_word=$2
4433 echo "$as_me:4433: checking for $ac_word" >&5
4434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4435 if test "${ac_cv_prog_AR+set}" = set; then
4436   echo $ECHO_N "(cached) $ECHO_C" >&6
4437 else
4438   if test -n "$AR"; then
4439   ac_cv_prog_AR="$AR" # Let the user override the test.
4440 else
4441   ac_save_IFS=$IFS; IFS=$ac_path_separator
4442 ac_dummy="$PATH"
4443 for ac_dir in $ac_dummy; do
4444   IFS=$ac_save_IFS
4445   test -z "$ac_dir" && ac_dir=.
4446   $as_executable_p "$ac_dir/$ac_word" || continue
4447 ac_cv_prog_AR="${ac_tool_prefix}ar"
4448 echo "$as_me:4448: found $ac_dir/$ac_word" >&5
4449 break
4450 done
4451
4452 fi
4453 fi
4454 AR=$ac_cv_prog_AR
4455 if test -n "$AR"; then
4456   echo "$as_me:4456: result: $AR" >&5
4457 echo "${ECHO_T}$AR" >&6
4458 else
4459   echo "$as_me:4459: result: no" >&5
4460 echo "${ECHO_T}no" >&6
4461 fi
4462
4463 fi
4464 if test -z "$ac_cv_prog_AR"; then
4465   ac_ct_AR=$AR
4466   # Extract the first word of "ar", so it can be a program name with args.
4467 set dummy ar; ac_word=$2
4468 echo "$as_me:4468: checking for $ac_word" >&5
4469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4470 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4471   echo $ECHO_N "(cached) $ECHO_C" >&6
4472 else
4473   if test -n "$ac_ct_AR"; then
4474   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4475 else
4476   ac_save_IFS=$IFS; IFS=$ac_path_separator
4477 ac_dummy="$PATH"
4478 for ac_dir in $ac_dummy; do
4479   IFS=$ac_save_IFS
4480   test -z "$ac_dir" && ac_dir=.
4481   $as_executable_p "$ac_dir/$ac_word" || continue
4482 ac_cv_prog_ac_ct_AR="ar"
4483 echo "$as_me:4483: found $ac_dir/$ac_word" >&5
4484 break
4485 done
4486
4487   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4488 fi
4489 fi
4490 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4491 if test -n "$ac_ct_AR"; then
4492   echo "$as_me:4492: result: $ac_ct_AR" >&5
4493 echo "${ECHO_T}$ac_ct_AR" >&6
4494 else
4495   echo "$as_me:4495: result: no" >&5
4496 echo "${ECHO_T}no" >&6
4497 fi
4498
4499   AR=$ac_ct_AR
4500 else
4501   AR="$ac_cv_prog_AR"
4502 fi
4503
4504 echo "$as_me:4504: checking for options to update archives" >&5
4505 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4506 if test "${cf_cv_ar_flags+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509
4510         cf_cv_ar_flags=unknown
4511         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4512         do
4513
4514                 # check if $ARFLAGS already contains this choice
4515                 if test "x$ARFLAGS" != "x" ; then
4516                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4517                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4518                                 cf_cv_ar_flags=
4519                                 break
4520                         fi
4521                 fi
4522
4523                 rm -f conftest.$ac_cv_objext
4524                 rm -f conftest.a
4525
4526                 cat >conftest.$ac_ext <<EOF
4527 #line 4527 "configure"
4528 int     testdata[3] = { 123, 456, 789 };
4529 EOF
4530                 if { (eval echo "$as_me:4530: \"$ac_compile\"") >&5
4531   (eval $ac_compile) 2>&5
4532   ac_status=$?
4533   echo "$as_me:4533: \$? = $ac_status" >&5
4534   (exit $ac_status); } ; then
4535                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4536                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4537                         if test -f conftest.a ; then
4538                                 cf_cv_ar_flags=$cf_ar_flags
4539                                 break
4540                         fi
4541                 else
4542                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4543
4544 echo "${as_me:-configure}:4544: testing cannot compile test-program ..." 1>&5
4545
4546                         break
4547                 fi
4548         done
4549         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4550
4551 fi
4552 echo "$as_me:4552: result: $cf_cv_ar_flags" >&5
4553 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4554
4555 if test -n "$ARFLAGS" ; then
4556         if test -n "$cf_cv_ar_flags" ; then
4557                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4558         fi
4559 else
4560         ARFLAGS=$cf_cv_ar_flags
4561 fi
4562
4563 echo "$as_me:4563: checking if you have specified an install-prefix" >&5
4564 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4565
4566 # Check whether --with-install-prefix or --without-install-prefix was given.
4567 if test "${with_install_prefix+set}" = set; then
4568   withval="$with_install_prefix"
4569   case "x$withval" in
4570         (xyes|xno)
4571                 ;;
4572         (*)     DESTDIR="$withval"
4573                 ;;
4574         esac
4575 fi;
4576 echo "$as_me:4576: result: $DESTDIR" >&5
4577 echo "${ECHO_T}$DESTDIR" >&6
4578
4579 ###############################################################################
4580
4581 # If we're cross-compiling, allow the user to override the tools and their
4582 # options.  The configure script is oriented toward identifying the host
4583 # compiler, etc., but we need a build compiler to generate parts of the source.
4584
4585 if test "$cross_compiling" = yes ; then
4586
4587         # defaults that we might want to override
4588         : ${BUILD_CFLAGS:=''}
4589         : ${BUILD_CPPFLAGS:=''}
4590         : ${BUILD_LDFLAGS:=''}
4591         : ${BUILD_LIBS:=''}
4592         : ${BUILD_EXEEXT:='$x'}
4593         : ${BUILD_OBJEXT:='o'}
4594
4595 # Check whether --with-build-cc or --without-build-cc was given.
4596 if test "${with_build_cc+set}" = set; then
4597   withval="$with_build_cc"
4598   BUILD_CC="$withval"
4599 else
4600   for ac_prog in gcc clang c99 c89 cc cl
4601 do
4602   # Extract the first word of "$ac_prog", so it can be a program name with args.
4603 set dummy $ac_prog; ac_word=$2
4604 echo "$as_me:4604: checking for $ac_word" >&5
4605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4606 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4607   echo $ECHO_N "(cached) $ECHO_C" >&6
4608 else
4609   if test -n "$BUILD_CC"; then
4610   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4611 else
4612   ac_save_IFS=$IFS; IFS=$ac_path_separator
4613 ac_dummy="$PATH"
4614 for ac_dir in $ac_dummy; do
4615   IFS=$ac_save_IFS
4616   test -z "$ac_dir" && ac_dir=.
4617   $as_executable_p "$ac_dir/$ac_word" || continue
4618 ac_cv_prog_BUILD_CC="$ac_prog"
4619 echo "$as_me:4619: found $ac_dir/$ac_word" >&5
4620 break
4621 done
4622
4623 fi
4624 fi
4625 BUILD_CC=$ac_cv_prog_BUILD_CC
4626 if test -n "$BUILD_CC"; then
4627   echo "$as_me:4627: result: $BUILD_CC" >&5
4628 echo "${ECHO_T}$BUILD_CC" >&6
4629 else
4630   echo "$as_me:4630: result: no" >&5
4631 echo "${ECHO_T}no" >&6
4632 fi
4633
4634   test -n "$BUILD_CC" && break
4635 done
4636 test -n "$BUILD_CC" || BUILD_CC="none"
4637
4638 fi;
4639         echo "$as_me:4639: checking for native build C compiler" >&5
4640 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4641         echo "$as_me:4641: result: $BUILD_CC" >&5
4642 echo "${ECHO_T}$BUILD_CC" >&6
4643
4644         echo "$as_me:4644: checking for native build C preprocessor" >&5
4645 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4646
4647 # Check whether --with-build-cpp or --without-build-cpp was given.
4648 if test "${with_build_cpp+set}" = set; then
4649   withval="$with_build_cpp"
4650   BUILD_CPP="$withval"
4651 else
4652   BUILD_CPP='${BUILD_CC} -E'
4653 fi;
4654         echo "$as_me:4654: result: $BUILD_CPP" >&5
4655 echo "${ECHO_T}$BUILD_CPP" >&6
4656
4657         echo "$as_me:4657: checking for native build C flags" >&5
4658 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4659
4660 # Check whether --with-build-cflags or --without-build-cflags was given.
4661 if test "${with_build_cflags+set}" = set; then
4662   withval="$with_build_cflags"
4663   BUILD_CFLAGS="$withval"
4664 fi;
4665         echo "$as_me:4665: result: $BUILD_CFLAGS" >&5
4666 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4667
4668         echo "$as_me:4668: checking for native build C preprocessor-flags" >&5
4669 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4670
4671 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4672 if test "${with_build_cppflags+set}" = set; then
4673   withval="$with_build_cppflags"
4674   BUILD_CPPFLAGS="$withval"
4675 fi;
4676         echo "$as_me:4676: result: $BUILD_CPPFLAGS" >&5
4677 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4678
4679         echo "$as_me:4679: checking for native build linker-flags" >&5
4680 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4681
4682 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4683 if test "${with_build_ldflags+set}" = set; then
4684   withval="$with_build_ldflags"
4685   BUILD_LDFLAGS="$withval"
4686 fi;
4687         echo "$as_me:4687: result: $BUILD_LDFLAGS" >&5
4688 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4689
4690         echo "$as_me:4690: checking for native build linker-libraries" >&5
4691 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4692
4693 # Check whether --with-build-libs or --without-build-libs was given.
4694 if test "${with_build_libs+set}" = set; then
4695   withval="$with_build_libs"
4696   BUILD_LIBS="$withval"
4697 fi;
4698         echo "$as_me:4698: result: $BUILD_LIBS" >&5
4699 echo "${ECHO_T}$BUILD_LIBS" >&6
4700
4701         # this assumes we're on Unix.
4702         BUILD_EXEEXT=
4703         BUILD_OBJEXT=o
4704
4705         : ${BUILD_CC:='${CC}'}
4706
4707         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4708                 { { echo "$as_me:4708: error: Cross-build requires two compilers.
4709 Use --with-build-cc to specify the native compiler." >&5
4710 echo "$as_me: error: Cross-build requires two compilers.
4711 Use --with-build-cc to specify the native compiler." >&2;}
4712    { (exit 1); exit 1; }; }
4713         fi
4714
4715 else
4716         : ${BUILD_CC:='${CC}'}
4717         : ${BUILD_CPP:='${CPP}'}
4718         : ${BUILD_CFLAGS:='${CFLAGS}'}
4719         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4720         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4721         : ${BUILD_LIBS:='${LIBS}'}
4722         : ${BUILD_EXEEXT:='$x'}
4723         : ${BUILD_OBJEXT:='o'}
4724 fi
4725
4726 ###############################################################################
4727
4728 ### Options to allow the user to specify the set of libraries which are used.
4729 ### Use "--without-normal --with-shared" to allow the default model to be
4730 ### shared, for example.
4731 cf_list_models=""
4732
4733 echo "$as_me:4733: checking if libtool -version-number should be used" >&5
4734 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4735
4736 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4737 if test "${enable_libtool_version+set}" = set; then
4738   enableval="$enable_libtool_version"
4739   test "$enableval" != no && enableval=yes
4740         if test "$enableval" != "yes" ; then
4741     cf_libtool_version=no
4742         else
4743                 cf_libtool_version=yes
4744         fi
4745 else
4746   enableval=yes
4747         cf_libtool_version=yes
4748
4749 fi;
4750 echo "$as_me:4750: result: $cf_libtool_version" >&5
4751 echo "${ECHO_T}$cf_libtool_version" >&6
4752
4753 if test "$cf_libtool_version" = yes ; then
4754         LIBTOOL_VERSION="-version-number"
4755 else
4756         LIBTOOL_VERSION="-version-info"
4757         case "x$VERSION" in
4758         (x)
4759                 { echo "$as_me:4759: WARNING: VERSION was not set" >&5
4760 echo "$as_me: WARNING: VERSION was not set" >&2;}
4761                 ;;
4762         (x*.*.*)
4763                 ABI_VERSION="$VERSION"
4764                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4765
4766 echo "${as_me:-configure}:4766: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4767
4768                 ;;
4769         (x*:*:*)
4770                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4771                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4772
4773 echo "${as_me:-configure}:4773: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4774
4775                 ;;
4776         (*)
4777                 { echo "$as_me:4777: WARNING: unexpected VERSION value: $VERSION" >&5
4778 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4779                 ;;
4780         esac
4781 fi
4782
4783 LIBTOOL=
4784
4785 # common library maintenance symbols that are convenient for libtool scripts:
4786 LIB_CREATE='${AR} -cr'
4787 LIB_OBJECT='${OBJECTS}'
4788 LIB_SUFFIX=.a
4789 LIB_PREP="$RANLIB"
4790
4791 # symbols used to prop libtool up to enable it to determine what it should be
4792 # doing:
4793 LIB_CLEAN=
4794 LIB_COMPILE=
4795 LIB_LINK='${CC}'
4796 LIB_INSTALL=
4797 LIB_UNINSTALL=
4798
4799 echo "$as_me:4799: checking if you want to build libraries with libtool" >&5
4800 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4801
4802 # Check whether --with-libtool or --without-libtool was given.
4803 if test "${with_libtool+set}" = set; then
4804   withval="$with_libtool"
4805   with_libtool=$withval
4806 else
4807   with_libtool=no
4808 fi;
4809 echo "$as_me:4809: result: $with_libtool" >&5
4810 echo "${ECHO_T}$with_libtool" >&6
4811 if test "$with_libtool" != "no"; then
4812
4813         if test "$with_libtool" != "yes" ; then
4814
4815 if test "x$prefix" != xNONE; then
4816         cf_path_syntax="$prefix"
4817 else
4818         cf_path_syntax="$ac_default_prefix"
4819 fi
4820
4821 case ".$with_libtool" in
4822 (.\$\(*\)*|.\'*\'*)
4823         ;;
4824 (..|./*|.\\*)
4825         ;;
4826 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4827         ;;
4828 (.\${*prefix}*|.\${*dir}*)
4829         eval with_libtool="$with_libtool"
4830         case ".$with_libtool" in
4831         (.NONE/*)
4832                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4833                 ;;
4834         esac
4835         ;;
4836 (.no|.NONE/*)
4837         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4838         ;;
4839 (*)
4840         { { echo "$as_me:4840: error: expected a pathname, not \"$with_libtool\"" >&5
4841 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4842    { (exit 1); exit 1; }; }
4843         ;;
4844 esac
4845
4846                 LIBTOOL=$with_libtool
4847         else
4848                 if test -n "$ac_tool_prefix"; then
4849   for ac_prog in libtool glibtool
4850   do
4851     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4852 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4853 echo "$as_me:4853: checking for $ac_word" >&5
4854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4855 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4856   echo $ECHO_N "(cached) $ECHO_C" >&6
4857 else
4858   if test -n "$LIBTOOL"; then
4859   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4860 else
4861   ac_save_IFS=$IFS; IFS=$ac_path_separator
4862 ac_dummy="$PATH"
4863 for ac_dir in $ac_dummy; do
4864   IFS=$ac_save_IFS
4865   test -z "$ac_dir" && ac_dir=.
4866   $as_executable_p "$ac_dir/$ac_word" || continue
4867 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4868 echo "$as_me:4868: found $ac_dir/$ac_word" >&5
4869 break
4870 done
4871
4872 fi
4873 fi
4874 LIBTOOL=$ac_cv_prog_LIBTOOL
4875 if test -n "$LIBTOOL"; then
4876   echo "$as_me:4876: result: $LIBTOOL" >&5
4877 echo "${ECHO_T}$LIBTOOL" >&6
4878 else
4879   echo "$as_me:4879: result: no" >&5
4880 echo "${ECHO_T}no" >&6
4881 fi
4882
4883     test -n "$LIBTOOL" && break
4884   done
4885 fi
4886 if test -z "$LIBTOOL"; then
4887   ac_ct_LIBTOOL=$LIBTOOL
4888   for ac_prog in libtool glibtool
4889 do
4890   # Extract the first word of "$ac_prog", so it can be a program name with args.
4891 set dummy $ac_prog; ac_word=$2
4892 echo "$as_me:4892: checking for $ac_word" >&5
4893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4894 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4895   echo $ECHO_N "(cached) $ECHO_C" >&6
4896 else
4897   if test -n "$ac_ct_LIBTOOL"; then
4898   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4899 else
4900   ac_save_IFS=$IFS; IFS=$ac_path_separator
4901 ac_dummy="$PATH"
4902 for ac_dir in $ac_dummy; do
4903   IFS=$ac_save_IFS
4904   test -z "$ac_dir" && ac_dir=.
4905   $as_executable_p "$ac_dir/$ac_word" || continue
4906 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4907 echo "$as_me:4907: found $ac_dir/$ac_word" >&5
4908 break
4909 done
4910
4911 fi
4912 fi
4913 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4914 if test -n "$ac_ct_LIBTOOL"; then
4915   echo "$as_me:4915: result: $ac_ct_LIBTOOL" >&5
4916 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4917 else
4918   echo "$as_me:4918: result: no" >&5
4919 echo "${ECHO_T}no" >&6
4920 fi
4921
4922   test -n "$ac_ct_LIBTOOL" && break
4923 done
4924 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4925
4926   LIBTOOL=$ac_ct_LIBTOOL
4927 fi
4928
4929 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4930 then
4931         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.].*//'`
4932 else
4933         cf_cv_libtool_version=
4934 fi
4935 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4936
4937                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4938                 then
4939
4940 unset ac_cv_prog_ac_ct_LIBTOOL
4941 unset ac_ct_LIBTOOL
4942 unset LIBTOOL
4943
4944                         if test -n "$ac_tool_prefix"; then
4945   for ac_prog in glibtool
4946   do
4947     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4948 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4949 echo "$as_me:4949: checking for $ac_word" >&5
4950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4951 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4952   echo $ECHO_N "(cached) $ECHO_C" >&6
4953 else
4954   if test -n "$LIBTOOL"; then
4955   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4956 else
4957   ac_save_IFS=$IFS; IFS=$ac_path_separator
4958 ac_dummy="$PATH"
4959 for ac_dir in $ac_dummy; do
4960   IFS=$ac_save_IFS
4961   test -z "$ac_dir" && ac_dir=.
4962   $as_executable_p "$ac_dir/$ac_word" || continue
4963 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4964 echo "$as_me:4964: found $ac_dir/$ac_word" >&5
4965 break
4966 done
4967
4968 fi
4969 fi
4970 LIBTOOL=$ac_cv_prog_LIBTOOL
4971 if test -n "$LIBTOOL"; then
4972   echo "$as_me:4972: result: $LIBTOOL" >&5
4973 echo "${ECHO_T}$LIBTOOL" >&6
4974 else
4975   echo "$as_me:4975: result: no" >&5
4976 echo "${ECHO_T}no" >&6
4977 fi
4978
4979     test -n "$LIBTOOL" && break
4980   done
4981 fi
4982 if test -z "$LIBTOOL"; then
4983   ac_ct_LIBTOOL=$LIBTOOL
4984   for ac_prog in glibtool
4985 do
4986   # Extract the first word of "$ac_prog", so it can be a program name with args.
4987 set dummy $ac_prog; ac_word=$2
4988 echo "$as_me:4988: checking for $ac_word" >&5
4989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4990 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4991   echo $ECHO_N "(cached) $ECHO_C" >&6
4992 else
4993   if test -n "$ac_ct_LIBTOOL"; then
4994   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4995 else
4996   ac_save_IFS=$IFS; IFS=$ac_path_separator
4997 ac_dummy="$PATH"
4998 for ac_dir in $ac_dummy; do
4999   IFS=$ac_save_IFS
5000   test -z "$ac_dir" && ac_dir=.
5001   $as_executable_p "$ac_dir/$ac_word" || continue
5002 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5003 echo "$as_me:5003: found $ac_dir/$ac_word" >&5
5004 break
5005 done
5006
5007 fi
5008 fi
5009 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5010 if test -n "$ac_ct_LIBTOOL"; then
5011   echo "$as_me:5011: result: $ac_ct_LIBTOOL" >&5
5012 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5013 else
5014   echo "$as_me:5014: result: no" >&5
5015 echo "${ECHO_T}no" >&6
5016 fi
5017
5018   test -n "$ac_ct_LIBTOOL" && break
5019 done
5020 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5021
5022   LIBTOOL=$ac_ct_LIBTOOL
5023 fi
5024
5025 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5026 then
5027         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.].*//'`
5028 else
5029         cf_cv_libtool_version=
5030 fi
5031 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5032
5033                 fi
5034         fi
5035         if test -z "$LIBTOOL" ; then
5036                 { { echo "$as_me:5036: error: Cannot find libtool" >&5
5037 echo "$as_me: error: Cannot find libtool" >&2;}
5038    { (exit 1); exit 1; }; }
5039         fi
5040         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5041         LIB_OBJECT='${OBJECTS:.o=.lo}'
5042         LIB_SUFFIX=.la
5043         LIB_CLEAN='${LIBTOOL} --mode=clean'
5044         LIB_COMPILE='${LIBTOOL} --mode=compile'
5045         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5046         LIB_INSTALL='${LIBTOOL} --mode=install'
5047         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5048         LIB_PREP=:
5049
5050 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5051 then
5052         echo "$as_me:5052: checking version of $LIBTOOL" >&5
5053 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5054
5055 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5056 then
5057         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.].*//'`
5058 else
5059         cf_cv_libtool_version=
5060 fi
5061 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5062
5063         echo "$as_me:5063: result: $cf_cv_libtool_version" >&5
5064 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5065         if test -z "$cf_cv_libtool_version" ; then
5066                 { { echo "$as_me:5066: error: This is not GNU libtool" >&5
5067 echo "$as_me: error: This is not GNU libtool" >&2;}
5068    { (exit 1); exit 1; }; }
5069         fi
5070 else
5071         { { echo "$as_me:5071: error: GNU libtool has not been found" >&5
5072 echo "$as_me: error: GNU libtool has not been found" >&2;}
5073    { (exit 1); exit 1; }; }
5074 fi
5075
5076         # special hack to add -no-undefined (which libtool should do for itself)
5077         LT_UNDEF=
5078         case "$cf_cv_system_name" in
5079         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5080                 LT_UNDEF=-no-undefined
5081                 ;;
5082         esac
5083
5084         # special hack to add --tag option for C++ compiler
5085         case $cf_cv_libtool_version in
5086         (1.[5-9]*|[2-9].[0-9.a-z]*)
5087                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5088                 LIBTOOL="$LIBTOOL --tag=CC"
5089                 ;;
5090         (*)
5091                 LIBTOOL_CXX="$LIBTOOL"
5092                 ;;
5093         esac
5094 else
5095         LIBTOOL=""
5096         LIBTOOL_CXX=""
5097 fi
5098
5099 test -z "$LIBTOOL" && ECHO_LT=
5100
5101 if test "$with_libtool" != "no" ; then
5102
5103 cf_list_models="$cf_list_models libtool"
5104
5105 else
5106
5107 echo "$as_me:5107: checking if you want to build shared libraries" >&5
5108 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5109
5110 # Check whether --with-shared or --without-shared was given.
5111 if test "${with_shared+set}" = set; then
5112   withval="$with_shared"
5113   with_shared=$withval
5114 else
5115   with_shared=no
5116 fi;
5117 echo "$as_me:5117: result: $with_shared" >&5
5118 echo "${ECHO_T}$with_shared" >&6
5119 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5120
5121 echo "$as_me:5121: checking if you want to build static libraries" >&5
5122 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5123
5124 # Check whether --with-normal or --without-normal was given.
5125 if test "${with_normal+set}" = set; then
5126   withval="$with_normal"
5127   with_normal=$withval
5128 else
5129   with_normal=yes
5130 fi;
5131 echo "$as_me:5131: result: $with_normal" >&5
5132 echo "${ECHO_T}$with_normal" >&6
5133 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5134
5135 echo "$as_me:5135: checking if you want to build debug libraries" >&5
5136 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5137
5138 # Check whether --with-debug or --without-debug was given.
5139 if test "${with_debug+set}" = set; then
5140   withval="$with_debug"
5141   with_debug=$withval
5142 else
5143   with_debug=yes
5144 fi;
5145 echo "$as_me:5145: result: $with_debug" >&5
5146 echo "${ECHO_T}$with_debug" >&6
5147 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5148
5149 echo "$as_me:5149: checking if you want to build profiling libraries" >&5
5150 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5151
5152 # Check whether --with-profile or --without-profile was given.
5153 if test "${with_profile+set}" = set; then
5154   withval="$with_profile"
5155   with_profile=$withval
5156 else
5157   with_profile=no
5158 fi;
5159 echo "$as_me:5159: result: $with_profile" >&5
5160 echo "${ECHO_T}$with_profile" >&6
5161 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5162
5163 fi
5164
5165 if test "X$cf_with_cxx_binding" != Xno; then
5166 if test "x$with_shared" = "xyes"; then
5167 echo "$as_me:5167: checking if you want to build C++ shared libraries" >&5
5168 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5169
5170 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5171 if test "${with_cxx_shared+set}" = set; then
5172   withval="$with_cxx_shared"
5173   with_shared_cxx=$withval
5174 else
5175   with_shared_cxx=no
5176 fi;
5177 echo "$as_me:5177: result: $with_shared_cxx" >&5
5178 echo "${ECHO_T}$with_shared_cxx" >&6
5179 fi
5180 fi
5181
5182 ###############################################################################
5183
5184 echo "$as_me:5184: checking for specified models" >&5
5185 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5186 test -z "$cf_list_models" && cf_list_models=normal
5187 test "$with_libtool" != "no" && cf_list_models=libtool
5188 echo "$as_me:5188: result: $cf_list_models" >&5
5189 echo "${ECHO_T}$cf_list_models" >&6
5190
5191 ### Use the first model as the default, and save its suffix for use in building
5192 ### up test-applications.
5193 echo "$as_me:5193: checking for default model" >&5
5194 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5195 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5196 echo "$as_me:5196: result: $DFT_LWR_MODEL" >&5
5197 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5198
5199 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5200
5201 TICS_NAME=tic
5202
5203 TINFO_NAME=tinfo
5204
5205 LIB_NAME=ncurses
5206
5207 LIB_DIR=../lib
5208 LIB_2ND=../../lib
5209
5210 echo "$as_me:5210: checking if you want to have a library-prefix" >&5
5211 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5212
5213 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5214 if test "${with_lib_prefix+set}" = set; then
5215   withval="$with_lib_prefix"
5216   with_lib_prefix=$withval
5217 else
5218   with_lib_prefix=auto
5219 fi;
5220 echo "$as_me:5220: result: $with_lib_prefix" >&5
5221 echo "${ECHO_T}$with_lib_prefix" >&6
5222
5223 if test $with_lib_prefix = auto
5224 then
5225
5226         case $cf_cv_system_name in
5227         (OS/2*|os2*)
5228                 if test "$DFT_LWR_MODEL" = libtool; then
5229                         LIB_PREFIX='lib'
5230                 else
5231                         LIB_PREFIX=''
5232                 fi
5233                 ;;
5234         (*)     LIB_PREFIX='lib'
5235                 ;;
5236         esac
5237 cf_prefix=$LIB_PREFIX
5238
5239 elif test $with_lib_prefix = no
5240 then
5241         LIB_PREFIX=
5242 else
5243         LIB_PREFIX=$with_lib_prefix
5244 fi
5245
5246 LIB_SUFFIX=
5247
5248         echo "$as_me:5248: checking for PATH separator" >&5
5249 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5250         case $cf_cv_system_name in
5251         (os2*)  PATH_SEPARATOR=';'  ;;
5252         (*)     ${PATH_SEPARATOR:=':'}  ;;
5253         esac
5254
5255         echo "$as_me:5255: result: $PATH_SEPARATOR" >&5
5256 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5257
5258 ###############################################################################
5259
5260 echo "$as_me:5260: checking if you want to build a separate terminfo library" >&5
5261 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5262
5263 # Check whether --with-termlib or --without-termlib was given.
5264 if test "${with_termlib+set}" = set; then
5265   withval="$with_termlib"
5266   with_termlib=$withval
5267 else
5268   with_termlib=no
5269 fi;
5270 echo "$as_me:5270: result: $with_termlib" >&5
5271 echo "${ECHO_T}$with_termlib" >&6
5272
5273 echo "$as_me:5273: checking if you want to build a separate tic library" >&5
5274 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5275
5276 # Check whether --with-ticlib or --without-ticlib was given.
5277 if test "${with_ticlib+set}" = set; then
5278   withval="$with_ticlib"
5279   with_ticlib=$withval
5280 else
5281   with_ticlib=no
5282 fi;
5283 echo "$as_me:5283: result: $with_ticlib" >&5
5284 echo "${ECHO_T}$with_ticlib" >&6
5285
5286 if test X"$CC_G_OPT" = X"" ; then
5287         CC_G_OPT='-g'
5288         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5289 fi
5290
5291 if test X"$CXX_G_OPT" = X"" ; then
5292         CXX_G_OPT='-g'
5293         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5294 fi
5295
5296 echo "$as_me:5296: checking for default loader flags" >&5
5297 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5298 case $DFT_LWR_MODEL in
5299 (libtool) LD_MODEL=''   ;;
5300 (normal)  LD_MODEL=''   ;;
5301 (debug)   LD_MODEL=$CC_G_OPT ;;
5302 (profile) LD_MODEL='-pg';;
5303 (shared)  LD_MODEL=''   ;;
5304 esac
5305 echo "$as_me:5305: result: $LD_MODEL" >&5
5306 echo "${ECHO_T}$LD_MODEL" >&6
5307
5308 case $DFT_LWR_MODEL in
5309 (shared)
5310
5311 echo "$as_me:5311: checking if rpath option should be used" >&5
5312 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5313
5314 # Check whether --enable-rpath or --disable-rpath was given.
5315 if test "${enable_rpath+set}" = set; then
5316   enableval="$enable_rpath"
5317   cf_cv_enable_rpath=$enableval
5318 else
5319   cf_cv_enable_rpath=no
5320 fi;
5321 echo "$as_me:5321: result: $cf_cv_enable_rpath" >&5
5322 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5323
5324 echo "$as_me:5324: checking if shared libraries should be relinked during install" >&5
5325 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5326
5327 # Check whether --enable-relink or --disable-relink was given.
5328 if test "${enable_relink+set}" = set; then
5329   enableval="$enable_relink"
5330   cf_cv_do_relink=$enableval
5331 else
5332   cf_cv_do_relink=yes
5333 fi;
5334 echo "$as_me:5334: result: $cf_cv_do_relink" >&5
5335 echo "${ECHO_T}$cf_cv_do_relink" >&6
5336         ;;
5337 esac
5338
5339 # we will build libraries one-level down.
5340 rel_builddir=..
5341
5342 LD_RPATH_OPT=
5343 echo "$as_me:5343: checking for an rpath option" >&5
5344 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5345 case $cf_cv_system_name in
5346 (irix*)
5347         if test "$GCC" = yes; then
5348                 LD_RPATH_OPT="-Wl,-rpath,"
5349         else
5350                 LD_RPATH_OPT="-rpath "
5351         fi
5352         ;;
5353 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5354         LD_RPATH_OPT="-Wl,-rpath,"
5355         ;;
5356 (openbsd[2-9].*|mirbsd*)
5357         LD_RPATH_OPT="-Wl,-rpath,"
5358         ;;
5359 (dragonfly*)
5360         LD_RPATH_OPT="-rpath "
5361         ;;
5362 (netbsd*)
5363         LD_RPATH_OPT="-Wl,-rpath,"
5364         ;;
5365 (osf*|mls+*)
5366         LD_RPATH_OPT="-rpath "
5367         ;;
5368 (solaris2*)
5369         LD_RPATH_OPT="-R"
5370         ;;
5371 (*)
5372         ;;
5373 esac
5374 echo "$as_me:5374: result: $LD_RPATH_OPT" >&5
5375 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5376
5377 case "x$LD_RPATH_OPT" in
5378 (x-R*)
5379         echo "$as_me:5379: checking if we need a space after rpath option" >&5
5380 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5381         cf_save_LIBS="$LIBS"
5382
5383 cf_add_libs="${LD_RPATH_OPT}$libdir"
5384 # Filter out duplicates - this happens with badly-designed ".pc" files...
5385 for cf_add_1lib in $LIBS
5386 do
5387         for cf_add_2lib in $cf_add_libs
5388         do
5389                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5390                 then
5391                         cf_add_1lib=
5392                         break
5393                 fi
5394         done
5395         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5396 done
5397 LIBS="$cf_add_libs"
5398
5399         cat >conftest.$ac_ext <<_ACEOF
5400 #line 5400 "configure"
5401 #include "confdefs.h"
5402
5403 int
5404 main (void)
5405 {
5406
5407   ;
5408   return 0;
5409 }
5410 _ACEOF
5411 rm -f conftest.$ac_objext conftest$ac_exeext
5412 if { (eval echo "$as_me:5412: \"$ac_link\"") >&5
5413   (eval $ac_link) 2>&5
5414   ac_status=$?
5415   echo "$as_me:5415: \$? = $ac_status" >&5
5416   (exit $ac_status); } &&
5417          { ac_try='test -s conftest$ac_exeext'
5418   { (eval echo "$as_me:5418: \"$ac_try\"") >&5
5419   (eval $ac_try) 2>&5
5420   ac_status=$?
5421   echo "$as_me:5421: \$? = $ac_status" >&5
5422   (exit $ac_status); }; }; then
5423   cf_rpath_space=no
5424 else
5425   echo "$as_me: failed program was:" >&5
5426 cat conftest.$ac_ext >&5
5427 cf_rpath_space=yes
5428 fi
5429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5430         LIBS="$cf_save_LIBS"
5431         echo "$as_me:5431: result: $cf_rpath_space" >&5
5432 echo "${ECHO_T}$cf_rpath_space" >&6
5433         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5434         ;;
5435 esac
5436
5437         RM_SHARED_OPTS=
5438         LOCAL_LDFLAGS=
5439         LOCAL_LDFLAGS2=
5440         LD_SHARED_OPTS=
5441         INSTALL_LIB="-m 644"
5442         : ${rel_builddir:=.}
5443
5444         shlibdir=$libdir
5445
5446         MAKE_DLLS="#"
5447
5448         cf_cv_do_symlinks=no
5449         cf_ld_rpath_opt=
5450         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5451
5452         echo "$as_me:5452: checking if release/abi version should be used for shared libs" >&5
5453 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5454
5455 # Check whether --with-shlib-version or --without-shlib-version was given.
5456 if test "${with_shlib_version+set}" = set; then
5457   withval="$with_shlib_version"
5458   test -z "$withval" && withval=auto
5459         case $withval in
5460         (yes)
5461                 cf_cv_shlib_version=auto
5462                 ;;
5463         (rel|abi|auto)
5464                 cf_cv_shlib_version=$withval
5465                 ;;
5466         (*)
5467                 echo "$as_me:5467: result: $withval" >&5
5468 echo "${ECHO_T}$withval" >&6
5469                 { { echo "$as_me:5469: error: option value must be one of: rel, abi, or auto" >&5
5470 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5471    { (exit 1); exit 1; }; }
5472                 ;;
5473         esac
5474
5475 else
5476   cf_cv_shlib_version=auto
5477 fi;
5478         echo "$as_me:5478: result: $cf_cv_shlib_version" >&5
5479 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5480
5481         cf_cv_rm_so_locs=no
5482         cf_try_cflags=
5483
5484         # Some less-capable ports of gcc support only -fpic
5485         CC_SHARED_OPTS=
5486
5487         cf_try_fPIC=no
5488         if test "$GCC" = yes
5489         then
5490                 cf_try_fPIC=yes
5491         else
5492                 case $cf_cv_system_name in
5493                 (*linux*)       # e.g., PGI compiler
5494                         cf_try_fPIC=yes
5495                         ;;
5496                 esac
5497         fi
5498
5499         if test "$cf_try_fPIC" = yes
5500         then
5501                 echo "$as_me:5501: checking which $CC option to use" >&5
5502 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5503                 cf_save_CFLAGS="$CFLAGS"
5504                 for CC_SHARED_OPTS in -fPIC -fpic ''
5505                 do
5506                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5507                         cat >conftest.$ac_ext <<_ACEOF
5508 #line 5508 "configure"
5509 #include "confdefs.h"
5510 #include <stdio.h>
5511 int
5512 main (void)
5513 {
5514 int x = 1
5515   ;
5516   return 0;
5517 }
5518 _ACEOF
5519 rm -f conftest.$ac_objext
5520 if { (eval echo "$as_me:5520: \"$ac_compile\"") >&5
5521   (eval $ac_compile) 2>&5
5522   ac_status=$?
5523   echo "$as_me:5523: \$? = $ac_status" >&5
5524   (exit $ac_status); } &&
5525          { ac_try='test -s conftest.$ac_objext'
5526   { (eval echo "$as_me:5526: \"$ac_try\"") >&5
5527   (eval $ac_try) 2>&5
5528   ac_status=$?
5529   echo "$as_me:5529: \$? = $ac_status" >&5
5530   (exit $ac_status); }; }; then
5531   break
5532 else
5533   echo "$as_me: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5535 fi
5536 rm -f conftest.$ac_objext conftest.$ac_ext
5537                 done
5538                 echo "$as_me:5538: result: $CC_SHARED_OPTS" >&5
5539 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5540                 CFLAGS="$cf_save_CFLAGS"
5541         fi
5542
5543         cf_cv_shlib_version_infix=no
5544
5545         case $cf_cv_system_name in
5546         (aix4.3-9*|aix[5-7]*)
5547                 if test "$GCC" = yes; then
5548                         CC_SHARED_OPTS='-Wl,-brtl'
5549                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5550                 else
5551                         CC_SHARED_OPTS='-brtl'
5552                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5553                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5554                 fi
5555                 ;;
5556         (beos*)
5557                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5558                 ;;
5559         (cygwin*)
5560                 CC_SHARED_OPTS=
5561                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5562                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5563                 cf_cv_shlib_version=cygdll
5564                 cf_cv_shlib_version_infix=cygdll
5565                 shlibdir=$bindir
5566                 MAKE_DLLS=
5567                 cat >mk_shared_lib.sh <<-CF_EOF
5568                 #!$SHELL
5569                 SHARED_LIB=\$1
5570                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5571                 shift
5572                 cat <<-EOF
5573                 Linking shared library
5574                 ** SHARED_LIB \$SHARED_LIB
5575                 ** IMPORT_LIB \$IMPORT_LIB
5576 EOF
5577                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5578 CF_EOF
5579                 chmod +x mk_shared_lib.sh
5580                 ;;
5581         (msys*)
5582                 CC_SHARED_OPTS=
5583                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5584                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5585                 cf_cv_shlib_version=msysdll
5586                 cf_cv_shlib_version_infix=msysdll
5587                 shlibdir=$bindir
5588                 MAKE_DLLS=
5589                 cat >mk_shared_lib.sh <<-CF_EOF
5590                 #!$SHELL
5591                 SHARED_LIB=\$1
5592                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5593                 shift
5594                 cat <<-EOF
5595                 Linking shared library
5596                 ** SHARED_LIB \$SHARED_LIB
5597                 ** IMPORT_LIB \$IMPORT_LIB
5598 EOF
5599                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5600 CF_EOF
5601                 chmod +x mk_shared_lib.sh
5602                 ;;
5603         (darwin*)
5604                 cf_try_cflags="no-cpp-precomp"
5605                 CC_SHARED_OPTS="-dynamic"
5606                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5607                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5608                 cf_cv_shlib_version_infix=yes
5609                 echo "$as_me:5609: checking if ld -search_paths_first works" >&5
5610 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5611 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5612   echo $ECHO_N "(cached) $ECHO_C" >&6
5613 else
5614
5615                         cf_save_LDFLAGS=$LDFLAGS
5616                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5617                         cat >conftest.$ac_ext <<_ACEOF
5618 #line 5618 "configure"
5619 #include "confdefs.h"
5620
5621 int
5622 main (void)
5623 {
5624 int i;
5625   ;
5626   return 0;
5627 }
5628 _ACEOF
5629 rm -f conftest.$ac_objext conftest$ac_exeext
5630 if { (eval echo "$as_me:5630: \"$ac_link\"") >&5
5631   (eval $ac_link) 2>&5
5632   ac_status=$?
5633   echo "$as_me:5633: \$? = $ac_status" >&5
5634   (exit $ac_status); } &&
5635          { ac_try='test -s conftest$ac_exeext'
5636   { (eval echo "$as_me:5636: \"$ac_try\"") >&5
5637   (eval $ac_try) 2>&5
5638   ac_status=$?
5639   echo "$as_me:5639: \$? = $ac_status" >&5
5640   (exit $ac_status); }; }; then
5641   cf_cv_ldflags_search_paths_first=yes
5642 else
5643   echo "$as_me: failed program was:" >&5
5644 cat conftest.$ac_ext >&5
5645 cf_cv_ldflags_search_paths_first=no
5646 fi
5647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5648                                 LDFLAGS=$cf_save_LDFLAGS
5649 fi
5650 echo "$as_me:5650: result: $cf_cv_ldflags_search_paths_first" >&5
5651 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5652                 if test $cf_cv_ldflags_search_paths_first = yes; then
5653                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5654                 fi
5655                 ;;
5656         (hpux[7-8]*)
5657                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5658                 if test "$GCC" != yes; then
5659                         CC_SHARED_OPTS='+Z'
5660                 fi
5661                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5662                 INSTALL_LIB="-m 555"
5663                 ;;
5664         (hpux*)
5665                 # (tested with gcc 2.7.2 -- I don't have c89)
5666                 if test "$GCC" = yes; then
5667                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5668                 else
5669                         CC_SHARED_OPTS='+Z'
5670                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5671                 fi
5672                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5673                 # HP-UX shared libraries must be executable, and should be
5674                 # readonly to exploit a quirk in the memory manager.
5675                 INSTALL_LIB="-m 555"
5676                 ;;
5677         (interix*)
5678                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5679                 if test "$cf_cv_shlib_version" = rel; then
5680                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5681                 else
5682                         cf_shared_soname='`basename $@`'
5683                 fi
5684                 CC_SHARED_OPTS=
5685                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5686                 ;;
5687         (irix*)
5688                 if test "$cf_cv_enable_rpath" = yes ; then
5689                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5690                 fi
5691                 # tested with IRIX 5.2 and 'cc'.
5692                 if test "$GCC" != yes; then
5693                         CC_SHARED_OPTS='-KPIC'
5694                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5695                 else
5696                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5697                 fi
5698                 cf_cv_rm_so_locs=yes
5699                 ;;
5700         (linux*|gnu*|k*bsd*-gnu)
5701                 if test "$DFT_LWR_MODEL" = "shared" ; then
5702                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5703                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5704                 fi
5705                 if test "$cf_cv_enable_rpath" = yes ; then
5706                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5707                 fi
5708
5709         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5710         if test "$cf_cv_shlib_version" = rel; then
5711                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5712         else
5713                 cf_cv_shared_soname='`basename $@`'
5714         fi
5715
5716                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5717                 ;;
5718         (mingw*)
5719                 cf_cv_shlib_version=mingw
5720                 cf_cv_shlib_version_infix=mingw
5721                 shlibdir=$bindir
5722                 MAKE_DLLS=
5723                 if test "$DFT_LWR_MODEL" = "shared" ; then
5724                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5725                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5726                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5727                 fi
5728                 CC_SHARED_OPTS=
5729                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5730                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5731                 cat >mk_shared_lib.sh <<-CF_EOF
5732                 #!$SHELL
5733                 SHARED_LIB=\$1
5734                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5735                 shift
5736                 cat <<-EOF
5737                 Linking shared library
5738                 ** SHARED_LIB \$SHARED_LIB
5739                 ** IMPORT_LIB \$IMPORT_LIB
5740 EOF
5741                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5742 CF_EOF
5743                 chmod +x mk_shared_lib.sh
5744                 ;;
5745         (openbsd[2-9].*|mirbsd*)
5746                 if test "$DFT_LWR_MODEL" = "shared" ; then
5747                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5748                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5749                 fi
5750                 if test "$cf_cv_enable_rpath" = yes ; then
5751                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5752                 fi
5753                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5754
5755         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5756         if test "$cf_cv_shlib_version" = rel; then
5757                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5758         else
5759                 cf_cv_shared_soname='`basename $@`'
5760         fi
5761
5762                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5763                 ;;
5764         (nto-qnx*|openbsd*|freebsd[12].*)
5765                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5766                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5767                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5768                 ;;
5769         (dragonfly*|freebsd*)
5770                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5771                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5772                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5773                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5774                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5775                 fi
5776
5777         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5778         if test "$cf_cv_shlib_version" = rel; then
5779                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5780         else
5781                 cf_cv_shared_soname='`basename $@`'
5782         fi
5783
5784                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5785                 ;;
5786         (netbsd*)
5787                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5788                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5789                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5790                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5791                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5792                         if test "$cf_cv_shlib_version" = auto; then
5793                         if test -f /usr/libexec/ld.elf_so; then
5794                                 cf_cv_shlib_version=abi
5795                         else
5796                                 cf_cv_shlib_version=rel
5797                         fi
5798                         fi
5799
5800         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5801         if test "$cf_cv_shlib_version" = rel; then
5802                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5803         else
5804                 cf_cv_shared_soname='`basename $@`'
5805         fi
5806
5807                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5808                 else
5809                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5810                 fi
5811                 ;;
5812         (osf*|mls+*)
5813                 # tested with OSF/1 V3.2 and 'cc'
5814                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5815                 # link with shared libs).
5816                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5817                 case $host_os in
5818                 (osf4*)
5819                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5820                         ;;
5821                 esac
5822                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5823                 if test "$DFT_LWR_MODEL" = "shared" ; then
5824                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5825                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5826                 fi
5827                 cf_cv_rm_so_locs=yes
5828                 ;;
5829         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5830                 # tested with osr5.0.5
5831                 if test "$GCC" != yes; then
5832                         CC_SHARED_OPTS='-belf -KPIC'
5833                 fi
5834                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5835                 if test "$cf_cv_enable_rpath" = yes ; then
5836                         # only way is to set LD_RUN_PATH but no switch for it
5837                         RUN_PATH=$libdir
5838                 fi
5839                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5840                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5841                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5842                 ;;
5843         (sunos4*)
5844                 # tested with SunOS 4.1.1 and gcc 2.7.0
5845                 if test "$GCC" != yes; then
5846                         CC_SHARED_OPTS='-KPIC'
5847                 fi
5848                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5849                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5850                 ;;
5851         (solaris2*)
5852                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5853                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5854                 if test "$DFT_LWR_MODEL" = "shared" ; then
5855                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5856                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5857                 fi
5858                 if test "$cf_cv_enable_rpath" = yes ; then
5859                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5860                 fi
5861
5862         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5863         if test "$cf_cv_shlib_version" = rel; then
5864                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5865         else
5866                 cf_cv_shared_soname='`basename $@`'
5867         fi
5868
5869                 if test "$GCC" != yes; then
5870                         cf_save_CFLAGS="$CFLAGS"
5871                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5872                         do
5873                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5874                                 cat >conftest.$ac_ext <<_ACEOF
5875 #line 5875 "configure"
5876 #include "confdefs.h"
5877 #include <stdio.h>
5878 int
5879 main (void)
5880 {
5881 printf("Hello\n");
5882   ;
5883   return 0;
5884 }
5885 _ACEOF
5886 rm -f conftest.$ac_objext
5887 if { (eval echo "$as_me:5887: \"$ac_compile\"") >&5
5888   (eval $ac_compile) 2>&5
5889   ac_status=$?
5890   echo "$as_me:5890: \$? = $ac_status" >&5
5891   (exit $ac_status); } &&
5892          { ac_try='test -s conftest.$ac_objext'
5893   { (eval echo "$as_me:5893: \"$ac_try\"") >&5
5894   (eval $ac_try) 2>&5
5895   ac_status=$?
5896   echo "$as_me:5896: \$? = $ac_status" >&5
5897   (exit $ac_status); }; }; then
5898   break
5899 else
5900   echo "$as_me: failed program was:" >&5
5901 cat conftest.$ac_ext >&5
5902 fi
5903 rm -f conftest.$ac_objext conftest.$ac_ext
5904                         done
5905                         CFLAGS="$cf_save_CFLAGS"
5906                         CC_SHARED_OPTS=$cf_shared_opts
5907                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
5908                 else
5909                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5910                 fi
5911                 ;;
5912         (sysv5uw7*|unix_sv*)
5913                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5914                 if test "$GCC" != yes; then
5915                         CC_SHARED_OPTS='-KPIC'
5916                 fi
5917                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
5918                 ;;
5919         (*)
5920                 CC_SHARED_OPTS='unknown'
5921                 MK_SHARED_LIB='echo unknown'
5922                 ;;
5923         esac
5924
5925         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5926         case "$cf_cv_shlib_version" in
5927         (rel|abi)
5928                 case "$MK_SHARED_LIB" in
5929                 (*'-o $@')
5930                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5931                         ;;
5932                 (*)
5933                         { echo "$as_me:5933: WARNING: ignored --with-shlib-version" >&5
5934 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5935                         ;;
5936                 esac
5937                 ;;
5938         esac
5939
5940         if test -n "$cf_try_cflags"
5941         then
5942 cat > conftest.$ac_ext <<EOF
5943 #line 5943 "${as_me:-configure}"
5944 #include <stdio.h>
5945 int main(int argc, char *argv[])
5946 {
5947         printf("hello\n");
5948         return (argv[argc-1] == 0) ;
5949 }
5950 EOF
5951                 cf_save_CFLAGS="$CFLAGS"
5952                 for cf_opt in $cf_try_cflags
5953                 do
5954                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5955                         echo "$as_me:5955: checking if CFLAGS option -$cf_opt works" >&5
5956 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5957                         if { (eval echo "$as_me:5957: \"$ac_compile\"") >&5
5958   (eval $ac_compile) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); }; then
5962                                 echo "$as_me:5962: result: yes" >&5
5963 echo "${ECHO_T}yes" >&6
5964                                 cf_save_CFLAGS="$CFLAGS"
5965                         else
5966                                 echo "$as_me:5966: result: no" >&5
5967 echo "${ECHO_T}no" >&6
5968                         fi
5969                 done
5970                 CFLAGS="$cf_save_CFLAGS"
5971         fi
5972
5973         # RPATH_LIST is a colon-separated list of directories
5974         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5975         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5976
5977         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
5978
5979         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5980
5981 echo "${as_me:-configure}:5981: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5982
5983         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5984
5985 echo "${as_me:-configure}:5985: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5986
5987 for model in $cf_list_models; do
5988         case $model in
5989         (libtool)
5990
5991 echo "$as_me:5991: checking for additional libtool options" >&5
5992 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
5993
5994 # Check whether --with-libtool-opts or --without-libtool-opts was given.
5995 if test "${with_libtool_opts+set}" = set; then
5996   withval="$with_libtool_opts"
5997   with_libtool_opts=$withval
5998 else
5999   with_libtool_opts=no
6000 fi;
6001 echo "$as_me:6001: result: $with_libtool_opts" >&5
6002 echo "${ECHO_T}$with_libtool_opts" >&6
6003
6004 case .$with_libtool_opts in
6005 (.yes|.no|.)
6006         ;;
6007 (*)
6008         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6009         ;;
6010 esac
6011
6012 echo "$as_me:6012: checking if exported-symbols file should be used" >&5
6013 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6014
6015 # Check whether --with-export-syms or --without-export-syms was given.
6016 if test "${with_export_syms+set}" = set; then
6017   withval="$with_export_syms"
6018   with_export_syms=$withval
6019 else
6020   with_export_syms=no
6021 fi;
6022 if test "x$with_export_syms" = xyes
6023 then
6024         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6025
6026 fi
6027 echo "$as_me:6027: result: $with_export_syms" >&5
6028 echo "${ECHO_T}$with_export_syms" >&6
6029 if test "x$with_export_syms" != xno
6030 then
6031         EXPORT_SYMS="-export-symbols $with_export_syms"
6032
6033 fi
6034
6035                 ;;
6036         (shared)
6037                 if test "$CC_SHARED_OPTS" = "unknown"; then
6038                         { { echo "$as_me:6038: error: Shared libraries are not supported in this version" >&5
6039 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6040    { (exit 1); exit 1; }; }
6041                 fi
6042                 # workaround for inept transition to PIE vs PIC...
6043                 echo "$as_me:6043: checking if current CFLAGS link properly" >&5
6044 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6045                 cat >conftest.$ac_ext <<_ACEOF
6046 #line 6046 "configure"
6047 #include "confdefs.h"
6048 #include <stdio.h>
6049 int
6050 main (void)
6051 {
6052 printf("Hello work\n");
6053   ;
6054   return 0;
6055 }
6056 _ACEOF
6057 rm -f conftest.$ac_objext conftest$ac_exeext
6058 if { (eval echo "$as_me:6058: \"$ac_link\"") >&5
6059   (eval $ac_link) 2>&5
6060   ac_status=$?
6061   echo "$as_me:6061: \$? = $ac_status" >&5
6062   (exit $ac_status); } &&
6063          { ac_try='test -s conftest$ac_exeext'
6064   { (eval echo "$as_me:6064: \"$ac_try\"") >&5
6065   (eval $ac_try) 2>&5
6066   ac_status=$?
6067   echo "$as_me:6067: \$? = $ac_status" >&5
6068   (exit $ac_status); }; }; then
6069   cf_cflags_work=yes
6070 else
6071   echo "$as_me: failed program was:" >&5
6072 cat conftest.$ac_ext >&5
6073 cf_cflags_work=no
6074 fi
6075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6076                 echo "$as_me:6076: result: $cf_cflags_work" >&5
6077 echo "${ECHO_T}$cf_cflags_work" >&6
6078                 if test "$cf_cflags_work" = no
6079                 then
6080                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6081
6082 echo "${as_me:-configure}:6082: testing try to work around by appending shared-options ..." 1>&5
6083
6084                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6085                 fi
6086
6087 echo "$as_me:6087: checking if versioned-symbols file should be used" >&5
6088 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6089
6090 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6091 if test "${with_versioned_syms+set}" = set; then
6092   withval="$with_versioned_syms"
6093   with_versioned_syms=$withval
6094 else
6095   with_versioned_syms=no
6096 fi;
6097 if test "x$with_versioned_syms" = xyes
6098 then
6099         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6100
6101 fi
6102 echo "$as_me:6102: result: $with_versioned_syms" >&5
6103 echo "${ECHO_T}$with_versioned_syms" >&6
6104
6105 RESULTING_SYMS=
6106 VERSIONED_SYMS=
6107 WILDCARD_SYMS=
6108
6109 if test "x$with_versioned_syms" != xno
6110 then
6111         RESULTING_SYMS=$with_versioned_syms
6112         case "x$MK_SHARED_LIB" in
6113         (*-Wl,*)
6114                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6115                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6116                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6117
6118 echo "${as_me:-configure}:6118: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6119
6120                 ;;
6121         (*-dy\ *)
6122                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6123                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6124                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6125
6126 echo "${as_me:-configure}:6126: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6127
6128                 ;;
6129         (*)
6130                 { echo "$as_me:6130: WARNING: this system does not support versioned-symbols" >&5
6131 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6132                 ;;
6133         esac
6134
6135         # Linux ld can selectively override scope, e.g., of symbols beginning with
6136         # "_" by first declaring some as global, and then using a wildcard to
6137         # declare the others as local.  Some other loaders cannot do this.  Check
6138         # by constructing a (very) simple shared library and inspecting its
6139         # symbols.
6140         if test "x$VERSIONED_SYMS" != "x"
6141         then
6142                 echo "$as_me:6142: checking if wildcards can be used to selectively omit symbols" >&5
6143 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6144                 WILDCARD_SYMS=no
6145
6146                 # make sources
6147                 rm -f conftest.*
6148
6149                 cat >conftest.ver <<EOF
6150 module_1.0 {
6151 global:
6152         globalf1;
6153 local:
6154         localf1;
6155 };
6156 module_2.0 {
6157 global:
6158         globalf2;
6159 local:
6160         localf2;
6161         _*;
6162 } module_1.0;
6163 submodule_1.0 {
6164 global:
6165         subglobalf1;
6166         _ismissing;
6167 local:
6168         sublocalf1;
6169 };
6170 submodule_2.0 {
6171 global:
6172         subglobalf2;
6173 local:
6174         sublocalf2;
6175         _*;
6176 } submodule_1.0;
6177 EOF
6178                 cat >conftest.$ac_ext <<EOF
6179 #line 6179 "configure"
6180 int     _ismissing(void) { return 1; }
6181 int     _localf1(void) { return 1; }
6182 int     _localf2(void) { return 2; }
6183 int     globalf1(void) { return 1; }
6184 int     globalf2(void) { return 2; }
6185 int     _sublocalf1(void) { return 1; }
6186 int     _sublocalf2(void) { return 2; }
6187 int     subglobalf1(void) { return 1; }
6188 int     subglobalf2(void) { return 2; }
6189 EOF
6190                 cat >conftest.mk <<EOF
6191 CC=${CC}
6192 CFLAGS=${CFLAGS}
6193 CPPFLAGS=${CPPFLAGS}
6194 LDFLAGS=${LDFLAGS}
6195 LIBS=${LIBS}
6196 VERSIONED_SYMS=${VERSIONED_SYMS}
6197 RESULTING_SYMS=conftest.ver
6198 MK_SHARED_LIB=${MK_SHARED_LIB}
6199 conftest.so: conftest.$ac_cv_objext
6200                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6201 EOF
6202
6203                 # compile source, make library
6204                 if make -f conftest.mk 2>&5 >/dev/null
6205                 then
6206                         # test for missing symbol in either Data or Text section
6207                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6208                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6209                 fi
6210                 echo "$as_me:6210: result: $WILDCARD_SYMS" >&5
6211 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6212                 rm -f conftest.*
6213         fi
6214 fi
6215
6216                 ;;
6217         esac
6218 done
6219
6220 ### Checks for special libraries, must be done up-front.
6221 SHLIB_LIST=""
6222
6223 echo "$as_me:6223: checking if you want to link with the GPM mouse library" >&5
6224 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6225
6226 # Check whether --with-gpm or --without-gpm was given.
6227 if test "${with_gpm+set}" = set; then
6228   withval="$with_gpm"
6229   with_gpm=$withval
6230 else
6231   with_gpm=maybe
6232 fi;
6233 echo "$as_me:6233: result: $with_gpm" >&5
6234 echo "${ECHO_T}$with_gpm" >&6
6235
6236 if test "$with_gpm" != no ; then
6237         echo "$as_me:6237: checking for gpm.h" >&5
6238 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6239 if test "${ac_cv_header_gpm_h+set}" = set; then
6240   echo $ECHO_N "(cached) $ECHO_C" >&6
6241 else
6242   cat >conftest.$ac_ext <<_ACEOF
6243 #line 6243 "configure"
6244 #include "confdefs.h"
6245 #include <gpm.h>
6246 _ACEOF
6247 if { (eval echo "$as_me:6247: \"$ac_cpp conftest.$ac_ext\"") >&5
6248   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6249   ac_status=$?
6250   egrep -v '^ *\+' conftest.er1 >conftest.err
6251   rm -f conftest.er1
6252   cat conftest.err >&5
6253   echo "$as_me:6253: \$? = $ac_status" >&5
6254   (exit $ac_status); } >/dev/null; then
6255   if test -s conftest.err; then
6256     ac_cpp_err=$ac_c_preproc_warn_flag
6257   else
6258     ac_cpp_err=
6259   fi
6260 else
6261   ac_cpp_err=yes
6262 fi
6263 if test -z "$ac_cpp_err"; then
6264   ac_cv_header_gpm_h=yes
6265 else
6266   echo "$as_me: failed program was:" >&5
6267   cat conftest.$ac_ext >&5
6268   ac_cv_header_gpm_h=no
6269 fi
6270 rm -f conftest.err conftest.$ac_ext
6271 fi
6272 echo "$as_me:6272: result: $ac_cv_header_gpm_h" >&5
6273 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6274 if test $ac_cv_header_gpm_h = yes; then
6275
6276 cat >>confdefs.h <<\EOF
6277 #define HAVE_GPM_H 1
6278 EOF
6279
6280                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6281                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6282
6283 echo "${as_me:-configure}:6283: testing assuming we really have GPM library ..." 1>&5
6284
6285 cat >>confdefs.h <<\EOF
6286 #define HAVE_LIBGPM 1
6287 EOF
6288
6289                         with_gpm=yes
6290                 else
6291                         echo "$as_me:6291: checking for Gpm_Open in -lgpm" >&5
6292 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6293 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6294   echo $ECHO_N "(cached) $ECHO_C" >&6
6295 else
6296   ac_check_lib_save_LIBS=$LIBS
6297 LIBS="-lgpm  $LIBS"
6298 cat >conftest.$ac_ext <<_ACEOF
6299 #line 6299 "configure"
6300 #include "confdefs.h"
6301
6302 /* Override any gcc2 internal prototype to avoid an error.  */
6303 #ifdef __cplusplus
6304 extern "C"
6305 #endif
6306 /* We use char because int might match the return type of a gcc2
6307    builtin and then its argument prototype would still apply.  */
6308 char Gpm_Open ();
6309 int
6310 main (void)
6311 {
6312 Gpm_Open ();
6313   ;
6314   return 0;
6315 }
6316 _ACEOF
6317 rm -f conftest.$ac_objext conftest$ac_exeext
6318 if { (eval echo "$as_me:6318: \"$ac_link\"") >&5
6319   (eval $ac_link) 2>&5
6320   ac_status=$?
6321   echo "$as_me:6321: \$? = $ac_status" >&5
6322   (exit $ac_status); } &&
6323          { ac_try='test -s conftest$ac_exeext'
6324   { (eval echo "$as_me:6324: \"$ac_try\"") >&5
6325   (eval $ac_try) 2>&5
6326   ac_status=$?
6327   echo "$as_me:6327: \$? = $ac_status" >&5
6328   (exit $ac_status); }; }; then
6329   ac_cv_lib_gpm_Gpm_Open=yes
6330 else
6331   echo "$as_me: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6333 ac_cv_lib_gpm_Gpm_Open=no
6334 fi
6335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6336 LIBS=$ac_check_lib_save_LIBS
6337 fi
6338 echo "$as_me:6338: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6339 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6340 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6341   with_gpm=yes
6342 else
6343
6344                                 if test "$with_gpm" = maybe; then
6345                                         { echo "$as_me:6345: WARNING: Cannot link with GPM library" >&5
6346 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6347                                         with_gpm=no
6348                                 else
6349                                         { { echo "$as_me:6349: error: Cannot link with GPM library" >&5
6350 echo "$as_me: error: Cannot link with GPM library" >&2;}
6351    { (exit 1); exit 1; }; }
6352                                 fi
6353
6354 fi
6355
6356                 fi
6357
6358 else
6359
6360                 test "$with_gpm" != maybe && { echo "$as_me:6360: WARNING: Cannot find GPM header" >&5
6361 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6362                 with_gpm=no
6363
6364 fi
6365
6366 fi
6367
6368 if test "$with_gpm" != no ; then
6369         echo "$as_me:6369: checking if you want to load GPM dynamically" >&5
6370 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6371
6372 # Check whether --with-dlsym or --without-dlsym was given.
6373 if test "${with_dlsym+set}" = set; then
6374   withval="$with_dlsym"
6375   with_dlsym=$withval
6376 else
6377   with_dlsym=yes
6378 fi;
6379         echo "$as_me:6379: result: $with_dlsym" >&5
6380 echo "${ECHO_T}$with_dlsym" >&6
6381         if test "x$with_dlsym" = xyes ; then
6382
6383 cf_have_dlsym=no
6384 echo "$as_me:6384: checking for dlsym" >&5
6385 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6386 if test "${ac_cv_func_dlsym+set}" = set; then
6387   echo $ECHO_N "(cached) $ECHO_C" >&6
6388 else
6389   cat >conftest.$ac_ext <<_ACEOF
6390 #line 6390 "configure"
6391 #include "confdefs.h"
6392 /* System header to define __stub macros and hopefully few prototypes,
6393     which can conflict with char dlsym (); below.  */
6394 #include <assert.h>
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 #ifdef __cplusplus
6397 extern "C"
6398 #endif
6399 /* We use char because int might match the return type of a gcc2
6400    builtin and then its argument prototype would still apply.  */
6401 char dlsym ();
6402 char (*f) ();
6403
6404 int
6405 main (void)
6406 {
6407 /* The GNU C library defines this for functions which it implements
6408     to always fail with ENOSYS.  Some functions are actually named
6409     something starting with __ and the normal name is an alias.  */
6410 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6411 choke me
6412 #else
6413 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6414 #endif
6415
6416   ;
6417   return 0;
6418 }
6419 _ACEOF
6420 rm -f conftest.$ac_objext conftest$ac_exeext
6421 if { (eval echo "$as_me:6421: \"$ac_link\"") >&5
6422   (eval $ac_link) 2>&5
6423   ac_status=$?
6424   echo "$as_me:6424: \$? = $ac_status" >&5
6425   (exit $ac_status); } &&
6426          { ac_try='test -s conftest$ac_exeext'
6427   { (eval echo "$as_me:6427: \"$ac_try\"") >&5
6428   (eval $ac_try) 2>&5
6429   ac_status=$?
6430   echo "$as_me:6430: \$? = $ac_status" >&5
6431   (exit $ac_status); }; }; then
6432   ac_cv_func_dlsym=yes
6433 else
6434   echo "$as_me: failed program was:" >&5
6435 cat conftest.$ac_ext >&5
6436 ac_cv_func_dlsym=no
6437 fi
6438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6439 fi
6440 echo "$as_me:6440: result: $ac_cv_func_dlsym" >&5
6441 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6442 if test $ac_cv_func_dlsym = yes; then
6443   cf_have_dlsym=yes
6444 else
6445
6446 cf_have_libdl=no
6447 echo "$as_me:6447: checking for dlsym in -ldl" >&5
6448 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6449 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6450   echo $ECHO_N "(cached) $ECHO_C" >&6
6451 else
6452   ac_check_lib_save_LIBS=$LIBS
6453 LIBS="-ldl  $LIBS"
6454 cat >conftest.$ac_ext <<_ACEOF
6455 #line 6455 "configure"
6456 #include "confdefs.h"
6457
6458 /* Override any gcc2 internal prototype to avoid an error.  */
6459 #ifdef __cplusplus
6460 extern "C"
6461 #endif
6462 /* We use char because int might match the return type of a gcc2
6463    builtin and then its argument prototype would still apply.  */
6464 char dlsym ();
6465 int
6466 main (void)
6467 {
6468 dlsym ();
6469   ;
6470   return 0;
6471 }
6472 _ACEOF
6473 rm -f conftest.$ac_objext conftest$ac_exeext
6474 if { (eval echo "$as_me:6474: \"$ac_link\"") >&5
6475   (eval $ac_link) 2>&5
6476   ac_status=$?
6477   echo "$as_me:6477: \$? = $ac_status" >&5
6478   (exit $ac_status); } &&
6479          { ac_try='test -s conftest$ac_exeext'
6480   { (eval echo "$as_me:6480: \"$ac_try\"") >&5
6481   (eval $ac_try) 2>&5
6482   ac_status=$?
6483   echo "$as_me:6483: \$? = $ac_status" >&5
6484   (exit $ac_status); }; }; then
6485   ac_cv_lib_dl_dlsym=yes
6486 else
6487   echo "$as_me: failed program was:" >&5
6488 cat conftest.$ac_ext >&5
6489 ac_cv_lib_dl_dlsym=no
6490 fi
6491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6492 LIBS=$ac_check_lib_save_LIBS
6493 fi
6494 echo "$as_me:6494: result: $ac_cv_lib_dl_dlsym" >&5
6495 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6496 if test $ac_cv_lib_dl_dlsym = yes; then
6497
6498         cf_have_dlsym=yes
6499         cf_have_libdl=yes
6500 fi
6501
6502 fi
6503
6504 if test "$cf_have_dlsym" = yes ; then
6505         test "$cf_have_libdl" = yes && {
6506 cf_add_libs="-ldl"
6507 # Filter out duplicates - this happens with badly-designed ".pc" files...
6508 for cf_add_1lib in $LIBS
6509 do
6510         for cf_add_2lib in $cf_add_libs
6511         do
6512                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6513                 then
6514                         cf_add_1lib=
6515                         break
6516                 fi
6517         done
6518         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6519 done
6520 LIBS="$cf_add_libs"
6521  }
6522
6523         echo "$as_me:6523: checking whether able to link to dl*() functions" >&5
6524 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6525         cat >conftest.$ac_ext <<_ACEOF
6526 #line 6526 "configure"
6527 #include "confdefs.h"
6528 #include <dlfcn.h>
6529 int
6530 main (void)
6531 {
6532
6533                 void *obj;
6534                 if ((obj = dlopen("filename", 0)) != 0) {
6535                         if (dlsym(obj, "symbolname") == 0) {
6536                         dlclose(obj);
6537                         }
6538                 }
6539   ;
6540   return 0;
6541 }
6542 _ACEOF
6543 rm -f conftest.$ac_objext conftest$ac_exeext
6544 if { (eval echo "$as_me:6544: \"$ac_link\"") >&5
6545   (eval $ac_link) 2>&5
6546   ac_status=$?
6547   echo "$as_me:6547: \$? = $ac_status" >&5
6548   (exit $ac_status); } &&
6549          { ac_try='test -s conftest$ac_exeext'
6550   { (eval echo "$as_me:6550: \"$ac_try\"") >&5
6551   (eval $ac_try) 2>&5
6552   ac_status=$?
6553   echo "$as_me:6553: \$? = $ac_status" >&5
6554   (exit $ac_status); }; }; then
6555
6556 cat >>confdefs.h <<\EOF
6557 #define HAVE_LIBDL 1
6558 EOF
6559
6560 else
6561   echo "$as_me: failed program was:" >&5
6562 cat conftest.$ac_ext >&5
6563
6564                 { { echo "$as_me:6564: error: Cannot link test program for libdl" >&5
6565 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6566    { (exit 1); exit 1; }; }
6567 fi
6568 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6569         echo "$as_me:6569: result: ok" >&5
6570 echo "${ECHO_T}ok" >&6
6571 else
6572         { { echo "$as_me:6572: error: Cannot find dlsym function" >&5
6573 echo "$as_me: error: Cannot find dlsym function" >&2;}
6574    { (exit 1); exit 1; }; }
6575 fi
6576
6577                 if test "x$with_gpm" != xyes ; then
6578                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6579
6580 echo "${as_me:-configure}:6580: testing assuming soname for gpm is $with_gpm ..." 1>&5
6581
6582                         cf_cv_gpm_soname="$with_gpm"
6583                 else
6584
6585 echo "$as_me:6585: checking for soname of gpm library" >&5
6586 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6587 if test "${cf_cv_gpm_soname+set}" = set; then
6588   echo $ECHO_N "(cached) $ECHO_C" >&6
6589 else
6590
6591 cf_cv_gpm_soname=unknown
6592 if test "$cross_compiling" != yes ; then
6593 cat >conftest.$ac_ext <<CF_EOF
6594 #include <gpm.h>
6595 int main(void)
6596 {
6597 if (Gpm_Open(0,0)) Gpm_Close();
6598         ${cf_cv_main_return:-return}(0);
6599 }
6600 CF_EOF
6601 cf_save_LIBS="$LIBS"
6602
6603 cf_add_libs="-lgpm"
6604 # Filter out duplicates - this happens with badly-designed ".pc" files...
6605 for cf_add_1lib in $LIBS
6606 do
6607         for cf_add_2lib in $cf_add_libs
6608         do
6609                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6610                 then
6611                         cf_add_1lib=
6612                         break
6613                 fi
6614         done
6615         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6616 done
6617 LIBS="$cf_add_libs"
6618
6619         if { (eval echo "$as_me:6619: \"$ac_compile\"") >&5
6620   (eval $ac_compile) 2>&5
6621   ac_status=$?
6622   echo "$as_me:6622: \$? = $ac_status" >&5
6623   (exit $ac_status); } ; then
6624                 if { (eval echo "$as_me:6624: \"$ac_link\"") >&5
6625   (eval $ac_link) 2>&5
6626   ac_status=$?
6627   echo "$as_me:6627: \$? = $ac_status" >&5
6628   (exit $ac_status); } ; then
6629                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6630                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6631                 fi
6632         fi
6633 rm -rf conftest*
6634 LIBS="$cf_save_LIBS"
6635 fi
6636
6637 fi
6638 echo "$as_me:6638: result: $cf_cv_gpm_soname" >&5
6639 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6640
6641                 fi
6642                 test "$cf_cv_gpm_soname" != "unknown" &&
6643 cat >>confdefs.h <<EOF
6644 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6645 EOF
6646
6647                 SHLIB_LIST="-ldl $SHLIB_LIST"
6648
6649 cf_add_libs="-ldl"
6650 # Filter out duplicates - this happens with badly-designed ".pc" files...
6651 for cf_add_1lib in $PRIVATE_LIBS
6652 do
6653         for cf_add_2lib in $cf_add_libs
6654         do
6655                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6656                 then
6657                         cf_add_1lib=
6658                         break
6659                 fi
6660         done
6661         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6662 done
6663 PRIVATE_LIBS="$cf_add_libs"
6664
6665         else
6666                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6667
6668 cf_add_libs="-lgpm"
6669 # Filter out duplicates - this happens with badly-designed ".pc" files...
6670 for cf_add_1lib in $TEST_LIBS
6671 do
6672         for cf_add_2lib in $cf_add_libs
6673         do
6674                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6675                 then
6676                         cf_add_1lib=
6677                         break
6678                 fi
6679         done
6680         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6681 done
6682 TEST_LIBS="$cf_add_libs"
6683
6684 cf_add_libs="-lgpm"
6685 # Filter out duplicates - this happens with badly-designed ".pc" files...
6686 for cf_add_1lib in $PRIVATE_LIBS
6687 do
6688         for cf_add_2lib in $cf_add_libs
6689         do
6690                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6691                 then
6692                         cf_add_1lib=
6693                         break
6694                 fi
6695         done
6696         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6697 done
6698 PRIVATE_LIBS="$cf_add_libs"
6699
6700         fi
6701
6702 cat >>confdefs.h <<\EOF
6703 #define HAVE_LIBGPM 1
6704 EOF
6705
6706 echo "$as_me:6706: checking for Gpm_Wgetch in -lgpm" >&5
6707 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6708 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6709   echo $ECHO_N "(cached) $ECHO_C" >&6
6710 else
6711   ac_check_lib_save_LIBS=$LIBS
6712 LIBS="-lgpm  $LIBS"
6713 cat >conftest.$ac_ext <<_ACEOF
6714 #line 6714 "configure"
6715 #include "confdefs.h"
6716
6717 /* Override any gcc2 internal prototype to avoid an error.  */
6718 #ifdef __cplusplus
6719 extern "C"
6720 #endif
6721 /* We use char because int might match the return type of a gcc2
6722    builtin and then its argument prototype would still apply.  */
6723 char Gpm_Wgetch ();
6724 int
6725 main (void)
6726 {
6727 Gpm_Wgetch ();
6728   ;
6729   return 0;
6730 }
6731 _ACEOF
6732 rm -f conftest.$ac_objext conftest$ac_exeext
6733 if { (eval echo "$as_me:6733: \"$ac_link\"") >&5
6734   (eval $ac_link) 2>&5
6735   ac_status=$?
6736   echo "$as_me:6736: \$? = $ac_status" >&5
6737   (exit $ac_status); } &&
6738          { ac_try='test -s conftest$ac_exeext'
6739   { (eval echo "$as_me:6739: \"$ac_try\"") >&5
6740   (eval $ac_try) 2>&5
6741   ac_status=$?
6742   echo "$as_me:6742: \$? = $ac_status" >&5
6743   (exit $ac_status); }; }; then
6744   ac_cv_lib_gpm_Gpm_Wgetch=yes
6745 else
6746   echo "$as_me: failed program was:" >&5
6747 cat conftest.$ac_ext >&5
6748 ac_cv_lib_gpm_Gpm_Wgetch=no
6749 fi
6750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6751 LIBS=$ac_check_lib_save_LIBS
6752 fi
6753 echo "$as_me:6753: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6754 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6755 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6756
6757 echo "$as_me:6757: checking if GPM is weakly bound to curses library" >&5
6758 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6759 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6760   echo $ECHO_N "(cached) $ECHO_C" >&6
6761 else
6762
6763 cf_cv_check_gpm_wgetch=unknown
6764 if test "$cross_compiling" != yes ; then
6765
6766 cat >conftest.$ac_ext <<CF_EOF
6767 #include <gpm.h>
6768 int main(void)
6769 {
6770         Gpm_Wgetch();
6771         ${cf_cv_main_return:-return}(0);
6772 }
6773 CF_EOF
6774
6775         cf_save_LIBS="$LIBS"
6776         # This only works if we can look at the symbol table.  If a shared
6777         # library is stripped for install, we cannot use that.  So we're forced
6778         # to rely on the static library, noting that some packagers may not
6779         # include it.
6780         LIBS="-static -lgpm -dynamic $LIBS"
6781         if { (eval echo "$as_me:6781: \"$ac_compile\"") >&5
6782   (eval $ac_compile) 2>&5
6783   ac_status=$?
6784   echo "$as_me:6784: \$? = $ac_status" >&5
6785   (exit $ac_status); } ; then
6786                 if { (eval echo "$as_me:6786: \"$ac_link\"") >&5
6787   (eval $ac_link) 2>&5
6788   ac_status=$?
6789   echo "$as_me:6789: \$? = $ac_status" >&5
6790   (exit $ac_status); } ; then
6791                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6792                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6793                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6794                 fi
6795         fi
6796         rm -rf conftest*
6797         LIBS="$cf_save_LIBS"
6798 fi
6799
6800 fi
6801 echo "$as_me:6801: result: $cf_cv_check_gpm_wgetch" >&5
6802 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6803
6804 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6805         { echo "$as_me:6805: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6806 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6807 fi
6808
6809 fi
6810
6811 fi
6812
6813 # not everyone has "test -c"
6814 if test -c /dev/sysmouse 2>/dev/null ; then
6815 echo "$as_me:6815: checking if you want to use sysmouse" >&5
6816 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
6817
6818 # Check whether --with-sysmouse or --without-sysmouse was given.
6819 if test "${with_sysmouse+set}" = set; then
6820   withval="$with_sysmouse"
6821   cf_with_sysmouse=$withval
6822 else
6823   cf_with_sysmouse=maybe
6824 fi;
6825         if test "$cf_with_sysmouse" != no ; then
6826         cat >conftest.$ac_ext <<_ACEOF
6827 #line 6827 "configure"
6828 #include "confdefs.h"
6829
6830 #include <osreldate.h>
6831 #if (__FreeBSD_version >= 400017)
6832 #include <sys/consio.h>
6833 #include <sys/fbio.h>
6834 #else
6835 #include <machine/console.h>
6836 #endif
6837
6838 int
6839 main (void)
6840 {
6841
6842         struct mouse_info the_mouse;
6843         ioctl(0, CONS_MOUSECTL, &the_mouse);
6844
6845   ;
6846   return 0;
6847 }
6848 _ACEOF
6849 rm -f conftest.$ac_objext
6850 if { (eval echo "$as_me:6850: \"$ac_compile\"") >&5
6851   (eval $ac_compile) 2>&5
6852   ac_status=$?
6853   echo "$as_me:6853: \$? = $ac_status" >&5
6854   (exit $ac_status); } &&
6855          { ac_try='test -s conftest.$ac_objext'
6856   { (eval echo "$as_me:6856: \"$ac_try\"") >&5
6857   (eval $ac_try) 2>&5
6858   ac_status=$?
6859   echo "$as_me:6859: \$? = $ac_status" >&5
6860   (exit $ac_status); }; }; then
6861   cf_with_sysmouse=yes
6862 else
6863   echo "$as_me: failed program was:" >&5
6864 cat conftest.$ac_ext >&5
6865 cf_with_sysmouse=no
6866 fi
6867 rm -f conftest.$ac_objext conftest.$ac_ext
6868         fi
6869 echo "$as_me:6869: result: $cf_with_sysmouse" >&5
6870 echo "${ECHO_T}$cf_with_sysmouse" >&6
6871 test "$cf_with_sysmouse" = yes &&
6872 cat >>confdefs.h <<\EOF
6873 #define USE_SYSMOUSE 1
6874 EOF
6875
6876 fi
6877
6878 # pretend that ncurses==ncursesw==ncursest
6879 echo "$as_me:6879: checking if you want to disable library suffixes" >&5
6880 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6881
6882 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6883 if test "${enable_lib_suffixes+set}" = set; then
6884   enableval="$enable_lib_suffixes"
6885   test "$enableval" != no && enableval=yes
6886         if test "$enableval" != "yes" ; then
6887     disable_lib_suffixes=yes
6888         else
6889                 disable_lib_suffixes=no
6890         fi
6891 else
6892   enableval=yes
6893         disable_lib_suffixes=no
6894
6895 fi;
6896 echo "$as_me:6896: result: $disable_lib_suffixes" >&5
6897 echo "${ECHO_T}$disable_lib_suffixes" >&6
6898
6899 ### If we're building with rpath, try to link non-standard libs that way too.
6900 if test "$DFT_LWR_MODEL" = "shared"; then
6901
6902 echo "$as_me:6902: checking if rpath-hack should be disabled" >&5
6903 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6904
6905 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6906 if test "${enable_rpath_hack+set}" = set; then
6907   enableval="$enable_rpath_hack"
6908   test "$enableval" != no && enableval=yes
6909         if test "$enableval" != "yes" ; then
6910     cf_disable_rpath_hack=yes
6911         else
6912                 cf_disable_rpath_hack=no
6913         fi
6914 else
6915   enableval=yes
6916         cf_disable_rpath_hack=no
6917
6918 fi;
6919 echo "$as_me:6919: result: $cf_disable_rpath_hack" >&5
6920 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6921 if test "$cf_disable_rpath_hack" = no ; then
6922
6923 echo "$as_me:6923: checking for updated LDFLAGS" >&5
6924 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6925 if test -n "$LD_RPATH_OPT" ; then
6926         echo "$as_me:6926: result: maybe" >&5
6927 echo "${ECHO_T}maybe" >&6
6928
6929         for ac_prog in ldd
6930 do
6931   # Extract the first word of "$ac_prog", so it can be a program name with args.
6932 set dummy $ac_prog; ac_word=$2
6933 echo "$as_me:6933: checking for $ac_word" >&5
6934 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6935 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6936   echo $ECHO_N "(cached) $ECHO_C" >&6
6937 else
6938   if test -n "$cf_ldd_prog"; then
6939   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6940 else
6941   ac_save_IFS=$IFS; IFS=$ac_path_separator
6942 ac_dummy="$PATH"
6943 for ac_dir in $ac_dummy; do
6944   IFS=$ac_save_IFS
6945   test -z "$ac_dir" && ac_dir=.
6946   $as_executable_p "$ac_dir/$ac_word" || continue
6947 ac_cv_prog_cf_ldd_prog="$ac_prog"
6948 echo "$as_me:6948: found $ac_dir/$ac_word" >&5
6949 break
6950 done
6951
6952 fi
6953 fi
6954 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6955 if test -n "$cf_ldd_prog"; then
6956   echo "$as_me:6956: result: $cf_ldd_prog" >&5
6957 echo "${ECHO_T}$cf_ldd_prog" >&6
6958 else
6959   echo "$as_me:6959: result: no" >&5
6960 echo "${ECHO_T}no" >&6
6961 fi
6962
6963   test -n "$cf_ldd_prog" && break
6964 done
6965 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6966
6967         cf_rpath_list="/usr/lib /lib"
6968         if test "$cf_ldd_prog" != no
6969         then
6970                 cf_rpath_oops=
6971
6972 cat >conftest.$ac_ext <<_ACEOF
6973 #line 6973 "configure"
6974 #include "confdefs.h"
6975 #include <stdio.h>
6976 int
6977 main (void)
6978 {
6979 printf("Hello");
6980   ;
6981   return 0;
6982 }
6983 _ACEOF
6984 rm -f conftest.$ac_objext conftest$ac_exeext
6985 if { (eval echo "$as_me:6985: \"$ac_link\"") >&5
6986   (eval $ac_link) 2>&5
6987   ac_status=$?
6988   echo "$as_me:6988: \$? = $ac_status" >&5
6989   (exit $ac_status); } &&
6990          { ac_try='test -s conftest$ac_exeext'
6991   { (eval echo "$as_me:6991: \"$ac_try\"") >&5
6992   (eval $ac_try) 2>&5
6993   ac_status=$?
6994   echo "$as_me:6994: \$? = $ac_status" >&5
6995   (exit $ac_status); }; }; then
6996   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6997                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6998 else
6999   echo "$as_me: failed program was:" >&5
7000 cat conftest.$ac_ext >&5
7001 fi
7002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7003
7004                 # If we passed the link-test, but get a "not found" on a given library,
7005                 # this could be due to inept reconfiguration of gcc to make it only
7006                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7007                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7008                 # /usr/local libraries.
7009                 if test -n "$cf_rpath_oops"
7010                 then
7011                         for cf_rpath_src in $cf_rpath_oops
7012                         do
7013                                 for cf_rpath_dir in \
7014                                         /usr/local \
7015                                         /usr/pkg \
7016                                         /opt/sfw
7017                                 do
7018                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7019                                         then
7020                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7021
7022 echo "${as_me:-configure}:7022: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7023
7024                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7025                                                 break
7026                                         fi
7027                                 done
7028                         done
7029                 fi
7030         fi
7031
7032         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7033
7034 echo "${as_me:-configure}:7034: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7035
7036 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7037
7038 echo "${as_me:-configure}:7038: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7039
7040 cf_rpath_dst=
7041 for cf_rpath_src in $LDFLAGS
7042 do
7043         case $cf_rpath_src in
7044         (-L*)
7045
7046                 # check if this refers to a directory which we will ignore
7047                 cf_rpath_skip=no
7048                 if test -n "$cf_rpath_list"
7049                 then
7050                         for cf_rpath_item in $cf_rpath_list
7051                         do
7052                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7053                                 then
7054                                         cf_rpath_skip=yes
7055                                         break
7056                                 fi
7057                         done
7058                 fi
7059
7060                 if test "$cf_rpath_skip" = no
7061                 then
7062                         # transform the option
7063                         if test "$LD_RPATH_OPT" = "-R " ; then
7064                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7065                         else
7066                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7067                         fi
7068
7069                         # if we have not already added this, add it now
7070                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7071                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7072                         then
7073                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7074
7075 echo "${as_me:-configure}:7075: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7076
7077                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7078                         fi
7079                 fi
7080                 ;;
7081         esac
7082         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7083 done
7084 LDFLAGS=$cf_rpath_dst
7085
7086 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7087
7088 echo "${as_me:-configure}:7088: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7089
7090 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7091
7092 echo "${as_me:-configure}:7092: testing ...checking LIBS $LIBS ..." 1>&5
7093
7094 cf_rpath_dst=
7095 for cf_rpath_src in $LIBS
7096 do
7097         case $cf_rpath_src in
7098         (-L*)
7099
7100                 # check if this refers to a directory which we will ignore
7101                 cf_rpath_skip=no
7102                 if test -n "$cf_rpath_list"
7103                 then
7104                         for cf_rpath_item in $cf_rpath_list
7105                         do
7106                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7107                                 then
7108                                         cf_rpath_skip=yes
7109                                         break
7110                                 fi
7111                         done
7112                 fi
7113
7114                 if test "$cf_rpath_skip" = no
7115                 then
7116                         # transform the option
7117                         if test "$LD_RPATH_OPT" = "-R " ; then
7118                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7119                         else
7120                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7121                         fi
7122
7123                         # if we have not already added this, add it now
7124                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7125                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7126                         then
7127                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7128
7129 echo "${as_me:-configure}:7129: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7130
7131                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7132                         fi
7133                 fi
7134                 ;;
7135         esac
7136         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7137 done
7138 LIBS=$cf_rpath_dst
7139
7140 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7141
7142 echo "${as_me:-configure}:7142: testing ...checked LIBS $LIBS ..." 1>&5
7143
7144         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7145
7146 echo "${as_me:-configure}:7146: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7147
7148 else
7149         echo "$as_me:7149: result: no" >&5
7150 echo "${ECHO_T}no" >&6
7151 fi
7152
7153 fi
7154
7155 fi
7156
7157 ###############################################################################
7158
7159 ###     use option --with-extra-suffix to append suffix to headers and libraries
7160 echo "$as_me:7160: checking if you wish to append extra suffix to header/library paths" >&5
7161 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7162 EXTRA_SUFFIX=
7163
7164 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7165 if test "${with_extra_suffix+set}" = set; then
7166   withval="$with_extra_suffix"
7167   case x$withval in
7168         (no)
7169                 ;;
7170         (xyes|x)
7171                 EXTRA_SUFFIX=$cf_cv_abi_version
7172                 ;;
7173         (*)
7174                 EXTRA_SUFFIX=$withval
7175                 ;;
7176         esac
7177
7178 fi;
7179 echo "$as_me:7179: result: $EXTRA_SUFFIX" >&5
7180 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7181
7182 ###     use option --disable-overwrite to leave out the link to -lcurses
7183 echo "$as_me:7183: checking if you wish to install ncurses overwriting curses" >&5
7184 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7185
7186 # Check whether --enable-overwrite or --disable-overwrite was given.
7187 if test "${enable_overwrite+set}" = set; then
7188   enableval="$enable_overwrite"
7189   with_overwrite=$enableval
7190 else
7191   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7192 fi;
7193 echo "$as_me:7193: result: $with_overwrite" >&5
7194 echo "${ECHO_T}$with_overwrite" >&6
7195
7196 echo "$as_me:7196: checking if external terminfo-database is used" >&5
7197 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7198
7199 # Check whether --enable-database or --disable-database was given.
7200 if test "${enable_database+set}" = set; then
7201   enableval="$enable_database"
7202   use_database=$enableval
7203 else
7204   use_database=yes
7205 fi;
7206 echo "$as_me:7206: result: $use_database" >&5
7207 echo "${ECHO_T}$use_database" >&6
7208
7209 case $host_os in
7210 (os2*)
7211         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7212         ;;
7213 (*)
7214         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7215         ;;
7216 esac
7217
7218 NCURSES_USE_DATABASE=0
7219 if test "$use_database" != no ; then
7220         NCURSES_USE_DATABASE=1
7221
7222         echo "$as_me:7222: checking which terminfo source-file will be installed" >&5
7223 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7224
7225 # Check whether --with-database or --without-database was given.
7226 if test "${with_database+set}" = set; then
7227   withval="$with_database"
7228   TERMINFO_SRC=$withval
7229 fi;
7230         echo "$as_me:7230: result: $TERMINFO_SRC" >&5
7231 echo "${ECHO_T}$TERMINFO_SRC" >&6
7232
7233         echo "$as_me:7233: checking whether to use hashed database instead of directory/tree" >&5
7234 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7235
7236 # Check whether --with-hashed-db or --without-hashed-db was given.
7237 if test "${with_hashed_db+set}" = set; then
7238   withval="$with_hashed_db"
7239
7240 else
7241   with_hashed_db=no
7242 fi;
7243         echo "$as_me:7243: result: $with_hashed_db" >&5
7244 echo "${ECHO_T}$with_hashed_db" >&6
7245 else
7246         with_hashed_db=no
7247 fi
7248
7249 echo "$as_me:7249: checking for list of fallback descriptions" >&5
7250 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7251
7252 # Check whether --with-fallbacks or --without-fallbacks was given.
7253 if test "${with_fallbacks+set}" = set; then
7254   withval="$with_fallbacks"
7255   with_fallback=$withval
7256 else
7257   with_fallback=
7258 fi;
7259 echo "$as_me:7259: result: $with_fallback" >&5
7260 echo "${ECHO_T}$with_fallback" >&6
7261 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7262
7263 echo "$as_me:7263: checking if you want modern xterm or antique" >&5
7264 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7265
7266 # Check whether --with-xterm-new or --without-xterm-new was given.
7267 if test "${with_xterm_new+set}" = set; then
7268   withval="$with_xterm_new"
7269   with_xterm_new=$withval
7270 else
7271   with_xterm_new=yes
7272 fi;
7273 case $with_xterm_new in
7274 (no) with_xterm_new=xterm-old;;
7275 (*)      with_xterm_new=xterm-new;;
7276 esac
7277 echo "$as_me:7277: result: $with_xterm_new" >&5
7278 echo "${ECHO_T}$with_xterm_new" >&6
7279 WHICH_XTERM=$with_xterm_new
7280
7281 echo "$as_me:7281: checking if xterm backspace sends BS or DEL" >&5
7282 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7283
7284 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7285 if test "${with_xterm_kbs+set}" = set; then
7286   withval="$with_xterm_kbs"
7287   with_xterm_kbs=$withval
7288 else
7289   with_xterm_kbs=BS
7290 fi;
7291 case x$with_xterm_kbs in
7292 (xyes|xno|xBS|xbs|x8)
7293         with_xterm_kbs=BS
7294         ;;
7295 (xDEL|xdel|x127)
7296         with_xterm_kbs=DEL
7297         ;;
7298 (*)
7299         with_xterm_kbs=$withval
7300         ;;
7301 esac
7302 echo "$as_me:7302: result: $with_xterm_kbs" >&5
7303 echo "${ECHO_T}$with_xterm_kbs" >&6
7304 XTERM_KBS=$with_xterm_kbs
7305
7306 MAKE_TERMINFO=
7307 if test "$use_database" = no ; then
7308         TERMINFO="${datadir}/terminfo"
7309         MAKE_TERMINFO="#"
7310 else
7311
7312 echo "$as_me:7312: checking for list of terminfo directories" >&5
7313 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7314
7315 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7316 if test "${with_terminfo_dirs+set}" = set; then
7317   withval="$with_terminfo_dirs"
7318
7319 else
7320   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7321 fi;
7322 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7323 cf_dst_path=
7324 for cf_src_path in $withval
7325 do
7326
7327 if test "x$prefix" != xNONE; then
7328         cf_path_syntax="$prefix"
7329 else
7330         cf_path_syntax="$ac_default_prefix"
7331 fi
7332
7333 case ".$cf_src_path" in
7334 (.\$\(*\)*|.\'*\'*)
7335         ;;
7336 (..|./*|.\\*)
7337         ;;
7338 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7339         ;;
7340 (.\${*prefix}*|.\${*dir}*)
7341         eval cf_src_path="$cf_src_path"
7342         case ".$cf_src_path" in
7343         (.NONE/*)
7344                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7345                 ;;
7346         esac
7347         ;;
7348 (.no|.NONE/*)
7349         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7350         ;;
7351 (*)
7352         { { echo "$as_me:7352: error: expected a pathname, not \"$cf_src_path\"" >&5
7353 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7354    { (exit 1); exit 1; }; }
7355         ;;
7356 esac
7357
7358   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7359   cf_dst_path="${cf_dst_path}${cf_src_path}"
7360 done
7361 IFS="$ac_save_ifs"
7362
7363 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7364 # so we have to check/work around.  We do prefer the result of "eval"...
7365 eval cf_dst_eval="$cf_dst_path"
7366 case "x$cf_dst_eval" in
7367 (xNONE*)
7368         TERMINFO_DIRS=$cf_dst_path
7369         ;;
7370 (*)
7371         TERMINFO_DIRS="$cf_dst_eval"
7372         ;;
7373 esac
7374
7375 echo "$as_me:7375: result: $TERMINFO_DIRS" >&5
7376 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7377 test -n "$TERMINFO_DIRS" &&
7378 cat >>confdefs.h <<EOF
7379 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7380 EOF
7381
7382 echo "$as_me:7382: checking for default terminfo directory" >&5
7383 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7384
7385 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7386 if test "${with_default_terminfo_dir+set}" = set; then
7387   withval="$with_default_terminfo_dir"
7388
7389 else
7390   withval="${TERMINFO:-${datadir}/terminfo}"
7391 fi; if test -n "${datadir}/terminfo" ; then
7392
7393 if test "x$prefix" != xNONE; then
7394         cf_path_syntax="$prefix"
7395 else
7396         cf_path_syntax="$ac_default_prefix"
7397 fi
7398
7399 case ".$withval" in
7400 (.\$\(*\)*|.\'*\'*)
7401         ;;
7402 (..|./*|.\\*)
7403         ;;
7404 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7405         ;;
7406 (.\${*prefix}*|.\${*dir}*)
7407         eval withval="$withval"
7408         case ".$withval" in
7409         (.NONE/*)
7410                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7411                 ;;
7412         esac
7413         ;;
7414 (.no|.NONE/*)
7415         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7416         ;;
7417 (*)
7418         { { echo "$as_me:7418: error: expected a pathname, not \"$withval\"" >&5
7419 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7420    { (exit 1); exit 1; }; }
7421         ;;
7422 esac
7423
7424 fi
7425 eval TERMINFO="$withval"
7426
7427 echo "$as_me:7427: result: $TERMINFO" >&5
7428 echo "${ECHO_T}$TERMINFO" >&6
7429
7430 cat >>confdefs.h <<EOF
7431 #define TERMINFO "$TERMINFO"
7432 EOF
7433
7434 fi
7435
7436 ###     use option --disable-big-core to make tic run on small machines
7437 ###     We need 4Mb, check if we can allocate 50% more than that.
7438 echo "$as_me:7438: checking if big-core option selected" >&5
7439 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7440
7441 # Check whether --enable-big-core or --disable-big-core was given.
7442 if test "${enable_big_core+set}" = set; then
7443   enableval="$enable_big_core"
7444   with_big_core=$enableval
7445 else
7446   if test "$cross_compiling" = yes; then
7447   with_big_core=no
7448 else
7449   cat >conftest.$ac_ext <<_ACEOF
7450 #line 7450 "configure"
7451 #include "confdefs.h"
7452
7453 #include <stdlib.h>
7454 #include <string.h>
7455 int main() {
7456         unsigned long n = 6000000L;
7457         char *s = malloc(n);
7458         if (s != 0)
7459                 s[0] = s[n-1] = 0;
7460         ${cf_cv_main_return:-return}(s == 0);
7461 }
7462 _ACEOF
7463 rm -f conftest$ac_exeext
7464 if { (eval echo "$as_me:7464: \"$ac_link\"") >&5
7465   (eval $ac_link) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7469   { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7470   (eval $ac_try) 2>&5
7471   ac_status=$?
7472   echo "$as_me:7472: \$? = $ac_status" >&5
7473   (exit $ac_status); }; }; then
7474   with_big_core=yes
7475 else
7476   echo "$as_me: program exited with status $ac_status" >&5
7477 echo "$as_me: failed program was:" >&5
7478 cat conftest.$ac_ext >&5
7479 with_big_core=no
7480 fi
7481 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7482 fi
7483 fi;
7484 echo "$as_me:7484: result: $with_big_core" >&5
7485 echo "${ECHO_T}$with_big_core" >&6
7486 test "x$with_big_core" = "xyes" &&
7487 cat >>confdefs.h <<\EOF
7488 #define HAVE_BIG_CORE 1
7489 EOF
7490
7491 ### ISO C only guarantees 512-char strings, we have tables which load faster
7492 ### when constructed using "big" strings.  More than the C compiler, the awk
7493 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7494 echo "$as_me:7494: checking if big-strings option selected" >&5
7495 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7496
7497 # Check whether --enable-big-strings or --disable-big-strings was given.
7498 if test "${enable_big_strings+set}" = set; then
7499   enableval="$enable_big_strings"
7500   with_big_strings=$enableval
7501 else
7502
7503         case x$AWK in
7504         (x)
7505                 eval with_big_strings=no
7506                 ;;
7507         (*)
7508                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7509                         | $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
7510                         eval with_big_strings=yes
7511                 else
7512                         eval with_big_strings=no
7513                 fi
7514                 ;;
7515         esac
7516
7517 fi;
7518 echo "$as_me:7518: result: $with_big_strings" >&5
7519 echo "${ECHO_T}$with_big_strings" >&6
7520
7521 USE_BIG_STRINGS=0
7522 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7523
7524 ###     use option --enable-termcap to compile in the termcap fallback support
7525 echo "$as_me:7525: checking if you want termcap-fallback support" >&5
7526 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7527
7528 # Check whether --enable-termcap or --disable-termcap was given.
7529 if test "${enable_termcap+set}" = set; then
7530   enableval="$enable_termcap"
7531   with_termcap=$enableval
7532 else
7533   with_termcap=no
7534 fi;
7535 echo "$as_me:7535: result: $with_termcap" >&5
7536 echo "${ECHO_T}$with_termcap" >&6
7537
7538 NCURSES_USE_TERMCAP=0
7539 if test "x$with_termcap" != "xyes" ; then
7540         if test "$use_database" = no ; then
7541                 if test -z "$with_fallback" ; then
7542                         { { echo "$as_me:7542: error: You have disabled the database w/o specifying fallbacks" >&5
7543 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7544    { (exit 1); exit 1; }; }
7545                 fi
7546         fi
7547
7548 cat >>confdefs.h <<\EOF
7549 #define PURE_TERMINFO 1
7550 EOF
7551
7552 else
7553
7554         if test "$with_ticlib" != no ; then
7555                 { { echo "$as_me:7555: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7556 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7557    { (exit 1); exit 1; }; }
7558         fi
7559
7560         NCURSES_USE_TERMCAP=1
7561         echo "$as_me:7561: checking for list of termcap files" >&5
7562 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7563
7564 # Check whether --with-termpath or --without-termpath was given.
7565 if test "${with_termpath+set}" = set; then
7566   withval="$with_termpath"
7567
7568 else
7569   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7570 fi;
7571 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7572 cf_dst_path=
7573 for cf_src_path in $withval
7574 do
7575
7576 if test "x$prefix" != xNONE; then
7577         cf_path_syntax="$prefix"
7578 else
7579         cf_path_syntax="$ac_default_prefix"
7580 fi
7581
7582 case ".$cf_src_path" in
7583 (.\$\(*\)*|.\'*\'*)
7584         ;;
7585 (..|./*|.\\*)
7586         ;;
7587 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7588         ;;
7589 (.\${*prefix}*|.\${*dir}*)
7590         eval cf_src_path="$cf_src_path"
7591         case ".$cf_src_path" in
7592         (.NONE/*)
7593                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7594                 ;;
7595         esac
7596         ;;
7597 (.no|.NONE/*)
7598         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7599         ;;
7600 (*)
7601         { { echo "$as_me:7601: error: expected a pathname, not \"$cf_src_path\"" >&5
7602 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7603    { (exit 1); exit 1; }; }
7604         ;;
7605 esac
7606
7607   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7608   cf_dst_path="${cf_dst_path}${cf_src_path}"
7609 done
7610 IFS="$ac_save_ifs"
7611
7612 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7613 # so we have to check/work around.  We do prefer the result of "eval"...
7614 eval cf_dst_eval="$cf_dst_path"
7615 case "x$cf_dst_eval" in
7616 (xNONE*)
7617         TERMPATH=$cf_dst_path
7618         ;;
7619 (*)
7620         TERMPATH="$cf_dst_eval"
7621         ;;
7622 esac
7623
7624         echo "$as_me:7624: result: $TERMPATH" >&5
7625 echo "${ECHO_T}$TERMPATH" >&6
7626         test -n "$TERMPATH" &&
7627 cat >>confdefs.h <<EOF
7628 #define TERMPATH "$TERMPATH"
7629 EOF
7630
7631         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7632         echo "$as_me:7632: checking if fast termcap-loader is needed" >&5
7633 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7634
7635 # Check whether --enable-getcap or --disable-getcap was given.
7636 if test "${enable_getcap+set}" = set; then
7637   enableval="$enable_getcap"
7638   with_getcap=$enableval
7639 else
7640   with_getcap=no
7641 fi;
7642         echo "$as_me:7642: result: $with_getcap" >&5
7643 echo "${ECHO_T}$with_getcap" >&6
7644         test "x$with_getcap" = "xyes" &&
7645 cat >>confdefs.h <<\EOF
7646 #define USE_GETCAP 1
7647 EOF
7648
7649         echo "$as_me:7649: checking if translated termcaps will be cached in ~/.terminfo" >&5
7650 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7651
7652 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7653 if test "${enable_getcap_cache+set}" = set; then
7654   enableval="$enable_getcap_cache"
7655   with_getcap_cache=$enableval
7656 else
7657   with_getcap_cache=no
7658 fi;
7659         echo "$as_me:7659: result: $with_getcap_cache" >&5
7660 echo "${ECHO_T}$with_getcap_cache" >&6
7661         test "x$with_getcap_cache" = "xyes" &&
7662 cat >>confdefs.h <<\EOF
7663 #define USE_GETCAP_CACHE 1
7664 EOF
7665
7666 fi
7667
7668 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7669 echo "$as_me:7669: checking if ~/.terminfo is wanted" >&5
7670 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7671
7672 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7673 if test "${enable_home_terminfo+set}" = set; then
7674   enableval="$enable_home_terminfo"
7675   with_home_terminfo=$enableval
7676 else
7677   with_home_terminfo=yes
7678 fi;
7679 echo "$as_me:7679: result: $with_home_terminfo" >&5
7680 echo "${ECHO_T}$with_home_terminfo" >&6
7681 test "x$with_home_terminfo" = "xyes" &&
7682 cat >>confdefs.h <<\EOF
7683 #define USE_HOME_TERMINFO 1
7684 EOF
7685
7686 echo "$as_me:7686: checking if you want to use restricted environment when running as root" >&5
7687 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7688
7689 # Check whether --enable-root-environ or --disable-root-environ was given.
7690 if test "${enable_root_environ+set}" = set; then
7691   enableval="$enable_root_environ"
7692   with_root_environ=$enableval
7693 else
7694   with_root_environ=yes
7695 fi;
7696 echo "$as_me:7696: result: $with_root_environ" >&5
7697 echo "${ECHO_T}$with_root_environ" >&6
7698 test "x$with_root_environ" = xyes &&
7699 cat >>confdefs.h <<\EOF
7700 #define USE_ROOT_ENVIRON 1
7701 EOF
7702
7703 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7704 ###   to reduce storage requirements for the terminfo database.
7705
7706 for ac_header in \
7707 unistd.h \
7708
7709 do
7710 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7711 echo "$as_me:7711: checking for $ac_header" >&5
7712 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7713 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7714   echo $ECHO_N "(cached) $ECHO_C" >&6
7715 else
7716   cat >conftest.$ac_ext <<_ACEOF
7717 #line 7717 "configure"
7718 #include "confdefs.h"
7719 #include <$ac_header>
7720 _ACEOF
7721 if { (eval echo "$as_me:7721: \"$ac_cpp conftest.$ac_ext\"") >&5
7722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7723   ac_status=$?
7724   egrep -v '^ *\+' conftest.er1 >conftest.err
7725   rm -f conftest.er1
7726   cat conftest.err >&5
7727   echo "$as_me:7727: \$? = $ac_status" >&5
7728   (exit $ac_status); } >/dev/null; then
7729   if test -s conftest.err; then
7730     ac_cpp_err=$ac_c_preproc_warn_flag
7731   else
7732     ac_cpp_err=
7733   fi
7734 else
7735   ac_cpp_err=yes
7736 fi
7737 if test -z "$ac_cpp_err"; then
7738   eval "$as_ac_Header=yes"
7739 else
7740   echo "$as_me: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   eval "$as_ac_Header=no"
7743 fi
7744 rm -f conftest.err conftest.$ac_ext
7745 fi
7746 echo "$as_me:7746: result: `eval echo '${'$as_ac_Header'}'`" >&5
7747 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7748 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7749   cat >>confdefs.h <<EOF
7750 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7751 EOF
7752
7753 fi
7754 done
7755
7756 for ac_func in \
7757         remove \
7758         unlink
7759 do
7760 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7761 echo "$as_me:7761: checking for $ac_func" >&5
7762 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7763 if eval "test \"\${$as_ac_var+set}\" = set"; then
7764   echo $ECHO_N "(cached) $ECHO_C" >&6
7765 else
7766   cat >conftest.$ac_ext <<_ACEOF
7767 #line 7767 "configure"
7768 #include "confdefs.h"
7769 /* System header to define __stub macros and hopefully few prototypes,
7770     which can conflict with char $ac_func (); below.  */
7771 #include <assert.h>
7772 /* Override any gcc2 internal prototype to avoid an error.  */
7773 #ifdef __cplusplus
7774 extern "C"
7775 #endif
7776 /* We use char because int might match the return type of a gcc2
7777    builtin and then its argument prototype would still apply.  */
7778 char $ac_func ();
7779 char (*f) ();
7780
7781 int
7782 main (void)
7783 {
7784 /* The GNU C library defines this for functions which it implements
7785     to always fail with ENOSYS.  Some functions are actually named
7786     something starting with __ and the normal name is an alias.  */
7787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7788 choke me
7789 #else
7790 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7791 #endif
7792
7793   ;
7794   return 0;
7795 }
7796 _ACEOF
7797 rm -f conftest.$ac_objext conftest$ac_exeext
7798 if { (eval echo "$as_me:7798: \"$ac_link\"") >&5
7799   (eval $ac_link) 2>&5
7800   ac_status=$?
7801   echo "$as_me:7801: \$? = $ac_status" >&5
7802   (exit $ac_status); } &&
7803          { ac_try='test -s conftest$ac_exeext'
7804   { (eval echo "$as_me:7804: \"$ac_try\"") >&5
7805   (eval $ac_try) 2>&5
7806   ac_status=$?
7807   echo "$as_me:7807: \$? = $ac_status" >&5
7808   (exit $ac_status); }; }; then
7809   eval "$as_ac_var=yes"
7810 else
7811   echo "$as_me: failed program was:" >&5
7812 cat conftest.$ac_ext >&5
7813 eval "$as_ac_var=no"
7814 fi
7815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7816 fi
7817 echo "$as_me:7817: result: `eval echo '${'$as_ac_var'}'`" >&5
7818 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7819 if test `eval echo '${'$as_ac_var'}'` = yes; then
7820   cat >>confdefs.h <<EOF
7821 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7822 EOF
7823
7824 fi
7825 done
7826
7827 if test "$cross_compiling" = yes ; then
7828
7829 for ac_func in \
7830                 link \
7831                 symlink
7832 do
7833 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7834 echo "$as_me:7834: checking for $ac_func" >&5
7835 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7836 if eval "test \"\${$as_ac_var+set}\" = set"; then
7837   echo $ECHO_N "(cached) $ECHO_C" >&6
7838 else
7839   cat >conftest.$ac_ext <<_ACEOF
7840 #line 7840 "configure"
7841 #include "confdefs.h"
7842 /* System header to define __stub macros and hopefully few prototypes,
7843     which can conflict with char $ac_func (); below.  */
7844 #include <assert.h>
7845 /* Override any gcc2 internal prototype to avoid an error.  */
7846 #ifdef __cplusplus
7847 extern "C"
7848 #endif
7849 /* We use char because int might match the return type of a gcc2
7850    builtin and then its argument prototype would still apply.  */
7851 char $ac_func ();
7852 char (*f) ();
7853
7854 int
7855 main (void)
7856 {
7857 /* The GNU C library defines this for functions which it implements
7858     to always fail with ENOSYS.  Some functions are actually named
7859     something starting with __ and the normal name is an alias.  */
7860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7861 choke me
7862 #else
7863 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7864 #endif
7865
7866   ;
7867   return 0;
7868 }
7869 _ACEOF
7870 rm -f conftest.$ac_objext conftest$ac_exeext
7871 if { (eval echo "$as_me:7871: \"$ac_link\"") >&5
7872   (eval $ac_link) 2>&5
7873   ac_status=$?
7874   echo "$as_me:7874: \$? = $ac_status" >&5
7875   (exit $ac_status); } &&
7876          { ac_try='test -s conftest$ac_exeext'
7877   { (eval echo "$as_me:7877: \"$ac_try\"") >&5
7878   (eval $ac_try) 2>&5
7879   ac_status=$?
7880   echo "$as_me:7880: \$? = $ac_status" >&5
7881   (exit $ac_status); }; }; then
7882   eval "$as_ac_var=yes"
7883 else
7884   echo "$as_me: failed program was:" >&5
7885 cat conftest.$ac_ext >&5
7886 eval "$as_ac_var=no"
7887 fi
7888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7889 fi
7890 echo "$as_me:7890: result: `eval echo '${'$as_ac_var'}'`" >&5
7891 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7892 if test `eval echo '${'$as_ac_var'}'` = yes; then
7893   cat >>confdefs.h <<EOF
7894 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7895 EOF
7896
7897 fi
7898 done
7899
7900 else
7901         echo "$as_me:7901: checking if link/symlink functions work" >&5
7902 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7903 if test "${cf_cv_link_funcs+set}" = set; then
7904   echo $ECHO_N "(cached) $ECHO_C" >&6
7905 else
7906
7907                 cf_cv_link_funcs=
7908                 for cf_func in link symlink ; do
7909                         if test "$cross_compiling" = yes; then
7910
7911                         eval 'ac_cv_func_'$cf_func'=error'
7912 else
7913   cat >conftest.$ac_ext <<_ACEOF
7914 #line 7914 "configure"
7915 #include "confdefs.h"
7916
7917 #include <sys/types.h>
7918 #include <sys/stat.h>
7919 #ifdef HAVE_UNISTD_H
7920 #include <unistd.h>
7921 #endif
7922 int main(void)
7923 {
7924         int fail = 0;
7925         char *src = "config.log";
7926         char *dst = "conftest.chk";
7927         struct stat src_sb;
7928         struct stat dst_sb;
7929
7930         stat(src, &src_sb);
7931         fail = ($cf_func("config.log", "conftest.chk") < 0)
7932             || (stat(dst, &dst_sb) < 0)
7933             || (dst_sb.st_mtime != src_sb.st_mtime);
7934 #ifdef HAVE_UNLINK
7935         unlink(dst);
7936 #else
7937         remove(dst);
7938 #endif
7939         ${cf_cv_main_return:-return} (fail);
7940 }
7941
7942 _ACEOF
7943 rm -f conftest$ac_exeext
7944 if { (eval echo "$as_me:7944: \"$ac_link\"") >&5
7945   (eval $ac_link) 2>&5
7946   ac_status=$?
7947   echo "$as_me:7947: \$? = $ac_status" >&5
7948   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7949   { (eval echo "$as_me:7949: \"$ac_try\"") >&5
7950   (eval $ac_try) 2>&5
7951   ac_status=$?
7952   echo "$as_me:7952: \$? = $ac_status" >&5
7953   (exit $ac_status); }; }; then
7954
7955                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7956                         eval 'ac_cv_func_'$cf_func'=yes'
7957 else
7958   echo "$as_me: program exited with status $ac_status" >&5
7959 echo "$as_me: failed program was:" >&5
7960 cat conftest.$ac_ext >&5
7961
7962                         eval 'ac_cv_func_'$cf_func'=no'
7963 fi
7964 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7965 fi
7966                 done
7967                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7968
7969 fi
7970 echo "$as_me:7970: result: $cf_cv_link_funcs" >&5
7971 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7972         test "$ac_cv_func_link"    = yes &&
7973 cat >>confdefs.h <<\EOF
7974 #define HAVE_LINK 1
7975 EOF
7976
7977         test "$ac_cv_func_symlink" = yes &&
7978 cat >>confdefs.h <<\EOF
7979 #define HAVE_SYMLINK 1
7980 EOF
7981
7982 fi
7983
7984 with_links=no
7985 with_symlinks=no
7986
7987 # soft links (symbolic links) are useful for some systems where hard links do
7988 # not work, or to make it simpler to copy terminfo trees around.
7989 if test "x$ac_cv_func_symlink" = xyes ; then
7990         echo "$as_me:7990: checking if tic should use symbolic links" >&5
7991 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7992
7993 # Check whether --enable-symlinks or --disable-symlinks was given.
7994 if test "${enable_symlinks+set}" = set; then
7995   enableval="$enable_symlinks"
7996   with_symlinks=$enableval
7997 else
7998   with_symlinks=no
7999 fi;
8000         echo "$as_me:8000: result: $with_symlinks" >&5
8001 echo "${ECHO_T}$with_symlinks" >&6
8002 fi
8003
8004 # If we have hard links and did not choose to use soft links instead, there is
8005 # no reason to make this choice optional - use the hard links.
8006 if test "$with_symlinks" = no ; then
8007         echo "$as_me:8007: checking if tic should use hard links" >&5
8008 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8009         if test "x$ac_cv_func_link" = xyes ; then
8010                 with_links=yes
8011         else
8012                 with_links=no
8013         fi
8014         echo "$as_me:8014: result: $with_links" >&5
8015 echo "${ECHO_T}$with_links" >&6
8016 fi
8017
8018 test "x$with_links" = xyes &&
8019 cat >>confdefs.h <<\EOF
8020 #define USE_LINKS 1
8021 EOF
8022
8023 test "x$with_symlinks" = xyes &&
8024 cat >>confdefs.h <<\EOF
8025 #define USE_SYMLINKS 1
8026 EOF
8027
8028 ###   use option --enable-broken-linker to force on use of broken-linker support
8029 echo "$as_me:8029: checking if you want broken-linker support code" >&5
8030 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8031
8032 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8033 if test "${enable_broken_linker+set}" = set; then
8034   enableval="$enable_broken_linker"
8035   with_broken_linker=$enableval
8036 else
8037   with_broken_linker=${BROKEN_LINKER:-no}
8038 fi;
8039 echo "$as_me:8039: result: $with_broken_linker" >&5
8040 echo "${ECHO_T}$with_broken_linker" >&6
8041
8042 BROKEN_LINKER=0
8043 if test "x$with_broken_linker" = xyes ; then
8044
8045 cat >>confdefs.h <<\EOF
8046 #define BROKEN_LINKER 1
8047 EOF
8048
8049         BROKEN_LINKER=1
8050 elif test "$DFT_LWR_MODEL" = shared ; then
8051         case $cf_cv_system_name in
8052         (cygwin*)
8053
8054 cat >>confdefs.h <<\EOF
8055 #define BROKEN_LINKER 1
8056 EOF
8057
8058                 BROKEN_LINKER=1
8059                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8060
8061 echo "${as_me:-configure}:8061: testing cygwin linker is broken anyway ..." 1>&5
8062
8063                 ;;
8064         esac
8065 fi
8066
8067 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8068 echo "$as_me:8068: checking if tputs should process BSD-style prefix padding" >&5
8069 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8070
8071 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8072 if test "${enable_bsdpad+set}" = set; then
8073   enableval="$enable_bsdpad"
8074   with_bsdpad=$enableval
8075 else
8076   with_bsdpad=no
8077 fi;
8078 echo "$as_me:8078: result: $with_bsdpad" >&5
8079 echo "${ECHO_T}$with_bsdpad" >&6
8080 test "x$with_bsdpad" = xyes &&
8081 cat >>confdefs.h <<\EOF
8082 #define BSD_TPUTS 1
8083 EOF
8084
8085 ###   use option --enable-widec to turn on use of wide-character support
8086 NCURSES_CH_T=chtype
8087 NCURSES_LIBUTF8=0
8088
8089 NEED_WCHAR_H=0
8090 NCURSES_MBSTATE_T=0
8091 NCURSES_WCHAR_T=0
8092 NCURSES_WINT_T=0
8093
8094 # Check to define _XOPEN_SOURCE "automatically"
8095 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8096
8097 cf_XOPEN_SOURCE=600
8098 cf_POSIX_C_SOURCE=199506L
8099 cf_xopen_source=
8100
8101 case $host_os in
8102 (aix[4-7]*)
8103         cf_xopen_source="-D_ALL_SOURCE"
8104         ;;
8105 (msys)
8106         cf_XOPEN_SOURCE=600
8107         ;;
8108 (darwin[0-8].*)
8109         cf_xopen_source="-D_APPLE_C_SOURCE"
8110         ;;
8111 (darwin*)
8112         cf_xopen_source="-D_DARWIN_C_SOURCE"
8113         cf_XOPEN_SOURCE=
8114         ;;
8115 (freebsd*|dragonfly*)
8116         # 5.x headers associate
8117         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8118         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8119         cf_POSIX_C_SOURCE=200112L
8120         cf_XOPEN_SOURCE=600
8121         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8122         ;;
8123 (hpux11*)
8124         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8125         ;;
8126 (hpux*)
8127         cf_xopen_source="-D_HPUX_SOURCE"
8128         ;;
8129 (irix[56].*)
8130         cf_xopen_source="-D_SGI_SOURCE"
8131         cf_XOPEN_SOURCE=
8132         ;;
8133 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8134
8135 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8136
8137 echo "$as_me:8137: checking if this is the GNU C library" >&5
8138 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8139 if test "${cf_cv_gnu_library+set}" = set; then
8140   echo $ECHO_N "(cached) $ECHO_C" >&6
8141 else
8142
8143 cat >conftest.$ac_ext <<_ACEOF
8144 #line 8144 "configure"
8145 #include "confdefs.h"
8146 #include <sys/types.h>
8147 int
8148 main (void)
8149 {
8150
8151         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8152                 return 0;
8153         #else
8154         #       error not GNU C library
8155         #endif
8156   ;
8157   return 0;
8158 }
8159 _ACEOF
8160 rm -f conftest.$ac_objext
8161 if { (eval echo "$as_me:8161: \"$ac_compile\"") >&5
8162   (eval $ac_compile) 2>&5
8163   ac_status=$?
8164   echo "$as_me:8164: \$? = $ac_status" >&5
8165   (exit $ac_status); } &&
8166          { ac_try='test -s conftest.$ac_objext'
8167   { (eval echo "$as_me:8167: \"$ac_try\"") >&5
8168   (eval $ac_try) 2>&5
8169   ac_status=$?
8170   echo "$as_me:8170: \$? = $ac_status" >&5
8171   (exit $ac_status); }; }; then
8172   cf_cv_gnu_library=yes
8173 else
8174   echo "$as_me: failed program was:" >&5
8175 cat conftest.$ac_ext >&5
8176 cf_cv_gnu_library=no
8177 fi
8178 rm -f conftest.$ac_objext conftest.$ac_ext
8179
8180 fi
8181 echo "$as_me:8181: result: $cf_cv_gnu_library" >&5
8182 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8183
8184 if test x$cf_cv_gnu_library = xyes; then
8185
8186         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8187         # was changed to help a little...
8188         echo "$as_me:8188: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8189 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8190 if test "${cf_cv_gnu_library_219+set}" = set; then
8191   echo $ECHO_N "(cached) $ECHO_C" >&6
8192 else
8193
8194                 cf_save="$CPPFLAGS"
8195
8196         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8197         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8198
8199                 cat >conftest.$ac_ext <<_ACEOF
8200 #line 8200 "configure"
8201 #include "confdefs.h"
8202 #include <sys/types.h>
8203 int
8204 main (void)
8205 {
8206
8207                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8208                                 return 0;
8209                         #else
8210                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8211                         #endif
8212   ;
8213   return 0;
8214 }
8215 _ACEOF
8216 rm -f conftest.$ac_objext
8217 if { (eval echo "$as_me:8217: \"$ac_compile\"") >&5
8218   (eval $ac_compile) 2>&5
8219   ac_status=$?
8220   echo "$as_me:8220: \$? = $ac_status" >&5
8221   (exit $ac_status); } &&
8222          { ac_try='test -s conftest.$ac_objext'
8223   { (eval echo "$as_me:8223: \"$ac_try\"") >&5
8224   (eval $ac_try) 2>&5
8225   ac_status=$?
8226   echo "$as_me:8226: \$? = $ac_status" >&5
8227   (exit $ac_status); }; }; then
8228   cf_cv_gnu_library_219=yes
8229 else
8230   echo "$as_me: failed program was:" >&5
8231 cat conftest.$ac_ext >&5
8232 cf_cv_gnu_library_219=no
8233 fi
8234 rm -f conftest.$ac_objext conftest.$ac_ext
8235                 CPPFLAGS="$cf_save"
8236
8237 fi
8238 echo "$as_me:8238: result: $cf_cv_gnu_library_219" >&5
8239 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8240
8241         if test "x$cf_cv_gnu_library_219" = xyes; then
8242                 cf_save="$CPPFLAGS"
8243                 echo "$as_me:8243: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8244 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8245 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8246   echo $ECHO_N "(cached) $ECHO_C" >&6
8247 else
8248
8249 cf_fix_cppflags=no
8250 cf_new_cflags=
8251 cf_new_cppflags=
8252 cf_new_extra_cppflags=
8253
8254 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8255 do
8256 case $cf_fix_cppflags in
8257 (no)
8258         case $cf_add_cflags in
8259         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8260                 case $cf_add_cflags in
8261                 (-D*)
8262                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8263
8264                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8265                                 && test -z "${cf_tst_cflags}" \
8266                                 && cf_fix_cppflags=yes
8267
8268                         if test $cf_fix_cppflags = yes ; then
8269
8270         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8271         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8272
8273                                 continue
8274                         elif test "${cf_tst_cflags}" = "\"'" ; then
8275
8276         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8277         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8278
8279                                 continue
8280                         fi
8281                         ;;
8282                 esac
8283                 case "$CPPFLAGS" in
8284                 (*$cf_add_cflags)
8285                         ;;
8286                 (*)
8287                         case $cf_add_cflags in
8288                         (-D*)
8289                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8290
8291 CPPFLAGS=`echo "$CPPFLAGS" | \
8292         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8293                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8294
8295                                 ;;
8296                         esac
8297
8298         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8299         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8300
8301                         ;;
8302                 esac
8303                 ;;
8304         (*)
8305
8306         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8307         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8308
8309                 ;;
8310         esac
8311         ;;
8312 (yes)
8313
8314         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8315         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8316
8317         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8318
8319         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8320                 && test -z "${cf_tst_cflags}" \
8321                 && cf_fix_cppflags=no
8322         ;;
8323 esac
8324 done
8325
8326 if test -n "$cf_new_cflags" ; then
8327
8328         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8329         CFLAGS="${CFLAGS}$cf_new_cflags"
8330
8331 fi
8332
8333 if test -n "$cf_new_cppflags" ; then
8334
8335         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8336         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8337
8338 fi
8339
8340 if test -n "$cf_new_extra_cppflags" ; then
8341
8342         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8343         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8344
8345 fi
8346
8347                         cat >conftest.$ac_ext <<_ACEOF
8348 #line 8348 "configure"
8349 #include "confdefs.h"
8350
8351                                 #include <limits.h>
8352                                 #include <sys/types.h>
8353
8354 int
8355 main (void)
8356 {
8357
8358                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
8359                                         return 0;
8360                                 #else
8361                                 #       error GNU C library is too old
8362                                 #endif
8363   ;
8364   return 0;
8365 }
8366 _ACEOF
8367 rm -f conftest.$ac_objext
8368 if { (eval echo "$as_me:8368: \"$ac_compile\"") >&5
8369   (eval $ac_compile) 2>&5
8370   ac_status=$?
8371   echo "$as_me:8371: \$? = $ac_status" >&5
8372   (exit $ac_status); } &&
8373          { ac_try='test -s conftest.$ac_objext'
8374   { (eval echo "$as_me:8374: \"$ac_try\"") >&5
8375   (eval $ac_try) 2>&5
8376   ac_status=$?
8377   echo "$as_me:8377: \$? = $ac_status" >&5
8378   (exit $ac_status); }; }; then
8379   cf_cv_gnu_dftsrc_219=yes
8380 else
8381   echo "$as_me: failed program was:" >&5
8382 cat conftest.$ac_ext >&5
8383 cf_cv_gnu_dftsrc_219=no
8384 fi
8385 rm -f conftest.$ac_objext conftest.$ac_ext
8386
8387 fi
8388 echo "$as_me:8388: result: $cf_cv_gnu_dftsrc_219" >&5
8389 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
8390                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
8391         else
8392                 cf_cv_gnu_dftsrc_219=maybe
8393         fi
8394
8395         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
8396
8397                 echo "$as_me:8397: checking if we must define _GNU_SOURCE" >&5
8398 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8399 if test "${cf_cv_gnu_source+set}" = set; then
8400   echo $ECHO_N "(cached) $ECHO_C" >&6
8401 else
8402
8403                 cat >conftest.$ac_ext <<_ACEOF
8404 #line 8404 "configure"
8405 #include "confdefs.h"
8406 #include <sys/types.h>
8407 int
8408 main (void)
8409 {
8410
8411                         #ifndef _XOPEN_SOURCE
8412                         #error  expected _XOPEN_SOURCE to be defined
8413                         #endif
8414   ;
8415   return 0;
8416 }
8417 _ACEOF
8418 rm -f conftest.$ac_objext
8419 if { (eval echo "$as_me:8419: \"$ac_compile\"") >&5
8420   (eval $ac_compile) 2>&5
8421   ac_status=$?
8422   echo "$as_me:8422: \$? = $ac_status" >&5
8423   (exit $ac_status); } &&
8424          { ac_try='test -s conftest.$ac_objext'
8425   { (eval echo "$as_me:8425: \"$ac_try\"") >&5
8426   (eval $ac_try) 2>&5
8427   ac_status=$?
8428   echo "$as_me:8428: \$? = $ac_status" >&5
8429   (exit $ac_status); }; }; then
8430   cf_cv_gnu_source=no
8431 else
8432   echo "$as_me: failed program was:" >&5
8433 cat conftest.$ac_ext >&5
8434 cf_save="$CPPFLAGS"
8435
8436 cf_fix_cppflags=no
8437 cf_new_cflags=
8438 cf_new_cppflags=
8439 cf_new_extra_cppflags=
8440
8441 for cf_add_cflags in -D_GNU_SOURCE
8442 do
8443 case $cf_fix_cppflags in
8444 (no)
8445         case $cf_add_cflags in
8446         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8447                 case $cf_add_cflags in
8448                 (-D*)
8449                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8450
8451                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8452                                 && test -z "${cf_tst_cflags}" \
8453                                 && cf_fix_cppflags=yes
8454
8455                         if test $cf_fix_cppflags = yes ; then
8456
8457         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8458         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8459
8460                                 continue
8461                         elif test "${cf_tst_cflags}" = "\"'" ; then
8462
8463         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8464         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8465
8466                                 continue
8467                         fi
8468                         ;;
8469                 esac
8470                 case "$CPPFLAGS" in
8471                 (*$cf_add_cflags)
8472                         ;;
8473                 (*)
8474                         case $cf_add_cflags in
8475                         (-D*)
8476                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8477
8478 CPPFLAGS=`echo "$CPPFLAGS" | \
8479         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8480                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8481
8482                                 ;;
8483                         esac
8484
8485         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8486         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8487
8488                         ;;
8489                 esac
8490                 ;;
8491         (*)
8492
8493         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8494         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8495
8496                 ;;
8497         esac
8498         ;;
8499 (yes)
8500
8501         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8502         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8503
8504         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8505
8506         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8507                 && test -z "${cf_tst_cflags}" \
8508                 && cf_fix_cppflags=no
8509         ;;
8510 esac
8511 done
8512
8513 if test -n "$cf_new_cflags" ; then
8514
8515         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8516         CFLAGS="${CFLAGS}$cf_new_cflags"
8517
8518 fi
8519
8520 if test -n "$cf_new_cppflags" ; then
8521
8522         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8523         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8524
8525 fi
8526
8527 if test -n "$cf_new_extra_cppflags" ; then
8528
8529         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8530         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8531
8532 fi
8533
8534                          cat >conftest.$ac_ext <<_ACEOF
8535 #line 8535 "configure"
8536 #include "confdefs.h"
8537 #include <sys/types.h>
8538 int
8539 main (void)
8540 {
8541
8542                                 #ifdef _XOPEN_SOURCE
8543                                 #error  expected _XOPEN_SOURCE to be undefined
8544                                 #endif
8545   ;
8546   return 0;
8547 }
8548 _ACEOF
8549 rm -f conftest.$ac_objext
8550 if { (eval echo "$as_me:8550: \"$ac_compile\"") >&5
8551   (eval $ac_compile) 2>&5
8552   ac_status=$?
8553   echo "$as_me:8553: \$? = $ac_status" >&5
8554   (exit $ac_status); } &&
8555          { ac_try='test -s conftest.$ac_objext'
8556   { (eval echo "$as_me:8556: \"$ac_try\"") >&5
8557   (eval $ac_try) 2>&5
8558   ac_status=$?
8559   echo "$as_me:8559: \$? = $ac_status" >&5
8560   (exit $ac_status); }; }; then
8561   cf_cv_gnu_source=no
8562 else
8563   echo "$as_me: failed program was:" >&5
8564 cat conftest.$ac_ext >&5
8565 cf_cv_gnu_source=yes
8566 fi
8567 rm -f conftest.$ac_objext conftest.$ac_ext
8568                         CPPFLAGS="$cf_save"
8569
8570 fi
8571 rm -f conftest.$ac_objext conftest.$ac_ext
8572
8573 fi
8574 echo "$as_me:8574: result: $cf_cv_gnu_source" >&5
8575 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8576
8577                 if test "$cf_cv_gnu_source" = yes
8578                 then
8579                 echo "$as_me:8579: checking if we should also define _DEFAULT_SOURCE" >&5
8580 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8581 if test "${cf_cv_default_source+set}" = set; then
8582   echo $ECHO_N "(cached) $ECHO_C" >&6
8583 else
8584
8585         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8586         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
8587
8588                         cat >conftest.$ac_ext <<_ACEOF
8589 #line 8589 "configure"
8590 #include "confdefs.h"
8591 #include <sys/types.h>
8592 int
8593 main (void)
8594 {
8595
8596                                 #ifdef _DEFAULT_SOURCE
8597                                 #error  expected _DEFAULT_SOURCE to be undefined
8598                                 #endif
8599   ;
8600   return 0;
8601 }
8602 _ACEOF
8603 rm -f conftest.$ac_objext
8604 if { (eval echo "$as_me:8604: \"$ac_compile\"") >&5
8605   (eval $ac_compile) 2>&5
8606   ac_status=$?
8607   echo "$as_me:8607: \$? = $ac_status" >&5
8608   (exit $ac_status); } &&
8609          { ac_try='test -s conftest.$ac_objext'
8610   { (eval echo "$as_me:8610: \"$ac_try\"") >&5
8611   (eval $ac_try) 2>&5
8612   ac_status=$?
8613   echo "$as_me:8613: \$? = $ac_status" >&5
8614   (exit $ac_status); }; }; then
8615   cf_cv_default_source=no
8616 else
8617   echo "$as_me: failed program was:" >&5
8618 cat conftest.$ac_ext >&5
8619 cf_cv_default_source=yes
8620 fi
8621 rm -f conftest.$ac_objext conftest.$ac_ext
8622
8623 fi
8624 echo "$as_me:8624: result: $cf_cv_default_source" >&5
8625 echo "${ECHO_T}$cf_cv_default_source" >&6
8626                         if test "$cf_cv_default_source" = yes
8627                         then
8628
8629         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8630         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8631
8632                         fi
8633                 fi
8634         fi
8635
8636 fi
8637
8638         ;;
8639 (minix*)
8640         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8641         ;;
8642 (mirbsd*)
8643         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8644         cf_XOPEN_SOURCE=
8645
8646 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8647
8648 cf_save_CFLAGS="$CFLAGS"
8649 cf_save_CPPFLAGS="$CPPFLAGS"
8650
8651 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8652         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8653                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8654
8655 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8656         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8657                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8658
8659 echo "$as_me:8659: checking if we should define _POSIX_C_SOURCE" >&5
8660 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8661 if test "${cf_cv_posix_c_source+set}" = set; then
8662   echo $ECHO_N "(cached) $ECHO_C" >&6
8663 else
8664
8665 echo "${as_me:-configure}:8665: testing if the symbol is already defined go no further ..." 1>&5
8666
8667         cat >conftest.$ac_ext <<_ACEOF
8668 #line 8668 "configure"
8669 #include "confdefs.h"
8670 #include <sys/types.h>
8671 int
8672 main (void)
8673 {
8674
8675 #ifndef _POSIX_C_SOURCE
8676 make an error
8677 #endif
8678   ;
8679   return 0;
8680 }
8681 _ACEOF
8682 rm -f conftest.$ac_objext
8683 if { (eval echo "$as_me:8683: \"$ac_compile\"") >&5
8684   (eval $ac_compile) 2>&5
8685   ac_status=$?
8686   echo "$as_me:8686: \$? = $ac_status" >&5
8687   (exit $ac_status); } &&
8688          { ac_try='test -s conftest.$ac_objext'
8689   { (eval echo "$as_me:8689: \"$ac_try\"") >&5
8690   (eval $ac_try) 2>&5
8691   ac_status=$?
8692   echo "$as_me:8692: \$? = $ac_status" >&5
8693   (exit $ac_status); }; }; then
8694   cf_cv_posix_c_source=no
8695 else
8696   echo "$as_me: failed program was:" >&5
8697 cat conftest.$ac_ext >&5
8698 cf_want_posix_source=no
8699          case .$cf_POSIX_C_SOURCE in
8700          (.[12]??*)
8701                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8702                 ;;
8703          (.2)
8704                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8705                 cf_want_posix_source=yes
8706                 ;;
8707          (.*)
8708                 cf_want_posix_source=yes
8709                 ;;
8710          esac
8711          if test "$cf_want_posix_source" = yes ; then
8712                 cat >conftest.$ac_ext <<_ACEOF
8713 #line 8713 "configure"
8714 #include "confdefs.h"
8715 #include <sys/types.h>
8716 int
8717 main (void)
8718 {
8719
8720 #ifdef _POSIX_SOURCE
8721 make an error
8722 #endif
8723   ;
8724   return 0;
8725 }
8726 _ACEOF
8727 rm -f conftest.$ac_objext
8728 if { (eval echo "$as_me:8728: \"$ac_compile\"") >&5
8729   (eval $ac_compile) 2>&5
8730   ac_status=$?
8731   echo "$as_me:8731: \$? = $ac_status" >&5
8732   (exit $ac_status); } &&
8733          { ac_try='test -s conftest.$ac_objext'
8734   { (eval echo "$as_me:8734: \"$ac_try\"") >&5
8735   (eval $ac_try) 2>&5
8736   ac_status=$?
8737   echo "$as_me:8737: \$? = $ac_status" >&5
8738   (exit $ac_status); }; }; then
8739   :
8740 else
8741   echo "$as_me: failed program was:" >&5
8742 cat conftest.$ac_ext >&5
8743 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8744 fi
8745 rm -f conftest.$ac_objext conftest.$ac_ext
8746          fi
8747
8748 echo "${as_me:-configure}:8748: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8749
8750          CFLAGS="$cf_trim_CFLAGS"
8751          CPPFLAGS="$cf_trim_CPPFLAGS"
8752
8753         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8754         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
8755
8756 echo "${as_me:-configure}:8756: testing if the second compile does not leave our definition intact error ..." 1>&5
8757
8758          cat >conftest.$ac_ext <<_ACEOF
8759 #line 8759 "configure"
8760 #include "confdefs.h"
8761 #include <sys/types.h>
8762 int
8763 main (void)
8764 {
8765
8766 #ifndef _POSIX_C_SOURCE
8767 make an error
8768 #endif
8769   ;
8770   return 0;
8771 }
8772 _ACEOF
8773 rm -f conftest.$ac_objext
8774 if { (eval echo "$as_me:8774: \"$ac_compile\"") >&5
8775   (eval $ac_compile) 2>&5
8776   ac_status=$?
8777   echo "$as_me:8777: \$? = $ac_status" >&5
8778   (exit $ac_status); } &&
8779          { ac_try='test -s conftest.$ac_objext'
8780   { (eval echo "$as_me:8780: \"$ac_try\"") >&5
8781   (eval $ac_try) 2>&5
8782   ac_status=$?
8783   echo "$as_me:8783: \$? = $ac_status" >&5
8784   (exit $ac_status); }; }; then
8785   :
8786 else
8787   echo "$as_me: failed program was:" >&5
8788 cat conftest.$ac_ext >&5
8789 cf_cv_posix_c_source=no
8790 fi
8791 rm -f conftest.$ac_objext conftest.$ac_ext
8792          CFLAGS="$cf_save_CFLAGS"
8793          CPPFLAGS="$cf_save_CPPFLAGS"
8794
8795 fi
8796 rm -f conftest.$ac_objext conftest.$ac_ext
8797
8798 fi
8799 echo "$as_me:8799: result: $cf_cv_posix_c_source" >&5
8800 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8801
8802 if test "$cf_cv_posix_c_source" != no ; then
8803         CFLAGS="$cf_trim_CFLAGS"
8804         CPPFLAGS="$cf_trim_CPPFLAGS"
8805
8806 cf_fix_cppflags=no
8807 cf_new_cflags=
8808 cf_new_cppflags=
8809 cf_new_extra_cppflags=
8810
8811 for cf_add_cflags in $cf_cv_posix_c_source
8812 do
8813 case $cf_fix_cppflags in
8814 (no)
8815         case $cf_add_cflags in
8816         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8817                 case $cf_add_cflags in
8818                 (-D*)
8819                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8820
8821                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8822                                 && test -z "${cf_tst_cflags}" \
8823                                 && cf_fix_cppflags=yes
8824
8825                         if test $cf_fix_cppflags = yes ; then
8826
8827         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8828         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8829
8830                                 continue
8831                         elif test "${cf_tst_cflags}" = "\"'" ; then
8832
8833         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8834         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8835
8836                                 continue
8837                         fi
8838                         ;;
8839                 esac
8840                 case "$CPPFLAGS" in
8841                 (*$cf_add_cflags)
8842                         ;;
8843                 (*)
8844                         case $cf_add_cflags in
8845                         (-D*)
8846                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8847
8848 CPPFLAGS=`echo "$CPPFLAGS" | \
8849         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8850                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8851
8852                                 ;;
8853                         esac
8854
8855         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8856         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8857
8858                         ;;
8859                 esac
8860                 ;;
8861         (*)
8862
8863         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8864         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8865
8866                 ;;
8867         esac
8868         ;;
8869 (yes)
8870
8871         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8872         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8873
8874         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8875
8876         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8877                 && test -z "${cf_tst_cflags}" \
8878                 && cf_fix_cppflags=no
8879         ;;
8880 esac
8881 done
8882
8883 if test -n "$cf_new_cflags" ; then
8884
8885         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8886         CFLAGS="${CFLAGS}$cf_new_cflags"
8887
8888 fi
8889
8890 if test -n "$cf_new_cppflags" ; then
8891
8892         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8893         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8894
8895 fi
8896
8897 if test -n "$cf_new_extra_cppflags" ; then
8898
8899         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8900         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8901
8902 fi
8903
8904 fi
8905
8906         ;;
8907 (netbsd*)
8908         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8909         ;;
8910 (openbsd[4-9]*)
8911         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8912         cf_xopen_source="-D_BSD_SOURCE"
8913         cf_XOPEN_SOURCE=600
8914         ;;
8915 (openbsd*)
8916         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8917         ;;
8918 (osf[45]*)
8919         cf_xopen_source="-D_OSF_SOURCE"
8920         ;;
8921 (nto-qnx*)
8922         cf_xopen_source="-D_QNX_SOURCE"
8923         ;;
8924 (sco*)
8925         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8926         ;;
8927 (solaris2.*)
8928         cf_xopen_source="-D__EXTENSIONS__"
8929         cf_cv_xopen_source=broken
8930         ;;
8931 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8932         cf_XOPEN_SOURCE=
8933         cf_POSIX_C_SOURCE=
8934         ;;
8935 (*)
8936
8937 echo "$as_me:8937: checking if we should define _XOPEN_SOURCE" >&5
8938 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8939 if test "${cf_cv_xopen_source+set}" = set; then
8940   echo $ECHO_N "(cached) $ECHO_C" >&6
8941 else
8942
8943         cat >conftest.$ac_ext <<_ACEOF
8944 #line 8944 "configure"
8945 #include "confdefs.h"
8946
8947 #include <stdlib.h>
8948 #include <string.h>
8949 #include <sys/types.h>
8950
8951 int
8952 main (void)
8953 {
8954
8955 #ifndef _XOPEN_SOURCE
8956 make an error
8957 #endif
8958   ;
8959   return 0;
8960 }
8961 _ACEOF
8962 rm -f conftest.$ac_objext
8963 if { (eval echo "$as_me:8963: \"$ac_compile\"") >&5
8964   (eval $ac_compile) 2>&5
8965   ac_status=$?
8966   echo "$as_me:8966: \$? = $ac_status" >&5
8967   (exit $ac_status); } &&
8968          { ac_try='test -s conftest.$ac_objext'
8969   { (eval echo "$as_me:8969: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:8972: \$? = $ac_status" >&5
8973   (exit $ac_status); }; }; then
8974   cf_cv_xopen_source=no
8975 else
8976   echo "$as_me: failed program was:" >&5
8977 cat conftest.$ac_ext >&5
8978 cf_save="$CPPFLAGS"
8979
8980         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8981         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8982
8983          cat >conftest.$ac_ext <<_ACEOF
8984 #line 8984 "configure"
8985 #include "confdefs.h"
8986
8987 #include <stdlib.h>
8988 #include <string.h>
8989 #include <sys/types.h>
8990
8991 int
8992 main (void)
8993 {
8994
8995 #ifdef _XOPEN_SOURCE
8996 make an error
8997 #endif
8998   ;
8999   return 0;
9000 }
9001 _ACEOF
9002 rm -f conftest.$ac_objext
9003 if { (eval echo "$as_me:9003: \"$ac_compile\"") >&5
9004   (eval $ac_compile) 2>&5
9005   ac_status=$?
9006   echo "$as_me:9006: \$? = $ac_status" >&5
9007   (exit $ac_status); } &&
9008          { ac_try='test -s conftest.$ac_objext'
9009   { (eval echo "$as_me:9009: \"$ac_try\"") >&5
9010   (eval $ac_try) 2>&5
9011   ac_status=$?
9012   echo "$as_me:9012: \$? = $ac_status" >&5
9013   (exit $ac_status); }; }; then
9014   cf_cv_xopen_source=no
9015 else
9016   echo "$as_me: failed program was:" >&5
9017 cat conftest.$ac_ext >&5
9018 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9019 fi
9020 rm -f conftest.$ac_objext conftest.$ac_ext
9021         CPPFLAGS="$cf_save"
9022
9023 fi
9024 rm -f conftest.$ac_objext conftest.$ac_ext
9025
9026 fi
9027 echo "$as_me:9027: result: $cf_cv_xopen_source" >&5
9028 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9029
9030 if test "$cf_cv_xopen_source" != no ; then
9031
9032 CFLAGS=`echo "$CFLAGS" | \
9033         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9034                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9035
9036 CPPFLAGS=`echo "$CPPFLAGS" | \
9037         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9038                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9039
9040         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9041
9042 cf_fix_cppflags=no
9043 cf_new_cflags=
9044 cf_new_cppflags=
9045 cf_new_extra_cppflags=
9046
9047 for cf_add_cflags in $cf_temp_xopen_source
9048 do
9049 case $cf_fix_cppflags in
9050 (no)
9051         case $cf_add_cflags in
9052         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9053                 case $cf_add_cflags in
9054                 (-D*)
9055                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9056
9057                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9058                                 && test -z "${cf_tst_cflags}" \
9059                                 && cf_fix_cppflags=yes
9060
9061                         if test $cf_fix_cppflags = yes ; then
9062
9063         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9064         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9065
9066                                 continue
9067                         elif test "${cf_tst_cflags}" = "\"'" ; then
9068
9069         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9070         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9071
9072                                 continue
9073                         fi
9074                         ;;
9075                 esac
9076                 case "$CPPFLAGS" in
9077                 (*$cf_add_cflags)
9078                         ;;
9079                 (*)
9080                         case $cf_add_cflags in
9081                         (-D*)
9082                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9083
9084 CPPFLAGS=`echo "$CPPFLAGS" | \
9085         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9086                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9087
9088                                 ;;
9089                         esac
9090
9091         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9092         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9093
9094                         ;;
9095                 esac
9096                 ;;
9097         (*)
9098
9099         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9100         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9101
9102                 ;;
9103         esac
9104         ;;
9105 (yes)
9106
9107         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9108         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9109
9110         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9111
9112         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9113                 && test -z "${cf_tst_cflags}" \
9114                 && cf_fix_cppflags=no
9115         ;;
9116 esac
9117 done
9118
9119 if test -n "$cf_new_cflags" ; then
9120
9121         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9122         CFLAGS="${CFLAGS}$cf_new_cflags"
9123
9124 fi
9125
9126 if test -n "$cf_new_cppflags" ; then
9127
9128         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9129         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9130
9131 fi
9132
9133 if test -n "$cf_new_extra_cppflags" ; then
9134
9135         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9136         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9137
9138 fi
9139
9140 fi
9141
9142 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9143
9144 cf_save_CFLAGS="$CFLAGS"
9145 cf_save_CPPFLAGS="$CPPFLAGS"
9146
9147 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9148         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9149                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9150
9151 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9152         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9153                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9154
9155 echo "$as_me:9155: checking if we should define _POSIX_C_SOURCE" >&5
9156 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9157 if test "${cf_cv_posix_c_source+set}" = set; then
9158   echo $ECHO_N "(cached) $ECHO_C" >&6
9159 else
9160
9161 echo "${as_me:-configure}:9161: testing if the symbol is already defined go no further ..." 1>&5
9162
9163         cat >conftest.$ac_ext <<_ACEOF
9164 #line 9164 "configure"
9165 #include "confdefs.h"
9166 #include <sys/types.h>
9167 int
9168 main (void)
9169 {
9170
9171 #ifndef _POSIX_C_SOURCE
9172 make an error
9173 #endif
9174   ;
9175   return 0;
9176 }
9177 _ACEOF
9178 rm -f conftest.$ac_objext
9179 if { (eval echo "$as_me:9179: \"$ac_compile\"") >&5
9180   (eval $ac_compile) 2>&5
9181   ac_status=$?
9182   echo "$as_me:9182: \$? = $ac_status" >&5
9183   (exit $ac_status); } &&
9184          { ac_try='test -s conftest.$ac_objext'
9185   { (eval echo "$as_me:9185: \"$ac_try\"") >&5
9186   (eval $ac_try) 2>&5
9187   ac_status=$?
9188   echo "$as_me:9188: \$? = $ac_status" >&5
9189   (exit $ac_status); }; }; then
9190   cf_cv_posix_c_source=no
9191 else
9192   echo "$as_me: failed program was:" >&5
9193 cat conftest.$ac_ext >&5
9194 cf_want_posix_source=no
9195          case .$cf_POSIX_C_SOURCE in
9196          (.[12]??*)
9197                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9198                 ;;
9199          (.2)
9200                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9201                 cf_want_posix_source=yes
9202                 ;;
9203          (.*)
9204                 cf_want_posix_source=yes
9205                 ;;
9206          esac
9207          if test "$cf_want_posix_source" = yes ; then
9208                 cat >conftest.$ac_ext <<_ACEOF
9209 #line 9209 "configure"
9210 #include "confdefs.h"
9211 #include <sys/types.h>
9212 int
9213 main (void)
9214 {
9215
9216 #ifdef _POSIX_SOURCE
9217 make an error
9218 #endif
9219   ;
9220   return 0;
9221 }
9222 _ACEOF
9223 rm -f conftest.$ac_objext
9224 if { (eval echo "$as_me:9224: \"$ac_compile\"") >&5
9225   (eval $ac_compile) 2>&5
9226   ac_status=$?
9227   echo "$as_me:9227: \$? = $ac_status" >&5
9228   (exit $ac_status); } &&
9229          { ac_try='test -s conftest.$ac_objext'
9230   { (eval echo "$as_me:9230: \"$ac_try\"") >&5
9231   (eval $ac_try) 2>&5
9232   ac_status=$?
9233   echo "$as_me:9233: \$? = $ac_status" >&5
9234   (exit $ac_status); }; }; then
9235   :
9236 else
9237   echo "$as_me: failed program was:" >&5
9238 cat conftest.$ac_ext >&5
9239 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9240 fi
9241 rm -f conftest.$ac_objext conftest.$ac_ext
9242          fi
9243
9244 echo "${as_me:-configure}:9244: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9245
9246          CFLAGS="$cf_trim_CFLAGS"
9247          CPPFLAGS="$cf_trim_CPPFLAGS"
9248
9249         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9250         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9251
9252 echo "${as_me:-configure}:9252: testing if the second compile does not leave our definition intact error ..." 1>&5
9253
9254          cat >conftest.$ac_ext <<_ACEOF
9255 #line 9255 "configure"
9256 #include "confdefs.h"
9257 #include <sys/types.h>
9258 int
9259 main (void)
9260 {
9261
9262 #ifndef _POSIX_C_SOURCE
9263 make an error
9264 #endif
9265   ;
9266   return 0;
9267 }
9268 _ACEOF
9269 rm -f conftest.$ac_objext
9270 if { (eval echo "$as_me:9270: \"$ac_compile\"") >&5
9271   (eval $ac_compile) 2>&5
9272   ac_status=$?
9273   echo "$as_me:9273: \$? = $ac_status" >&5
9274   (exit $ac_status); } &&
9275          { ac_try='test -s conftest.$ac_objext'
9276   { (eval echo "$as_me:9276: \"$ac_try\"") >&5
9277   (eval $ac_try) 2>&5
9278   ac_status=$?
9279   echo "$as_me:9279: \$? = $ac_status" >&5
9280   (exit $ac_status); }; }; then
9281   :
9282 else
9283   echo "$as_me: failed program was:" >&5
9284 cat conftest.$ac_ext >&5
9285 cf_cv_posix_c_source=no
9286 fi
9287 rm -f conftest.$ac_objext conftest.$ac_ext
9288          CFLAGS="$cf_save_CFLAGS"
9289          CPPFLAGS="$cf_save_CPPFLAGS"
9290
9291 fi
9292 rm -f conftest.$ac_objext conftest.$ac_ext
9293
9294 fi
9295 echo "$as_me:9295: result: $cf_cv_posix_c_source" >&5
9296 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9297
9298 if test "$cf_cv_posix_c_source" != no ; then
9299         CFLAGS="$cf_trim_CFLAGS"
9300         CPPFLAGS="$cf_trim_CPPFLAGS"
9301
9302 cf_fix_cppflags=no
9303 cf_new_cflags=
9304 cf_new_cppflags=
9305 cf_new_extra_cppflags=
9306
9307 for cf_add_cflags in $cf_cv_posix_c_source
9308 do
9309 case $cf_fix_cppflags in
9310 (no)
9311         case $cf_add_cflags in
9312         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9313                 case $cf_add_cflags in
9314                 (-D*)
9315                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9316
9317                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9318                                 && test -z "${cf_tst_cflags}" \
9319                                 && cf_fix_cppflags=yes
9320
9321                         if test $cf_fix_cppflags = yes ; then
9322
9323         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9324         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9325
9326                                 continue
9327                         elif test "${cf_tst_cflags}" = "\"'" ; then
9328
9329         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9330         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9331
9332                                 continue
9333                         fi
9334                         ;;
9335                 esac
9336                 case "$CPPFLAGS" in
9337                 (*$cf_add_cflags)
9338                         ;;
9339                 (*)
9340                         case $cf_add_cflags in
9341                         (-D*)
9342                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9343
9344 CPPFLAGS=`echo "$CPPFLAGS" | \
9345         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9346                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9347
9348                                 ;;
9349                         esac
9350
9351         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9352         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9353
9354                         ;;
9355                 esac
9356                 ;;
9357         (*)
9358
9359         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9360         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9361
9362                 ;;
9363         esac
9364         ;;
9365 (yes)
9366
9367         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9368         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9369
9370         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9371
9372         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9373                 && test -z "${cf_tst_cflags}" \
9374                 && cf_fix_cppflags=no
9375         ;;
9376 esac
9377 done
9378
9379 if test -n "$cf_new_cflags" ; then
9380
9381         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9382         CFLAGS="${CFLAGS}$cf_new_cflags"
9383
9384 fi
9385
9386 if test -n "$cf_new_cppflags" ; then
9387
9388         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9389         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9390
9391 fi
9392
9393 if test -n "$cf_new_extra_cppflags" ; then
9394
9395         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9396         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9397
9398 fi
9399
9400 fi
9401
9402         ;;
9403 esac
9404
9405 if test -n "$cf_xopen_source" ; then
9406
9407 cf_fix_cppflags=no
9408 cf_new_cflags=
9409 cf_new_cppflags=
9410 cf_new_extra_cppflags=
9411
9412 for cf_add_cflags in $cf_xopen_source
9413 do
9414 case $cf_fix_cppflags in
9415 (no)
9416         case $cf_add_cflags in
9417         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9418                 case $cf_add_cflags in
9419                 (-D*)
9420                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9421
9422                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9423                                 && test -z "${cf_tst_cflags}" \
9424                                 && cf_fix_cppflags=yes
9425
9426                         if test $cf_fix_cppflags = yes ; then
9427
9428         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9429         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9430
9431                                 continue
9432                         elif test "${cf_tst_cflags}" = "\"'" ; then
9433
9434         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9435         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9436
9437                                 continue
9438                         fi
9439                         ;;
9440                 esac
9441                 case "$CPPFLAGS" in
9442                 (*$cf_add_cflags)
9443                         ;;
9444                 (*)
9445                         case $cf_add_cflags in
9446                         (-D*)
9447                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9448
9449 CPPFLAGS=`echo "$CPPFLAGS" | \
9450         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9451                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9452
9453                                 ;;
9454                         esac
9455
9456         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9457         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9458
9459                         ;;
9460                 esac
9461                 ;;
9462         (*)
9463
9464         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9465         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9466
9467                 ;;
9468         esac
9469         ;;
9470 (yes)
9471
9472         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9473         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9474
9475         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9476
9477         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9478                 && test -z "${cf_tst_cflags}" \
9479                 && cf_fix_cppflags=no
9480         ;;
9481 esac
9482 done
9483
9484 if test -n "$cf_new_cflags" ; then
9485         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9486
9487 echo "${as_me:-configure}:9487: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9488
9489         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9490         CFLAGS="${CFLAGS}$cf_new_cflags"
9491
9492 fi
9493
9494 if test -n "$cf_new_cppflags" ; then
9495         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9496
9497 echo "${as_me:-configure}:9497: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9498
9499         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9500         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9501
9502 fi
9503
9504 if test -n "$cf_new_extra_cppflags" ; then
9505         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9506
9507 echo "${as_me:-configure}:9507: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9508
9509         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9510         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9511
9512 fi
9513
9514 fi
9515
9516 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9517         echo "$as_me:9517: checking if _XOPEN_SOURCE really is set" >&5
9518 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9519         cat >conftest.$ac_ext <<_ACEOF
9520 #line 9520 "configure"
9521 #include "confdefs.h"
9522 #include <stdlib.h>
9523 int
9524 main (void)
9525 {
9526
9527 #ifndef _XOPEN_SOURCE
9528 make an error
9529 #endif
9530   ;
9531   return 0;
9532 }
9533 _ACEOF
9534 rm -f conftest.$ac_objext
9535 if { (eval echo "$as_me:9535: \"$ac_compile\"") >&5
9536   (eval $ac_compile) 2>&5
9537   ac_status=$?
9538   echo "$as_me:9538: \$? = $ac_status" >&5
9539   (exit $ac_status); } &&
9540          { ac_try='test -s conftest.$ac_objext'
9541   { (eval echo "$as_me:9541: \"$ac_try\"") >&5
9542   (eval $ac_try) 2>&5
9543   ac_status=$?
9544   echo "$as_me:9544: \$? = $ac_status" >&5
9545   (exit $ac_status); }; }; then
9546   cf_XOPEN_SOURCE_set=yes
9547 else
9548   echo "$as_me: failed program was:" >&5
9549 cat conftest.$ac_ext >&5
9550 cf_XOPEN_SOURCE_set=no
9551 fi
9552 rm -f conftest.$ac_objext conftest.$ac_ext
9553         echo "$as_me:9553: result: $cf_XOPEN_SOURCE_set" >&5
9554 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9555         if test $cf_XOPEN_SOURCE_set = yes
9556         then
9557                 cat >conftest.$ac_ext <<_ACEOF
9558 #line 9558 "configure"
9559 #include "confdefs.h"
9560 #include <stdlib.h>
9561 int
9562 main (void)
9563 {
9564
9565 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9566 make an error
9567 #endif
9568   ;
9569   return 0;
9570 }
9571 _ACEOF
9572 rm -f conftest.$ac_objext
9573 if { (eval echo "$as_me:9573: \"$ac_compile\"") >&5
9574   (eval $ac_compile) 2>&5
9575   ac_status=$?
9576   echo "$as_me:9576: \$? = $ac_status" >&5
9577   (exit $ac_status); } &&
9578          { ac_try='test -s conftest.$ac_objext'
9579   { (eval echo "$as_me:9579: \"$ac_try\"") >&5
9580   (eval $ac_try) 2>&5
9581   ac_status=$?
9582   echo "$as_me:9582: \$? = $ac_status" >&5
9583   (exit $ac_status); }; }; then
9584   cf_XOPEN_SOURCE_set_ok=yes
9585 else
9586   echo "$as_me: failed program was:" >&5
9587 cat conftest.$ac_ext >&5
9588 cf_XOPEN_SOURCE_set_ok=no
9589 fi
9590 rm -f conftest.$ac_objext conftest.$ac_ext
9591                 if test $cf_XOPEN_SOURCE_set_ok = no
9592                 then
9593                         { echo "$as_me:9593: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9594 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9595                 fi
9596         else
9597
9598 echo "$as_me:9598: checking if we should define _XOPEN_SOURCE" >&5
9599 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9600 if test "${cf_cv_xopen_source+set}" = set; then
9601   echo $ECHO_N "(cached) $ECHO_C" >&6
9602 else
9603
9604         cat >conftest.$ac_ext <<_ACEOF
9605 #line 9605 "configure"
9606 #include "confdefs.h"
9607
9608 #include <stdlib.h>
9609 #include <string.h>
9610 #include <sys/types.h>
9611
9612 int
9613 main (void)
9614 {
9615
9616 #ifndef _XOPEN_SOURCE
9617 make an error
9618 #endif
9619   ;
9620   return 0;
9621 }
9622 _ACEOF
9623 rm -f conftest.$ac_objext
9624 if { (eval echo "$as_me:9624: \"$ac_compile\"") >&5
9625   (eval $ac_compile) 2>&5
9626   ac_status=$?
9627   echo "$as_me:9627: \$? = $ac_status" >&5
9628   (exit $ac_status); } &&
9629          { ac_try='test -s conftest.$ac_objext'
9630   { (eval echo "$as_me:9630: \"$ac_try\"") >&5
9631   (eval $ac_try) 2>&5
9632   ac_status=$?
9633   echo "$as_me:9633: \$? = $ac_status" >&5
9634   (exit $ac_status); }; }; then
9635   cf_cv_xopen_source=no
9636 else
9637   echo "$as_me: failed program was:" >&5
9638 cat conftest.$ac_ext >&5
9639 cf_save="$CPPFLAGS"
9640
9641         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9642         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9643
9644          cat >conftest.$ac_ext <<_ACEOF
9645 #line 9645 "configure"
9646 #include "confdefs.h"
9647
9648 #include <stdlib.h>
9649 #include <string.h>
9650 #include <sys/types.h>
9651
9652 int
9653 main (void)
9654 {
9655
9656 #ifdef _XOPEN_SOURCE
9657 make an error
9658 #endif
9659   ;
9660   return 0;
9661 }
9662 _ACEOF
9663 rm -f conftest.$ac_objext
9664 if { (eval echo "$as_me:9664: \"$ac_compile\"") >&5
9665   (eval $ac_compile) 2>&5
9666   ac_status=$?
9667   echo "$as_me:9667: \$? = $ac_status" >&5
9668   (exit $ac_status); } &&
9669          { ac_try='test -s conftest.$ac_objext'
9670   { (eval echo "$as_me:9670: \"$ac_try\"") >&5
9671   (eval $ac_try) 2>&5
9672   ac_status=$?
9673   echo "$as_me:9673: \$? = $ac_status" >&5
9674   (exit $ac_status); }; }; then
9675   cf_cv_xopen_source=no
9676 else
9677   echo "$as_me: failed program was:" >&5
9678 cat conftest.$ac_ext >&5
9679 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9680 fi
9681 rm -f conftest.$ac_objext conftest.$ac_ext
9682         CPPFLAGS="$cf_save"
9683
9684 fi
9685 rm -f conftest.$ac_objext conftest.$ac_ext
9686
9687 fi
9688 echo "$as_me:9688: result: $cf_cv_xopen_source" >&5
9689 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9690
9691 if test "$cf_cv_xopen_source" != no ; then
9692
9693 CFLAGS=`echo "$CFLAGS" | \
9694         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9695                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9696
9697 CPPFLAGS=`echo "$CPPFLAGS" | \
9698         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9699                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9700
9701         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9702
9703 cf_fix_cppflags=no
9704 cf_new_cflags=
9705 cf_new_cppflags=
9706 cf_new_extra_cppflags=
9707
9708 for cf_add_cflags in $cf_temp_xopen_source
9709 do
9710 case $cf_fix_cppflags in
9711 (no)
9712         case $cf_add_cflags in
9713         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9714                 case $cf_add_cflags in
9715                 (-D*)
9716                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9717
9718                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9719                                 && test -z "${cf_tst_cflags}" \
9720                                 && cf_fix_cppflags=yes
9721
9722                         if test $cf_fix_cppflags = yes ; then
9723
9724         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9725         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9726
9727                                 continue
9728                         elif test "${cf_tst_cflags}" = "\"'" ; then
9729
9730         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9731         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9732
9733                                 continue
9734                         fi
9735                         ;;
9736                 esac
9737                 case "$CPPFLAGS" in
9738                 (*$cf_add_cflags)
9739                         ;;
9740                 (*)
9741                         case $cf_add_cflags in
9742                         (-D*)
9743                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9744
9745 CPPFLAGS=`echo "$CPPFLAGS" | \
9746         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9747                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9748
9749                                 ;;
9750                         esac
9751
9752         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9753         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9754
9755                         ;;
9756                 esac
9757                 ;;
9758         (*)
9759
9760         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9761         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9762
9763                 ;;
9764         esac
9765         ;;
9766 (yes)
9767
9768         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9769         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9770
9771         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9772
9773         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9774                 && test -z "${cf_tst_cflags}" \
9775                 && cf_fix_cppflags=no
9776         ;;
9777 esac
9778 done
9779
9780 if test -n "$cf_new_cflags" ; then
9781
9782         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9783         CFLAGS="${CFLAGS}$cf_new_cflags"
9784
9785 fi
9786
9787 if test -n "$cf_new_cppflags" ; then
9788
9789         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9790         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9791
9792 fi
9793
9794 if test -n "$cf_new_extra_cppflags" ; then
9795
9796         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9797         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9798
9799 fi
9800
9801 fi
9802
9803         fi
9804 fi
9805
9806 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9807
9808 # Work around breakage on OS X
9809
9810 echo "$as_me:9810: checking if SIGWINCH is defined" >&5
9811 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9812 if test "${cf_cv_define_sigwinch+set}" = set; then
9813   echo $ECHO_N "(cached) $ECHO_C" >&6
9814 else
9815
9816         cat >conftest.$ac_ext <<_ACEOF
9817 #line 9817 "configure"
9818 #include "confdefs.h"
9819
9820 #include <sys/types.h>
9821 #include <sys/signal.h>
9822
9823 int
9824 main (void)
9825 {
9826 int x = SIGWINCH
9827   ;
9828   return 0;
9829 }
9830 _ACEOF
9831 rm -f conftest.$ac_objext
9832 if { (eval echo "$as_me:9832: \"$ac_compile\"") >&5
9833   (eval $ac_compile) 2>&5
9834   ac_status=$?
9835   echo "$as_me:9835: \$? = $ac_status" >&5
9836   (exit $ac_status); } &&
9837          { ac_try='test -s conftest.$ac_objext'
9838   { (eval echo "$as_me:9838: \"$ac_try\"") >&5
9839   (eval $ac_try) 2>&5
9840   ac_status=$?
9841   echo "$as_me:9841: \$? = $ac_status" >&5
9842   (exit $ac_status); }; }; then
9843   cf_cv_define_sigwinch=yes
9844 else
9845   echo "$as_me: failed program was:" >&5
9846 cat conftest.$ac_ext >&5
9847 cat >conftest.$ac_ext <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850
9851 #undef _XOPEN_SOURCE
9852 #undef _POSIX_SOURCE
9853 #undef _POSIX_C_SOURCE
9854 #include <sys/types.h>
9855 #include <sys/signal.h>
9856
9857 int
9858 main (void)
9859 {
9860 int x = SIGWINCH
9861   ;
9862   return 0;
9863 }
9864 _ACEOF
9865 rm -f conftest.$ac_objext
9866 if { (eval echo "$as_me:9866: \"$ac_compile\"") >&5
9867   (eval $ac_compile) 2>&5
9868   ac_status=$?
9869   echo "$as_me:9869: \$? = $ac_status" >&5
9870   (exit $ac_status); } &&
9871          { ac_try='test -s conftest.$ac_objext'
9872   { (eval echo "$as_me:9872: \"$ac_try\"") >&5
9873   (eval $ac_try) 2>&5
9874   ac_status=$?
9875   echo "$as_me:9875: \$? = $ac_status" >&5
9876   (exit $ac_status); }; }; then
9877   cf_cv_define_sigwinch=maybe
9878 else
9879   echo "$as_me: failed program was:" >&5
9880 cat conftest.$ac_ext >&5
9881 cf_cv_define_sigwinch=no
9882 fi
9883 rm -f conftest.$ac_objext conftest.$ac_ext
9884
9885 fi
9886 rm -f conftest.$ac_objext conftest.$ac_ext
9887
9888 fi
9889 echo "$as_me:9889: result: $cf_cv_define_sigwinch" >&5
9890 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9891
9892 if test "$cf_cv_define_sigwinch" = maybe ; then
9893 echo "$as_me:9893: checking for actual SIGWINCH definition" >&5
9894 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9895 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9896   echo $ECHO_N "(cached) $ECHO_C" >&6
9897 else
9898
9899 cf_cv_fixup_sigwinch=unknown
9900 cf_sigwinch=32
9901 while test $cf_sigwinch != 1
9902 do
9903         cat >conftest.$ac_ext <<_ACEOF
9904 #line 9904 "configure"
9905 #include "confdefs.h"
9906
9907 #undef _XOPEN_SOURCE
9908 #undef _POSIX_SOURCE
9909 #undef _POSIX_C_SOURCE
9910 #include <sys/types.h>
9911 #include <sys/signal.h>
9912
9913 int
9914 main (void)
9915 {
9916
9917 #if SIGWINCH != $cf_sigwinch
9918 make an error
9919 #endif
9920 int x = SIGWINCH
9921   ;
9922   return 0;
9923 }
9924 _ACEOF
9925 rm -f conftest.$ac_objext
9926 if { (eval echo "$as_me:9926: \"$ac_compile\"") >&5
9927   (eval $ac_compile) 2>&5
9928   ac_status=$?
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } &&
9931          { ac_try='test -s conftest.$ac_objext'
9932   { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit $ac_status); }; }; then
9937   cf_cv_fixup_sigwinch=$cf_sigwinch
9938          break
9939 else
9940   echo "$as_me: failed program was:" >&5
9941 cat conftest.$ac_ext >&5
9942 fi
9943 rm -f conftest.$ac_objext conftest.$ac_ext
9944
9945 cf_sigwinch=`expr $cf_sigwinch - 1`
9946 done
9947
9948 fi
9949 echo "$as_me:9949: result: $cf_cv_fixup_sigwinch" >&5
9950 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9951
9952         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9953                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9954         fi
9955 fi
9956
9957 # Checks for CODESET support.
9958
9959 echo "$as_me:9959: checking for nl_langinfo and CODESET" >&5
9960 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9961 if test "${am_cv_langinfo_codeset+set}" = set; then
9962   echo $ECHO_N "(cached) $ECHO_C" >&6
9963 else
9964   cat >conftest.$ac_ext <<_ACEOF
9965 #line 9965 "configure"
9966 #include "confdefs.h"
9967 #include <langinfo.h>
9968 int
9969 main (void)
9970 {
9971 char* cs = nl_langinfo(CODESET);
9972   ;
9973   return 0;
9974 }
9975 _ACEOF
9976 rm -f conftest.$ac_objext conftest$ac_exeext
9977 if { (eval echo "$as_me:9977: \"$ac_link\"") >&5
9978   (eval $ac_link) 2>&5
9979   ac_status=$?
9980   echo "$as_me:9980: \$? = $ac_status" >&5
9981   (exit $ac_status); } &&
9982          { ac_try='test -s conftest$ac_exeext'
9983   { (eval echo "$as_me:9983: \"$ac_try\"") >&5
9984   (eval $ac_try) 2>&5
9985   ac_status=$?
9986   echo "$as_me:9986: \$? = $ac_status" >&5
9987   (exit $ac_status); }; }; then
9988   am_cv_langinfo_codeset=yes
9989 else
9990   echo "$as_me: failed program was:" >&5
9991 cat conftest.$ac_ext >&5
9992 am_cv_langinfo_codeset=no
9993 fi
9994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9995
9996 fi
9997 echo "$as_me:9997: result: $am_cv_langinfo_codeset" >&5
9998 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9999         if test $am_cv_langinfo_codeset = yes; then
10000
10001 cat >>confdefs.h <<\EOF
10002 #define HAVE_LANGINFO_CODESET 1
10003 EOF
10004
10005         fi
10006
10007 # use these variables to work around a defect in gcc's fixincludes.
10008 NCURSES_OK_WCHAR_T=
10009 NCURSES_OK_WINT_T=
10010
10011 echo "$as_me:10011: checking if you want wide-character code" >&5
10012 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10013
10014 # Check whether --enable-widec or --disable-widec was given.
10015 if test "${enable_widec+set}" = set; then
10016   enableval="$enable_widec"
10017   with_widec=$enableval
10018 else
10019   with_widec=no
10020 fi;
10021 echo "$as_me:10021: result: $with_widec" >&5
10022 echo "${ECHO_T}$with_widec" >&6
10023
10024 NCURSES_WCWIDTH_GRAPHICS=1
10025
10026 if test "x$with_widec" = xyes ; then
10027         if test "x$disable_lib_suffixes" = xno ; then
10028                 LIB_SUFFIX="w${LIB_SUFFIX}"
10029         fi
10030
10031 cat >>confdefs.h <<\EOF
10032 #define USE_WIDEC_SUPPORT 1
10033 EOF
10034
10035 cat >>confdefs.h <<\EOF
10036 #define NCURSES_WIDECHAR 1
10037 EOF
10038
10039 for ac_header in \
10040 wchar.h \
10041 wctype.h \
10042
10043 do
10044 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10045 echo "$as_me:10045: checking for $ac_header" >&5
10046 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10047 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10048   echo $ECHO_N "(cached) $ECHO_C" >&6
10049 else
10050   cat >conftest.$ac_ext <<_ACEOF
10051 #line 10051 "configure"
10052 #include "confdefs.h"
10053 #include <$ac_header>
10054 _ACEOF
10055 if { (eval echo "$as_me:10055: \"$ac_cpp conftest.$ac_ext\"") >&5
10056   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10057   ac_status=$?
10058   egrep -v '^ *\+' conftest.er1 >conftest.err
10059   rm -f conftest.er1
10060   cat conftest.err >&5
10061   echo "$as_me:10061: \$? = $ac_status" >&5
10062   (exit $ac_status); } >/dev/null; then
10063   if test -s conftest.err; then
10064     ac_cpp_err=$ac_c_preproc_warn_flag
10065   else
10066     ac_cpp_err=
10067   fi
10068 else
10069   ac_cpp_err=yes
10070 fi
10071 if test -z "$ac_cpp_err"; then
10072   eval "$as_ac_Header=yes"
10073 else
10074   echo "$as_me: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076   eval "$as_ac_Header=no"
10077 fi
10078 rm -f conftest.err conftest.$ac_ext
10079 fi
10080 echo "$as_me:10080: result: `eval echo '${'$as_ac_Header'}'`" >&5
10081 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10082 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10083   cat >>confdefs.h <<EOF
10084 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10085 EOF
10086
10087 fi
10088 done
10089
10090 echo "$as_me:10090: checking if wchar.h can be used as is" >&5
10091 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10092 if test "${cf_cv_wchar_h_okay+set}" = set; then
10093   echo $ECHO_N "(cached) $ECHO_C" >&6
10094 else
10095
10096 cat >conftest.$ac_ext <<_ACEOF
10097 #line 10097 "configure"
10098 #include "confdefs.h"
10099
10100 #include <stdlib.h>
10101 #ifdef HAVE_WCHAR_H
10102 #include <wchar.h>
10103 #endif
10104 #ifdef HAVE_WCTYPE_H
10105 #include <wctype.h>
10106 #endif
10107
10108 int
10109 main (void)
10110 {
10111
10112         wint_t foo = 0;
10113         int bar = iswpunct(foo)
10114   ;
10115   return 0;
10116 }
10117 _ACEOF
10118 rm -f conftest.$ac_objext
10119 if { (eval echo "$as_me:10119: \"$ac_compile\"") >&5
10120   (eval $ac_compile) 2>&5
10121   ac_status=$?
10122   echo "$as_me:10122: \$? = $ac_status" >&5
10123   (exit $ac_status); } &&
10124          { ac_try='test -s conftest.$ac_objext'
10125   { (eval echo "$as_me:10125: \"$ac_try\"") >&5
10126   (eval $ac_try) 2>&5
10127   ac_status=$?
10128   echo "$as_me:10128: \$? = $ac_status" >&5
10129   (exit $ac_status); }; }; then
10130   cf_cv_wchar_h_okay=yes
10131 else
10132   echo "$as_me: failed program was:" >&5
10133 cat conftest.$ac_ext >&5
10134 cf_cv_wchar_h_okay=no
10135 fi
10136 rm -f conftest.$ac_objext conftest.$ac_ext
10137 fi
10138 echo "$as_me:10138: result: $cf_cv_wchar_h_okay" >&5
10139 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10140
10141 if test $cf_cv_wchar_h_okay = no
10142 then
10143
10144 echo "$as_me:10144: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10145 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10146 cat >conftest.$ac_ext <<_ACEOF
10147 #line 10147 "configure"
10148 #include "confdefs.h"
10149 #include <sys/types.h>
10150
10151 int
10152 main (void)
10153 {
10154
10155 #ifndef _XOPEN_SOURCE_EXTENDED
10156 make an error
10157 #endif
10158   ;
10159   return 0;
10160 }
10161 _ACEOF
10162 rm -f conftest.$ac_objext
10163 if { (eval echo "$as_me:10163: \"$ac_compile\"") >&5
10164   (eval $ac_compile) 2>&5
10165   ac_status=$?
10166   echo "$as_me:10166: \$? = $ac_status" >&5
10167   (exit $ac_status); } &&
10168          { ac_try='test -s conftest.$ac_objext'
10169   { (eval echo "$as_me:10169: \"$ac_try\"") >&5
10170   (eval $ac_try) 2>&5
10171   ac_status=$?
10172   echo "$as_me:10172: \$? = $ac_status" >&5
10173   (exit $ac_status); }; }; then
10174   cf_result=no
10175 else
10176   echo "$as_me: failed program was:" >&5
10177 cat conftest.$ac_ext >&5
10178 cf_result=yes
10179 fi
10180 rm -f conftest.$ac_objext conftest.$ac_ext
10181 echo "$as_me:10181: result: $cf_result" >&5
10182 echo "${ECHO_T}$cf_result" >&6
10183
10184 if test "$cf_result" = yes ; then
10185         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10186 elif test "x" != "x" ; then
10187         echo "$as_me:10187: checking checking for compatible value versus " >&5
10188 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10189         cat >conftest.$ac_ext <<_ACEOF
10190 #line 10190 "configure"
10191 #include "confdefs.h"
10192 #include <sys/types.h>
10193
10194 int
10195 main (void)
10196 {
10197
10198 #if _XOPEN_SOURCE_EXTENDED- < 0
10199 make an error
10200 #endif
10201   ;
10202   return 0;
10203 }
10204 _ACEOF
10205 rm -f conftest.$ac_objext
10206 if { (eval echo "$as_me:10206: \"$ac_compile\"") >&5
10207   (eval $ac_compile) 2>&5
10208   ac_status=$?
10209   echo "$as_me:10209: \$? = $ac_status" >&5
10210   (exit $ac_status); } &&
10211          { ac_try='test -s conftest.$ac_objext'
10212   { (eval echo "$as_me:10212: \"$ac_try\"") >&5
10213   (eval $ac_try) 2>&5
10214   ac_status=$?
10215   echo "$as_me:10215: \$? = $ac_status" >&5
10216   (exit $ac_status); }; }; then
10217   cf_result=yes
10218 else
10219   echo "$as_me: failed program was:" >&5
10220 cat conftest.$ac_ext >&5
10221 cf_result=no
10222 fi
10223 rm -f conftest.$ac_objext conftest.$ac_ext
10224         echo "$as_me:10224: result: $cf_result" >&5
10225 echo "${ECHO_T}$cf_result" >&6
10226         if test "$cf_result" = no ; then
10227                 # perhaps we can override it - try...
10228                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10229         fi
10230 fi
10231
10232 fi
10233
10234 echo "$as_me:10234: checking if wcwidth agrees graphics are single-width" >&5
10235 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10236 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10237   echo $ECHO_N "(cached) $ECHO_C" >&6
10238 else
10239
10240 cat >conftest.in <<CF_EOF
10241 -       VT100 symbols
10242 0x250c  upper left corner
10243 0x2514  lower left corner
10244 0x2510  upper right corner
10245 0x2518  lower right corner
10246 0x251c  tee pointing left
10247 0x2524  tee pointing right
10248 0x2534  tee pointing up
10249 0x252c  tee pointing down
10250 0x2500  horizontal line
10251 0x2502  vertical line
10252 0x253c  large plus or crossover
10253 0x23ba  scan line 1
10254 0x23bd  scan line 9
10255 0x25c6  diamond
10256 0x2592  checker board (stipple)
10257 0x00b0  degree symbol
10258 0x00b1  plus/minus
10259 0x00b7  bullet
10260 -       Teletype 5410v1 symbols
10261 0x2190  arrow pointing left
10262 0x2192  arrow pointing right
10263 0x2193  arrow pointing down
10264 0x2191  arrow pointing up
10265 0x2592  board of squares
10266 0x2603  lantern symbol
10267 0x25ae  solid square block
10268 -       these defaults were invented for ncurses
10269 0x23bb  scan line 3
10270 0x23bc  scan line 7
10271 0x2264  less-than-or-equal-to
10272 0x2265  greater-than-or-equal-to
10273 0x03c0  greek pi
10274 0x2260  not-equal
10275 0x00a3  pound-sterling symbol
10276 -       thick-line-drawing
10277 0x250f  upper left corner
10278 0x2517  lower left corner
10279 0x2513  upper right corner
10280 0x251b  lower right corner
10281 0x2523  tee pointing left
10282 0x252b  tee pointing right
10283 0x253b  tee pointing up
10284 0x2533  tee pointing down
10285 0x2501  horizontal line
10286 0x2503  vertical line
10287 0x254b  large plus or crossover
10288 -       double-line-drawing
10289 0x2554  upper left corner
10290 0x255a  lower left corner
10291 0x2557  upper right corner
10292 0x255d  lower right corner
10293 0x2563  tee pointing left
10294 0x2560  tee pointing right
10295 0x2569  tee pointing up
10296 0x2566  tee pointing down
10297 0x2550  horizontal line
10298 0x2551  vertical line
10299 0x256c  large plus or crossover
10300 CF_EOF
10301 if test "$cross_compiling" = yes; then
10302   cf_cv_wcwidth_graphics=unknown
10303 else
10304   cat >conftest.$ac_ext <<_ACEOF
10305 #line 10305 "configure"
10306 #include "confdefs.h"
10307
10308 #include <locale.h>
10309 #include <stdio.h>
10310 #include <wchar.h>
10311
10312 #define MY_LEN 80
10313
10314 int
10315 main(void)
10316 {
10317         FILE *fp;
10318         int value;
10319         char buffer[MY_LEN + 1];
10320         char notes[MY_LEN + 1];
10321         int totals = 0;
10322         int passed = 0;
10323
10324         if (setlocale(LC_ALL, "en_US.UTF8") ||
10325                 setlocale(LC_ALL, "en_US.UTF-8") ||
10326                 setlocale(LC_ALL, "en_US.utf8") ||
10327                 setlocale(LC_ALL, "en_US.utf-8")) {
10328                 if ((fp = fopen("conftest.in", "r")) != 0) {
10329                         while (fgets(buffer, MY_LEN, fp) != 0) {
10330                                 if (*buffer == '-') {
10331                                         fprintf(stderr, "\t%s", buffer);
10332                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
10333                                         ++totals;
10334                                         if (wcwidth(value) == 1)
10335                                                 ++passed;
10336                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
10337                                 } else {
10338                                         fprintf(stderr, "?\t%s", buffer);
10339                                 }
10340                         }
10341                 }
10342         }
10343         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
10344         return (totals == passed) ? 0 : 1;
10345 }
10346
10347 _ACEOF
10348 rm -f conftest$ac_exeext
10349 if { (eval echo "$as_me:10349: \"$ac_link\"") >&5
10350   (eval $ac_link) 2>&5
10351   ac_status=$?
10352   echo "$as_me:10352: \$? = $ac_status" >&5
10353   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10354   { (eval echo "$as_me:10354: \"$ac_try\"") >&5
10355   (eval $ac_try) 2>&5
10356   ac_status=$?
10357   echo "$as_me:10357: \$? = $ac_status" >&5
10358   (exit $ac_status); }; }; then
10359   cf_cv_wcwidth_graphics=yes
10360 else
10361   echo "$as_me: program exited with status $ac_status" >&5
10362 echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10364 cf_cv_wcwidth_graphics=no
10365 fi
10366 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10367 fi
10368
10369 fi
10370 echo "$as_me:10370: result: $cf_cv_wcwidth_graphics" >&5
10371 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
10372
10373         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
10374
10375         # with_overwrite=no
10376         NCURSES_CH_T=cchar_t
10377
10378 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
10379 do
10380 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10381 echo "$as_me:10381: checking for $ac_func" >&5
10382 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10383 if eval "test \"\${$as_ac_var+set}\" = set"; then
10384   echo $ECHO_N "(cached) $ECHO_C" >&6
10385 else
10386   cat >conftest.$ac_ext <<_ACEOF
10387 #line 10387 "configure"
10388 #include "confdefs.h"
10389 /* System header to define __stub macros and hopefully few prototypes,
10390     which can conflict with char $ac_func (); below.  */
10391 #include <assert.h>
10392 /* Override any gcc2 internal prototype to avoid an error.  */
10393 #ifdef __cplusplus
10394 extern "C"
10395 #endif
10396 /* We use char because int might match the return type of a gcc2
10397    builtin and then its argument prototype would still apply.  */
10398 char $ac_func ();
10399 char (*f) ();
10400
10401 int
10402 main (void)
10403 {
10404 /* The GNU C library defines this for functions which it implements
10405     to always fail with ENOSYS.  Some functions are actually named
10406     something starting with __ and the normal name is an alias.  */
10407 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10408 choke me
10409 #else
10410 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10411 #endif
10412
10413   ;
10414   return 0;
10415 }
10416 _ACEOF
10417 rm -f conftest.$ac_objext conftest$ac_exeext
10418 if { (eval echo "$as_me:10418: \"$ac_link\"") >&5
10419   (eval $ac_link) 2>&5
10420   ac_status=$?
10421   echo "$as_me:10421: \$? = $ac_status" >&5
10422   (exit $ac_status); } &&
10423          { ac_try='test -s conftest$ac_exeext'
10424   { (eval echo "$as_me:10424: \"$ac_try\"") >&5
10425   (eval $ac_try) 2>&5
10426   ac_status=$?
10427   echo "$as_me:10427: \$? = $ac_status" >&5
10428   (exit $ac_status); }; }; then
10429   eval "$as_ac_var=yes"
10430 else
10431   echo "$as_me: failed program was:" >&5
10432 cat conftest.$ac_ext >&5
10433 eval "$as_ac_var=no"
10434 fi
10435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10436 fi
10437 echo "$as_me:10437: result: `eval echo '${'$as_ac_var'}'`" >&5
10438 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10439 if test `eval echo '${'$as_ac_var'}'` = yes; then
10440   cat >>confdefs.h <<EOF
10441 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10442 EOF
10443
10444 fi
10445 done
10446
10447         if test "x$ac_cv_func_putwc" != xyes ; then
10448
10449 echo "$as_me:10449: checking for multibyte character support" >&5
10450 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10451 if test "${cf_cv_utf8_lib+set}" = set; then
10452   echo $ECHO_N "(cached) $ECHO_C" >&6
10453 else
10454
10455         cf_save_LIBS="$LIBS"
10456         cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459
10460 #include <stdlib.h>
10461 int
10462 main (void)
10463 {
10464 putwc(0,0);
10465   ;
10466   return 0;
10467 }
10468 _ACEOF
10469 rm -f conftest.$ac_objext conftest$ac_exeext
10470 if { (eval echo "$as_me:10470: \"$ac_link\"") >&5
10471   (eval $ac_link) 2>&5
10472   ac_status=$?
10473   echo "$as_me:10473: \$? = $ac_status" >&5
10474   (exit $ac_status); } &&
10475          { ac_try='test -s conftest$ac_exeext'
10476   { (eval echo "$as_me:10476: \"$ac_try\"") >&5
10477   (eval $ac_try) 2>&5
10478   ac_status=$?
10479   echo "$as_me:10479: \$? = $ac_status" >&5
10480   (exit $ac_status); }; }; then
10481   cf_cv_utf8_lib=yes
10482 else
10483   echo "$as_me: failed program was:" >&5
10484 cat conftest.$ac_ext >&5
10485
10486 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10487 # will be set on completion of the AC_TRY_LINK below.
10488 cf_cv_header_path_utf8=
10489 cf_cv_library_path_utf8=
10490
10491 echo "${as_me:-configure}:10491: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10492
10493 cf_save_LIBS="$LIBS"
10494
10495 cat >conftest.$ac_ext <<_ACEOF
10496 #line 10496 "configure"
10497 #include "confdefs.h"
10498
10499 #include <libutf8.h>
10500 int
10501 main (void)
10502 {
10503 putwc(0,0);
10504   ;
10505   return 0;
10506 }
10507 _ACEOF
10508 rm -f conftest.$ac_objext conftest$ac_exeext
10509 if { (eval echo "$as_me:10509: \"$ac_link\"") >&5
10510   (eval $ac_link) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit $ac_status); } &&
10514          { ac_try='test -s conftest$ac_exeext'
10515   { (eval echo "$as_me:10515: \"$ac_try\"") >&5
10516   (eval $ac_try) 2>&5
10517   ac_status=$?
10518   echo "$as_me:10518: \$? = $ac_status" >&5
10519   (exit $ac_status); }; }; then
10520
10521         cf_cv_find_linkage_utf8=yes
10522         cf_cv_header_path_utf8=/usr/include
10523         cf_cv_library_path_utf8=/usr/lib
10524
10525 else
10526   echo "$as_me: failed program was:" >&5
10527 cat conftest.$ac_ext >&5
10528
10529 LIBS="-lutf8  $cf_save_LIBS"
10530
10531 cat >conftest.$ac_ext <<_ACEOF
10532 #line 10532 "configure"
10533 #include "confdefs.h"
10534
10535 #include <libutf8.h>
10536 int
10537 main (void)
10538 {
10539 putwc(0,0);
10540   ;
10541   return 0;
10542 }
10543 _ACEOF
10544 rm -f conftest.$ac_objext conftest$ac_exeext
10545 if { (eval echo "$as_me:10545: \"$ac_link\"") >&5
10546   (eval $ac_link) 2>&5
10547   ac_status=$?
10548   echo "$as_me:10548: \$? = $ac_status" >&5
10549   (exit $ac_status); } &&
10550          { ac_try='test -s conftest$ac_exeext'
10551   { (eval echo "$as_me:10551: \"$ac_try\"") >&5
10552   (eval $ac_try) 2>&5
10553   ac_status=$?
10554   echo "$as_me:10554: \$? = $ac_status" >&5
10555   (exit $ac_status); }; }; then
10556
10557         cf_cv_find_linkage_utf8=yes
10558         cf_cv_header_path_utf8=/usr/include
10559         cf_cv_library_path_utf8=/usr/lib
10560         cf_cv_library_file_utf8="-lutf8"
10561
10562 else
10563   echo "$as_me: failed program was:" >&5
10564 cat conftest.$ac_ext >&5
10565
10566         cf_cv_find_linkage_utf8=no
10567         LIBS="$cf_save_LIBS"
10568
10569         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10570
10571 echo "${as_me:-configure}:10571: testing find linkage for utf8 library ..." 1>&5
10572
10573 echo "${as_me:-configure}:10573: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10574
10575         cf_save_CPPFLAGS="$CPPFLAGS"
10576         cf_test_CPPFLAGS="$CPPFLAGS"
10577
10578 cf_search=
10579
10580 # collect the current set of include-directories from compiler flags
10581 cf_header_path_list=""
10582 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10583         for cf_header_path in $CPPFLAGS $CFLAGS
10584         do
10585                 case $cf_header_path in
10586                 (-I*)
10587                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10588
10589 test "x$cf_header_path" != "xNONE" && \
10590 test -d "$cf_header_path" && \
10591  {
10592         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10593         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10594         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10595         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10596         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10597         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10598 }
10599
10600                         cf_header_path_list="$cf_header_path_list $cf_search"
10601                         ;;
10602                 esac
10603         done
10604 fi
10605
10606 # add the variations for the package we are looking for
10607
10608 cf_search=
10609
10610 test "x$prefix" != "xNONE" && \
10611 test -d "$prefix" && \
10612  {
10613         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10614         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10615         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10616         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10617         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10618         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10619 }
10620
10621 for cf_subdir_prefix in \
10622         /usr \
10623         /usr/local \
10624         /usr/pkg \
10625         /opt \
10626         /opt/local \
10627         $HOME
10628 do
10629
10630 test "x$cf_subdir_prefix" != "x$prefix" && \
10631 test -d "$cf_subdir_prefix" && \
10632 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10633         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10634         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10635         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10636         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10637         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10638         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10639 }
10640
10641 done
10642
10643 test "$includedir" != NONE && \
10644 test "$includedir" != "/usr/include" && \
10645 test -d "$includedir" && {
10646         test -d $includedir &&    cf_search="$cf_search $includedir"
10647         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10648 }
10649
10650 test "$oldincludedir" != NONE && \
10651 test "$oldincludedir" != "/usr/include" && \
10652 test -d "$oldincludedir" && {
10653         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10654         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10655 }
10656
10657 cf_search="$cf_search $cf_header_path_list"
10658
10659         for cf_cv_header_path_utf8 in $cf_search
10660         do
10661                 if test -d $cf_cv_header_path_utf8 ; then
10662                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10663
10664 echo "${as_me:-configure}:10664: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10665
10666                         CPPFLAGS="$cf_save_CPPFLAGS"
10667
10668         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10669         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
10670
10671                         cat >conftest.$ac_ext <<_ACEOF
10672 #line 10672 "configure"
10673 #include "confdefs.h"
10674
10675 #include <libutf8.h>
10676 int
10677 main (void)
10678 {
10679 putwc(0,0);
10680   ;
10681   return 0;
10682 }
10683 _ACEOF
10684 rm -f conftest.$ac_objext
10685 if { (eval echo "$as_me:10685: \"$ac_compile\"") >&5
10686   (eval $ac_compile) 2>&5
10687   ac_status=$?
10688   echo "$as_me:10688: \$? = $ac_status" >&5
10689   (exit $ac_status); } &&
10690          { ac_try='test -s conftest.$ac_objext'
10691   { (eval echo "$as_me:10691: \"$ac_try\"") >&5
10692   (eval $ac_try) 2>&5
10693   ac_status=$?
10694   echo "$as_me:10694: \$? = $ac_status" >&5
10695   (exit $ac_status); }; }; then
10696
10697                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10698
10699 echo "${as_me:-configure}:10699: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10700
10701                                 cf_cv_find_linkage_utf8=maybe
10702                                 cf_test_CPPFLAGS="$CPPFLAGS"
10703                                 break
10704 else
10705   echo "$as_me: failed program was:" >&5
10706 cat conftest.$ac_ext >&5
10707
10708                                 CPPFLAGS="$cf_save_CPPFLAGS"
10709
10710 fi
10711 rm -f conftest.$ac_objext conftest.$ac_ext
10712                 fi
10713         done
10714
10715         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10716
10717 echo "${as_me:-configure}:10717: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10718
10719                 cf_save_LIBS="$LIBS"
10720                 cf_save_LDFLAGS="$LDFLAGS"
10721
10722                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10723
10724 cf_search=
10725 cf_library_path_list=""
10726 if test -n "${LDFLAGS}${LIBS}" ; then
10727         for cf_library_path in $LDFLAGS $LIBS
10728         do
10729                 case $cf_library_path in
10730                 (-L*)
10731                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10732
10733 test "x$cf_library_path" != "xNONE" && \
10734 test -d "$cf_library_path" && \
10735  {
10736         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10737         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10738         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10739         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10740         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10741         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10742 }
10743
10744                         cf_library_path_list="$cf_library_path_list $cf_search"
10745                         ;;
10746                 esac
10747         done
10748 fi
10749
10750 cf_search=
10751
10752 test "x$prefix" != "xNONE" && \
10753 test -d "$prefix" && \
10754  {
10755         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10756         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10757         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10758         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10759         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10760         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10761 }
10762
10763 for cf_subdir_prefix in \
10764         /usr \
10765         /usr/local \
10766         /usr/pkg \
10767         /opt \
10768         /opt/local \
10769         $HOME
10770 do
10771
10772 test "x$cf_subdir_prefix" != "x$prefix" && \
10773 test -d "$cf_subdir_prefix" && \
10774 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10775         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10776         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10777         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10778         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10779         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10780         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10781 }
10782
10783 done
10784
10785 cf_search="$cf_library_path_list $cf_search"
10786
10787                         for cf_cv_library_path_utf8 in $cf_search
10788                         do
10789                                 if test -d $cf_cv_library_path_utf8 ; then
10790                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10791
10792 echo "${as_me:-configure}:10792: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10793
10794                                         CPPFLAGS="$cf_test_CPPFLAGS"
10795                                         LIBS="-lutf8  $cf_save_LIBS"
10796                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10797                                         cat >conftest.$ac_ext <<_ACEOF
10798 #line 10798 "configure"
10799 #include "confdefs.h"
10800
10801 #include <libutf8.h>
10802 int
10803 main (void)
10804 {
10805 putwc(0,0);
10806   ;
10807   return 0;
10808 }
10809 _ACEOF
10810 rm -f conftest.$ac_objext conftest$ac_exeext
10811 if { (eval echo "$as_me:10811: \"$ac_link\"") >&5
10812   (eval $ac_link) 2>&5
10813   ac_status=$?
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); } &&
10816          { ac_try='test -s conftest$ac_exeext'
10817   { (eval echo "$as_me:10817: \"$ac_try\"") >&5
10818   (eval $ac_try) 2>&5
10819   ac_status=$?
10820   echo "$as_me:10820: \$? = $ac_status" >&5
10821   (exit $ac_status); }; }; then
10822
10823                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10824
10825 echo "${as_me:-configure}:10825: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10826
10827                                         cf_cv_find_linkage_utf8=yes
10828                                         cf_cv_library_file_utf8="-lutf8"
10829                                         break
10830 else
10831   echo "$as_me: failed program was:" >&5
10832 cat conftest.$ac_ext >&5
10833
10834                                         CPPFLAGS="$cf_save_CPPFLAGS"
10835                                         LIBS="$cf_save_LIBS"
10836                                         LDFLAGS="$cf_save_LDFLAGS"
10837
10838 fi
10839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10840                                 fi
10841                         done
10842                         CPPFLAGS="$cf_save_CPPFLAGS"
10843                         LDFLAGS="$cf_save_LDFLAGS"
10844                 fi
10845
10846         else
10847                 cf_cv_find_linkage_utf8=no
10848         fi
10849
10850 fi
10851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10852
10853 fi
10854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10855
10856 LIBS="$cf_save_LIBS"
10857
10858 if test "$cf_cv_find_linkage_utf8" = yes ; then
10859 cf_cv_utf8_lib=add-on
10860 else
10861 cf_cv_utf8_lib=no
10862 fi
10863
10864 fi
10865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10866 fi
10867 echo "$as_me:10867: result: $cf_cv_utf8_lib" >&5
10868 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10869
10870 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10871 # ncurses/ncursesw:
10872 if test "$cf_cv_utf8_lib" = "add-on" ; then
10873
10874 cat >>confdefs.h <<\EOF
10875 #define HAVE_LIBUTF8_H 1
10876 EOF
10877
10878 if test -n "$cf_cv_header_path_utf8" ; then
10879   for cf_add_incdir in $cf_cv_header_path_utf8
10880   do
10881         while test $cf_add_incdir != /usr/include
10882         do
10883           if test -d $cf_add_incdir
10884           then
10885                 cf_have_incdir=no
10886                 if test -n "$CFLAGS$CPPFLAGS" ; then
10887                   # a loop is needed to ensure we can add subdirs of existing dirs
10888                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10889                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10890                           cf_have_incdir=yes; break
10891                         fi
10892                   done
10893                 fi
10894
10895                 if test "$cf_have_incdir" = no ; then
10896                   if test "$cf_add_incdir" = /usr/local/include ; then
10897                         if test "$GCC" = yes
10898                         then
10899                           cf_save_CPPFLAGS=$CPPFLAGS
10900
10901         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10902         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10903
10904                           cat >conftest.$ac_ext <<_ACEOF
10905 #line 10905 "configure"
10906 #include "confdefs.h"
10907 #include <stdio.h>
10908 int
10909 main (void)
10910 {
10911 printf("Hello")
10912   ;
10913   return 0;
10914 }
10915 _ACEOF
10916 rm -f conftest.$ac_objext
10917 if { (eval echo "$as_me:10917: \"$ac_compile\"") >&5
10918   (eval $ac_compile) 2>&5
10919   ac_status=$?
10920   echo "$as_me:10920: \$? = $ac_status" >&5
10921   (exit $ac_status); } &&
10922          { ac_try='test -s conftest.$ac_objext'
10923   { (eval echo "$as_me:10923: \"$ac_try\"") >&5
10924   (eval $ac_try) 2>&5
10925   ac_status=$?
10926   echo "$as_me:10926: \$? = $ac_status" >&5
10927   (exit $ac_status); }; }; then
10928   :
10929 else
10930   echo "$as_me: failed program was:" >&5
10931 cat conftest.$ac_ext >&5
10932 cf_have_incdir=yes
10933 fi
10934 rm -f conftest.$ac_objext conftest.$ac_ext
10935                           CPPFLAGS=$cf_save_CPPFLAGS
10936                         fi
10937                   fi
10938                 fi
10939
10940                 if test "$cf_have_incdir" = no ; then
10941                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10942
10943 echo "${as_me:-configure}:10943: testing adding $cf_add_incdir to include-path ..." 1>&5
10944
10945                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10946
10947                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10948                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10949                   cf_add_incdir="$cf_top_incdir"
10950                 else
10951                   break
10952                 fi
10953           else
10954                 break
10955           fi
10956         done
10957   done
10958 fi
10959
10960 if test -n "$cf_cv_library_path_utf8" ; then
10961         for cf_add_libdir in $cf_cv_library_path_utf8
10962         do
10963                 if test $cf_add_libdir = /usr/lib ; then
10964                         :
10965                 elif test -d $cf_add_libdir
10966                 then
10967                         cf_have_libdir=no
10968                         if test -n "$LDFLAGS$LIBS" ; then
10969                                 # a loop is needed to ensure we can add subdirs of existing dirs
10970                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10971                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10972                                                 cf_have_libdir=yes; break
10973                                         fi
10974                                 done
10975                         fi
10976                         if test "$cf_have_libdir" = no ; then
10977                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10978
10979 echo "${as_me:-configure}:10979: testing adding $cf_add_libdir to library-path ..." 1>&5
10980
10981                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10982                         fi
10983                 fi
10984         done
10985 fi
10986
10987 cf_add_libs="$cf_cv_library_file_utf8"
10988 # Filter out duplicates - this happens with badly-designed ".pc" files...
10989 for cf_add_1lib in $LIBS
10990 do
10991         for cf_add_2lib in $cf_add_libs
10992         do
10993                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10994                 then
10995                         cf_add_1lib=
10996                         break
10997                 fi
10998         done
10999         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11000 done
11001 LIBS="$cf_add_libs"
11002
11003 fi
11004
11005                 if test "$cf_cv_utf8_lib" != no ; then
11006                         NCURSES_LIBUTF8=1
11007                 fi
11008         fi
11009
11010 # This is needed on Tru64 5.0 to declare mbstate_t
11011 echo "$as_me:11011: checking if we must include wchar.h to declare mbstate_t" >&5
11012 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11013 if test "${cf_cv_mbstate_t+set}" = set; then
11014   echo $ECHO_N "(cached) $ECHO_C" >&6
11015 else
11016
11017 cat >conftest.$ac_ext <<_ACEOF
11018 #line 11018 "configure"
11019 #include "confdefs.h"
11020
11021 #include <stdlib.h>
11022 #include <stdarg.h>
11023 #include <stdio.h>
11024 #ifdef HAVE_LIBUTF8_H
11025 #include <libutf8.h>
11026 #endif
11027 int
11028 main (void)
11029 {
11030 mbstate_t state
11031   ;
11032   return 0;
11033 }
11034 _ACEOF
11035 rm -f conftest.$ac_objext
11036 if { (eval echo "$as_me:11036: \"$ac_compile\"") >&5
11037   (eval $ac_compile) 2>&5
11038   ac_status=$?
11039   echo "$as_me:11039: \$? = $ac_status" >&5
11040   (exit $ac_status); } &&
11041          { ac_try='test -s conftest.$ac_objext'
11042   { (eval echo "$as_me:11042: \"$ac_try\"") >&5
11043   (eval $ac_try) 2>&5
11044   ac_status=$?
11045   echo "$as_me:11045: \$? = $ac_status" >&5
11046   (exit $ac_status); }; }; then
11047   cf_cv_mbstate_t=no
11048 else
11049   echo "$as_me: failed program was:" >&5
11050 cat conftest.$ac_ext >&5
11051 cat >conftest.$ac_ext <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11054
11055 #include <stdlib.h>
11056 #include <stdarg.h>
11057 #include <stdio.h>
11058 #include <wchar.h>
11059 #ifdef HAVE_LIBUTF8_H
11060 #include <libutf8.h>
11061 #endif
11062 int
11063 main (void)
11064 {
11065 mbstate_t value
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 rm -f conftest.$ac_objext
11071 if { (eval echo "$as_me:11071: \"$ac_compile\"") >&5
11072   (eval $ac_compile) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit $ac_status); } &&
11076          { ac_try='test -s conftest.$ac_objext'
11077   { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078   (eval $ac_try) 2>&5
11079   ac_status=$?
11080   echo "$as_me:11080: \$? = $ac_status" >&5
11081   (exit $ac_status); }; }; then
11082   cf_cv_mbstate_t=yes
11083 else
11084   echo "$as_me: failed program was:" >&5
11085 cat conftest.$ac_ext >&5
11086 cf_cv_mbstate_t=unknown
11087 fi
11088 rm -f conftest.$ac_objext conftest.$ac_ext
11089 fi
11090 rm -f conftest.$ac_objext conftest.$ac_ext
11091 fi
11092 echo "$as_me:11092: result: $cf_cv_mbstate_t" >&5
11093 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11094
11095 if test "$cf_cv_mbstate_t" = yes ; then
11096
11097 cat >>confdefs.h <<\EOF
11098 #define NEED_WCHAR_H 1
11099 EOF
11100
11101         NEED_WCHAR_H=1
11102 fi
11103
11104 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11105 if test "$cf_cv_mbstate_t" = unknown ; then
11106         NCURSES_MBSTATE_T=1
11107 fi
11108
11109 # This is needed on Tru64 5.0 to declare wchar_t
11110 echo "$as_me:11110: checking if we must include wchar.h to declare wchar_t" >&5
11111 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11112 if test "${cf_cv_wchar_t+set}" = set; then
11113   echo $ECHO_N "(cached) $ECHO_C" >&6
11114 else
11115
11116 cat >conftest.$ac_ext <<_ACEOF
11117 #line 11117 "configure"
11118 #include "confdefs.h"
11119
11120 #include <stdlib.h>
11121 #include <stdarg.h>
11122 #include <stdio.h>
11123 #ifdef HAVE_LIBUTF8_H
11124 #include <libutf8.h>
11125 #endif
11126 int
11127 main (void)
11128 {
11129 wchar_t state
11130   ;
11131   return 0;
11132 }
11133 _ACEOF
11134 rm -f conftest.$ac_objext
11135 if { (eval echo "$as_me:11135: \"$ac_compile\"") >&5
11136   (eval $ac_compile) 2>&5
11137   ac_status=$?
11138   echo "$as_me:11138: \$? = $ac_status" >&5
11139   (exit $ac_status); } &&
11140          { ac_try='test -s conftest.$ac_objext'
11141   { (eval echo "$as_me:11141: \"$ac_try\"") >&5
11142   (eval $ac_try) 2>&5
11143   ac_status=$?
11144   echo "$as_me:11144: \$? = $ac_status" >&5
11145   (exit $ac_status); }; }; then
11146   cf_cv_wchar_t=no
11147 else
11148   echo "$as_me: failed program was:" >&5
11149 cat conftest.$ac_ext >&5
11150 cat >conftest.$ac_ext <<_ACEOF
11151 #line 11151 "configure"
11152 #include "confdefs.h"
11153
11154 #include <stdlib.h>
11155 #include <stdarg.h>
11156 #include <stdio.h>
11157 #include <wchar.h>
11158 #ifdef HAVE_LIBUTF8_H
11159 #include <libutf8.h>
11160 #endif
11161 int
11162 main (void)
11163 {
11164 wchar_t value
11165   ;
11166   return 0;
11167 }
11168 _ACEOF
11169 rm -f conftest.$ac_objext
11170 if { (eval echo "$as_me:11170: \"$ac_compile\"") >&5
11171   (eval $ac_compile) 2>&5
11172   ac_status=$?
11173   echo "$as_me:11173: \$? = $ac_status" >&5
11174   (exit $ac_status); } &&
11175          { ac_try='test -s conftest.$ac_objext'
11176   { (eval echo "$as_me:11176: \"$ac_try\"") >&5
11177   (eval $ac_try) 2>&5
11178   ac_status=$?
11179   echo "$as_me:11179: \$? = $ac_status" >&5
11180   (exit $ac_status); }; }; then
11181   cf_cv_wchar_t=yes
11182 else
11183   echo "$as_me: failed program was:" >&5
11184 cat conftest.$ac_ext >&5
11185 cf_cv_wchar_t=unknown
11186 fi
11187 rm -f conftest.$ac_objext conftest.$ac_ext
11188 fi
11189 rm -f conftest.$ac_objext conftest.$ac_ext
11190 fi
11191 echo "$as_me:11191: result: $cf_cv_wchar_t" >&5
11192 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11193
11194 if test "$cf_cv_wchar_t" = yes ; then
11195
11196 cat >>confdefs.h <<\EOF
11197 #define NEED_WCHAR_H 1
11198 EOF
11199
11200         NEED_WCHAR_H=1
11201 fi
11202
11203 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11204 if test "$cf_cv_wchar_t" = unknown ; then
11205         NCURSES_WCHAR_T=1
11206 fi
11207
11208 # if we find wchar_t in either place, use substitution to provide a fallback.
11209 if test "$cf_cv_wchar_t" != unknown ; then
11210         NCURSES_OK_WCHAR_T=1
11211 fi
11212
11213 # This is needed on Tru64 5.0 to declare wint_t
11214 echo "$as_me:11214: checking if we must include wchar.h to declare wint_t" >&5
11215 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11216 if test "${cf_cv_wint_t+set}" = set; then
11217   echo $ECHO_N "(cached) $ECHO_C" >&6
11218 else
11219
11220 cat >conftest.$ac_ext <<_ACEOF
11221 #line 11221 "configure"
11222 #include "confdefs.h"
11223
11224 #include <stdlib.h>
11225 #include <stdarg.h>
11226 #include <stdio.h>
11227 #ifdef HAVE_LIBUTF8_H
11228 #include <libutf8.h>
11229 #endif
11230 int
11231 main (void)
11232 {
11233 wint_t state
11234   ;
11235   return 0;
11236 }
11237 _ACEOF
11238 rm -f conftest.$ac_objext
11239 if { (eval echo "$as_me:11239: \"$ac_compile\"") >&5
11240   (eval $ac_compile) 2>&5
11241   ac_status=$?
11242   echo "$as_me:11242: \$? = $ac_status" >&5
11243   (exit $ac_status); } &&
11244          { ac_try='test -s conftest.$ac_objext'
11245   { (eval echo "$as_me:11245: \"$ac_try\"") >&5
11246   (eval $ac_try) 2>&5
11247   ac_status=$?
11248   echo "$as_me:11248: \$? = $ac_status" >&5
11249   (exit $ac_status); }; }; then
11250   cf_cv_wint_t=no
11251 else
11252   echo "$as_me: failed program was:" >&5
11253 cat conftest.$ac_ext >&5
11254 cat >conftest.$ac_ext <<_ACEOF
11255 #line 11255 "configure"
11256 #include "confdefs.h"
11257
11258 #include <stdlib.h>
11259 #include <stdarg.h>
11260 #include <stdio.h>
11261 #include <wchar.h>
11262 #ifdef HAVE_LIBUTF8_H
11263 #include <libutf8.h>
11264 #endif
11265 int
11266 main (void)
11267 {
11268 wint_t value
11269   ;
11270   return 0;
11271 }
11272 _ACEOF
11273 rm -f conftest.$ac_objext
11274 if { (eval echo "$as_me:11274: \"$ac_compile\"") >&5
11275   (eval $ac_compile) 2>&5
11276   ac_status=$?
11277   echo "$as_me:11277: \$? = $ac_status" >&5
11278   (exit $ac_status); } &&
11279          { ac_try='test -s conftest.$ac_objext'
11280   { (eval echo "$as_me:11280: \"$ac_try\"") >&5
11281   (eval $ac_try) 2>&5
11282   ac_status=$?
11283   echo "$as_me:11283: \$? = $ac_status" >&5
11284   (exit $ac_status); }; }; then
11285   cf_cv_wint_t=yes
11286 else
11287   echo "$as_me: failed program was:" >&5
11288 cat conftest.$ac_ext >&5
11289 cf_cv_wint_t=unknown
11290 fi
11291 rm -f conftest.$ac_objext conftest.$ac_ext
11292 fi
11293 rm -f conftest.$ac_objext conftest.$ac_ext
11294 fi
11295 echo "$as_me:11295: result: $cf_cv_wint_t" >&5
11296 echo "${ECHO_T}$cf_cv_wint_t" >&6
11297
11298 if test "$cf_cv_wint_t" = yes ; then
11299
11300 cat >>confdefs.h <<\EOF
11301 #define NEED_WCHAR_H 1
11302 EOF
11303
11304         NEED_WCHAR_H=1
11305 fi
11306
11307 # if we do not find wint_t in either place, use substitution to provide a fallback.
11308 if test "$cf_cv_wint_t" = unknown ; then
11309         NCURSES_WINT_T=1
11310 fi
11311
11312 # if we find wint_t in either place, use substitution to provide a fallback.
11313 if test "$cf_cv_wint_t" != unknown ; then
11314         NCURSES_OK_WINT_T=1
11315 fi
11316
11317         if test "$NCURSES_MBSTATE_T" != 0; then
11318
11319 cat >>confdefs.h <<\EOF
11320 #define NEED_MBSTATE_T_DEF 1
11321 EOF
11322
11323         fi
11324 fi
11325
11326 ###   use option --disable-lp64 to allow long chtype
11327 echo "$as_me:11327: checking whether to enable _LP64 definition in curses.h" >&5
11328 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11329
11330 # Check whether --enable-lp64 or --disable-lp64 was given.
11331 if test "${enable_lp64+set}" = set; then
11332   enableval="$enable_lp64"
11333   with_lp64=$enableval
11334 else
11335   with_lp64=$cf_dft_with_lp64
11336 fi;
11337 echo "$as_me:11337: result: $with_lp64" >&5
11338 echo "${ECHO_T}$with_lp64" >&6
11339
11340 if test "x$with_lp64" = xyes ; then
11341         cf_cv_enable_lp64=1
11342 else
11343         cf_cv_enable_lp64=0
11344 fi
11345
11346 # Check whether --enable-largefile or --disable-largefile was given.
11347 if test "${enable_largefile+set}" = set; then
11348   enableval="$enable_largefile"
11349
11350 fi;
11351 if test "$enable_largefile" != no; then
11352
11353   echo "$as_me:11353: checking for special C compiler options needed for large files" >&5
11354 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11355 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11356   echo $ECHO_N "(cached) $ECHO_C" >&6
11357 else
11358   ac_cv_sys_largefile_CC=no
11359      if test "$GCC" != yes; then
11360        ac_save_CC=$CC
11361        while :; do
11362          # IRIX 6.2 and later do not support large files by default,
11363          # so use the C compiler's -n32 option if that helps.
11364          cat >conftest.$ac_ext <<_ACEOF
11365 #line 11365 "configure"
11366 #include "confdefs.h"
11367 #include <sys/types.h>
11368  /* Check that off_t can represent 2**63 - 1 correctly.
11369     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11370     since some C++ compilers masquerading as C compilers
11371     incorrectly reject 9223372036854775807.  */
11372 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11373   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11374                        && LARGE_OFF_T % 2147483647 == 1)
11375                       ? 1 : -1];
11376 int
11377 main (void)
11378 {
11379
11380   ;
11381   return 0;
11382 }
11383 _ACEOF
11384          rm -f conftest.$ac_objext
11385 if { (eval echo "$as_me:11385: \"$ac_compile\"") >&5
11386   (eval $ac_compile) 2>&5
11387   ac_status=$?
11388   echo "$as_me:11388: \$? = $ac_status" >&5
11389   (exit $ac_status); } &&
11390          { ac_try='test -s conftest.$ac_objext'
11391   { (eval echo "$as_me:11391: \"$ac_try\"") >&5
11392   (eval $ac_try) 2>&5
11393   ac_status=$?
11394   echo "$as_me:11394: \$? = $ac_status" >&5
11395   (exit $ac_status); }; }; then
11396   break
11397 else
11398   echo "$as_me: failed program was:" >&5
11399 cat conftest.$ac_ext >&5
11400 fi
11401 rm -f conftest.$ac_objext
11402          CC="$CC -n32"
11403          rm -f conftest.$ac_objext
11404 if { (eval echo "$as_me:11404: \"$ac_compile\"") >&5
11405   (eval $ac_compile) 2>&5
11406   ac_status=$?
11407   echo "$as_me:11407: \$? = $ac_status" >&5
11408   (exit $ac_status); } &&
11409          { ac_try='test -s conftest.$ac_objext'
11410   { (eval echo "$as_me:11410: \"$ac_try\"") >&5
11411   (eval $ac_try) 2>&5
11412   ac_status=$?
11413   echo "$as_me:11413: \$? = $ac_status" >&5
11414   (exit $ac_status); }; }; then
11415   ac_cv_sys_largefile_CC=' -n32'; break
11416 else
11417   echo "$as_me: failed program was:" >&5
11418 cat conftest.$ac_ext >&5
11419 fi
11420 rm -f conftest.$ac_objext
11421          break
11422        done
11423        CC=$ac_save_CC
11424        rm -f conftest.$ac_ext
11425     fi
11426 fi
11427 echo "$as_me:11427: result: $ac_cv_sys_largefile_CC" >&5
11428 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11429   if test "$ac_cv_sys_largefile_CC" != no; then
11430     CC=$CC$ac_cv_sys_largefile_CC
11431   fi
11432
11433   echo "$as_me:11433: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11434 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11435 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11436   echo $ECHO_N "(cached) $ECHO_C" >&6
11437 else
11438   while :; do
11439   ac_cv_sys_file_offset_bits=no
11440   cat >conftest.$ac_ext <<_ACEOF
11441 #line 11441 "configure"
11442 #include "confdefs.h"
11443 #include <sys/types.h>
11444  /* Check that off_t can represent 2**63 - 1 correctly.
11445     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11446     since some C++ compilers masquerading as C compilers
11447     incorrectly reject 9223372036854775807.  */
11448 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11449   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11450                        && LARGE_OFF_T % 2147483647 == 1)
11451                       ? 1 : -1];
11452 int
11453 main (void)
11454 {
11455
11456   ;
11457   return 0;
11458 }
11459 _ACEOF
11460 rm -f conftest.$ac_objext
11461 if { (eval echo "$as_me:11461: \"$ac_compile\"") >&5
11462   (eval $ac_compile) 2>&5
11463   ac_status=$?
11464   echo "$as_me:11464: \$? = $ac_status" >&5
11465   (exit $ac_status); } &&
11466          { ac_try='test -s conftest.$ac_objext'
11467   { (eval echo "$as_me:11467: \"$ac_try\"") >&5
11468   (eval $ac_try) 2>&5
11469   ac_status=$?
11470   echo "$as_me:11470: \$? = $ac_status" >&5
11471   (exit $ac_status); }; }; then
11472   break
11473 else
11474   echo "$as_me: failed program was:" >&5
11475 cat conftest.$ac_ext >&5
11476 fi
11477 rm -f conftest.$ac_objext conftest.$ac_ext
11478   cat >conftest.$ac_ext <<_ACEOF
11479 #line 11479 "configure"
11480 #include "confdefs.h"
11481 #define _FILE_OFFSET_BITS 64
11482 #include <sys/types.h>
11483  /* Check that off_t can represent 2**63 - 1 correctly.
11484     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11485     since some C++ compilers masquerading as C compilers
11486     incorrectly reject 9223372036854775807.  */
11487 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11488   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11489                        && LARGE_OFF_T % 2147483647 == 1)
11490                       ? 1 : -1];
11491 int
11492 main (void)
11493 {
11494
11495   ;
11496   return 0;
11497 }
11498 _ACEOF
11499 rm -f conftest.$ac_objext
11500 if { (eval echo "$as_me:11500: \"$ac_compile\"") >&5
11501   (eval $ac_compile) 2>&5
11502   ac_status=$?
11503   echo "$as_me:11503: \$? = $ac_status" >&5
11504   (exit $ac_status); } &&
11505          { ac_try='test -s conftest.$ac_objext'
11506   { (eval echo "$as_me:11506: \"$ac_try\"") >&5
11507   (eval $ac_try) 2>&5
11508   ac_status=$?
11509   echo "$as_me:11509: \$? = $ac_status" >&5
11510   (exit $ac_status); }; }; then
11511   ac_cv_sys_file_offset_bits=64; break
11512 else
11513   echo "$as_me: failed program was:" >&5
11514 cat conftest.$ac_ext >&5
11515 fi
11516 rm -f conftest.$ac_objext conftest.$ac_ext
11517   break
11518 done
11519 fi
11520 echo "$as_me:11520: result: $ac_cv_sys_file_offset_bits" >&5
11521 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11522 if test "$ac_cv_sys_file_offset_bits" != no; then
11523
11524 cat >>confdefs.h <<EOF
11525 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11526 EOF
11527
11528 fi
11529 rm -rf conftest*
11530   echo "$as_me:11530: checking for _LARGE_FILES value needed for large files" >&5
11531 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11532 if test "${ac_cv_sys_large_files+set}" = set; then
11533   echo $ECHO_N "(cached) $ECHO_C" >&6
11534 else
11535   while :; do
11536   ac_cv_sys_large_files=no
11537   cat >conftest.$ac_ext <<_ACEOF
11538 #line 11538 "configure"
11539 #include "confdefs.h"
11540 #include <sys/types.h>
11541  /* Check that off_t can represent 2**63 - 1 correctly.
11542     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11543     since some C++ compilers masquerading as C compilers
11544     incorrectly reject 9223372036854775807.  */
11545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11546   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11547                        && LARGE_OFF_T % 2147483647 == 1)
11548                       ? 1 : -1];
11549 int
11550 main (void)
11551 {
11552
11553   ;
11554   return 0;
11555 }
11556 _ACEOF
11557 rm -f conftest.$ac_objext
11558 if { (eval echo "$as_me:11558: \"$ac_compile\"") >&5
11559   (eval $ac_compile) 2>&5
11560   ac_status=$?
11561   echo "$as_me:11561: \$? = $ac_status" >&5
11562   (exit $ac_status); } &&
11563          { ac_try='test -s conftest.$ac_objext'
11564   { (eval echo "$as_me:11564: \"$ac_try\"") >&5
11565   (eval $ac_try) 2>&5
11566   ac_status=$?
11567   echo "$as_me:11567: \$? = $ac_status" >&5
11568   (exit $ac_status); }; }; then
11569   break
11570 else
11571   echo "$as_me: failed program was:" >&5
11572 cat conftest.$ac_ext >&5
11573 fi
11574 rm -f conftest.$ac_objext conftest.$ac_ext
11575   cat >conftest.$ac_ext <<_ACEOF
11576 #line 11576 "configure"
11577 #include "confdefs.h"
11578 #define _LARGE_FILES 1
11579 #include <sys/types.h>
11580  /* Check that off_t can represent 2**63 - 1 correctly.
11581     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11582     since some C++ compilers masquerading as C compilers
11583     incorrectly reject 9223372036854775807.  */
11584 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11585   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11586                        && LARGE_OFF_T % 2147483647 == 1)
11587                       ? 1 : -1];
11588 int
11589 main (void)
11590 {
11591
11592   ;
11593   return 0;
11594 }
11595 _ACEOF
11596 rm -f conftest.$ac_objext
11597 if { (eval echo "$as_me:11597: \"$ac_compile\"") >&5
11598   (eval $ac_compile) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit $ac_status); } &&
11602          { ac_try='test -s conftest.$ac_objext'
11603   { (eval echo "$as_me:11603: \"$ac_try\"") >&5
11604   (eval $ac_try) 2>&5
11605   ac_status=$?
11606   echo "$as_me:11606: \$? = $ac_status" >&5
11607   (exit $ac_status); }; }; then
11608   ac_cv_sys_large_files=1; break
11609 else
11610   echo "$as_me: failed program was:" >&5
11611 cat conftest.$ac_ext >&5
11612 fi
11613 rm -f conftest.$ac_objext conftest.$ac_ext
11614   break
11615 done
11616 fi
11617 echo "$as_me:11617: result: $ac_cv_sys_large_files" >&5
11618 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11619 if test "$ac_cv_sys_large_files" != no; then
11620
11621 cat >>confdefs.h <<EOF
11622 #define _LARGE_FILES $ac_cv_sys_large_files
11623 EOF
11624
11625 fi
11626 rm -rf conftest*
11627 fi
11628
11629         if test "$enable_largefile" != no ; then
11630         echo "$as_me:11630: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11631 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11632 if test "${ac_cv_sys_largefile_source+set}" = set; then
11633   echo $ECHO_N "(cached) $ECHO_C" >&6
11634 else
11635   while :; do
11636   ac_cv_sys_largefile_source=no
11637   cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640 #include <stdio.h>
11641 int
11642 main (void)
11643 {
11644 return !fseeko;
11645   ;
11646   return 0;
11647 }
11648 _ACEOF
11649 rm -f conftest.$ac_objext
11650 if { (eval echo "$as_me:11650: \"$ac_compile\"") >&5
11651   (eval $ac_compile) 2>&5
11652   ac_status=$?
11653   echo "$as_me:11653: \$? = $ac_status" >&5
11654   (exit $ac_status); } &&
11655          { ac_try='test -s conftest.$ac_objext'
11656   { (eval echo "$as_me:11656: \"$ac_try\"") >&5
11657   (eval $ac_try) 2>&5
11658   ac_status=$?
11659   echo "$as_me:11659: \$? = $ac_status" >&5
11660   (exit $ac_status); }; }; then
11661   break
11662 else
11663   echo "$as_me: failed program was:" >&5
11664 cat conftest.$ac_ext >&5
11665 fi
11666 rm -f conftest.$ac_objext conftest.$ac_ext
11667   cat >conftest.$ac_ext <<_ACEOF
11668 #line 11668 "configure"
11669 #include "confdefs.h"
11670 #define _LARGEFILE_SOURCE 1
11671 #include <stdio.h>
11672 int
11673 main (void)
11674 {
11675 return !fseeko;
11676   ;
11677   return 0;
11678 }
11679 _ACEOF
11680 rm -f conftest.$ac_objext
11681 if { (eval echo "$as_me:11681: \"$ac_compile\"") >&5
11682   (eval $ac_compile) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit $ac_status); } &&
11686          { ac_try='test -s conftest.$ac_objext'
11687   { (eval echo "$as_me:11687: \"$ac_try\"") >&5
11688   (eval $ac_try) 2>&5
11689   ac_status=$?
11690   echo "$as_me:11690: \$? = $ac_status" >&5
11691   (exit $ac_status); }; }; then
11692   ac_cv_sys_largefile_source=1; break
11693 else
11694   echo "$as_me: failed program was:" >&5
11695 cat conftest.$ac_ext >&5
11696 fi
11697 rm -f conftest.$ac_objext conftest.$ac_ext
11698   break
11699 done
11700 fi
11701 echo "$as_me:11701: result: $ac_cv_sys_largefile_source" >&5
11702 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11703 if test "$ac_cv_sys_largefile_source" != no; then
11704
11705 cat >>confdefs.h <<EOF
11706 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11707 EOF
11708
11709 fi
11710 rm -rf conftest*
11711
11712 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11713 # in glibc 2.1.3, but that breaks too many other things.
11714 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11715 echo "$as_me:11715: checking for fseeko" >&5
11716 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11717 if test "${ac_cv_func_fseeko+set}" = set; then
11718   echo $ECHO_N "(cached) $ECHO_C" >&6
11719 else
11720   cat >conftest.$ac_ext <<_ACEOF
11721 #line 11721 "configure"
11722 #include "confdefs.h"
11723 #include <stdio.h>
11724 int
11725 main (void)
11726 {
11727 return fseeko && fseeko (stdin, 0, 0);
11728   ;
11729   return 0;
11730 }
11731 _ACEOF
11732 rm -f conftest.$ac_objext conftest$ac_exeext
11733 if { (eval echo "$as_me:11733: \"$ac_link\"") >&5
11734   (eval $ac_link) 2>&5
11735   ac_status=$?
11736   echo "$as_me:11736: \$? = $ac_status" >&5
11737   (exit $ac_status); } &&
11738          { ac_try='test -s conftest$ac_exeext'
11739   { (eval echo "$as_me:11739: \"$ac_try\"") >&5
11740   (eval $ac_try) 2>&5
11741   ac_status=$?
11742   echo "$as_me:11742: \$? = $ac_status" >&5
11743   (exit $ac_status); }; }; then
11744   ac_cv_func_fseeko=yes
11745 else
11746   echo "$as_me: failed program was:" >&5
11747 cat conftest.$ac_ext >&5
11748 ac_cv_func_fseeko=no
11749 fi
11750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11751 fi
11752 echo "$as_me:11752: result: $ac_cv_func_fseeko" >&5
11753 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11754 if test $ac_cv_func_fseeko = yes; then
11755
11756 cat >>confdefs.h <<\EOF
11757 #define HAVE_FSEEKO 1
11758 EOF
11759
11760 fi
11761
11762         # Normally we would collect these definitions in the config.h,
11763         # but (like _XOPEN_SOURCE), some environments rely on having these
11764         # defined before any of the system headers are included.  Another
11765         # case comes up with C++, e.g., on AIX the compiler compiles the
11766         # header files by themselves before looking at the body files it is
11767         # told to compile.  For ncurses, those header files do not include
11768         # the config.h
11769         if test "$ac_cv_sys_large_files" != no
11770         then
11771
11772         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11773         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
11774
11775         fi
11776         if test "$ac_cv_sys_largefile_source" != no
11777         then
11778
11779         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11780         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
11781
11782         fi
11783         if test "$ac_cv_sys_file_offset_bits" != no
11784         then
11785
11786         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11787         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
11788
11789         fi
11790
11791         echo "$as_me:11791: checking whether to use struct dirent64" >&5
11792 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11793 if test "${cf_cv_struct_dirent64+set}" = set; then
11794   echo $ECHO_N "(cached) $ECHO_C" >&6
11795 else
11796
11797                 cat >conftest.$ac_ext <<_ACEOF
11798 #line 11798 "configure"
11799 #include "confdefs.h"
11800
11801 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11802 #include <sys/types.h>
11803 #include <dirent.h>
11804
11805 int
11806 main (void)
11807 {
11808
11809                 /* if transitional largefile support is setup, this is true */
11810                 extern struct dirent64 * readdir(DIR *);
11811                 struct dirent64 *x = readdir((DIR *)0);
11812                 struct dirent *y = readdir((DIR *)0);
11813                 int z = x - y;
11814
11815   ;
11816   return 0;
11817 }
11818 _ACEOF
11819 rm -f conftest.$ac_objext
11820 if { (eval echo "$as_me:11820: \"$ac_compile\"") >&5
11821   (eval $ac_compile) 2>&5
11822   ac_status=$?
11823   echo "$as_me:11823: \$? = $ac_status" >&5
11824   (exit $ac_status); } &&
11825          { ac_try='test -s conftest.$ac_objext'
11826   { (eval echo "$as_me:11826: \"$ac_try\"") >&5
11827   (eval $ac_try) 2>&5
11828   ac_status=$?
11829   echo "$as_me:11829: \$? = $ac_status" >&5
11830   (exit $ac_status); }; }; then
11831   cf_cv_struct_dirent64=yes
11832 else
11833   echo "$as_me: failed program was:" >&5
11834 cat conftest.$ac_ext >&5
11835 cf_cv_struct_dirent64=no
11836 fi
11837 rm -f conftest.$ac_objext conftest.$ac_ext
11838
11839 fi
11840 echo "$as_me:11840: result: $cf_cv_struct_dirent64" >&5
11841 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11842         test "$cf_cv_struct_dirent64" = yes &&
11843 cat >>confdefs.h <<\EOF
11844 #define HAVE_STRUCT_DIRENT64 1
11845 EOF
11846
11847         fi
11848
11849 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11850 echo "$as_me:11850: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11851 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11852
11853 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11854 if test "${enable_tparm_varargs+set}" = set; then
11855   enableval="$enable_tparm_varargs"
11856   with_tparm_varargs=$enableval
11857 else
11858   with_tparm_varargs=yes
11859 fi;
11860 echo "$as_me:11860: result: $with_tparm_varargs" >&5
11861 echo "${ECHO_T}$with_tparm_varargs" >&6
11862 NCURSES_TPARM_VARARGS=0
11863 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11864
11865 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11866 if test "$with_ticlib" != no ; then
11867 echo "$as_me:11867: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11868 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11869
11870 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11871 if test "${enable_tic_depends+set}" = set; then
11872   enableval="$enable_tic_depends"
11873   with_tic_depends=$enableval
11874 else
11875   with_tic_depends=yes
11876 fi;
11877 echo "$as_me:11877: result: $with_tic_depends" >&5
11878 echo "${ECHO_T}$with_tic_depends" >&6
11879 else
11880         with_tic_depends=no
11881 fi
11882
11883 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11884 echo "$as_me:11884: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11885 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11886
11887 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11888 if test "${enable_wattr_macros+set}" = set; then
11889   enableval="$enable_wattr_macros"
11890   with_wattr_macros=$enableval
11891 else
11892   with_wattr_macros=yes
11893 fi;
11894 if [ "x$with_wattr_macros" != xyes ]; then
11895         NCURSES_WATTR_MACROS=0
11896         echo "$as_me:11896: result: yes" >&5
11897 echo "${ECHO_T}yes" >&6
11898 else
11899         NCURSES_WATTR_MACROS=1
11900         echo "$as_me:11900: result: no" >&5
11901 echo "${ECHO_T}no" >&6
11902 fi
11903
11904 echo "$as_me:11904: checking for X11 rgb file" >&5
11905 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
11906
11907 # Check whether --with-x11-rgb or --without-x11-rgb was given.
11908 if test "${with_x11_rgb+set}" = set; then
11909   withval="$with_x11_rgb"
11910   RGB_PATH=$withval
11911 else
11912   RGB_PATH=auto
11913 fi;
11914
11915 if test "x$RGB_PATH" = xauto
11916 then
11917         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
11918         for cf_path in \
11919                 /opt/local/share/X11/rgb.txt \
11920                 /opt/X11/share/X11/rgb.txt \
11921                 /usr/share/X11/rgb.txt \
11922                 /usr/X11/share/X11/rgb.txt \
11923                 /usr/X11/lib/X11/rgb.txt \
11924                 /usr/lib/X11/rgb.txt \
11925                 /etc/X11/rgb.txt \
11926                 /usr/pkg/lib/X11/rgb.txt \
11927                 /usr/X11R7/lib/X11/rgb.txt \
11928                 /usr/X11R6/lib/X11/rgb.txt \
11929                 /usr/X11R5/lib/X11/rgb.txt \
11930                 /usr/X11R4/lib/X11/rgb.txt \
11931                 /usr/local/lib/X11/rgb.txt \
11932                 /usr/local/share/X11/rgb.txt \
11933                 /usr/lib64/X11/rgb.txt
11934         do
11935                 if test -f "$cf_path" ; then
11936                         RGB_PATH="$cf_path"
11937                         break
11938                 fi
11939         done
11940 else
11941         cf_path=$RGB_PATH
11942
11943 if test "x$prefix" != xNONE; then
11944         cf_path_syntax="$prefix"
11945 else
11946         cf_path_syntax="$ac_default_prefix"
11947 fi
11948
11949 case ".$cf_path" in
11950 (.\$\(*\)*|.\'*\'*)
11951         ;;
11952 (..|./*|.\\*)
11953         ;;
11954 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11955         ;;
11956 (.\${*prefix}*|.\${*dir}*)
11957         eval cf_path="$cf_path"
11958         case ".$cf_path" in
11959         (.NONE/*)
11960                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11961                 ;;
11962         esac
11963         ;;
11964 (.no|.NONE/*)
11965         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11966         ;;
11967 (*)
11968         { { echo "$as_me:11968: error: expected a pathname, not \"$cf_path\"" >&5
11969 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
11970    { (exit 1); exit 1; }; }
11971         ;;
11972 esac
11973
11974 fi
11975
11976 echo "$as_me:11976: result: $RGB_PATH" >&5
11977 echo "${ECHO_T}$RGB_PATH" >&6
11978
11979 cat >>confdefs.h <<EOF
11980 #define RGB_PATH "$cf_path"
11981 EOF
11982
11983 no_x11_rgb=
11984 if test "$RGB_PATH" = no
11985 then
11986         no_x11_rgb="#"
11987 fi
11988
11989 ###   use option --with-bool to override bool's type
11990 echo "$as_me:11990: checking for type of bool" >&5
11991 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11992
11993 # Check whether --with-bool or --without-bool was given.
11994 if test "${with_bool+set}" = set; then
11995   withval="$with_bool"
11996   NCURSES_BOOL="$withval"
11997 else
11998   NCURSES_BOOL=auto
11999 fi;
12000 echo "$as_me:12000: result: $NCURSES_BOOL" >&5
12001 echo "${ECHO_T}$NCURSES_BOOL" >&6
12002
12003 echo "$as_me:12003: checking for alternate terminal capabilities file" >&5
12004 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12005
12006 # Check whether --with-caps or --without-caps was given.
12007 if test "${with_caps+set}" = set; then
12008   withval="$with_caps"
12009   TERMINFO_CAPS=Caps.$withval
12010 else
12011   TERMINFO_CAPS=Caps
12012 fi;
12013 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12014 echo "$as_me:12014: result: $TERMINFO_CAPS" >&5
12015 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12016
12017 ###   use option --with-chtype to override chtype's type
12018 echo "$as_me:12018: checking for type of chtype" >&5
12019 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12020
12021 # Check whether --with-chtype or --without-chtype was given.
12022 if test "${with_chtype+set}" = set; then
12023   withval="$with_chtype"
12024   NCURSES_CHTYPE="$withval"
12025 else
12026   NCURSES_CHTYPE=$cf_dft_chtype
12027 fi;
12028 echo "$as_me:12028: result: $NCURSES_CHTYPE" >&5
12029 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12030
12031 ###   use option --with-ospeed to override ospeed's type
12032 echo "$as_me:12032: checking for type of ospeed" >&5
12033 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12034
12035 # Check whether --with-ospeed or --without-ospeed was given.
12036 if test "${with_ospeed+set}" = set; then
12037   withval="$with_ospeed"
12038   NCURSES_OSPEED="$withval"
12039 else
12040   NCURSES_OSPEED=short
12041 fi;
12042 echo "$as_me:12042: result: $NCURSES_OSPEED" >&5
12043 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12044
12045 ###   use option --with-mmask-t to override mmask_t's type
12046 echo "$as_me:12046: checking for type of mmask_t" >&5
12047 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12048
12049 # Check whether --with-mmask-t or --without-mmask-t was given.
12050 if test "${with_mmask_t+set}" = set; then
12051   withval="$with_mmask_t"
12052   NCURSES_MMASK_T="$withval"
12053 else
12054   NCURSES_MMASK_T=$cf_dft_mmask_t
12055 fi;
12056 echo "$as_me:12056: result: $NCURSES_MMASK_T" >&5
12057 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12058
12059 ###   use option --with-ccharw-max to override CCHARW_MAX size
12060 echo "$as_me:12060: checking for size CCHARW_MAX" >&5
12061 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12062
12063 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12064 if test "${with_ccharw_max+set}" = set; then
12065   withval="$with_ccharw_max"
12066   NCURSES_CCHARW_MAX="$withval"
12067 else
12068   NCURSES_CCHARW_MAX=5
12069 fi;
12070 echo "$as_me:12070: result: $NCURSES_CCHARW_MAX" >&5
12071 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12072
12073 echo "$as_me:12073: checking for ANSI C header files" >&5
12074 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12075 if test "${ac_cv_header_stdc+set}" = set; then
12076   echo $ECHO_N "(cached) $ECHO_C" >&6
12077 else
12078   cat >conftest.$ac_ext <<_ACEOF
12079 #line 12079 "configure"
12080 #include "confdefs.h"
12081 #include <stdlib.h>
12082 #include <stdarg.h>
12083 #include <string.h>
12084 #include <float.h>
12085
12086 _ACEOF
12087 if { (eval echo "$as_me:12087: \"$ac_cpp conftest.$ac_ext\"") >&5
12088   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12089   ac_status=$?
12090   egrep -v '^ *\+' conftest.er1 >conftest.err
12091   rm -f conftest.er1
12092   cat conftest.err >&5
12093   echo "$as_me:12093: \$? = $ac_status" >&5
12094   (exit $ac_status); } >/dev/null; then
12095   if test -s conftest.err; then
12096     ac_cpp_err=$ac_c_preproc_warn_flag
12097   else
12098     ac_cpp_err=
12099   fi
12100 else
12101   ac_cpp_err=yes
12102 fi
12103 if test -z "$ac_cpp_err"; then
12104   ac_cv_header_stdc=yes
12105 else
12106   echo "$as_me: failed program was:" >&5
12107   cat conftest.$ac_ext >&5
12108   ac_cv_header_stdc=no
12109 fi
12110 rm -f conftest.err conftest.$ac_ext
12111
12112 if test $ac_cv_header_stdc = yes; then
12113   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12114   cat >conftest.$ac_ext <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12117 #include <string.h>
12118
12119 _ACEOF
12120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12121   egrep "memchr" >/dev/null 2>&1; then
12122   :
12123 else
12124   ac_cv_header_stdc=no
12125 fi
12126 rm -rf conftest*
12127
12128 fi
12129
12130 if test $ac_cv_header_stdc = yes; then
12131   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12132   cat >conftest.$ac_ext <<_ACEOF
12133 #line 12133 "configure"
12134 #include "confdefs.h"
12135 #include <stdlib.h>
12136
12137 _ACEOF
12138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12139   egrep "free" >/dev/null 2>&1; then
12140   :
12141 else
12142   ac_cv_header_stdc=no
12143 fi
12144 rm -rf conftest*
12145
12146 fi
12147
12148 if test $ac_cv_header_stdc = yes; then
12149   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12150   if test "$cross_compiling" = yes; then
12151   :
12152 else
12153   cat >conftest.$ac_ext <<_ACEOF
12154 #line 12154 "configure"
12155 #include "confdefs.h"
12156 #include <ctype.h>
12157 #if ((' ' & 0x0FF) == 0x020)
12158 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12159 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12160 #else
12161 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12162                      || ('j' <= (c) && (c) <= 'r') \
12163                      || ('s' <= (c) && (c) <= 'z'))
12164 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12165 #endif
12166
12167 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12168 int
12169 main (void)
12170 {
12171   int i;
12172   for (i = 0; i < 256; i++)
12173     if (XOR (islower (i), ISLOWER (i))
12174         || toupper (i) != TOUPPER (i))
12175       $ac_main_return(2);
12176   $ac_main_return (0);
12177 }
12178 _ACEOF
12179 rm -f conftest$ac_exeext
12180 if { (eval echo "$as_me:12180: \"$ac_link\"") >&5
12181   (eval $ac_link) 2>&5
12182   ac_status=$?
12183   echo "$as_me:12183: \$? = $ac_status" >&5
12184   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12185   { (eval echo "$as_me:12185: \"$ac_try\"") >&5
12186   (eval $ac_try) 2>&5
12187   ac_status=$?
12188   echo "$as_me:12188: \$? = $ac_status" >&5
12189   (exit $ac_status); }; }; then
12190   :
12191 else
12192   echo "$as_me: program exited with status $ac_status" >&5
12193 echo "$as_me: failed program was:" >&5
12194 cat conftest.$ac_ext >&5
12195 ac_cv_header_stdc=no
12196 fi
12197 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12198 fi
12199 fi
12200 fi
12201 echo "$as_me:12201: result: $ac_cv_header_stdc" >&5
12202 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12203 if test $ac_cv_header_stdc = yes; then
12204
12205 cat >>confdefs.h <<\EOF
12206 #define STDC_HEADERS 1
12207 EOF
12208
12209 fi
12210
12211 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12212
12213 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12214                   inttypes.h stdint.h unistd.h
12215 do
12216 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12217 echo "$as_me:12217: checking for $ac_header" >&5
12218 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12219 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12220   echo $ECHO_N "(cached) $ECHO_C" >&6
12221 else
12222   cat >conftest.$ac_ext <<_ACEOF
12223 #line 12223 "configure"
12224 #include "confdefs.h"
12225 $ac_includes_default
12226 #include <$ac_header>
12227 _ACEOF
12228 rm -f conftest.$ac_objext
12229 if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
12230   (eval $ac_compile) 2>&5
12231   ac_status=$?
12232   echo "$as_me:12232: \$? = $ac_status" >&5
12233   (exit $ac_status); } &&
12234          { ac_try='test -s conftest.$ac_objext'
12235   { (eval echo "$as_me:12235: \"$ac_try\"") >&5
12236   (eval $ac_try) 2>&5
12237   ac_status=$?
12238   echo "$as_me:12238: \$? = $ac_status" >&5
12239   (exit $ac_status); }; }; then
12240   eval "$as_ac_Header=yes"
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 cat conftest.$ac_ext >&5
12244 eval "$as_ac_Header=no"
12245 fi
12246 rm -f conftest.$ac_objext conftest.$ac_ext
12247 fi
12248 echo "$as_me:12248: result: `eval echo '${'$as_ac_Header'}'`" >&5
12249 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12250 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12251   cat >>confdefs.h <<EOF
12252 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12253 EOF
12254
12255 fi
12256 done
12257
12258 echo "$as_me:12258: checking for signed char" >&5
12259 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12260 if test "${ac_cv_type_signed_char+set}" = set; then
12261   echo $ECHO_N "(cached) $ECHO_C" >&6
12262 else
12263   cat >conftest.$ac_ext <<_ACEOF
12264 #line 12264 "configure"
12265 #include "confdefs.h"
12266 $ac_includes_default
12267 int
12268 main (void)
12269 {
12270 if ((signed char *) 0)
12271   return 0;
12272 if (sizeof (signed char))
12273   return 0;
12274   ;
12275   return 0;
12276 }
12277 _ACEOF
12278 rm -f conftest.$ac_objext
12279 if { (eval echo "$as_me:12279: \"$ac_compile\"") >&5
12280   (eval $ac_compile) 2>&5
12281   ac_status=$?
12282   echo "$as_me:12282: \$? = $ac_status" >&5
12283   (exit $ac_status); } &&
12284          { ac_try='test -s conftest.$ac_objext'
12285   { (eval echo "$as_me:12285: \"$ac_try\"") >&5
12286   (eval $ac_try) 2>&5
12287   ac_status=$?
12288   echo "$as_me:12288: \$? = $ac_status" >&5
12289   (exit $ac_status); }; }; then
12290   ac_cv_type_signed_char=yes
12291 else
12292   echo "$as_me: failed program was:" >&5
12293 cat conftest.$ac_ext >&5
12294 ac_cv_type_signed_char=no
12295 fi
12296 rm -f conftest.$ac_objext conftest.$ac_ext
12297 fi
12298 echo "$as_me:12298: result: $ac_cv_type_signed_char" >&5
12299 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12300
12301 echo "$as_me:12301: checking size of signed char" >&5
12302 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12303 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12304   echo $ECHO_N "(cached) $ECHO_C" >&6
12305 else
12306   if test "$ac_cv_type_signed_char" = yes; then
12307   if test "$cross_compiling" = yes; then
12308   # Depending upon the size, compute the lo and hi bounds.
12309 cat >conftest.$ac_ext <<_ACEOF
12310 #line 12310 "configure"
12311 #include "confdefs.h"
12312 $ac_includes_default
12313 int
12314 main (void)
12315 {
12316 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12317   ;
12318   return 0;
12319 }
12320 _ACEOF
12321 rm -f conftest.$ac_objext
12322 if { (eval echo "$as_me:12322: \"$ac_compile\"") >&5
12323   (eval $ac_compile) 2>&5
12324   ac_status=$?
12325   echo "$as_me:12325: \$? = $ac_status" >&5
12326   (exit $ac_status); } &&
12327          { ac_try='test -s conftest.$ac_objext'
12328   { (eval echo "$as_me:12328: \"$ac_try\"") >&5
12329   (eval $ac_try) 2>&5
12330   ac_status=$?
12331   echo "$as_me:12331: \$? = $ac_status" >&5
12332   (exit $ac_status); }; }; then
12333   ac_lo=0 ac_mid=0
12334   while :; do
12335     cat >conftest.$ac_ext <<_ACEOF
12336 #line 12336 "configure"
12337 #include "confdefs.h"
12338 $ac_includes_default
12339 int
12340 main (void)
12341 {
12342 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12343   ;
12344   return 0;
12345 }
12346 _ACEOF
12347 rm -f conftest.$ac_objext
12348 if { (eval echo "$as_me:12348: \"$ac_compile\"") >&5
12349   (eval $ac_compile) 2>&5
12350   ac_status=$?
12351   echo "$as_me:12351: \$? = $ac_status" >&5
12352   (exit $ac_status); } &&
12353          { ac_try='test -s conftest.$ac_objext'
12354   { (eval echo "$as_me:12354: \"$ac_try\"") >&5
12355   (eval $ac_try) 2>&5
12356   ac_status=$?
12357   echo "$as_me:12357: \$? = $ac_status" >&5
12358   (exit $ac_status); }; }; then
12359   ac_hi=$ac_mid; break
12360 else
12361   echo "$as_me: failed program was:" >&5
12362 cat conftest.$ac_ext >&5
12363 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12364 fi
12365 rm -f conftest.$ac_objext conftest.$ac_ext
12366   done
12367 else
12368   echo "$as_me: failed program was:" >&5
12369 cat conftest.$ac_ext >&5
12370 ac_hi=-1 ac_mid=-1
12371   while :; do
12372     cat >conftest.$ac_ext <<_ACEOF
12373 #line 12373 "configure"
12374 #include "confdefs.h"
12375 $ac_includes_default
12376 int
12377 main (void)
12378 {
12379 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 rm -f conftest.$ac_objext
12385 if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5
12386   (eval $ac_compile) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -s conftest.$ac_objext'
12391   { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit $ac_status); }; }; then
12396   ac_lo=$ac_mid; break
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 cat conftest.$ac_ext >&5
12400 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12401 fi
12402 rm -f conftest.$ac_objext conftest.$ac_ext
12403   done
12404 fi
12405 rm -f conftest.$ac_objext conftest.$ac_ext
12406 # Binary search between lo and hi bounds.
12407 while test "x$ac_lo" != "x$ac_hi"; do
12408   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12409   cat >conftest.$ac_ext <<_ACEOF
12410 #line 12410 "configure"
12411 #include "confdefs.h"
12412 $ac_includes_default
12413 int
12414 main (void)
12415 {
12416 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12417   ;
12418   return 0;
12419 }
12420 _ACEOF
12421 rm -f conftest.$ac_objext
12422 if { (eval echo "$as_me:12422: \"$ac_compile\"") >&5
12423   (eval $ac_compile) 2>&5
12424   ac_status=$?
12425   echo "$as_me:12425: \$? = $ac_status" >&5
12426   (exit $ac_status); } &&
12427          { ac_try='test -s conftest.$ac_objext'
12428   { (eval echo "$as_me:12428: \"$ac_try\"") >&5
12429   (eval $ac_try) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit $ac_status); }; }; then
12433   ac_hi=$ac_mid
12434 else
12435   echo "$as_me: failed program was:" >&5
12436 cat conftest.$ac_ext >&5
12437 ac_lo=`expr $ac_mid + 1`
12438 fi
12439 rm -f conftest.$ac_objext conftest.$ac_ext
12440 done
12441 ac_cv_sizeof_signed_char=$ac_lo
12442 else
12443   if test "$cross_compiling" = yes; then
12444   { { echo "$as_me:12444: error: cannot run test program while cross compiling" >&5
12445 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12446    { (exit 1); exit 1; }; }
12447 else
12448   cat >conftest.$ac_ext <<_ACEOF
12449 #line 12449 "configure"
12450 #include "confdefs.h"
12451 $ac_includes_default
12452 int
12453 main (void)
12454 {
12455 FILE *f = fopen ("conftest.val", "w");
12456 if (!f)
12457   $ac_main_return (1);
12458 fprintf (f, "%d", (sizeof (signed char)));
12459 fclose (f);
12460   ;
12461   return 0;
12462 }
12463 _ACEOF
12464 rm -f conftest$ac_exeext
12465 if { (eval echo "$as_me:12465: \"$ac_link\"") >&5
12466   (eval $ac_link) 2>&5
12467   ac_status=$?
12468   echo "$as_me:12468: \$? = $ac_status" >&5
12469   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12470   { (eval echo "$as_me:12470: \"$ac_try\"") >&5
12471   (eval $ac_try) 2>&5
12472   ac_status=$?
12473   echo "$as_me:12473: \$? = $ac_status" >&5
12474   (exit $ac_status); }; }; then
12475   ac_cv_sizeof_signed_char=`cat conftest.val`
12476 else
12477   echo "$as_me: program exited with status $ac_status" >&5
12478 echo "$as_me: failed program was:" >&5
12479 cat conftest.$ac_ext >&5
12480 fi
12481 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12482 fi
12483 fi
12484 rm -f conftest.val
12485 else
12486   ac_cv_sizeof_signed_char=0
12487 fi
12488 fi
12489 echo "$as_me:12489: result: $ac_cv_sizeof_signed_char" >&5
12490 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12491 cat >>confdefs.h <<EOF
12492 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12493 EOF
12494
12495 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12496         NCURSES_SBOOL="signed char"
12497 else
12498         NCURSES_SBOOL="char"
12499 fi
12500 echo "$as_me:12500: checking if you want to use signed Boolean array in term.h" >&5
12501 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12502
12503 # Check whether --enable-signed-char or --disable-signed-char was given.
12504 if test "${enable_signed_char+set}" = set; then
12505   enableval="$enable_signed_char"
12506   with_signed_char=$enableval
12507 else
12508   with_signed_char=no
12509 fi;
12510 echo "$as_me:12510: result: $with_signed_char" >&5
12511 echo "${ECHO_T}$with_signed_char" >&6
12512 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12513
12514 ###   use option --with-tparm-arg to override tparm's argument type
12515 echo "$as_me:12515: checking for type of tparm args" >&5
12516 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
12517
12518 # Check whether --with-tparm-arg or --without-tparm-arg was given.
12519 if test "${with_tparm_arg+set}" = set; then
12520   withval="$with_tparm_arg"
12521   NCURSES_TPARM_ARG="$withval"
12522 else
12523   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
12524 fi;
12525 echo "$as_me:12525: result: $NCURSES_TPARM_ARG" >&5
12526 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
12527
12528 ### Enable compiling-in rcs id's
12529 echo "$as_me:12529: checking if RCS identifiers should be compiled-in" >&5
12530 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
12531
12532 # Check whether --with-rcs-ids or --without-rcs-ids was given.
12533 if test "${with_rcs_ids+set}" = set; then
12534   withval="$with_rcs_ids"
12535   with_rcs_ids=$withval
12536 else
12537   with_rcs_ids=no
12538 fi;
12539 echo "$as_me:12539: result: $with_rcs_ids" >&5
12540 echo "${ECHO_T}$with_rcs_ids" >&6
12541 test "x$with_rcs_ids" = xyes &&
12542 cat >>confdefs.h <<\EOF
12543 #define USE_RCS_IDS 1
12544 EOF
12545
12546 ###############################################################################
12547
12548 echo "$as_me:12548: checking format of man-pages" >&5
12549 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
12550
12551 # Check whether --with-manpage-format or --without-manpage-format was given.
12552 if test "${with_manpage_format+set}" = set; then
12553   withval="$with_manpage_format"
12554   MANPAGE_FORMAT=$withval
12555 else
12556   MANPAGE_FORMAT=unknown
12557 fi;
12558
12559 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
12560 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
12561
12562 cf_unknown=
12563
12564 case $MANPAGE_FORMAT in
12565 (unknown)
12566         if test -z "$MANPATH" ; then
12567                 MANPATH="/usr/man:/usr/share/man"
12568         fi
12569
12570         # look for the 'date' man-page (it's most likely to be installed!)
12571         MANPAGE_FORMAT=
12572         cf_preform=no
12573         cf_catonly=yes
12574         cf_example=date
12575
12576         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
12577         for cf_dir in $MANPATH; do
12578                 test -z "$cf_dir" && cf_dir=/usr/man
12579                 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
12580                 do
12581                         cf_test=`echo $cf_name | sed -e 's/*//'`
12582                         if test "x$cf_test" = "x$cf_name" ; then
12583
12584                                 case "$cf_name" in
12585                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
12586                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
12587                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
12588                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
12589                                 esac
12590
12591                                 case "$cf_name" in
12592                                 ($cf_dir/man*)
12593                                         cf_catonly=no
12594                                         ;;
12595                                 ($cf_dir/cat*)
12596                                         cf_preform=yes
12597                                         ;;
12598                                 esac
12599                                 break
12600                         fi
12601
12602                         # if we found a match in either man* or cat*, stop looking
12603                         if test -n "$MANPAGE_FORMAT" ; then
12604                                 cf_found=no
12605                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
12606                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
12607                                 case "$cf_name" in
12608                                 ($cf_dir/cat*)
12609                                         cf_found=yes
12610                                         ;;
12611                                 esac
12612                                 test $cf_found=yes && break
12613                         fi
12614                 done
12615                 # only check the first directory in $MANPATH where we find manpages
12616                 if test -n "$MANPAGE_FORMAT" ; then
12617                         break
12618                 fi
12619         done
12620         # if we did not find the example, just assume it is normal
12621         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
12622         IFS="$ac_save_ifs"
12623         ;;
12624 (*)
12625         for cf_option in $MANPAGE_FORMAT; do
12626         case $cf_option in
12627         (gzip|compress|BSDI|normal|formatted|catonly)
12628                 ;;
12629         (*)
12630                 cf_unknown="$cf_unknown $cf_option"
12631                 ;;
12632         esac
12633         done
12634         ;;
12635 esac
12636
12637 echo "$as_me:12637: result: $MANPAGE_FORMAT" >&5
12638 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
12639 if test -n "$cf_unknown" ; then
12640         { echo "$as_me:12640: WARNING: Unexpected manpage-format $cf_unknown" >&5
12641 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
12642 fi
12643
12644 echo "$as_me:12644: checking for manpage renaming" >&5
12645 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
12646
12647 # Check whether --with-manpage-renames or --without-manpage-renames was given.
12648 if test "${with_manpage_renames+set}" = set; then
12649   withval="$with_manpage_renames"
12650   MANPAGE_RENAMES=$withval
12651 else
12652   MANPAGE_RENAMES=yes
12653 fi;
12654
12655 case ".$MANPAGE_RENAMES" in
12656 (.no)
12657         ;;
12658 (.|.yes)
12659         # Debian 'man' program?
12660         if test -f /etc/debian_version ; then
12661                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
12662         else
12663                 MANPAGE_RENAMES=no
12664         fi
12665         ;;
12666 esac
12667
12668 if test "$MANPAGE_RENAMES" != no ; then
12669         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
12670                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
12671         elif test ! -f $MANPAGE_RENAMES ; then
12672                 { { echo "$as_me:12672: error: not a filename: $MANPAGE_RENAMES" >&5
12673 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
12674    { (exit 1); exit 1; }; }
12675         fi
12676
12677         test ! -d man && mkdir man
12678
12679         # Construct a sed-script to perform renaming within man-pages
12680         if test -n "$MANPAGE_RENAMES" ; then
12681                 test ! -d man && mkdir man
12682                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
12683         fi
12684 fi
12685
12686 echo "$as_me:12686: result: $MANPAGE_RENAMES" >&5
12687 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
12688
12689 echo "$as_me:12689: checking if manpage aliases will be installed" >&5
12690 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
12691
12692 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
12693 if test "${with_manpage_aliases+set}" = set; then
12694   withval="$with_manpage_aliases"
12695   MANPAGE_ALIASES=$withval
12696 else
12697   MANPAGE_ALIASES=yes
12698 fi;
12699
12700 echo "$as_me:12700: result: $MANPAGE_ALIASES" >&5
12701 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
12702
12703 case "x$LN_S" in
12704 (xln*)
12705         cf_use_symlinks=yes
12706         ;;
12707 (*)
12708         cf_use_symlinks=no
12709         ;;
12710 esac
12711
12712 MANPAGE_SYMLINKS=no
12713 if test "$MANPAGE_ALIASES" = yes ; then
12714 echo "$as_me:12714: checking if manpage symlinks should be used" >&5
12715 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
12716
12717 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
12718 if test "${with_manpage_symlinks+set}" = set; then
12719   withval="$with_manpage_symlinks"
12720   MANPAGE_SYMLINKS=$withval
12721 else
12722   MANPAGE_SYMLINKS=$cf_use_symlinks
12723 fi;
12724
12725 if test "$$cf_use_symlinks" = no; then
12726 if test "$MANPAGE_SYMLINKS" = yes ; then
12727         { echo "$as_me:12727: WARNING: cannot make symlinks" >&5
12728 echo "$as_me: WARNING: cannot make symlinks" >&2;}
12729         MANPAGE_SYMLINKS=no
12730 fi
12731 fi
12732
12733 echo "$as_me:12733: result: $MANPAGE_SYMLINKS" >&5
12734 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
12735 fi
12736
12737 echo "$as_me:12737: checking for manpage tbl" >&5
12738 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
12739
12740 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
12741 if test "${with_manpage_tbl+set}" = set; then
12742   withval="$with_manpage_tbl"
12743   MANPAGE_TBL=$withval
12744 else
12745   MANPAGE_TBL=no
12746 fi;
12747
12748 echo "$as_me:12748: result: $MANPAGE_TBL" >&5
12749 echo "${ECHO_T}$MANPAGE_TBL" >&6
12750
12751 if test "$prefix" = "NONE" ; then
12752         cf_prefix="$ac_default_prefix"
12753 else
12754         cf_prefix="$prefix"
12755 fi
12756
12757 case "$MANPAGE_FORMAT" in
12758 (*catonly*)
12759         cf_format=yes
12760         cf_inboth=no
12761         ;;
12762 (*formatted*)
12763         cf_format=yes
12764         cf_inboth=yes
12765         ;;
12766 (*)
12767         cf_format=no
12768         cf_inboth=no
12769         ;;
12770 esac
12771
12772 test ! -d man && mkdir man
12773
12774 cf_so_strip=
12775 cf_compress=
12776 case "$MANPAGE_FORMAT" in
12777 (*compress*)
12778         cf_so_strip="Z"
12779         cf_compress=compress
12780         ;;
12781 (*gzip*)
12782         cf_so_strip="gz"
12783         cf_compress=gzip
12784         ;;
12785 esac
12786
12787 cf_edit_man=./edit_man.sh
12788 cf_man_alias=`pwd`/man_alias.sed
12789
12790 cat >$cf_edit_man <<CF_EOF
12791 #! $SHELL
12792 # this script is generated by the configure-script CF_MAN_PAGES macro.
12793
12794 prefix="$cf_prefix"
12795 datarootdir="$datarootdir"
12796 datadir="$datadir"
12797
12798 NCURSES_MAJOR="$NCURSES_MAJOR"
12799 NCURSES_MINOR="$NCURSES_MINOR"
12800 NCURSES_PATCH="$NCURSES_PATCH"
12801
12802 NCURSES_OSPEED="$NCURSES_OSPEED"
12803 TERMINFO="$TERMINFO"
12804
12805 INSTALL="$INSTALL"
12806 INSTALL_DATA="$INSTALL_DATA"
12807
12808 transform="$program_transform_name"
12809
12810 TMP=\${TMPDIR:=/tmp}/man\$\$
12811 trap "rm -f \$TMP" 0 1 2 3 15
12812
12813 form=\$1
12814 shift || exit 1
12815
12816 verb=\$1
12817 shift || exit 1
12818
12819 mandir=\$1
12820 shift || exit 1
12821
12822 srcdir=\$1
12823 top_srcdir=\$srcdir/..
12824 shift || exit 1
12825
12826 if test "\$form" = normal ; then
12827         if test "$cf_format" = yes ; then
12828         if test "$cf_inboth" = no ; then
12829                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12830                 exit $?
12831         fi
12832         fi
12833         cf_subdir=\$mandir/man
12834         cf_tables=$MANPAGE_TBL
12835 else
12836         cf_subdir=\$mandir/cat
12837         cf_tables=yes
12838 fi
12839
12840 # process the list of source-files
12841 for i in \$* ; do
12842 case \$i in
12843 (*.orig|*.rej) ;;
12844 (*.[0-9]*)
12845         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
12846         if test \$verb = installing ; then
12847         if test ! -d \$cf_subdir\${section} ; then
12848                 mkdir -p \$cf_subdir\$section
12849         fi
12850         fi
12851
12852         # replace variables in man page
12853         if test ! -f $cf_man_alias ; then
12854 cat >>$cf_man_alias <<-CF_EOF2
12855                 s,@DATADIR@,\$datadir,g
12856                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
12857                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
12858                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
12859                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
12860                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
12861                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
12862 CF_EOF
12863
12864         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
12865         do
12866                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12867                 cf_name=`echo $cf_name|sed "$program_transform_name"`
12868 cat >>$cf_edit_man <<-CF_EOF
12869                 s,@$cf_NAME@,$cf_name,g
12870 CF_EOF
12871         done
12872
12873 cat >>$cf_edit_man <<CF_EOF
12874 CF_EOF2
12875                 echo "...made $cf_man_alias"
12876         fi
12877
12878         aliases=
12879         cf_source=\`basename \$i\`
12880         inalias=\$cf_source
12881         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
12882         if test ! -f \$inalias ; then
12883                 echo .. skipped \$cf_source
12884                 continue
12885         fi
12886 CF_EOF
12887
12888 if test "$MANPAGE_ALIASES" != no ; then
12889 cat >>$cf_edit_man <<CF_EOF
12890         nCurses=ignore.3x
12891         test $with_curses_h = yes && nCurses=ncurses.3x
12892         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
12893 CF_EOF
12894 fi
12895
12896 if test "$MANPAGE_RENAMES" = no ; then
12897 cat >>$cf_edit_man <<CF_EOF
12898         # perform program transformations for section 1 man pages
12899         if test \$section = 1 ; then
12900                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
12901         else
12902                 cf_target=\$cf_subdir\${section}/\$cf_source
12903         fi
12904 CF_EOF
12905 else
12906 cat >>$cf_edit_man <<CF_EOF
12907         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
12908         if test -z "\$cf_target" ; then
12909                 echo '? missing rename for '\$cf_source
12910                 cf_target="\$cf_source"
12911         fi
12912         cf_target="\$cf_subdir\${section}/\${cf_target}"
12913
12914 CF_EOF
12915 fi
12916
12917 cat >>$cf_edit_man <<CF_EOF
12918         sed     -f $cf_man_alias \\
12919 CF_EOF
12920
12921 if test -f $MANPAGE_RENAMES ; then
12922 cat >>$cf_edit_man <<CF_EOF
12923                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
12924 CF_EOF
12925 else
12926 cat >>$cf_edit_man <<CF_EOF
12927                 < \$i >\$TMP
12928 CF_EOF
12929 fi
12930
12931 cat >>$cf_edit_man <<CF_EOF
12932 if test \$cf_tables = yes ; then
12933         tbl \$TMP >\$TMP.out
12934         mv \$TMP.out \$TMP
12935 fi
12936 CF_EOF
12937
12938 if test $with_overwrite != yes ; then
12939 cat >>$cf_edit_man <<CF_EOF
12940         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
12941         mv \$TMP.out \$TMP
12942 CF_EOF
12943 fi
12944
12945 if test $with_curses_h != yes ; then
12946 cat >>$cf_edit_man <<CF_EOF
12947         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
12948         mv \$TMP.out \$TMP
12949 CF_EOF
12950 fi
12951
12952 cat >>$cf_edit_man <<CF_EOF
12953         if test \$form = format ; then
12954                 nroff -man \$TMP >\$TMP.out
12955                 mv \$TMP.out \$TMP
12956         fi
12957 CF_EOF
12958
12959 if test -n "$cf_compress" ; then
12960 cat >>$cf_edit_man <<CF_EOF
12961         if test \$verb = installing ; then
12962         if ( $cf_compress -f \$TMP )
12963         then
12964                 mv \$TMP.$cf_so_strip \$TMP
12965         fi
12966         fi
12967         cf_target="\$cf_target.$cf_so_strip"
12968 CF_EOF
12969 fi
12970
12971 case "$MANPAGE_FORMAT" in
12972 (*BSDI*)
12973 cat >>$cf_edit_man <<CF_EOF
12974         if test \$form = format ; then
12975                 # BSDI installs only .0 suffixes in the cat directories
12976                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
12977         fi
12978 CF_EOF
12979   ;;
12980 esac
12981
12982 cat >>$cf_edit_man <<CF_EOF
12983         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
12984         if test \$verb = installing ; then
12985                 echo \$verb \$cf_target
12986                 \$INSTALL_DATA \$TMP \$cf_target
12987                 test -d \$cf_subdir\${section} &&
12988                 test -n "\$aliases" && (
12989                         cd \$cf_subdir\${section} && (
12990                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
12991                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
12992                                 cf_target=\`basename \$cf_target\`
12993                                 for cf_alias in \$aliases
12994                                 do
12995                                         if test \$section = 1 ; then
12996                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12997                                         fi
12998
12999                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13000                                                 if test -f \$cf_alias\${suffix} ; then
13001                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13002                                                         then
13003                                                                 continue
13004                                                         fi
13005                                                 fi
13006                                                 echo .. \$verb alias \$cf_alias\${suffix}
13007 CF_EOF
13008 case "x$LN_S" in
13009 (*-f)
13010 cat >>$cf_edit_man <<CF_EOF
13011                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13012 CF_EOF
13013         ;;
13014 (*)
13015 cat >>$cf_edit_man <<CF_EOF
13016                                                 rm -f \$cf_alias\${suffix}
13017                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13018 CF_EOF
13019         ;;
13020 esac
13021 cat >>$cf_edit_man <<CF_EOF
13022                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13023                                                 echo ".so \$cf_source" >\$TMP
13024 CF_EOF
13025 if test -n "$cf_compress" ; then
13026 cat >>$cf_edit_man <<CF_EOF
13027                                                 if test -n "$cf_so_strip" ; then
13028                                                         $cf_compress -f \$TMP
13029                                                         mv \$TMP.$cf_so_strip \$TMP
13030                                                 fi
13031 CF_EOF
13032 fi
13033 cat >>$cf_edit_man <<CF_EOF
13034                                                 echo .. \$verb alias \$cf_alias\${suffix}
13035                                                 rm -f \$cf_alias\${suffix}
13036                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13037                                         fi
13038                                 done
13039                         )
13040                 )
13041         elif test \$verb = removing ; then
13042                 test -f \$cf_target && (
13043                         echo \$verb \$cf_target
13044                         rm -f \$cf_target
13045                 )
13046                 test -d \$cf_subdir\${section} &&
13047                 test -n "\$aliases" && (
13048                         cd \$cf_subdir\${section} && (
13049                                 for cf_alias in \$aliases
13050                                 do
13051                                         if test \$section = 1 ; then
13052                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13053                                         fi
13054
13055                                         echo .. \$verb alias \$cf_alias\${suffix}
13056                                         rm -f \$cf_alias\${suffix}
13057                                 done
13058                         )
13059                 )
13060         else
13061 #               echo ".hy 0"
13062                 cat \$TMP
13063         fi
13064         ;;
13065 esac
13066 done
13067
13068 if test $cf_inboth = yes ; then
13069 if test \$form != format ; then
13070         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13071 fi
13072 fi
13073
13074 exit 0
13075 CF_EOF
13076 chmod 755 $cf_edit_man
13077
13078 ###############################################################################
13079
13080 ### Note that some functions (such as const) are normally disabled anyway.
13081 echo "$as_me:13081: checking if you want to build with function extensions" >&5
13082 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13083
13084 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13085 if test "${enable_ext_funcs+set}" = set; then
13086   enableval="$enable_ext_funcs"
13087   with_ext_funcs=$enableval
13088 else
13089   with_ext_funcs=yes
13090 fi;
13091 echo "$as_me:13091: result: $with_ext_funcs" >&5
13092 echo "${ECHO_T}$with_ext_funcs" >&6
13093 if test "x$with_ext_funcs" = xyes ; then
13094         NCURSES_EXT_FUNCS=1
13095
13096 cat >>confdefs.h <<\EOF
13097 #define NCURSES_EXT_FUNCS 1
13098 EOF
13099
13100 cat >>confdefs.h <<\EOF
13101 #define HAVE_ASSUME_DEFAULT_COLORS 1
13102 EOF
13103
13104 cat >>confdefs.h <<\EOF
13105 #define HAVE_CURSES_VERSION 1
13106 EOF
13107
13108 cat >>confdefs.h <<\EOF
13109 #define HAVE_HAS_KEY 1
13110 EOF
13111
13112 cat >>confdefs.h <<\EOF
13113 #define HAVE_RESIZETERM 1
13114 EOF
13115
13116 cat >>confdefs.h <<\EOF
13117 #define HAVE_RESIZE_TERM 1
13118 EOF
13119
13120 cat >>confdefs.h <<\EOF
13121 #define HAVE_TERM_ENTRY_H 1
13122 EOF
13123
13124 cat >>confdefs.h <<\EOF
13125 #define HAVE_USE_DEFAULT_COLORS 1
13126 EOF
13127
13128 cat >>confdefs.h <<\EOF
13129 #define HAVE_USE_EXTENDED_NAMES 1
13130 EOF
13131
13132 cat >>confdefs.h <<\EOF
13133 #define HAVE_USE_SCREEN 1
13134 EOF
13135
13136 cat >>confdefs.h <<\EOF
13137 #define HAVE_USE_WINDOW 1
13138 EOF
13139
13140 cat >>confdefs.h <<\EOF
13141 #define HAVE_WRESIZE 1
13142 EOF
13143
13144         GENERATED_EXT_FUNCS=generated
13145         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13146 else
13147         NCURSES_EXT_FUNCS=0
13148         GENERATED_EXT_FUNCS=
13149 fi
13150
13151 echo "$as_me:13151: checking if you want to build with SCREEN extensions" >&5
13152 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13153
13154 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13155 if test "${enable_sp_funcs+set}" = set; then
13156   enableval="$enable_sp_funcs"
13157   with_sp_funcs=$enableval
13158 else
13159   with_sp_funcs=$cf_dft_ext_spfuncs
13160 fi;
13161 echo "$as_me:13161: result: $with_sp_funcs" >&5
13162 echo "${ECHO_T}$with_sp_funcs" >&6
13163 if test "x$with_sp_funcs" = xyes ; then
13164         NCURSES_SP_FUNCS=1
13165
13166 cat >>confdefs.h <<\EOF
13167 #define NCURSES_SP_FUNCS 1
13168 EOF
13169
13170 cat >>confdefs.h <<\EOF
13171 #define HAVE_TPUTS_SP 1
13172 EOF
13173
13174         GENERATED_SP_FUNCS=generated
13175 else
13176         NCURSES_SP_FUNCS=0
13177         GENERATED_SP_FUNCS=
13178 fi
13179
13180 echo "$as_me:13180: checking if you want to build with terminal-driver" >&5
13181 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13182
13183 # Check whether --enable-term-driver or --disable-term-driver was given.
13184 if test "${enable_term_driver+set}" = set; then
13185   enableval="$enable_term_driver"
13186   with_term_driver=$enableval
13187 else
13188   with_term_driver=no
13189 fi;
13190 echo "$as_me:13190: result: $with_term_driver" >&5
13191 echo "${ECHO_T}$with_term_driver" >&6
13192 if test "x$with_term_driver" = xyes ; then
13193
13194 cat >>confdefs.h <<\EOF
13195 #define USE_TERM_DRIVER 1
13196 EOF
13197
13198         if test "x$with_termlib" != xno ; then
13199                 { { echo "$as_me:13199: error: The term-driver option conflicts with the termlib option" >&5
13200 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13201    { (exit 1); exit 1; }; }
13202         fi
13203         if test "x$with_sp_funcs" != xyes ; then
13204                 { { echo "$as_me:13204: error: The term-driver option relies upon sp-funcs" >&5
13205 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13206    { (exit 1); exit 1; }; }
13207         fi
13208 fi
13209
13210 ###   use option --enable-const to turn on use of const beyond that in XSI.
13211 echo "$as_me:13211: checking for extended use of const keyword" >&5
13212 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13213
13214 # Check whether --enable-const or --disable-const was given.
13215 if test "${enable_const+set}" = set; then
13216   enableval="$enable_const"
13217   with_ext_const=$enableval
13218 else
13219   with_ext_const=$cf_dft_ext_const
13220 fi;
13221 echo "$as_me:13221: result: $with_ext_const" >&5
13222 echo "${ECHO_T}$with_ext_const" >&6
13223 NCURSES_CONST='/*nothing*/'
13224 if test "x$with_ext_const" = xyes ; then
13225         NCURSES_CONST=const
13226 fi
13227
13228 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13229 echo "$as_me:13229: checking if you want to use extended colors" >&5
13230 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13231
13232 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13233 if test "${enable_ext_colors+set}" = set; then
13234   enableval="$enable_ext_colors"
13235   with_ext_colors=$enableval
13236 else
13237   with_ext_colors=$cf_dft_ext_colors
13238 fi;
13239 echo "$as_me:13239: result: $with_ext_colors" >&5
13240 echo "${ECHO_T}$with_ext_colors" >&6
13241 NCURSES_EXT_COLORS=0
13242 if test "x$with_ext_colors" = xyes ; then
13243         if test "x$with_widec" != xyes ; then
13244                 { echo "$as_me:13244: WARNING: This option applies only to wide-character library" >&5
13245 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13246         else
13247                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13248
13249 if test "${with_abi_version+set}" != set; then
13250         case $cf_cv_rel_version in
13251         (5.*)
13252                 cf_cv_rel_version=6.0
13253                 cf_cv_abi_version=6
13254                 { echo "$as_me:13254: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13255 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13256                 ;;
13257         esac
13258 fi
13259
13260                 NCURSES_EXT_COLORS=1
13261
13262 cat >>confdefs.h <<\EOF
13263 #define NCURSES_EXT_COLORS 1
13264 EOF
13265
13266 cat >>confdefs.h <<\EOF
13267 #define HAVE_ALLOC_PAIR 1
13268 EOF
13269
13270 cat >>confdefs.h <<\EOF
13271 #define HAVE_INIT_EXTENDED_COLOR 1
13272 EOF
13273
13274 cat >>confdefs.h <<\EOF
13275 #define HAVE_RESET_COLOR_PAIRS 1
13276 EOF
13277
13278         fi
13279 fi
13280
13281 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13282 echo "$as_me:13282: checking if you want to use extended mouse encoding" >&5
13283 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13284
13285 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13286 if test "${enable_ext_mouse+set}" = set; then
13287   enableval="$enable_ext_mouse"
13288   with_ext_mouse=$enableval
13289 else
13290   with_ext_mouse=$cf_dft_ext_mouse
13291 fi;
13292 echo "$as_me:13292: result: $with_ext_mouse" >&5
13293 echo "${ECHO_T}$with_ext_mouse" >&6
13294 NCURSES_MOUSE_VERSION=1
13295 if test "x$with_ext_mouse" = xyes ; then
13296         NCURSES_MOUSE_VERSION=2
13297
13298 if test "${with_abi_version+set}" != set; then
13299         case $cf_cv_rel_version in
13300         (5.*)
13301                 cf_cv_rel_version=6.0
13302                 cf_cv_abi_version=6
13303                 { echo "$as_me:13303: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13304 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13305                 ;;
13306         esac
13307 fi
13308
13309 fi
13310
13311 ###   use option --enable-ext-putwin to turn on extended screendumps
13312 echo "$as_me:13312: checking if you want to use extended putwin/screendump" >&5
13313 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13314
13315 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13316 if test "${enable_ext_putwin+set}" = set; then
13317   enableval="$enable_ext_putwin"
13318   with_ext_putwin=$enableval
13319 else
13320   with_ext_putwin=$cf_dft_ext_putwin
13321 fi;
13322 echo "$as_me:13322: result: $with_ext_putwin" >&5
13323 echo "${ECHO_T}$with_ext_putwin" >&6
13324 if test "x$with_ext_putwin" = xyes ; then
13325
13326 cat >>confdefs.h <<\EOF
13327 #define NCURSES_EXT_PUTWIN 1
13328 EOF
13329
13330 fi
13331
13332 echo "$as_me:13332: checking if you want \$NCURSES_NO_PADDING code" >&5
13333 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
13334
13335 # Check whether --enable-no-padding or --disable-no-padding was given.
13336 if test "${enable_no_padding+set}" = set; then
13337   enableval="$enable_no_padding"
13338   with_no_padding=$enableval
13339 else
13340   with_no_padding=$with_ext_funcs
13341 fi;
13342 echo "$as_me:13342: result: $with_no_padding" >&5
13343 echo "${ECHO_T}$with_no_padding" >&6
13344 test "x$with_no_padding" = xyes &&
13345 cat >>confdefs.h <<\EOF
13346 #define NCURSES_NO_PADDING 1
13347 EOF
13348
13349 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
13350 echo "$as_me:13350: checking if you want SIGWINCH handler" >&5
13351 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
13352
13353 # Check whether --enable-sigwinch or --disable-sigwinch was given.
13354 if test "${enable_sigwinch+set}" = set; then
13355   enableval="$enable_sigwinch"
13356   with_sigwinch=$enableval
13357 else
13358   with_sigwinch=$with_ext_funcs
13359 fi;
13360 echo "$as_me:13360: result: $with_sigwinch" >&5
13361 echo "${ECHO_T}$with_sigwinch" >&6
13362 test "x$with_sigwinch" = xyes &&
13363 cat >>confdefs.h <<\EOF
13364 #define USE_SIGWINCH 1
13365 EOF
13366
13367 ###   use option --enable-tcap-names to allow user to define new capabilities
13368 echo "$as_me:13368: checking if you want user-definable terminal capabilities like termcap" >&5
13369 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
13370
13371 # Check whether --enable-tcap-names or --disable-tcap-names was given.
13372 if test "${enable_tcap_names+set}" = set; then
13373   enableval="$enable_tcap_names"
13374   with_tcap_names=$enableval
13375 else
13376   with_tcap_names=$with_ext_funcs
13377 fi;
13378 echo "$as_me:13378: result: $with_tcap_names" >&5
13379 echo "${ECHO_T}$with_tcap_names" >&6
13380 NCURSES_XNAMES=0
13381 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
13382
13383 ##############################################################################
13384
13385 echo "$as_me:13385: checking if you want to link with the pthread library" >&5
13386 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13387
13388 # Check whether --with-pthread or --without-pthread was given.
13389 if test "${with_pthread+set}" = set; then
13390   withval="$with_pthread"
13391   with_pthread=$withval
13392 else
13393   with_pthread=no
13394 fi;
13395 echo "$as_me:13395: result: $with_pthread" >&5
13396 echo "${ECHO_T}$with_pthread" >&6
13397
13398 if test "$with_pthread" != no ; then
13399         echo "$as_me:13399: checking for pthread.h" >&5
13400 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13401 if test "${ac_cv_header_pthread_h+set}" = set; then
13402   echo $ECHO_N "(cached) $ECHO_C" >&6
13403 else
13404   cat >conftest.$ac_ext <<_ACEOF
13405 #line 13405 "configure"
13406 #include "confdefs.h"
13407 #include <pthread.h>
13408 _ACEOF
13409 if { (eval echo "$as_me:13409: \"$ac_cpp conftest.$ac_ext\"") >&5
13410   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13411   ac_status=$?
13412   egrep -v '^ *\+' conftest.er1 >conftest.err
13413   rm -f conftest.er1
13414   cat conftest.err >&5
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); } >/dev/null; then
13417   if test -s conftest.err; then
13418     ac_cpp_err=$ac_c_preproc_warn_flag
13419   else
13420     ac_cpp_err=
13421   fi
13422 else
13423   ac_cpp_err=yes
13424 fi
13425 if test -z "$ac_cpp_err"; then
13426   ac_cv_header_pthread_h=yes
13427 else
13428   echo "$as_me: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   ac_cv_header_pthread_h=no
13431 fi
13432 rm -f conftest.err conftest.$ac_ext
13433 fi
13434 echo "$as_me:13434: result: $ac_cv_header_pthread_h" >&5
13435 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13436 if test $ac_cv_header_pthread_h = yes; then
13437
13438 cat >>confdefs.h <<\EOF
13439 #define HAVE_PTHREADS_H 1
13440 EOF
13441
13442         for cf_lib_pthread in pthread c_r
13443         do
13444             echo "$as_me:13444: checking if we can link with the $cf_lib_pthread library" >&5
13445 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13446             cf_save_LIBS="$LIBS"
13447
13448 cf_add_libs="-l$cf_lib_pthread"
13449 # Filter out duplicates - this happens with badly-designed ".pc" files...
13450 for cf_add_1lib in $LIBS
13451 do
13452         for cf_add_2lib in $cf_add_libs
13453         do
13454                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13455                 then
13456                         cf_add_1lib=
13457                         break
13458                 fi
13459         done
13460         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13461 done
13462 LIBS="$cf_add_libs"
13463
13464             cat >conftest.$ac_ext <<_ACEOF
13465 #line 13465 "configure"
13466 #include "confdefs.h"
13467
13468 #include <pthread.h>
13469
13470 int
13471 main (void)
13472 {
13473
13474                 int rc = pthread_create(0,0,0,0);
13475                 int r2 = pthread_mutexattr_settype(0, 0);
13476
13477   ;
13478   return 0;
13479 }
13480 _ACEOF
13481 rm -f conftest.$ac_objext conftest$ac_exeext
13482 if { (eval echo "$as_me:13482: \"$ac_link\"") >&5
13483   (eval $ac_link) 2>&5
13484   ac_status=$?
13485   echo "$as_me:13485: \$? = $ac_status" >&5
13486   (exit $ac_status); } &&
13487          { ac_try='test -s conftest$ac_exeext'
13488   { (eval echo "$as_me:13488: \"$ac_try\"") >&5
13489   (eval $ac_try) 2>&5
13490   ac_status=$?
13491   echo "$as_me:13491: \$? = $ac_status" >&5
13492   (exit $ac_status); }; }; then
13493   with_pthread=yes
13494 else
13495   echo "$as_me: failed program was:" >&5
13496 cat conftest.$ac_ext >&5
13497 with_pthread=no
13498 fi
13499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13500             LIBS="$cf_save_LIBS"
13501             echo "$as_me:13501: result: $with_pthread" >&5
13502 echo "${ECHO_T}$with_pthread" >&6
13503             test "$with_pthread" = yes && break
13504         done
13505
13506         if test "$with_pthread" = yes ; then
13507
13508 cf_add_libs="-l$cf_lib_pthread"
13509 # Filter out duplicates - this happens with badly-designed ".pc" files...
13510 for cf_add_1lib in $LIBS
13511 do
13512         for cf_add_2lib in $cf_add_libs
13513         do
13514                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13515                 then
13516                         cf_add_1lib=
13517                         break
13518                 fi
13519         done
13520         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13521 done
13522 LIBS="$cf_add_libs"
13523
13524 cat >>confdefs.h <<\EOF
13525 #define HAVE_LIBPTHREADS 1
13526 EOF
13527
13528         else
13529             { { echo "$as_me:13529: error: Cannot link with pthread library" >&5
13530 echo "$as_me: error: Cannot link with pthread library" >&2;}
13531    { (exit 1); exit 1; }; }
13532         fi
13533
13534 fi
13535
13536 fi
13537
13538 if test "x$with_pthread" != xno; then
13539         echo "$as_me:13539: checking for pthread_kill" >&5
13540 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
13541 if test "${ac_cv_func_pthread_kill+set}" = set; then
13542   echo $ECHO_N "(cached) $ECHO_C" >&6
13543 else
13544   cat >conftest.$ac_ext <<_ACEOF
13545 #line 13545 "configure"
13546 #include "confdefs.h"
13547 /* System header to define __stub macros and hopefully few prototypes,
13548     which can conflict with char pthread_kill (); below.  */
13549 #include <assert.h>
13550 /* Override any gcc2 internal prototype to avoid an error.  */
13551 #ifdef __cplusplus
13552 extern "C"
13553 #endif
13554 /* We use char because int might match the return type of a gcc2
13555    builtin and then its argument prototype would still apply.  */
13556 char pthread_kill ();
13557 char (*f) ();
13558
13559 int
13560 main (void)
13561 {
13562 /* The GNU C library defines this for functions which it implements
13563     to always fail with ENOSYS.  Some functions are actually named
13564     something starting with __ and the normal name is an alias.  */
13565 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13566 choke me
13567 #else
13568 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13569 #endif
13570
13571   ;
13572   return 0;
13573 }
13574 _ACEOF
13575 rm -f conftest.$ac_objext conftest$ac_exeext
13576 if { (eval echo "$as_me:13576: \"$ac_link\"") >&5
13577   (eval $ac_link) 2>&5
13578   ac_status=$?
13579   echo "$as_me:13579: \$? = $ac_status" >&5
13580   (exit $ac_status); } &&
13581          { ac_try='test -s conftest$ac_exeext'
13582   { (eval echo "$as_me:13582: \"$ac_try\"") >&5
13583   (eval $ac_try) 2>&5
13584   ac_status=$?
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit $ac_status); }; }; then
13587   ac_cv_func_pthread_kill=yes
13588 else
13589   echo "$as_me: failed program was:" >&5
13590 cat conftest.$ac_ext >&5
13591 ac_cv_func_pthread_kill=no
13592 fi
13593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13594 fi
13595 echo "$as_me:13595: result: $ac_cv_func_pthread_kill" >&5
13596 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13597 if test $ac_cv_func_pthread_kill = yes; then
13598
13599                 echo "$as_me:13599: checking if you want to allow EINTR in wgetch with pthreads" >&5
13600 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13601
13602 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13603 if test "${enable_pthreads_eintr+set}" = set; then
13604   enableval="$enable_pthreads_eintr"
13605   use_pthreads_eintr=$enableval
13606 else
13607   use_pthreads_eintr=no
13608 fi;
13609                 echo "$as_me:13609: result: $use_pthreads_eintr" >&5
13610 echo "${ECHO_T}$use_pthreads_eintr" >&6
13611                 if test "x$use_pthreads_eintr" = xyes ; then
13612
13613 cat >>confdefs.h <<\EOF
13614 #define USE_PTHREADS_EINTR 1
13615 EOF
13616
13617                 fi
13618 fi
13619
13620         echo "$as_me:13620: checking if you want to use weak-symbols for pthreads" >&5
13621 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13622
13623 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13624 if test "${enable_weak_symbols+set}" = set; then
13625   enableval="$enable_weak_symbols"
13626   use_weak_symbols=$enableval
13627 else
13628   use_weak_symbols=no
13629 fi;
13630         echo "$as_me:13630: result: $use_weak_symbols" >&5
13631 echo "${ECHO_T}$use_weak_symbols" >&6
13632         if test "x$use_weak_symbols" = xyes ; then
13633
13634 echo "$as_me:13634: checking if $CC supports weak symbols" >&5
13635 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13636 if test "${cf_cv_weak_symbols+set}" = set; then
13637   echo $ECHO_N "(cached) $ECHO_C" >&6
13638 else
13639
13640 cat >conftest.$ac_ext <<_ACEOF
13641 #line 13641 "configure"
13642 #include "confdefs.h"
13643
13644 #include <stdio.h>
13645 int
13646 main (void)
13647 {
13648
13649 #if defined(__GNUC__)
13650 #  if defined __USE_ISOC99
13651 #    define _cat_pragma(exp)    _Pragma(#exp)
13652 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13653 #  else
13654 #    define _weak_pragma(exp)
13655 #  endif
13656 #  define _declare(name)        __extension__ extern __typeof__(name) name
13657 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13658 #endif
13659
13660 weak_symbol(fopen);
13661
13662   ;
13663   return 0;
13664 }
13665 _ACEOF
13666 rm -f conftest.$ac_objext
13667 if { (eval echo "$as_me:13667: \"$ac_compile\"") >&5
13668   (eval $ac_compile) 2>&5
13669   ac_status=$?
13670   echo "$as_me:13670: \$? = $ac_status" >&5
13671   (exit $ac_status); } &&
13672          { ac_try='test -s conftest.$ac_objext'
13673   { (eval echo "$as_me:13673: \"$ac_try\"") >&5
13674   (eval $ac_try) 2>&5
13675   ac_status=$?
13676   echo "$as_me:13676: \$? = $ac_status" >&5
13677   (exit $ac_status); }; }; then
13678   cf_cv_weak_symbols=yes
13679 else
13680   echo "$as_me: failed program was:" >&5
13681 cat conftest.$ac_ext >&5
13682 cf_cv_weak_symbols=no
13683 fi
13684 rm -f conftest.$ac_objext conftest.$ac_ext
13685
13686 fi
13687 echo "$as_me:13687: result: $cf_cv_weak_symbols" >&5
13688 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13689
13690         else
13691                 cf_cv_weak_symbols=no
13692         fi
13693
13694         if test "x$cf_cv_weak_symbols" = xyes ; then
13695
13696 cat >>confdefs.h <<\EOF
13697 #define USE_WEAK_SYMBOLS 1
13698 EOF
13699
13700         fi
13701 fi
13702
13703 PTHREAD=
13704 if test "x$with_pthread" = "xyes" ; then
13705
13706 cat >>confdefs.h <<\EOF
13707 #define USE_PTHREADS 1
13708 EOF
13709
13710         enable_reentrant=yes
13711         if test "x$cf_cv_weak_symbols" = xyes ; then
13712                 PTHREAD=-lpthread
13713
13714 cf_add_libs="-lpthread"
13715 # Filter out duplicates - this happens with badly-designed ".pc" files...
13716 for cf_add_1lib in $PRIVATE_LIBS
13717 do
13718         for cf_add_2lib in $cf_add_libs
13719         do
13720                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13721                 then
13722                         cf_add_1lib=
13723                         break
13724                 fi
13725         done
13726         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13727 done
13728 PRIVATE_LIBS="$cf_add_libs"
13729
13730         fi
13731 fi
13732
13733 # Reentrant code has to be opaque; there's little advantage to making ncurses
13734 # opaque outside of that, so there is no --enable-opaque option.  We can use
13735 # this option without --with-pthreads, but this will be always set for
13736 # pthreads.
13737 echo "$as_me:13737: checking if you want reentrant code" >&5
13738 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13739
13740 # Check whether --enable-reentrant or --disable-reentrant was given.
13741 if test "${enable_reentrant+set}" = set; then
13742   enableval="$enable_reentrant"
13743   with_reentrant=$enableval
13744 else
13745   with_reentrant=no
13746 fi;
13747 echo "$as_me:13747: result: $with_reentrant" >&5
13748 echo "${ECHO_T}$with_reentrant" >&6
13749 if test "x$with_reentrant" = xyes ; then
13750         cf_cv_enable_reentrant=1
13751         cf_cv_enable_opaque="NCURSES_INTERNALS"
13752         NCURSES_SIZE_T=int
13753         if test "x$cf_cv_weak_symbols" = xyes ; then
13754
13755 # remove pthread library from $LIBS
13756 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13757
13758 cf_add_libs="-lpthread"
13759 # Filter out duplicates - this happens with badly-designed ".pc" files...
13760 for cf_add_1lib in $TEST_LIBS
13761 do
13762         for cf_add_2lib in $cf_add_libs
13763         do
13764                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13765                 then
13766                         cf_add_1lib=
13767                         break
13768                 fi
13769         done
13770         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13771 done
13772 TEST_LIBS="$cf_add_libs"
13773
13774 cf_add_libs="-lpthread"
13775 # Filter out duplicates - this happens with badly-designed ".pc" files...
13776 for cf_add_1lib in $TEST_LIBS2
13777 do
13778         for cf_add_2lib in $cf_add_libs
13779         do
13780                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13781                 then
13782                         cf_add_1lib=
13783                         break
13784                 fi
13785         done
13786         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13787 done
13788 TEST_LIBS2="$cf_add_libs"
13789
13790 cf_add_libs="-lpthread"
13791 # Filter out duplicates - this happens with badly-designed ".pc" files...
13792 for cf_add_1lib in $PRIVATE_LIBS
13793 do
13794         for cf_add_2lib in $cf_add_libs
13795         do
13796                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13797                 then
13798                         cf_add_1lib=
13799                         break
13800                 fi
13801         done
13802         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13803 done
13804 PRIVATE_LIBS="$cf_add_libs"
13805
13806         else
13807                 # when not using weak symbols but with_reentrant,
13808                 # add 't' to the library suffix on all platforms
13809                 # except cygwin, where we only do that if ALSO
13810                 # compiling with full thread support.
13811                 case "$host" in
13812                 (*cygwin* | *msys*)
13813                         if test "$with_pthread" = "yes" ; then
13814                                 if test "x$disable_lib_suffixes" = "xno" ; then
13815                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13816                                 fi
13817                         fi ;;
13818                 (*)
13819                         if test "x$disable_lib_suffixes" = "xno" ; then
13820                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13821                         fi
13822                         ;;
13823                 esac
13824         fi
13825
13826 cat >>confdefs.h <<\EOF
13827 #define USE_REENTRANT 1
13828 EOF
13829
13830 if test "${with_abi_version+set}" != set; then
13831         case $cf_cv_rel_version in
13832         (5.*)
13833                 cf_cv_rel_version=6.0
13834                 cf_cv_abi_version=6
13835                 { echo "$as_me:13835: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13836 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13837                 ;;
13838         esac
13839 fi
13840
13841 else
13842         cf_cv_enable_reentrant=0
13843         cf_cv_enable_opaque="NCURSES_OPAQUE"
13844         NCURSES_SIZE_T=short
13845 fi
13846
13847 echo "$as_me:13847: checking if you want opaque curses-library structures" >&5
13848 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13849
13850 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13851 if test "${enable_opaque_curses+set}" = set; then
13852   enableval="$enable_opaque_curses"
13853   test "$enableval" != yes && enableval=no
13854         if test "$enableval" != "no" ; then
13855     enable_opaque_curses=yes
13856         else
13857
13858          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13859          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13860
13861         fi
13862 else
13863   enableval=no
13864
13865          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13866          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13867
13868 fi;
13869 echo "$as_me:13869: result: $enable_opaque_curses" >&5
13870 echo "${ECHO_T}$enable_opaque_curses" >&6
13871
13872 test "$cf_cv_enable_reentrant" = 1 && \
13873 test "$enable_opaque_curses" = no && \
13874 { { echo "$as_me:13874: error: reentrant configuration requires opaque library" >&5
13875 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13876    { (exit 1); exit 1; }; }
13877
13878 echo "$as_me:13878: checking if you want opaque form-library structures" >&5
13879 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13880
13881 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13882 if test "${enable_opaque_form+set}" = set; then
13883   enableval="$enable_opaque_form"
13884   enable_opaque_form=yes
13885 else
13886   enable_opaque_form=no
13887 fi;
13888 echo "$as_me:13888: result: $enable_opaque_form" >&5
13889 echo "${ECHO_T}$enable_opaque_form" >&6
13890
13891 echo "$as_me:13891: checking if you want opaque menu-library structures" >&5
13892 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13893
13894 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13895 if test "${enable_opaque_menu+set}" = set; then
13896   enableval="$enable_opaque_menu"
13897   enable_opaque_menu=yes
13898 else
13899   enable_opaque_menu=no
13900 fi;
13901 echo "$as_me:13901: result: $enable_opaque_menu" >&5
13902 echo "${ECHO_T}$enable_opaque_menu" >&6
13903
13904 echo "$as_me:13904: checking if you want opaque panel-library structures" >&5
13905 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13906
13907 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13908 if test "${enable_opaque_panel+set}" = set; then
13909   enableval="$enable_opaque_panel"
13910   enable_opaque_panel=yes
13911 else
13912   enable_opaque_panel=no
13913 fi;
13914 echo "$as_me:13914: result: $enable_opaque_panel" >&5
13915 echo "${ECHO_T}$enable_opaque_panel" >&6
13916
13917 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13918 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13919 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13920 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13921
13922 ### Allow using a different wrap-prefix
13923 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13924         echo "$as_me:13924: checking for prefix used to wrap public variables" >&5
13925 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13926
13927 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13928 if test "${with_wrap_prefix+set}" = set; then
13929   withval="$with_wrap_prefix"
13930   NCURSES_WRAP_PREFIX=$withval
13931 else
13932   NCURSES_WRAP_PREFIX=_nc_
13933 fi;
13934         echo "$as_me:13934: result: $NCURSES_WRAP_PREFIX" >&5
13935 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13936 else
13937         NCURSES_WRAP_PREFIX=_nc_
13938 fi
13939
13940 cat >>confdefs.h <<EOF
13941 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13942 EOF
13943
13944 ###############################################################################
13945 # These options are relatively safe to experiment with.
13946
13947 echo "$as_me:13947: checking if you want all development code" >&5
13948 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13949
13950 # Check whether --with-develop or --without-develop was given.
13951 if test "${with_develop+set}" = set; then
13952   withval="$with_develop"
13953   with_develop=$withval
13954 else
13955   with_develop=no
13956 fi;
13957 echo "$as_me:13957: result: $with_develop" >&5
13958 echo "${ECHO_T}$with_develop" >&6
13959
13960 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13961 echo "$as_me:13961: checking if you want hard-tabs code" >&5
13962 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13963
13964 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13965 if test "${enable_hard_tabs+set}" = set; then
13966   enableval="$enable_hard_tabs"
13967
13968 else
13969   enable_hard_tabs=$with_develop
13970 fi;
13971 echo "$as_me:13971: result: $enable_hard_tabs" >&5
13972 echo "${ECHO_T}$enable_hard_tabs" >&6
13973 test "x$enable_hard_tabs" = xyes &&
13974 cat >>confdefs.h <<\EOF
13975 #define USE_HARD_TABS 1
13976 EOF
13977
13978 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13979 echo "$as_me:13979: checking if you want limited support for xmc" >&5
13980 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13981
13982 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13983 if test "${enable_xmc_glitch+set}" = set; then
13984   enableval="$enable_xmc_glitch"
13985
13986 else
13987   enable_xmc_glitch=$with_develop
13988 fi;
13989 echo "$as_me:13989: result: $enable_xmc_glitch" >&5
13990 echo "${ECHO_T}$enable_xmc_glitch" >&6
13991 test "x$enable_xmc_glitch" = xyes &&
13992 cat >>confdefs.h <<\EOF
13993 #define USE_XMC_SUPPORT 1
13994 EOF
13995
13996 ###############################################################################
13997 # These are just experimental, probably should not be in a package:
13998
13999 echo "$as_me:13999: checking if you do not want to assume colors are white-on-black" >&5
14000 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14001
14002 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14003 if test "${enable_assumed_color+set}" = set; then
14004   enableval="$enable_assumed_color"
14005   with_assumed_color=$enableval
14006 else
14007   with_assumed_color=yes
14008 fi;
14009 echo "$as_me:14009: result: $with_assumed_color" >&5
14010 echo "${ECHO_T}$with_assumed_color" >&6
14011 test "x$with_assumed_color" = xyes &&
14012 cat >>confdefs.h <<\EOF
14013 #define USE_ASSUMED_COLOR 1
14014 EOF
14015
14016 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14017 echo "$as_me:14017: checking if you want hashmap scrolling-optimization code" >&5
14018 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14019
14020 # Check whether --enable-hashmap or --disable-hashmap was given.
14021 if test "${enable_hashmap+set}" = set; then
14022   enableval="$enable_hashmap"
14023   with_hashmap=$enableval
14024 else
14025   with_hashmap=yes
14026 fi;
14027 echo "$as_me:14027: result: $with_hashmap" >&5
14028 echo "${ECHO_T}$with_hashmap" >&6
14029 test "x$with_hashmap" = xyes &&
14030 cat >>confdefs.h <<\EOF
14031 #define USE_HASHMAP 1
14032 EOF
14033
14034 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14035 echo "$as_me:14035: checking if you want colorfgbg code" >&5
14036 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14037
14038 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14039 if test "${enable_colorfgbg+set}" = set; then
14040   enableval="$enable_colorfgbg"
14041   with_colorfgbg=$enableval
14042 else
14043   with_colorfgbg=no
14044 fi;
14045 echo "$as_me:14045: result: $with_colorfgbg" >&5
14046 echo "${ECHO_T}$with_colorfgbg" >&6
14047 test "x$with_colorfgbg" = xyes &&
14048 cat >>confdefs.h <<\EOF
14049 #define USE_COLORFGBG 1
14050 EOF
14051
14052 ###   use option --enable-interop to turn on use of bindings used for interop
14053 echo "$as_me:14053: checking if you want interop bindings" >&5
14054 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14055
14056 # Check whether --enable-interop or --disable-interop was given.
14057 if test "${enable_interop+set}" = set; then
14058   enableval="$enable_interop"
14059   with_exp_interop=$enableval
14060 else
14061   with_exp_interop=$cf_dft_interop
14062 fi;
14063 echo "$as_me:14063: result: $with_exp_interop" >&5
14064 echo "${ECHO_T}$with_exp_interop" >&6
14065
14066 NCURSES_INTEROP_FUNCS=0
14067 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14068
14069 echo "$as_me:14069: checking if you want experimental safe-sprintf code" >&5
14070 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14071
14072 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14073 if test "${enable_safe_sprintf+set}" = set; then
14074   enableval="$enable_safe_sprintf"
14075   with_safe_sprintf=$enableval
14076 else
14077   with_safe_sprintf=no
14078 fi;
14079 echo "$as_me:14079: result: $with_safe_sprintf" >&5
14080 echo "${ECHO_T}$with_safe_sprintf" >&6
14081
14082 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14083 # when hashmap is used scroll hints are useless
14084 if test "$with_hashmap" = no ; then
14085 echo "$as_me:14085: checking if you want to experiment without scrolling-hints code" >&5
14086 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14087
14088 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14089 if test "${enable_scroll_hints+set}" = set; then
14090   enableval="$enable_scroll_hints"
14091   with_scroll_hints=$enableval
14092 else
14093   with_scroll_hints=yes
14094 fi;
14095 echo "$as_me:14095: result: $with_scroll_hints" >&5
14096 echo "${ECHO_T}$with_scroll_hints" >&6
14097 test "x$with_scroll_hints" = xyes &&
14098 cat >>confdefs.h <<\EOF
14099 #define USE_SCROLL_HINTS 1
14100 EOF
14101
14102 fi
14103
14104 echo "$as_me:14104: checking if you want wgetch-events code" >&5
14105 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14106
14107 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14108 if test "${enable_wgetch_events+set}" = set; then
14109   enableval="$enable_wgetch_events"
14110   with_wgetch_events=$enableval
14111 else
14112   with_wgetch_events=no
14113 fi;
14114 echo "$as_me:14114: result: $with_wgetch_events" >&5
14115 echo "${ECHO_T}$with_wgetch_events" >&6
14116 test "x$with_wgetch_events" = xyes &&
14117 cat >>confdefs.h <<\EOF
14118 #define NCURSES_WGETCH_EVENTS 1
14119 EOF
14120
14121 ###############################################################################
14122
14123 ###     use option --disable-echo to suppress full display compiling commands
14124
14125 echo "$as_me:14125: checking if you want to see long compiling messages" >&5
14126 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14127
14128 # Check whether --enable-echo or --disable-echo was given.
14129 if test "${enable_echo+set}" = set; then
14130   enableval="$enable_echo"
14131   test "$enableval" != no && enableval=yes
14132         if test "$enableval" != "yes" ; then
14133
14134         ECHO_LT='--silent'
14135         ECHO_LD='@echo linking $@;'
14136         RULE_CC='@echo compiling $<'
14137         SHOW_CC='@echo compiling $@'
14138         ECHO_CC='@'
14139
14140         else
14141
14142         ECHO_LT=''
14143         ECHO_LD=''
14144         RULE_CC=''
14145         SHOW_CC=''
14146         ECHO_CC=''
14147
14148         fi
14149 else
14150   enableval=yes
14151
14152         ECHO_LT=''
14153         ECHO_LD=''
14154         RULE_CC=''
14155         SHOW_CC=''
14156         ECHO_CC=''
14157
14158 fi;
14159 echo "$as_me:14159: result: $enableval" >&5
14160 echo "${ECHO_T}$enableval" >&6
14161
14162 if test "x$enable_echo" = xyes; then
14163         ECHO_LINK=
14164 else
14165         ECHO_LINK='@ echo linking $@ ... ;'
14166         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14167         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14168 fi
14169
14170 # --disable-stripping is used for debugging
14171
14172 echo "$as_me:14172: checking if you want to install stripped executables" >&5
14173 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14174
14175 # Check whether --enable-stripping or --disable-stripping was given.
14176 if test "${enable_stripping+set}" = set; then
14177   enableval="$enable_stripping"
14178   test "$enableval" != no && enableval=yes
14179         if test "$enableval" != "yes" ; then
14180     with_stripping=no
14181         else
14182                 with_stripping=yes
14183         fi
14184 else
14185   enableval=yes
14186         with_stripping=yes
14187
14188 fi;
14189 echo "$as_me:14189: result: $with_stripping" >&5
14190 echo "${ECHO_T}$with_stripping" >&6
14191
14192 if test "$with_stripping" = yes
14193 then
14194         INSTALL_OPT_S="-s"
14195 else
14196         INSTALL_OPT_S=
14197 fi
14198
14199 echo "$as_me:14199: checking if install needs to be told about ownership" >&5
14200 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14201 case `$ac_config_guess` in
14202 (*minix)
14203         with_install_o=yes
14204         ;;
14205 (*)
14206         with_install_o=no
14207         ;;
14208 esac
14209
14210 echo "$as_me:14210: result: $with_install_o" >&5
14211 echo "${ECHO_T}$with_install_o" >&6
14212 if test "x$with_install_o" = xyes
14213 then
14214         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'`
14215 else
14216         INSTALL_OPT_O=
14217 fi
14218
14219 ###     use option --enable-warnings to turn on all gcc warnings
14220 echo "$as_me:14220: checking if you want to see compiler warnings" >&5
14221 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14222
14223 # Check whether --enable-warnings or --disable-warnings was given.
14224 if test "${enable_warnings+set}" = set; then
14225   enableval="$enable_warnings"
14226   with_warnings=$enableval
14227 fi;
14228 echo "$as_me:14228: result: $with_warnings" >&5
14229 echo "${ECHO_T}$with_warnings" >&6
14230
14231 if test "x$with_warnings" = "xyes"; then
14232
14233         ADAFLAGS="$ADAFLAGS -gnatg"
14234
14235 INTEL_COMPILER=no
14236
14237 if test "$GCC" = yes ; then
14238         case $host_os in
14239         (linux*|gnu*)
14240                 echo "$as_me:14240: checking if this is really Intel C compiler" >&5
14241 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14242                 cf_save_CFLAGS="$CFLAGS"
14243                 CFLAGS="$CFLAGS -no-gcc"
14244                 cat >conftest.$ac_ext <<_ACEOF
14245 #line 14245 "configure"
14246 #include "confdefs.h"
14247
14248 int
14249 main (void)
14250 {
14251
14252 #ifdef __INTEL_COMPILER
14253 #else
14254 make an error
14255 #endif
14256
14257   ;
14258   return 0;
14259 }
14260 _ACEOF
14261 rm -f conftest.$ac_objext
14262 if { (eval echo "$as_me:14262: \"$ac_compile\"") >&5
14263   (eval $ac_compile) 2>&5
14264   ac_status=$?
14265   echo "$as_me:14265: \$? = $ac_status" >&5
14266   (exit $ac_status); } &&
14267          { ac_try='test -s conftest.$ac_objext'
14268   { (eval echo "$as_me:14268: \"$ac_try\"") >&5
14269   (eval $ac_try) 2>&5
14270   ac_status=$?
14271   echo "$as_me:14271: \$? = $ac_status" >&5
14272   (exit $ac_status); }; }; then
14273   INTEL_COMPILER=yes
14274 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14275
14276 else
14277   echo "$as_me: failed program was:" >&5
14278 cat conftest.$ac_ext >&5
14279 fi
14280 rm -f conftest.$ac_objext conftest.$ac_ext
14281                 CFLAGS="$cf_save_CFLAGS"
14282                 echo "$as_me:14282: result: $INTEL_COMPILER" >&5
14283 echo "${ECHO_T}$INTEL_COMPILER" >&6
14284                 ;;
14285         esac
14286 fi
14287
14288 CLANG_COMPILER=no
14289
14290 if test "$GCC" = yes ; then
14291         echo "$as_me:14291: checking if this is really Clang C compiler" >&5
14292 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
14293         cf_save_CFLAGS="$CFLAGS"
14294         CFLAGS="$CFLAGS -Qunused-arguments"
14295         cat >conftest.$ac_ext <<_ACEOF
14296 #line 14296 "configure"
14297 #include "confdefs.h"
14298
14299 int
14300 main (void)
14301 {
14302
14303 #ifdef __clang__
14304 #else
14305 make an error
14306 #endif
14307
14308   ;
14309   return 0;
14310 }
14311 _ACEOF
14312 rm -f conftest.$ac_objext
14313 if { (eval echo "$as_me:14313: \"$ac_compile\"") >&5
14314   (eval $ac_compile) 2>&5
14315   ac_status=$?
14316   echo "$as_me:14316: \$? = $ac_status" >&5
14317   (exit $ac_status); } &&
14318          { ac_try='test -s conftest.$ac_objext'
14319   { (eval echo "$as_me:14319: \"$ac_try\"") >&5
14320   (eval $ac_try) 2>&5
14321   ac_status=$?
14322   echo "$as_me:14322: \$? = $ac_status" >&5
14323   (exit $ac_status); }; }; then
14324   CLANG_COMPILER=yes
14325 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14326
14327 else
14328   echo "$as_me: failed program was:" >&5
14329 cat conftest.$ac_ext >&5
14330 fi
14331 rm -f conftest.$ac_objext conftest.$ac_ext
14332         CFLAGS="$cf_save_CFLAGS"
14333         echo "$as_me:14333: result: $CLANG_COMPILER" >&5
14334 echo "${ECHO_T}$CLANG_COMPILER" >&6
14335 fi
14336
14337 cat > conftest.$ac_ext <<EOF
14338 #line 14338 "${as_me:-configure}"
14339 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14340 EOF
14341
14342 if test "$INTEL_COMPILER" = yes
14343 then
14344 # The "-wdXXX" options suppress warnings:
14345 # remark #1419: external declaration in primary source file
14346 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14347 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14348 # remark #193: zero used for undefined preprocessing identifier
14349 # remark #593: variable "curs_sb_left_arrow" was set but never used
14350 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14351 # remark #869: parameter "tw" was never referenced
14352 # remark #981: operands are evaluated in unspecified order
14353 # warning #279: controlling expression is constant
14354
14355         { echo "$as_me:14355: checking for $CC warning options..." >&5
14356 echo "$as_me: checking for $CC warning options..." >&6;}
14357         cf_save_CFLAGS="$CFLAGS"
14358         EXTRA_CFLAGS="-Wall"
14359         for cf_opt in \
14360                 wd1419 \
14361                 wd1683 \
14362                 wd1684 \
14363                 wd193 \
14364                 wd593 \
14365                 wd279 \
14366                 wd810 \
14367                 wd869 \
14368                 wd981
14369         do
14370                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14371                 if { (eval echo "$as_me:14371: \"$ac_compile\"") >&5
14372   (eval $ac_compile) 2>&5
14373   ac_status=$?
14374   echo "$as_me:14374: \$? = $ac_status" >&5
14375   (exit $ac_status); }; then
14376                         test -n "$verbose" && echo "$as_me:14376: result: ... -$cf_opt" >&5
14377 echo "${ECHO_T}... -$cf_opt" >&6
14378                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14379                 fi
14380         done
14381         CFLAGS="$cf_save_CFLAGS"
14382
14383 elif test "$GCC" = yes
14384 then
14385         { echo "$as_me:14385: checking for $CC warning options..." >&5
14386 echo "$as_me: checking for $CC warning options..." >&6;}
14387         cf_save_CFLAGS="$CFLAGS"
14388         EXTRA_CFLAGS=
14389         cf_warn_CONST=""
14390         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
14391         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
14392         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
14393         for cf_opt in W Wall \
14394                 Wbad-function-cast \
14395                 Wcast-align \
14396                 Wcast-qual \
14397                 Wdeclaration-after-statement \
14398                 Wextra \
14399                 Winline \
14400                 Wmissing-declarations \
14401                 Wmissing-prototypes \
14402                 Wnested-externs \
14403                 Wpointer-arith \
14404                 Wshadow \
14405                 Wstrict-prototypes \
14406                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
14407         do
14408                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14409                 if { (eval echo "$as_me:14409: \"$ac_compile\"") >&5
14410   (eval $ac_compile) 2>&5
14411   ac_status=$?
14412   echo "$as_me:14412: \$? = $ac_status" >&5
14413   (exit $ac_status); }; then
14414                         test -n "$verbose" && echo "$as_me:14414: result: ... -$cf_opt" >&5
14415 echo "${ECHO_T}... -$cf_opt" >&6
14416                         case $cf_opt in
14417                         (Wcast-qual)
14418
14419         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14420         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
14421
14422                                 ;;
14423                         (Winline)
14424                                 case $GCC_VERSION in
14425                                 ([34].*)
14426                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
14427
14428 echo "${as_me:-configure}:14428: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14429
14430                                         continue;;
14431                                 esac
14432                                 ;;
14433                         (Wpointer-arith)
14434                                 case $GCC_VERSION in
14435                                 ([12].*)
14436                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
14437
14438 echo "${as_me:-configure}:14438: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14439
14440                                         continue;;
14441                                 esac
14442                                 ;;
14443                         esac
14444                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14445                 fi
14446         done
14447         CFLAGS="$cf_save_CFLAGS"
14448 fi
14449 rm -rf conftest*
14450
14451         if test "x$cf_with_cxx" = xyes ; then
14452
14453 INTEL_CPLUSPLUS=no
14454
14455 if test "$GCC" = yes ; then
14456         case $host_os in
14457         (linux*|gnu*)
14458                 echo "$as_me:14458: checking if this is really Intel C++ compiler" >&5
14459 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
14460                 cf_save_CFLAGS="$CXXFLAGS"
14461                 CXXFLAGS="$CXXFLAGS -no-gcc"
14462                 cat >conftest.$ac_ext <<_ACEOF
14463 #line 14463 "configure"
14464 #include "confdefs.h"
14465
14466 int
14467 main (void)
14468 {
14469
14470 #ifdef __INTEL_COMPILER
14471 #else
14472 make an error
14473 #endif
14474
14475   ;
14476   return 0;
14477 }
14478 _ACEOF
14479 rm -f conftest.$ac_objext
14480 if { (eval echo "$as_me:14480: \"$ac_compile\"") >&5
14481   (eval $ac_compile) 2>&5
14482   ac_status=$?
14483   echo "$as_me:14483: \$? = $ac_status" >&5
14484   (exit $ac_status); } &&
14485          { ac_try='test -s conftest.$ac_objext'
14486   { (eval echo "$as_me:14486: \"$ac_try\"") >&5
14487   (eval $ac_try) 2>&5
14488   ac_status=$?
14489   echo "$as_me:14489: \$? = $ac_status" >&5
14490   (exit $ac_status); }; }; then
14491   INTEL_CPLUSPLUS=yes
14492 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14493
14494 else
14495   echo "$as_me: failed program was:" >&5
14496 cat conftest.$ac_ext >&5
14497 fi
14498 rm -f conftest.$ac_objext conftest.$ac_ext
14499                 CXXFLAGS="$cf_save_CFLAGS"
14500                 echo "$as_me:14500: result: $INTEL_CPLUSPLUS" >&5
14501 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
14502                 ;;
14503         esac
14504 fi
14505
14506 CLANG_CPLUSPLUS=no
14507
14508 if test "$GCC" = yes ; then
14509         echo "$as_me:14509: checking if this is really Clang C++ compiler" >&5
14510 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
14511         cf_save_CFLAGS="$CXXFLAGS"
14512         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
14513         cat >conftest.$ac_ext <<_ACEOF
14514 #line 14514 "configure"
14515 #include "confdefs.h"
14516
14517 int
14518 main (void)
14519 {
14520
14521 #ifdef __clang__
14522 #else
14523 make an error
14524 #endif
14525
14526   ;
14527   return 0;
14528 }
14529 _ACEOF
14530 rm -f conftest.$ac_objext
14531 if { (eval echo "$as_me:14531: \"$ac_compile\"") >&5
14532   (eval $ac_compile) 2>&5
14533   ac_status=$?
14534   echo "$as_me:14534: \$? = $ac_status" >&5
14535   (exit $ac_status); } &&
14536          { ac_try='test -s conftest.$ac_objext'
14537   { (eval echo "$as_me:14537: \"$ac_try\"") >&5
14538   (eval $ac_try) 2>&5
14539   ac_status=$?
14540   echo "$as_me:14540: \$? = $ac_status" >&5
14541   (exit $ac_status); }; }; then
14542   CLANG_CPLUSPLUS=yes
14543 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14544
14545 else
14546   echo "$as_me: failed program was:" >&5
14547 cat conftest.$ac_ext >&5
14548 fi
14549 rm -f conftest.$ac_objext conftest.$ac_ext
14550         CXXFLAGS="$cf_save_CFLAGS"
14551         echo "$as_me:14551: result: $CLANG_CPLUSPLUS" >&5
14552 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
14553 fi
14554
14555 ac_ext=cc
14556 ac_cpp='$CXXCPP $CPPFLAGS'
14557 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14558 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14559 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14560 ac_main_return=return
14561
14562 cat > conftest.$ac_ext <<EOF
14563 #line 14563 "configure"
14564 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14565 EOF
14566
14567 if test "$INTEL_CPLUSPLUS" = yes
14568 then
14569 # The "-wdXXX" options suppress warnings:
14570 # remark #1419: external declaration in primary source file
14571 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14572 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14573 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14574 # remark #193: zero used for undefined preprocessing identifier
14575 # remark #593: variable "curs_sb_left_arrow" was set but never used
14576 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14577 # remark #869: parameter "tw" was never referenced
14578 # remark #981: operands are evaluated in unspecified order
14579 # warning #269: invalid format string conversion
14580
14581         { echo "$as_me:14581: checking for $CC warning options..." >&5
14582 echo "$as_me: checking for $CC warning options..." >&6;}
14583         cf_save_CXXFLAGS="$CXXFLAGS"
14584         EXTRA_CXXFLAGS="-Wall"
14585         for cf_opt in \
14586                 wd1419 \
14587                 wd1682 \
14588                 wd1683 \
14589                 wd1684 \
14590                 wd193 \
14591                 wd279 \
14592                 wd593 \
14593                 wd810 \
14594                 wd869 \
14595                 wd981
14596         do
14597                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
14598                 if { (eval echo "$as_me:14598: \"$ac_compile\"") >&5
14599   (eval $ac_compile) 2>&5
14600   ac_status=$?
14601   echo "$as_me:14601: \$? = $ac_status" >&5
14602   (exit $ac_status); }; then
14603                         test -n "$verbose" && echo "$as_me:14603: result: ... -$cf_opt" >&5
14604 echo "${ECHO_T}... -$cf_opt" >&6
14605                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14606                 fi
14607         done
14608         CXXFLAGS="$cf_save_CXXFLAGS"
14609
14610 elif test "$GXX" = yes
14611 then
14612         { echo "$as_me:14612: checking for $CXX warning options..." >&5
14613 echo "$as_me: checking for $CXX warning options..." >&6;}
14614         cf_save_CXXFLAGS="$CXXFLAGS"
14615         EXTRA_CXXFLAGS="-W -Wall"
14616         cf_gxx_extra_warnings=""
14617         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
14618         case "$GCC_VERSION" in
14619         ([1-2].*)
14620                 ;;
14621         (*)
14622                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
14623                 ;;
14624         esac
14625         for cf_opt in \
14626                 Wabi \
14627                 fabi-version=0 \
14628                 Wextra \
14629                 Wignored-qualifiers \
14630                 Wlogical-op \
14631                 Woverloaded-virtual \
14632                 Wsign-promo \
14633                 Wsynth \
14634                 Wold-style-cast \
14635                 Wcast-align \
14636                 Wcast-qual \
14637                 Wpointer-arith \
14638                 Wshadow \
14639                 Wundef $cf_gxx_extra_warnings Wno-unused
14640         do
14641                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14642                 if { (eval echo "$as_me:14642: \"$ac_compile\"") >&5
14643   (eval $ac_compile) 2>&5
14644   ac_status=$?
14645   echo "$as_me:14645: \$? = $ac_status" >&5
14646   (exit $ac_status); }; then
14647                         test -n "$verbose" && echo "$as_me:14647: result: ... -$cf_opt" >&5
14648 echo "${ECHO_T}... -$cf_opt" >&6
14649                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14650                 else
14651                         test -n "$verbose" && echo "$as_me:14651: result: ... no -$cf_opt" >&5
14652 echo "${ECHO_T}... no -$cf_opt" >&6
14653                 fi
14654         done
14655         CXXFLAGS="$cf_save_CXXFLAGS"
14656 fi
14657
14658 rm -rf conftest*
14659 ac_ext=c
14660 ac_cpp='$CPP $CPPFLAGS'
14661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14664 ac_main_return=return
14665
14666         fi
14667 fi
14668
14669 if test "$GCC" = yes
14670 then
14671 cat > conftest.i <<EOF
14672 #ifndef GCC_PRINTF
14673 #define GCC_PRINTF 0
14674 #endif
14675 #ifndef GCC_SCANF
14676 #define GCC_SCANF 0
14677 #endif
14678 #ifndef GCC_NORETURN
14679 #define GCC_NORETURN /* nothing */
14680 #endif
14681 #ifndef GCC_UNUSED
14682 #define GCC_UNUSED /* nothing */
14683 #endif
14684 EOF
14685 if test "$GCC" = yes
14686 then
14687         { echo "$as_me:14687: checking for $CC __attribute__ directives..." >&5
14688 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14689 cat > conftest.$ac_ext <<EOF
14690 #line 14690 "${as_me:-configure}"
14691 #include "confdefs.h"
14692 #include "conftest.h"
14693 #include "conftest.i"
14694 #if     GCC_PRINTF
14695 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14696 #else
14697 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14698 #endif
14699 #if     GCC_SCANF
14700 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14701 #else
14702 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14703 #endif
14704 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14705 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14706 extern void foo(void) GCC_NORETURN;
14707 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14708 EOF
14709         cf_printf_attribute=no
14710         cf_scanf_attribute=no
14711         for cf_attribute in scanf printf unused noreturn
14712         do
14713
14714 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14715
14716                 cf_directive="__attribute__(($cf_attribute))"
14717                 echo "checking for $CC $cf_directive" 1>&5
14718
14719                 case $cf_attribute in
14720                 (printf)
14721                         cf_printf_attribute=yes
14722                         cat >conftest.h <<EOF
14723 #define GCC_$cf_ATTRIBUTE 1
14724 EOF
14725                         ;;
14726                 (scanf)
14727                         cf_scanf_attribute=yes
14728                         cat >conftest.h <<EOF
14729 #define GCC_$cf_ATTRIBUTE 1
14730 EOF
14731                         ;;
14732                 (*)
14733                         cat >conftest.h <<EOF
14734 #define GCC_$cf_ATTRIBUTE $cf_directive
14735 EOF
14736                         ;;
14737                 esac
14738
14739                 if { (eval echo "$as_me:14739: \"$ac_compile\"") >&5
14740   (eval $ac_compile) 2>&5
14741   ac_status=$?
14742   echo "$as_me:14742: \$? = $ac_status" >&5
14743   (exit $ac_status); }; then
14744                         test -n "$verbose" && echo "$as_me:14744: result: ... $cf_attribute" >&5
14745 echo "${ECHO_T}... $cf_attribute" >&6
14746                         cat conftest.h >>confdefs.h
14747                         case $cf_attribute in
14748                         (noreturn)
14749
14750 cat >>confdefs.h <<EOF
14751 #define GCC_NORETURN $cf_directive
14752 EOF
14753
14754                                 ;;
14755                         (printf)
14756                                 cf_value='/* nothing */'
14757                                 if test "$cf_printf_attribute" != no ; then
14758                                         cf_value='__attribute__((format(printf,fmt,var)))'
14759
14760 cat >>confdefs.h <<\EOF
14761 #define GCC_PRINTF 1
14762 EOF
14763
14764                                 fi
14765
14766 cat >>confdefs.h <<EOF
14767 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14768 EOF
14769
14770                                 ;;
14771                         (scanf)
14772                                 cf_value='/* nothing */'
14773                                 if test "$cf_scanf_attribute" != no ; then
14774                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14775
14776 cat >>confdefs.h <<\EOF
14777 #define GCC_SCANF 1
14778 EOF
14779
14780                                 fi
14781
14782 cat >>confdefs.h <<EOF
14783 #define GCC_SCANFLIKE(fmt,var) $cf_value
14784 EOF
14785
14786                                 ;;
14787                         (unused)
14788
14789 cat >>confdefs.h <<EOF
14790 #define GCC_UNUSED $cf_directive
14791 EOF
14792
14793                                 ;;
14794                         esac
14795                 fi
14796         done
14797 else
14798         fgrep define conftest.i >>confdefs.h
14799 fi
14800 rm -rf conftest*
14801 fi
14802
14803 echo "$as_me:14803: checking if you want to work around bogus compiler/loader warnings" >&5
14804 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14805
14806 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14807 if test "${enable_string_hacks+set}" = set; then
14808   enableval="$enable_string_hacks"
14809   with_string_hacks=$enableval
14810 else
14811   with_string_hacks=no
14812 fi;
14813 echo "$as_me:14813: result: $with_string_hacks" >&5
14814 echo "${ECHO_T}$with_string_hacks" >&6
14815
14816 if test "x$with_string_hacks" = "xyes"; then
14817
14818 cat >>confdefs.h <<\EOF
14819 #define USE_STRING_HACKS 1
14820 EOF
14821
14822         { echo "$as_me:14822: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14823 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14824         echo "$as_me:14824: checking for strlcat" >&5
14825 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14826 if test "${ac_cv_func_strlcat+set}" = set; then
14827   echo $ECHO_N "(cached) $ECHO_C" >&6
14828 else
14829   cat >conftest.$ac_ext <<_ACEOF
14830 #line 14830 "configure"
14831 #include "confdefs.h"
14832 /* System header to define __stub macros and hopefully few prototypes,
14833     which can conflict with char strlcat (); below.  */
14834 #include <assert.h>
14835 /* Override any gcc2 internal prototype to avoid an error.  */
14836 #ifdef __cplusplus
14837 extern "C"
14838 #endif
14839 /* We use char because int might match the return type of a gcc2
14840    builtin and then its argument prototype would still apply.  */
14841 char strlcat ();
14842 char (*f) ();
14843
14844 int
14845 main (void)
14846 {
14847 /* The GNU C library defines this for functions which it implements
14848     to always fail with ENOSYS.  Some functions are actually named
14849     something starting with __ and the normal name is an alias.  */
14850 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14851 choke me
14852 #else
14853 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14854 #endif
14855
14856   ;
14857   return 0;
14858 }
14859 _ACEOF
14860 rm -f conftest.$ac_objext conftest$ac_exeext
14861 if { (eval echo "$as_me:14861: \"$ac_link\"") >&5
14862   (eval $ac_link) 2>&5
14863   ac_status=$?
14864   echo "$as_me:14864: \$? = $ac_status" >&5
14865   (exit $ac_status); } &&
14866          { ac_try='test -s conftest$ac_exeext'
14867   { (eval echo "$as_me:14867: \"$ac_try\"") >&5
14868   (eval $ac_try) 2>&5
14869   ac_status=$?
14870   echo "$as_me:14870: \$? = $ac_status" >&5
14871   (exit $ac_status); }; }; then
14872   ac_cv_func_strlcat=yes
14873 else
14874   echo "$as_me: failed program was:" >&5
14875 cat conftest.$ac_ext >&5
14876 ac_cv_func_strlcat=no
14877 fi
14878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14879 fi
14880 echo "$as_me:14880: result: $ac_cv_func_strlcat" >&5
14881 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14882 if test $ac_cv_func_strlcat = yes; then
14883
14884 cat >>confdefs.h <<\EOF
14885 #define HAVE_STRLCAT 1
14886 EOF
14887
14888 else
14889
14890                 echo "$as_me:14890: checking for strlcat in -lbsd" >&5
14891 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14892 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14893   echo $ECHO_N "(cached) $ECHO_C" >&6
14894 else
14895   ac_check_lib_save_LIBS=$LIBS
14896 LIBS="-lbsd  $LIBS"
14897 cat >conftest.$ac_ext <<_ACEOF
14898 #line 14898 "configure"
14899 #include "confdefs.h"
14900
14901 /* Override any gcc2 internal prototype to avoid an error.  */
14902 #ifdef __cplusplus
14903 extern "C"
14904 #endif
14905 /* We use char because int might match the return type of a gcc2
14906    builtin and then its argument prototype would still apply.  */
14907 char strlcat ();
14908 int
14909 main (void)
14910 {
14911 strlcat ();
14912   ;
14913   return 0;
14914 }
14915 _ACEOF
14916 rm -f conftest.$ac_objext conftest$ac_exeext
14917 if { (eval echo "$as_me:14917: \"$ac_link\"") >&5
14918   (eval $ac_link) 2>&5
14919   ac_status=$?
14920   echo "$as_me:14920: \$? = $ac_status" >&5
14921   (exit $ac_status); } &&
14922          { ac_try='test -s conftest$ac_exeext'
14923   { (eval echo "$as_me:14923: \"$ac_try\"") >&5
14924   (eval $ac_try) 2>&5
14925   ac_status=$?
14926   echo "$as_me:14926: \$? = $ac_status" >&5
14927   (exit $ac_status); }; }; then
14928   ac_cv_lib_bsd_strlcat=yes
14929 else
14930   echo "$as_me: failed program was:" >&5
14931 cat conftest.$ac_ext >&5
14932 ac_cv_lib_bsd_strlcat=no
14933 fi
14934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14935 LIBS=$ac_check_lib_save_LIBS
14936 fi
14937 echo "$as_me:14937: result: $ac_cv_lib_bsd_strlcat" >&5
14938 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14939 if test $ac_cv_lib_bsd_strlcat = yes; then
14940
14941 cf_add_libs="-lbsd"
14942 # Filter out duplicates - this happens with badly-designed ".pc" files...
14943 for cf_add_1lib in $LIBS
14944 do
14945         for cf_add_2lib in $cf_add_libs
14946         do
14947                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14948                 then
14949                         cf_add_1lib=
14950                         break
14951                 fi
14952         done
14953         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14954 done
14955 LIBS="$cf_add_libs"
14956
14957 for ac_header in bsd/string.h
14958 do
14959 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14960 echo "$as_me:14960: checking for $ac_header" >&5
14961 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14962 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14963   echo $ECHO_N "(cached) $ECHO_C" >&6
14964 else
14965   cat >conftest.$ac_ext <<_ACEOF
14966 #line 14966 "configure"
14967 #include "confdefs.h"
14968 #include <$ac_header>
14969 _ACEOF
14970 if { (eval echo "$as_me:14970: \"$ac_cpp conftest.$ac_ext\"") >&5
14971   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14972   ac_status=$?
14973   egrep -v '^ *\+' conftest.er1 >conftest.err
14974   rm -f conftest.er1
14975   cat conftest.err >&5
14976   echo "$as_me:14976: \$? = $ac_status" >&5
14977   (exit $ac_status); } >/dev/null; then
14978   if test -s conftest.err; then
14979     ac_cpp_err=$ac_c_preproc_warn_flag
14980   else
14981     ac_cpp_err=
14982   fi
14983 else
14984   ac_cpp_err=yes
14985 fi
14986 if test -z "$ac_cpp_err"; then
14987   eval "$as_ac_Header=yes"
14988 else
14989   echo "$as_me: failed program was:" >&5
14990   cat conftest.$ac_ext >&5
14991   eval "$as_ac_Header=no"
14992 fi
14993 rm -f conftest.err conftest.$ac_ext
14994 fi
14995 echo "$as_me:14995: result: `eval echo '${'$as_ac_Header'}'`" >&5
14996 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14997 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14998   cat >>confdefs.h <<EOF
14999 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15000 EOF
15001
15002 fi
15003 done
15004
15005 cat >>confdefs.h <<\EOF
15006 #define HAVE_STRLCAT 1
15007 EOF
15008
15009 fi
15010
15011 fi
15012
15013 for ac_func in strlcpy snprintf
15014 do
15015 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15016 echo "$as_me:15016: checking for $ac_func" >&5
15017 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15018 if eval "test \"\${$as_ac_var+set}\" = set"; then
15019   echo $ECHO_N "(cached) $ECHO_C" >&6
15020 else
15021   cat >conftest.$ac_ext <<_ACEOF
15022 #line 15022 "configure"
15023 #include "confdefs.h"
15024 /* System header to define __stub macros and hopefully few prototypes,
15025     which can conflict with char $ac_func (); below.  */
15026 #include <assert.h>
15027 /* Override any gcc2 internal prototype to avoid an error.  */
15028 #ifdef __cplusplus
15029 extern "C"
15030 #endif
15031 /* We use char because int might match the return type of a gcc2
15032    builtin and then its argument prototype would still apply.  */
15033 char $ac_func ();
15034 char (*f) ();
15035
15036 int
15037 main (void)
15038 {
15039 /* The GNU C library defines this for functions which it implements
15040     to always fail with ENOSYS.  Some functions are actually named
15041     something starting with __ and the normal name is an alias.  */
15042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15043 choke me
15044 #else
15045 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15046 #endif
15047
15048   ;
15049   return 0;
15050 }
15051 _ACEOF
15052 rm -f conftest.$ac_objext conftest$ac_exeext
15053 if { (eval echo "$as_me:15053: \"$ac_link\"") >&5
15054   (eval $ac_link) 2>&5
15055   ac_status=$?
15056   echo "$as_me:15056: \$? = $ac_status" >&5
15057   (exit $ac_status); } &&
15058          { ac_try='test -s conftest$ac_exeext'
15059   { (eval echo "$as_me:15059: \"$ac_try\"") >&5
15060   (eval $ac_try) 2>&5
15061   ac_status=$?
15062   echo "$as_me:15062: \$? = $ac_status" >&5
15063   (exit $ac_status); }; }; then
15064   eval "$as_ac_var=yes"
15065 else
15066   echo "$as_me: failed program was:" >&5
15067 cat conftest.$ac_ext >&5
15068 eval "$as_ac_var=no"
15069 fi
15070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15071 fi
15072 echo "$as_me:15072: result: `eval echo '${'$as_ac_var'}'`" >&5
15073 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15074 if test `eval echo '${'$as_ac_var'}'` = yes; then
15075   cat >>confdefs.h <<EOF
15076 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15077 EOF
15078
15079 fi
15080 done
15081
15082 fi
15083
15084 ###     use option --enable-assertions to turn on generation of assertion code
15085 echo "$as_me:15085: checking if you want to enable runtime assertions" >&5
15086 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15087
15088 # Check whether --enable-assertions or --disable-assertions was given.
15089 if test "${enable_assertions+set}" = set; then
15090   enableval="$enable_assertions"
15091   with_assertions=$enableval
15092 else
15093   with_assertions=no
15094 fi;
15095 echo "$as_me:15095: result: $with_assertions" >&5
15096 echo "${ECHO_T}$with_assertions" >&6
15097 if test -n "$GCC"
15098 then
15099         if test "$with_assertions" = no
15100         then
15101                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15102         else
15103
15104         ADAFLAGS="$ADAFLAGS -gnata"
15105
15106         fi
15107 fi
15108
15109 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15110
15111 echo "$as_me:15111: checking if you want to use dmalloc for testing" >&5
15112 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15113
15114 # Check whether --with-dmalloc or --without-dmalloc was given.
15115 if test "${with_dmalloc+set}" = set; then
15116   withval="$with_dmalloc"
15117
15118 cat >>confdefs.h <<EOF
15119 #define USE_DMALLOC 1
15120 EOF
15121
15122         : ${with_cflags:=-g}
15123         : ${with_no_leaks:=yes}
15124          with_dmalloc=yes
15125 else
15126   with_dmalloc=
15127 fi;
15128 echo "$as_me:15128: result: ${with_dmalloc:-no}" >&5
15129 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15130
15131 case .$with_cflags in
15132 (.*-g*)
15133         case .$CFLAGS in
15134         (.*-g*)
15135                 ;;
15136         (*)
15137
15138 cf_fix_cppflags=no
15139 cf_new_cflags=
15140 cf_new_cppflags=
15141 cf_new_extra_cppflags=
15142
15143 for cf_add_cflags in -g
15144 do
15145 case $cf_fix_cppflags in
15146 (no)
15147         case $cf_add_cflags in
15148         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15149                 case $cf_add_cflags in
15150                 (-D*)
15151                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15152
15153                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15154                                 && test -z "${cf_tst_cflags}" \
15155                                 && cf_fix_cppflags=yes
15156
15157                         if test $cf_fix_cppflags = yes ; then
15158
15159         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15160         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15161
15162                                 continue
15163                         elif test "${cf_tst_cflags}" = "\"'" ; then
15164
15165         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15166         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15167
15168                                 continue
15169                         fi
15170                         ;;
15171                 esac
15172                 case "$CPPFLAGS" in
15173                 (*$cf_add_cflags)
15174                         ;;
15175                 (*)
15176                         case $cf_add_cflags in
15177                         (-D*)
15178                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15179
15180 CPPFLAGS=`echo "$CPPFLAGS" | \
15181         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15182                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15183
15184                                 ;;
15185                         esac
15186
15187         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15188         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15189
15190                         ;;
15191                 esac
15192                 ;;
15193         (*)
15194
15195         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15196         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15197
15198                 ;;
15199         esac
15200         ;;
15201 (yes)
15202
15203         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15204         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15205
15206         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15207
15208         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15209                 && test -z "${cf_tst_cflags}" \
15210                 && cf_fix_cppflags=no
15211         ;;
15212 esac
15213 done
15214
15215 if test -n "$cf_new_cflags" ; then
15216
15217         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15218         CFLAGS="${CFLAGS}$cf_new_cflags"
15219
15220 fi
15221
15222 if test -n "$cf_new_cppflags" ; then
15223
15224         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15225         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15226
15227 fi
15228
15229 if test -n "$cf_new_extra_cppflags" ; then
15230
15231         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15232         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15233
15234 fi
15235
15236                 ;;
15237         esac
15238         ;;
15239 esac
15240
15241 if test "$with_dmalloc" = yes ; then
15242         echo "$as_me:15242: checking for dmalloc.h" >&5
15243 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15244 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15245   echo $ECHO_N "(cached) $ECHO_C" >&6
15246 else
15247   cat >conftest.$ac_ext <<_ACEOF
15248 #line 15248 "configure"
15249 #include "confdefs.h"
15250 #include <dmalloc.h>
15251 _ACEOF
15252 if { (eval echo "$as_me:15252: \"$ac_cpp conftest.$ac_ext\"") >&5
15253   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15254   ac_status=$?
15255   egrep -v '^ *\+' conftest.er1 >conftest.err
15256   rm -f conftest.er1
15257   cat conftest.err >&5
15258   echo "$as_me:15258: \$? = $ac_status" >&5
15259   (exit $ac_status); } >/dev/null; then
15260   if test -s conftest.err; then
15261     ac_cpp_err=$ac_c_preproc_warn_flag
15262   else
15263     ac_cpp_err=
15264   fi
15265 else
15266   ac_cpp_err=yes
15267 fi
15268 if test -z "$ac_cpp_err"; then
15269   ac_cv_header_dmalloc_h=yes
15270 else
15271   echo "$as_me: failed program was:" >&5
15272   cat conftest.$ac_ext >&5
15273   ac_cv_header_dmalloc_h=no
15274 fi
15275 rm -f conftest.err conftest.$ac_ext
15276 fi
15277 echo "$as_me:15277: result: $ac_cv_header_dmalloc_h" >&5
15278 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15279 if test $ac_cv_header_dmalloc_h = yes; then
15280
15281 echo "$as_me:15281: checking for dmalloc_debug in -ldmalloc" >&5
15282 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
15283 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
15284   echo $ECHO_N "(cached) $ECHO_C" >&6
15285 else
15286   ac_check_lib_save_LIBS=$LIBS
15287 LIBS="-ldmalloc  $LIBS"
15288 cat >conftest.$ac_ext <<_ACEOF
15289 #line 15289 "configure"
15290 #include "confdefs.h"
15291
15292 /* Override any gcc2 internal prototype to avoid an error.  */
15293 #ifdef __cplusplus
15294 extern "C"
15295 #endif
15296 /* We use char because int might match the return type of a gcc2
15297    builtin and then its argument prototype would still apply.  */
15298 char dmalloc_debug ();
15299 int
15300 main (void)
15301 {
15302 dmalloc_debug ();
15303   ;
15304   return 0;
15305 }
15306 _ACEOF
15307 rm -f conftest.$ac_objext conftest$ac_exeext
15308 if { (eval echo "$as_me:15308: \"$ac_link\"") >&5
15309   (eval $ac_link) 2>&5
15310   ac_status=$?
15311   echo "$as_me:15311: \$? = $ac_status" >&5
15312   (exit $ac_status); } &&
15313          { ac_try='test -s conftest$ac_exeext'
15314   { (eval echo "$as_me:15314: \"$ac_try\"") >&5
15315   (eval $ac_try) 2>&5
15316   ac_status=$?
15317   echo "$as_me:15317: \$? = $ac_status" >&5
15318   (exit $ac_status); }; }; then
15319   ac_cv_lib_dmalloc_dmalloc_debug=yes
15320 else
15321   echo "$as_me: failed program was:" >&5
15322 cat conftest.$ac_ext >&5
15323 ac_cv_lib_dmalloc_dmalloc_debug=no
15324 fi
15325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15326 LIBS=$ac_check_lib_save_LIBS
15327 fi
15328 echo "$as_me:15328: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
15329 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
15330 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
15331   cat >>confdefs.h <<EOF
15332 #define HAVE_LIBDMALLOC 1
15333 EOF
15334
15335   LIBS="-ldmalloc $LIBS"
15336
15337 fi
15338
15339 fi
15340
15341 fi
15342
15343 echo "$as_me:15343: checking if you want to use dbmalloc for testing" >&5
15344 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
15345
15346 # Check whether --with-dbmalloc or --without-dbmalloc was given.
15347 if test "${with_dbmalloc+set}" = set; then
15348   withval="$with_dbmalloc"
15349
15350 cat >>confdefs.h <<EOF
15351 #define USE_DBMALLOC 1
15352 EOF
15353
15354         : ${with_cflags:=-g}
15355         : ${with_no_leaks:=yes}
15356          with_dbmalloc=yes
15357 else
15358   with_dbmalloc=
15359 fi;
15360 echo "$as_me:15360: result: ${with_dbmalloc:-no}" >&5
15361 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
15362
15363 case .$with_cflags in
15364 (.*-g*)
15365         case .$CFLAGS in
15366         (.*-g*)
15367                 ;;
15368         (*)
15369
15370 cf_fix_cppflags=no
15371 cf_new_cflags=
15372 cf_new_cppflags=
15373 cf_new_extra_cppflags=
15374
15375 for cf_add_cflags in -g
15376 do
15377 case $cf_fix_cppflags in
15378 (no)
15379         case $cf_add_cflags in
15380         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15381                 case $cf_add_cflags in
15382                 (-D*)
15383                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15384
15385                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15386                                 && test -z "${cf_tst_cflags}" \
15387                                 && cf_fix_cppflags=yes
15388
15389                         if test $cf_fix_cppflags = yes ; then
15390
15391         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15392         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15393
15394                                 continue
15395                         elif test "${cf_tst_cflags}" = "\"'" ; then
15396
15397         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15398         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15399
15400                                 continue
15401                         fi
15402                         ;;
15403                 esac
15404                 case "$CPPFLAGS" in
15405                 (*$cf_add_cflags)
15406                         ;;
15407                 (*)
15408                         case $cf_add_cflags in
15409                         (-D*)
15410                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15411
15412 CPPFLAGS=`echo "$CPPFLAGS" | \
15413         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15414                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15415
15416                                 ;;
15417                         esac
15418
15419         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15420         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15421
15422                         ;;
15423                 esac
15424                 ;;
15425         (*)
15426
15427         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15428         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15429
15430                 ;;
15431         esac
15432         ;;
15433 (yes)
15434
15435         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15436         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15437
15438         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15439
15440         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15441                 && test -z "${cf_tst_cflags}" \
15442                 && cf_fix_cppflags=no
15443         ;;
15444 esac
15445 done
15446
15447 if test -n "$cf_new_cflags" ; then
15448
15449         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15450         CFLAGS="${CFLAGS}$cf_new_cflags"
15451
15452 fi
15453
15454 if test -n "$cf_new_cppflags" ; then
15455
15456         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15457         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15458
15459 fi
15460
15461 if test -n "$cf_new_extra_cppflags" ; then
15462
15463         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15464         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15465
15466 fi
15467
15468                 ;;
15469         esac
15470         ;;
15471 esac
15472
15473 if test "$with_dbmalloc" = yes ; then
15474         echo "$as_me:15474: checking for dbmalloc.h" >&5
15475 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
15476 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
15477   echo $ECHO_N "(cached) $ECHO_C" >&6
15478 else
15479   cat >conftest.$ac_ext <<_ACEOF
15480 #line 15480 "configure"
15481 #include "confdefs.h"
15482 #include <dbmalloc.h>
15483 _ACEOF
15484 if { (eval echo "$as_me:15484: \"$ac_cpp conftest.$ac_ext\"") >&5
15485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15486   ac_status=$?
15487   egrep -v '^ *\+' conftest.er1 >conftest.err
15488   rm -f conftest.er1
15489   cat conftest.err >&5
15490   echo "$as_me:15490: \$? = $ac_status" >&5
15491   (exit $ac_status); } >/dev/null; then
15492   if test -s conftest.err; then
15493     ac_cpp_err=$ac_c_preproc_warn_flag
15494   else
15495     ac_cpp_err=
15496   fi
15497 else
15498   ac_cpp_err=yes
15499 fi
15500 if test -z "$ac_cpp_err"; then
15501   ac_cv_header_dbmalloc_h=yes
15502 else
15503   echo "$as_me: failed program was:" >&5
15504   cat conftest.$ac_ext >&5
15505   ac_cv_header_dbmalloc_h=no
15506 fi
15507 rm -f conftest.err conftest.$ac_ext
15508 fi
15509 echo "$as_me:15509: result: $ac_cv_header_dbmalloc_h" >&5
15510 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
15511 if test $ac_cv_header_dbmalloc_h = yes; then
15512
15513 echo "$as_me:15513: checking for debug_malloc in -ldbmalloc" >&5
15514 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
15515 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
15516   echo $ECHO_N "(cached) $ECHO_C" >&6
15517 else
15518   ac_check_lib_save_LIBS=$LIBS
15519 LIBS="-ldbmalloc  $LIBS"
15520 cat >conftest.$ac_ext <<_ACEOF
15521 #line 15521 "configure"
15522 #include "confdefs.h"
15523
15524 /* Override any gcc2 internal prototype to avoid an error.  */
15525 #ifdef __cplusplus
15526 extern "C"
15527 #endif
15528 /* We use char because int might match the return type of a gcc2
15529    builtin and then its argument prototype would still apply.  */
15530 char debug_malloc ();
15531 int
15532 main (void)
15533 {
15534 debug_malloc ();
15535   ;
15536   return 0;
15537 }
15538 _ACEOF
15539 rm -f conftest.$ac_objext conftest$ac_exeext
15540 if { (eval echo "$as_me:15540: \"$ac_link\"") >&5
15541   (eval $ac_link) 2>&5
15542   ac_status=$?
15543   echo "$as_me:15543: \$? = $ac_status" >&5
15544   (exit $ac_status); } &&
15545          { ac_try='test -s conftest$ac_exeext'
15546   { (eval echo "$as_me:15546: \"$ac_try\"") >&5
15547   (eval $ac_try) 2>&5
15548   ac_status=$?
15549   echo "$as_me:15549: \$? = $ac_status" >&5
15550   (exit $ac_status); }; }; then
15551   ac_cv_lib_dbmalloc_debug_malloc=yes
15552 else
15553   echo "$as_me: failed program was:" >&5
15554 cat conftest.$ac_ext >&5
15555 ac_cv_lib_dbmalloc_debug_malloc=no
15556 fi
15557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15558 LIBS=$ac_check_lib_save_LIBS
15559 fi
15560 echo "$as_me:15560: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
15561 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
15562 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
15563   cat >>confdefs.h <<EOF
15564 #define HAVE_LIBDBMALLOC 1
15565 EOF
15566
15567   LIBS="-ldbmalloc $LIBS"
15568
15569 fi
15570
15571 fi
15572
15573 fi
15574
15575 echo "$as_me:15575: checking if you want to use valgrind for testing" >&5
15576 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
15577
15578 # Check whether --with-valgrind or --without-valgrind was given.
15579 if test "${with_valgrind+set}" = set; then
15580   withval="$with_valgrind"
15581
15582 cat >>confdefs.h <<EOF
15583 #define USE_VALGRIND 1
15584 EOF
15585
15586         : ${with_cflags:=-g}
15587         : ${with_no_leaks:=yes}
15588          with_valgrind=yes
15589 else
15590   with_valgrind=
15591 fi;
15592 echo "$as_me:15592: result: ${with_valgrind:-no}" >&5
15593 echo "${ECHO_T}${with_valgrind:-no}" >&6
15594
15595 case .$with_cflags in
15596 (.*-g*)
15597         case .$CFLAGS in
15598         (.*-g*)
15599                 ;;
15600         (*)
15601
15602 cf_fix_cppflags=no
15603 cf_new_cflags=
15604 cf_new_cppflags=
15605 cf_new_extra_cppflags=
15606
15607 for cf_add_cflags in -g
15608 do
15609 case $cf_fix_cppflags in
15610 (no)
15611         case $cf_add_cflags in
15612         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15613                 case $cf_add_cflags in
15614                 (-D*)
15615                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15616
15617                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15618                                 && test -z "${cf_tst_cflags}" \
15619                                 && cf_fix_cppflags=yes
15620
15621                         if test $cf_fix_cppflags = yes ; then
15622
15623         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15624         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15625
15626                                 continue
15627                         elif test "${cf_tst_cflags}" = "\"'" ; then
15628
15629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15631
15632                                 continue
15633                         fi
15634                         ;;
15635                 esac
15636                 case "$CPPFLAGS" in
15637                 (*$cf_add_cflags)
15638                         ;;
15639                 (*)
15640                         case $cf_add_cflags in
15641                         (-D*)
15642                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15643
15644 CPPFLAGS=`echo "$CPPFLAGS" | \
15645         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15646                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15647
15648                                 ;;
15649                         esac
15650
15651         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15652         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15653
15654                         ;;
15655                 esac
15656                 ;;
15657         (*)
15658
15659         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15660         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15661
15662                 ;;
15663         esac
15664         ;;
15665 (yes)
15666
15667         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15668         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15669
15670         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15671
15672         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15673                 && test -z "${cf_tst_cflags}" \
15674                 && cf_fix_cppflags=no
15675         ;;
15676 esac
15677 done
15678
15679 if test -n "$cf_new_cflags" ; then
15680
15681         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15682         CFLAGS="${CFLAGS}$cf_new_cflags"
15683
15684 fi
15685
15686 if test -n "$cf_new_cppflags" ; then
15687
15688         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15689         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15690
15691 fi
15692
15693 if test -n "$cf_new_extra_cppflags" ; then
15694
15695         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15696         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15697
15698 fi
15699
15700                 ;;
15701         esac
15702         ;;
15703 esac
15704
15705 echo "$as_me:15705: checking if you want to perform memory-leak testing" >&5
15706 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15707
15708 # Check whether --enable-leaks or --disable-leaks was given.
15709 if test "${enable_leaks+set}" = set; then
15710   enableval="$enable_leaks"
15711   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15712 else
15713   : ${with_no_leaks:=no}
15714 fi;
15715 echo "$as_me:15715: result: $with_no_leaks" >&5
15716 echo "${ECHO_T}$with_no_leaks" >&6
15717
15718 if test "$with_no_leaks" = yes ; then
15719
15720 cat >>confdefs.h <<\EOF
15721 #define NO_LEAKS 1
15722 EOF
15723
15724 cat >>confdefs.h <<\EOF
15725 #define YY_NO_LEAKS 1
15726 EOF
15727
15728 fi
15729
15730 cat >>confdefs.h <<\EOF
15731 #define HAVE_NC_ALLOC_H 1
15732 EOF
15733
15734 ###     use option --enable-expanded to generate certain macros as functions
15735
15736 # Check whether --enable-expanded or --disable-expanded was given.
15737 if test "${enable_expanded+set}" = set; then
15738   enableval="$enable_expanded"
15739   test "x$enableval" = xyes &&
15740 cat >>confdefs.h <<\EOF
15741 #define NCURSES_EXPANDED 1
15742 EOF
15743
15744 fi;
15745
15746 ###     use option --disable-macros to suppress macros in favor of functions
15747
15748 # Check whether --enable-macros or --disable-macros was given.
15749 if test "${enable_macros+set}" = set; then
15750   enableval="$enable_macros"
15751   test "$enableval" = no &&
15752 cat >>confdefs.h <<\EOF
15753 #define NCURSES_NOMACROS 1
15754 EOF
15755
15756 fi;
15757
15758 # Normally we only add trace() to the debug-library.  Allow this to be
15759 # extended to all models of the ncurses library:
15760 cf_all_traces=no
15761 case "$CFLAGS $CPPFLAGS" in
15762 (*-DTRACE*)
15763         cf_all_traces=yes
15764         ;;
15765 esac
15766
15767 echo "$as_me:15767: checking whether to add trace feature to all models" >&5
15768 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15769
15770 # Check whether --with-trace or --without-trace was given.
15771 if test "${with_trace+set}" = set; then
15772   withval="$with_trace"
15773   cf_with_trace=$withval
15774 else
15775   cf_with_trace=$cf_all_traces
15776 fi;
15777 echo "$as_me:15777: result: $cf_with_trace" >&5
15778 echo "${ECHO_T}$cf_with_trace" >&6
15779
15780 if test "x$cf_with_trace" = xyes ; then
15781         LIB_TRACING=all
15782         ADA_TRACE=TRUE
15783
15784 cf_fix_cppflags=no
15785 cf_new_cflags=
15786 cf_new_cppflags=
15787 cf_new_extra_cppflags=
15788
15789 for cf_add_cflags in -DTRACE
15790 do
15791 case $cf_fix_cppflags in
15792 (no)
15793         case $cf_add_cflags in
15794         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15795                 case $cf_add_cflags in
15796                 (-D*)
15797                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15798
15799                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15800                                 && test -z "${cf_tst_cflags}" \
15801                                 && cf_fix_cppflags=yes
15802
15803                         if test $cf_fix_cppflags = yes ; then
15804
15805         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15806         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15807
15808                                 continue
15809                         elif test "${cf_tst_cflags}" = "\"'" ; then
15810
15811         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15812         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15813
15814                                 continue
15815                         fi
15816                         ;;
15817                 esac
15818                 case "$CPPFLAGS" in
15819                 (*$cf_add_cflags)
15820                         ;;
15821                 (*)
15822                         case $cf_add_cflags in
15823                         (-D*)
15824                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15825
15826 CPPFLAGS=`echo "$CPPFLAGS" | \
15827         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15828                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15829
15830                                 ;;
15831                         esac
15832
15833         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15834         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15835
15836                         ;;
15837                 esac
15838                 ;;
15839         (*)
15840
15841         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15842         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15843
15844                 ;;
15845         esac
15846         ;;
15847 (yes)
15848
15849         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15850         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15851
15852         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15853
15854         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15855                 && test -z "${cf_tst_cflags}" \
15856                 && cf_fix_cppflags=no
15857         ;;
15858 esac
15859 done
15860
15861 if test -n "$cf_new_cflags" ; then
15862
15863         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15864         CFLAGS="${CFLAGS}$cf_new_cflags"
15865
15866 fi
15867
15868 if test -n "$cf_new_cppflags" ; then
15869
15870         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15871         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15872
15873 fi
15874
15875 if test -n "$cf_new_extra_cppflags" ; then
15876
15877         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15878         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15879
15880 fi
15881
15882 cat >>confdefs.h <<\EOF
15883 #define HAVE__TRACEF 1
15884 EOF
15885
15886 else
15887         LIB_TRACING=DEBUG
15888         ADA_TRACE=FALSE
15889 fi
15890
15891 echo "$as_me:15891: checking if we want to use GNAT projects" >&5
15892 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15893
15894 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15895 if test "${enable_gnat_projects+set}" = set; then
15896   enableval="$enable_gnat_projects"
15897   test "$enableval" != no && enableval=yes
15898         if test "$enableval" != "yes" ; then
15899     enable_gnat_projects=no
15900         else
15901                 enable_gnat_projects=yes
15902         fi
15903 else
15904   enableval=yes
15905         enable_gnat_projects=yes
15906
15907 fi;
15908 echo "$as_me:15908: result: $enable_gnat_projects" >&5
15909 echo "${ECHO_T}$enable_gnat_projects" >&6
15910
15911 ###     Checks for libraries.
15912 case $cf_cv_system_name in
15913 (*mingw32*|*mingw64*)
15914         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15915         LIBS=" -lpsapi $LIBS"
15916         ;;
15917 (*)
15918 echo "$as_me:15918: checking for gettimeofday" >&5
15919 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15920 if test "${ac_cv_func_gettimeofday+set}" = set; then
15921   echo $ECHO_N "(cached) $ECHO_C" >&6
15922 else
15923   cat >conftest.$ac_ext <<_ACEOF
15924 #line 15924 "configure"
15925 #include "confdefs.h"
15926 /* System header to define __stub macros and hopefully few prototypes,
15927     which can conflict with char gettimeofday (); below.  */
15928 #include <assert.h>
15929 /* Override any gcc2 internal prototype to avoid an error.  */
15930 #ifdef __cplusplus
15931 extern "C"
15932 #endif
15933 /* We use char because int might match the return type of a gcc2
15934    builtin and then its argument prototype would still apply.  */
15935 char gettimeofday ();
15936 char (*f) ();
15937
15938 int
15939 main (void)
15940 {
15941 /* The GNU C library defines this for functions which it implements
15942     to always fail with ENOSYS.  Some functions are actually named
15943     something starting with __ and the normal name is an alias.  */
15944 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15945 choke me
15946 #else
15947 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15948 #endif
15949
15950   ;
15951   return 0;
15952 }
15953 _ACEOF
15954 rm -f conftest.$ac_objext conftest$ac_exeext
15955 if { (eval echo "$as_me:15955: \"$ac_link\"") >&5
15956   (eval $ac_link) 2>&5
15957   ac_status=$?
15958   echo "$as_me:15958: \$? = $ac_status" >&5
15959   (exit $ac_status); } &&
15960          { ac_try='test -s conftest$ac_exeext'
15961   { (eval echo "$as_me:15961: \"$ac_try\"") >&5
15962   (eval $ac_try) 2>&5
15963   ac_status=$?
15964   echo "$as_me:15964: \$? = $ac_status" >&5
15965   (exit $ac_status); }; }; then
15966   ac_cv_func_gettimeofday=yes
15967 else
15968   echo "$as_me: failed program was:" >&5
15969 cat conftest.$ac_ext >&5
15970 ac_cv_func_gettimeofday=no
15971 fi
15972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15973 fi
15974 echo "$as_me:15974: result: $ac_cv_func_gettimeofday" >&5
15975 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15976 if test $ac_cv_func_gettimeofday = yes; then
15977
15978 cat >>confdefs.h <<\EOF
15979 #define HAVE_GETTIMEOFDAY 1
15980 EOF
15981
15982 else
15983
15984 echo "$as_me:15984: checking for gettimeofday in -lbsd" >&5
15985 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15986 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15987   echo $ECHO_N "(cached) $ECHO_C" >&6
15988 else
15989   ac_check_lib_save_LIBS=$LIBS
15990 LIBS="-lbsd  $LIBS"
15991 cat >conftest.$ac_ext <<_ACEOF
15992 #line 15992 "configure"
15993 #include "confdefs.h"
15994
15995 /* Override any gcc2 internal prototype to avoid an error.  */
15996 #ifdef __cplusplus
15997 extern "C"
15998 #endif
15999 /* We use char because int might match the return type of a gcc2
16000    builtin and then its argument prototype would still apply.  */
16001 char gettimeofday ();
16002 int
16003 main (void)
16004 {
16005 gettimeofday ();
16006   ;
16007   return 0;
16008 }
16009 _ACEOF
16010 rm -f conftest.$ac_objext conftest$ac_exeext
16011 if { (eval echo "$as_me:16011: \"$ac_link\"") >&5
16012   (eval $ac_link) 2>&5
16013   ac_status=$?
16014   echo "$as_me:16014: \$? = $ac_status" >&5
16015   (exit $ac_status); } &&
16016          { ac_try='test -s conftest$ac_exeext'
16017   { (eval echo "$as_me:16017: \"$ac_try\"") >&5
16018   (eval $ac_try) 2>&5
16019   ac_status=$?
16020   echo "$as_me:16020: \$? = $ac_status" >&5
16021   (exit $ac_status); }; }; then
16022   ac_cv_lib_bsd_gettimeofday=yes
16023 else
16024   echo "$as_me: failed program was:" >&5
16025 cat conftest.$ac_ext >&5
16026 ac_cv_lib_bsd_gettimeofday=no
16027 fi
16028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16029 LIBS=$ac_check_lib_save_LIBS
16030 fi
16031 echo "$as_me:16031: result: $ac_cv_lib_bsd_gettimeofday" >&5
16032 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16033 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16034
16035 cat >>confdefs.h <<\EOF
16036 #define HAVE_GETTIMEOFDAY 1
16037 EOF
16038
16039 cf_add_libs="-lbsd"
16040 # Filter out duplicates - this happens with badly-designed ".pc" files...
16041 for cf_add_1lib in $LIBS
16042 do
16043         for cf_add_2lib in $cf_add_libs
16044         do
16045                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16046                 then
16047                         cf_add_1lib=
16048                         break
16049                 fi
16050         done
16051         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16052 done
16053 LIBS="$cf_add_libs"
16054
16055 fi
16056
16057 fi
16058         ;;
16059 esac
16060
16061 echo "$as_me:16061: checking if -lm needed for math functions" >&5
16062 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16063 if test "${cf_cv_need_libm+set}" = set; then
16064   echo $ECHO_N "(cached) $ECHO_C" >&6
16065 else
16066
16067         cat >conftest.$ac_ext <<_ACEOF
16068 #line 16068 "configure"
16069 #include "confdefs.h"
16070
16071         #include <stdio.h>
16072         #include <stdlib.h>
16073         #include <math.h>
16074
16075 int
16076 main (void)
16077 {
16078 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16079   ;
16080   return 0;
16081 }
16082 _ACEOF
16083 rm -f conftest.$ac_objext conftest$ac_exeext
16084 if { (eval echo "$as_me:16084: \"$ac_link\"") >&5
16085   (eval $ac_link) 2>&5
16086   ac_status=$?
16087   echo "$as_me:16087: \$? = $ac_status" >&5
16088   (exit $ac_status); } &&
16089          { ac_try='test -s conftest$ac_exeext'
16090   { (eval echo "$as_me:16090: \"$ac_try\"") >&5
16091   (eval $ac_try) 2>&5
16092   ac_status=$?
16093   echo "$as_me:16093: \$? = $ac_status" >&5
16094   (exit $ac_status); }; }; then
16095   cf_cv_need_libm=no
16096 else
16097   echo "$as_me: failed program was:" >&5
16098 cat conftest.$ac_ext >&5
16099 cf_cv_need_libm=yes
16100 fi
16101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16102 fi
16103 echo "$as_me:16103: result: $cf_cv_need_libm" >&5
16104 echo "${ECHO_T}$cf_cv_need_libm" >&6
16105 if test "$cf_cv_need_libm" = yes
16106 then
16107 MATH_LIB=-lm
16108 fi
16109
16110 ###     Checks for header files.
16111 echo "$as_me:16111: checking for ANSI C header files" >&5
16112 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16113 if test "${ac_cv_header_stdc+set}" = set; then
16114   echo $ECHO_N "(cached) $ECHO_C" >&6
16115 else
16116   cat >conftest.$ac_ext <<_ACEOF
16117 #line 16117 "configure"
16118 #include "confdefs.h"
16119 #include <stdlib.h>
16120 #include <stdarg.h>
16121 #include <string.h>
16122 #include <float.h>
16123
16124 _ACEOF
16125 if { (eval echo "$as_me:16125: \"$ac_cpp conftest.$ac_ext\"") >&5
16126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16127   ac_status=$?
16128   egrep -v '^ *\+' conftest.er1 >conftest.err
16129   rm -f conftest.er1
16130   cat conftest.err >&5
16131   echo "$as_me:16131: \$? = $ac_status" >&5
16132   (exit $ac_status); } >/dev/null; then
16133   if test -s conftest.err; then
16134     ac_cpp_err=$ac_c_preproc_warn_flag
16135   else
16136     ac_cpp_err=
16137   fi
16138 else
16139   ac_cpp_err=yes
16140 fi
16141 if test -z "$ac_cpp_err"; then
16142   ac_cv_header_stdc=yes
16143 else
16144   echo "$as_me: failed program was:" >&5
16145   cat conftest.$ac_ext >&5
16146   ac_cv_header_stdc=no
16147 fi
16148 rm -f conftest.err conftest.$ac_ext
16149
16150 if test $ac_cv_header_stdc = yes; then
16151   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16152   cat >conftest.$ac_ext <<_ACEOF
16153 #line 16153 "configure"
16154 #include "confdefs.h"
16155 #include <string.h>
16156
16157 _ACEOF
16158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16159   egrep "memchr" >/dev/null 2>&1; then
16160   :
16161 else
16162   ac_cv_header_stdc=no
16163 fi
16164 rm -rf conftest*
16165
16166 fi
16167
16168 if test $ac_cv_header_stdc = yes; then
16169   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16170   cat >conftest.$ac_ext <<_ACEOF
16171 #line 16171 "configure"
16172 #include "confdefs.h"
16173 #include <stdlib.h>
16174
16175 _ACEOF
16176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16177   egrep "free" >/dev/null 2>&1; then
16178   :
16179 else
16180   ac_cv_header_stdc=no
16181 fi
16182 rm -rf conftest*
16183
16184 fi
16185
16186 if test $ac_cv_header_stdc = yes; then
16187   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16188   if test "$cross_compiling" = yes; then
16189   :
16190 else
16191   cat >conftest.$ac_ext <<_ACEOF
16192 #line 16192 "configure"
16193 #include "confdefs.h"
16194 #include <ctype.h>
16195 #if ((' ' & 0x0FF) == 0x020)
16196 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16197 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16198 #else
16199 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16200                      || ('j' <= (c) && (c) <= 'r') \
16201                      || ('s' <= (c) && (c) <= 'z'))
16202 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16203 #endif
16204
16205 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16206 int
16207 main (void)
16208 {
16209   int i;
16210   for (i = 0; i < 256; i++)
16211     if (XOR (islower (i), ISLOWER (i))
16212         || toupper (i) != TOUPPER (i))
16213       $ac_main_return(2);
16214   $ac_main_return (0);
16215 }
16216 _ACEOF
16217 rm -f conftest$ac_exeext
16218 if { (eval echo "$as_me:16218: \"$ac_link\"") >&5
16219   (eval $ac_link) 2>&5
16220   ac_status=$?
16221   echo "$as_me:16221: \$? = $ac_status" >&5
16222   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16223   { (eval echo "$as_me:16223: \"$ac_try\"") >&5
16224   (eval $ac_try) 2>&5
16225   ac_status=$?
16226   echo "$as_me:16226: \$? = $ac_status" >&5
16227   (exit $ac_status); }; }; then
16228   :
16229 else
16230   echo "$as_me: program exited with status $ac_status" >&5
16231 echo "$as_me: failed program was:" >&5
16232 cat conftest.$ac_ext >&5
16233 ac_cv_header_stdc=no
16234 fi
16235 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16236 fi
16237 fi
16238 fi
16239 echo "$as_me:16239: result: $ac_cv_header_stdc" >&5
16240 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16241 if test $ac_cv_header_stdc = yes; then
16242
16243 cat >>confdefs.h <<\EOF
16244 #define STDC_HEADERS 1
16245 EOF
16246
16247 fi
16248
16249 ac_header_dirent=no
16250 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16251   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16252 echo "$as_me:16252: checking for $ac_hdr that defines DIR" >&5
16253 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16254 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16255   echo $ECHO_N "(cached) $ECHO_C" >&6
16256 else
16257   cat >conftest.$ac_ext <<_ACEOF
16258 #line 16258 "configure"
16259 #include "confdefs.h"
16260 #include <sys/types.h>
16261 #include <$ac_hdr>
16262
16263 int
16264 main (void)
16265 {
16266 if ((DIR *) 0)
16267 return 0;
16268   ;
16269   return 0;
16270 }
16271 _ACEOF
16272 rm -f conftest.$ac_objext
16273 if { (eval echo "$as_me:16273: \"$ac_compile\"") >&5
16274   (eval $ac_compile) 2>&5
16275   ac_status=$?
16276   echo "$as_me:16276: \$? = $ac_status" >&5
16277   (exit $ac_status); } &&
16278          { ac_try='test -s conftest.$ac_objext'
16279   { (eval echo "$as_me:16279: \"$ac_try\"") >&5
16280   (eval $ac_try) 2>&5
16281   ac_status=$?
16282   echo "$as_me:16282: \$? = $ac_status" >&5
16283   (exit $ac_status); }; }; then
16284   eval "$as_ac_Header=yes"
16285 else
16286   echo "$as_me: failed program was:" >&5
16287 cat conftest.$ac_ext >&5
16288 eval "$as_ac_Header=no"
16289 fi
16290 rm -f conftest.$ac_objext conftest.$ac_ext
16291 fi
16292 echo "$as_me:16292: result: `eval echo '${'$as_ac_Header'}'`" >&5
16293 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16294 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16295   cat >>confdefs.h <<EOF
16296 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16297 EOF
16298
16299 ac_header_dirent=$ac_hdr; break
16300 fi
16301
16302 done
16303 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16304 if test $ac_header_dirent = dirent.h; then
16305   echo "$as_me:16305: checking for opendir in -ldir" >&5
16306 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16307 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16308   echo $ECHO_N "(cached) $ECHO_C" >&6
16309 else
16310   ac_check_lib_save_LIBS=$LIBS
16311 LIBS="-ldir  $LIBS"
16312 cat >conftest.$ac_ext <<_ACEOF
16313 #line 16313 "configure"
16314 #include "confdefs.h"
16315
16316 /* Override any gcc2 internal prototype to avoid an error.  */
16317 #ifdef __cplusplus
16318 extern "C"
16319 #endif
16320 /* We use char because int might match the return type of a gcc2
16321    builtin and then its argument prototype would still apply.  */
16322 char opendir ();
16323 int
16324 main (void)
16325 {
16326 opendir ();
16327   ;
16328   return 0;
16329 }
16330 _ACEOF
16331 rm -f conftest.$ac_objext conftest$ac_exeext
16332 if { (eval echo "$as_me:16332: \"$ac_link\"") >&5
16333   (eval $ac_link) 2>&5
16334   ac_status=$?
16335   echo "$as_me:16335: \$? = $ac_status" >&5
16336   (exit $ac_status); } &&
16337          { ac_try='test -s conftest$ac_exeext'
16338   { (eval echo "$as_me:16338: \"$ac_try\"") >&5
16339   (eval $ac_try) 2>&5
16340   ac_status=$?
16341   echo "$as_me:16341: \$? = $ac_status" >&5
16342   (exit $ac_status); }; }; then
16343   ac_cv_lib_dir_opendir=yes
16344 else
16345   echo "$as_me: failed program was:" >&5
16346 cat conftest.$ac_ext >&5
16347 ac_cv_lib_dir_opendir=no
16348 fi
16349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16350 LIBS=$ac_check_lib_save_LIBS
16351 fi
16352 echo "$as_me:16352: result: $ac_cv_lib_dir_opendir" >&5
16353 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16354 if test $ac_cv_lib_dir_opendir = yes; then
16355   LIBS="$LIBS -ldir"
16356 fi
16357
16358 else
16359   echo "$as_me:16359: checking for opendir in -lx" >&5
16360 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16361 if test "${ac_cv_lib_x_opendir+set}" = set; then
16362   echo $ECHO_N "(cached) $ECHO_C" >&6
16363 else
16364   ac_check_lib_save_LIBS=$LIBS
16365 LIBS="-lx  $LIBS"
16366 cat >conftest.$ac_ext <<_ACEOF
16367 #line 16367 "configure"
16368 #include "confdefs.h"
16369
16370 /* Override any gcc2 internal prototype to avoid an error.  */
16371 #ifdef __cplusplus
16372 extern "C"
16373 #endif
16374 /* We use char because int might match the return type of a gcc2
16375    builtin and then its argument prototype would still apply.  */
16376 char opendir ();
16377 int
16378 main (void)
16379 {
16380 opendir ();
16381   ;
16382   return 0;
16383 }
16384 _ACEOF
16385 rm -f conftest.$ac_objext conftest$ac_exeext
16386 if { (eval echo "$as_me:16386: \"$ac_link\"") >&5
16387   (eval $ac_link) 2>&5
16388   ac_status=$?
16389   echo "$as_me:16389: \$? = $ac_status" >&5
16390   (exit $ac_status); } &&
16391          { ac_try='test -s conftest$ac_exeext'
16392   { (eval echo "$as_me:16392: \"$ac_try\"") >&5
16393   (eval $ac_try) 2>&5
16394   ac_status=$?
16395   echo "$as_me:16395: \$? = $ac_status" >&5
16396   (exit $ac_status); }; }; then
16397   ac_cv_lib_x_opendir=yes
16398 else
16399   echo "$as_me: failed program was:" >&5
16400 cat conftest.$ac_ext >&5
16401 ac_cv_lib_x_opendir=no
16402 fi
16403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16404 LIBS=$ac_check_lib_save_LIBS
16405 fi
16406 echo "$as_me:16406: result: $ac_cv_lib_x_opendir" >&5
16407 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16408 if test $ac_cv_lib_x_opendir = yes; then
16409   LIBS="$LIBS -lx"
16410 fi
16411
16412 fi
16413
16414 echo "$as_me:16414: checking whether time.h and sys/time.h may both be included" >&5
16415 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16416 if test "${ac_cv_header_time+set}" = set; then
16417   echo $ECHO_N "(cached) $ECHO_C" >&6
16418 else
16419   cat >conftest.$ac_ext <<_ACEOF
16420 #line 16420 "configure"
16421 #include "confdefs.h"
16422 #include <sys/types.h>
16423 #include <sys/time.h>
16424 #include <time.h>
16425
16426 int
16427 main (void)
16428 {
16429 if ((struct tm *) 0)
16430 return 0;
16431   ;
16432   return 0;
16433 }
16434 _ACEOF
16435 rm -f conftest.$ac_objext
16436 if { (eval echo "$as_me:16436: \"$ac_compile\"") >&5
16437   (eval $ac_compile) 2>&5
16438   ac_status=$?
16439   echo "$as_me:16439: \$? = $ac_status" >&5
16440   (exit $ac_status); } &&
16441          { ac_try='test -s conftest.$ac_objext'
16442   { (eval echo "$as_me:16442: \"$ac_try\"") >&5
16443   (eval $ac_try) 2>&5
16444   ac_status=$?
16445   echo "$as_me:16445: \$? = $ac_status" >&5
16446   (exit $ac_status); }; }; then
16447   ac_cv_header_time=yes
16448 else
16449   echo "$as_me: failed program was:" >&5
16450 cat conftest.$ac_ext >&5
16451 ac_cv_header_time=no
16452 fi
16453 rm -f conftest.$ac_objext conftest.$ac_ext
16454 fi
16455 echo "$as_me:16455: result: $ac_cv_header_time" >&5
16456 echo "${ECHO_T}$ac_cv_header_time" >&6
16457 if test $ac_cv_header_time = yes; then
16458
16459 cat >>confdefs.h <<\EOF
16460 #define TIME_WITH_SYS_TIME 1
16461 EOF
16462
16463 fi
16464
16465 cf_regex_func=no
16466
16467 cf_regex_libs="regex re"
16468 case $host_os in
16469 (mingw*)
16470         cf_regex_libs="gnurx $cf_regex_libs"
16471         ;;
16472 esac
16473
16474 echo "$as_me:16474: checking for regcomp" >&5
16475 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
16476 if test "${ac_cv_func_regcomp+set}" = set; then
16477   echo $ECHO_N "(cached) $ECHO_C" >&6
16478 else
16479   cat >conftest.$ac_ext <<_ACEOF
16480 #line 16480 "configure"
16481 #include "confdefs.h"
16482 /* System header to define __stub macros and hopefully few prototypes,
16483     which can conflict with char regcomp (); below.  */
16484 #include <assert.h>
16485 /* Override any gcc2 internal prototype to avoid an error.  */
16486 #ifdef __cplusplus
16487 extern "C"
16488 #endif
16489 /* We use char because int might match the return type of a gcc2
16490    builtin and then its argument prototype would still apply.  */
16491 char regcomp ();
16492 char (*f) ();
16493
16494 int
16495 main (void)
16496 {
16497 /* The GNU C library defines this for functions which it implements
16498     to always fail with ENOSYS.  Some functions are actually named
16499     something starting with __ and the normal name is an alias.  */
16500 #if defined (__stub_regcomp) || defined (__stub___regcomp)
16501 choke me
16502 #else
16503 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16504 #endif
16505
16506   ;
16507   return 0;
16508 }
16509 _ACEOF
16510 rm -f conftest.$ac_objext conftest$ac_exeext
16511 if { (eval echo "$as_me:16511: \"$ac_link\"") >&5
16512   (eval $ac_link) 2>&5
16513   ac_status=$?
16514   echo "$as_me:16514: \$? = $ac_status" >&5
16515   (exit $ac_status); } &&
16516          { ac_try='test -s conftest$ac_exeext'
16517   { (eval echo "$as_me:16517: \"$ac_try\"") >&5
16518   (eval $ac_try) 2>&5
16519   ac_status=$?
16520   echo "$as_me:16520: \$? = $ac_status" >&5
16521   (exit $ac_status); }; }; then
16522   ac_cv_func_regcomp=yes
16523 else
16524   echo "$as_me: failed program was:" >&5
16525 cat conftest.$ac_ext >&5
16526 ac_cv_func_regcomp=no
16527 fi
16528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16529 fi
16530 echo "$as_me:16530: result: $ac_cv_func_regcomp" >&5
16531 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
16532 if test $ac_cv_func_regcomp = yes; then
16533   cf_regex_func=regcomp
16534 else
16535
16536         for cf_regex_lib in $cf_regex_libs
16537         do
16538                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
16539 echo "$as_me:16539: checking for regcomp in -l$cf_regex_lib" >&5
16540 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
16541 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16542   echo $ECHO_N "(cached) $ECHO_C" >&6
16543 else
16544   ac_check_lib_save_LIBS=$LIBS
16545 LIBS="-l$cf_regex_lib  $LIBS"
16546 cat >conftest.$ac_ext <<_ACEOF
16547 #line 16547 "configure"
16548 #include "confdefs.h"
16549
16550 /* Override any gcc2 internal prototype to avoid an error.  */
16551 #ifdef __cplusplus
16552 extern "C"
16553 #endif
16554 /* We use char because int might match the return type of a gcc2
16555    builtin and then its argument prototype would still apply.  */
16556 char regcomp ();
16557 int
16558 main (void)
16559 {
16560 regcomp ();
16561   ;
16562   return 0;
16563 }
16564 _ACEOF
16565 rm -f conftest.$ac_objext conftest$ac_exeext
16566 if { (eval echo "$as_me:16566: \"$ac_link\"") >&5
16567   (eval $ac_link) 2>&5
16568   ac_status=$?
16569   echo "$as_me:16569: \$? = $ac_status" >&5
16570   (exit $ac_status); } &&
16571          { ac_try='test -s conftest$ac_exeext'
16572   { (eval echo "$as_me:16572: \"$ac_try\"") >&5
16573   (eval $ac_try) 2>&5
16574   ac_status=$?
16575   echo "$as_me:16575: \$? = $ac_status" >&5
16576   (exit $ac_status); }; }; then
16577   eval "$as_ac_Lib=yes"
16578 else
16579   echo "$as_me: failed program was:" >&5
16580 cat conftest.$ac_ext >&5
16581 eval "$as_ac_Lib=no"
16582 fi
16583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16584 LIBS=$ac_check_lib_save_LIBS
16585 fi
16586 echo "$as_me:16586: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16587 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16588 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16589
16590 cf_add_libs="-l$cf_regex_lib"
16591 # Filter out duplicates - this happens with badly-designed ".pc" files...
16592 for cf_add_1lib in $LIBS
16593 do
16594         for cf_add_2lib in $cf_add_libs
16595         do
16596                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16597                 then
16598                         cf_add_1lib=
16599                         break
16600                 fi
16601         done
16602         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16603 done
16604 LIBS="$cf_add_libs"
16605
16606                                 cf_regex_func=regcomp
16607                                 break
16608 fi
16609
16610         done
16611
16612 fi
16613
16614 if test "$cf_regex_func" = no ; then
16615         echo "$as_me:16615: checking for compile" >&5
16616 echo $ECHO_N "checking for compile... $ECHO_C" >&6
16617 if test "${ac_cv_func_compile+set}" = set; then
16618   echo $ECHO_N "(cached) $ECHO_C" >&6
16619 else
16620   cat >conftest.$ac_ext <<_ACEOF
16621 #line 16621 "configure"
16622 #include "confdefs.h"
16623 /* System header to define __stub macros and hopefully few prototypes,
16624     which can conflict with char compile (); below.  */
16625 #include <assert.h>
16626 /* Override any gcc2 internal prototype to avoid an error.  */
16627 #ifdef __cplusplus
16628 extern "C"
16629 #endif
16630 /* We use char because int might match the return type of a gcc2
16631    builtin and then its argument prototype would still apply.  */
16632 char compile ();
16633 char (*f) ();
16634
16635 int
16636 main (void)
16637 {
16638 /* The GNU C library defines this for functions which it implements
16639     to always fail with ENOSYS.  Some functions are actually named
16640     something starting with __ and the normal name is an alias.  */
16641 #if defined (__stub_compile) || defined (__stub___compile)
16642 choke me
16643 #else
16644 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16645 #endif
16646
16647   ;
16648   return 0;
16649 }
16650 _ACEOF
16651 rm -f conftest.$ac_objext conftest$ac_exeext
16652 if { (eval echo "$as_me:16652: \"$ac_link\"") >&5
16653   (eval $ac_link) 2>&5
16654   ac_status=$?
16655   echo "$as_me:16655: \$? = $ac_status" >&5
16656   (exit $ac_status); } &&
16657          { ac_try='test -s conftest$ac_exeext'
16658   { (eval echo "$as_me:16658: \"$ac_try\"") >&5
16659   (eval $ac_try) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); }; }; then
16663   ac_cv_func_compile=yes
16664 else
16665   echo "$as_me: failed program was:" >&5
16666 cat conftest.$ac_ext >&5
16667 ac_cv_func_compile=no
16668 fi
16669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16670 fi
16671 echo "$as_me:16671: result: $ac_cv_func_compile" >&5
16672 echo "${ECHO_T}$ac_cv_func_compile" >&6
16673 if test $ac_cv_func_compile = yes; then
16674   cf_regex_func=compile
16675 else
16676
16677                 echo "$as_me:16677: checking for compile in -lgen" >&5
16678 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16679 if test "${ac_cv_lib_gen_compile+set}" = set; then
16680   echo $ECHO_N "(cached) $ECHO_C" >&6
16681 else
16682   ac_check_lib_save_LIBS=$LIBS
16683 LIBS="-lgen  $LIBS"
16684 cat >conftest.$ac_ext <<_ACEOF
16685 #line 16685 "configure"
16686 #include "confdefs.h"
16687
16688 /* Override any gcc2 internal prototype to avoid an error.  */
16689 #ifdef __cplusplus
16690 extern "C"
16691 #endif
16692 /* We use char because int might match the return type of a gcc2
16693    builtin and then its argument prototype would still apply.  */
16694 char compile ();
16695 int
16696 main (void)
16697 {
16698 compile ();
16699   ;
16700   return 0;
16701 }
16702 _ACEOF
16703 rm -f conftest.$ac_objext conftest$ac_exeext
16704 if { (eval echo "$as_me:16704: \"$ac_link\"") >&5
16705   (eval $ac_link) 2>&5
16706   ac_status=$?
16707   echo "$as_me:16707: \$? = $ac_status" >&5
16708   (exit $ac_status); } &&
16709          { ac_try='test -s conftest$ac_exeext'
16710   { (eval echo "$as_me:16710: \"$ac_try\"") >&5
16711   (eval $ac_try) 2>&5
16712   ac_status=$?
16713   echo "$as_me:16713: \$? = $ac_status" >&5
16714   (exit $ac_status); }; }; then
16715   ac_cv_lib_gen_compile=yes
16716 else
16717   echo "$as_me: failed program was:" >&5
16718 cat conftest.$ac_ext >&5
16719 ac_cv_lib_gen_compile=no
16720 fi
16721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16722 LIBS=$ac_check_lib_save_LIBS
16723 fi
16724 echo "$as_me:16724: result: $ac_cv_lib_gen_compile" >&5
16725 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16726 if test $ac_cv_lib_gen_compile = yes; then
16727
16728 cf_add_libs="-lgen"
16729 # Filter out duplicates - this happens with badly-designed ".pc" files...
16730 for cf_add_1lib in $LIBS
16731 do
16732         for cf_add_2lib in $cf_add_libs
16733         do
16734                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16735                 then
16736                         cf_add_1lib=
16737                         break
16738                 fi
16739         done
16740         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16741 done
16742 LIBS="$cf_add_libs"
16743
16744                                 cf_regex_func=compile
16745 fi
16746
16747 fi
16748
16749 fi
16750
16751 if test "$cf_regex_func" = no ; then
16752         { echo "$as_me:16752: WARNING: cannot find regular expression library" >&5
16753 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16754 fi
16755
16756 echo "$as_me:16756: checking for regular-expression headers" >&5
16757 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16758 if test "${cf_cv_regex_hdrs+set}" = set; then
16759   echo $ECHO_N "(cached) $ECHO_C" >&6
16760 else
16761
16762 cf_cv_regex_hdrs=no
16763 case $cf_regex_func in
16764 (compile)
16765         for cf_regex_hdr in regexp.h regexpr.h
16766         do
16767                 cat >conftest.$ac_ext <<_ACEOF
16768 #line 16768 "configure"
16769 #include "confdefs.h"
16770 #include <$cf_regex_hdr>
16771 int
16772 main (void)
16773 {
16774
16775                         char *p = compile("", "", "", 0);
16776                         int x = step("", "");
16777
16778   ;
16779   return 0;
16780 }
16781 _ACEOF
16782 rm -f conftest.$ac_objext conftest$ac_exeext
16783 if { (eval echo "$as_me:16783: \"$ac_link\"") >&5
16784   (eval $ac_link) 2>&5
16785   ac_status=$?
16786   echo "$as_me:16786: \$? = $ac_status" >&5
16787   (exit $ac_status); } &&
16788          { ac_try='test -s conftest$ac_exeext'
16789   { (eval echo "$as_me:16789: \"$ac_try\"") >&5
16790   (eval $ac_try) 2>&5
16791   ac_status=$?
16792   echo "$as_me:16792: \$? = $ac_status" >&5
16793   (exit $ac_status); }; }; then
16794
16795                         cf_cv_regex_hdrs=$cf_regex_hdr
16796                         break
16797
16798 else
16799   echo "$as_me: failed program was:" >&5
16800 cat conftest.$ac_ext >&5
16801 fi
16802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16803         done
16804         ;;
16805 (*)
16806         for cf_regex_hdr in regex.h
16807         do
16808                 cat >conftest.$ac_ext <<_ACEOF
16809 #line 16809 "configure"
16810 #include "confdefs.h"
16811 #include <sys/types.h>
16812 #include <$cf_regex_hdr>
16813 int
16814 main (void)
16815 {
16816
16817                         regex_t *p;
16818                         int x = regcomp(p, "", 0);
16819                         int y = regexec(p, "", 0, 0, 0);
16820                         regfree(p);
16821
16822   ;
16823   return 0;
16824 }
16825 _ACEOF
16826 rm -f conftest.$ac_objext conftest$ac_exeext
16827 if { (eval echo "$as_me:16827: \"$ac_link\"") >&5
16828   (eval $ac_link) 2>&5
16829   ac_status=$?
16830   echo "$as_me:16830: \$? = $ac_status" >&5
16831   (exit $ac_status); } &&
16832          { ac_try='test -s conftest$ac_exeext'
16833   { (eval echo "$as_me:16833: \"$ac_try\"") >&5
16834   (eval $ac_try) 2>&5
16835   ac_status=$?
16836   echo "$as_me:16836: \$? = $ac_status" >&5
16837   (exit $ac_status); }; }; then
16838
16839                         cf_cv_regex_hdrs=$cf_regex_hdr
16840                         break
16841
16842 else
16843   echo "$as_me: failed program was:" >&5
16844 cat conftest.$ac_ext >&5
16845 fi
16846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16847         done
16848         ;;
16849 esac
16850
16851 fi
16852 echo "$as_me:16852: result: $cf_cv_regex_hdrs" >&5
16853 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16854
16855 case $cf_cv_regex_hdrs in
16856         (no)            { echo "$as_me:16856: WARNING: no regular expression header found" >&5
16857 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16858         (regex.h)
16859 cat >>confdefs.h <<\EOF
16860 #define HAVE_REGEX_H_FUNCS 1
16861 EOF
16862  ;;
16863         (regexp.h)
16864 cat >>confdefs.h <<\EOF
16865 #define HAVE_REGEXP_H_FUNCS 1
16866 EOF
16867  ;;
16868         (regexpr.h)
16869 cat >>confdefs.h <<\EOF
16870 #define HAVE_REGEXPR_H_FUNCS 1
16871 EOF
16872  ;;
16873 esac
16874
16875 for ac_header in \
16876 fcntl.h \
16877 getopt.h \
16878 limits.h \
16879 locale.h \
16880 math.h \
16881 poll.h \
16882 sys/bsdtypes.h \
16883 sys/ioctl.h \
16884 sys/param.h \
16885 sys/poll.h \
16886 sys/select.h \
16887 sys/time.h \
16888 sys/times.h \
16889 ttyent.h \
16890 unistd.h \
16891 wctype.h \
16892
16893 do
16894 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16895 echo "$as_me:16895: checking for $ac_header" >&5
16896 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16897 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16898   echo $ECHO_N "(cached) $ECHO_C" >&6
16899 else
16900   cat >conftest.$ac_ext <<_ACEOF
16901 #line 16901 "configure"
16902 #include "confdefs.h"
16903 #include <$ac_header>
16904 _ACEOF
16905 if { (eval echo "$as_me:16905: \"$ac_cpp conftest.$ac_ext\"") >&5
16906   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16907   ac_status=$?
16908   egrep -v '^ *\+' conftest.er1 >conftest.err
16909   rm -f conftest.er1
16910   cat conftest.err >&5
16911   echo "$as_me:16911: \$? = $ac_status" >&5
16912   (exit $ac_status); } >/dev/null; then
16913   if test -s conftest.err; then
16914     ac_cpp_err=$ac_c_preproc_warn_flag
16915   else
16916     ac_cpp_err=
16917   fi
16918 else
16919   ac_cpp_err=yes
16920 fi
16921 if test -z "$ac_cpp_err"; then
16922   eval "$as_ac_Header=yes"
16923 else
16924   echo "$as_me: failed program was:" >&5
16925   cat conftest.$ac_ext >&5
16926   eval "$as_ac_Header=no"
16927 fi
16928 rm -f conftest.err conftest.$ac_ext
16929 fi
16930 echo "$as_me:16930: result: `eval echo '${'$as_ac_Header'}'`" >&5
16931 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16932 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16933   cat >>confdefs.h <<EOF
16934 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16935 EOF
16936
16937 fi
16938 done
16939
16940 for ac_header in unistd.h getopt.h
16941 do
16942 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16943 echo "$as_me:16943: checking for $ac_header" >&5
16944 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16945 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16946   echo $ECHO_N "(cached) $ECHO_C" >&6
16947 else
16948   cat >conftest.$ac_ext <<_ACEOF
16949 #line 16949 "configure"
16950 #include "confdefs.h"
16951 #include <$ac_header>
16952 _ACEOF
16953 if { (eval echo "$as_me:16953: \"$ac_cpp conftest.$ac_ext\"") >&5
16954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16955   ac_status=$?
16956   egrep -v '^ *\+' conftest.er1 >conftest.err
16957   rm -f conftest.er1
16958   cat conftest.err >&5
16959   echo "$as_me:16959: \$? = $ac_status" >&5
16960   (exit $ac_status); } >/dev/null; then
16961   if test -s conftest.err; then
16962     ac_cpp_err=$ac_c_preproc_warn_flag
16963   else
16964     ac_cpp_err=
16965   fi
16966 else
16967   ac_cpp_err=yes
16968 fi
16969 if test -z "$ac_cpp_err"; then
16970   eval "$as_ac_Header=yes"
16971 else
16972   echo "$as_me: failed program was:" >&5
16973   cat conftest.$ac_ext >&5
16974   eval "$as_ac_Header=no"
16975 fi
16976 rm -f conftest.err conftest.$ac_ext
16977 fi
16978 echo "$as_me:16978: result: `eval echo '${'$as_ac_Header'}'`" >&5
16979 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16980 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16981   cat >>confdefs.h <<EOF
16982 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16983 EOF
16984
16985 fi
16986 done
16987
16988 echo "$as_me:16988: checking for header declaring getopt variables" >&5
16989 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16990 if test "${cf_cv_getopt_header+set}" = set; then
16991   echo $ECHO_N "(cached) $ECHO_C" >&6
16992 else
16993
16994 cf_cv_getopt_header=none
16995 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16996 do
16997 cat >conftest.$ac_ext <<_ACEOF
16998 #line 16998 "configure"
16999 #include "confdefs.h"
17000
17001 #include <$cf_header>
17002 int
17003 main (void)
17004 {
17005 int x = optind; char *y = optarg
17006   ;
17007   return 0;
17008 }
17009 _ACEOF
17010 rm -f conftest.$ac_objext
17011 if { (eval echo "$as_me:17011: \"$ac_compile\"") >&5
17012   (eval $ac_compile) 2>&5
17013   ac_status=$?
17014   echo "$as_me:17014: \$? = $ac_status" >&5
17015   (exit $ac_status); } &&
17016          { ac_try='test -s conftest.$ac_objext'
17017   { (eval echo "$as_me:17017: \"$ac_try\"") >&5
17018   (eval $ac_try) 2>&5
17019   ac_status=$?
17020   echo "$as_me:17020: \$? = $ac_status" >&5
17021   (exit $ac_status); }; }; then
17022   cf_cv_getopt_header=$cf_header
17023  break
17024 else
17025   echo "$as_me: failed program was:" >&5
17026 cat conftest.$ac_ext >&5
17027 fi
17028 rm -f conftest.$ac_objext conftest.$ac_ext
17029 done
17030
17031 fi
17032 echo "$as_me:17032: result: $cf_cv_getopt_header" >&5
17033 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17034 if test $cf_cv_getopt_header != none ; then
17035
17036 cat >>confdefs.h <<\EOF
17037 #define HAVE_GETOPT_HEADER 1
17038 EOF
17039
17040 fi
17041 if test $cf_cv_getopt_header = getopt.h ; then
17042
17043 cat >>confdefs.h <<\EOF
17044 #define NEED_GETOPT_H 1
17045 EOF
17046
17047 fi
17048
17049 # check for ISC (this may also define _POSIX_SOURCE)
17050 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17051 if test "x$ISC" = xyes ; then
17052
17053 echo "$as_me:17053: checking for main in -lcposix" >&5
17054 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17055 if test "${ac_cv_lib_cposix_main+set}" = set; then
17056   echo $ECHO_N "(cached) $ECHO_C" >&6
17057 else
17058   ac_check_lib_save_LIBS=$LIBS
17059 LIBS="-lcposix  $LIBS"
17060 cat >conftest.$ac_ext <<_ACEOF
17061 #line 17061 "configure"
17062 #include "confdefs.h"
17063
17064 int
17065 main (void)
17066 {
17067 main ();
17068   ;
17069   return 0;
17070 }
17071 _ACEOF
17072 rm -f conftest.$ac_objext conftest$ac_exeext
17073 if { (eval echo "$as_me:17073: \"$ac_link\"") >&5
17074   (eval $ac_link) 2>&5
17075   ac_status=$?
17076   echo "$as_me:17076: \$? = $ac_status" >&5
17077   (exit $ac_status); } &&
17078          { ac_try='test -s conftest$ac_exeext'
17079   { (eval echo "$as_me:17079: \"$ac_try\"") >&5
17080   (eval $ac_try) 2>&5
17081   ac_status=$?
17082   echo "$as_me:17082: \$? = $ac_status" >&5
17083   (exit $ac_status); }; }; then
17084   ac_cv_lib_cposix_main=yes
17085 else
17086   echo "$as_me: failed program was:" >&5
17087 cat conftest.$ac_ext >&5
17088 ac_cv_lib_cposix_main=no
17089 fi
17090 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17091 LIBS=$ac_check_lib_save_LIBS
17092 fi
17093 echo "$as_me:17093: result: $ac_cv_lib_cposix_main" >&5
17094 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17095 if test $ac_cv_lib_cposix_main = yes; then
17096   cat >>confdefs.h <<EOF
17097 #define HAVE_LIBCPOSIX 1
17098 EOF
17099
17100   LIBS="-lcposix $LIBS"
17101
17102 fi
17103
17104         echo "$as_me:17104: checking for bzero in -linet" >&5
17105 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17106 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17107   echo $ECHO_N "(cached) $ECHO_C" >&6
17108 else
17109   ac_check_lib_save_LIBS=$LIBS
17110 LIBS="-linet  $LIBS"
17111 cat >conftest.$ac_ext <<_ACEOF
17112 #line 17112 "configure"
17113 #include "confdefs.h"
17114
17115 /* Override any gcc2 internal prototype to avoid an error.  */
17116 #ifdef __cplusplus
17117 extern "C"
17118 #endif
17119 /* We use char because int might match the return type of a gcc2
17120    builtin and then its argument prototype would still apply.  */
17121 char bzero ();
17122 int
17123 main (void)
17124 {
17125 bzero ();
17126   ;
17127   return 0;
17128 }
17129 _ACEOF
17130 rm -f conftest.$ac_objext conftest$ac_exeext
17131 if { (eval echo "$as_me:17131: \"$ac_link\"") >&5
17132   (eval $ac_link) 2>&5
17133   ac_status=$?
17134   echo "$as_me:17134: \$? = $ac_status" >&5
17135   (exit $ac_status); } &&
17136          { ac_try='test -s conftest$ac_exeext'
17137   { (eval echo "$as_me:17137: \"$ac_try\"") >&5
17138   (eval $ac_try) 2>&5
17139   ac_status=$?
17140   echo "$as_me:17140: \$? = $ac_status" >&5
17141   (exit $ac_status); }; }; then
17142   ac_cv_lib_inet_bzero=yes
17143 else
17144   echo "$as_me: failed program was:" >&5
17145 cat conftest.$ac_ext >&5
17146 ac_cv_lib_inet_bzero=no
17147 fi
17148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17149 LIBS=$ac_check_lib_save_LIBS
17150 fi
17151 echo "$as_me:17151: result: $ac_cv_lib_inet_bzero" >&5
17152 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17153 if test $ac_cv_lib_inet_bzero = yes; then
17154
17155 cf_add_libs="-linet"
17156 # Filter out duplicates - this happens with badly-designed ".pc" files...
17157 for cf_add_1lib in $LIBS
17158 do
17159         for cf_add_2lib in $cf_add_libs
17160         do
17161                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17162                 then
17163                         cf_add_1lib=
17164                         break
17165                 fi
17166         done
17167         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17168 done
17169 LIBS="$cf_add_libs"
17170
17171 fi
17172 fi
17173
17174 echo "$as_me:17174: checking if sys/time.h works with sys/select.h" >&5
17175 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17176 if test "${cf_cv_sys_time_select+set}" = set; then
17177   echo $ECHO_N "(cached) $ECHO_C" >&6
17178 else
17179
17180 cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183
17184 #include <sys/types.h>
17185 #ifdef HAVE_SYS_TIME_H
17186 #include <sys/time.h>
17187 #endif
17188 #ifdef HAVE_SYS_SELECT_H
17189 #include <sys/select.h>
17190 #endif
17191
17192 int
17193 main (void)
17194 {
17195
17196   ;
17197   return 0;
17198 }
17199 _ACEOF
17200 rm -f conftest.$ac_objext
17201 if { (eval echo "$as_me:17201: \"$ac_compile\"") >&5
17202   (eval $ac_compile) 2>&5
17203   ac_status=$?
17204   echo "$as_me:17204: \$? = $ac_status" >&5
17205   (exit $ac_status); } &&
17206          { ac_try='test -s conftest.$ac_objext'
17207   { (eval echo "$as_me:17207: \"$ac_try\"") >&5
17208   (eval $ac_try) 2>&5
17209   ac_status=$?
17210   echo "$as_me:17210: \$? = $ac_status" >&5
17211   (exit $ac_status); }; }; then
17212   cf_cv_sys_time_select=yes
17213 else
17214   echo "$as_me: failed program was:" >&5
17215 cat conftest.$ac_ext >&5
17216 cf_cv_sys_time_select=no
17217 fi
17218 rm -f conftest.$ac_objext conftest.$ac_ext
17219
17220 fi
17221
17222 echo "$as_me:17222: result: $cf_cv_sys_time_select" >&5
17223 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17224 test "$cf_cv_sys_time_select" = yes &&
17225 cat >>confdefs.h <<\EOF
17226 #define HAVE_SYS_TIME_SELECT 1
17227 EOF
17228
17229 ###     checks for compiler characteristics
17230 ac_ext=c
17231 ac_cpp='$CPP $CPPFLAGS'
17232 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17233 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17234 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17235 ac_main_return=return
17236
17237 echo "$as_me:17237: checking for an ANSI C-conforming const" >&5
17238 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17239 if test "${ac_cv_c_const+set}" = set; then
17240   echo $ECHO_N "(cached) $ECHO_C" >&6
17241 else
17242   cat >conftest.$ac_ext <<_ACEOF
17243 #line 17243 "configure"
17244 #include "confdefs.h"
17245
17246 int
17247 main (void)
17248 {
17249 /* FIXME: Include the comments suggested by Paul. */
17250 #ifndef __cplusplus
17251   /* Ultrix mips cc rejects this.  */
17252   typedef int charset[2];
17253   const charset x;
17254   /* SunOS 4.1.1 cc rejects this.  */
17255   char const *const *ccp;
17256   char **p;
17257   /* NEC SVR4.0.2 mips cc rejects this.  */
17258   struct point {int x, y;};
17259   static struct point const zero = {0,0};
17260   /* AIX XL C 1.02.0.0 rejects this.
17261      It does not let you subtract one const X* pointer from another in
17262      an arm of an if-expression whose if-part is not a constant
17263      expression */
17264   const char *g = "string";
17265   ccp = &g + (g ? g-g : 0);
17266   /* HPUX 7.0 cc rejects these. */
17267   ++ccp;
17268   p = (char**) ccp;
17269   ccp = (char const *const *) p;
17270   { /* SCO 3.2v4 cc rejects this.  */
17271     char *t;
17272     char const *s = 0 ? (char *) 0 : (char const *) 0;
17273
17274     *t++ = 0;
17275   }
17276   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17277     int x[] = {25, 17};
17278     const int *foo = &x[0];
17279     ++foo;
17280   }
17281   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17282     typedef const int *iptr;
17283     iptr p = 0;
17284     ++p;
17285   }
17286   { /* AIX XL C 1.02.0.0 rejects this saying
17287        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17288     struct s { int j; const int *ap[3]; };
17289     struct s *b; b->j = 5;
17290   }
17291   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17292     const int foo = 10;
17293   }
17294 #endif
17295
17296   ;
17297   return 0;
17298 }
17299 _ACEOF
17300 rm -f conftest.$ac_objext
17301 if { (eval echo "$as_me:17301: \"$ac_compile\"") >&5
17302   (eval $ac_compile) 2>&5
17303   ac_status=$?
17304   echo "$as_me:17304: \$? = $ac_status" >&5
17305   (exit $ac_status); } &&
17306          { ac_try='test -s conftest.$ac_objext'
17307   { (eval echo "$as_me:17307: \"$ac_try\"") >&5
17308   (eval $ac_try) 2>&5
17309   ac_status=$?
17310   echo "$as_me:17310: \$? = $ac_status" >&5
17311   (exit $ac_status); }; }; then
17312   ac_cv_c_const=yes
17313 else
17314   echo "$as_me: failed program was:" >&5
17315 cat conftest.$ac_ext >&5
17316 ac_cv_c_const=no
17317 fi
17318 rm -f conftest.$ac_objext conftest.$ac_ext
17319 fi
17320 echo "$as_me:17320: result: $ac_cv_c_const" >&5
17321 echo "${ECHO_T}$ac_cv_c_const" >&6
17322 if test $ac_cv_c_const = no; then
17323
17324 cat >>confdefs.h <<\EOF
17325 #define const
17326 EOF
17327
17328 fi
17329
17330 echo "$as_me:17330: checking for inline" >&5
17331 echo $ECHO_N "checking for inline... $ECHO_C" >&6
17332 if test "${ac_cv_c_inline+set}" = set; then
17333   echo $ECHO_N "(cached) $ECHO_C" >&6
17334 else
17335   ac_cv_c_inline=no
17336 for ac_kw in inline __inline__ __inline; do
17337   cat >conftest.$ac_ext <<_ACEOF
17338 #line 17338 "configure"
17339 #include "confdefs.h"
17340 #ifndef __cplusplus
17341 static $ac_kw int static_foo () {return 0; }
17342 $ac_kw int foo () {return 0; }
17343 #endif
17344
17345 _ACEOF
17346 rm -f conftest.$ac_objext
17347 if { (eval echo "$as_me:17347: \"$ac_compile\"") >&5
17348   (eval $ac_compile) 2>&5
17349   ac_status=$?
17350   echo "$as_me:17350: \$? = $ac_status" >&5
17351   (exit $ac_status); } &&
17352          { ac_try='test -s conftest.$ac_objext'
17353   { (eval echo "$as_me:17353: \"$ac_try\"") >&5
17354   (eval $ac_try) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); }; }; then
17358   ac_cv_c_inline=$ac_kw; break
17359 else
17360   echo "$as_me: failed program was:" >&5
17361 cat conftest.$ac_ext >&5
17362 fi
17363 rm -f conftest.$ac_objext conftest.$ac_ext
17364 done
17365
17366 fi
17367 echo "$as_me:17367: result: $ac_cv_c_inline" >&5
17368 echo "${ECHO_T}$ac_cv_c_inline" >&6
17369 case $ac_cv_c_inline in
17370   inline | yes) ;;
17371   no)
17372 cat >>confdefs.h <<\EOF
17373 #define inline
17374 EOF
17375  ;;
17376   *)  cat >>confdefs.h <<EOF
17377 #define inline $ac_cv_c_inline
17378 EOF
17379  ;;
17380 esac
17381
17382 NCURSES_INLINE=
17383 if test "$ac_cv_c_inline" != no ; then
17384         NCURSES_INLINE=inline
17385         if test "$INTEL_COMPILER" = yes
17386         then
17387                 :
17388         elif test "$CLANG_COMPILER" = yes
17389         then
17390                 :
17391         elif test "$GCC" = yes
17392         then
17393                 echo "$as_me:17393: checking if $CC supports options to tune inlining" >&5
17394 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
17395 if test "${cf_cv_gcc_inline+set}" = set; then
17396   echo $ECHO_N "(cached) $ECHO_C" >&6
17397 else
17398
17399                 cf_save_CFLAGS=$CFLAGS
17400                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
17401                 cat >conftest.$ac_ext <<_ACEOF
17402 #line 17402 "configure"
17403 #include "confdefs.h"
17404 inline int foo(void) { return 1; }
17405 int
17406 main (void)
17407 {
17408 ${cf_cv_main_return:-return} foo()
17409   ;
17410   return 0;
17411 }
17412 _ACEOF
17413 rm -f conftest.$ac_objext
17414 if { (eval echo "$as_me:17414: \"$ac_compile\"") >&5
17415   (eval $ac_compile) 2>&5
17416   ac_status=$?
17417   echo "$as_me:17417: \$? = $ac_status" >&5
17418   (exit $ac_status); } &&
17419          { ac_try='test -s conftest.$ac_objext'
17420   { (eval echo "$as_me:17420: \"$ac_try\"") >&5
17421   (eval $ac_try) 2>&5
17422   ac_status=$?
17423   echo "$as_me:17423: \$? = $ac_status" >&5
17424   (exit $ac_status); }; }; then
17425   cf_cv_gcc_inline=yes
17426 else
17427   echo "$as_me: failed program was:" >&5
17428 cat conftest.$ac_ext >&5
17429 cf_cv_gcc_inline=no
17430 fi
17431 rm -f conftest.$ac_objext conftest.$ac_ext
17432                 CFLAGS=$cf_save_CFLAGS
17433
17434 fi
17435 echo "$as_me:17435: result: $cf_cv_gcc_inline" >&5
17436 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
17437                 if test "$cf_cv_gcc_inline" = yes ; then
17438
17439 cf_fix_cppflags=no
17440 cf_new_cflags=
17441 cf_new_cppflags=
17442 cf_new_extra_cppflags=
17443
17444 for cf_add_cflags in --param max-inline-insns-single=1200
17445 do
17446 case $cf_fix_cppflags in
17447 (no)
17448         case $cf_add_cflags in
17449         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17450                 case $cf_add_cflags in
17451                 (-D*)
17452                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17453
17454                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17455                                 && test -z "${cf_tst_cflags}" \
17456                                 && cf_fix_cppflags=yes
17457
17458                         if test $cf_fix_cppflags = yes ; then
17459
17460         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17461         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17462
17463                                 continue
17464                         elif test "${cf_tst_cflags}" = "\"'" ; then
17465
17466         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17467         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17468
17469                                 continue
17470                         fi
17471                         ;;
17472                 esac
17473                 case "$CPPFLAGS" in
17474                 (*$cf_add_cflags)
17475                         ;;
17476                 (*)
17477                         case $cf_add_cflags in
17478                         (-D*)
17479                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17480
17481 CPPFLAGS=`echo "$CPPFLAGS" | \
17482         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17483                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17484
17485                                 ;;
17486                         esac
17487
17488         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17489         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17490
17491                         ;;
17492                 esac
17493                 ;;
17494         (*)
17495
17496         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17497         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17498
17499                 ;;
17500         esac
17501         ;;
17502 (yes)
17503
17504         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17505         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17506
17507         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17508
17509         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17510                 && test -z "${cf_tst_cflags}" \
17511                 && cf_fix_cppflags=no
17512         ;;
17513 esac
17514 done
17515
17516 if test -n "$cf_new_cflags" ; then
17517
17518         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17519         CFLAGS="${CFLAGS}$cf_new_cflags"
17520
17521 fi
17522
17523 if test -n "$cf_new_cppflags" ; then
17524
17525         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17526         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17527
17528 fi
17529
17530 if test -n "$cf_new_extra_cppflags" ; then
17531
17532         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17533         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17534
17535 fi
17536
17537                 fi
17538         fi
17539 fi
17540
17541 echo "$as_me:17541: checking for signal global datatype" >&5
17542 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
17543 if test "${cf_cv_sig_atomic_t+set}" = set; then
17544   echo $ECHO_N "(cached) $ECHO_C" >&6
17545 else
17546
17547         for cf_type in \
17548                 "volatile sig_atomic_t" \
17549                 "sig_atomic_t" \
17550                 "int"
17551         do
17552         cat >conftest.$ac_ext <<_ACEOF
17553 #line 17553 "configure"
17554 #include "confdefs.h"
17555
17556 #include <sys/types.h>
17557 #include <signal.h>
17558 #include <stdio.h>
17559
17560 extern $cf_type x;
17561 $cf_type x;
17562 static void handler(int sig)
17563 {
17564         x = 5;
17565 }
17566 int
17567 main (void)
17568 {
17569 signal(SIGINT, handler);
17570                  x = 1
17571   ;
17572   return 0;
17573 }
17574 _ACEOF
17575 rm -f conftest.$ac_objext
17576 if { (eval echo "$as_me:17576: \"$ac_compile\"") >&5
17577   (eval $ac_compile) 2>&5
17578   ac_status=$?
17579   echo "$as_me:17579: \$? = $ac_status" >&5
17580   (exit $ac_status); } &&
17581          { ac_try='test -s conftest.$ac_objext'
17582   { (eval echo "$as_me:17582: \"$ac_try\"") >&5
17583   (eval $ac_try) 2>&5
17584   ac_status=$?
17585   echo "$as_me:17585: \$? = $ac_status" >&5
17586   (exit $ac_status); }; }; then
17587   cf_cv_sig_atomic_t=$cf_type
17588 else
17589   echo "$as_me: failed program was:" >&5
17590 cat conftest.$ac_ext >&5
17591 cf_cv_sig_atomic_t=no
17592 fi
17593 rm -f conftest.$ac_objext conftest.$ac_ext
17594                 test "$cf_cv_sig_atomic_t" != no && break
17595         done
17596
17597 fi
17598
17599 echo "$as_me:17599: result: $cf_cv_sig_atomic_t" >&5
17600 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
17601 test "$cf_cv_sig_atomic_t" != no &&
17602 cat >>confdefs.h <<EOF
17603 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
17604 EOF
17605
17606 if test $NCURSES_CHTYPE = auto ; then
17607
17608 echo "$as_me:17608: checking for type of chtype" >&5
17609 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
17610 if test "${cf_cv_typeof_chtype+set}" = set; then
17611   echo $ECHO_N "(cached) $ECHO_C" >&6
17612 else
17613
17614                 if test "$cross_compiling" = yes; then
17615   cf_cv_typeof_chtype=long
17616 else
17617   cat >conftest.$ac_ext <<_ACEOF
17618 #line 17618 "configure"
17619 #include "confdefs.h"
17620
17621 #define WANT_BITS 31
17622 #include <stdio.h>
17623 int main(void)
17624 {
17625         FILE *fp = fopen("cf_test.out", "w");
17626         if (fp != 0) {
17627                 char *result = "long";
17628                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
17629                         int n;
17630                         unsigned int x, y;
17631                         for (n = 0; n < WANT_BITS; n++) {
17632                                 x = (1 << n);
17633                                 y = (x >> n);
17634                                 if (y != 1 || x == 0) {
17635                                         x = 0;
17636                                         break;
17637                                 }
17638                         }
17639                         /*
17640                          * If x is nonzero, an int is big enough for the bits
17641                          * that we want.
17642                          */
17643                         result = (x != 0) ? "int" : "long";
17644                 }
17645                 fputs(result, fp);
17646                 fclose(fp);
17647         }
17648         ${cf_cv_main_return:-return}(0);
17649 }
17650
17651 _ACEOF
17652 rm -f conftest$ac_exeext
17653 if { (eval echo "$as_me:17653: \"$ac_link\"") >&5
17654   (eval $ac_link) 2>&5
17655   ac_status=$?
17656   echo "$as_me:17656: \$? = $ac_status" >&5
17657   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17658   { (eval echo "$as_me:17658: \"$ac_try\"") >&5
17659   (eval $ac_try) 2>&5
17660   ac_status=$?
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit $ac_status); }; }; then
17663   cf_cv_typeof_chtype=`cat cf_test.out`
17664 else
17665   echo "$as_me: program exited with status $ac_status" >&5
17666 echo "$as_me: failed program was:" >&5
17667 cat conftest.$ac_ext >&5
17668 cf_cv_typeof_chtype=long
17669 fi
17670 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17671 fi
17672                 rm -f cf_test.out
17673
17674 fi
17675
17676 echo "$as_me:17676: result: $cf_cv_typeof_chtype" >&5
17677 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17678
17679 cat >>confdefs.h <<EOF
17680 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17681 EOF
17682
17683 else
17684         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17685 fi
17686 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17687
17688 echo "$as_me:17688: checking if unsigned literals are legal" >&5
17689 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17690 if test "${cf_cv_unsigned_literals+set}" = set; then
17691   echo $ECHO_N "(cached) $ECHO_C" >&6
17692 else
17693
17694         cat >conftest.$ac_ext <<_ACEOF
17695 #line 17695 "configure"
17696 #include "confdefs.h"
17697
17698 int
17699 main (void)
17700 {
17701 long x = 1L + 1UL + 1U + 1
17702   ;
17703   return 0;
17704 }
17705 _ACEOF
17706 rm -f conftest.$ac_objext
17707 if { (eval echo "$as_me:17707: \"$ac_compile\"") >&5
17708   (eval $ac_compile) 2>&5
17709   ac_status=$?
17710   echo "$as_me:17710: \$? = $ac_status" >&5
17711   (exit $ac_status); } &&
17712          { ac_try='test -s conftest.$ac_objext'
17713   { (eval echo "$as_me:17713: \"$ac_try\"") >&5
17714   (eval $ac_try) 2>&5
17715   ac_status=$?
17716   echo "$as_me:17716: \$? = $ac_status" >&5
17717   (exit $ac_status); }; }; then
17718   cf_cv_unsigned_literals=yes
17719 else
17720   echo "$as_me: failed program was:" >&5
17721 cat conftest.$ac_ext >&5
17722 cf_cv_unsigned_literals=no
17723 fi
17724 rm -f conftest.$ac_objext conftest.$ac_ext
17725
17726 fi
17727
17728 echo "$as_me:17728: result: $cf_cv_unsigned_literals" >&5
17729 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17730
17731 cf_cv_1UL="1"
17732 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17733 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17734
17735 if test $NCURSES_MMASK_T = auto ; then
17736         cf_cv_typeof_mmask_t=long
17737 else
17738         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17739 fi
17740 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17741
17742 ###     Checks for external-data
17743
17744 echo "$as_me:17744: checking if external errno is declared" >&5
17745 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17746 if test "${cf_cv_dcl_errno+set}" = set; then
17747   echo $ECHO_N "(cached) $ECHO_C" >&6
17748 else
17749
17750         cat >conftest.$ac_ext <<_ACEOF
17751 #line 17751 "configure"
17752 #include "confdefs.h"
17753
17754 #ifdef HAVE_STDLIB_H
17755 #include <stdlib.h>
17756 #endif
17757 #include <stdio.h>
17758 #include <sys/types.h>
17759 #include <errno.h>
17760 int
17761 main (void)
17762 {
17763 int x = (int) errno
17764   ;
17765   return 0;
17766 }
17767 _ACEOF
17768 rm -f conftest.$ac_objext
17769 if { (eval echo "$as_me:17769: \"$ac_compile\"") >&5
17770   (eval $ac_compile) 2>&5
17771   ac_status=$?
17772   echo "$as_me:17772: \$? = $ac_status" >&5
17773   (exit $ac_status); } &&
17774          { ac_try='test -s conftest.$ac_objext'
17775   { (eval echo "$as_me:17775: \"$ac_try\"") >&5
17776   (eval $ac_try) 2>&5
17777   ac_status=$?
17778   echo "$as_me:17778: \$? = $ac_status" >&5
17779   (exit $ac_status); }; }; then
17780   cf_cv_dcl_errno=yes
17781 else
17782   echo "$as_me: failed program was:" >&5
17783 cat conftest.$ac_ext >&5
17784 cf_cv_dcl_errno=no
17785 fi
17786 rm -f conftest.$ac_objext conftest.$ac_ext
17787
17788 fi
17789 echo "$as_me:17789: result: $cf_cv_dcl_errno" >&5
17790 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17791
17792 if test "$cf_cv_dcl_errno" = no ; then
17793
17794 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17795
17796         cat >>confdefs.h <<EOF
17797 #define $cf_result 1
17798 EOF
17799
17800 fi
17801
17802 # It's possible (for near-UNIX clones) that the data doesn't exist
17803
17804 echo "$as_me:17804: checking if external errno exists" >&5
17805 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17806 if test "${cf_cv_have_errno+set}" = set; then
17807   echo $ECHO_N "(cached) $ECHO_C" >&6
17808 else
17809
17810         cat >conftest.$ac_ext <<_ACEOF
17811 #line 17811 "configure"
17812 #include "confdefs.h"
17813
17814 #undef errno
17815 extern int errno;
17816
17817 int
17818 main (void)
17819 {
17820 errno = 2
17821   ;
17822   return 0;
17823 }
17824 _ACEOF
17825 rm -f conftest.$ac_objext conftest$ac_exeext
17826 if { (eval echo "$as_me:17826: \"$ac_link\"") >&5
17827   (eval $ac_link) 2>&5
17828   ac_status=$?
17829   echo "$as_me:17829: \$? = $ac_status" >&5
17830   (exit $ac_status); } &&
17831          { ac_try='test -s conftest$ac_exeext'
17832   { (eval echo "$as_me:17832: \"$ac_try\"") >&5
17833   (eval $ac_try) 2>&5
17834   ac_status=$?
17835   echo "$as_me:17835: \$? = $ac_status" >&5
17836   (exit $ac_status); }; }; then
17837   cf_cv_have_errno=yes
17838 else
17839   echo "$as_me: failed program was:" >&5
17840 cat conftest.$ac_ext >&5
17841 cf_cv_have_errno=no
17842 fi
17843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17844
17845 fi
17846 echo "$as_me:17846: result: $cf_cv_have_errno" >&5
17847 echo "${ECHO_T}$cf_cv_have_errno" >&6
17848
17849 if test "$cf_cv_have_errno" = yes ; then
17850
17851 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17852
17853         cat >>confdefs.h <<EOF
17854 #define $cf_result 1
17855 EOF
17856
17857 fi
17858
17859 echo "$as_me:17859: checking if data-only library module links" >&5
17860 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17861 if test "${cf_cv_link_dataonly+set}" = set; then
17862   echo $ECHO_N "(cached) $ECHO_C" >&6
17863 else
17864
17865         rm -f conftest.a
17866         cat >conftest.$ac_ext <<EOF
17867 #line 17867 "configure"
17868 int     testdata[3] = { 123, 456, 789 };
17869 EOF
17870         if { (eval echo "$as_me:17870: \"$ac_compile\"") >&5
17871   (eval $ac_compile) 2>&5
17872   ac_status=$?
17873   echo "$as_me:17873: \$? = $ac_status" >&5
17874   (exit $ac_status); } ; then
17875                 mv conftest.o data.o && \
17876                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17877         fi
17878         rm -f conftest.$ac_ext data.o
17879         cat >conftest.$ac_ext <<EOF
17880 #line 17880 "configure"
17881 int     testfunc(void)
17882 {
17883 #if defined(NeXT)
17884         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17885 #else
17886         extern int testdata[3];
17887         return testdata[0] == 123
17888            &&  testdata[1] == 456
17889            &&  testdata[2] == 789;
17890 #endif
17891 }
17892 EOF
17893         if { (eval echo "$as_me:17893: \"$ac_compile\"") >&5
17894   (eval $ac_compile) 2>&5
17895   ac_status=$?
17896   echo "$as_me:17896: \$? = $ac_status" >&5
17897   (exit $ac_status); }; then
17898                 mv conftest.o func.o && \
17899                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17900         fi
17901         rm -f conftest.$ac_ext func.o
17902         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17903         cf_saveLIBS="$LIBS"
17904         LIBS="conftest.a $LIBS"
17905         if test "$cross_compiling" = yes; then
17906   cf_cv_link_dataonly=unknown
17907 else
17908   cat >conftest.$ac_ext <<_ACEOF
17909 #line 17909 "configure"
17910 #include "confdefs.h"
17911
17912         int main(void)
17913         {
17914                 extern int testfunc();
17915                 ${cf_cv_main_return:-return} (!testfunc());
17916         }
17917
17918 _ACEOF
17919 rm -f conftest$ac_exeext
17920 if { (eval echo "$as_me:17920: \"$ac_link\"") >&5
17921   (eval $ac_link) 2>&5
17922   ac_status=$?
17923   echo "$as_me:17923: \$? = $ac_status" >&5
17924   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17925   { (eval echo "$as_me:17925: \"$ac_try\"") >&5
17926   (eval $ac_try) 2>&5
17927   ac_status=$?
17928   echo "$as_me:17928: \$? = $ac_status" >&5
17929   (exit $ac_status); }; }; then
17930   cf_cv_link_dataonly=yes
17931 else
17932   echo "$as_me: program exited with status $ac_status" >&5
17933 echo "$as_me: failed program was:" >&5
17934 cat conftest.$ac_ext >&5
17935 cf_cv_link_dataonly=no
17936 fi
17937 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17938 fi
17939         LIBS="$cf_saveLIBS"
17940
17941 fi
17942
17943 echo "$as_me:17943: result: $cf_cv_link_dataonly" >&5
17944 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17945
17946 if test "$cf_cv_link_dataonly" = no ; then
17947
17948 cat >>confdefs.h <<\EOF
17949 #define BROKEN_LINKER 1
17950 EOF
17951
17952         BROKEN_LINKER=1
17953 fi
17954
17955 ###     Checks for library functions.
17956
17957 for ac_func in \
17958 getcwd \
17959 getegid \
17960 geteuid \
17961 getopt \
17962 getttynam \
17963 issetugid \
17964 poll \
17965 putenv \
17966 remove \
17967 select \
17968 setbuf \
17969 setbuffer \
17970 setenv \
17971 setvbuf \
17972 sigaction \
17973 sigvec \
17974 strdup \
17975 strstr \
17976 tcgetpgrp \
17977 tdestroy \
17978 times \
17979 tsearch \
17980 vsnprintf \
17981
17982 do
17983 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17984 echo "$as_me:17984: checking for $ac_func" >&5
17985 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17986 if eval "test \"\${$as_ac_var+set}\" = set"; then
17987   echo $ECHO_N "(cached) $ECHO_C" >&6
17988 else
17989   cat >conftest.$ac_ext <<_ACEOF
17990 #line 17990 "configure"
17991 #include "confdefs.h"
17992 /* System header to define __stub macros and hopefully few prototypes,
17993     which can conflict with char $ac_func (); below.  */
17994 #include <assert.h>
17995 /* Override any gcc2 internal prototype to avoid an error.  */
17996 #ifdef __cplusplus
17997 extern "C"
17998 #endif
17999 /* We use char because int might match the return type of a gcc2
18000    builtin and then its argument prototype would still apply.  */
18001 char $ac_func ();
18002 char (*f) ();
18003
18004 int
18005 main (void)
18006 {
18007 /* The GNU C library defines this for functions which it implements
18008     to always fail with ENOSYS.  Some functions are actually named
18009     something starting with __ and the normal name is an alias.  */
18010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18011 choke me
18012 #else
18013 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18014 #endif
18015
18016   ;
18017   return 0;
18018 }
18019 _ACEOF
18020 rm -f conftest.$ac_objext conftest$ac_exeext
18021 if { (eval echo "$as_me:18021: \"$ac_link\"") >&5
18022   (eval $ac_link) 2>&5
18023   ac_status=$?
18024   echo "$as_me:18024: \$? = $ac_status" >&5
18025   (exit $ac_status); } &&
18026          { ac_try='test -s conftest$ac_exeext'
18027   { (eval echo "$as_me:18027: \"$ac_try\"") >&5
18028   (eval $ac_try) 2>&5
18029   ac_status=$?
18030   echo "$as_me:18030: \$? = $ac_status" >&5
18031   (exit $ac_status); }; }; then
18032   eval "$as_ac_var=yes"
18033 else
18034   echo "$as_me: failed program was:" >&5
18035 cat conftest.$ac_ext >&5
18036 eval "$as_ac_var=no"
18037 fi
18038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18039 fi
18040 echo "$as_me:18040: result: `eval echo '${'$as_ac_var'}'`" >&5
18041 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18042 if test `eval echo '${'$as_ac_var'}'` = yes; then
18043   cat >>confdefs.h <<EOF
18044 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18045 EOF
18046
18047 fi
18048 done
18049
18050 if test "x$ac_cv_func_getopt" = xno && \
18051    test "x$cf_with_progs$cf_with_tests" != xnono; then
18052         { { echo "$as_me:18052: error: getopt is required for building programs" >&5
18053 echo "$as_me: error: getopt is required for building programs" >&2;}
18054    { (exit 1); exit 1; }; }
18055 fi
18056
18057 if test "x$with_safe_sprintf" = xyes
18058 then
18059         if test "x$ac_cv_func_vsnprintf" = xyes
18060         then
18061                 { echo "$as_me:18061: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18062 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18063         else
18064
18065 cat >>confdefs.h <<\EOF
18066 #define USE_SAFE_SPRINTF 1
18067 EOF
18068
18069         fi
18070 fi
18071
18072 if test "x$with_getcap" = "xyes" ; then
18073
18074 echo "$as_me:18074: checking for terminal-capability database functions" >&5
18075 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18076 if test "${cf_cv_cgetent+set}" = set; then
18077   echo $ECHO_N "(cached) $ECHO_C" >&6
18078 else
18079
18080 cat >conftest.$ac_ext <<_ACEOF
18081 #line 18081 "configure"
18082 #include "confdefs.h"
18083
18084 #include <stdlib.h>
18085 int
18086 main (void)
18087 {
18088
18089         char temp[128];
18090         char *buf = temp;
18091         char *db_array = temp;
18092         cgetent(&buf, &db_array, "vt100");
18093         cgetcap(buf, "tc", '=');
18094         cgetmatch(buf, "tc");
18095
18096   ;
18097   return 0;
18098 }
18099 _ACEOF
18100 rm -f conftest.$ac_objext conftest$ac_exeext
18101 if { (eval echo "$as_me:18101: \"$ac_link\"") >&5
18102   (eval $ac_link) 2>&5
18103   ac_status=$?
18104   echo "$as_me:18104: \$? = $ac_status" >&5
18105   (exit $ac_status); } &&
18106          { ac_try='test -s conftest$ac_exeext'
18107   { (eval echo "$as_me:18107: \"$ac_try\"") >&5
18108   (eval $ac_try) 2>&5
18109   ac_status=$?
18110   echo "$as_me:18110: \$? = $ac_status" >&5
18111   (exit $ac_status); }; }; then
18112   cf_cv_cgetent=yes
18113 else
18114   echo "$as_me: failed program was:" >&5
18115 cat conftest.$ac_ext >&5
18116 cf_cv_cgetent=no
18117 fi
18118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18119
18120 fi
18121 echo "$as_me:18121: result: $cf_cv_cgetent" >&5
18122 echo "${ECHO_T}$cf_cv_cgetent" >&6
18123
18124 if test "$cf_cv_cgetent" = yes
18125 then
18126
18127 cat >>confdefs.h <<\EOF
18128 #define HAVE_BSD_CGETENT 1
18129 EOF
18130
18131 echo "$as_me:18131: checking if cgetent uses const parameter" >&5
18132 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18133 if test "${cf_cv_cgetent_const+set}" = set; then
18134   echo $ECHO_N "(cached) $ECHO_C" >&6
18135 else
18136
18137 cat >conftest.$ac_ext <<_ACEOF
18138 #line 18138 "configure"
18139 #include "confdefs.h"
18140
18141 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18142 #include <stdlib.h>
18143 int
18144 main (void)
18145 {
18146
18147         char temp[128];
18148         char *buf = temp;
18149 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18150         const char *db_array = temp;
18151         cgetent(&buf, &db_array, "vt100");
18152 #endif
18153         cgetcap(buf, "tc", '=');
18154         cgetmatch(buf, "tc");
18155
18156   ;
18157   return 0;
18158 }
18159 _ACEOF
18160 rm -f conftest.$ac_objext conftest$ac_exeext
18161 if { (eval echo "$as_me:18161: \"$ac_link\"") >&5
18162   (eval $ac_link) 2>&5
18163   ac_status=$?
18164   echo "$as_me:18164: \$? = $ac_status" >&5
18165   (exit $ac_status); } &&
18166          { ac_try='test -s conftest$ac_exeext'
18167   { (eval echo "$as_me:18167: \"$ac_try\"") >&5
18168   (eval $ac_try) 2>&5
18169   ac_status=$?
18170   echo "$as_me:18170: \$? = $ac_status" >&5
18171   (exit $ac_status); }; }; then
18172   cf_cv_cgetent_const=yes
18173 else
18174   echo "$as_me: failed program was:" >&5
18175 cat conftest.$ac_ext >&5
18176 cf_cv_cgetent_const=no
18177 fi
18178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18179
18180 fi
18181 echo "$as_me:18181: result: $cf_cv_cgetent_const" >&5
18182 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18183         if test "$cf_cv_cgetent_const" = yes
18184         then
18185
18186 cat >>confdefs.h <<EOF
18187 #define CGETENT_CONST const
18188 EOF
18189
18190         fi
18191 fi
18192
18193 fi
18194
18195 echo "$as_me:18195: checking for isascii" >&5
18196 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18197 if test "${cf_cv_have_isascii+set}" = set; then
18198   echo $ECHO_N "(cached) $ECHO_C" >&6
18199 else
18200
18201         cat >conftest.$ac_ext <<_ACEOF
18202 #line 18202 "configure"
18203 #include "confdefs.h"
18204 #include <ctype.h>
18205 int
18206 main (void)
18207 {
18208 int x = isascii(' ')
18209   ;
18210   return 0;
18211 }
18212 _ACEOF
18213 rm -f conftest.$ac_objext conftest$ac_exeext
18214 if { (eval echo "$as_me:18214: \"$ac_link\"") >&5
18215   (eval $ac_link) 2>&5
18216   ac_status=$?
18217   echo "$as_me:18217: \$? = $ac_status" >&5
18218   (exit $ac_status); } &&
18219          { ac_try='test -s conftest$ac_exeext'
18220   { (eval echo "$as_me:18220: \"$ac_try\"") >&5
18221   (eval $ac_try) 2>&5
18222   ac_status=$?
18223   echo "$as_me:18223: \$? = $ac_status" >&5
18224   (exit $ac_status); }; }; then
18225   cf_cv_have_isascii=yes
18226 else
18227   echo "$as_me: failed program was:" >&5
18228 cat conftest.$ac_ext >&5
18229 cf_cv_have_isascii=no
18230 fi
18231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18232
18233 fi
18234 echo "$as_me:18234: result: $cf_cv_have_isascii" >&5
18235 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18236 test "$cf_cv_have_isascii" = yes &&
18237 cat >>confdefs.h <<\EOF
18238 #define HAVE_ISASCII 1
18239 EOF
18240
18241 if test "$ac_cv_func_sigaction" = yes; then
18242 echo "$as_me:18242: checking whether sigaction needs _POSIX_SOURCE" >&5
18243 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18244 cat >conftest.$ac_ext <<_ACEOF
18245 #line 18245 "configure"
18246 #include "confdefs.h"
18247
18248 #include <sys/types.h>
18249 #include <signal.h>
18250 int
18251 main (void)
18252 {
18253 struct sigaction act
18254   ;
18255   return 0;
18256 }
18257 _ACEOF
18258 rm -f conftest.$ac_objext
18259 if { (eval echo "$as_me:18259: \"$ac_compile\"") >&5
18260   (eval $ac_compile) 2>&5
18261   ac_status=$?
18262   echo "$as_me:18262: \$? = $ac_status" >&5
18263   (exit $ac_status); } &&
18264          { ac_try='test -s conftest.$ac_objext'
18265   { (eval echo "$as_me:18265: \"$ac_try\"") >&5
18266   (eval $ac_try) 2>&5
18267   ac_status=$?
18268   echo "$as_me:18268: \$? = $ac_status" >&5
18269   (exit $ac_status); }; }; then
18270   sigact_bad=no
18271 else
18272   echo "$as_me: failed program was:" >&5
18273 cat conftest.$ac_ext >&5
18274
18275 cat >conftest.$ac_ext <<_ACEOF
18276 #line 18276 "configure"
18277 #include "confdefs.h"
18278
18279 #define _POSIX_SOURCE
18280 #include <sys/types.h>
18281 #include <signal.h>
18282 int
18283 main (void)
18284 {
18285 struct sigaction act
18286   ;
18287   return 0;
18288 }
18289 _ACEOF
18290 rm -f conftest.$ac_objext
18291 if { (eval echo "$as_me:18291: \"$ac_compile\"") >&5
18292   (eval $ac_compile) 2>&5
18293   ac_status=$?
18294   echo "$as_me:18294: \$? = $ac_status" >&5
18295   (exit $ac_status); } &&
18296          { ac_try='test -s conftest.$ac_objext'
18297   { (eval echo "$as_me:18297: \"$ac_try\"") >&5
18298   (eval $ac_try) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit $ac_status); }; }; then
18302   sigact_bad=yes
18303
18304 cat >>confdefs.h <<\EOF
18305 #define _POSIX_SOURCE 1
18306 EOF
18307
18308 else
18309   echo "$as_me: failed program was:" >&5
18310 cat conftest.$ac_ext >&5
18311 sigact_bad=unknown
18312 fi
18313 rm -f conftest.$ac_objext conftest.$ac_ext
18314 fi
18315 rm -f conftest.$ac_objext conftest.$ac_ext
18316 echo "$as_me:18316: result: $sigact_bad" >&5
18317 echo "${ECHO_T}$sigact_bad" >&6
18318 fi
18319
18320 echo "$as_me:18320: checking if nanosleep really works" >&5
18321 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
18322 if test "${cf_cv_func_nanosleep+set}" = set; then
18323   echo $ECHO_N "(cached) $ECHO_C" >&6
18324 else
18325
18326 if test "$cross_compiling" = yes; then
18327   cf_cv_func_nanosleep=unknown
18328 else
18329   cat >conftest.$ac_ext <<_ACEOF
18330 #line 18330 "configure"
18331 #include "confdefs.h"
18332
18333 #include <stdio.h>
18334 #include <errno.h>
18335 #include <time.h>
18336
18337 #ifdef HAVE_SYS_TIME_H
18338 #include <sys/time.h>
18339 #endif
18340
18341 int main(void) {
18342         struct timespec ts1, ts2;
18343         int code;
18344         ts1.tv_sec  = 0;
18345         ts1.tv_nsec = 750000000;
18346         ts2.tv_sec  = 0;
18347         ts2.tv_nsec = 0;
18348         errno = 0;
18349         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
18350         ${cf_cv_main_return:-return}(code != 0);
18351 }
18352
18353 _ACEOF
18354 rm -f conftest$ac_exeext
18355 if { (eval echo "$as_me:18355: \"$ac_link\"") >&5
18356   (eval $ac_link) 2>&5
18357   ac_status=$?
18358   echo "$as_me:18358: \$? = $ac_status" >&5
18359   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18360   { (eval echo "$as_me:18360: \"$ac_try\"") >&5
18361   (eval $ac_try) 2>&5
18362   ac_status=$?
18363   echo "$as_me:18363: \$? = $ac_status" >&5
18364   (exit $ac_status); }; }; then
18365   cf_cv_func_nanosleep=yes
18366 else
18367   echo "$as_me: program exited with status $ac_status" >&5
18368 echo "$as_me: failed program was:" >&5
18369 cat conftest.$ac_ext >&5
18370 cf_cv_func_nanosleep=no
18371 fi
18372 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18373 fi
18374 fi
18375 echo "$as_me:18375: result: $cf_cv_func_nanosleep" >&5
18376 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
18377
18378 test "$cf_cv_func_nanosleep" = "yes" &&
18379 cat >>confdefs.h <<\EOF
18380 #define HAVE_NANOSLEEP 1
18381 EOF
18382
18383 for ac_header in \
18384 termio.h \
18385 termios.h \
18386 unistd.h \
18387 sys/ioctl.h \
18388 sys/termio.h \
18389
18390 do
18391 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18392 echo "$as_me:18392: checking for $ac_header" >&5
18393 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18394 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18395   echo $ECHO_N "(cached) $ECHO_C" >&6
18396 else
18397   cat >conftest.$ac_ext <<_ACEOF
18398 #line 18398 "configure"
18399 #include "confdefs.h"
18400 #include <$ac_header>
18401 _ACEOF
18402 if { (eval echo "$as_me:18402: \"$ac_cpp conftest.$ac_ext\"") >&5
18403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18404   ac_status=$?
18405   egrep -v '^ *\+' conftest.er1 >conftest.err
18406   rm -f conftest.er1
18407   cat conftest.err >&5
18408   echo "$as_me:18408: \$? = $ac_status" >&5
18409   (exit $ac_status); } >/dev/null; then
18410   if test -s conftest.err; then
18411     ac_cpp_err=$ac_c_preproc_warn_flag
18412   else
18413     ac_cpp_err=
18414   fi
18415 else
18416   ac_cpp_err=yes
18417 fi
18418 if test -z "$ac_cpp_err"; then
18419   eval "$as_ac_Header=yes"
18420 else
18421   echo "$as_me: failed program was:" >&5
18422   cat conftest.$ac_ext >&5
18423   eval "$as_ac_Header=no"
18424 fi
18425 rm -f conftest.err conftest.$ac_ext
18426 fi
18427 echo "$as_me:18427: result: `eval echo '${'$as_ac_Header'}'`" >&5
18428 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18429 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18430   cat >>confdefs.h <<EOF
18431 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18432 EOF
18433
18434 fi
18435 done
18436
18437 if test "$ac_cv_header_termios_h" = yes ; then
18438         case "$CFLAGS $CPPFLAGS" in
18439         (*-D_POSIX_SOURCE*)
18440                 termios_bad=dunno ;;
18441         (*)     termios_bad=maybe ;;
18442         esac
18443         if test "$termios_bad" = maybe ; then
18444         echo "$as_me:18444: checking whether termios.h needs _POSIX_SOURCE" >&5
18445 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
18446         cat >conftest.$ac_ext <<_ACEOF
18447 #line 18447 "configure"
18448 #include "confdefs.h"
18449 #include <termios.h>
18450 int
18451 main (void)
18452 {
18453 struct termios foo; int x = foo.c_iflag
18454   ;
18455   return 0;
18456 }
18457 _ACEOF
18458 rm -f conftest.$ac_objext
18459 if { (eval echo "$as_me:18459: \"$ac_compile\"") >&5
18460   (eval $ac_compile) 2>&5
18461   ac_status=$?
18462   echo "$as_me:18462: \$? = $ac_status" >&5
18463   (exit $ac_status); } &&
18464          { ac_try='test -s conftest.$ac_objext'
18465   { (eval echo "$as_me:18465: \"$ac_try\"") >&5
18466   (eval $ac_try) 2>&5
18467   ac_status=$?
18468   echo "$as_me:18468: \$? = $ac_status" >&5
18469   (exit $ac_status); }; }; then
18470   termios_bad=no
18471 else
18472   echo "$as_me: failed program was:" >&5
18473 cat conftest.$ac_ext >&5
18474
18475                 cat >conftest.$ac_ext <<_ACEOF
18476 #line 18476 "configure"
18477 #include "confdefs.h"
18478
18479 #define _POSIX_SOURCE
18480 #include <termios.h>
18481 int
18482 main (void)
18483 {
18484 struct termios foo; int x = foo.c_iflag
18485   ;
18486   return 0;
18487 }
18488 _ACEOF
18489 rm -f conftest.$ac_objext
18490 if { (eval echo "$as_me:18490: \"$ac_compile\"") >&5
18491   (eval $ac_compile) 2>&5
18492   ac_status=$?
18493   echo "$as_me:18493: \$? = $ac_status" >&5
18494   (exit $ac_status); } &&
18495          { ac_try='test -s conftest.$ac_objext'
18496   { (eval echo "$as_me:18496: \"$ac_try\"") >&5
18497   (eval $ac_try) 2>&5
18498   ac_status=$?
18499   echo "$as_me:18499: \$? = $ac_status" >&5
18500   (exit $ac_status); }; }; then
18501   termios_bad=unknown
18502 else
18503   echo "$as_me: failed program was:" >&5
18504 cat conftest.$ac_ext >&5
18505 termios_bad=yes
18506 cat >>confdefs.h <<\EOF
18507 #define _POSIX_SOURCE 1
18508 EOF
18509
18510 fi
18511 rm -f conftest.$ac_objext conftest.$ac_ext
18512
18513 fi
18514 rm -f conftest.$ac_objext conftest.$ac_ext
18515         echo "$as_me:18515: result: $termios_bad" >&5
18516 echo "${ECHO_T}$termios_bad" >&6
18517         fi
18518 fi
18519
18520 echo "$as_me:18520: checking for tcgetattr" >&5
18521 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
18522 if test "${cf_cv_have_tcgetattr+set}" = set; then
18523   echo $ECHO_N "(cached) $ECHO_C" >&6
18524 else
18525
18526 cat >conftest.$ac_ext <<_ACEOF
18527 #line 18527 "configure"
18528 #include "confdefs.h"
18529
18530 #include <sys/types.h>
18531 #ifdef HAVE_UNISTD_H
18532 #include <unistd.h>
18533 #endif
18534 #ifdef HAVE_TERMIOS_H
18535 #include <termios.h>
18536 #define TTY struct termios
18537 #else
18538 #ifdef HAVE_TERMIO_H
18539 #include <termio.h>
18540 #define TTY struct termio
18541 #endif
18542 #endif
18543
18544 int
18545 main (void)
18546 {
18547
18548 TTY foo;
18549 tcgetattr(1, &foo);
18550   ;
18551   return 0;
18552 }
18553 _ACEOF
18554 rm -f conftest.$ac_objext conftest$ac_exeext
18555 if { (eval echo "$as_me:18555: \"$ac_link\"") >&5
18556   (eval $ac_link) 2>&5
18557   ac_status=$?
18558   echo "$as_me:18558: \$? = $ac_status" >&5
18559   (exit $ac_status); } &&
18560          { ac_try='test -s conftest$ac_exeext'
18561   { (eval echo "$as_me:18561: \"$ac_try\"") >&5
18562   (eval $ac_try) 2>&5
18563   ac_status=$?
18564   echo "$as_me:18564: \$? = $ac_status" >&5
18565   (exit $ac_status); }; }; then
18566   cf_cv_have_tcgetattr=yes
18567 else
18568   echo "$as_me: failed program was:" >&5
18569 cat conftest.$ac_ext >&5
18570 cf_cv_have_tcgetattr=no
18571 fi
18572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18573 fi
18574 echo "$as_me:18574: result: $cf_cv_have_tcgetattr" >&5
18575 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
18576 test "$cf_cv_have_tcgetattr" = yes &&
18577 cat >>confdefs.h <<\EOF
18578 #define HAVE_TCGETATTR 1
18579 EOF
18580
18581 echo "$as_me:18581: checking for vsscanf function or workaround" >&5
18582 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
18583 if test "${cf_cv_func_vsscanf+set}" = set; then
18584   echo $ECHO_N "(cached) $ECHO_C" >&6
18585 else
18586
18587 cat >conftest.$ac_ext <<_ACEOF
18588 #line 18588 "configure"
18589 #include "confdefs.h"
18590
18591 #include <stdarg.h>
18592 #include <stdio.h>
18593 int
18594 main (void)
18595 {
18596
18597         va_list ap;
18598         vsscanf("from", "%d", ap)
18599   ;
18600   return 0;
18601 }
18602 _ACEOF
18603 rm -f conftest.$ac_objext conftest$ac_exeext
18604 if { (eval echo "$as_me:18604: \"$ac_link\"") >&5
18605   (eval $ac_link) 2>&5
18606   ac_status=$?
18607   echo "$as_me:18607: \$? = $ac_status" >&5
18608   (exit $ac_status); } &&
18609          { ac_try='test -s conftest$ac_exeext'
18610   { (eval echo "$as_me:18610: \"$ac_try\"") >&5
18611   (eval $ac_try) 2>&5
18612   ac_status=$?
18613   echo "$as_me:18613: \$? = $ac_status" >&5
18614   (exit $ac_status); }; }; then
18615   cf_cv_func_vsscanf=vsscanf
18616 else
18617   echo "$as_me: failed program was:" >&5
18618 cat conftest.$ac_ext >&5
18619
18620 cat >conftest.$ac_ext <<_ACEOF
18621 #line 18621 "configure"
18622 #include "confdefs.h"
18623
18624 #include <stdarg.h>
18625 #include <stdio.h>
18626 int
18627 main (void)
18628 {
18629
18630         FILE strbuf;
18631         char *str = "from";
18632
18633         strbuf._flag = _IOREAD;
18634         strbuf._ptr = strbuf._base = (unsigned char *) str;
18635         strbuf._cnt = strlen(str);
18636         strbuf._file = _NFILE;
18637         return (vfscanf(&strbuf, "%d", ap))
18638   ;
18639   return 0;
18640 }
18641 _ACEOF
18642 rm -f conftest.$ac_objext conftest$ac_exeext
18643 if { (eval echo "$as_me:18643: \"$ac_link\"") >&5
18644   (eval $ac_link) 2>&5
18645   ac_status=$?
18646   echo "$as_me:18646: \$? = $ac_status" >&5
18647   (exit $ac_status); } &&
18648          { ac_try='test -s conftest$ac_exeext'
18649   { (eval echo "$as_me:18649: \"$ac_try\"") >&5
18650   (eval $ac_try) 2>&5
18651   ac_status=$?
18652   echo "$as_me:18652: \$? = $ac_status" >&5
18653   (exit $ac_status); }; }; then
18654   cf_cv_func_vsscanf=vfscanf
18655 else
18656   echo "$as_me: failed program was:" >&5
18657 cat conftest.$ac_ext >&5
18658
18659 cat >conftest.$ac_ext <<_ACEOF
18660 #line 18660 "configure"
18661 #include "confdefs.h"
18662
18663 #include <stdarg.h>
18664 #include <stdio.h>
18665 int
18666 main (void)
18667 {
18668
18669         FILE strbuf;
18670         char *str = "from";
18671
18672         strbuf._flag = _IOREAD;
18673         strbuf._ptr = strbuf._base = (unsigned char *) str;
18674         strbuf._cnt = strlen(str);
18675         strbuf._file = _NFILE;
18676         return (_doscan(&strbuf, "%d", ap))
18677   ;
18678   return 0;
18679 }
18680 _ACEOF
18681 rm -f conftest.$ac_objext conftest$ac_exeext
18682 if { (eval echo "$as_me:18682: \"$ac_link\"") >&5
18683   (eval $ac_link) 2>&5
18684   ac_status=$?
18685   echo "$as_me:18685: \$? = $ac_status" >&5
18686   (exit $ac_status); } &&
18687          { ac_try='test -s conftest$ac_exeext'
18688   { (eval echo "$as_me:18688: \"$ac_try\"") >&5
18689   (eval $ac_try) 2>&5
18690   ac_status=$?
18691   echo "$as_me:18691: \$? = $ac_status" >&5
18692   (exit $ac_status); }; }; then
18693   cf_cv_func_vsscanf=_doscan
18694 else
18695   echo "$as_me: failed program was:" >&5
18696 cat conftest.$ac_ext >&5
18697
18698 cf_cv_func_vsscanf=no
18699 fi
18700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18701 fi
18702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18703 fi
18704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18705 fi
18706 echo "$as_me:18706: result: $cf_cv_func_vsscanf" >&5
18707 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18708
18709 case $cf_cv_func_vsscanf in
18710 (vsscanf)
18711 cat >>confdefs.h <<\EOF
18712 #define HAVE_VSSCANF 1
18713 EOF
18714 ;;
18715 (vfscanf)
18716 cat >>confdefs.h <<\EOF
18717 #define HAVE_VFSCANF 1
18718 EOF
18719 ;;
18720 (_doscan)
18721 cat >>confdefs.h <<\EOF
18722 #define HAVE__DOSCAN 1
18723 EOF
18724 ;;
18725 esac
18726
18727 for ac_header in \
18728 unistd.h \
18729
18730 do
18731 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18732 echo "$as_me:18732: checking for $ac_header" >&5
18733 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18734 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18735   echo $ECHO_N "(cached) $ECHO_C" >&6
18736 else
18737   cat >conftest.$ac_ext <<_ACEOF
18738 #line 18738 "configure"
18739 #include "confdefs.h"
18740 #include <$ac_header>
18741 _ACEOF
18742 if { (eval echo "$as_me:18742: \"$ac_cpp conftest.$ac_ext\"") >&5
18743   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18744   ac_status=$?
18745   egrep -v '^ *\+' conftest.er1 >conftest.err
18746   rm -f conftest.er1
18747   cat conftest.err >&5
18748   echo "$as_me:18748: \$? = $ac_status" >&5
18749   (exit $ac_status); } >/dev/null; then
18750   if test -s conftest.err; then
18751     ac_cpp_err=$ac_c_preproc_warn_flag
18752   else
18753     ac_cpp_err=
18754   fi
18755 else
18756   ac_cpp_err=yes
18757 fi
18758 if test -z "$ac_cpp_err"; then
18759   eval "$as_ac_Header=yes"
18760 else
18761   echo "$as_me: failed program was:" >&5
18762   cat conftest.$ac_ext >&5
18763   eval "$as_ac_Header=no"
18764 fi
18765 rm -f conftest.err conftest.$ac_ext
18766 fi
18767 echo "$as_me:18767: result: `eval echo '${'$as_ac_Header'}'`" >&5
18768 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18769 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18770   cat >>confdefs.h <<EOF
18771 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18772 EOF
18773
18774 fi
18775 done
18776
18777 echo "$as_me:18777: checking for working mkstemp" >&5
18778 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18779 if test "${cf_cv_func_mkstemp+set}" = set; then
18780   echo $ECHO_N "(cached) $ECHO_C" >&6
18781 else
18782
18783 rm -rf conftest*
18784 if test "$cross_compiling" = yes; then
18785   cf_cv_func_mkstemp=maybe
18786 else
18787   cat >conftest.$ac_ext <<_ACEOF
18788 #line 18788 "configure"
18789 #include "confdefs.h"
18790
18791 #include <sys/types.h>
18792 #ifdef HAVE_UNISTD_H
18793 #include <unistd.h>
18794 #endif
18795 #include <stdlib.h>
18796 #include <stdio.h>
18797 #include <string.h>
18798 #include <sys/stat.h>
18799 int main(void)
18800 {
18801         char *tmpl = "conftestXXXXXX";
18802         char name[2][80];
18803         int n;
18804         int result = 0;
18805         int fd;
18806         struct stat sb;
18807
18808         umask(077);
18809         for (n = 0; n < 2; ++n) {
18810                 strcpy(name[n], tmpl);
18811                 if ((fd = mkstemp(name[n])) >= 0) {
18812                         if (!strcmp(name[n], tmpl)
18813                          || stat(name[n], &sb) != 0
18814                          || (sb.st_mode & S_IFMT) != S_IFREG
18815                          || (sb.st_mode & 077) != 0) {
18816                                 result = 1;
18817                         }
18818                         close(fd);
18819                 }
18820         }
18821         if (result == 0
18822          && !strcmp(name[0], name[1]))
18823                 result = 1;
18824         ${cf_cv_main_return:-return}(result);
18825 }
18826
18827 _ACEOF
18828 rm -f conftest$ac_exeext
18829 if { (eval echo "$as_me:18829: \"$ac_link\"") >&5
18830   (eval $ac_link) 2>&5
18831   ac_status=$?
18832   echo "$as_me:18832: \$? = $ac_status" >&5
18833   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18834   { (eval echo "$as_me:18834: \"$ac_try\"") >&5
18835   (eval $ac_try) 2>&5
18836   ac_status=$?
18837   echo "$as_me:18837: \$? = $ac_status" >&5
18838   (exit $ac_status); }; }; then
18839   cf_cv_func_mkstemp=yes
18840
18841 else
18842   echo "$as_me: program exited with status $ac_status" >&5
18843 echo "$as_me: failed program was:" >&5
18844 cat conftest.$ac_ext >&5
18845 cf_cv_func_mkstemp=no
18846
18847 fi
18848 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18849 fi
18850
18851 fi
18852 echo "$as_me:18852: result: $cf_cv_func_mkstemp" >&5
18853 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18854 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18855         echo "$as_me:18855: checking for mkstemp" >&5
18856 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18857 if test "${ac_cv_func_mkstemp+set}" = set; then
18858   echo $ECHO_N "(cached) $ECHO_C" >&6
18859 else
18860   cat >conftest.$ac_ext <<_ACEOF
18861 #line 18861 "configure"
18862 #include "confdefs.h"
18863 /* System header to define __stub macros and hopefully few prototypes,
18864     which can conflict with char mkstemp (); below.  */
18865 #include <assert.h>
18866 /* Override any gcc2 internal prototype to avoid an error.  */
18867 #ifdef __cplusplus
18868 extern "C"
18869 #endif
18870 /* We use char because int might match the return type of a gcc2
18871    builtin and then its argument prototype would still apply.  */
18872 char mkstemp ();
18873 char (*f) ();
18874
18875 int
18876 main (void)
18877 {
18878 /* The GNU C library defines this for functions which it implements
18879     to always fail with ENOSYS.  Some functions are actually named
18880     something starting with __ and the normal name is an alias.  */
18881 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18882 choke me
18883 #else
18884 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18885 #endif
18886
18887   ;
18888   return 0;
18889 }
18890 _ACEOF
18891 rm -f conftest.$ac_objext conftest$ac_exeext
18892 if { (eval echo "$as_me:18892: \"$ac_link\"") >&5
18893   (eval $ac_link) 2>&5
18894   ac_status=$?
18895   echo "$as_me:18895: \$? = $ac_status" >&5
18896   (exit $ac_status); } &&
18897          { ac_try='test -s conftest$ac_exeext'
18898   { (eval echo "$as_me:18898: \"$ac_try\"") >&5
18899   (eval $ac_try) 2>&5
18900   ac_status=$?
18901   echo "$as_me:18901: \$? = $ac_status" >&5
18902   (exit $ac_status); }; }; then
18903   ac_cv_func_mkstemp=yes
18904 else
18905   echo "$as_me: failed program was:" >&5
18906 cat conftest.$ac_ext >&5
18907 ac_cv_func_mkstemp=no
18908 fi
18909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18910 fi
18911 echo "$as_me:18911: result: $ac_cv_func_mkstemp" >&5
18912 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18913
18914 fi
18915 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18916
18917 cat >>confdefs.h <<\EOF
18918 #define HAVE_MKSTEMP 1
18919 EOF
18920
18921 fi
18922
18923 # setup for prototype of fallback for vsscanf()
18924
18925 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18926         HAVE_VSSCANF=1
18927 else
18928         HAVE_VSSCANF=0
18929 fi
18930
18931 if test "x$cross_compiling" = xyes ; then
18932         { echo "$as_me:18932: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18933 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18934 else
18935         echo "$as_me:18935: checking whether setvbuf arguments are reversed" >&5
18936 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18937 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18938   echo $ECHO_N "(cached) $ECHO_C" >&6
18939 else
18940   if test "$cross_compiling" = yes; then
18941   { { echo "$as_me:18941: error: cannot run test program while cross compiling" >&5
18942 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18943    { (exit 1); exit 1; }; }
18944 else
18945   cat >conftest.$ac_ext <<_ACEOF
18946 #line 18946 "configure"
18947 #include "confdefs.h"
18948 #include <stdio.h>
18949 /* If setvbuf has the reversed format, exit 0. */
18950 int
18951 main (void)
18952 {
18953   /* This call has the arguments reversed.
18954      A reversed system may check and see that the address of main
18955      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18956   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18957     $ac_main_return(1);
18958   putc('\r', stdout);
18959   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18960 }
18961 _ACEOF
18962 rm -f conftest$ac_exeext
18963 if { (eval echo "$as_me:18963: \"$ac_link\"") >&5
18964   (eval $ac_link) 2>&5
18965   ac_status=$?
18966   echo "$as_me:18966: \$? = $ac_status" >&5
18967   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18968   { (eval echo "$as_me:18968: \"$ac_try\"") >&5
18969   (eval $ac_try) 2>&5
18970   ac_status=$?
18971   echo "$as_me:18971: \$? = $ac_status" >&5
18972   (exit $ac_status); }; }; then
18973   ac_cv_func_setvbuf_reversed=yes
18974 else
18975   echo "$as_me: program exited with status $ac_status" >&5
18976 echo "$as_me: failed program was:" >&5
18977 cat conftest.$ac_ext >&5
18978 ac_cv_func_setvbuf_reversed=no
18979 fi
18980 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18981 fi
18982 rm -f core core.* *.core
18983 fi
18984 echo "$as_me:18984: result: $ac_cv_func_setvbuf_reversed" >&5
18985 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18986 if test $ac_cv_func_setvbuf_reversed = yes; then
18987
18988 cat >>confdefs.h <<\EOF
18989 #define SETVBUF_REVERSED 1
18990 EOF
18991
18992 fi
18993
18994 fi
18995 echo "$as_me:18995: checking for intptr_t" >&5
18996 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18997 if test "${ac_cv_type_intptr_t+set}" = set; then
18998   echo $ECHO_N "(cached) $ECHO_C" >&6
18999 else
19000   cat >conftest.$ac_ext <<_ACEOF
19001 #line 19001 "configure"
19002 #include "confdefs.h"
19003 $ac_includes_default
19004 int
19005 main (void)
19006 {
19007 if ((intptr_t *) 0)
19008   return 0;
19009 if (sizeof (intptr_t))
19010   return 0;
19011   ;
19012   return 0;
19013 }
19014 _ACEOF
19015 rm -f conftest.$ac_objext
19016 if { (eval echo "$as_me:19016: \"$ac_compile\"") >&5
19017   (eval $ac_compile) 2>&5
19018   ac_status=$?
19019   echo "$as_me:19019: \$? = $ac_status" >&5
19020   (exit $ac_status); } &&
19021          { ac_try='test -s conftest.$ac_objext'
19022   { (eval echo "$as_me:19022: \"$ac_try\"") >&5
19023   (eval $ac_try) 2>&5
19024   ac_status=$?
19025   echo "$as_me:19025: \$? = $ac_status" >&5
19026   (exit $ac_status); }; }; then
19027   ac_cv_type_intptr_t=yes
19028 else
19029   echo "$as_me: failed program was:" >&5
19030 cat conftest.$ac_ext >&5
19031 ac_cv_type_intptr_t=no
19032 fi
19033 rm -f conftest.$ac_objext conftest.$ac_ext
19034 fi
19035 echo "$as_me:19035: result: $ac_cv_type_intptr_t" >&5
19036 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19037 if test $ac_cv_type_intptr_t = yes; then
19038   :
19039 else
19040
19041 cat >>confdefs.h <<EOF
19042 #define intptr_t long
19043 EOF
19044
19045 fi
19046
19047 echo "$as_me:19047: checking for ssize_t" >&5
19048 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19049 if test "${ac_cv_type_ssize_t+set}" = set; then
19050   echo $ECHO_N "(cached) $ECHO_C" >&6
19051 else
19052   cat >conftest.$ac_ext <<_ACEOF
19053 #line 19053 "configure"
19054 #include "confdefs.h"
19055 $ac_includes_default
19056 int
19057 main (void)
19058 {
19059 if ((ssize_t *) 0)
19060   return 0;
19061 if (sizeof (ssize_t))
19062   return 0;
19063   ;
19064   return 0;
19065 }
19066 _ACEOF
19067 rm -f conftest.$ac_objext
19068 if { (eval echo "$as_me:19068: \"$ac_compile\"") >&5
19069   (eval $ac_compile) 2>&5
19070   ac_status=$?
19071   echo "$as_me:19071: \$? = $ac_status" >&5
19072   (exit $ac_status); } &&
19073          { ac_try='test -s conftest.$ac_objext'
19074   { (eval echo "$as_me:19074: \"$ac_try\"") >&5
19075   (eval $ac_try) 2>&5
19076   ac_status=$?
19077   echo "$as_me:19077: \$? = $ac_status" >&5
19078   (exit $ac_status); }; }; then
19079   ac_cv_type_ssize_t=yes
19080 else
19081   echo "$as_me: failed program was:" >&5
19082 cat conftest.$ac_ext >&5
19083 ac_cv_type_ssize_t=no
19084 fi
19085 rm -f conftest.$ac_objext conftest.$ac_ext
19086 fi
19087 echo "$as_me:19087: result: $ac_cv_type_ssize_t" >&5
19088 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19089 if test $ac_cv_type_ssize_t = yes; then
19090   :
19091 else
19092
19093 cat >>confdefs.h <<EOF
19094 #define ssize_t int
19095 EOF
19096
19097 fi
19098
19099 echo "$as_me:19099: checking for type sigaction_t" >&5
19100 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19101 if test "${cf_cv_type_sigaction+set}" = set; then
19102   echo $ECHO_N "(cached) $ECHO_C" >&6
19103 else
19104
19105         cat >conftest.$ac_ext <<_ACEOF
19106 #line 19106 "configure"
19107 #include "confdefs.h"
19108
19109 #include <signal.h>
19110 int
19111 main (void)
19112 {
19113 sigaction_t x
19114   ;
19115   return 0;
19116 }
19117 _ACEOF
19118 rm -f conftest.$ac_objext
19119 if { (eval echo "$as_me:19119: \"$ac_compile\"") >&5
19120   (eval $ac_compile) 2>&5
19121   ac_status=$?
19122   echo "$as_me:19122: \$? = $ac_status" >&5
19123   (exit $ac_status); } &&
19124          { ac_try='test -s conftest.$ac_objext'
19125   { (eval echo "$as_me:19125: \"$ac_try\"") >&5
19126   (eval $ac_try) 2>&5
19127   ac_status=$?
19128   echo "$as_me:19128: \$? = $ac_status" >&5
19129   (exit $ac_status); }; }; then
19130   cf_cv_type_sigaction=yes
19131 else
19132   echo "$as_me: failed program was:" >&5
19133 cat conftest.$ac_ext >&5
19134 cf_cv_type_sigaction=no
19135 fi
19136 rm -f conftest.$ac_objext conftest.$ac_ext
19137 fi
19138
19139 echo "$as_me:19139: result: $cf_cv_type_sigaction" >&5
19140 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19141 test "$cf_cv_type_sigaction" = yes &&
19142 cat >>confdefs.h <<\EOF
19143 #define HAVE_TYPE_SIGACTION 1
19144 EOF
19145
19146 echo "$as_me:19146: checking declaration of size-change" >&5
19147 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19148 if test "${cf_cv_sizechange+set}" = set; then
19149   echo $ECHO_N "(cached) $ECHO_C" >&6
19150 else
19151
19152         cf_cv_sizechange=unknown
19153         cf_save_CPPFLAGS="$CPPFLAGS"
19154
19155 for cf_opts in "" "NEED_PTEM_H"
19156 do
19157
19158         CPPFLAGS="$cf_save_CPPFLAGS"
19159         if test -n "$cf_opts"
19160         then
19161
19162         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19163         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19164
19165         fi
19166         cat >conftest.$ac_ext <<_ACEOF
19167 #line 19167 "configure"
19168 #include "confdefs.h"
19169 #include <sys/types.h>
19170 #ifdef HAVE_TERMIOS_H
19171 #include <termios.h>
19172 #else
19173 #ifdef HAVE_TERMIO_H
19174 #include <termio.h>
19175 #endif
19176 #endif
19177
19178 #ifdef NEED_PTEM_H
19179 /* This is a workaround for SCO:  they neglected to define struct winsize in
19180  * termios.h -- it's only in termio.h and ptem.h
19181  */
19182 #include <sys/stream.h>
19183 #include <sys/ptem.h>
19184 #endif
19185
19186 #ifdef HAVE_SYS_IOCTL_H
19187 #include <sys/ioctl.h>
19188 #endif
19189
19190 int
19191 main (void)
19192 {
19193
19194 #ifdef TIOCGSIZE
19195         struct ttysize win;     /* SunOS 3.0... */
19196         int y = win.ts_lines;
19197         int x = win.ts_cols;
19198 #else
19199 #ifdef TIOCGWINSZ
19200         struct winsize win;     /* everything else */
19201         int y = win.ws_row;
19202         int x = win.ws_col;
19203 #else
19204         no TIOCGSIZE or TIOCGWINSZ
19205 #endif /* TIOCGWINSZ */
19206 #endif /* TIOCGSIZE */
19207
19208   ;
19209   return 0;
19210 }
19211 _ACEOF
19212 rm -f conftest.$ac_objext
19213 if { (eval echo "$as_me:19213: \"$ac_compile\"") >&5
19214   (eval $ac_compile) 2>&5
19215   ac_status=$?
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit $ac_status); } &&
19218          { ac_try='test -s conftest.$ac_objext'
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_sizechange=yes
19225 else
19226   echo "$as_me: failed program was:" >&5
19227 cat conftest.$ac_ext >&5
19228 cf_cv_sizechange=no
19229 fi
19230 rm -f conftest.$ac_objext conftest.$ac_ext
19231
19232         CPPFLAGS="$cf_save_CPPFLAGS"
19233         if test "$cf_cv_sizechange" = yes ; then
19234                 echo "size-change succeeded ($cf_opts)" >&5
19235                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19236                 break
19237         fi
19238 done
19239
19240 fi
19241 echo "$as_me:19241: result: $cf_cv_sizechange" >&5
19242 echo "${ECHO_T}$cf_cv_sizechange" >&6
19243 if test "$cf_cv_sizechange" != no ; then
19244
19245 cat >>confdefs.h <<\EOF
19246 #define HAVE_SIZECHANGE 1
19247 EOF
19248
19249         case $cf_cv_sizechange in
19250         (NEED*)
19251                 cat >>confdefs.h <<EOF
19252 #define $cf_cv_sizechange  1
19253 EOF
19254
19255                 ;;
19256         esac
19257 fi
19258
19259 echo "$as_me:19259: checking for memmove" >&5
19260 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19261 if test "${ac_cv_func_memmove+set}" = set; then
19262   echo $ECHO_N "(cached) $ECHO_C" >&6
19263 else
19264   cat >conftest.$ac_ext <<_ACEOF
19265 #line 19265 "configure"
19266 #include "confdefs.h"
19267 /* System header to define __stub macros and hopefully few prototypes,
19268     which can conflict with char memmove (); below.  */
19269 #include <assert.h>
19270 /* Override any gcc2 internal prototype to avoid an error.  */
19271 #ifdef __cplusplus
19272 extern "C"
19273 #endif
19274 /* We use char because int might match the return type of a gcc2
19275    builtin and then its argument prototype would still apply.  */
19276 char memmove ();
19277 char (*f) ();
19278
19279 int
19280 main (void)
19281 {
19282 /* The GNU C library defines this for functions which it implements
19283     to always fail with ENOSYS.  Some functions are actually named
19284     something starting with __ and the normal name is an alias.  */
19285 #if defined (__stub_memmove) || defined (__stub___memmove)
19286 choke me
19287 #else
19288 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19289 #endif
19290
19291   ;
19292   return 0;
19293 }
19294 _ACEOF
19295 rm -f conftest.$ac_objext conftest$ac_exeext
19296 if { (eval echo "$as_me:19296: \"$ac_link\"") >&5
19297   (eval $ac_link) 2>&5
19298   ac_status=$?
19299   echo "$as_me:19299: \$? = $ac_status" >&5
19300   (exit $ac_status); } &&
19301          { ac_try='test -s conftest$ac_exeext'
19302   { (eval echo "$as_me:19302: \"$ac_try\"") >&5
19303   (eval $ac_try) 2>&5
19304   ac_status=$?
19305   echo "$as_me:19305: \$? = $ac_status" >&5
19306   (exit $ac_status); }; }; then
19307   ac_cv_func_memmove=yes
19308 else
19309   echo "$as_me: failed program was:" >&5
19310 cat conftest.$ac_ext >&5
19311 ac_cv_func_memmove=no
19312 fi
19313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19314 fi
19315 echo "$as_me:19315: result: $ac_cv_func_memmove" >&5
19316 echo "${ECHO_T}$ac_cv_func_memmove" >&6
19317 if test $ac_cv_func_memmove = yes; then
19318   :
19319 else
19320
19321 echo "$as_me:19321: checking for bcopy" >&5
19322 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
19323 if test "${ac_cv_func_bcopy+set}" = set; then
19324   echo $ECHO_N "(cached) $ECHO_C" >&6
19325 else
19326   cat >conftest.$ac_ext <<_ACEOF
19327 #line 19327 "configure"
19328 #include "confdefs.h"
19329 /* System header to define __stub macros and hopefully few prototypes,
19330     which can conflict with char bcopy (); below.  */
19331 #include <assert.h>
19332 /* Override any gcc2 internal prototype to avoid an error.  */
19333 #ifdef __cplusplus
19334 extern "C"
19335 #endif
19336 /* We use char because int might match the return type of a gcc2
19337    builtin and then its argument prototype would still apply.  */
19338 char bcopy ();
19339 char (*f) ();
19340
19341 int
19342 main (void)
19343 {
19344 /* The GNU C library defines this for functions which it implements
19345     to always fail with ENOSYS.  Some functions are actually named
19346     something starting with __ and the normal name is an alias.  */
19347 #if defined (__stub_bcopy) || defined (__stub___bcopy)
19348 choke me
19349 #else
19350 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19351 #endif
19352
19353   ;
19354   return 0;
19355 }
19356 _ACEOF
19357 rm -f conftest.$ac_objext conftest$ac_exeext
19358 if { (eval echo "$as_me:19358: \"$ac_link\"") >&5
19359   (eval $ac_link) 2>&5
19360   ac_status=$?
19361   echo "$as_me:19361: \$? = $ac_status" >&5
19362   (exit $ac_status); } &&
19363          { ac_try='test -s conftest$ac_exeext'
19364   { (eval echo "$as_me:19364: \"$ac_try\"") >&5
19365   (eval $ac_try) 2>&5
19366   ac_status=$?
19367   echo "$as_me:19367: \$? = $ac_status" >&5
19368   (exit $ac_status); }; }; then
19369   ac_cv_func_bcopy=yes
19370 else
19371   echo "$as_me: failed program was:" >&5
19372 cat conftest.$ac_ext >&5
19373 ac_cv_func_bcopy=no
19374 fi
19375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19376 fi
19377 echo "$as_me:19377: result: $ac_cv_func_bcopy" >&5
19378 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
19379 if test $ac_cv_func_bcopy = yes; then
19380
19381         echo "$as_me:19381: checking if bcopy does overlapping moves" >&5
19382 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
19383 if test "${cf_cv_good_bcopy+set}" = set; then
19384   echo $ECHO_N "(cached) $ECHO_C" >&6
19385 else
19386
19387                 if test "$cross_compiling" = yes; then
19388   cf_cv_good_bcopy=unknown
19389 else
19390   cat >conftest.$ac_ext <<_ACEOF
19391 #line 19391 "configure"
19392 #include "confdefs.h"
19393
19394 int main(void) {
19395         static char data[] = "abcdefghijklmnopqrstuwwxyz";
19396         char temp[40];
19397         bcopy(data, temp, sizeof(data));
19398         bcopy(temp+10, temp, 15);
19399         bcopy(temp+5, temp+15, 10);
19400         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
19401 }
19402
19403 _ACEOF
19404 rm -f conftest$ac_exeext
19405 if { (eval echo "$as_me:19405: \"$ac_link\"") >&5
19406   (eval $ac_link) 2>&5
19407   ac_status=$?
19408   echo "$as_me:19408: \$? = $ac_status" >&5
19409   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19410   { (eval echo "$as_me:19410: \"$ac_try\"") >&5
19411   (eval $ac_try) 2>&5
19412   ac_status=$?
19413   echo "$as_me:19413: \$? = $ac_status" >&5
19414   (exit $ac_status); }; }; then
19415   cf_cv_good_bcopy=yes
19416 else
19417   echo "$as_me: program exited with status $ac_status" >&5
19418 echo "$as_me: failed program was:" >&5
19419 cat conftest.$ac_ext >&5
19420 cf_cv_good_bcopy=no
19421 fi
19422 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19423 fi
19424
19425 fi
19426 echo "$as_me:19426: result: $cf_cv_good_bcopy" >&5
19427 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
19428
19429 else
19430   cf_cv_good_bcopy=no
19431 fi
19432
19433         if test "$cf_cv_good_bcopy" = yes ; then
19434
19435 cat >>confdefs.h <<\EOF
19436 #define USE_OK_BCOPY 1
19437 EOF
19438
19439         else
19440
19441 cat >>confdefs.h <<\EOF
19442 #define USE_MY_MEMMOVE 1
19443 EOF
19444
19445         fi
19446
19447 fi
19448
19449 tty 2>&1 >/dev/null || {
19450 for ac_func in posix_openpt
19451 do
19452 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19453 echo "$as_me:19453: checking for $ac_func" >&5
19454 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19455 if eval "test \"\${$as_ac_var+set}\" = set"; then
19456   echo $ECHO_N "(cached) $ECHO_C" >&6
19457 else
19458   cat >conftest.$ac_ext <<_ACEOF
19459 #line 19459 "configure"
19460 #include "confdefs.h"
19461 /* System header to define __stub macros and hopefully few prototypes,
19462     which can conflict with char $ac_func (); below.  */
19463 #include <assert.h>
19464 /* Override any gcc2 internal prototype to avoid an error.  */
19465 #ifdef __cplusplus
19466 extern "C"
19467 #endif
19468 /* We use char because int might match the return type of a gcc2
19469    builtin and then its argument prototype would still apply.  */
19470 char $ac_func ();
19471 char (*f) ();
19472
19473 int
19474 main (void)
19475 {
19476 /* The GNU C library defines this for functions which it implements
19477     to always fail with ENOSYS.  Some functions are actually named
19478     something starting with __ and the normal name is an alias.  */
19479 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19480 choke me
19481 #else
19482 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19483 #endif
19484
19485   ;
19486   return 0;
19487 }
19488 _ACEOF
19489 rm -f conftest.$ac_objext conftest$ac_exeext
19490 if { (eval echo "$as_me:19490: \"$ac_link\"") >&5
19491   (eval $ac_link) 2>&5
19492   ac_status=$?
19493   echo "$as_me:19493: \$? = $ac_status" >&5
19494   (exit $ac_status); } &&
19495          { ac_try='test -s conftest$ac_exeext'
19496   { (eval echo "$as_me:19496: \"$ac_try\"") >&5
19497   (eval $ac_try) 2>&5
19498   ac_status=$?
19499   echo "$as_me:19499: \$? = $ac_status" >&5
19500   (exit $ac_status); }; }; then
19501   eval "$as_ac_var=yes"
19502 else
19503   echo "$as_me: failed program was:" >&5
19504 cat conftest.$ac_ext >&5
19505 eval "$as_ac_var=no"
19506 fi
19507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19508 fi
19509 echo "$as_me:19509: result: `eval echo '${'$as_ac_var'}'`" >&5
19510 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19511 if test `eval echo '${'$as_ac_var'}'` = yes; then
19512   cat >>confdefs.h <<EOF
19513 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19514 EOF
19515
19516 fi
19517 done
19518  }
19519 echo "$as_me:19519: checking if poll really works" >&5
19520 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
19521 if test "${cf_cv_working_poll+set}" = set; then
19522   echo $ECHO_N "(cached) $ECHO_C" >&6
19523 else
19524
19525 if test "$cross_compiling" = yes; then
19526   cf_cv_working_poll=unknown
19527 else
19528   cat >conftest.$ac_ext <<_ACEOF
19529 #line 19529 "configure"
19530 #include "confdefs.h"
19531
19532 #include <stdlib.h>
19533 #include <stdio.h>
19534 #include <unistd.h>
19535 #include <fcntl.h>
19536 #ifdef HAVE_POLL_H
19537 #include <poll.h>
19538 #else
19539 #include <sys/poll.h>
19540 #endif
19541 int main(void) {
19542         struct pollfd myfds;
19543         int ret;
19544
19545         /* check for Darwin bug with respect to "devices" */
19546         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
19547         if (myfds.fd < 0)
19548                 myfds.fd = 0;
19549         myfds.events = POLLIN;
19550         myfds.revents = 0;
19551
19552         ret = poll(&myfds, 1, 100);
19553
19554         if (ret < 0 || (myfds.revents & POLLNVAL)) {
19555                 ret = -1;
19556         } else {
19557                 int fd = 0;
19558                 if (!isatty(fd)) {
19559                         fd = open("/dev/tty", 2);       /* O_RDWR */
19560                 }
19561 #ifdef HAVE_POSIX_OPENPT
19562                 if (fd < 0) {
19563                         fd = posix_openpt(O_RDWR);
19564                 }
19565 #endif
19566
19567                 if (fd >= 0) {
19568                         /* also check with standard input */
19569                         myfds.fd = fd;
19570                         myfds.events = POLLIN;
19571                         myfds.revents = 0;
19572                         ret = poll(&myfds, 1, 100);
19573                 } else {
19574                         ret = -1;
19575                 }
19576         }
19577         ${cf_cv_main_return:-return}(ret < 0);
19578 }
19579 _ACEOF
19580 rm -f conftest$ac_exeext
19581 if { (eval echo "$as_me:19581: \"$ac_link\"") >&5
19582   (eval $ac_link) 2>&5
19583   ac_status=$?
19584   echo "$as_me:19584: \$? = $ac_status" >&5
19585   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19586   { (eval echo "$as_me:19586: \"$ac_try\"") >&5
19587   (eval $ac_try) 2>&5
19588   ac_status=$?
19589   echo "$as_me:19589: \$? = $ac_status" >&5
19590   (exit $ac_status); }; }; then
19591   cf_cv_working_poll=yes
19592 else
19593   echo "$as_me: program exited with status $ac_status" >&5
19594 echo "$as_me: failed program was:" >&5
19595 cat conftest.$ac_ext >&5
19596 cf_cv_working_poll=no
19597 fi
19598 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19599 fi
19600 fi
19601 echo "$as_me:19601: result: $cf_cv_working_poll" >&5
19602 echo "${ECHO_T}$cf_cv_working_poll" >&6
19603 test "$cf_cv_working_poll" = "yes" &&
19604 cat >>confdefs.h <<\EOF
19605 #define HAVE_WORKING_POLL 1
19606 EOF
19607
19608 echo "$as_me:19608: checking for va_copy" >&5
19609 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
19610 if test "${cf_cv_have_va_copy+set}" = set; then
19611   echo $ECHO_N "(cached) $ECHO_C" >&6
19612 else
19613
19614 cat >conftest.$ac_ext <<_ACEOF
19615 #line 19615 "configure"
19616 #include "confdefs.h"
19617
19618 #include <stdarg.h>
19619
19620 int
19621 main (void)
19622 {
19623
19624         static va_list dst;
19625         static va_list src;
19626         va_copy(dst, src)
19627   ;
19628   return 0;
19629 }
19630 _ACEOF
19631 rm -f conftest.$ac_objext conftest$ac_exeext
19632 if { (eval echo "$as_me:19632: \"$ac_link\"") >&5
19633   (eval $ac_link) 2>&5
19634   ac_status=$?
19635   echo "$as_me:19635: \$? = $ac_status" >&5
19636   (exit $ac_status); } &&
19637          { ac_try='test -s conftest$ac_exeext'
19638   { (eval echo "$as_me:19638: \"$ac_try\"") >&5
19639   (eval $ac_try) 2>&5
19640   ac_status=$?
19641   echo "$as_me:19641: \$? = $ac_status" >&5
19642   (exit $ac_status); }; }; then
19643   cf_cv_have_va_copy=yes
19644 else
19645   echo "$as_me: failed program was:" >&5
19646 cat conftest.$ac_ext >&5
19647 cf_cv_have_va_copy=no
19648 fi
19649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19650 fi
19651 echo "$as_me:19651: result: $cf_cv_have_va_copy" >&5
19652 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19653
19654 test "$cf_cv_have_va_copy" = yes &&
19655 cat >>confdefs.h <<\EOF
19656 #define HAVE_VA_COPY 1
19657 EOF
19658
19659 echo "$as_me:19659: checking for __va_copy" >&5
19660 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19661 if test "${cf_cv_have___va_copy+set}" = set; then
19662   echo $ECHO_N "(cached) $ECHO_C" >&6
19663 else
19664
19665 cat >conftest.$ac_ext <<_ACEOF
19666 #line 19666 "configure"
19667 #include "confdefs.h"
19668
19669 #include <stdarg.h>
19670
19671 int
19672 main (void)
19673 {
19674
19675         static va_list dst;
19676         static va_list src;
19677         __va_copy(dst, src)
19678   ;
19679   return 0;
19680 }
19681 _ACEOF
19682 rm -f conftest.$ac_objext conftest$ac_exeext
19683 if { (eval echo "$as_me:19683: \"$ac_link\"") >&5
19684   (eval $ac_link) 2>&5
19685   ac_status=$?
19686   echo "$as_me:19686: \$? = $ac_status" >&5
19687   (exit $ac_status); } &&
19688          { ac_try='test -s conftest$ac_exeext'
19689   { (eval echo "$as_me:19689: \"$ac_try\"") >&5
19690   (eval $ac_try) 2>&5
19691   ac_status=$?
19692   echo "$as_me:19692: \$? = $ac_status" >&5
19693   (exit $ac_status); }; }; then
19694   cf_cv_have___va_copy=yes
19695 else
19696   echo "$as_me: failed program was:" >&5
19697 cat conftest.$ac_ext >&5
19698 cf_cv_have___va_copy=no
19699 fi
19700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19701 fi
19702 echo "$as_me:19702: result: $cf_cv_have___va_copy" >&5
19703 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19704
19705 test "$cf_cv_have___va_copy" = yes &&
19706 cat >>confdefs.h <<\EOF
19707 #define HAVE___VA_COPY 1
19708 EOF
19709
19710 echo "$as_me:19710: checking for pid_t" >&5
19711 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19712 if test "${ac_cv_type_pid_t+set}" = set; then
19713   echo $ECHO_N "(cached) $ECHO_C" >&6
19714 else
19715   cat >conftest.$ac_ext <<_ACEOF
19716 #line 19716 "configure"
19717 #include "confdefs.h"
19718 $ac_includes_default
19719 int
19720 main (void)
19721 {
19722 if ((pid_t *) 0)
19723   return 0;
19724 if (sizeof (pid_t))
19725   return 0;
19726   ;
19727   return 0;
19728 }
19729 _ACEOF
19730 rm -f conftest.$ac_objext
19731 if { (eval echo "$as_me:19731: \"$ac_compile\"") >&5
19732   (eval $ac_compile) 2>&5
19733   ac_status=$?
19734   echo "$as_me:19734: \$? = $ac_status" >&5
19735   (exit $ac_status); } &&
19736          { ac_try='test -s conftest.$ac_objext'
19737   { (eval echo "$as_me:19737: \"$ac_try\"") >&5
19738   (eval $ac_try) 2>&5
19739   ac_status=$?
19740   echo "$as_me:19740: \$? = $ac_status" >&5
19741   (exit $ac_status); }; }; then
19742   ac_cv_type_pid_t=yes
19743 else
19744   echo "$as_me: failed program was:" >&5
19745 cat conftest.$ac_ext >&5
19746 ac_cv_type_pid_t=no
19747 fi
19748 rm -f conftest.$ac_objext conftest.$ac_ext
19749 fi
19750 echo "$as_me:19750: result: $ac_cv_type_pid_t" >&5
19751 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19752 if test $ac_cv_type_pid_t = yes; then
19753   :
19754 else
19755
19756 cat >>confdefs.h <<EOF
19757 #define pid_t int
19758 EOF
19759
19760 fi
19761
19762 for ac_header in unistd.h vfork.h
19763 do
19764 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19765 echo "$as_me:19765: checking for $ac_header" >&5
19766 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19767 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19768   echo $ECHO_N "(cached) $ECHO_C" >&6
19769 else
19770   cat >conftest.$ac_ext <<_ACEOF
19771 #line 19771 "configure"
19772 #include "confdefs.h"
19773 #include <$ac_header>
19774 _ACEOF
19775 if { (eval echo "$as_me:19775: \"$ac_cpp conftest.$ac_ext\"") >&5
19776   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19777   ac_status=$?
19778   egrep -v '^ *\+' conftest.er1 >conftest.err
19779   rm -f conftest.er1
19780   cat conftest.err >&5
19781   echo "$as_me:19781: \$? = $ac_status" >&5
19782   (exit $ac_status); } >/dev/null; then
19783   if test -s conftest.err; then
19784     ac_cpp_err=$ac_c_preproc_warn_flag
19785   else
19786     ac_cpp_err=
19787   fi
19788 else
19789   ac_cpp_err=yes
19790 fi
19791 if test -z "$ac_cpp_err"; then
19792   eval "$as_ac_Header=yes"
19793 else
19794   echo "$as_me: failed program was:" >&5
19795   cat conftest.$ac_ext >&5
19796   eval "$as_ac_Header=no"
19797 fi
19798 rm -f conftest.err conftest.$ac_ext
19799 fi
19800 echo "$as_me:19800: result: `eval echo '${'$as_ac_Header'}'`" >&5
19801 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19802 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19803   cat >>confdefs.h <<EOF
19804 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19805 EOF
19806
19807 fi
19808 done
19809
19810 for ac_func in fork vfork
19811 do
19812 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19813 echo "$as_me:19813: checking for $ac_func" >&5
19814 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19815 if eval "test \"\${$as_ac_var+set}\" = set"; then
19816   echo $ECHO_N "(cached) $ECHO_C" >&6
19817 else
19818   cat >conftest.$ac_ext <<_ACEOF
19819 #line 19819 "configure"
19820 #include "confdefs.h"
19821 /* System header to define __stub macros and hopefully few prototypes,
19822     which can conflict with char $ac_func (); below.  */
19823 #include <assert.h>
19824 /* Override any gcc2 internal prototype to avoid an error.  */
19825 #ifdef __cplusplus
19826 extern "C"
19827 #endif
19828 /* We use char because int might match the return type of a gcc2
19829    builtin and then its argument prototype would still apply.  */
19830 char $ac_func ();
19831 char (*f) ();
19832
19833 int
19834 main (void)
19835 {
19836 /* The GNU C library defines this for functions which it implements
19837     to always fail with ENOSYS.  Some functions are actually named
19838     something starting with __ and the normal name is an alias.  */
19839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19840 choke me
19841 #else
19842 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19843 #endif
19844
19845   ;
19846   return 0;
19847 }
19848 _ACEOF
19849 rm -f conftest.$ac_objext conftest$ac_exeext
19850 if { (eval echo "$as_me:19850: \"$ac_link\"") >&5
19851   (eval $ac_link) 2>&5
19852   ac_status=$?
19853   echo "$as_me:19853: \$? = $ac_status" >&5
19854   (exit $ac_status); } &&
19855          { ac_try='test -s conftest$ac_exeext'
19856   { (eval echo "$as_me:19856: \"$ac_try\"") >&5
19857   (eval $ac_try) 2>&5
19858   ac_status=$?
19859   echo "$as_me:19859: \$? = $ac_status" >&5
19860   (exit $ac_status); }; }; then
19861   eval "$as_ac_var=yes"
19862 else
19863   echo "$as_me: failed program was:" >&5
19864 cat conftest.$ac_ext >&5
19865 eval "$as_ac_var=no"
19866 fi
19867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19868 fi
19869 echo "$as_me:19869: result: `eval echo '${'$as_ac_var'}'`" >&5
19870 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19871 if test `eval echo '${'$as_ac_var'}'` = yes; then
19872   cat >>confdefs.h <<EOF
19873 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19874 EOF
19875
19876 fi
19877 done
19878
19879 ac_cv_func_fork_works=$ac_cv_func_fork
19880 if test "x$ac_cv_func_fork" = xyes; then
19881   echo "$as_me:19881: checking for working fork" >&5
19882 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19883 if test "${ac_cv_func_fork_works+set}" = set; then
19884   echo $ECHO_N "(cached) $ECHO_C" >&6
19885 else
19886   if test "$cross_compiling" = yes; then
19887   ac_cv_func_fork_works=cross
19888 else
19889   cat >conftest.$ac_ext <<_ACEOF
19890 /* By Rüdiger Kuhlmann. */
19891       #include <sys/types.h>
19892       #if HAVE_UNISTD_H
19893       # include <unistd.h>
19894       #endif
19895       /* Some systems only have a dummy stub for fork() */
19896       int main (void)
19897       {
19898         if (fork() < 0)
19899           $ac_main_return (1);
19900         $ac_main_return (0);
19901       }
19902 _ACEOF
19903 rm -f conftest$ac_exeext
19904 if { (eval echo "$as_me:19904: \"$ac_link\"") >&5
19905   (eval $ac_link) 2>&5
19906   ac_status=$?
19907   echo "$as_me:19907: \$? = $ac_status" >&5
19908   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19909   { (eval echo "$as_me:19909: \"$ac_try\"") >&5
19910   (eval $ac_try) 2>&5
19911   ac_status=$?
19912   echo "$as_me:19912: \$? = $ac_status" >&5
19913   (exit $ac_status); }; }; then
19914   ac_cv_func_fork_works=yes
19915 else
19916   echo "$as_me: program exited with status $ac_status" >&5
19917 echo "$as_me: failed program was:" >&5
19918 cat conftest.$ac_ext >&5
19919 ac_cv_func_fork_works=no
19920 fi
19921 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19922 fi
19923 fi
19924 echo "$as_me:19924: result: $ac_cv_func_fork_works" >&5
19925 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19926
19927 fi
19928 if test "x$ac_cv_func_fork_works" = xcross; then
19929   case $host in
19930     *-*-amigaos* | *-*-msdosdjgpp*)
19931       # Override, as these systems have only a dummy fork() stub
19932       ac_cv_func_fork_works=no
19933       ;;
19934     *)
19935       ac_cv_func_fork_works=yes
19936       ;;
19937   esac
19938   { echo "$as_me:19938: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19939 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19940 fi
19941 ac_cv_func_vfork_works=$ac_cv_func_vfork
19942 if test "x$ac_cv_func_vfork" = xyes; then
19943   echo "$as_me:19943: checking for working vfork" >&5
19944 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19945 if test "${ac_cv_func_vfork_works+set}" = set; then
19946   echo $ECHO_N "(cached) $ECHO_C" >&6
19947 else
19948   if test "$cross_compiling" = yes; then
19949   ac_cv_func_vfork_works=cross
19950 else
19951   cat >conftest.$ac_ext <<_ACEOF
19952 #line 19952 "configure"
19953 #include "confdefs.h"
19954 /* Thanks to Paul Eggert for this test.  */
19955 #include <stdio.h>
19956 #include <sys/types.h>
19957 #include <sys/stat.h>
19958 #if HAVE_UNISTD_H
19959 # include <unistd.h>
19960 #endif
19961 #if HAVE_VFORK_H
19962 # include <vfork.h>
19963 #endif
19964 /* On some sparc systems, changes by the child to local and incoming
19965    argument registers are propagated back to the parent.  The compiler
19966    is told about this with #include <vfork.h>, but some compilers
19967    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19968    static variable whose address is put into a register that is
19969    clobbered by the vfork.  */
19970 static
19971 #ifdef __cplusplus
19972 sparc_address_test (int arg)
19973 # else
19974 sparc_address_test (arg) int arg;
19975 #endif
19976 {
19977   static pid_t child;
19978   if (!child) {
19979     child = vfork ();
19980     if (child < 0) {
19981       perror ("vfork");
19982       _exit(2);
19983     }
19984     if (!child) {
19985       arg = getpid();
19986       write(-1, "", 0);
19987       _exit (arg);
19988     }
19989   }
19990 }
19991
19992 int
19993 main (void)
19994 {
19995   pid_t parent = getpid ();
19996   pid_t child;
19997
19998   sparc_address_test ();
19999
20000   child = vfork ();
20001
20002   if (child == 0) {
20003     /* Here is another test for sparc vfork register problems.  This
20004        test uses lots of local variables, at least as many local
20005        variables as main has allocated so far including compiler
20006        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20007        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20008        reuse the register of parent for one of the local variables,
20009        since it will think that parent can't possibly be used any more
20010        in this routine.  Assigning to the local variable will thus
20011        munge parent in the parent process.  */
20012     pid_t
20013       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20014       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20015     /* Convince the compiler that p..p7 are live; otherwise, it might
20016        use the same hardware register for all 8 local variables.  */
20017     if (p != p1 || p != p2 || p != p3 || p != p4
20018         || p != p5 || p != p6 || p != p7)
20019       _exit(1);
20020
20021     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20022        from child file descriptors.  If the child closes a descriptor
20023        before it execs or exits, this munges the parent's descriptor
20024        as well.  Test for this by closing stdout in the child.  */
20025     _exit(close(fileno(stdout)) != 0);
20026   } else {
20027     int status;
20028     struct stat st;
20029
20030     while (wait(&status) != child)
20031       ;
20032     $ac_main_return(
20033          /* Was there some problem with vforking?  */
20034          child < 0
20035
20036          /* Did the child fail?  (This shouldn't happen.)  */
20037          || status
20038
20039          /* Did the vfork/compiler bug occur?  */
20040          || parent != getpid()
20041
20042          /* Did the file descriptor bug occur?  */
20043          || fstat(fileno(stdout), &st) != 0
20044          );
20045   }
20046 }
20047 _ACEOF
20048 rm -f conftest$ac_exeext
20049 if { (eval echo "$as_me:20049: \"$ac_link\"") >&5
20050   (eval $ac_link) 2>&5
20051   ac_status=$?
20052   echo "$as_me:20052: \$? = $ac_status" >&5
20053   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20054   { (eval echo "$as_me:20054: \"$ac_try\"") >&5
20055   (eval $ac_try) 2>&5
20056   ac_status=$?
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit $ac_status); }; }; then
20059   ac_cv_func_vfork_works=yes
20060 else
20061   echo "$as_me: program exited with status $ac_status" >&5
20062 echo "$as_me: failed program was:" >&5
20063 cat conftest.$ac_ext >&5
20064 ac_cv_func_vfork_works=no
20065 fi
20066 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20067 fi
20068 fi
20069 echo "$as_me:20069: result: $ac_cv_func_vfork_works" >&5
20070 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20071
20072 fi;
20073 if test "x$ac_cv_func_fork_works" = xcross; then
20074   ac_cv_func_vfork_works=ac_cv_func_vfork
20075   { echo "$as_me:20075: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20076 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20077 fi
20078
20079 if test "x$ac_cv_func_vfork_works" = xyes; then
20080
20081 cat >>confdefs.h <<\EOF
20082 #define HAVE_WORKING_VFORK 1
20083 EOF
20084
20085 else
20086
20087 cat >>confdefs.h <<\EOF
20088 #define vfork fork
20089 EOF
20090
20091 fi
20092 if test "x$ac_cv_func_fork_works" = xyes; then
20093
20094 cat >>confdefs.h <<\EOF
20095 #define HAVE_WORKING_FORK 1
20096 EOF
20097
20098 fi
20099
20100 # special check for test/ditto.c
20101
20102 echo "$as_me:20102: checking for openpty in -lutil" >&5
20103 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20104 if test "${ac_cv_lib_util_openpty+set}" = set; then
20105   echo $ECHO_N "(cached) $ECHO_C" >&6
20106 else
20107   ac_check_lib_save_LIBS=$LIBS
20108 LIBS="-lutil  $LIBS"
20109 cat >conftest.$ac_ext <<_ACEOF
20110 #line 20110 "configure"
20111 #include "confdefs.h"
20112
20113 /* Override any gcc2 internal prototype to avoid an error.  */
20114 #ifdef __cplusplus
20115 extern "C"
20116 #endif
20117 /* We use char because int might match the return type of a gcc2
20118    builtin and then its argument prototype would still apply.  */
20119 char openpty ();
20120 int
20121 main (void)
20122 {
20123 openpty ();
20124   ;
20125   return 0;
20126 }
20127 _ACEOF
20128 rm -f conftest.$ac_objext conftest$ac_exeext
20129 if { (eval echo "$as_me:20129: \"$ac_link\"") >&5
20130   (eval $ac_link) 2>&5
20131   ac_status=$?
20132   echo "$as_me:20132: \$? = $ac_status" >&5
20133   (exit $ac_status); } &&
20134          { ac_try='test -s conftest$ac_exeext'
20135   { (eval echo "$as_me:20135: \"$ac_try\"") >&5
20136   (eval $ac_try) 2>&5
20137   ac_status=$?
20138   echo "$as_me:20138: \$? = $ac_status" >&5
20139   (exit $ac_status); }; }; then
20140   ac_cv_lib_util_openpty=yes
20141 else
20142   echo "$as_me: failed program was:" >&5
20143 cat conftest.$ac_ext >&5
20144 ac_cv_lib_util_openpty=no
20145 fi
20146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20147 LIBS=$ac_check_lib_save_LIBS
20148 fi
20149 echo "$as_me:20149: result: $ac_cv_lib_util_openpty" >&5
20150 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20151 if test $ac_cv_lib_util_openpty = yes; then
20152   cf_cv_lib_util=yes
20153 else
20154   cf_cv_lib_util=no
20155 fi
20156
20157 echo "$as_me:20157: checking for openpty header" >&5
20158 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20159 if test "${cf_cv_func_openpty+set}" = set; then
20160   echo $ECHO_N "(cached) $ECHO_C" >&6
20161 else
20162
20163         cf_save_LIBS="$LIBS"
20164         test $cf_cv_lib_util = yes && {
20165 cf_add_libs="-lutil"
20166 # Filter out duplicates - this happens with badly-designed ".pc" files...
20167 for cf_add_1lib in $LIBS
20168 do
20169         for cf_add_2lib in $cf_add_libs
20170         do
20171                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20172                 then
20173                         cf_add_1lib=
20174                         break
20175                 fi
20176         done
20177         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20178 done
20179 LIBS="$cf_add_libs"
20180  }
20181         for cf_header in pty.h libutil.h util.h
20182         do
20183         cat >conftest.$ac_ext <<_ACEOF
20184 #line 20184 "configure"
20185 #include "confdefs.h"
20186
20187 #include <$cf_header>
20188
20189 int
20190 main (void)
20191 {
20192
20193         int x = openpty((int *)0, (int *)0, (char *)0,
20194                                    (struct termios *)0, (struct winsize *)0);
20195
20196   ;
20197   return 0;
20198 }
20199 _ACEOF
20200 rm -f conftest.$ac_objext conftest$ac_exeext
20201 if { (eval echo "$as_me:20201: \"$ac_link\"") >&5
20202   (eval $ac_link) 2>&5
20203   ac_status=$?
20204   echo "$as_me:20204: \$? = $ac_status" >&5
20205   (exit $ac_status); } &&
20206          { ac_try='test -s conftest$ac_exeext'
20207   { (eval echo "$as_me:20207: \"$ac_try\"") >&5
20208   (eval $ac_try) 2>&5
20209   ac_status=$?
20210   echo "$as_me:20210: \$? = $ac_status" >&5
20211   (exit $ac_status); }; }; then
20212
20213                 cf_cv_func_openpty=$cf_header
20214                 break
20215
20216 else
20217   echo "$as_me: failed program was:" >&5
20218 cat conftest.$ac_ext >&5
20219
20220                 cf_cv_func_openpty=no
20221
20222 fi
20223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20224         done
20225         LIBS="$cf_save_LIBS"
20226
20227 fi
20228 echo "$as_me:20228: result: $cf_cv_func_openpty" >&5
20229 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20230
20231 if test "$cf_cv_func_openpty" != no ; then
20232
20233 cat >>confdefs.h <<EOF
20234 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20235 EOF
20236
20237 cat >>confdefs.h <<\EOF
20238 #define USE_XTERM_PTY 1
20239 EOF
20240
20241         if test "x$cf_cv_lib_util" = xyes ; then
20242
20243 cf_add_libs="-lutil"
20244 # Filter out duplicates - this happens with badly-designed ".pc" files...
20245 for cf_add_1lib in $TEST_LIBS
20246 do
20247         for cf_add_2lib in $cf_add_libs
20248         do
20249                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20250                 then
20251                         cf_add_1lib=
20252                         break
20253                 fi
20254         done
20255         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20256 done
20257 TEST_LIBS="$cf_add_libs"
20258
20259         fi
20260 fi
20261
20262 if test "$with_hashed_db" != no ; then
20263
20264 cat >>confdefs.h <<\EOF
20265 #define USE_HASHED_DB 1
20266 EOF
20267
20268 case $with_hashed_db in
20269 (yes|*able*)
20270         ;;
20271 (*)
20272         if test -d "$with_hashed_db" ; then
20273
20274 if test -n "$with_hashed_db/include" ; then
20275   for cf_add_incdir in $with_hashed_db/include
20276   do
20277         while test $cf_add_incdir != /usr/include
20278         do
20279           if test -d $cf_add_incdir
20280           then
20281                 cf_have_incdir=no
20282                 if test -n "$CFLAGS$CPPFLAGS" ; then
20283                   # a loop is needed to ensure we can add subdirs of existing dirs
20284                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20285                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20286                           cf_have_incdir=yes; break
20287                         fi
20288                   done
20289                 fi
20290
20291                 if test "$cf_have_incdir" = no ; then
20292                   if test "$cf_add_incdir" = /usr/local/include ; then
20293                         if test "$GCC" = yes
20294                         then
20295                           cf_save_CPPFLAGS=$CPPFLAGS
20296
20297         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20298         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20299
20300                           cat >conftest.$ac_ext <<_ACEOF
20301 #line 20301 "configure"
20302 #include "confdefs.h"
20303 #include <stdio.h>
20304 int
20305 main (void)
20306 {
20307 printf("Hello")
20308   ;
20309   return 0;
20310 }
20311 _ACEOF
20312 rm -f conftest.$ac_objext
20313 if { (eval echo "$as_me:20313: \"$ac_compile\"") >&5
20314   (eval $ac_compile) 2>&5
20315   ac_status=$?
20316   echo "$as_me:20316: \$? = $ac_status" >&5
20317   (exit $ac_status); } &&
20318          { ac_try='test -s conftest.$ac_objext'
20319   { (eval echo "$as_me:20319: \"$ac_try\"") >&5
20320   (eval $ac_try) 2>&5
20321   ac_status=$?
20322   echo "$as_me:20322: \$? = $ac_status" >&5
20323   (exit $ac_status); }; }; then
20324   :
20325 else
20326   echo "$as_me: failed program was:" >&5
20327 cat conftest.$ac_ext >&5
20328 cf_have_incdir=yes
20329 fi
20330 rm -f conftest.$ac_objext conftest.$ac_ext
20331                           CPPFLAGS=$cf_save_CPPFLAGS
20332                         fi
20333                   fi
20334                 fi
20335
20336                 if test "$cf_have_incdir" = no ; then
20337                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20338
20339 echo "${as_me:-configure}:20339: testing adding $cf_add_incdir to include-path ..." 1>&5
20340
20341                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20342
20343                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20344                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20345                   cf_add_incdir="$cf_top_incdir"
20346                 else
20347                   break
20348                 fi
20349           else
20350                 break
20351           fi
20352         done
20353   done
20354 fi
20355
20356 if test -n "$with_hashed_db/lib" ; then
20357         for cf_add_libdir in $with_hashed_db/lib
20358         do
20359                 if test $cf_add_libdir = /usr/lib ; then
20360                         :
20361                 elif test -d $cf_add_libdir
20362                 then
20363                         cf_have_libdir=no
20364                         if test -n "$LDFLAGS$LIBS" ; then
20365                                 # a loop is needed to ensure we can add subdirs of existing dirs
20366                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20367                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20368                                                 cf_have_libdir=yes; break
20369                                         fi
20370                                 done
20371                         fi
20372                         if test "$cf_have_libdir" = no ; then
20373                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20374
20375 echo "${as_me:-configure}:20375: testing adding $cf_add_libdir to library-path ..." 1>&5
20376
20377                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20378                         fi
20379                 fi
20380         done
20381 fi
20382
20383         else
20384                 case "$with_hashed_db" in
20385                 (./*|../*|/*)
20386                         { echo "$as_me:20386: WARNING: no such directory $with_hashed_db" >&5
20387 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
20388                         ;;
20389                 (*)
20390
20391 cf_search=
20392
20393 test "x$prefix" != "xNONE" && \
20394 test -d "$prefix" && \
20395  {
20396         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
20397         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
20398         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
20399         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
20400         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
20401         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
20402 }
20403
20404 for cf_subdir_prefix in \
20405         /usr \
20406         /usr/local \
20407         /usr/pkg \
20408         /opt \
20409         /opt/local \
20410         $HOME
20411 do
20412
20413 test "x$cf_subdir_prefix" != "x$prefix" && \
20414 test -d "$cf_subdir_prefix" && \
20415 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20416         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
20417         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
20418         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
20419         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
20420         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
20421         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"
20422 }
20423
20424 done
20425
20426         for cf_item in $cf_search
20427         do
20428                 case $cf_item in
20429                 (*/$with_hashed_db)
20430
20431 if test -n "$cf_item" ; then
20432   for cf_add_incdir in $cf_item
20433   do
20434         while test $cf_add_incdir != /usr/include
20435         do
20436           if test -d $cf_add_incdir
20437           then
20438                 cf_have_incdir=no
20439                 if test -n "$CFLAGS$CPPFLAGS" ; then
20440                   # a loop is needed to ensure we can add subdirs of existing dirs
20441                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20442                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20443                           cf_have_incdir=yes; break
20444                         fi
20445                   done
20446                 fi
20447
20448                 if test "$cf_have_incdir" = no ; then
20449                   if test "$cf_add_incdir" = /usr/local/include ; then
20450                         if test "$GCC" = yes
20451                         then
20452                           cf_save_CPPFLAGS=$CPPFLAGS
20453
20454         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20455         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20456
20457                           cat >conftest.$ac_ext <<_ACEOF
20458 #line 20458 "configure"
20459 #include "confdefs.h"
20460 #include <stdio.h>
20461 int
20462 main (void)
20463 {
20464 printf("Hello")
20465   ;
20466   return 0;
20467 }
20468 _ACEOF
20469 rm -f conftest.$ac_objext
20470 if { (eval echo "$as_me:20470: \"$ac_compile\"") >&5
20471   (eval $ac_compile) 2>&5
20472   ac_status=$?
20473   echo "$as_me:20473: \$? = $ac_status" >&5
20474   (exit $ac_status); } &&
20475          { ac_try='test -s conftest.$ac_objext'
20476   { (eval echo "$as_me:20476: \"$ac_try\"") >&5
20477   (eval $ac_try) 2>&5
20478   ac_status=$?
20479   echo "$as_me:20479: \$? = $ac_status" >&5
20480   (exit $ac_status); }; }; then
20481   :
20482 else
20483   echo "$as_me: failed program was:" >&5
20484 cat conftest.$ac_ext >&5
20485 cf_have_incdir=yes
20486 fi
20487 rm -f conftest.$ac_objext conftest.$ac_ext
20488                           CPPFLAGS=$cf_save_CPPFLAGS
20489                         fi
20490                   fi
20491                 fi
20492
20493                 if test "$cf_have_incdir" = no ; then
20494                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20495
20496 echo "${as_me:-configure}:20496: testing adding $cf_add_incdir to include-path ..." 1>&5
20497
20498                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20499
20500                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20501                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20502                   cf_add_incdir="$cf_top_incdir"
20503                 else
20504                   break
20505                 fi
20506           else
20507                 break
20508           fi
20509         done
20510   done
20511 fi
20512
20513                         ;;
20514                 esac
20515         done
20516
20517 cf_search=
20518
20519 test "x$prefix" != "xNONE" && \
20520 test -d "$prefix" && \
20521  {
20522         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
20523         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
20524         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
20525         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
20526         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
20527         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
20528 }
20529
20530 for cf_subdir_prefix in \
20531         /usr \
20532         /usr/local \
20533         /usr/pkg \
20534         /opt \
20535         /opt/local \
20536         $HOME
20537 do
20538
20539 test "x$cf_subdir_prefix" != "x$prefix" && \
20540 test -d "$cf_subdir_prefix" && \
20541 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20542         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
20543         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20544         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
20545         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
20546         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
20547         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"
20548 }
20549
20550 done
20551
20552         for cf_item in $cf_search
20553         do
20554                 case $cf_item in
20555                 (*/$with_hashed_db)
20556
20557 if test -n "$cf_item" ; then
20558         for cf_add_libdir in $cf_item
20559         do
20560                 if test $cf_add_libdir = /usr/lib ; then
20561                         :
20562                 elif test -d $cf_add_libdir
20563                 then
20564                         cf_have_libdir=no
20565                         if test -n "$LDFLAGS$LIBS" ; then
20566                                 # a loop is needed to ensure we can add subdirs of existing dirs
20567                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20568                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20569                                                 cf_have_libdir=yes; break
20570                                         fi
20571                                 done
20572                         fi
20573                         if test "$cf_have_libdir" = no ; then
20574                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20575
20576 echo "${as_me:-configure}:20576: testing adding $cf_add_libdir to library-path ..." 1>&5
20577
20578                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20579                         fi
20580                 fi
20581         done
20582 fi
20583
20584                         ;;
20585                 esac
20586         done
20587
20588                         ;;
20589                 esac
20590         fi
20591 esac
20592
20593 echo "$as_me:20593: checking for db.h" >&5
20594 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
20595 if test "${ac_cv_header_db_h+set}" = set; then
20596   echo $ECHO_N "(cached) $ECHO_C" >&6
20597 else
20598   cat >conftest.$ac_ext <<_ACEOF
20599 #line 20599 "configure"
20600 #include "confdefs.h"
20601 #include <db.h>
20602 _ACEOF
20603 if { (eval echo "$as_me:20603: \"$ac_cpp conftest.$ac_ext\"") >&5
20604   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20605   ac_status=$?
20606   egrep -v '^ *\+' conftest.er1 >conftest.err
20607   rm -f conftest.er1
20608   cat conftest.err >&5
20609   echo "$as_me:20609: \$? = $ac_status" >&5
20610   (exit $ac_status); } >/dev/null; then
20611   if test -s conftest.err; then
20612     ac_cpp_err=$ac_c_preproc_warn_flag
20613   else
20614     ac_cpp_err=
20615   fi
20616 else
20617   ac_cpp_err=yes
20618 fi
20619 if test -z "$ac_cpp_err"; then
20620   ac_cv_header_db_h=yes
20621 else
20622   echo "$as_me: failed program was:" >&5
20623   cat conftest.$ac_ext >&5
20624   ac_cv_header_db_h=no
20625 fi
20626 rm -f conftest.err conftest.$ac_ext
20627 fi
20628 echo "$as_me:20628: result: $ac_cv_header_db_h" >&5
20629 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20630 if test $ac_cv_header_db_h = yes; then
20631
20632 echo "$as_me:20632: checking for version of db" >&5
20633 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20634 if test "${cf_cv_hashed_db_version+set}" = set; then
20635   echo $ECHO_N "(cached) $ECHO_C" >&6
20636 else
20637
20638 cf_cv_hashed_db_version=unknown
20639
20640 for cf_db_version in 1 2 3 4 5 6
20641 do
20642
20643 echo "${as_me:-configure}:20643: testing checking for db version $cf_db_version ..." 1>&5
20644
20645         cat >conftest.$ac_ext <<_ACEOF
20646 #line 20646 "configure"
20647 #include "confdefs.h"
20648
20649 $ac_includes_default
20650 #include <db.h>
20651
20652 #ifdef DB_VERSION_MAJOR
20653         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20654 #if $cf_db_version == DB_VERSION_MAJOR
20655         /* ok */
20656 #else
20657         make an error
20658 #endif
20659 #else
20660 #if $cf_db_version == 1
20661         /* ok: assuming this is DB 1.8.5 */
20662 #else
20663         make an error
20664 #endif
20665 #endif
20666
20667 int
20668 main (void)
20669 {
20670 DBT *foo = 0
20671   ;
20672   return 0;
20673 }
20674 _ACEOF
20675 rm -f conftest.$ac_objext
20676 if { (eval echo "$as_me:20676: \"$ac_compile\"") >&5
20677   (eval $ac_compile) 2>&5
20678   ac_status=$?
20679   echo "$as_me:20679: \$? = $ac_status" >&5
20680   (exit $ac_status); } &&
20681          { ac_try='test -s conftest.$ac_objext'
20682   { (eval echo "$as_me:20682: \"$ac_try\"") >&5
20683   (eval $ac_try) 2>&5
20684   ac_status=$?
20685   echo "$as_me:20685: \$? = $ac_status" >&5
20686   (exit $ac_status); }; }; then
20687
20688         cf_cv_hashed_db_version=$cf_db_version
20689         break
20690
20691 else
20692   echo "$as_me: failed program was:" >&5
20693 cat conftest.$ac_ext >&5
20694 fi
20695 rm -f conftest.$ac_objext conftest.$ac_ext
20696 done
20697
20698 fi
20699 echo "$as_me:20699: result: $cf_cv_hashed_db_version" >&5
20700 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20701
20702 if test "$cf_cv_hashed_db_version" = unknown ; then
20703         { { echo "$as_me:20703: error: Cannot determine version of db" >&5
20704 echo "$as_me: error: Cannot determine version of db" >&2;}
20705    { (exit 1); exit 1; }; }
20706 else
20707
20708 echo "$as_me:20708: checking for db libraries" >&5
20709 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20710 if test "${cf_cv_hashed_db_libs+set}" = set; then
20711   echo $ECHO_N "(cached) $ECHO_C" >&6
20712 else
20713
20714 cf_cv_hashed_db_libs=unknown
20715 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20716 do
20717         cf_save_libs="$LIBS"
20718         if test -n "$cf_db_libs"; then
20719
20720 cf_add_libs="-l$cf_db_libs"
20721 # Filter out duplicates - this happens with badly-designed ".pc" files...
20722 for cf_add_1lib in $LIBS
20723 do
20724         for cf_add_2lib in $cf_add_libs
20725         do
20726                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20727                 then
20728                         cf_add_1lib=
20729                         break
20730                 fi
20731         done
20732         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20733 done
20734 LIBS="$cf_add_libs"
20735
20736         fi
20737
20738 echo "${as_me:-configure}:20738: testing checking for library "$cf_db_libs" ..." 1>&5
20739
20740         cat >conftest.$ac_ext <<_ACEOF
20741 #line 20741 "configure"
20742 #include "confdefs.h"
20743
20744 $ac_includes_default
20745 #include <db.h>
20746
20747 int
20748 main (void)
20749 {
20750
20751         char *path = "/tmp/foo";
20752 #ifdef DB_VERSION_MAJOR
20753 #if DB_VERSION_MAJOR >= 4
20754         DB *result = 0;
20755         db_create(&result, NULL, 0);
20756         result->open(result,
20757                 NULL,
20758                 path,
20759                 path,
20760                 DB_HASH,
20761                 DB_CREATE,
20762                 0644);
20763 #elif DB_VERSION_MAJOR >= 3
20764         DB *result = 0;
20765         db_create(&result, NULL, 0);
20766         result->open(result,
20767                 path,
20768                 path,
20769                 DB_HASH,
20770                 DB_CREATE,
20771                 0644);
20772 #elif DB_VERSION_MAJOR >= 2
20773         DB *result = 0;
20774         db_open(path,
20775                 DB_HASH,
20776                 DB_CREATE,
20777                 0644,
20778                 (DB_ENV *) 0,
20779                 (DB_INFO *) 0,
20780                 &result);
20781 #endif /* DB_VERSION_MAJOR */
20782 #else
20783         DB *result = dbopen(path,
20784                      2,
20785                      0644,
20786                      DB_HASH,
20787                      0);
20788 #endif
20789         ${cf_cv_main_return:-return}(result != 0)
20790
20791   ;
20792   return 0;
20793 }
20794 _ACEOF
20795 rm -f conftest.$ac_objext conftest$ac_exeext
20796 if { (eval echo "$as_me:20796: \"$ac_link\"") >&5
20797   (eval $ac_link) 2>&5
20798   ac_status=$?
20799   echo "$as_me:20799: \$? = $ac_status" >&5
20800   (exit $ac_status); } &&
20801          { ac_try='test -s conftest$ac_exeext'
20802   { (eval echo "$as_me:20802: \"$ac_try\"") >&5
20803   (eval $ac_try) 2>&5
20804   ac_status=$?
20805   echo "$as_me:20805: \$? = $ac_status" >&5
20806   (exit $ac_status); }; }; then
20807
20808         if test -n "$cf_db_libs" ; then
20809                 cf_cv_hashed_db_libs=$cf_db_libs
20810         else
20811                 cf_cv_hashed_db_libs=default
20812         fi
20813         LIBS="$cf_save_libs"
20814         break
20815
20816 else
20817   echo "$as_me: failed program was:" >&5
20818 cat conftest.$ac_ext >&5
20819 fi
20820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20821         LIBS="$cf_save_libs"
20822 done
20823
20824 fi
20825 echo "$as_me:20825: result: $cf_cv_hashed_db_libs" >&5
20826 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20827
20828         if test "$cf_cv_hashed_db_libs" = unknown ; then
20829                 { { echo "$as_me:20829: error: Cannot determine library for db" >&5
20830 echo "$as_me: error: Cannot determine library for db" >&2;}
20831    { (exit 1); exit 1; }; }
20832         elif test "$cf_cv_hashed_db_libs" != default ; then
20833
20834 cf_add_libs="-l$cf_cv_hashed_db_libs"
20835 # Filter out duplicates - this happens with badly-designed ".pc" files...
20836 for cf_add_1lib in $LIBS
20837 do
20838         for cf_add_2lib in $cf_add_libs
20839         do
20840                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20841                 then
20842                         cf_add_1lib=
20843                         break
20844                 fi
20845         done
20846         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20847 done
20848 LIBS="$cf_add_libs"
20849
20850         fi
20851 fi
20852
20853 else
20854
20855         { { echo "$as_me:20855: error: Cannot find db.h" >&5
20856 echo "$as_me: error: Cannot find db.h" >&2;}
20857    { (exit 1); exit 1; }; }
20858
20859 fi
20860
20861 fi
20862
20863 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20864         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20865         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20866 fi
20867
20868 # Just in case, check if the C compiler has a bool type.
20869
20870 echo "$as_me:20870: checking if we should include stdbool.h" >&5
20871 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20872
20873 if test "${cf_cv_header_stdbool_h+set}" = set; then
20874   echo $ECHO_N "(cached) $ECHO_C" >&6
20875 else
20876
20877         cat >conftest.$ac_ext <<_ACEOF
20878 #line 20878 "configure"
20879 #include "confdefs.h"
20880
20881 int
20882 main (void)
20883 {
20884 bool foo = false
20885   ;
20886   return 0;
20887 }
20888 _ACEOF
20889 rm -f conftest.$ac_objext
20890 if { (eval echo "$as_me:20890: \"$ac_compile\"") >&5
20891   (eval $ac_compile) 2>&5
20892   ac_status=$?
20893   echo "$as_me:20893: \$? = $ac_status" >&5
20894   (exit $ac_status); } &&
20895          { ac_try='test -s conftest.$ac_objext'
20896   { (eval echo "$as_me:20896: \"$ac_try\"") >&5
20897   (eval $ac_try) 2>&5
20898   ac_status=$?
20899   echo "$as_me:20899: \$? = $ac_status" >&5
20900   (exit $ac_status); }; }; then
20901   cf_cv_header_stdbool_h=0
20902 else
20903   echo "$as_me: failed program was:" >&5
20904 cat conftest.$ac_ext >&5
20905 cat >conftest.$ac_ext <<_ACEOF
20906 #line 20906 "configure"
20907 #include "confdefs.h"
20908
20909 #ifndef __BEOS__
20910 #include <stdbool.h>
20911 #endif
20912
20913 int
20914 main (void)
20915 {
20916 bool foo = false
20917   ;
20918   return 0;
20919 }
20920 _ACEOF
20921 rm -f conftest.$ac_objext
20922 if { (eval echo "$as_me:20922: \"$ac_compile\"") >&5
20923   (eval $ac_compile) 2>&5
20924   ac_status=$?
20925   echo "$as_me:20925: \$? = $ac_status" >&5
20926   (exit $ac_status); } &&
20927          { ac_try='test -s conftest.$ac_objext'
20928   { (eval echo "$as_me:20928: \"$ac_try\"") >&5
20929   (eval $ac_try) 2>&5
20930   ac_status=$?
20931   echo "$as_me:20931: \$? = $ac_status" >&5
20932   (exit $ac_status); }; }; then
20933   cf_cv_header_stdbool_h=1
20934 else
20935   echo "$as_me: failed program was:" >&5
20936 cat conftest.$ac_ext >&5
20937 cf_cv_header_stdbool_h=0
20938 fi
20939 rm -f conftest.$ac_objext conftest.$ac_ext
20940 fi
20941 rm -f conftest.$ac_objext conftest.$ac_ext
20942 fi
20943
20944 if test "$cf_cv_header_stdbool_h" = 1
20945 then    echo "$as_me:20945: result: yes" >&5
20946 echo "${ECHO_T}yes" >&6
20947 else    echo "$as_me:20947: result: no" >&5
20948 echo "${ECHO_T}no" >&6
20949 fi
20950
20951 echo "$as_me:20951: checking for builtin bool type" >&5
20952 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20953
20954 if test "${cf_cv_cc_bool_type+set}" = set; then
20955   echo $ECHO_N "(cached) $ECHO_C" >&6
20956 else
20957
20958         cat >conftest.$ac_ext <<_ACEOF
20959 #line 20959 "configure"
20960 #include "confdefs.h"
20961
20962 #include <stdio.h>
20963 #include <sys/types.h>
20964
20965 int
20966 main (void)
20967 {
20968 bool x = false
20969   ;
20970   return 0;
20971 }
20972 _ACEOF
20973 rm -f conftest.$ac_objext
20974 if { (eval echo "$as_me:20974: \"$ac_compile\"") >&5
20975   (eval $ac_compile) 2>&5
20976   ac_status=$?
20977   echo "$as_me:20977: \$? = $ac_status" >&5
20978   (exit $ac_status); } &&
20979          { ac_try='test -s conftest.$ac_objext'
20980   { (eval echo "$as_me:20980: \"$ac_try\"") >&5
20981   (eval $ac_try) 2>&5
20982   ac_status=$?
20983   echo "$as_me:20983: \$? = $ac_status" >&5
20984   (exit $ac_status); }; }; then
20985   cf_cv_cc_bool_type=1
20986 else
20987   echo "$as_me: failed program was:" >&5
20988 cat conftest.$ac_ext >&5
20989 cf_cv_cc_bool_type=0
20990 fi
20991 rm -f conftest.$ac_objext conftest.$ac_ext
20992
20993 fi
20994
20995 if test "$cf_cv_cc_bool_type" = 1
20996 then    echo "$as_me:20996: result: yes" >&5
20997 echo "${ECHO_T}yes" >&6
20998 else    echo "$as_me:20998: result: no" >&5
20999 echo "${ECHO_T}no" >&6
21000 fi
21001
21002 # Check for C++ compiler characteristics (and ensure that it's there!)
21003 if test -n "$CXX" ; then
21004         ac_ext=cc
21005 ac_cpp='$CXXCPP $CPPFLAGS'
21006 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21007 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21008 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21009 ac_main_return=return
21010
21011 if test -n "$GXX" ; then
21012
21013         cf_save="$LIBS"
21014         LIBS="$LIBS $CXXLIBS"
21015         echo "$as_me:21015: checking if we already have C++ library" >&5
21016 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21017         cat >conftest.$ac_ext <<_ACEOF
21018 #line 21018 "configure"
21019 #include "confdefs.h"
21020
21021                         #include <iostream>
21022 int
21023 main (void)
21024 {
21025
21026                         std::cout << "Hello World!" << std::endl;
21027   ;
21028   return 0;
21029 }
21030 _ACEOF
21031 rm -f conftest.$ac_objext conftest$ac_exeext
21032 if { (eval echo "$as_me:21032: \"$ac_link\"") >&5
21033   (eval $ac_link) 2>&5
21034   ac_status=$?
21035   echo "$as_me:21035: \$? = $ac_status" >&5
21036   (exit $ac_status); } &&
21037          { ac_try='test -s conftest$ac_exeext'
21038   { (eval echo "$as_me:21038: \"$ac_try\"") >&5
21039   (eval $ac_try) 2>&5
21040   ac_status=$?
21041   echo "$as_me:21041: \$? = $ac_status" >&5
21042   (exit $ac_status); }; }; then
21043   cf_have_libstdcpp=yes
21044 else
21045   echo "$as_me: failed program was:" >&5
21046 cat conftest.$ac_ext >&5
21047 cf_have_libstdcpp=no
21048 fi
21049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21050         echo "$as_me:21050: result: $cf_have_libstdcpp" >&5
21051 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21052         LIBS="$cf_save"
21053
21054         if test $cf_have_libstdcpp != yes
21055         then
21056                 case $cf_cv_system_name in
21057                 (os2*)
21058                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21059                                 cf_stdcpp_libname=stdcpp
21060                         else
21061                                 cf_stdcpp_libname=stdc++
21062                         fi
21063                         ;;
21064                 (*)
21065                         cf_stdcpp_libname=stdc++
21066                         ;;
21067                 esac
21068
21069                 echo "$as_me:21069: checking for library $cf_stdcpp_libname" >&5
21070 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21071 if test "${cf_cv_libstdcpp+set}" = set; then
21072   echo $ECHO_N "(cached) $ECHO_C" >&6
21073 else
21074
21075                         cf_save="$LIBS"
21076                         LIBS="$LIBS $CXXLIBS"
21077
21078 cf_add_libs="-l$cf_stdcpp_libname"
21079 # Filter out duplicates - this happens with badly-designed ".pc" files...
21080 for cf_add_1lib in $LIBS
21081 do
21082         for cf_add_2lib in $cf_add_libs
21083         do
21084                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21085                 then
21086                         cf_add_1lib=
21087                         break
21088                 fi
21089         done
21090         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21091 done
21092 LIBS="$cf_add_libs"
21093
21094                 cat >conftest.$ac_ext <<_ACEOF
21095 #line 21095 "configure"
21096 #include "confdefs.h"
21097
21098                                 #include <iostream>
21099 int
21100 main (void)
21101 {
21102
21103                                 std::cout << "Hello World!" << std::endl;
21104   ;
21105   return 0;
21106 }
21107 _ACEOF
21108 rm -f conftest.$ac_objext conftest$ac_exeext
21109 if { (eval echo "$as_me:21109: \"$ac_link\"") >&5
21110   (eval $ac_link) 2>&5
21111   ac_status=$?
21112   echo "$as_me:21112: \$? = $ac_status" >&5
21113   (exit $ac_status); } &&
21114          { ac_try='test -s conftest$ac_exeext'
21115   { (eval echo "$as_me:21115: \"$ac_try\"") >&5
21116   (eval $ac_try) 2>&5
21117   ac_status=$?
21118   echo "$as_me:21118: \$? = $ac_status" >&5
21119   (exit $ac_status); }; }; then
21120   cf_cv_libstdcpp=yes
21121 else
21122   echo "$as_me: failed program was:" >&5
21123 cat conftest.$ac_ext >&5
21124 cf_cv_libstdcpp=no
21125 fi
21126 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21127                         LIBS="$cf_save"
21128
21129 fi
21130 echo "$as_me:21130: result: $cf_cv_libstdcpp" >&5
21131 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
21132                 test "$cf_cv_libstdcpp" = yes && {
21133 cf_add_libs="-l$cf_stdcpp_libname"
21134 # Filter out duplicates - this happens with badly-designed ".pc" files...
21135 for cf_add_1lib in $CXXLIBS
21136 do
21137         for cf_add_2lib in $cf_add_libs
21138         do
21139                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21140                 then
21141                         cf_add_1lib=
21142                         break
21143                 fi
21144         done
21145         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21146 done
21147 CXXLIBS="$cf_add_libs"
21148  }
21149         fi
21150 fi
21151
21152         echo "$as_me:21152: checking whether $CXX understands -c and -o together" >&5
21153 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
21154 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
21155   echo $ECHO_N "(cached) $ECHO_C" >&6
21156 else
21157
21158 cat > conftest.$ac_ext <<CF_EOF
21159 int main(void)
21160 {
21161         ${cf_cv_main_return:-return}(0);
21162 }
21163 CF_EOF
21164 # We do the test twice because some compilers refuse to overwrite an
21165 # existing .o file with -o, though they will create one.
21166 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
21167 if { (eval echo "$as_me:21167: \"$ac_try\"") >&5
21168   (eval $ac_try) 2>&5
21169   ac_status=$?
21170   echo "$as_me:21170: \$? = $ac_status" >&5
21171   (exit $ac_status); } &&
21172   test -f conftest2.$ac_objext && { (eval echo "$as_me:21172: \"$ac_try\"") >&5
21173   (eval $ac_try) 2>&5
21174   ac_status=$?
21175   echo "$as_me:21175: \$? = $ac_status" >&5
21176   (exit $ac_status); };
21177 then
21178   eval cf_cv_prog_CXX_c_o=yes
21179 else
21180   eval cf_cv_prog_CXX_c_o=no
21181 fi
21182 rm -rf conftest*
21183
21184 fi
21185 if test $cf_cv_prog_CXX_c_o = yes; then
21186   echo "$as_me:21186: result: yes" >&5
21187 echo "${ECHO_T}yes" >&6
21188 else
21189   echo "$as_me:21189: result: no" >&5
21190 echo "${ECHO_T}no" >&6
21191 fi
21192
21193         case $GXX_VERSION in
21194         (1*|2.0-6*)
21195                 cf_cxx_library=yes
21196                 ;;
21197         (*-2.7*|2.7*)
21198
21199 cf_cxx_library=unknown
21200 case $cf_cv_system_name in
21201 (os2*)
21202         cf_gpp_libname=gpp
21203         ;;
21204 (*)
21205         cf_gpp_libname=g++
21206         ;;
21207 esac
21208 if test "$GXX" = yes; then
21209         echo "$as_me:21209: checking for lib$cf_gpp_libname" >&5
21210 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
21211         cf_save="$LIBS"
21212
21213 cf_add_libs="-l$cf_gpp_libname"
21214 # Filter out duplicates - this happens with badly-designed ".pc" files...
21215 for cf_add_1lib in $LIBS
21216 do
21217         for cf_add_2lib in $cf_add_libs
21218         do
21219                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21220                 then
21221                         cf_add_1lib=
21222                         break
21223                 fi
21224         done
21225         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21226 done
21227 LIBS="$cf_add_libs"
21228
21229         cat >conftest.$ac_ext <<_ACEOF
21230 #line 21230 "configure"
21231 #include "confdefs.h"
21232
21233 #include <$cf_gpp_libname/builtin.h>
21234
21235 int
21236 main (void)
21237 {
21238 two_arg_error_handler_t foo2 = lib_error_handler
21239   ;
21240   return 0;
21241 }
21242 _ACEOF
21243 rm -f conftest.$ac_objext conftest$ac_exeext
21244 if { (eval echo "$as_me:21244: \"$ac_link\"") >&5
21245   (eval $ac_link) 2>&5
21246   ac_status=$?
21247   echo "$as_me:21247: \$? = $ac_status" >&5
21248   (exit $ac_status); } &&
21249          { ac_try='test -s conftest$ac_exeext'
21250   { (eval echo "$as_me:21250: \"$ac_try\"") >&5
21251   (eval $ac_try) 2>&5
21252   ac_status=$?
21253   echo "$as_me:21253: \$? = $ac_status" >&5
21254   (exit $ac_status); }; }; then
21255   cf_cxx_library=yes
21256
21257 cf_add_libs="-l$cf_gpp_libname"
21258 # Filter out duplicates - this happens with badly-designed ".pc" files...
21259 for cf_add_1lib in $CXXLIBS
21260 do
21261         for cf_add_2lib in $cf_add_libs
21262         do
21263                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21264                 then
21265                         cf_add_1lib=
21266                         break
21267                 fi
21268         done
21269         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21270 done
21271 CXXLIBS="$cf_add_libs"
21272
21273          if test "$cf_gpp_libname" = cpp ; then
21274
21275 cat >>confdefs.h <<\EOF
21276 #define HAVE_GPP_BUILTIN_H 1
21277 EOF
21278
21279          else
21280
21281 cat >>confdefs.h <<\EOF
21282 #define HAVE_GXX_BUILTIN_H 1
21283 EOF
21284
21285          fi
21286 else
21287   echo "$as_me: failed program was:" >&5
21288 cat conftest.$ac_ext >&5
21289 cat >conftest.$ac_ext <<_ACEOF
21290 #line 21290 "configure"
21291 #include "confdefs.h"
21292
21293 #include <builtin.h>
21294
21295 int
21296 main (void)
21297 {
21298 two_arg_error_handler_t foo2 = lib_error_handler
21299   ;
21300   return 0;
21301 }
21302 _ACEOF
21303 rm -f conftest.$ac_objext conftest$ac_exeext
21304 if { (eval echo "$as_me:21304: \"$ac_link\"") >&5
21305   (eval $ac_link) 2>&5
21306   ac_status=$?
21307   echo "$as_me:21307: \$? = $ac_status" >&5
21308   (exit $ac_status); } &&
21309          { ac_try='test -s conftest$ac_exeext'
21310   { (eval echo "$as_me:21310: \"$ac_try\"") >&5
21311   (eval $ac_try) 2>&5
21312   ac_status=$?
21313   echo "$as_me:21313: \$? = $ac_status" >&5
21314   (exit $ac_status); }; }; then
21315   cf_cxx_library=yes
21316
21317 cf_add_libs="-l$cf_gpp_libname"
21318 # Filter out duplicates - this happens with badly-designed ".pc" files...
21319 for cf_add_1lib in $CXXLIBS
21320 do
21321         for cf_add_2lib in $cf_add_libs
21322         do
21323                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21324                 then
21325                         cf_add_1lib=
21326                         break
21327                 fi
21328         done
21329         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21330 done
21331 CXXLIBS="$cf_add_libs"
21332
21333 cat >>confdefs.h <<\EOF
21334 #define HAVE_BUILTIN_H 1
21335 EOF
21336
21337 else
21338   echo "$as_me: failed program was:" >&5
21339 cat conftest.$ac_ext >&5
21340 cf_cxx_library=no
21341 fi
21342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21343 fi
21344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21345         LIBS="$cf_save"
21346         echo "$as_me:21346: result: $cf_cxx_library" >&5
21347 echo "${ECHO_T}$cf_cxx_library" >&6
21348 fi
21349
21350                 ;;
21351         (*)
21352                 cf_cxx_library=no
21353                 ;;
21354         esac
21355
21356         ac_ext=cc
21357 ac_cpp='$CXXCPP $CPPFLAGS'
21358 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21359 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21360 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21361 ac_main_return=return
21362 echo "$as_me:21362: checking how to run the C++ preprocessor" >&5
21363 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
21364 if test -z "$CXXCPP"; then
21365   if test "${ac_cv_prog_CXXCPP+set}" = set; then
21366   echo $ECHO_N "(cached) $ECHO_C" >&6
21367 else
21368       # Double quotes because CXXCPP needs to be expanded
21369     for CXXCPP in "$CXX -E" "/lib/cpp"
21370     do
21371       ac_preproc_ok=false
21372 for ac_cxx_preproc_warn_flag in '' yes
21373 do
21374   # Use a header file that comes with gcc, so configuring glibc
21375   # with a fresh cross-compiler works.
21376   # On the NeXT, cc -E runs the code through the compiler's parser,
21377   # not just through cpp. "Syntax error" is here to catch this case.
21378   cat >conftest.$ac_ext <<_ACEOF
21379 #line 21379 "configure"
21380 #include "confdefs.h"
21381 #include <assert.h>
21382                      Syntax error
21383 _ACEOF
21384 if { (eval echo "$as_me:21384: \"$ac_cpp conftest.$ac_ext\"") >&5
21385   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21386   ac_status=$?
21387   egrep -v '^ *\+' conftest.er1 >conftest.err
21388   rm -f conftest.er1
21389   cat conftest.err >&5
21390   echo "$as_me:21390: \$? = $ac_status" >&5
21391   (exit $ac_status); } >/dev/null; then
21392   if test -s conftest.err; then
21393     ac_cpp_err=$ac_cxx_preproc_warn_flag
21394   else
21395     ac_cpp_err=
21396   fi
21397 else
21398   ac_cpp_err=yes
21399 fi
21400 if test -z "$ac_cpp_err"; then
21401   :
21402 else
21403   echo "$as_me: failed program was:" >&5
21404   cat conftest.$ac_ext >&5
21405   # Broken: fails on valid input.
21406 continue
21407 fi
21408 rm -f conftest.err conftest.$ac_ext
21409
21410   # OK, works on sane cases.  Now check whether non-existent headers
21411   # can be detected and how.
21412   cat >conftest.$ac_ext <<_ACEOF
21413 #line 21413 "configure"
21414 #include "confdefs.h"
21415 #include <ac_nonexistent.h>
21416 _ACEOF
21417 if { (eval echo "$as_me:21417: \"$ac_cpp conftest.$ac_ext\"") >&5
21418   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21419   ac_status=$?
21420   egrep -v '^ *\+' conftest.er1 >conftest.err
21421   rm -f conftest.er1
21422   cat conftest.err >&5
21423   echo "$as_me:21423: \$? = $ac_status" >&5
21424   (exit $ac_status); } >/dev/null; then
21425   if test -s conftest.err; then
21426     ac_cpp_err=$ac_cxx_preproc_warn_flag
21427   else
21428     ac_cpp_err=
21429   fi
21430 else
21431   ac_cpp_err=yes
21432 fi
21433 if test -z "$ac_cpp_err"; then
21434   # Broken: success on invalid input.
21435 continue
21436 else
21437   echo "$as_me: failed program was:" >&5
21438   cat conftest.$ac_ext >&5
21439   # Passes both tests.
21440 ac_preproc_ok=:
21441 break
21442 fi
21443 rm -f conftest.err conftest.$ac_ext
21444
21445 done
21446 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21447 rm -f conftest.err conftest.$ac_ext
21448 if $ac_preproc_ok; then
21449   break
21450 fi
21451
21452     done
21453     ac_cv_prog_CXXCPP=$CXXCPP
21454
21455 fi
21456   CXXCPP=$ac_cv_prog_CXXCPP
21457 else
21458   ac_cv_prog_CXXCPP=$CXXCPP
21459 fi
21460 echo "$as_me:21460: result: $CXXCPP" >&5
21461 echo "${ECHO_T}$CXXCPP" >&6
21462 ac_preproc_ok=false
21463 for ac_cxx_preproc_warn_flag in '' yes
21464 do
21465   # Use a header file that comes with gcc, so configuring glibc
21466   # with a fresh cross-compiler works.
21467   # On the NeXT, cc -E runs the code through the compiler's parser,
21468   # not just through cpp. "Syntax error" is here to catch this case.
21469   cat >conftest.$ac_ext <<_ACEOF
21470 #line 21470 "configure"
21471 #include "confdefs.h"
21472 #include <assert.h>
21473                      Syntax error
21474 _ACEOF
21475 if { (eval echo "$as_me:21475: \"$ac_cpp conftest.$ac_ext\"") >&5
21476   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21477   ac_status=$?
21478   egrep -v '^ *\+' conftest.er1 >conftest.err
21479   rm -f conftest.er1
21480   cat conftest.err >&5
21481   echo "$as_me:21481: \$? = $ac_status" >&5
21482   (exit $ac_status); } >/dev/null; then
21483   if test -s conftest.err; then
21484     ac_cpp_err=$ac_cxx_preproc_warn_flag
21485   else
21486     ac_cpp_err=
21487   fi
21488 else
21489   ac_cpp_err=yes
21490 fi
21491 if test -z "$ac_cpp_err"; then
21492   :
21493 else
21494   echo "$as_me: failed program was:" >&5
21495   cat conftest.$ac_ext >&5
21496   # Broken: fails on valid input.
21497 continue
21498 fi
21499 rm -f conftest.err conftest.$ac_ext
21500
21501   # OK, works on sane cases.  Now check whether non-existent headers
21502   # can be detected and how.
21503   cat >conftest.$ac_ext <<_ACEOF
21504 #line 21504 "configure"
21505 #include "confdefs.h"
21506 #include <ac_nonexistent.h>
21507 _ACEOF
21508 if { (eval echo "$as_me:21508: \"$ac_cpp conftest.$ac_ext\"") >&5
21509   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21510   ac_status=$?
21511   egrep -v '^ *\+' conftest.er1 >conftest.err
21512   rm -f conftest.er1
21513   cat conftest.err >&5
21514   echo "$as_me:21514: \$? = $ac_status" >&5
21515   (exit $ac_status); } >/dev/null; then
21516   if test -s conftest.err; then
21517     ac_cpp_err=$ac_cxx_preproc_warn_flag
21518   else
21519     ac_cpp_err=
21520   fi
21521 else
21522   ac_cpp_err=yes
21523 fi
21524 if test -z "$ac_cpp_err"; then
21525   # Broken: success on invalid input.
21526 continue
21527 else
21528   echo "$as_me: failed program was:" >&5
21529   cat conftest.$ac_ext >&5
21530   # Passes both tests.
21531 ac_preproc_ok=:
21532 break
21533 fi
21534 rm -f conftest.err conftest.$ac_ext
21535
21536 done
21537 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21538 rm -f conftest.err conftest.$ac_ext
21539 if $ac_preproc_ok; then
21540   :
21541 else
21542   { { echo "$as_me:21542: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
21543 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
21544    { (exit 1); exit 1; }; }
21545 fi
21546
21547 ac_ext=cc
21548 ac_cpp='$CXXCPP $CPPFLAGS'
21549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21550 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21552 ac_main_return=return
21553
21554 for ac_header in typeinfo
21555 do
21556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21557 echo "$as_me:21557: checking for $ac_header" >&5
21558 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21559 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21560   echo $ECHO_N "(cached) $ECHO_C" >&6
21561 else
21562   cat >conftest.$ac_ext <<_ACEOF
21563 #line 21563 "configure"
21564 #include "confdefs.h"
21565 #include <$ac_header>
21566 _ACEOF
21567 if { (eval echo "$as_me:21567: \"$ac_cpp conftest.$ac_ext\"") >&5
21568   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21569   ac_status=$?
21570   egrep -v '^ *\+' conftest.er1 >conftest.err
21571   rm -f conftest.er1
21572   cat conftest.err >&5
21573   echo "$as_me:21573: \$? = $ac_status" >&5
21574   (exit $ac_status); } >/dev/null; then
21575   if test -s conftest.err; then
21576     ac_cpp_err=$ac_cxx_preproc_warn_flag
21577   else
21578     ac_cpp_err=
21579   fi
21580 else
21581   ac_cpp_err=yes
21582 fi
21583 if test -z "$ac_cpp_err"; then
21584   eval "$as_ac_Header=yes"
21585 else
21586   echo "$as_me: failed program was:" >&5
21587   cat conftest.$ac_ext >&5
21588   eval "$as_ac_Header=no"
21589 fi
21590 rm -f conftest.err conftest.$ac_ext
21591 fi
21592 echo "$as_me:21592: result: `eval echo '${'$as_ac_Header'}'`" >&5
21593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21594 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21595   cat >>confdefs.h <<EOF
21596 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21597 EOF
21598
21599 fi
21600 done
21601
21602 for ac_header in iostream
21603 do
21604 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21605 echo "$as_me:21605: checking for $ac_header" >&5
21606 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21607 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21608   echo $ECHO_N "(cached) $ECHO_C" >&6
21609 else
21610   cat >conftest.$ac_ext <<_ACEOF
21611 #line 21611 "configure"
21612 #include "confdefs.h"
21613 #include <$ac_header>
21614 _ACEOF
21615 if { (eval echo "$as_me:21615: \"$ac_cpp conftest.$ac_ext\"") >&5
21616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21617   ac_status=$?
21618   egrep -v '^ *\+' conftest.er1 >conftest.err
21619   rm -f conftest.er1
21620   cat conftest.err >&5
21621   echo "$as_me:21621: \$? = $ac_status" >&5
21622   (exit $ac_status); } >/dev/null; then
21623   if test -s conftest.err; then
21624     ac_cpp_err=$ac_cxx_preproc_warn_flag
21625   else
21626     ac_cpp_err=
21627   fi
21628 else
21629   ac_cpp_err=yes
21630 fi
21631 if test -z "$ac_cpp_err"; then
21632   eval "$as_ac_Header=yes"
21633 else
21634   echo "$as_me: failed program was:" >&5
21635   cat conftest.$ac_ext >&5
21636   eval "$as_ac_Header=no"
21637 fi
21638 rm -f conftest.err conftest.$ac_ext
21639 fi
21640 echo "$as_me:21640: result: `eval echo '${'$as_ac_Header'}'`" >&5
21641 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21642 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21643   cat >>confdefs.h <<EOF
21644 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21645 EOF
21646
21647 fi
21648 done
21649
21650 if test x"$ac_cv_header_iostream" = xyes ; then
21651         echo "$as_me:21651: checking if iostream uses std-namespace" >&5
21652 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21653         cat >conftest.$ac_ext <<_ACEOF
21654 #line 21654 "configure"
21655 #include "confdefs.h"
21656
21657 #include <iostream>
21658 using std::endl;
21659 using std::cerr;
21660 int
21661 main (void)
21662 {
21663
21664 cerr << "testing" << endl;
21665
21666   ;
21667   return 0;
21668 }
21669 _ACEOF
21670 rm -f conftest.$ac_objext
21671 if { (eval echo "$as_me:21671: \"$ac_compile\"") >&5
21672   (eval $ac_compile) 2>&5
21673   ac_status=$?
21674   echo "$as_me:21674: \$? = $ac_status" >&5
21675   (exit $ac_status); } &&
21676          { ac_try='test -s conftest.$ac_objext'
21677   { (eval echo "$as_me:21677: \"$ac_try\"") >&5
21678   (eval $ac_try) 2>&5
21679   ac_status=$?
21680   echo "$as_me:21680: \$? = $ac_status" >&5
21681   (exit $ac_status); }; }; then
21682   cf_iostream_namespace=yes
21683 else
21684   echo "$as_me: failed program was:" >&5
21685 cat conftest.$ac_ext >&5
21686 cf_iostream_namespace=no
21687 fi
21688 rm -f conftest.$ac_objext conftest.$ac_ext
21689         echo "$as_me:21689: result: $cf_iostream_namespace" >&5
21690 echo "${ECHO_T}$cf_iostream_namespace" >&6
21691         if test "$cf_iostream_namespace" = yes ; then
21692
21693 cat >>confdefs.h <<\EOF
21694 #define IOSTREAM_NAMESPACE 1
21695 EOF
21696
21697         fi
21698 fi
21699
21700 echo "$as_me:21700: checking if we should include stdbool.h" >&5
21701 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21702
21703 if test "${cf_cv_header_stdbool_h+set}" = set; then
21704   echo $ECHO_N "(cached) $ECHO_C" >&6
21705 else
21706
21707         cat >conftest.$ac_ext <<_ACEOF
21708 #line 21708 "configure"
21709 #include "confdefs.h"
21710
21711 int
21712 main (void)
21713 {
21714 bool foo = false
21715   ;
21716   return 0;
21717 }
21718 _ACEOF
21719 rm -f conftest.$ac_objext
21720 if { (eval echo "$as_me:21720: \"$ac_compile\"") >&5
21721   (eval $ac_compile) 2>&5
21722   ac_status=$?
21723   echo "$as_me:21723: \$? = $ac_status" >&5
21724   (exit $ac_status); } &&
21725          { ac_try='test -s conftest.$ac_objext'
21726   { (eval echo "$as_me:21726: \"$ac_try\"") >&5
21727   (eval $ac_try) 2>&5
21728   ac_status=$?
21729   echo "$as_me:21729: \$? = $ac_status" >&5
21730   (exit $ac_status); }; }; then
21731   cf_cv_header_stdbool_h=0
21732 else
21733   echo "$as_me: failed program was:" >&5
21734 cat conftest.$ac_ext >&5
21735 cat >conftest.$ac_ext <<_ACEOF
21736 #line 21736 "configure"
21737 #include "confdefs.h"
21738
21739 #ifndef __BEOS__
21740 #include <stdbool.h>
21741 #endif
21742
21743 int
21744 main (void)
21745 {
21746 bool foo = false
21747   ;
21748   return 0;
21749 }
21750 _ACEOF
21751 rm -f conftest.$ac_objext
21752 if { (eval echo "$as_me:21752: \"$ac_compile\"") >&5
21753   (eval $ac_compile) 2>&5
21754   ac_status=$?
21755   echo "$as_me:21755: \$? = $ac_status" >&5
21756   (exit $ac_status); } &&
21757          { ac_try='test -s conftest.$ac_objext'
21758   { (eval echo "$as_me:21758: \"$ac_try\"") >&5
21759   (eval $ac_try) 2>&5
21760   ac_status=$?
21761   echo "$as_me:21761: \$? = $ac_status" >&5
21762   (exit $ac_status); }; }; then
21763   cf_cv_header_stdbool_h=1
21764 else
21765   echo "$as_me: failed program was:" >&5
21766 cat conftest.$ac_ext >&5
21767 cf_cv_header_stdbool_h=0
21768 fi
21769 rm -f conftest.$ac_objext conftest.$ac_ext
21770 fi
21771 rm -f conftest.$ac_objext conftest.$ac_ext
21772 fi
21773
21774 if test "$cf_cv_header_stdbool_h" = 1
21775 then    echo "$as_me:21775: result: yes" >&5
21776 echo "${ECHO_T}yes" >&6
21777 else    echo "$as_me:21777: result: no" >&5
21778 echo "${ECHO_T}no" >&6
21779 fi
21780
21781 echo "$as_me:21781: checking for builtin bool type" >&5
21782 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21783
21784 if test "${cf_cv_builtin_bool+set}" = set; then
21785   echo $ECHO_N "(cached) $ECHO_C" >&6
21786 else
21787
21788         cat >conftest.$ac_ext <<_ACEOF
21789 #line 21789 "configure"
21790 #include "confdefs.h"
21791
21792 #include <stdio.h>
21793 #include <sys/types.h>
21794
21795 int
21796 main (void)
21797 {
21798 bool x = false
21799   ;
21800   return 0;
21801 }
21802 _ACEOF
21803 rm -f conftest.$ac_objext
21804 if { (eval echo "$as_me:21804: \"$ac_compile\"") >&5
21805   (eval $ac_compile) 2>&5
21806   ac_status=$?
21807   echo "$as_me:21807: \$? = $ac_status" >&5
21808   (exit $ac_status); } &&
21809          { ac_try='test -s conftest.$ac_objext'
21810   { (eval echo "$as_me:21810: \"$ac_try\"") >&5
21811   (eval $ac_try) 2>&5
21812   ac_status=$?
21813   echo "$as_me:21813: \$? = $ac_status" >&5
21814   (exit $ac_status); }; }; then
21815   cf_cv_builtin_bool=1
21816 else
21817   echo "$as_me: failed program was:" >&5
21818 cat conftest.$ac_ext >&5
21819 cf_cv_builtin_bool=0
21820 fi
21821 rm -f conftest.$ac_objext conftest.$ac_ext
21822
21823 fi
21824
21825 if test "$cf_cv_builtin_bool" = 1
21826 then    echo "$as_me:21826: result: yes" >&5
21827 echo "${ECHO_T}yes" >&6
21828 else    echo "$as_me:21828: result: no" >&5
21829 echo "${ECHO_T}no" >&6
21830 fi
21831
21832 echo "$as_me:21832: checking for size of bool" >&5
21833 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21834 if test "${cf_cv_type_of_bool+set}" = set; then
21835   echo $ECHO_N "(cached) $ECHO_C" >&6
21836 else
21837
21838         rm -f cf_test.out
21839         if test "$cross_compiling" = yes; then
21840   cf_cv_type_of_bool=unknown
21841 else
21842   cat >conftest.$ac_ext <<_ACEOF
21843 #line 21843 "configure"
21844 #include "confdefs.h"
21845
21846 #include <stdlib.h>
21847 #include <stdio.h>
21848
21849 #if defined(__cplusplus)
21850
21851 #ifdef HAVE_GXX_BUILTIN_H
21852 #include <g++/builtin.h>
21853 #elif HAVE_GPP_BUILTIN_H
21854 #include <gpp/builtin.h>
21855 #elif HAVE_BUILTIN_H
21856 #include <builtin.h>
21857 #endif
21858
21859 #else
21860
21861 #if $cf_cv_header_stdbool_h
21862 #include <stdbool.h>
21863 #endif
21864
21865 #endif
21866
21867 int main(void)
21868 {
21869         FILE *fp = fopen("cf_test.out", "w");
21870         if (fp != 0) {
21871                 bool x = true;
21872                 if ((bool)(-x) >= 0)
21873                         fputs("unsigned ", fp);
21874                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21875                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21876                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21877                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21878                 fclose(fp);
21879         }
21880         ${cf_cv_main_return:-return}(0);
21881 }
21882
21883 _ACEOF
21884 rm -f conftest$ac_exeext
21885 if { (eval echo "$as_me:21885: \"$ac_link\"") >&5
21886   (eval $ac_link) 2>&5
21887   ac_status=$?
21888   echo "$as_me:21888: \$? = $ac_status" >&5
21889   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21890   { (eval echo "$as_me:21890: \"$ac_try\"") >&5
21891   (eval $ac_try) 2>&5
21892   ac_status=$?
21893   echo "$as_me:21893: \$? = $ac_status" >&5
21894   (exit $ac_status); }; }; then
21895   cf_cv_type_of_bool=`cat cf_test.out`
21896                  if test -z "$cf_cv_type_of_bool"; then
21897                    cf_cv_type_of_bool=unknown
21898                  fi
21899 else
21900   echo "$as_me: program exited with status $ac_status" >&5
21901 echo "$as_me: failed program was:" >&5
21902 cat conftest.$ac_ext >&5
21903 cf_cv_type_of_bool=unknown
21904 fi
21905 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21906 fi
21907
21908 fi
21909
21910         rm -f cf_test.out
21911 echo "$as_me:21911: result: $cf_cv_type_of_bool" >&5
21912 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21913 if test "$cf_cv_type_of_bool" = unknown ; then
21914         case .$NCURSES_BOOL in
21915         (.auto|.) NCURSES_BOOL=unsigned;;
21916         esac
21917         { echo "$as_me:21917: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21918 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21919         cf_cv_type_of_bool=$NCURSES_BOOL
21920 fi
21921
21922 echo "$as_me:21922: checking for special defines needed for etip.h" >&5
21923 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21924 cf_save_CXXFLAGS="$CXXFLAGS"
21925 cf_result="none"
21926
21927 # etip.h includes ncurses.h which includes ncurses_dll.h
21928 # But ncurses_dll.h is generated - fix here.
21929 test -d include || mkdir include
21930 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
21931
21932 for cf_math in "" MATH_H
21933 do
21934 for cf_excp in "" MATH_EXCEPTION
21935 do
21936         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21937         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21938         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21939 cat >conftest.$ac_ext <<_ACEOF
21940 #line 21940 "configure"
21941 #include "confdefs.h"
21942
21943 #include <etip.h.in>
21944
21945 int
21946 main (void)
21947 {
21948
21949   ;
21950   return 0;
21951 }
21952 _ACEOF
21953 rm -f conftest.$ac_objext
21954 if { (eval echo "$as_me:21954: \"$ac_compile\"") >&5
21955   (eval $ac_compile) 2>&5
21956   ac_status=$?
21957   echo "$as_me:21957: \$? = $ac_status" >&5
21958   (exit $ac_status); } &&
21959          { ac_try='test -s conftest.$ac_objext'
21960   { (eval echo "$as_me:21960: \"$ac_try\"") >&5
21961   (eval $ac_try) 2>&5
21962   ac_status=$?
21963   echo "$as_me:21963: \$? = $ac_status" >&5
21964   (exit $ac_status); }; }; then
21965
21966         test -n "$cf_math" && cat >>confdefs.h <<EOF
21967 #define ETIP_NEEDS_${cf_math} 1
21968 EOF
21969
21970         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21971 #define ETIP_NEEDS_${cf_excp} 1
21972 EOF
21973
21974         cf_result="$cf_math $cf_excp"
21975         break 2
21976
21977 else
21978   echo "$as_me: failed program was:" >&5
21979 cat conftest.$ac_ext >&5
21980 fi
21981 rm -f conftest.$ac_objext conftest.$ac_ext
21982 done
21983 done
21984 echo "$as_me:21984: result: $cf_result" >&5
21985 echo "${ECHO_T}$cf_result" >&6
21986 CXXFLAGS="$cf_save_CXXFLAGS"
21987
21988 if test -n "$CXX"; then
21989 echo "$as_me:21989: checking if $CXX accepts parameter initialization" >&5
21990 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21991 if test "${cf_cv_cpp_param_init+set}" = set; then
21992   echo $ECHO_N "(cached) $ECHO_C" >&6
21993 else
21994
21995         ac_ext=cc
21996 ac_cpp='$CXXCPP $CPPFLAGS'
21997 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21998 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21999 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22000 ac_main_return=return
22001
22002         if test "$cross_compiling" = yes; then
22003   cf_cv_cpp_param_init=unknown
22004 else
22005   cat >conftest.$ac_ext <<_ACEOF
22006 #line 22006 "configure"
22007 #include "confdefs.h"
22008
22009 class TEST {
22010 private:
22011         int value;
22012 public:
22013         TEST(int x = 1);
22014         ~TEST();
22015 };
22016
22017 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22018 {
22019         value = x;
22020 }
22021 int main(void) { }
22022
22023 _ACEOF
22024 rm -f conftest$ac_exeext
22025 if { (eval echo "$as_me:22025: \"$ac_link\"") >&5
22026   (eval $ac_link) 2>&5
22027   ac_status=$?
22028   echo "$as_me:22028: \$? = $ac_status" >&5
22029   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22030   { (eval echo "$as_me:22030: \"$ac_try\"") >&5
22031   (eval $ac_try) 2>&5
22032   ac_status=$?
22033   echo "$as_me:22033: \$? = $ac_status" >&5
22034   (exit $ac_status); }; }; then
22035   cf_cv_cpp_param_init=yes
22036 else
22037   echo "$as_me: program exited with status $ac_status" >&5
22038 echo "$as_me: failed program was:" >&5
22039 cat conftest.$ac_ext >&5
22040 cf_cv_cpp_param_init=no
22041 fi
22042 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22043 fi
22044         ac_ext=cc
22045 ac_cpp='$CXXCPP $CPPFLAGS'
22046 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22047 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22048 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22049 ac_main_return=return
22050
22051 fi
22052 echo "$as_me:22052: result: $cf_cv_cpp_param_init" >&5
22053 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22054 fi
22055 test "$cf_cv_cpp_param_init" = yes &&
22056 cat >>confdefs.h <<\EOF
22057 #define CPP_HAS_PARAM_INIT 1
22058 EOF
22059
22060 if test -n "$CXX"; then
22061
22062 echo "$as_me:22062: checking if $CXX accepts static_cast" >&5
22063 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22064 if test "${cf_cv_cpp_static_cast+set}" = set; then
22065   echo $ECHO_N "(cached) $ECHO_C" >&6
22066 else
22067
22068         ac_ext=cc
22069 ac_cpp='$CXXCPP $CPPFLAGS'
22070 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22071 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22072 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22073 ac_main_return=return
22074
22075         cat >conftest.$ac_ext <<_ACEOF
22076 #line 22076 "configure"
22077 #include "confdefs.h"
22078
22079 class NCursesPanel
22080 {
22081 public:
22082   NCursesPanel(int nlines,
22083                int ncols,
22084                int begin_y = 0,
22085                int begin_x = 0)
22086   {
22087   }
22088   NCursesPanel();
22089   ~NCursesPanel();
22090 };
22091
22092 template<class T> class NCursesUserPanel : public NCursesPanel
22093 {
22094 public:
22095   NCursesUserPanel (int nlines,
22096                     int ncols,
22097                     int begin_y = 0,
22098                     int begin_x = 0,
22099                     const T* p_UserData = static_cast<T*>(0))
22100     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22101   {
22102   };
22103   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22104   {
22105   };
22106
22107   virtual ~NCursesUserPanel() {};
22108 };
22109
22110 int
22111 main (void)
22112 {
22113
22114         const char* p_UserData = static_cast<char*>(0)
22115   ;
22116   return 0;
22117 }
22118 _ACEOF
22119 rm -f conftest.$ac_objext
22120 if { (eval echo "$as_me:22120: \"$ac_compile\"") >&5
22121   (eval $ac_compile) 2>&5
22122   ac_status=$?
22123   echo "$as_me:22123: \$? = $ac_status" >&5
22124   (exit $ac_status); } &&
22125          { ac_try='test -s conftest.$ac_objext'
22126   { (eval echo "$as_me:22126: \"$ac_try\"") >&5
22127   (eval $ac_try) 2>&5
22128   ac_status=$?
22129   echo "$as_me:22129: \$? = $ac_status" >&5
22130   (exit $ac_status); }; }; then
22131   cf_cv_cpp_static_cast=yes
22132 else
22133   echo "$as_me: failed program was:" >&5
22134 cat conftest.$ac_ext >&5
22135 cf_cv_cpp_static_cast=no
22136 fi
22137 rm -f conftest.$ac_objext conftest.$ac_ext
22138
22139         ac_ext=cc
22140 ac_cpp='$CXXCPP $CPPFLAGS'
22141 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22142 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22143 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22144 ac_main_return=return
22145
22146 fi
22147 echo "$as_me:22147: result: $cf_cv_cpp_static_cast" >&5
22148 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
22149
22150 fi
22151
22152 test "$cf_cv_cpp_static_cast" = yes &&
22153 cat >>confdefs.h <<\EOF
22154 #define CPP_HAS_STATIC_CAST 1
22155 EOF
22156
22157         CXX_AR='$(AR)'
22158         CXX_ARFLAGS='$(ARFLAGS)'
22159         case $cf_cv_system_name in
22160         (irix*)
22161             if test "$GXX" != yes ; then
22162                 CXX_AR='$(CXX)'
22163                 CXX_ARFLAGS='-ar -o'
22164             fi
22165             ;;
22166         (sco3.2v5*)
22167             CXXLDFLAGS="-u main"
22168             ;;
22169         (solaris2*)
22170             if test "$GXX" != yes ; then
22171                 CXX_AR='$(CXX)'
22172                 CXX_ARFLAGS='-xar -o'
22173             fi
22174             ;;
22175         esac
22176
22177 else
22178         cf_cxx_library=no
22179         cf_cv_builtin_bool=1
22180
22181         # Just because we are not configuring against C++ right now does not
22182         # mean that a user will not want to use C++.  Some distributors disable
22183         # the C++ portion of this configuration as a shortcut (or just to avoid
22184         # compiling the demo in the c++ directory).  So we need a reasonable
22185         # default for the 'bool' type.
22186         #
22187         # Caveat: since the storage of the bool type is not standardized, it
22188         # may change.
22189
22190         if test "$NCURSES_BOOL" != auto ; then
22191                 cf_cv_type_of_bool=$NCURSES_BOOL
22192                 cf_cv_header_stdbool_h=0
22193         else
22194                 if test "$cf_cv_header_stdbool_h" = 1 ; then
22195
22196 echo "$as_me:22196: checking for size of bool" >&5
22197 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22198 if test "${cf_cv_type_of_bool+set}" = set; then
22199   echo $ECHO_N "(cached) $ECHO_C" >&6
22200 else
22201
22202         rm -f cf_test.out
22203         if test "$cross_compiling" = yes; then
22204   cf_cv_type_of_bool=unknown
22205 else
22206   cat >conftest.$ac_ext <<_ACEOF
22207 #line 22207 "configure"
22208 #include "confdefs.h"
22209
22210 #include <stdlib.h>
22211 #include <stdio.h>
22212
22213 #if defined(__cplusplus)
22214
22215 #ifdef HAVE_GXX_BUILTIN_H
22216 #include <g++/builtin.h>
22217 #elif HAVE_GPP_BUILTIN_H
22218 #include <gpp/builtin.h>
22219 #elif HAVE_BUILTIN_H
22220 #include <builtin.h>
22221 #endif
22222
22223 #else
22224
22225 #if $cf_cv_header_stdbool_h
22226 #include <stdbool.h>
22227 #endif
22228
22229 #endif
22230
22231 int main(void)
22232 {
22233         FILE *fp = fopen("cf_test.out", "w");
22234         if (fp != 0) {
22235                 bool x = true;
22236                 if ((bool)(-x) >= 0)
22237                         fputs("unsigned ", fp);
22238                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22239                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22240                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22241                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22242                 fclose(fp);
22243         }
22244         ${cf_cv_main_return:-return}(0);
22245 }
22246
22247 _ACEOF
22248 rm -f conftest$ac_exeext
22249 if { (eval echo "$as_me:22249: \"$ac_link\"") >&5
22250   (eval $ac_link) 2>&5
22251   ac_status=$?
22252   echo "$as_me:22252: \$? = $ac_status" >&5
22253   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22254   { (eval echo "$as_me:22254: \"$ac_try\"") >&5
22255   (eval $ac_try) 2>&5
22256   ac_status=$?
22257   echo "$as_me:22257: \$? = $ac_status" >&5
22258   (exit $ac_status); }; }; then
22259   cf_cv_type_of_bool=`cat cf_test.out`
22260                  if test -z "$cf_cv_type_of_bool"; then
22261                    cf_cv_type_of_bool=unknown
22262                  fi
22263 else
22264   echo "$as_me: program exited with status $ac_status" >&5
22265 echo "$as_me: failed program was:" >&5
22266 cat conftest.$ac_ext >&5
22267 cf_cv_type_of_bool=unknown
22268 fi
22269 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22270 fi
22271
22272 fi
22273
22274         rm -f cf_test.out
22275 echo "$as_me:22275: result: $cf_cv_type_of_bool" >&5
22276 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22277 if test "$cf_cv_type_of_bool" = unknown ; then
22278         case .$NCURSES_BOOL in
22279         (.auto|.) NCURSES_BOOL=unsigned;;
22280         esac
22281         { echo "$as_me:22281: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22282 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22283         cf_cv_type_of_bool=$NCURSES_BOOL
22284 fi
22285
22286                 else
22287                         echo "$as_me:22287: checking for fallback type of bool" >&5
22288 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
22289                         case "$host_cpu" in
22290                         (i?86)  cf_cv_type_of_bool=char ;;
22291                         (*)     cf_cv_type_of_bool=int  ;;
22292                         esac
22293                         echo "$as_me:22293: result: $cf_cv_type_of_bool" >&5
22294 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22295                 fi
22296         fi
22297 fi
22298
22299 # If the C compiler did not declare bool, and we did not determine that the C++
22300 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
22301 # ncurses library use the same type as C++ bool.  Note that this allows one to
22302 # specify the type of bool in a configure-script option and postpone
22303 # integration with the C++ compiler provided that the types are compatible.
22304 USE_CXX_BOOL=1
22305 if test $cf_cv_cc_bool_type = 1
22306 then
22307         # oops: C has a bool.  Unlikely, but C++ could differ.
22308         USE_CXX_BOOL=0
22309 elif test $cf_cv_builtin_bool = 0
22310 then
22311         # C++ has no bool
22312         USE_CXX_BOOL=0
22313 else
22314         # this is the normal case
22315         USE_CXX_BOOL='defined(__cplusplus)'
22316 fi
22317
22318 if test -f "${srcdir}/Ada95/Makefile.in" ; then
22319
22320         if test "$cf_with_ada" != "no" ; then
22321                 if test "$with_libtool" != "no"; then
22322                         { echo "$as_me:22322: WARNING: libtool does not support Ada - disabling feature" >&5
22323 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
22324                         cf_with_ada=no
22325                 fi
22326         fi
22327
22328         if test "$cf_with_ada" != "no" ; then
22329
22330 cf_ada_make=gnatmake
22331 cf_ada_config="#"
22332 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
22333 set dummy $cf_ada_make; ac_word=$2
22334 echo "$as_me:22334: checking for $ac_word" >&5
22335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22336 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
22337   echo $ECHO_N "(cached) $ECHO_C" >&6
22338 else
22339   if test -n "$gnatmake_exists"; then
22340   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
22341 else
22342   ac_save_IFS=$IFS; IFS=$ac_path_separator
22343 ac_dummy="$PATH"
22344 for ac_dir in $ac_dummy; do
22345   IFS=$ac_save_IFS
22346   test -z "$ac_dir" && ac_dir=.
22347   $as_executable_p "$ac_dir/$ac_word" || continue
22348 ac_cv_prog_gnatmake_exists="yes"
22349 echo "$as_me:22349: found $ac_dir/$ac_word" >&5
22350 break
22351 done
22352
22353   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
22354 fi
22355 fi
22356 gnatmake_exists=$ac_cv_prog_gnatmake_exists
22357 if test -n "$gnatmake_exists"; then
22358   echo "$as_me:22358: result: $gnatmake_exists" >&5
22359 echo "${ECHO_T}$gnatmake_exists" >&6
22360 else
22361   echo "$as_me:22361: result: no" >&5
22362 echo "${ECHO_T}no" >&6
22363 fi
22364
22365 if test "$ac_cv_prog_gnatmake_exists" = no; then
22366         cf_ada_make=
22367         cf_cv_prog_gnat_correct=no
22368 else
22369         # Extract the first word of "gprconfig", so it can be a program name with args.
22370 set dummy gprconfig; ac_word=$2
22371 echo "$as_me:22371: checking for $ac_word" >&5
22372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22373 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
22374   echo $ECHO_N "(cached) $ECHO_C" >&6
22375 else
22376   if test -n "$gprconfig_exists"; then
22377   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
22378 else
22379   ac_save_IFS=$IFS; IFS=$ac_path_separator
22380 ac_dummy="$PATH"
22381 for ac_dir in $ac_dummy; do
22382   IFS=$ac_save_IFS
22383   test -z "$ac_dir" && ac_dir=.
22384   $as_executable_p "$ac_dir/$ac_word" || continue
22385 ac_cv_prog_gprconfig_exists="yes"
22386 echo "$as_me:22386: found $ac_dir/$ac_word" >&5
22387 break
22388 done
22389
22390   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
22391 fi
22392 fi
22393 gprconfig_exists=$ac_cv_prog_gprconfig_exists
22394 if test -n "$gprconfig_exists"; then
22395   echo "$as_me:22395: result: $gprconfig_exists" >&5
22396 echo "${ECHO_T}$gprconfig_exists" >&6
22397 else
22398   echo "$as_me:22398: result: no" >&5
22399 echo "${ECHO_T}no" >&6
22400 fi
22401
22402         if test "$ac_cv_prog_gprconfig_exists" = yes
22403         then
22404                 rm -rf conftest* *~conftest*
22405                 if mkdir conftest.src
22406                 then
22407                         cf_ada_config=""
22408                         cd conftest.src
22409                         for cf_gprconfig in Ada C
22410                         do
22411                                 echo "$as_me:22411: checking for gprconfig name for $cf_gprconfig" >&5
22412 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
22413                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
22414                                 if test -n "$cf_gprconfig_value"
22415                                 then
22416                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
22417                                         echo "$as_me:22417: result: $cf_gprconfig_value" >&5
22418 echo "${ECHO_T}$cf_gprconfig_value" >&6
22419                                 else
22420                                         echo "$as_me:22420: result: missing" >&5
22421 echo "${ECHO_T}missing" >&6
22422                                         cf_ada_config="#"
22423                                         break
22424                                 fi
22425                         done
22426                         cd ..
22427                         rm -rf conftest* *~conftest*
22428                 fi
22429         else
22430                 # gprconfig is newer than gnatmake; we can continue...
22431                 cf_ada_config="##"
22432         fi
22433         if test "x$cf_ada_config" != "x#"
22434         then
22435
22436 echo "$as_me:22436: checking for gnat version" >&5
22437 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
22438 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
22439         grep '[0-9].[0-9][0-9]*' |\
22440         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
22441 echo "$as_me:22441: result: $cf_gnat_version" >&5
22442 echo "${ECHO_T}$cf_gnat_version" >&6
22443
22444 case $cf_gnat_version in
22445 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
22446         cf_cv_prog_gnat_correct=yes
22447         ;;
22448 (*)
22449         { echo "$as_me:22449: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
22450 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
22451         cf_cv_prog_gnat_correct=no
22452         ;;
22453 esac
22454
22455                 # Extract the first word of "m4", so it can be a program name with args.
22456 set dummy m4; ac_word=$2
22457 echo "$as_me:22457: checking for $ac_word" >&5
22458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22459 if test "${ac_cv_prog_M4_exists+set}" = set; then
22460   echo $ECHO_N "(cached) $ECHO_C" >&6
22461 else
22462   if test -n "$M4_exists"; then
22463   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
22464 else
22465   ac_save_IFS=$IFS; IFS=$ac_path_separator
22466 ac_dummy="$PATH"
22467 for ac_dir in $ac_dummy; do
22468   IFS=$ac_save_IFS
22469   test -z "$ac_dir" && ac_dir=.
22470   $as_executable_p "$ac_dir/$ac_word" || continue
22471 ac_cv_prog_M4_exists="yes"
22472 echo "$as_me:22472: found $ac_dir/$ac_word" >&5
22473 break
22474 done
22475
22476   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
22477 fi
22478 fi
22479 M4_exists=$ac_cv_prog_M4_exists
22480 if test -n "$M4_exists"; then
22481   echo "$as_me:22481: result: $M4_exists" >&5
22482 echo "${ECHO_T}$M4_exists" >&6
22483 else
22484   echo "$as_me:22484: result: no" >&5
22485 echo "${ECHO_T}no" >&6
22486 fi
22487
22488                 if test "$ac_cv_prog_M4_exists" = no; then
22489                         cf_cv_prog_gnat_correct=no
22490                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
22491                 fi
22492                 if test "$cf_cv_prog_gnat_correct" = yes; then
22493                         echo "$as_me:22493: checking if GNAT works" >&5
22494 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
22495
22496 rm -rf conftest* *~conftest*
22497 cat >>conftest.ads <<CF_EOF
22498 procedure conftest;
22499 CF_EOF
22500 cat >>conftest.adb <<CF_EOF
22501 with Text_IO;
22502 with GNAT.OS_Lib;
22503 procedure conftest is
22504 begin
22505    Text_IO.Put ("Hello World");
22506    Text_IO.New_Line;
22507    GNAT.OS_Lib.OS_Exit (0);
22508 end conftest;
22509 CF_EOF
22510 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22511    if ( ./conftest 1>&5 2>&1 ) ; then
22512       cf_cv_prog_gnat_correct=yes
22513    else
22514       cf_cv_prog_gnat_correct=no
22515    fi
22516 else
22517    cf_cv_prog_gnat_correct=no
22518 fi
22519 rm -rf conftest* *~conftest*
22520
22521                         echo "$as_me:22521: result: $cf_cv_prog_gnat_correct" >&5
22522 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
22523                 fi
22524         else
22525                 cf_cv_prog_gnat_correct=no
22526         fi
22527 fi
22528
22529                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
22530
22531         ADAFLAGS="$ADAFLAGS -gnatpn"
22532
22533         echo "$as_me:22533: checking optimization options for ADAFLAGS" >&5
22534 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
22535         case "$CFLAGS" in
22536         (*-g*)
22537
22538         ADAFLAGS="$ADAFLAGS -g"
22539
22540                 ;;
22541         esac
22542         case "$CFLAGS" in
22543         (*-O*)
22544                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
22545
22546         ADAFLAGS="$ADAFLAGS $cf_O_flag"
22547
22548                 ;;
22549         esac
22550         echo "$as_me:22550: result: $ADAFLAGS" >&5
22551 echo "${ECHO_T}$ADAFLAGS" >&6
22552
22553 echo "$as_me:22553: checking if GNATPREP supports -T option" >&5
22554 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
22555 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
22556   echo $ECHO_N "(cached) $ECHO_C" >&6
22557 else
22558
22559 cf_cv_gnatprep_opt_t=no
22560 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
22561
22562 fi
22563 echo "$as_me:22563: result: $cf_cv_gnatprep_opt_t" >&5
22564 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
22565 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
22566
22567 echo "$as_me:22567: checking if GNAT supports generics" >&5
22568 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
22569 case $cf_gnat_version in
22570 (3.[1-9]*|[4-9].*)
22571         cf_gnat_generics=yes
22572         ;;
22573 (*)
22574         cf_gnat_generics=no
22575         ;;
22576 esac
22577 echo "$as_me:22577: result: $cf_gnat_generics" >&5
22578 echo "${ECHO_T}$cf_gnat_generics" >&6
22579
22580 if test "$cf_gnat_generics" = yes
22581 then
22582         cf_compile_generics=generics
22583         cf_generic_objects="\${GENOBJS}"
22584 else
22585         cf_compile_generics=
22586         cf_generic_objects=
22587 fi
22588
22589 echo "$as_me:22589: checking if GNAT supports SIGINT" >&5
22590 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
22591 if test "${cf_cv_gnat_sigint+set}" = set; then
22592   echo $ECHO_N "(cached) $ECHO_C" >&6
22593 else
22594
22595 rm -rf conftest* *~conftest*
22596 cat >>conftest.ads <<CF_EOF
22597 with Ada.Interrupts.Names;
22598
22599 package ConfTest is
22600
22601    pragma Warnings (Off);  --  the next pragma exists since 3.11p
22602    pragma Unreserve_All_Interrupts;
22603    pragma Warnings (On);
22604
22605    protected Process is
22606       procedure Stop;
22607       function Continue return Boolean;
22608       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
22609    private
22610       Done : Boolean := False;
22611    end Process;
22612
22613 end ConfTest;
22614 CF_EOF
22615 cat >>conftest.adb <<CF_EOF
22616 package body ConfTest is
22617    protected body Process is
22618       procedure Stop is
22619       begin
22620          Done := True;
22621       end Stop;
22622       function Continue return Boolean is
22623       begin
22624          return not Done;
22625       end Continue;
22626    end Process;
22627 end ConfTest;
22628 CF_EOF
22629 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22630       cf_cv_gnat_sigint=yes
22631 else
22632    cf_cv_gnat_sigint=no
22633 fi
22634 rm -rf conftest* *~conftest*
22635
22636 fi
22637 echo "$as_me:22637: result: $cf_cv_gnat_sigint" >&5
22638 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
22639
22640 if test $cf_cv_gnat_sigint = yes ; then
22641         USE_GNAT_SIGINT=""
22642 else
22643         USE_GNAT_SIGINT="#"
22644 fi
22645
22646 cf_gnat_libraries=no
22647 cf_gnat_projects=no
22648
22649 if test "$enable_gnat_projects" != no ; then
22650 echo "$as_me:22650: checking if GNAT supports project files" >&5
22651 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
22652 case $cf_gnat_version in
22653 (3.[0-9]*)
22654         ;;
22655 (*)
22656         case $cf_cv_system_name in
22657         (cygwin*|msys*)
22658                 ;;
22659         (*)
22660                 rm -rf conftest* *~conftest*
22661                 if mkdir conftest.src conftest.bin conftest.lib
22662                 then
22663                         cd conftest.src
22664                         rm -rf conftest* *~conftest*
22665                         cat >>library.gpr <<CF_EOF
22666 project Library is
22667   Kind := External ("LIB_KIND");
22668   for Library_Name use "ConfTest";
22669   for Object_Dir use ".";
22670   for Library_ALI_Dir use External("LIBRARY_DIR");
22671   for Library_Version use External ("SONAME");
22672   for Library_Kind use Kind;
22673   for Library_Dir use External("BUILD_DIR");
22674   Source_Dir := External ("SOURCE_DIR");
22675   for Source_Dirs use (Source_Dir);
22676 end Library;
22677 CF_EOF
22678                         cat >>confpackage.ads <<CF_EOF
22679 package ConfPackage is
22680    procedure conftest;
22681 end ConfPackage;
22682 CF_EOF
22683                         cat >>confpackage.adb <<CF_EOF
22684 with Text_IO;
22685 package body ConfPackage is
22686    procedure conftest is
22687    begin
22688       Text_IO.Put ("Hello World");
22689       Text_IO.New_Line;
22690    end conftest;
22691 end ConfPackage;
22692 CF_EOF
22693                         if ( $cf_ada_make $ADAFLAGS \
22694                                         -Plibrary.gpr \
22695                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22696                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22697                                         -XSOURCE_DIR=`pwd` \
22698                                         -XSONAME=libConfTest.so.1 \
22699                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
22700                                 cf_gnat_projects=yes
22701                         fi
22702                         cd ..
22703                 fi
22704                 if test -f conftest.lib/confpackage.ali
22705                 then
22706                         cf_gnat_libraries=yes
22707                 fi
22708                 rm -rf conftest* *~conftest*
22709                 ;;
22710         esac
22711         ;;
22712 esac
22713 echo "$as_me:22713: result: $cf_gnat_projects" >&5
22714 echo "${ECHO_T}$cf_gnat_projects" >&6
22715 fi # enable_gnat_projects
22716
22717 if test $cf_gnat_projects = yes
22718 then
22719         echo "$as_me:22719: checking if GNAT supports libraries" >&5
22720 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22721         echo "$as_me:22721: result: $cf_gnat_libraries" >&5
22722 echo "${ECHO_T}$cf_gnat_libraries" >&6
22723 fi
22724
22725 if test "$cf_gnat_projects" = yes
22726 then
22727         USE_OLD_MAKERULES="#"
22728         USE_GNAT_PROJECTS=""
22729 else
22730         USE_OLD_MAKERULES=""
22731         USE_GNAT_PROJECTS="#"
22732 fi
22733
22734 if test "$cf_gnat_libraries" = yes
22735 then
22736         USE_GNAT_LIBRARIES=""
22737 else
22738         USE_GNAT_LIBRARIES="#"
22739 fi
22740
22741 echo "$as_me:22741: checking for ada-compiler" >&5
22742 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22743
22744 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22745 if test "${with_ada_compiler+set}" = set; then
22746   withval="$with_ada_compiler"
22747   cf_ada_compiler=$withval
22748 else
22749   cf_ada_compiler=gnatmake
22750 fi;
22751
22752 echo "$as_me:22752: result: $cf_ada_compiler" >&5
22753 echo "${ECHO_T}$cf_ada_compiler" >&6
22754
22755                         cf_ada_package=terminal_interface
22756
22757 echo "$as_me:22757: checking for ada-include" >&5
22758 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22759
22760 # Check whether --with-ada-include or --without-ada-include was given.
22761 if test "${with_ada_include+set}" = set; then
22762   withval="$with_ada_include"
22763
22764 else
22765   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22766 fi; if test -n "$prefix/share/ada/adainclude" ; then
22767
22768 if test "x$prefix" != xNONE; then
22769         cf_path_syntax="$prefix"
22770 else
22771         cf_path_syntax="$ac_default_prefix"
22772 fi
22773
22774 case ".$withval" in
22775 (.\$\(*\)*|.\'*\'*)
22776         ;;
22777 (..|./*|.\\*)
22778         ;;
22779 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22780         ;;
22781 (.\${*prefix}*|.\${*dir}*)
22782         eval withval="$withval"
22783         case ".$withval" in
22784         (.NONE/*)
22785                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22786                 ;;
22787         esac
22788         ;;
22789 (.no|.NONE/*)
22790         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22791         ;;
22792 (*)
22793         { { echo "$as_me:22793: error: expected a pathname, not \"$withval\"" >&5
22794 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22795    { (exit 1); exit 1; }; }
22796         ;;
22797 esac
22798
22799 fi
22800 eval ADA_INCLUDE="$withval"
22801
22802 echo "$as_me:22802: result: $ADA_INCLUDE" >&5
22803 echo "${ECHO_T}$ADA_INCLUDE" >&6
22804
22805 echo "$as_me:22805: checking for ada-objects" >&5
22806 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22807
22808 # Check whether --with-ada-objects or --without-ada-objects was given.
22809 if test "${with_ada_objects+set}" = set; then
22810   withval="$with_ada_objects"
22811
22812 else
22813   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22814 fi; if test -n "$prefix/lib/ada/adalib" ; then
22815
22816 if test "x$prefix" != xNONE; then
22817         cf_path_syntax="$prefix"
22818 else
22819         cf_path_syntax="$ac_default_prefix"
22820 fi
22821
22822 case ".$withval" in
22823 (.\$\(*\)*|.\'*\'*)
22824         ;;
22825 (..|./*|.\\*)
22826         ;;
22827 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22828         ;;
22829 (.\${*prefix}*|.\${*dir}*)
22830         eval withval="$withval"
22831         case ".$withval" in
22832         (.NONE/*)
22833                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22834                 ;;
22835         esac
22836         ;;
22837 (.no|.NONE/*)
22838         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22839         ;;
22840 (*)
22841         { { echo "$as_me:22841: error: expected a pathname, not \"$withval\"" >&5
22842 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22843    { (exit 1); exit 1; }; }
22844         ;;
22845 esac
22846
22847 fi
22848 eval ADA_OBJECTS="$withval"
22849
22850 echo "$as_me:22850: result: $ADA_OBJECTS" >&5
22851 echo "${ECHO_T}$ADA_OBJECTS" >&6
22852
22853 echo "$as_me:22853: checking if an Ada95 shared-library should be built" >&5
22854 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22855
22856 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22857 if test "${with_ada_sharedlib+set}" = set; then
22858   withval="$with_ada_sharedlib"
22859   with_ada_sharedlib=$withval
22860 else
22861   with_ada_sharedlib=no
22862 fi;
22863 echo "$as_me:22863: result: $with_ada_sharedlib" >&5
22864 echo "${ECHO_T}$with_ada_sharedlib" >&6
22865
22866 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22867 MAKE_ADA_SHAREDLIB="#"
22868
22869 if test "x$with_ada_sharedlib" != xno
22870 then
22871         MAKE_ADA_SHAREDLIB=
22872         if test "x$with_ada_sharedlib" != xyes
22873         then
22874                 ADA_SHAREDLIB="$with_ada_sharedlib"
22875         fi
22876 fi
22877
22878                 fi
22879         fi
22880 else
22881         cf_with_ada=no
22882 fi
22883
22884 # do this "late" to avoid conflict with header-checks
22885 if test "x$with_widec" = xyes ; then
22886         echo "$as_me:22886: checking for wchar_t" >&5
22887 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22888 if test "${ac_cv_type_wchar_t+set}" = set; then
22889   echo $ECHO_N "(cached) $ECHO_C" >&6
22890 else
22891   cat >conftest.$ac_ext <<_ACEOF
22892 #line 22892 "configure"
22893 #include "confdefs.h"
22894 $ac_includes_default
22895 int
22896 main (void)
22897 {
22898 if ((wchar_t *) 0)
22899   return 0;
22900 if (sizeof (wchar_t))
22901   return 0;
22902   ;
22903   return 0;
22904 }
22905 _ACEOF
22906 rm -f conftest.$ac_objext
22907 if { (eval echo "$as_me:22907: \"$ac_compile\"") >&5
22908   (eval $ac_compile) 2>&5
22909   ac_status=$?
22910   echo "$as_me:22910: \$? = $ac_status" >&5
22911   (exit $ac_status); } &&
22912          { ac_try='test -s conftest.$ac_objext'
22913   { (eval echo "$as_me:22913: \"$ac_try\"") >&5
22914   (eval $ac_try) 2>&5
22915   ac_status=$?
22916   echo "$as_me:22916: \$? = $ac_status" >&5
22917   (exit $ac_status); }; }; then
22918   ac_cv_type_wchar_t=yes
22919 else
22920   echo "$as_me: failed program was:" >&5
22921 cat conftest.$ac_ext >&5
22922 ac_cv_type_wchar_t=no
22923 fi
22924 rm -f conftest.$ac_objext conftest.$ac_ext
22925 fi
22926 echo "$as_me:22926: result: $ac_cv_type_wchar_t" >&5
22927 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22928
22929 echo "$as_me:22929: checking size of wchar_t" >&5
22930 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22931 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22932   echo $ECHO_N "(cached) $ECHO_C" >&6
22933 else
22934   if test "$ac_cv_type_wchar_t" = yes; then
22935   if test "$cross_compiling" = yes; then
22936   # Depending upon the size, compute the lo and hi bounds.
22937 cat >conftest.$ac_ext <<_ACEOF
22938 #line 22938 "configure"
22939 #include "confdefs.h"
22940 $ac_includes_default
22941 int
22942 main (void)
22943 {
22944 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22945   ;
22946   return 0;
22947 }
22948 _ACEOF
22949 rm -f conftest.$ac_objext
22950 if { (eval echo "$as_me:22950: \"$ac_compile\"") >&5
22951   (eval $ac_compile) 2>&5
22952   ac_status=$?
22953   echo "$as_me:22953: \$? = $ac_status" >&5
22954   (exit $ac_status); } &&
22955          { ac_try='test -s conftest.$ac_objext'
22956   { (eval echo "$as_me:22956: \"$ac_try\"") >&5
22957   (eval $ac_try) 2>&5
22958   ac_status=$?
22959   echo "$as_me:22959: \$? = $ac_status" >&5
22960   (exit $ac_status); }; }; then
22961   ac_lo=0 ac_mid=0
22962   while :; do
22963     cat >conftest.$ac_ext <<_ACEOF
22964 #line 22964 "configure"
22965 #include "confdefs.h"
22966 $ac_includes_default
22967 int
22968 main (void)
22969 {
22970 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22971   ;
22972   return 0;
22973 }
22974 _ACEOF
22975 rm -f conftest.$ac_objext
22976 if { (eval echo "$as_me:22976: \"$ac_compile\"") >&5
22977   (eval $ac_compile) 2>&5
22978   ac_status=$?
22979   echo "$as_me:22979: \$? = $ac_status" >&5
22980   (exit $ac_status); } &&
22981          { ac_try='test -s conftest.$ac_objext'
22982   { (eval echo "$as_me:22982: \"$ac_try\"") >&5
22983   (eval $ac_try) 2>&5
22984   ac_status=$?
22985   echo "$as_me:22985: \$? = $ac_status" >&5
22986   (exit $ac_status); }; }; then
22987   ac_hi=$ac_mid; break
22988 else
22989   echo "$as_me: failed program was:" >&5
22990 cat conftest.$ac_ext >&5
22991 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22992 fi
22993 rm -f conftest.$ac_objext conftest.$ac_ext
22994   done
22995 else
22996   echo "$as_me: failed program was:" >&5
22997 cat conftest.$ac_ext >&5
22998 ac_hi=-1 ac_mid=-1
22999   while :; do
23000     cat >conftest.$ac_ext <<_ACEOF
23001 #line 23001 "configure"
23002 #include "confdefs.h"
23003 $ac_includes_default
23004 int
23005 main (void)
23006 {
23007 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23008   ;
23009   return 0;
23010 }
23011 _ACEOF
23012 rm -f conftest.$ac_objext
23013 if { (eval echo "$as_me:23013: \"$ac_compile\"") >&5
23014   (eval $ac_compile) 2>&5
23015   ac_status=$?
23016   echo "$as_me:23016: \$? = $ac_status" >&5
23017   (exit $ac_status); } &&
23018          { ac_try='test -s conftest.$ac_objext'
23019   { (eval echo "$as_me:23019: \"$ac_try\"") >&5
23020   (eval $ac_try) 2>&5
23021   ac_status=$?
23022   echo "$as_me:23022: \$? = $ac_status" >&5
23023   (exit $ac_status); }; }; then
23024   ac_lo=$ac_mid; break
23025 else
23026   echo "$as_me: failed program was:" >&5
23027 cat conftest.$ac_ext >&5
23028 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23029 fi
23030 rm -f conftest.$ac_objext conftest.$ac_ext
23031   done
23032 fi
23033 rm -f conftest.$ac_objext conftest.$ac_ext
23034 # Binary search between lo and hi bounds.
23035 while test "x$ac_lo" != "x$ac_hi"; do
23036   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23037   cat >conftest.$ac_ext <<_ACEOF
23038 #line 23038 "configure"
23039 #include "confdefs.h"
23040 $ac_includes_default
23041 int
23042 main (void)
23043 {
23044 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23045   ;
23046   return 0;
23047 }
23048 _ACEOF
23049 rm -f conftest.$ac_objext
23050 if { (eval echo "$as_me:23050: \"$ac_compile\"") >&5
23051   (eval $ac_compile) 2>&5
23052   ac_status=$?
23053   echo "$as_me:23053: \$? = $ac_status" >&5
23054   (exit $ac_status); } &&
23055          { ac_try='test -s conftest.$ac_objext'
23056   { (eval echo "$as_me:23056: \"$ac_try\"") >&5
23057   (eval $ac_try) 2>&5
23058   ac_status=$?
23059   echo "$as_me:23059: \$? = $ac_status" >&5
23060   (exit $ac_status); }; }; then
23061   ac_hi=$ac_mid
23062 else
23063   echo "$as_me: failed program was:" >&5
23064 cat conftest.$ac_ext >&5
23065 ac_lo=`expr $ac_mid + 1`
23066 fi
23067 rm -f conftest.$ac_objext conftest.$ac_ext
23068 done
23069 ac_cv_sizeof_wchar_t=$ac_lo
23070 else
23071   if test "$cross_compiling" = yes; then
23072   { { echo "$as_me:23072: error: cannot run test program while cross compiling" >&5
23073 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23074    { (exit 1); exit 1; }; }
23075 else
23076   cat >conftest.$ac_ext <<_ACEOF
23077 #line 23077 "configure"
23078 #include "confdefs.h"
23079 $ac_includes_default
23080 int
23081 main (void)
23082 {
23083 FILE *f = fopen ("conftest.val", "w");
23084 if (!f)
23085   $ac_main_return (1);
23086 fprintf (f, "%d", (sizeof (wchar_t)));
23087 fclose (f);
23088   ;
23089   return 0;
23090 }
23091 _ACEOF
23092 rm -f conftest$ac_exeext
23093 if { (eval echo "$as_me:23093: \"$ac_link\"") >&5
23094   (eval $ac_link) 2>&5
23095   ac_status=$?
23096   echo "$as_me:23096: \$? = $ac_status" >&5
23097   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23098   { (eval echo "$as_me:23098: \"$ac_try\"") >&5
23099   (eval $ac_try) 2>&5
23100   ac_status=$?
23101   echo "$as_me:23101: \$? = $ac_status" >&5
23102   (exit $ac_status); }; }; then
23103   ac_cv_sizeof_wchar_t=`cat conftest.val`
23104 else
23105   echo "$as_me: program exited with status $ac_status" >&5
23106 echo "$as_me: failed program was:" >&5
23107 cat conftest.$ac_ext >&5
23108 fi
23109 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23110 fi
23111 fi
23112 rm -f conftest.val
23113 else
23114   ac_cv_sizeof_wchar_t=0
23115 fi
23116 fi
23117 echo "$as_me:23117: result: $ac_cv_sizeof_wchar_t" >&5
23118 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
23119 cat >>confdefs.h <<EOF
23120 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23121 EOF
23122
23123 fi
23124
23125 ### Construct the ncurses library-subsets, if any, from this set of keywords:
23126 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
23127 ###
23128 ### ticlib modules may be a separate library, otherwise contained in termlib.
23129 ### termlib modules may be a separate library, otherwise contained in ncurses.
23130 ###
23131 ### The of "+" or " " between the tokens controls the way the script
23132 ### chooses to split module lists into libraries.
23133 ###
23134 ### (see CF_LIB_RULES).
23135 echo "$as_me:23135: checking for library subsets" >&5
23136 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
23137 LIB_SUBSETS=
23138
23139 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
23140         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
23141         if test "$with_ticlib" != no ; then
23142                 LIB_SUBSETS="${LIB_SUBSETS} "
23143         else
23144                 LIB_SUBSETS="${LIB_SUBSETS}+"
23145         fi
23146 fi
23147
23148 LIB_SUBSETS="${LIB_SUBSETS}termlib"
23149 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
23150
23151 if test "$with_termlib" != no ; then
23152         LIB_SUBSETS="${LIB_SUBSETS} "
23153 else
23154         LIB_SUBSETS="${LIB_SUBSETS}+"
23155 fi
23156
23157 LIB_SUBSETS="${LIB_SUBSETS}base"
23158
23159 # Most term-driver calls are to tinfo, but some like init_pair are to the
23160 # base library (so it resides in base).
23161 if test "$with_term_driver" != no ; then
23162         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
23163         case $cf_cv_system_name in
23164         (*mingw32*|*mingw64*)
23165                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
23166                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
23167                 ;;
23168         (*)
23169                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
23170                 ;;
23171         esac
23172 fi
23173
23174 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
23175 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
23176
23177 echo "$as_me:23177: result: $LIB_SUBSETS" >&5
23178 echo "${ECHO_T}$LIB_SUBSETS" >&6
23179
23180 ### Construct the list of include-directories to be generated
23181
23182 if test "$srcdir" != "."; then
23183         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
23184 fi
23185 CPPFLAGS="-I../include $CPPFLAGS"
23186 if test "$srcdir" != "."; then
23187         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
23188 fi
23189 CPPFLAGS="-I. $CPPFLAGS"
23190
23191 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
23192 if test "$srcdir" != "."; then
23193         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
23194 fi
23195 if test "$GCC" != yes; then
23196         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23197 elif test "$includedir" != "/usr/include"; then
23198         if test "$includedir" = '${prefix}/include' ; then
23199                 if test x$prefix != x/usr ; then
23200                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23201                 fi
23202         else
23203                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23204         fi
23205 fi
23206
23207 ### Build up pieces for makefile rules
23208 echo "$as_me:23208: checking default library suffix" >&5
23209 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
23210
23211         case $DFT_LWR_MODEL in
23212         (libtool) DFT_ARG_SUFFIX=''   ;;
23213         (normal)  DFT_ARG_SUFFIX=''   ;;
23214         (debug)   DFT_ARG_SUFFIX='_g' ;;
23215         (profile) DFT_ARG_SUFFIX='_p' ;;
23216         (shared)  DFT_ARG_SUFFIX=''   ;;
23217         esac
23218         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
23219 echo "$as_me:23219: result: $DFT_ARG_SUFFIX" >&5
23220 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
23221
23222 echo "$as_me:23222: checking default library-dependency suffix" >&5
23223 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
23224
23225         case X$DFT_LWR_MODEL in
23226         (Xlibtool)
23227                 DFT_LIB_SUFFIX='.la'
23228                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23229                 ;;
23230         (Xdebug)
23231                 DFT_LIB_SUFFIX='_g.a'
23232                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23233                 ;;
23234         (Xprofile)
23235                 DFT_LIB_SUFFIX='_p.a'
23236                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23237                 ;;
23238         (Xshared)
23239                 case $cf_cv_system_name in
23240                 (aix[5-7]*)
23241                         DFT_LIB_SUFFIX='.so'
23242                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23243                         ;;
23244                 (cygwin*|msys*|mingw*)
23245                         DFT_LIB_SUFFIX='.dll'
23246                         DFT_DEP_SUFFIX='.dll.a'
23247                         ;;
23248                 (darwin*)
23249                         DFT_LIB_SUFFIX='.dylib'
23250                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23251                         ;;
23252                 (hpux*)
23253                         case $target in
23254                         (ia64*)
23255                                 DFT_LIB_SUFFIX='.so'
23256                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23257                                 ;;
23258                         (*)
23259                                 DFT_LIB_SUFFIX='.sl'
23260                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23261                                 ;;
23262                         esac
23263                         ;;
23264                 (*)
23265                         DFT_LIB_SUFFIX='.so'
23266                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23267                         ;;
23268                 esac
23269                 ;;
23270         (*)
23271                 DFT_LIB_SUFFIX='.a'
23272                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23273                 ;;
23274         esac
23275         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23276         then
23277                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
23278                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
23279         fi
23280 echo "$as_me:23280: result: $DFT_DEP_SUFFIX" >&5
23281 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
23282
23283 echo "$as_me:23283: checking default object directory" >&5
23284 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
23285
23286         case $DFT_LWR_MODEL in
23287         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
23288         (normal)  DFT_OBJ_SUBDIR='objects' ;;
23289         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
23290         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
23291         (shared)
23292                 case $cf_cv_system_name in
23293                 (cygwin|msys)
23294                         DFT_OBJ_SUBDIR='objects' ;;
23295                 (*)
23296                         DFT_OBJ_SUBDIR='obj_s' ;;
23297                 esac
23298         esac
23299 echo "$as_me:23299: result: $DFT_OBJ_SUBDIR" >&5
23300 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
23301
23302 if test "x$cf_with_cxx" = xyes ; then
23303 echo "$as_me:23303: checking c++ library-dependency suffix" >&5
23304 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
23305 if test "$with_libtool" != "no"; then
23306         # libtool thinks it can make c++ shared libraries (perhaps only g++)
23307         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23308 elif test "$with_shared_cxx" != "no"; then
23309         # also for g++ users...
23310         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23311 else
23312         # we normally make a static library because C/C++ library rules differ
23313
23314         case Xnormal in
23315         (Xlibtool)
23316                 CXX_LIB_SUFFIX='.la'
23317                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23318                 ;;
23319         (Xdebug)
23320                 CXX_LIB_SUFFIX='_g.a'
23321                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23322                 ;;
23323         (Xprofile)
23324                 CXX_LIB_SUFFIX='_p.a'
23325                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23326                 ;;
23327         (Xshared)
23328                 case $cf_cv_system_name in
23329                 (aix[5-7]*)
23330                         CXX_LIB_SUFFIX='.so'
23331                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23332                         ;;
23333                 (cygwin*|msys*|mingw*)
23334                         CXX_LIB_SUFFIX='.dll'
23335                         CXX_DEP_SUFFIX='.dll.a'
23336                         ;;
23337                 (darwin*)
23338                         CXX_LIB_SUFFIX='.dylib'
23339                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23340                         ;;
23341                 (hpux*)
23342                         case $target in
23343                         (ia64*)
23344                                 CXX_LIB_SUFFIX='.so'
23345                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23346                                 ;;
23347                         (*)
23348                                 CXX_LIB_SUFFIX='.sl'
23349                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23350                                 ;;
23351                         esac
23352                         ;;
23353                 (*)
23354                         CXX_LIB_SUFFIX='.so'
23355                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23356                         ;;
23357                 esac
23358                 ;;
23359         (*)
23360                 CXX_LIB_SUFFIX='.a'
23361                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23362                 ;;
23363         esac
23364         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23365         then
23366                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
23367                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
23368         fi
23369
23370 fi
23371 echo "$as_me:23371: result: $CXX_LIB_SUFFIX" >&5
23372 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
23373
23374 fi
23375
23376 # do not want -ldl in build except as needed for -lncurses dependency
23377 if test "x$with_dlsym" = xyes ; then
23378 if test $DFT_LWR_MODEL = shared || \
23379    test $DFT_LWR_MODEL = libtool ; then
23380
23381 # remove dl library from $LIBS
23382 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
23383
23384 fi
23385 fi
23386 ### Set up low-level terminfo dependencies for makefiles.
23387
23388 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
23389 # do not need libdl
23390 TICS_LIST=
23391 if test "x$with_dlsym" = xyes ; then
23392
23393 # remove dl library from $SHLIB_LIST
23394 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
23395
23396 fi
23397
23398 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
23399 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
23400 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
23401 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
23402 then
23403         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
23404 fi
23405
23406 if test "$with_ticlib" != no ; then
23407
23408         if test "x$with_ticlib" != xyes ; then
23409                 TICS_NAME=$with_ticlib
23410                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
23411                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23412                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23413                 TICS_LIB_SUFFIX="${with_ticlib}"
23414         else
23415                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
23416                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
23417                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
23418                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
23419         fi
23420         TICS_LDFLAGS="-L${LIB_DIR}"
23421         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
23422 else
23423         TICS_SUFFIX=${DFT_LIB_SUFFIX}
23424         TICS_LDFLAGS="-L${LIB_DIR}"
23425         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23426 fi
23427
23428 if test "$with_termlib" != no ; then
23429
23430         if test "x$with_termlib" != xyes ; then
23431                 TINFO_NAME=$with_termlib
23432                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
23433                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23434                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23435                 TINFO_LIB_SUFFIX="${with_termlib}"
23436         else
23437                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23438                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
23439                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
23440                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
23441         fi
23442
23443         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
23444         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
23445         if test "$DFT_LWR_MODEL" = "libtool"; then
23446                 TEST_ARGS="${TEST_DEPS}"
23447                 TEST_ARG2="${TEST_DEP2}"
23448                 TINFO_LDFLAGS="-L${LIB_DIR}"
23449                 TINFO_LIBS="$TEST_ARGS"
23450                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
23451                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
23452         else
23453                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
23454                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
23455                 if test "x$with_term_driver" != xno ; then
23456                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23457                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
23458                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23459                 else
23460                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23461                         TINFO_LIBS="$TEST_ARGS"
23462                 fi
23463                 TINFO_LDFLAGS="-L${LIB_DIR}"
23464                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23465         fi
23466 else
23467         # the next lines are needed for linking libtic over libncurses
23468         TINFO_NAME=${LIB_NAME}
23469         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23470         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
23471         if test "x$with_tic_depends" = xyes ; then
23472                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23473         else
23474                 TICS_LIST="$SHLIB_LIST"
23475         fi
23476
23477         TINFO_LDFLAGS="-L${LIB_DIR}"
23478         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23479 fi
23480
23481 if test "$DFT_LWR_MODEL" = shared ; then
23482         case $cf_cv_system_name in
23483         (cygwin*|msys*)
23484                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
23485                 TINFO_SUFFIX=.dll
23486                 ;;
23487         esac
23488 fi
23489
23490 if test "x$with_dlsym" = xyes ; then
23491
23492 # remove dl library from $TICS_LIST
23493 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
23494
23495 fi
23496
23497 if test "$DFT_LWR_MODEL" = "libtool"; then
23498         OBJEXT=lo
23499 fi
23500
23501 # needed for Ada95
23502 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
23503
23504 case $DFT_LWR_MODEL in
23505 (normal|debug|profile)
23506
23507 if test "$GCC" = yes ; then
23508         case $cf_cv_system_name in
23509         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
23510                 LDFLAGS_STATIC=
23511                 LDFLAGS_SHARED=
23512                 ;;
23513         (*)     # normally, except when broken
23514                 LDFLAGS_STATIC=-static
23515                 LDFLAGS_SHARED=-dynamic
23516                 ;;
23517         esac
23518 else
23519         case $cf_cv_system_name in
23520         (aix[4-7]*)     # from ld manpage
23521                 LDFLAGS_STATIC=-bstatic
23522                 LDFLAGS_SHARED=-bdynamic
23523                 ;;
23524         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
23525                 # We could also use just "archive" and "shared".
23526                 LDFLAGS_STATIC=-Wl,-a,archive_shared
23527                 LDFLAGS_SHARED=-Wl,-a,shared_archive
23528                 ;;
23529         (irix*)         # from ld manpage IRIX64
23530                 LDFLAGS_STATIC=-Bstatic
23531                 LDFLAGS_SHARED=-Bdynamic
23532                 ;;
23533         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
23534                 # alternative "-oldstyle_liblookup" (not in cc manpage)
23535                 LDFLAGS_STATIC=-noso
23536                 LDFLAGS_SHARED=-so_archive
23537                 ;;
23538         (solaris2*)
23539                 LDFLAGS_STATIC=-Bstatic
23540                 LDFLAGS_SHARED=-Bdynamic
23541                 ;;
23542         esac
23543 fi
23544
23545 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
23546 then
23547         echo "$as_me:23547: checking if linker supports switching between static/dynamic" >&5
23548 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
23549
23550         rm -f libconftest.a
23551         cat >conftest.$ac_ext <<EOF
23552 #line 23552 "configure"
23553 #include <stdio.h>
23554 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
23555 EOF
23556         if { (eval echo "$as_me:23556: \"$ac_compile\"") >&5
23557   (eval $ac_compile) 2>&5
23558   ac_status=$?
23559   echo "$as_me:23559: \$? = $ac_status" >&5
23560   (exit $ac_status); } ; then
23561                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
23562                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
23563         fi
23564         rm -f conftest.*
23565
23566         cf_save_LIBS="$LIBS"
23567
23568         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
23569         cat >conftest.$ac_ext <<_ACEOF
23570 #line 23570 "configure"
23571 #include "confdefs.h"
23572
23573 #line 23573 "configure"
23574 #include <stdio.h>
23575 int cf_ldflags_static(FILE *fp);
23576
23577 int
23578 main (void)
23579 {
23580
23581         return cf_ldflags_static(stdin);
23582
23583   ;
23584   return 0;
23585 }
23586 _ACEOF
23587 rm -f conftest.$ac_objext conftest$ac_exeext
23588 if { (eval echo "$as_me:23588: \"$ac_link\"") >&5
23589   (eval $ac_link) 2>&5
23590   ac_status=$?
23591   echo "$as_me:23591: \$? = $ac_status" >&5
23592   (exit $ac_status); } &&
23593          { ac_try='test -s conftest$ac_exeext'
23594   { (eval echo "$as_me:23594: \"$ac_try\"") >&5
23595   (eval $ac_try) 2>&5
23596   ac_status=$?
23597   echo "$as_me:23597: \$? = $ac_status" >&5
23598   (exit $ac_status); }; }; then
23599
23600         # some linkers simply ignore the -dynamic
23601         case x`file conftest$ac_exeext 2>/dev/null` in
23602         (*static*)
23603                 cf_ldflags_static=no
23604                 ;;
23605         (*)
23606                 cf_ldflags_static=yes
23607                 ;;
23608         esac
23609
23610 else
23611   echo "$as_me: failed program was:" >&5
23612 cat conftest.$ac_ext >&5
23613 cf_ldflags_static=no
23614 fi
23615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23616
23617         rm -f libconftest.*
23618         LIBS="$cf_save_LIBS"
23619
23620         echo "$as_me:23620: result: $cf_ldflags_static" >&5
23621 echo "${ECHO_T}$cf_ldflags_static" >&6
23622
23623         if test $cf_ldflags_static != yes
23624         then
23625                 LDFLAGS_STATIC=
23626                 LDFLAGS_SHARED=
23627         fi
23628 else
23629         LDFLAGS_STATIC=
23630         LDFLAGS_SHARED=
23631 fi
23632
23633         ;;
23634 esac
23635
23636 echo "$as_me:23636: checking where we will install curses.h" >&5
23637 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
23638
23639 includesubdir=
23640 if test "$with_overwrite" = no && \
23641  ( test "x$includedir" = 'x${prefix}/include' || \
23642    test "x$includedir" = "x${prefix}/include" )
23643 then
23644         includesubdir="/ncurses${USE_LIB_SUFFIX}"
23645 fi
23646 echo "$as_me:23646: result: ${includedir}${includesubdir}" >&5
23647 echo "${ECHO_T}${includedir}${includesubdir}" >&6
23648
23649 ### Resolve a conflict between normal and wide-curses by forcing applications
23650 ### that will need libutf8 to add it to their configure script.
23651 if test "$with_overwrite" != no ; then
23652 if test "$NCURSES_LIBUTF8" = 1 ; then
23653         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
23654         { echo "$as_me:23654: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
23655 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
23656 fi
23657 fi
23658 WITH_OVERWRITE=$with_overwrite
23659
23660 # used to separate tack out of the tree
23661 NCURSES_TREE=
23662
23663 ### predefined stuff for the test programs
23664
23665 cat >>confdefs.h <<\EOF
23666 #define HAVE_SLK_COLOR 1
23667 EOF
23668
23669 ### Construct the list of subdirectories for which we'll customize makefiles
23670 ### with the appropriate compile-rules.
23671
23672 echo "$as_me:23672: checking for src modules" >&5
23673 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
23674
23675 # dependencies and linker-arguments for test-programs
23676 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
23677 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
23678 if test "$DFT_LWR_MODEL" = "libtool"; then
23679         TEST_ARGS="${TEST_DEPS}"
23680         TEST_ARG2="${TEST_DEP2}"
23681 else
23682         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23683         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
23684 fi
23685
23686 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
23687 cf_cv_src_modules=
23688 for cf_dir in $modules_to_build
23689 do
23690         if test -f $srcdir/$cf_dir/modules; then
23691
23692                 # We may/may not have tack in the distribution, though the
23693                 # makefile is.
23694                 if test $cf_dir = tack ; then
23695                         if test "x$cf_with_tack" != "xyes"; then
23696                                 continue
23697                         fi
23698                 fi
23699
23700                 if test -z "$cf_cv_src_modules"; then
23701                         cf_cv_src_modules=$cf_dir
23702                 else
23703                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23704                 fi
23705
23706                 # Make the ncurses_cfg.h file record the library interface files as
23707                 # well.  These are header files that are the same name as their
23708                 # directory.  Ncurses is the only library that does not follow
23709                 # that pattern.
23710                 if test $cf_dir = tack ; then
23711                         continue
23712                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23713
23714 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23715
23716                         cat >>confdefs.h <<EOF
23717 #define HAVE_${cf_have_include}_H 1
23718 EOF
23719
23720                         cat >>confdefs.h <<EOF
23721 #define HAVE_LIB${cf_have_include} 1
23722 EOF
23723
23724                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23725                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23726                         if test "$DFT_LWR_MODEL" = "libtool"; then
23727                                 TEST_ARGS="${TEST_DEPS}"
23728                                 TEST_ARG2="${TEST_DEP2}"
23729                         else
23730                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23731                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23732                         fi
23733                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23734                 fi
23735         fi
23736 done
23737 echo "$as_me:23737: result: $cf_cv_src_modules" >&5
23738 echo "${ECHO_T}$cf_cv_src_modules" >&6
23739
23740 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23741 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23742
23743 SRC_SUBDIRS=
23744 if test "x$cf_with_manpages" != xno ; then
23745         SRC_SUBDIRS="$SRC_SUBDIRS man"
23746 fi
23747 SRC_SUBDIRS="$SRC_SUBDIRS include"
23748 for cf_dir in $cf_cv_src_modules
23749 do
23750         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23751 done
23752 if test "x$cf_with_tests" != "xno" ; then
23753         SRC_SUBDIRS="$SRC_SUBDIRS test"
23754 fi
23755 # always make this, to install the ncurses-config script
23756 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23757 if test "$cf_with_cxx_binding" != no; then
23758         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23759         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23760 fi
23761
23762 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23763 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23764
23765 ADA_SUBDIRS=
23766 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23767         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23768         ADA_SUBDIRS="gen src"
23769         if test "x$cf_with_tests" != "xno" ; then
23770                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23771         fi
23772 fi
23773
23774 SUB_MAKEFILES=
23775 for cf_dir in $SRC_SUBDIRS
23776 do
23777         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23778 done
23779
23780 if test -n "$ADA_SUBDIRS"; then
23781         for cf_dir in $ADA_SUBDIRS
23782         do
23783                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23784         done
23785
23786 fi
23787
23788 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23789    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23790    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23791 fi
23792
23793 DIRS_TO_MAKE="lib"
23794 for cf_item in $cf_list_models
23795 do
23796
23797         case $cf_item in
23798         (libtool) cf_subdir='obj_lo'  ;;
23799         (normal)  cf_subdir='objects' ;;
23800         (debug)   cf_subdir='obj_g' ;;
23801         (profile) cf_subdir='obj_p' ;;
23802         (shared)
23803                 case $cf_cv_system_name in
23804                 (cygwin|msys)
23805                         cf_subdir='objects' ;;
23806                 (*)
23807                         cf_subdir='obj_s' ;;
23808                 esac
23809         esac
23810
23811         for cf_item2 in $DIRS_TO_MAKE
23812         do
23813                 test $cf_item2 = $cf_subdir && break
23814         done
23815         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23816 done
23817 for cf_dir in $DIRS_TO_MAKE
23818 do
23819         test ! -d $cf_dir && mkdir $cf_dir
23820 done
23821
23822 # symbols that differ when compiling Ada95 by itself.
23823 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23824
23825 # values to use as strings
23826
23827 cat >>confdefs.h <<EOF
23828 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23829 EOF
23830
23831 cat >>confdefs.h <<EOF
23832 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23833 EOF
23834
23835 ### Now that we're done running tests, add the compiler-warnings, if any
23836
23837 cf_fix_cppflags=no
23838 cf_new_cflags=
23839 cf_new_cppflags=
23840 cf_new_extra_cppflags=
23841
23842 for cf_add_cflags in $EXTRA_CFLAGS
23843 do
23844 case $cf_fix_cppflags in
23845 (no)
23846         case $cf_add_cflags in
23847         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23848                 case $cf_add_cflags in
23849                 (-D*)
23850                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23851
23852                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23853                                 && test -z "${cf_tst_cflags}" \
23854                                 && cf_fix_cppflags=yes
23855
23856                         if test $cf_fix_cppflags = yes ; then
23857
23858         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23859         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23860
23861                                 continue
23862                         elif test "${cf_tst_cflags}" = "\"'" ; then
23863
23864         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23865         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23866
23867                                 continue
23868                         fi
23869                         ;;
23870                 esac
23871                 case "$CPPFLAGS" in
23872                 (*$cf_add_cflags)
23873                         ;;
23874                 (*)
23875                         case $cf_add_cflags in
23876                         (-D*)
23877                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23878
23879 CPPFLAGS=`echo "$CPPFLAGS" | \
23880         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23881                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23882
23883                                 ;;
23884                         esac
23885
23886         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23887         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23888
23889                         ;;
23890                 esac
23891                 ;;
23892         (*)
23893
23894         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23895         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23896
23897                 ;;
23898         esac
23899         ;;
23900 (yes)
23901
23902         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23903         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23904
23905         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23906
23907         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23908                 && test -z "${cf_tst_cflags}" \
23909                 && cf_fix_cppflags=no
23910         ;;
23911 esac
23912 done
23913
23914 if test -n "$cf_new_cflags" ; then
23915
23916         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23917         CFLAGS="${CFLAGS}$cf_new_cflags"
23918
23919 fi
23920
23921 if test -n "$cf_new_cppflags" ; then
23922
23923         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23924         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23925
23926 fi
23927
23928 if test -n "$cf_new_extra_cppflags" ; then
23929
23930         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23931         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23932
23933 fi
23934
23935 ### Define substitutions for header files to avoid name-pollution
23936
23937 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23938         HAVE_TCGETATTR=1
23939 else
23940         HAVE_TCGETATTR=0
23941 fi
23942
23943 if test "x$ac_cv_header_stdint_h" = xyes ; then
23944         HAVE_STDINT_H=1
23945 else
23946         HAVE_STDINT_H=0
23947 fi
23948
23949 if test "x$ac_cv_header_termio_h" = xyes ; then
23950         HAVE_TERMIO_H=1
23951 else
23952         HAVE_TERMIO_H=0
23953 fi
23954
23955 if test "x$ac_cv_header_termios_h" = xyes ; then
23956         HAVE_TERMIOS_H=1
23957 else
23958         HAVE_TERMIOS_H=0
23959 fi
23960
23961 ################################################################################
23962 test "x$use_database" = xyes && \
23963 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23964
23965 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23966 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23967
23968 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23969 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23970 fi
23971
23972 # Extract the first word of "tic", so it can be a program name with args.
23973 set dummy tic; ac_word=$2
23974 echo "$as_me:23974: checking for $ac_word" >&5
23975 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23976 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23977   echo $ECHO_N "(cached) $ECHO_C" >&6
23978 else
23979   case $TIC_PATH in
23980   [\\/]* | ?:[\\/]*)
23981   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23982   ;;
23983   *)
23984   ac_save_IFS=$IFS; IFS=$ac_path_separator
23985 ac_dummy="$PATH:/usr/local/ncurses/bin"
23986 for ac_dir in $ac_dummy; do
23987   IFS=$ac_save_IFS
23988   test -z "$ac_dir" && ac_dir=.
23989   if $as_executable_p "$ac_dir/$ac_word"; then
23990    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23991    echo "$as_me:23991: found $ac_dir/$ac_word" >&5
23992    break
23993 fi
23994 done
23995
23996   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23997   ;;
23998 esac
23999 fi
24000 TIC_PATH=$ac_cv_path_TIC_PATH
24001
24002 if test -n "$TIC_PATH"; then
24003   echo "$as_me:24003: result: $TIC_PATH" >&5
24004 echo "${ECHO_T}$TIC_PATH" >&6
24005 else
24006   echo "$as_me:24006: result: no" >&5
24007 echo "${ECHO_T}no" >&6
24008 fi
24009
24010 if test -n "$FALLBACK_LIST"
24011 then
24012         if test "$TIC_PATH" = unknown
24013         then
24014                 { echo "$as_me:24014: WARNING: no tic program found for fallbacks" >&5
24015 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24016         fi
24017 fi
24018
24019 if test "x$cf_with_tests" != xno ; then
24020         MAKE_TESTS=
24021 else
24022         MAKE_TESTS="#"
24023 fi
24024
24025 ADAHTML_DIR=../../doc/html/ada
24026
24027 # these could be configurable, but are not currently
24028 PANEL_NAME=panel
24029 MENU_NAME=menu
24030 FORM_NAME=form
24031 CXX_NAME=ncurses++
24032
24033 # workaround for OS/2 (20151017)
24034 case $cf_cv_system_name in
24035 (os2*)
24036         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24037         ;;
24038 (*)
24039         LIBTOOL_OPTS_CXX=
24040         ;;
24041 esac
24042
24043 # workaround for g++ versus Solaris (20131116)
24044 case $cf_cv_system_name in
24045 (solaris2*)
24046         case "x$CPPFLAGS" in
24047         (*-D_XOPEN_SOURCE_EXTENDED*)
24048                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24049
24050 echo "${as_me:-configure}:24050: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24051
24052                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24053                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24054                 ;;
24055         esac
24056         ;;
24057 esac
24058
24059 # Help to automatically enable the extended curses features when using either
24060 # the *-config or the ".pc" files by adding defines.
24061 echo "$as_me:24061: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24062 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24063 PKG_CFLAGS=
24064 for cf_loop1 in $CPPFLAGS_after_XOPEN
24065 do
24066         cf_found=no
24067         for cf_loop2 in $CPPFLAGS_before_XOPEN
24068         do
24069                 if test "x$cf_loop1" = "x$cf_loop2"
24070                 then
24071                         cf_found=yes
24072                         break
24073                 fi
24074         done
24075         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24076 done
24077 echo "$as_me:24077: result: $PKG_CFLAGS" >&5
24078 echo "${ECHO_T}$PKG_CFLAGS" >&6
24079
24080 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24081 case "x$NCURSES_OSPEED" in
24082 (*short*)
24083         cf_compatible=1
24084         ;;
24085 (*)
24086         cf_compatible=0
24087         ;;
24088 esac
24089
24090 cat >>confdefs.h <<EOF
24091 #define NCURSES_OSPEED_COMPAT $cf_compatible
24092 EOF
24093
24094 case "x$cf_cv_typeof_chtype" in
24095 (xshort|xint|xlong)
24096         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
24097         ;;
24098 esac
24099
24100 case "x$cf_cv_typeof_mmask_t" in
24101 (xshort|xint|xlong)
24102         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
24103         ;;
24104 esac
24105
24106 # substitute into misc/Makefile to suppress
24107 # (un)install.data from the
24108 # (un)install rules.
24109 if test "x$cf_with_db_install" = "xno"; then
24110         MISC_INSTALL_DATA=
24111         MISC_UNINSTALL_DATA=
24112 else
24113         MISC_INSTALL_DATA=install.data
24114         MISC_UNINSTALL_DATA=uninstall.data
24115 fi
24116
24117 SUB_SCRIPTS=
24118
24119 if test -n "$PACKAGE"
24120 then
24121         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
24122         export PACKAGE
24123         echo "package: $PACKAGE"
24124 fi
24125
24126 UNALTERED_SYMS=
24127 cf_filter_syms=no
24128
24129 if test -n "$RESULTING_SYMS"
24130 then
24131         cf_filter_syms=$cf_dft_filter_syms
24132         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
24133
24134 echo "${as_me:-configure}:24134: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
24135
24136 fi
24137
24138 if test "x$WILDCARD_SYMS" = xno
24139 then
24140         cf_filter_syms=yes
24141 fi
24142
24143 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
24144
24145 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
24146 if test $cf_filter_syms = yes
24147 then
24148         RESULTING_SYMS=resulting.map
24149 fi
24150
24151 if test "x$cross_compiling" = xyes ; then
24152         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
24153         CHECK_BUILD="#"
24154 else
24155         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
24156         CHECK_BUILD=
24157 fi
24158
24159 cat >>confdefs.h <<\EOF
24160 #define HAVE_CURSES_DATA_BOOLNAMES 1
24161 EOF
24162
24163 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"
24164 ac_config_commands="$ac_config_commands default"
24165 cat >confcache <<\_ACEOF
24166 # This file is a shell script that caches the results of configure
24167 # tests run on this system so they can be shared between configure
24168 # scripts and configure runs, see configure's option --config-cache.
24169 # It is not useful on other systems.  If it contains results you don't
24170 # want to keep, you may remove or edit it.
24171 #
24172 # config.status only pays attention to the cache file if you give it
24173 # the --recheck option to rerun configure.
24174 #
24175 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24176 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24177 # following values.
24178
24179 _ACEOF
24180
24181 # The following way of writing the cache mishandles newlines in values,
24182 # but we know of no workaround that is simple, portable, and efficient.
24183 # So, don't put newlines in cache variables' values.
24184 # Ultrix sh set writes to stderr and can't be redirected directly,
24185 # and sets the high bit in the cache file unless we assign to the vars.
24186 {
24187   (set) 2>&1 |
24188     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24189     *ac_space=\ *)
24190       # `set' does not quote correctly, so add quotes (double-quote
24191       # substitution turns \\\\ into \\, and sed turns \\ into \).
24192       sed -n \
24193         "s/'/'\\\\''/g;
24194           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24195       ;;
24196     *)
24197       # `set' quotes correctly as required by POSIX, so do not add quotes.
24198       sed -n \
24199         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24200       ;;
24201     esac;
24202 } |
24203   sed '
24204      t clear
24205      : clear
24206      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24207      t end
24208      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24209      : end' >>confcache
24210 if cmp -s $cache_file confcache; then :; else
24211   if test -w $cache_file; then
24212     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24213     cat confcache >$cache_file
24214   else
24215     echo "not updating unwritable cache $cache_file"
24216   fi
24217 fi
24218 rm -f confcache
24219
24220 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24221 # Let make expand exec_prefix.
24222 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24223
24224 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24225 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24226 # trailing colons and then remove the whole line if VPATH becomes empty
24227 # (actually we leave an empty line to preserve line numbers).
24228 if test "x$srcdir" = x.; then
24229   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24230 s/:*\$(srcdir):*/:/;
24231 s/:*\${srcdir}:*/:/;
24232 s/:*@srcdir@:*/:/;
24233 s/^\([^=]*=[    ]*\):*/\1/;
24234 s/:*$//;
24235 s/^[^=]*=[      ]*$//;
24236 }'
24237 fi
24238
24239 DEFS=-DHAVE_CONFIG_H
24240
24241 : ${CONFIG_STATUS=./config.status}
24242 ac_clean_files_save=$ac_clean_files
24243 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24244 { echo "$as_me:24244: creating $CONFIG_STATUS" >&5
24245 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24246 cat >$CONFIG_STATUS <<_ACEOF
24247 #! $SHELL
24248 # Generated automatically by configure.
24249 # Run this file to recreate the current configuration.
24250 # Compiler output produced by configure, useful for debugging
24251 # configure, is in config.log if it exists.
24252
24253 debug=false
24254 SHELL=\${CONFIG_SHELL-$SHELL}
24255 ac_cs_invocation="\$0 \$@"
24256
24257 _ACEOF
24258
24259 cat >>$CONFIG_STATUS <<\_ACEOF
24260 # Be Bourne compatible
24261 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24262   emulate sh
24263   NULLCMD=:
24264 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24265   set -o posix
24266 fi
24267
24268 # Name of the executable.
24269 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24270
24271 if expr a : '\(a\)' >/dev/null 2>&1; then
24272   as_expr=expr
24273 else
24274   as_expr=false
24275 fi
24276
24277 rm -f conf$$ conf$$.exe conf$$.file
24278 echo >conf$$.file
24279 if ln -s conf$$.file conf$$ 2>/dev/null; then
24280   # We could just check for DJGPP; but this test a) works b) is more generic
24281   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24282   if test -f conf$$.exe; then
24283     # Don't use ln at all; we don't have any links
24284     as_ln_s='cp -p'
24285   else
24286     as_ln_s='ln -s'
24287   fi
24288 elif ln conf$$.file conf$$ 2>/dev/null; then
24289   as_ln_s=ln
24290 else
24291   as_ln_s='cp -p'
24292 fi
24293 rm -f conf$$ conf$$.exe conf$$.file
24294
24295 as_executable_p="test -f"
24296
24297 # Support unset when possible.
24298 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24299   as_unset=unset
24300 else
24301   as_unset=false
24302 fi
24303
24304 # NLS nuisances.
24305 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24306 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24307 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24308 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24309 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24310 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24311 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24312 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24313
24314 # IFS
24315 # We need space, tab and new line, in precisely that order.
24316 as_nl='
24317 '
24318 IFS="   $as_nl"
24319
24320 # CDPATH.
24321 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24322
24323 exec 6>&1
24324
24325 _ACEOF
24326
24327 # Files that config.status was made for.
24328 if test -n "$ac_config_files"; then
24329   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24330 fi
24331
24332 if test -n "$ac_config_headers"; then
24333   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
24334 fi
24335
24336 if test -n "$ac_config_links"; then
24337   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
24338 fi
24339
24340 if test -n "$ac_config_commands"; then
24341   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
24342 fi
24343
24344 cat >>$CONFIG_STATUS <<\EOF
24345
24346 ac_cs_usage="\
24347 \`$as_me' instantiates files from templates according to the
24348 current configuration.
24349
24350 Usage: $0 [OPTIONS] [FILE]...
24351
24352   -h, --help       print this help, then exit
24353   -V, --version    print version number, then exit
24354   -d, --debug      don't remove temporary files
24355       --recheck    update $as_me by reconfiguring in the same conditions
24356   --file=FILE[:TEMPLATE]
24357                    instantiate the configuration file FILE
24358   --header=FILE[:TEMPLATE]
24359                    instantiate the configuration header FILE
24360
24361 Configuration files:
24362 $config_files
24363
24364 Configuration headers:
24365 $config_headers
24366
24367 Configuration commands:
24368 $config_commands
24369
24370 Report bugs to <dickey@invisible-island.net>."
24371 EOF
24372
24373 cat >>$CONFIG_STATUS <<EOF
24374 ac_cs_version="\\
24375 config.status
24376 configured by $0, generated by GNU Autoconf 2.52.20170501,
24377   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24378
24379 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24380 Free Software Foundation, Inc.
24381 This config.status script is free software; the Free Software Foundation
24382 gives unlimited permission to copy, distribute and modify it."
24383 srcdir=$srcdir
24384 INSTALL="$INSTALL"
24385 EOF
24386
24387 cat >>$CONFIG_STATUS <<\EOF
24388 # If no file are specified by the user, then we need to provide default
24389 # value.  By we need to know if files were specified by the user.
24390 ac_need_defaults=:
24391 while test $# != 0
24392 do
24393   case $1 in
24394   --*=*)
24395     ac_option=`expr "x$1" : 'x\([^=]*\)='`
24396     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24397     shift
24398     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24399     shift
24400     ;;
24401   -*);;
24402   *) # This is not an option, so the user has probably given explicit
24403      # arguments.
24404      ac_need_defaults=false;;
24405   esac
24406
24407   case $1 in
24408   # Handling of the options.
24409 EOF
24410 cat >>$CONFIG_STATUS <<EOF
24411   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24412     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24413     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24414 EOF
24415 cat >>$CONFIG_STATUS <<\EOF
24416   --version | --vers* | -V )
24417     echo "$ac_cs_version"; exit 0 ;;
24418   --he | --h)
24419     # Conflict between --help and --header
24420     { { echo "$as_me:24420: error: ambiguous option: $1
24421 Try \`$0 --help' for more information." >&5
24422 echo "$as_me: error: ambiguous option: $1
24423 Try \`$0 --help' for more information." >&2;}
24424    { (exit 1); exit 1; }; };;
24425   --help | --hel | -h )
24426     echo "$ac_cs_usage"; exit 0 ;;
24427   --debug | --d* | -d )
24428     debug=: ;;
24429   --file | --fil | --fi | --f )
24430     shift
24431     CONFIG_FILES="$CONFIG_FILES $1"
24432     ac_need_defaults=false;;
24433   --header | --heade | --head | --hea )
24434     shift
24435     CONFIG_HEADERS="$CONFIG_HEADERS $1"
24436     ac_need_defaults=false;;
24437
24438   # This is an error.
24439   -*) { { echo "$as_me:24439: error: unrecognized option: $1
24440 Try \`$0 --help' for more information." >&5
24441 echo "$as_me: error: unrecognized option: $1
24442 Try \`$0 --help' for more information." >&2;}
24443    { (exit 1); exit 1; }; } ;;
24444
24445   *) ac_config_targets="$ac_config_targets $1" ;;
24446
24447   esac
24448   shift
24449 done
24450
24451 exec 5>>config.log
24452 cat >&5 << _ACEOF
24453
24454 ## ----------------------- ##
24455 ## Running config.status.  ##
24456 ## ----------------------- ##
24457
24458 This file was extended by $as_me 2.52.20170501, executed with
24459   CONFIG_FILES    = $CONFIG_FILES
24460   CONFIG_HEADERS  = $CONFIG_HEADERS
24461   CONFIG_LINKS    = $CONFIG_LINKS
24462   CONFIG_COMMANDS = $CONFIG_COMMANDS
24463   > $ac_cs_invocation
24464 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24465
24466 _ACEOF
24467 EOF
24468
24469 cat >>$CONFIG_STATUS <<EOF
24470 #
24471 # INIT-COMMANDS section.
24472 #
24473
24474 ### Special initialization commands, used to pass information from the
24475 ### configuration-run into config.status
24476
24477 AWK="$AWK"
24478 ALTERNATE_SYMS="$ALTERNATE_SYMS"
24479 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
24480 DFT_LWR_MODEL="$DFT_LWR_MODEL"
24481 ECHO_LD="$ECHO_LD"
24482 EXTRA_SUFFIX="$EXTRA_SUFFIX"
24483 LDCONFIG="$LDCONFIG"
24484 LIBTOOL_VERSION="$LIBTOOL_VERSION"
24485 LIB_NAME="$LIB_NAME"
24486 LIB_PREFIX="$LIB_PREFIX"
24487 LIB_SUBSETS="$LIB_SUBSETS"
24488 LIB_SUFFIX="$LIB_SUFFIX"
24489 LIB_TRACING="$LIB_TRACING"
24490 LN_S="$LN_S"
24491 MAKE_TERMINFO="$MAKE_TERMINFO"
24492 NCURSES_MAJOR="$NCURSES_MAJOR"
24493 NCURSES_MINOR="$NCURSES_MINOR"
24494 NCURSES_OSPEED="$NCURSES_OSPEED"
24495 NCURSES_PATCH="$NCURSES_PATCH"
24496 SRC_SUBDIRS="$SRC_SUBDIRS"
24497 TERMINFO="$TERMINFO"
24498 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
24499 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
24500 TICS_NAME="$TICS_NAME"
24501 TICS_SUFFIX="$TICS_SUFFIX"
24502 TIC_PATH="$TIC_PATH"
24503 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
24504 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
24505 TINFO_NAME="$TINFO_NAME"
24506 TINFO_SUFFIX="$TINFO_SUFFIX"
24507 UNALTERED_SYMS="$UNALTERED_SYMS"
24508 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
24509 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
24510 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
24511 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
24512 WILDCARD_SYMS="$WILDCARD_SYMS"
24513 WITH_CURSES_H="$with_curses_h"
24514 WITH_ECHO="${enable_echo:=yes}"
24515 WITH_OVERWRITE="$with_overwrite"
24516 cf_LIST_MODELS="$cf_list_models"
24517 cf_cv_abi_version="$cf_cv_abi_version"
24518 cf_cv_do_relink="$cf_cv_do_relink"
24519 cf_cv_do_symlinks="$cf_cv_do_symlinks"
24520 cf_cv_enable_lp64="$cf_cv_enable_lp64"
24521 cf_cv_enable_opaque="$cf_cv_enable_opaque"
24522 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
24523 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
24524 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
24525 cf_cv_rel_version="$cf_cv_rel_version"
24526 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
24527 cf_cv_shared_soname='$cf_cv_shared_soname'
24528 cf_cv_shlib_version="$cf_cv_shlib_version"
24529 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
24530 cf_cv_system_name="$cf_cv_system_name"
24531 cf_cv_term_driver="$with_term_driver"
24532 cf_with_ada="$cf_with_ada"
24533 cf_with_cxx_binding="$cf_with_cxx_binding"
24534 cf_with_db_install="$cf_with_db_install"
24535 cf_with_manpages="$cf_with_manpages"
24536 cf_with_tests="$cf_with_tests"
24537 host="$host"
24538 target="$target"
24539 with_shared_cxx="$with_shared_cxx"
24540
24541 EOF
24542
24543 cat >>$CONFIG_STATUS <<\EOF
24544 for ac_config_target in $ac_config_targets
24545 do
24546   case "$ac_config_target" in
24547   # Handling of arguments.
24548   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
24549   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
24550   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
24551   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
24552   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
24553   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
24554   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
24555   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24556   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24557   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
24558   *) { { echo "$as_me:24558: error: invalid argument: $ac_config_target" >&5
24559 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24560    { (exit 1); exit 1; }; };;
24561   esac
24562 done
24563
24564 # If the user did not use the arguments to specify the items to instantiate,
24565 # then the envvar interface is used.  Set only those that are not.
24566 # We use the long form for the default assignment because of an extremely
24567 # bizarre bug on SunOS 4.1.3.
24568 if $ac_need_defaults; then
24569   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24570   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24571   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24572 fi
24573
24574 # Create a temporary directory, and hook for its removal unless debugging.
24575 $debug ||
24576 {
24577   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24578   trap '{ (exit 1); exit 1; }' 1 2 13 15
24579 }
24580
24581 # Create a (secure) tmp directory for tmp files.
24582 : ${TMPDIR=/tmp}
24583 {
24584   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24585   test -n "$tmp" && test -d "$tmp"
24586 }  ||
24587 {
24588   tmp=$TMPDIR/cs$$-$RANDOM
24589   (umask 077 && mkdir $tmp)
24590 } ||
24591 {
24592    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24593    { (exit 1); exit 1; }
24594 }
24595
24596 EOF
24597
24598 cat >>$CONFIG_STATUS <<EOF
24599
24600 #
24601 # CONFIG_FILES section.
24602 #
24603
24604 # No need to generate the scripts if there are no CONFIG_FILES.
24605 # This happens for instance when ./config.status config.h
24606 if test -n "\$CONFIG_FILES"; then
24607   # Protect against being on the right side of a sed subst in config.status.
24608   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24609    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24610 s,@SHELL@,$SHELL,;t t
24611 s,@exec_prefix@,$exec_prefix,;t t
24612 s,@prefix@,$prefix,;t t
24613 s,@program_transform_name@,$program_transform_name,;t t
24614 s,@bindir@,$bindir,;t t
24615 s,@sbindir@,$sbindir,;t t
24616 s,@libexecdir@,$libexecdir,;t t
24617 s,@datarootdir@,$datarootdir,;t t
24618 s,@datadir@,$datadir,;t t
24619 s,@sysconfdir@,$sysconfdir,;t t
24620 s,@sharedstatedir@,$sharedstatedir,;t t
24621 s,@localstatedir@,$localstatedir,;t t
24622 s,@libdir@,$libdir,;t t
24623 s,@includedir@,$includedir,;t t
24624 s,@oldincludedir@,$oldincludedir,;t t
24625 s,@infodir@,$infodir,;t t
24626 s,@mandir@,$mandir,;t t
24627 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24628 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24629 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24630 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24631 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24632 s,@build_alias@,$build_alias,;t t
24633 s,@host_alias@,$host_alias,;t t
24634 s,@target_alias@,$target_alias,;t t
24635 s,@ECHO_C@,$ECHO_C,;t t
24636 s,@ECHO_N@,$ECHO_N,;t t
24637 s,@ECHO_T@,$ECHO_T,;t t
24638 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24639 s,@DEFS@,$DEFS,;t t
24640 s,@LIBS@,$LIBS,;t t
24641 s,@top_builddir@,$top_builddir,;t t
24642 s,@EGREP@,$EGREP,;t t
24643 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
24644 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
24645 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
24646 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24647 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24648 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
24649 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
24650 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
24651 s,@VERSION@,$VERSION,;t t
24652 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
24653 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
24654 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
24655 s,@PACKAGE@,$PACKAGE,;t t
24656 s,@build@,$build,;t t
24657 s,@build_cpu@,$build_cpu,;t t
24658 s,@build_vendor@,$build_vendor,;t t
24659 s,@build_os@,$build_os,;t t
24660 s,@host@,$host,;t t
24661 s,@host_cpu@,$host_cpu,;t t
24662 s,@host_vendor@,$host_vendor,;t t
24663 s,@host_os@,$host_os,;t t
24664 s,@target@,$target,;t t
24665 s,@target_cpu@,$target_cpu,;t t
24666 s,@target_vendor@,$target_vendor,;t t
24667 s,@target_os@,$target_os,;t t
24668 s,@CC@,$CC,;t t
24669 s,@CFLAGS@,$CFLAGS,;t t
24670 s,@LDFLAGS@,$LDFLAGS,;t t
24671 s,@CPPFLAGS@,$CPPFLAGS,;t t
24672 s,@ac_ct_CC@,$ac_ct_CC,;t t
24673 s,@EXEEXT@,$EXEEXT,;t t
24674 s,@OBJEXT@,$OBJEXT,;t t
24675 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24676 s,@CPP@,$CPP,;t t
24677 s,@LDCONFIG@,$LDCONFIG,;t t
24678 s,@CXX@,$CXX,;t t
24679 s,@CXXFLAGS@,$CXXFLAGS,;t t
24680 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
24681 s,@AWK@,$AWK,;t t
24682 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24683 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24684 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24685 s,@LINT@,$LINT,;t t
24686 s,@LINT_OPTS@,$LINT_OPTS,;t t
24687 s,@LN_S@,$LN_S,;t t
24688 s,@cf_config_suffix@,$cf_config_suffix,;t t
24689 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24690 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24691 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24692 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24693 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24694 s,@SET_MAKE@,$SET_MAKE,;t t
24695 s,@CTAGS@,$CTAGS,;t t
24696 s,@ETAGS@,$ETAGS,;t t
24697 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24698 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24699 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24700 s,@RANLIB@,$RANLIB,;t t
24701 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24702 s,@LD@,$LD,;t t
24703 s,@ac_ct_LD@,$ac_ct_LD,;t t
24704 s,@AR@,$AR,;t t
24705 s,@ac_ct_AR@,$ac_ct_AR,;t t
24706 s,@NM@,$NM,;t t
24707 s,@ac_ct_NM@,$ac_ct_NM,;t t
24708 s,@ARFLAGS@,$ARFLAGS,;t t
24709 s,@DESTDIR@,$DESTDIR,;t t
24710 s,@BUILD_CC@,$BUILD_CC,;t t
24711 s,@BUILD_CPP@,$BUILD_CPP,;t t
24712 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24713 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24714 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24715 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24716 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24717 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24718 s,@cf_list_models@,$cf_list_models,;t t
24719 s,@ABI_VERSION@,$ABI_VERSION,;t t
24720 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24721 s,@LIBTOOL@,$LIBTOOL,;t t
24722 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24723 s,@LT_UNDEF@,$LT_UNDEF,;t t
24724 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24725 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24726 s,@LIB_CREATE@,$LIB_CREATE,;t t
24727 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24728 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24729 s,@LIB_PREP@,$LIB_PREP,;t t
24730 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24731 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24732 s,@LIB_LINK@,$LIB_LINK,;t t
24733 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24734 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24735 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24736 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24737 s,@TICS_NAME@,$TICS_NAME,;t t
24738 s,@TINFO_NAME@,$TINFO_NAME,;t t
24739 s,@LIB_NAME@,$LIB_NAME,;t t
24740 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24741 s,@CC_G_OPT@,$CC_G_OPT,;t t
24742 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24743 s,@LD_MODEL@,$LD_MODEL,;t t
24744 s,@shlibdir@,$shlibdir,;t t
24745 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24746 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24747 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24748 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24749 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24750 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24751 s,@LINK_PROGS@,$LINK_PROGS,;t t
24752 s,@LINK_TESTS@,$LINK_TESTS,;t t
24753 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24754 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24755 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24756 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24757 s,@RPATH_LIST@,$RPATH_LIST,;t t
24758 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24759 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24760 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24761 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24762 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24763 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24764 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24765 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24766 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24767 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24768 s,@XTERM_KBS@,$XTERM_KBS,;t t
24769 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24770 s,@TERMINFO@,$TERMINFO,;t t
24771 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24772 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24773 s,@TERMPATH@,$TERMPATH,;t t
24774 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24775 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24776 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24777 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24778 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24779 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24780 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24781 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24782 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24783 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24784 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24785 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24786 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24787 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24788 s,@RGB_PATH@,$RGB_PATH,;t t
24789 s,@no_x11_rgb@,$no_x11_rgb,;t t
24790 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24791 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24792 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24793 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24794 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24795 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24796 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24797 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24798 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24799 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24800 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24801 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24802 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24803 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24804 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24805 s,@PTHREAD@,$PTHREAD,;t t
24806 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24807 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24808 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24809 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24810 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24811 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24812 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24813 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24814 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24815 s,@ECHO_LT@,$ECHO_LT,;t t
24816 s,@ECHO_LD@,$ECHO_LD,;t t
24817 s,@RULE_CC@,$RULE_CC,;t t
24818 s,@SHOW_CC@,$SHOW_CC,;t t
24819 s,@ECHO_CC@,$ECHO_CC,;t t
24820 s,@ECHO_LINK@,$ECHO_LINK,;t t
24821 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
24822 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
24823 s,@ADAFLAGS@,$ADAFLAGS,;t t
24824 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24825 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24826 s,@ADA_TRACE@,$ADA_TRACE,;t t
24827 s,@MATH_LIB@,$MATH_LIB,;t t
24828 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24829 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24830 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24831 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24832 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24833 s,@TEST_LIBS@,$TEST_LIBS,;t t
24834 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24835 s,@CXXCPP@,$CXXCPP,;t t
24836 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24837 s,@CXX_AR@,$CXX_AR,;t t
24838 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24839 s,@CXXLIBS@,$CXXLIBS,;t t
24840 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24841 s,@gnatmake_exists@,$gnatmake_exists,;t t
24842 s,@gprconfig_exists@,$gprconfig_exists,;t t
24843 s,@M4_exists@,$M4_exists,;t t
24844 s,@cf_ada_make@,$cf_ada_make,;t t
24845 s,@cf_ada_config@,$cf_ada_config,;t t
24846 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
24847 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
24848 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24849 s,@cf_compile_generics@,$cf_compile_generics,;t t
24850 s,@cf_generic_objects@,$cf_generic_objects,;t t
24851 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24852 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24853 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24854 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24855 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24856 s,@cf_ada_package@,$cf_ada_package,;t t
24857 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24858 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24859 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24860 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24861 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24862 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24863 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24864 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24865 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24866 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24867 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24868 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24869 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24870 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24871 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24872 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24873 s,@TICS_LIBS@,$TICS_LIBS,;t t
24874 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24875 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24876 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24877 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24878 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24879 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24880 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24881 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24882 s,@includesubdir@,$includesubdir,;t t
24883 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24884 s,@TICS_LIST@,$TICS_LIST,;t t
24885 s,@TINFO_LIST@,$TINFO_LIST,;t t
24886 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24887 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24888 s,@TEST_ARGS@,$TEST_ARGS,;t t
24889 s,@TEST_DEPS@,$TEST_DEPS,;t t
24890 s,@TEST_ARG2@,$TEST_ARG2,;t t
24891 s,@TEST_DEP2@,$TEST_DEP2,;t t
24892 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24893 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24894 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24895 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24896 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24897 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24898 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24899 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24900 s,@cross_compiling@,$cross_compiling,;t t
24901 s,@TIC_PATH@,$TIC_PATH,;t t
24902 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24903 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24904 s,@PANEL_NAME@,$PANEL_NAME,;t t
24905 s,@MENU_NAME@,$MENU_NAME,;t t
24906 s,@FORM_NAME@,$FORM_NAME,;t t
24907 s,@CXX_NAME@,$CXX_NAME,;t t
24908 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24909 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24910 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24911 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24912 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24913 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24914 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24915 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
24916 CEOF
24917
24918 EOF
24919
24920   cat >>$CONFIG_STATUS <<\EOF
24921   # Split the substitutions into bite-sized pieces for seds with
24922   # small command number limits, like on Digital OSF/1 and HP-UX.
24923   ac_max_sed_lines=48
24924   ac_sed_frag=1 # Number of current file.
24925   ac_beg=1 # First line for current file.
24926   ac_end=$ac_max_sed_lines # Line after last line for current file.
24927   ac_more_lines=:
24928   ac_sed_cmds=
24929   while $ac_more_lines; do
24930     if test $ac_beg -gt 1; then
24931       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24932     else
24933       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24934     fi
24935     if test ! -s $tmp/subs.frag; then
24936       ac_more_lines=false
24937     else
24938       # The purpose of the label and of the branching condition is to
24939       # speed up the sed processing (if there are no `@' at all, there
24940       # is no need to browse any of the substitutions).
24941       # These are the two extra sed commands mentioned above.
24942       (echo ':t
24943   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24944       # It is possible to make a multiline substitution using escaped newlines.
24945       # Ensure that we do not split the substitution between script fragments.
24946       ac_BEG=$ac_end
24947       ac_END=`expr $ac_end + $ac_max_sed_lines`
24948       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24949       if test -s $tmp/subs.next; then
24950         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24951         if test ! -s $tmp/subs.edit; then
24952           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24953           if test ! -s $tmp/subs.edit; then
24954             if test $ac_beg -gt 1; then
24955               ac_end=`expr $ac_end - 1`
24956               continue
24957             fi
24958           fi
24959         fi
24960       fi
24961
24962       if test -z "$ac_sed_cmds"; then
24963         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24964       else
24965         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24966       fi
24967       ac_sed_frag=`expr $ac_sed_frag + 1`
24968       ac_beg=$ac_end
24969       ac_end=`expr $ac_end + $ac_max_sed_lines`
24970     fi
24971   done
24972   if test -z "$ac_sed_cmds"; then
24973     ac_sed_cmds=cat
24974   fi
24975 fi # test -n "$CONFIG_FILES"
24976
24977 EOF
24978 cat >>$CONFIG_STATUS <<\EOF
24979 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24980   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24981   case $ac_file in
24982   - | *:- | *:-:* ) # input from stdin
24983         cat >$tmp/stdin
24984         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24985         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24986   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24987         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24988   * )   ac_file_in=$ac_file.in ;;
24989   esac
24990
24991   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24992   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24993          X"$ac_file" : 'X\(//\)[^/]' \| \
24994          X"$ac_file" : 'X\(//\)$' \| \
24995          X"$ac_file" : 'X\(/\)' \| \
24996          .     : '\(.\)' 2>/dev/null ||
24997 echo X"$ac_file" |
24998     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24999           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25000           /^X\(\/\/\)$/{ s//\1/; q; }
25001           /^X\(\/\).*/{ s//\1/; q; }
25002           s/.*/./; q'`
25003   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25004     { case "$ac_dir" in
25005   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25006   *)                      as_incr_dir=.;;
25007 esac
25008 as_dummy="$ac_dir"
25009 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25010   case $as_mkdir_dir in
25011     # Skip DOS drivespec
25012     ?:) as_incr_dir=$as_mkdir_dir ;;
25013     *)
25014       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25015       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25016     ;;
25017   esac
25018 done; }
25019
25020     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25021     # A "../" for each directory in $ac_dir_suffix.
25022     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25023   else
25024     ac_dir_suffix= ac_dots=
25025   fi
25026
25027   case $srcdir in
25028   .)  ac_srcdir=.
25029       if test -z "$ac_dots"; then
25030          ac_top_srcdir=.
25031       else
25032          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25033       fi ;;
25034   [\\/]* | ?:[\\/]* )
25035       ac_srcdir=$srcdir$ac_dir_suffix;
25036       ac_top_srcdir=$srcdir ;;
25037   *) # Relative path.
25038     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25039     ac_top_srcdir=$ac_dots$srcdir ;;
25040   esac
25041
25042   case $INSTALL in
25043   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25044   *) ac_INSTALL=$ac_dots$INSTALL ;;
25045   esac
25046
25047   if test x"$ac_file" != x-; then
25048     { echo "$as_me:25048: creating $ac_file" >&5
25049 echo "$as_me: creating $ac_file" >&6;}
25050     rm -f "$ac_file"
25051   fi
25052   # Let's still pretend it is `configure' which instantiates (i.e., don't
25053   # use $as_me), people would be surprised to read:
25054   #    /* config.h.  Generated automatically by config.status.  */
25055   configure_input="Generated automatically from `echo $ac_file_in |
25056                                                  sed 's,.*/,,'` by configure."
25057
25058   # First look for the input files in the build tree, otherwise in the
25059   # src tree.
25060   ac_file_inputs=`IFS=:
25061     for f in $ac_file_in; do
25062       case $f in
25063       -) echo $tmp/stdin ;;
25064       [\\/$]*)
25065          # Absolute (can't be DOS-style, as IFS=:)
25066          test -f "$f" || { { echo "$as_me:25066: error: cannot find input file: $f" >&5
25067 echo "$as_me: error: cannot find input file: $f" >&2;}
25068    { (exit 1); exit 1; }; }
25069          echo $f;;
25070       *) # Relative
25071          if test -f "$f"; then
25072            # Build tree
25073            echo $f
25074          elif test -f "$srcdir/$f"; then
25075            # Source tree
25076            echo $srcdir/$f
25077          else
25078            # /dev/null tree
25079            { { echo "$as_me:25079: error: cannot find input file: $f" >&5
25080 echo "$as_me: error: cannot find input file: $f" >&2;}
25081    { (exit 1); exit 1; }; }
25082          fi;;
25083       esac
25084     done` || { (exit 1); exit 1; }
25085 EOF
25086 cat >>$CONFIG_STATUS <<\EOF
25087   ac_warn_datarootdir=no
25088   if test x"$ac_file" != x-; then
25089     for ac_item in $ac_file_inputs
25090     do
25091       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25092       if test -n "$ac_seen"; then
25093         ac_used=`grep '@datarootdir@' $ac_item`
25094         if test -z "$ac_used"; then
25095           { echo "$as_me:25095: WARNING: datarootdir was used implicitly but not set:
25096 $ac_seen" >&5
25097 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25098 $ac_seen" >&2;}
25099           ac_warn_datarootdir=yes
25100         fi
25101       fi
25102       ac_seen=`grep '${datarootdir}' $ac_item`
25103       if test -n "$ac_seen"; then
25104         { echo "$as_me:25104: WARNING: datarootdir was used explicitly but not set:
25105 $ac_seen" >&5
25106 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25107 $ac_seen" >&2;}
25108         ac_warn_datarootdir=yes
25109       fi
25110     done
25111   fi
25112
25113 if test "x$ac_warn_datarootdir" = xyes; then
25114   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25115 fi
25116
25117 EOF
25118 cat >>$CONFIG_STATUS <<EOF
25119   sed "$ac_vpsub
25120 $extrasub
25121 EOF
25122 cat >>$CONFIG_STATUS <<\EOF
25123 :t
25124 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25125 s,@configure_input@,$configure_input,;t t
25126 s,@srcdir@,$ac_srcdir,;t t
25127 s,@top_srcdir@,$ac_top_srcdir,;t t
25128 s,@INSTALL@,$ac_INSTALL,;t t
25129 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25130   rm -f $tmp/stdin
25131   if test x"$ac_file" != x-; then
25132     cp $tmp/out $ac_file
25133
25134     for ac_name in prefix exec_prefix datarootdir
25135     do
25136         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25137         if test -n "$ac_seen"; then
25138             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25139             if test -z "$ac_init"; then
25140               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25141               { echo "$as_me:25141: WARNING: Variable $ac_name is used but was not set:
25142 $ac_seen" >&5
25143 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25144 $ac_seen" >&2;}
25145             fi
25146         fi
25147     done
25148     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25149     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25150     if test -s $tmp/out; then
25151       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25152       { echo "$as_me:25152: WARNING: Some variables may not be substituted:
25153 $ac_seen" >&5
25154 echo "$as_me: WARNING: Some variables may not be substituted:
25155 $ac_seen" >&2;}
25156     fi
25157   else
25158     cat $tmp/out
25159   fi
25160   rm -f $tmp/out
25161
25162 done
25163 EOF
25164 cat >>$CONFIG_STATUS <<\EOF
25165
25166 #
25167 # CONFIG_HEADER section.
25168 #
25169
25170 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25171 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25172 #
25173 # ac_d sets the value in "#define NAME VALUE" lines.
25174 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25175 ac_dB='[        ].*$,\1#\2'
25176 ac_dC=' '
25177 ac_dD=',;t'
25178 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25179 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25180 ac_iB='\([      ]\),\1#\2define\3'
25181 ac_iC=' '
25182 ac_iD='\4,;t'
25183 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25184 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25185 ac_uB='$,\1#\2define\3'
25186 ac_uC=' '
25187 ac_uD=',;t'
25188
25189 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25190   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25191   case $ac_file in
25192   - | *:- | *:-:* ) # input from stdin
25193         cat >$tmp/stdin
25194         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25195         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25196   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25197         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25198   * )   ac_file_in=$ac_file.in ;;
25199   esac
25200
25201   test x"$ac_file" != x- && { echo "$as_me:25201: creating $ac_file" >&5
25202 echo "$as_me: creating $ac_file" >&6;}
25203
25204   # First look for the input files in the build tree, otherwise in the
25205   # src tree.
25206   ac_file_inputs=`IFS=:
25207     for f in $ac_file_in; do
25208       case $f in
25209       -) echo $tmp/stdin ;;
25210       [\\/$]*)
25211          # Absolute (can't be DOS-style, as IFS=:)
25212          test -f "$f" || { { echo "$as_me:25212: error: cannot find input file: $f" >&5
25213 echo "$as_me: error: cannot find input file: $f" >&2;}
25214    { (exit 1); exit 1; }; }
25215          echo $f;;
25216       *) # Relative
25217          if test -f "$f"; then
25218            # Build tree
25219            echo $f
25220          elif test -f "$srcdir/$f"; then
25221            # Source tree
25222            echo $srcdir/$f
25223          else
25224            # /dev/null tree
25225            { { echo "$as_me:25225: error: cannot find input file: $f" >&5
25226 echo "$as_me: error: cannot find input file: $f" >&2;}
25227    { (exit 1); exit 1; }; }
25228          fi;;
25229       esac
25230     done` || { (exit 1); exit 1; }
25231   # Remove the trailing spaces.
25232   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25233
25234 EOF
25235
25236 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25237 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25238 # be either 'cat' or 'sort'.
25239 cat confdefs.h | uniq >conftest.vals
25240
25241 # Break up conftest.vals because some shells have a limit on
25242 # the size of here documents, and old seds have small limits too.
25243
25244 rm -f conftest.tail
25245 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25246 while grep . conftest.vals >/dev/null
25247 do
25248   # Write chunks of a limited-size here document to conftest.frag.
25249   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25250   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25251   echo 'CEOF' >> $CONFIG_STATUS
25252   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25253   rm -f conftest.vals
25254   mv conftest.tail conftest.vals
25255 done
25256 rm -f conftest.vals
25257
25258 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25259 # marker @DEFS@.
25260 echo '  cat >> conftest.edit <<CEOF
25261 /@DEFS@/r conftest.frag
25262 /@DEFS@/d
25263 CEOF
25264 sed -f conftest.edit $tmp/in > $tmp/out
25265 rm -f $tmp/in
25266 mv $tmp/out $tmp/in
25267 rm -f conftest.edit conftest.frag
25268 ' >> $CONFIG_STATUS
25269
25270 cat >>$CONFIG_STATUS <<\EOF
25271   # Let's still pretend it is `configure' which instantiates (i.e., don't
25272   # use $as_me), people would be surprised to read:
25273   #    /* config.h.  Generated automatically by config.status.  */
25274   if test x"$ac_file" = x-; then
25275     echo "/* Generated automatically by configure.  */" >$tmp/config.h
25276   else
25277     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25278   fi
25279   cat $tmp/in >>$tmp/config.h
25280   rm -f $tmp/in
25281   if test x"$ac_file" != x-; then
25282     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25283       { echo "$as_me:25283: $ac_file is unchanged" >&5
25284 echo "$as_me: $ac_file is unchanged" >&6;}
25285     else
25286       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25287          X"$ac_file" : 'X\(//\)[^/]' \| \
25288          X"$ac_file" : 'X\(//\)$' \| \
25289          X"$ac_file" : 'X\(/\)' \| \
25290          .     : '\(.\)' 2>/dev/null ||
25291 echo X"$ac_file" |
25292     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25293           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25294           /^X\(\/\/\)$/{ s//\1/; q; }
25295           /^X\(\/\).*/{ s//\1/; q; }
25296           s/.*/./; q'`
25297       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25298         { case "$ac_dir" in
25299   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25300   *)                      as_incr_dir=.;;
25301 esac
25302 as_dummy="$ac_dir"
25303 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25304   case $as_mkdir_dir in
25305     # Skip DOS drivespec
25306     ?:) as_incr_dir=$as_mkdir_dir ;;
25307     *)
25308       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25309       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25310     ;;
25311   esac
25312 done; }
25313
25314       fi
25315       rm -f $ac_file
25316       mv $tmp/config.h $ac_file
25317     fi
25318   else
25319     cat $tmp/config.h
25320     rm -f $tmp/config.h
25321   fi
25322 done
25323 EOF
25324 cat >>$CONFIG_STATUS <<\EOF
25325 #
25326 # CONFIG_COMMANDS section.
25327 #
25328 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25329   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25330   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25331
25332   case $ac_dest in
25333     default )
25334 if test "x$cf_with_tests" != xno ; then
25335
25336 for cf_dir in test
25337 do
25338         if test ! -d $srcdir/$cf_dir; then
25339                 continue
25340         elif test -f $srcdir/$cf_dir/programs; then
25341                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
25342         fi
25343 done
25344
25345 fi
25346
25347 cf_prefix=$LIB_PREFIX
25348
25349 case $cf_cv_shlib_version in
25350 (cygdll|msysdll|mingw)
25351         TINFO_NAME=$TINFO_ARG_SUFFIX
25352         TINFO_SUFFIX=.dll
25353         ;;
25354 esac
25355
25356 if test -n "$TINFO_SUFFIX" ; then
25357         case $TINFO_SUFFIX in
25358         (tw*)
25359                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
25360                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
25361                 ;;
25362         (t*)
25363                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
25364                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
25365                 ;;
25366         (w*)
25367                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
25368                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
25369                 ;;
25370         esac
25371 fi
25372
25373 for cf_dir in $SRC_SUBDIRS
25374 do
25375         if test ! -d $srcdir/$cf_dir ; then
25376                 continue
25377         elif test -f $srcdir/$cf_dir/modules; then
25378
25379                 SHARED_LIB=
25380                 Libs_To_Make=
25381                 cf_awk_program=
25382                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
25383                 then
25384                         cf_awk_program="$cf_awk_program\
25385 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
25386 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
25387 "
25388                 fi
25389
25390                 if test "x$WILDCARD_SYMS" = xno
25391                 then
25392                         cf_awk_program="$cf_awk_program\
25393 /[      ]_\\*;/ { skip=1; next; }\
25394 "
25395                 fi
25396
25397                 if test "x$cf_awk_program" != "x"
25398                 then
25399                         cat >>$cf_dir/Makefile <<CF_EOF
25400
25401 # Generated by CF_LIB_RULES
25402 resulting.map: $UNALTERED_SYMS
25403         $AWK 'BEGIN { skip = 1; last=""; } \
25404 $cf_awk_program \
25405 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
25406  skip = 0; last = \$\$0; } \
25407 END { print last; }' < $UNALTERED_SYMS >\$@
25408
25409 distclean::
25410         rm -f resulting.map
25411 CF_EOF
25412                 fi
25413
25414                 for cf_item in $cf_LIST_MODELS
25415                 do
25416
25417         case X$cf_item in
25418         (Xlibtool)
25419                 cf_suffix='.la'
25420                 cf_depsuf=$cf_suffix
25421                 ;;
25422         (Xdebug)
25423                 cf_suffix='_g.a'
25424                 cf_depsuf=$cf_suffix
25425                 ;;
25426         (Xprofile)
25427                 cf_suffix='_p.a'
25428                 cf_depsuf=$cf_suffix
25429                 ;;
25430         (Xshared)
25431                 case $cf_cv_system_name in
25432                 (aix[5-7]*)
25433                         cf_suffix='.so'
25434                         cf_depsuf=$cf_suffix
25435                         ;;
25436                 (cygwin*|msys*|mingw*)
25437                         cf_suffix='.dll'
25438                         cf_depsuf='.dll.a'
25439                         ;;
25440                 (darwin*)
25441                         cf_suffix='.dylib'
25442                         cf_depsuf=$cf_suffix
25443                         ;;
25444                 (hpux*)
25445                         case $target in
25446                         (ia64*)
25447                                 cf_suffix='.so'
25448                                 cf_depsuf=$cf_suffix
25449                                 ;;
25450                         (*)
25451                                 cf_suffix='.sl'
25452                                 cf_depsuf=$cf_suffix
25453                                 ;;
25454                         esac
25455                         ;;
25456                 (*)
25457                         cf_suffix='.so'
25458                         cf_depsuf=$cf_suffix
25459                         ;;
25460                 esac
25461                 ;;
25462         (*)
25463                 cf_suffix='.a'
25464                 cf_depsuf=$cf_suffix
25465                 ;;
25466         esac
25467         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25468         then
25469                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25470                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25471         fi
25472
25473                         cf_libname=$cf_dir
25474                         test "$cf_dir" = c++ && cf_libname=ncurses++
25475                         if test $cf_item = shared ; then
25476                                 if test -n "${LIB_SUFFIX}"
25477                                 then
25478                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25479                                 else
25480                                         cf_shared_suffix="$cf_suffix"
25481                                 fi
25482                                 if test "$cf_cv_do_symlinks" = yes ; then
25483                                         cf_version_name=
25484
25485                                         case "$cf_cv_shlib_version" in
25486                                         (rel)
25487                                                 cf_version_name=REL_VERSION
25488                                                 ;;
25489                                         (abi)
25490                                                 cf_version_name=ABI_VERSION
25491                                                 ;;
25492                                         esac
25493
25494                                         if test -n "$cf_version_name"
25495                                         then
25496                                                 case "$cf_cv_system_name" in
25497                                                 (darwin*)
25498                                                         # "w", etc?
25499                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
25500                                                         ;;
25501                                                 (*)
25502                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
25503                                                         ;;
25504                                                 esac
25505                                         fi
25506                                         if test -n "${USE_LIB_SUFFIX}"
25507                                         then
25508                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25509                                         else
25510                                                 cf_shared_suffix="$cf_suffix"
25511                                         fi
25512                                 fi
25513                                 # cygwin needs import library, and has unique naming convention
25514                                 # use autodetected ${cf_prefix} for import lib and static lib, but
25515                                 # use 'cyg' prefix for shared lib.
25516                                 case $cf_cv_shlib_version in
25517                                 (cygdll)
25518                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25519                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
25520                                         ;;
25521                                 (msysdll)
25522                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25523                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
25524                                         ;;
25525                                 (mingw)
25526                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25527                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
25528                                         ;;
25529                                 (*)
25530                                         cf_add_lib=
25531                                         ;;
25532                                 esac
25533                                 if test -n "$cf_add_lib"
25534                                 then
25535                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25536                                         continue
25537                                 fi
25538                         fi
25539                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
25540                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25541                 done
25542
25543                 if test $cf_dir = ncurses ; then
25544                         cf_subsets="$LIB_SUBSETS"
25545                         cf_r_parts="$cf_subsets"
25546                         cf_liblist="$Libs_To_Make"
25547
25548                         while test -n "$cf_r_parts"
25549                         do
25550                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
25551                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
25552                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
25553                                         cf_add_lib=
25554                                         case $cf_l_parts in
25555                                         (*termlib*)
25556                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
25557                                                 ;;
25558                                         (*ticlib*)
25559                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
25560                                                 ;;
25561                                         (*)
25562                                                 break
25563                                                 ;;
25564                                         esac
25565                                         if test -n "$cf_add_lib"; then
25566                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
25567                                         fi
25568                                 else
25569                                         break
25570                                 fi
25571                         done
25572                 else
25573                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
25574                 fi
25575
25576                 if test $cf_dir = c++; then
25577                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
25578                                 cf_list=
25579                                 for cf_item in $Libs_To_Make
25580                                 do
25581                                         case $cf_item in
25582                                         (*.a)
25583                                                 ;;
25584                                         (*)
25585                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
25586                                                 ;;
25587                                         esac
25588                                         for cf_test in $cf_list
25589                                         do
25590                                                 if test "$cf_test" = "$cf_item"
25591                                                 then
25592                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
25593                                                         cf_item=
25594                                                         break
25595                                                 fi
25596                                         done
25597                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
25598                                 done
25599                                 Libs_To_Make="$cf_list"
25600                         fi
25601                 fi
25602
25603                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
25604                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
25605                         $cf_dir/Makefile >$cf_dir/Makefile.out
25606                 mv $cf_dir/Makefile.out $cf_dir/Makefile
25607
25608                 $AWK -f $srcdir/mk-0th.awk \
25609                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
25610                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25611
25612                 for cf_subset in $cf_subsets
25613                 do
25614                         cf_subdirs=
25615                         for cf_item in $cf_LIST_MODELS
25616                         do
25617
25618                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
25619
25620 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25621
25622                         CXX_MODEL=$cf_ITEM
25623                         if test "$CXX_MODEL" = SHARED; then
25624                                 case $cf_cv_shlib_version in
25625                                 (cygdll|msysdll|mingw)
25626                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
25627
25628 echo "${as_me:-configure}:25628: testing overriding CXX_MODEL to SHARED ..." 1>&5
25629
25630                                         with_shared_cxx=yes
25631                                         ;;
25632                                 (*)
25633                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
25634                                         ;;
25635                                 esac
25636                         fi
25637
25638         case X$cf_item in
25639         (Xlibtool)
25640                 cf_suffix='.la'
25641                 cf_depsuf=$cf_suffix
25642                 ;;
25643         (Xdebug)
25644                 cf_suffix='_g.a'
25645                 cf_depsuf=$cf_suffix
25646                 ;;
25647         (Xprofile)
25648                 cf_suffix='_p.a'
25649                 cf_depsuf=$cf_suffix
25650                 ;;
25651         (Xshared)
25652                 case $cf_cv_system_name in
25653                 (aix[5-7]*)
25654                         cf_suffix='.so'
25655                         cf_depsuf=$cf_suffix
25656                         ;;
25657                 (cygwin*|msys*|mingw*)
25658                         cf_suffix='.dll'
25659                         cf_depsuf='.dll.a'
25660                         ;;
25661                 (darwin*)
25662                         cf_suffix='.dylib'
25663                         cf_depsuf=$cf_suffix
25664                         ;;
25665                 (hpux*)
25666                         case $target in
25667                         (ia64*)
25668                                 cf_suffix='.so'
25669                                 cf_depsuf=$cf_suffix
25670                                 ;;
25671                         (*)
25672                                 cf_suffix='.sl'
25673                                 cf_depsuf=$cf_suffix
25674                                 ;;
25675                         esac
25676                         ;;
25677                 (*)
25678                         cf_suffix='.so'
25679                         cf_depsuf=$cf_suffix
25680                         ;;
25681                 esac
25682                 ;;
25683         (*)
25684                 cf_suffix='.a'
25685                 cf_depsuf=$cf_suffix
25686                 ;;
25687         esac
25688         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25689         then
25690                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25691                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25692         fi
25693
25694         case $cf_item in
25695         (libtool) cf_subdir='obj_lo'  ;;
25696         (normal)  cf_subdir='objects' ;;
25697         (debug)   cf_subdir='obj_g' ;;
25698         (profile) cf_subdir='obj_p' ;;
25699         (shared)
25700                 case $cf_cv_system_name in
25701                 (cygwin|msys)
25702                         cf_subdir='objects' ;;
25703                 (*)
25704                         cf_subdir='obj_s' ;;
25705                 esac
25706         esac
25707
25708                         # Test for case where we build libtinfo with a different name.
25709                         cf_libname=$cf_dir
25710                         if test $cf_dir = ncurses ; then
25711                                 case $cf_subset in
25712                                 (*base*)
25713                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25714                                         ;;
25715                                 (*termlib*)
25716                                         cf_libname=$TINFO_LIB_SUFFIX
25717                                         ;;
25718                                 (ticlib*)
25719                                         cf_libname=$TICS_LIB_SUFFIX
25720                                         ;;
25721                                 esac
25722                         elif test $cf_dir = c++ ; then
25723                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25724                         else
25725                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25726                         fi
25727                         if test -n "${USE_ARG_SUFFIX}" ; then
25728                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25729                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25730                         fi
25731
25732                         # These dependencies really are for development, not
25733                         # builds, but they are useful in porting, too.
25734                         cf_depend="../include/ncurses_cfg.h"
25735                         if test "$srcdir" = "."; then
25736                                 cf_reldir="."
25737                         else
25738                                 cf_reldir="\${srcdir}"
25739                         fi
25740
25741                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25742                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25743                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25744                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25745                         fi
25746
25747                         cf_dir_suffix=
25748                         old_cf_suffix="$cf_suffix"
25749                         if test "$cf_cv_shlib_version_infix" = yes ; then
25750                         if test -n "$USE_LIB_SUFFIX" ; then
25751                                 case $USE_LIB_SUFFIX in
25752                                 (tw*)
25753                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25754                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25755                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25756                                         ;;
25757                                 (t*)
25758                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25759                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25760                                         cf_dir_suffix=t$EXTRA_SUFFIX
25761                                         ;;
25762                                 (w*)
25763                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25764                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25765                                         cf_dir_suffix=w$EXTRA_SUFFIX
25766                                         ;;
25767                                 (*)
25768                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25769                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25770                                         cf_dir_suffix=$EXTRA_SUFFIX
25771                                         ;;
25772                                 esac
25773                         fi
25774                         fi
25775
25776                         $AWK -f $srcdir/mk-1st.awk \
25777                                 name=${cf_libname}${cf_dir_suffix} \
25778                                 traces=$LIB_TRACING \
25779                                 MODEL=$cf_ITEM \
25780                                 CXX_MODEL=$CXX_MODEL \
25781                                 model=$cf_subdir \
25782                                 prefix=$cf_prefix \
25783                                 suffix=$cf_suffix \
25784                                 subset=$cf_subset \
25785                                 driver=$cf_cv_term_driver \
25786                                 SymLink="$LN_S" \
25787                                 TermlibRoot=$TINFO_NAME \
25788                                 TermlibSuffix=$TINFO_SUFFIX \
25789                                 ShlibVer=$cf_cv_shlib_version \
25790                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25791                                 ReLink=${cf_cv_do_relink:-no} \
25792                                 DoLinks=$cf_cv_do_symlinks \
25793                                 rmSoLocs=$cf_cv_rm_so_locs \
25794                                 ldconfig="$LDCONFIG" \
25795                                 overwrite=$WITH_OVERWRITE \
25796                                 depend="$cf_depend" \
25797                                 host="$host" \
25798                                 libtool_version="$LIBTOOL_VERSION" \
25799                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25800
25801                         cf_suffix="$old_cf_suffix"
25802
25803                         for cf_subdir2 in $cf_subdirs lib
25804                         do
25805                                 test $cf_subdir = $cf_subdir2 && break
25806                         done
25807                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25808                         $AWK -f $srcdir/mk-2nd.awk \
25809                                 name=$cf_dir \
25810                                 traces=$LIB_TRACING \
25811                                 MODEL=$cf_ITEM \
25812                                 model=$cf_subdir \
25813                                 subset=$cf_subset \
25814                                 srcdir=$srcdir \
25815                                 echo=$WITH_ECHO \
25816                                 crenames=$cf_cv_prog_CC_c_o \
25817                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25818                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25819                         cf_subdirs="$cf_subdirs $cf_subdir"
25820                         done
25821                 done
25822         fi
25823
25824         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25825 done
25826
25827 for cf_dir in $SRC_SUBDIRS
25828 do
25829         if test ! -d $srcdir/$cf_dir ; then
25830                 continue
25831         fi
25832
25833         if test -f $cf_dir/Makefile ; then
25834                 case "$cf_dir" in
25835                 (Ada95)
25836                         echo 'libs \' >> Makefile
25837                         echo 'install.libs \' >> Makefile
25838                         echo 'uninstall.libs ::' >> Makefile
25839                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25840                         ;;
25841                 esac
25842         fi
25843
25844         if test -f $srcdir/$cf_dir/modules; then
25845                 echo >> Makefile
25846                 if test -f $srcdir/$cf_dir/headers; then
25847 cat >> Makefile <<CF_EOF
25848 install.includes \\
25849 uninstall.includes \\
25850 CF_EOF
25851                 fi
25852 if test "$cf_dir" != "c++" ; then
25853 echo 'lint \' >> Makefile
25854 fi
25855 cat >> Makefile <<CF_EOF
25856 libs \\
25857 lintlib \\
25858 install.libs \\
25859 uninstall.libs \\
25860 install.$cf_dir \\
25861 uninstall.$cf_dir ::
25862         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25863 CF_EOF
25864         elif test -f $srcdir/$cf_dir/headers; then
25865 cat >> Makefile <<CF_EOF
25866
25867 libs \\
25868 install.libs \\
25869 uninstall.libs \\
25870 install.includes \\
25871 uninstall.includes ::
25872         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25873 CF_EOF
25874 fi
25875 done
25876
25877 if test "x$cf_with_db_install" = xyes; then
25878 cat >> Makefile <<CF_EOF
25879
25880 install.libs uninstall.libs \\
25881 install.data uninstall.data ::
25882 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25883 CF_EOF
25884 else
25885 cat >> Makefile <<CF_EOF
25886
25887 install.libs uninstall.libs ::
25888         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25889 CF_EOF
25890 fi
25891
25892 if test "x$cf_with_manpages" = xyes; then
25893 cat >> Makefile <<CF_EOF
25894
25895 install.man \\
25896 uninstall.man ::
25897         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25898 CF_EOF
25899 fi
25900
25901 cat >> Makefile <<CF_EOF
25902
25903 distclean ::
25904         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25905         rm -f headers.sh headers.sed mk_shared_lib.sh
25906         rm -f edit_man.* man_alias.*
25907         rm -rf \${DIRS_TO_MAKE}
25908 CF_EOF
25909
25910 # Special case: tack's manpage lives in its own directory.
25911 if test "x$cf_with_manpages" = xyes; then
25912 if test "x$cf_with_tack" = "xyes"; then
25913 cat >> Makefile <<CF_EOF
25914
25915 install.man \\
25916 uninstall.man ::
25917         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25918 CF_EOF
25919 fi
25920 fi
25921
25922 rm -f headers.sed headers.sh
25923
25924 echo creating headers.sh
25925 cat >headers.sh <<CF_EOF
25926 #! $SHELL
25927 # This shell script is generated by the 'configure' script.  It is invoked in a
25928 # subdirectory of the build tree.  It generates a sed-script in the parent
25929 # directory that is used to adjust includes for header files that reside in a
25930 # subdirectory of /usr/include, etc.
25931 PRG=""
25932 while test \$# != 3
25933 do
25934 PRG="\$PRG \$1"; shift
25935 done
25936 DST=\$1
25937 REF=\$2
25938 SRC=\$3
25939 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25940 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25941 echo installing \$SRC in \$DST
25942 CF_EOF
25943
25944 if test $WITH_CURSES_H = yes; then
25945         cat >>headers.sh <<CF_EOF
25946 case \$DST in
25947 (/*/include/*)
25948         END=\`basename \$DST\`
25949         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25950         do
25951                 NAME=\`basename \$i\`
25952                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25953         done
25954         ;;
25955 (*)
25956         echo "" >> \$TMPSED
25957         ;;
25958 esac
25959 CF_EOF
25960
25961 else
25962         cat >>headers.sh <<CF_EOF
25963 case \$DST in
25964 (/*/include/*)
25965         END=\`basename \$DST\`
25966         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25967         do
25968                 NAME=\`basename \$i\`
25969                 if test "\$NAME" = "curses.h"
25970                 then
25971                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25972                         NAME=ncurses.h
25973                 fi
25974                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25975         done
25976         ;;
25977 (*)
25978         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25979         ;;
25980 esac
25981 CF_EOF
25982 fi
25983 cat >>headers.sh <<CF_EOF
25984 rm -f \$TMPSRC
25985 sed -f \$TMPSED \$SRC > \$TMPSRC
25986 NAME=\`basename \$SRC\`
25987 CF_EOF
25988 if test $WITH_CURSES_H != yes; then
25989         cat >>headers.sh <<CF_EOF
25990 test "\$NAME" = "curses.h" && NAME=ncurses.h
25991 CF_EOF
25992 fi
25993 cat >>headers.sh <<CF_EOF
25994 # Just in case someone gzip'd manpages, remove the conflicting copy.
25995 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25996
25997 eval \$PRG \$TMPSRC \$DST/\$NAME
25998 rm -f \$TMPSRC \$TMPSED
25999 CF_EOF
26000
26001 chmod 0755 headers.sh
26002
26003 for cf_dir in $SRC_SUBDIRS
26004 do
26005         if test ! -d $srcdir/$cf_dir ; then
26006                 continue
26007         fi
26008
26009         if test -f $srcdir/$cf_dir/headers; then
26010                 $AWK -f $srcdir/mk-hdr.awk \
26011                         subset="$LIB_SUBSETS" \
26012                         compat="$WITH_CURSES_H" \
26013                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26014         fi
26015
26016         if test -f $srcdir/$cf_dir/modules; then
26017                 if test "$cf_dir" != "c++" ; then
26018                         cat >>$cf_dir/Makefile <<"CF_EOF"
26019 depend : ${AUTO_SRC}
26020         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26021
26022 # DO NOT DELETE THIS LINE -- make depend depends on it.
26023 CF_EOF
26024                 fi
26025         fi
26026 done
26027
26028 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26029 if test -z "$USE_OLD_MAKERULES" ; then
26030         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26031 fi
26032 fi
26033  ;;
26034   esac
26035 done
26036 EOF
26037
26038 cat >>$CONFIG_STATUS <<\EOF
26039
26040 { (exit 0); exit 0; }
26041 EOF
26042 chmod +x $CONFIG_STATUS
26043 ac_clean_files=$ac_clean_files_save
26044
26045 # configure is writing to config.log, and then calls config.status.
26046 # config.status does its own redirection, appending to config.log.
26047 # Unfortunately, on DOS this fails, as config.log is still kept open
26048 # by configure, so config.status won't be able to write to it; its
26049 # output is simply discarded.  So we exec the FD to /dev/null,
26050 # effectively closing config.log, so it can be properly (re)opened and
26051 # appended to by config.status.  When coming back to configure, we
26052 # need to make the FD available again.
26053 if test "$no_create" != yes; then
26054   ac_cs_success=:
26055   exec 5>/dev/null
26056   $SHELL $CONFIG_STATUS || ac_cs_success=false
26057   exec 5>>config.log
26058   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26059   # would make configure fail if this is the last instruction.
26060   $ac_cs_success || { (exit 1); exit 1; }
26061 fi
26062 ${MAKE:-make} preinstall